@@ -173,9 +173,9 @@ function backwardCompat(embedConfig: EmbedConfig): EmbedConfig {
173
173
}
174
174
175
175
type InitFlagStore = {
176
- initPromise : Promise < ReturnType < typeof init > > ;
177
- isInitCalled : boolean ;
178
- initPromiseResolve : ( value : ReturnType < typeof init > ) => void ;
176
+ initPromise : Promise < ReturnType < typeof init > > ;
177
+ isInitCalled : boolean ;
178
+ initPromiseResolve : ( value : ReturnType < typeof init > ) => void ;
179
179
}
180
180
const initFlagKey = 'initFlagKey' ;
181
181
@@ -201,7 +201,7 @@ createAndSetInitPromise();
201
201
202
202
export const getInitPromise = ( ) :
203
203
Promise <
204
- ReturnType < typeof init >
204
+ ReturnType < typeof init >
205
205
> => getValueFromWindow < InitFlagStore > ( initFlagKey ) ?. initPromise ;
206
206
207
207
export const getIsInitCalled = ( ) : boolean => ! ! getValueFromWindow ( initFlagKey ) ?. isInitCalled ;
@@ -228,8 +228,8 @@ export const getIsInitCalled = (): boolean => !!getValueFromWindow(initFlagKey)?
228
228
*/
229
229
export const init = ( embedConfig : EmbedConfig ) : AuthEventEmitter => {
230
230
sanity ( embedConfig ) ;
231
- resetAllCachedServices ( ) ;
232
- embedConfig = setEmbedConfig (
231
+ // resetAllCachedServices();
232
+ /* embedConfig = setEmbedConfig(
233
233
backwardCompat({
234
234
...CONFIG_DEFAULTS,
235
235
...embedConfig,
@@ -239,29 +239,29 @@ export const init = (embedConfig: EmbedConfig): AuthEventEmitter => {
239
239
240
240
setGlobalLogLevelOverride(embedConfig.logLevel);
241
241
registerReportingObserver();
242
-
242
+ */
243
243
const authEE = new EventEmitter < AuthStatus | AuthEvent > ( ) ;
244
244
setAuthEE ( authEE ) ;
245
245
handleAuth ( ) ;
246
246
247
247
const { password, ...configToTrack } = getEmbedConfig ( ) ;
248
- uploadMixpanelEvent ( MIXPANEL_EVENT . VISUAL_SDK_CALLED_INIT , {
248
+ /* uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
249
249
...configToTrack,
250
250
usedCustomizationSheet: embedConfig.customizations?.style?.customCSSUrl != null,
251
251
usedCustomizationVariables: embedConfig.customizations?.style?.customCSS?.variables != null,
252
252
usedCustomizationRules:
253
253
embedConfig.customizations?.style?.customCSS?.rules_UNSTABLE != null,
254
254
usedCustomizationStrings: !!embedConfig.customizations?.content?.strings,
255
255
usedCustomizationIconSprite: !!embedConfig.customizations?.iconSpriteUrl,
256
- } ) ;
256
+ }); */
257
257
258
258
if ( getEmbedConfig ( ) . callPrefetch ) {
259
259
prefetch ( getEmbedConfig ( ) . thoughtSpotHost ) ;
260
260
}
261
261
262
262
// Resolves the promise created in the initPromiseKey
263
- getValueFromWindow < InitFlagStore > ( initFlagKey ) . initPromiseResolve ( authEE ) ;
264
- getValueFromWindow < InitFlagStore > ( initFlagKey ) . isInitCalled = true ;
263
+ /* getValueFromWindow<InitFlagStore>(initFlagKey).initPromiseResolve(authEE);
264
+ getValueFromWindow<InitFlagStore>(initFlagKey).isInitCalled = true; */
265
265
266
266
return authEE as AuthEventEmitter ;
267
267
} ;
@@ -308,7 +308,7 @@ export const renderInQueue = (fn: (next?: (val?: any) => void) => Promise<any>):
308
308
return renderQueue ;
309
309
}
310
310
// Sending an empty function to keep it consistent with the above usage.
311
- return fn ( ( ) => { } ) ; // eslint-disable-line @typescript-eslint/no-empty-function
311
+ return fn ( ( ) => { } ) ; // eslint-disable-line @typescript-eslint/no-empty-function
312
312
} ;
313
313
314
314
/**
0 commit comments