@pronto-tools-and-more/components 10.53.0 → 10.55.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 CHANGED
@@ -1197,7 +1197,7 @@ var getFilterLanguage = (language) => {
1197
1197
  }
1198
1198
  };
1199
1199
 
1200
- // src/parts/SearchResults/SearchResults.tsx
1200
+ // src/parts/SearchResultsNews/SearchResultsNews.tsx
1201
1201
  var getImageSrc = (fallbackImage) => {
1202
1202
  if (fallbackImage) {
1203
1203
  return `$functions.fallback($functions.id($context, 'search-result', 'issue', 'thumbnails', 'default'), '${fallbackImage}')`;
@@ -1220,7 +1220,7 @@ var unrender8 = (element, renderElement) => {
1220
1220
  content: final
1221
1221
  };
1222
1222
  };
1223
- var SearchResults = ({
1223
+ var SearchResultsNews = ({
1224
1224
  render,
1225
1225
  language,
1226
1226
  fallbackImage
@@ -1327,11 +1327,138 @@ var SearchResults = ({
1327
1327
  template: "grid",
1328
1328
  tapEntry: {
1329
1329
  type: "openContent"
1330
+ },
1331
+ condition: {
1332
+ AND: [
1333
+ {
1334
+ value: "$context.phrase",
1335
+ operation: "NOT_EMPTY"
1336
+ },
1337
+ {
1338
+ OR: [
1339
+ {
1340
+ value: "$context.searchtype",
1341
+ compareValue: "news"
1342
+ },
1343
+ {
1344
+ value: "$context.searchtype",
1345
+ operation: "NOT_SET"
1346
+ }
1347
+ ]
1348
+ }
1349
+ ]
1330
1350
  }
1331
1351
  };
1332
1352
  return /* @__PURE__ */ React.createElement("div", { className: "SearchResults" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
1333
1353
  };
1334
1354
 
1355
+ // src/parts/SearchResults/SearchResults.tsx
1356
+ var SearchResults = SearchResultsNews;
1357
+
1358
+ // src/parts/SearchResultsEPaper/SearchResultsEPaper.tsx
1359
+ var SearchResultsEPaper = () => {
1360
+ const json = {
1361
+ content: [
1362
+ {
1363
+ content: {
1364
+ type: "search-result",
1365
+ coverHeight: "FIXED",
1366
+ tapPageHit: {
1367
+ type: "openContent",
1368
+ mode: "MODAL",
1369
+ titleBar: true
1370
+ },
1371
+ tapCover: {
1372
+ type: "openContent",
1373
+ mode: "MODAL"
1374
+ }
1375
+ },
1376
+ dataSource: {
1377
+ phrase: "$context.phrase",
1378
+ type: "search-result",
1379
+ filter: {
1380
+ AND: [
1381
+ {
1382
+ condition: {
1383
+ value: "$context.issue-age",
1384
+ compareValue: "day"
1385
+ },
1386
+ age: {
1387
+ count: 1,
1388
+ unit: "DAY"
1389
+ }
1390
+ },
1391
+ {
1392
+ condition: {
1393
+ value: "$context.issue-age",
1394
+ compareValue: "week"
1395
+ },
1396
+ age: {
1397
+ count: 1,
1398
+ unit: "WEEK"
1399
+ }
1400
+ },
1401
+ {
1402
+ condition: {
1403
+ value: "$context.issue-age",
1404
+ compareValue: "month"
1405
+ },
1406
+ age: {
1407
+ count: 1,
1408
+ unit: "MONTH"
1409
+ }
1410
+ },
1411
+ {
1412
+ condition: {
1413
+ value: "$context.issue-age",
1414
+ compareValue: "year"
1415
+ },
1416
+ age: {
1417
+ count: 1,
1418
+ unit: "YEAR"
1419
+ }
1420
+ },
1421
+ {
1422
+ contentType: {
1423
+ value: "ISSUE",
1424
+ negated: false
1425
+ }
1426
+ }
1427
+ ]
1428
+ },
1429
+ contextKey: "searchResults",
1430
+ searchOptions: {
1431
+ sortBy: "PUB_DATE_DESC",
1432
+ sortPages: true
1433
+ }
1434
+ },
1435
+ type: "list",
1436
+ emptyMessage: {
1437
+ message: "SEARCH_RESULT_NO_RESULT",
1438
+ variables: ["hmm"]
1439
+ },
1440
+ errorMessage: "SEARCH_ERROR",
1441
+ errorButtonLabel: "SEARCH_ERROR_RETRY"
1442
+ }
1443
+ ],
1444
+ type: "section",
1445
+ class: "search-results-epaper",
1446
+ condition: {
1447
+ AND: [
1448
+ {
1449
+ value: "$context.phrase",
1450
+ operation: "NOT_EMPTY"
1451
+ },
1452
+ {
1453
+ value: "$context.searchtype",
1454
+ compareValue: "epaper"
1455
+ }
1456
+ ]
1457
+ }
1458
+ };
1459
+ return /* @__PURE__ */ React.createElement("div", { className: "SearchResultsEPaper" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
1460
+ };
1461
+
1335
1462
  // src/parts/Seo/Seo.tsx
1336
1463
  var Seo = ({
1337
1464
  title,
@@ -1459,6 +1586,7 @@ export {
1459
1586
  SearchHeaderToggle,
1460
1587
  SearchLink,
1461
1588
  SearchResults,
1589
+ SearchResultsEPaper,
1462
1590
  Seo,
1463
1591
  SocialLink,
1464
1592
  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,6 +1,8 @@
1
- import type { ISearchResultItemRenderer } from "../ISearchResultComponent/ISearchResultComponent.tsx";
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "10.53.0",
3
+ "version": "10.55.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",