@pronto-tools-and-more/components 6.22.1 → 6.24.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
@@ -4,6 +4,38 @@ var JsonComponent = ({ json }) => {
4
4
  return node;
5
5
  };
6
6
 
7
+ // src/parts/MenuItems/MenuItems.tsx
8
+ var MenuItems = ({ menuName }) => {
9
+ const json = {
10
+ dataSource: {
11
+ type: "menu",
12
+ filter: {
13
+ name: {
14
+ value: menuName
15
+ }
16
+ }
17
+ },
18
+ type: "menu",
19
+ template: "STATIC"
20
+ };
21
+ return /* @__PURE__ */ React.createElement(JsonComponent, { json });
22
+ };
23
+
24
+ // src/parts/FooterItemsList/FooterItemsList.tsx
25
+ var FooterItemsList = ({
26
+ className,
27
+ menuName = ""
28
+ } = {}) => {
29
+ const fullClassName = `FooterItemsList ${className}`;
30
+ return /* @__PURE__ */ React.createElement("div", { className: fullClassName }, /* @__PURE__ */ React.createElement(MenuItems, { menuName }));
31
+ };
32
+
33
+ // src/parts/Link/Link.tsx
34
+ var Link = () => {
35
+ const json = {};
36
+ return /* @__PURE__ */ React.createElement(JsonComponent, { json });
37
+ };
38
+
7
39
  // src/parts/Login/Login.tsx
8
40
  var Login = () => {
9
41
  const json = {
@@ -12,19 +44,23 @@ var Login = () => {
12
44
  return /* @__PURE__ */ React.createElement(JsonComponent, { json });
13
45
  };
14
46
 
15
- // src/parts/MenuItems/MenuItems.tsx
16
- var MenuItems = ({ menuName }) => {
47
+ // src/parts/PostContentBody/PostContentBody.tsx
48
+ var PostContentBody = () => {
17
49
  const json = {
50
+ type: "content-body",
51
+ id: "post-content-body",
52
+ customBlocks: [],
53
+ class: ["post-content-service"],
18
54
  dataSource: {
19
- type: "menu",
55
+ type: "content",
56
+ preventSSRCache: true,
20
57
  filter: {
21
- name: {
22
- value: menuName
58
+ id: {
59
+ value: "$context.content.id"
23
60
  }
24
61
  }
25
62
  },
26
- type: "menu",
27
- template: "STATIC"
63
+ isLazy: false
28
64
  };
29
65
  return /* @__PURE__ */ React.createElement(JsonComponent, { json });
30
66
  };
@@ -38,9 +74,139 @@ var SearchField = () => {
38
74
  };
39
75
  return /* @__PURE__ */ React.createElement(JsonComponent, { json });
40
76
  };
77
+
78
+ // src/parts/SearchLink/SearchLink.tsx
79
+ var SearchLink = ({ message } = {}) => {
80
+ const json = {
81
+ type: "button",
82
+ tap: {
83
+ type: "navigate",
84
+ path: "suche"
85
+ },
86
+ message,
87
+ buttonClass: "search",
88
+ id: "button-search"
89
+ };
90
+ return /* @__PURE__ */ React.createElement("div", { className: "SearchLink" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
91
+ };
92
+
93
+ // src/parts/SearchResults/SearchResults.tsx
94
+ var SearchResults = () => {
95
+ const json = {
96
+ content: {
97
+ type: "search-result",
98
+ pageHitExcerptMessage: "test",
99
+ coverHeight: "FIXED",
100
+ tapPageHit: {
101
+ type: "openContent"
102
+ },
103
+ tapCover: {
104
+ type: "openContent"
105
+ },
106
+ class: "issue-card issue-card--overline-in-page-hit-excerpt-message",
107
+ template: "feed",
108
+ renderProperties: ["authors"]
109
+ },
110
+ dataSource: {
111
+ phrase: "$context.phrase",
112
+ type: "search-result",
113
+ filter: {
114
+ AND: [
115
+ {
116
+ OR: [
117
+ {
118
+ contentType: {
119
+ value: "POST"
120
+ }
121
+ },
122
+ {
123
+ contentType: {
124
+ value: "BUNDLE"
125
+ }
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ postType: {
131
+ value: "post"
132
+ }
133
+ },
134
+ {
135
+ condition: {
136
+ value: "$context.issue-age",
137
+ compareValue: "day"
138
+ },
139
+ age: {
140
+ count: 1,
141
+ unit: "DAY"
142
+ }
143
+ },
144
+ {
145
+ condition: {
146
+ value: "$context.issue-age",
147
+ compareValue: "week"
148
+ },
149
+ age: {
150
+ count: 1,
151
+ unit: "WEEK"
152
+ }
153
+ },
154
+ {
155
+ condition: {
156
+ value: "$context.issue-age",
157
+ compareValue: "month"
158
+ },
159
+ age: {
160
+ count: 1,
161
+ unit: "MONTH"
162
+ }
163
+ },
164
+ {
165
+ condition: {
166
+ value: "$context.issue-age",
167
+ compareValue: "year"
168
+ },
169
+ age: {
170
+ count: 1,
171
+ unit: "YEAR"
172
+ }
173
+ }
174
+ ]
175
+ },
176
+ contextKey: "searchResults",
177
+ searchOptions: {
178
+ sortBy: "PUB_DATE_DESC",
179
+ findAll: true
180
+ },
181
+ limitCharactersBeforeHit: 70,
182
+ legacyMode: {
183
+ mapPostToIssue: true,
184
+ unwrapBundles: true
185
+ }
186
+ },
187
+ type: "list",
188
+ class: "schlauch-section",
189
+ emptyMessage: {
190
+ message: "SEARCH_RESULT_NO_RESULT",
191
+ variables: ["$context.phrase"]
192
+ },
193
+ errorMessage: "SEARCH_ERROR",
194
+ errorButtonLabel: "SEARCH_ERROR_RETRY",
195
+ template: "grid",
196
+ tapEntry: {
197
+ type: "openContent"
198
+ }
199
+ };
200
+ return /* @__PURE__ */ React.createElement("div", { className: "SearchResults" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
201
+ };
41
202
  export {
203
+ FooterItemsList,
42
204
  JsonComponent,
205
+ Link,
43
206
  Login,
44
207
  MenuItems,
45
- SearchField
208
+ PostContentBody,
209
+ SearchField,
210
+ SearchLink,
211
+ SearchResults
46
212
  };
@@ -1,4 +1,9 @@
1
+ export * from "../FooterItemsList/FooterItemsList.tsx";
1
2
  export * from "../JsonComponent/JsonComponent.tsx";
3
+ export * from "../Link/Link.tsx";
2
4
  export * from "../Login/Login.tsx";
3
5
  export * from "../MenuItems/MenuItems.tsx";
6
+ export * from "../PostContentBody/PostContentBody.tsx";
4
7
  export * from "../SearchField/SearchField.tsx";
8
+ export * from "../SearchLink/SearchLink.tsx";
9
+ export * from "../SearchResults/SearchResults.tsx";
@@ -0,0 +1,4 @@
1
+ export declare const FooterItemsList: ({ className, menuName, }?: {
2
+ className?: string;
3
+ menuName?: string;
4
+ }) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const Link: () => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PostContentBody: () => import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const SearchLink: ({ message }?: {
2
+ message?: string;
3
+ }) => import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SearchResults: () => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "6.22.1",
3
+ "version": "6.24.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -1,4 +1,9 @@
1
+ export * from "../FooterItemsList/FooterItemsList.tsx";
1
2
  export * from "../JsonComponent/JsonComponent.tsx";
3
+ export * from "../Link/Link.tsx";
2
4
  export * from "../Login/Login.tsx";
3
5
  export * from "../MenuItems/MenuItems.tsx";
6
+ export * from "../PostContentBody/PostContentBody.tsx";
4
7
  export * from "../SearchField/SearchField.tsx";
8
+ export * from "../SearchLink/SearchLink.tsx";
9
+ export * from "../SearchResults/SearchResults.tsx";
@@ -0,0 +1,13 @@
1
+ import { MenuItems } from "../MenuItems/MenuItems.tsx";
2
+
3
+ export const FooterItemsList = ({
4
+ className,
5
+ menuName = "",
6
+ }: { className?: string; menuName?: string } = {}) => {
7
+ const fullClassName = `FooterItemsList ${className}`;
8
+ return (
9
+ <div className={fullClassName}>
10
+ <MenuItems menuName={menuName} />
11
+ </div>
12
+ );
13
+ };
@@ -0,0 +1,6 @@
1
+ import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
2
+
3
+ export const Link = () => {
4
+ const json = {};
5
+ return <JsonComponent json={json} />;
6
+ };
@@ -0,0 +1,21 @@
1
+ import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
2
+
3
+ export const PostContentBody = () => {
4
+ const json = {
5
+ type: "content-body",
6
+ id: "post-content-body",
7
+ customBlocks: [],
8
+ class: ["post-content-service"],
9
+ dataSource: {
10
+ type: "content",
11
+ preventSSRCache: true,
12
+ filter: {
13
+ id: {
14
+ value: "$context.content.id",
15
+ },
16
+ },
17
+ },
18
+ isLazy: false,
19
+ };
20
+ return <JsonComponent json={json} />;
21
+ };
@@ -0,0 +1,19 @@
1
+ import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
2
+
3
+ export const SearchLink = ({ message }: { message?: string } = {}) => {
4
+ const json = {
5
+ type: "button",
6
+ tap: {
7
+ type: "navigate",
8
+ path: "suche",
9
+ },
10
+ message,
11
+ buttonClass: "search",
12
+ id: "button-search",
13
+ };
14
+ return (
15
+ <div className="SearchLink">
16
+ <JsonComponent json={json} />
17
+ </div>
18
+ );
19
+ };
@@ -0,0 +1,114 @@
1
+ import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
2
+
3
+ export const SearchResults = () => {
4
+ const json = {
5
+ content: {
6
+ type: "search-result",
7
+ pageHitExcerptMessage: "test",
8
+ coverHeight: "FIXED",
9
+ tapPageHit: {
10
+ type: "openContent",
11
+ },
12
+ tapCover: {
13
+ type: "openContent",
14
+ },
15
+ class: "issue-card issue-card--overline-in-page-hit-excerpt-message",
16
+ template: "feed",
17
+ renderProperties: ["authors"],
18
+ },
19
+ dataSource: {
20
+ phrase: "$context.phrase",
21
+ type: "search-result",
22
+ filter: {
23
+ AND: [
24
+ {
25
+ OR: [
26
+ {
27
+ contentType: {
28
+ value: "POST",
29
+ },
30
+ },
31
+ {
32
+ contentType: {
33
+ value: "BUNDLE",
34
+ },
35
+ },
36
+ ],
37
+ },
38
+ {
39
+ postType: {
40
+ value: "post",
41
+ },
42
+ },
43
+ {
44
+ condition: {
45
+ value: "$context.issue-age",
46
+ compareValue: "day",
47
+ },
48
+ age: {
49
+ count: 1,
50
+ unit: "DAY",
51
+ },
52
+ },
53
+ {
54
+ condition: {
55
+ value: "$context.issue-age",
56
+ compareValue: "week",
57
+ },
58
+ age: {
59
+ count: 1,
60
+ unit: "WEEK",
61
+ },
62
+ },
63
+ {
64
+ condition: {
65
+ value: "$context.issue-age",
66
+ compareValue: "month",
67
+ },
68
+ age: {
69
+ count: 1,
70
+ unit: "MONTH",
71
+ },
72
+ },
73
+ {
74
+ condition: {
75
+ value: "$context.issue-age",
76
+ compareValue: "year",
77
+ },
78
+ age: {
79
+ count: 1,
80
+ unit: "YEAR",
81
+ },
82
+ },
83
+ ],
84
+ },
85
+ contextKey: "searchResults",
86
+ searchOptions: {
87
+ sortBy: "PUB_DATE_DESC",
88
+ findAll: true,
89
+ },
90
+ limitCharactersBeforeHit: 70,
91
+ legacyMode: {
92
+ mapPostToIssue: true,
93
+ unwrapBundles: true,
94
+ },
95
+ },
96
+ type: "list",
97
+ class: "schlauch-section",
98
+ emptyMessage: {
99
+ message: "SEARCH_RESULT_NO_RESULT",
100
+ variables: ["$context.phrase"],
101
+ },
102
+ errorMessage: "SEARCH_ERROR",
103
+ errorButtonLabel: "SEARCH_ERROR_RETRY",
104
+ template: "grid",
105
+ tapEntry: {
106
+ type: "openContent",
107
+ },
108
+ };
109
+ return (
110
+ <div className="SearchResults">
111
+ <JsonComponent json={json} />
112
+ </div>
113
+ );
114
+ };