@micromag/screen-ranking 0.3.443 → 0.3.447
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 +2 -46
- package/lib/index.js +2 -46
- package/package.json +13 -13
package/es/index.js
CHANGED
|
@@ -18,8 +18,6 @@ import Heading from '@micromag/element-heading';
|
|
|
18
18
|
import Layout from '@micromag/element-layout';
|
|
19
19
|
import Scroll from '@micromag/element-scroll';
|
|
20
20
|
import Text from '@micromag/element-text';
|
|
21
|
-
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
22
|
-
import { Text as Text$1, Container as Container$1 } from '@micromag/transforms/apple-news';
|
|
23
21
|
|
|
24
22
|
var styles = {"container":"micromag-screen-ranking-container","background":"micromag-screen-ranking-background","empty":"micromag-screen-ranking-empty","emptyTitle":"micromag-screen-ranking-emptyTitle","content":"micromag-screen-ranking-content","item":"micromag-screen-ranking-item","rankText":"micromag-screen-ranking-rankText","itemTitle":"micromag-screen-ranking-itemTitle","description":"micromag-screen-ranking-description","callToAction":"micromag-screen-ranking-callToAction","disabled":"micromag-screen-ranking-disabled","sideLayout":"micromag-screen-ranking-sideLayout","elementsContainer":"micromag-screen-ranking-elementsContainer","rank":"micromag-screen-ranking-rank","label":"micromag-screen-ranking-label","isPlaceholder":"micromag-screen-ranking-isPlaceholder","scroll":"micromag-screen-ranking-scroll"};
|
|
25
23
|
|
|
@@ -245,49 +243,7 @@ var RankingScreen = function RankingScreen(_ref) {
|
|
|
245
243
|
RankingScreen.propTypes = propTypes;
|
|
246
244
|
RankingScreen.defaultProps = defaultProps;
|
|
247
245
|
|
|
248
|
-
|
|
249
|
-
var _ref$items = _ref.items,
|
|
250
|
-
items = _ref$items === void 0 ? [] : _ref$items,
|
|
251
|
-
_ref$ascending = _ref.ascending,
|
|
252
|
-
ascending = _ref$ascending === void 0 ? false : _ref$ascending;
|
|
253
|
-
var allItems = items || [];
|
|
254
|
-
var ordered = ascending ? allItems.reverse() : allItems;
|
|
255
|
-
var list = ordered.reduce(function (acc, it) {
|
|
256
|
-
var _Text = Text$1(acc.story, it.title),
|
|
257
|
-
titleStory = _Text.story,
|
|
258
|
-
titleComponent = _Text.component;
|
|
259
|
-
var _Text2 = Text$1(titleStory, it.description),
|
|
260
|
-
descriptionStory = _Text2.story,
|
|
261
|
-
descriptionComponent = _Text2.component;
|
|
262
|
-
var _Container = Container$1(descriptionStory, [].concat(_toConsumableArray(titleComponent ? [titleComponent] : []), _toConsumableArray(descriptionComponent ? [descriptionComponent] : []))),
|
|
263
|
-
containerStory = _Container.story,
|
|
264
|
-
containerComponent = _Container.component;
|
|
265
|
-
return {
|
|
266
|
-
story: containerStory,
|
|
267
|
-
components: [].concat(_toConsumableArray(acc.components || []), _toConsumableArray(containerComponent ? [containerComponent] : []))
|
|
268
|
-
};
|
|
269
|
-
}, {
|
|
270
|
-
story: newStory,
|
|
271
|
-
components: []
|
|
272
|
-
});
|
|
273
|
-
var _ref2 = list || {},
|
|
274
|
-
reducedStory = _ref2.story,
|
|
275
|
-
_ref2$components = _ref2.components,
|
|
276
|
-
reducedComponents = _ref2$components === void 0 ? [] : _ref2$components;
|
|
277
|
-
var _Container2 = Container$1(reducedStory, reducedComponents),
|
|
278
|
-
bigContainerStory = _Container2.story,
|
|
279
|
-
bigContainerComponent = _Container2.component;
|
|
280
|
-
return _objectSpread(_objectSpread({}, bigContainerStory), {}, {
|
|
281
|
-
components: [].concat(_toConsumableArray(newStory.components || []), _toConsumableArray(bigContainerComponent ? [bigContainerComponent] : []))
|
|
282
|
-
});
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
// eslint-disable-next-line
|
|
286
|
-
|
|
287
|
-
var transforms = /*#__PURE__*/Object.freeze({
|
|
288
|
-
__proto__: null,
|
|
289
|
-
appleNews: transform
|
|
290
|
-
});
|
|
246
|
+
// import * as transforms from './transforms/index';
|
|
291
247
|
|
|
292
248
|
var definition = {
|
|
293
249
|
id: 'ranking',
|
|
@@ -311,7 +267,7 @@ var definition = {
|
|
|
311
267
|
}),
|
|
312
268
|
component: RankingScreen,
|
|
313
269
|
layouts: ['side', 'over'],
|
|
314
|
-
|
|
270
|
+
// transforms,
|
|
315
271
|
fields: [{
|
|
316
272
|
name: 'layout',
|
|
317
273
|
type: 'screen-layout',
|
package/lib/index.js
CHANGED
|
@@ -22,8 +22,6 @@ var Heading = require('@micromag/element-heading');
|
|
|
22
22
|
var Layout = require('@micromag/element-layout');
|
|
23
23
|
var Scroll = require('@micromag/element-scroll');
|
|
24
24
|
var Text = require('@micromag/element-text');
|
|
25
|
-
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
26
|
-
var appleNews = require('@micromag/transforms/apple-news');
|
|
27
25
|
|
|
28
26
|
var styles = {"container":"micromag-screen-ranking-container","background":"micromag-screen-ranking-background","empty":"micromag-screen-ranking-empty","emptyTitle":"micromag-screen-ranking-emptyTitle","content":"micromag-screen-ranking-content","item":"micromag-screen-ranking-item","rankText":"micromag-screen-ranking-rankText","itemTitle":"micromag-screen-ranking-itemTitle","description":"micromag-screen-ranking-description","callToAction":"micromag-screen-ranking-callToAction","disabled":"micromag-screen-ranking-disabled","sideLayout":"micromag-screen-ranking-sideLayout","elementsContainer":"micromag-screen-ranking-elementsContainer","rank":"micromag-screen-ranking-rank","label":"micromag-screen-ranking-label","isPlaceholder":"micromag-screen-ranking-isPlaceholder","scroll":"micromag-screen-ranking-scroll"};
|
|
29
27
|
|
|
@@ -249,49 +247,7 @@ var RankingScreen = function RankingScreen(_ref) {
|
|
|
249
247
|
RankingScreen.propTypes = propTypes;
|
|
250
248
|
RankingScreen.defaultProps = defaultProps;
|
|
251
249
|
|
|
252
|
-
|
|
253
|
-
var _ref$items = _ref.items,
|
|
254
|
-
items = _ref$items === void 0 ? [] : _ref$items,
|
|
255
|
-
_ref$ascending = _ref.ascending,
|
|
256
|
-
ascending = _ref$ascending === void 0 ? false : _ref$ascending;
|
|
257
|
-
var allItems = items || [];
|
|
258
|
-
var ordered = ascending ? allItems.reverse() : allItems;
|
|
259
|
-
var list = ordered.reduce(function (acc, it) {
|
|
260
|
-
var _Text = appleNews.Text(acc.story, it.title),
|
|
261
|
-
titleStory = _Text.story,
|
|
262
|
-
titleComponent = _Text.component;
|
|
263
|
-
var _Text2 = appleNews.Text(titleStory, it.description),
|
|
264
|
-
descriptionStory = _Text2.story,
|
|
265
|
-
descriptionComponent = _Text2.component;
|
|
266
|
-
var _Container = appleNews.Container(descriptionStory, [].concat(_toConsumableArray(titleComponent ? [titleComponent] : []), _toConsumableArray(descriptionComponent ? [descriptionComponent] : []))),
|
|
267
|
-
containerStory = _Container.story,
|
|
268
|
-
containerComponent = _Container.component;
|
|
269
|
-
return {
|
|
270
|
-
story: containerStory,
|
|
271
|
-
components: [].concat(_toConsumableArray(acc.components || []), _toConsumableArray(containerComponent ? [containerComponent] : []))
|
|
272
|
-
};
|
|
273
|
-
}, {
|
|
274
|
-
story: newStory,
|
|
275
|
-
components: []
|
|
276
|
-
});
|
|
277
|
-
var _ref2 = list || {},
|
|
278
|
-
reducedStory = _ref2.story,
|
|
279
|
-
_ref2$components = _ref2.components,
|
|
280
|
-
reducedComponents = _ref2$components === void 0 ? [] : _ref2$components;
|
|
281
|
-
var _Container2 = appleNews.Container(reducedStory, reducedComponents),
|
|
282
|
-
bigContainerStory = _Container2.story,
|
|
283
|
-
bigContainerComponent = _Container2.component;
|
|
284
|
-
return _objectSpread(_objectSpread({}, bigContainerStory), {}, {
|
|
285
|
-
components: [].concat(_toConsumableArray(newStory.components || []), _toConsumableArray(bigContainerComponent ? [bigContainerComponent] : []))
|
|
286
|
-
});
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
// eslint-disable-next-line
|
|
290
|
-
|
|
291
|
-
var transforms = /*#__PURE__*/Object.freeze({
|
|
292
|
-
__proto__: null,
|
|
293
|
-
appleNews: transform
|
|
294
|
-
});
|
|
250
|
+
// import * as transforms from './transforms/index';
|
|
295
251
|
|
|
296
252
|
var definition = {
|
|
297
253
|
id: 'ranking',
|
|
@@ -315,7 +271,7 @@ var definition = {
|
|
|
315
271
|
}),
|
|
316
272
|
component: RankingScreen,
|
|
317
273
|
layouts: ['side', 'over'],
|
|
318
|
-
|
|
274
|
+
// transforms,
|
|
319
275
|
fields: [{
|
|
320
276
|
name: 'layout',
|
|
321
277
|
type: 'screen-layout',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-ranking",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.447",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -59,17 +59,17 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@babel/runtime": "^7.13.10",
|
|
62
|
-
"@micromag/core": "^0.3.
|
|
63
|
-
"@micromag/data": "^0.3.
|
|
64
|
-
"@micromag/element-background": "^0.3.
|
|
65
|
-
"@micromag/element-container": "^0.3.
|
|
66
|
-
"@micromag/element-footer": "^0.3.
|
|
67
|
-
"@micromag/element-header": "^0.3.
|
|
68
|
-
"@micromag/element-heading": "^0.3.
|
|
69
|
-
"@micromag/element-layout": "^0.3.
|
|
70
|
-
"@micromag/element-scroll": "^0.3.
|
|
71
|
-
"@micromag/element-text": "^0.3.
|
|
72
|
-
"@micromag/transforms": "^0.3.
|
|
62
|
+
"@micromag/core": "^0.3.447",
|
|
63
|
+
"@micromag/data": "^0.3.447",
|
|
64
|
+
"@micromag/element-background": "^0.3.447",
|
|
65
|
+
"@micromag/element-container": "^0.3.447",
|
|
66
|
+
"@micromag/element-footer": "^0.3.447",
|
|
67
|
+
"@micromag/element-header": "^0.3.447",
|
|
68
|
+
"@micromag/element-heading": "^0.3.447",
|
|
69
|
+
"@micromag/element-layout": "^0.3.447",
|
|
70
|
+
"@micromag/element-scroll": "^0.3.447",
|
|
71
|
+
"@micromag/element-text": "^0.3.447",
|
|
72
|
+
"@micromag/transforms": "^0.3.447",
|
|
73
73
|
"classnames": "^2.2.6",
|
|
74
74
|
"lodash": "^4.17.21",
|
|
75
75
|
"prop-types": "^15.7.2",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"access": "public",
|
|
81
81
|
"registry": "https://registry.npmjs.org/"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "ec175c602ce6f59b7561f57c92da443814109d50"
|
|
84
84
|
}
|