@atlaskit/editor-plugin-expand 7.4.5 → 7.4.6

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,14 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 7.4.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
8
+ ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
9
+ project refs are setup
10
+ - Updated dependencies
11
+
3
12
  ## 7.4.5
4
13
 
5
14
  ### Patch Changes
@@ -35,6 +35,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
35
35
  state: state,
36
36
  key: _pluginFactory.pluginKey,
37
37
  props: {
38
+ // @ts-ignore - Workaround for help-center local consumption
39
+
38
40
  nodeViews: {
39
41
  expand: (0, _nodeviews.default)({
40
42
  getIntl: getIntl,
@@ -53,9 +55,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
53
55
  __livePage: __livePage
54
56
  })
55
57
  },
58
+ // @ts-ignore - Workaround for help-center local consumption
56
59
  handleKeyDown: function handleKeyDown(_view, event) {
57
60
  return containsClass(event.target, _styles.expandClassNames.titleContainer);
58
61
  },
62
+ // @ts-ignore - Workaround for help-center local consumption
59
63
  handleKeyPress: function handleKeyPress(_view, event) {
60
64
  return containsClass(event.target, _styles.expandClassNames.titleContainer);
61
65
  },
@@ -67,11 +71,13 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
67
71
  }, {
68
72
  useLongPressSelection: useLongPressSelection
69
73
  }),
74
+ // @ts-ignore - Workaround for help-center local consumption
70
75
  handleDrop: function handleDrop(view, event, slice, moved) {
71
76
  return handleExpandDrag(view, event, slice);
72
77
  }
73
78
  },
74
79
  // @see ED-8027 to follow up on this work-around
80
+ // @ts-ignore - Workaround for help-center local consumption
75
81
  filterTransaction: function filterTransaction(tr) {
76
82
  if (containsClass(document.activeElement, _styles.expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric)) {
77
83
  return false;
@@ -109,6 +115,9 @@ function handleExpandDrag(view, event, slice) {
109
115
  to = selection.to;
110
116
  var sliceContainsExpand = false;
111
117
  var sliceContainsNestedExpand = false;
118
+
119
+ // @ts-ignore - Workaround for help-center local consumption
120
+
112
121
  slice.content.forEach(function (node) {
113
122
  if (node.type === state.schema.nodes.expand) {
114
123
  sliceContainsExpand = true;
@@ -33,6 +33,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
33
33
  return new _safePlugin.SafePlugin({
34
34
  key: pluginKey,
35
35
  props: {
36
+ // @ts-ignore - Workaround for help-center local consumption
37
+
36
38
  nodeViews: {
37
39
  expand: (0, _nodeViews.default)({
38
40
  getIntl: getIntl,
@@ -51,9 +53,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
51
53
  __livePage: __livePage
52
54
  })
53
55
  },
56
+ // @ts-ignore - Workaround for help-center local consumption
54
57
  handleKeyDown: function handleKeyDown(_view, event) {
55
58
  return containsClass(event.target, _styles.expandClassNames.titleContainer);
56
59
  },
60
+ // @ts-ignore - Workaround for help-center local consumption
57
61
  handleKeyPress: function handleKeyPress(_view, event) {
58
62
  return containsClass(event.target, _styles.expandClassNames.titleContainer);
59
63
  },
@@ -65,11 +69,13 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
65
69
  }, {
66
70
  useLongPressSelection: useLongPressSelection
67
71
  }),
72
+ // @ts-ignore - Workaround for help-center local consumption
68
73
  handleDrop: function handleDrop(view, event, slice, moved) {
69
74
  return handleExpandDrag(view, event, slice);
70
75
  }
71
76
  },
72
77
  // @see ED-8027 to follow up on this work-around
78
+ // @ts-ignore - Workaround for help-center local consumption
73
79
  filterTransaction: function filterTransaction(tr) {
74
80
  if (containsClass(document.activeElement, _styles.expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric)) {
75
81
  return false;
@@ -91,6 +97,9 @@ function handleExpandDrag(view, event, slice) {
91
97
  to = selection.to;
92
98
  var sliceContainsExpand = false;
93
99
  var sliceContainsNestedExpand = false;
100
+
101
+ // @ts-ignore - Workaround for help-center local consumption
102
+
94
103
  slice.content.forEach(function (node) {
95
104
  if (node.type === state.schema.nodes.expand) {
96
105
  sliceContainsExpand = true;
@@ -19,6 +19,8 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
19
19
  state: state,
20
20
  key: pluginKey,
21
21
  props: {
22
+ // @ts-ignore - Workaround for help-center local consumption
23
+
22
24
  nodeViews: {
23
25
  expand: ExpandNodeView({
24
26
  getIntl,
@@ -37,9 +39,13 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
37
39
  __livePage
38
40
  })
39
41
  },
42
+ // @ts-ignore - Workaround for help-center local consumption
43
+
40
44
  handleKeyDown(_view, event) {
41
45
  return containsClass(event.target, expandClassNames.titleContainer);
42
46
  },
47
+ // @ts-ignore - Workaround for help-center local consumption
48
+
43
49
  handleKeyPress(_view, event) {
44
50
  return containsClass(event.target, expandClassNames.titleContainer);
45
51
  },
@@ -49,11 +55,15 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
49
55
  handleClickOn: createSelectionClickHandler(['expand', 'nestedExpand'], target => target.classList.contains(expandClassNames.prefix), {
50
56
  useLongPressSelection
51
57
  }),
58
+ // @ts-ignore - Workaround for help-center local consumption
59
+
52
60
  handleDrop(view, event, slice, moved) {
53
61
  return handleExpandDrag(view, event, slice);
54
62
  }
55
63
  },
56
64
  // @see ED-8027 to follow up on this work-around
65
+ // @ts-ignore - Workaround for help-center local consumption
66
+
57
67
  filterTransaction(tr) {
58
68
  if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric)) {
59
69
  return false;
@@ -99,6 +109,9 @@ export function handleExpandDrag(view, event, slice) {
99
109
  } = selection;
100
110
  let sliceContainsExpand = false;
101
111
  let sliceContainsNestedExpand = false;
112
+
113
+ // @ts-ignore - Workaround for help-center local consumption
114
+
102
115
  slice.content.forEach(node => {
103
116
  if (node.type === state.schema.nodes.expand) {
104
117
  sliceContainsExpand = true;
@@ -16,6 +16,8 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
16
16
  return new SafePlugin({
17
17
  key: pluginKey,
18
18
  props: {
19
+ // @ts-ignore - Workaround for help-center local consumption
20
+
19
21
  nodeViews: {
20
22
  expand: ExpandNodeView({
21
23
  getIntl,
@@ -34,9 +36,13 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
34
36
  __livePage
35
37
  })
36
38
  },
39
+ // @ts-ignore - Workaround for help-center local consumption
40
+
37
41
  handleKeyDown(_view, event) {
38
42
  return containsClass(event.target, expandClassNames.titleContainer);
39
43
  },
44
+ // @ts-ignore - Workaround for help-center local consumption
45
+
40
46
  handleKeyPress(_view, event) {
41
47
  return containsClass(event.target, expandClassNames.titleContainer);
42
48
  },
@@ -46,11 +52,15 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
46
52
  handleClickOn: createSelectionClickHandler(['expand', 'nestedExpand'], target => target.classList.contains(expandClassNames.prefix), {
47
53
  useLongPressSelection
48
54
  }),
55
+ // @ts-ignore - Workaround for help-center local consumption
56
+
49
57
  handleDrop(view, event, slice, moved) {
50
58
  return handleExpandDrag(view, event, slice);
51
59
  }
52
60
  },
53
61
  // @see ED-8027 to follow up on this work-around
62
+ // @ts-ignore - Workaround for help-center local consumption
63
+
54
64
  filterTransaction(tr) {
55
65
  if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric)) {
56
66
  return false;
@@ -78,6 +88,9 @@ export function handleExpandDrag(view, event, slice) {
78
88
  } = selection;
79
89
  let sliceContainsExpand = false;
80
90
  let sliceContainsNestedExpand = false;
91
+
92
+ // @ts-ignore - Workaround for help-center local consumption
93
+
81
94
  slice.content.forEach(node => {
82
95
  if (node.type === state.schema.nodes.expand) {
83
96
  sliceContainsExpand = true;
@@ -25,6 +25,8 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
25
25
  state: state,
26
26
  key: pluginKey,
27
27
  props: {
28
+ // @ts-ignore - Workaround for help-center local consumption
29
+
28
30
  nodeViews: {
29
31
  expand: ExpandNodeView({
30
32
  getIntl: getIntl,
@@ -43,9 +45,11 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
43
45
  __livePage: __livePage
44
46
  })
45
47
  },
48
+ // @ts-ignore - Workaround for help-center local consumption
46
49
  handleKeyDown: function handleKeyDown(_view, event) {
47
50
  return containsClass(event.target, expandClassNames.titleContainer);
48
51
  },
52
+ // @ts-ignore - Workaround for help-center local consumption
49
53
  handleKeyPress: function handleKeyPress(_view, event) {
50
54
  return containsClass(event.target, expandClassNames.titleContainer);
51
55
  },
@@ -57,11 +61,13 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
57
61
  }, {
58
62
  useLongPressSelection: useLongPressSelection
59
63
  }),
64
+ // @ts-ignore - Workaround for help-center local consumption
60
65
  handleDrop: function handleDrop(view, event, slice, moved) {
61
66
  return handleExpandDrag(view, event, slice);
62
67
  }
63
68
  },
64
69
  // @see ED-8027 to follow up on this work-around
70
+ // @ts-ignore - Workaround for help-center local consumption
65
71
  filterTransaction: function filterTransaction(tr) {
66
72
  if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric)) {
67
73
  return false;
@@ -99,6 +105,9 @@ export function handleExpandDrag(view, event, slice) {
99
105
  to = selection.to;
100
106
  var sliceContainsExpand = false;
101
107
  var sliceContainsNestedExpand = false;
108
+
109
+ // @ts-ignore - Workaround for help-center local consumption
110
+
102
111
  slice.content.forEach(function (node) {
103
112
  if (node.type === state.schema.nodes.expand) {
104
113
  sliceContainsExpand = true;
@@ -22,6 +22,8 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
22
22
  return new SafePlugin({
23
23
  key: pluginKey,
24
24
  props: {
25
+ // @ts-ignore - Workaround for help-center local consumption
26
+
25
27
  nodeViews: {
26
28
  expand: ExpandNodeView({
27
29
  getIntl: getIntl,
@@ -40,9 +42,11 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
40
42
  __livePage: __livePage
41
43
  })
42
44
  },
45
+ // @ts-ignore - Workaround for help-center local consumption
43
46
  handleKeyDown: function handleKeyDown(_view, event) {
44
47
  return containsClass(event.target, expandClassNames.titleContainer);
45
48
  },
49
+ // @ts-ignore - Workaround for help-center local consumption
46
50
  handleKeyPress: function handleKeyPress(_view, event) {
47
51
  return containsClass(event.target, expandClassNames.titleContainer);
48
52
  },
@@ -54,11 +58,13 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
54
58
  }, {
55
59
  useLongPressSelection: useLongPressSelection
56
60
  }),
61
+ // @ts-ignore - Workaround for help-center local consumption
57
62
  handleDrop: function handleDrop(view, event, slice, moved) {
58
63
  return handleExpandDrag(view, event, slice);
59
64
  }
60
65
  },
61
66
  // @see ED-8027 to follow up on this work-around
67
+ // @ts-ignore - Workaround for help-center local consumption
62
68
  filterTransaction: function filterTransaction(tr) {
63
69
  if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric)) {
64
70
  return false;
@@ -80,6 +86,9 @@ export function handleExpandDrag(view, event, slice) {
80
86
  to = selection.to;
81
87
  var sliceContainsExpand = false;
82
88
  var sliceContainsNestedExpand = false;
89
+
90
+ // @ts-ignore - Workaround for help-center local consumption
91
+
83
92
  slice.content.forEach(function (node) {
84
93
  if (node.type === state.schema.nodes.expand) {
85
94
  sliceContainsExpand = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "7.4.5",
3
+ "version": "7.4.6",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -48,8 +48,8 @@
48
48
  "@atlaskit/icon-lab": "^5.12.0",
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
50
  "@atlaskit/prosemirror-history": "^0.2.0",
51
- "@atlaskit/tmp-editor-statsig": "^13.41.0",
52
- "@atlaskit/tokens": "^8.2.0",
51
+ "@atlaskit/tmp-editor-statsig": "^13.42.0",
52
+ "@atlaskit/tokens": "^8.3.0",
53
53
  "@atlaskit/tooltip": "^20.10.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",
@@ -57,7 +57,7 @@
57
57
  "w3c-keyname": "^2.1.8"
58
58
  },
59
59
  "peerDependencies": {
60
- "@atlaskit/editor-common": "^110.33.0",
60
+ "@atlaskit/editor-common": "^110.34.0",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0",
63
63
  "react-intl-next": "npm:react-intl@^5.18.1"