@micromag/transforms 0.3.651 → 0.3.659
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/es/apple-news.js +34 -34
- package/lib/apple-news.js +34 -34
- package/package.json +3 -3
package/es/apple-news.js
CHANGED
|
@@ -52,14 +52,14 @@ var validate = function validate() {
|
|
|
52
52
|
var getArticleComponents = function getArticleComponents(story) {
|
|
53
53
|
var _ref = story || {},
|
|
54
54
|
_ref$title = _ref.title,
|
|
55
|
-
title = _ref$title ===
|
|
55
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
56
56
|
_ref$metadata = _ref.metadata,
|
|
57
|
-
metadata = _ref$metadata ===
|
|
57
|
+
metadata = _ref$metadata === void 0 ? {} : _ref$metadata,
|
|
58
58
|
_ref$components = _ref.components,
|
|
59
|
-
components = _ref$components ===
|
|
59
|
+
components = _ref$components === void 0 ? [] : _ref$components;
|
|
60
60
|
var _ref2 = metadata || {},
|
|
61
61
|
_ref2$description = _ref2.description,
|
|
62
|
-
description = _ref2$description ===
|
|
62
|
+
description = _ref2$description === void 0 ? 'Ma description' : _ref2$description;
|
|
63
63
|
var heading1 = title ? {
|
|
64
64
|
role: 'heading1',
|
|
65
65
|
text: title,
|
|
@@ -82,9 +82,9 @@ var getArticleComponents = function getArticleComponents(story) {
|
|
|
82
82
|
if (titleScreen !== null) {
|
|
83
83
|
var _ref3 = titleScreen || {},
|
|
84
84
|
_ref3$image = _ref3.image,
|
|
85
|
-
image = _ref3$image ===
|
|
85
|
+
image = _ref3$image === void 0 ? null : _ref3$image,
|
|
86
86
|
_ref3$background = _ref3.background,
|
|
87
|
-
background = _ref3$background ===
|
|
87
|
+
background = _ref3$background === void 0 ? null : _ref3$background;
|
|
88
88
|
if (image !== null) {
|
|
89
89
|
imageComponent = {
|
|
90
90
|
role: 'image',
|
|
@@ -136,7 +136,7 @@ var DocumentStyleDefinition = {
|
|
|
136
136
|
var DocumentStyle = function DocumentStyle() {
|
|
137
137
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
138
138
|
_ref$backgroundColor = _ref.backgroundColor,
|
|
139
|
-
backgroundColor = _ref$backgroundColor ===
|
|
139
|
+
backgroundColor = _ref$backgroundColor === void 0 ? null : _ref$backgroundColor;
|
|
140
140
|
var content = {
|
|
141
141
|
backgroundColor: backgroundColor
|
|
142
142
|
};
|
|
@@ -203,13 +203,13 @@ var LayoutDefinition = {
|
|
|
203
203
|
var Layout = function Layout() {
|
|
204
204
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
205
205
|
_ref$columns = _ref.columns,
|
|
206
|
-
columns = _ref$columns ===
|
|
206
|
+
columns = _ref$columns === void 0 ? 8 : _ref$columns,
|
|
207
207
|
_ref$width = _ref.width,
|
|
208
|
-
width = _ref$width ===
|
|
208
|
+
width = _ref$width === void 0 ? 768 : _ref$width,
|
|
209
209
|
_ref$margin = _ref.margin,
|
|
210
|
-
margin = _ref$margin ===
|
|
210
|
+
margin = _ref$margin === void 0 ? 60 : _ref$margin,
|
|
211
211
|
_ref$gutter = _ref.gutter,
|
|
212
|
-
gutter = _ref$gutter ===
|
|
212
|
+
gutter = _ref$gutter === void 0 ? 20 : _ref$gutter;
|
|
213
213
|
var content = {
|
|
214
214
|
columns: columns,
|
|
215
215
|
width: width,
|
|
@@ -324,13 +324,13 @@ var ComponentLayoutDefinition = {
|
|
|
324
324
|
var ComponentLayout = function ComponentLayout() {
|
|
325
325
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
326
326
|
_ref$columnStart = _ref.columnStart,
|
|
327
|
-
columnStart = _ref$columnStart ===
|
|
327
|
+
columnStart = _ref$columnStart === void 0 ? 0 : _ref$columnStart,
|
|
328
328
|
_ref$columnSpan = _ref.columnSpan,
|
|
329
|
-
columnSpan = _ref$columnSpan ===
|
|
329
|
+
columnSpan = _ref$columnSpan === void 0 ? 12 : _ref$columnSpan,
|
|
330
330
|
_ref$marginTop = _ref.marginTop,
|
|
331
|
-
marginTop = _ref$marginTop ===
|
|
331
|
+
marginTop = _ref$marginTop === void 0 ? 0 : _ref$marginTop,
|
|
332
332
|
_ref$marginBottom = _ref.marginBottom,
|
|
333
|
-
marginBottom = _ref$marginBottom ===
|
|
333
|
+
marginBottom = _ref$marginBottom === void 0 ? 20 : _ref$marginBottom;
|
|
334
334
|
var content = {
|
|
335
335
|
columnStart: columnStart,
|
|
336
336
|
columnSpan: columnSpan,
|
|
@@ -572,13 +572,13 @@ var TextStyleDefinition = {
|
|
|
572
572
|
var TextStyle = function TextStyle() {
|
|
573
573
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
574
574
|
_ref$fontFamily = _ref.fontFamily,
|
|
575
|
-
fontFamily = _ref$fontFamily ===
|
|
575
|
+
fontFamily = _ref$fontFamily === void 0 ? null : _ref$fontFamily,
|
|
576
576
|
_ref$fontSize = _ref.fontSize,
|
|
577
|
-
fontSize = _ref$fontSize ===
|
|
577
|
+
fontSize = _ref$fontSize === void 0 ? null : _ref$fontSize,
|
|
578
578
|
_ref$lineHeight = _ref.lineHeight,
|
|
579
|
-
lineHeight = _ref$lineHeight ===
|
|
579
|
+
lineHeight = _ref$lineHeight === void 0 ? null : _ref$lineHeight,
|
|
580
580
|
_ref$color = _ref.color,
|
|
581
|
-
color = _ref$color ===
|
|
581
|
+
color = _ref$color === void 0 ? null : _ref$color;
|
|
582
582
|
var content = {
|
|
583
583
|
fontFamily: fontFamily,
|
|
584
584
|
fontSize: fontSize,
|
|
@@ -761,10 +761,10 @@ var ArticleDefinition = {
|
|
|
761
761
|
|
|
762
762
|
var Article = function Article(story, settings) {
|
|
763
763
|
var _story$title = story.title,
|
|
764
|
-
title = _story$title ===
|
|
764
|
+
title = _story$title === void 0 ? 'Article' : _story$title;
|
|
765
765
|
var _ref = settings || {},
|
|
766
766
|
_ref$identifier = _ref.identifier,
|
|
767
|
-
identifier = _ref$identifier ===
|
|
767
|
+
identifier = _ref$identifier === void 0 ? 'testArticle' : _ref$identifier;
|
|
768
768
|
var content = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
769
769
|
title: title,
|
|
770
770
|
version: "".concat(1, ".0").toString(),
|
|
@@ -890,7 +890,7 @@ var MediaElement = function MediaElement(story, media) {
|
|
|
890
890
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'audio';
|
|
891
891
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
892
892
|
var _story$componentLayou = story.componentLayouts,
|
|
893
|
-
componentLayouts = _story$componentLayou ===
|
|
893
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
894
894
|
var _ref = media || {},
|
|
895
895
|
url = _ref.url;
|
|
896
896
|
var content = _objectSpread(_objectSpread({
|
|
@@ -1021,12 +1021,12 @@ var TextElement = function TextElement(story, text) {
|
|
|
1021
1021
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1022
1022
|
var props = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
1023
1023
|
var _story$componentLayou = story.componentLayouts,
|
|
1024
|
-
componentLayouts = _story$componentLayou ===
|
|
1024
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1025
1025
|
var _ref = text || {},
|
|
1026
1026
|
_ref$body = _ref.body,
|
|
1027
|
-
body = _ref$body ===
|
|
1027
|
+
body = _ref$body === void 0 ? null : _ref$body,
|
|
1028
1028
|
_ref$textStyle = _ref.textStyle,
|
|
1029
|
-
textStyle = _ref$textStyle ===
|
|
1029
|
+
textStyle = _ref$textStyle === void 0 ? null : _ref$textStyle;
|
|
1030
1030
|
var style = textStyle ? TextStyle(textStyle) : null;
|
|
1031
1031
|
var styleName = style !== null ? hash(style) : null;
|
|
1032
1032
|
var hasStyle = style !== null && styleName !== null;
|
|
@@ -1243,21 +1243,21 @@ var GalleryElement = function GalleryElement(story, gallery) {
|
|
|
1243
1243
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'gallery';
|
|
1244
1244
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1245
1245
|
var _story$componentLayou = story.componentLayouts,
|
|
1246
|
-
componentLayouts = _story$componentLayou ===
|
|
1246
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1247
1247
|
var _ref = gallery || {},
|
|
1248
1248
|
_ref$images = _ref.images,
|
|
1249
|
-
images = _ref$images ===
|
|
1249
|
+
images = _ref$images === void 0 ? [] : _ref$images;
|
|
1250
1250
|
var galleryImages = images !== null ? images.map(function (image) {
|
|
1251
1251
|
if (image == null) {
|
|
1252
1252
|
return null;
|
|
1253
1253
|
}
|
|
1254
1254
|
var _ref2 = image || {},
|
|
1255
1255
|
_ref2$media = _ref2.media,
|
|
1256
|
-
media = _ref2$media ===
|
|
1256
|
+
media = _ref2$media === void 0 ? null : _ref2$media,
|
|
1257
1257
|
_ref2$url = _ref2.url,
|
|
1258
|
-
url = _ref2$url ===
|
|
1258
|
+
url = _ref2$url === void 0 ? null : _ref2$url,
|
|
1259
1259
|
_ref2$caption = _ref2.caption,
|
|
1260
|
-
caption = _ref2$caption ===
|
|
1260
|
+
caption = _ref2$caption === void 0 ? null : _ref2$caption;
|
|
1261
1261
|
var mediaUrl = media !== null && media.url ? media.url : null;
|
|
1262
1262
|
var imageUrl = url !== null ? url : null;
|
|
1263
1263
|
var hasUrl = imageUrl || mediaUrl;
|
|
@@ -1512,7 +1512,7 @@ var ImageElement = function ImageElement(story, image) {
|
|
|
1512
1512
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'image';
|
|
1513
1513
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1514
1514
|
var _story$componentLayou = story.componentLayouts,
|
|
1515
|
-
componentLayouts = _story$componentLayou ===
|
|
1515
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1516
1516
|
var _ref = image || {},
|
|
1517
1517
|
url = _ref.url;
|
|
1518
1518
|
var content = _objectSpread(_objectSpread({
|
|
@@ -1656,12 +1656,12 @@ var MapElement = function MapElement(story, map) {
|
|
|
1656
1656
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'map';
|
|
1657
1657
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1658
1658
|
var _story$componentLayou = story.componentLayouts,
|
|
1659
|
-
componentLayouts = _story$componentLayou ===
|
|
1659
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1660
1660
|
var _ref = map || {},
|
|
1661
1661
|
_ref$latitude = _ref.latitude,
|
|
1662
|
-
latitude = _ref$latitude ===
|
|
1662
|
+
latitude = _ref$latitude === void 0 ? null : _ref$latitude,
|
|
1663
1663
|
_ref$longitude = _ref.longitude,
|
|
1664
|
-
longitude = _ref$longitude ===
|
|
1664
|
+
longitude = _ref$longitude === void 0 ? null : _ref$longitude;
|
|
1665
1665
|
var content = _objectSpread(_objectSpread({
|
|
1666
1666
|
role: role
|
|
1667
1667
|
}, componentLayouts[role] ? {
|
package/lib/apple-news.js
CHANGED
|
@@ -54,14 +54,14 @@ var validate = function validate() {
|
|
|
54
54
|
var getArticleComponents = function getArticleComponents(story) {
|
|
55
55
|
var _ref = story || {},
|
|
56
56
|
_ref$title = _ref.title,
|
|
57
|
-
title = _ref$title ===
|
|
57
|
+
title = _ref$title === void 0 ? null : _ref$title,
|
|
58
58
|
_ref$metadata = _ref.metadata,
|
|
59
|
-
metadata = _ref$metadata ===
|
|
59
|
+
metadata = _ref$metadata === void 0 ? {} : _ref$metadata,
|
|
60
60
|
_ref$components = _ref.components,
|
|
61
|
-
components = _ref$components ===
|
|
61
|
+
components = _ref$components === void 0 ? [] : _ref$components;
|
|
62
62
|
var _ref2 = metadata || {},
|
|
63
63
|
_ref2$description = _ref2.description,
|
|
64
|
-
description = _ref2$description ===
|
|
64
|
+
description = _ref2$description === void 0 ? 'Ma description' : _ref2$description;
|
|
65
65
|
var heading1 = title ? {
|
|
66
66
|
role: 'heading1',
|
|
67
67
|
text: title,
|
|
@@ -84,9 +84,9 @@ var getArticleComponents = function getArticleComponents(story) {
|
|
|
84
84
|
if (titleScreen !== null) {
|
|
85
85
|
var _ref3 = titleScreen || {},
|
|
86
86
|
_ref3$image = _ref3.image,
|
|
87
|
-
image = _ref3$image ===
|
|
87
|
+
image = _ref3$image === void 0 ? null : _ref3$image,
|
|
88
88
|
_ref3$background = _ref3.background,
|
|
89
|
-
background = _ref3$background ===
|
|
89
|
+
background = _ref3$background === void 0 ? null : _ref3$background;
|
|
90
90
|
if (image !== null) {
|
|
91
91
|
imageComponent = {
|
|
92
92
|
role: 'image',
|
|
@@ -138,7 +138,7 @@ var DocumentStyleDefinition = {
|
|
|
138
138
|
var DocumentStyle = function DocumentStyle() {
|
|
139
139
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
140
140
|
_ref$backgroundColor = _ref.backgroundColor,
|
|
141
|
-
backgroundColor = _ref$backgroundColor ===
|
|
141
|
+
backgroundColor = _ref$backgroundColor === void 0 ? null : _ref$backgroundColor;
|
|
142
142
|
var content = {
|
|
143
143
|
backgroundColor: backgroundColor
|
|
144
144
|
};
|
|
@@ -205,13 +205,13 @@ var LayoutDefinition = {
|
|
|
205
205
|
var Layout = function Layout() {
|
|
206
206
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
207
207
|
_ref$columns = _ref.columns,
|
|
208
|
-
columns = _ref$columns ===
|
|
208
|
+
columns = _ref$columns === void 0 ? 8 : _ref$columns,
|
|
209
209
|
_ref$width = _ref.width,
|
|
210
|
-
width = _ref$width ===
|
|
210
|
+
width = _ref$width === void 0 ? 768 : _ref$width,
|
|
211
211
|
_ref$margin = _ref.margin,
|
|
212
|
-
margin = _ref$margin ===
|
|
212
|
+
margin = _ref$margin === void 0 ? 60 : _ref$margin,
|
|
213
213
|
_ref$gutter = _ref.gutter,
|
|
214
|
-
gutter = _ref$gutter ===
|
|
214
|
+
gutter = _ref$gutter === void 0 ? 20 : _ref$gutter;
|
|
215
215
|
var content = {
|
|
216
216
|
columns: columns,
|
|
217
217
|
width: width,
|
|
@@ -326,13 +326,13 @@ var ComponentLayoutDefinition = {
|
|
|
326
326
|
var ComponentLayout = function ComponentLayout() {
|
|
327
327
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
328
328
|
_ref$columnStart = _ref.columnStart,
|
|
329
|
-
columnStart = _ref$columnStart ===
|
|
329
|
+
columnStart = _ref$columnStart === void 0 ? 0 : _ref$columnStart,
|
|
330
330
|
_ref$columnSpan = _ref.columnSpan,
|
|
331
|
-
columnSpan = _ref$columnSpan ===
|
|
331
|
+
columnSpan = _ref$columnSpan === void 0 ? 12 : _ref$columnSpan,
|
|
332
332
|
_ref$marginTop = _ref.marginTop,
|
|
333
|
-
marginTop = _ref$marginTop ===
|
|
333
|
+
marginTop = _ref$marginTop === void 0 ? 0 : _ref$marginTop,
|
|
334
334
|
_ref$marginBottom = _ref.marginBottom,
|
|
335
|
-
marginBottom = _ref$marginBottom ===
|
|
335
|
+
marginBottom = _ref$marginBottom === void 0 ? 20 : _ref$marginBottom;
|
|
336
336
|
var content = {
|
|
337
337
|
columnStart: columnStart,
|
|
338
338
|
columnSpan: columnSpan,
|
|
@@ -574,13 +574,13 @@ var TextStyleDefinition = {
|
|
|
574
574
|
var TextStyle = function TextStyle() {
|
|
575
575
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
576
576
|
_ref$fontFamily = _ref.fontFamily,
|
|
577
|
-
fontFamily = _ref$fontFamily ===
|
|
577
|
+
fontFamily = _ref$fontFamily === void 0 ? null : _ref$fontFamily,
|
|
578
578
|
_ref$fontSize = _ref.fontSize,
|
|
579
|
-
fontSize = _ref$fontSize ===
|
|
579
|
+
fontSize = _ref$fontSize === void 0 ? null : _ref$fontSize,
|
|
580
580
|
_ref$lineHeight = _ref.lineHeight,
|
|
581
|
-
lineHeight = _ref$lineHeight ===
|
|
581
|
+
lineHeight = _ref$lineHeight === void 0 ? null : _ref$lineHeight,
|
|
582
582
|
_ref$color = _ref.color,
|
|
583
|
-
color = _ref$color ===
|
|
583
|
+
color = _ref$color === void 0 ? null : _ref$color;
|
|
584
584
|
var content = {
|
|
585
585
|
fontFamily: fontFamily,
|
|
586
586
|
fontSize: fontSize,
|
|
@@ -763,10 +763,10 @@ var ArticleDefinition = {
|
|
|
763
763
|
|
|
764
764
|
var Article = function Article(story, settings) {
|
|
765
765
|
var _story$title = story.title,
|
|
766
|
-
title = _story$title ===
|
|
766
|
+
title = _story$title === void 0 ? 'Article' : _story$title;
|
|
767
767
|
var _ref = settings || {},
|
|
768
768
|
_ref$identifier = _ref.identifier,
|
|
769
|
-
identifier = _ref$identifier ===
|
|
769
|
+
identifier = _ref$identifier === void 0 ? 'testArticle' : _ref$identifier;
|
|
770
770
|
var content = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
771
771
|
title: title,
|
|
772
772
|
version: "".concat(1, ".0").toString(),
|
|
@@ -892,7 +892,7 @@ var MediaElement = function MediaElement(story, media) {
|
|
|
892
892
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'audio';
|
|
893
893
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
894
894
|
var _story$componentLayou = story.componentLayouts,
|
|
895
|
-
componentLayouts = _story$componentLayou ===
|
|
895
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
896
896
|
var _ref = media || {},
|
|
897
897
|
url = _ref.url;
|
|
898
898
|
var content = _objectSpread(_objectSpread({
|
|
@@ -1023,12 +1023,12 @@ var TextElement = function TextElement(story, text) {
|
|
|
1023
1023
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1024
1024
|
var props = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
1025
1025
|
var _story$componentLayou = story.componentLayouts,
|
|
1026
|
-
componentLayouts = _story$componentLayou ===
|
|
1026
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1027
1027
|
var _ref = text || {},
|
|
1028
1028
|
_ref$body = _ref.body,
|
|
1029
|
-
body = _ref$body ===
|
|
1029
|
+
body = _ref$body === void 0 ? null : _ref$body,
|
|
1030
1030
|
_ref$textStyle = _ref.textStyle,
|
|
1031
|
-
textStyle = _ref$textStyle ===
|
|
1031
|
+
textStyle = _ref$textStyle === void 0 ? null : _ref$textStyle;
|
|
1032
1032
|
var style = textStyle ? TextStyle(textStyle) : null;
|
|
1033
1033
|
var styleName = style !== null ? hash(style) : null;
|
|
1034
1034
|
var hasStyle = style !== null && styleName !== null;
|
|
@@ -1245,21 +1245,21 @@ var GalleryElement = function GalleryElement(story, gallery) {
|
|
|
1245
1245
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'gallery';
|
|
1246
1246
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1247
1247
|
var _story$componentLayou = story.componentLayouts,
|
|
1248
|
-
componentLayouts = _story$componentLayou ===
|
|
1248
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1249
1249
|
var _ref = gallery || {},
|
|
1250
1250
|
_ref$images = _ref.images,
|
|
1251
|
-
images = _ref$images ===
|
|
1251
|
+
images = _ref$images === void 0 ? [] : _ref$images;
|
|
1252
1252
|
var galleryImages = images !== null ? images.map(function (image) {
|
|
1253
1253
|
if (image == null) {
|
|
1254
1254
|
return null;
|
|
1255
1255
|
}
|
|
1256
1256
|
var _ref2 = image || {},
|
|
1257
1257
|
_ref2$media = _ref2.media,
|
|
1258
|
-
media = _ref2$media ===
|
|
1258
|
+
media = _ref2$media === void 0 ? null : _ref2$media,
|
|
1259
1259
|
_ref2$url = _ref2.url,
|
|
1260
|
-
url = _ref2$url ===
|
|
1260
|
+
url = _ref2$url === void 0 ? null : _ref2$url,
|
|
1261
1261
|
_ref2$caption = _ref2.caption,
|
|
1262
|
-
caption = _ref2$caption ===
|
|
1262
|
+
caption = _ref2$caption === void 0 ? null : _ref2$caption;
|
|
1263
1263
|
var mediaUrl = media !== null && media.url ? media.url : null;
|
|
1264
1264
|
var imageUrl = url !== null ? url : null;
|
|
1265
1265
|
var hasUrl = imageUrl || mediaUrl;
|
|
@@ -1514,7 +1514,7 @@ var ImageElement = function ImageElement(story, image) {
|
|
|
1514
1514
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'image';
|
|
1515
1515
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1516
1516
|
var _story$componentLayou = story.componentLayouts,
|
|
1517
|
-
componentLayouts = _story$componentLayou ===
|
|
1517
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1518
1518
|
var _ref = image || {},
|
|
1519
1519
|
url = _ref.url;
|
|
1520
1520
|
var content = _objectSpread(_objectSpread({
|
|
@@ -1658,12 +1658,12 @@ var MapElement = function MapElement(story, map) {
|
|
|
1658
1658
|
var role = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'map';
|
|
1659
1659
|
var definition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
1660
1660
|
var _story$componentLayou = story.componentLayouts,
|
|
1661
|
-
componentLayouts = _story$componentLayou ===
|
|
1661
|
+
componentLayouts = _story$componentLayou === void 0 ? {} : _story$componentLayou;
|
|
1662
1662
|
var _ref = map || {},
|
|
1663
1663
|
_ref$latitude = _ref.latitude,
|
|
1664
|
-
latitude = _ref$latitude ===
|
|
1664
|
+
latitude = _ref$latitude === void 0 ? null : _ref$latitude,
|
|
1665
1665
|
_ref$longitude = _ref.longitude,
|
|
1666
|
-
longitude = _ref$longitude ===
|
|
1666
|
+
longitude = _ref$longitude === void 0 ? null : _ref$longitude;
|
|
1667
1667
|
var content = _objectSpread(_objectSpread({
|
|
1668
1668
|
role: role
|
|
1669
1669
|
}, componentLayouts[role] ? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/transforms",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.659",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@babel/runtime": "^7.13.10",
|
|
75
|
-
"@micromag/core": "^0.3.
|
|
75
|
+
"@micromag/core": "^0.3.659",
|
|
76
76
|
"lodash": "^4.17.21",
|
|
77
77
|
"object-hash": "^3.0.0",
|
|
78
78
|
"prop-types": "^15.7.2",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"access": "public",
|
|
83
83
|
"registry": "https://registry.npmjs.org/"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "7c13dad69a7e377cd2f900d95cb95694a3a8fcbb"
|
|
86
86
|
}
|