@plusscommunities/pluss-newsletter-web-sharing 1.4.12 → 1.4.13
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/dist/index.cjs.js +3 -2
- package/dist/index.esm.js +3 -2
- package/dist/index.umd.js +3 -2
- package/package.json +1 -1
- package/src/screens/Newsletter/NewsHub.js +2 -96
package/dist/index.cjs.js
CHANGED
|
@@ -2130,7 +2130,7 @@ var NewsHub = /*#__PURE__*/function (_Component) {
|
|
|
2130
2130
|
|
|
2131
2131
|
return /*#__PURE__*/React__default['default'].createElement(HubSidebar, {
|
|
2132
2132
|
sections: [{
|
|
2133
|
-
title: values.textTitleNews,
|
|
2133
|
+
title: this.props.strings["".concat(values.featureKey, "_textTitleNews")] || values.textTitleNews,
|
|
2134
2134
|
items: sectionItems
|
|
2135
2135
|
}]
|
|
2136
2136
|
});
|
|
@@ -2239,7 +2239,8 @@ var mapStateToProps$5 = function mapStateToProps(state) {
|
|
|
2239
2239
|
return {
|
|
2240
2240
|
news: state[values.reducerKey].news,
|
|
2241
2241
|
submissions: state[values.reducerKey].submissions,
|
|
2242
|
-
auth: auth
|
|
2242
|
+
auth: auth,
|
|
2243
|
+
strings: state.strings && state.strings.config || {}
|
|
2243
2244
|
};
|
|
2244
2245
|
};
|
|
2245
2246
|
|
package/dist/index.esm.js
CHANGED
|
@@ -2087,7 +2087,7 @@ var NewsHub = /*#__PURE__*/function (_Component) {
|
|
|
2087
2087
|
|
|
2088
2088
|
return /*#__PURE__*/React.createElement(HubSidebar, {
|
|
2089
2089
|
sections: [{
|
|
2090
|
-
title: values.textTitleNews,
|
|
2090
|
+
title: this.props.strings["".concat(values.featureKey, "_textTitleNews")] || values.textTitleNews,
|
|
2091
2091
|
items: sectionItems
|
|
2092
2092
|
}]
|
|
2093
2093
|
});
|
|
@@ -2196,7 +2196,8 @@ var mapStateToProps$5 = function mapStateToProps(state) {
|
|
|
2196
2196
|
return {
|
|
2197
2197
|
news: state[values.reducerKey].news,
|
|
2198
2198
|
submissions: state[values.reducerKey].submissions,
|
|
2199
|
-
auth: auth
|
|
2199
|
+
auth: auth,
|
|
2200
|
+
strings: state.strings && state.strings.config || {}
|
|
2200
2201
|
};
|
|
2201
2202
|
};
|
|
2202
2203
|
|
package/dist/index.umd.js
CHANGED
|
@@ -2110,7 +2110,7 @@
|
|
|
2110
2110
|
|
|
2111
2111
|
return /*#__PURE__*/React__default['default'].createElement(HubSidebar, {
|
|
2112
2112
|
sections: [{
|
|
2113
|
-
title: values.textTitleNews,
|
|
2113
|
+
title: this.props.strings["".concat(values.featureKey, "_textTitleNews")] || values.textTitleNews,
|
|
2114
2114
|
items: sectionItems
|
|
2115
2115
|
}]
|
|
2116
2116
|
});
|
|
@@ -2219,7 +2219,8 @@
|
|
|
2219
2219
|
return {
|
|
2220
2220
|
news: state[values.reducerKey].news,
|
|
2221
2221
|
submissions: state[values.reducerKey].submissions,
|
|
2222
|
-
auth: auth
|
|
2222
|
+
auth: auth,
|
|
2223
|
+
strings: state.strings && state.strings.config || {}
|
|
2223
2224
|
};
|
|
2224
2225
|
};
|
|
2225
2226
|
|
package/package.json
CHANGED
|
@@ -144,101 +144,6 @@ class NewsHub extends Component {
|
|
|
144
144
|
return gweg;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
renderLeftBar() {
|
|
148
|
-
if (
|
|
149
|
-
validateAccess(this.props.auth.site, values.permissionNewsletterSubmit, this.props.auth) &&
|
|
150
|
-
!validateAccess(this.props.auth.site, values.permissionNewsletter, this.props.auth)
|
|
151
|
-
) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
return (
|
|
155
|
-
<div className="hub-sideContent">
|
|
156
|
-
{/* Top Add Button */}
|
|
157
|
-
<div className="hub-sideContent-topButton" />
|
|
158
|
-
<div style={{ paddingLeft: 15, width: '100%' }}>
|
|
159
|
-
{/* Title */}
|
|
160
|
-
<div className="fontMedium fontSize-36 text-dark" style={styles.sideBarTitleSection}>
|
|
161
|
-
{values.textTitleNews}
|
|
162
|
-
</div>
|
|
163
|
-
{/* Content */}
|
|
164
|
-
{/* Analytics */}
|
|
165
|
-
<div
|
|
166
|
-
onClick={() => {
|
|
167
|
-
this.setState({ selectedSection: 'Analytics' });
|
|
168
|
-
}}
|
|
169
|
-
className="sideBarSection"
|
|
170
|
-
style={this.getSideBarSectionColour('Analytics')}
|
|
171
|
-
>
|
|
172
|
-
<div className="fontMedium fontSize-36 text-dark" style={{ lineHeight: '50px' }}>
|
|
173
|
-
<FontAwesome name="line-chart" className="sideBarSection__icon" />
|
|
174
|
-
</div>
|
|
175
|
-
<div className="fontRegular fontSize-16 text-light lineHeight-22">Analytics</div>
|
|
176
|
-
</div>
|
|
177
|
-
{/* All Articles */}
|
|
178
|
-
<div
|
|
179
|
-
onClick={() => {
|
|
180
|
-
this.setState({ selectedSection: 'all' });
|
|
181
|
-
}}
|
|
182
|
-
className="sideBarSection"
|
|
183
|
-
style={this.getSideBarSectionColour('all')}
|
|
184
|
-
>
|
|
185
|
-
<div className="fontMedium fontSize-36 text-dark" style={{ lineHeight: '50px' }}>
|
|
186
|
-
{this.renderStats(this.state.allList.length, this.state.loadingAll)}
|
|
187
|
-
</div>
|
|
188
|
-
<div className="fontRegular fontSize-16 text-light lineHeight-22">All posts</div>
|
|
189
|
-
</div>
|
|
190
|
-
<div
|
|
191
|
-
onClick={() => {
|
|
192
|
-
this.setState({ selectedSection: 'thisMonth' });
|
|
193
|
-
}}
|
|
194
|
-
className="sideBarSection"
|
|
195
|
-
style={this.getSideBarSectionColour('thisMonth')}
|
|
196
|
-
>
|
|
197
|
-
<div className="fontMedium fontSize-36 text-dark" style={{ lineHeight: '50px' }}>
|
|
198
|
-
{this.renderStats(this.state.thisMonth.length, this.state.loadingAll)}
|
|
199
|
-
</div>
|
|
200
|
-
<div className="fontRegular fontSize-16 text-light lineHeight-22">This month</div>
|
|
201
|
-
</div>
|
|
202
|
-
{/* Article Submissions */}
|
|
203
|
-
{this.props.auth.site !== 'hq' && validateAccess(this.props.auth.site, values.permissionNewsletter, this.props.auth) && (
|
|
204
|
-
<div
|
|
205
|
-
onClick={() => {
|
|
206
|
-
this.setState({ selectedSection: 'submissions' });
|
|
207
|
-
}}
|
|
208
|
-
className="sideBarSection"
|
|
209
|
-
style={this.getSideBarSectionColour('submissions')}
|
|
210
|
-
>
|
|
211
|
-
<div
|
|
212
|
-
className="fontMedium fontSize-36"
|
|
213
|
-
style={{
|
|
214
|
-
lineHeight: '50px',
|
|
215
|
-
color: !this.state.loadingSubmissions && this.state.submissionEntries.length > 0 ? COLOUR_BRANDING_ACTION : TEXT_LIGHT,
|
|
216
|
-
}}
|
|
217
|
-
>
|
|
218
|
-
{this.renderStats(this.state.submissionEntries.length, this.state.loadingSubmissions)}
|
|
219
|
-
</div>
|
|
220
|
-
<div className="fontRegular fontSize-16 text-light lineHeight-22">Submissions</div>
|
|
221
|
-
</div>
|
|
222
|
-
)}
|
|
223
|
-
{hasAvailableNews && (
|
|
224
|
-
<div
|
|
225
|
-
onClick={() => {
|
|
226
|
-
this.setState({ selectedSection: 'available' });
|
|
227
|
-
}}
|
|
228
|
-
className="sideBarSection"
|
|
229
|
-
style={this.getSideBarSectionColour('available')}
|
|
230
|
-
>
|
|
231
|
-
<div className="fontMedium fontSize-36 text-dark" style={{ lineHeight: '50px' }}>
|
|
232
|
-
<FontAwesome name="newspaper-o" className="sideBarSection__icon" />
|
|
233
|
-
</div>
|
|
234
|
-
<div className="fontRegular fontSize-16 text-light lineHeight-22">Available posts</div>
|
|
235
|
-
</div>
|
|
236
|
-
)}
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
147
|
renderLeftBar() {
|
|
243
148
|
const sectionItems = [];
|
|
244
149
|
|
|
@@ -303,7 +208,7 @@ class NewsHub extends Component {
|
|
|
303
208
|
<HubSidebar
|
|
304
209
|
sections={[
|
|
305
210
|
{
|
|
306
|
-
title: values.textTitleNews,
|
|
211
|
+
title: this.props.strings[`${values.featureKey}_textTitleNews`] || values.textTitleNews,
|
|
307
212
|
items: sectionItems,
|
|
308
213
|
},
|
|
309
214
|
]}
|
|
@@ -386,6 +291,7 @@ const mapStateToProps = (state) => {
|
|
|
386
291
|
news: state[values.reducerKey].news,
|
|
387
292
|
submissions: state[values.reducerKey].submissions,
|
|
388
293
|
auth,
|
|
294
|
+
strings: (state.strings && state.strings.config) || {},
|
|
389
295
|
};
|
|
390
296
|
};
|
|
391
297
|
|