@quillsql/react 1.2.0 → 1.2.1
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/package.json
CHANGED
package/src/Chart.tsx
CHANGED
|
@@ -537,7 +537,7 @@ const ChartUpdater: React.FC<ChartProps> = ({
|
|
|
537
537
|
setLoading(false);
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
const { publicKey, customerId,
|
|
540
|
+
const { publicKey, customerId, environment } = client;
|
|
541
541
|
setLoading(true);
|
|
542
542
|
const resp = await axios.get(
|
|
543
543
|
'https://quill-344421.uc.r.appspot.com/item',
|
|
@@ -555,6 +555,9 @@ const ChartUpdater: React.FC<ChartProps> = ({
|
|
|
555
555
|
dateFilter.endDate &&
|
|
556
556
|
dateFilter.endDate.toISOString(),
|
|
557
557
|
},
|
|
558
|
+
headers: {
|
|
559
|
+
environment: environment || undefined,
|
|
560
|
+
},
|
|
558
561
|
}
|
|
559
562
|
);
|
|
560
563
|
const {
|
package/src/Context.tsx
CHANGED
|
@@ -69,6 +69,7 @@ export const ContextProvider = ({
|
|
|
69
69
|
containerStyle,
|
|
70
70
|
initialTheme,
|
|
71
71
|
publicKey,
|
|
72
|
+
environment,
|
|
72
73
|
authToken,
|
|
73
74
|
customerId,
|
|
74
75
|
userId,
|
|
@@ -110,9 +111,10 @@ export const ContextProvider = ({
|
|
|
110
111
|
userId,
|
|
111
112
|
authToken,
|
|
112
113
|
publicKey,
|
|
114
|
+
environment,
|
|
113
115
|
});
|
|
114
116
|
}
|
|
115
|
-
}, [customerId, userId, authToken, publicKey, client]);
|
|
117
|
+
}, [customerId, userId, authToken, publicKey, client, environment]);
|
|
116
118
|
|
|
117
119
|
if (!theme || !client) {
|
|
118
120
|
return null;
|
package/src/Dashboard.tsx
CHANGED
|
@@ -50,7 +50,7 @@ export default function Dashboard({
|
|
|
50
50
|
|
|
51
51
|
React.useEffect(() => {
|
|
52
52
|
async function getDashboards() {
|
|
53
|
-
const { publicKey, customerId,
|
|
53
|
+
const { publicKey, customerId, environment } = client;
|
|
54
54
|
try {
|
|
55
55
|
// const response = await fetch(
|
|
56
56
|
// `https://quill-344421.uc.r.appspot.com/dashsections/${publicKey}/${customerId}/${name}`
|
|
@@ -64,6 +64,9 @@ export default function Dashboard({
|
|
|
64
64
|
orgId: customerId,
|
|
65
65
|
name: name,
|
|
66
66
|
},
|
|
67
|
+
headers: {
|
|
68
|
+
environment: environment || undefined,
|
|
69
|
+
},
|
|
67
70
|
}
|
|
68
71
|
);
|
|
69
72
|
|
|
@@ -96,6 +96,7 @@ const DateRangePickerButton = ({
|
|
|
96
96
|
whiteSpace: 'nowrap',
|
|
97
97
|
background: theme?.backgroundColor,
|
|
98
98
|
fontWeight: theme?.fontWeightMedium || '500',
|
|
99
|
+
fontSize: theme?.fontSizeSmall || '0.875rem',
|
|
99
100
|
// borderRight: enableDropdown
|
|
100
101
|
// ? border.none.right
|
|
101
102
|
// : twMerge(borderRadius.md.right, border.sm.right),
|
|
@@ -146,6 +147,7 @@ const DateRangePickerButton = ({
|
|
|
146
147
|
textOverflow: 'ellipsis',
|
|
147
148
|
whiteSpace: 'nowrap',
|
|
148
149
|
fontWeight: theme?.fontWeightMedium || '500',
|
|
150
|
+
fontSize: theme?.fontSizeSmall || '0.875rem',
|
|
149
151
|
}}
|
|
150
152
|
// className={twMerge(
|
|
151
153
|
// 'qq-whitespace-nowrap qq-truncate',
|
|
@@ -180,6 +182,7 @@ const DateRangePickerButton = ({
|
|
|
180
182
|
justifyContent: 'space-between',
|
|
181
183
|
alignItems: 'center',
|
|
182
184
|
background: theme?.backgroundColor,
|
|
185
|
+
fontSize: theme?.fontSizeSmall || '0.875rem',
|
|
183
186
|
// fontWeight: theme?.fontWeightMedium || '800',
|
|
184
187
|
}}
|
|
185
188
|
ref={dropdownRef}
|
|
@@ -208,6 +211,7 @@ const DateRangePickerButton = ({
|
|
|
208
211
|
textOverflow: 'ellipsis',
|
|
209
212
|
whiteSpace: 'nowrap',
|
|
210
213
|
fontWeight: theme?.fontWeightMedium || '500',
|
|
214
|
+
fontSize: theme?.fontSizeSmall || '0.875rem',
|
|
211
215
|
// background: 'red',
|
|
212
216
|
}}
|
|
213
217
|
// className={twMerge(
|
package/src/QuillProvider.tsx
CHANGED
|
@@ -6,6 +6,7 @@ const QuillProvider = ({
|
|
|
6
6
|
organizationId,
|
|
7
7
|
authToken,
|
|
8
8
|
publicKey,
|
|
9
|
+
environment,
|
|
9
10
|
theme,
|
|
10
11
|
containerStyle,
|
|
11
12
|
runQueryButton,
|
|
@@ -19,6 +20,7 @@ const QuillProvider = ({
|
|
|
19
20
|
initialTheme={theme}
|
|
20
21
|
authToken={authToken}
|
|
21
22
|
publicKey={publicKey}
|
|
23
|
+
environment={environment}
|
|
22
24
|
customerId={organizationId}
|
|
23
25
|
>
|
|
24
26
|
{children}
|
package/src/hooks/useQuill.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const useQuill = (chartId: string) => {
|
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
// @ts-ignore
|
|
20
|
-
const { publicKey, customerId } = client;
|
|
20
|
+
const { publicKey, customerId, environment } = client;
|
|
21
21
|
const resp = await axios.get(
|
|
22
22
|
'https://quill-344421.uc.r.appspot.com/item',
|
|
23
23
|
{
|
|
@@ -26,6 +26,9 @@ export const useQuill = (chartId: string) => {
|
|
|
26
26
|
orgId: customerId,
|
|
27
27
|
publicKey: publicKey,
|
|
28
28
|
},
|
|
29
|
+
headers: {
|
|
30
|
+
environment: environment || undefined,
|
|
31
|
+
},
|
|
29
32
|
}
|
|
30
33
|
);
|
|
31
34
|
setReport(resp.data);
|