Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getQueriesFromChartConfig contract change #33

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/main/custom-chart-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@
* @returns {@link Array<Query>}
* @version SDK: 0.1 | ThoughtSpot:
*/
getQueriesFromChartConfig: (chartConfig: ChartConfig[]) => Query[];
getQueriesFromChartConfig: (
chartConfig: ChartConfig[],
chartModel: ChartModel,
) => Query[];
/**
* Main Render function that will render the chart based on the chart context provided
*
Expand Down Expand Up @@ -241,7 +244,7 @@
* @version SDK: 0.1 | ThoughtSpot:
*/
public initialize = (): Promise<void> => {
console.log('Chart Context: initialization start');

Check warning on line 247 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
return this.hasInitializedPromise;
};

Expand Down Expand Up @@ -273,7 +276,7 @@
*/
public off<T extends keyof TSToChartEventsPayloadMap>(eventType: T): void {
if (_.isNil(this.eventListeners[eventType])) {
console.log('No event listener found to remove');

Check warning on line 279 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
this.eventListeners[eventType] = [];
return;
}
Expand Down Expand Up @@ -430,7 +433,7 @@
...eventPayload: ChartToTSEventsPayloadMap[T]
): Promise<any> {
if (!isInitialized) {
console.log(

Check warning on line 436 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'Chart Context: not initialized the context, something went wrong',
);
return Promise.reject(new Error('Context not initialized'));
Expand All @@ -453,7 +456,7 @@
*/
private registerEventProcessor = () => {
if (isInitialized) {
console.error(

Check warning on line 459 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'The context is already initialized. you cannot have multiple contexts',
);
throw new Error(ErrorType.MultipleContextsNotSupported);
Expand All @@ -473,7 +476,7 @@
return;
}

console.log(

Check warning on line 479 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'Chart Context: message received:',
event.data.eventType,
event.data,
Expand Down Expand Up @@ -570,6 +573,7 @@
const queries =
this.chartContextProps.getQueriesFromChartConfig(
payload.config,
this.chartModel,
);
return {
queries,
Expand Down Expand Up @@ -615,7 +619,7 @@
isValid: true,
};
} catch (error: unknown) {
console.log(

Check warning on line 622 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'ContextMenuCustomAction: payload recieved:',
payload,
'CustomActionCallbackStore:',
Expand Down Expand Up @@ -658,7 +662,7 @@
isValid: true,
};
} catch (error: unknown) {
console.log(

Check warning on line 665 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'AxisMenuCustomAction: payload recieved:',
payload,
'CustomActionCallbackStore:',
Expand Down Expand Up @@ -810,7 +814,7 @@
};
}

console.log(

Check warning on line 817 in src/main/custom-chart-context.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
'ChartContext: Response:',
event.data.eventType,
response,
Expand Down
Loading