@atlaskit/editor-plugin-selection-toolbar 7.1.10 → 7.1.12

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-selection-toolbar
2
2
 
3
+ ## 7.1.12
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
+
11
+ ## 7.1.11
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 7.1.10
4
18
 
5
19
  ### Patch Changes
@@ -149,7 +149,6 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
149
149
  return new _safePlugin.SafePlugin({
150
150
  key: _pluginKey.selectionToolbarPluginKey,
151
151
  state: {
152
- // @ts-ignore - Workaround for help-center local consumption
153
152
  init: function init() {
154
153
  return {
155
154
  selectionStable: false,
@@ -157,7 +156,6 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
157
156
  toolbarDocking: initialToolbarDocking
158
157
  };
159
158
  },
160
- // @ts-ignore - Workaround for help-center local consumption
161
159
  apply: function apply(tr, pluginState) {
162
160
  var meta = tr.getMeta(_pluginKey.selectionToolbarPluginKey);
163
161
  var newPluginState = pluginState;
@@ -190,7 +188,6 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
190
188
  return newPluginState;
191
189
  }
192
190
  },
193
- // @ts-ignore - Workaround for help-center local consumption
194
191
  view: function view(_view) {
195
192
  var unbind = (0, _bindEventListener.bind)(_view.root, {
196
193
  type: 'mouseup',
@@ -203,8 +200,6 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
203
200
  var editorViewModePlugin = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
204
201
  var isViewModeEnabled = (editorViewModePlugin === null || editorViewModePlugin === void 0 ? void 0 : editorViewModePlugin.mode) === 'view';
205
202
  if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
206
- // @ts-ignore - Workaround for help-center local consumption
207
-
208
203
  var target = event.target;
209
204
  if (target && target instanceof Element) {
210
205
  var isRovoChangeToneButton = target.tagName === 'BUTTON' && _hasNestedSpanWithText(target, 'Change tone') || target.getAttribute('aria-label') === 'Change tone' || target.innerHTML === 'Change tone';
@@ -228,14 +223,12 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
228
223
  }
229
224
  });
230
225
  return {
231
- // @ts-ignore - Workaround for help-center local consumption
232
226
  destroy: function destroy() {
233
227
  unbind();
234
228
  unbindEditorViewFocus();
235
229
  }
236
230
  };
237
231
  },
238
- // @ts-ignore - Workaround for help-center local consumption
239
232
  appendTransaction: function appendTransaction(_transactions, _oldState, newState) {
240
233
  if ((0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')) {
241
234
  return null;
@@ -262,11 +255,7 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
262
255
  return null;
263
256
  },
264
257
  props: {
265
- // @ts-ignore - Workaround for help-center local consumption
266
-
267
258
  handleDOMEvents: {
268
- // @ts-ignore - Workaround for help-center local consumption
269
-
270
259
  mousedown: function mousedown(view) {
271
260
  view.dispatch(view.state.tr.setMeta(_pluginKey.selectionToolbarPluginKey, {
272
261
  selectionStable: false
@@ -311,13 +300,9 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
311
300
 
312
301
  // Resolve the selectionToolbarHandlers to a list of SelectionToolbarGroups
313
302
  // and filter out any handlers which returned undefined
314
- var resolved = __selectionToolbarHandlers
315
- // @ts-ignore - Workaround for help-center local consumption
316
- .map(function (selectionToolbarHandler) {
303
+ var resolved = __selectionToolbarHandlers.map(function (selectionToolbarHandler) {
317
304
  return selectionToolbarHandler(state, intl, providerFactory);
318
- })
319
- // @ts-ignore - Workaround for help-center local consumption
320
- .filter(function (resolved) {
305
+ }).filter(function (resolved) {
321
306
  return resolved !== undefined;
322
307
  });
323
308
  // Sort the groups by rank
@@ -404,8 +389,6 @@ var selectionToolbarPlugin = exports.selectionToolbarPlugin = function selection
404
389
  };
405
390
  function getSelectionNodeTypes(state) {
406
391
  var selectionNodeTypes = [];
407
- // @ts-ignore - Workaround for help-center local consumption
408
-
409
392
  state.doc.nodesBetween(state.selection.from, state.selection.to, function (node) {
410
393
  if (selectionNodeTypes.indexOf(node.type) !== 0) {
411
394
  selectionNodeTypes.push(node.type);
@@ -142,8 +142,6 @@ export const selectionToolbarPlugin = ({
142
142
  return new SafePlugin({
143
143
  key: selectionToolbarPluginKey,
144
144
  state: {
145
- // @ts-ignore - Workaround for help-center local consumption
146
-
147
145
  init() {
148
146
  return {
149
147
  selectionStable: false,
@@ -151,8 +149,6 @@ export const selectionToolbarPlugin = ({
151
149
  toolbarDocking: initialToolbarDocking
152
150
  };
153
151
  },
154
- // @ts-ignore - Workaround for help-center local consumption
155
-
156
152
  apply(tr, pluginState) {
157
153
  const meta = tr.getMeta(selectionToolbarPluginKey);
158
154
  let newPluginState = pluginState;
@@ -190,8 +186,6 @@ export const selectionToolbarPlugin = ({
190
186
  return newPluginState;
191
187
  }
192
188
  },
193
- // @ts-ignore - Workaround for help-center local consumption
194
-
195
189
  view(view) {
196
190
  const unbind = bind(view.root, {
197
191
  type: 'mouseup',
@@ -204,8 +198,6 @@ export const selectionToolbarPlugin = ({
204
198
  const editorViewModePlugin = api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
205
199
  const isViewModeEnabled = (editorViewModePlugin === null || editorViewModePlugin === void 0 ? void 0 : editorViewModePlugin.mode) === 'view';
206
200
  if (fg('platform_editor_ai_generic_prep_for_aifc')) {
207
- // @ts-ignore - Workaround for help-center local consumption
208
-
209
201
  const target = event.target;
210
202
  if (target && target instanceof Element) {
211
203
  const isRovoChangeToneButton = target.tagName === 'BUTTON' && hasNestedSpanWithText(target, 'Change tone') || target.getAttribute('aria-label') === 'Change tone' || target.innerHTML === 'Change tone';
@@ -229,16 +221,12 @@ export const selectionToolbarPlugin = ({
229
221
  }
230
222
  });
231
223
  return {
232
- // @ts-ignore - Workaround for help-center local consumption
233
-
234
224
  destroy() {
235
225
  unbind();
236
226
  unbindEditorViewFocus();
237
227
  }
238
228
  };
239
229
  },
240
- // @ts-ignore - Workaround for help-center local consumption
241
-
242
230
  appendTransaction(_transactions, _oldState, newState) {
243
231
  if (fg('platform_editor_use_preferences_plugin')) {
244
232
  return null;
@@ -265,11 +253,7 @@ export const selectionToolbarPlugin = ({
265
253
  return null;
266
254
  },
267
255
  props: {
268
- // @ts-ignore - Workaround for help-center local consumption
269
-
270
256
  handleDOMEvents: {
271
- // @ts-ignore - Workaround for help-center local consumption
272
-
273
257
  mousedown: view => {
274
258
  view.dispatch(view.state.tr.setMeta(selectionToolbarPluginKey, {
275
259
  selectionStable: false
@@ -315,11 +299,7 @@ export const selectionToolbarPlugin = ({
315
299
 
316
300
  // Resolve the selectionToolbarHandlers to a list of SelectionToolbarGroups
317
301
  // and filter out any handlers which returned undefined
318
- const resolved = __selectionToolbarHandlers
319
- // @ts-ignore - Workaround for help-center local consumption
320
- .map(selectionToolbarHandler => selectionToolbarHandler(state, intl, providerFactory))
321
- // @ts-ignore - Workaround for help-center local consumption
322
- .filter(resolved => resolved !== undefined);
302
+ const resolved = __selectionToolbarHandlers.map(selectionToolbarHandler => selectionToolbarHandler(state, intl, providerFactory)).filter(resolved => resolved !== undefined);
323
303
  // Sort the groups by rank
324
304
  // This is intended to allow different plugins to control the order of the groups
325
305
  // they add to the selection toolbar.
@@ -402,8 +382,6 @@ export const selectionToolbarPlugin = ({
402
382
  };
403
383
  function getSelectionNodeTypes(state) {
404
384
  const selectionNodeTypes = [];
405
- // @ts-ignore - Workaround for help-center local consumption
406
-
407
385
  state.doc.nodesBetween(state.selection.from, state.selection.to, node => {
408
386
  if (selectionNodeTypes.indexOf(node.type) !== 0) {
409
387
  selectionNodeTypes.push(node.type);
@@ -142,7 +142,6 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
142
142
  return new SafePlugin({
143
143
  key: selectionToolbarPluginKey,
144
144
  state: {
145
- // @ts-ignore - Workaround for help-center local consumption
146
145
  init: function init() {
147
146
  return {
148
147
  selectionStable: false,
@@ -150,7 +149,6 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
150
149
  toolbarDocking: initialToolbarDocking
151
150
  };
152
151
  },
153
- // @ts-ignore - Workaround for help-center local consumption
154
152
  apply: function apply(tr, pluginState) {
155
153
  var meta = tr.getMeta(selectionToolbarPluginKey);
156
154
  var newPluginState = pluginState;
@@ -183,7 +181,6 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
183
181
  return newPluginState;
184
182
  }
185
183
  },
186
- // @ts-ignore - Workaround for help-center local consumption
187
184
  view: function view(_view) {
188
185
  var unbind = bind(_view.root, {
189
186
  type: 'mouseup',
@@ -196,8 +193,6 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
196
193
  var editorViewModePlugin = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState();
197
194
  var isViewModeEnabled = (editorViewModePlugin === null || editorViewModePlugin === void 0 ? void 0 : editorViewModePlugin.mode) === 'view';
198
195
  if (fg('platform_editor_ai_generic_prep_for_aifc')) {
199
- // @ts-ignore - Workaround for help-center local consumption
200
-
201
196
  var target = event.target;
202
197
  if (target && target instanceof Element) {
203
198
  var isRovoChangeToneButton = target.tagName === 'BUTTON' && _hasNestedSpanWithText(target, 'Change tone') || target.getAttribute('aria-label') === 'Change tone' || target.innerHTML === 'Change tone';
@@ -221,14 +216,12 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
221
216
  }
222
217
  });
223
218
  return {
224
- // @ts-ignore - Workaround for help-center local consumption
225
219
  destroy: function destroy() {
226
220
  unbind();
227
221
  unbindEditorViewFocus();
228
222
  }
229
223
  };
230
224
  },
231
- // @ts-ignore - Workaround for help-center local consumption
232
225
  appendTransaction: function appendTransaction(_transactions, _oldState, newState) {
233
226
  if (fg('platform_editor_use_preferences_plugin')) {
234
227
  return null;
@@ -255,11 +248,7 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
255
248
  return null;
256
249
  },
257
250
  props: {
258
- // @ts-ignore - Workaround for help-center local consumption
259
-
260
251
  handleDOMEvents: {
261
- // @ts-ignore - Workaround for help-center local consumption
262
-
263
252
  mousedown: function mousedown(view) {
264
253
  view.dispatch(view.state.tr.setMeta(selectionToolbarPluginKey, {
265
254
  selectionStable: false
@@ -304,13 +293,9 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
304
293
 
305
294
  // Resolve the selectionToolbarHandlers to a list of SelectionToolbarGroups
306
295
  // and filter out any handlers which returned undefined
307
- var resolved = __selectionToolbarHandlers
308
- // @ts-ignore - Workaround for help-center local consumption
309
- .map(function (selectionToolbarHandler) {
296
+ var resolved = __selectionToolbarHandlers.map(function (selectionToolbarHandler) {
310
297
  return selectionToolbarHandler(state, intl, providerFactory);
311
- })
312
- // @ts-ignore - Workaround for help-center local consumption
313
- .filter(function (resolved) {
298
+ }).filter(function (resolved) {
314
299
  return resolved !== undefined;
315
300
  });
316
301
  // Sort the groups by rank
@@ -397,8 +382,6 @@ export var selectionToolbarPlugin = function selectionToolbarPlugin(_ref) {
397
382
  };
398
383
  function getSelectionNodeTypes(state) {
399
384
  var selectionNodeTypes = [];
400
- // @ts-ignore - Workaround for help-center local consumption
401
-
402
385
  state.doc.nodesBetween(state.selection.from, state.selection.to, function (node) {
403
386
  if (selectionNodeTypes.indexOf(node.type) !== 0) {
404
387
  selectionNodeTypes.push(node.type);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "7.1.10",
3
+ "version": "7.1.12",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@atlaskit/css": "^0.17.0",
33
33
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
34
- "@atlaskit/editor-plugin-block-controls": "^7.10.0",
34
+ "@atlaskit/editor-plugin-block-controls": "^7.11.0",
35
35
  "@atlaskit/editor-plugin-connectivity": "^6.0.0",
36
36
  "@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
37
37
  "@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
@@ -39,14 +39,14 @@
39
39
  "@atlaskit/editor-plugin-user-intent": "^4.0.0",
40
40
  "@atlaskit/editor-plugin-user-preferences": "^4.0.0",
41
41
  "@atlaskit/editor-prosemirror": "7.0.0",
42
- "@atlaskit/editor-toolbar": "^0.17.0",
42
+ "@atlaskit/editor-toolbar": "^0.18.0",
43
43
  "@atlaskit/editor-toolbar-model": "^0.2.0",
44
44
  "@atlaskit/icon": "^29.0.0",
45
45
  "@atlaskit/icon-lab": "^5.12.0",
46
46
  "@atlaskit/menu": "^8.4.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
48
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
49
- "@atlaskit/tmp-editor-statsig": "^14.1.0",
49
+ "@atlaskit/tmp-editor-statsig": "^14.2.0",
50
50
  "@atlaskit/tokens": "^8.4.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "bind-event-listener": "^3.0.0"