@micromag/screen-urbania-article 0.3.58 → 0.3.60
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/index.js +28 -13
- package/lib/index.js +28 -13
- package/package.json +14 -14
package/es/index.js
CHANGED
|
@@ -103,6 +103,7 @@ var propTypes$1 = {
|
|
|
103
103
|
title: PropTypes$1.headingElement,
|
|
104
104
|
overTitle: PropTypes$1.headingElement,
|
|
105
105
|
authors: PropTypes.arrayOf(PropTypes.shape({})),
|
|
106
|
+
author: PropTypes$1.authorElement,
|
|
106
107
|
sponsor: PropTypes.arrayOf(PropTypes.shape({})),
|
|
107
108
|
sponsorPrefix: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
108
109
|
site: PropTypes.string,
|
|
@@ -121,6 +122,7 @@ var defaultProps$1 = {
|
|
|
121
122
|
title: null,
|
|
122
123
|
overTitle: null,
|
|
123
124
|
authors: null,
|
|
125
|
+
author: null,
|
|
124
126
|
sponsor: null,
|
|
125
127
|
sponsorPrefix: null,
|
|
126
128
|
site: null,
|
|
@@ -142,8 +144,9 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
142
144
|
title = _ref.title,
|
|
143
145
|
overTitle = _ref.overTitle,
|
|
144
146
|
authors = _ref.authors,
|
|
147
|
+
author = _ref.author,
|
|
145
148
|
sponsor = _ref.sponsor,
|
|
146
|
-
|
|
149
|
+
sponsorPrefix = _ref.sponsorPrefix,
|
|
147
150
|
site = _ref.site,
|
|
148
151
|
background = _ref.background,
|
|
149
152
|
callToAction = _ref.callToAction,
|
|
@@ -217,7 +220,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
217
220
|
sponsorText = _ref6$body === void 0 ? null : _ref6$body;
|
|
218
221
|
|
|
219
222
|
var hasSponsor = sponsorText !== null;
|
|
220
|
-
var hasAuthors = (authors || []).length > 0;
|
|
223
|
+
var hasAuthors = (authors || []).length > 0 || author !== null;
|
|
221
224
|
|
|
222
225
|
var _ref7 = image || {},
|
|
223
226
|
_ref7$url = _ref7.url,
|
|
@@ -303,9 +306,9 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
303
306
|
isEmpty: !hasSponsor
|
|
304
307
|
}, hasSponsor ? /*#__PURE__*/React.createElement("div", {
|
|
305
308
|
className: styles.sponsors
|
|
306
|
-
},
|
|
309
|
+
}, sponsorPrefix !== null ? /*#__PURE__*/React.createElement("span", {
|
|
307
310
|
className: styles.sponsor
|
|
308
|
-
},
|
|
311
|
+
}, sponsorPrefix) : null, "\xA0", /*#__PURE__*/React.createElement(Heading, Object.assign({
|
|
309
312
|
className: styles.sponsor,
|
|
310
313
|
size: "6"
|
|
311
314
|
}, sponsor))) : null)].filter(function (it) {
|
|
@@ -415,7 +418,6 @@ var definition = {
|
|
|
415
418
|
}]
|
|
416
419
|
}),
|
|
417
420
|
component: UrbaniaArticle$1,
|
|
418
|
-
// transforms,
|
|
419
421
|
fields: [{
|
|
420
422
|
name: 'url',
|
|
421
423
|
type: 'url',
|
|
@@ -426,6 +428,22 @@ var definition = {
|
|
|
426
428
|
"value": "Url"
|
|
427
429
|
}]
|
|
428
430
|
})
|
|
431
|
+
}, {
|
|
432
|
+
name: 'overTitle',
|
|
433
|
+
type: 'heading-element',
|
|
434
|
+
theme: {
|
|
435
|
+
textStyle: 'heading2'
|
|
436
|
+
},
|
|
437
|
+
defaultValue: {
|
|
438
|
+
body: 'En vedette'
|
|
439
|
+
},
|
|
440
|
+
label: defineMessage({
|
|
441
|
+
id: "z2I2bJ",
|
|
442
|
+
defaultMessage: [{
|
|
443
|
+
"type": 0,
|
|
444
|
+
"value": "Overtitle"
|
|
445
|
+
}]
|
|
446
|
+
})
|
|
429
447
|
}, {
|
|
430
448
|
name: 'title',
|
|
431
449
|
type: 'heading-element',
|
|
@@ -440,19 +458,16 @@ var definition = {
|
|
|
440
458
|
}]
|
|
441
459
|
})
|
|
442
460
|
}, {
|
|
443
|
-
name: '
|
|
444
|
-
type: '
|
|
461
|
+
name: 'author',
|
|
462
|
+
type: 'author-element',
|
|
445
463
|
theme: {
|
|
446
|
-
textStyle: '
|
|
447
|
-
},
|
|
448
|
-
defaultValue: {
|
|
449
|
-
body: 'En vedette'
|
|
464
|
+
textStyle: 'text'
|
|
450
465
|
},
|
|
451
466
|
label: defineMessage({
|
|
452
|
-
id: "
|
|
467
|
+
id: "73hxYw",
|
|
453
468
|
defaultMessage: [{
|
|
454
469
|
"type": 0,
|
|
455
|
-
"value": "
|
|
470
|
+
"value": "Author"
|
|
456
471
|
}]
|
|
457
472
|
})
|
|
458
473
|
}, {
|
package/lib/index.js
CHANGED
|
@@ -123,6 +123,7 @@ var propTypes$1 = {
|
|
|
123
123
|
title: core.PropTypes.headingElement,
|
|
124
124
|
overTitle: core.PropTypes.headingElement,
|
|
125
125
|
authors: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({})),
|
|
126
|
+
author: core.PropTypes.authorElement,
|
|
126
127
|
sponsor: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({})),
|
|
127
128
|
sponsorPrefix: PropTypes__default["default"].oneOfType([PropTypes__default["default"].node, PropTypes__default["default"].func]),
|
|
128
129
|
site: PropTypes__default["default"].string,
|
|
@@ -141,6 +142,7 @@ var defaultProps$1 = {
|
|
|
141
142
|
title: null,
|
|
142
143
|
overTitle: null,
|
|
143
144
|
authors: null,
|
|
145
|
+
author: null,
|
|
144
146
|
sponsor: null,
|
|
145
147
|
sponsorPrefix: null,
|
|
146
148
|
site: null,
|
|
@@ -162,8 +164,9 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
162
164
|
title = _ref.title,
|
|
163
165
|
overTitle = _ref.overTitle,
|
|
164
166
|
authors = _ref.authors,
|
|
167
|
+
author = _ref.author,
|
|
165
168
|
sponsor = _ref.sponsor,
|
|
166
|
-
|
|
169
|
+
sponsorPrefix = _ref.sponsorPrefix,
|
|
167
170
|
site = _ref.site,
|
|
168
171
|
background = _ref.background,
|
|
169
172
|
callToAction = _ref.callToAction,
|
|
@@ -237,7 +240,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
237
240
|
sponsorText = _ref6$body === void 0 ? null : _ref6$body;
|
|
238
241
|
|
|
239
242
|
var hasSponsor = sponsorText !== null;
|
|
240
|
-
var hasAuthors = (authors || []).length > 0;
|
|
243
|
+
var hasAuthors = (authors || []).length > 0 || author !== null;
|
|
241
244
|
|
|
242
245
|
var _ref7 = image || {},
|
|
243
246
|
_ref7$url = _ref7.url,
|
|
@@ -323,9 +326,9 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
323
326
|
isEmpty: !hasSponsor
|
|
324
327
|
}, hasSponsor ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
325
328
|
className: styles.sponsors
|
|
326
|
-
},
|
|
329
|
+
}, sponsorPrefix !== null ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
327
330
|
className: styles.sponsor
|
|
328
|
-
},
|
|
331
|
+
}, sponsorPrefix) : null, "\xA0", /*#__PURE__*/React__default["default"].createElement(Heading__default["default"], Object.assign({
|
|
329
332
|
className: styles.sponsor,
|
|
330
333
|
size: "6"
|
|
331
334
|
}, sponsor))) : null)].filter(function (it) {
|
|
@@ -435,7 +438,6 @@ var definition = {
|
|
|
435
438
|
}]
|
|
436
439
|
}),
|
|
437
440
|
component: UrbaniaArticle$1,
|
|
438
|
-
// transforms,
|
|
439
441
|
fields: [{
|
|
440
442
|
name: 'url',
|
|
441
443
|
type: 'url',
|
|
@@ -446,6 +448,22 @@ var definition = {
|
|
|
446
448
|
"value": "Url"
|
|
447
449
|
}]
|
|
448
450
|
})
|
|
451
|
+
}, {
|
|
452
|
+
name: 'overTitle',
|
|
453
|
+
type: 'heading-element',
|
|
454
|
+
theme: {
|
|
455
|
+
textStyle: 'heading2'
|
|
456
|
+
},
|
|
457
|
+
defaultValue: {
|
|
458
|
+
body: 'En vedette'
|
|
459
|
+
},
|
|
460
|
+
label: reactIntl.defineMessage({
|
|
461
|
+
id: "z2I2bJ",
|
|
462
|
+
defaultMessage: [{
|
|
463
|
+
"type": 0,
|
|
464
|
+
"value": "Overtitle"
|
|
465
|
+
}]
|
|
466
|
+
})
|
|
449
467
|
}, {
|
|
450
468
|
name: 'title',
|
|
451
469
|
type: 'heading-element',
|
|
@@ -460,19 +478,16 @@ var definition = {
|
|
|
460
478
|
}]
|
|
461
479
|
})
|
|
462
480
|
}, {
|
|
463
|
-
name: '
|
|
464
|
-
type: '
|
|
481
|
+
name: 'author',
|
|
482
|
+
type: 'author-element',
|
|
465
483
|
theme: {
|
|
466
|
-
textStyle: '
|
|
467
|
-
},
|
|
468
|
-
defaultValue: {
|
|
469
|
-
body: 'En vedette'
|
|
484
|
+
textStyle: 'text'
|
|
470
485
|
},
|
|
471
486
|
label: reactIntl.defineMessage({
|
|
472
|
-
id: "
|
|
487
|
+
id: "73hxYw",
|
|
473
488
|
defaultMessage: [{
|
|
474
489
|
"type": 0,
|
|
475
|
-
"value": "
|
|
490
|
+
"value": "Author"
|
|
476
491
|
}]
|
|
477
492
|
})
|
|
478
493
|
}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-article",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.60",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
52
|
"@folklore/fetch": "^0.1.15",
|
|
53
53
|
"@folklore/size": "^0.1.20",
|
|
54
|
-
"@micromag/core": "^0.3.
|
|
55
|
-
"@micromag/element-background": "^0.3.
|
|
56
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
57
|
-
"@micromag/element-closed-captions": "^0.3.
|
|
58
|
-
"@micromag/element-container": "^0.3.
|
|
59
|
-
"@micromag/element-heading": "^0.3.
|
|
60
|
-
"@micromag/element-image": "^0.3.
|
|
61
|
-
"@micromag/element-media-controls": "^0.3.
|
|
62
|
-
"@micromag/element-urbania-author": "^0.3.
|
|
63
|
-
"@micromag/element-video": "^0.3.
|
|
64
|
-
"@micromag/element-visual": "^0.3.
|
|
65
|
-
"@micromag/transforms": "^0.3.
|
|
54
|
+
"@micromag/core": "^0.3.60",
|
|
55
|
+
"@micromag/element-background": "^0.3.60",
|
|
56
|
+
"@micromag/element-call-to-action": "^0.3.60",
|
|
57
|
+
"@micromag/element-closed-captions": "^0.3.60",
|
|
58
|
+
"@micromag/element-container": "^0.3.60",
|
|
59
|
+
"@micromag/element-heading": "^0.3.60",
|
|
60
|
+
"@micromag/element-image": "^0.3.60",
|
|
61
|
+
"@micromag/element-media-controls": "^0.3.60",
|
|
62
|
+
"@micromag/element-urbania-author": "^0.3.60",
|
|
63
|
+
"@micromag/element-video": "^0.3.60",
|
|
64
|
+
"@micromag/element-visual": "^0.3.60",
|
|
65
|
+
"@micromag/transforms": "^0.3.60",
|
|
66
66
|
"classnames": "^2.2.6",
|
|
67
67
|
"lodash": "^4.17.21",
|
|
68
68
|
"prop-types": "^15.7.2",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "f79f285d0b402d94f7703782bdd9e6fdc0cdafb0"
|
|
76
76
|
}
|