@pronto-tools-and-more/components 10.52.0 → 10.54.0
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/main.js +146 -20
- package/dist/parts/Components/Components.d.ts +1 -0
- package/dist/parts/DossierList/DossierList.d.ts +2 -1
- package/dist/parts/SearchResults/SearchResults.d.ts +4 -2
- package/dist/parts/SearchResultsEPaper/SearchResultsEPaper.d.ts +1 -0
- package/dist/parts/SearchResultsNews/SearchResultsNews.d.ts +6 -0
- 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"
|
@@ -1179,7 +1197,7 @@ var getFilterLanguage = (language) => {
|
|
1179
1197
|
}
|
1180
1198
|
};
|
1181
1199
|
|
1182
|
-
// src/parts/
|
1200
|
+
// src/parts/SearchResultsNews/SearchResultsNews.tsx
|
1183
1201
|
var getImageSrc = (fallbackImage) => {
|
1184
1202
|
if (fallbackImage) {
|
1185
1203
|
return `$functions.fallback($functions.id($context, 'search-result', 'issue', 'thumbnails', 'default'), '${fallbackImage}')`;
|
@@ -1202,7 +1220,7 @@ var unrender8 = (element, renderElement) => {
|
|
1202
1220
|
content: final
|
1203
1221
|
};
|
1204
1222
|
};
|
1205
|
-
var
|
1223
|
+
var SearchResultsNews = ({
|
1206
1224
|
render,
|
1207
1225
|
language,
|
1208
1226
|
fallbackImage
|
@@ -1314,6 +1332,113 @@ var SearchResults = ({
|
|
1314
1332
|
return /* @__PURE__ */ React.createElement("div", { className: "SearchResults" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
|
1315
1333
|
};
|
1316
1334
|
|
1335
|
+
// src/parts/SearchResults/SearchResults.tsx
|
1336
|
+
var SearchResults = SearchResultsNews;
|
1337
|
+
|
1338
|
+
// src/parts/SearchResultsEPaper/SearchResultsEPaper.tsx
|
1339
|
+
var SearchResultsEPaper = () => {
|
1340
|
+
const json = {
|
1341
|
+
content: [
|
1342
|
+
{
|
1343
|
+
content: {
|
1344
|
+
type: "search-result",
|
1345
|
+
coverHeight: "FIXED",
|
1346
|
+
tapPageHit: {
|
1347
|
+
type: "openContent",
|
1348
|
+
mode: "MODAL",
|
1349
|
+
titleBar: true
|
1350
|
+
},
|
1351
|
+
tapCover: {
|
1352
|
+
type: "openContent",
|
1353
|
+
mode: "MODAL"
|
1354
|
+
}
|
1355
|
+
},
|
1356
|
+
dataSource: {
|
1357
|
+
phrase: "$context.phrase",
|
1358
|
+
type: "search-result",
|
1359
|
+
filter: {
|
1360
|
+
AND: [
|
1361
|
+
{
|
1362
|
+
condition: {
|
1363
|
+
value: "$context.issue-age",
|
1364
|
+
compareValue: "day"
|
1365
|
+
},
|
1366
|
+
age: {
|
1367
|
+
count: 1,
|
1368
|
+
unit: "DAY"
|
1369
|
+
}
|
1370
|
+
},
|
1371
|
+
{
|
1372
|
+
condition: {
|
1373
|
+
value: "$context.issue-age",
|
1374
|
+
compareValue: "week"
|
1375
|
+
},
|
1376
|
+
age: {
|
1377
|
+
count: 1,
|
1378
|
+
unit: "WEEK"
|
1379
|
+
}
|
1380
|
+
},
|
1381
|
+
{
|
1382
|
+
condition: {
|
1383
|
+
value: "$context.issue-age",
|
1384
|
+
compareValue: "month"
|
1385
|
+
},
|
1386
|
+
age: {
|
1387
|
+
count: 1,
|
1388
|
+
unit: "MONTH"
|
1389
|
+
}
|
1390
|
+
},
|
1391
|
+
{
|
1392
|
+
condition: {
|
1393
|
+
value: "$context.issue-age",
|
1394
|
+
compareValue: "year"
|
1395
|
+
},
|
1396
|
+
age: {
|
1397
|
+
count: 1,
|
1398
|
+
unit: "YEAR"
|
1399
|
+
}
|
1400
|
+
},
|
1401
|
+
{
|
1402
|
+
contentType: {
|
1403
|
+
value: "ISSUE",
|
1404
|
+
negated: false
|
1405
|
+
}
|
1406
|
+
}
|
1407
|
+
]
|
1408
|
+
},
|
1409
|
+
contextKey: "searchResults",
|
1410
|
+
searchOptions: {
|
1411
|
+
sortBy: "PUB_DATE_DESC",
|
1412
|
+
sortPages: true
|
1413
|
+
}
|
1414
|
+
},
|
1415
|
+
type: "list",
|
1416
|
+
emptyMessage: {
|
1417
|
+
message: "SEARCH_RESULT_NO_RESULT",
|
1418
|
+
variables: ["hmm"]
|
1419
|
+
},
|
1420
|
+
errorMessage: "SEARCH_ERROR",
|
1421
|
+
errorButtonLabel: "SEARCH_ERROR_RETRY"
|
1422
|
+
}
|
1423
|
+
],
|
1424
|
+
type: "section",
|
1425
|
+
class: "search-results-epaper",
|
1426
|
+
condition: {
|
1427
|
+
AND: [
|
1428
|
+
{
|
1429
|
+
value: "$context.phrase",
|
1430
|
+
operation: "NOT_EMPTY"
|
1431
|
+
},
|
1432
|
+
{
|
1433
|
+
value: "$context.searchtype",
|
1434
|
+
compareValue: "epaper"
|
1435
|
+
}
|
1436
|
+
]
|
1437
|
+
}
|
1438
|
+
};
|
1439
|
+
return /* @__PURE__ */ React.createElement("div", { className: "SearchResultsEPaper" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
|
1440
|
+
};
|
1441
|
+
|
1317
1442
|
// src/parts/Seo/Seo.tsx
|
1318
1443
|
var Seo = ({
|
1319
1444
|
title,
|
@@ -1441,6 +1566,7 @@ export {
|
|
1441
1566
|
SearchHeaderToggle,
|
1442
1567
|
SearchLink,
|
1443
1568
|
SearchResults,
|
1569
|
+
SearchResultsEPaper,
|
1444
1570
|
Seo,
|
1445
1571
|
SocialLink,
|
1446
1572
|
SocialLinks,
|
@@ -54,6 +54,7 @@ export * from "../SearchHeaderSelect/SearchHeaderSelect.tsx";
|
|
54
54
|
export * from "../SearchHeaderToggle/SearchHeaderToggle.tsx";
|
55
55
|
export * from "../SearchLink/SearchLink.tsx";
|
56
56
|
export * from "../SearchResults/SearchResults.tsx";
|
57
|
+
export * from "../SearchResultsEPaper/SearchResultsEPaper.tsx";
|
57
58
|
export * from "../Seo/Seo.tsx";
|
58
59
|
export * from "../SocialLink/SocialLink.tsx";
|
59
60
|
export * from "../SocialLinks/SocialLinks.tsx";
|
@@ -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;
|
@@ -1,6 +1,8 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* @deprecated use SearchResultsNews instead
|
3
|
+
*/
|
2
4
|
export declare const SearchResults: ({ render, language, fallbackImage, }: {
|
3
|
-
render: ISearchResultItemRenderer;
|
5
|
+
render: import("../ISearchResultComponent/ISearchResultComponent.tsx").ISearchResultItemRenderer;
|
4
6
|
language?: string;
|
5
7
|
fallbackImage?: string;
|
6
8
|
}) => import("react").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const SearchResultsEPaper: () => import("react").JSX.Element;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { ISearchResultItemRenderer } from "../ISearchResultComponent/ISearchResultComponent.tsx";
|
2
|
+
export declare const SearchResultsNews: ({ render, language, fallbackImage, }: {
|
3
|
+
render: ISearchResultItemRenderer;
|
4
|
+
language?: string;
|
5
|
+
fallbackImage?: string;
|
6
|
+
}) => import("react").JSX.Element;
|