@atlaskit/editor-plugin-card 2.15.3 → 3.0.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 (67) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/analytics/utils.js +6 -6
  3. package/dist/cjs/datasourceErrorBoundary.js +1 -1
  4. package/dist/cjs/nodeviews/blockCard.js +15 -22
  5. package/dist/cjs/nodeviews/datasource.js +1 -1
  6. package/dist/cjs/nodeviews/embedCard.js +14 -21
  7. package/dist/cjs/nodeviews/genericCard.js +2 -2
  8. package/dist/cjs/nodeviews/inlineCard.js +1 -1
  9. package/dist/cjs/nodeviews/inlineCardWithAwareness.js +1 -1
  10. package/dist/cjs/nodeviews/lazy-block-card.js +1 -1
  11. package/dist/cjs/nodeviews/lazy-embed-card.js +1 -1
  12. package/dist/cjs/plugin.js +3 -2
  13. package/dist/cjs/pm-plugins/main.js +1 -4
  14. package/dist/cjs/pm-plugins/reducers.js +1 -1
  15. package/dist/cjs/toolbar.js +12 -19
  16. package/dist/cjs/ui/CardContextProvider.js +1 -1
  17. package/dist/cjs/ui/DatasourceModal/index.js +8 -8
  18. package/dist/cjs/ui/EditLinkToolbar.js +1 -1
  19. package/dist/cjs/ui/EditorLinkingPlatformAnalytics/index.js +1 -1
  20. package/dist/cjs/ui/HyperlinkToolbarAppearance.js +1 -3
  21. package/dist/cjs/ui/InlineCardOverlay/index.js +1 -1
  22. package/dist/cjs/ui/LinkToolbarAppearance.js +3 -4
  23. package/dist/cjs/ui/Pulse/index.js +1 -1
  24. package/dist/cjs/ui/ResizableEmbedCard.js +1 -1
  25. package/dist/cjs/ui/ToolbarViewedEvent.js +1 -1
  26. package/dist/es2019/nodeviews/blockCard.js +13 -20
  27. package/dist/es2019/nodeviews/embedCard.js +12 -19
  28. package/dist/es2019/plugin.js +2 -2
  29. package/dist/es2019/pm-plugins/main.js +1 -4
  30. package/dist/es2019/toolbar.js +11 -18
  31. package/dist/es2019/ui/HyperlinkToolbarAppearance.js +0 -2
  32. package/dist/es2019/ui/LinkToolbarAppearance.js +1 -2
  33. package/dist/esm/analytics/utils.js +6 -6
  34. package/dist/esm/datasourceErrorBoundary.js +1 -1
  35. package/dist/esm/nodeviews/blockCard.js +15 -22
  36. package/dist/esm/nodeviews/datasource.js +1 -1
  37. package/dist/esm/nodeviews/embedCard.js +14 -21
  38. package/dist/esm/nodeviews/genericCard.js +1 -1
  39. package/dist/esm/plugin.js +3 -2
  40. package/dist/esm/pm-plugins/main.js +1 -4
  41. package/dist/esm/pm-plugins/reducers.js +1 -1
  42. package/dist/esm/toolbar.js +11 -18
  43. package/dist/esm/ui/CardContextProvider.js +1 -1
  44. package/dist/esm/ui/DatasourceModal/index.js +7 -7
  45. package/dist/esm/ui/EditLinkToolbar.js +1 -1
  46. package/dist/esm/ui/EditorLinkingPlatformAnalytics/index.js +1 -1
  47. package/dist/esm/ui/HyperlinkToolbarAppearance.js +0 -2
  48. package/dist/esm/ui/LinkToolbarAppearance.js +2 -3
  49. package/dist/esm/ui/ResizableEmbedCard.js +1 -1
  50. package/dist/types/nodeviews/blockCard.d.ts +2 -3
  51. package/dist/types/nodeviews/embedCard.d.ts +2 -3
  52. package/dist/types/nodeviews/genericCard.d.ts +1 -3
  53. package/dist/types/plugin.d.ts +1 -1
  54. package/dist/types/toolbar.d.ts +1 -2
  55. package/dist/types/types.d.ts +0 -1
  56. package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +0 -2
  57. package/dist/types/ui/LinkToolbarAppearance.d.ts +0 -2
  58. package/dist/types-ts4.5/nodeviews/blockCard.d.ts +2 -3
  59. package/dist/types-ts4.5/nodeviews/embedCard.d.ts +2 -3
  60. package/dist/types-ts4.5/nodeviews/genericCard.d.ts +1 -3
  61. package/dist/types-ts4.5/plugin.d.ts +1 -1
  62. package/dist/types-ts4.5/toolbar.d.ts +1 -2
  63. package/dist/types-ts4.5/types.d.ts +0 -1
  64. package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +0 -2
  65. package/dist/types-ts4.5/ui/LinkToolbarAppearance.d.ts +0 -2
  66. package/package.json +2 -2
  67. package/report.api.md +1 -1
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ 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); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import React from 'react';
12
12
  import PropTypes from 'prop-types';
@@ -90,7 +90,6 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
90
90
  var _this$props2 = this.props,
91
91
  node = _this$props2.node,
92
92
  cardContext = _this$props2.cardContext,
93
- platform = _this$props2.platform,
94
93
  actionOptions = _this$props2.actionOptions,
95
94
  showServerActions = _this$props2.showServerActions,
96
95
  onClick = _this$props2.onClick;
@@ -106,7 +105,7 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
106
105
  onClick: onClick,
107
106
  onResolve: this.onResolve,
108
107
  onError: this.onError,
109
- platform: platform,
108
+ platform: 'web',
110
109
  actionOptions: actionOptions,
111
110
  showServerActions: showServerActions
112
111
  }), this.gapCursorSpan());
@@ -143,21 +142,19 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
143
142
  value: function createDomRef() {
144
143
  var _this3 = this;
145
144
  var domRef = document.createElement('div');
146
- if (this.reactComponentProps.platform !== 'mobile') {
147
- // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
148
- // see also: https://github.com/ProseMirror/prosemirror/issues/884
149
- if (fg('linking-platform-contenteditable-false-live-view')) {
150
- var _this$reactComponentP, _this$reactComponentP2;
151
- this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref2) {
152
- var nextSharedState = _ref2.nextSharedState;
153
- return _this3.updateContentEditable(nextSharedState, domRef);
154
- });
155
- this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
156
- } else {
157
- domRef.contentEditable = 'true';
158
- }
159
- domRef.setAttribute('spellcheck', 'false');
145
+ // workaround Chrome bug in https://product-fabric.atlassian.net/browse/ED-5379
146
+ // see also: https://github.com/ProseMirror/prosemirror/issues/884
147
+ if (fg('linking-platform-contenteditable-false-live-view')) {
148
+ var _this$reactComponentP, _this$reactComponentP2;
149
+ this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref2) {
150
+ var nextSharedState = _ref2.nextSharedState;
151
+ return _this3.updateContentEditable(nextSharedState, domRef);
152
+ });
153
+ this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
154
+ } else {
155
+ domRef.contentEditable = 'true';
160
156
  }
157
+ domRef.setAttribute('spellcheck', 'false');
161
158
  return domRef;
162
159
  }
163
160
  }, {
@@ -182,7 +179,6 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
182
179
  key: "render",
183
180
  value: function render() {
184
181
  var _this$reactComponentP3 = this.reactComponentProps,
185
- platform = _this$reactComponentP3.platform,
186
182
  actionOptions = _this$reactComponentP3.actionOptions,
187
183
  showServerActions = _this$reactComponentP3.showServerActions,
188
184
  pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
@@ -191,7 +187,6 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
191
187
  node: this.node,
192
188
  view: this.view,
193
189
  getPos: this.getPos,
194
- platform: platform,
195
190
  actionOptions: actionOptions,
196
191
  showServerActions: showServerActions,
197
192
  pluginInjectionApi: pluginInjectionApi,
@@ -209,7 +204,6 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
209
204
  }(ReactNodeView);
210
205
  export var blockCardNodeView = function blockCardNodeView(_ref3) {
211
206
  var pmPluginFactoryParams = _ref3.pmPluginFactoryParams,
212
- platform = _ref3.platform,
213
207
  actionOptions = _ref3.actionOptions,
214
208
  showServerActions = _ref3.showServerActions,
215
209
  pluginInjectionApi = _ref3.pluginInjectionApi,
@@ -220,7 +214,6 @@ export var blockCardNodeView = function blockCardNodeView(_ref3) {
220
214
  var portalProviderAPI = pmPluginFactoryParams.portalProviderAPI,
221
215
  eventDispatcher = pmPluginFactoryParams.eventDispatcher;
222
216
  var reactComponentProps = {
223
- platform: platform,
224
217
  actionOptions: actionOptions,
225
218
  showServerActions: showServerActions,
226
219
  pluginInjectionApi: pluginInjectionApi,
@@ -229,7 +222,7 @@ export var blockCardNodeView = function blockCardNodeView(_ref3) {
229
222
  var isDatasource = isDatasourceNode(node);
230
223
  if (isDatasource) {
231
224
  var _node$attrs2;
232
- if (allowDatasource && platform !== 'mobile' && canRenderDatasource(node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.datasource) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.id)) {
225
+ if (allowDatasource && canRenderDatasource(node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.datasource) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.id)) {
233
226
  var datasourcePosition = typeof getPos === 'function' && getPos();
234
227
  var datasourceResolvedPosition = datasourcePosition && view.state.doc.resolve(datasourcePosition);
235
228
  var isNodeNested = !!(datasourceResolvedPosition && datasourceResolvedPosition.depth > 0);
@@ -9,7 +9,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  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; }
11
11
  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; }
12
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
13
13
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
14
  /**
15
15
  * @jsxRuntime classic
@@ -9,7 +9,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  import _extends from "@babel/runtime/helpers/extends";
10
10
  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; }
11
11
  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; }
12
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
13
13
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
14
  import React from 'react';
15
15
  import PropTypes from 'prop-types';
@@ -153,7 +153,7 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
153
153
  })();
154
154
  try {
155
155
  var cardContext = _this.context.contextAdapter ? _this.context.contextAdapter.card : undefined;
156
- var hasPreview = cardContext && cardContext.value.extractors.getPreview(url, _this.props.platform);
156
+ var hasPreview = cardContext && cardContext.value.extractors.getPreview(url, 'web');
157
157
  if (!hasPreview) {
158
158
  _this.setState({
159
159
  hasPreview: false
@@ -257,7 +257,6 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
257
257
  var _this$props = this.props,
258
258
  node = _this$props.node,
259
259
  cardContext = _this$props.cardContext,
260
- platform = _this$props.platform,
261
260
  allowResizing = _this$props.allowResizing,
262
261
  fullWidthMode = _this$props.fullWidthMode,
263
262
  view = _this$props.view,
@@ -302,7 +301,7 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
302
301
  onError: this.onError,
303
302
  frameStyle: "show",
304
303
  inheritDimensions: true,
305
- platform: platform,
304
+ platform: 'web',
306
305
  container: this.scrollContainer,
307
306
  embedIframeRef: this.embedIframeRef,
308
307
  actionOptions: actionOptions,
@@ -368,20 +367,18 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
368
367
  value: function createDomRef() {
369
368
  var _this3 = this;
370
369
  var domRef = document.createElement('div');
371
- if (this.reactComponentProps.platform !== 'mobile') {
372
- // It is a tradeoff for the bug mentioned that occurs in Chrome: https://product-fabric.atlassian.net/browse/ED-5379, https://github.com/ProseMirror/prosemirror/issues/884
373
- if (fg('linking-platform-contenteditable-false-live-view')) {
374
- var _this$reactComponentP, _this$reactComponentP2;
375
- this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref3) {
376
- var nextSharedState = _ref3.nextSharedState;
377
- return _this3.updateContentEditable(nextSharedState, domRef);
378
- });
379
- this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
380
- } else {
381
- domRef.contentEditable = 'true';
382
- }
383
- domRef.setAttribute('spellcheck', 'false');
370
+ // It is a tradeoff for the bug mentioned that occurs in Chrome: https://product-fabric.atlassian.net/browse/ED-5379, https://github.com/ProseMirror/prosemirror/issues/884
371
+ if (fg('linking-platform-contenteditable-false-live-view')) {
372
+ var _this$reactComponentP, _this$reactComponentP2;
373
+ this.unsubscribe = (_this$reactComponentP = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.editorViewMode) === null || _this$reactComponentP === void 0 ? void 0 : _this$reactComponentP.sharedState.onChange(function (_ref3) {
374
+ var nextSharedState = _ref3.nextSharedState;
375
+ return _this3.updateContentEditable(nextSharedState, domRef);
376
+ });
377
+ this.updateContentEditable((_this$reactComponentP2 = this.reactComponentProps.pluginInjectionApi) === null || _this$reactComponentP2 === void 0 || (_this$reactComponentP2 = _this$reactComponentP2.editorViewMode) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.sharedState.currentState(), domRef);
378
+ } else {
379
+ domRef.contentEditable = 'true';
384
380
  }
381
+ domRef.setAttribute('spellcheck', 'false');
385
382
  return domRef;
386
383
  }
387
384
  }, {
@@ -390,7 +387,6 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
390
387
  var _this$reactComponentP3 = this.reactComponentProps,
391
388
  eventDispatcher = _this$reactComponentP3.eventDispatcher,
392
389
  allowResizing = _this$reactComponentP3.allowResizing,
393
- platform = _this$reactComponentP3.platform,
394
390
  fullWidthMode = _this$reactComponentP3.fullWidthMode,
395
391
  dispatchAnalyticsEvent = _this$reactComponentP3.dispatchAnalyticsEvent,
396
392
  pluginInjectionApi = _this$reactComponentP3.pluginInjectionApi,
@@ -401,7 +397,6 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
401
397
  eventDispatcher: eventDispatcher,
402
398
  getPos: this.getPos,
403
399
  allowResizing: allowResizing,
404
- platform: platform,
405
400
  fullWidthMode: fullWidthMode,
406
401
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
407
402
  pluginInjectionApi: pluginInjectionApi,
@@ -419,7 +414,6 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
419
414
  }(ReactNodeView);
420
415
  export var embedCardNodeView = function embedCardNodeView(_ref4) {
421
416
  var allowResizing = _ref4.allowResizing,
422
- platform = _ref4.platform,
423
417
  fullWidthMode = _ref4.fullWidthMode,
424
418
  pmPluginFactoryParams = _ref4.pmPluginFactoryParams,
425
419
  pluginInjectionApi = _ref4.pluginInjectionApi,
@@ -433,7 +427,6 @@ export var embedCardNodeView = function embedCardNodeView(_ref4) {
433
427
  var reactComponentProps = {
434
428
  eventDispatcher: eventDispatcher,
435
429
  allowResizing: allowResizing,
436
- platform: platform,
437
430
  fullWidthMode: fullWidthMode,
438
431
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
439
432
  pluginInjectionApi: pluginInjectionApi,
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ 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); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import React, { useCallback } from 'react';
12
12
  import PropTypes from 'prop-types';
@@ -25,7 +25,8 @@ import LayoutButton from './ui/LayoutButton';
25
25
  import { isDatasourceConfigEditable } from './utils';
26
26
  export var cardPlugin = function cardPlugin(_ref) {
27
27
  var _options$lpLinkPicker;
28
- var options = _ref.config,
28
+ var _ref$config = _ref.config,
29
+ options = _ref$config === void 0 ? {} : _ref$config,
29
30
  api = _ref.api;
30
31
  var previousCardProvider;
31
32
  var cardPluginEvents = createEventsQueue();
@@ -146,7 +147,7 @@ export var cardPlugin = function cardPlugin(_ref) {
146
147
  getEndingToolbarItems: getEndingToolbarItems(options, api)
147
148
  },
148
149
  pluginsOptions: {
149
- floatingToolbar: floatingToolbar(options, (_options$lpLinkPicker = options.lpLinkPicker) !== null && _options$lpLinkPicker !== void 0 ? _options$lpLinkPicker : false, options.platform, options.linkPicker, api, options.disableFloatingToolbar),
150
+ floatingToolbar: floatingToolbar(options, (_options$lpLinkPicker = options.lpLinkPicker) !== null && _options$lpLinkPicker !== void 0 ? _options$lpLinkPicker : false, options.linkPicker, api, options.disableFloatingToolbar),
150
151
  quickInsert: function quickInsert(_ref5) {
151
152
  var formatMessage = _ref5.formatMessage;
152
153
  var quickInsertArray = [];
@@ -51,7 +51,6 @@ var handleAwarenessOverlay = function handleAwarenessOverlay(view) {
51
51
  export var createPlugin = function createPlugin(options, pluginInjectionApi) {
52
52
  return function (pmPluginFactoryParams) {
53
53
  var editorAppearance = options.editorAppearance,
54
- platform = options.platform,
55
54
  allowResizing = options.allowResizing,
56
55
  useAlternativePreloader = options.useAlternativePreloader,
57
56
  fullWidthMode = options.fullWidthMode,
@@ -63,7 +62,7 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
63
62
  allowBlockCards = options.allowBlockCards,
64
63
  onClickCallback = options.onClickCallback,
65
64
  __livePage = options.__livePage;
66
- var enableInlineUpgradeFeatures = !!showUpgradeDiscoverability && platform !== 'mobile';
65
+ var enableInlineUpgradeFeatures = !!showUpgradeDiscoverability;
67
66
  var inlineCardViewProducer = getInlineNodeViewProducer(_objectSpread({
68
67
  pmPluginFactoryParams: pmPluginFactoryParams,
69
68
  Component: InlineCardNodeView,
@@ -234,7 +233,6 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
234
233
  inlineCard: inlineCardViewProducer,
235
234
  blockCard: lazyBlockCardView({
236
235
  pmPluginFactoryParams: pmPluginFactoryParams,
237
- platform: platform,
238
236
  actionOptions: actionOptions,
239
237
  showServerActions: showServerActions,
240
238
  pluginInjectionApi: pluginInjectionApi,
@@ -244,7 +242,6 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
244
242
  }),
245
243
  embedCard: lazyEmbedCardView({
246
244
  allowResizing: allowResizing,
247
- platform: platform,
248
245
  fullWidthMode: fullWidthMode,
249
246
  pmPluginFactoryParams: pmPluginFactoryParams,
250
247
  pluginInjectionApi: pluginInjectionApi,
@@ -1,7 +1,7 @@
1
1
  import _typeof from "@babel/runtime/helpers/typeof";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
5
5
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  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; }
7
7
  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; }
@@ -90,7 +90,7 @@ export var openLinkSettings = function openLinkSettings(editorAnalyticsApi, user
90
90
  return true;
91
91
  };
92
92
  };
93
- export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker, platform, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar) {
93
+ export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi, disableFloatingToolbar) {
94
94
  return function (state, intl, providerFactory) {
95
95
  if (disableFloatingToolbar) {
96
96
  return;
@@ -134,7 +134,7 @@ export var floatingToolbar = function floatingToolbar(cardOptions, lpLinkPicker,
134
134
  }
135
135
  return element;
136
136
  },
137
- items: generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, platform, linkPickerOptions, pluginInjectionApi),
137
+ items: generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, linkPickerOptions, pluginInjectionApi),
138
138
  scrollable: pluginState !== null && pluginState !== void 0 && pluginState.showLinkingToolbar ? false : true
139
139
  }, editLinkToolbarConfig(Boolean(pluginState === null || pluginState === void 0 ? void 0 : pluginState.showLinkingToolbar), isLinkPickerEnabled));
140
140
  };
@@ -176,7 +176,7 @@ var getToolbarViewedItem = function getToolbarViewedItem(url, display) {
176
176
  }
177
177
  }];
178
178
  };
179
- var generateToolbarItems = function generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, platform, linkPicker, pluginInjectionApi) {
179
+ var generateToolbarItems = function generateToolbarItems(state, intl, providerFactory, cardOptions, lpLinkPicker, linkPicker, pluginInjectionApi) {
180
180
  return function (node) {
181
181
  var _pluginInjectionApi$a, _pluginInjectionApi$d, _pluginInjectionApi$d2, _node$attrs;
182
182
  var _titleUrlPairFromNode2 = titleUrlPairFromNode(node),
@@ -194,17 +194,13 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
194
194
  title: title
195
195
  };
196
196
  }
197
- var pluginState = pluginKey.getState(state);
198
197
  var currentAppearance = appearanceForNodeType(node.type);
199
198
  var _ref2 = (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : {},
200
199
  hoverDecoration = _ref2.hoverDecoration;
201
200
  var isDatasource = isDatasourceNode(node);
202
- var shouldRenderDatasourceToolbar = isDatasource &&
203
- // not showing toolbar in mobile for now since not sure what our plans are for it
204
- platform !== 'mobile' && cardOptions.allowDatasource && canRenderDatasource(node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.datasource) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id);
205
-
206
- /* mobile builds toolbar natively using toolbarItems */
207
- if (pluginState !== null && pluginState !== void 0 && pluginState.showLinkingToolbar && platform !== 'mobile') {
201
+ var pluginState = pluginKey.getState(state);
202
+ var shouldRenderDatasourceToolbar = isDatasource && cardOptions.allowDatasource && canRenderDatasource(node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 || (_node$attrs = _node$attrs.datasource) === null || _node$attrs === void 0 ? void 0 : _node$attrs.id);
203
+ if (pluginState !== null && pluginState !== void 0 && pluginState.showLinkingToolbar) {
208
204
  return [buildEditLinkToolbar({
209
205
  providerFactory: providerFactory,
210
206
  linkPicker: linkPicker,
@@ -213,10 +209,10 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
213
209
  lpLinkPicker: lpLinkPicker
214
210
  })];
215
211
  } else if (shouldRenderDatasourceToolbar) {
216
- return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id, state, cardOptions, currentAppearance, platform);
212
+ return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id, state, cardOptions, currentAppearance);
217
213
  } else {
218
214
  var inlineCard = state.schema.nodes.inlineCard;
219
- var isEditDropdownEnabled = platform !== 'mobile' && cardOptions.allowDatasource && fg('platform.linking-platform.enable-datasource-edit-dropdown-toolbar');
215
+ var isEditDropdownEnabled = cardOptions.allowDatasource && fg('platform.linking-platform.enable-datasource-edit-dropdown-toolbar');
220
216
  var editItems = isEditDropdownEnabled ? [{
221
217
  type: 'custom',
222
218
  fallback: [],
@@ -307,7 +303,6 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
307
303
  editorState: state,
308
304
  allowEmbeds: allowEmbeds,
309
305
  allowBlockCards: allowBlockCards,
310
- platform: platform,
311
306
  editorAnalyticsApi: editorAnalyticsApi,
312
307
  showUpgradeDiscoverability: showUpgradeDiscoverability
313
308
  });
@@ -329,7 +324,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
329
324
  type: 'separator'
330
325
  }]));
331
326
  }
332
- var shouldShowDatasourceEditButton = platform !== 'mobile' && allowDatasource && !fg('platform.linking-platform.enable-datasource-edit-dropdown-toolbar');
327
+ var shouldShowDatasourceEditButton = allowDatasource && !fg('platform.linking-platform.enable-datasource-edit-dropdown-toolbar');
333
328
  if (shouldShowDatasourceEditButton) {
334
329
  toolbarItems.unshift({
335
330
  type: 'custom',
@@ -386,7 +381,7 @@ export var getSettingsButtonGroup = function getSettingsButtonGroup(intl, editor
386
381
  type: 'separator'
387
382
  }];
388
383
  };
389
- var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance, platform) {
384
+ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state, cardOptions, currentAppearance) {
390
385
  var _node$attrs2;
391
386
  var toolbarItems = [];
392
387
  if (isDatasourceConfigEditable(datasourceId) && !fg('platform.linking-platform.enable-datasource-edit-dropdown-toolbar')) {
@@ -430,7 +425,6 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
430
425
  editorState: state,
431
426
  allowEmbeds: allowEmbeds,
432
427
  allowBlockCards: allowBlockCards,
433
- platform: platform,
434
428
  editorAnalyticsApi: editorAnalyticsApi,
435
429
  showUpgradeDiscoverability: showUpgradeDiscoverability,
436
430
  isDatasourceView: true
@@ -516,7 +510,7 @@ export var shouldRenderToolbarPulse = function shouldRenderToolbarPulse(embedEna
516
510
  };
517
511
  export var getStartingToolbarItems = function getStartingToolbarItems(options, api) {
518
512
  return function (intl, link, onEditLink, metadata) {
519
- var isEditDropdownEnabled = options.platform !== 'mobile' && options.allowDatasource && fg('platform.linking-platform.enable-datasource-edit-dropdown-toolbar');
513
+ var isEditDropdownEnabled = options.allowDatasource && fg('platform.linking-platform.enable-datasource-edit-dropdown-toolbar');
520
514
  var editLinkItem = isEditDropdownEnabled ? [{
521
515
  type: 'custom',
522
516
  fallback: [],
@@ -572,7 +566,6 @@ export var getStartingToolbarItems = function getStartingToolbarItems(options, a
572
566
  editorView: editorView,
573
567
  editorState: editorView.state,
574
568
  cardOptions: options,
575
- platform: options === null || options === void 0 ? void 0 : options.platform,
576
569
  editorAnalyticsApi: api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions,
577
570
  editorPluginApi: api
578
571
  });
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ 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); }; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import React from 'react';
10
10
  import PropTypes from 'prop-types';
@@ -1,8 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
4
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
3
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
4
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
6
6
  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; }
7
7
  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; }
8
8
  import React, { useCallback } from 'react';
@@ -114,15 +114,15 @@ var resolveColumnsConfig = function resolveColumnsConfig(views) {
114
114
  try {
115
115
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
116
116
  var _step$value = _step.value,
117
- _key = _step$value.key,
117
+ key = _step$value.key,
118
118
  width = _step$value.width,
119
119
  isWrapped = _step$value.isWrapped;
120
- visibleColumnKeys.push(_key);
120
+ visibleColumnKeys.push(key);
121
121
  if (width) {
122
- columnCustomSizes[_key] = width;
122
+ columnCustomSizes[key] = width;
123
123
  }
124
124
  if (isWrapped) {
125
- wrappedColumnKeys.push(_key);
125
+ wrappedColumnKeys.push(key);
126
126
  }
127
127
  }
128
128
  } catch (err) {
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
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); }; }
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 { ACTION, buildEditLinkPayload, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ 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); }; }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import React from 'react';
10
10
  import PropTypes from 'prop-types';
@@ -21,7 +21,6 @@ export function HyperlinkToolbarAppearance(props) {
21
21
  editorView = props.editorView,
22
22
  editorState = props.editorState,
23
23
  cardOptions = props.cardOptions,
24
- platform = props.platform,
25
24
  editorAnalyticsApi = props.editorAnalyticsApi;
26
25
  var getProvider = /*#__PURE__*/function () {
27
26
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
@@ -141,7 +140,6 @@ export function HyperlinkToolbarAppearance(props) {
141
140
  editorState: editorState,
142
141
  allowEmbeds: cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowEmbeds,
143
142
  allowBlockCards: cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowBlockCards,
144
- platform: platform,
145
143
  editorAnalyticsApi: editorAnalyticsApi
146
144
  }), (cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowDatasource) && /*#__PURE__*/React.createElement(DatasourceAppearanceButton, {
147
145
  intl: intl,
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  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; }
9
9
  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; }
10
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
+ 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
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
13
  import PropTypes from 'prop-types';
@@ -43,12 +43,11 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
43
43
  allowEmbeds = _this$props.allowEmbeds,
44
44
  _this$props$allowBloc = _this$props.allowBlockCards,
45
45
  allowBlockCards = _this$props$allowBloc === void 0 ? true : _this$props$allowBloc,
46
- platform = _this$props.platform,
47
46
  editorAnalyticsApi = _this$props.editorAnalyticsApi,
48
47
  _this$props$showUpgra = _this$props.showUpgradeDiscoverability,
49
48
  showUpgradeDiscoverability = _this$props$showUpgra === void 0 ? true : _this$props$showUpgra,
50
49
  isDatasourceView = _this$props.isDatasourceView;
51
- var preview = allowEmbeds && cardContext && url && cardContext.extractors.getPreview(url, platform);
50
+ var preview = allowEmbeds && cardContext && url && cardContext.extractors.getPreview(url, 'web');
52
51
  var defaultCommand = function defaultCommand() {
53
52
  return false;
54
53
  };
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  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; }
10
10
  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; }
11
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ 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); }; }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  /**
14
14
  * @jsxRuntime classic
@@ -22,7 +22,7 @@ export declare class BlockCardComponent extends React.PureComponent<SmartCardPro
22
22
  }) => void;
23
23
  render(): JSX.Element;
24
24
  }
25
- export type BlockCardNodeViewProps = Pick<SmartCardProps, 'platform' | 'actionOptions' | 'showServerActions' | 'pluginInjectionApi' | 'onClickCallback'>;
25
+ export type BlockCardNodeViewProps = Pick<SmartCardProps, 'actionOptions' | 'showServerActions' | 'pluginInjectionApi' | 'onClickCallback'>;
26
26
  export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
27
27
  unsubscribe: (() => void) | undefined;
28
28
  createDomRef(): HTMLElement;
@@ -34,7 +34,6 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
34
34
  }
35
35
  export interface BlockCardNodeViewProperties {
36
36
  pmPluginFactoryParams: PMPluginFactoryParams;
37
- platform: BlockCardNodeViewProps['platform'];
38
37
  actionOptions: BlockCardNodeViewProps['actionOptions'];
39
38
  showServerActions: BlockCardNodeViewProps['showServerActions'];
40
39
  pluginInjectionApi: BlockCardNodeViewProps['pluginInjectionApi'];
@@ -42,4 +41,4 @@ export interface BlockCardNodeViewProperties {
42
41
  allowDatasource: boolean | undefined;
43
42
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
44
43
  }
45
- export declare const blockCardNodeView: ({ pmPluginFactoryParams, platform, actionOptions, showServerActions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => Datasource | BlockCard | import("prosemirror-view").NodeView;
44
+ export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, showServerActions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => Datasource | BlockCard | import("prosemirror-view").NodeView;
@@ -41,7 +41,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
41
41
  }) => void;
42
42
  render(): JSX.Element;
43
43
  }
44
- export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'platform' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'showServerActions' | 'onClickCallback'>;
44
+ export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi' | 'actionOptions' | 'showServerActions' | 'onClickCallback'>;
45
45
  export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
46
46
  unsubscribe: (() => void) | undefined;
47
47
  viewShouldUpdate(nextNode: PMNode): boolean;
@@ -52,7 +52,6 @@ export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
52
52
  }
53
53
  export interface EmbedCardNodeViewProperties {
54
54
  allowResizing: EmbedCardNodeViewProps['allowResizing'];
55
- platform: EmbedCardNodeViewProps['platform'];
56
55
  fullWidthMode: EmbedCardNodeViewProps['fullWidthMode'];
57
56
  pmPluginFactoryParams: PMPluginFactoryParams;
58
57
  pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
@@ -60,4 +59,4 @@ export interface EmbedCardNodeViewProperties {
60
59
  showServerActions: EmbedCardNodeViewProps['showServerActions'];
61
60
  onClickCallback: EmbedCardNodeViewProps['onClickCallback'];
62
61
  }
63
- export declare const embedCardNodeView: ({ allowResizing, platform, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, showServerActions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
62
+ export declare const embedCardNodeView: ({ allowResizing, fullWidthMode, pmPluginFactoryParams, pluginInjectionApi, actionOptions, showServerActions, onClickCallback, }: EmbedCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => EmbedCard;
@@ -10,14 +10,13 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
10
10
  import { type Transaction } from '@atlaskit/editor-prosemirror/state';
11
11
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
12
12
  import { type CardContext } from '@atlaskit/link-provider';
13
- import type { CardProps as BaseCardProps, CardPlatform } from '@atlaskit/smart-card';
13
+ import type { CardProps as BaseCardProps } from '@atlaskit/smart-card';
14
14
  import type { cardPlugin } from '../index';
15
15
  export type EditorContext<T> = React.Context<T> & {
16
16
  value: T;
17
17
  };
18
18
  export interface CardNodeViewProps extends ReactComponentProps {
19
19
  providerFactory?: ProviderFactory;
20
- platform?: CardPlatform;
21
20
  eventDispatcher?: EventDispatcher;
22
21
  }
23
22
  export interface CardProps extends CardNodeViewProps {
@@ -26,7 +25,6 @@ export interface CardProps extends CardNodeViewProps {
26
25
  view: EditorView;
27
26
  getPos: getPosHandler;
28
27
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
29
- isMobile?: boolean;
30
28
  eventDispatcher?: EventDispatcher;
31
29
  allowResizing?: boolean;
32
30
  fullWidthMode?: boolean;