@atlaskit/smart-card 36.3.0 → 36.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 (42) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/state/hooks/use-control-data-export-config/index.js +22 -0
  3. package/dist/cjs/state/hooks/use-control-data-export-config/types.js +5 -0
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/utils/should-data-export.js +12 -0
  6. package/dist/cjs/view/BlockCard/index.js +13 -0
  7. package/dist/cjs/view/EmbedCard/index.js +23 -0
  8. package/dist/cjs/view/LinkUrl/index.js +1 -1
  9. package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.compiled.css +3 -0
  10. package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.js +44 -8
  11. package/dist/cjs/view/RelatedLinksModal/views/unavailable/index.js +1 -4
  12. package/dist/es2019/state/hooks/use-control-data-export-config/index.js +15 -0
  13. package/dist/es2019/state/hooks/use-control-data-export-config/types.js +1 -0
  14. package/dist/es2019/utils/analytics/analytics.js +1 -1
  15. package/dist/es2019/utils/should-data-export.js +4 -0
  16. package/dist/es2019/view/BlockCard/index.js +13 -0
  17. package/dist/es2019/view/EmbedCard/index.js +23 -0
  18. package/dist/es2019/view/LinkUrl/index.js +1 -1
  19. package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.compiled.css +3 -0
  20. package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.js +38 -8
  21. package/dist/es2019/view/RelatedLinksModal/views/errored/index.js +2 -2
  22. package/dist/es2019/view/RelatedLinksModal/views/unavailable/index.js +1 -4
  23. package/dist/esm/state/hooks/use-control-data-export-config/index.js +16 -0
  24. package/dist/esm/state/hooks/use-control-data-export-config/types.js +1 -0
  25. package/dist/esm/utils/analytics/analytics.js +1 -1
  26. package/dist/esm/utils/should-data-export.js +6 -0
  27. package/dist/esm/view/BlockCard/index.js +13 -0
  28. package/dist/esm/view/EmbedCard/index.js +23 -0
  29. package/dist/esm/view/LinkUrl/index.js +1 -1
  30. package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.compiled.css +3 -0
  31. package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.js +41 -8
  32. package/dist/esm/view/RelatedLinksModal/views/errored/index.js +2 -2
  33. package/dist/esm/view/RelatedLinksModal/views/unavailable/index.js +1 -4
  34. package/dist/types/state/hooks/use-control-data-export-config/index.d.ts +2 -0
  35. package/dist/types/state/hooks/use-control-data-export-config/types.d.ts +7 -0
  36. package/dist/types/utils/should-data-export.d.ts +2 -0
  37. package/dist/types/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.d.ts +2 -3
  38. package/dist/types-ts4.5/state/hooks/use-control-data-export-config/index.d.ts +2 -0
  39. package/dist/types-ts4.5/state/hooks/use-control-data-export-config/types.d.ts +7 -0
  40. package/dist/types-ts4.5/utils/should-data-export.d.ts +2 -0
  41. package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/search-no-result/index.d.ts +2 -3
  42. package/package.json +10 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 36.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#139795](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139795)
8
+ [`27472893973d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/27472893973d3) -
9
+ [ux] EDM-11840 Adding new icon for Related Links Modal no results
10
+
11
+ ## 36.4.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#135983](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/135983)
16
+ [`7bc55a027722d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7bc55a027722d) -
17
+ Resolving a vulnerability that allowed data secure policy controlled content to be exposed in
18
+ smart card previews during export.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 36.3.0
4
25
 
5
26
  ### Minor Changes
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useControlDataExportConfig = void 0;
7
+ var _react = require("react");
8
+ var _linkProvider = require("@atlaskit/link-provider");
9
+ var useControlDataExportConfig = exports.useControlDataExportConfig = function useControlDataExportConfig() {
10
+ var _useSmartLinkContext = (0, _linkProvider.useSmartLinkContext)(),
11
+ connections = _useSmartLinkContext.connections,
12
+ product = _useSmartLinkContext.product,
13
+ shouldControlDataExport = _useSmartLinkContext.shouldControlDataExport;
14
+ return (0, _react.useMemo)(function () {
15
+ return {
16
+ baseUrl: connections.client.baseUrlOverride,
17
+ envKey: connections.client.envKey,
18
+ product: product,
19
+ shouldControlDataExport: shouldControlDataExport
20
+ };
21
+ }, [connections.client.baseUrlOverride, connections.client.envKey, product, shouldControlDataExport]);
22
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -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: "36.3.0"
14
+ packageVersion: "36.5.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getIsDataExportEnabled = void 0;
7
+ var getIsDataExportEnabled = exports.getIsDataExportEnabled = function getIsDataExportEnabled() {
8
+ var _response$meta;
9
+ var shouldControlDataExport = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
10
+ var response = arguments.length > 1 ? arguments[1] : undefined;
11
+ return Boolean(shouldControlDataExport && (response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeature) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('ExportBlocked')));
12
+ };
@@ -7,6 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.BlockCard = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
+ var _useControlDataExportConfig = require("../../state/hooks/use-control-data-export-config");
12
+ var _shouldDataExport = require("../../utils/should-data-export");
10
13
  var _utils = require("../common/utils");
11
14
  var _LinkView = require("../LinkView");
12
15
  var _ErroredView = _interopRequireDefault(require("./views/ErroredView"));
@@ -41,6 +44,9 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
41
44
  renderers: renderers,
42
45
  actionOptions: actionOptions
43
46
  };
47
+ var _useControlDataExport = (0, _useControlDataExportConfig.useControlDataExportConfig)(),
48
+ _useControlDataExport2 = _useControlDataExport.shouldControlDataExport,
49
+ shouldControlDataExport = _useControlDataExport2 === void 0 ? false : _useControlDataExport2;
44
50
  switch (status) {
45
51
  case 'pending':
46
52
  case 'resolving':
@@ -48,6 +54,13 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
48
54
  testId: "smart-block-resolving-view"
49
55
  }));
50
56
  case 'resolved':
57
+ if ((0, _platformFeatureFlags.fg)('platform_smart_links_controlled_dsp_export_view')) {
58
+ if ((0, _shouldDataExport.getIsDataExportEnabled)(shouldControlDataExport, cardState.details)) {
59
+ return /*#__PURE__*/_react.default.createElement(_UnauthorisedView.default, (0, _extends2.default)({}, blockCardProps, {
60
+ onAuthorize: handleAuthorize
61
+ }));
62
+ }
63
+ }
51
64
  return /*#__PURE__*/_react.default.createElement(_ResolvedView.default, blockCardProps);
52
65
  case 'unauthorized':
53
66
  return /*#__PURE__*/_react.default.createElement(_UnauthorisedView.default, (0, _extends2.default)({}, blockCardProps, {
@@ -8,11 +8,14 @@ exports.EmbedCard = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _extractAccessContext = require("../../extractors/common/context/extractAccessContext");
12
13
  var _embed = require("../../extractors/embed");
13
14
  var _inline = require("../../extractors/inline");
14
15
  var _helpers = require("../../state/helpers");
16
+ var _useControlDataExportConfig = require("../../state/hooks/use-control-data-export-config");
15
17
  var _jsonld = require("../../utils/jsonld");
18
+ var _shouldDataExport = require("../../utils/should-data-export");
16
19
  var _ResolvedView = _interopRequireDefault(require("../BlockCard/views/ResolvedView"));
17
20
  var _ResolvedView2 = require("../InlineCard/ResolvedView");
18
21
  var _ErroredView = require("./views/ErroredView");
@@ -47,6 +50,9 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
47
50
  var meta = details && details.meta;
48
51
  var extensionKey = (0, _helpers.getExtensionKey)(details);
49
52
  var isProductIntegrationSupported = (0, _helpers.hasAuthScopeOverrides)(details);
53
+ var _useControlDataExport = (0, _useControlDataExportConfig.useControlDataExportConfig)(),
54
+ _useControlDataExport2 = _useControlDataExport.shouldControlDataExport,
55
+ shouldControlDataExport = _useControlDataExport2 === void 0 ? false : _useControlDataExport2;
50
56
  switch (status) {
51
57
  case 'pending':
52
58
  case 'resolving':
@@ -70,6 +76,23 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
70
76
  aspectRatio: (_resolvedViewProps$pr = resolvedViewProps.preview) === null || _resolvedViewProps$pr === void 0 ? void 0 : _resolvedViewProps$pr.aspectRatio
71
77
  });
72
78
  }
79
+ if ((0, _platformFeatureFlags.fg)('platform_smart_links_controlled_dsp_export_view')) {
80
+ if ((0, _shouldDataExport.getIsDataExportEnabled)(shouldControlDataExport, cardState.details)) {
81
+ var unauthViewProps = (0, _embed.extractEmbedProps)(data, meta, platform);
82
+ return /*#__PURE__*/_react.default.createElement(_unauthorizedView.default, {
83
+ context: unauthViewProps.context,
84
+ extensionKey: extensionKey,
85
+ frameStyle: frameStyle,
86
+ isProductIntegrationSupported: isProductIntegrationSupported,
87
+ inheritDimensions: inheritDimensions,
88
+ isSelected: isSelected,
89
+ onAuthorize: handleAuthorize,
90
+ onClick: handleFrameClick,
91
+ testId: testId,
92
+ url: unauthViewProps.link
93
+ });
94
+ }
95
+ }
73
96
  if (resolvedViewProps.preview) {
74
97
  return /*#__PURE__*/_react.default.createElement(_ResolvedView3.EmbedCardResolvedView, (0, _extends2.default)({}, resolvedViewProps, {
75
98
  isSelected: isSelected,
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "36.3.0",
23
+ packageVersion: "36.5.0",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -0,0 +1,3 @@
1
+ ._1bsbwdok{width:var(--_cjikvn)}
2
+ ._1e0c1ule{display:block}
3
+ ._4t3iwdok{height:var(--_cjikvn)}
@@ -1,18 +1,54 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.SpotSearchNoResult = void 0;
10
+ require("./index.compiled.css");
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _runtime = require("@compiled/react/runtime");
8
13
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _renderSvg = require("../../../../../common/render-svg");
11
- var _dark = _interopRequireDefault(require("./assets/dark.svg"));
12
- var _light = _interopRequireDefault(require("./assets/light.svg"));
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ var SIZE = 100;
17
+ var genericErrorStyles = null;
18
+ var id = 'related-links-unavailable-svg';
13
19
  var SpotSearchNoResult = exports.SpotSearchNoResult = function SpotSearchNoResult(props) {
14
- return /*#__PURE__*/_react.default.createElement(_renderSvg.RenderSVG, (0, _extends2.default)({
15
- src: _light.default,
16
- srcDark: _dark.default
17
- }, props));
20
+ return /*#__PURE__*/React.createElement("svg", (0, _extends2.default)({
21
+ "data-testid": id,
22
+ viewBox: "0 0 275 275",
23
+ fill: "none",
24
+ xmlns: "http://www.w3.org/2000/svg"
25
+ }, props, {
26
+ className: (0, _runtime.ax)(["_1bsbwdok _4t3iwdok _1e0c1ule"]),
27
+ style: {
28
+ "--_cjikvn": (0, _runtime.ix)("".concat(SIZE, "px"))
29
+ }
30
+ }), /*#__PURE__*/React.createElement("path", {
31
+ d: "M185.8 91.8398C183.73 87.8698 181.19 83.9198 178.16 79.9998C175.09 76.0298 171.85 72.5298 168.49 69.4898C148.48 51.4098 123.89 49.7498 100.86 62.2398C96.93 64.3698 93.05 66.9098 89.24 69.8498C85.27 72.9198 81.7 76.1798 78.54 79.5898C60.71 98.8298 56.14 123 68.5 146.8C70.59 150.82 73.16 154.83 76.23 158.81C79.26 162.73 82.45 166.18 85.77 169.18C105.65 187.13 130.22 188.8 153.36 176.36C157.46 174.16 161.51 171.53 165.48 168.46C169.29 165.52 172.72 162.39 175.77 159.13C193.68 139.96 198.25 115.7 185.78 91.8398H185.8Z",
32
+ fill: "white"
33
+ }), /*#__PURE__*/React.createElement("path", {
34
+ d: "M123.44 191.28C108.24 191.28 93.7 185.56 81.19 174.27C77.54 170.97 74.05 167.18 70.82 163.01C67.55 158.78 64.72 154.39 62.43 149.97C49.09 124.3 53.13 96.9499 73.52 74.9399C76.97 71.2199 80.85 67.6799 85.05 64.4299C89.1 61.2999 93.32 58.5299 97.59 56.2099C123.97 41.8999 151.49 44.8899 173.08 64.3999C176.77 67.7399 180.3 71.5699 183.58 75.7999C186.81 79.9699 189.6 84.2999 191.88 88.6599C205.36 114.45 201.32 141.84 180.8 163.8C177.49 167.35 173.75 170.74 169.69 173.87C165.48 177.12 161.08 179.99 156.62 182.39C145.57 188.33 134.33 191.27 123.44 191.27V191.28ZM130.69 60.9799C122.04 60.9799 113.08 63.3899 104.12 68.2599C100.5 70.2299 96.9 72.5899 93.42 75.2699C89.81 78.0599 86.49 81.0799 83.56 84.2499C67.1 102.02 63.91 123.11 74.58 143.65C76.5 147.34 78.88 151.04 81.66 154.62C84.39 158.15 87.32 161.34 90.38 164.1C107.54 179.6 128.76 181.81 150.14 170.33C153.94 168.29 157.7 165.84 161.31 163.04C164.79 160.35 167.97 157.46 170.79 154.45C187.34 136.74 190.51 115.63 179.74 95.0099C177.84 91.3699 175.48 87.7199 172.75 84.1899C169.97 80.5999 167 77.3599 163.91 74.5699C153.91 65.5399 142.59 60.9799 130.71 60.9799H130.69Z",
35
+ fill: "#DDDEE1"
36
+ }), /*#__PURE__*/React.createElement("path", {
37
+ d: "M179.96 171C176.42 166.07 172.62 166.1 168.91 168.97C165.43 171.66 164.5 175.3 168.21 180.09L172.45 185.57L184.2 176.48L179.96 171Z",
38
+ fill: "#DDDEE1"
39
+ }), /*#__PURE__*/React.createElement("path", {
40
+ d: "M187.155 174.199L169.513 187.839L202.665 230.717L220.307 217.077L187.155 174.199Z",
41
+ fill: "#DDDEE1"
42
+ }), /*#__PURE__*/React.createElement("path", {
43
+ d: "M184.32 176.391L172.35 185.646L183.592 200.186L195.562 190.932L184.32 176.391Z",
44
+ fill: "#B7B9BE"
45
+ }), /*#__PURE__*/React.createElement("path", {
46
+ d: "M133.191 135.999H123.188V135.365C122.847 128.249 126.886 120.545 132.628 117.392L132.735 117.335C132.891 117.254 133.041 117.16 133.187 117.063C136.32 115.043 138.103 111.565 137.993 107.733C137.884 103.937 135.925 100.598 132.753 98.8051C130.749 97.6711 128.515 97.0723 126.29 97.0723C119.516 97.0723 114.005 102.622 114.005 109.443H104C104 97.0689 113.999 87 126.289 87C130.227 87 134.156 88.0454 137.652 90.0226C143.914 93.5645 147.78 100.077 147.991 107.443C148.204 114.843 144.699 121.603 138.619 125.524C138.21 125.793 137.793 126.041 137.38 126.258C134.995 127.598 132.999 131.723 133.183 134.947L133.191 136V135.999Z",
47
+ fill: "#DDDEE1"
48
+ }), /*#__PURE__*/React.createElement("path", {
49
+ fillRule: "evenodd",
50
+ clipRule: "evenodd",
51
+ d: "M127.222 141.775C127.726 141.691 128.277 141.64 128.84 141.64C129.318 141.64 129.859 141.668 130.429 141.765C133.69 142.3 136.342 144.587 136.986 148.149L136.991 148.175L136.996 148.203C137.078 148.699 137.13 149.24 137.13 149.81C137.13 150.377 137.079 150.924 136.992 151.43L136.99 151.44C136.36 155.039 133.666 157.318 130.418 157.847C129.857 157.94 129.334 157.97 128.84 157.97C128.267 157.97 127.732 157.918 127.243 157.839L127.241 157.839C123.977 157.31 121.312 155.027 120.665 151.466L120.659 151.437L120.654 151.408C120.573 150.919 120.52 150.387 120.52 149.81C120.52 149.24 120.572 148.699 120.654 148.203L120.659 148.174L120.665 148.145C121.315 144.567 123.99 142.316 127.219 141.775L127.222 141.775Z",
52
+ fill: "#DDDEE1"
53
+ }));
18
54
  };
@@ -16,10 +16,7 @@ var RelatedLinksUnavailableView = function RelatedLinksUnavailableView() {
16
16
  var intl = (0, _reactIntlNext.useIntl)();
17
17
  return (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v2') ? /*#__PURE__*/_react.default.createElement(_EmptyState.EmptyState, {
18
18
  renderImage: function renderImage() {
19
- return /*#__PURE__*/_react.default.createElement(_searchNoResult.SpotSearchNoResult, {
20
- size: 'large',
21
- alt: intl.formatMessage(_messages.messages.related_links_modal_unavailable_title)
22
- });
19
+ return /*#__PURE__*/_react.default.createElement(_searchNoResult.SpotSearchNoResult, null);
23
20
  },
24
21
  header: intl.formatMessage(_messages.messages.related_links_modal_unavailable_title),
25
22
  description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_modal_unavailable_description)
@@ -0,0 +1,15 @@
1
+ import { useMemo } from 'react';
2
+ import { useSmartLinkContext } from '@atlaskit/link-provider';
3
+ export const useControlDataExportConfig = () => {
4
+ const {
5
+ connections,
6
+ product,
7
+ shouldControlDataExport
8
+ } = useSmartLinkContext();
9
+ return useMemo(() => ({
10
+ baseUrl: connections.client.baseUrlOverride,
11
+ envKey: connections.client.envKey,
12
+ product,
13
+ shouldControlDataExport
14
+ }), [connections.client.baseUrlOverride, connections.client.envKey, product, shouldControlDataExport]);
15
+ };
@@ -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: "36.3.0"
5
+ packageVersion: "36.5.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,4 @@
1
+ export const getIsDataExportEnabled = (shouldControlDataExport = false, response) => {
2
+ var _response$meta, _response$meta$suppor;
3
+ return Boolean(shouldControlDataExport && (response === null || response === void 0 ? void 0 : (_response$meta = response.meta) === null || _response$meta === void 0 ? void 0 : (_response$meta$suppor = _response$meta.supportedFeature) === null || _response$meta$suppor === void 0 ? void 0 : _response$meta$suppor.includes('ExportBlocked')));
4
+ };
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { useControlDataExportConfig } from '../../state/hooks/use-control-data-export-config';
5
+ import { getIsDataExportEnabled } from '../../utils/should-data-export';
3
6
  import { handleClickCommon } from '../common/utils';
4
7
  import { CardLinkView } from '../LinkView';
5
8
  import ErroredView from './views/ErroredView';
@@ -35,6 +38,9 @@ export const BlockCard = ({
35
38
  renderers,
36
39
  actionOptions
37
40
  };
41
+ const {
42
+ shouldControlDataExport = false
43
+ } = useControlDataExportConfig();
38
44
  switch (status) {
39
45
  case 'pending':
40
46
  case 'resolving':
@@ -42,6 +48,13 @@ export const BlockCard = ({
42
48
  testId: "smart-block-resolving-view"
43
49
  }));
44
50
  case 'resolved':
51
+ if (fg('platform_smart_links_controlled_dsp_export_view')) {
52
+ if (getIsDataExportEnabled(shouldControlDataExport, cardState.details)) {
53
+ return /*#__PURE__*/React.createElement(UnauthorisedView, _extends({}, blockCardProps, {
54
+ onAuthorize: handleAuthorize
55
+ }));
56
+ }
57
+ }
45
58
  return /*#__PURE__*/React.createElement(ResolvedView, blockCardProps);
46
59
  case 'unauthorized':
47
60
  return /*#__PURE__*/React.createElement(UnauthorisedView, _extends({}, blockCardProps, {
@@ -1,11 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
5
6
  import { extractEmbedProps } from '../../extractors/embed';
6
7
  import { extractInlineProps } from '../../extractors/inline';
7
8
  import { getExtensionKey, hasAuthScopeOverrides } from '../../state/helpers';
9
+ import { useControlDataExportConfig } from '../../state/hooks/use-control-data-export-config';
8
10
  import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
11
+ import { getIsDataExportEnabled } from '../../utils/should-data-export';
9
12
  import BlockCardResolvedView from '../BlockCard/views/ResolvedView';
10
13
  import { InlineCardResolvedView } from '../InlineCard/ResolvedView';
11
14
  import { EmbedCardErroredView } from './views/ErroredView';
@@ -44,6 +47,9 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
44
47
  const meta = details && details.meta;
45
48
  const extensionKey = getExtensionKey(details);
46
49
  const isProductIntegrationSupported = hasAuthScopeOverrides(details);
50
+ const {
51
+ shouldControlDataExport = false
52
+ } = useControlDataExportConfig();
47
53
  switch (status) {
48
54
  case 'pending':
49
55
  case 'resolving':
@@ -67,6 +73,23 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
67
73
  aspectRatio: (_resolvedViewProps$pr = resolvedViewProps.preview) === null || _resolvedViewProps$pr === void 0 ? void 0 : _resolvedViewProps$pr.aspectRatio
68
74
  });
69
75
  }
76
+ if (fg('platform_smart_links_controlled_dsp_export_view')) {
77
+ if (getIsDataExportEnabled(shouldControlDataExport, cardState.details)) {
78
+ const unauthViewProps = extractEmbedProps(data, meta, platform);
79
+ return /*#__PURE__*/React.createElement(UnauthorizedView, {
80
+ context: unauthViewProps.context,
81
+ extensionKey: extensionKey,
82
+ frameStyle: frameStyle,
83
+ isProductIntegrationSupported: isProductIntegrationSupported,
84
+ inheritDimensions: inheritDimensions,
85
+ isSelected: isSelected,
86
+ onAuthorize: handleAuthorize,
87
+ onClick: handleFrameClick,
88
+ testId: testId,
89
+ url: unauthViewProps.link
90
+ });
91
+ }
92
+ }
70
93
  if (resolvedViewProps.preview) {
71
94
  return /*#__PURE__*/React.createElement(EmbedCardResolvedView, _extends({}, resolvedViewProps, {
72
95
  isSelected: isSelected,
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "36.3.0",
13
+ packageVersion: "36.5.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -0,0 +1,3 @@
1
+ ._1bsb53f4{width:75pt}
2
+ ._1e0c1ule{display:block}
3
+ ._4t3i53f4{height:75pt}
@@ -1,11 +1,41 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import { RenderSVG } from '../../../../../common/render-svg';
4
- import Dark from './assets/dark.svg';
5
- import Light from './assets/light.svg';
3
+ import "./index.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ const SIZE = 100;
7
+ const genericErrorStyles = null;
8
+ const id = 'related-links-unavailable-svg';
6
9
  export const SpotSearchNoResult = props => {
7
- return /*#__PURE__*/React.createElement(RenderSVG, _extends({
8
- src: Light,
9
- srcDark: Dark
10
- }, props));
10
+ return /*#__PURE__*/React.createElement("svg", _extends({
11
+ "data-testid": id,
12
+ viewBox: "0 0 275 275",
13
+ fill: "none",
14
+ xmlns: "http://www.w3.org/2000/svg"
15
+ }, props, {
16
+ className: ax(["_1bsb53f4 _4t3i53f4 _1e0c1ule"])
17
+ }), /*#__PURE__*/React.createElement("path", {
18
+ d: "M185.8 91.8398C183.73 87.8698 181.19 83.9198 178.16 79.9998C175.09 76.0298 171.85 72.5298 168.49 69.4898C148.48 51.4098 123.89 49.7498 100.86 62.2398C96.93 64.3698 93.05 66.9098 89.24 69.8498C85.27 72.9198 81.7 76.1798 78.54 79.5898C60.71 98.8298 56.14 123 68.5 146.8C70.59 150.82 73.16 154.83 76.23 158.81C79.26 162.73 82.45 166.18 85.77 169.18C105.65 187.13 130.22 188.8 153.36 176.36C157.46 174.16 161.51 171.53 165.48 168.46C169.29 165.52 172.72 162.39 175.77 159.13C193.68 139.96 198.25 115.7 185.78 91.8398H185.8Z",
19
+ fill: "white"
20
+ }), /*#__PURE__*/React.createElement("path", {
21
+ d: "M123.44 191.28C108.24 191.28 93.7 185.56 81.19 174.27C77.54 170.97 74.05 167.18 70.82 163.01C67.55 158.78 64.72 154.39 62.43 149.97C49.09 124.3 53.13 96.9499 73.52 74.9399C76.97 71.2199 80.85 67.6799 85.05 64.4299C89.1 61.2999 93.32 58.5299 97.59 56.2099C123.97 41.8999 151.49 44.8899 173.08 64.3999C176.77 67.7399 180.3 71.5699 183.58 75.7999C186.81 79.9699 189.6 84.2999 191.88 88.6599C205.36 114.45 201.32 141.84 180.8 163.8C177.49 167.35 173.75 170.74 169.69 173.87C165.48 177.12 161.08 179.99 156.62 182.39C145.57 188.33 134.33 191.27 123.44 191.27V191.28ZM130.69 60.9799C122.04 60.9799 113.08 63.3899 104.12 68.2599C100.5 70.2299 96.9 72.5899 93.42 75.2699C89.81 78.0599 86.49 81.0799 83.56 84.2499C67.1 102.02 63.91 123.11 74.58 143.65C76.5 147.34 78.88 151.04 81.66 154.62C84.39 158.15 87.32 161.34 90.38 164.1C107.54 179.6 128.76 181.81 150.14 170.33C153.94 168.29 157.7 165.84 161.31 163.04C164.79 160.35 167.97 157.46 170.79 154.45C187.34 136.74 190.51 115.63 179.74 95.0099C177.84 91.3699 175.48 87.7199 172.75 84.1899C169.97 80.5999 167 77.3599 163.91 74.5699C153.91 65.5399 142.59 60.9799 130.71 60.9799H130.69Z",
22
+ fill: "#DDDEE1"
23
+ }), /*#__PURE__*/React.createElement("path", {
24
+ d: "M179.96 171C176.42 166.07 172.62 166.1 168.91 168.97C165.43 171.66 164.5 175.3 168.21 180.09L172.45 185.57L184.2 176.48L179.96 171Z",
25
+ fill: "#DDDEE1"
26
+ }), /*#__PURE__*/React.createElement("path", {
27
+ d: "M187.155 174.199L169.513 187.839L202.665 230.717L220.307 217.077L187.155 174.199Z",
28
+ fill: "#DDDEE1"
29
+ }), /*#__PURE__*/React.createElement("path", {
30
+ d: "M184.32 176.391L172.35 185.646L183.592 200.186L195.562 190.932L184.32 176.391Z",
31
+ fill: "#B7B9BE"
32
+ }), /*#__PURE__*/React.createElement("path", {
33
+ d: "M133.191 135.999H123.188V135.365C122.847 128.249 126.886 120.545 132.628 117.392L132.735 117.335C132.891 117.254 133.041 117.16 133.187 117.063C136.32 115.043 138.103 111.565 137.993 107.733C137.884 103.937 135.925 100.598 132.753 98.8051C130.749 97.6711 128.515 97.0723 126.29 97.0723C119.516 97.0723 114.005 102.622 114.005 109.443H104C104 97.0689 113.999 87 126.289 87C130.227 87 134.156 88.0454 137.652 90.0226C143.914 93.5645 147.78 100.077 147.991 107.443C148.204 114.843 144.699 121.603 138.619 125.524C138.21 125.793 137.793 126.041 137.38 126.258C134.995 127.598 132.999 131.723 133.183 134.947L133.191 136V135.999Z",
34
+ fill: "#DDDEE1"
35
+ }), /*#__PURE__*/React.createElement("path", {
36
+ fillRule: "evenodd",
37
+ clipRule: "evenodd",
38
+ d: "M127.222 141.775C127.726 141.691 128.277 141.64 128.84 141.64C129.318 141.64 129.859 141.668 130.429 141.765C133.69 142.3 136.342 144.587 136.986 148.149L136.991 148.175L136.996 148.203C137.078 148.699 137.13 149.24 137.13 149.81C137.13 150.377 137.079 150.924 136.992 151.43L136.99 151.44C136.36 155.039 133.666 157.318 130.418 157.847C129.857 157.94 129.334 157.97 128.84 157.97C128.267 157.97 127.732 157.918 127.243 157.839L127.241 157.839C123.977 157.31 121.312 155.027 120.665 151.466L120.659 151.437L120.654 151.408C120.573 150.919 120.52 150.387 120.52 149.81C120.52 149.24 120.572 148.699 120.654 148.203L120.659 148.174L120.665 148.145C121.315 144.567 123.99 142.316 127.219 141.775L127.222 141.775Z",
39
+ fill: "#DDDEE1"
40
+ }));
11
41
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FormattedMessage, useIntl } from 'react-intl-next';
3
- import { fg } from "@atlaskit/platform-feature-flags";
4
- import { GenericErrorIcon } from "../../../../common/ui/icons/generic-error-icon";
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { GenericErrorIcon } from '../../../../common/ui/icons/generic-error-icon';
5
5
  import { messages } from '../../../../messages';
6
6
  import { EmptyState } from '../../components/EmptyState';
7
7
  import { ErrorSVG } from './error-svg';
@@ -8,10 +8,7 @@ import { UnavailableSVG } from './unavailable-svg';
8
8
  const RelatedLinksUnavailableView = () => {
9
9
  const intl = useIntl();
10
10
  return fg('platform-linking-visual-refresh-v2') ? /*#__PURE__*/React.createElement(EmptyState, {
11
- renderImage: () => /*#__PURE__*/React.createElement(SpotSearchNoResult, {
12
- size: 'large',
13
- alt: intl.formatMessage(messages.related_links_modal_unavailable_title)
14
- }),
11
+ renderImage: () => /*#__PURE__*/React.createElement(SpotSearchNoResult, null),
15
12
  header: intl.formatMessage(messages.related_links_modal_unavailable_title),
16
13
  description: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_unavailable_description)
17
14
  }) : /*#__PURE__*/React.createElement(EmptyState, {
@@ -0,0 +1,16 @@
1
+ import { useMemo } from 'react';
2
+ import { useSmartLinkContext } from '@atlaskit/link-provider';
3
+ export var useControlDataExportConfig = function useControlDataExportConfig() {
4
+ var _useSmartLinkContext = useSmartLinkContext(),
5
+ connections = _useSmartLinkContext.connections,
6
+ product = _useSmartLinkContext.product,
7
+ shouldControlDataExport = _useSmartLinkContext.shouldControlDataExport;
8
+ return useMemo(function () {
9
+ return {
10
+ baseUrl: connections.client.baseUrlOverride,
11
+ envKey: connections.client.envKey,
12
+ product: product,
13
+ shouldControlDataExport: shouldControlDataExport
14
+ };
15
+ }, [connections.client.baseUrlOverride, connections.client.envKey, product, shouldControlDataExport]);
16
+ };
@@ -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: "36.3.0"
7
+ packageVersion: "36.5.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,6 @@
1
+ export var getIsDataExportEnabled = function getIsDataExportEnabled() {
2
+ var _response$meta;
3
+ var shouldControlDataExport = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
4
+ var response = arguments.length > 1 ? arguments[1] : undefined;
5
+ return Boolean(shouldControlDataExport && (response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeature) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('ExportBlocked')));
6
+ };
@@ -1,5 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { useControlDataExportConfig } from '../../state/hooks/use-control-data-export-config';
5
+ import { getIsDataExportEnabled } from '../../utils/should-data-export';
3
6
  import { handleClickCommon } from '../common/utils';
4
7
  import { CardLinkView } from '../LinkView';
5
8
  import ErroredView from './views/ErroredView';
@@ -34,6 +37,9 @@ export var BlockCard = function BlockCard(_ref) {
34
37
  renderers: renderers,
35
38
  actionOptions: actionOptions
36
39
  };
40
+ var _useControlDataExport = useControlDataExportConfig(),
41
+ _useControlDataExport2 = _useControlDataExport.shouldControlDataExport,
42
+ shouldControlDataExport = _useControlDataExport2 === void 0 ? false : _useControlDataExport2;
37
43
  switch (status) {
38
44
  case 'pending':
39
45
  case 'resolving':
@@ -41,6 +47,13 @@ export var BlockCard = function BlockCard(_ref) {
41
47
  testId: "smart-block-resolving-view"
42
48
  }));
43
49
  case 'resolved':
50
+ if (fg('platform_smart_links_controlled_dsp_export_view')) {
51
+ if (getIsDataExportEnabled(shouldControlDataExport, cardState.details)) {
52
+ return /*#__PURE__*/React.createElement(UnauthorisedView, _extends({}, blockCardProps, {
53
+ onAuthorize: handleAuthorize
54
+ }));
55
+ }
56
+ }
44
57
  return /*#__PURE__*/React.createElement(ResolvedView, blockCardProps);
45
58
  case 'unauthorized':
46
59
  return /*#__PURE__*/React.createElement(UnauthorisedView, _extends({}, blockCardProps, {
@@ -1,11 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
5
6
  import { extractEmbedProps } from '../../extractors/embed';
6
7
  import { extractInlineProps } from '../../extractors/inline';
7
8
  import { getExtensionKey, hasAuthScopeOverrides } from '../../state/helpers';
9
+ import { useControlDataExportConfig } from '../../state/hooks/use-control-data-export-config';
8
10
  import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
11
+ import { getIsDataExportEnabled } from '../../utils/should-data-export';
9
12
  import BlockCardResolvedView from '../BlockCard/views/ResolvedView';
10
13
  import { InlineCardResolvedView } from '../InlineCard/ResolvedView';
11
14
  import { EmbedCardErroredView } from './views/ErroredView';
@@ -40,6 +43,9 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
40
43
  var meta = details && details.meta;
41
44
  var extensionKey = getExtensionKey(details);
42
45
  var isProductIntegrationSupported = hasAuthScopeOverrides(details);
46
+ var _useControlDataExport = useControlDataExportConfig(),
47
+ _useControlDataExport2 = _useControlDataExport.shouldControlDataExport,
48
+ shouldControlDataExport = _useControlDataExport2 === void 0 ? false : _useControlDataExport2;
43
49
  switch (status) {
44
50
  case 'pending':
45
51
  case 'resolving':
@@ -63,6 +69,23 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
63
69
  aspectRatio: (_resolvedViewProps$pr = resolvedViewProps.preview) === null || _resolvedViewProps$pr === void 0 ? void 0 : _resolvedViewProps$pr.aspectRatio
64
70
  });
65
71
  }
72
+ if (fg('platform_smart_links_controlled_dsp_export_view')) {
73
+ if (getIsDataExportEnabled(shouldControlDataExport, cardState.details)) {
74
+ var unauthViewProps = extractEmbedProps(data, meta, platform);
75
+ return /*#__PURE__*/React.createElement(UnauthorizedView, {
76
+ context: unauthViewProps.context,
77
+ extensionKey: extensionKey,
78
+ frameStyle: frameStyle,
79
+ isProductIntegrationSupported: isProductIntegrationSupported,
80
+ inheritDimensions: inheritDimensions,
81
+ isSelected: isSelected,
82
+ onAuthorize: handleAuthorize,
83
+ onClick: handleFrameClick,
84
+ testId: testId,
85
+ url: unauthViewProps.link
86
+ });
87
+ }
88
+ }
66
89
  if (resolvedViewProps.preview) {
67
90
  return /*#__PURE__*/React.createElement(EmbedCardResolvedView, _extends({}, resolvedViewProps, {
68
91
  isSelected: isSelected,
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "36.3.0",
16
+ packageVersion: "36.5.0",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -0,0 +1,3 @@
1
+ ._1bsbwdok{width:var(--_cjikvn)}
2
+ ._1e0c1ule{display:block}
3
+ ._4t3iwdok{height:var(--_cjikvn)}
@@ -1,11 +1,44 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import { RenderSVG } from '../../../../../common/render-svg';
4
- import Dark from './assets/dark.svg';
5
- import Light from './assets/light.svg';
3
+ import "./index.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ var SIZE = 100;
7
+ var genericErrorStyles = null;
8
+ var id = 'related-links-unavailable-svg';
6
9
  export var SpotSearchNoResult = function SpotSearchNoResult(props) {
7
- return /*#__PURE__*/React.createElement(RenderSVG, _extends({
8
- src: Light,
9
- srcDark: Dark
10
- }, props));
10
+ return /*#__PURE__*/React.createElement("svg", _extends({
11
+ "data-testid": id,
12
+ viewBox: "0 0 275 275",
13
+ fill: "none",
14
+ xmlns: "http://www.w3.org/2000/svg"
15
+ }, props, {
16
+ className: ax(["_1bsbwdok _4t3iwdok _1e0c1ule"]),
17
+ style: {
18
+ "--_cjikvn": ix("".concat(SIZE, "px"))
19
+ }
20
+ }), /*#__PURE__*/React.createElement("path", {
21
+ d: "M185.8 91.8398C183.73 87.8698 181.19 83.9198 178.16 79.9998C175.09 76.0298 171.85 72.5298 168.49 69.4898C148.48 51.4098 123.89 49.7498 100.86 62.2398C96.93 64.3698 93.05 66.9098 89.24 69.8498C85.27 72.9198 81.7 76.1798 78.54 79.5898C60.71 98.8298 56.14 123 68.5 146.8C70.59 150.82 73.16 154.83 76.23 158.81C79.26 162.73 82.45 166.18 85.77 169.18C105.65 187.13 130.22 188.8 153.36 176.36C157.46 174.16 161.51 171.53 165.48 168.46C169.29 165.52 172.72 162.39 175.77 159.13C193.68 139.96 198.25 115.7 185.78 91.8398H185.8Z",
22
+ fill: "white"
23
+ }), /*#__PURE__*/React.createElement("path", {
24
+ d: "M123.44 191.28C108.24 191.28 93.7 185.56 81.19 174.27C77.54 170.97 74.05 167.18 70.82 163.01C67.55 158.78 64.72 154.39 62.43 149.97C49.09 124.3 53.13 96.9499 73.52 74.9399C76.97 71.2199 80.85 67.6799 85.05 64.4299C89.1 61.2999 93.32 58.5299 97.59 56.2099C123.97 41.8999 151.49 44.8899 173.08 64.3999C176.77 67.7399 180.3 71.5699 183.58 75.7999C186.81 79.9699 189.6 84.2999 191.88 88.6599C205.36 114.45 201.32 141.84 180.8 163.8C177.49 167.35 173.75 170.74 169.69 173.87C165.48 177.12 161.08 179.99 156.62 182.39C145.57 188.33 134.33 191.27 123.44 191.27V191.28ZM130.69 60.9799C122.04 60.9799 113.08 63.3899 104.12 68.2599C100.5 70.2299 96.9 72.5899 93.42 75.2699C89.81 78.0599 86.49 81.0799 83.56 84.2499C67.1 102.02 63.91 123.11 74.58 143.65C76.5 147.34 78.88 151.04 81.66 154.62C84.39 158.15 87.32 161.34 90.38 164.1C107.54 179.6 128.76 181.81 150.14 170.33C153.94 168.29 157.7 165.84 161.31 163.04C164.79 160.35 167.97 157.46 170.79 154.45C187.34 136.74 190.51 115.63 179.74 95.0099C177.84 91.3699 175.48 87.7199 172.75 84.1899C169.97 80.5999 167 77.3599 163.91 74.5699C153.91 65.5399 142.59 60.9799 130.71 60.9799H130.69Z",
25
+ fill: "#DDDEE1"
26
+ }), /*#__PURE__*/React.createElement("path", {
27
+ d: "M179.96 171C176.42 166.07 172.62 166.1 168.91 168.97C165.43 171.66 164.5 175.3 168.21 180.09L172.45 185.57L184.2 176.48L179.96 171Z",
28
+ fill: "#DDDEE1"
29
+ }), /*#__PURE__*/React.createElement("path", {
30
+ d: "M187.155 174.199L169.513 187.839L202.665 230.717L220.307 217.077L187.155 174.199Z",
31
+ fill: "#DDDEE1"
32
+ }), /*#__PURE__*/React.createElement("path", {
33
+ d: "M184.32 176.391L172.35 185.646L183.592 200.186L195.562 190.932L184.32 176.391Z",
34
+ fill: "#B7B9BE"
35
+ }), /*#__PURE__*/React.createElement("path", {
36
+ d: "M133.191 135.999H123.188V135.365C122.847 128.249 126.886 120.545 132.628 117.392L132.735 117.335C132.891 117.254 133.041 117.16 133.187 117.063C136.32 115.043 138.103 111.565 137.993 107.733C137.884 103.937 135.925 100.598 132.753 98.8051C130.749 97.6711 128.515 97.0723 126.29 97.0723C119.516 97.0723 114.005 102.622 114.005 109.443H104C104 97.0689 113.999 87 126.289 87C130.227 87 134.156 88.0454 137.652 90.0226C143.914 93.5645 147.78 100.077 147.991 107.443C148.204 114.843 144.699 121.603 138.619 125.524C138.21 125.793 137.793 126.041 137.38 126.258C134.995 127.598 132.999 131.723 133.183 134.947L133.191 136V135.999Z",
37
+ fill: "#DDDEE1"
38
+ }), /*#__PURE__*/React.createElement("path", {
39
+ fillRule: "evenodd",
40
+ clipRule: "evenodd",
41
+ d: "M127.222 141.775C127.726 141.691 128.277 141.64 128.84 141.64C129.318 141.64 129.859 141.668 130.429 141.765C133.69 142.3 136.342 144.587 136.986 148.149L136.991 148.175L136.996 148.203C137.078 148.699 137.13 149.24 137.13 149.81C137.13 150.377 137.079 150.924 136.992 151.43L136.99 151.44C136.36 155.039 133.666 157.318 130.418 157.847C129.857 157.94 129.334 157.97 128.84 157.97C128.267 157.97 127.732 157.918 127.243 157.839L127.241 157.839C123.977 157.31 121.312 155.027 120.665 151.466L120.659 151.437L120.654 151.408C120.573 150.919 120.52 150.387 120.52 149.81C120.52 149.24 120.572 148.699 120.654 148.203L120.659 148.174L120.665 148.145C121.315 144.567 123.99 142.316 127.219 141.775L127.222 141.775Z",
42
+ fill: "#DDDEE1"
43
+ }));
11
44
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FormattedMessage, useIntl } from 'react-intl-next';
3
- import { fg } from "@atlaskit/platform-feature-flags";
4
- import { GenericErrorIcon } from "../../../../common/ui/icons/generic-error-icon";
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { GenericErrorIcon } from '../../../../common/ui/icons/generic-error-icon';
5
5
  import { messages } from '../../../../messages';
6
6
  import { EmptyState } from '../../components/EmptyState';
7
7
  import { ErrorSVG } from './error-svg';
@@ -9,10 +9,7 @@ var RelatedLinksUnavailableView = function RelatedLinksUnavailableView() {
9
9
  var intl = useIntl();
10
10
  return fg('platform-linking-visual-refresh-v2') ? /*#__PURE__*/React.createElement(EmptyState, {
11
11
  renderImage: function renderImage() {
12
- return /*#__PURE__*/React.createElement(SpotSearchNoResult, {
13
- size: 'large',
14
- alt: intl.formatMessage(messages.related_links_modal_unavailable_title)
15
- });
12
+ return /*#__PURE__*/React.createElement(SpotSearchNoResult, null);
16
13
  },
17
14
  header: intl.formatMessage(messages.related_links_modal_unavailable_title),
18
15
  description: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_unavailable_description)
@@ -0,0 +1,2 @@
1
+ import { type ControlDataExportConfig } from './types';
2
+ export declare const useControlDataExportConfig: () => ControlDataExportConfig;
@@ -0,0 +1,7 @@
1
+ import { type EnvironmentsKeys, type ProductType } from '@atlaskit/linking-common';
2
+ export type ControlDataExportConfig = {
3
+ baseUrl?: string;
4
+ envKey?: EnvironmentsKeys;
5
+ product?: ProductType;
6
+ shouldControlDataExport?: boolean;
7
+ };
@@ -0,0 +1,2 @@
1
+ import type { JsonLd } from '@atlaskit/json-ld-types';
2
+ export declare const getIsDataExportEnabled: (shouldControlDataExport?: boolean, response?: JsonLd.Response) => boolean;
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- import { RenderSVGProps } from '../../../../../common/render-svg';
3
- export declare const SpotSearchNoResult: (props: RenderSVGProps) => React.JSX.Element;
1
+ /// <reference types="react" />
2
+ export declare const SpotSearchNoResult: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { type ControlDataExportConfig } from './types';
2
+ export declare const useControlDataExportConfig: () => ControlDataExportConfig;
@@ -0,0 +1,7 @@
1
+ import { type EnvironmentsKeys, type ProductType } from '@atlaskit/linking-common';
2
+ export type ControlDataExportConfig = {
3
+ baseUrl?: string;
4
+ envKey?: EnvironmentsKeys;
5
+ product?: ProductType;
6
+ shouldControlDataExport?: boolean;
7
+ };
@@ -0,0 +1,2 @@
1
+ import type { JsonLd } from '@atlaskit/json-ld-types';
2
+ export declare const getIsDataExportEnabled: (shouldControlDataExport?: boolean, response?: JsonLd.Response) => boolean;
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- import { RenderSVGProps } from '../../../../../common/render-svg';
3
- export declare const SpotSearchNoResult: (props: RenderSVGProps) => React.JSX.Element;
1
+ /// <reference types="react" />
2
+ export declare const SpotSearchNoResult: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "36.3.0",
3
+ "version": "36.5.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/dropdown-menu": "^14.0.0",
39
39
  "@atlaskit/form": "^12.0.0",
40
40
  "@atlaskit/frontend-utilities": "^3.0.0",
41
- "@atlaskit/heading": "^5.1.0",
41
+ "@atlaskit/heading": "^5.2.0",
42
42
  "@atlaskit/icon": "^25.5.0",
43
43
  "@atlaskit/icon-file-type": "^7.0.0",
44
44
  "@atlaskit/icon-lab": "^4.6.0",
@@ -50,9 +50,9 @@
50
50
  "@atlaskit/link": "^3.1.0",
51
51
  "@atlaskit/link-analytics": "^9.1.0",
52
52
  "@atlaskit/link-client-extension": "^4.0.0",
53
- "@atlaskit/link-extractors": "^2.0.0",
53
+ "@atlaskit/link-extractors": "^2.1.0",
54
54
  "@atlaskit/linking-common": "^8.0.0",
55
- "@atlaskit/linking-types": "^9.7.0",
55
+ "@atlaskit/linking-types": "^9.8.0",
56
56
  "@atlaskit/logo": "^16.0.0",
57
57
  "@atlaskit/lozenge": "^12.2.0",
58
58
  "@atlaskit/menu": "^3.2.0",
@@ -60,9 +60,9 @@
60
60
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
61
61
  "@atlaskit/platform-feature-flags": "^1.1.0",
62
62
  "@atlaskit/popup": "^4.0.0",
63
- "@atlaskit/primitives": "^14.3.0",
63
+ "@atlaskit/primitives": "^14.4.0",
64
64
  "@atlaskit/section-message": "^8.2.0",
65
- "@atlaskit/select": "^20.2.0",
65
+ "@atlaskit/select": "^20.3.0",
66
66
  "@atlaskit/spinner": "^18.0.0",
67
67
  "@atlaskit/textarea": "^8.0.0",
68
68
  "@atlaskit/textfield": "^8.0.0",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^3.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/link-provider": "^2.0.0",
88
+ "@atlaskit/link-provider": "^2.1.0",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",
91
91
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -212,6 +212,9 @@
212
212
  "fix_a11y_violation_in_hover_card_trigger": {
213
213
  "type": "boolean"
214
214
  },
215
+ "platform_smart_links_controlled_dsp_export_view": {
216
+ "type": "boolean"
217
+ },
215
218
  "platform-linking-visual-refresh-v2": {
216
219
  "type": "boolean"
217
220
  }