@pronto-tools-and-more/components 12.30.0 → 12.32.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -183,8 +183,16 @@ var getArticleListDataSource = ({
183
183
  collectionName,
184
184
  limit,
185
185
  offset,
186
- bookmarks
186
+ bookmarks,
187
+ contextId
187
188
  }) => {
189
+ if (contextId) {
190
+ const dataSource2 = {
191
+ type: "context",
192
+ data: contextId
193
+ };
194
+ return dataSource2;
195
+ }
188
196
  if (bookmarks) {
189
197
  const dataSource2 = {
190
198
  type: "content",
@@ -288,8 +296,8 @@ var getNodeInfo = (element) => {
288
296
  readTime: `$functions.getReadTime($functions.id($context, ${contentKey}))`,
289
297
  publicationDate: `$functions.id($context, ${contentKey}, 'publicationDate')`,
290
298
  id: `$functions.id($context, ${contentKey}, 'id')`,
291
- primaryCategoryId: `$functions.getPrimaryCategoryProperty($context["${contentKey ?? "content"}"], 'id')`,
292
- primaryCategoryName: `$functions.getPrimaryCategoryProperty($context["${contentKey ?? "content"}"], 'name')`,
299
+ primaryCategoryId: `$functions.getPrimaryCategoryProperty($context[${contentKey}], 'id')`,
300
+ primaryCategoryName: `$functions.getPrimaryCategoryProperty($context[${contentKey}], 'name')`,
293
301
  access: `$functions.id($context, ${contentKey}, 'access')`
294
302
  };
295
303
  };
@@ -313,7 +321,8 @@ var ArticleList = ({
313
321
  offset,
314
322
  collectionName,
315
323
  noContentFound,
316
- bookmarks
324
+ bookmarks,
325
+ contextId
317
326
  }) => {
318
327
  const dataSource = getArticleListDataSource({
319
328
  properties,
@@ -323,7 +332,8 @@ var ArticleList = ({
323
332
  limit,
324
333
  offset,
325
334
  collectionName,
326
- bookmarks
335
+ bookmarks,
336
+ contextId
327
337
  });
328
338
  const json = {
329
339
  render,
@@ -1,5 +1,5 @@
1
1
  import type { ArticleListItemRenderer } from "../ArticleListItemRenderer/ArticleListItemRenderer.ts";
2
- export declare const ArticleList: ({ properties, render, authorId, categoryId, bundleId, limit, offset, collectionName, noContentFound, bookmarks, }: {
2
+ export declare const ArticleList: ({ properties, render, authorId, categoryId, bundleId, limit, offset, collectionName, noContentFound, bookmarks, contextId, }: {
3
3
  properties?: any;
4
4
  authorId?: string;
5
5
  categoryId?: string;
@@ -10,4 +10,5 @@ export declare const ArticleList: ({ properties, render, authorId, categoryId, b
10
10
  collectionName?: string;
11
11
  noContentFound?: string;
12
12
  bookmarks?: boolean;
13
+ contextId?: string;
13
14
  }) => import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- export declare const getArticleListDataSource: ({ properties, authorId, categoryId, bundleId, collectionName, limit, offset, bookmarks, }: {
1
+ export declare const getArticleListDataSource: ({ properties, authorId, categoryId, bundleId, collectionName, limit, offset, bookmarks, contextId, }: {
2
2
  properties: any;
3
3
  authorId: any;
4
4
  categoryId: any;
@@ -7,7 +7,11 @@ export declare const getArticleListDataSource: ({ properties, authorId, category
7
7
  limit: any;
8
8
  offset: any;
9
9
  bookmarks: any;
10
+ contextId: any;
10
11
  }) => {
12
+ type: string;
13
+ data: any;
14
+ } | {
11
15
  type: string;
12
16
  filter: {
13
17
  AND: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "12.30.0",
3
+ "version": "12.32.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -1,4 +0,0 @@
1
- export declare const createFakeSection: (children: any) => {
2
- type: string;
3
- content: any[];
4
- };
@@ -1,4 +0,0 @@
1
- export declare const createFakeSection2: (children: any) => {
2
- type: string;
3
- content: any[];
4
- };
@@ -1,5 +0,0 @@
1
- export declare const fakeNode: {
2
- type: string;
3
- tag: string;
4
- content: string;
5
- };
@@ -1,5 +0,0 @@
1
- export declare const fakeNode2: {
2
- type: string;
3
- tag: string;
4
- content: string;
5
- };
@@ -1,7 +0,0 @@
1
- import type React from "react";
2
- export declare const createElement: (tag: any, props: any, ...children: any[]) => {
3
- tag: any;
4
- props: any;
5
- children: any[];
6
- };
7
- export declare const unwrapComponent: (element: React.ReactNode) => any;