@atlaskit/editor-plugin-floating-toolbar 8.2.21 → 8.2.23

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-floating-toolbar
2
2
 
3
+ ## 8.2.23
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.2.22
10
+
11
+ ### Patch Changes
12
+
13
+ - [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
14
+ tsignores added for help-center local consumpton removed
15
+ - Updated dependencies
16
+
3
17
  ## 8.2.21
4
18
 
5
19
  ### Patch Changes
@@ -45,8 +45,6 @@ var SUPPRESS_TOOLBAR_USER_INTENTS = ['dragging', 'tableContextualMenuPopupOpen',
45
45
  var getRelevantConfig = exports.getRelevantConfig = function getRelevantConfig(selection, configs) {
46
46
  // node selections always take precedence, see if
47
47
  var configPair;
48
- // @ts-ignore - Workaround for help-center local consumption
49
-
50
48
  configs.find(function (config) {
51
49
  var node = (0, _utils.findSelectedNodeOfType)(config.nodeType)(selection);
52
50
  if (node) {
@@ -64,12 +62,8 @@ var getRelevantConfig = exports.getRelevantConfig = function getRelevantConfig(s
64
62
 
65
63
  // create mapping of node type name to configs
66
64
  var configByNodeType = {};
67
- // @ts-ignore - Workaround for help-center local consumption
68
-
69
65
  configs.forEach(function (config) {
70
66
  if (Array.isArray(config.nodeType)) {
71
- // @ts-ignore - Workaround for help-center local consumption
72
-
73
67
  config.nodeType.forEach(function (nodeType) {
74
68
  configByNodeType[nodeType.name] = config;
75
69
  });
@@ -333,8 +327,6 @@ function ContentComponent(_ref5) {
333
327
  if (isInViewMode) {
334
328
  // Typescript note: Not all toolbar item types have the `supportsViewMode` prop.
335
329
  var toolbarItemViewModeProp = 'supportsViewMode';
336
- // @ts-ignore - Workaround for help-center local consumption
337
-
338
330
  items = iterableItems.filter(function (item) {
339
331
  return toolbarItemViewModeProp in item && !!item[toolbarItemViewModeProp];
340
332
  });
@@ -343,15 +335,11 @@ function ContentComponent(_ref5) {
343
335
  var _items2;
344
336
  // Consolidate floating toolbar items
345
337
  var toolbarItemsArray = Array.isArray(items) ? items : (_items2 = items) === null || _items2 === void 0 ? void 0 : _items2(node);
346
- // @ts-ignore - Workaround for help-center local consumption
347
-
348
338
  var overflowDropdownItems = toolbarItemsArray.filter(function (item) {
349
339
  return item.type === 'overflow-dropdown';
350
340
  });
351
341
  if (overflowDropdownItems.length > 1) {
352
342
  var consolidatedOverflowDropdown = (0, _utils3.consolidateOverflowDropdownItems)(overflowDropdownItems);
353
- // @ts-ignore - Workaround for help-center local consumption
354
-
355
343
  var otherItems = toolbarItemsArray.filter(function (item) {
356
344
  return item.type !== 'overflow-dropdown';
357
345
  });
@@ -373,8 +361,6 @@ function ContentComponent(_ref5) {
373
361
  if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent) {
374
362
  var _items3;
375
363
  var currentItems = Array.isArray(items) ? items : (_items3 = items) === null || _items3 === void 0 ? void 0 : _items3(node);
376
- // @ts-ignore - Workaround for help-center local consumption
377
-
378
364
  var updatedItems = currentItems.map(function (item) {
379
365
  if (item.type !== 'overflow-dropdown') {
380
366
  return item;
@@ -546,8 +532,6 @@ function sanitizeFloatingToolbarConfig(config) {
546
532
  // Cleanup from non existing node types
547
533
  if (Array.isArray(config.nodeType)) {
548
534
  return _objectSpread(_objectSpread({}, config), {}, {
549
- // @ts-ignore - Workaround for help-center local consumption
550
-
551
535
  nodeType: config.nodeType.filter(filterUndefined)
552
536
  });
553
537
  }
@@ -623,10 +607,7 @@ function floatingToolbarPluginFactory(options) {
623
607
  getConfigWithNodeInfo: getConfigWithNodeInfo
624
608
  };
625
609
  },
626
- apply: (0, _expValEquals.expValEquals)('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ?
627
- // @ts-ignore - Workaround for help-center local consumption
628
-
629
- function (_tr, _pluginState, __oldEditorState, newEditorState) {
610
+ apply: (0, _expValEquals.expValEquals)('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ? function (_tr, _pluginState, __oldEditorState, newEditorState) {
630
611
  var suppressedToolbar = getIsToolbarSuppressed(newEditorState);
631
612
  var newPluginState = {
632
613
  getConfigWithNodeInfo: getConfigWithNodeInfo,
@@ -637,8 +618,6 @@ function floatingToolbarPluginFactory(options) {
637
618
  },
638
619
  view: (0, _expValEquals.expValEquals)('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ? function () {
639
620
  return {
640
- // @ts-ignore - Workaround for help-center local consumption
641
-
642
621
  update: function update(view, prevState) {
643
622
  var pluginState = pluginKey.getState(view.state);
644
623
  var prevPluginState = pluginKey.getState(prevState);
@@ -21,8 +21,6 @@ var _default = exports.default = function _default() {
21
21
  selector: null
22
22
  };
23
23
  },
24
- // @ts-ignore - Workaround for help-center local consumption
25
-
26
24
  apply: function apply(tr, prevState) {
27
25
  var meta = tr.getMeta(forceFocusStateKey);
28
26
  if (meta && 'selector' in meta) {
@@ -76,10 +76,7 @@ var CheckboxModal = exports.CheckboxModal = function CheckboxModal(props) {
76
76
  onChange: function onChange() {
77
77
  return setCheckbox(!isChecked);
78
78
  },
79
- label: checkboxlabel
80
- // @ts-ignore - Workaround for help-center local consumption
81
- ,
82
-
79
+ label: checkboxlabel,
83
80
  testId: testId ? "".concat(testId, "-checkbox") : undefined
84
81
  }))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
85
82
  appearance: "default",
@@ -31,8 +31,6 @@ const SUPPRESS_TOOLBAR_USER_INTENTS = ['dragging', 'tableContextualMenuPopupOpen
31
31
  export const getRelevantConfig = (selection, configs) => {
32
32
  // node selections always take precedence, see if
33
33
  let configPair;
34
- // @ts-ignore - Workaround for help-center local consumption
35
-
36
34
  configs.find(config => {
37
35
  const node = findSelectedNodeOfType(config.nodeType)(selection);
38
36
  if (node) {
@@ -50,12 +48,8 @@ export const getRelevantConfig = (selection, configs) => {
50
48
 
51
49
  // create mapping of node type name to configs
52
50
  const configByNodeType = {};
53
- // @ts-ignore - Workaround for help-center local consumption
54
-
55
51
  configs.forEach(config => {
56
52
  if (Array.isArray(config.nodeType)) {
57
- // @ts-ignore - Workaround for help-center local consumption
58
-
59
53
  config.nodeType.forEach(nodeType => {
60
54
  configByNodeType[nodeType.name] = config;
61
55
  });
@@ -323,21 +317,15 @@ export function ContentComponent({
323
317
  if (isInViewMode) {
324
318
  // Typescript note: Not all toolbar item types have the `supportsViewMode` prop.
325
319
  const toolbarItemViewModeProp = 'supportsViewMode';
326
- // @ts-ignore - Workaround for help-center local consumption
327
-
328
320
  items = iterableItems.filter(item => toolbarItemViewModeProp in item && !!item[toolbarItemViewModeProp]);
329
321
  }
330
322
  if (areToolbarFlagsEnabled(Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar))) {
331
323
  var _items2;
332
324
  // Consolidate floating toolbar items
333
325
  const toolbarItemsArray = Array.isArray(items) ? items : (_items2 = items) === null || _items2 === void 0 ? void 0 : _items2(node);
334
- // @ts-ignore - Workaround for help-center local consumption
335
-
336
326
  const overflowDropdownItems = toolbarItemsArray.filter(item => item.type === 'overflow-dropdown');
337
327
  if (overflowDropdownItems.length > 1) {
338
328
  const consolidatedOverflowDropdown = consolidateOverflowDropdownItems(overflowDropdownItems);
339
- // @ts-ignore - Workaround for help-center local consumption
340
-
341
329
  const otherItems = toolbarItemsArray.filter(item => item.type !== 'overflow-dropdown');
342
330
  if (otherItems.length > 0) {
343
331
  // remove the last separators
@@ -357,8 +345,6 @@ export function ContentComponent({
357
345
  if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent) {
358
346
  var _items3;
359
347
  const currentItems = Array.isArray(items) ? items : (_items3 = items) === null || _items3 === void 0 ? void 0 : _items3(node);
360
- // @ts-ignore - Workaround for help-center local consumption
361
-
362
348
  const updatedItems = currentItems.map(item => {
363
349
  if (item.type !== 'overflow-dropdown') {
364
350
  return item;
@@ -529,8 +515,6 @@ function sanitizeFloatingToolbarConfig(config) {
529
515
  if (Array.isArray(config.nodeType)) {
530
516
  return {
531
517
  ...config,
532
- // @ts-ignore - Workaround for help-center local consumption
533
-
534
518
  nodeType: config.nodeType.filter(filterUndefined)
535
519
  };
536
520
  }
@@ -608,10 +592,7 @@ export function floatingToolbarPluginFactory(options) {
608
592
  getConfigWithNodeInfo
609
593
  };
610
594
  },
611
- apply: expValEquals('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ?
612
- // @ts-ignore - Workaround for help-center local consumption
613
-
614
- (_tr, _pluginState, __oldEditorState, newEditorState) => {
595
+ apply: expValEquals('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ? (_tr, _pluginState, __oldEditorState, newEditorState) => {
615
596
  const suppressedToolbar = getIsToolbarSuppressed(newEditorState);
616
597
  const newPluginState = {
617
598
  getConfigWithNodeInfo,
@@ -622,8 +603,6 @@ export function floatingToolbarPluginFactory(options) {
622
603
  },
623
604
  view: expValEquals('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ? () => {
624
605
  return {
625
- // @ts-ignore - Workaround for help-center local consumption
626
-
627
606
  update: (view, prevState) => {
628
607
  const pluginState = pluginKey.getState(view.state);
629
608
  const prevPluginState = pluginKey.getState(prevState);
@@ -11,8 +11,6 @@ export default (() => new SafePlugin({
11
11
  init: () => ({
12
12
  selector: null
13
13
  }),
14
- // @ts-ignore - Workaround for help-center local consumption
15
-
16
14
  apply: (tr, prevState) => {
17
15
  const meta = tr.getMeta(forceFocusStateKey);
18
16
  if (meta && 'selector' in meta) {
@@ -65,10 +65,7 @@ export const CheckboxModal = props => {
65
65
  }, /*#__PURE__*/React.createElement(Checkbox, {
66
66
  isChecked: isChecked,
67
67
  onChange: () => setCheckbox(!isChecked),
68
- label: checkboxlabel
69
- // @ts-ignore - Workaround for help-center local consumption
70
- ,
71
-
68
+ label: checkboxlabel,
72
69
  testId: testId ? `${testId}-checkbox` : undefined
73
70
  }))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
74
71
  appearance: "default",
@@ -35,8 +35,6 @@ var SUPPRESS_TOOLBAR_USER_INTENTS = ['dragging', 'tableContextualMenuPopupOpen',
35
35
  export var getRelevantConfig = function getRelevantConfig(selection, configs) {
36
36
  // node selections always take precedence, see if
37
37
  var configPair;
38
- // @ts-ignore - Workaround for help-center local consumption
39
-
40
38
  configs.find(function (config) {
41
39
  var node = findSelectedNodeOfType(config.nodeType)(selection);
42
40
  if (node) {
@@ -54,12 +52,8 @@ export var getRelevantConfig = function getRelevantConfig(selection, configs) {
54
52
 
55
53
  // create mapping of node type name to configs
56
54
  var configByNodeType = {};
57
- // @ts-ignore - Workaround for help-center local consumption
58
-
59
55
  configs.forEach(function (config) {
60
56
  if (Array.isArray(config.nodeType)) {
61
- // @ts-ignore - Workaround for help-center local consumption
62
-
63
57
  config.nodeType.forEach(function (nodeType) {
64
58
  configByNodeType[nodeType.name] = config;
65
59
  });
@@ -323,8 +317,6 @@ export function ContentComponent(_ref5) {
323
317
  if (isInViewMode) {
324
318
  // Typescript note: Not all toolbar item types have the `supportsViewMode` prop.
325
319
  var toolbarItemViewModeProp = 'supportsViewMode';
326
- // @ts-ignore - Workaround for help-center local consumption
327
-
328
320
  items = iterableItems.filter(function (item) {
329
321
  return toolbarItemViewModeProp in item && !!item[toolbarItemViewModeProp];
330
322
  });
@@ -333,15 +325,11 @@ export function ContentComponent(_ref5) {
333
325
  var _items2;
334
326
  // Consolidate floating toolbar items
335
327
  var toolbarItemsArray = Array.isArray(items) ? items : (_items2 = items) === null || _items2 === void 0 ? void 0 : _items2(node);
336
- // @ts-ignore - Workaround for help-center local consumption
337
-
338
328
  var overflowDropdownItems = toolbarItemsArray.filter(function (item) {
339
329
  return item.type === 'overflow-dropdown';
340
330
  });
341
331
  if (overflowDropdownItems.length > 1) {
342
332
  var consolidatedOverflowDropdown = consolidateOverflowDropdownItems(overflowDropdownItems);
343
- // @ts-ignore - Workaround for help-center local consumption
344
-
345
333
  var otherItems = toolbarItemsArray.filter(function (item) {
346
334
  return item.type !== 'overflow-dropdown';
347
335
  });
@@ -363,8 +351,6 @@ export function ContentComponent(_ref5) {
363
351
  if (overflowDropdownItems.length > 0 && dispatchAnalyticsEvent) {
364
352
  var _items3;
365
353
  var currentItems = Array.isArray(items) ? items : (_items3 = items) === null || _items3 === void 0 ? void 0 : _items3(node);
366
- // @ts-ignore - Workaround for help-center local consumption
367
-
368
354
  var updatedItems = currentItems.map(function (item) {
369
355
  if (item.type !== 'overflow-dropdown') {
370
356
  return item;
@@ -536,8 +522,6 @@ function sanitizeFloatingToolbarConfig(config) {
536
522
  // Cleanup from non existing node types
537
523
  if (Array.isArray(config.nodeType)) {
538
524
  return _objectSpread(_objectSpread({}, config), {}, {
539
- // @ts-ignore - Workaround for help-center local consumption
540
-
541
525
  nodeType: config.nodeType.filter(filterUndefined)
542
526
  });
543
527
  }
@@ -613,10 +597,7 @@ export function floatingToolbarPluginFactory(options) {
613
597
  getConfigWithNodeInfo: getConfigWithNodeInfo
614
598
  };
615
599
  },
616
- apply: expValEquals('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ?
617
- // @ts-ignore - Workaround for help-center local consumption
618
-
619
- function (_tr, _pluginState, __oldEditorState, newEditorState) {
600
+ apply: expValEquals('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ? function (_tr, _pluginState, __oldEditorState, newEditorState) {
620
601
  var suppressedToolbar = getIsToolbarSuppressed(newEditorState);
621
602
  var newPluginState = {
622
603
  getConfigWithNodeInfo: getConfigWithNodeInfo,
@@ -627,8 +608,6 @@ export function floatingToolbarPluginFactory(options) {
627
608
  },
628
609
  view: expValEquals('platform_editor_lovability_suppress_toolbar_event', 'isEnabled', true) ? function () {
629
610
  return {
630
- // @ts-ignore - Workaround for help-center local consumption
631
-
632
611
  update: function update(view, prevState) {
633
612
  var pluginState = pluginKey.getState(view.state);
634
613
  var prevPluginState = pluginKey.getState(prevState);
@@ -14,8 +14,6 @@ export default (function () {
14
14
  selector: null
15
15
  };
16
16
  },
17
- // @ts-ignore - Workaround for help-center local consumption
18
-
19
17
  apply: function apply(tr, prevState) {
20
18
  var meta = tr.getMeta(forceFocusStateKey);
21
19
  if (meta && 'selector' in meta) {
@@ -67,10 +67,7 @@ export var CheckboxModal = function CheckboxModal(props) {
67
67
  onChange: function onChange() {
68
68
  return setCheckbox(!isChecked);
69
69
  },
70
- label: checkboxlabel
71
- // @ts-ignore - Workaround for help-center local consumption
72
- ,
73
-
70
+ label: checkboxlabel,
74
71
  testId: testId ? "".concat(testId, "-checkbox") : undefined
75
72
  }))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
76
73
  appearance: "default",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "8.2.21",
3
+ "version": "8.2.23",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/editor-plugin-interaction": "^10.0.0",
37
37
  "@atlaskit/editor-plugin-user-intent": "^4.0.0",
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
- "@atlaskit/emoji": "^69.8.0",
39
+ "@atlaskit/emoji": "^69.9.0",
40
40
  "@atlaskit/icon": "^29.0.0",
41
41
  "@atlaskit/menu": "^8.4.0",
42
42
  "@atlaskit/modal-dialog": "^14.7.0",
@@ -44,9 +44,9 @@
44
44
  "@atlaskit/primitives": "^16.4.0",
45
45
  "@atlaskit/select": "^21.4.0",
46
46
  "@atlaskit/theme": "^21.0.0",
47
- "@atlaskit/tmp-editor-statsig": "^14.0.0",
47
+ "@atlaskit/tmp-editor-statsig": "^15.0.0",
48
48
  "@atlaskit/tokens": "^8.4.0",
49
- "@atlaskit/tooltip": "^20.10.0",
49
+ "@atlaskit/tooltip": "^20.11.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
52
52
  "bind-event-listener": "^3.0.0",
@@ -56,7 +56,7 @@
56
56
  "react-loadable": "^5.1.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^110.36.0",
59
+ "@atlaskit/editor-common": "^110.40.0",
60
60
  "react": "^18.2.0",
61
61
  "react-dom": "^18.2.0"
62
62
  },