@atlaskit/editor-plugin-tasks-and-decisions 10.1.7 → 10.1.9

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,19 @@
1
1
  # @atlaskit/editor-plugin-tasks-and-decisions
2
2
 
3
+ ## 10.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6431f5f6492ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6431f5f6492ae) -
8
+ Remove unused platform_editor_toolbar_aifc_ga_blockers feature gate
9
+ - Updated dependencies
10
+
11
+ ## 10.1.8
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 10.1.7
4
18
 
5
19
  ### Patch Changes
@@ -8,7 +8,6 @@ var _adfSchema = require("@atlaskit/adf-schema");
8
8
  var _transforms = require("@atlaskit/editor-common/transforms");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _utils = require("@atlaskit/editor-prosemirror/utils");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var toggleTaskList = exports.toggleTaskList = function toggleTaskList() {
13
12
  var targetType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'paragraph';
14
13
  return function (_ref) {
@@ -17,26 +16,24 @@ var toggleTaskList = exports.toggleTaskList = function toggleTaskList() {
17
16
  var selection = tr.selection;
18
17
 
19
18
  // Handle empty selection: insert a new task item
20
- if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_ga_blockers')) {
21
- var $from = selection.$from;
22
- var isEmpty = $from.parent.content.size === 0;
23
- if (isEmpty && nodes.taskList && nodes.taskItem) {
24
- // Create an empty task list with one empty task item
25
- var listLocalId = _adfSchema.uuid.generate();
26
- var itemLocalId = _adfSchema.uuid.generate();
27
- var emptyList = nodes.taskList.create({
28
- localId: listLocalId
29
- }, [nodes.taskItem.create({
30
- localId: itemLocalId
31
- })]);
19
+ var $from = selection.$from;
20
+ var isEmpty = $from.parent.content.size === 0;
21
+ if (isEmpty && nodes.taskList && nodes.taskItem) {
22
+ // Create an empty task list with one empty task item
23
+ var listLocalId = _adfSchema.uuid.generate();
24
+ var itemLocalId = _adfSchema.uuid.generate();
25
+ var emptyList = nodes.taskList.create({
26
+ localId: listLocalId
27
+ }, [nodes.taskItem.create({
28
+ localId: itemLocalId
29
+ })]);
32
30
 
33
- // Insert the empty list at the current selection
34
- var insertTr = (0, _utils.safeInsert)(emptyList)(tr);
35
- if (insertTr !== tr) {
36
- // Set cursor inside the new task item
37
- var insertPos = insertTr.selection.$from.pos;
38
- return insertTr.setSelection(_state.TextSelection.near(insertTr.doc.resolve(insertPos)));
39
- }
31
+ // Insert the empty list at the current selection
32
+ var insertTr = (0, _utils.safeInsert)(emptyList)(tr);
33
+ if (insertTr !== tr) {
34
+ // Set cursor inside the new task item
35
+ var insertPos = insertTr.selection.$from.pos;
36
+ return insertTr.setSelection(_state.TextSelection.near(insertTr.doc.resolve(insertPos)));
40
37
  }
41
38
  }
42
39
  var _getFormattedNode = (0, _transforms.getFormattedNode)(tr),
@@ -2,7 +2,6 @@ import { uuid } from '@atlaskit/adf-schema';
2
2
  import { transformBetweenListTypes, transformToTaskList, transformTaskListToBlockNodes, isBulletOrOrderedList, isTaskList, getFormattedNode } from '@atlaskit/editor-common/transforms';
3
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  export const toggleTaskList = (targetType = 'paragraph') => ({
7
6
  tr
8
7
  }) => {
@@ -14,28 +13,26 @@ export const toggleTaskList = (targetType = 'paragraph') => ({
14
13
  } = tr;
15
14
 
16
15
  // Handle empty selection: insert a new task item
17
- if (fg('platform_editor_toolbar_aifc_ga_blockers')) {
18
- const {
19
- $from
20
- } = selection;
21
- const isEmpty = $from.parent.content.size === 0;
22
- if (isEmpty && nodes.taskList && nodes.taskItem) {
23
- // Create an empty task list with one empty task item
24
- const listLocalId = uuid.generate();
25
- const itemLocalId = uuid.generate();
26
- const emptyList = nodes.taskList.create({
27
- localId: listLocalId
28
- }, [nodes.taskItem.create({
29
- localId: itemLocalId
30
- })]);
16
+ const {
17
+ $from
18
+ } = selection;
19
+ const isEmpty = $from.parent.content.size === 0;
20
+ if (isEmpty && nodes.taskList && nodes.taskItem) {
21
+ // Create an empty task list with one empty task item
22
+ const listLocalId = uuid.generate();
23
+ const itemLocalId = uuid.generate();
24
+ const emptyList = nodes.taskList.create({
25
+ localId: listLocalId
26
+ }, [nodes.taskItem.create({
27
+ localId: itemLocalId
28
+ })]);
31
29
 
32
- // Insert the empty list at the current selection
33
- const insertTr = safeInsert(emptyList)(tr);
34
- if (insertTr !== tr) {
35
- // Set cursor inside the new task item
36
- const insertPos = insertTr.selection.$from.pos;
37
- return insertTr.setSelection(TextSelection.near(insertTr.doc.resolve(insertPos)));
38
- }
30
+ // Insert the empty list at the current selection
31
+ const insertTr = safeInsert(emptyList)(tr);
32
+ if (insertTr !== tr) {
33
+ // Set cursor inside the new task item
34
+ const insertPos = insertTr.selection.$from.pos;
35
+ return insertTr.setSelection(TextSelection.near(insertTr.doc.resolve(insertPos)));
39
36
  }
40
37
  }
41
38
  const {
@@ -2,7 +2,6 @@ import { uuid } from '@atlaskit/adf-schema';
2
2
  import { transformBetweenListTypes, transformToTaskList, transformTaskListToBlockNodes, isBulletOrOrderedList, isTaskList, getFormattedNode } from '@atlaskit/editor-common/transforms';
3
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  export var toggleTaskList = function toggleTaskList() {
7
6
  var targetType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'paragraph';
8
7
  return function (_ref) {
@@ -11,26 +10,24 @@ export var toggleTaskList = function toggleTaskList() {
11
10
  var selection = tr.selection;
12
11
 
13
12
  // Handle empty selection: insert a new task item
14
- if (fg('platform_editor_toolbar_aifc_ga_blockers')) {
15
- var $from = selection.$from;
16
- var isEmpty = $from.parent.content.size === 0;
17
- if (isEmpty && nodes.taskList && nodes.taskItem) {
18
- // Create an empty task list with one empty task item
19
- var listLocalId = uuid.generate();
20
- var itemLocalId = uuid.generate();
21
- var emptyList = nodes.taskList.create({
22
- localId: listLocalId
23
- }, [nodes.taskItem.create({
24
- localId: itemLocalId
25
- })]);
13
+ var $from = selection.$from;
14
+ var isEmpty = $from.parent.content.size === 0;
15
+ if (isEmpty && nodes.taskList && nodes.taskItem) {
16
+ // Create an empty task list with one empty task item
17
+ var listLocalId = uuid.generate();
18
+ var itemLocalId = uuid.generate();
19
+ var emptyList = nodes.taskList.create({
20
+ localId: listLocalId
21
+ }, [nodes.taskItem.create({
22
+ localId: itemLocalId
23
+ })]);
26
24
 
27
- // Insert the empty list at the current selection
28
- var insertTr = safeInsert(emptyList)(tr);
29
- if (insertTr !== tr) {
30
- // Set cursor inside the new task item
31
- var insertPos = insertTr.selection.$from.pos;
32
- return insertTr.setSelection(TextSelection.near(insertTr.doc.resolve(insertPos)));
33
- }
25
+ // Insert the empty list at the current selection
26
+ var insertTr = safeInsert(emptyList)(tr);
27
+ if (insertTr !== tr) {
28
+ // Set cursor inside the new task item
29
+ var insertPos = insertTr.selection.$from.pos;
30
+ return insertTr.setSelection(TextSelection.near(insertTr.doc.resolve(insertPos)));
34
31
  }
35
32
  }
36
33
  var _getFormattedNode = getFormattedNode(tr),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "10.1.7",
3
+ "version": "10.1.9",
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": "^18.0.0",
50
50
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
51
51
  "@atlaskit/task-decision": "^19.2.0",
52
- "@atlaskit/tmp-editor-statsig": "^19.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^20.3.0",
53
53
  "@atlaskit/tokens": "^11.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@compiled/react": "^0.18.6",
@@ -106,9 +106,6 @@
106
106
  },
107
107
  "platform_editor_blocktaskitem_patch_3": {
108
108
  "type": "boolean"
109
- },
110
- "platform_editor_toolbar_aifc_ga_blockers": {
111
- "type": "boolean"
112
109
  }
113
110
  }
114
111
  }