@atlaskit/editor-common 96.4.0 → 96.5.0

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 (145) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/analytics/analytics-queue.js +4 -5
  3. package/dist/cjs/annotation/index.js +9 -10
  4. package/dist/cjs/element-browser/ElementBrowser.js +11 -14
  5. package/dist/cjs/event-dispatcher/index.js +1 -2
  6. package/dist/cjs/extensibility/Extension/Lozenge/index.js +7 -10
  7. package/dist/cjs/extensibility/Extension.js +6 -9
  8. package/dist/cjs/extensibility/ExtensionComponent.js +25 -30
  9. package/dist/cjs/extensibility/extensionNodeView.js +5 -7
  10. package/dist/cjs/extensions/default-extension-provider.js +1 -2
  11. package/dist/cjs/hooks/useSharedPluginState.js +3 -0
  12. package/dist/cjs/hooks/useSharedPluginStateSelector/index.js +12 -0
  13. package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +114 -0
  14. package/dist/cjs/lazy-node-view/lazy-scheduler.js +1 -1
  15. package/dist/cjs/lazy-node-view/node-view.js +1 -2
  16. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
  17. package/dist/cjs/link/LinkSearch/LinkSearchList.js +5 -7
  18. package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +9 -12
  19. package/dist/cjs/link/LinkSearch/index.js +13 -16
  20. package/dist/cjs/link/LinkSearch/withActivityProvider.js +6 -9
  21. package/dist/cjs/media-inline/inline-image-wrapper.js +1 -2
  22. package/dist/cjs/monitoring/error.js +1 -1
  23. package/dist/cjs/portal/PortalManager.js +1 -2
  24. package/dist/cjs/preset/builder.js +2 -4
  25. package/dist/cjs/preset/editor-commands.js +4 -5
  26. package/dist/cjs/preset/plugin-injection-api.js +4 -8
  27. package/dist/cjs/provider-factory/provider-factory.js +1 -2
  28. package/dist/cjs/provider-factory/with-providers.js +8 -11
  29. package/dist/cjs/react-node-view/index.js +1 -2
  30. package/dist/cjs/safe-plugin/index.js +4 -5
  31. package/dist/cjs/selection/gap-cursor/selection.js +7 -11
  32. package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +10 -13
  33. package/dist/cjs/styles/shared/media-single.js +21 -20
  34. package/dist/cjs/styles/shared/paragraph.js +1 -1
  35. package/dist/cjs/styles/shared/shadow.js +9 -8
  36. package/dist/cjs/styles/shared/table.js +1 -1
  37. package/dist/cjs/types/annotation/emitter.js +1 -2
  38. package/dist/cjs/ui/Caption/index.js +5 -7
  39. package/dist/cjs/ui/ContextPanel/context.js +8 -11
  40. package/dist/cjs/ui/DropList/index.js +22 -25
  41. package/dist/cjs/ui/ErrorBoundary/index.js +6 -9
  42. package/dist/cjs/ui/Expand/sharedStyles.js +1 -1
  43. package/dist/cjs/ui/IntlErrorBoundary/index.js +6 -9
  44. package/dist/cjs/ui/Layer/index.js +9 -12
  45. package/dist/cjs/ui/Mention/index.js +6 -9
  46. package/dist/cjs/ui/Mention/mention-with-providers.js +6 -9
  47. package/dist/cjs/ui/Messages/index.js +1 -1
  48. package/dist/cjs/ui/OverflowShadow/index.js +13 -16
  49. package/dist/cjs/ui/OverflowShadow/shadowObserver.js +3 -5
  50. package/dist/cjs/ui/PanelTextInput/index.js +10 -13
  51. package/dist/cjs/ui/Popup/index.js +14 -17
  52. package/dist/cjs/ui/ResizerLegacy/index.js +12 -16
  53. package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +5 -7
  54. package/dist/cjs/ui/with-outer-listeners.js +10 -13
  55. package/dist/cjs/ui-menu/Dropdown/index.js +9 -12
  56. package/dist/cjs/ui-menu/DropdownMenu/index.js +11 -14
  57. package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +8 -11
  58. package/dist/cjs/utils/error-reporter.js +1 -2
  59. package/dist/cjs/utils/hyperlink.js +2 -4
  60. package/dist/cjs/utils/imageLoader.js +14 -19
  61. package/dist/cjs/utils/profiler/render-count.js +3 -2
  62. package/dist/cjs/utils/traversor.js +1 -2
  63. package/dist/cjs/with-plugin-state/index.js +28 -35
  64. package/dist/es2019/analytics/analytics-queue.js +3 -3
  65. package/dist/es2019/hooks/useSharedPluginState.js +3 -0
  66. package/dist/es2019/hooks/useSharedPluginStateSelector/index.js +2 -0
  67. package/dist/es2019/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +98 -0
  68. package/dist/es2019/lazy-node-view/lazy-scheduler.js +1 -1
  69. package/dist/es2019/monitoring/error.js +1 -1
  70. package/dist/es2019/styles/shared/paragraph.js +1 -1
  71. package/dist/es2019/styles/shared/table.js +1 -1
  72. package/dist/es2019/ui/DropList/index.js +1 -1
  73. package/dist/es2019/ui/Expand/sharedStyles.js +1 -1
  74. package/dist/es2019/ui/Messages/index.js +1 -1
  75. package/dist/es2019/utils/profiler/render-count.js +2 -0
  76. package/dist/esm/analytics/analytics-queue.js +4 -5
  77. package/dist/esm/annotation/index.js +9 -10
  78. package/dist/esm/element-browser/ElementBrowser.js +11 -14
  79. package/dist/esm/event-dispatcher/index.js +1 -2
  80. package/dist/esm/extensibility/Extension/Lozenge/index.js +7 -10
  81. package/dist/esm/extensibility/Extension.js +6 -9
  82. package/dist/esm/extensibility/ExtensionComponent.js +25 -30
  83. package/dist/esm/extensibility/extensionNodeView.js +5 -7
  84. package/dist/esm/extensions/default-extension-provider.js +1 -2
  85. package/dist/esm/hooks/useSharedPluginState.js +3 -0
  86. package/dist/esm/hooks/useSharedPluginStateSelector/index.js +2 -0
  87. package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +108 -0
  88. package/dist/esm/lazy-node-view/lazy-scheduler.js +1 -1
  89. package/dist/esm/lazy-node-view/node-view.js +1 -2
  90. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
  91. package/dist/esm/link/LinkSearch/LinkSearchList.js +5 -7
  92. package/dist/esm/link/LinkSearch/LinkSearchListItem.js +9 -12
  93. package/dist/esm/link/LinkSearch/index.js +13 -16
  94. package/dist/esm/link/LinkSearch/withActivityProvider.js +6 -9
  95. package/dist/esm/media-inline/inline-image-wrapper.js +1 -2
  96. package/dist/esm/monitoring/error.js +1 -1
  97. package/dist/esm/portal/PortalManager.js +1 -2
  98. package/dist/esm/preset/builder.js +2 -4
  99. package/dist/esm/preset/editor-commands.js +4 -5
  100. package/dist/esm/preset/plugin-injection-api.js +4 -8
  101. package/dist/esm/provider-factory/provider-factory.js +1 -2
  102. package/dist/esm/provider-factory/with-providers.js +8 -11
  103. package/dist/esm/react-node-view/index.js +1 -2
  104. package/dist/esm/safe-plugin/index.js +4 -5
  105. package/dist/esm/selection/gap-cursor/selection.js +7 -11
  106. package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +10 -13
  107. package/dist/esm/styles/shared/media-single.js +19 -20
  108. package/dist/esm/styles/shared/paragraph.js +1 -1
  109. package/dist/esm/styles/shared/shadow.js +7 -8
  110. package/dist/esm/styles/shared/table.js +1 -1
  111. package/dist/esm/types/annotation/emitter.js +1 -2
  112. package/dist/esm/ui/Caption/index.js +5 -7
  113. package/dist/esm/ui/ContextPanel/context.js +8 -11
  114. package/dist/esm/ui/DropList/index.js +22 -25
  115. package/dist/esm/ui/ErrorBoundary/index.js +6 -9
  116. package/dist/esm/ui/Expand/sharedStyles.js +1 -1
  117. package/dist/esm/ui/IntlErrorBoundary/index.js +6 -9
  118. package/dist/esm/ui/Layer/index.js +9 -12
  119. package/dist/esm/ui/Mention/index.js +6 -9
  120. package/dist/esm/ui/Mention/mention-with-providers.js +6 -9
  121. package/dist/esm/ui/Messages/index.js +1 -1
  122. package/dist/esm/ui/OverflowShadow/index.js +13 -16
  123. package/dist/esm/ui/OverflowShadow/shadowObserver.js +3 -5
  124. package/dist/esm/ui/PanelTextInput/index.js +10 -13
  125. package/dist/esm/ui/Popup/index.js +14 -17
  126. package/dist/esm/ui/ResizerLegacy/index.js +12 -16
  127. package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +5 -7
  128. package/dist/esm/ui/with-outer-listeners.js +10 -13
  129. package/dist/esm/ui-menu/Dropdown/index.js +9 -12
  130. package/dist/esm/ui-menu/DropdownMenu/index.js +11 -14
  131. package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +8 -11
  132. package/dist/esm/utils/error-reporter.js +1 -2
  133. package/dist/esm/utils/hyperlink.js +2 -4
  134. package/dist/esm/utils/imageLoader.js +14 -19
  135. package/dist/esm/utils/profiler/render-count.js +3 -2
  136. package/dist/esm/utils/traversor.js +1 -2
  137. package/dist/esm/with-plugin-state/index.js +28 -35
  138. package/dist/types/hooks/useSharedPluginState.d.ts +5 -3
  139. package/dist/types/hooks/useSharedPluginStateSelector/index.d.ts +1 -0
  140. package/dist/types/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.d.ts +74 -0
  141. package/dist/types-ts4.5/hooks/useSharedPluginState.d.ts +5 -3
  142. package/dist/types-ts4.5/hooks/useSharedPluginStateSelector/index.d.ts +1 -0
  143. package/dist/types-ts4.5/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.d.ts +74 -0
  144. package/package.json +4 -3
  145. package/use-shared-plugin-state-selector/package.json +15 -0
@@ -4,14 +4,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
4
4
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
5
5
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
6
  import _createClass from "@babel/runtime/helpers/createClass";
7
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
8
- import _inherits from "@babel/runtime/helpers/inherits";
9
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
10
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
+ import _inherits from "@babel/runtime/helpers/inherits";
11
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
12
11
  var _excluded = ["extensionProvider", "showLivePagesBodiedMacrosRendererView", "node"];
13
12
  import _regeneratorRuntime from "@babel/runtime/regenerator";
14
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
13
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15
14
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
16
15
  /* eslint-disable @repo/internal/react/no-class-components */
17
16
  import React, { Component, useEffect, useLayoutEffect, useRef, useState } from 'react';
@@ -49,32 +48,30 @@ var getBodiedExtensionContent = function getBodiedExtensionContent(node) {
49
48
  return !!bodiedExtensionContent.length ? bodiedExtensionContent : node.attrs.text;
50
49
  };
51
50
  export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
52
- _inherits(ExtensionComponentOld, _Component);
53
- var _super = _createSuper(ExtensionComponentOld);
54
51
  function ExtensionComponentOld() {
55
52
  var _this;
56
53
  _classCallCheck(this, ExtensionComponentOld);
57
54
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
58
55
  args[_key] = arguments[_key];
59
56
  }
60
- _this = _super.call.apply(_super, [this].concat(args));
61
- _defineProperty(_assertThisInitialized(_this), "privatePropsParsed", false);
62
- _defineProperty(_assertThisInitialized(_this), "state", {});
63
- _defineProperty(_assertThisInitialized(_this), "mounted", false);
57
+ _this = _callSuper(this, ExtensionComponentOld, [].concat(args));
58
+ _defineProperty(_this, "privatePropsParsed", false);
59
+ _defineProperty(_this, "state", {});
60
+ _defineProperty(_this, "mounted", false);
64
61
  // memoized to avoid rerender on extension state changes
65
- _defineProperty(_assertThisInitialized(_this), "getNodeRenderer", memoizeOne(getNodeRenderer));
66
- _defineProperty(_assertThisInitialized(_this), "getExtensionModuleNodePrivateProps", memoizeOne(getExtensionModuleNodePrivateProps));
67
- _defineProperty(_assertThisInitialized(_this), "setIsNodeHovered", function (isHovered) {
62
+ _defineProperty(_this, "getNodeRenderer", memoizeOne(getNodeRenderer));
63
+ _defineProperty(_this, "getExtensionModuleNodePrivateProps", memoizeOne(getExtensionModuleNodePrivateProps));
64
+ _defineProperty(_this, "setIsNodeHovered", function (isHovered) {
68
65
  _this.setState({
69
66
  isNodeHovered: isHovered
70
67
  });
71
68
  });
72
- _defineProperty(_assertThisInitialized(_this), "setShowBodiedExtensionRendererView", function (showRendererView) {
69
+ _defineProperty(_this, "setShowBodiedExtensionRendererView", function (showRendererView) {
73
70
  _this.setState({
74
71
  showBodiedExtensionRendererView: showRendererView
75
72
  });
76
73
  });
77
- _defineProperty(_assertThisInitialized(_this), "setStateFromPromise", function (stateKey, promise) {
74
+ _defineProperty(_this, "setStateFromPromise", function (stateKey, promise) {
78
75
  promise && promise.then(function (p) {
79
76
  if (!_this.mounted) {
80
77
  return;
@@ -89,7 +86,7 @@ export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
89
86
  * private props come from extension provider, rather than an extension
90
87
  * handler which only handles `render`/component concerns.
91
88
  */
92
- _defineProperty(_assertThisInitialized(_this), "parsePrivateNodePropsIfNeeded", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
89
+ _defineProperty(_this, "parsePrivateNodePropsIfNeeded", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
93
90
  var _this$props$node$attr, extensionType, extensionKey, privateProps;
94
91
  return _regeneratorRuntime.wrap(function _callee$(_context) {
95
92
  while (1) switch (_context.prev = _context.next) {
@@ -129,7 +126,7 @@ export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
129
126
  }
130
127
  }, _callee, null, [[4, 11]]);
131
128
  })));
132
- _defineProperty(_assertThisInitialized(_this), "handleExtension", function (pmNode, actions) {
129
+ _defineProperty(_this, "handleExtension", function (pmNode, actions) {
133
130
  var _pmNode$marks;
134
131
  var _this$props = _this.props,
135
132
  extensionHandlers = _this$props.extensionHandlers,
@@ -192,7 +189,8 @@ export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
192
189
  });
193
190
  return _this;
194
191
  }
195
- _createClass(ExtensionComponentOld, [{
192
+ _inherits(ExtensionComponentOld, _Component);
193
+ return _createClass(ExtensionComponentOld, [{
196
194
  key: "UNSAFE_componentWillMount",
197
195
  value: function UNSAFE_componentWillMount() {
198
196
  this.mounted = true;
@@ -323,7 +321,6 @@ export var ExtensionComponentOld = /*#__PURE__*/function (_Component) {
323
321
  return null;
324
322
  }
325
323
  }]);
326
- return ExtensionComponentOld;
327
324
  }(Component);
328
325
  export var ExtensionComponentNew = function ExtensionComponentNew(props) {
329
326
  var extensionProviderResolver = props.extensionProvider,
@@ -361,21 +358,19 @@ export var ExtensionComponentNew = function ExtensionComponentNew(props) {
361
358
  }));
362
359
  };
363
360
  var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
364
- _inherits(ExtensionComponentInner, _Component2);
365
- var _super2 = _createSuper(ExtensionComponentInner);
366
361
  function ExtensionComponentInner() {
367
362
  var _this2;
368
363
  _classCallCheck(this, ExtensionComponentInner);
369
364
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
370
365
  args[_key2] = arguments[_key2];
371
366
  }
372
- _this2 = _super2.call.apply(_super2, [this].concat(args));
373
- _defineProperty(_assertThisInitialized(_this2), "privatePropsParsed", false);
374
- _defineProperty(_assertThisInitialized(_this2), "state", {});
367
+ _this2 = _callSuper(this, ExtensionComponentInner, [].concat(args));
368
+ _defineProperty(_this2, "privatePropsParsed", false);
369
+ _defineProperty(_this2, "state", {});
375
370
  // memoized to avoid rerender on extension state changes
376
- _defineProperty(_assertThisInitialized(_this2), "getNodeRenderer", memoizeOne(getNodeRenderer));
377
- _defineProperty(_assertThisInitialized(_this2), "getExtensionModuleNodePrivateProps", memoizeOne(getExtensionModuleNodePrivateProps));
378
- _defineProperty(_assertThisInitialized(_this2), "setIsNodeHovered", function (isHovered) {
371
+ _defineProperty(_this2, "getNodeRenderer", memoizeOne(getNodeRenderer));
372
+ _defineProperty(_this2, "getExtensionModuleNodePrivateProps", memoizeOne(getExtensionModuleNodePrivateProps));
373
+ _defineProperty(_this2, "setIsNodeHovered", function (isHovered) {
379
374
  _this2.setState({
380
375
  isNodeHovered: isHovered
381
376
  });
@@ -387,7 +382,7 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
387
382
  * private props come from extension provider, rather than an extension
388
383
  * handler which only handles `render`/component concerns.
389
384
  */
390
- _defineProperty(_assertThisInitialized(_this2), "parsePrivateNodePropsIfNeeded", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
385
+ _defineProperty(_this2, "parsePrivateNodePropsIfNeeded", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
391
386
  var _this2$props$node$att, extensionType, extensionKey, privateProps;
392
387
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
393
388
  while (1) switch (_context2.prev = _context2.next) {
@@ -427,7 +422,7 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
427
422
  }
428
423
  }, _callee2, null, [[4, 11]]);
429
424
  })));
430
- _defineProperty(_assertThisInitialized(_this2), "handleExtension", function (pmNode, actions) {
425
+ _defineProperty(_this2, "handleExtension", function (pmNode, actions) {
431
426
  var _pmNode$marks2;
432
427
  var _this2$props = _this2.props,
433
428
  extensionHandlers = _this2$props.extensionHandlers,
@@ -490,7 +485,8 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
490
485
  });
491
486
  return _this2;
492
487
  }
493
- _createClass(ExtensionComponentInner, [{
488
+ _inherits(ExtensionComponentInner, _Component2);
489
+ return _createClass(ExtensionComponentInner, [{
494
490
  key: "componentDidUpdate",
495
491
  value: function componentDidUpdate() {
496
492
  this.parsePrivateNodePropsIfNeeded();
@@ -589,7 +585,6 @@ var ExtensionComponentInner = /*#__PURE__*/function (_Component2) {
589
585
  return null;
590
586
  }
591
587
  }]);
592
- return ExtensionComponentInner;
593
588
  }(Component);
594
589
  export var ExtensionComponent = function ExtensionComponent(props) {
595
590
  if (fg('platform_editor_react18_extension_component_v2')) {
@@ -1,9 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
9
  import ReactNodeView from '../react-node-view';
@@ -15,13 +15,12 @@ import { ExtensionNodeWrapper } from './ExtensionNodeWrapper';
15
15
  // The ReactNodeView api will be visited in the second phase of the selections
16
16
  // project whilst investigating block nodes. We will revisit the Extension node view there too.
17
17
  export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
18
- _inherits(ExtensionNode, _ReactNodeView);
19
- var _super = _createSuper(ExtensionNode);
20
18
  function ExtensionNode() {
21
19
  _classCallCheck(this, ExtensionNode);
22
- return _super.apply(this, arguments);
20
+ return _callSuper(this, ExtensionNode, arguments);
23
21
  }
24
- _createClass(ExtensionNode, [{
22
+ _inherits(ExtensionNode, _ReactNodeView);
23
+ return _createClass(ExtensionNode, [{
25
24
  key: "ignoreMutation",
26
25
  value: function ignoreMutation(mutation) {
27
26
  // Extensions can perform async operations that will change the DOM.
@@ -72,7 +71,6 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
72
71
  }));
73
72
  }
74
73
  }]);
75
- return ExtensionNode;
76
74
  }(ReactNodeView);
77
75
  export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, rendererExtensionHandlers) {
78
76
  return function (node, view, getPos) {
@@ -16,7 +16,7 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
16
16
  this.manifestsPromise = Promise.resolve(manifests);
17
17
  this.autoConvertHandlers = autoConvertHandlers;
18
18
  }
19
- _createClass(DefaultExtensionProvider, [{
19
+ return _createClass(DefaultExtensionProvider, [{
20
20
  key: "getExtensions",
21
21
  value: function getExtensions() {
22
22
  return this.manifestsPromise;
@@ -112,6 +112,5 @@ var DefaultExtensionProvider = /*#__PURE__*/function () {
112
112
  return getAutoConverter;
113
113
  }()
114
114
  }]);
115
- return DefaultExtensionProvider;
116
115
  }();
117
116
  export { DefaultExtensionProvider as default };
@@ -33,6 +33,9 @@ function useStaticPlugins(plugins) {
33
33
  }
34
34
 
35
35
  /**
36
+ *
37
+ * NOTE: Generally you may want to use `usePluginStateSelector` over this which behaves similarly
38
+ * but selects a slice of the state which is more performant.
36
39
  *
37
40
  * ⚠️⚠️⚠️ This is a debounced hook ⚠️⚠️⚠️
38
41
  * If the plugins you are listening to generate multiple shared states while the user is typing,
@@ -0,0 +1,2 @@
1
+ // eslint-disable-next-line @atlaskit/editor/no-re-export
2
+ export { useSharedPluginStateSelector } from './useSharedPluginStateSelector';
@@ -0,0 +1,108 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _toArray from "@babel/runtime/helpers/toArray";
3
+ import { useState, useCallback, useMemo } from 'react';
4
+ import get from 'lodash/get';
5
+ import isEqual from 'lodash/isEqual';
6
+ import { usePluginStateEffect } from '../usePluginStateEffect';
7
+
8
+ /**
9
+ * This is designed to iterate through an object to get the path of its result
10
+ * based on separation via "."
11
+ *
12
+ * Example:
13
+ * ```typescript
14
+ * type Test = { deepObject: { value: number } };
15
+ * // Type should be `"deepObject" | "deepObject.value"`
16
+ * type Result = NestedKeys<Test>;
17
+ * ```
18
+ */
19
+
20
+ /**
21
+ * This is designed to iterate through a path of an object to get the type of its result
22
+ * based on separation via "."
23
+ *
24
+ * Example:
25
+ * ```typescript
26
+ * type Test = { deepObject: { value: number } }
27
+ * // Type should be `number`
28
+ * type Result = Path<Test, 'deepObject.value'>
29
+ * ```
30
+ */
31
+
32
+ /**
33
+ *
34
+ * ⚠️⚠️⚠️ This is a debounced hook ⚠️⚠️⚠️
35
+ * If the plugins you are listening to generate multiple shared states while the user is typing,
36
+ * your React Component will get only the last one.
37
+ *
38
+ * Used to return the current plugin state of input dependencies.
39
+ * It will recursively retrieve a slice of the state using a "." to separate
40
+ * parts of the state.
41
+ *
42
+ * Example:
43
+ *
44
+ * ```typescript
45
+ * const pluginA: NextEditorPlugin<
46
+ 'pluginA',
47
+ {
48
+ sharedState: { deepObj: { value: number | undefined } };
49
+ }
50
+ >
51
+ * ```
52
+ * You can use `const value = useSharedPluginStateSelector(api, 'pluginA.deepObj.value')` to retrieve the value
53
+ *
54
+ * Example in plugin:
55
+ *
56
+ * ```typescript
57
+ * function ExampleContent({ api }: Props) {
58
+ * const title = useSharedPluginStateSelector(api, 'dog.title')
59
+ * return <p>{ title } { exampleState.description }</p>
60
+ * }
61
+ *
62
+ * const examplePlugin: NextEditorPlugin<'example', { dependencies: [typeof pluginDog] }> = ({ api }) => {
63
+ * return {
64
+ * name: 'example',
65
+ * contentComponent: () => <ExampleContent api={api} />
66
+ * }
67
+ * }
68
+ * ```
69
+ *
70
+ * NOTE: If you pass an invalid path, `undefined` will be returned
71
+ *
72
+ * @param api
73
+ * @param plugin
74
+ * @returns
75
+ */
76
+ export function useSharedPluginStateSelector(api, plugin) {
77
+ var transformer = useCallback(function (pluginState) {
78
+ var _plugin$split = plugin.split('.'),
79
+ _plugin$split2 = _toArray(_plugin$split),
80
+ pluginName = _plugin$split2[0],
81
+ properties = _plugin$split2.slice(1);
82
+ if (!pluginState || (properties === null || properties === void 0 ? void 0 : properties.length) === 0) {
83
+ return undefined;
84
+ }
85
+ return get(pluginState === null || pluginState === void 0 ? void 0 : pluginState["".concat(pluginName, "State")], properties);
86
+ }, [plugin]);
87
+ var pluginNameArray = useMemo(function () {
88
+ var _plugin$split3 = plugin.split('.'),
89
+ _plugin$split4 = _slicedToArray(_plugin$split3, 1),
90
+ pluginName = _plugin$split4[0];
91
+ return [pluginName];
92
+ }, [plugin]);
93
+ return useSharedPluginStateSelectorInternal(api, pluginNameArray, transformer);
94
+ }
95
+ function useSharedPluginStateSelectorInternal(api, plugins, transformer) {
96
+ var _useState = useState(),
97
+ _useState2 = _slicedToArray(_useState, 2),
98
+ selectedPluginState = _useState2[0],
99
+ setSelectedPluginState = _useState2[1];
100
+ usePluginStateEffect(api, plugins, function (pluginStates) {
101
+ // `pluginStates`: This is the same type through inference - but typescript doesn't recognise them as they are computed slightly differently
102
+ var transformedValue = transformer(pluginStates);
103
+ if (!isEqual(transformedValue, selectedPluginState)) {
104
+ setSelectedPluginState(transformedValue);
105
+ }
106
+ });
107
+ return selectedPluginState;
108
+ }
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- var hasIdleCallback = 'requestIdleCallback' in window;
4
+ var hasIdleCallback = ('requestIdleCallback' in window);
5
5
  export var scheduleCallback = function scheduleCallback(cb, options) {
6
6
  return hasIdleCallback ? requestIdleCallback(cb, _objectSpread({
7
7
  timeout: 5000
@@ -88,7 +88,7 @@ export var LazyNodeView = /*#__PURE__*/function () {
88
88
  }
89
89
  }
90
90
  }
91
- _createClass(LazyNodeView, [{
91
+ return _createClass(LazyNodeView, [{
92
92
  key: "ignoreMutation",
93
93
  value: function ignoreMutation() {
94
94
  if (this.node.type.isTextblock) {
@@ -97,5 +97,4 @@ export var LazyNodeView = /*#__PURE__*/function () {
97
97
  return true;
98
98
  }
99
99
  }]);
100
- return LazyNodeView;
101
100
  }();
@@ -3,13 +3,12 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
5
  import _createClass from "@babel/runtime/helpers/createClass";
6
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
7
- import _inherits from "@babel/runtime/helpers/inherits";
8
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
9
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
+ import _inherits from "@babel/runtime/helpers/inherits";
10
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
10
  import _regeneratorRuntime from "@babel/runtime/regenerator";
12
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
11
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
13
  /**
15
14
  * @jsxRuntime classic
@@ -153,20 +152,18 @@ var mapSearchProviderResultToLinkSearchItemData = function mapSearchProviderResu
153
152
  };
154
153
  };
155
154
  export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
156
- _inherits(HyperlinkLinkAddToolbar, _PureComponent);
157
- var _super = _createSuper(HyperlinkLinkAddToolbar);
158
155
  function HyperlinkLinkAddToolbar(props) {
159
156
  var _this;
160
157
  _classCallCheck(this, HyperlinkLinkAddToolbar);
161
- _this = _super.call(this, props);
158
+ _this = _callSuper(this, HyperlinkLinkAddToolbar, [props]);
162
159
  /* To prevent double submit */
163
- _defineProperty(_assertThisInitialized(_this), "submitted", false);
164
- _defineProperty(_assertThisInitialized(_this), "urlInputContainer", null);
165
- _defineProperty(_assertThisInitialized(_this), "displayTextInputContainer", null);
166
- _defineProperty(_assertThisInitialized(_this), "wrapperRef", /*#__PURE__*/React.createRef());
167
- _defineProperty(_assertThisInitialized(_this), "quickSearchQueryVersion", 0);
168
- _defineProperty(_assertThisInitialized(_this), "analyticSource", 'createLinkInlineDialog');
169
- _defineProperty(_assertThisInitialized(_this), "quickSearch", /*#__PURE__*/function () {
160
+ _defineProperty(_this, "submitted", false);
161
+ _defineProperty(_this, "urlInputContainer", null);
162
+ _defineProperty(_this, "displayTextInputContainer", null);
163
+ _defineProperty(_this, "wrapperRef", /*#__PURE__*/React.createRef());
164
+ _defineProperty(_this, "quickSearchQueryVersion", 0);
165
+ _defineProperty(_this, "analyticSource", 'createLinkInlineDialog');
166
+ _defineProperty(_this, "quickSearch", /*#__PURE__*/function () {
170
167
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(input, items, quickSearchLimit) {
171
168
  var _this$state, searchProvider, displayUrl, searchSessionId, queryVersion, perfStart, searchProviderResultItems, searchItems, perfStop, duration, _perfStop, _duration;
172
169
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -271,7 +268,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
271
268
  return _ref3.apply(this, arguments);
272
269
  };
273
270
  }());
274
- _defineProperty(_assertThisInitialized(_this), "updateInput", /*#__PURE__*/function () {
271
+ _defineProperty(_this, "updateInput", /*#__PURE__*/function () {
275
272
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(input) {
276
273
  var _this$state2, activityProvider, searchProvider, items, shouldQuerySearchProvider;
277
274
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
@@ -337,58 +334,55 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
337
334
  return _ref4.apply(this, arguments);
338
335
  };
339
336
  }());
340
- _defineProperty(_assertThisInitialized(_this), "createClearHandler", function (field) {
337
+ _defineProperty(_this, "createClearHandler", function (field) {
341
338
  return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
342
- var activityProvider, _this$setState;
339
+ var activityProvider;
343
340
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
344
341
  while (1) switch (_context3.prev = _context3.next) {
345
342
  case 0:
346
343
  activityProvider = _this.state.activityProvider;
347
344
  _context3.t0 = field;
348
- _context3.next = _context3.t0 === 'displayUrl' ? 4 : _context3.t0 === 'displayText' ? 24 : 26;
345
+ _context3.next = _context3.t0 === 'displayUrl' ? 4 : _context3.t0 === 'displayText' ? 21 : 23;
349
346
  break;
350
347
  case 4:
351
348
  _context3.t1 = _this;
352
- _this$setState = {};
353
- _defineProperty(_this$setState, field, '');
354
349
  _context3.t2 = _defineProperty;
355
- _context3.t3 = _this$setState;
350
+ _context3.t3 = _defineProperty({}, field, '');
356
351
  if (!activityProvider) {
357
- _context3.next = 17;
352
+ _context3.next = 15;
358
353
  break;
359
354
  }
360
355
  _context3.t5 = limit;
361
- _context3.next = 13;
356
+ _context3.next = 11;
362
357
  return activityProvider.getRecentItems();
363
- case 13:
358
+ case 11:
364
359
  _context3.t6 = _context3.sent;
365
360
  _context3.t4 = (0, _context3.t5)(_context3.t6);
366
- _context3.next = 18;
361
+ _context3.next = 16;
367
362
  break;
368
- case 17:
363
+ case 15:
369
364
  _context3.t4 = [];
370
- case 18:
365
+ case 16:
371
366
  _context3.t7 = _context3.t4;
372
- (0, _context3.t2)(_context3.t3, "items", _context3.t7);
373
- _context3.t8 = _this$setState;
367
+ _context3.t8 = (0, _context3.t2)(_context3.t3, "items", _context3.t7);
374
368
  _context3.t1.setState.call(_context3.t1, _context3.t8);
375
369
  if (_this.urlInputContainer) {
376
370
  _this.urlInputContainer.focus();
377
371
  }
378
- return _context3.abrupt("break", 26);
379
- case 24:
372
+ return _context3.abrupt("break", 23);
373
+ case 21:
380
374
  _this.setState(_defineProperty({}, field, ''));
381
375
  if (_this.displayTextInputContainer) {
382
376
  _this.displayTextInputContainer.focus();
383
377
  }
384
- case 26:
378
+ case 23:
385
379
  case "end":
386
380
  return _context3.stop();
387
381
  }
388
382
  }, _callee3);
389
383
  }));
390
384
  });
391
- _defineProperty(_assertThisInitialized(_this), "handleClickOutside", function (event) {
385
+ _defineProperty(_this, "handleClickOutside", function (event) {
392
386
  if (event.target instanceof Element && _this.wrapperRef.current && !_this.wrapperRef.current.contains(event.target)) {
393
387
  var _this$props = _this.props,
394
388
  _this$props$view = _this$props.view,
@@ -398,7 +392,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
398
392
  onClickAwayCallback === null || onClickAwayCallback === void 0 || onClickAwayCallback(state, dispatch);
399
393
  }
400
394
  });
401
- _defineProperty(_assertThisInitialized(_this), "getScreenReaderText", function () {
395
+ _defineProperty(_this, "getScreenReaderText", function () {
402
396
  var intl = _this.props.intl;
403
397
  var _this$state3 = _this.state,
404
398
  items = _this$state3.items,
@@ -413,7 +407,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
413
407
  return "".concat(name, ", ").concat(_container, ", ").concat(date === null || date === void 0 ? void 0 : date.pageAction, " ").concat(date === null || date === void 0 ? void 0 : date.dateString, " ").concat((date === null || date === void 0 ? void 0 : date.timeSince) || '');
414
408
  }
415
409
  });
416
- _defineProperty(_assertThisInitialized(_this), "isUrlPopulatedWithSelectedItem", function () {
410
+ _defineProperty(_this, "isUrlPopulatedWithSelectedItem", function () {
417
411
  /**
418
412
  * When we use ArrowKey to navigate through result items,
419
413
  * the URL field will be populated with the content of
@@ -433,10 +427,10 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
433
427
  }
434
428
  return false;
435
429
  });
436
- _defineProperty(_assertThisInitialized(_this), "handleSelected", function (href, text) {
430
+ _defineProperty(_this, "handleSelected", function (href, text) {
437
431
  _this.handleInsert(href, text, INPUT_METHOD.TYPEAHEAD, 'click');
438
432
  });
439
- _defineProperty(_assertThisInitialized(_this), "handleInsert", function (href, title, inputType, interaction) {
433
+ _defineProperty(_this, "handleInsert", function (href, title, inputType, interaction) {
440
434
  var _this$props2 = _this.props,
441
435
  searchSessionId = _this$props2.searchSessionId,
442
436
  onSubmit = _this$props2.onSubmit;
@@ -472,7 +466,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
472
466
  });
473
467
  }
474
468
  });
475
- _defineProperty(_assertThisInitialized(_this), "handleMouseEnterResultItem", function (objectId) {
469
+ _defineProperty(_this, "handleMouseEnterResultItem", function (objectId) {
476
470
  var items = _this.state.items;
477
471
  var index = findIndex(items, function (item) {
478
472
  return item.objectId === objectId;
@@ -481,7 +475,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
481
475
  selectedIndex: index
482
476
  });
483
477
  });
484
- _defineProperty(_assertThisInitialized(_this), "handleMouseLeaveResultItem", function (objectId) {
478
+ _defineProperty(_this, "handleMouseLeaveResultItem", function (objectId) {
485
479
  var _this$state6 = _this.state,
486
480
  items = _this$state6.items,
487
481
  selectedIndex = _this$state6.selectedIndex;
@@ -495,7 +489,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
495
489
  });
496
490
  }
497
491
  });
498
- _defineProperty(_assertThisInitialized(_this), "handleSubmit", function () {
492
+ _defineProperty(_this, "handleSubmit", function () {
499
493
  var _this$state7 = _this.state,
500
494
  displayUrl = _this$state7.displayUrl,
501
495
  selectedIndex = _this$state7.selectedIndex,
@@ -510,7 +504,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
510
504
  }
511
505
  }
512
506
  });
513
- _defineProperty(_assertThisInitialized(_this), "handleClearTextKeyDown", function (event) {
507
+ _defineProperty(_this, "handleClearTextKeyDown", function (event) {
514
508
  var KEY_CODE_TAB = 9;
515
509
  var keyCode = event.keyCode;
516
510
  if (keyCode === KEY_CODE_TAB) {
@@ -525,7 +519,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
525
519
  return;
526
520
  }
527
521
  });
528
- _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
522
+ _defineProperty(_this, "handleKeyDown", function (event) {
529
523
  var _this$state9 = _this.state,
530
524
  items = _this$state9.items,
531
525
  selectedIndex = _this$state9.selectedIndex;
@@ -576,12 +570,12 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
576
570
  });
577
571
  }
578
572
  });
579
- _defineProperty(_assertThisInitialized(_this), "updateTextInput", function (displayText) {
573
+ _defineProperty(_this, "updateTextInput", function (displayText) {
580
574
  _this.setState({
581
575
  displayText: displayText
582
576
  });
583
577
  });
584
- _defineProperty(_assertThisInitialized(_this), "handleCancel", function (e) {
578
+ _defineProperty(_this, "handleCancel", function (e) {
585
579
  var _this$props4 = _this.props,
586
580
  _this$props4$view = _this$props4.view,
587
581
  state = _this$props4$view.state,
@@ -605,7 +599,8 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
605
599
  _this.fireCustomAnalytics = fireAnalyticsEvent(props.createAnalyticsEvent);
606
600
  return _this;
607
601
  }
608
- _createClass(HyperlinkLinkAddToolbar, [{
602
+ _inherits(HyperlinkLinkAddToolbar, _PureComponent);
603
+ return _createClass(HyperlinkLinkAddToolbar, [{
609
604
  key: "componentDidMount",
610
605
  value: function () {
611
606
  var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
@@ -936,7 +931,6 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
936
931
  })));
937
932
  }
938
933
  }]);
939
- return HyperlinkLinkAddToolbar;
940
934
  }(PureComponent);
941
935
  function findIndex(array, predicate) {
942
936
  var index = -1;
@@ -1,9 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -32,13 +32,12 @@ export var linkSearchList = css({
32
32
  listStyle: 'none'
33
33
  });
34
34
  var LinkSearchList = /*#__PURE__*/function (_PureComponent) {
35
- _inherits(LinkSearchList, _PureComponent);
36
- var _super = _createSuper(LinkSearchList);
37
35
  function LinkSearchList() {
38
36
  _classCallCheck(this, LinkSearchList);
39
- return _super.apply(this, arguments);
37
+ return _callSuper(this, LinkSearchList, arguments);
40
38
  }
41
- _createClass(LinkSearchList, [{
39
+ _inherits(LinkSearchList, _PureComponent);
40
+ return _createClass(LinkSearchList, [{
42
41
  key: "render",
43
42
  value: function render() {
44
43
  var _this$props = this.props,
@@ -87,6 +86,5 @@ var LinkSearchList = /*#__PURE__*/function (_PureComponent) {
87
86
  }, itemsContent, loadingContent);
88
87
  }
89
88
  }]);
90
- return LinkSearchList;
91
89
  }(PureComponent);
92
90
  export { LinkSearchList as default };