@atlaskit/editor-plugin-tasks-and-decisions 2.3.0 → 2.3.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 +17 -0
- package/dist/cjs/nodeviews/decision-lazy-node-view.js +32 -0
- package/dist/cjs/nodeviews/task-lazy-node-view.js +34 -0
- package/dist/cjs/plugin.js +30 -7
- package/dist/cjs/pm-plugins/main.js +4 -4
- package/dist/cjs/toDOM-fixes/decisionItem.js +46 -0
- package/dist/es2019/nodeviews/decision-lazy-node-view.js +21 -0
- package/dist/es2019/nodeviews/task-lazy-node-view.js +23 -0
- package/dist/es2019/plugin.js +27 -3
- package/dist/es2019/pm-plugins/main.js +4 -4
- package/dist/es2019/toDOM-fixes/decisionItem.js +38 -0
- package/dist/esm/nodeviews/decision-lazy-node-view.js +20 -0
- package/dist/esm/nodeviews/task-lazy-node-view.js +22 -0
- package/dist/esm/plugin.js +29 -3
- package/dist/esm/pm-plugins/main.js +4 -4
- package/dist/esm/toDOM-fixes/decisionItem.js +39 -0
- package/dist/types/nodeviews/decision-lazy-node-view.d.ts +5 -0
- package/dist/types/nodeviews/task-lazy-node-view.d.ts +6 -0
- package/dist/types/plugin.d.ts +1 -0
- package/dist/types/toDOM-fixes/decisionItem.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/decision-lazy-node-view.d.ts +5 -0
- package/dist/types-ts4.5/nodeviews/task-lazy-node-view.d.ts +6 -0
- package/dist/types-ts4.5/plugin.d.ts +1 -0
- package/dist/types-ts4.5/toDOM-fixes/decisionItem.d.ts +1 -0
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 2.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#127170](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/127170)
|
|
8
|
+
[`4599c24981ca4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4599c24981ca4) -
|
|
9
|
+
[ux] Implement and align lazy node view fallback with the node view for decision node.
|
|
10
|
+
|
|
11
|
+
## 2.3.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#124164](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/124164)
|
|
16
|
+
[`5a96af255a094`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5a96af255a094) -
|
|
17
|
+
Enabling lazy node view loading behind a feature flag for tasks for performance.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 2.3.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.lazyDecisionView = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
+
var _decisionItem = require("./decisionItem");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
var lazyDecisionView = exports.lazyDecisionView = function lazyDecisionView(portalProviderAPI, eventDispatcher, api) {
|
|
15
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_lazy-node-views')) {
|
|
16
|
+
return (0, _decisionItem.decisionItemNodeView)(portalProviderAPI, eventDispatcher, api);
|
|
17
|
+
}
|
|
18
|
+
return (0, _lazyNodeView.withLazyLoading)({
|
|
19
|
+
nodeName: 'decisionItem',
|
|
20
|
+
getNodeViewOptions: function getNodeViewOptions() {},
|
|
21
|
+
loader: function loader() {
|
|
22
|
+
var result = Promise.resolve().then(function () {
|
|
23
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-plugin-tasks-and-decisions_decision-item-nodeview" */
|
|
24
|
+
'./decisionItem'));
|
|
25
|
+
}).then(function (_ref) {
|
|
26
|
+
var decisionItemNodeView = _ref.decisionItemNodeView;
|
|
27
|
+
return decisionItemNodeView(portalProviderAPI, eventDispatcher, api);
|
|
28
|
+
});
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.lazyTaskView = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
+
var _taskItem = require("./taskItem");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
var lazyTaskView = exports.lazyTaskView = function lazyTaskView(portalProviderAPI, eventDispatcher, providerFactory, api) {
|
|
15
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_lazy-node-views')) {
|
|
16
|
+
return (0, _taskItem.taskItemNodeViewFactory)(portalProviderAPI, eventDispatcher, providerFactory, api);
|
|
17
|
+
}
|
|
18
|
+
return (0, _lazyNodeView.withLazyLoading)({
|
|
19
|
+
nodeName: 'taskItem',
|
|
20
|
+
getNodeViewOptions: function getNodeViewOptions() {},
|
|
21
|
+
loader: function loader() {
|
|
22
|
+
var result = Promise.resolve().then(function () {
|
|
23
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_editor-plugin-tasks-and-decisions_task-item-nodeview" */
|
|
24
|
+
'./taskItem'));
|
|
25
|
+
}).then(function (_ref) {
|
|
26
|
+
var taskItemNodeViewFactory = _ref.taskItemNodeViewFactory;
|
|
27
|
+
return function (node, view, getPos) {
|
|
28
|
+
return taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api)(node, view, getPos);
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
};
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -5,32 +5,55 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.tasksAndDecisionsPlugin = void 0;
|
|
8
|
+
exports.tasksAndDecisionsPlugin = exports.taskItemSpecWithFixedToDOM = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _react = require("@emotion/react");
|
|
10
11
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
13
|
var _indentation = require("@atlaskit/editor-common/indentation");
|
|
13
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
15
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
var _commands = require("./commands");
|
|
16
18
|
var _helpers = require("./pm-plugins/helpers");
|
|
17
19
|
var _inputRules = _interopRequireDefault(require("./pm-plugins/input-rules"));
|
|
18
20
|
var _keymaps = _interopRequireWildcard(require("./pm-plugins/keymaps"));
|
|
19
21
|
var _main = require("./pm-plugins/main");
|
|
20
22
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
23
|
+
var _decisionItem = require("./toDOM-fixes/decisionItem");
|
|
21
24
|
var _ToolbarDecision = _interopRequireDefault(require("./ui/ToolbarDecision"));
|
|
22
25
|
var _ToolbarTask = _interopRequireDefault(require("./ui/ToolbarTask"));
|
|
23
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
-
|
|
28
|
+
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; }
|
|
29
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
26
30
|
* @jsxRuntime classic
|
|
27
31
|
* @jsx jsx
|
|
28
|
-
*/
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
|
-
|
|
32
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
31
33
|
var taskDecisionToolbarGroupStyles = (0, _react.css)({
|
|
32
34
|
display: 'flex'
|
|
33
35
|
});
|
|
36
|
+
// @nodeSpecException:toDOM patch
|
|
37
|
+
var taskItemSpecWithFixedToDOM = exports.taskItemSpecWithFixedToDOM = function taskItemSpecWithFixedToDOM() {
|
|
38
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_lazy-node-views')) {
|
|
39
|
+
return _adfSchema.taskItem;
|
|
40
|
+
}
|
|
41
|
+
return _objectSpread(_objectSpread({}, _adfSchema.taskItem), {}, {
|
|
42
|
+
toDOM: function toDOM(node) {
|
|
43
|
+
var checked = node.attrs.state === 'DONE';
|
|
44
|
+
var inputAttrs = {
|
|
45
|
+
type: 'checkbox'
|
|
46
|
+
};
|
|
47
|
+
if (checked) {
|
|
48
|
+
inputAttrs.checked = 'true';
|
|
49
|
+
}
|
|
50
|
+
// TODO: Align styling with `@atlaskit/task-decision`
|
|
51
|
+
return ['div', {
|
|
52
|
+
style: 'display: flex;'
|
|
53
|
+
}, ['input', inputAttrs], ['div', 0]];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
};
|
|
34
57
|
var addItem = function addItem(insert, listType, schema) {
|
|
35
58
|
return function (_ref) {
|
|
36
59
|
var listLocalId = _ref.listLocalId,
|
|
@@ -65,13 +88,13 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
65
88
|
node: _adfSchema.decisionList
|
|
66
89
|
}, {
|
|
67
90
|
name: 'decisionItem',
|
|
68
|
-
node:
|
|
91
|
+
node: (0, _decisionItem.decisionItemSpecWithFixedToDOM)()
|
|
69
92
|
}, {
|
|
70
93
|
name: 'taskList',
|
|
71
94
|
node: _adfSchema.taskList
|
|
72
95
|
}, {
|
|
73
96
|
name: 'taskItem',
|
|
74
|
-
node:
|
|
97
|
+
node: taskItemSpecWithFixedToDOM()
|
|
75
98
|
}];
|
|
76
99
|
},
|
|
77
100
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -13,8 +13,8 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
13
13
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
|
-
var
|
|
17
|
-
var
|
|
16
|
+
var _decisionLazyNodeView = require("../nodeviews/decision-lazy-node-view");
|
|
17
|
+
var _taskLazyNodeView = require("../nodeviews/task-lazy-node-view");
|
|
18
18
|
var _helpers = require("./helpers");
|
|
19
19
|
var _pluginKey = require("./plugin-key");
|
|
20
20
|
var _types = require("./types");
|
|
@@ -33,8 +33,8 @@ function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispa
|
|
|
33
33
|
return new _safePlugin.SafePlugin({
|
|
34
34
|
props: {
|
|
35
35
|
nodeViews: {
|
|
36
|
-
taskItem: (0,
|
|
37
|
-
decisionItem: (0,
|
|
36
|
+
taskItem: (0, _taskLazyNodeView.lazyTaskView)(portalProviderAPI, eventDispatcher, providerFactory, api),
|
|
37
|
+
decisionItem: (0, _decisionLazyNodeView.lazyDecisionView)(portalProviderAPI, eventDispatcher, api)
|
|
38
38
|
},
|
|
39
39
|
handleTextInput: function handleTextInput(view, from, to, text) {
|
|
40
40
|
// When a decision item is selected and the user starts typing, the entire node
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.decisionItemSpecWithFixedToDOM = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
+
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
// @nodeSpecException:toDOM patch
|
|
15
|
+
var decisionItemSpecWithFixedToDOM = exports.decisionItemSpecWithFixedToDOM = function decisionItemSpecWithFixedToDOM() {
|
|
16
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_lazy-node-views')) {
|
|
17
|
+
return _adfSchema.decisionItem;
|
|
18
|
+
}
|
|
19
|
+
return _objectSpread(_objectSpread({}, _adfSchema.decisionItem), {}, {
|
|
20
|
+
toDOM: function toDOM(node) {
|
|
21
|
+
var _node$attrs = node.attrs,
|
|
22
|
+
localId = _node$attrs.localId,
|
|
23
|
+
state = _node$attrs.state;
|
|
24
|
+
var attrs = {
|
|
25
|
+
'data-decision-local-id': localId || 'local-decision',
|
|
26
|
+
'data-decision-state': state,
|
|
27
|
+
// Styles to match `packages/elements/task-decision/src/components/styles.ts`
|
|
28
|
+
style: (0, _lazyNodeView.convertToInlineCss)({
|
|
29
|
+
background: "var(--ds-background-neutral, rgba(9, 30, 66, 0.04))",
|
|
30
|
+
padding: "var(--ds-space-100, 8px)",
|
|
31
|
+
margin: "var(--ds-space-100, 8px)".concat(" 0 0 0"),
|
|
32
|
+
display: 'flex',
|
|
33
|
+
borderRadius: "var(--ds-border-radius, 4px)"
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
return ['li', attrs, ['span', {
|
|
37
|
+
// Styles to match `packages/elements/task-decision/src/components/DecisionItem.tsx`
|
|
38
|
+
style: (0, _lazyNodeView.convertToInlineCss)({
|
|
39
|
+
width: '16px',
|
|
40
|
+
height: '16px',
|
|
41
|
+
margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-200, 16px)", " 0 0")
|
|
42
|
+
})
|
|
43
|
+
}], ['span', 0]];
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { decisionItemNodeView } from './decisionItem';
|
|
4
|
+
export const lazyDecisionView = (portalProviderAPI, eventDispatcher, api) => {
|
|
5
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
6
|
+
return decisionItemNodeView(portalProviderAPI, eventDispatcher, api);
|
|
7
|
+
}
|
|
8
|
+
return withLazyLoading({
|
|
9
|
+
nodeName: 'decisionItem',
|
|
10
|
+
getNodeViewOptions: () => {},
|
|
11
|
+
loader: () => {
|
|
12
|
+
const result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-tasks-and-decisions_decision-item-nodeview" */
|
|
13
|
+
'./decisionItem').then(({
|
|
14
|
+
decisionItemNodeView
|
|
15
|
+
}) => {
|
|
16
|
+
return decisionItemNodeView(portalProviderAPI, eventDispatcher, api);
|
|
17
|
+
});
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { taskItemNodeViewFactory } from './taskItem';
|
|
4
|
+
export const lazyTaskView = (portalProviderAPI, eventDispatcher, providerFactory, api) => {
|
|
5
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
6
|
+
return taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api);
|
|
7
|
+
}
|
|
8
|
+
return withLazyLoading({
|
|
9
|
+
nodeName: 'taskItem',
|
|
10
|
+
getNodeViewOptions: () => {},
|
|
11
|
+
loader: () => {
|
|
12
|
+
const result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-tasks-and-decisions_task-item-nodeview" */
|
|
13
|
+
'./taskItem').then(({
|
|
14
|
+
taskItemNodeViewFactory
|
|
15
|
+
}) => {
|
|
16
|
+
return (node, view, getPos) => {
|
|
17
|
+
return taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api)(node, view, getPos);
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -4,22 +4,46 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import {
|
|
7
|
+
import { decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
|
|
8
8
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
10
10
|
import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
13
|
import { getListTypes, insertTaskDecisionAction, insertTaskDecisionCommand } from './commands';
|
|
13
14
|
import { getCurrentIndentLevel, getTaskItemIndex, isInsideTask } from './pm-plugins/helpers';
|
|
14
15
|
import inputRulePlugin from './pm-plugins/input-rules';
|
|
15
16
|
import keymap, { getIndentCommand, getUnindentCommand } from './pm-plugins/keymaps';
|
|
16
17
|
import { createPlugin } from './pm-plugins/main';
|
|
17
18
|
import { stateKey as taskPluginKey } from './pm-plugins/plugin-key';
|
|
19
|
+
import { decisionItemSpecWithFixedToDOM } from './toDOM-fixes/decisionItem';
|
|
18
20
|
import ToolbarDecision from './ui/ToolbarDecision';
|
|
19
21
|
import ToolbarTask from './ui/ToolbarTask';
|
|
20
22
|
const taskDecisionToolbarGroupStyles = css({
|
|
21
23
|
display: 'flex'
|
|
22
24
|
});
|
|
25
|
+
// @nodeSpecException:toDOM patch
|
|
26
|
+
export const taskItemSpecWithFixedToDOM = () => {
|
|
27
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
28
|
+
return taskItem;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
...taskItem,
|
|
32
|
+
toDOM: node => {
|
|
33
|
+
const checked = node.attrs.state === 'DONE';
|
|
34
|
+
const inputAttrs = {
|
|
35
|
+
type: 'checkbox'
|
|
36
|
+
};
|
|
37
|
+
if (checked) {
|
|
38
|
+
inputAttrs.checked = 'true';
|
|
39
|
+
}
|
|
40
|
+
// TODO: Align styling with `@atlaskit/task-decision`
|
|
41
|
+
return ['div', {
|
|
42
|
+
style: 'display: flex;'
|
|
43
|
+
}, ['input', inputAttrs], ['div', 0]];
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
};
|
|
23
47
|
const addItem = (insert, listType, schema) => ({
|
|
24
48
|
listLocalId,
|
|
25
49
|
itemLocalId
|
|
@@ -55,13 +79,13 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
55
79
|
node: decisionList
|
|
56
80
|
}, {
|
|
57
81
|
name: 'decisionItem',
|
|
58
|
-
node:
|
|
82
|
+
node: decisionItemSpecWithFixedToDOM()
|
|
59
83
|
}, {
|
|
60
84
|
name: 'taskList',
|
|
61
85
|
node: taskList
|
|
62
86
|
}, {
|
|
63
87
|
name: 'taskItem',
|
|
64
|
-
node:
|
|
88
|
+
node: taskItemSpecWithFixedToDOM()
|
|
65
89
|
}];
|
|
66
90
|
},
|
|
67
91
|
getSharedState(editorState) {
|
|
@@ -4,8 +4,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
4
4
|
import { createSelectionClickHandler, GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
5
5
|
import { getStepRange } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { lazyDecisionView } from '../nodeviews/decision-lazy-node-view';
|
|
8
|
+
import { lazyTaskView } from '../nodeviews/task-lazy-node-view';
|
|
9
9
|
import { focusCheckboxAndUpdateSelection, getTaskItemDataAtPos, getTaskItemDataToFocus, removeCheckboxFocus } from './helpers';
|
|
10
10
|
import { stateKey } from './plugin-key';
|
|
11
11
|
import { ACTIONS } from './types';
|
|
@@ -20,8 +20,8 @@ export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory
|
|
|
20
20
|
return new SafePlugin({
|
|
21
21
|
props: {
|
|
22
22
|
nodeViews: {
|
|
23
|
-
taskItem:
|
|
24
|
-
decisionItem:
|
|
23
|
+
taskItem: lazyTaskView(portalProviderAPI, eventDispatcher, providerFactory, api),
|
|
24
|
+
decisionItem: lazyDecisionView(portalProviderAPI, eventDispatcher, api)
|
|
25
25
|
},
|
|
26
26
|
handleTextInput(view, from, to, text) {
|
|
27
27
|
// When a decision item is selected and the user starts typing, the entire node
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { decisionItem } from '@atlaskit/adf-schema';
|
|
2
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
// @nodeSpecException:toDOM patch
|
|
5
|
+
export const decisionItemSpecWithFixedToDOM = () => {
|
|
6
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
7
|
+
return decisionItem;
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
...decisionItem,
|
|
11
|
+
toDOM: node => {
|
|
12
|
+
const {
|
|
13
|
+
localId,
|
|
14
|
+
state
|
|
15
|
+
} = node.attrs;
|
|
16
|
+
const attrs = {
|
|
17
|
+
'data-decision-local-id': localId || 'local-decision',
|
|
18
|
+
'data-decision-state': state,
|
|
19
|
+
// Styles to match `packages/elements/task-decision/src/components/styles.ts`
|
|
20
|
+
style: convertToInlineCss({
|
|
21
|
+
background: "var(--ds-background-neutral, rgba(9, 30, 66, 0.04))",
|
|
22
|
+
padding: "var(--ds-space-100, 8px)",
|
|
23
|
+
margin: `${"var(--ds-space-100, 8px)"} 0 0 0`,
|
|
24
|
+
display: 'flex',
|
|
25
|
+
borderRadius: "var(--ds-border-radius, 4px)"
|
|
26
|
+
})
|
|
27
|
+
};
|
|
28
|
+
return ['li', attrs, ['span', {
|
|
29
|
+
// Styles to match `packages/elements/task-decision/src/components/DecisionItem.tsx`
|
|
30
|
+
style: convertToInlineCss({
|
|
31
|
+
width: '16px',
|
|
32
|
+
height: '16px',
|
|
33
|
+
margin: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-200, 16px)"} 0 0`
|
|
34
|
+
})
|
|
35
|
+
}], ['span', 0]];
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { decisionItemNodeView } from './decisionItem';
|
|
4
|
+
export var lazyDecisionView = function lazyDecisionView(portalProviderAPI, eventDispatcher, api) {
|
|
5
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
6
|
+
return decisionItemNodeView(portalProviderAPI, eventDispatcher, api);
|
|
7
|
+
}
|
|
8
|
+
return withLazyLoading({
|
|
9
|
+
nodeName: 'decisionItem',
|
|
10
|
+
getNodeViewOptions: function getNodeViewOptions() {},
|
|
11
|
+
loader: function loader() {
|
|
12
|
+
var result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-tasks-and-decisions_decision-item-nodeview" */
|
|
13
|
+
'./decisionItem').then(function (_ref) {
|
|
14
|
+
var decisionItemNodeView = _ref.decisionItemNodeView;
|
|
15
|
+
return decisionItemNodeView(portalProviderAPI, eventDispatcher, api);
|
|
16
|
+
});
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { taskItemNodeViewFactory } from './taskItem';
|
|
4
|
+
export var lazyTaskView = function lazyTaskView(portalProviderAPI, eventDispatcher, providerFactory, api) {
|
|
5
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
6
|
+
return taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api);
|
|
7
|
+
}
|
|
8
|
+
return withLazyLoading({
|
|
9
|
+
nodeName: 'taskItem',
|
|
10
|
+
getNodeViewOptions: function getNodeViewOptions() {},
|
|
11
|
+
loader: function loader() {
|
|
12
|
+
var result = import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-tasks-and-decisions_task-item-nodeview" */
|
|
13
|
+
'./taskItem').then(function (_ref) {
|
|
14
|
+
var taskItemNodeViewFactory = _ref.taskItemNodeViewFactory;
|
|
15
|
+
return function (node, view, getPos) {
|
|
16
|
+
return taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api)(node, view, getPos);
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
package/dist/esm/plugin.js
CHANGED
|
@@ -1,25 +1,51 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1
4
|
/**
|
|
2
5
|
* @jsxRuntime classic
|
|
3
6
|
* @jsx jsx
|
|
4
7
|
*/
|
|
5
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
9
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import {
|
|
10
|
+
import { decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
|
|
8
11
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
9
12
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
10
13
|
import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
11
14
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
16
|
import { getListTypes, insertTaskDecisionAction, insertTaskDecisionCommand } from './commands';
|
|
13
17
|
import { getCurrentIndentLevel, getTaskItemIndex, isInsideTask } from './pm-plugins/helpers';
|
|
14
18
|
import inputRulePlugin from './pm-plugins/input-rules';
|
|
15
19
|
import keymap, { getIndentCommand, getUnindentCommand } from './pm-plugins/keymaps';
|
|
16
20
|
import { createPlugin } from './pm-plugins/main';
|
|
17
21
|
import { stateKey as taskPluginKey } from './pm-plugins/plugin-key';
|
|
22
|
+
import { decisionItemSpecWithFixedToDOM } from './toDOM-fixes/decisionItem';
|
|
18
23
|
import ToolbarDecision from './ui/ToolbarDecision';
|
|
19
24
|
import ToolbarTask from './ui/ToolbarTask';
|
|
20
25
|
var taskDecisionToolbarGroupStyles = css({
|
|
21
26
|
display: 'flex'
|
|
22
27
|
});
|
|
28
|
+
// @nodeSpecException:toDOM patch
|
|
29
|
+
export var taskItemSpecWithFixedToDOM = function taskItemSpecWithFixedToDOM() {
|
|
30
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
31
|
+
return taskItem;
|
|
32
|
+
}
|
|
33
|
+
return _objectSpread(_objectSpread({}, taskItem), {}, {
|
|
34
|
+
toDOM: function toDOM(node) {
|
|
35
|
+
var checked = node.attrs.state === 'DONE';
|
|
36
|
+
var inputAttrs = {
|
|
37
|
+
type: 'checkbox'
|
|
38
|
+
};
|
|
39
|
+
if (checked) {
|
|
40
|
+
inputAttrs.checked = 'true';
|
|
41
|
+
}
|
|
42
|
+
// TODO: Align styling with `@atlaskit/task-decision`
|
|
43
|
+
return ['div', {
|
|
44
|
+
style: 'display: flex;'
|
|
45
|
+
}, ['input', inputAttrs], ['div', 0]];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
23
49
|
var addItem = function addItem(insert, listType, schema) {
|
|
24
50
|
return function (_ref) {
|
|
25
51
|
var listLocalId = _ref.listLocalId,
|
|
@@ -54,13 +80,13 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
|
|
|
54
80
|
node: decisionList
|
|
55
81
|
}, {
|
|
56
82
|
name: 'decisionItem',
|
|
57
|
-
node:
|
|
83
|
+
node: decisionItemSpecWithFixedToDOM()
|
|
58
84
|
}, {
|
|
59
85
|
name: 'taskList',
|
|
60
86
|
node: taskList
|
|
61
87
|
}, {
|
|
62
88
|
name: 'taskItem',
|
|
63
|
-
node:
|
|
89
|
+
node: taskItemSpecWithFixedToDOM()
|
|
64
90
|
}];
|
|
65
91
|
},
|
|
66
92
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -9,8 +9,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
9
9
|
import { createSelectionClickHandler, GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
10
10
|
import { getStepRange } from '@atlaskit/editor-common/utils';
|
|
11
11
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { lazyDecisionView } from '../nodeviews/decision-lazy-node-view';
|
|
13
|
+
import { lazyTaskView } from '../nodeviews/task-lazy-node-view';
|
|
14
14
|
import { focusCheckboxAndUpdateSelection, getTaskItemDataAtPos, getTaskItemDataToFocus, removeCheckboxFocus } from './helpers';
|
|
15
15
|
import { stateKey } from './plugin-key';
|
|
16
16
|
import { ACTIONS } from './types';
|
|
@@ -26,8 +26,8 @@ export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory
|
|
|
26
26
|
return new SafePlugin({
|
|
27
27
|
props: {
|
|
28
28
|
nodeViews: {
|
|
29
|
-
taskItem:
|
|
30
|
-
decisionItem:
|
|
29
|
+
taskItem: lazyTaskView(portalProviderAPI, eventDispatcher, providerFactory, api),
|
|
30
|
+
decisionItem: lazyDecisionView(portalProviderAPI, eventDispatcher, api)
|
|
31
31
|
},
|
|
32
32
|
handleTextInput: function handleTextInput(view, from, to, text) {
|
|
33
33
|
// When a decision item is selected and the user starts typing, the entire node
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { decisionItem } from '@atlaskit/adf-schema';
|
|
5
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
// @nodeSpecException:toDOM patch
|
|
8
|
+
export var decisionItemSpecWithFixedToDOM = function decisionItemSpecWithFixedToDOM() {
|
|
9
|
+
if (!fg('platform_editor_lazy-node-views')) {
|
|
10
|
+
return decisionItem;
|
|
11
|
+
}
|
|
12
|
+
return _objectSpread(_objectSpread({}, decisionItem), {}, {
|
|
13
|
+
toDOM: function toDOM(node) {
|
|
14
|
+
var _node$attrs = node.attrs,
|
|
15
|
+
localId = _node$attrs.localId,
|
|
16
|
+
state = _node$attrs.state;
|
|
17
|
+
var attrs = {
|
|
18
|
+
'data-decision-local-id': localId || 'local-decision',
|
|
19
|
+
'data-decision-state': state,
|
|
20
|
+
// Styles to match `packages/elements/task-decision/src/components/styles.ts`
|
|
21
|
+
style: convertToInlineCss({
|
|
22
|
+
background: "var(--ds-background-neutral, rgba(9, 30, 66, 0.04))",
|
|
23
|
+
padding: "var(--ds-space-100, 8px)",
|
|
24
|
+
margin: "var(--ds-space-100, 8px)".concat(" 0 0 0"),
|
|
25
|
+
display: 'flex',
|
|
26
|
+
borderRadius: "var(--ds-border-radius, 4px)"
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
return ['li', attrs, ['span', {
|
|
30
|
+
// Styles to match `packages/elements/task-decision/src/components/DecisionItem.tsx`
|
|
31
|
+
style: convertToInlineCss({
|
|
32
|
+
width: '16px',
|
|
33
|
+
height: '16px',
|
|
34
|
+
margin: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-200, 16px)", " 0 0")
|
|
35
|
+
})
|
|
36
|
+
}], ['span', 0]];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { TasksAndDecisionsPlugin } from '../types';
|
|
5
|
+
export declare const lazyDecisionView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { TasksAndDecisionsPlugin } from '../types';
|
|
6
|
+
export declare const lazyTaskView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const decisionItemSpecWithFixedToDOM: () => import("prosemirror-model").NodeSpec;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { TasksAndDecisionsPlugin } from '../types';
|
|
5
|
+
export declare const lazyDecisionView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import { type PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
4
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { TasksAndDecisionsPlugin } from '../types';
|
|
6
|
+
export declare const lazyTaskView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const decisionItemSpecWithFixedToDOM: () => import("prosemirror-model").NodeSpec;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,15 +36,16 @@
|
|
|
36
36
|
"@atlaskit/adf-schema": "^40.3.0",
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.10.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.3.0",
|
|
39
|
-
"@atlaskit/editor-common": "^
|
|
39
|
+
"@atlaskit/editor-common": "^87.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-analytics": "^1.6.0",
|
|
41
41
|
"@atlaskit/editor-plugin-context-identifier": "^1.2.0",
|
|
42
42
|
"@atlaskit/editor-plugin-type-ahead": "^1.6.0",
|
|
43
43
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
44
|
-
"@atlaskit/icon": "^22.
|
|
44
|
+
"@atlaskit/icon": "^22.10.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
46
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
|
47
47
|
"@atlaskit/task-decision": "^17.10.0",
|
|
48
|
+
"@atlaskit/tokens": "^1.56.0",
|
|
48
49
|
"@babel/runtime": "^7.0.0",
|
|
49
50
|
"@emotion/react": "^11.7.1"
|
|
50
51
|
},
|
|
@@ -99,6 +100,9 @@
|
|
|
99
100
|
"platform-feature-flags": {
|
|
100
101
|
"react_18_tasks_and_decisions_concurrent_mode": {
|
|
101
102
|
"type": "boolean"
|
|
103
|
+
},
|
|
104
|
+
"platform_editor_lazy-node-views": {
|
|
105
|
+
"type": "boolean"
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
108
|
}
|