@atlaskit/editor-plugin-toolbar 3.4.14 → 3.4.15

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-toolbar
2
2
 
3
+ ## 3.4.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
8
+ tsignores added for help-center local consumpton removed
9
+ - Updated dependencies
10
+
3
11
  ## 3.4.14
4
12
 
5
13
  ### Patch Changes
@@ -63,8 +63,6 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
63
63
  }), new _experiences.ExperienceCheckDomMutation({
64
64
  onDomMutation: function onDomMutation(_ref2) {
65
65
  var mutations = _ref2.mutations;
66
- // @ts-ignore - Workaround for help-center local consumption
67
-
68
66
  if (mutations.some(isSelectionToolbarAddedInMutation)) {
69
67
  return {
70
68
  status: 'success'
@@ -87,8 +85,6 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
87
85
  init: function init() {
88
86
  return {};
89
87
  },
90
- // @ts-ignore - Workaround for help-center local consumption
91
-
92
88
  apply: function apply(_tr, pluginState, oldState, newState) {
93
89
  if (!oldState.selection.empty && isSelectionWithoutTextContent(newState.selection)) {
94
90
  experience.abort({
@@ -105,8 +101,6 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
105
101
  }
106
102
  },
107
103
  props: {
108
- // @ts-ignore - Workaround for help-center local consumption
109
-
110
104
  handleDOMEvents: {
111
105
  mousedown: function mousedown(_view, e) {
112
106
  mouseDownPos = {
@@ -157,8 +151,6 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
157
151
  var isSelectionToolbarAddedInMutation = function isSelectionToolbarAddedInMutation(_ref4) {
158
152
  var type = _ref4.type,
159
153
  addedNodes = _ref4.addedNodes;
160
- // @ts-ignore - Workaround for help-center local consumption
161
-
162
154
  return type === 'childList' && (0, _toConsumableArray2.default)(addedNodes).some(isSelectionToolbarWithinNode);
163
155
  };
164
156
  var isSelectionToolbarWithinNode = function isSelectionToolbarWithinNode(node) {
@@ -30,8 +30,6 @@ function getSelectedNode(editorState) {
30
30
  node: selection.node,
31
31
  pos: selection.from,
32
32
  nodeType: selection.node.type.name,
33
- // @ts-ignore - Workaround for help-center local consumption
34
-
35
33
  marks: selection.node.marks.map(function (mark) {
36
34
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
37
35
  })
@@ -44,8 +42,6 @@ function getSelectedNode(editorState) {
44
42
  node: selectedNode.node,
45
43
  pos: selectedNode.pos,
46
44
  nodeType: selectedNode.node.type.name,
47
- // @ts-ignore - Workaround for help-center local consumption
48
-
49
45
  marks: selectedNode.node.marks.map(function (mark) {
50
46
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
51
47
  })
@@ -57,8 +53,6 @@ function getSelectedNode(editorState) {
57
53
  node: parentNode.node,
58
54
  pos: parentNode.pos,
59
55
  nodeType: parentNode.node.type.name,
60
- // @ts-ignore - Workaround for help-center local consumption
61
-
62
56
  marks: parentNode.node.marks.map(function (mark) {
63
57
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
64
58
  })
@@ -69,8 +63,6 @@ function getSelectedNode(editorState) {
69
63
  node: $pos.parent,
70
64
  pos: $pos.pos,
71
65
  nodeType: $pos.parent.type.name,
72
- // @ts-ignore - Workaround for help-center local consumption
73
-
74
66
  marks: $pos.marks().map(function (mark) {
75
67
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
76
68
  })
@@ -125,14 +117,12 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
125
117
  return new _safePlugin.SafePlugin({
126
118
  key: _pluginKey.editorToolbarPluginKey,
127
119
  state: {
128
- // @ts-ignore - Workaround for help-center local consumption
129
120
  init: function init(_, editorState) {
130
121
  return {
131
122
  shouldShowToolbar: false,
132
123
  selectedNode: getSelectedNode(editorState)
133
124
  };
134
125
  },
135
- // @ts-ignore - Workaround for help-center local consumption
136
126
  apply: function apply(tr, pluginState, _, newState) {
137
127
  var meta = tr.getMeta(_pluginKey.editorToolbarPluginKey);
138
128
  var newPluginState = _objectSpread({}, pluginState);
@@ -153,7 +143,6 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
153
143
  return newPluginState;
154
144
  }
155
145
  },
156
- // @ts-ignore - Workaround for help-center local consumption
157
146
  view: function view(_view) {
158
147
  var unbind = (0, _bindEventListener.bind)(_view.root, {
159
148
  type: 'mouseup',
@@ -182,7 +171,6 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
182
171
  }
183
172
  });
184
173
  return {
185
- // @ts-ignore - Workaround for help-center local consumption
186
174
  destroy: function destroy() {
187
175
  unbind();
188
176
  unbindEditorViewFocus();
@@ -190,11 +178,7 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
190
178
  };
191
179
  },
192
180
  props: {
193
- // @ts-ignore - Workaround for help-center local consumption
194
-
195
181
  handleDOMEvents: {
196
- // @ts-ignore - Workaround for help-center local consumption
197
-
198
182
  mousedown: function mousedown(view) {
199
183
  view.dispatch(view.state.tr.setMeta(_pluginKey.editorToolbarPluginKey, {
200
184
  shouldShowToolbar: false
@@ -57,8 +57,6 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
57
57
  onDomMutation: ({
58
58
  mutations
59
59
  }) => {
60
- // @ts-ignore - Workaround for help-center local consumption
61
-
62
60
  if (mutations.some(isSelectionToolbarAddedInMutation)) {
63
61
  return {
64
62
  status: 'success'
@@ -77,8 +75,6 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
77
75
  key: pluginKey,
78
76
  state: {
79
77
  init: () => ({}),
80
- // @ts-ignore - Workaround for help-center local consumption
81
-
82
78
  apply: (_tr, pluginState, oldState, newState) => {
83
79
  if (!oldState.selection.empty && isSelectionWithoutTextContent(newState.selection)) {
84
80
  experience.abort({
@@ -95,8 +91,6 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
95
91
  }
96
92
  },
97
93
  props: {
98
- // @ts-ignore - Workaround for help-center local consumption
99
-
100
94
  handleDOMEvents: {
101
95
  mousedown: (_view, e) => {
102
96
  mouseDownPos = {
@@ -149,8 +143,6 @@ const isSelectionToolbarAddedInMutation = ({
149
143
  type,
150
144
  addedNodes
151
145
  }) => {
152
- // @ts-ignore - Workaround for help-center local consumption
153
-
154
146
  return type === 'childList' && [...addedNodes].some(isSelectionToolbarWithinNode);
155
147
  };
156
148
  const isSelectionToolbarWithinNode = node => {
@@ -21,8 +21,6 @@ function getSelectedNode(editorState) {
21
21
  node: selection.node,
22
22
  pos: selection.from,
23
23
  nodeType: selection.node.type.name,
24
- // @ts-ignore - Workaround for help-center local consumption
25
-
26
24
  marks: selection.node.marks.map(mark => `${mark.type.name}:${JSON.stringify(mark.attrs)}`)
27
25
  };
28
26
  }
@@ -35,8 +33,6 @@ function getSelectedNode(editorState) {
35
33
  node: selectedNode.node,
36
34
  pos: selectedNode.pos,
37
35
  nodeType: selectedNode.node.type.name,
38
- // @ts-ignore - Workaround for help-center local consumption
39
-
40
36
  marks: selectedNode.node.marks.map(mark => `${mark.type.name}:${JSON.stringify(mark.attrs)}`)
41
37
  };
42
38
  }
@@ -46,8 +42,6 @@ function getSelectedNode(editorState) {
46
42
  node: parentNode.node,
47
43
  pos: parentNode.pos,
48
44
  nodeType: parentNode.node.type.name,
49
- // @ts-ignore - Workaround for help-center local consumption
50
-
51
45
  marks: parentNode.node.marks.map(mark => `${mark.type.name}:${JSON.stringify(mark.attrs)}`)
52
46
  };
53
47
  }
@@ -56,8 +50,6 @@ function getSelectedNode(editorState) {
56
50
  node: $pos.parent,
57
51
  pos: $pos.pos,
58
52
  nodeType: $pos.parent.type.name,
59
- // @ts-ignore - Workaround for help-center local consumption
60
-
61
53
  marks: $pos.marks().map(mark => `${mark.type.name}:${JSON.stringify(mark.attrs)}`)
62
54
  };
63
55
  }
@@ -110,16 +102,12 @@ export const toolbarPlugin = ({
110
102
  return new SafePlugin({
111
103
  key: editorToolbarPluginKey,
112
104
  state: {
113
- // @ts-ignore - Workaround for help-center local consumption
114
-
115
105
  init(_, editorState) {
116
106
  return {
117
107
  shouldShowToolbar: false,
118
108
  selectedNode: getSelectedNode(editorState)
119
109
  };
120
110
  },
121
- // @ts-ignore - Workaround for help-center local consumption
122
-
123
111
  apply(tr, pluginState, _, newState) {
124
112
  const meta = tr.getMeta(editorToolbarPluginKey);
125
113
  let newPluginState = {
@@ -145,8 +133,6 @@ export const toolbarPlugin = ({
145
133
  return newPluginState;
146
134
  }
147
135
  },
148
- // @ts-ignore - Workaround for help-center local consumption
149
-
150
136
  view(view) {
151
137
  const unbind = bind(view.root, {
152
138
  type: 'mouseup',
@@ -175,8 +161,6 @@ export const toolbarPlugin = ({
175
161
  }
176
162
  });
177
163
  return {
178
- // @ts-ignore - Workaround for help-center local consumption
179
-
180
164
  destroy() {
181
165
  unbind();
182
166
  unbindEditorViewFocus();
@@ -184,11 +168,7 @@ export const toolbarPlugin = ({
184
168
  };
185
169
  },
186
170
  props: {
187
- // @ts-ignore - Workaround for help-center local consumption
188
-
189
171
  handleDOMEvents: {
190
- // @ts-ignore - Workaround for help-center local consumption
191
-
192
172
  mousedown: view => {
193
173
  view.dispatch(view.state.tr.setMeta(editorToolbarPluginKey, {
194
174
  shouldShowToolbar: false
@@ -56,8 +56,6 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
56
56
  }), new ExperienceCheckDomMutation({
57
57
  onDomMutation: function onDomMutation(_ref2) {
58
58
  var mutations = _ref2.mutations;
59
- // @ts-ignore - Workaround for help-center local consumption
60
-
61
59
  if (mutations.some(isSelectionToolbarAddedInMutation)) {
62
60
  return {
63
61
  status: 'success'
@@ -80,8 +78,6 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
80
78
  init: function init() {
81
79
  return {};
82
80
  },
83
- // @ts-ignore - Workaround for help-center local consumption
84
-
85
81
  apply: function apply(_tr, pluginState, oldState, newState) {
86
82
  if (!oldState.selection.empty && isSelectionWithoutTextContent(newState.selection)) {
87
83
  experience.abort({
@@ -98,8 +94,6 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
98
94
  }
99
95
  },
100
96
  props: {
101
- // @ts-ignore - Workaround for help-center local consumption
102
-
103
97
  handleDOMEvents: {
104
98
  mousedown: function mousedown(_view, e) {
105
99
  mouseDownPos = {
@@ -150,8 +144,6 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
150
144
  var isSelectionToolbarAddedInMutation = function isSelectionToolbarAddedInMutation(_ref4) {
151
145
  var type = _ref4.type,
152
146
  addedNodes = _ref4.addedNodes;
153
- // @ts-ignore - Workaround for help-center local consumption
154
-
155
147
  return type === 'childList' && _toConsumableArray(addedNodes).some(isSelectionToolbarWithinNode);
156
148
  };
157
149
  var isSelectionToolbarWithinNode = function isSelectionToolbarWithinNode(node) {
@@ -23,8 +23,6 @@ function getSelectedNode(editorState) {
23
23
  node: selection.node,
24
24
  pos: selection.from,
25
25
  nodeType: selection.node.type.name,
26
- // @ts-ignore - Workaround for help-center local consumption
27
-
28
26
  marks: selection.node.marks.map(function (mark) {
29
27
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
30
28
  })
@@ -37,8 +35,6 @@ function getSelectedNode(editorState) {
37
35
  node: selectedNode.node,
38
36
  pos: selectedNode.pos,
39
37
  nodeType: selectedNode.node.type.name,
40
- // @ts-ignore - Workaround for help-center local consumption
41
-
42
38
  marks: selectedNode.node.marks.map(function (mark) {
43
39
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
44
40
  })
@@ -50,8 +46,6 @@ function getSelectedNode(editorState) {
50
46
  node: parentNode.node,
51
47
  pos: parentNode.pos,
52
48
  nodeType: parentNode.node.type.name,
53
- // @ts-ignore - Workaround for help-center local consumption
54
-
55
49
  marks: parentNode.node.marks.map(function (mark) {
56
50
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
57
51
  })
@@ -62,8 +56,6 @@ function getSelectedNode(editorState) {
62
56
  node: $pos.parent,
63
57
  pos: $pos.pos,
64
58
  nodeType: $pos.parent.type.name,
65
- // @ts-ignore - Workaround for help-center local consumption
66
-
67
59
  marks: $pos.marks().map(function (mark) {
68
60
  return "".concat(mark.type.name, ":").concat(JSON.stringify(mark.attrs));
69
61
  })
@@ -118,14 +110,12 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
118
110
  return new SafePlugin({
119
111
  key: editorToolbarPluginKey,
120
112
  state: {
121
- // @ts-ignore - Workaround for help-center local consumption
122
113
  init: function init(_, editorState) {
123
114
  return {
124
115
  shouldShowToolbar: false,
125
116
  selectedNode: getSelectedNode(editorState)
126
117
  };
127
118
  },
128
- // @ts-ignore - Workaround for help-center local consumption
129
119
  apply: function apply(tr, pluginState, _, newState) {
130
120
  var meta = tr.getMeta(editorToolbarPluginKey);
131
121
  var newPluginState = _objectSpread({}, pluginState);
@@ -146,7 +136,6 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
146
136
  return newPluginState;
147
137
  }
148
138
  },
149
- // @ts-ignore - Workaround for help-center local consumption
150
139
  view: function view(_view) {
151
140
  var unbind = bind(_view.root, {
152
141
  type: 'mouseup',
@@ -175,7 +164,6 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
175
164
  }
176
165
  });
177
166
  return {
178
- // @ts-ignore - Workaround for help-center local consumption
179
167
  destroy: function destroy() {
180
168
  unbind();
181
169
  unbindEditorViewFocus();
@@ -183,11 +171,7 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
183
171
  };
184
172
  },
185
173
  props: {
186
- // @ts-ignore - Workaround for help-center local consumption
187
-
188
174
  handleDOMEvents: {
189
- // @ts-ignore - Workaround for help-center local consumption
190
-
191
175
  mousedown: function mousedown(view) {
192
176
  view.dispatch(view.state.tr.setMeta(editorToolbarPluginKey, {
193
177
  shouldShowToolbar: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "3.4.14",
3
+ "version": "3.4.15",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/editor-toolbar-model": "^0.2.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.1.0",
42
42
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
43
- "@atlaskit/tmp-editor-statsig": "^14.1.0",
43
+ "@atlaskit/tmp-editor-statsig": "^14.2.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "bind-event-listener": "^3.0.0",
46
46
  "react-intl-next": "npm:react-intl@^5.18.1"