@atlaskit/editor-plugin-tasks-and-decisions 2.11.2 → 2.11.3
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/plugin.js +6 -9
- package/dist/cjs/ui/Task/index.js +2 -12
- package/dist/es2019/plugin.js +6 -9
- package/dist/es2019/ui/Task/index.js +2 -12
- package/dist/esm/plugin.js +6 -9
- package/dist/esm/ui/Task/index.js +2 -12
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-tasks-and-decisions
|
|
2
2
|
|
|
3
|
+
## 2.11.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#152480](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152480)
|
|
8
|
+
[`831fe131ac081`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/831fe131ac081) -
|
|
9
|
+
Remove FF platform_editor_td_provider_from_plugin_config
|
|
10
|
+
- [#152510](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152510)
|
|
11
|
+
[`dcf9edde7ac7b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcf9edde7ac7b) -
|
|
12
|
+
bump adf-schema to 42.0.1
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 2.11.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -17,7 +17,6 @@ var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
|
17
17
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
18
18
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
19
19
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
20
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
22
21
|
var _commands = require("./commands");
|
|
23
22
|
var _helpers = require("./pm-plugins/helpers");
|
|
@@ -133,15 +132,13 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
|
|
|
133
132
|
return api === null || api === void 0 || (_api$contextIdentifie = api.contextIdentifier) === null || _api$contextIdentifie === void 0 || (_api$contextIdentifie = _api$contextIdentifie.sharedState.currentState()) === null || _api$contextIdentifie === void 0 ? void 0 : _api$contextIdentifie.contextIdentifierProvider;
|
|
134
133
|
};
|
|
135
134
|
var previousTaskAndDecisionProvider;
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return (0, _commands.setProvider)(provider)(tr);
|
|
142
|
-
});
|
|
135
|
+
if (taskDecisionProvider) {
|
|
136
|
+
taskDecisionProvider.then(function (provider) {
|
|
137
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref3) {
|
|
138
|
+
var tr = _ref3.tr;
|
|
139
|
+
return (0, _commands.setProvider)(provider)(tr);
|
|
143
140
|
});
|
|
144
|
-
}
|
|
141
|
+
});
|
|
145
142
|
}
|
|
146
143
|
return {
|
|
147
144
|
name: 'taskDecision',
|
|
@@ -20,7 +20,6 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
20
20
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
21
21
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
22
22
|
var _providerFactory2 = require("@atlaskit/editor-common/provider-factory");
|
|
23
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
23
|
var _taskItemWithProviders = _interopRequireDefault(require("./task-item-with-providers"));
|
|
25
24
|
var _excluded = ["providers", "intl", "api"];
|
|
26
25
|
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); }
|
|
@@ -36,6 +35,7 @@ var TaskItem = exports.TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
36
35
|
(0, _classCallCheck2.default)(this, TaskItem);
|
|
37
36
|
_this = _super.call(this, props);
|
|
38
37
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderWithProvider", function (providers) {
|
|
38
|
+
var _this$props$taskDecis;
|
|
39
39
|
var _this$props = _this.props,
|
|
40
40
|
_providerFactory = _this$props.providers,
|
|
41
41
|
formatMessage = _this$props.intl.formatMessage,
|
|
@@ -43,16 +43,9 @@ var TaskItem = exports.TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
43
43
|
otherProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
44
44
|
var contextIdentifierProvider = providers.contextIdentifierProvider;
|
|
45
45
|
var placeholder = formatMessage(_messages.tasksAndDecisionsMessages.taskPlaceholder);
|
|
46
|
-
var getTaskDecisionProvider = function getTaskDecisionProvider() {
|
|
47
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_td_provider_from_plugin_config')) {
|
|
48
|
-
var _this$props$taskDecis;
|
|
49
|
-
return (_this$props$taskDecis = _this.props.taskDecisionState) !== null && _this$props$taskDecis !== void 0 && _this$props$taskDecis.taskDecisionProvider ? Promise.resolve(_this.props.taskDecisionState.taskDecisionProvider) : undefined;
|
|
50
|
-
}
|
|
51
|
-
return providers.taskDecisionProvider;
|
|
52
|
-
};
|
|
53
46
|
return /*#__PURE__*/_react.default.createElement(_taskItemWithProviders.default, (0, _extends2.default)({}, otherProps, {
|
|
54
47
|
placeholder: placeholder,
|
|
55
|
-
taskDecisionProvider:
|
|
48
|
+
taskDecisionProvider: (_this$props$taskDecis = _this.props.taskDecisionState) !== null && _this$props$taskDecis !== void 0 && _this$props$taskDecis.taskDecisionProvider ? Promise.resolve(_this.props.taskDecisionState.taskDecisionProvider) : undefined,
|
|
56
49
|
contextIdentifierProvider: contextIdentifierProvider
|
|
57
50
|
}));
|
|
58
51
|
});
|
|
@@ -72,9 +65,6 @@ var TaskItem = exports.TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
72
65
|
key: "render",
|
|
73
66
|
value: function render() {
|
|
74
67
|
var providers = ['contextIdentifierProvider'];
|
|
75
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_td_provider_from_plugin_config')) {
|
|
76
|
-
providers.push('taskDecisionProvider');
|
|
77
|
-
}
|
|
78
68
|
return /*#__PURE__*/_react.default.createElement(_providerFactory2.WithProviders, {
|
|
79
69
|
providers: providers,
|
|
80
70
|
providerFactory: this.providerFactory,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -11,7 +11,6 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
11
11
|
import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
13
13
|
import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
15
|
import { getListTypes, insertTaskDecisionAction, insertTaskDecisionCommand, setProvider } from './commands';
|
|
17
16
|
import { getCurrentIndentLevel, getTaskItemIndex, isInsideTask } from './pm-plugins/helpers';
|
|
@@ -123,14 +122,12 @@ export const tasksAndDecisionsPlugin = ({
|
|
|
123
122
|
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;
|
|
124
123
|
};
|
|
125
124
|
let previousTaskAndDecisionProvider;
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
133
|
-
}
|
|
125
|
+
if (taskDecisionProvider) {
|
|
126
|
+
taskDecisionProvider.then(provider => {
|
|
127
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(({
|
|
128
|
+
tr
|
|
129
|
+
}) => setProvider(provider)(tr));
|
|
130
|
+
});
|
|
134
131
|
}
|
|
135
132
|
return {
|
|
136
133
|
name: 'taskDecision',
|
|
@@ -5,13 +5,13 @@ import { injectIntl } from 'react-intl-next';
|
|
|
5
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
6
|
import { tasksAndDecisionsMessages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { ProviderFactory, WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import TaskItemWithProviders from './task-item-with-providers';
|
|
10
9
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
11
10
|
export class TaskItem extends PureComponent {
|
|
12
11
|
constructor(props) {
|
|
13
12
|
super(props);
|
|
14
13
|
_defineProperty(this, "renderWithProvider", providers => {
|
|
14
|
+
var _this$props$taskDecis;
|
|
15
15
|
const {
|
|
16
16
|
providers: _providerFactory,
|
|
17
17
|
intl: {
|
|
@@ -24,16 +24,9 @@ export class TaskItem extends PureComponent {
|
|
|
24
24
|
contextIdentifierProvider
|
|
25
25
|
} = providers;
|
|
26
26
|
const placeholder = formatMessage(tasksAndDecisionsMessages.taskPlaceholder);
|
|
27
|
-
const getTaskDecisionProvider = () => {
|
|
28
|
-
if (fg('platform_editor_td_provider_from_plugin_config')) {
|
|
29
|
-
var _this$props$taskDecis;
|
|
30
|
-
return (_this$props$taskDecis = this.props.taskDecisionState) !== null && _this$props$taskDecis !== void 0 && _this$props$taskDecis.taskDecisionProvider ? Promise.resolve(this.props.taskDecisionState.taskDecisionProvider) : undefined;
|
|
31
|
-
}
|
|
32
|
-
return providers.taskDecisionProvider;
|
|
33
|
-
};
|
|
34
27
|
return /*#__PURE__*/React.createElement(TaskItemWithProviders, _extends({}, otherProps, {
|
|
35
28
|
placeholder: placeholder,
|
|
36
|
-
taskDecisionProvider:
|
|
29
|
+
taskDecisionProvider: (_this$props$taskDecis = this.props.taskDecisionState) !== null && _this$props$taskDecis !== void 0 && _this$props$taskDecis.taskDecisionProvider ? Promise.resolve(this.props.taskDecisionState.taskDecisionProvider) : undefined,
|
|
37
30
|
contextIdentifierProvider: contextIdentifierProvider
|
|
38
31
|
}));
|
|
39
32
|
});
|
|
@@ -48,9 +41,6 @@ export class TaskItem extends PureComponent {
|
|
|
48
41
|
}
|
|
49
42
|
render() {
|
|
50
43
|
const providers = ['contextIdentifierProvider'];
|
|
51
|
-
if (!fg('platform_editor_td_provider_from_plugin_config')) {
|
|
52
|
-
providers.push('taskDecisionProvider');
|
|
53
|
-
}
|
|
54
44
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
55
45
|
providers: providers,
|
|
56
46
|
providerFactory: this.providerFactory,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -16,7 +16,6 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
16
16
|
import { toolbarInsertBlockMessages as insertBlockMessages } from '@atlaskit/editor-common/messages';
|
|
17
17
|
import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
|
|
18
18
|
import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
20
|
import { getListTypes, insertTaskDecisionAction, insertTaskDecisionCommand, setProvider as _setProvider } from './commands';
|
|
22
21
|
import { getCurrentIndentLevel, getTaskItemIndex, isInsideTask } from './pm-plugins/helpers';
|
|
@@ -125,15 +124,13 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
|
|
|
125
124
|
return api === null || api === void 0 || (_api$contextIdentifie = api.contextIdentifier) === null || _api$contextIdentifie === void 0 || (_api$contextIdentifie = _api$contextIdentifie.sharedState.currentState()) === null || _api$contextIdentifie === void 0 ? void 0 : _api$contextIdentifie.contextIdentifierProvider;
|
|
126
125
|
};
|
|
127
126
|
var previousTaskAndDecisionProvider;
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return _setProvider(provider)(tr);
|
|
134
|
-
});
|
|
127
|
+
if (taskDecisionProvider) {
|
|
128
|
+
taskDecisionProvider.then(function (provider) {
|
|
129
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref3) {
|
|
130
|
+
var tr = _ref3.tr;
|
|
131
|
+
return _setProvider(provider)(tr);
|
|
135
132
|
});
|
|
136
|
-
}
|
|
133
|
+
});
|
|
137
134
|
}
|
|
138
135
|
return {
|
|
139
136
|
name: 'taskDecision',
|
|
@@ -15,7 +15,6 @@ import { injectIntl } from 'react-intl-next';
|
|
|
15
15
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
16
16
|
import { tasksAndDecisionsMessages } from '@atlaskit/editor-common/messages';
|
|
17
17
|
import { ProviderFactory, WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
import TaskItemWithProviders from './task-item-with-providers';
|
|
20
19
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
21
20
|
export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -26,6 +25,7 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
26
25
|
_classCallCheck(this, TaskItem);
|
|
27
26
|
_this = _super.call(this, props);
|
|
28
27
|
_defineProperty(_assertThisInitialized(_this), "renderWithProvider", function (providers) {
|
|
28
|
+
var _this$props$taskDecis;
|
|
29
29
|
var _this$props = _this.props,
|
|
30
30
|
_providerFactory = _this$props.providers,
|
|
31
31
|
formatMessage = _this$props.intl.formatMessage,
|
|
@@ -33,16 +33,9 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
33
33
|
otherProps = _objectWithoutProperties(_this$props, _excluded);
|
|
34
34
|
var contextIdentifierProvider = providers.contextIdentifierProvider;
|
|
35
35
|
var placeholder = formatMessage(tasksAndDecisionsMessages.taskPlaceholder);
|
|
36
|
-
var getTaskDecisionProvider = function getTaskDecisionProvider() {
|
|
37
|
-
if (fg('platform_editor_td_provider_from_plugin_config')) {
|
|
38
|
-
var _this$props$taskDecis;
|
|
39
|
-
return (_this$props$taskDecis = _this.props.taskDecisionState) !== null && _this$props$taskDecis !== void 0 && _this$props$taskDecis.taskDecisionProvider ? Promise.resolve(_this.props.taskDecisionState.taskDecisionProvider) : undefined;
|
|
40
|
-
}
|
|
41
|
-
return providers.taskDecisionProvider;
|
|
42
|
-
};
|
|
43
36
|
return /*#__PURE__*/React.createElement(TaskItemWithProviders, _extends({}, otherProps, {
|
|
44
37
|
placeholder: placeholder,
|
|
45
|
-
taskDecisionProvider:
|
|
38
|
+
taskDecisionProvider: (_this$props$taskDecis = _this.props.taskDecisionState) !== null && _this$props$taskDecis !== void 0 && _this$props$taskDecis.taskDecisionProvider ? Promise.resolve(_this.props.taskDecisionState.taskDecisionProvider) : undefined,
|
|
46
39
|
contextIdentifierProvider: contextIdentifierProvider
|
|
47
40
|
}));
|
|
48
41
|
});
|
|
@@ -62,9 +55,6 @@ export var TaskItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
62
55
|
key: "render",
|
|
63
56
|
value: function render() {
|
|
64
57
|
var providers = ['contextIdentifierProvider'];
|
|
65
|
-
if (!fg('platform_editor_td_provider_from_plugin_config')) {
|
|
66
|
-
providers.push('taskDecisionProvider');
|
|
67
|
-
}
|
|
68
58
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
69
59
|
providers: providers,
|
|
70
60
|
providerFactory: this.providerFactory,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-tasks-and-decisions",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.3",
|
|
4
4
|
"description": "Tasks and decisions plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^
|
|
34
|
+
"@atlaskit/adf-schema": "^42.0.2",
|
|
35
35
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
36
36
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
37
|
-
"@atlaskit/editor-common": "^93.
|
|
37
|
+
"@atlaskit/editor-common": "^93.5.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
39
39
|
"@atlaskit/editor-plugin-context-identifier": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-viewmode": "2.1.9",
|
|
41
|
-
"@atlaskit/editor-plugin-type-ahead": "^1.
|
|
41
|
+
"@atlaskit/editor-plugin-type-ahead": "^1.10.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
43
43
|
"@atlaskit/heading": "2.4.6",
|
|
44
44
|
"@atlaskit/icon": "22.22.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/primitives": "12.2.5",
|
|
48
48
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
|
49
49
|
"@atlaskit/task-decision": "^17.11.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^2.5.0",
|
|
51
51
|
"@atlaskit/tokens": "2.0.3",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1"
|
|
@@ -106,9 +106,6 @@
|
|
|
106
106
|
},
|
|
107
107
|
"platform_editor_action_decisions_ssr_fix": {
|
|
108
108
|
"type": "boolean"
|
|
109
|
-
},
|
|
110
|
-
"platform_editor_td_provider_from_plugin_config": {
|
|
111
|
-
"type": "boolean"
|
|
112
109
|
}
|
|
113
110
|
}
|
|
114
111
|
}
|