@atlaskit/smart-card 27.7.3 → 27.8.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,13 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 27.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#112648](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112648)
8
+ [`14d0401d877b7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/14d0401d877b7) -
9
+ Allows flex-ui footer to render regardless of card resolving the url
10
+
3
11
  ## 27.7.3
4
12
 
5
13
  ### Patch 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: "27.7.3"
25
+ packageVersion: "27.8.0"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _resolved = _interopRequireDefault(require("./resolved"));
12
12
  var _constants = require("../../../../../constants");
13
- var _excluded = ["status", "testId"];
13
+ var _excluded = ["status", "testId", "alwaysShow"];
14
14
  /**
15
15
  * Represents a FooterBlock, designed to contain elements and actions that should appear
16
16
  * at the bottom of a link card.
@@ -22,8 +22,9 @@ var FooterBlock = function FooterBlock(_ref) {
22
22
  var status = _ref.status,
23
23
  _ref$testId = _ref.testId,
24
24
  testId = _ref$testId === void 0 ? 'smart-footer-block' : _ref$testId,
25
+ alwaysShow = _ref.alwaysShow,
25
26
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
26
- if (status !== _constants.SmartLinkStatus.Resolved) {
27
+ if (status !== _constants.SmartLinkStatus.Resolved && !alwaysShow) {
27
28
  return null;
28
29
  }
29
30
  return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, props, {
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "27.7.3",
20
+ packageVersion: "27.8.0",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  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: "27.7.3"
7
+ packageVersion: "27.8.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -13,9 +13,10 @@ import { SmartLinkStatus } from '../../../../../constants';
13
13
  const FooterBlock = ({
14
14
  status,
15
15
  testId = 'smart-footer-block',
16
+ alwaysShow,
16
17
  ...props
17
18
  }) => {
18
- if (status !== SmartLinkStatus.Resolved) {
19
+ if (status !== SmartLinkStatus.Resolved && !alwaysShow) {
19
20
  return null;
20
21
  }
21
22
  return /*#__PURE__*/React.createElement(FooterBlockResolvedView, _extends({}, props, {
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "27.7.3",
10
+ packageVersion: "27.8.0",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  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: "27.7.3"
18
+ packageVersion: "27.8.0"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["status", "testId"];
3
+ var _excluded = ["status", "testId", "alwaysShow"];
4
4
  import React from 'react';
5
5
  import FooterBlockResolvedView from './resolved';
6
6
  import { SmartLinkStatus } from '../../../../../constants';
@@ -16,8 +16,9 @@ var FooterBlock = function FooterBlock(_ref) {
16
16
  var status = _ref.status,
17
17
  _ref$testId = _ref.testId,
18
18
  testId = _ref$testId === void 0 ? 'smart-footer-block' : _ref$testId,
19
+ alwaysShow = _ref.alwaysShow,
19
20
  props = _objectWithoutProperties(_ref, _excluded);
20
- if (status !== SmartLinkStatus.Resolved) {
21
+ if (status !== SmartLinkStatus.Resolved && !alwaysShow) {
21
22
  return null;
22
23
  }
23
24
  return /*#__PURE__*/React.createElement(FooterBlockResolvedView, _extends({}, props, {
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "27.7.3",
13
+ packageVersion: "27.8.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -16,4 +16,8 @@ export type FooterBlockProps = {
16
16
  * Allows hiding of the resources provider
17
17
  */
18
18
  hideProvider?: boolean;
19
+ /**
20
+ * Allows rendering of the footer regardless of whether the block has resolved
21
+ */
22
+ alwaysShow?: boolean;
19
23
  } & BlockProps;
@@ -16,4 +16,8 @@ export type FooterBlockProps = {
16
16
  * Allows hiding of the resources provider
17
17
  */
18
18
  hideProvider?: boolean;
19
+ /**
20
+ * Allows rendering of the footer regardless of whether the block has resolved
21
+ */
22
+ alwaysShow?: boolean;
19
23
  } & BlockProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "27.7.3",
3
+ "version": "27.8.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"