@atlaskit/editor-plugin-card 12.0.2 → 12.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 12.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`77df724ec737e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/77df724ec737e) -
8
+ [https://product-fabric.atlassian.net/browse/ED-28631](ED-28631) - cleanup the
9
+ platform_editor_smart_card_otp Statsig experiment
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 12.0.2
4
16
 
5
17
  ### Patch Changes
@@ -118,7 +118,7 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
118
118
  var _node$attrs = node.attrs,
119
119
  url = _node$attrs.url,
120
120
  data = _node$attrs.data;
121
- var cardInner = (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
121
+ var cardInner = isPageSSRed ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
122
122
  key: url,
123
123
  url: url !== null && url !== void 0 ? url : data.url,
124
124
  container: this.scrollContainer,
@@ -349,7 +349,7 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
349
349
  pctWidth: pctWidth,
350
350
  fullWidthMode: fullWidthMode
351
351
  };
352
- var smartCard = (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed ? /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
352
+ var smartCard = isPageSSRed ? /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
353
353
  key: url,
354
354
  url: url,
355
355
  appearance: "embed",
@@ -18,7 +18,6 @@ var _ui = require("@atlaskit/editor-common/ui");
18
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
19
  var _smartCard = require("@atlaskit/smart-card");
20
20
  var _ssr = require("@atlaskit/smart-card/ssr");
21
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
21
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
23
22
  var _actions = require("../pm-plugins/actions");
24
23
  var _utils = require("../pm-plugins/utils");
@@ -41,7 +40,6 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
41
40
  showHoverPreview = _ref.showHoverPreview,
42
41
  hoverPreviewOptions = _ref.hoverPreviewOptions,
43
42
  isPageSSRed = _ref.isPageSSRed,
44
- provider = _ref.provider,
45
43
  pluginInjectionApi = _ref.pluginInjectionApi,
46
44
  disablePreviewPanel = _ref.disablePreviewPanel;
47
45
  var _node$attrs = node.attrs,
@@ -128,10 +126,8 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
128
126
  isHovered: isHovered,
129
127
  showHoverPreview: showHoverPreview,
130
128
  hoverPreviewOptions: hoverPreviewOptions,
131
- disablePreviewPanel: disablePreviewPanel
132
- // Durin `platform_editor_smart_card_otp` cleaning up, replace this with `true`.
133
- ,
134
- hideIconLoadingSkeleton: (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true)
129
+ disablePreviewPanel: disablePreviewPanel,
130
+ hideIconLoadingSkeleton: true
135
131
  });
136
132
  }
137
133
  return /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
@@ -7,13 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.lazyBlockCardView = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
11
  var _blockCard = require("./blockCard");
13
12
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
13
  var lazyBlockCardView = exports.lazyBlockCardView = function lazyBlockCardView(props) {
15
14
  var isPageSSRed = props.isPageSSRed;
16
- if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || isPageSSRed && (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true)) {
15
+ if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
17
16
  return (0, _blockCard.blockCardNodeView)(props);
18
17
  }
19
18
  return (0, _lazyNodeView.withLazyLoading)({
@@ -7,13 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.lazyEmbedCardView = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
11
  var _embedCard = require("./embedCard");
13
12
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
13
  var lazyEmbedCardView = exports.lazyEmbedCardView = function lazyEmbedCardView(props) {
15
14
  var isPageSSRed = props.isPageSSRed;
16
- if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || isPageSSRed && (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true)) {
15
+ if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
17
16
  return (0, _embedCard.embedCardNodeView)(props);
18
17
  }
19
18
  return (0, _lazyNodeView.withLazyLoading)({
@@ -102,7 +102,7 @@ export class BlockCardComponent extends React.PureComponent {
102
102
  url,
103
103
  data
104
104
  } = node.attrs;
105
- const cardInner = expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSSR, {
105
+ const cardInner = isPageSSRed ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSSR, {
106
106
  key: url,
107
107
  url: url !== null && url !== void 0 ? url : data.url,
108
108
  container: this.scrollContainer,
@@ -341,7 +341,7 @@ export class EmbedCardComponent extends React.PureComponent {
341
341
  pctWidth,
342
342
  fullWidthMode
343
343
  };
344
- const smartCard = expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed ? /*#__PURE__*/React.createElement(CardSSR, {
344
+ const smartCard = isPageSSRed ? /*#__PURE__*/React.createElement(CardSSR, {
345
345
  key: url,
346
346
  url: url,
347
347
  appearance: "embed",
@@ -9,7 +9,6 @@ import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-co
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { Card as SmartCard } from '@atlaskit/smart-card';
11
11
  import { CardSSR } from '@atlaskit/smart-card/ssr';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
13
  import { registerCard, removeCard } from '../pm-plugins/actions';
15
14
  import { getAwarenessProps } from '../pm-plugins/utils';
@@ -29,7 +28,6 @@ export const InlineCard = /*#__PURE__*/memo(({
29
28
  showHoverPreview,
30
29
  hoverPreviewOptions,
31
30
  isPageSSRed,
32
- provider,
33
31
  pluginInjectionApi,
34
32
  disablePreviewPanel
35
33
  }) => {
@@ -123,10 +121,8 @@ export const InlineCard = /*#__PURE__*/memo(({
123
121
  isHovered: isHovered,
124
122
  showHoverPreview: showHoverPreview,
125
123
  hoverPreviewOptions: hoverPreviewOptions,
126
- disablePreviewPanel: disablePreviewPanel
127
- // Durin `platform_editor_smart_card_otp` cleaning up, replace this with `true`.
128
- ,
129
- hideIconLoadingSkeleton: expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)
124
+ disablePreviewPanel: disablePreviewPanel,
125
+ hideIconLoadingSkeleton: true
130
126
  });
131
127
  }
132
128
  return /*#__PURE__*/React.createElement(SmartCard, {
@@ -1,12 +1,11 @@
1
1
  import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { blockCardNodeView } from './blockCard';
5
4
  export const lazyBlockCardView = props => {
6
5
  const {
7
6
  isPageSSRed
8
7
  } = props;
9
- if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
8
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
10
9
  return blockCardNodeView(props);
11
10
  }
12
11
  return withLazyLoading({
@@ -1,12 +1,11 @@
1
1
  import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { embedCardNodeView } from './embedCard';
5
4
  export const lazyEmbedCardView = props => {
6
5
  const {
7
6
  isPageSSRed
8
7
  } = props;
9
- if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
8
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
10
9
  return embedCardNodeView(props);
11
10
  }
12
11
  return withLazyLoading({
@@ -113,7 +113,7 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
113
113
  var _node$attrs = node.attrs,
114
114
  url = _node$attrs.url,
115
115
  data = _node$attrs.data;
116
- var cardInner = expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSSR, {
116
+ var cardInner = isPageSSRed ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSSR, {
117
117
  key: url,
118
118
  url: url !== null && url !== void 0 ? url : data.url,
119
119
  container: this.scrollContainer,
@@ -343,7 +343,7 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
343
343
  pctWidth: pctWidth,
344
344
  fullWidthMode: fullWidthMode
345
345
  };
346
- var smartCard = expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) && isPageSSRed ? /*#__PURE__*/React.createElement(CardSSR, {
346
+ var smartCard = isPageSSRed ? /*#__PURE__*/React.createElement(CardSSR, {
347
347
  key: url,
348
348
  url: url,
349
349
  appearance: "embed",
@@ -9,7 +9,6 @@ import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-co
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { Card as SmartCard } from '@atlaskit/smart-card';
11
11
  import { CardSSR } from '@atlaskit/smart-card/ssr';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
13
  import { registerCard, removeCard } from '../pm-plugins/actions';
15
14
  import { getAwarenessProps } from '../pm-plugins/utils';
@@ -29,7 +28,6 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
29
28
  showHoverPreview = _ref.showHoverPreview,
30
29
  hoverPreviewOptions = _ref.hoverPreviewOptions,
31
30
  isPageSSRed = _ref.isPageSSRed,
32
- provider = _ref.provider,
33
31
  pluginInjectionApi = _ref.pluginInjectionApi,
34
32
  disablePreviewPanel = _ref.disablePreviewPanel;
35
33
  var _node$attrs = node.attrs,
@@ -116,10 +114,8 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
116
114
  isHovered: isHovered,
117
115
  showHoverPreview: showHoverPreview,
118
116
  hoverPreviewOptions: hoverPreviewOptions,
119
- disablePreviewPanel: disablePreviewPanel
120
- // Durin `platform_editor_smart_card_otp` cleaning up, replace this with `true`.
121
- ,
122
- hideIconLoadingSkeleton: expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)
117
+ disablePreviewPanel: disablePreviewPanel,
118
+ hideIconLoadingSkeleton: true
123
119
  });
124
120
  }
125
121
  return /*#__PURE__*/React.createElement(SmartCard, {
@@ -1,10 +1,9 @@
1
1
  import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { blockCardNodeView } from './blockCard';
5
4
  export var lazyBlockCardView = function lazyBlockCardView(props) {
6
5
  var isPageSSRed = props.isPageSSRed;
7
- if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
6
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
8
7
  return blockCardNodeView(props);
9
8
  }
10
9
  return withLazyLoading({
@@ -1,10 +1,9 @@
1
1
  import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  import { embedCardNodeView } from './embedCard';
5
4
  export var lazyEmbedCardView = function lazyEmbedCardView(props) {
6
5
  var isPageSSRed = props.isPageSSRed;
7
- if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed && expValEquals('platform_editor_smart_card_otp', 'isEnabled', true)) {
6
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false) || isPageSSRed) {
8
7
  return embedCardNodeView(props);
9
8
  }
10
9
  return withLazyLoading({
@@ -4,7 +4,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { SmartCardProps } from './genericCard';
6
6
  import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
7
- export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, provider, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
7
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
8
8
  export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt' | 'provider'>;
9
9
  /**
10
10
  *
@@ -4,7 +4,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { SmartCardProps } from './genericCard';
6
6
  import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
7
- export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, provider, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
7
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
8
8
  export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt' | 'provider'>;
9
9
  /**
10
10
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "12.0.2",
3
+ "version": "12.1.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/editor-plugin-editor-disabled": "^7.0.0",
40
40
  "@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
41
41
  "@atlaskit/editor-plugin-feature-flags": "^6.0.0",
42
- "@atlaskit/editor-plugin-floating-toolbar": "^9.0.0",
42
+ "@atlaskit/editor-plugin-floating-toolbar": "^9.1.0",
43
43
  "@atlaskit/editor-plugin-grid": "^7.0.0",
44
44
  "@atlaskit/editor-plugin-toolbar": "^4.0.0",
45
45
  "@atlaskit/editor-plugin-width": "^8.0.0",
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/editor-shared-styles": "^3.10.0",
48
48
  "@atlaskit/frontend-utilities": "^3.2.0",
49
49
  "@atlaskit/icon": "^29.3.0",
50
- "@atlaskit/link": "^3.2.0",
50
+ "@atlaskit/link": "^3.3.0",
51
51
  "@atlaskit/link-analytics": "^11.0.0",
52
52
  "@atlaskit/link-client-extension": "^6.0.0",
53
53
  "@atlaskit/link-datasource": "^4.30.0",
@@ -59,10 +59,10 @@
59
59
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
60
60
  "@atlaskit/primitives": "^17.0.0",
61
61
  "@atlaskit/prosemirror-history": "^0.2.0",
62
- "@atlaskit/smart-card": "^43.17.0",
62
+ "@atlaskit/smart-card": "^43.19.0",
63
63
  "@atlaskit/theme": "^21.0.0",
64
- "@atlaskit/tmp-editor-statsig": "^16.3.0",
65
- "@atlaskit/tokens": "^9.0.0",
64
+ "@atlaskit/tmp-editor-statsig": "^16.6.0",
65
+ "@atlaskit/tokens": "^9.1.0",
66
66
  "@babel/runtime": "^7.0.0",
67
67
  "@emotion/react": "^11.7.1",
68
68
  "lodash": "^4.17.21",
@@ -71,8 +71,8 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^111.0.0",
75
- "@atlaskit/link-provider": "^4.0.0",
74
+ "@atlaskit/editor-common": "^111.3.0",
75
+ "@atlaskit/link-provider": "^4.1.0",
76
76
  "react": "^18.2.0",
77
77
  "react-intl-next": "npm:react-intl@^5.18.1"
78
78
  },