@thoughtspot/visual-embed-sdk 1.47.2 → 1.48.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/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +11 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +38 -0
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.d.ts +2 -0
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +7 -5
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/embed/app.d.ts +7 -2
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +4 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +121 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +2 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +32 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +24 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +15 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +99 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +3 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +11 -3
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +51 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +17 -5
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +168 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +8 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +2 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +2 -0
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/test/test-utils.d.ts +1 -0
- package/cjs/src/test/test-utils.d.ts.map +1 -1
- package/cjs/src/test/test-utils.js +26 -1
- package/cjs/src/test/test-utils.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts.map +1 -1
- package/cjs/src/tokenizedFetch.js +12 -9
- package/cjs/src/tokenizedFetch.js.map +1 -1
- package/cjs/src/tokenizedFetch.spec.d.ts +2 -0
- package/cjs/src/tokenizedFetch.spec.d.ts.map +1 -0
- package/cjs/src/tokenizedFetch.spec.js +68 -0
- package/cjs/src/tokenizedFetch.spec.js.map +1 -0
- package/cjs/src/types.d.ts +466 -13
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +149 -5
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-CFZ7RDZ9.js → index-Ck-r09gt.js} +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts +2 -0
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +7 -2
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +2 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +24 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +3 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/test/test-utils.d.ts +1 -0
- package/dist/src/test/test-utils.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.spec.d.ts +2 -0
- package/dist/src/tokenizedFetch.spec.d.ts.map +1 -0
- package/dist/src/types.d.ts +466 -13
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +226 -29
- package/dist/tsembed-react.js +225 -28
- package/dist/tsembed.es.js +227 -30
- package/dist/tsembed.js +225 -28
- package/dist/visual-embed-sdk-react-full.d.ts +469 -15
- package/dist/visual-embed-sdk-react.d.ts +469 -15
- package/dist/visual-embed-sdk.d.ts +497 -15
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +12 -2
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +38 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.d.ts +2 -0
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +2 -2
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/embed/app.d.ts +7 -2
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +4 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +122 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +2 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +32 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +24 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +15 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +100 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +3 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +11 -3
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +51 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +16 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +168 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +2 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +2 -0
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/test/test-utils.d.ts +1 -0
- package/lib/src/test/test-utils.d.ts.map +1 -1
- package/lib/src/test/test-utils.js +25 -1
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts.map +1 -1
- package/lib/src/tokenizedFetch.js +13 -10
- package/lib/src/tokenizedFetch.js.map +1 -1
- package/lib/src/tokenizedFetch.spec.d.ts +2 -0
- package/lib/src/tokenizedFetch.spec.d.ts.map +1 -0
- package/lib/src/tokenizedFetch.spec.js +65 -0
- package/lib/src/tokenizedFetch.spec.js.map +1 -0
- package/lib/src/types.d.ts +466 -13
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +148 -4
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +497 -15
- package/package.json +1 -1
- package/src/auth.spec.ts +55 -1
- package/src/auth.ts +11 -2
- package/src/authToken.ts +2 -2
- package/src/embed/app.spec.ts +154 -0
- package/src/embed/app.ts +13 -2
- package/src/embed/conversation.ts +2 -1
- package/src/embed/liveboard.spec.ts +46 -0
- package/src/embed/liveboard.ts +9 -4
- package/src/embed/search.spec.ts +118 -0
- package/src/embed/search.ts +43 -1
- package/src/embed/spotter-utils.spec.ts +52 -0
- package/src/embed/spotter-utils.ts +19 -3
- package/src/embed/ts-embed.spec.ts +220 -0
- package/src/embed/ts-embed.ts +15 -4
- package/src/index.ts +16 -0
- package/src/mixpanel-service.spec.ts +2 -0
- package/src/mixpanel-service.ts +2 -0
- package/src/test/test-utils.ts +33 -1
- package/src/tokenizedFetch.spec.ts +81 -0
- package/src/tokenizedFetch.ts +14 -11
- package/src/types.ts +496 -13
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.48.0 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -4019,6 +4019,7 @@
|
|
|
4019
4019
|
Param["ShowLiveboardTitle"] = "showLiveboardTitle";
|
|
4020
4020
|
Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
|
|
4021
4021
|
Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
|
|
4022
|
+
Param["EnableNewChartLibrary"] = "muzeChartPhase1EnabledGA";
|
|
4022
4023
|
Param["HiddenTabs"] = "hideTabs";
|
|
4023
4024
|
Param["VisibleTabs"] = "visibleTabs";
|
|
4024
4025
|
Param["HideTabPanel"] = "hideTabPanel";
|
|
@@ -4099,10 +4100,14 @@
|
|
|
4099
4100
|
/**
|
|
4100
4101
|
* ThoughtSpot application pages include actions and menu commands
|
|
4101
4102
|
* for various user-initiated operations. These actions are represented
|
|
4102
|
-
* as enumeration members in the SDK. To
|
|
4103
|
-
*
|
|
4104
|
-
*
|
|
4105
|
-
*
|
|
4103
|
+
* as enumeration members in the SDK. To control actions in the embedded view:
|
|
4104
|
+
* - disabledActions — the action is grayed out and still visible, but non-interactive (user can see but not click).
|
|
4105
|
+
* - hiddenActions — the action is completely removed from the UI (user cannot see it at all).
|
|
4106
|
+
* - visibleActions — allowlist, only these actions are shown; all others are hidden.
|
|
4107
|
+
*
|
|
4108
|
+
* Use disabledActions to disable (gray out) an action.
|
|
4109
|
+
* Use hiddenActions to hide (fully remove) an action.
|
|
4110
|
+
* Use visibleActions to show only specific actions.
|
|
4106
4111
|
* @example
|
|
4107
4112
|
* ```js
|
|
4108
4113
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -4952,6 +4957,26 @@
|
|
|
4952
4957
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw
|
|
4953
4958
|
*/
|
|
4954
4959
|
Action["AxisMenuRemove"] = "axisMenuRemove";
|
|
4960
|
+
/**
|
|
4961
|
+
* The **Compare with** action in the chart axis customization menu.
|
|
4962
|
+
* Allows comparing data across dimensions or measures.
|
|
4963
|
+
* @example
|
|
4964
|
+
* ```js
|
|
4965
|
+
* disabledActions: [Action.AxisMenuCompare]
|
|
4966
|
+
* ```
|
|
4967
|
+
* @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
|
|
4968
|
+
*/
|
|
4969
|
+
Action["AxisMenuCompare"] = "axisMenuCompare";
|
|
4970
|
+
/**
|
|
4971
|
+
* The **Merge with** action in the chart axis customization menu.
|
|
4972
|
+
* Allows merging data across dimensions or measures.
|
|
4973
|
+
* @example
|
|
4974
|
+
* ```js
|
|
4975
|
+
* disabledActions: [Action.AxisMenuMerge]
|
|
4976
|
+
* ```
|
|
4977
|
+
* @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
|
|
4978
|
+
*/
|
|
4979
|
+
Action["AxisMenuMerge"] = "axisMenuMerge";
|
|
4955
4980
|
/**
|
|
4956
4981
|
* @hidden
|
|
4957
4982
|
*/
|
|
@@ -6067,7 +6092,126 @@
|
|
|
6067
6092
|
* The apis that are use to get the data for the liveboard
|
|
6068
6093
|
*/
|
|
6069
6094
|
InterceptedApiType["LiveboardData"] = "LiveboardData";
|
|
6070
|
-
})(exports.InterceptedApiType || (exports.InterceptedApiType = {}));
|
|
6095
|
+
})(exports.InterceptedApiType || (exports.InterceptedApiType = {}));
|
|
6096
|
+
/**
|
|
6097
|
+
* Data label filter operators
|
|
6098
|
+
* @group Visual Overrides
|
|
6099
|
+
*/
|
|
6100
|
+
exports.DataLabelFilterOperator = void 0;
|
|
6101
|
+
(function (DataLabelFilterOperator) {
|
|
6102
|
+
/** Greater than */
|
|
6103
|
+
DataLabelFilterOperator["GreaterThan"] = "GREATER_THAN";
|
|
6104
|
+
/** Less than */
|
|
6105
|
+
DataLabelFilterOperator["LessThan"] = "LESS_THAN";
|
|
6106
|
+
/** Greater than or equal to */
|
|
6107
|
+
DataLabelFilterOperator["GreaterThanOrEqualTo"] = "GREATER_THAN_OR_EQUAL_TO";
|
|
6108
|
+
/** Less than or equal to */
|
|
6109
|
+
DataLabelFilterOperator["LessThanOrEqualTo"] = "LESS_THAN_OR_EQUAL_TO";
|
|
6110
|
+
/** Equal to */
|
|
6111
|
+
DataLabelFilterOperator["EqualTo"] = "EQUAL_TO";
|
|
6112
|
+
/** Not equal to */
|
|
6113
|
+
DataLabelFilterOperator["NotEqualTo"] = "NOT_EQUAL_TO";
|
|
6114
|
+
})(exports.DataLabelFilterOperator || (exports.DataLabelFilterOperator = {}));
|
|
6115
|
+
/**
|
|
6116
|
+
* Conditional formatting operators
|
|
6117
|
+
* @group Visual Overrides
|
|
6118
|
+
*/
|
|
6119
|
+
exports.ConditionalFormattingOperator = void 0;
|
|
6120
|
+
(function (ConditionalFormattingOperator) {
|
|
6121
|
+
/** Is equal to */
|
|
6122
|
+
ConditionalFormattingOperator["Is"] = "IS";
|
|
6123
|
+
/** Is not equal to */
|
|
6124
|
+
ConditionalFormattingOperator["IsNot"] = "IS_NOT";
|
|
6125
|
+
/** Contains */
|
|
6126
|
+
ConditionalFormattingOperator["Contains"] = "CONTAINS";
|
|
6127
|
+
/** Does not contain */
|
|
6128
|
+
ConditionalFormattingOperator["DoesNotContain"] = "DOES_NOT_CONTAIN";
|
|
6129
|
+
/** Starts with */
|
|
6130
|
+
ConditionalFormattingOperator["StartsWith"] = "STARTS_WITH";
|
|
6131
|
+
/** Ends with */
|
|
6132
|
+
ConditionalFormattingOperator["EndsWith"] = "ENDS_WITH";
|
|
6133
|
+
/** Greater than */
|
|
6134
|
+
ConditionalFormattingOperator["GreaterThan"] = "GREATER_THAN";
|
|
6135
|
+
/** Less than */
|
|
6136
|
+
ConditionalFormattingOperator["LessThan"] = "LESS_THAN";
|
|
6137
|
+
/** Greater than or equal to */
|
|
6138
|
+
ConditionalFormattingOperator["GreaterThanEqualTo"] = "GREATER_THAN_EQUAL_TO";
|
|
6139
|
+
/** Less than or equal to */
|
|
6140
|
+
ConditionalFormattingOperator["LessThanEqualTo"] = "LESS_THAN_EQUAL_TO";
|
|
6141
|
+
/** Equal to */
|
|
6142
|
+
ConditionalFormattingOperator["EqualTo"] = "EQUAL_TO";
|
|
6143
|
+
/** Not equal to */
|
|
6144
|
+
ConditionalFormattingOperator["NotEqualTo"] = "NOT_EQUAL_TO";
|
|
6145
|
+
/** Is between */
|
|
6146
|
+
ConditionalFormattingOperator["IsBetween"] = "IS_BETWEEN";
|
|
6147
|
+
/** Is null */
|
|
6148
|
+
ConditionalFormattingOperator["IsNull"] = "IS_NULL";
|
|
6149
|
+
/** Is not null */
|
|
6150
|
+
ConditionalFormattingOperator["IsNotNull"] = "IS_NOT_NULL";
|
|
6151
|
+
})(exports.ConditionalFormattingOperator || (exports.ConditionalFormattingOperator = {}));
|
|
6152
|
+
/**
|
|
6153
|
+
* Background format types for conditional formatting
|
|
6154
|
+
* @group Visual Overrides
|
|
6155
|
+
*/
|
|
6156
|
+
exports.BackgroundFormatType = void 0;
|
|
6157
|
+
(function (BackgroundFormatType) {
|
|
6158
|
+
/** Solid color background */
|
|
6159
|
+
BackgroundFormatType["Solid"] = "SOLID";
|
|
6160
|
+
/** Gradient background */
|
|
6161
|
+
BackgroundFormatType["Gradient"] = "GRADIENT";
|
|
6162
|
+
})(exports.BackgroundFormatType || (exports.BackgroundFormatType = {}));
|
|
6163
|
+
/**
|
|
6164
|
+
* Comparison types for conditional formatting
|
|
6165
|
+
* @group Visual Overrides
|
|
6166
|
+
*/
|
|
6167
|
+
exports.ConditionalFormattingComparisonType = void 0;
|
|
6168
|
+
(function (ConditionalFormattingComparisonType) {
|
|
6169
|
+
/** Value-based comparison */
|
|
6170
|
+
ConditionalFormattingComparisonType["ValueBased"] = "VALUE_BASED";
|
|
6171
|
+
/** Column-based comparison */
|
|
6172
|
+
ConditionalFormattingComparisonType["ColumnBased"] = "COLUMN_BASED";
|
|
6173
|
+
/** Parameter-based comparison */
|
|
6174
|
+
ConditionalFormattingComparisonType["ParameterBased"] = "PARAMETER_BASED";
|
|
6175
|
+
})(exports.ConditionalFormattingComparisonType || (exports.ConditionalFormattingComparisonType = {}));
|
|
6176
|
+
/**
|
|
6177
|
+
* Legend position options
|
|
6178
|
+
* @group Visual Overrides
|
|
6179
|
+
*/
|
|
6180
|
+
exports.LegendPosition = void 0;
|
|
6181
|
+
(function (LegendPosition) {
|
|
6182
|
+
/** Position legend at the top */
|
|
6183
|
+
LegendPosition["Top"] = "top";
|
|
6184
|
+
/** Position legend at the bottom */
|
|
6185
|
+
LegendPosition["Bottom"] = "bottom";
|
|
6186
|
+
/** Position legend on the left */
|
|
6187
|
+
LegendPosition["Left"] = "left";
|
|
6188
|
+
/** Position legend on the right */
|
|
6189
|
+
LegendPosition["Right"] = "right";
|
|
6190
|
+
})(exports.LegendPosition || (exports.LegendPosition = {}));
|
|
6191
|
+
/**
|
|
6192
|
+
* Table theme options
|
|
6193
|
+
* @group Visual Overrides
|
|
6194
|
+
*/
|
|
6195
|
+
exports.TableTheme = void 0;
|
|
6196
|
+
(function (TableTheme) {
|
|
6197
|
+
/** Outline theme */
|
|
6198
|
+
TableTheme["Outline"] = "OUTLINE";
|
|
6199
|
+
/** Row theme */
|
|
6200
|
+
TableTheme["Row"] = "ROW";
|
|
6201
|
+
/** Zebra theme */
|
|
6202
|
+
TableTheme["Zebra"] = "ZEBRA";
|
|
6203
|
+
})(exports.TableTheme || (exports.TableTheme = {}));
|
|
6204
|
+
/**
|
|
6205
|
+
* Table content density options
|
|
6206
|
+
* @group Visual Overrides
|
|
6207
|
+
*/
|
|
6208
|
+
exports.TableContentDensity = void 0;
|
|
6209
|
+
(function (TableContentDensity) {
|
|
6210
|
+
/** Regular density */
|
|
6211
|
+
TableContentDensity["Regular"] = "REGULAR";
|
|
6212
|
+
/** Compact density */
|
|
6213
|
+
TableContentDensity["Compact"] = "COMPACT";
|
|
6214
|
+
})(exports.TableContentDensity || (exports.TableContentDensity = {}));
|
|
6071
6215
|
|
|
6072
6216
|
const logFunctions = {
|
|
6073
6217
|
[exports.LogLevel.SILENT]: () => undefined,
|
|
@@ -9321,17 +9465,20 @@
|
|
|
9321
9465
|
*/
|
|
9322
9466
|
const tokenizedFetch = async (input, init) => {
|
|
9323
9467
|
const embedConfig = getEmbedConfig();
|
|
9468
|
+
const options = { ...init };
|
|
9469
|
+
let token;
|
|
9324
9470
|
if (embedConfig.authType !== exports.AuthType.TrustedAuthTokenCookieless) {
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
credentials: 'include'
|
|
9328
|
-
|
|
9329
|
-
});
|
|
9471
|
+
token = getCacheAuthToken();
|
|
9472
|
+
if (!token) {
|
|
9473
|
+
return fetch(input, { ...options, credentials: 'include' });
|
|
9474
|
+
}
|
|
9330
9475
|
}
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9476
|
+
else {
|
|
9477
|
+
token = await getAuthenticationToken(embedConfig);
|
|
9478
|
+
}
|
|
9479
|
+
const req = new Request(input, options);
|
|
9480
|
+
if (token) {
|
|
9481
|
+
req.headers.append('Authorization', `Bearer ${token}`);
|
|
9335
9482
|
}
|
|
9336
9483
|
return fetch(req);
|
|
9337
9484
|
};
|
|
@@ -17693,6 +17840,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17693
17840
|
default: mixpanel_cjs
|
|
17694
17841
|
}, [mixpanel_cjs]);
|
|
17695
17842
|
|
|
17843
|
+
var version="1.48.0";
|
|
17844
|
+
|
|
17696
17845
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
17697
17846
|
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
17698
17847
|
let mixpanelInstance;
|
|
@@ -17762,6 +17911,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17762
17911
|
clusterName: sessionInfo.clusterName,
|
|
17763
17912
|
releaseVersion: sessionInfo.releaseVersion,
|
|
17764
17913
|
hostAppUrl: ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '',
|
|
17914
|
+
sdkVersion: version,
|
|
17765
17915
|
});
|
|
17766
17916
|
isMixpanelInitialized = true;
|
|
17767
17917
|
emptyQueue();
|
|
@@ -18762,6 +18912,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18762
18912
|
samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
|
|
18763
18913
|
window.addEventListener('message', (e) => {
|
|
18764
18914
|
if (e.data.type === exports.EmbedEvent.SAMLComplete) {
|
|
18915
|
+
if (e.data.accessToken) {
|
|
18916
|
+
const decodedToken = decodeURIComponent(e.data.accessToken);
|
|
18917
|
+
storeAuthTokenInCache(decodedToken);
|
|
18918
|
+
}
|
|
18765
18919
|
samlCompletionResolved = true;
|
|
18766
18920
|
if (popupClosedCheck) {
|
|
18767
18921
|
clearInterval(popupClosedCheck);
|
|
@@ -18799,7 +18953,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
18799
18953
|
const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
|
|
18800
18954
|
if (embedConfig.inPopup) {
|
|
18801
18955
|
await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
|
|
18802
|
-
|
|
18956
|
+
const cachedToken = getCacheAuthToken();
|
|
18957
|
+
if (cachedToken) {
|
|
18958
|
+
loggedInStatus = true;
|
|
18959
|
+
}
|
|
18960
|
+
else {
|
|
18961
|
+
loggedInStatus = await isLoggedIn(thoughtSpotHost);
|
|
18962
|
+
}
|
|
18803
18963
|
return;
|
|
18804
18964
|
}
|
|
18805
18965
|
window.location.href = ssoURL;
|
|
@@ -19439,8 +19599,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19439
19599
|
return eventData;
|
|
19440
19600
|
}
|
|
19441
19601
|
|
|
19442
|
-
var version$1="1.47.2";var pkgInfo = {version:version$1};
|
|
19443
|
-
|
|
19444
19602
|
function isValidUpdateFiltersPayload(payload) {
|
|
19445
19603
|
if (!payload)
|
|
19446
19604
|
return false;
|
|
@@ -19851,7 +20009,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
19851
20009
|
* @summary Base classes
|
|
19852
20010
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
19853
20011
|
*/
|
|
19854
|
-
const { version } = pkgInfo;
|
|
19855
20012
|
/**
|
|
19856
20013
|
* Global prefix for all ThoughtSpot postHash Params.
|
|
19857
20014
|
*/
|
|
@@ -20278,7 +20435,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20278
20435
|
return authToken;
|
|
20279
20436
|
}
|
|
20280
20437
|
async getDefaultAppInitData() {
|
|
20281
|
-
var _a, _b;
|
|
20438
|
+
var _a, _b, _c;
|
|
20282
20439
|
const authToken = await this.getAuthTokenForCookielessInit();
|
|
20283
20440
|
const customActionsResult = getCustomActions([
|
|
20284
20441
|
...(this.viewConfig.customActions || []),
|
|
@@ -20310,7 +20467,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20310
20467
|
customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
|
|
20311
20468
|
hiddenListColumns: this.viewConfig.hiddenListColumns || [],
|
|
20312
20469
|
customActions: customActionsResult.actions,
|
|
20313
|
-
embedExpiryInAuthToken: this.viewConfig.refreshAuthTokenOnNearExpiry,
|
|
20470
|
+
embedExpiryInAuthToken: (_c = this.viewConfig.refreshAuthTokenOnNearExpiry) !== null && _c !== void 0 ? _c : true,
|
|
20314
20471
|
...getInterceptInitData(this.viewConfig),
|
|
20315
20472
|
...getHostEventsConfig(this.viewConfig),
|
|
20316
20473
|
};
|
|
@@ -20766,6 +20923,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20766
20923
|
setIFrameHeight(height) {
|
|
20767
20924
|
this.iFrame.style.height = getCssDimension(height);
|
|
20768
20925
|
}
|
|
20926
|
+
shouldSkipEvent(eventType, data) {
|
|
20927
|
+
var _a, _b, _c;
|
|
20928
|
+
const errorType = (_a = data === null || data === void 0 ? void 0 : data.errorType) !== null && _a !== void 0 ? _a : (_b = data === null || data === void 0 ? void 0 : data.data) === null || _b === void 0 ? void 0 : _b.code;
|
|
20929
|
+
if (eventType === exports.EmbedEvent.Error
|
|
20930
|
+
&& errorType === exports.EmbedErrorCodes.HOST_EVENT_VALIDATION
|
|
20931
|
+
&& (!getHostEventsConfig(this.viewConfig).useHostEventsV2 || getHostEventsConfig(this.viewConfig).shouldBypassPayloadValidation)) {
|
|
20932
|
+
logger$3.warn(`Host Event Validation failed: ${(_c = data === null || data === void 0 ? void 0 : data.data) === null || _c === void 0 ? void 0 : _c.message}`);
|
|
20933
|
+
return true;
|
|
20934
|
+
}
|
|
20935
|
+
return false;
|
|
20936
|
+
}
|
|
20769
20937
|
/**
|
|
20770
20938
|
* Executes all registered event handlers for a particular event type
|
|
20771
20939
|
* @param eventType The event type
|
|
@@ -20773,6 +20941,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20773
20941
|
* @param eventPort The event Port for a specific MessageChannel
|
|
20774
20942
|
*/
|
|
20775
20943
|
executeCallbacks(eventType, data, eventPort) {
|
|
20944
|
+
if (this.shouldSkipEvent(eventType, data))
|
|
20945
|
+
return;
|
|
20776
20946
|
const eventHandlers = this.eventHandlerMap.get(eventType) || [];
|
|
20777
20947
|
const allHandlers = this.eventHandlerMap.get(exports.EmbedEvent.ALL) || [];
|
|
20778
20948
|
const callbacks = [...eventHandlers, ...allHandlers];
|
|
@@ -21447,14 +21617,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21447
21617
|
? params.spotterSidebarConfigValue
|
|
21448
21618
|
: params.standaloneValue);
|
|
21449
21619
|
function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleError) {
|
|
21450
|
-
const { spotterSidebarConfig, enablePastConversationsSidebar } = viewConfig;
|
|
21620
|
+
const { spotterSidebarConfig, enablePastConversationsSidebar, visualOverrides } = viewConfig;
|
|
21451
21621
|
const resolvedEnablePastConversations = resolveEnablePastConversationsSidebar({
|
|
21452
21622
|
spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
|
|
21453
21623
|
standaloneValue: enablePastConversationsSidebar,
|
|
21454
21624
|
});
|
|
21455
21625
|
const hasConfig = spotterSidebarConfig || resolvedEnablePastConversations !== undefined;
|
|
21456
|
-
if (!hasConfig)
|
|
21457
|
-
|
|
21626
|
+
if (!hasConfig) {
|
|
21627
|
+
if (visualOverrides === undefined) {
|
|
21628
|
+
return defaultAppInitData;
|
|
21629
|
+
}
|
|
21630
|
+
return {
|
|
21631
|
+
...defaultAppInitData,
|
|
21632
|
+
embedParams: { visualOverridesParams: visualOverrides },
|
|
21633
|
+
};
|
|
21634
|
+
}
|
|
21458
21635
|
const resolvedSidebarConfig = {
|
|
21459
21636
|
...spotterSidebarConfig,
|
|
21460
21637
|
...(resolvedEnablePastConversations !== undefined && {
|
|
@@ -21478,6 +21655,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21478
21655
|
embedParams: {
|
|
21479
21656
|
...(defaultAppInitData.embedParams || {}),
|
|
21480
21657
|
spotterSidebarConfig: resolvedSidebarConfig,
|
|
21658
|
+
...(visualOverrides !== undefined ? { visualOverridesParams: visualOverrides } : {}),
|
|
21481
21659
|
},
|
|
21482
21660
|
};
|
|
21483
21661
|
}
|
|
@@ -21688,7 +21866,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21688
21866
|
* embedded Liveboard or visualization.
|
|
21689
21867
|
*/
|
|
21690
21868
|
getEmbedParams() {
|
|
21691
|
-
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
|
|
21869
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled = false, enableLiveboardDataCache, } = this.viewConfig;
|
|
21692
21870
|
let params = {};
|
|
21693
21871
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
21694
21872
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -21699,6 +21877,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21699
21877
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
21700
21878
|
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
21701
21879
|
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
21880
|
+
if (newChartsLibrary !== undefined) {
|
|
21881
|
+
params[Param.EnableNewChartLibrary] = newChartsLibrary;
|
|
21882
|
+
}
|
|
21702
21883
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
21703
21884
|
params[Param.IsFullAppEmbed] = true;
|
|
21704
21885
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
@@ -22156,7 +22337,7 @@ query GetEurekaVizSnapshots(
|
|
|
22156
22337
|
getEmbedParamsObject() {
|
|
22157
22338
|
let params = {};
|
|
22158
22339
|
params = this.getBaseQueryParams(params);
|
|
22159
|
-
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
|
|
22340
|
+
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, newChartsLibrary, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled = false, enableLiveboardDataCache, } = this.viewConfig;
|
|
22160
22341
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
22161
22342
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
22162
22343
|
if (fullHeight === true) {
|
|
@@ -22254,6 +22435,9 @@ query GetEurekaVizSnapshots(
|
|
|
22254
22435
|
if (enableLiveboardDataCache !== undefined) {
|
|
22255
22436
|
params[Param.EnableLiveboardDataCache] = enableLiveboardDataCache;
|
|
22256
22437
|
}
|
|
22438
|
+
if (newChartsLibrary !== undefined) {
|
|
22439
|
+
params[Param.EnableNewChartLibrary] = newChartsLibrary;
|
|
22440
|
+
}
|
|
22257
22441
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
22258
22442
|
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
22259
22443
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
@@ -22541,11 +22725,21 @@ query GetEurekaVizSnapshots(
|
|
|
22541
22725
|
}
|
|
22542
22726
|
async getAppInitData() {
|
|
22543
22727
|
const defaultAppInitData = await super.getAppInitData();
|
|
22544
|
-
|
|
22728
|
+
const result = {
|
|
22729
|
+
...defaultAppInitData,
|
|
22730
|
+
...this.getSearchInitData(),
|
|
22731
|
+
};
|
|
22732
|
+
if (this.viewConfig.visualOverrides) {
|
|
22733
|
+
result.embedParams = {
|
|
22734
|
+
...(defaultAppInitData.embedParams || {}),
|
|
22735
|
+
visualOverridesParams: this.viewConfig.visualOverrides,
|
|
22736
|
+
};
|
|
22737
|
+
}
|
|
22738
|
+
return result;
|
|
22545
22739
|
}
|
|
22546
22740
|
getEmbedParamsObject() {
|
|
22547
22741
|
var _a;
|
|
22548
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
|
|
22742
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, newChartsLibrary, } = this.viewConfig;
|
|
22549
22743
|
const queryParams = this.getBaseQueryParams();
|
|
22550
22744
|
queryParams[Param.HideActions] = [
|
|
22551
22745
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -22583,6 +22777,9 @@ query GetEurekaVizSnapshots(
|
|
|
22583
22777
|
if (isThisPeriodInDateFiltersEnabled !== undefined) {
|
|
22584
22778
|
queryParams[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
|
|
22585
22779
|
}
|
|
22780
|
+
if (newChartsLibrary !== undefined) {
|
|
22781
|
+
queryParams[Param.EnableNewChartLibrary] = newChartsLibrary;
|
|
22782
|
+
}
|
|
22586
22783
|
queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
22587
22784
|
queryParams[Param.DataSourceMode] = this.getDataSourceMode();
|
|
22588
22785
|
queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
|