@industream/flowmaker-flowbox-ui-components 1.0.3 → 1.0.5

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.
@@ -1,12 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { DataCatalogClient } from '@industream/datacatalog-client';
3
3
  import type { CatalogEntry, DataType, SourceType } from '@industream/datacatalog-client/dto';
4
- import { getContext } from 'svelte';
5
- import { readable, type Readable } from 'svelte/store';
6
-
7
- // Hub bearer published by flowMakerBridge (key 'industream-hub-token'); used by
8
- // default so boxes don't wire it per call. An explicit `token` prop overrides it.
9
- const hubToken: Readable<string> = getContext('industream-hub-token') ?? readable('');
10
4
 
11
5
  interface FilterOptions {
12
6
  searchtext?: string | null; // Case-insensitive LIKE %text% filter on entry name
@@ -16,8 +10,6 @@
16
10
  interface Props {
17
11
  id?: string;
18
12
  dcapiurl?: string;
19
- /** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
20
- token?: string;
21
13
  sourcetypefilter?: string | string[] | null; // Source type names like "PostgreSQL", "InfluxDB2"
22
14
  datatypefilter?: DataType | DataType[] | null;
23
15
  namefilter?: string | string[] | null;
@@ -30,7 +22,6 @@
30
22
  let {
31
23
  id = undefined,
32
24
  dcapiurl = '',
33
- token = '',
34
25
  sourcetypefilter = null,
35
26
  datatypefilter = null,
36
27
  namefilter = null,
@@ -154,7 +145,7 @@
154
145
  error = null;
155
146
 
156
147
  try {
157
- const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token || $hubToken);
148
+ const client = new DataCatalogClient({ baseUrl: dcapiurl });
158
149
  const filters: { names?: string[]; sourceTypes?: string[] } = {};
159
150
 
160
151
  // Use name filter for API query if provided
@@ -6,8 +6,6 @@ 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;
11
9
  sourcetypefilter?: string | string[] | null;
12
10
  datatypefilter?: DataType | DataType[] | null;
13
11
  namefilter?: string | string[] | null;
@@ -29,19 +29,11 @@
29
29
  import { DEFAULT_COLUMNS, DEFAULT_SELECTED_COLUMNS_DISPLAY } from './picker-column-helpers';
30
30
  import TagBrowser from './TagBrowser.svelte';
31
31
  import SelectedTags from './SelectedTags.svelte';
32
- import { getContext } from 'svelte';
33
- import { readable, type Readable } from 'svelte/store';
34
-
35
- // Hub bearer published by flowMakerBridge (key 'industream-hub-token'); used by
36
- // default so boxes don't wire it per call. An explicit `token` prop overrides it.
37
- const hubToken: Readable<string> = getContext('industream-hub-token') ?? readable('');
38
32
 
39
33
  const MAX_ENTRIES = 100;
40
34
 
41
35
  interface Props {
42
36
  dcApiUrl?: string;
43
- /** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
44
- token?: string;
45
37
  sourceConnectionId?: string;
46
38
  selectedIds?: string[];
47
39
  entries?: CatalogEntry[];
@@ -54,7 +46,6 @@
54
46
 
55
47
  let {
56
48
  dcApiUrl = '',
57
- token = '',
58
49
  sourceConnectionId = '',
59
50
  selectedIds = $bindable([]),
60
51
  entries = $bindable([]),
@@ -94,10 +85,8 @@
94
85
  }
95
86
 
96
87
  function getClient(apiUrl: string): DataCatalogClient {
97
- // Keep the bearer fresh on the cached client too (token may be re-pushed on refresh).
98
- const t = token || $hubToken;
99
- if (client && clientUrl === apiUrl) return client.setToken(t);
100
- client = new DataCatalogClient({ baseUrl: apiUrl }).setToken(t);
88
+ if (client && clientUrl === apiUrl) return client;
89
+ client = new DataCatalogClient({ baseUrl: apiUrl });
101
90
  clientUrl = apiUrl;
102
91
  return client;
103
92
  }
@@ -1,8 +1,6 @@
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;
6
4
  sourceConnectionId?: string;
7
5
  selectedIds?: string[];
8
6
  entries?: CatalogEntry[];
@@ -1,11 +1,5 @@
1
1
  <script lang="ts">
2
2
  import { DataCatalogClient } from '@industream/datacatalog-client';
3
- import { getContext } from 'svelte';
4
- import { readable, type Readable } from 'svelte/store';
5
-
6
- // Hub bearer published by flowMakerBridge (key 'industream-hub-token'); used by
7
- // default so boxes don't wire it per call. An explicit `token` prop overrides it.
8
- const hubToken: Readable<string> = getContext('industream-hub-token') ?? readable('');
9
3
 
10
4
  export interface SourceConnection {
11
5
  id: string;
@@ -16,8 +10,6 @@
16
10
 
17
11
  interface Props {
18
12
  dcapiurl?: string;
19
- /** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
20
- token?: string;
21
13
  sourcetypefilter?: string | string[] | null;
22
14
  initialselection?: string | null;
23
15
  onsourceselect?: (connection: SourceConnection) => void;
@@ -26,7 +18,6 @@
26
18
 
27
19
  let {
28
20
  dcapiurl = '',
29
- token = '',
30
21
  sourcetypefilter = null,
31
22
  initialselection = null,
32
23
  onsourceselect = null,
@@ -61,7 +52,7 @@
61
52
  error = null;
62
53
 
63
54
  try {
64
- const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token || $hubToken);
55
+ const client = new DataCatalogClient({ baseUrl: dcapiurl });
65
56
  const filters = {};
66
57
 
67
58
  if (sourcetypefilter && sourcetypefilter.length > 0) {
@@ -8,8 +8,6 @@ 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;
13
11
  sourcetypefilter?: string | string[] | null;
14
12
  initialselection?: string | null;
15
13
  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",
3
+ "version": "1.0.5",
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.1"
46
+ "@industream/datacatalog-client": "1.9.2"
47
47
  },
48
48
  "devDependencies": {
49
- "@industream/datacatalog-client": "1.9.1",
49
+ "@industream/datacatalog-client": "1.9.2",
50
50
  "svelte": "^5.0.0",
51
51
  "vite": "^6.0.0",
52
52
  "@sveltejs/vite-plugin-svelte": "^5.0.0",
@@ -1,12 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { DataCatalogClient } from '@industream/datacatalog-client';
3
3
  import type { CatalogEntry, DataType, SourceType } from '@industream/datacatalog-client/dto';
4
- import { getContext } from 'svelte';
5
- import { readable, type Readable } from 'svelte/store';
6
-
7
- // Hub bearer published by flowMakerBridge (key 'industream-hub-token'); used by
8
- // default so boxes don't wire it per call. An explicit `token` prop overrides it.
9
- const hubToken: Readable<string> = getContext('industream-hub-token') ?? readable('');
10
4
 
11
5
  interface FilterOptions {
12
6
  searchtext?: string | null; // Case-insensitive LIKE %text% filter on entry name
@@ -16,8 +10,6 @@
16
10
  interface Props {
17
11
  id?: string;
18
12
  dcapiurl?: string;
19
- /** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
20
- token?: string;
21
13
  sourcetypefilter?: string | string[] | null; // Source type names like "PostgreSQL", "InfluxDB2"
22
14
  datatypefilter?: DataType | DataType[] | null;
23
15
  namefilter?: string | string[] | null;
@@ -30,7 +22,6 @@
30
22
  let {
31
23
  id = undefined,
32
24
  dcapiurl = '',
33
- token = '',
34
25
  sourcetypefilter = null,
35
26
  datatypefilter = null,
36
27
  namefilter = null,
@@ -154,7 +145,7 @@
154
145
  error = null;
155
146
 
156
147
  try {
157
- const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token || $hubToken);
148
+ const client = new DataCatalogClient({ baseUrl: dcapiurl });
158
149
  const filters: { names?: string[]; sourceTypes?: string[] } = {};
159
150
 
160
151
  // Use name filter for API query if provided
@@ -29,19 +29,11 @@
29
29
  import { DEFAULT_COLUMNS, DEFAULT_SELECTED_COLUMNS_DISPLAY } from './picker-column-helpers';
30
30
  import TagBrowser from './TagBrowser.svelte';
31
31
  import SelectedTags from './SelectedTags.svelte';
32
- import { getContext } from 'svelte';
33
- import { readable, type Readable } from 'svelte/store';
34
-
35
- // Hub bearer published by flowMakerBridge (key 'industream-hub-token'); used by
36
- // default so boxes don't wire it per call. An explicit `token` prop overrides it.
37
- const hubToken: Readable<string> = getContext('industream-hub-token') ?? readable('');
38
32
 
39
33
  const MAX_ENTRIES = 100;
40
34
 
41
35
  interface Props {
42
36
  dcApiUrl?: string;
43
- /** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
44
- token?: string;
45
37
  sourceConnectionId?: string;
46
38
  selectedIds?: string[];
47
39
  entries?: CatalogEntry[];
@@ -54,7 +46,6 @@
54
46
 
55
47
  let {
56
48
  dcApiUrl = '',
57
- token = '',
58
49
  sourceConnectionId = '',
59
50
  selectedIds = $bindable([]),
60
51
  entries = $bindable([]),
@@ -94,10 +85,8 @@
94
85
  }
95
86
 
96
87
  function getClient(apiUrl: string): DataCatalogClient {
97
- // Keep the bearer fresh on the cached client too (token may be re-pushed on refresh).
98
- const t = token || $hubToken;
99
- if (client && clientUrl === apiUrl) return client.setToken(t);
100
- client = new DataCatalogClient({ baseUrl: apiUrl }).setToken(t);
88
+ if (client && clientUrl === apiUrl) return client;
89
+ client = new DataCatalogClient({ baseUrl: apiUrl });
101
90
  clientUrl = apiUrl;
102
91
  return client;
103
92
  }
@@ -1,11 +1,5 @@
1
1
  <script lang="ts">
2
2
  import { DataCatalogClient } from '@industream/datacatalog-client';
3
- import { getContext } from 'svelte';
4
- import { readable, type Readable } from 'svelte/store';
5
-
6
- // Hub bearer published by flowMakerBridge (key 'industream-hub-token'); used by
7
- // default so boxes don't wire it per call. An explicit `token` prop overrides it.
8
- const hubToken: Readable<string> = getContext('industream-hub-token') ?? readable('');
9
3
 
10
4
  export interface SourceConnection {
11
5
  id: string;
@@ -16,8 +10,6 @@
16
10
 
17
11
  interface Props {
18
12
  dcapiurl?: string;
19
- /** Hub access token, injected from the box context — sent as Bearer to datacatalog-api. */
20
- token?: string;
21
13
  sourcetypefilter?: string | string[] | null;
22
14
  initialselection?: string | null;
23
15
  onsourceselect?: (connection: SourceConnection) => void;
@@ -26,7 +18,6 @@
26
18
 
27
19
  let {
28
20
  dcapiurl = '',
29
- token = '',
30
21
  sourcetypefilter = null,
31
22
  initialselection = null,
32
23
  onsourceselect = null,
@@ -61,7 +52,7 @@
61
52
  error = null;
62
53
 
63
54
  try {
64
- const client = new DataCatalogClient({ baseUrl: dcapiurl }).setToken(token || $hubToken);
55
+ const client = new DataCatalogClient({ baseUrl: dcapiurl });
65
56
  const filters = {};
66
57
 
67
58
  if (sourcetypefilter && sourcetypefilter.length > 0) {