@atlaskit/editor-plugin-tasks-and-decisions 22.0.0 → 22.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 +14 -0
- package/dist/cjs/pm-plugins/keymaps.js +1 -1
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/tasksAndDecisionsPlugin.js +44 -48
- package/dist/es2019/entry-points/tasks-and-decisions-plugin.js +1 -0
- package/dist/es2019/pm-plugins/keymaps.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/tasksAndDecisionsPlugin.js +44 -48
- package/dist/esm/entry-points/tasks-and-decisions-plugin.js +1 -0
- package/dist/esm/pm-plugins/keymaps.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/tasksAndDecisionsPlugin.js +44 -48
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 22.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 22.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`8d37dc7e55d62`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d37dc7e55d62) -
|
|
14
|
+
Clean up shipped experiment `platform_editor_block_menu`
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 22.0.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getUnindentCommand = exports.getIndentCommand = exports.default = void 0;
|
|
8
8
|
exports.keymapPlugin = keymapPlugin;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
11
10
|
var _setAttrs = require("@atlaskit/adf-schema/steps/set-attrs");
|
|
11
|
+
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
12
12
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
13
|
var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
|
|
14
14
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.createPlugin = createPlugin;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
11
10
|
var _setAttrs = require("@atlaskit/adf-schema/steps/set-attrs");
|
|
11
|
+
var _uuid = require("@atlaskit/adf-schema/uuid");
|
|
12
12
|
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");
|
|
@@ -19,15 +19,14 @@ var _decisionList = require("@atlaskit/adf-schema/decision-list");
|
|
|
19
19
|
var _taskItem = require("@atlaskit/adf-schema/task-item");
|
|
20
20
|
var _taskList = require("@atlaskit/adf-schema/task-list");
|
|
21
21
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
22
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
22
|
var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
24
23
|
var _indentation = require("@atlaskit/editor-common/indentation");
|
|
25
24
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
26
25
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
27
26
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
28
27
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
28
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
29
29
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
31
30
|
var _helpers = require("./pm-plugins/helpers");
|
|
32
31
|
var _inputRules = _interopRequireDefault(require("./pm-plugins/input-rules"));
|
|
33
32
|
var _insertCommands = require("./pm-plugins/insert-commands");
|
|
@@ -36,10 +35,10 @@ var _main = require("./pm-plugins/main");
|
|
|
36
35
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
37
36
|
var _toggleTasklistCommands = require("./pm-plugins/toggle-tasklist-commands");
|
|
38
37
|
var _DecisionListBlockMenuItem = require("./ui/DecisionListBlockMenuItem/DecisionListBlockMenuItem");
|
|
38
|
+
var _getTasksAndDecisionsQuickInsertComponents = require("./ui/quick-insert/getTasksAndDecisionsQuickInsertComponents");
|
|
39
39
|
var _RequestToEditPopup = require("./ui/Task/RequestToEditPopup");
|
|
40
40
|
var _TaskListBlockMenuItem = require("./ui/TaskListBlockMenuItem/TaskListBlockMenuItem");
|
|
41
41
|
var _toolbarComponents = require("./ui/toolbar-components");
|
|
42
|
-
var _getTasksAndDecisionsQuickInsertComponents = require("./ui/quick-insert/getTasksAndDecisionsQuickInsertComponents");
|
|
43
42
|
var _ToolbarDecision = _interopRequireDefault(require("./ui/ToolbarDecision"));
|
|
44
43
|
var _ToolbarTask = _interopRequireDefault(require("./ui/ToolbarTask"));
|
|
45
44
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -94,7 +93,7 @@ function ContentComponent(_ref2) {
|
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
95
|
var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
97
|
-
var _api$analytics2, _api$analytics3, _api$analytics4;
|
|
96
|
+
var _api$blockMenu, _api$analytics2, _api$analytics3, _api$analytics4;
|
|
98
97
|
var _ref3$config = _ref3.config,
|
|
99
98
|
_ref3$config2 = _ref3$config === void 0 ? {} : _ref3$config,
|
|
100
99
|
allowNestedTasks = _ref3$config2.allowNestedTasks,
|
|
@@ -137,50 +136,47 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
137
136
|
});
|
|
138
137
|
});
|
|
139
138
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
}]);
|
|
183
|
-
}
|
|
139
|
+
api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
|
|
140
|
+
type: 'block-menu-item',
|
|
141
|
+
key: _blockMenu.TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key,
|
|
142
|
+
parent: {
|
|
143
|
+
type: 'block-menu-section',
|
|
144
|
+
key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
145
|
+
rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]
|
|
146
|
+
},
|
|
147
|
+
component: function component() {
|
|
148
|
+
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
149
|
+
isSuggested = _ref5.isSuggested;
|
|
150
|
+
return /*#__PURE__*/React.createElement(_TaskListBlockMenuItem.TaskListBlockMenuItem, {
|
|
151
|
+
api: api,
|
|
152
|
+
isSuggested: isSuggested
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
isHidden: function isHidden() {
|
|
156
|
+
var _api$blockMenu2;
|
|
157
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(TASK_LIST_NODE_NAME));
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
type: 'block-menu-item',
|
|
161
|
+
key: _blockMenu.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key,
|
|
162
|
+
parent: {
|
|
163
|
+
type: 'block-menu-section',
|
|
164
|
+
key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
165
|
+
rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key]
|
|
166
|
+
},
|
|
167
|
+
component: function component() {
|
|
168
|
+
var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
169
|
+
isSuggested = _ref6.isSuggested;
|
|
170
|
+
return /*#__PURE__*/React.createElement(_DecisionListBlockMenuItem.DecisionListBlockMenuItem, {
|
|
171
|
+
api: api,
|
|
172
|
+
isSuggested: isSuggested
|
|
173
|
+
});
|
|
174
|
+
},
|
|
175
|
+
isHidden: function isHidden() {
|
|
176
|
+
var _api$blockMenu3;
|
|
177
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu3 = api.blockMenu) === null || _api$blockMenu3 === void 0 ? void 0 : _api$blockMenu3.actions.isTransformOptionDisabled(DECISION_LIST_NODE_NAME));
|
|
178
|
+
}
|
|
179
|
+
}]);
|
|
184
180
|
return {
|
|
185
181
|
name: 'taskDecision',
|
|
186
182
|
nodes: function nodes() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
2
1
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
2
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
5
5
|
import { toggleTaskItemCheckbox, toggleTaskList as toggleTaskListKeymap } from '@atlaskit/editor-common/keymaps';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
2
1
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
2
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
3
3
|
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';
|
|
@@ -7,15 +7,14 @@ import { decisionList } from '@atlaskit/adf-schema/decision-list';
|
|
|
7
7
|
import { blockTaskItem, taskItem } from '@atlaskit/adf-schema/task-item';
|
|
8
8
|
import { taskList } from '@atlaskit/adf-schema/task-list';
|
|
9
9
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
10
|
import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION_RANK, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
12
11
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
13
12
|
import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
14
13
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
15
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
16
15
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
16
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
18
|
import { closeRequestEditPopupAt, getCurrentIndentLevel, isInsideTask } from './pm-plugins/helpers';
|
|
20
19
|
// Ignored via go/ees005
|
|
21
20
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -26,10 +25,10 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
26
25
|
import { stateKey as taskPluginKey } from './pm-plugins/plugin-key';
|
|
27
26
|
import { toggleTaskList } from './pm-plugins/toggle-tasklist-commands';
|
|
28
27
|
import { DecisionListBlockMenuItem } from './ui/DecisionListBlockMenuItem/DecisionListBlockMenuItem';
|
|
28
|
+
import { getTasksAndDecisionsQuickInsertComponents } from './ui/quick-insert/getTasksAndDecisionsQuickInsertComponents';
|
|
29
29
|
import { RequestToEditPopup } from './ui/Task/RequestToEditPopup';
|
|
30
30
|
import { TaskListBlockMenuItem } from './ui/TaskListBlockMenuItem/TaskListBlockMenuItem';
|
|
31
31
|
import { getTasksAndDecisionsToolbarComponents } from './ui/toolbar-components';
|
|
32
|
-
import { getTasksAndDecisionsQuickInsertComponents } from './ui/quick-insert/getTasksAndDecisionsQuickInsertComponents';
|
|
33
32
|
import ToolbarDecision from './ui/ToolbarDecision';
|
|
34
33
|
import ToolbarTask from './ui/ToolbarTask';
|
|
35
34
|
const taskDecisionToolbarGroupStyles = null;
|
|
@@ -95,7 +94,7 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
95
94
|
} = {},
|
|
96
95
|
api
|
|
97
96
|
}) => {
|
|
98
|
-
var _api$analytics2, _api$analytics3, _api$analytics4;
|
|
97
|
+
var _api$blockMenu, _api$analytics2, _api$analytics3, _api$analytics4;
|
|
99
98
|
const getIdentifierProvider = () => {
|
|
100
99
|
var _api$contextIdentifie, _api$contextIdentifie2;
|
|
101
100
|
return api === null || api === void 0 ? void 0 : (_api$contextIdentifie = api.contextIdentifier) === null || _api$contextIdentifie === void 0 ? void 0 : (_api$contextIdentifie2 = _api$contextIdentifie.sharedState.currentState()) === null || _api$contextIdentifie2 === void 0 ? void 0 : _api$contextIdentifie2.contextIdentifierProvider;
|
|
@@ -123,50 +122,47 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
123
122
|
}) => setProvider(provider)(tr));
|
|
124
123
|
});
|
|
125
124
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
}]);
|
|
169
|
-
}
|
|
125
|
+
api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents([{
|
|
126
|
+
type: 'block-menu-item',
|
|
127
|
+
key: TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key,
|
|
128
|
+
parent: {
|
|
129
|
+
type: 'block-menu-section',
|
|
130
|
+
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
131
|
+
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]
|
|
132
|
+
},
|
|
133
|
+
component: ({
|
|
134
|
+
isSuggested
|
|
135
|
+
} = {}) => {
|
|
136
|
+
return /*#__PURE__*/React.createElement(TaskListBlockMenuItem, {
|
|
137
|
+
api: api,
|
|
138
|
+
isSuggested: isSuggested
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
isHidden: () => {
|
|
142
|
+
var _api$blockMenu2;
|
|
143
|
+
return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(TASK_LIST_NODE_NAME));
|
|
144
|
+
}
|
|
145
|
+
}, {
|
|
146
|
+
type: 'block-menu-item',
|
|
147
|
+
key: TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key,
|
|
148
|
+
parent: {
|
|
149
|
+
type: 'block-menu-section',
|
|
150
|
+
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
151
|
+
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key]
|
|
152
|
+
},
|
|
153
|
+
component: ({
|
|
154
|
+
isSuggested
|
|
155
|
+
} = {}) => {
|
|
156
|
+
return /*#__PURE__*/React.createElement(DecisionListBlockMenuItem, {
|
|
157
|
+
api: api,
|
|
158
|
+
isSuggested: isSuggested
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
isHidden: () => {
|
|
162
|
+
var _api$blockMenu3;
|
|
163
|
+
return Boolean(api === null || api === void 0 ? void 0 : (_api$blockMenu3 = api.blockMenu) === null || _api$blockMenu3 === void 0 ? void 0 : _api$blockMenu3.actions.isTransformOptionDisabled(DECISION_LIST_NODE_NAME));
|
|
164
|
+
}
|
|
165
|
+
}]);
|
|
170
166
|
return {
|
|
171
167
|
name: 'taskDecision',
|
|
172
168
|
nodes() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
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
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 { uuid } from '@atlaskit/adf-schema/uuid';
|
|
5
4
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
5
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
8
8
|
import { toggleTaskItemCheckbox, toggleTaskList as toggleTaskListKeymap } from '@atlaskit/editor-common/keymaps';
|
|
@@ -3,8 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
var _excluded = ["localId"];
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
|
-
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
7
6
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
7
|
+
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
8
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';
|
|
@@ -13,15 +13,14 @@ import { decisionList } from '@atlaskit/adf-schema/decision-list';
|
|
|
13
13
|
import { blockTaskItem, taskItem } from '@atlaskit/adf-schema/task-item';
|
|
14
14
|
import { taskList } from '@atlaskit/adf-schema/task-list';
|
|
15
15
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
16
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
16
|
import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION_RANK, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
18
17
|
import { MAX_INDENTATION_LEVEL } from '@atlaskit/editor-common/indentation';
|
|
19
18
|
import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
20
19
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
21
20
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
22
21
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
22
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
23
23
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
24
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
25
24
|
import { closeRequestEditPopupAt, getCurrentIndentLevel, isInsideTask } from './pm-plugins/helpers';
|
|
26
25
|
// Ignored via go/ees005
|
|
27
26
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -32,10 +31,10 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
32
31
|
import { stateKey as taskPluginKey } from './pm-plugins/plugin-key';
|
|
33
32
|
import { toggleTaskList as _toggleTaskList } from './pm-plugins/toggle-tasklist-commands';
|
|
34
33
|
import { DecisionListBlockMenuItem } from './ui/DecisionListBlockMenuItem/DecisionListBlockMenuItem';
|
|
34
|
+
import { getTasksAndDecisionsQuickInsertComponents } from './ui/quick-insert/getTasksAndDecisionsQuickInsertComponents';
|
|
35
35
|
import { RequestToEditPopup } from './ui/Task/RequestToEditPopup';
|
|
36
36
|
import { TaskListBlockMenuItem } from './ui/TaskListBlockMenuItem/TaskListBlockMenuItem';
|
|
37
37
|
import { getTasksAndDecisionsToolbarComponents } from './ui/toolbar-components';
|
|
38
|
-
import { getTasksAndDecisionsQuickInsertComponents } from './ui/quick-insert/getTasksAndDecisionsQuickInsertComponents';
|
|
39
38
|
import ToolbarDecision from './ui/ToolbarDecision';
|
|
40
39
|
import ToolbarTask from './ui/ToolbarTask';
|
|
41
40
|
var taskDecisionToolbarGroupStyles = null;
|
|
@@ -86,7 +85,7 @@ function ContentComponent(_ref2) {
|
|
|
86
85
|
});
|
|
87
86
|
}
|
|
88
87
|
export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
89
|
-
var _api$analytics2, _api$analytics3, _api$analytics4;
|
|
88
|
+
var _api$blockMenu, _api$analytics2, _api$analytics3, _api$analytics4;
|
|
90
89
|
var _ref3$config = _ref3.config,
|
|
91
90
|
_ref3$config2 = _ref3$config === void 0 ? {} : _ref3$config,
|
|
92
91
|
allowNestedTasks = _ref3$config2.allowNestedTasks,
|
|
@@ -129,50 +128,47 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
|
|
|
129
128
|
});
|
|
130
129
|
});
|
|
131
130
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
}]);
|
|
175
|
-
}
|
|
131
|
+
api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
|
|
132
|
+
type: 'block-menu-item',
|
|
133
|
+
key: TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key,
|
|
134
|
+
parent: {
|
|
135
|
+
type: 'block-menu-section',
|
|
136
|
+
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
137
|
+
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]
|
|
138
|
+
},
|
|
139
|
+
component: function component() {
|
|
140
|
+
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
141
|
+
isSuggested = _ref5.isSuggested;
|
|
142
|
+
return /*#__PURE__*/React.createElement(TaskListBlockMenuItem, {
|
|
143
|
+
api: api,
|
|
144
|
+
isSuggested: isSuggested
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
isHidden: function isHidden() {
|
|
148
|
+
var _api$blockMenu2;
|
|
149
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu2 = api.blockMenu) === null || _api$blockMenu2 === void 0 ? void 0 : _api$blockMenu2.actions.isTransformOptionDisabled(TASK_LIST_NODE_NAME));
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
type: 'block-menu-item',
|
|
153
|
+
key: TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key,
|
|
154
|
+
parent: {
|
|
155
|
+
type: 'block-menu-section',
|
|
156
|
+
key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
|
|
157
|
+
rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key]
|
|
158
|
+
},
|
|
159
|
+
component: function component() {
|
|
160
|
+
var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
161
|
+
isSuggested = _ref6.isSuggested;
|
|
162
|
+
return /*#__PURE__*/React.createElement(DecisionListBlockMenuItem, {
|
|
163
|
+
api: api,
|
|
164
|
+
isSuggested: isSuggested
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
isHidden: function isHidden() {
|
|
168
|
+
var _api$blockMenu3;
|
|
169
|
+
return Boolean(api === null || api === void 0 || (_api$blockMenu3 = api.blockMenu) === null || _api$blockMenu3 === void 0 ? void 0 : _api$blockMenu3.actions.isTransformOptionDisabled(DECISION_LIST_NODE_NAME));
|
|
170
|
+
}
|
|
171
|
+
}]);
|
|
176
172
|
return {
|
|
177
173
|
name: 'taskDecision',
|
|
178
174
|
nodes: function nodes() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BlockTaskItemDefinition, TaskItemDefinition } from '@atlaskit/adf-schema/task-item';
|
|
2
1
|
import type { DecisionItemDefinition } from '@atlaskit/adf-schema/decision-item';
|
|
2
|
+
import type { BlockTaskItemDefinition, TaskItemDefinition } from '@atlaskit/adf-schema/task-item';
|
|
3
3
|
import type { INPUT_METHOD, USER_CONTEXT } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.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",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-type-ahead": "^20.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
40
40
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
41
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
41
|
+
"@atlaskit/editor-toolbar": "^2.7.0",
|
|
42
42
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
43
43
|
"@atlaskit/heading": "^7.2.0",
|
|
44
44
|
"@atlaskit/icon": "^37.7.0",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"@atlaskit/primitives": "^22.5.0",
|
|
48
48
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
49
49
|
"@atlaskit/task-decision": "^21.10.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^201.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^18.2.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@compiled/react": "^1.0.2",
|
|
54
54
|
"bind-event-listener": "^3.0.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@atlaskit/editor-common": "^123.
|
|
57
|
+
"@atlaskit/editor-common": "^123.2.0",
|
|
58
58
|
"react": "^18.2.0 || ^19.2.0",
|
|
59
59
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
60
60
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|