@atlaskit/smart-card 43.1.10 → 43.1.11

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,13 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f1542b8bcb4d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1542b8bcb4d3) -
8
+ [ux] NAVX-1910 removing dynamic image margin to improve performance metrics
9
+ - Updated dependencies
10
+
3
11
  ## 43.1.10
4
12
 
5
13
  ### Patch Changes
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "43.1.9"
14
+ packageVersion: "43.1.10"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.EmbedCardResolvedView = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _link = _interopRequireDefault(require("@atlaskit/icon/core/migration/link"));
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _tokens = require("@atlaskit/tokens");
12
11
  var _utils = require("../../../utils");
13
12
  var _ExpandedFrame = require("../components/ExpandedFrame");
@@ -55,13 +54,10 @@ var EmbedCardResolvedView = exports.EmbedCardResolvedView = /*#__PURE__*/_react.
55
54
  hideLoadingSkeleton: hideIconLoadingSkeleton
56
55
  });
57
56
  }, [iconFromContext, src, linkGlyph, type, hideIconLoadingSkeleton]);
58
- if ((0, _platformFeatureFlags.fg)('ptc-enable-embed-team-smart-links')) {
59
- // eslint-disable-next-line react-hooks/rules-of-hooks
60
- (0, _useEmbedResolvePostMessageListener.useEmbedResolvePostMessageListener)({
61
- url: link,
62
- embedIframeRef: embedIframeRef
63
- });
64
- }
57
+ (0, _useEmbedResolvePostMessageListener.useEmbedResolvePostMessageListener)({
58
+ url: link,
59
+ embedIframeRef: embedIframeRef
60
+ });
65
61
  var themeState = (0, _tokens.useThemeObserver)();
66
62
  var previewUrl = preview === null || preview === void 0 ? void 0 : preview.src;
67
63
  if (previewUrl && isSupportTheming) {
@@ -9,6 +9,7 @@ exports.default = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _extractPreview = require("../../../extractors/flexible/extract-preview");
13
14
  var _blocks = require("../../FlexibleCard/components/blocks");
14
15
  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" != _typeof(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); }
@@ -33,11 +34,12 @@ var ImagePreview = function ImagePreview(_ref) {
33
34
  if (previewBlockRef.current) {
34
35
  var _previewBlockRef$curr;
35
36
  var previewHeight = (_previewBlockRef$curr = previewBlockRef.current) === null || _previewBlockRef$curr === void 0 ? void 0 : _previewBlockRef$curr.getBoundingClientRect().height;
36
- setDynamicStyles(_objectSpread({
37
+ setDynamicStyles(_objectSpread(_objectSpread({
37
38
  borderTopLeftRadius: "var(--ds-radius-large, 8px)",
38
- borderTopRightRadius: "var(--ds-radius-large, 8px)",
39
+ borderTopRightRadius: "var(--ds-radius-large, 8px)"
40
+ }, (0, _platformFeatureFlags.fg)('navx-1910-fix-hovercard-performance-metrics') ? {} : {
39
41
  marginBottom: "var(--ds-space-100, 8px)"
40
- }, previewHeight ? {
42
+ }), previewHeight ? {
41
43
  height: "".concat(previewHeight, "px")
42
44
  } : {}));
43
45
  }
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
22
22
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
23
23
  var PACKAGE_DATA = {
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "43.1.9",
25
+ packageVersion: "43.1.10",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "43.1.9"
5
+ packageVersion: "43.1.10"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import LinkGlyph from '@atlaskit/icon/core/migration/link';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { useThemeObserver } from '@atlaskit/tokens';
5
4
  import { getPreviewUrlWithTheme, isProfileType } from '../../../utils';
6
5
  import { ExpandedFrame } from '../components/ExpandedFrame';
@@ -46,13 +45,10 @@ export const EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(({
46
45
  hideLoadingSkeleton: hideIconLoadingSkeleton
47
46
  });
48
47
  }, [iconFromContext, src, linkGlyph, type, hideIconLoadingSkeleton]);
49
- if (fg('ptc-enable-embed-team-smart-links')) {
50
- // eslint-disable-next-line react-hooks/rules-of-hooks
51
- useEmbedResolvePostMessageListener({
52
- url: link,
53
- embedIframeRef
54
- });
55
- }
48
+ useEmbedResolvePostMessageListener({
49
+ url: link,
50
+ embedIframeRef
51
+ });
56
52
  const themeState = useThemeObserver();
57
53
  let previewUrl = preview === null || preview === void 0 ? void 0 : preview.src;
58
54
  if (previewUrl && isSupportTheming) {
@@ -1,4 +1,5 @@
1
1
  import React, { useCallback, useRef, useState } from 'react';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { extractSmartLinkPreviewImage } from '../../../extractors/flexible/extract-preview';
3
4
  import { PreviewBlock } from '../../FlexibleCard/components/blocks';
4
5
  const ImagePreview = ({
@@ -18,7 +19,9 @@ const ImagePreview = ({
18
19
  setDynamicStyles({
19
20
  borderTopLeftRadius: "var(--ds-radius-large, 8px)",
20
21
  borderTopRightRadius: "var(--ds-radius-large, 8px)",
21
- marginBottom: "var(--ds-space-100, 8px)",
22
+ ...(fg('navx-1910-fix-hovercard-performance-metrics') ? {} : {
23
+ marginBottom: "var(--ds-space-100, 8px)"
24
+ }),
22
25
  ...(previewHeight ? {
23
26
  height: `${previewHeight}px`
24
27
  } : {})
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "43.1.9",
15
+ packageVersion: "43.1.10",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "43.1.9"
7
+ packageVersion: "43.1.10"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import LinkGlyph from '@atlaskit/icon/core/migration/link';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { useThemeObserver } from '@atlaskit/tokens';
5
4
  import { getPreviewUrlWithTheme, isProfileType } from '../../../utils';
6
5
  import { ExpandedFrame } from '../components/ExpandedFrame';
@@ -48,13 +47,10 @@ export var EmbedCardResolvedView = /*#__PURE__*/React.forwardRef(function (_ref,
48
47
  hideLoadingSkeleton: hideIconLoadingSkeleton
49
48
  });
50
49
  }, [iconFromContext, src, linkGlyph, type, hideIconLoadingSkeleton]);
51
- if (fg('ptc-enable-embed-team-smart-links')) {
52
- // eslint-disable-next-line react-hooks/rules-of-hooks
53
- useEmbedResolvePostMessageListener({
54
- url: link,
55
- embedIframeRef: embedIframeRef
56
- });
57
- }
50
+ useEmbedResolvePostMessageListener({
51
+ url: link,
52
+ embedIframeRef: embedIframeRef
53
+ });
58
54
  var themeState = useThemeObserver();
59
55
  var previewUrl = preview === null || preview === void 0 ? void 0 : preview.src;
60
56
  if (previewUrl && isSupportTheming) {
@@ -3,6 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  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; }
4
4
  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; }
5
5
  import React, { useCallback, useRef, useState } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { extractSmartLinkPreviewImage } from '../../../extractors/flexible/extract-preview';
7
8
  import { PreviewBlock } from '../../FlexibleCard/components/blocks';
8
9
  var ImagePreview = function ImagePreview(_ref) {
@@ -24,11 +25,12 @@ var ImagePreview = function ImagePreview(_ref) {
24
25
  if (previewBlockRef.current) {
25
26
  var _previewBlockRef$curr;
26
27
  var previewHeight = (_previewBlockRef$curr = previewBlockRef.current) === null || _previewBlockRef$curr === void 0 ? void 0 : _previewBlockRef$curr.getBoundingClientRect().height;
27
- setDynamicStyles(_objectSpread({
28
+ setDynamicStyles(_objectSpread(_objectSpread({
28
29
  borderTopLeftRadius: "var(--ds-radius-large, 8px)",
29
- borderTopRightRadius: "var(--ds-radius-large, 8px)",
30
+ borderTopRightRadius: "var(--ds-radius-large, 8px)"
31
+ }, fg('navx-1910-fix-hovercard-performance-metrics') ? {} : {
30
32
  marginBottom: "var(--ds-space-100, 8px)"
31
- }, previewHeight ? {
33
+ }), previewHeight ? {
32
34
  height: "".concat(previewHeight, "px")
33
35
  } : {}));
34
36
  }
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "43.1.9",
18
+ packageVersion: "43.1.10",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.1.10",
3
+ "version": "43.1.11",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -63,7 +63,7 @@
63
63
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
64
64
  "@atlaskit/platform-feature-flags": "^1.1.0",
65
65
  "@atlaskit/popup": "^4.4.0",
66
- "@atlaskit/primitives": "^15.0.0",
66
+ "@atlaskit/primitives": "^16.0.0",
67
67
  "@atlaskit/section-message": "^8.7.0",
68
68
  "@atlaskit/select": "^21.3.0",
69
69
  "@atlaskit/spinner": "^19.0.0",
@@ -214,9 +214,6 @@
214
214
  "platform_smartlink_3pclick_analytics": {
215
215
  "type": "boolean"
216
216
  },
217
- "ptc-enable-embed-team-smart-links": {
218
- "type": "boolean"
219
- },
220
217
  "platform_deprecate_lp_cc_embed": {
221
218
  "type": "boolean"
222
219
  },
@@ -234,6 +231,9 @@
234
231
  },
235
232
  "jfp-magma-platform-lozenge-jump-fix": {
236
233
  "type": "boolean"
234
+ },
235
+ "navx-1910-fix-hovercard-performance-metrics": {
236
+ "type": "boolean"
237
237
  }
238
238
  },
239
239
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"