@pronto-tools-and-more/components 9.8.0 → 9.10.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -22,6 +22,24 @@ var Button = ({
22
22
  return /* @__PURE__ */ React.createElement("div", { className: fullClassName }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
23
23
  };
24
24
 
25
+ // src/parts/CategoryList/CategoryList.tsx
26
+ var CategoryList = ({
27
+ render
28
+ }) => {
29
+ const json = {
30
+ render,
31
+ dataSource: {
32
+ data: "$context.contentNoSSRCache[0].taxonomies",
33
+ type: "context",
34
+ batchSize: 1e6
35
+ },
36
+ type: "list",
37
+ class: "data-custom-category-list",
38
+ template: "horizontal"
39
+ };
40
+ return /* @__PURE__ */ React.createElement("div", { className: "CategoryList" }, /* @__PURE__ */ React.createElement(JsonComponent, { json }));
41
+ };
42
+
25
43
  // src/parts/Collection/Collection.tsx
26
44
  var Collection = ({
27
45
  limit,
@@ -244,8 +262,24 @@ var Heading = ({
244
262
  // src/parts/CreateFilterFromProperties/CreateFilterFromProperties.ts
245
263
  var createFilterFromProperties = ({
246
264
  properties,
247
- authorId
265
+ authorId,
266
+ categoryId
248
267
  }) => {
268
+ if (categoryId) {
269
+ return [
270
+ {
271
+ taxonomies: {
272
+ content: {
273
+ value: {
274
+ id: {
275
+ value: authorId
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
281
+ ];
282
+ }
249
283
  if (authorId) {
250
284
  return [
251
285
  {
@@ -291,11 +325,13 @@ var createFilterFromProperties = ({
291
325
  var IssueList = ({
292
326
  properties,
293
327
  render,
294
- authorId
328
+ authorId,
329
+ categoryId
295
330
  }) => {
296
331
  const additionalFilter = createFilterFromProperties({
297
332
  properties,
298
- authorId
333
+ authorId,
334
+ categoryId
299
335
  });
300
336
  const json = {
301
337
  render,
@@ -637,6 +673,7 @@ var SubscriptionLink = ({ message } = {}) => {
637
673
  };
638
674
  export {
639
675
  Button,
676
+ CategoryList,
640
677
  Collection,
641
678
  Container,
642
679
  ContentBody,
@@ -0,0 +1,4 @@
1
+ import { CategoryListItemRenderer } from "../CategoryListItemRenderer/CategoryListItemRenderer.ts";
2
+ export declare const CategoryList: ({ render, }: {
3
+ render: CategoryListItemRenderer;
4
+ }) => import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type React from "react";
2
+ import type { ICategoryItem } from "../ICategoryItem/ICategoryItem.ts";
3
+ export interface CategoryListItemRenderer {
4
+ (item: ICategoryItem): React.ReactNode;
5
+ }
@@ -1,4 +1,5 @@
1
1
  export * from "../Button/Button.tsx";
2
+ export * from "../CategoryList/CategoryList.tsx";
2
3
  export * from "../Collection/Collection.tsx";
3
4
  export * from "../Container/Container.tsx";
4
5
  export * from "../ContentBody/ContentBody.tsx";
@@ -13,6 +14,7 @@ export * from "../HeaderLogo/HeaderLogo.tsx";
13
14
  export * from "../HeaderLogoSection/HeaderLogoSection.tsx";
14
15
  export * from "../HeaderMenuItems/HeaderMenuItems.tsx";
15
16
  export * from "../Heading/Heading.tsx";
17
+ export * from "../ICategoryItem/ICategoryItem.ts";
16
18
  export * from "../IFooterSocialLink/IFooterSocialLink.ts";
17
19
  export * from "../IIssueListItem/IIssueListItem.ts";
18
20
  export * from "../ISearchResult/ISearchResult.ts";
@@ -1,4 +1,5 @@
1
- export declare const createFilterFromProperties: ({ properties, authorId, }: {
1
+ export declare const createFilterFromProperties: ({ properties, authorId, categoryId, }: {
2
2
  properties: any;
3
3
  authorId?: string;
4
+ categoryId?: string;
4
5
  }) => any[];
@@ -0,0 +1,5 @@
1
+ export interface ICategoryItem {
2
+ readonly name: string;
3
+ readonly id: string;
4
+ readonly language: string;
5
+ }
@@ -1,6 +1,7 @@
1
1
  import { IssueListItemRenderer } from "../IssueListItemRenderer/IssueListItemRenderer.ts";
2
- export declare const IssueList: ({ properties, render, authorId, }: {
2
+ export declare const IssueList: ({ properties, render, authorId, categoryId, }: {
3
3
  properties: any;
4
4
  authorId?: string;
5
+ categoryId?: string;
5
6
  render: IssueListItemRenderer;
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": "9.8.0",
3
+ "version": "9.10.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",