@atlaskit/smart-card 26.39.0 → 26.40.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,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.40.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#42280](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42280) [`df99143a991`](https://bitbucket.org/atlassian/atlassian-frontend/commits/df99143a991) - [ux] Update block card not found view to improve cross join (behind feature flag)
8
+
3
9
  ## 26.39.0
4
10
 
5
11
  ### Minor Changes
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "26.39.0"
25
+ packageVersion: "26.40.0"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -76,6 +76,7 @@ var _ErroredView = require("./views/ErroredView");
76
76
  var _FlexibleResolvedView = _interopRequireDefault(require("./views/flexible/FlexibleResolvedView"));
77
77
  var _FlexibleUnauthorisedView = _interopRequireDefault(require("./views/flexible/FlexibleUnauthorisedView"));
78
78
  var _FlexibleNotFoundView = _interopRequireDefault(require("./views/flexible/FlexibleNotFoundView"));
79
+ var _FlexibleNotFoundViewOld = _interopRequireDefault(require("./views/flexible/FlexibleNotFoundViewOld"));
79
80
  var _FlexibleForbiddenView = _interopRequireDefault(require("./views/flexible/FlexibleForbiddenView"));
80
81
  var _FlexibleForbiddenViewOld = _interopRequireDefault(require("./views/flexible/FlexibleForbiddenViewOld"));
81
82
  var _FlexibleErroredView = _interopRequireDefault(require("./views/flexible/FlexibleErroredView"));
@@ -150,7 +151,9 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
150
151
  onAuthorize: handleAuthorize
151
152
  }));
152
153
  case 'not_found':
153
- return (0, _react.jsx)(_FlexibleNotFoundView.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
154
+ return (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.cross-join') ? (0, _react.jsx)(_FlexibleNotFoundView.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
155
+ onAuthorize: handleAuthorize
156
+ })) : (0, _react.jsx)(_FlexibleNotFoundViewOld.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
154
157
  onAuthorize: handleAuthorize
155
158
  }));
156
159
  case 'fallback':
@@ -1,20 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = _interopRequireDefault(require("react"));
11
- var _messages = require("../../../../messages");
12
- var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
11
+ var _lock = _interopRequireDefault(require("@atlaskit/icon/glyph/lock"));
12
+ var _linkExtractors = require("@atlaskit/link-extractors");
13
13
  var _colors = require("@atlaskit/theme/colors");
14
+ var _react = _interopRequireWildcard(require("react"));
15
+ var _reactIntlNext = require("react-intl-next");
16
+ var _messages = require("../../../../messages");
14
17
  var _text = _interopRequireDefault(require("../../../FlexibleCard/components/elements/text"));
15
18
  var _unresolvedView = _interopRequireDefault(require("./unresolved-view"));
16
19
  var _withFlexibleUIBlockCardStyle = require("./utils/withFlexibleUIBlockCardStyle");
17
20
  var _excluded = ["testId"];
21
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
23
  /**
19
24
  * This view represents a Block Card with a 'Not_Found' status.
20
25
  *
@@ -22,20 +27,38 @@ var _excluded = ["testId"];
22
27
  * @see FlexibleCardProps
23
28
  */
24
29
  var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
30
+ var _cardState$details2;
25
31
  var _ref$testId = _ref.testId,
26
32
  testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
27
33
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
34
+ var intl = (0, _reactIntlNext.useIntl)();
35
+ var cardState = props.cardState;
36
+ var product = (0, _react.useMemo)(function () {
37
+ var _cardState$details, _provider$text;
38
+ var provider = (0, _linkExtractors.extractProvider)(cardState === null || cardState === void 0 || (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
39
+ return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
40
+ }, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
41
+ var title = (0, _react.useMemo)(function () {
42
+ return intl.formatMessage(_messages.messages.not_found_title_crossjoin, {
43
+ product: product
44
+ });
45
+ }, [intl, product]);
46
+ var description = (0, _react.useMemo)(function () {
47
+ return {
48
+ descriptor: _messages.messages.not_found_description_crossjoin
49
+ };
50
+ }, []);
28
51
  return /*#__PURE__*/_react.default.createElement(_unresolvedView.default, (0, _extends2.default)({}, props, {
29
- testId: testId
30
- }), /*#__PURE__*/_react.default.createElement(_warning.default, {
31
- label: "not-found-warning-icon",
52
+ showPreview: true,
53
+ testId: testId,
54
+ title: title
55
+ }), /*#__PURE__*/_react.default.createElement(_lock.default, {
56
+ label: "not-found-lock-icon",
32
57
  size: "small",
33
- primaryColor: "var(--ds-icon-warning, ".concat(_colors.R300, ")"),
34
- testId: "".concat(testId, "-warning-icon")
58
+ primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
59
+ testId: "".concat(testId, "-lock-icon")
35
60
  }), /*#__PURE__*/_react.default.createElement(_text.default, {
36
- message: {
37
- descriptor: _messages.messages.not_found_description
38
- },
61
+ message: description,
39
62
  testId: "".concat(testId, "-message")
40
63
  }));
41
64
  };
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _messages = require("../../../../messages");
12
+ var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
13
+ var _colors = require("@atlaskit/theme/colors");
14
+ var _text = _interopRequireDefault(require("../../../FlexibleCard/components/elements/text"));
15
+ var _unresolvedView = _interopRequireDefault(require("./unresolved-view"));
16
+ var _withFlexibleUIBlockCardStyle = require("./utils/withFlexibleUIBlockCardStyle");
17
+ var _excluded = ["testId"];
18
+ /**
19
+ * This view represents a Block Card with a 'Not_Found' status.
20
+ *
21
+ * @see SmartLinkStatus
22
+ * @see FlexibleCardProps
23
+ */
24
+ var FlexibleNotFoundViewOld = function FlexibleNotFoundViewOld(_ref) {
25
+ var _ref$testId = _ref.testId,
26
+ testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
27
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
28
+ return /*#__PURE__*/_react.default.createElement(_unresolvedView.default, (0, _extends2.default)({}, props, {
29
+ testId: testId
30
+ }), /*#__PURE__*/_react.default.createElement(_warning.default, {
31
+ label: "not-found-warning-icon",
32
+ size: "small",
33
+ primaryColor: "var(--ds-icon-warning, ".concat(_colors.R300, ")"),
34
+ testId: "".concat(testId, "-warning-icon")
35
+ }), /*#__PURE__*/_react.default.createElement(_text.default, {
36
+ message: {
37
+ descriptor: _messages.messages.not_found_description
38
+ },
39
+ testId: "".concat(testId, "-message")
40
+ }));
41
+ };
42
+
43
+ /**
44
+ * @private
45
+ * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
46
+ * @deprecated Replaced by FlexibleNotFoundView
47
+ */
48
+ var _default = exports.default = (0, _withFlexibleUIBlockCardStyle.withFlexibleUIBlockCardStyle)(FlexibleNotFoundViewOld);
@@ -32,6 +32,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
32
32
  ui: _utils.FlexibleCardUiOptions,
33
33
  url: url
34
34
  }, /*#__PURE__*/_react.default.createElement(_blocks.TitleBlock, (0, _extends2.default)({}, (0, _utils.getTitleBlockOptions)(), {
35
+ hideIcon: !!title,
35
36
  text: title
36
37
  })), /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, null, children), showPreview && /*#__PURE__*/_react.default.createElement(_blocks.PreviewBlock, _utils.PreviewBlockOptions), /*#__PURE__*/_react.default.createElement(_blocks.InternalFooterBlock, (0, _extends2.default)({}, (0, _utils.getFooterBlockOptions)(), {
37
38
  actions: actions,
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
18
18
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
19
19
  var PACKAGE_DATA = {
20
20
  packageName: "@atlaskit/smart-card",
21
- packageVersion: "26.39.0",
21
+ packageVersion: "26.40.0",
22
22
  componentName: 'linkUrl'
23
23
  };
24
24
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "26.39.0"
7
+ packageVersion: "26.40.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -17,6 +17,7 @@ import { ErroredView as BlockCardErroredView } from './views/ErroredView';
17
17
  import FlexibleResolvedView from './views/flexible/FlexibleResolvedView';
18
18
  import FlexibleUnauthorisedView from './views/flexible/FlexibleUnauthorisedView';
19
19
  import FlexibleNotFoundView from './views/flexible/FlexibleNotFoundView';
20
+ import FlexibleNotFoundViewOld from './views/flexible/FlexibleNotFoundViewOld';
20
21
  import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
21
22
  import FlexibleForbiddenViewOld from './views/flexible/FlexibleForbiddenViewOld';
22
23
  import FlexibleErroredView from './views/flexible/FlexibleErroredView';
@@ -91,7 +92,9 @@ export const BlockCard = ({
91
92
  onAuthorize: handleAuthorize
92
93
  }));
93
94
  case 'not_found':
94
- return jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
95
+ return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
96
+ onAuthorize: handleAuthorize
97
+ })) : jsx(FlexibleNotFoundViewOld, _extends({}, flexibleBlockCardProps, {
95
98
  onAuthorize: handleAuthorize
96
99
  }));
97
100
  case 'fallback':
@@ -1,8 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import { messages } from '../../../../messages';
4
- import WarningIcon from '@atlaskit/icon/glyph/warning';
2
+ import LockIcon from '@atlaskit/icon/glyph/lock';
3
+ import { extractProvider } from '@atlaskit/link-extractors';
5
4
  import { R300 } from '@atlaskit/theme/colors';
5
+ import React, { useMemo } from 'react';
6
+ import { useIntl } from 'react-intl-next';
7
+ import { messages } from '../../../../messages';
6
8
  import Text from '../../../FlexibleCard/components/elements/text';
7
9
  import UnresolvedView from './unresolved-view';
8
10
  import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
@@ -16,17 +18,35 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
16
18
  const FlexibleNotFoundView = ({
17
19
  testId = 'smart-block-not-found-view',
18
20
  ...props
19
- }) => /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
20
- testId: testId
21
- }), /*#__PURE__*/React.createElement(WarningIcon, {
22
- label: "not-found-warning-icon",
23
- size: "small",
24
- primaryColor: `var(--ds-icon-warning, ${R300})`,
25
- testId: `${testId}-warning-icon`
26
- }), /*#__PURE__*/React.createElement(Text, {
27
- message: {
28
- descriptor: messages.not_found_description
29
- },
30
- testId: `${testId}-message`
31
- }));
21
+ }) => {
22
+ var _cardState$details2;
23
+ const intl = useIntl();
24
+ const {
25
+ cardState
26
+ } = props;
27
+ const product = useMemo(() => {
28
+ var _cardState$details, _provider$text;
29
+ const provider = extractProvider(cardState === null || cardState === void 0 ? void 0 : (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
30
+ return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
31
+ }, [cardState === null || cardState === void 0 ? void 0 : (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
32
+ const title = useMemo(() => intl.formatMessage(messages.not_found_title_crossjoin, {
33
+ product
34
+ }), [intl, product]);
35
+ const description = useMemo(() => ({
36
+ descriptor: messages.not_found_description_crossjoin
37
+ }), []);
38
+ return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
39
+ showPreview: true,
40
+ testId: testId,
41
+ title: title
42
+ }), /*#__PURE__*/React.createElement(LockIcon, {
43
+ label: "not-found-lock-icon",
44
+ size: "small",
45
+ primaryColor: `var(--ds-icon-danger, ${R300})`,
46
+ testId: `${testId}-lock-icon`
47
+ }), /*#__PURE__*/React.createElement(Text, {
48
+ message: description,
49
+ testId: `${testId}-message`
50
+ }));
51
+ };
32
52
  export default withFlexibleUIBlockCardStyle(FlexibleNotFoundView);
@@ -0,0 +1,38 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import { messages } from '../../../../messages';
4
+ import WarningIcon from '@atlaskit/icon/glyph/warning';
5
+ import { R300 } from '@atlaskit/theme/colors';
6
+ import Text from '../../../FlexibleCard/components/elements/text';
7
+ import UnresolvedView from './unresolved-view';
8
+ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
9
+
10
+ /**
11
+ * This view represents a Block Card with a 'Not_Found' status.
12
+ *
13
+ * @see SmartLinkStatus
14
+ * @see FlexibleCardProps
15
+ */
16
+ const FlexibleNotFoundViewOld = ({
17
+ testId = 'smart-block-not-found-view',
18
+ ...props
19
+ }) => /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
20
+ testId: testId
21
+ }), /*#__PURE__*/React.createElement(WarningIcon, {
22
+ label: "not-found-warning-icon",
23
+ size: "small",
24
+ primaryColor: `var(--ds-icon-warning, ${R300})`,
25
+ testId: `${testId}-warning-icon`
26
+ }), /*#__PURE__*/React.createElement(Text, {
27
+ message: {
28
+ descriptor: messages.not_found_description
29
+ },
30
+ testId: `${testId}-message`
31
+ }));
32
+
33
+ /**
34
+ * @private
35
+ * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
36
+ * @deprecated Replaced by FlexibleNotFoundView
37
+ */
38
+ export default withFlexibleUIBlockCardStyle(FlexibleNotFoundViewOld);
@@ -25,6 +25,7 @@ const UnresolvedView = ({
25
25
  ui: FlexibleCardUiOptions,
26
26
  url: url
27
27
  }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
28
+ hideIcon: !!title,
28
29
  text: title
29
30
  })), /*#__PURE__*/React.createElement(CustomBlock, null, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, _extends({}, getFooterBlockOptions(), {
30
31
  actions: actions,
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
8
8
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
9
  const PACKAGE_DATA = {
10
10
  packageName: "@atlaskit/smart-card",
11
- packageVersion: "26.39.0",
11
+ packageVersion: "26.40.0",
12
12
  componentName: 'linkUrl'
13
13
  };
14
14
  const Link = withLinkClickedEvent('a');
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "26.39.0"
18
+ packageVersion: "26.40.0"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -17,6 +17,7 @@ import { ErroredView as BlockCardErroredView } from './views/ErroredView';
17
17
  import FlexibleResolvedView from './views/flexible/FlexibleResolvedView';
18
18
  import FlexibleUnauthorisedView from './views/flexible/FlexibleUnauthorisedView';
19
19
  import FlexibleNotFoundView from './views/flexible/FlexibleNotFoundView';
20
+ import FlexibleNotFoundViewOld from './views/flexible/FlexibleNotFoundViewOld';
20
21
  import FlexibleForbiddenView from './views/flexible/FlexibleForbiddenView';
21
22
  import FlexibleForbiddenViewOld from './views/flexible/FlexibleForbiddenViewOld';
22
23
  import FlexibleErroredView from './views/flexible/FlexibleErroredView';
@@ -90,7 +91,9 @@ export var BlockCard = function BlockCard(_ref) {
90
91
  onAuthorize: handleAuthorize
91
92
  }));
92
93
  case 'not_found':
93
- return jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
94
+ return getBooleanFF('platform.linking-platform.smart-card.cross-join') ? jsx(FlexibleNotFoundView, _extends({}, flexibleBlockCardProps, {
95
+ onAuthorize: handleAuthorize
96
+ })) : jsx(FlexibleNotFoundViewOld, _extends({}, flexibleBlockCardProps, {
94
97
  onAuthorize: handleAuthorize
95
98
  }));
96
99
  case 'fallback':
@@ -1,10 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["testId"];
4
- import React from 'react';
5
- import { messages } from '../../../../messages';
6
- import WarningIcon from '@atlaskit/icon/glyph/warning';
4
+ import LockIcon from '@atlaskit/icon/glyph/lock';
5
+ import { extractProvider } from '@atlaskit/link-extractors';
7
6
  import { R300 } from '@atlaskit/theme/colors';
7
+ import React, { useMemo } from 'react';
8
+ import { useIntl } from 'react-intl-next';
9
+ import { messages } from '../../../../messages';
8
10
  import Text from '../../../FlexibleCard/components/elements/text';
9
11
  import UnresolvedView from './unresolved-view';
10
12
  import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
@@ -16,20 +18,38 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
16
18
  * @see FlexibleCardProps
17
19
  */
18
20
  var FlexibleNotFoundView = function FlexibleNotFoundView(_ref) {
21
+ var _cardState$details2;
19
22
  var _ref$testId = _ref.testId,
20
23
  testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
21
24
  props = _objectWithoutProperties(_ref, _excluded);
25
+ var intl = useIntl();
26
+ var cardState = props.cardState;
27
+ var product = useMemo(function () {
28
+ var _cardState$details, _provider$text;
29
+ var provider = extractProvider(cardState === null || cardState === void 0 || (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
30
+ return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
31
+ }, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
32
+ var title = useMemo(function () {
33
+ return intl.formatMessage(messages.not_found_title_crossjoin, {
34
+ product: product
35
+ });
36
+ }, [intl, product]);
37
+ var description = useMemo(function () {
38
+ return {
39
+ descriptor: messages.not_found_description_crossjoin
40
+ };
41
+ }, []);
22
42
  return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
23
- testId: testId
24
- }), /*#__PURE__*/React.createElement(WarningIcon, {
25
- label: "not-found-warning-icon",
43
+ showPreview: true,
44
+ testId: testId,
45
+ title: title
46
+ }), /*#__PURE__*/React.createElement(LockIcon, {
47
+ label: "not-found-lock-icon",
26
48
  size: "small",
27
- primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
28
- testId: "".concat(testId, "-warning-icon")
49
+ primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
50
+ testId: "".concat(testId, "-lock-icon")
29
51
  }), /*#__PURE__*/React.createElement(Text, {
30
- message: {
31
- descriptor: messages.not_found_description
32
- },
52
+ message: description,
33
53
  testId: "".concat(testId, "-message")
34
54
  }));
35
55
  };
@@ -0,0 +1,42 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["testId"];
4
+ import React from 'react';
5
+ import { messages } from '../../../../messages';
6
+ import WarningIcon from '@atlaskit/icon/glyph/warning';
7
+ import { R300 } from '@atlaskit/theme/colors';
8
+ import Text from '../../../FlexibleCard/components/elements/text';
9
+ import UnresolvedView from './unresolved-view';
10
+ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
11
+
12
+ /**
13
+ * This view represents a Block Card with a 'Not_Found' status.
14
+ *
15
+ * @see SmartLinkStatus
16
+ * @see FlexibleCardProps
17
+ */
18
+ var FlexibleNotFoundViewOld = function FlexibleNotFoundViewOld(_ref) {
19
+ var _ref$testId = _ref.testId,
20
+ testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
21
+ props = _objectWithoutProperties(_ref, _excluded);
22
+ return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
23
+ testId: testId
24
+ }), /*#__PURE__*/React.createElement(WarningIcon, {
25
+ label: "not-found-warning-icon",
26
+ size: "small",
27
+ primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
28
+ testId: "".concat(testId, "-warning-icon")
29
+ }), /*#__PURE__*/React.createElement(Text, {
30
+ message: {
31
+ descriptor: messages.not_found_description
32
+ },
33
+ testId: "".concat(testId, "-message")
34
+ }));
35
+ };
36
+
37
+ /**
38
+ * @private
39
+ * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
40
+ * @deprecated Replaced by FlexibleNotFoundView
41
+ */
42
+ export default withFlexibleUIBlockCardStyle(FlexibleNotFoundViewOld);
@@ -26,6 +26,7 @@ var UnresolvedView = function UnresolvedView(_ref) {
26
26
  ui: FlexibleCardUiOptions,
27
27
  url: url
28
28
  }, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, getTitleBlockOptions(), {
29
+ hideIcon: !!title,
29
30
  text: title
30
31
  })), /*#__PURE__*/React.createElement(CustomBlock, null, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, PreviewBlockOptions), /*#__PURE__*/React.createElement(InternalFooterBlock, _extends({}, getFooterBlockOptions(), {
31
32
  actions: actions,
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
11
11
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
12
  var PACKAGE_DATA = {
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "26.39.0",
14
+ packageVersion: "26.40.0",
15
15
  componentName: 'linkUrl'
16
16
  };
17
17
  var Link = withLinkClickedEvent('a');
@@ -0,0 +1,8 @@
1
+ import { FlexibleBlockCardProps } from './types';
2
+ /**
3
+ * @private
4
+ * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
5
+ * @deprecated Replaced by FlexibleNotFoundView
6
+ */
7
+ declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { FlexibleBlockCardProps } from './types';
2
+ /**
3
+ * @private
4
+ * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
5
+ * @deprecated Replaced by FlexibleNotFoundView
6
+ */
7
+ declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
8
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.39.0",
3
+ "version": "26.40.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/icon-priority": "^6.3.0",
37
37
  "@atlaskit/in-product-testing": "^0.2.0",
38
38
  "@atlaskit/link-analytics": "^8.3.0",
39
- "@atlaskit/link-client-extension": "^1.7.0",
39
+ "@atlaskit/link-client-extension": "^1.8.0",
40
40
  "@atlaskit/link-extractors": "^1.2.0",
41
41
  "@atlaskit/linking-common": "^4.12.0",
42
42
  "@atlaskit/linking-types": "^8.4.0",