@elliemae/ssf-host 2.23.7 → 2.23.8

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/cjs/host.js CHANGED
@@ -1185,29 +1185,525 @@ class SSFHost {
1185
1185
  this.#logger.debug("Dispatched config events to all guests");
1186
1186
  };
1187
1187
  /**
1188
- * unloads guest application from host
1189
- * @param guestIdOrWindowOrEle unique id of the guest application or window object or dom element of the guest application
1190
- * @throws Error if guestId or Window reference is invalid
1188
+ * Call guest cleanup function (e.g., appCleanup, unmount) before disposal
1189
+ * @param options
1190
+ * @param options.guestEmui
1191
+ * @param options.cleanupFunctionName
1192
+ * @param options.context
1191
1193
  */
1192
- unloadGuest = (guestIdOrWindowOrEle) => {
1194
+ #callGuestCleanupFunction = (options) => {
1195
+ const { guestEmui, cleanupFunctionName, context } = options;
1196
+ const emuiObj = guestEmui;
1197
+ const cleanupFn = emuiObj[cleanupFunctionName];
1198
+ if (typeof cleanupFn !== "function") {
1199
+ return;
1200
+ }
1201
+ try {
1202
+ cleanupFn();
1203
+ this.#logger.debug(
1204
+ `[SSF] Called ${context} window.emui.${cleanupFunctionName}()`
1205
+ );
1206
+ } catch (e) {
1207
+ this.#logger.warn(
1208
+ `[SSF] ${context} emui.${cleanupFunctionName}() threw error: ${e.message}`
1209
+ );
1210
+ } finally {
1211
+ emuiObj[cleanupFunctionName] = null;
1212
+ }
1213
+ };
1214
+ /**
1215
+ * Null all window.emui.app properties to break closure chains
1216
+ * @param {any} guestEmui - Guest window.emui object
1217
+ */
1218
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1219
+ #cleanupEmuiApp = (guestEmui) => {
1220
+ if (!guestEmui.app) return;
1221
+ if (typeof guestEmui.app !== "object") return;
1222
+ guestEmui.app.init = null;
1223
+ guestEmui.app.mount = null;
1224
+ guestEmui.app.unmount = null;
1225
+ guestEmui.app.getRef = null;
1226
+ guestEmui.app.navigate = null;
1227
+ guestEmui.app = null;
1228
+ };
1229
+ /**
1230
+ * Null all window.elli.script properties to break SSFGuest closures
1231
+ * @param {Window} guestWindow - Guest window reference
1232
+ */
1233
+ #cleanupElliScript = (guestWindow) => {
1234
+ try {
1235
+ const { elli } = guestWindow;
1236
+ if (!elli?.script) return;
1237
+ if (elli.script.guest) {
1238
+ elli.script.guest.create = null;
1239
+ elli.script.guest = null;
1240
+ }
1241
+ elli.script.connect = null;
1242
+ elli.script.getObject = null;
1243
+ elli.script.setLogLevel = null;
1244
+ elli.script.subscribe = null;
1245
+ elli.script.unsubscribe = null;
1246
+ elli.script = null;
1247
+ } catch (e) {
1248
+ }
1249
+ };
1250
+ /**
1251
+ * Clear Google Tag Manager data layer
1252
+ * @param {Window} guestWindow - Guest window reference
1253
+ * @param {string} context - Context string for logging
1254
+ */
1255
+ #clearGtmDataLayer = (guestWindow, context) => {
1256
+ try {
1257
+ if (guestWindow.gtmDataLayer) {
1258
+ guestWindow.gtmDataLayer = null;
1259
+ this.#logger.debug(`[SSF] Cleared ${context} gtmDataLayer`);
1260
+ }
1261
+ } catch (e) {
1262
+ this.#logger.debug(
1263
+ `[SSF] Failed to cleanup ${context} gtmDataLayer: ${e.message}`
1264
+ );
1265
+ }
1266
+ };
1267
+ /**
1268
+ * Cleanup guest window context - nulls all window.emui and window.elli.script properties
1269
+ * This breaks closure retention chains and allows GC of webpack bundles, SDKs, and singletons
1270
+ * @param {object} options - Cleanup options
1271
+ * @param {Window | null} options.guestWindow - Guest window reference
1272
+ * @param {string} options.guestId - Guest ID for logging
1273
+ * @param {string} options.cleanupFunctionName - Cleanup function name to call
1274
+ * @param {'iframe' | 'popup'} [options.windowType] - Window type (iframe or popup)
1275
+ */
1276
+ #cleanupGuestWindow = (options) => {
1277
+ const {
1278
+ guestWindow,
1279
+ guestId,
1280
+ cleanupFunctionName,
1281
+ windowType = "iframe"
1282
+ } = options;
1283
+ if (!guestWindow) {
1284
+ this.#logger.debug(
1285
+ `No ${windowType} window available for cleanup of guest ${guestId}`
1286
+ );
1287
+ return;
1288
+ }
1289
+ try {
1290
+ const guestEmui = guestWindow.emui;
1291
+ if (guestEmui) {
1292
+ this.#callGuestCleanupFunction({
1293
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
1294
+ guestEmui,
1295
+ cleanupFunctionName,
1296
+ context: `${windowType} for guest ${guestId}`
1297
+ });
1298
+ try {
1299
+ this.#cleanupEmuiApp(guestEmui);
1300
+ guestEmui.registerApp = null;
1301
+ guestEmui.logRocket = null;
1302
+ guestEmui.logRocketConfig = null;
1303
+ this.#logger.debug(
1304
+ `[SSF] Nulled all ${windowType} window.emui properties for guest ${guestId}`
1305
+ );
1306
+ } catch (e) {
1307
+ this.#logger.debug(
1308
+ `[SSF] Failed to cleanup ${windowType} window.emui: ${e.message}`
1309
+ );
1310
+ }
1311
+ }
1312
+ this.#cleanupElliScript(guestWindow);
1313
+ this.#logger.debug(
1314
+ `[SSF] Nulled all ${windowType} window.elli.script properties for guest ${guestId}`
1315
+ );
1316
+ this.#clearGtmDataLayer(
1317
+ guestWindow,
1318
+ `${windowType} for guest ${guestId}`
1319
+ );
1320
+ } catch (e) {
1321
+ this.#logger.debug(
1322
+ `[SSF] Could not access ${windowType} window for cleanup (guest ${guestId}): ${e.message}`
1323
+ );
1324
+ }
1325
+ };
1326
+ /**
1327
+ * Navigate window path and collect parent chain
1328
+ * @param {string[]} parts - Path parts to navigate
1329
+ * @param {string} path - Original path for error messages
1330
+ * @param {string} guestId - Guest ID for logging
1331
+ * @returns {{ parentChain: Array<{ obj: any; key: string }>, current: any } | null} Parent chain and current object, or null if path doesn't exist
1332
+ */
1333
+ #navigateWindowPath = (parts, path, guestId) => {
1334
+ const parentChain = [];
1335
+ let current = window;
1336
+ for (let i = 0; i < parts.length - 1; i += 1) {
1337
+ const part = parts[i];
1338
+ if (current[part] === void 0 || current[part] === null) {
1339
+ this.#logger.debug(
1340
+ `Path "${path}" does not exist (stopped at ${part}) for guest ${guestId}`
1341
+ );
1342
+ return null;
1343
+ }
1344
+ parentChain.push({ obj: current, key: part });
1345
+ current = current[part];
1346
+ }
1347
+ return { parentChain, current };
1348
+ };
1349
+ /**
1350
+ * Clear a single window reference path
1351
+ * @param {string} path - Dot-separated path to window property
1352
+ * @param {string} guestId - Guest ID for logging
1353
+ */
1354
+ #clearSinglePath = (path, guestId) => {
1355
+ try {
1356
+ const parts = path.split(".").filter((p) => p !== "window" && p.trim() !== "");
1357
+ if (parts.length === 0) {
1358
+ this.#logger.debug(
1359
+ `Invalid path "${path}" - skipping for guest ${guestId}`
1360
+ );
1361
+ return;
1362
+ }
1363
+ const result = this.#navigateWindowPath(parts, path, guestId);
1364
+ if (!result) return;
1365
+ const { parentChain, current } = result;
1366
+ const targetProp = parts[parts.length - 1];
1367
+ if (current[targetProp] === void 0) {
1368
+ this.#logger.debug(
1369
+ `Property "${targetProp}" not found in path "${path}" for guest ${guestId}`
1370
+ );
1371
+ return;
1372
+ }
1373
+ current[targetProp] = null;
1374
+ this.#logger.debug(
1375
+ `Cleared window reference: ${path} for guest ${guestId}`
1376
+ );
1377
+ this.#cleanupEmptyParents(parentChain, parts, guestId);
1378
+ } catch (e) {
1379
+ this.#logger.debug(
1380
+ `Failed to clear window reference "${path}" for guest ${guestId}: ${e.message}`
1381
+ );
1382
+ }
1383
+ };
1384
+ /**
1385
+ * Clean up empty parent objects after clearing a path
1386
+ * @param {Array<{ obj: any; key: string }>} parentChain - Chain of parent objects
1387
+ * @param {string[]} parts - Path parts for logging
1388
+ * @param {string} guestId - Guest ID for logging
1389
+ */
1390
+ #cleanupEmptyParents = (parentChain, parts, guestId) => {
1391
+ for (let i = parentChain.length - 1; i >= 0; i -= 1) {
1392
+ const { obj, key } = parentChain[i];
1393
+ const parent = obj[key];
1394
+ if (!this.#isEmptyOrNullObject(parent)) {
1395
+ break;
1396
+ }
1397
+ obj[key] = null;
1398
+ this.#logger.debug(
1399
+ `Cleaned up empty parent object at ${parts.slice(0, i + 1).join(".")} for guest ${guestId}`
1400
+ );
1401
+ }
1402
+ };
1403
+ /**
1404
+ * Recursively clear window references by path string
1405
+ * Handles nested paths like \"window.IMT.focusFormTitle\" or \"window.emui.app\"
1406
+ * Sets each reference to null and cleans up empty parent objects
1407
+ * @param paths - Array of dot-separated paths to window properties
1408
+ * @param guestId - Guest ID for logging purposes
1409
+ * @example
1410
+ * clearWindowRefs([\"window.IMT.focusFormTitle\"], \"my-guest-id\");
1411
+ */
1412
+ #clearWindowRefs = (paths, guestId) => {
1413
+ if (!paths || paths.length === 0) return;
1414
+ paths.forEach((path) => this.#clearSinglePath(path, guestId));
1415
+ };
1416
+ /**
1417
+ * Check if an object is empty or only contains null/undefined values
1418
+ * Used to determine if parent objects should be cleaned up after nulling child properties
1419
+ * @param obj - Object to check
1420
+ * @returns true if object has no properties or all properties are null/undefined
1421
+ */
1422
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1423
+ #isEmptyOrNullObject = (obj) => {
1424
+ const keys = Object.keys(obj);
1425
+ if (keys.length === 0) return true;
1426
+ return keys.every((key) => obj[key] === null || obj[key] === void 0);
1427
+ };
1428
+ /**
1429
+ * Unloads guest application from host with optional enhanced cleanup.
1430
+ *
1431
+ * **Basic Mode (no options):**
1432
+ * - Standard guest disposal
1433
+ * - Removes from tracking maps
1434
+ *
1435
+ * **Enhanced Mode (with options):**
1436
+ * - `purgeOnDestroy: true` - Uses comprehensive cleanup via `unloadGuestWithFullCleanup`
1437
+ * - Calls guest cleanup function (React unmount, Redux teardown)
1438
+ * - Closes contentWindow context
1439
+ * - Navigates iframe to about:blank
1440
+ * - Removes iframe from DOM (deferred)
1441
+ * - Clears all window.emui and window.elli.script references
1442
+ * - Disconnects FieldMutation observers
1443
+ * - Removes from SSF tracking
1444
+ *
1445
+ * - `windowRefsToClear` - Array of paths to window refs to clear recursively
1446
+ * - Example: ["window.IMT.focusFormTitle", "window.emui.customApp"]
1447
+ * - Each path is parsed and set to null
1448
+ *
1449
+ * - `appId` - Optional appId for targeted window.emui[appId] cleanup
1450
+ *
1451
+ * - `cleanupFunctionName` - Name of cleanup function on window.emui (default: 'unmount')
1452
+ * @param guestIdOrWindowOrEle - Unique id, window object, or iframe element
1453
+ * @param options - Optional cleanup configuration
1454
+ * @param options.purgeOnDestroy - When true, use comprehensive cleanup sequence
1455
+ * @param options.windowRefsToClear - Array of window ref paths to clear (e.g., ["window.IMT.focusFormTitle"])
1456
+ * @param options.appId - Optional appId for targeted cleanup
1457
+ * @param options.cleanupFunctionName - Guest cleanup function name (default: 'unmount')
1458
+ * @example
1459
+ * // Basic cleanup
1460
+ * host.unloadGuest('my-guest-id');
1461
+ * @example
1462
+ * // Enhanced cleanup with purge
1463
+ * host.unloadGuest('my-guest-id', {
1464
+ * purgeOnDestroy: true,
1465
+ * windowRefsToClear: ["window.IMT.focusFormTitle"],
1466
+ * cleanupFunctionName: 'appCleanup'
1467
+ * });
1468
+ * @example
1469
+ * // Enhanced cleanup with appId
1470
+ * host.unloadGuest('my-guest-id', {
1471
+ * purgeOnDestroy: true,
1472
+ * appId: 'workflowtasks',
1473
+ * cleanupFunctionName: 'cleanup'
1474
+ * });
1475
+ */
1476
+ unloadGuest = (guestIdOrWindowOrEle, options) => {
1193
1477
  const guest = this.#findGuest(guestIdOrWindowOrEle);
1194
- if (guest) {
1195
- guest.dispose();
1196
- this.#guestsByWindow.delete(guest.window);
1197
- this.#guestsByUrl.delete(guest.url);
1198
- this.#guests.delete(guest.id);
1478
+ if (!guest) {
1479
+ this.#logger.warn("Attempted to unload unknown guest");
1480
+ return;
1481
+ }
1482
+ const guestId = guest.id;
1483
+ if (options?.purgeOnDestroy) {
1484
+ const cleanupFunctionName = options.cleanupFunctionName || "unmount";
1485
+ if (options.windowRefsToClear && options.windowRefsToClear.length > 0) {
1486
+ this.#clearWindowRefs(options.windowRefsToClear, guestId);
1487
+ }
1488
+ this.unloadGuestWithFullCleanup(guestId, cleanupFunctionName);
1199
1489
  this.#logger.audit({
1200
- message: `Guest is removed from host`,
1490
+ message: `Guest unloaded with purge mode (windowRefs: ${options.windowRefsToClear?.length || 0})`,
1201
1491
  ...guest.getInfo()
1202
1492
  });
1203
- this.#stopMonitoringPopupGuests();
1493
+ return;
1494
+ }
1495
+ guest.dispose();
1496
+ this.#guestsByWindow.delete(guest.window);
1497
+ this.#guestsByUrl.delete(guest.url);
1498
+ this.#guests.delete(guest.id);
1499
+ this.#logger.audit({
1500
+ message: `Guest is removed from host`,
1501
+ ...guest.getInfo()
1502
+ });
1503
+ this.#stopMonitoringPopupGuests();
1504
+ };
1505
+ /**
1506
+ * Unloads guest application with comprehensive memory leak prevention.
1507
+ *
1508
+ * This method implements industry best practices for iframe and popup cleanup to prevent
1509
+ * memory leaks, particularly detached window retention and webpack bundle accumulation.
1510
+ *
1511
+ * **Enhanced Cleanup Sequence for Embedded Iframes:**
1512
+ * 1. Call guest cleanup function (React unmount, Redux teardown, etc.)
1513
+ * 2. Close contentWindow context explicitly
1514
+ * 3. Navigate iframe to about:blank (Chrome GC recommendation)
1515
+ * 4. Small delay, then remove iframe from DOM
1516
+ * 5. Remove from SSF tracking maps
1517
+ * 6. Null all internal references
1518
+ *
1519
+ * **Enhanced Cleanup Sequence for Popup Windows:**
1520
+ * 1. Call guest cleanup function (React unmount, Redux teardown, etc.)
1521
+ * 2. Null all window.emui and window.elli.script references
1522
+ * 3. Clear Google Tag Manager data layer
1523
+ * 4. Close popup window explicitly
1524
+ * 5. Dispose guest (cleanup event listeners)
1525
+ * 6. Remove from SSF tracking maps
1526
+ *
1527
+ * **Memory Leak Prevention:**
1528
+ * - Breaks all closures from contentWindow/popup to parent
1529
+ * - Signals V8 to GC webpack bundle backing store strings
1530
+ * - Removes iframe from browser back/forward cache
1531
+ * - Clears all SSF remoting message handlers
1532
+ * - Nulls all window.emui and window.elli.script properties
1533
+ *
1534
+ * **Important:** This method does NOT clean up window.emui[appId] registry.
1535
+ * When using selfInitialize=true pattern, the guest application handles
1536
+ * its own emui registry cleanup internally.
1537
+ *
1538
+ * **Synchronous Design:** This method is intentionally synchronous to work
1539
+ * with React useEffect cleanup functions. Cleanup steps use setTimeout
1540
+ * for deferred operations rather than async/await.
1541
+ * @param guestIdOrWindowOrEle - unique id of the guest application or window object or dom element
1542
+ * @param cleanupFunctionName - name of cleanup function on window.emui (default: 'unmount')
1543
+ * @example
1544
+ * // Standard usage with app cleanup
1545
+ * host.unloadGuestWithFullCleanup('my-guest-id', 'appCleanup');
1546
+ * @example
1547
+ * // Usage with custom cleanup function
1548
+ * host.unloadGuestWithFullCleanup('my-guest-id', 'customUnmount');
1549
+ * @example
1550
+ * // Usage when guest uses default unmount
1551
+ * host.unloadGuestWithFullCleanup('my-guest-id');
1552
+ */
1553
+ /**
1554
+ * Disconnect FieldMutation observer for an iframe body element
1555
+ * @param {Window | null} contentWindow - Guest iframe contentWindow
1556
+ * @param {string} guestId - Guest ID for logging
1557
+ */
1558
+ #disconnectFieldMutationObserver = (contentWindow, guestId) => {
1559
+ try {
1560
+ const bodyElement = contentWindow?.document?.body;
1561
+ if (!bodyElement) return;
1562
+ const { observerReferences } = window;
1563
+ if (!(observerReferences instanceof Map) || !observerReferences.has(bodyElement)) {
1564
+ return;
1565
+ }
1566
+ const observer = observerReferences.get(bodyElement);
1567
+ if (observer && typeof observer.disconnect === "function") {
1568
+ observer.disconnect();
1569
+ observerReferences.delete(bodyElement);
1570
+ this.#logger.debug(
1571
+ `[SSF] Disconnected FieldMutation observer for guest ${guestId}`
1572
+ );
1573
+ }
1574
+ } catch (e) {
1575
+ this.#logger.debug(
1576
+ `[SSF] Failed to disconnect FieldMutation observer for guest ${guestId}: ${e.message}`
1577
+ );
1578
+ }
1579
+ };
1580
+ /**
1581
+ * Cleanup and remove iframe from DOM
1582
+ * @param {HTMLIFrameElement} iframe - Iframe element to cleanup
1583
+ * @param {Window | null} contentWindow - Iframe contentWindow
1584
+ * @param {string} guestId - Guest ID for logging
1585
+ */
1586
+ #cleanupIframe = (iframe, contentWindow, guestId) => {
1587
+ try {
1588
+ if (contentWindow && !contentWindow.closed) {
1589
+ contentWindow.close();
1590
+ this.#logger.debug(
1591
+ `[SSF] Called contentWindow.close() for guest ${guestId}`
1592
+ );
1593
+ }
1594
+ } catch (e) {
1595
+ this.#logger.debug(
1596
+ `[SSF] contentWindow.close() failed for guest ${guestId}: ${e.message}`
1597
+ );
1598
+ }
1599
+ try {
1600
+ if (iframe.parentNode) {
1601
+ iframe.src = "about:blank";
1602
+ this.#logger.debug(
1603
+ `[SSF] Navigated to about:blank for guest ${guestId}`
1604
+ );
1605
+ }
1606
+ } catch (e) {
1607
+ this.#logger.debug(
1608
+ `[SSF] Failed to navigate iframe to about:blank for guest ${guestId}: ${e.message}`
1609
+ );
1610
+ }
1611
+ setTimeout(() => {
1612
+ try {
1613
+ if (iframe.parentNode) {
1614
+ iframe.remove();
1615
+ this.#logger.debug(
1616
+ `[SSF] Removed iframe from DOM for guest ${guestId}`
1617
+ );
1618
+ }
1619
+ } catch (e) {
1620
+ this.#logger.warn(
1621
+ `[SSF] Failed to remove iframe for guest ${guestId}: ${e.message}`
1622
+ );
1623
+ }
1624
+ }, 10);
1625
+ };
1626
+ /**
1627
+ * Cleanup popup window
1628
+ * @param {Window | null} popupWindow - Popup window to cleanup
1629
+ * @param {string} guestId - Guest ID for logging
1630
+ */
1631
+ #cleanupPopup = (popupWindow, guestId) => {
1632
+ try {
1633
+ if (popupWindow && !popupWindow.closed) {
1634
+ popupWindow.close();
1635
+ this.#logger.debug(`[SSF] Closed popup window for guest ${guestId}`);
1636
+ }
1637
+ } catch (e) {
1638
+ this.#logger.debug(
1639
+ `[SSF] Failed to close popup window for guest ${guestId}: ${e.message}`
1640
+ );
1641
+ }
1642
+ };
1643
+ /**
1644
+ * Remove guest from remoting allowed senders
1645
+ */
1646
+ #removeRemotingSender = (guest, guestId) => {
1647
+ try {
1648
+ this.#remoting.removeSender({
1649
+ origin: guest.origin,
1650
+ window: guest.window
1651
+ });
1652
+ this.#logger.debug(`[SSF] Removed remoting sender for guest ${guestId}`);
1653
+ } catch (e) {
1654
+ this.#logger.debug(
1655
+ `[SSF] Failed to remove remoting sender for guest ${guestId}: ${e.message}`
1656
+ );
1657
+ }
1658
+ };
1659
+ /**
1660
+ * Remove guest from all SSF tracking maps
1661
+ */
1662
+ #removeGuestFromTracking = (guest, guestId) => {
1663
+ this.#guestsByWindow.delete(guest.window);
1664
+ this.#guestsByUrl.delete(guest.url);
1665
+ this.#guests.delete(guestId);
1666
+ };
1667
+ unloadGuestWithFullCleanup = (guestIdOrWindowOrEle, cleanupFunctionName = "unmount") => {
1668
+ const guest = this.#findGuest(guestIdOrWindowOrEle);
1669
+ if (!guest) {
1670
+ this.#logger.warn("Attempted to unload unknown guest");
1671
+ return;
1672
+ }
1673
+ const guestId = guest.id;
1674
+ if (guest.openMode === import_types.OpenMode.Embed && guest.domElement) {
1675
+ const iframe = guest.domElement;
1676
+ const contentWindow = guest.window;
1677
+ this.#cleanupGuestWindow({
1678
+ guestWindow: contentWindow,
1679
+ guestId,
1680
+ cleanupFunctionName,
1681
+ windowType: "iframe"
1682
+ });
1683
+ this.#disconnectFieldMutationObserver(contentWindow, guestId);
1684
+ this.#cleanupIframe(iframe, contentWindow, guestId);
1685
+ } else if (guest.openMode === import_types.OpenMode.Popup) {
1686
+ const popupWindow = guest.window;
1687
+ this.#cleanupGuestWindow({
1688
+ guestWindow: popupWindow,
1689
+ guestId,
1690
+ cleanupFunctionName,
1691
+ windowType: "popup"
1692
+ });
1693
+ this.#cleanupPopup(popupWindow, guestId);
1694
+ guest.dispose();
1204
1695
  }
1696
+ this.#removeRemotingSender(guest, guestId);
1697
+ this.#removeGuestFromTracking(guest, guestId);
1698
+ this.#stopMonitoringPopupGuests();
1699
+ this.#logger.audit({
1700
+ message: `Guest unloaded with full cleanup`,
1701
+ ...guest.getInfo()
1702
+ });
1205
1703
  };
1206
1704
  /**
1207
1705
  * monitors guest window close action and executes the callback from host.
1208
- * @param callback host callback method
1209
- * @param id unique id of the guest application
1210
- * @param param
1706
+ * @param {GuestCloseParam} param - Guest close parameters
1211
1707
  */
1212
1708
  onGuestClose = (param) => {
1213
1709
  const { id, guestCloseCallback } = param;