@atlaskit/editor-plugin-tasks-and-decisions 22.0.0 → 22.0.1

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-tasks-and-decisions
2
2
 
3
+ ## 22.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d37dc7e55d62`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d37dc7e55d62) -
8
+ Clean up shipped experiment `platform_editor_block_menu`
9
+ - Updated dependencies
10
+
3
11
  ## 22.0.0
4
12
 
5
13
  ### Patch Changes
@@ -27,7 +27,6 @@ var _quickInsert = require("@atlaskit/editor-common/quick-insert");
27
27
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
28
28
  var _utils = require("@atlaskit/editor-prosemirror/utils");
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");
@@ -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
- if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
141
- var _api$blockMenu;
142
- api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
143
- type: 'block-menu-item',
144
- key: _blockMenu.TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key,
145
- parent: {
146
- type: 'block-menu-section',
147
- key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
148
- rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]
149
- },
150
- component: function component() {
151
- var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
152
- isSuggested = _ref5.isSuggested;
153
- return /*#__PURE__*/React.createElement(_TaskListBlockMenuItem.TaskListBlockMenuItem, {
154
- api: api,
155
- isSuggested: isSuggested
156
- });
157
- },
158
- isHidden: function isHidden() {
159
- var _api$blockMenu2;
160
- 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));
161
- }
162
- }, {
163
- type: 'block-menu-item',
164
- key: _blockMenu.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key,
165
- parent: {
166
- type: 'block-menu-section',
167
- key: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION.key,
168
- rank: _blockMenu.TRANSFORM_STRUCTURE_MENU_SECTION_RANK[_blockMenu.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key]
169
- },
170
- component: function component() {
171
- var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
172
- isSuggested = _ref6.isSuggested;
173
- return /*#__PURE__*/React.createElement(_DecisionListBlockMenuItem.DecisionListBlockMenuItem, {
174
- api: api,
175
- isSuggested: isSuggested
176
- });
177
- },
178
- isHidden: function isHidden() {
179
- var _api$blockMenu3;
180
- 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));
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() {
@@ -15,7 +15,6 @@ import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
15
15
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
16
16
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
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
@@ -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
- if (editorExperiment('platform_editor_block_menu', true)) {
127
- var _api$blockMenu;
128
- api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents([{
129
- type: 'block-menu-item',
130
- key: TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key,
131
- parent: {
132
- type: 'block-menu-section',
133
- key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
134
- rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]
135
- },
136
- component: ({
137
- isSuggested
138
- } = {}) => {
139
- return /*#__PURE__*/React.createElement(TaskListBlockMenuItem, {
140
- api: api,
141
- isSuggested: isSuggested
142
- });
143
- },
144
- isHidden: () => {
145
- var _api$blockMenu2;
146
- 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));
147
- }
148
- }, {
149
- type: 'block-menu-item',
150
- key: TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key,
151
- parent: {
152
- type: 'block-menu-section',
153
- key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
154
- rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key]
155
- },
156
- component: ({
157
- isSuggested
158
- } = {}) => {
159
- return /*#__PURE__*/React.createElement(DecisionListBlockMenuItem, {
160
- api: api,
161
- isSuggested: isSuggested
162
- });
163
- },
164
- isHidden: () => {
165
- var _api$blockMenu3;
166
- 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));
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() {
@@ -21,7 +21,6 @@ import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
21
21
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
22
22
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
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
@@ -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
- if (editorExperiment('platform_editor_block_menu', true)) {
133
- var _api$blockMenu;
134
- api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
135
- type: 'block-menu-item',
136
- key: TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key,
137
- parent: {
138
- type: 'block-menu-section',
139
- key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
140
- rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]
141
- },
142
- component: function component() {
143
- var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
144
- isSuggested = _ref5.isSuggested;
145
- return /*#__PURE__*/React.createElement(TaskListBlockMenuItem, {
146
- api: api,
147
- isSuggested: isSuggested
148
- });
149
- },
150
- isHidden: function isHidden() {
151
- var _api$blockMenu2;
152
- 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));
153
- }
154
- }, {
155
- type: 'block-menu-item',
156
- key: TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key,
157
- parent: {
158
- type: 'block-menu-section',
159
- key: TRANSFORM_STRUCTURE_MENU_SECTION.key,
160
- rank: TRANSFORM_STRUCTURE_MENU_SECTION_RANK[TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key]
161
- },
162
- component: function component() {
163
- var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
164
- isSuggested = _ref6.isSuggested;
165
- return /*#__PURE__*/React.createElement(DecisionListBlockMenuItem, {
166
- api: api,
167
- isSuggested: isSuggested
168
- });
169
- },
170
- isHidden: function isHidden() {
171
- var _api$blockMenu3;
172
- 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));
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() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "22.0.0",
3
+ "version": "22.0.1",
4
4
  "description": "Tasks and decisions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
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": "^199.0.0",
50
+ "@atlaskit/tmp-editor-statsig": "^200.0.0",
51
51
  "@atlaskit/tokens": "^18.2.0",
52
52
  "@babel/runtime": "^7.0.0",
53
53
  "@compiled/react": "^1.0.2",