@bygd/nc-report-ui 0.1.9 → 0.1.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.
@@ -11339,9 +11339,12 @@ const apiClient = axios.create({
11339
11339
  }
11340
11340
  });
11341
11341
  const Api = {
11342
- setAuth(token) {
11343
- if (!token) return;
11344
- apiClient.defaults.headers.common['Authorization'] = `Bearer ${token}`;
11342
+ setAuth(auth) {
11343
+ this.auth = auth;
11344
+ const token = auth?.token;
11345
+ const accessToken = token?.accessToken;
11346
+ if (!accessToken) return;
11347
+ apiClient.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`;
11345
11348
  },
11346
11349
  getDashboard: async ({
11347
11350
  id
@@ -45030,7 +45033,7 @@ function Dashboard({
45030
45033
  const channel = useChannel();
45031
45034
  useFilterManager(channel);
45032
45035
  const init = async () => {
45033
- Api.setAuth(auth?.access_token);
45036
+ Api.setAuth(auth);
45034
45037
 
45035
45038
  // get dashboard entity
45036
45039
  const dashboardTemp = await Api.getDashboard({
@@ -143,9 +143,12 @@ const apiClient = axios__default.default.create({
143
143
  }
144
144
  });
145
145
  const Api = {
146
- setAuth(token) {
147
- if (!token) return;
148
- apiClient.defaults.headers.common['Authorization'] = `Bearer ${token}`;
146
+ setAuth(auth) {
147
+ this.auth = auth;
148
+ const token = auth?.token;
149
+ const accessToken = token?.accessToken;
150
+ if (!accessToken) return;
151
+ apiClient.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`;
149
152
  },
150
153
  getDashboard: async ({
151
154
  id
@@ -993,7 +996,7 @@ function Dashboard({
993
996
  const channel = useChannel();
994
997
  useFilterManager(channel);
995
998
  const init = async () => {
996
- Api.setAuth(auth?.access_token);
999
+ Api.setAuth(auth);
997
1000
 
998
1001
  // get dashboard entity
999
1002
  const dashboardTemp = await Api.getDashboard({
@@ -99,9 +99,12 @@ const apiClient = axios.create({
99
99
  }
100
100
  });
101
101
  const Api = {
102
- setAuth(token) {
103
- if (!token) return;
104
- apiClient.defaults.headers.common['Authorization'] = `Bearer ${token}`;
102
+ setAuth(auth) {
103
+ this.auth = auth;
104
+ const token = auth?.token;
105
+ const accessToken = token?.accessToken;
106
+ if (!accessToken) return;
107
+ apiClient.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`;
105
108
  },
106
109
  getDashboard: async ({
107
110
  id
@@ -949,7 +952,7 @@ function Dashboard({
949
952
  const channel = useChannel();
950
953
  useFilterManager(channel);
951
954
  const init = async () => {
952
- Api.setAuth(auth?.access_token);
955
+ Api.setAuth(auth);
953
956
 
954
957
  // get dashboard entity
955
958
  const dashboardTemp = await Api.getDashboard({
@@ -10914,9 +10914,12 @@ var _BYGD_NC_REPORT_UI = (function () {
10914
10914
  }
10915
10915
  });
10916
10916
  const Api = {
10917
- setAuth(token) {
10918
- if (!token) return;
10919
- apiClient.defaults.headers.common['Authorization'] = `Bearer ${token}`;
10917
+ setAuth(auth) {
10918
+ this.auth = auth;
10919
+ const token = auth?.token;
10920
+ const accessToken = token?.accessToken;
10921
+ if (!accessToken) return;
10922
+ apiClient.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`;
10920
10923
  },
10921
10924
  getDashboard: async ({
10922
10925
  id
@@ -45015,7 +45018,7 @@ export default theme;`;
45015
45018
  const channel = useChannel();
45016
45019
  useFilterManager(channel);
45017
45020
  const init = async () => {
45018
- Api.setAuth(auth?.access_token);
45021
+ Api.setAuth(auth);
45019
45022
 
45020
45023
  // get dashboard entity
45021
45024
  const dashboardTemp = await Api.getDashboard({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bygd/nc-report-ui",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "fnet/input.yaml",