@industream/flowmaker-flowbox-ui-components 0.0.8 → 0.0.10
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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
interface Props {
|
|
6
6
|
id?: string;
|
|
7
7
|
dcapiurl?: string;
|
|
8
|
-
sourcetypefilter?:
|
|
8
|
+
sourcetypefilter?: string | string[] | null; // Source type names like "PostgreSQL", "InfluxDB2"
|
|
9
9
|
datatypefilter?: DataType | DataType[] | null;
|
|
10
10
|
namefilter?: string | string[] | null;
|
|
11
11
|
initialselection?: string | null;
|
|
@@ -61,12 +61,13 @@
|
|
|
61
61
|
function applyFilters(entries: CatalogEntry[]): CatalogEntry[] {
|
|
62
62
|
let result = entries;
|
|
63
63
|
|
|
64
|
-
// Filter by source type (from sourceConnection)
|
|
64
|
+
// Filter by source type name (from sourceConnection.sourceType.name)
|
|
65
|
+
// Note: Server-side filtering is now done via API, this is just for additional client-side filtering if needed
|
|
65
66
|
if (sourcetypefilter && sourcetypefilter.length > 0) {
|
|
66
|
-
const
|
|
67
|
+
const sourceTypeNames = Array.isArray(sourcetypefilter) ? sourcetypefilter : [sourcetypefilter];
|
|
67
68
|
result = result.filter(entry =>
|
|
68
|
-
entry.sourceConnection?.sourceType &&
|
|
69
|
-
|
|
69
|
+
entry.sourceConnection?.sourceType?.name &&
|
|
70
|
+
sourceTypeNames.includes(entry.sourceConnection.sourceType.name)
|
|
70
71
|
);
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -87,13 +88,18 @@
|
|
|
87
88
|
|
|
88
89
|
try {
|
|
89
90
|
const client = new DataCatalogClient({ baseUrl: dcapiurl });
|
|
90
|
-
const filters: { names?: string[] } = {};
|
|
91
|
+
const filters: { names?: string[]; sourceTypes?: string[] } = {};
|
|
91
92
|
|
|
92
93
|
// Use name filter for API query if provided
|
|
93
94
|
if (namefilter && namefilter.length > 0) {
|
|
94
95
|
filters.names = Array.isArray(namefilter) ? namefilter : [namefilter];
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
// Use sourceType filter for API query if provided
|
|
99
|
+
if (sourcetypefilter && sourcetypefilter.length > 0) {
|
|
100
|
+
filters.sourceTypes = Array.isArray(sourcetypefilter) ? sourcetypefilter : [sourcetypefilter];
|
|
101
|
+
}
|
|
102
|
+
|
|
97
103
|
const result = await client.catalogEntries.get(filters);
|
|
98
104
|
catalogEntries = result.items || [];
|
|
99
105
|
// Apply filters synchronously so initialselection works
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CatalogEntry, DataType
|
|
1
|
+
import type { CatalogEntry, DataType } from '@industream/datacatalog-client/dto';
|
|
2
2
|
interface Props {
|
|
3
3
|
id?: string;
|
|
4
4
|
dcapiurl?: string;
|
|
5
|
-
sourcetypefilter?:
|
|
5
|
+
sourcetypefilter?: string | string[] | null;
|
|
6
6
|
datatypefilter?: DataType | DataType[] | null;
|
|
7
7
|
namefilter?: string | string[] | null;
|
|
8
8
|
initialselection?: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@industream/flowmaker-flowbox-ui-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Reusable Svelte components for FlowMaker FlowBox UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"svelte": "^5.0.0",
|
|
37
|
-
"@industream/datacatalog-client": "^1.0.0-preview.
|
|
37
|
+
"@industream/datacatalog-client": "^1.0.0-preview.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"svelte": "^5.0.0",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
interface Props {
|
|
6
6
|
id?: string;
|
|
7
7
|
dcapiurl?: string;
|
|
8
|
-
sourcetypefilter?:
|
|
8
|
+
sourcetypefilter?: string | string[] | null; // Source type names like "PostgreSQL", "InfluxDB2"
|
|
9
9
|
datatypefilter?: DataType | DataType[] | null;
|
|
10
10
|
namefilter?: string | string[] | null;
|
|
11
11
|
initialselection?: string | null;
|
|
@@ -61,12 +61,13 @@
|
|
|
61
61
|
function applyFilters(entries: CatalogEntry[]): CatalogEntry[] {
|
|
62
62
|
let result = entries;
|
|
63
63
|
|
|
64
|
-
// Filter by source type (from sourceConnection)
|
|
64
|
+
// Filter by source type name (from sourceConnection.sourceType.name)
|
|
65
|
+
// Note: Server-side filtering is now done via API, this is just for additional client-side filtering if needed
|
|
65
66
|
if (sourcetypefilter && sourcetypefilter.length > 0) {
|
|
66
|
-
const
|
|
67
|
+
const sourceTypeNames = Array.isArray(sourcetypefilter) ? sourcetypefilter : [sourcetypefilter];
|
|
67
68
|
result = result.filter(entry =>
|
|
68
|
-
entry.sourceConnection?.sourceType &&
|
|
69
|
-
|
|
69
|
+
entry.sourceConnection?.sourceType?.name &&
|
|
70
|
+
sourceTypeNames.includes(entry.sourceConnection.sourceType.name)
|
|
70
71
|
);
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -87,13 +88,18 @@
|
|
|
87
88
|
|
|
88
89
|
try {
|
|
89
90
|
const client = new DataCatalogClient({ baseUrl: dcapiurl });
|
|
90
|
-
const filters: { names?: string[] } = {};
|
|
91
|
+
const filters: { names?: string[]; sourceTypes?: string[] } = {};
|
|
91
92
|
|
|
92
93
|
// Use name filter for API query if provided
|
|
93
94
|
if (namefilter && namefilter.length > 0) {
|
|
94
95
|
filters.names = Array.isArray(namefilter) ? namefilter : [namefilter];
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
// Use sourceType filter for API query if provided
|
|
99
|
+
if (sourcetypefilter && sourcetypefilter.length > 0) {
|
|
100
|
+
filters.sourceTypes = Array.isArray(sourcetypefilter) ? sourcetypefilter : [sourcetypefilter];
|
|
101
|
+
}
|
|
102
|
+
|
|
97
103
|
const result = await client.catalogEntries.get(filters);
|
|
98
104
|
catalogEntries = result.items || [];
|
|
99
105
|
// Apply filters synchronously so initialselection works
|