@pronto-tools-and-more/components 15.8.0 → 15.10.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
@@ -69,6 +69,13 @@ var createPropertiesFilter = (properties) => {
|
|
69
69
|
OR: innerFilter
|
70
70
|
});
|
71
71
|
}
|
72
|
+
} else if (typeof value === "string") {
|
73
|
+
outerFilter.push({
|
74
|
+
properties: {
|
75
|
+
key,
|
76
|
+
value
|
77
|
+
}
|
78
|
+
});
|
72
79
|
}
|
73
80
|
}
|
74
81
|
return outerFilter;
|
@@ -309,6 +316,17 @@ var getArticleListDataSource = ({
|
|
309
316
|
return dataSource;
|
310
317
|
};
|
311
318
|
|
319
|
+
// src/parts/PropertiesProxy/PropertiesProxy.ts
|
320
|
+
var createPropertiesProxy = ({ original, contentKey }) => {
|
321
|
+
const handler = {
|
322
|
+
get: (target, key) => {
|
323
|
+
return `$functions.id($context, ${contentKey}, 'properties', '${key}')`;
|
324
|
+
}
|
325
|
+
};
|
326
|
+
const proxy = new Proxy(original, handler);
|
327
|
+
return proxy;
|
328
|
+
};
|
329
|
+
|
312
330
|
// src/parts/ArticleList/ArticleList.tsx
|
313
331
|
var getContentKey = (element) => {
|
314
332
|
if (element.dataSource.contextKey) {
|
@@ -341,7 +359,11 @@ var getNodeInfo = (element) => {
|
|
341
359
|
id: `$functions.id($context, ${contentKey}, 'id')`,
|
342
360
|
primaryCategoryName: `$functions.id($context, ${contentKey}, 'primaryCategoryName')`,
|
343
361
|
primaryCategoryId: `$functions.id($context, ${contentKey}, 'primaryCategoryId')`,
|
344
|
-
language: `$functions.getLanguage($functions.id($context, ${contentKey}))
|
362
|
+
language: `$functions.getLanguage($functions.id($context, ${contentKey}))`,
|
363
|
+
properties: createPropertiesProxy({
|
364
|
+
original: {},
|
365
|
+
contentKey
|
366
|
+
})
|
345
367
|
};
|
346
368
|
}
|
347
369
|
return {
|
@@ -357,7 +379,11 @@ var getNodeInfo = (element) => {
|
|
357
379
|
primaryCategoryName: `$functions.getPrimaryCategoryProperty($context[${contentKey}], 'name')`,
|
358
380
|
primaryCategoryLanguage: `$functions.getLanguage($functions.getPrimaryCategoryProperty($context[${contentKey}], 'properties', 'lang'))`,
|
359
381
|
access: `$functions.id($context, ${contentKey}, 'access')`,
|
360
|
-
language: `$functions.getLanguage($functions.id($context, ${contentKey}))
|
382
|
+
language: `$functions.getLanguage($functions.id($context, ${contentKey}))`,
|
383
|
+
properties: createPropertiesProxy({
|
384
|
+
original: {},
|
385
|
+
contentKey
|
386
|
+
})
|
361
387
|
};
|
362
388
|
};
|
363
389
|
var unrender2 = (element, renderElement) => {
|
@@ -1822,7 +1848,11 @@ var getNodeInfo3 = (element) => {
|
|
1822
1848
|
primaryCategoryLanguage: `$functions.getLanguage($functions.getPrimaryCategoryProperty($context[${contentKey}]['issue'], 'properties', 'lang'))`,
|
1823
1849
|
metadataVideoPodcast: `$functions.id($context, ${contentKey}, 'issue', 'metadataVideoPodcast')`,
|
1824
1850
|
readTime: `$functions.getReadTime($functions.id($context, ${contentKey}, 'issue'))`,
|
1825
|
-
access: `$functions.id($context, ${contentKey}, 'issue', 'access')
|
1851
|
+
access: `$functions.id($context, ${contentKey}, 'issue', 'access')`,
|
1852
|
+
properties: createPropertiesProxy({
|
1853
|
+
original: {},
|
1854
|
+
contentKey
|
1855
|
+
})
|
1826
1856
|
};
|
1827
1857
|
};
|
1828
1858
|
var unrender15 = (element, renderElement) => {
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export interface IArticleNodeInfo {
|
2
|
+
readonly name: string;
|
3
|
+
readonly description: string;
|
4
|
+
readonly imageSrc: string;
|
5
|
+
readonly properties: any;
|
6
|
+
readonly slug: string;
|
7
|
+
readonly metadataVideoPodcast?: string;
|
8
|
+
readonly readTime?: string;
|
9
|
+
readonly publicationDate: string;
|
10
|
+
readonly id: string;
|
11
|
+
readonly primaryCategoryName?: string;
|
12
|
+
readonly primaryCategoryId?: string;
|
13
|
+
readonly primaryCategoryLanguage?: string;
|
14
|
+
readonly access?: string;
|
15
|
+
readonly language: string;
|
16
|
+
}
|