@selfcommunity/react-ui 0.1.2-alpha.10 → 0.1.2-alpha.11
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.
|
@@ -256,20 +256,24 @@ const Feed = (inProps, ref) => {
|
|
|
256
256
|
return {
|
|
257
257
|
left: _widgets.map(w => Object.assign({}, w, {
|
|
258
258
|
position: w.position * (w.column === 'right' ? 5 : 1)
|
|
259
|
-
})).sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ?
|
|
259
|
+
})).sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ? Array.from({
|
|
260
|
+
length: 3
|
|
261
|
+
}).map(() => ({
|
|
260
262
|
type: 'widget',
|
|
261
263
|
component: ItemSkeleton,
|
|
262
264
|
componentProps: ItemSkeletonProps
|
|
263
|
-
}
|
|
265
|
+
})) : [])]),
|
|
264
266
|
right: []
|
|
265
267
|
};
|
|
266
268
|
} else {
|
|
267
269
|
return {
|
|
268
|
-
left: _widgets.filter(w => w.column === 'left').sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ?
|
|
270
|
+
left: _widgets.filter(w => w.column === 'left').sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ? Array.from({
|
|
271
|
+
length: 3
|
|
272
|
+
}).map(() => ({
|
|
269
273
|
type: 'widget',
|
|
270
274
|
component: ItemSkeleton,
|
|
271
275
|
componentProps: ItemSkeletonProps
|
|
272
|
-
}
|
|
276
|
+
})) : [])]),
|
|
273
277
|
right: _widgets.filter(w => w.column === 'right').sort(widgetSort)
|
|
274
278
|
};
|
|
275
279
|
}
|
|
@@ -286,10 +290,10 @@ const Feed = (inProps, ref) => {
|
|
|
286
290
|
md: 7
|
|
287
291
|
}, /*#__PURE__*/_react.default.createElement(_reactInfiniteScrollComponent.default, {
|
|
288
292
|
className: classes.left,
|
|
289
|
-
dataLength:
|
|
293
|
+
dataLength: data.left.length,
|
|
290
294
|
next: fetch,
|
|
291
295
|
hasMore: Boolean(next),
|
|
292
|
-
loader: /*#__PURE__*/_react.default.createElement(
|
|
296
|
+
loader: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null),
|
|
293
297
|
endMessage: /*#__PURE__*/_react.default.createElement(_Widget.default, {
|
|
294
298
|
className: classes.end
|
|
295
299
|
}, /*#__PURE__*/_react.default.createElement(_material.CardContent, null, endMessage)),
|
|
@@ -304,7 +308,7 @@ const Feed = (inProps, ref) => {
|
|
|
304
308
|
style: {
|
|
305
309
|
overflow: 'visible'
|
|
306
310
|
}
|
|
307
|
-
},
|
|
311
|
+
}, data.left.map((d, i) => d.type === 'widget' ? /*#__PURE__*/_react.default.createElement(d.component, _extends({
|
|
308
312
|
key: `widget_left_${i}`
|
|
309
313
|
}, d.componentProps, d.publishEvents && {
|
|
310
314
|
publicationChannel: id
|
|
@@ -256,20 +256,24 @@ const Feed = (inProps, ref) => {
|
|
|
256
256
|
return {
|
|
257
257
|
left: _widgets.map(w => Object.assign({}, w, {
|
|
258
258
|
position: w.position * (w.column === 'right' ? 5 : 1)
|
|
259
|
-
})).sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ?
|
|
259
|
+
})).sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ? Array.from({
|
|
260
|
+
length: 3
|
|
261
|
+
}).map(() => ({
|
|
260
262
|
type: 'widget',
|
|
261
263
|
component: ItemSkeleton,
|
|
262
264
|
componentProps: ItemSkeletonProps
|
|
263
|
-
}
|
|
265
|
+
})) : [])]),
|
|
264
266
|
right: []
|
|
265
267
|
};
|
|
266
268
|
} else {
|
|
267
269
|
return {
|
|
268
|
-
left: _widgets.filter(w => w.column === 'left').sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ?
|
|
270
|
+
left: _widgets.filter(w => w.column === 'left').sort(widgetSort).reduce(widgetReducer, [...feedData, ...(loading ? Array.from({
|
|
271
|
+
length: 3
|
|
272
|
+
}).map(() => ({
|
|
269
273
|
type: 'widget',
|
|
270
274
|
component: ItemSkeleton,
|
|
271
275
|
componentProps: ItemSkeletonProps
|
|
272
|
-
}
|
|
276
|
+
})) : [])]),
|
|
273
277
|
right: _widgets.filter(w => w.column === 'right').sort(widgetSort)
|
|
274
278
|
};
|
|
275
279
|
}
|
|
@@ -286,10 +290,10 @@ const Feed = (inProps, ref) => {
|
|
|
286
290
|
md: 7
|
|
287
291
|
}, /*#__PURE__*/_react.default.createElement(_reactInfiniteScrollComponent.default, {
|
|
288
292
|
className: classes.left,
|
|
289
|
-
dataLength:
|
|
293
|
+
dataLength: data.left.length,
|
|
290
294
|
next: fetch,
|
|
291
295
|
hasMore: Boolean(next),
|
|
292
|
-
loader: /*#__PURE__*/_react.default.createElement(
|
|
296
|
+
loader: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null),
|
|
293
297
|
endMessage: /*#__PURE__*/_react.default.createElement(_Widget.default, {
|
|
294
298
|
className: classes.end
|
|
295
299
|
}, /*#__PURE__*/_react.default.createElement(_material.CardContent, null, endMessage)),
|
|
@@ -304,7 +308,7 @@ const Feed = (inProps, ref) => {
|
|
|
304
308
|
style: {
|
|
305
309
|
overflow: 'visible'
|
|
306
310
|
}
|
|
307
|
-
},
|
|
311
|
+
}, data.left.map((d, i) => d.type === 'widget' ? /*#__PURE__*/_react.default.createElement(d.component, _extends({
|
|
308
312
|
key: `widget_left_${i}`
|
|
309
313
|
}, d.componentProps, d.publishEvents && {
|
|
310
314
|
publicationChannel: id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feed.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Feed/Feed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAuC,SAAS,EAAwE,MAAM,OAAO,CAAC;AAQpJ,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAElD,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AACvD,OAAO,EAAC,UAAU,EAAoE,MAAM,sBAAsB,CAAC;AACnH,OAAO,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