@salesforcedevs/dx-components 1.2.18-canary.0 → 1.2.18-lightdom

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.
Files changed (60) hide show
  1. package/lwc.config.json +0 -2
  2. package/package.json +3 -11
  3. package/src/modules/dx/banner/banner.css +1 -33
  4. package/src/modules/dx/banner/banner.html +5 -2
  5. package/src/modules/dx/banner/banner.scoped.css +28 -0
  6. package/src/modules/dx/banner/banner.ts +3 -1
  7. package/src/modules/dx/brandThemeProvider/brandThemeProvider.html +2 -1
  8. package/src/modules/dx/brandThemeProvider/brandThemeProvider.ts +9 -6
  9. package/src/modules/dx/button/button.css +14 -1
  10. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.html +1 -1
  11. package/src/modules/dx/cardPodcastEpisode/{cardPodcastEpisode.css → cardPodcastEpisode.scoped.css} +0 -4
  12. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.ts +2 -0
  13. package/src/modules/dx/cardTitle/cardTitle.css +2 -24
  14. package/src/modules/dx/cardTitle/cardTitle.html +4 -4
  15. package/src/modules/dx/cardTitle/cardTitle.scoped.css +25 -0
  16. package/src/modules/dx/cardTitle/cardTitle.ts +1 -0
  17. package/src/modules/dx/dropdown/dropdown.css +8 -1
  18. package/src/modules/dx/dropdown/dropdown.html +4 -2
  19. package/src/modules/dx/dropdown/dropdown.ts +4 -2
  20. package/src/modules/dx/header/header.css +7 -95
  21. package/src/modules/dx/header/header.html +1 -4
  22. package/src/modules/dx/header/header.scoped.css +92 -0
  23. package/src/modules/dx/header/header.ts +2 -4
  24. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +2 -147
  25. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.html +6 -5
  26. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.scoped.css +142 -0
  27. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +5 -3
  28. package/src/modules/dx/headerNav/headerNav.html +2 -2
  29. package/src/modules/dx/headerNav/{headerNav.css → headerNav.scoped.css} +1 -3
  30. package/src/modules/dx/headerNav/headerNav.ts +2 -0
  31. package/src/modules/dx/headerSearch/headerSearch.css +2 -61
  32. package/src/modules/dx/headerSearch/headerSearch.html +3 -3
  33. package/src/modules/dx/headerSearch/headerSearch.scoped.css +56 -0
  34. package/src/modules/dx/headerSearch/headerSearch.ts +2 -0
  35. package/src/modules/dx/icon/icon.css +1 -4
  36. package/src/modules/dx/icon/icon.html +1 -1
  37. package/src/modules/dx/icon/icon.ts +2 -0
  38. package/src/modules/dx/logo/logo.html +1 -1
  39. package/src/modules/dx/logo/{logo.css → logo.scoped.css} +0 -3
  40. package/src/modules/dx/logo/logo.ts +3 -1
  41. package/src/modules/dx/popover/popover.css +0 -19
  42. package/src/modules/dx/popover/popover.html +0 -1
  43. package/src/modules/dx/popover/popover.ts +30 -76
  44. package/src/modules/dx/relativeDateTime/relativeDateTime.html +1 -1
  45. package/src/modules/dx/relativeDateTime/relativeDateTime.scoped.css +3 -0
  46. package/src/modules/dx/relativeDateTime/relativeDateTime.ts +1 -0
  47. package/src/modules/dx/skipNavLink/skipNavLink.html +1 -1
  48. package/src/modules/dx/skipNavLink/{skipNavLink.css → skipNavLink.scoped.css} +0 -2
  49. package/src/modules/dx/skipNavLink/skipNavLink.ts +4 -1
  50. package/src/modules/dx/tooltip/microtip.css +101 -105
  51. package/src/modules/dxHelpers/card/card.css +11 -1
  52. package/src/modules/dxHelpers/commonHeader/commonHeader.css +2 -4
  53. package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +2 -2
  54. package/src/modules/dxHelpers/reset/reset.css +0 -1
  55. package/src/assets/svg/login-widget-bg.png +0 -0
  56. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.css +0 -33
  57. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.html +0 -31
  58. package/src/modules/dx/tbidAvatarButton/tbidAvatarButton.ts +0 -438
  59. package/src/modules/dxUtils/async/async.ts +0 -41
  60. package/yarn-error.log +0 -18466
@@ -1,31 +0,0 @@
1
- <template>
2
- <div if:true={isLoggedIn}>
3
- <dx-popover offset="small" width="320px" open-on-hover show-arrow>
4
- <div slot="control" class="avatar-small-container login-control">
5
- <button class="avatar-control">
6
- <img src={userInfo.avatarImgSrc} class="avatar avatar-small" />
7
- </button>
8
- </div>
9
- <div slot="content">
10
- <slot name="popover-content"></slot>
11
- </div>
12
- </dx-popover>
13
- </div>
14
- <div if:false={isLoggedIn}>
15
- <dx-popover offset="small" width="320px" open-on-hover show-arrow>
16
- <dx-button
17
- slot="control"
18
- class="login-control"
19
- icon-symbol="user"
20
- icon-position="left"
21
- loading={isLoading}
22
- variant="custom"
23
- >
24
- Login
25
- </dx-button>
26
- <div slot="content">
27
- <slot name="popover-content"></slot>
28
- </div>
29
- </dx-popover>
30
- </div>
31
- </template>
@@ -1,438 +0,0 @@
1
- import { api, LightningElement } from "lwc";
2
- import Cookies from "js-cookie";
3
- import defaults from "lodash.defaults";
4
- import { pollUntil } from "dxUtils/async";
5
-
6
- declare global {
7
- interface Window {
8
- SFIDWidget?: {
9
- isAlive({ callback }: { callback: (...args: any[]) => any }): void;
10
- logout(): void;
11
- login(): void;
12
- openid_response: any;
13
- disabled: boolean;
14
- };
15
- }
16
- }
17
-
18
- interface UserInfo {
19
- avatarImgSrc?: string;
20
- company?: string;
21
- firstName?: string;
22
- id?: string;
23
- lastName?: string;
24
- orgId?: string;
25
- relationship?: string;
26
- role?: string;
27
- username?: string;
28
- fullName?: string;
29
- }
30
-
31
- interface EventSourceEvent extends Event {
32
- id: string;
33
- retry?: number;
34
- data: string;
35
- event?: string;
36
- }
37
-
38
- const enum PlatformEventsType {
39
- UserDataChange = "UserDataChange",
40
- UserPhotoChange = "UserPhotoChange",
41
- UserMerge = "UserMerge"
42
- }
43
-
44
- // This component handles the core Salesforce OAuth 2.0 flow used by TBID for login, rendering a
45
- // simple Login button or avatar icon depending on login status. It should be reusable in any case
46
- // where TBID login is needed.
47
- export default class TbidAvatarButton extends LightningElement {
48
- @api tbidBaseUrl = "";
49
- @api tbidApiBaseUrl = "";
50
-
51
- @api login = (event: Event) => this.handleComponentLogin(event);
52
- @api logout = () => this.handleComponentLogout();
53
-
54
- private userInfo: UserInfo = {};
55
- private isLoading = false;
56
- private eventSource?: EventSource;
57
- private _isRequestingUserInfo = false;
58
- private _didReceiveUserInfo = false;
59
-
60
- // _didReceiveUserInfo is a proxy for "isLoggedIn" because we only want to show the UI corresponding
61
- // to logged-in state when user info has been received (avoids flashes of weird content)
62
- private get isLoggedIn() {
63
- return this._didReceiveUserInfo;
64
- }
65
- private get tbidIframeUrl() {
66
- return `${this.tbidBaseUrl}/secur/logout.jsp`;
67
- }
68
- private get tbidApiLogoutUrl() {
69
- return `${this.tbidApiBaseUrl}/logout`;
70
- }
71
- private get tbidApiUserInfoUrl() {
72
- return `${this.tbidApiBaseUrl}/userinfo`;
73
- }
74
- private get tbidApiTokenUrl() {
75
- return `${this.tbidApiBaseUrl}/token`;
76
- }
77
- private get tbidApiPlatformEventsUrl() {
78
- return `${this.tbidApiBaseUrl}/platform-events`;
79
- }
80
-
81
- async connectedCallback() {
82
- // Backend API for TBID login sets this state cookie if successful login occurs.
83
- const isLoginSuccessRedirect =
84
- Cookies.get("tbidLoginSuccess") === "true";
85
-
86
- // The SFIDWidget enables seamless SSO in Chrome, so we will defer to it for login in cases where it is present and enabled.
87
- const isWidgetDisabled = window.SFIDWidget?.disabled;
88
- const isWidgetLoggedIn = window.SFIDWidget?.openid_response;
89
- const isWidgetMaybeLoading =
90
- !isWidgetDisabled &&
91
- !isWidgetLoggedIn &&
92
- Boolean(
93
- // eslint-disable-next-line @lwc/lwc/no-document-query
94
- document.querySelector(
95
- 'script[src*="authProviderEmbeddedLogin"]'
96
- )
97
- );
98
-
99
- window.addEventListener("tbid-login", this.handleSsoLogin);
100
- window.addEventListener("tbid-logout", this.handleSsoLogout);
101
-
102
- this.isLoading = true;
103
-
104
- if (!isLoginSuccessRedirect) {
105
- // Not a login redirect, no further work to do right now except try to request userInfo (in case a session already exists)
106
- await this.requestUserInfo();
107
-
108
- if (
109
- !this._didReceiveUserInfo &&
110
- isWidgetMaybeLoading &&
111
- !window.SFIDWidget?.openid_response &&
112
- window.SFIDWidget?.isAlive
113
- ) {
114
- // The initial userinfo request failed, but SFIDWidget was maybe loading, and it
115
- // still hasn't completed login, so we want to check whether it's alive and wait
116
- // (up to a maximum of 1 second) for it to possibly finish logging in before we
117
- // turn off the "loading" indicator (this prevents odd flashes of content).
118
- await this.waitForSFIDWidget();
119
- }
120
-
121
- this.isLoading = false;
122
- } else {
123
- // We got here from a login success redirect
124
- Cookies.remove("tbidLoginSuccess"); // first, cleanup
125
-
126
- if (isWidgetMaybeLoading) {
127
- // This is a successful login and we have an SFIDWidget present, so it *should*
128
- // handle finishing up login itself. But it has a maximum of 1 second to do so.
129
- const didWidgetLoad = await this.waitForSFIDWidget();
130
- if (!didWidgetLoad) {
131
- // SFIDWidget not responding in time; complete login ourselves.
132
- await this.requestUserInfo();
133
- this.dispatchLoginSuccess();
134
- }
135
- } else {
136
- // No SFIDWidget loading, proceed immediately to completing normal initialization.
137
- await this.requestUserInfo();
138
- this.dispatchLoginSuccess();
139
- }
140
-
141
- this.isLoading = false;
142
- }
143
- }
144
-
145
- disconnectedCallback() {
146
- window.removeEventListener("tbid-login", this.handleSsoLogin);
147
- window.removeEventListener("tbid-logout", this.handleSsoLogout);
148
- this.teardownEventSource();
149
- }
150
-
151
- // The SFIDWidget requires third party cookies to function. In browsers with third party
152
- // cookies disabled, the widget will load but never log in, resulting in delayed UI updates
153
- // in some cases. To mitigate this, this method calls the widget's "isAlive" method, which
154
- // should respond very quickly if third party cookies are enabled. If it does respond quickly,
155
- // then this method waits a maximum of 1 second for the widget to finish logging in. If it does
156
- // *not* respond quickly, the method resolves early so that we can stop waiting pointlessly.
157
- private waitForSFIDWidget = async () => {
158
- const widgetNotAlivePromise = new Promise<boolean>((resolve) => {
159
- const timeoutId = setTimeout(() => resolve(false), 100);
160
- window.SFIDWidget?.isAlive({
161
- // If the widget responds as expected, this promise will fail to resolve and thus
162
- // we will continue to wait on the other promise, below.
163
- callback: () => clearTimeout(timeoutId)
164
- });
165
- });
166
- const widgetLoggedInPromise = pollUntil(
167
- () => Boolean(window.SFIDWidget?.openid_response),
168
- 100,
169
- 1000
170
- );
171
- const success = await Promise.race([widgetNotAlivePromise, widgetLoggedInPromise]);
172
- return success;
173
- };
174
-
175
- private setupEventSource = () => {
176
- // subscribe to platform events
177
- this.eventSource = new EventSource(this.tbidApiPlatformEventsUrl);
178
- this.eventSource.addEventListener(
179
- PlatformEventsType.UserDataChange,
180
- // eslint-disable-next-line no-undef
181
- this.handleUserDataChange as EventListener
182
- );
183
- this.eventSource.addEventListener(
184
- PlatformEventsType.UserMerge,
185
- this.handleSsoLogout
186
- );
187
- };
188
-
189
- private teardownEventSource = () => {
190
- if (!this.eventSource) {
191
- return;
192
- }
193
-
194
- this.eventSource.removeEventListener(
195
- PlatformEventsType.UserDataChange,
196
- // eslint-disable-next-line no-undef
197
- this.handleUserDataChange as EventListener
198
- );
199
- this.eventSource.removeEventListener(
200
- PlatformEventsType.UserMerge,
201
- this.handleSsoLogout
202
- );
203
- this.eventSource.close();
204
- this.eventSource = undefined;
205
- };
206
-
207
- private handleLogout = (isSsoLogout: boolean) => {
208
- // Reset state
209
- this._didReceiveUserInfo = false;
210
- this.isLoading = false;
211
- this.updateUserInfo({}); // clear old info
212
- this.teardownEventSource();
213
- this.dispatchLogoutSuccess();
214
-
215
- if (!isSsoLogout && window.SFIDWidget?.openid_response) {
216
- // If the SFIDWidget is around and has an access token, and if logout was not *already*
217
- // triggered by SSO logout, defer to the SFIDWidget. This will ensure that the SSO
218
- // session is logged out as well.
219
- window.SFIDWidget.logout();
220
- } else {
221
- // Always clear the session token; if not SSO logout, this will also revoke the token with
222
- // TBID; if SSO logout, that step is already taken care of. No need to await this.
223
- fetch(`${this.tbidApiLogoutUrl}?isSsoLogout=${isSsoLogout}`, {
224
- method: "DELETE",
225
- credentials: "same-origin"
226
- });
227
-
228
- if (!isSsoLogout) {
229
- // Dropping an iframe is required to fully get TBID to destroy the session; this is
230
- // a TBID issue and they have requested that we do this for now.
231
- const ifr = document.createElement("iframe");
232
- ifr.setAttribute("src", this.tbidIframeUrl);
233
- document.body.appendChild(ifr);
234
- }
235
- }
236
- };
237
-
238
- // This will only be called for "seamless SSO" login by the embedded login widget (SFIDWidget) on the website, if it exists.
239
- private handleSsoLogout = this.handleLogout.bind(this, true);
240
-
241
- // This handles logout from _within_ this component ("Logout" click), rather than from SSO via the SFIDWidget.
242
- private handleComponentLogout = () => {
243
- this.handleLogout(false);
244
- };
245
-
246
- // This will only be called for "seamless SSO" login by the embedded login widget (SFIDWidget) on the website, if it exists.
247
- private handleSsoLogin = async (event: Event) => {
248
- const { userInfo } = (event as CustomEvent).detail;
249
- const token = userInfo?.access_token;
250
-
251
- // `token` should always be defined if an SSO login occurs, but we'll be extra safe.
252
- if (!token) {
253
- return;
254
- }
255
-
256
- // If an SSO login occurred and we have an SSO access token, we want to start using
257
- // it rather than some other non-linked access token, for the "seamless SSO"
258
- // experience. The `token` endpoint will invalidate any other existing token.
259
- try {
260
- const tokenResponse = await fetch(this.tbidApiTokenUrl, {
261
- method: "POST",
262
- headers: {
263
- "Content-Type": "application/json"
264
- },
265
- body: JSON.stringify({
266
- token
267
- })
268
- });
269
-
270
- if (tokenResponse.ok) {
271
- // With a new token, we want to re-establish the eventSource connection and treat as new login.
272
- this.teardownEventSource();
273
- this.setupEventSource();
274
- // TODO: It sucks that we have to re-request user info here, since it should come with the token
275
- // on SSO login. For some reason, the user info on SSO login lacks the user's photo URLs, so we
276
- // have to re-request it. Maybe something to bring up with the TBID team.
277
- await this.requestUserInfo();
278
- this.dispatchLoginSuccess();
279
- } else if (
280
- tokenResponse.status === 409 &&
281
- !this._didReceiveUserInfo
282
- ) {
283
- // Valid token received, but we still need to grab userInfo. This could happen in certain edge cases
284
- // involving "seamless SSO" (e.g., you might be sitting on our page in more than one tab, then log in
285
- // on one of them; in that case, our back-end will receive the token from one tab, end up _rejecting_ it
286
- // as a duplicate on other tabs where the login event occurs, and yet still need to request user info
287
- // on those other tabs).
288
- await this.requestUserInfo();
289
- }
290
- } catch (ex) {
291
- console.error(`Attempt to update token failed: ${ex}`);
292
- }
293
- };
294
-
295
- // This handles logout from _within_ this component ("Trailblazer.me" click), rather than from SSO via the SFIDWidget.
296
- private handleComponentLogin = (event: Event) => {
297
- if (window.SFIDWidget) {
298
- // If the SFIDWidget is around, defer to it for login. This will ensure that the SSO
299
- // session is used if possible.
300
- event.preventDefault(); // don't navigate; the widget will handle that instead.
301
- window.SFIDWidget.login();
302
- }
303
- };
304
-
305
- private handleUserDataChange = ({ data }: EventSourceEvent) => {
306
- let parsedEventData: any;
307
-
308
- try {
309
- parsedEventData = JSON.parse(data);
310
- } catch (ex) {
311
- console.error(
312
- `Unparseable ${PlatformEventsType.UserDataChange} data received`
313
- );
314
- return;
315
- }
316
-
317
- this.updateUserInfo(parsedEventData);
318
- this.dispatchUserInfo();
319
- };
320
-
321
- // This is the only method that should manipulate this.userInfo.
322
- private updateUserInfo = (userInfo: any) => {
323
- if (!userInfo) {
324
- return;
325
- }
326
-
327
- if (Object.keys(userInfo).length === 0) {
328
- // This is a "clear" call.
329
- this.userInfo = {};
330
- return;
331
- }
332
-
333
- const uncleanNextUserInfo: UserInfo = {};
334
- uncleanNextUserInfo.avatarImgSrc = userInfo.photos?.thumbnail;
335
- uncleanNextUserInfo.firstName = userInfo.given_name;
336
- uncleanNextUserInfo.lastName = userInfo.family_name;
337
- uncleanNextUserInfo.username = userInfo.preferred_username;
338
- uncleanNextUserInfo.id = userInfo.user_id;
339
- uncleanNextUserInfo.orgId = userInfo.organization_id;
340
- uncleanNextUserInfo.fullName =
341
- uncleanNextUserInfo.firstName && uncleanNextUserInfo.lastName
342
- ? `${uncleanNextUserInfo.firstName} ${uncleanNextUserInfo.lastName}`
343
- : uncleanNextUserInfo.firstName ||
344
- uncleanNextUserInfo.lastName ||
345
- "";
346
-
347
- if (userInfo.custom_attributes) {
348
- // ProfilePictureUrl updates earlier than photos.thumbnail, so we prefer it if it's available here.
349
- uncleanNextUserInfo.avatarImgSrc =
350
- userInfo.custom_attributes.ProfilePictureUrl ||
351
- uncleanNextUserInfo.avatarImgSrc;
352
- uncleanNextUserInfo.company =
353
- userInfo.custom_attributes.CompanyName;
354
- uncleanNextUserInfo.relationship =
355
- userInfo.custom_attributes.RelationshipToSalesforce;
356
- uncleanNextUserInfo.role = userInfo.custom_attributes.Role;
357
- }
358
-
359
- const cleanUserInfo: UserInfo = {};
360
-
361
- Object.entries(uncleanNextUserInfo).forEach(([key, val]) => {
362
- // uncleanUserInfo may have undefined values which we don't want in the final product
363
- if (!val) {
364
- return;
365
- }
366
-
367
- let cleanVal = val;
368
-
369
- // Design requests that we not show the @trailblazer.me part of the username
370
- if (key === "username" && typeof val === "string") {
371
- const regExpMatch = val.match("(.*)@trailblazer.me$");
372
- if (regExpMatch && regExpMatch[1]) {
373
- cleanVal = regExpMatch[1];
374
- }
375
- }
376
-
377
- cleanUserInfo[key as keyof UserInfo] = cleanVal;
378
- });
379
-
380
- // Keep the old info for any values _not_ defined on `cleanUserInfo`
381
- this.userInfo = defaults(cleanUserInfo, this.userInfo);
382
- };
383
-
384
- private requestUserInfo = async () => {
385
- if (this._isRequestingUserInfo) {
386
- // prevent duplicate requests
387
- return;
388
- }
389
-
390
- this._isRequestingUserInfo = true;
391
-
392
- try {
393
- const userInfoRes = await fetch(this.tbidApiUserInfoUrl);
394
-
395
- if (userInfoRes.ok) {
396
- if (!this.eventSource) {
397
- this.setupEventSource();
398
- }
399
- const userInfo = await userInfoRes.json();
400
- this.updateUserInfo(userInfo);
401
- this._didReceiveUserInfo = true;
402
- this.dispatchUserInfo();
403
- }
404
- } catch (ex) {
405
- // Something not directly related to auth went wrong. Unsure what to do here.
406
- console.error(`Could not request user info: ${ex}`);
407
- }
408
-
409
- this._isRequestingUserInfo = false;
410
- };
411
-
412
- private dispatchUserInfo = () => {
413
- this.dispatchEvent(
414
- new CustomEvent("tbiduserinfo", {
415
- bubbles: true,
416
- detail: {
417
- userInfo: this.userInfo
418
- }
419
- })
420
- );
421
- };
422
-
423
- private dispatchLoginSuccess = () => {
424
- this.dispatchEvent(
425
- new CustomEvent("tbidloginsuccess", {
426
- bubbles: true
427
- })
428
- );
429
- };
430
-
431
- private dispatchLogoutSuccess = () => {
432
- this.dispatchEvent(
433
- new CustomEvent("tbidlogoutsuccess", {
434
- bubbles: true
435
- })
436
- );
437
- };
438
- }
@@ -1,41 +0,0 @@
1
- /**
2
- * Checks whether a condition is satisfied at a specified interval, stopping after a maximum amount
3
- * of time (if specified). Returns a Promise that resolves with `true` if the condition was
4
- * satisfied during polling (if a maximum time is specified, it can resolve with false if the
5
- * condition was not satisfied within the maximum time).
6
- *
7
- * Usage:
8
- * await pollUntil(() => something.is.true, 200, 1000);
9
- *
10
- * @param {Function} condition the "check" callback that will be called to determine whether the
11
- * condition has been satisfied (satisfied === callback returns truthy value)
12
- * @param {number} atIntervalMs value in milliseconds specifying how often to poll
13
- * @param {number} [forMaximumMs] value in milliseconds specifying the maximum time to poll
14
- * @returns {Promise}
15
- */
16
- export function pollUntil(condition: () => boolean, atIntervalMs: number, forMaximumMs?: number) {
17
- return new Promise<boolean>((resolve) => {
18
- let timeoutId: ReturnType<typeof setTimeout>;
19
- const intervalId = setInterval(() => {
20
- if (condition()) {
21
- resolveWithCleanup(true);
22
- }
23
- }, atIntervalMs);
24
- if (typeof forMaximumMs === "number") {
25
- timeoutId = setTimeout(() => {
26
- // One last check in case the condition was satisfied right before the end:
27
- resolveWithCleanup(condition() || false);
28
- }, forMaximumMs);
29
- }
30
- if (condition()) {
31
- // Condition already fulfilled before intervals, no need to keep waiting!
32
- resolveWithCleanup(true);
33
- }
34
-
35
- function resolveWithCleanup(success: boolean) {
36
- clearInterval(intervalId);
37
- clearTimeout(timeoutId);
38
- resolve(success);
39
- }
40
- });
41
- }