@pronto-tools-and-more/components 10.17.0 → 10.19.0
Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js
CHANGED
@@ -5,11 +5,35 @@ var JsonComponent = ({ json }) => {
|
|
5
5
|
};
|
6
6
|
|
7
7
|
// src/parts/ArticleAuthors/ArticleAuthors.tsx
|
8
|
+
var unrender = (element, renderElement) => {
|
9
|
+
const { render, unrender: unrender7, ...rest } = element;
|
10
|
+
const node = render({
|
11
|
+
id: `$functions.id($context, 'context', 'id')`,
|
12
|
+
name: `$functions.id($context, 'context', 'name')`,
|
13
|
+
type: `$functions.id($context, 'context', 'type')`,
|
14
|
+
language: `$functions.id($context, 'context', 'properties', 'lang')`,
|
15
|
+
imageSrc: `$functions.id($context, 'context', 'properties', 'thumbnails', 'default')`
|
16
|
+
});
|
17
|
+
const condition = {
|
18
|
+
value: "$context.context.type",
|
19
|
+
operation: "EQUALS",
|
20
|
+
compareValue: "author"
|
21
|
+
};
|
22
|
+
const final = {
|
23
|
+
...renderElement(node),
|
24
|
+
condition
|
25
|
+
};
|
26
|
+
return {
|
27
|
+
...rest,
|
28
|
+
content: final
|
29
|
+
};
|
30
|
+
};
|
8
31
|
var ArticleAuthors = ({
|
9
32
|
render
|
10
33
|
}) => {
|
11
34
|
const json = {
|
12
35
|
render,
|
36
|
+
unrender,
|
13
37
|
dataSource: {
|
14
38
|
data: "$context.content.taxonomies",
|
15
39
|
type: "context",
|
@@ -97,6 +121,23 @@ var createFilterFromProperties = ({
|
|
97
121
|
};
|
98
122
|
|
99
123
|
// src/parts/ArticleList/ArticleList.tsx
|
124
|
+
var unrender2 = (element, renderElement) => {
|
125
|
+
const { render, ...rest } = element;
|
126
|
+
const node = render({
|
127
|
+
name: `$functions.id($context, 'content', 'name')`,
|
128
|
+
description: `$functions.id($context, 'content', 'description')`,
|
129
|
+
imageSrc: `$functions.id($context, 'content', 'thumbnails', 'default')`,
|
130
|
+
slug: `$functions.id($context, 'content', 'properties', 'slug')`,
|
131
|
+
metadataVideoPodcast: `$functions.id($context, 'content', 'properties', 'metadataVideoPodcast')`,
|
132
|
+
readTime: `$functions.getReadTime($context.content)`,
|
133
|
+
publicationDate: `$functions.id($context, 'content', 'publicationDate')`
|
134
|
+
});
|
135
|
+
const final = renderElement(node);
|
136
|
+
return {
|
137
|
+
...rest,
|
138
|
+
content: final
|
139
|
+
};
|
140
|
+
};
|
100
141
|
var ArticleList = ({
|
101
142
|
properties,
|
102
143
|
render,
|
@@ -114,6 +155,7 @@ var ArticleList = ({
|
|
114
155
|
});
|
115
156
|
const json = {
|
116
157
|
render,
|
158
|
+
unrender: unrender2,
|
117
159
|
dataSource: {
|
118
160
|
type: "content",
|
119
161
|
filter: {
|
@@ -190,12 +232,35 @@ var Button = ({
|
|
190
232
|
};
|
191
233
|
|
192
234
|
// src/parts/CategoryList/CategoryList.tsx
|
235
|
+
var unrender3 = (element, renderElement) => {
|
236
|
+
const { render, unrender: unrender7, ...rest } = element;
|
237
|
+
const node = render({
|
238
|
+
id: `$functions.id($context, 'context', 'id')`,
|
239
|
+
name: `$functions.id($context, 'context', 'name')`,
|
240
|
+
type: `$functions.id($context, 'context', 'type')`,
|
241
|
+
language: `$functions.id($context, 'context', 'properties', 'lang')`
|
242
|
+
});
|
243
|
+
const condition = {
|
244
|
+
value: "$context.context.type",
|
245
|
+
operation: "EQUALS",
|
246
|
+
compareValue: "category"
|
247
|
+
};
|
248
|
+
const final = {
|
249
|
+
...renderElement(node),
|
250
|
+
condition
|
251
|
+
};
|
252
|
+
return {
|
253
|
+
...rest,
|
254
|
+
content: final
|
255
|
+
};
|
256
|
+
};
|
193
257
|
var CategoryList = ({
|
194
258
|
render,
|
195
259
|
contentKey
|
196
260
|
}) => {
|
197
261
|
const json = {
|
198
262
|
render,
|
263
|
+
unrender: unrender3,
|
199
264
|
dataSource: {
|
200
265
|
data: `$context.${contentKey ?? "content"}.taxonomies`,
|
201
266
|
type: "context",
|
@@ -209,6 +274,23 @@ var CategoryList = ({
|
|
209
274
|
};
|
210
275
|
|
211
276
|
// src/parts/Collection/Collection.tsx
|
277
|
+
var unrender4 = (element, renderElement) => {
|
278
|
+
const { render, ...rest } = element;
|
279
|
+
const node = render({
|
280
|
+
name: `$functions.id($context, 'collection-content', 'name')`,
|
281
|
+
description: `$functions.id($context, 'collection-content', 'description')`,
|
282
|
+
imageSrc: `$functions.id($context, 'collection-content', 'thumbnails', 'default')`,
|
283
|
+
slug: `$functions.id($context, 'collection-content', 'properties', 'slug')`,
|
284
|
+
metadataVideoPodcast: `$functions.id($context, 'collection-content', 'properties', 'metadataVideoPodcast')`,
|
285
|
+
readTime: `$functions.getReadTime($context['collection-content'])`,
|
286
|
+
publicationDate: `$functions.id($context, 'collection-content', 'publicationDate')`
|
287
|
+
});
|
288
|
+
const final = renderElement(node);
|
289
|
+
return {
|
290
|
+
...rest,
|
291
|
+
content: final
|
292
|
+
};
|
293
|
+
};
|
212
294
|
var Collection = ({
|
213
295
|
limit,
|
214
296
|
offset,
|
@@ -217,6 +299,7 @@ var Collection = ({
|
|
217
299
|
}) => {
|
218
300
|
const json = {
|
219
301
|
render,
|
302
|
+
unrender: unrender4,
|
220
303
|
dataSource: {
|
221
304
|
type: "collection-content",
|
222
305
|
limit: `${limit}`,
|
@@ -544,7 +627,39 @@ var SearchHeaderSelect = () => {
|
|
544
627
|
|
545
628
|
// src/parts/SearchHeaderToggle/SearchHeaderToggle.tsx
|
546
629
|
var SearchHeaderToggle = () => {
|
547
|
-
|
630
|
+
const json = {
|
631
|
+
content: [
|
632
|
+
{
|
633
|
+
type: "button",
|
634
|
+
tap: {
|
635
|
+
type: "navigate",
|
636
|
+
params: {
|
637
|
+
searchtype: "news"
|
638
|
+
},
|
639
|
+
mergeParams: true,
|
640
|
+
path: "suche"
|
641
|
+
},
|
642
|
+
message: "News",
|
643
|
+
buttonClass: "news"
|
644
|
+
},
|
645
|
+
{
|
646
|
+
type: "button",
|
647
|
+
tap: {
|
648
|
+
type: "navigate",
|
649
|
+
params: {
|
650
|
+
searchtype: "epaper"
|
651
|
+
},
|
652
|
+
mergeParams: true,
|
653
|
+
path: "suche"
|
654
|
+
},
|
655
|
+
message: "E-Paper",
|
656
|
+
buttonClass: "epaper"
|
657
|
+
}
|
658
|
+
],
|
659
|
+
type: "section",
|
660
|
+
class: "search-toggle selected)"
|
661
|
+
};
|
662
|
+
return /* @__PURE__ */ React.createElement("div", { className: "SearchHeaderToggle" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
|
548
663
|
};
|
549
664
|
|
550
665
|
// src/parts/SearchLink/SearchLink.tsx
|
@@ -584,6 +699,28 @@ var getFilterLanguage = (language) => {
|
|
584
699
|
};
|
585
700
|
|
586
701
|
// src/parts/SearchResults/SearchResults.tsx
|
702
|
+
var getImageSrc = (fallbackImage) => {
|
703
|
+
if (fallbackImage) {
|
704
|
+
return `$functions.fallback($functions.id($context, 'search-result', 'issue', 'thumbnails', 'default'), '${fallbackImage}')`;
|
705
|
+
}
|
706
|
+
return `$functions.id($context, 'search-result', 'issue', 'thumbnails', 'default')`;
|
707
|
+
};
|
708
|
+
var unrender5 = (element, renderElement) => {
|
709
|
+
const { render, fallbackImage, ...rest } = element;
|
710
|
+
const node = render({
|
711
|
+
title: "$functions.id($context, 'search-result', 'issue', 'name')",
|
712
|
+
name: "$functions.id($context, 'search-result', 'issue', 'name')",
|
713
|
+
description: "$functions.id($context, 'search-result', 'issue', 'description')",
|
714
|
+
imageSrc: getImageSrc(fallbackImage),
|
715
|
+
language: "$functions.id($context, 'search-result', 'issue', 'properties', 'lang')",
|
716
|
+
slug: "$functions.id($context, 'search-result', 'issue', 'properties', 'slug')"
|
717
|
+
});
|
718
|
+
const final = renderElement(node);
|
719
|
+
return {
|
720
|
+
...rest,
|
721
|
+
content: final
|
722
|
+
};
|
723
|
+
};
|
587
724
|
var SearchResults = ({
|
588
725
|
render,
|
589
726
|
language,
|
@@ -661,6 +798,7 @@ var SearchResults = ({
|
|
661
798
|
}
|
662
799
|
const json = {
|
663
800
|
render,
|
801
|
+
unrender: unrender5,
|
664
802
|
fallbackImage,
|
665
803
|
dataSource: {
|
666
804
|
phrase: "$context.phrase",
|
@@ -711,9 +849,31 @@ var SubscriptionLink = ({ message } = {}) => {
|
|
711
849
|
};
|
712
850
|
|
713
851
|
// src/parts/TagList/TagList.tsx
|
852
|
+
var unrender6 = (element, renderElement) => {
|
853
|
+
const { render, ...rest } = element;
|
854
|
+
const node = render({
|
855
|
+
id: `$functions.id($context, 'context', 'id')`,
|
856
|
+
name: `$functions.id($context, 'context', 'name')`,
|
857
|
+
language: `$functions.id($context, 'context', 'properties', 'lang')`
|
858
|
+
});
|
859
|
+
const condition = {
|
860
|
+
value: "$context.context.type",
|
861
|
+
operation: "EQUALS",
|
862
|
+
compareValue: "tag"
|
863
|
+
};
|
864
|
+
const final = {
|
865
|
+
...renderElement(node),
|
866
|
+
condition
|
867
|
+
};
|
868
|
+
return {
|
869
|
+
...rest,
|
870
|
+
content: final
|
871
|
+
};
|
872
|
+
};
|
714
873
|
var TagList = ({ render }) => {
|
715
874
|
const json = {
|
716
875
|
render,
|
876
|
+
unrender: unrender6,
|
717
877
|
dataSource: {
|
718
878
|
data: "$context.content.taxonomies",
|
719
879
|
type: "context",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type React from "react";
|
2
2
|
import type { IArticleListItem } from "../IArticleListItem/IArticleListItem.ts";
|
3
3
|
export interface ArticleListItemRenderer {
|
4
|
-
({ name, description, imageSrc, properties, publicationDate }: IArticleListItem): React.ReactNode;
|
4
|
+
({ name, description, imageSrc, properties, readTime, publicationDate }: IArticleListItem): React.ReactNode;
|
5
5
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pronto-tools-and-more/components",
|
3
|
-
"version": "10.
|
3
|
+
"version": "10.19.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/main.js",
|
6
6
|
"types": "dist/main.d.ts",
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"author": "",
|
17
17
|
"license": "MIT",
|
18
18
|
"devDependencies": {
|
19
|
-
"@types/node": "^22.9.
|
19
|
+
"@types/node": "^22.9.1",
|
20
20
|
"@types/react": "^18.3.12",
|
21
21
|
"esbuild": "^0.24.0",
|
22
22
|
"react": "^18.3.1",
|