@atlaskit/editor-plugin-expand 2.10.11 → 2.10.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/legacyExpand/nodeviews/index.js +15 -1
  3. package/dist/cjs/legacyExpand/plugin.js +2 -0
  4. package/dist/cjs/legacyExpand/pm-plugins/keymap.js +24 -6
  5. package/dist/cjs/legacyExpand/pm-plugins/main.js +5 -0
  6. package/dist/cjs/legacyExpand/ui/ExpandIconButton.js +12 -2
  7. package/dist/cjs/plugin.js +2 -0
  8. package/dist/cjs/singlePlayerExpand/commands.js +4 -0
  9. package/dist/cjs/singlePlayerExpand/node-views/index.js +11 -0
  10. package/dist/cjs/singlePlayerExpand/plugin.js +2 -0
  11. package/dist/cjs/singlePlayerExpand/pm-plugins/keymap.js +24 -6
  12. package/dist/cjs/singlePlayerExpand/pm-plugins/main.js +5 -0
  13. package/dist/cjs/singlePlayerExpand/toolbar.js +5 -1
  14. package/dist/cjs/singlePlayerExpand/ui/ExpandButton.js +14 -2
  15. package/dist/cjs/singlePlayerExpand/ui/NodeView.js +4 -1
  16. package/dist/es2019/legacyExpand/nodeviews/index.js +16 -2
  17. package/dist/es2019/legacyExpand/plugin.js +3 -0
  18. package/dist/es2019/legacyExpand/pm-plugins/keymap.js +24 -6
  19. package/dist/es2019/legacyExpand/pm-plugins/main.js +9 -2
  20. package/dist/es2019/legacyExpand/ui/ExpandIconButton.js +12 -2
  21. package/dist/es2019/plugin.js +2 -0
  22. package/dist/es2019/singlePlayerExpand/commands.js +4 -0
  23. package/dist/es2019/singlePlayerExpand/node-views/index.js +11 -0
  24. package/dist/es2019/singlePlayerExpand/plugin.js +3 -0
  25. package/dist/es2019/singlePlayerExpand/pm-plugins/keymap.js +24 -6
  26. package/dist/es2019/singlePlayerExpand/pm-plugins/main.js +9 -2
  27. package/dist/es2019/singlePlayerExpand/toolbar.js +4 -1
  28. package/dist/es2019/singlePlayerExpand/ui/ExpandButton.js +14 -2
  29. package/dist/es2019/singlePlayerExpand/ui/NodeView.js +4 -1
  30. package/dist/esm/legacyExpand/nodeviews/index.js +15 -1
  31. package/dist/esm/legacyExpand/plugin.js +3 -0
  32. package/dist/esm/legacyExpand/pm-plugins/keymap.js +24 -6
  33. package/dist/esm/legacyExpand/pm-plugins/main.js +4 -0
  34. package/dist/esm/legacyExpand/ui/ExpandIconButton.js +12 -2
  35. package/dist/esm/plugin.js +2 -0
  36. package/dist/esm/singlePlayerExpand/commands.js +4 -0
  37. package/dist/esm/singlePlayerExpand/node-views/index.js +11 -0
  38. package/dist/esm/singlePlayerExpand/plugin.js +3 -0
  39. package/dist/esm/singlePlayerExpand/pm-plugins/keymap.js +24 -6
  40. package/dist/esm/singlePlayerExpand/pm-plugins/main.js +4 -0
  41. package/dist/esm/singlePlayerExpand/toolbar.js +5 -1
  42. package/dist/esm/singlePlayerExpand/ui/ExpandButton.js +14 -2
  43. package/dist/esm/singlePlayerExpand/ui/NodeView.js +4 -1
  44. package/package.json +5 -5
@@ -27,7 +27,10 @@ export const withTooltip = WrapperComponent => {
27
27
  content: label,
28
28
  position: "top",
29
29
  tag: ExpandLayoutWrapperWithRef
30
- }, jsx(WrapperComponent, this.props));
30
+ }, jsx(WrapperComponent
31
+ // Ignored via go/ees005
32
+ // eslint-disable-next-line react/jsx-props-no-spreading
33
+ , this.props));
31
34
  }
32
35
  };
33
36
  };
@@ -36,7 +39,10 @@ export const CustomButton = props => {
36
39
  allowInteractiveExpand,
37
40
  expanded
38
41
  } = props;
39
- const useTheme = useCallback((currentTheme, themeProps) => {
42
+ const useTheme = useCallback(
43
+ // Ignored via go/ees005
44
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
+ (currentTheme, themeProps) => {
40
46
  const {
41
47
  buttonStyles,
42
48
  ...rest
@@ -83,6 +89,8 @@ export const ExpandIconButton = props => {
83
89
 
84
90
  // hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
85
91
  if (props.allowInteractiveExpand && hoverEventCheck) {
92
+ // Ignored via go/ees005
93
+ // eslint-disable-next-line react/jsx-props-no-spreading
86
94
  return jsx(ButtonWithTooltip, _extends({
87
95
  label: label
88
96
  }, props));
@@ -93,6 +101,8 @@ export const ExpandIconButton = props => {
93
101
  css: expandLayoutWrapperStyle
94
102
  }, jsx(ButtonWithoutTooltip, _extends({
95
103
  label: label
104
+ // Ignored via go/ees005
105
+ // eslint-disable-next-line react/jsx-props-no-spreading
96
106
  }, props)))
97
107
  );
98
108
  };
@@ -1,6 +1,8 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import { expandPlugin as legacyExpandPlugin } from './legacyExpand/plugin';
3
3
  import { expandPlugin as singlePlayerExpandPlugin } from './singlePlayerExpand/plugin';
4
+ // Ignored via go/ees005
5
+ // eslint-disable-next-line prefer-const
4
6
  export let expandPlugin = ({
5
7
  config: options = {},
6
8
  api
@@ -23,6 +23,8 @@ export const createExpandNode = (state, setExpandedState = true, isNestingExpand
23
23
  const expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
24
24
  const expandNode = expandType.createAndFill({});
25
25
  if (setExpandedState) {
26
+ // Ignored via go/ees005
27
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
26
28
  expandedState.set(expandNode, true);
27
29
  }
28
30
  return expandNode;
@@ -35,6 +37,8 @@ export const insertExpandWithInputMethod = (editorAnalyticsAPI, isNestingExpands
35
37
  let tr;
36
38
  if (state.selection.empty) {
37
39
  tr = safeInsert(expandNode)(state.tr).scrollIntoView();
40
+ // Ignored via go/ees005
41
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
38
42
  expandedState.set(expandNode, true);
39
43
  } else {
40
44
  tr = createWrapSelectionTransaction({
@@ -15,6 +15,8 @@ import { deleteExpand, setSelectionInsideExpand, toggleExpandExpanded, updateExp
15
15
  import { ExpandButton } from '../ui/ExpandButton';
16
16
  import { buildExpandClassName, toDOM } from '../ui/NodeView';
17
17
  export class ExpandNodeView {
18
+ // Ignored via go/ees005
19
+ // eslint-disable-next-line @typescript-eslint/max-params
18
20
  constructor(_node, view, getPos, getIntl, isMobile, selectNearNode, api, nodeViewPortalProviderAPI, allowInteractiveExpand = true, __livePage = false, cleanUpEditorDisabledOnChange) {
19
21
  var _api$editorDisabled, _api$editorDisabled$s, _this$api6;
20
22
  _defineProperty(this, "allowInteractiveExpand", true);
@@ -57,6 +59,9 @@ export class ExpandNodeView {
57
59
  if (typeof pos !== 'number') {
58
60
  return;
59
61
  }
62
+
63
+ // Ignored via go/ees005
64
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
60
65
  const target = event.target;
61
66
  if (closestElement(target, `.${expandClassNames.icon}`)) {
62
67
  var _this$api, _this$api$analytics;
@@ -395,7 +400,11 @@ export class ExpandNodeView {
395
400
  dom,
396
401
  contentDOM
397
402
  } = DOMSerializer.renderSpec(document, toDOM(_node, this.__livePage, this.intl, api === null || api === void 0 ? void 0 : (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : (_api$editorDisabled$s = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled$s === void 0 ? void 0 : _api$editorDisabled$s.editorDisabled));
403
+ // Ignored via go/ees005
404
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
398
405
  this.dom = dom;
406
+ // Ignored via go/ees005
407
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
399
408
  this.contentDOM = contentDOM;
400
409
  this.isMobile = isMobile;
401
410
  this.api = api;
@@ -440,6 +449,8 @@ export class ExpandNodeView {
440
449
  }
441
450
  }
442
451
  stopEvent(event) {
452
+ // Ignored via go/ees005
453
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
443
454
  const target = event.target;
444
455
  return target === this.input || target === this.icon || !!closestElement(target, `.${expandClassNames.icon}`);
445
456
  }
@@ -9,6 +9,9 @@ import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './c
9
9
  import { expandKeymap } from './pm-plugins/keymap';
10
10
  import { createPlugin } from './pm-plugins/main';
11
11
  import { getToolbarConfig } from './toolbar';
12
+
13
+ // Ignored via go/ees005
14
+ // eslint-disable-next-line prefer-const
12
15
  export let expandPlugin = ({
13
16
  config: options = {},
14
17
  api
@@ -13,7 +13,10 @@ const isExpandNode = node => {
13
13
  const isExpandSelected = selection => selection instanceof NodeSelection && isExpandNode(selection.node);
14
14
  export function expandKeymap(api, options) {
15
15
  const list = {};
16
- bindKeymapWithCommand(moveRight.common, (state, dispatch, editorView) => {
16
+ bindKeymapWithCommand(
17
+ // Ignored via go/ees005
18
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19
+ moveRight.common, (state, dispatch, editorView) => {
17
20
  var _api$selection;
18
21
  if (!editorView) {
19
22
  return false;
@@ -30,7 +33,10 @@ export function expandKeymap(api, options) {
30
33
  }
31
34
  return false;
32
35
  }, list);
33
- bindKeymapWithCommand(moveLeft.common, (state, dispatch, editorView) => {
36
+ bindKeymapWithCommand(
37
+ // Ignored via go/ees005
38
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
39
+ moveLeft.common, (state, dispatch, editorView) => {
34
40
  var _api$selection2;
35
41
  if (!editorView) {
36
42
  return false;
@@ -47,7 +53,10 @@ export function expandKeymap(api, options) {
47
53
  }
48
54
  return false;
49
55
  }, list);
50
- bindKeymapWithCommand(tab.common, (state, dispatch, editorView) => {
56
+ bindKeymapWithCommand(
57
+ // Ignored via go/ees005
58
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
59
+ tab.common, (state, dispatch, editorView) => {
51
60
  if (editorView && editorView.dom instanceof HTMLElement) {
52
61
  const {
53
62
  from
@@ -75,7 +84,10 @@ export function expandKeymap(api, options) {
75
84
  }
76
85
  return false;
77
86
  }, list);
78
- bindKeymapWithCommand(moveUp.common, (state, dispatch, editorView) => {
87
+ bindKeymapWithCommand(
88
+ // Ignored via go/ees005
89
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
90
+ moveUp.common, (state, dispatch, editorView) => {
79
91
  if (!editorView) {
80
92
  return false;
81
93
  }
@@ -126,7 +138,10 @@ export function expandKeymap(api, options) {
126
138
  }
127
139
  return false;
128
140
  }, list);
129
- bindKeymapWithCommand(moveDown.common, (state, dispatch, editorView) => {
141
+ bindKeymapWithCommand(
142
+ // Ignored via go/ees005
143
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
144
+ moveDown.common, (state, dispatch, editorView) => {
130
145
  if (!editorView) {
131
146
  return false;
132
147
  }
@@ -160,7 +175,10 @@ export function expandKeymap(api, options) {
160
175
  }
161
176
  return false;
162
177
  }, list);
163
- bindKeymapWithCommand(backspace.common, (state, dispatch, editorView) => {
178
+ bindKeymapWithCommand(
179
+ // Ignored via go/ees005
180
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
181
+ backspace.common, (state, dispatch, editorView) => {
164
182
  const {
165
183
  selection
166
184
  } = state;
@@ -5,13 +5,18 @@ import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand
5
5
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line import/no-named-as-default
8
10
  import ExpandNodeView from '../node-views';
9
11
  export const pluginKey = new PluginKey('expandPlugin');
10
12
  export function containsClass(element, className) {
11
13
  var _element$classList;
12
14
  return Boolean(element === null || element === void 0 ? void 0 : (_element$classList = element.classList) === null || _element$classList === void 0 ? void 0 : _element$classList.contains(className));
13
15
  }
14
- export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLongPressSelection = false, api, nodeViewPortalProviderAPI, allowInteractiveExpand = true, __livePage = false) => {
16
+ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLongPressSelection = false, api, nodeViewPortalProviderAPI, allowInteractiveExpand = true, __livePage = false
17
+ // Ignored via go/ees005
18
+ // eslint-disable-next-line @typescript-eslint/max-params
19
+ ) => {
15
20
  const isMobile = false;
16
21
  return new SafePlugin({
17
22
  key: pluginKey,
@@ -46,6 +51,8 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
46
51
  handleClickOn: createSelectionClickHandler(['expand', 'nestedExpand'], target => target.classList.contains(expandClassNames.prefix), {
47
52
  useLongPressSelection
48
53
  }),
54
+ // Ignored via go/ees005
55
+ // eslint-disable-next-line @typescript-eslint/max-params
49
56
  handleDrop(view, event, slice, moved) {
50
57
  if (fg('platform_editor_nest_nested_expand_drag_fix')) {
51
58
  return handleExpandDrag(view, event, slice);
@@ -94,7 +101,7 @@ export function handleExpandDrag(view, event, slice) {
94
101
  if (!sliceContainsExpand && !sliceContainsNestedExpand || sliceContainsExpand && sliceContainsNestedExpand) {
95
102
  return false;
96
103
  }
97
- let dropPos = view.posAtCoords({
104
+ const dropPos = view.posAtCoords({
98
105
  left: event.clientX,
99
106
  top: event.clientY
100
107
  });
@@ -21,7 +21,10 @@ export const getToolbarConfig = api => (state, {
21
21
  } = state.schema.nodes;
22
22
  return {
23
23
  title: 'Expand toolbar',
24
- getDomRef: view => findDomRefAtPos(selectedExpandNode.pos, view.domAtPos.bind(view)),
24
+ getDomRef: view =>
25
+ // Ignored via go/ees005
26
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
27
+ findDomRefAtPos(selectedExpandNode.pos, view.domAtPos.bind(view)),
25
28
  nodeType: [nestedExpand, expand],
26
29
  offset: [0, 6],
27
30
  items: [{
@@ -20,11 +20,19 @@ function withTooltip(Component) {
20
20
  content: props.label,
21
21
  position: "top",
22
22
  tag: ExpandLayoutWrapperWithRef
23
- }, jsx(Component, props));
23
+ }, jsx(Component
24
+ // Ignored via go/ees005
25
+ // eslint-disable-next-line react/jsx-props-no-spreading
26
+ , props));
24
27
  };
25
28
  }
26
29
  export const ExpandButtonInner = props => {
27
- const useTheme = useCallback((currentTheme, themeProps) => {
30
+ const useTheme = useCallback(
31
+ // Ignored via go/ees005
32
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
+ // Ignored via go/ees005
34
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
+ (currentTheme, themeProps) => {
28
36
  const {
29
37
  buttonStyles,
30
38
  ...rest
@@ -71,6 +79,8 @@ export const ExpandButton = props => {
71
79
 
72
80
  // hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
73
81
  if (props.allowInteractiveExpand && hoverEventCheck) {
82
+ // Ignored via go/ees005
83
+ // eslint-disable-next-line react/jsx-props-no-spreading
74
84
  return jsx(ButtonWithTooltip, _extends({
75
85
  label: label
76
86
  }, props));
@@ -81,6 +91,8 @@ export const ExpandButton = props => {
81
91
  css: expandLayoutWrapperStyle
82
92
  }, jsx(ButtonWithoutTooltip, _extends({
83
93
  label: label
94
+ // Ignored via go/ees005
95
+ // eslint-disable-next-line react/jsx-props-no-spreading
84
96
  }, props)))
85
97
  );
86
98
  };
@@ -4,7 +4,10 @@ import { expandMessages } from '@atlaskit/editor-common/ui';
4
4
  export const buildExpandClassName = (type, expanded) => {
5
5
  return `${expandClassNames.prefix} ${expandClassNames.type(type)} ${expanded ? expandClassNames.expanded : ''}`;
6
6
  };
7
- export const toDOM = (node, __livePage, intl, titleReadOnly, contentEditable) => {
7
+ export const toDOM = (node, __livePage, intl, titleReadOnly, contentEditable
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line @typescript-eslint/max-params
10
+ ) => {
8
11
  var _expandedState$get;
9
12
  return ['div', {
10
13
  // prettier-ignore
@@ -18,7 +18,10 @@ import { ExpandIconButton } from '../ui/ExpandIconButton';
18
18
  function buildExpandClassName(type, expanded) {
19
19
  return "".concat(expandClassNames.prefix, " ").concat(expandClassNames.type(type), " ").concat(expanded ? expandClassNames.expanded : '');
20
20
  }
21
- var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditable) {
21
+ var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditable
22
+ // Ignored via go/ees005
23
+ // eslint-disable-next-line @typescript-eslint/max-params
24
+ ) {
22
25
  return ['div', {
23
26
  // prettier-ignore
24
27
  'class': buildExpandClassName(node.type.name, __livePage && fg('platform.editor.live-pages-expand-divergence') ? !node.attrs.__expanded : node.attrs.__expanded),
@@ -54,6 +57,8 @@ var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditabl
54
57
  }, 0]];
55
58
  };
56
59
  export var ExpandNodeView = /*#__PURE__*/function () {
60
+ // Ignored via go/ees005
61
+ // eslint-disable-next-line @typescript-eslint/max-params
57
62
  function ExpandNodeView(_node, view, getPos, getIntl, isMobile, selectNearNode, api, nodeViewPortalProviderAPI) {
58
63
  var _this = this,
59
64
  _api$editorDisabled;
@@ -100,6 +105,9 @@ export var ExpandNodeView = /*#__PURE__*/function () {
100
105
  if (typeof pos !== 'number') {
101
106
  return;
102
107
  }
108
+
109
+ // Ignored via go/ees005
110
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
103
111
  var target = event.target;
104
112
  var _this$view2 = _this.view,
105
113
  state = _this$view2.state,
@@ -410,7 +418,11 @@ export var ExpandNodeView = /*#__PURE__*/function () {
410
418
  this.getPos = getPos;
411
419
  this.view = view;
412
420
  this.node = _node;
421
+ // Ignored via go/ees005
422
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
413
423
  this.dom = dom;
424
+ // Ignored via go/ees005
425
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
414
426
  this.contentDOM = contentDOM;
415
427
  this.isMobile = isMobile;
416
428
  this.api = api;
@@ -495,6 +507,8 @@ export var ExpandNodeView = /*#__PURE__*/function () {
495
507
  }, {
496
508
  key: "stopEvent",
497
509
  value: function stopEvent(event) {
510
+ // Ignored via go/ees005
511
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
498
512
  var target = event.target;
499
513
  return target === this.input || target === this.icon || !!closestElement(target, ".".concat(expandClassNames.icon));
500
514
  }
@@ -9,6 +9,9 @@ import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './c
9
9
  import { expandKeymap } from './pm-plugins/keymap';
10
10
  import { createPlugin } from './pm-plugins/main';
11
11
  import { getToolbarConfig } from './toolbar';
12
+
13
+ // Ignored via go/ees005
14
+ // eslint-disable-next-line prefer-const
12
15
  export var expandPlugin = function expandPlugin(_ref) {
13
16
  var _api$featureFlags, _api$analytics, _api$analytics2;
14
17
  var _ref$config = _ref.config,
@@ -15,7 +15,10 @@ var isExpandSelected = function isExpandSelected(selection) {
15
15
  };
16
16
  export function expandKeymap(api, options) {
17
17
  var list = {};
18
- bindKeymapWithCommand(moveRight.common, function (state, dispatch, editorView) {
18
+ bindKeymapWithCommand(
19
+ // Ignored via go/ees005
20
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
21
+ moveRight.common, function (state, dispatch, editorView) {
19
22
  var _api$selection;
20
23
  if (!editorView) {
21
24
  return false;
@@ -28,7 +31,10 @@ export function expandKeymap(api, options) {
28
31
  }
29
32
  return false;
30
33
  }, list);
31
- bindKeymapWithCommand(moveLeft.common, function (state, dispatch, editorView) {
34
+ bindKeymapWithCommand(
35
+ // Ignored via go/ees005
36
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
37
+ moveLeft.common, function (state, dispatch, editorView) {
32
38
  var _api$selection2;
33
39
  if (!editorView) {
34
40
  return false;
@@ -41,7 +47,10 @@ export function expandKeymap(api, options) {
41
47
  }
42
48
  return false;
43
49
  }, list);
44
- bindKeymapWithCommand(tab.common, function (state, dispatch, editorView) {
50
+ bindKeymapWithCommand(
51
+ // Ignored via go/ees005
52
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
53
+ tab.common, function (state, dispatch, editorView) {
45
54
  if (editorView && editorView.dom instanceof HTMLElement) {
46
55
  var from = state.selection.from;
47
56
 
@@ -67,7 +76,10 @@ export function expandKeymap(api, options) {
67
76
  }
68
77
  return false;
69
78
  }, list);
70
- bindKeymapWithCommand(moveUp.common, function (state, dispatch, editorView) {
79
+ bindKeymapWithCommand(
80
+ // Ignored via go/ees005
81
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
82
+ moveUp.common, function (state, dispatch, editorView) {
71
83
  if (!editorView) {
72
84
  return false;
73
85
  }
@@ -114,7 +126,10 @@ export function expandKeymap(api, options) {
114
126
  }
115
127
  return false;
116
128
  }, list);
117
- bindKeymapWithCommand(moveDown.common, function (state, dispatch, editorView) {
129
+ bindKeymapWithCommand(
130
+ // Ignored via go/ees005
131
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
132
+ moveDown.common, function (state, dispatch, editorView) {
118
133
  if (!editorView) {
119
134
  return false;
120
135
  }
@@ -141,7 +156,10 @@ export function expandKeymap(api, options) {
141
156
  }
142
157
  return false;
143
158
  }, list);
144
- bindKeymapWithCommand(backspace.common, function (state, dispatch, editorView) {
159
+ bindKeymapWithCommand(
160
+ // Ignored via go/ees005
161
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
162
+ backspace.common, function (state, dispatch, editorView) {
145
163
  var selection = state.selection;
146
164
  var $from = selection.$from;
147
165
  if (!editorView || !selection.empty) {
@@ -6,6 +6,8 @@ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
8
  import { setExpandRef } from '../commands';
9
+ // Ignored via go/ees005
10
+ // eslint-disable-next-line import/no-named-as-default
9
11
  import ExpandNodeView from '../nodeviews';
10
12
  import { createPluginState, getPluginState, pluginKey } from './plugin-factory';
11
13
  export function containsClass(element, className) {
@@ -57,6 +59,8 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
57
59
  }, {
58
60
  useLongPressSelection: useLongPressSelection
59
61
  }),
62
+ // Ignored via go/ees005
63
+ // eslint-disable-next-line @typescript-eslint/max-params
60
64
  handleDrop: function handleDrop(view, event, slice, moved) {
61
65
  if (fg('platform_editor_nest_nested_expand_drag_fix')) {
62
66
  return handleExpandDrag(view, event, slice);
@@ -41,7 +41,10 @@ export var withTooltip = function withTooltip(WrapperComponent) {
41
41
  content: label,
42
42
  position: "top",
43
43
  tag: ExpandLayoutWrapperWithRef
44
- }, jsx(WrapperComponent, this.props));
44
+ }, jsx(WrapperComponent
45
+ // Ignored via go/ees005
46
+ // eslint-disable-next-line react/jsx-props-no-spreading
47
+ , this.props));
45
48
  }
46
49
  }]);
47
50
  }(React.Component);
@@ -49,7 +52,10 @@ export var withTooltip = function withTooltip(WrapperComponent) {
49
52
  export var CustomButton = function CustomButton(props) {
50
53
  var allowInteractiveExpand = props.allowInteractiveExpand,
51
54
  expanded = props.expanded;
52
- var useTheme = useCallback(function (currentTheme, themeProps) {
55
+ var useTheme = useCallback(
56
+ // Ignored via go/ees005
57
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
+ function (currentTheme, themeProps) {
53
59
  var _currentTheme = currentTheme(themeProps),
54
60
  buttonStyles = _currentTheme.buttonStyles,
55
61
  rest = _objectWithoutProperties(_currentTheme, _excluded);
@@ -91,6 +97,8 @@ export var ExpandIconButton = function ExpandIconButton(props) {
91
97
 
92
98
  // hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
93
99
  if (props.allowInteractiveExpand && hoverEventCheck) {
100
+ // Ignored via go/ees005
101
+ // eslint-disable-next-line react/jsx-props-no-spreading
94
102
  return jsx(ButtonWithTooltip, _extends({
95
103
  label: label
96
104
  }, props));
@@ -101,6 +109,8 @@ export var ExpandIconButton = function ExpandIconButton(props) {
101
109
  css: expandLayoutWrapperStyle
102
110
  }, jsx(ButtonWithoutTooltip, _extends({
103
111
  label: label
112
+ // Ignored via go/ees005
113
+ // eslint-disable-next-line react/jsx-props-no-spreading
104
114
  }, props)))
105
115
  );
106
116
  };
@@ -1,6 +1,8 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import { expandPlugin as legacyExpandPlugin } from './legacyExpand/plugin';
3
3
  import { expandPlugin as singlePlayerExpandPlugin } from './singlePlayerExpand/plugin';
4
+ // Ignored via go/ees005
5
+ // eslint-disable-next-line prefer-const
4
6
  export var expandPlugin = function expandPlugin(_ref) {
5
7
  var _ref$config = _ref.config,
6
8
  options = _ref$config === void 0 ? {} : _ref$config,
@@ -27,6 +27,8 @@ export var createExpandNode = function createExpandNode(state) {
27
27
  var expandType = isSelectionInTable || isSelectionInExpand ? nestedExpand : expand;
28
28
  var expandNode = expandType.createAndFill({});
29
29
  if (setExpandedState) {
30
+ // Ignored via go/ees005
31
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
30
32
  expandedState.set(expandNode, true);
31
33
  }
32
34
  return expandNode;
@@ -41,6 +43,8 @@ export var insertExpandWithInputMethod = function insertExpandWithInputMethod(ed
41
43
  var tr;
42
44
  if (state.selection.empty) {
43
45
  tr = safeInsert(expandNode)(state.tr).scrollIntoView();
46
+ // Ignored via go/ees005
47
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
44
48
  expandedState.set(expandNode, true);
45
49
  } else {
46
50
  tr = createWrapSelectionTransaction({
@@ -17,6 +17,8 @@ import { deleteExpand, setSelectionInsideExpand, toggleExpandExpanded, updateExp
17
17
  import { ExpandButton } from '../ui/ExpandButton';
18
18
  import { buildExpandClassName, toDOM } from '../ui/NodeView';
19
19
  export var ExpandNodeView = /*#__PURE__*/function () {
20
+ // Ignored via go/ees005
21
+ // eslint-disable-next-line @typescript-eslint/max-params
20
22
  function ExpandNodeView(_node, view, getPos, getIntl, isMobile, selectNearNode, api, nodeViewPortalProviderAPI) {
21
23
  var _this = this,
22
24
  _api$editorDisabled,
@@ -64,6 +66,9 @@ export var ExpandNodeView = /*#__PURE__*/function () {
64
66
  if (typeof pos !== 'number') {
65
67
  return;
66
68
  }
69
+
70
+ // Ignored via go/ees005
71
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
67
72
  var target = event.target;
68
73
  if (closestElement(target, ".".concat(expandClassNames.icon))) {
69
74
  var _this$api;
@@ -387,7 +392,11 @@ export var ExpandNodeView = /*#__PURE__*/function () {
387
392
  var _DOMSerializer$render = DOMSerializer.renderSpec(document, toDOM(_node, this.__livePage, this.intl, api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled)),
388
393
  dom = _DOMSerializer$render.dom,
389
394
  contentDOM = _DOMSerializer$render.contentDOM;
395
+ // Ignored via go/ees005
396
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
390
397
  this.dom = dom;
398
+ // Ignored via go/ees005
399
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
391
400
  this.contentDOM = contentDOM;
392
401
  this.isMobile = isMobile;
393
402
  this.api = api;
@@ -434,6 +443,8 @@ export var ExpandNodeView = /*#__PURE__*/function () {
434
443
  return _createClass(ExpandNodeView, [{
435
444
  key: "stopEvent",
436
445
  value: function stopEvent(event) {
446
+ // Ignored via go/ees005
447
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
437
448
  var target = event.target;
438
449
  return target === this.input || target === this.icon || !!closestElement(target, ".".concat(expandClassNames.icon));
439
450
  }
@@ -9,6 +9,9 @@ import { createExpandNode, insertExpand, insertExpandWithInputMethod } from './c
9
9
  import { expandKeymap } from './pm-plugins/keymap';
10
10
  import { createPlugin } from './pm-plugins/main';
11
11
  import { getToolbarConfig } from './toolbar';
12
+
13
+ // Ignored via go/ees005
14
+ // eslint-disable-next-line prefer-const
12
15
  export var expandPlugin = function expandPlugin(_ref) {
13
16
  var _api$featureFlags, _api$analytics, _api$analytics2;
14
17
  var _ref$config = _ref.config,
@@ -15,7 +15,10 @@ var isExpandSelected = function isExpandSelected(selection) {
15
15
  };
16
16
  export function expandKeymap(api, options) {
17
17
  var list = {};
18
- bindKeymapWithCommand(moveRight.common, function (state, dispatch, editorView) {
18
+ bindKeymapWithCommand(
19
+ // Ignored via go/ees005
20
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
21
+ moveRight.common, function (state, dispatch, editorView) {
19
22
  var _api$selection;
20
23
  if (!editorView) {
21
24
  return false;
@@ -28,7 +31,10 @@ export function expandKeymap(api, options) {
28
31
  }
29
32
  return false;
30
33
  }, list);
31
- bindKeymapWithCommand(moveLeft.common, function (state, dispatch, editorView) {
34
+ bindKeymapWithCommand(
35
+ // Ignored via go/ees005
36
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
37
+ moveLeft.common, function (state, dispatch, editorView) {
32
38
  var _api$selection2;
33
39
  if (!editorView) {
34
40
  return false;
@@ -41,7 +47,10 @@ export function expandKeymap(api, options) {
41
47
  }
42
48
  return false;
43
49
  }, list);
44
- bindKeymapWithCommand(tab.common, function (state, dispatch, editorView) {
50
+ bindKeymapWithCommand(
51
+ // Ignored via go/ees005
52
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
53
+ tab.common, function (state, dispatch, editorView) {
45
54
  if (editorView && editorView.dom instanceof HTMLElement) {
46
55
  var from = state.selection.from;
47
56
 
@@ -67,7 +76,10 @@ export function expandKeymap(api, options) {
67
76
  }
68
77
  return false;
69
78
  }, list);
70
- bindKeymapWithCommand(moveUp.common, function (state, dispatch, editorView) {
79
+ bindKeymapWithCommand(
80
+ // Ignored via go/ees005
81
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
82
+ moveUp.common, function (state, dispatch, editorView) {
71
83
  if (!editorView) {
72
84
  return false;
73
85
  }
@@ -110,7 +122,10 @@ export function expandKeymap(api, options) {
110
122
  }
111
123
  return false;
112
124
  }, list);
113
- bindKeymapWithCommand(moveDown.common, function (state, dispatch, editorView) {
125
+ bindKeymapWithCommand(
126
+ // Ignored via go/ees005
127
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
128
+ moveDown.common, function (state, dispatch, editorView) {
114
129
  if (!editorView) {
115
130
  return false;
116
131
  }
@@ -135,7 +150,10 @@ export function expandKeymap(api, options) {
135
150
  }
136
151
  return false;
137
152
  }, list);
138
- bindKeymapWithCommand(backspace.common, function (state, dispatch, editorView) {
153
+ bindKeymapWithCommand(
154
+ // Ignored via go/ees005
155
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
156
+ backspace.common, function (state, dispatch, editorView) {
139
157
  var selection = state.selection;
140
158
  var $from = selection.$from;
141
159
  if (!editorView || !selection.empty) {
@@ -5,6 +5,8 @@ import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand
5
5
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
6
6
  import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
+ // Ignored via go/ees005
9
+ // eslint-disable-next-line import/no-named-as-default
8
10
  import ExpandNodeView from '../node-views';
9
11
  export var pluginKey = new PluginKey('expandPlugin');
10
12
  export function containsClass(element, className) {
@@ -54,6 +56,8 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
54
56
  }, {
55
57
  useLongPressSelection: useLongPressSelection
56
58
  }),
59
+ // Ignored via go/ees005
60
+ // eslint-disable-next-line @typescript-eslint/max-params
57
61
  handleDrop: function handleDrop(view, event, slice, moved) {
58
62
  if (fg('platform_editor_nest_nested_expand_drag_fix')) {
59
63
  return handleExpandDrag(view, event, slice);