@pronto-tools-and-more/components 14.34.0 → 14.36.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
@@ -589,6 +589,11 @@ var Collection = ({
589
589
  return /* @__PURE__ */ React.createElement("div", { className: "Collection" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
590
590
  };
591
591
 
592
+ // src/parts/Conditions/Conditions.ts
593
+ var Conditions = {
594
+ SearchResultsAreEmpty: "!$context.phrase"
595
+ };
596
+
592
597
  // src/parts/Container/Container.tsx
593
598
  var Container = ({
594
599
  children,
@@ -1738,13 +1743,16 @@ var getImageSrc = (fallbackImage) => {
1738
1743
  };
1739
1744
  var getNodeInfo3 = (element) => {
1740
1745
  const { render, fallbackImage, ...rest } = element;
1746
+ const contentKey = "'search-result'";
1741
1747
  return {
1742
- title: "$functions.id($context, 'search-result', 'issue', 'name')",
1743
- name: "$functions.id($context, 'search-result', 'issue', 'name')",
1744
- description: "$functions.id($context, 'search-result', 'issue', 'description')",
1748
+ title: `$functions.id($context, ${contentKey}, 'issue', 'name')`,
1749
+ name: `$functions.id($context, ${contentKey}, 'issue', 'name')`,
1750
+ description: `$functions.id($context, ${contentKey}, 'issue', 'description')`,
1745
1751
  imageSrc: getImageSrc(fallbackImage),
1746
- language: "$functions.getLanguage($functions.id($context, 'search-result', 'issue'))",
1747
- slug: "$functions.id($context, 'search-result', 'issue', 'properties', 'slug')"
1752
+ language: `$functions.getLanguage($functions.id($context, ${contentKey}, 'issue'))`,
1753
+ slug: `$functions.id($context, ${contentKey}, 'issue', 'properties', 'slug')`,
1754
+ primaryCategoryId: `$functions.getPrimaryCategoryProperty($context[${contentKey}], 'id')`,
1755
+ primaryCategoryName: `$functions.getPrimaryCategoryProperty($context[${contentKey}], 'name')`
1748
1756
  };
1749
1757
  };
1750
1758
  var unrender15 = (element, renderElement) => {
@@ -1760,7 +1768,8 @@ var unrender15 = (element, renderElement) => {
1760
1768
  var SearchResultsNews = ({
1761
1769
  render,
1762
1770
  language,
1763
- fallbackImage
1771
+ fallbackImage,
1772
+ emptyMessage
1764
1773
  }) => {
1765
1774
  const filterLanguage = getFilterLanguage(language);
1766
1775
  const filterAnd = [
@@ -1856,7 +1865,7 @@ var SearchResultsNews = ({
1856
1865
  type: "list",
1857
1866
  class: "schlauch-section data-custom-search-results",
1858
1867
  emptyMessage: {
1859
- message: "SEARCH_RESULT_NO_RESULT",
1868
+ message: emptyMessage || "SEARCH_RESULT_NO_RESULT",
1860
1869
  variables: ["$context.phrase"]
1861
1870
  },
1862
1871
  errorMessage: "SEARCH_ERROR",
@@ -2114,6 +2123,7 @@ export {
2114
2123
  Button,
2115
2124
  CategoryList,
2116
2125
  Collection,
2126
+ Conditions,
2117
2127
  Container,
2118
2128
  ContentBody,
2119
2129
  ContentTitle,
@@ -7,6 +7,7 @@ export * from "../BaseSideBar/BaseSideBar.tsx";
7
7
  export * from "../Button/Button.tsx";
8
8
  export * from "../CategoryList/CategoryList.tsx";
9
9
  export * from "../Collection/Collection.tsx";
10
+ export * from "../Conditions/Conditions.ts";
10
11
  export * from "../Container/Container.tsx";
11
12
  export * from "../ContentBody/ContentBody.tsx";
12
13
  export * from "../ContentTitle/ContentTitle.tsx";
@@ -0,0 +1,3 @@
1
+ export declare const Conditions: {
2
+ SearchResultsAreEmpty: string;
3
+ };
@@ -1,7 +1,10 @@
1
1
  export interface ISearchResult {
2
+ readonly primaryCategoryName?: string;
3
+ readonly primaryCategoryId?: string;
2
4
  readonly label: string;
3
5
  readonly readtime: string;
4
6
  readonly title: string;
5
7
  readonly description: string;
6
8
  readonly imageSrc: string;
9
+ readonly slug: string;
7
10
  }
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * @deprecated use SearchResultsNews instead
3
3
  */
4
- export declare const SearchResults: ({ render, language, fallbackImage, }: {
4
+ export declare const SearchResults: ({ render, language, fallbackImage, emptyMessage, }: {
5
5
  render: import("../ISearchResultComponent/ISearchResultComponent.tsx").ISearchResultItemRenderer;
6
6
  language?: string;
7
7
  fallbackImage?: string;
8
+ emptyMessage?: string;
8
9
  }) => import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import type { ISearchResultItemRenderer } from "../ISearchResultComponent/ISearchResultComponent.tsx";
2
- export declare const SearchResultsNews: ({ render, language, fallbackImage, }: {
2
+ export declare const SearchResultsNews: ({ render, language, fallbackImage, emptyMessage, }: {
3
3
  render: ISearchResultItemRenderer;
4
4
  language?: string;
5
5
  fallbackImage?: string;
6
+ emptyMessage?: string;
6
7
  }) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "14.34.0",
3
+ "version": "14.36.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",