@industream/flowmaker-flowbox-ui-components 1.0.0 → 1.0.2
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/DCCatalogEntry.svelte +4 -1
- package/dist/DCCatalogEntry.svelte.d.ts +2 -0
- package/dist/DCCatalogEntryPicker/DCCatalogEntryPicker.svelte +6 -2
- package/dist/DCCatalogEntryPicker/DCCatalogEntryPicker.svelte.d.ts +2 -0
- package/dist/DCSourceConnection.svelte +4 -1
- package/dist/DCSourceConnection.svelte.d.ts +2 -0
- package/package.json +3 -3
- package/src/DCCatalogEntry.svelte +4 -1
- package/src/DCCatalogEntryPicker/DCCatalogEntryPicker.svelte +6 -2
- package/src/DCSourceConnection.svelte +4 -1
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
interface Props {
|
|
11
11
|
id?: string;
|
|
12
12
|
dcapiurl?: string;
|
|
13
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
14
|
+
token?: string;
|
|
13
15
|
sourcetypefilter?: string | string[] | null; // Source type names like "PostgreSQL", "InfluxDB2"
|
|
14
16
|
datatypefilter?: DataType | DataType[] | null;
|
|
15
17
|
namefilter?: string | string[] | null;
|
|
@@ -22,6 +24,7 @@
|
|
|
22
24
|
let {
|
|
23
25
|
id = undefined,
|
|
24
26
|
dcapiurl = '',
|
|
27
|
+
token = '',
|
|
25
28
|
sourcetypefilter = null,
|
|
26
29
|
datatypefilter = null,
|
|
27
30
|
namefilter = null,
|
|
@@ -145,7 +148,7 @@
|
|
|
145
148
|
error = null;
|
|
146
149
|
|
|
147
150
|
try {
|
|
148
|
-
const client = new DataCatalogClient({ baseUrl: dcapiurl });
|
|
151
|
+
const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token);
|
|
149
152
|
const filters: { names?: string[]; sourceTypes?: string[] } = {};
|
|
150
153
|
|
|
151
154
|
// Use name filter for API query if provided
|
|
@@ -6,6 +6,8 @@ interface FilterOptions {
|
|
|
6
6
|
interface Props {
|
|
7
7
|
id?: string;
|
|
8
8
|
dcapiurl?: string;
|
|
9
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
10
|
+
token?: string;
|
|
9
11
|
sourcetypefilter?: string | string[] | null;
|
|
10
12
|
datatypefilter?: DataType | DataType[] | null;
|
|
11
13
|
namefilter?: string | string[] | null;
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
|
|
35
35
|
interface Props {
|
|
36
36
|
dcApiUrl?: string;
|
|
37
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
38
|
+
token?: string;
|
|
37
39
|
sourceConnectionId?: string;
|
|
38
40
|
selectedIds?: string[];
|
|
39
41
|
entries?: CatalogEntry[];
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
|
|
47
49
|
let {
|
|
48
50
|
dcApiUrl = '',
|
|
51
|
+
token = '',
|
|
49
52
|
sourceConnectionId = '',
|
|
50
53
|
selectedIds = $bindable([]),
|
|
51
54
|
entries = $bindable([]),
|
|
@@ -85,8 +88,9 @@
|
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
function getClient(apiUrl: string): DataCatalogClient {
|
|
88
|
-
|
|
89
|
-
client
|
|
91
|
+
// Keep the bearer fresh on the cached client too (token may be re-pushed on refresh).
|
|
92
|
+
if (client && clientUrl === apiUrl) return client.setToken(token);
|
|
93
|
+
client = new DataCatalogClient({ baseUrl: apiUrl }).setToken(token);
|
|
90
94
|
clientUrl = apiUrl;
|
|
91
95
|
return client;
|
|
92
96
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { CatalogEntry } from '@industream/datacatalog-client/dto';
|
|
2
2
|
interface Props {
|
|
3
3
|
dcApiUrl?: string;
|
|
4
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
5
|
+
token?: string;
|
|
4
6
|
sourceConnectionId?: string;
|
|
5
7
|
selectedIds?: string[];
|
|
6
8
|
entries?: CatalogEntry[];
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
interface Props {
|
|
12
12
|
dcapiurl?: string;
|
|
13
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
14
|
+
token?: string;
|
|
13
15
|
sourcetypefilter?: string | string[] | null;
|
|
14
16
|
initialselection?: string | null;
|
|
15
17
|
onsourceselect?: (connection: SourceConnection) => void;
|
|
@@ -18,6 +20,7 @@
|
|
|
18
20
|
|
|
19
21
|
let {
|
|
20
22
|
dcapiurl = '',
|
|
23
|
+
token = '',
|
|
21
24
|
sourcetypefilter = null,
|
|
22
25
|
initialselection = null,
|
|
23
26
|
onsourceselect = null,
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
error = null;
|
|
53
56
|
|
|
54
57
|
try {
|
|
55
|
-
const client = new DataCatalogClient({ baseUrl: dcapiurl });
|
|
58
|
+
const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token);
|
|
56
59
|
const filters = {};
|
|
57
60
|
|
|
58
61
|
if (sourcetypefilter && sourcetypefilter.length > 0) {
|
|
@@ -8,6 +8,8 @@ export interface SourceConnection {
|
|
|
8
8
|
}
|
|
9
9
|
interface Props {
|
|
10
10
|
dcapiurl?: string;
|
|
11
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
12
|
+
token?: string;
|
|
11
13
|
sourcetypefilter?: string | string[] | null;
|
|
12
14
|
initialselection?: string | null;
|
|
13
15
|
onsourceselect?: (connection: SourceConnection) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@industream/flowmaker-flowbox-ui-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Reusable Svelte components for FlowMaker FlowBox UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./dist/index.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"svelte": "^5.0.0",
|
|
46
|
-
"@industream/datacatalog-client": "1.9.
|
|
46
|
+
"@industream/datacatalog-client": "1.9.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@industream/datacatalog-client": "1.9.
|
|
49
|
+
"@industream/datacatalog-client": "1.9.1",
|
|
50
50
|
"svelte": "^5.0.0",
|
|
51
51
|
"vite": "^6.0.0",
|
|
52
52
|
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
interface Props {
|
|
11
11
|
id?: string;
|
|
12
12
|
dcapiurl?: string;
|
|
13
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
14
|
+
token?: string;
|
|
13
15
|
sourcetypefilter?: string | string[] | null; // Source type names like "PostgreSQL", "InfluxDB2"
|
|
14
16
|
datatypefilter?: DataType | DataType[] | null;
|
|
15
17
|
namefilter?: string | string[] | null;
|
|
@@ -22,6 +24,7 @@
|
|
|
22
24
|
let {
|
|
23
25
|
id = undefined,
|
|
24
26
|
dcapiurl = '',
|
|
27
|
+
token = '',
|
|
25
28
|
sourcetypefilter = null,
|
|
26
29
|
datatypefilter = null,
|
|
27
30
|
namefilter = null,
|
|
@@ -145,7 +148,7 @@
|
|
|
145
148
|
error = null;
|
|
146
149
|
|
|
147
150
|
try {
|
|
148
|
-
const client = new DataCatalogClient({ baseUrl: dcapiurl });
|
|
151
|
+
const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token);
|
|
149
152
|
const filters: { names?: string[]; sourceTypes?: string[] } = {};
|
|
150
153
|
|
|
151
154
|
// Use name filter for API query if provided
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
|
|
35
35
|
interface Props {
|
|
36
36
|
dcApiUrl?: string;
|
|
37
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
38
|
+
token?: string;
|
|
37
39
|
sourceConnectionId?: string;
|
|
38
40
|
selectedIds?: string[];
|
|
39
41
|
entries?: CatalogEntry[];
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
|
|
47
49
|
let {
|
|
48
50
|
dcApiUrl = '',
|
|
51
|
+
token = '',
|
|
49
52
|
sourceConnectionId = '',
|
|
50
53
|
selectedIds = $bindable([]),
|
|
51
54
|
entries = $bindable([]),
|
|
@@ -85,8 +88,9 @@
|
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
function getClient(apiUrl: string): DataCatalogClient {
|
|
88
|
-
|
|
89
|
-
client
|
|
91
|
+
// Keep the bearer fresh on the cached client too (token may be re-pushed on refresh).
|
|
92
|
+
if (client && clientUrl === apiUrl) return client.setToken(token);
|
|
93
|
+
client = new DataCatalogClient({ baseUrl: apiUrl }).setToken(token);
|
|
90
94
|
clientUrl = apiUrl;
|
|
91
95
|
return client;
|
|
92
96
|
}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
interface Props {
|
|
12
12
|
dcapiurl?: string;
|
|
13
|
+
/** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
|
|
14
|
+
token?: string;
|
|
13
15
|
sourcetypefilter?: string | string[] | null;
|
|
14
16
|
initialselection?: string | null;
|
|
15
17
|
onsourceselect?: (connection: SourceConnection) => void;
|
|
@@ -18,6 +20,7 @@
|
|
|
18
20
|
|
|
19
21
|
let {
|
|
20
22
|
dcapiurl = '',
|
|
23
|
+
token = '',
|
|
21
24
|
sourcetypefilter = null,
|
|
22
25
|
initialselection = null,
|
|
23
26
|
onsourceselect = null,
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
error = null;
|
|
53
56
|
|
|
54
57
|
try {
|
|
55
|
-
const client = new DataCatalogClient({ baseUrl: dcapiurl });
|
|
58
|
+
const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token);
|
|
56
59
|
const filters = {};
|
|
57
60
|
|
|
58
61
|
if (sourcetypefilter && sourcetypefilter.length > 0) {
|