@pronto-tools-and-more/components 8.21.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
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",
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const createFilterFromProperties: (properties: any) => any[];
|