@pronto-tools-and-more/components 8.20.0 → 9.0.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 +30 -3
- package/dist/parts/Components/Components.d.ts +1 -0
- package/dist/parts/CreateFilterFromProperties/CreateFilterFromProperties.d.ts +1 -0
- package/dist/parts/IIssueListItem/IIsueListItem.d.ts +6 -0
- package/dist/parts/IssueListItemRenderer/IssueListItemRenderer.d.ts +2 -6
- package/package.json +1 -1
package/dist/main.js
CHANGED
@@ -241,11 +241,40 @@ var Heading = ({
|
|
241
241
|
return /* @__PURE__ */ React.createElement("h4", { className: fullClassName }, text);
|
242
242
|
};
|
243
243
|
|
244
|
+
// src/parts/CreateFilterFromProperties/CreateFilterFromProperties.ts
|
245
|
+
var createFilterFromProperties = (properties) => {
|
246
|
+
const entries = Object.entries(properties);
|
247
|
+
if (entries.length === 0) {
|
248
|
+
return [];
|
249
|
+
}
|
250
|
+
const outerFilter = [];
|
251
|
+
for (const [key, value] of Object.entries(properties)) {
|
252
|
+
if (Array.isArray(value)) {
|
253
|
+
const innerFilter = [];
|
254
|
+
for (const item of value) {
|
255
|
+
innerFilter.push({
|
256
|
+
properties: {
|
257
|
+
key,
|
258
|
+
value: item
|
259
|
+
}
|
260
|
+
});
|
261
|
+
}
|
262
|
+
if (innerFilter.length > 0) {
|
263
|
+
outerFilter.push({
|
264
|
+
OR: innerFilter
|
265
|
+
});
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
return outerFilter;
|
270
|
+
};
|
271
|
+
|
244
272
|
// src/parts/IssueList/IssueList.tsx
|
245
273
|
var IssueList = ({
|
246
274
|
properties,
|
247
275
|
render
|
248
276
|
}) => {
|
277
|
+
const additionalFilter = createFilterFromProperties(properties);
|
249
278
|
const json = {
|
250
279
|
render,
|
251
280
|
dataSource: {
|
@@ -262,9 +291,7 @@ var IssueList = ({
|
|
262
291
|
value: "POST"
|
263
292
|
}
|
264
293
|
},
|
265
|
-
|
266
|
-
properties
|
267
|
-
}
|
294
|
+
...additionalFilter
|
268
295
|
]
|
269
296
|
},
|
270
297
|
offset: "0",
|
@@ -14,6 +14,7 @@ export * from "../HeaderLogoSection/HeaderLogoSection.tsx";
|
|
14
14
|
export * from "../HeaderMenuItems/HeaderMenuItems.tsx";
|
15
15
|
export * from "../Heading/Heading.tsx";
|
16
16
|
export * from "../IFooterSocialLink/IFooterSocialLink.ts";
|
17
|
+
export * from "../IIssueListItem/IIsueListItem.ts";
|
17
18
|
export * from "../ISearchResult/ISearchResult.ts";
|
18
19
|
export * from "../ISearchResultComponent/ISearchResultComponent.tsx";
|
19
20
|
export * from "../IssueList/IssueList.tsx";
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const createFilterFromProperties: (properties: any) => any[];
|
@@ -1,9 +1,5 @@
|
|
1
1
|
import type React from "react";
|
2
|
+
import type { IIssueListItem } from "../IIssueListItem/IIsueListItem.ts";
|
2
3
|
export interface IssueListItemRenderer {
|
3
|
-
({ name, description, imageSrc, properties, }:
|
4
|
-
name: string;
|
5
|
-
description: string;
|
6
|
-
imageSrc: string;
|
7
|
-
properties: any;
|
8
|
-
}): React.ReactNode;
|
4
|
+
({ name, description, imageSrc, properties, }: IIssueListItem): React.ReactNode;
|
9
5
|
}
|