@mjhls/mjh-framework 1.0.491 → 1.0.493
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/README.md +1 -1
- package/dist/cjs/ArticleQueue.js +4 -21
- package/dist/cjs/View.js +5 -22
- package/dist/esm/ArticleQueue.js +4 -21
- package/dist/esm/View.js +5 -22
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/ArticleQueue.js
CHANGED
|
@@ -97,22 +97,7 @@ var getArticleSummary = function getArticleSummary(article) {
|
|
|
97
97
|
if (article.summary && article.summary.length > 0) {
|
|
98
98
|
return article.summary;
|
|
99
99
|
} else {
|
|
100
|
-
|
|
101
|
-
body = _article$body === undefined ? [] : _article$body;
|
|
102
|
-
|
|
103
|
-
var desc = '';
|
|
104
|
-
body.some(function (children) {
|
|
105
|
-
children.children && children.children.some(function (item) {
|
|
106
|
-
if (item.text && String(item.text).trim().length > 0 && desc === '') {
|
|
107
|
-
desc = String(item.text);
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
if (desc !== '') {
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
return desc;
|
|
100
|
+
return false;
|
|
116
101
|
}
|
|
117
102
|
};
|
|
118
103
|
|
|
@@ -583,16 +568,14 @@ var Article = function Article(props) {
|
|
|
583
568
|
})
|
|
584
569
|
),
|
|
585
570
|
renderRelevantTopicsDropdown(),
|
|
586
|
-
React__default.createElement(
|
|
571
|
+
summary && React__default.createElement(
|
|
587
572
|
'p',
|
|
588
573
|
null,
|
|
589
574
|
React__default.createElement(
|
|
590
575
|
'em',
|
|
591
576
|
null,
|
|
592
577
|
summary
|
|
593
|
-
)
|
|
594
|
-
React__default.createElement('br', null),
|
|
595
|
-
React__default.createElement('br', null)
|
|
578
|
+
)
|
|
596
579
|
),
|
|
597
580
|
main.main_39 && props.article.Ads.map(function (ad, index) {
|
|
598
581
|
if (index === 0) {
|
|
@@ -605,7 +588,7 @@ var Article = function Article(props) {
|
|
|
605
588
|
}),
|
|
606
589
|
React__default.createElement(
|
|
607
590
|
'div',
|
|
608
|
-
{ className: 'block-content' },
|
|
591
|
+
{ className: 'block-content mt-3' },
|
|
609
592
|
renderBlockContent(props.article),
|
|
610
593
|
issue && issue.url && React__default.createElement(
|
|
611
594
|
'a',
|
package/dist/cjs/View.js
CHANGED
|
@@ -89,22 +89,7 @@ var getArticleSummary = function getArticleSummary(article) {
|
|
|
89
89
|
if (article.summary && article.summary.length > 0) {
|
|
90
90
|
return article.summary;
|
|
91
91
|
} else {
|
|
92
|
-
|
|
93
|
-
body = _article$body === undefined ? [] : _article$body;
|
|
94
|
-
|
|
95
|
-
var desc = '';
|
|
96
|
-
body.some(function (children) {
|
|
97
|
-
children.children && children.children.some(function (item) {
|
|
98
|
-
if (item.text && String(item.text).trim().length > 0 && desc === '') {
|
|
99
|
-
desc = String(item.text);
|
|
100
|
-
return true;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
if (desc !== '') {
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
return desc;
|
|
92
|
+
return false;
|
|
108
93
|
}
|
|
109
94
|
};
|
|
110
95
|
|
|
@@ -173,7 +158,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
173
158
|
className: 'doc-group',
|
|
174
159
|
style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
|
|
175
160
|
thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
|
|
176
|
-
React__default.createElement('p', {
|
|
161
|
+
!thumbnailUrl && React__default.createElement('p', {
|
|
177
162
|
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main.main_39 ? 'left' : 'right', marginTop: '.25rem' },
|
|
178
163
|
dangerouslySetInnerHTML: { __html: name } }),
|
|
179
164
|
main.main_39 && !thumbnailUrl && React__default.createElement(
|
|
@@ -771,16 +756,14 @@ var Article = function Article(props) {
|
|
|
771
756
|
React__default.createElement(DocumentGroup, { article: props.article, client: props.client })
|
|
772
757
|
)
|
|
773
758
|
),
|
|
774
|
-
React__default.createElement(
|
|
759
|
+
summary && React__default.createElement(
|
|
775
760
|
'p',
|
|
776
761
|
null,
|
|
777
762
|
React__default.createElement(
|
|
778
763
|
'em',
|
|
779
764
|
null,
|
|
780
765
|
summary
|
|
781
|
-
)
|
|
782
|
-
React__default.createElement('br', null),
|
|
783
|
-
React__default.createElement('br', null)
|
|
766
|
+
)
|
|
784
767
|
),
|
|
785
768
|
React__default.createElement(
|
|
786
769
|
'div',
|
|
@@ -806,7 +789,7 @@ var Article = function Article(props) {
|
|
|
806
789
|
),
|
|
807
790
|
React__default.createElement(
|
|
808
791
|
'div',
|
|
809
|
-
{ className: 'block-content' },
|
|
792
|
+
{ className: 'block-content mt-3' },
|
|
810
793
|
renderBlockContent(article),
|
|
811
794
|
React__default.createElement(
|
|
812
795
|
'noscript',
|
package/dist/esm/ArticleQueue.js
CHANGED
|
@@ -92,22 +92,7 @@ var getArticleSummary = function getArticleSummary(article) {
|
|
|
92
92
|
if (article.summary && article.summary.length > 0) {
|
|
93
93
|
return article.summary;
|
|
94
94
|
} else {
|
|
95
|
-
|
|
96
|
-
body = _article$body === undefined ? [] : _article$body;
|
|
97
|
-
|
|
98
|
-
var desc = '';
|
|
99
|
-
body.some(function (children) {
|
|
100
|
-
children.children && children.children.some(function (item) {
|
|
101
|
-
if (item.text && String(item.text).trim().length > 0 && desc === '') {
|
|
102
|
-
desc = String(item.text);
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
if (desc !== '') {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
return desc;
|
|
95
|
+
return false;
|
|
111
96
|
}
|
|
112
97
|
};
|
|
113
98
|
|
|
@@ -578,16 +563,14 @@ var Article = function Article(props) {
|
|
|
578
563
|
})
|
|
579
564
|
),
|
|
580
565
|
renderRelevantTopicsDropdown(),
|
|
581
|
-
React__default.createElement(
|
|
566
|
+
summary && React__default.createElement(
|
|
582
567
|
'p',
|
|
583
568
|
null,
|
|
584
569
|
React__default.createElement(
|
|
585
570
|
'em',
|
|
586
571
|
null,
|
|
587
572
|
summary
|
|
588
|
-
)
|
|
589
|
-
React__default.createElement('br', null),
|
|
590
|
-
React__default.createElement('br', null)
|
|
573
|
+
)
|
|
591
574
|
),
|
|
592
575
|
main_39 && props.article.Ads.map(function (ad, index) {
|
|
593
576
|
if (index === 0) {
|
|
@@ -600,7 +583,7 @@ var Article = function Article(props) {
|
|
|
600
583
|
}),
|
|
601
584
|
React__default.createElement(
|
|
602
585
|
'div',
|
|
603
|
-
{ className: 'block-content' },
|
|
586
|
+
{ className: 'block-content mt-3' },
|
|
604
587
|
renderBlockContent(props.article),
|
|
605
588
|
issue && issue.url && React__default.createElement(
|
|
606
589
|
'a',
|
package/dist/esm/View.js
CHANGED
|
@@ -84,22 +84,7 @@ var getArticleSummary = function getArticleSummary(article) {
|
|
|
84
84
|
if (article.summary && article.summary.length > 0) {
|
|
85
85
|
return article.summary;
|
|
86
86
|
} else {
|
|
87
|
-
|
|
88
|
-
body = _article$body === undefined ? [] : _article$body;
|
|
89
|
-
|
|
90
|
-
var desc = '';
|
|
91
|
-
body.some(function (children) {
|
|
92
|
-
children.children && children.children.some(function (item) {
|
|
93
|
-
if (item.text && String(item.text).trim().length > 0 && desc === '') {
|
|
94
|
-
desc = String(item.text);
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
if (desc !== '') {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
return desc;
|
|
87
|
+
return false;
|
|
103
88
|
}
|
|
104
89
|
};
|
|
105
90
|
|
|
@@ -168,7 +153,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
168
153
|
className: 'doc-group',
|
|
169
154
|
style: { display: 'flex', flexDirection: 'column', padding: '0 1rem', justifyContent: thumbnailUrl ? 'center' : 'flex-start', alignItems: 'center' } },
|
|
170
155
|
thumbnailUrl && React__default.createElement('img', { style: { maxWidth: '220px', maxHeight: '100px', marginTop: '1rem' }, src: thumbnailUrl, alt: name }),
|
|
171
|
-
React__default.createElement('p', {
|
|
156
|
+
!thumbnailUrl && React__default.createElement('p', {
|
|
172
157
|
style: { maxWidth: '315px', margin: '0', color: 'var(--primary)', textAlign: thumbnailUrl ? 'center' : main_39 ? 'left' : 'right', marginTop: '.25rem' },
|
|
173
158
|
dangerouslySetInnerHTML: { __html: name } }),
|
|
174
159
|
main_39 && !thumbnailUrl && React__default.createElement(
|
|
@@ -766,16 +751,14 @@ var Article = function Article(props) {
|
|
|
766
751
|
React__default.createElement(DocumentGroup, { article: props.article, client: props.client })
|
|
767
752
|
)
|
|
768
753
|
),
|
|
769
|
-
React__default.createElement(
|
|
754
|
+
summary && React__default.createElement(
|
|
770
755
|
'p',
|
|
771
756
|
null,
|
|
772
757
|
React__default.createElement(
|
|
773
758
|
'em',
|
|
774
759
|
null,
|
|
775
760
|
summary
|
|
776
|
-
)
|
|
777
|
-
React__default.createElement('br', null),
|
|
778
|
-
React__default.createElement('br', null)
|
|
761
|
+
)
|
|
779
762
|
),
|
|
780
763
|
React__default.createElement(
|
|
781
764
|
'div',
|
|
@@ -801,7 +784,7 @@ var Article = function Article(props) {
|
|
|
801
784
|
),
|
|
802
785
|
React__default.createElement(
|
|
803
786
|
'div',
|
|
804
|
-
{ className: 'block-content' },
|
|
787
|
+
{ className: 'block-content mt-3' },
|
|
805
788
|
renderBlockContent(article),
|
|
806
789
|
React__default.createElement(
|
|
807
790
|
'noscript',
|