@atlaskit/smart-card 17.4.0 → 17.4.1

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
+ ## 17.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ecf130ca7d8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ecf130ca7d8) - Flexible UI: Remove check on Smart Links appearance
8
+
3
9
  ## 17.4.0
4
10
 
5
11
  ### Minor Changes
@@ -19,8 +19,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
19
19
 
20
20
  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; }
21
21
 
22
- var isFlexibleUiCard = function isFlexibleUiCard(appearance, children) {
23
- if ((appearance === 'inline' || appearance === 'block') && children && _react.default.Children.toArray(children).some(function (child) {
22
+ var isFlexibleUiCard = function isFlexibleUiCard(children) {
23
+ if (children && _react.default.Children.toArray(children).some(function (child) {
24
24
  return isFlexibleUiBlock(child);
25
25
  })) {
26
26
  return true;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "17.4.0",
3
+ "version": "17.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -109,7 +109,7 @@ function CardWithUrlContent(_ref) {
109
109
  throw error;
110
110
  }
111
111
 
112
- if ((0, _flexible.isFlexibleUiCard)(appearance, children)) {
112
+ if ((0, _flexible.isFlexibleUiCard)(children)) {
113
113
  return /*#__PURE__*/_react.default.createElement(_FlexibleCard.default, {
114
114
  cardState: state,
115
115
  onAuthorize: services.length && handleAuthorize || undefined,
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import * as Blocks from '../view/FlexibleCard/components/blocks';
3
3
  import { TitleBlock } from '../view/FlexibleCard/components/blocks';
4
4
  import * as Elements from '../view/FlexibleCard/components/elements';
5
- export const isFlexibleUiCard = (appearance, children) => {
6
- if ((appearance === 'inline' || appearance === 'block') && children && React.Children.toArray(children).some(child => isFlexibleUiBlock(child))) {
5
+ export const isFlexibleUiCard = children => {
6
+ if (children && React.Children.toArray(children).some(child => isFlexibleUiBlock(child))) {
7
7
  return true;
8
8
  }
9
9
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "17.4.0",
3
+ "version": "17.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -80,7 +80,7 @@ export function CardWithUrlContent({
80
80
  throw error;
81
81
  }
82
82
 
83
- if (isFlexibleUiCard(appearance, children)) {
83
+ if (isFlexibleUiCard(children)) {
84
84
  return /*#__PURE__*/React.createElement(FlexibleCard, {
85
85
  cardState: state,
86
86
  onAuthorize: services.length && handleAuthorize || undefined,
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import * as Blocks from '../view/FlexibleCard/components/blocks';
3
3
  import { TitleBlock } from '../view/FlexibleCard/components/blocks';
4
4
  import * as Elements from '../view/FlexibleCard/components/elements';
5
- export var isFlexibleUiCard = function isFlexibleUiCard(appearance, children) {
6
- if ((appearance === 'inline' || appearance === 'block') && children && React.Children.toArray(children).some(function (child) {
5
+ export var isFlexibleUiCard = function isFlexibleUiCard(children) {
6
+ if (children && React.Children.toArray(children).some(function (child) {
7
7
  return isFlexibleUiBlock(child);
8
8
  })) {
9
9
  return true;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "17.4.0",
3
+ "version": "17.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -84,7 +84,7 @@ export function CardWithUrlContent(_ref) {
84
84
  throw error;
85
85
  }
86
86
 
87
- if (isFlexibleUiCard(appearance, children)) {
87
+ if (isFlexibleUiCard(children)) {
88
88
  return /*#__PURE__*/React.createElement(FlexibleCard, {
89
89
  cardState: state,
90
90
  onAuthorize: services.length && handleAuthorize || undefined,
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { CardAppearance } from '../view/Card';
3
- export declare const isFlexibleUiCard: (appearance: CardAppearance, children?: React.ReactNode) => boolean;
2
+ export declare const isFlexibleUiCard: (children?: React.ReactNode) => boolean;
4
3
  export declare const isFlexibleUiBlock: (node: React.ReactNode) => boolean;
5
4
  export declare const isFlexibleUiElement: (node: React.ReactNode) => boolean;
6
5
  export declare const isFlexibleUiTitleBlock: (node: React.ReactNode) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "17.4.0",
3
+ "version": "17.4.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"