@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 +6 -0
- package/dist/cjs/utils/flexible.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +1 -1
- package/dist/es2019/utils/flexible.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +1 -1
- package/dist/esm/utils/flexible.js +2 -2
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +1 -1
- package/dist/types/utils/flexible.d.ts +1 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -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(
|
|
23
|
-
if (
|
|
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;
|
package/dist/cjs/version.json
CHANGED
|
@@ -109,7 +109,7 @@ function CardWithUrlContent(_ref) {
|
|
|
109
109
|
throw error;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
if ((0, _flexible.isFlexibleUiCard)(
|
|
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 =
|
|
6
|
-
if (
|
|
5
|
+
export const isFlexibleUiCard = children => {
|
|
6
|
+
if (children && React.Children.toArray(children).some(child => isFlexibleUiBlock(child))) {
|
|
7
7
|
return true;
|
|
8
8
|
}
|
|
9
9
|
|
package/dist/es2019/version.json
CHANGED
|
@@ -80,7 +80,7 @@ export function CardWithUrlContent({
|
|
|
80
80
|
throw error;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
if (isFlexibleUiCard(
|
|
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(
|
|
6
|
-
if (
|
|
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;
|
package/dist/esm/version.json
CHANGED
|
@@ -84,7 +84,7 @@ export function CardWithUrlContent(_ref) {
|
|
|
84
84
|
throw error;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
if (isFlexibleUiCard(
|
|
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
|
-
|
|
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;
|