@pronto-tools-and-more/components 10.51.0 → 10.53.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +36 -18
- package/dist/parts/DossierList/DossierList.d.ts +2 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
@@ -438,11 +438,13 @@ var dateHelper = (date, format, language = "de") => {
|
|
438
438
|
// src/parts/DossierList/DossierList.tsx
|
439
439
|
var unrender5 = (element, renderElement) => {
|
440
440
|
const { render, ...rest } = element;
|
441
|
+
const isCollection = element.dataSource.type === "collection-content";
|
442
|
+
const contentKey = isCollection ? "'collection-content'" : "'content'";
|
441
443
|
const node = render({
|
442
|
-
name: `$functions.id($context,
|
443
|
-
description: `$functions.id($context,
|
444
|
-
imageSrc: `$functions.id($context,
|
445
|
-
slug: `$functions.id($context,
|
444
|
+
name: `$functions.id($context, ${contentKey}, 'name')`,
|
445
|
+
description: `$functions.id($context, ${contentKey}, 'description')`,
|
446
|
+
imageSrc: `$functions.id($context, ${contentKey}, 'thumbnails', 'default')`,
|
447
|
+
slug: `$functions.id($context, ${contentKey}, 'properties', 'slug')`,
|
446
448
|
totalCount: 12
|
447
449
|
// TODO use real total count once supported
|
448
450
|
});
|
@@ -452,25 +454,41 @@ var unrender5 = (element, renderElement) => {
|
|
452
454
|
content: final
|
453
455
|
};
|
454
456
|
};
|
457
|
+
var getDossierDataSource = ({
|
458
|
+
collectionName
|
459
|
+
}) => {
|
460
|
+
if (collectionName) {
|
461
|
+
return {
|
462
|
+
type: "collection-content",
|
463
|
+
limit: `${111}`,
|
464
|
+
offset: `${0}`,
|
465
|
+
collectionFilter: {
|
466
|
+
name: {
|
467
|
+
value: collectionName
|
468
|
+
}
|
469
|
+
}
|
470
|
+
};
|
471
|
+
}
|
472
|
+
return {
|
473
|
+
filter: {
|
474
|
+
bundleType: {
|
475
|
+
value: "DOSSIER"
|
476
|
+
}
|
477
|
+
},
|
478
|
+
sort: [],
|
479
|
+
type: "content",
|
480
|
+
batchSize: 12
|
481
|
+
};
|
482
|
+
};
|
455
483
|
var DossierList = ({
|
456
|
-
render
|
484
|
+
render,
|
485
|
+
collectionName
|
457
486
|
}) => {
|
487
|
+
const dataSource = getDossierDataSource({ collectionName });
|
458
488
|
const json = {
|
459
489
|
render,
|
460
490
|
unrender: unrender5,
|
461
|
-
dataSource
|
462
|
-
type: "content",
|
463
|
-
filter: {
|
464
|
-
bundleType: {
|
465
|
-
value: "DOSSIER"
|
466
|
-
}
|
467
|
-
},
|
468
|
-
sort: [],
|
469
|
-
batchSize: 12,
|
470
|
-
fetchOptions: {
|
471
|
-
includeBundledContent: true
|
472
|
-
}
|
473
|
-
},
|
491
|
+
dataSource,
|
474
492
|
type: "list",
|
475
493
|
class: "epaper-issues",
|
476
494
|
template: "grid"
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { DossierListItemRenderer } from "../DossierListItemRenderer/DossierListItemRenderer.ts";
|
2
|
-
export declare const DossierList: ({ render, }: {
|
2
|
+
export declare const DossierList: ({ render, collectionName, }: {
|
3
3
|
render: DossierListItemRenderer;
|
4
|
+
collectionName?: string;
|
4
5
|
}) => import("react").JSX.Element;
|