@thoughtspot/ts-chart-sdk 2.5.7 → 2.6.0
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/dist/ts-chart-sdk.d.ts +71 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/main/custom-chart-context.d.ts +3 -1
- package/lib/main/custom-chart-context.d.ts.map +1 -1
- package/lib/main/custom-chart-context.js +46 -1
- package/lib/main/custom-chart-context.js.map +1 -1
- package/lib/main/custom-chart-context.spec.js +64 -1
- package/lib/main/custom-chart-context.spec.js.map +1 -1
- package/lib/react/mocks/custom-chart-context-mock.d.ts.map +1 -1
- package/lib/react/mocks/custom-chart-context-mock.js +3 -7
- package/lib/react/mocks/custom-chart-context-mock.js.map +1 -1
- package/lib/react/use-custom-chart-context.spec.js +67 -1
- package/lib/react/use-custom-chart-context.spec.js.map +1 -1
- package/lib/types/chart-to-ts-event.types.d.ts +27 -0
- package/lib/types/chart-to-ts-event.types.d.ts.map +1 -1
- package/lib/types/chart-to-ts-event.types.js +7 -0
- package/lib/types/chart-to-ts-event.types.js.map +1 -1
- package/lib/types/common.types.d.ts +31 -1
- package/lib/types/common.types.d.ts.map +1 -1
- package/lib/types/common.types.js +11 -0
- package/lib/types/common.types.js.map +1 -1
- package/lib/types/conditional-formatting.types.d.ts +1 -0
- package/lib/types/conditional-formatting.types.d.ts.map +1 -1
- package/lib/types/conditional-formatting.types.js.map +1 -1
- package/lib/types/ts-to-chart-event.types.d.ts +6 -1
- package/lib/types/ts-to-chart-event.types.d.ts.map +1 -1
- package/lib/types/ts-to-chart-event.types.js +1 -0
- package/lib/types/ts-to-chart-event.types.js.map +1 -1
- package/lib/utils/chart-config.d.ts +8 -0
- package/lib/utils/chart-config.d.ts.map +1 -0
- package/lib/utils/chart-config.js +56 -0
- package/lib/utils/chart-config.js.map +1 -0
- package/lib/utils/chart-config.spec.d.ts +2 -0
- package/lib/utils/chart-config.spec.d.ts.map +1 -0
- package/lib/utils/chart-config.spec.js +574 -0
- package/lib/utils/chart-config.spec.js.map +1 -0
- package/package.json +2 -1
- package/src/index.ts +1 -0
- package/src/main/custom-chart-context.spec.ts +106 -1
- package/src/main/custom-chart-context.ts +69 -1
- package/src/react/mocks/custom-chart-context-mock.ts +4 -13
- package/src/react/use-custom-chart-context.spec.tsx +81 -1
- package/src/types/chart-to-ts-event.types.ts +86 -2
- package/src/types/common.types.ts +116 -7
- package/src/types/conditional-formatting.types.ts +1 -0
- package/src/types/ts-to-chart-event.types.ts +16 -1
- package/src/utils/chart-config.spec.ts +680 -0
- package/src/utils/chart-config.ts +100 -0
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
PersistedVisualPropKeys,
|
|
5
5
|
} from '../main/custom-chart-context';
|
|
6
6
|
import { ChartColumn } from './answer-column.types';
|
|
7
|
-
import type { Point } from './chart-to-ts-event.types';
|
|
7
|
+
import type { AlertActionButton, Point } from './chart-to-ts-event.types';
|
|
8
8
|
import {
|
|
9
9
|
AppConfig,
|
|
10
10
|
ChartConfig,
|
|
@@ -75,6 +75,10 @@ export enum TSToChartEvent {
|
|
|
75
75
|
* @version SDK: 0.1 | ThoughtSpot:
|
|
76
76
|
*/
|
|
77
77
|
AxisMenuActionClick = 'AxisMenuActionClick',
|
|
78
|
+
/**
|
|
79
|
+
* @version SDK: 0.1 | ThoughtSpot:
|
|
80
|
+
*/
|
|
81
|
+
GlobalToastActionClick = 'GlobalToastActionClick',
|
|
78
82
|
/**
|
|
79
83
|
* @version SDK: 0.2 | ThoughtSpot:
|
|
80
84
|
*/
|
|
@@ -153,6 +157,9 @@ export interface TSToChartInternalEventsPayloadMap {
|
|
|
153
157
|
[TSToChartEvent.AxisMenuActionClick]: (
|
|
154
158
|
payload: AxisMenuCustomActionPayload,
|
|
155
159
|
) => void;
|
|
160
|
+
[TSToChartEvent.GlobalToastActionClick]: (
|
|
161
|
+
payload: GlobalToastActionClickPayload,
|
|
162
|
+
) => void;
|
|
156
163
|
}
|
|
157
164
|
|
|
158
165
|
/**
|
|
@@ -435,3 +442,11 @@ export interface AxisMenuCustomActionPayload {
|
|
|
435
442
|
*/
|
|
436
443
|
customAction: CustomAxisMenuAction;
|
|
437
444
|
}
|
|
445
|
+
export interface GlobalToastActionClickPayload {
|
|
446
|
+
/**
|
|
447
|
+
* Dispatched custom action from context menu
|
|
448
|
+
*
|
|
449
|
+
* @version SDK: 0.1 | ThoughtSpot:
|
|
450
|
+
*/
|
|
451
|
+
alertAction: AlertActionButton;
|
|
452
|
+
}
|