@cccsaurora/clue-ui 1.4.1-dev.451 → 1.4.2-dev.453

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.
@@ -37,6 +37,10 @@ export interface ClueDatabaseContextProps {
37
37
  * @returns An access token valid for use with the clue API.
38
38
  */
39
39
  getToken?: () => string;
40
+ /**
41
+ * The base URL that refers to the clue API. leaving this empty will forward requests to the current origin.
42
+ */
43
+ baseURL?: string;
40
44
  }
41
45
  export type ClueDatabaseContextType = ClueDatabase;
42
46
  export declare const ClueDatabaseContext: import('react').Context<ClueDatabase>;
@@ -6,7 +6,8 @@ const ClueDatabaseProvider = ({
6
6
  children,
7
7
  database: _database,
8
8
  databaseConfig,
9
- getToken
9
+ getToken,
10
+ baseURL
10
11
  }) => {
11
12
  const [database, setDatabase] = useState();
12
13
  const getTokenRef = useRef(getToken);
@@ -22,7 +23,7 @@ const ClueDatabaseProvider = ({
22
23
  let cancelled = false;
23
24
  if (!_database) {
24
25
  console.warn("It is heavily suggested to initialize the database outside of the React component tree.");
25
- buildDatabase({ ...databaseConfig, getToken: getTokenRef.current }).then((_db) => {
26
+ buildDatabase({ baseURL, ...databaseConfig, getToken: getTokenRef.current }).then((_db) => {
26
27
  if (!cancelled) {
27
28
  setDatabase(_db);
28
29
  }
@@ -31,7 +32,7 @@ const ClueDatabaseProvider = ({
31
32
  cancelled = true;
32
33
  };
33
34
  }
34
- }, [_database, databaseConfig]);
35
+ }, [_database, baseURL, databaseConfig]);
35
36
  return /* @__PURE__ */ jsx(ClueDatabaseContext.Provider, { value: database, children });
36
37
  };
37
38
  export {
package/package.json CHANGED
@@ -67,60 +67,60 @@
67
67
  },
68
68
  "type": "module",
69
69
  "types": "main.d.ts",
70
- "version": "1.4.1-dev.451",
70
+ "version": "1.4.2-dev.453",
71
71
  "exports": {
72
72
  ".": "./main.js",
73
73
  "./index.css": "./index.css",
74
74
  "./en/*.json": "./en/*.json",
75
75
  "./fr/*.json": "./fr/*.json",
76
- "./icons/*": "./icons/*.js",
77
76
  "./plugins/*": "./plugins/*.js",
78
- "./data/*": "./data/*.js",
77
+ "./database/*": "./database/*.js",
78
+ "./database": "./database/index.js",
79
79
  "./hooks/*": "./hooks/*.js",
80
+ "./data/*": "./data/*.js",
81
+ "./text/*": "./text/*.js",
80
82
  "./utils/*": "./utils/*.js",
81
83
  "./utils/*.json": "./utils/*.json",
82
- "./text/*": "./text/*.js",
84
+ "./icons/*": "./icons/*.js",
83
85
  "./types/*": "./types/*.js",
84
- "./database/*": "./database/*.js",
85
- "./database": "./database/index.js",
86
86
  "./components/*": "./components/*.js",
87
- "./plugins/graph/*": "./plugins/graph/*.js",
88
- "./plugins/graph": "./plugins/graph/index.js",
89
- "./plugins/file/*": "./plugins/file/*.js",
90
- "./plugins/file": "./plugins/file/index.js",
91
87
  "./plugins/image/*": "./plugins/image/*.js",
92
88
  "./plugins/image": "./plugins/image/index.js",
89
+ "./plugins/file/*": "./plugins/file/*.js",
90
+ "./plugins/file": "./plugins/file/index.js",
93
91
  "./plugins/markdown/*.md": "./plugins/markdown/*.md.js",
94
92
  "./plugins/markdown": "./plugins/markdown/index.js",
95
93
  "./plugins/json/*": "./plugins/json/*.js",
96
94
  "./plugins/json": "./plugins/json/index.js",
95
+ "./plugins/graph/*": "./plugins/graph/*.js",
96
+ "./plugins/graph": "./plugins/graph/index.js",
97
97
  "./plugins/test/*": "./plugins/test/*.js",
98
98
  "./plugins/test": "./plugins/test/index.js",
99
99
  "./plugins/graph/example/*": "./plugins/graph/example/*.js",
100
+ "./components/stats/*": "./components/stats/*.js",
100
101
  "./components/enrichment/*": "./components/enrichment/*.js",
101
- "./components/fetchers/*": "./components/fetchers/*.js",
102
- "./components/actions/*": "./components/actions/*.js",
103
102
  "./components/group/*": "./components/group/*.js",
104
- "./components/stats/*": "./components/stats/*.js",
105
103
  "./components/display/*": "./components/display/*.js",
106
- "./components/actions/form/*": "./components/actions/form/*.js",
107
- "./components/actions/formats/*": "./components/actions/formats/*.js",
108
- "./components/actions/formats": "./components/actions/formats/index.js",
109
- "./components/display/icons/*": "./components/display/icons/*.js",
110
- "./components/display/graph/*": "./components/display/graph/*.js",
111
- "./components/display/graph": "./components/display/graph/index.js",
104
+ "./components/fetchers/*": "./components/fetchers/*.js",
105
+ "./components/actions/*": "./components/actions/*.js",
112
106
  "./components/display/markdown/*.md": "./components/display/markdown/*.md.js",
113
107
  "./components/display/markdown": "./components/display/markdown/index.js",
108
+ "./components/display/icons/*": "./components/display/icons/*.js",
114
109
  "./components/display/json/*": "./components/display/json/*.js",
115
110
  "./components/display/json": "./components/display/json/index.js",
116
- "./components/display/graph/visualizations/*": "./components/display/graph/visualizations/*.js",
111
+ "./components/display/graph/*": "./components/display/graph/*.js",
112
+ "./components/display/graph": "./components/display/graph/index.js",
117
113
  "./components/display/graph/elements/*": "./components/display/graph/elements/*.js",
114
+ "./components/display/graph/visualizations/*": "./components/display/graph/visualizations/*.js",
115
+ "./components/display/graph/visualizations/panels/*": "./components/display/graph/visualizations/panels/*.js",
118
116
  "./components/display/graph/visualizations/icons/*": "./components/display/graph/visualizations/icons/*.js",
119
117
  "./components/display/graph/visualizations/icons": "./components/display/graph/visualizations/icons/index.js",
120
- "./components/display/graph/visualizations/panels/*": "./components/display/graph/visualizations/panels/*.js",
121
118
  "./components/display/graph/visualizations/cloud/*": "./components/display/graph/visualizations/cloud/*.js",
122
119
  "./components/display/graph/visualizations/cloud": "./components/display/graph/visualizations/cloud/index.js",
123
120
  "./components/display/graph/visualizations/tree/*": "./components/display/graph/visualizations/tree/*.js",
124
- "./components/display/graph/visualizations/tree": "./components/display/graph/visualizations/tree/index.js"
121
+ "./components/display/graph/visualizations/tree": "./components/display/graph/visualizations/tree/index.js",
122
+ "./components/actions/formats/*": "./components/actions/formats/*.js",
123
+ "./components/actions/formats": "./components/actions/formats/index.js",
124
+ "./components/actions/form/*": "./components/actions/form/*.js"
125
125
  }
126
126
  }