@atlaskit/editor-plugin-tasks-and-decisions 10.1.3 → 10.1.4

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
+ ## 10.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`653c0c803b286`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/653c0c803b286) -
8
+ EDITOR-4620 Clean up platform_editor_toolbar_aifc_patch_6
9
+ - Updated dependencies
10
+
3
11
  ## 10.1.3
4
12
 
5
13
  ### Patch Changes
@@ -391,7 +391,7 @@ var unindentTaskOrUnwrapTaskDecisionFollowing = function unindentTaskOrUnwrapTas
391
391
  return false;
392
392
  };
393
393
  var deleteForwards = (0, _commands.autoJoin)((0, _commands.chainCommands)((0, _utils.deleteEmptyParagraphAndMoveBlockUp)(_helpers.isActionOrDecisionList), joinTaskDecisionFollowing, unindentTaskOrUnwrapTaskDecisionFollowing), ['taskList', 'decisionList']);
394
- var deleteExtraListItem = function deleteExtraListItem(tr, $from) {
394
+ var deleteExtraListItem = function deleteExtraListItem(tr, _$from) {
395
395
  /*
396
396
  After we replace actionItem with empty list item if there's the anomaly of extra empty list item
397
397
  the cursor moves inside the first taskItem of splitted taskList
@@ -696,7 +696,7 @@ var cmdOptEnter = (0, _utils.filterCommand)(_helpers.isInsideTaskOrDecisionItem,
696
696
  }
697
697
  return true;
698
698
  });
699
- function keymapPlugin(schema, api, allowNestedTasks, consumeTabs) {
699
+ function keymapPlugin(_schema, api, allowNestedTasks, consumeTabs) {
700
700
  var _api$analytics3, _api$analytics4;
701
701
  var getContextIdentifier = function getContextIdentifier() {
702
702
  var _api$contextIdentifie;
@@ -721,9 +721,6 @@ function keymapPlugin(schema, api, allowNestedTasks, consumeTabs) {
721
721
  Tab: _helpers.isInsideTaskOrDecisionItem
722
722
  } : {};
723
723
  var toggleTaskListShortcut = function toggleTaskListShortcut(state, dispatch) {
724
- if (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
725
- return false;
726
- }
727
724
  if (!state.schema.nodes.taskItem) {
728
725
  return false;
729
726
  }
@@ -113,7 +113,7 @@ var tasksAndDecisionsPlugin = exports.tasksAndDecisionsPlugin = function tasksAn
113
113
  };
114
114
  var previousTaskAndDecisionProvider;
115
115
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
116
- if (isToolbarAIFCEnabled && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
116
+ if (isToolbarAIFCEnabled) {
117
117
  var _api$toolbar;
118
118
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getTasksAndDecisionsToolbarComponents)({
119
119
  api: api
@@ -7,13 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getTasksAndDecisionsToolbarComponents = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _toolbar = require("@atlaskit/editor-common/toolbar");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var _TaskListMenuItem = require("./TaskListMenuItem/TaskListMenuItem");
12
11
  var getTasksAndDecisionsToolbarComponents = exports.getTasksAndDecisionsToolbarComponents = function getTasksAndDecisionsToolbarComponents(_ref) {
13
12
  var api = _ref.api;
14
- if (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
15
- return [];
16
- }
17
13
  return [{
18
14
  type: _toolbar.TASK_LIST_MENU_ITEM.type,
19
15
  key: _toolbar.TASK_LIST_MENU_ITEM.key,
@@ -368,7 +368,7 @@ const unindentTaskOrUnwrapTaskDecisionFollowing = (state, dispatch) => {
368
368
  return false;
369
369
  };
370
370
  const deleteForwards = autoJoin(chainCommands(deleteEmptyParagraphAndMoveBlockUp(isActionOrDecisionList), joinTaskDecisionFollowing, unindentTaskOrUnwrapTaskDecisionFollowing), ['taskList', 'decisionList']);
371
- const deleteExtraListItem = (tr, $from) => {
371
+ const deleteExtraListItem = (tr, _$from) => {
372
372
  /*
373
373
  After we replace actionItem with empty list item if there's the anomaly of extra empty list item
374
374
  the cursor moves inside the first taskItem of splitted taskList
@@ -691,7 +691,7 @@ const cmdOptEnter = filter(isInsideTaskOrDecisionItem, (state, dispatch) => {
691
691
  }
692
692
  return true;
693
693
  });
694
- export function keymapPlugin(schema, api, allowNestedTasks, consumeTabs) {
694
+ export function keymapPlugin(_schema, api, allowNestedTasks, consumeTabs) {
695
695
  var _api$analytics3, _api$analytics4;
696
696
  const getContextIdentifier = () => {
697
697
  var _api$contextIdentifie, _api$contextIdentifie2;
@@ -712,9 +712,6 @@ export function keymapPlugin(schema, api, allowNestedTasks, consumeTabs) {
712
712
  Tab: isInsideTaskOrDecisionItem
713
713
  } : {};
714
714
  const toggleTaskListShortcut = (state, dispatch) => {
715
- if (!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
716
- return false;
717
- }
718
715
  if (!state.schema.nodes.taskItem) {
719
716
  return false;
720
717
  }
@@ -102,7 +102,7 @@ export const tasksAndDecisionsPlugin = ({
102
102
  };
103
103
  let previousTaskAndDecisionProvider;
104
104
  const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
105
- if (isToolbarAIFCEnabled && expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
105
+ if (isToolbarAIFCEnabled) {
106
106
  var _api$toolbar;
107
107
  api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getTasksAndDecisionsToolbarComponents({
108
108
  api
@@ -1,13 +1,9 @@
1
1
  import React from 'react';
2
2
  import { LISTS_INDENTATION_MENU_SECTION, LISTS_INDENTATION_MENU_SECTION_RANK, TASK_LIST_MENU_ITEM } from '@atlaskit/editor-common/toolbar';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { TaskListMenuItem } from './TaskListMenuItem/TaskListMenuItem';
5
4
  export const getTasksAndDecisionsToolbarComponents = ({
6
5
  api
7
6
  }) => {
8
- if (!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
9
- return [];
10
- }
11
7
  return [{
12
8
  type: TASK_LIST_MENU_ITEM.type,
13
9
  key: TASK_LIST_MENU_ITEM.key,
@@ -383,7 +383,7 @@ var unindentTaskOrUnwrapTaskDecisionFollowing = function unindentTaskOrUnwrapTas
383
383
  return false;
384
384
  };
385
385
  var deleteForwards = autoJoin(chainCommands(deleteEmptyParagraphAndMoveBlockUp(isActionOrDecisionList), joinTaskDecisionFollowing, unindentTaskOrUnwrapTaskDecisionFollowing), ['taskList', 'decisionList']);
386
- var deleteExtraListItem = function deleteExtraListItem(tr, $from) {
386
+ var deleteExtraListItem = function deleteExtraListItem(tr, _$from) {
387
387
  /*
388
388
  After we replace actionItem with empty list item if there's the anomaly of extra empty list item
389
389
  the cursor moves inside the first taskItem of splitted taskList
@@ -688,7 +688,7 @@ var cmdOptEnter = filter(isInsideTaskOrDecisionItem, function (state, dispatch)
688
688
  }
689
689
  return true;
690
690
  });
691
- export function keymapPlugin(schema, api, allowNestedTasks, consumeTabs) {
691
+ export function keymapPlugin(_schema, api, allowNestedTasks, consumeTabs) {
692
692
  var _api$analytics3, _api$analytics4;
693
693
  var getContextIdentifier = function getContextIdentifier() {
694
694
  var _api$contextIdentifie;
@@ -713,9 +713,6 @@ export function keymapPlugin(schema, api, allowNestedTasks, consumeTabs) {
713
713
  Tab: isInsideTaskOrDecisionItem
714
714
  } : {};
715
715
  var toggleTaskListShortcut = function toggleTaskListShortcut(state, dispatch) {
716
- if (!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
717
- return false;
718
- }
719
716
  if (!state.schema.nodes.taskItem) {
720
717
  return false;
721
718
  }
@@ -104,7 +104,7 @@ export var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref3) {
104
104
  };
105
105
  var previousTaskAndDecisionProvider;
106
106
  var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar);
107
- if (isToolbarAIFCEnabled && expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
107
+ if (isToolbarAIFCEnabled) {
108
108
  var _api$toolbar;
109
109
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getTasksAndDecisionsToolbarComponents({
110
110
  api: api
@@ -1,12 +1,8 @@
1
1
  import React from 'react';
2
2
  import { LISTS_INDENTATION_MENU_SECTION, LISTS_INDENTATION_MENU_SECTION_RANK, TASK_LIST_MENU_ITEM } from '@atlaskit/editor-common/toolbar';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { TaskListMenuItem } from './TaskListMenuItem/TaskListMenuItem';
5
4
  export var getTasksAndDecisionsToolbarComponents = function getTasksAndDecisionsToolbarComponents(_ref) {
6
5
  var api = _ref.api;
7
- if (!expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true)) {
8
- return [];
9
- }
10
6
  return [{
11
7
  type: TASK_LIST_MENU_ITEM.type,
12
8
  key: TASK_LIST_MENU_ITEM.key,
@@ -7,5 +7,5 @@ import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
7
7
  type IndentationInputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
8
8
  export declare const getUnindentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
9
9
  export declare const getIndentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
10
- export declare function keymapPlugin(schema: Schema, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, allowNestedTasks?: boolean, consumeTabs?: boolean): SafePlugin | undefined;
10
+ export declare function keymapPlugin(_schema: Schema, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, allowNestedTasks?: boolean, consumeTabs?: boolean): SafePlugin | undefined;
11
11
  export default keymapPlugin;
@@ -7,5 +7,5 @@ import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType';
7
7
  type IndentationInputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
8
8
  export declare const getUnindentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
9
9
  export declare const getIndentCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: IndentationInputMethod) => Command;
10
- export declare function keymapPlugin(schema: Schema, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, allowNestedTasks?: boolean, consumeTabs?: boolean): SafePlugin | undefined;
10
+ export declare function keymapPlugin(_schema: Schema, api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined, allowNestedTasks?: boolean, consumeTabs?: boolean): SafePlugin | undefined;
11
11
  export default keymapPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "10.1.3",
3
+ "version": "10.1.4",
4
4
  "description": "Tasks and decisions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/primitives": "^17.1.0",
50
50
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
51
51
  "@atlaskit/task-decision": "^19.2.0",
52
- "@atlaskit/tmp-editor-statsig": "^17.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^17.1.0",
53
53
  "@atlaskit/tokens": "^10.1.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@compiled/react": "^0.18.6",