@vizbeetv/homesso-sdk-qa 1.0.7 → 1.0.8-rc1
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/es5/index.cjs +32 -2
- package/es5/index.mjs +32 -2
- package/es6/index.cjs +31 -2
- package/es6/index.mjs +31 -2
- package/package.json +1 -1
- package/types/VizbeeHomeSSOManager.d.ts +2 -0
- package/types/ui/VizbeeSnackBar.d.ts +2 -0
package/es5/index.cjs
CHANGED
|
@@ -585,7 +585,7 @@ var VizbeeMetricsManager = /** @class */ (function () {
|
|
|
585
585
|
var _a, _b, _c, _d;
|
|
586
586
|
var attributes = {};
|
|
587
587
|
attributes[VizbeeMetricsConstants.METRICS_ATTR_SCREEN_HOMESSO_SDK_VERSION] =
|
|
588
|
-
'1.0.
|
|
588
|
+
'1.0.8-rc1';
|
|
589
589
|
attributes['REMOTE_FRIENDLY_NAME'] = (_a = this.senderInfo) === null || _a === void 0 ? void 0 : _a.friendlyName;
|
|
590
590
|
attributes['REMOTE_DEVICE_ID'] = (_b = this.senderInfo) === null || _b === void 0 ? void 0 : _b.deviceId;
|
|
591
591
|
attributes['REMOTE_DEVICE_TYPE'] = (_c = this.senderInfo) === null || _c === void 0 ? void 0 : _c.deviceType;
|
|
@@ -1148,6 +1148,7 @@ var VizbeeSnackbar = /** @class */ (function () {
|
|
|
1148
1148
|
*/
|
|
1149
1149
|
VizbeeSnackbar.prototype.hide = function () {
|
|
1150
1150
|
var _this = this;
|
|
1151
|
+
var _a;
|
|
1151
1152
|
this.stopIconAnimation();
|
|
1152
1153
|
if (this.timeoutId) {
|
|
1153
1154
|
clearTimeout(this.timeoutId);
|
|
@@ -1163,6 +1164,7 @@ var VizbeeSnackbar = /** @class */ (function () {
|
|
|
1163
1164
|
}
|
|
1164
1165
|
_this.currentSnackbar = undefined;
|
|
1165
1166
|
}, 300);
|
|
1167
|
+
(_a = this.onHide) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1166
1168
|
}
|
|
1167
1169
|
};
|
|
1168
1170
|
VizbeeSnackbar.prototype.getScreenScale = function () {
|
|
@@ -1332,6 +1334,7 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1332
1334
|
* @internal
|
|
1333
1335
|
*/
|
|
1334
1336
|
function VizbeeHomeSSOManager() {
|
|
1337
|
+
var _this = this;
|
|
1335
1338
|
/** @internal List of sign-in information for different services */
|
|
1336
1339
|
this.signInInfoList = [];
|
|
1337
1340
|
/** @internal Tracks if remote device is signed in */
|
|
@@ -1340,6 +1343,8 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1340
1343
|
this.isScreenSignedIn = false;
|
|
1341
1344
|
/** @internal Tracks if sign-in process is currently active */
|
|
1342
1345
|
this.isSignInInProgress = false;
|
|
1346
|
+
/** @internal Tracks which SSO modal is currently displayed to avoid redundant re-renders */
|
|
1347
|
+
this.currentModalType = 'none';
|
|
1343
1348
|
/** @internal Information about the sender device */
|
|
1344
1349
|
this.senderInfo = null;
|
|
1345
1350
|
this.signInHandler = null;
|
|
@@ -1350,6 +1355,10 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1350
1355
|
this.modalPreferences = {};
|
|
1351
1356
|
this.vizbeeHomeSSOUIManager = VizbeeHomeSSOUIManager.getInstance();
|
|
1352
1357
|
this.snackbar = new VizbeeSnackbar();
|
|
1358
|
+
// Keep tracked modal state in sync when the snackbar auto-hides.
|
|
1359
|
+
this.snackbar.onHide = function () {
|
|
1360
|
+
_this.currentModalType = 'none';
|
|
1361
|
+
};
|
|
1353
1362
|
this.vizbeeMetricsManager = new VizbeeMetricsManager();
|
|
1354
1363
|
}
|
|
1355
1364
|
/**
|
|
@@ -1716,6 +1725,14 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1716
1725
|
* @internal
|
|
1717
1726
|
*/
|
|
1718
1727
|
VizbeeHomeSSOManager.prototype.updateProgressUI = function () {
|
|
1728
|
+
var targetModalType = this.isRemoteSignedIn
|
|
1729
|
+
? 'progress'
|
|
1730
|
+
: 'informational';
|
|
1731
|
+
// Same modal already showing; skip to avoid a hide + reshow flicker.
|
|
1732
|
+
if (this.currentModalType === targetModalType) {
|
|
1733
|
+
logger.debug("[".concat(LOG_TAG, "][updateProgressUI] - '").concat(targetModalType, "' modal already showing, skipping re-render"));
|
|
1734
|
+
return;
|
|
1735
|
+
}
|
|
1719
1736
|
if (!this.isRemoteSignedIn) {
|
|
1720
1737
|
var modalOptions = this.vizbeeHomeSSOUIManager.getInformationalSignInModalConfig();
|
|
1721
1738
|
this.snackbar.show(modalOptions);
|
|
@@ -1724,6 +1741,7 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1724
1741
|
var modalOptions = this.vizbeeHomeSSOUIManager.getProgressSignInModalConfig();
|
|
1725
1742
|
this.snackbar.show(__assign(__assign({}, modalOptions), { shouldAnimateIcon: true }));
|
|
1726
1743
|
}
|
|
1744
|
+
this.currentModalType = targetModalType;
|
|
1727
1745
|
};
|
|
1728
1746
|
/**
|
|
1729
1747
|
* Updates UI for successful sign-in
|
|
@@ -1732,8 +1750,14 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1732
1750
|
* @internal
|
|
1733
1751
|
*/
|
|
1734
1752
|
VizbeeHomeSSOManager.prototype.updateSuccessUI = function () {
|
|
1753
|
+
// Success modal already showing; leave it as-is.
|
|
1754
|
+
if (this.currentModalType === 'success') {
|
|
1755
|
+
logger.debug("[".concat(LOG_TAG, "][updateSuccessUI] - 'success' modal already showing, skipping re-render"));
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1735
1758
|
var modalOptions = this.vizbeeHomeSSOUIManager.getSuccessSignInModalConfig();
|
|
1736
1759
|
this.snackbar.show(modalOptions);
|
|
1760
|
+
this.currentModalType = 'success';
|
|
1737
1761
|
};
|
|
1738
1762
|
/**
|
|
1739
1763
|
* Updates UI for failed sign-in
|
|
@@ -1742,7 +1766,13 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1742
1766
|
* @internal
|
|
1743
1767
|
*/
|
|
1744
1768
|
VizbeeHomeSSOManager.prototype.updateFailureUI = function () {
|
|
1769
|
+
// Nothing showing; nothing to hide.
|
|
1770
|
+
if (this.currentModalType === 'none') {
|
|
1771
|
+
logger.debug("[".concat(LOG_TAG, "][updateFailureUI] - no modal showing, nothing to hide"));
|
|
1772
|
+
return;
|
|
1773
|
+
}
|
|
1745
1774
|
this.snackbar.hide();
|
|
1775
|
+
this.currentModalType = 'none';
|
|
1746
1776
|
};
|
|
1747
1777
|
/** @internal Singleton instance of the manager */
|
|
1748
1778
|
VizbeeHomeSSOManager.instance = null;
|
|
@@ -1827,7 +1857,7 @@ var setupHomeSSO = function () {
|
|
|
1827
1857
|
// Replaced at build time with package.json's version by
|
|
1828
1858
|
// @rollup/plugin-replace (same token the metrics manager uses), so
|
|
1829
1859
|
// integrators can read the loaded SDK version off the namespace.
|
|
1830
|
-
VERSION: '1.0.
|
|
1860
|
+
VERSION: '1.0.8-rc1',
|
|
1831
1861
|
};
|
|
1832
1862
|
window.dispatchEvent(new Event('VIZBEE_HOMESSO_READY'));
|
|
1833
1863
|
};
|
package/es5/index.mjs
CHANGED
|
@@ -581,7 +581,7 @@ var VizbeeMetricsManager = /** @class */ (function () {
|
|
|
581
581
|
var _a, _b, _c, _d;
|
|
582
582
|
var attributes = {};
|
|
583
583
|
attributes[VizbeeMetricsConstants.METRICS_ATTR_SCREEN_HOMESSO_SDK_VERSION] =
|
|
584
|
-
'1.0.
|
|
584
|
+
'1.0.8-rc1';
|
|
585
585
|
attributes['REMOTE_FRIENDLY_NAME'] = (_a = this.senderInfo) === null || _a === void 0 ? void 0 : _a.friendlyName;
|
|
586
586
|
attributes['REMOTE_DEVICE_ID'] = (_b = this.senderInfo) === null || _b === void 0 ? void 0 : _b.deviceId;
|
|
587
587
|
attributes['REMOTE_DEVICE_TYPE'] = (_c = this.senderInfo) === null || _c === void 0 ? void 0 : _c.deviceType;
|
|
@@ -1144,6 +1144,7 @@ var VizbeeSnackbar = /** @class */ (function () {
|
|
|
1144
1144
|
*/
|
|
1145
1145
|
VizbeeSnackbar.prototype.hide = function () {
|
|
1146
1146
|
var _this = this;
|
|
1147
|
+
var _a;
|
|
1147
1148
|
this.stopIconAnimation();
|
|
1148
1149
|
if (this.timeoutId) {
|
|
1149
1150
|
clearTimeout(this.timeoutId);
|
|
@@ -1159,6 +1160,7 @@ var VizbeeSnackbar = /** @class */ (function () {
|
|
|
1159
1160
|
}
|
|
1160
1161
|
_this.currentSnackbar = undefined;
|
|
1161
1162
|
}, 300);
|
|
1163
|
+
(_a = this.onHide) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1162
1164
|
}
|
|
1163
1165
|
};
|
|
1164
1166
|
VizbeeSnackbar.prototype.getScreenScale = function () {
|
|
@@ -1328,6 +1330,7 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1328
1330
|
* @internal
|
|
1329
1331
|
*/
|
|
1330
1332
|
function VizbeeHomeSSOManager() {
|
|
1333
|
+
var _this = this;
|
|
1331
1334
|
/** @internal List of sign-in information for different services */
|
|
1332
1335
|
this.signInInfoList = [];
|
|
1333
1336
|
/** @internal Tracks if remote device is signed in */
|
|
@@ -1336,6 +1339,8 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1336
1339
|
this.isScreenSignedIn = false;
|
|
1337
1340
|
/** @internal Tracks if sign-in process is currently active */
|
|
1338
1341
|
this.isSignInInProgress = false;
|
|
1342
|
+
/** @internal Tracks which SSO modal is currently displayed to avoid redundant re-renders */
|
|
1343
|
+
this.currentModalType = 'none';
|
|
1339
1344
|
/** @internal Information about the sender device */
|
|
1340
1345
|
this.senderInfo = null;
|
|
1341
1346
|
this.signInHandler = null;
|
|
@@ -1346,6 +1351,10 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1346
1351
|
this.modalPreferences = {};
|
|
1347
1352
|
this.vizbeeHomeSSOUIManager = VizbeeHomeSSOUIManager.getInstance();
|
|
1348
1353
|
this.snackbar = new VizbeeSnackbar();
|
|
1354
|
+
// Keep tracked modal state in sync when the snackbar auto-hides.
|
|
1355
|
+
this.snackbar.onHide = function () {
|
|
1356
|
+
_this.currentModalType = 'none';
|
|
1357
|
+
};
|
|
1349
1358
|
this.vizbeeMetricsManager = new VizbeeMetricsManager();
|
|
1350
1359
|
}
|
|
1351
1360
|
/**
|
|
@@ -1712,6 +1721,14 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1712
1721
|
* @internal
|
|
1713
1722
|
*/
|
|
1714
1723
|
VizbeeHomeSSOManager.prototype.updateProgressUI = function () {
|
|
1724
|
+
var targetModalType = this.isRemoteSignedIn
|
|
1725
|
+
? 'progress'
|
|
1726
|
+
: 'informational';
|
|
1727
|
+
// Same modal already showing; skip to avoid a hide + reshow flicker.
|
|
1728
|
+
if (this.currentModalType === targetModalType) {
|
|
1729
|
+
logger.debug("[".concat(LOG_TAG, "][updateProgressUI] - '").concat(targetModalType, "' modal already showing, skipping re-render"));
|
|
1730
|
+
return;
|
|
1731
|
+
}
|
|
1715
1732
|
if (!this.isRemoteSignedIn) {
|
|
1716
1733
|
var modalOptions = this.vizbeeHomeSSOUIManager.getInformationalSignInModalConfig();
|
|
1717
1734
|
this.snackbar.show(modalOptions);
|
|
@@ -1720,6 +1737,7 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1720
1737
|
var modalOptions = this.vizbeeHomeSSOUIManager.getProgressSignInModalConfig();
|
|
1721
1738
|
this.snackbar.show(__assign(__assign({}, modalOptions), { shouldAnimateIcon: true }));
|
|
1722
1739
|
}
|
|
1740
|
+
this.currentModalType = targetModalType;
|
|
1723
1741
|
};
|
|
1724
1742
|
/**
|
|
1725
1743
|
* Updates UI for successful sign-in
|
|
@@ -1728,8 +1746,14 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1728
1746
|
* @internal
|
|
1729
1747
|
*/
|
|
1730
1748
|
VizbeeHomeSSOManager.prototype.updateSuccessUI = function () {
|
|
1749
|
+
// Success modal already showing; leave it as-is.
|
|
1750
|
+
if (this.currentModalType === 'success') {
|
|
1751
|
+
logger.debug("[".concat(LOG_TAG, "][updateSuccessUI] - 'success' modal already showing, skipping re-render"));
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1731
1754
|
var modalOptions = this.vizbeeHomeSSOUIManager.getSuccessSignInModalConfig();
|
|
1732
1755
|
this.snackbar.show(modalOptions);
|
|
1756
|
+
this.currentModalType = 'success';
|
|
1733
1757
|
};
|
|
1734
1758
|
/**
|
|
1735
1759
|
* Updates UI for failed sign-in
|
|
@@ -1738,7 +1762,13 @@ var VizbeeHomeSSOManager = /** @class */ (function () {
|
|
|
1738
1762
|
* @internal
|
|
1739
1763
|
*/
|
|
1740
1764
|
VizbeeHomeSSOManager.prototype.updateFailureUI = function () {
|
|
1765
|
+
// Nothing showing; nothing to hide.
|
|
1766
|
+
if (this.currentModalType === 'none') {
|
|
1767
|
+
logger.debug("[".concat(LOG_TAG, "][updateFailureUI] - no modal showing, nothing to hide"));
|
|
1768
|
+
return;
|
|
1769
|
+
}
|
|
1741
1770
|
this.snackbar.hide();
|
|
1771
|
+
this.currentModalType = 'none';
|
|
1742
1772
|
};
|
|
1743
1773
|
/** @internal Singleton instance of the manager */
|
|
1744
1774
|
VizbeeHomeSSOManager.instance = null;
|
|
@@ -1823,7 +1853,7 @@ var setupHomeSSO = function () {
|
|
|
1823
1853
|
// Replaced at build time with package.json's version by
|
|
1824
1854
|
// @rollup/plugin-replace (same token the metrics manager uses), so
|
|
1825
1855
|
// integrators can read the loaded SDK version off the namespace.
|
|
1826
|
-
VERSION: '1.0.
|
|
1856
|
+
VERSION: '1.0.8-rc1',
|
|
1827
1857
|
};
|
|
1828
1858
|
window.dispatchEvent(new Event('VIZBEE_HOMESSO_READY'));
|
|
1829
1859
|
};
|
package/es6/index.cjs
CHANGED
|
@@ -482,7 +482,7 @@ class VizbeeMetricsManager {
|
|
|
482
482
|
var _a, _b, _c, _d;
|
|
483
483
|
const attributes = {};
|
|
484
484
|
attributes[VizbeeMetricsConstants.METRICS_ATTR_SCREEN_HOMESSO_SDK_VERSION] =
|
|
485
|
-
'1.0.
|
|
485
|
+
'1.0.8-rc1';
|
|
486
486
|
attributes['REMOTE_FRIENDLY_NAME'] = (_a = this.senderInfo) === null || _a === void 0 ? void 0 : _a.friendlyName;
|
|
487
487
|
attributes['REMOTE_DEVICE_ID'] = (_b = this.senderInfo) === null || _b === void 0 ? void 0 : _b.deviceId;
|
|
488
488
|
attributes['REMOTE_DEVICE_TYPE'] = (_c = this.senderInfo) === null || _c === void 0 ? void 0 : _c.deviceType;
|
|
@@ -1017,6 +1017,7 @@ class VizbeeSnackbar {
|
|
|
1017
1017
|
* Hides the currently displayed snackbar
|
|
1018
1018
|
*/
|
|
1019
1019
|
hide() {
|
|
1020
|
+
var _a;
|
|
1020
1021
|
this.stopIconAnimation();
|
|
1021
1022
|
if (this.timeoutId) {
|
|
1022
1023
|
clearTimeout(this.timeoutId);
|
|
@@ -1032,6 +1033,7 @@ class VizbeeSnackbar {
|
|
|
1032
1033
|
}
|
|
1033
1034
|
this.currentSnackbar = undefined;
|
|
1034
1035
|
}, 300);
|
|
1036
|
+
(_a = this.onHide) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1035
1037
|
}
|
|
1036
1038
|
}
|
|
1037
1039
|
getScreenScale() {
|
|
@@ -1275,6 +1277,8 @@ class VizbeeHomeSSOManager {
|
|
|
1275
1277
|
this.isScreenSignedIn = false;
|
|
1276
1278
|
/** @internal Tracks if sign-in process is currently active */
|
|
1277
1279
|
this.isSignInInProgress = false;
|
|
1280
|
+
/** @internal Tracks which SSO modal is currently displayed to avoid redundant re-renders */
|
|
1281
|
+
this.currentModalType = 'none';
|
|
1278
1282
|
/** @internal Information about the sender device */
|
|
1279
1283
|
this.senderInfo = null;
|
|
1280
1284
|
this.signInHandler = null;
|
|
@@ -1285,6 +1289,10 @@ class VizbeeHomeSSOManager {
|
|
|
1285
1289
|
this.modalPreferences = {};
|
|
1286
1290
|
this.vizbeeHomeSSOUIManager = VizbeeHomeSSOUIManager.getInstance();
|
|
1287
1291
|
this.snackbar = new VizbeeSnackbar();
|
|
1292
|
+
// Keep tracked modal state in sync when the snackbar auto-hides.
|
|
1293
|
+
this.snackbar.onHide = () => {
|
|
1294
|
+
this.currentModalType = 'none';
|
|
1295
|
+
};
|
|
1288
1296
|
this.vizbeeMetricsManager = new VizbeeMetricsManager();
|
|
1289
1297
|
}
|
|
1290
1298
|
/**
|
|
@@ -1610,6 +1618,14 @@ class VizbeeHomeSSOManager {
|
|
|
1610
1618
|
* @internal
|
|
1611
1619
|
*/
|
|
1612
1620
|
updateProgressUI() {
|
|
1621
|
+
const targetModalType = this.isRemoteSignedIn
|
|
1622
|
+
? 'progress'
|
|
1623
|
+
: 'informational';
|
|
1624
|
+
// Same modal already showing; skip to avoid a hide + reshow flicker.
|
|
1625
|
+
if (this.currentModalType === targetModalType) {
|
|
1626
|
+
logger.debug(`[${LOG_TAG}][updateProgressUI] - '${targetModalType}' modal already showing, skipping re-render`);
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1613
1629
|
if (!this.isRemoteSignedIn) {
|
|
1614
1630
|
const modalOptions = this.vizbeeHomeSSOUIManager.getInformationalSignInModalConfig();
|
|
1615
1631
|
this.snackbar.show(modalOptions);
|
|
@@ -1618,6 +1634,7 @@ class VizbeeHomeSSOManager {
|
|
|
1618
1634
|
const modalOptions = this.vizbeeHomeSSOUIManager.getProgressSignInModalConfig();
|
|
1619
1635
|
this.snackbar.show(Object.assign(Object.assign({}, modalOptions), { shouldAnimateIcon: true }));
|
|
1620
1636
|
}
|
|
1637
|
+
this.currentModalType = targetModalType;
|
|
1621
1638
|
}
|
|
1622
1639
|
/**
|
|
1623
1640
|
* Updates UI for successful sign-in
|
|
@@ -1626,8 +1643,14 @@ class VizbeeHomeSSOManager {
|
|
|
1626
1643
|
* @internal
|
|
1627
1644
|
*/
|
|
1628
1645
|
updateSuccessUI() {
|
|
1646
|
+
// Success modal already showing; leave it as-is.
|
|
1647
|
+
if (this.currentModalType === 'success') {
|
|
1648
|
+
logger.debug(`[${LOG_TAG}][updateSuccessUI] - 'success' modal already showing, skipping re-render`);
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1629
1651
|
const modalOptions = this.vizbeeHomeSSOUIManager.getSuccessSignInModalConfig();
|
|
1630
1652
|
this.snackbar.show(modalOptions);
|
|
1653
|
+
this.currentModalType = 'success';
|
|
1631
1654
|
}
|
|
1632
1655
|
/**
|
|
1633
1656
|
* Updates UI for failed sign-in
|
|
@@ -1636,7 +1659,13 @@ class VizbeeHomeSSOManager {
|
|
|
1636
1659
|
* @internal
|
|
1637
1660
|
*/
|
|
1638
1661
|
updateFailureUI() {
|
|
1662
|
+
// Nothing showing; nothing to hide.
|
|
1663
|
+
if (this.currentModalType === 'none') {
|
|
1664
|
+
logger.debug(`[${LOG_TAG}][updateFailureUI] - no modal showing, nothing to hide`);
|
|
1665
|
+
return;
|
|
1666
|
+
}
|
|
1639
1667
|
this.snackbar.hide();
|
|
1668
|
+
this.currentModalType = 'none';
|
|
1640
1669
|
}
|
|
1641
1670
|
}
|
|
1642
1671
|
/** @internal Singleton instance of the manager */
|
|
@@ -1719,7 +1748,7 @@ const setupHomeSSO = () => {
|
|
|
1719
1748
|
// Replaced at build time with package.json's version by
|
|
1720
1749
|
// @rollup/plugin-replace (same token the metrics manager uses), so
|
|
1721
1750
|
// integrators can read the loaded SDK version off the namespace.
|
|
1722
|
-
VERSION: '1.0.
|
|
1751
|
+
VERSION: '1.0.8-rc1',
|
|
1723
1752
|
};
|
|
1724
1753
|
window.dispatchEvent(new Event('VIZBEE_HOMESSO_READY'));
|
|
1725
1754
|
};
|
package/es6/index.mjs
CHANGED
|
@@ -478,7 +478,7 @@ class VizbeeMetricsManager {
|
|
|
478
478
|
var _a, _b, _c, _d;
|
|
479
479
|
const attributes = {};
|
|
480
480
|
attributes[VizbeeMetricsConstants.METRICS_ATTR_SCREEN_HOMESSO_SDK_VERSION] =
|
|
481
|
-
'1.0.
|
|
481
|
+
'1.0.8-rc1';
|
|
482
482
|
attributes['REMOTE_FRIENDLY_NAME'] = (_a = this.senderInfo) === null || _a === void 0 ? void 0 : _a.friendlyName;
|
|
483
483
|
attributes['REMOTE_DEVICE_ID'] = (_b = this.senderInfo) === null || _b === void 0 ? void 0 : _b.deviceId;
|
|
484
484
|
attributes['REMOTE_DEVICE_TYPE'] = (_c = this.senderInfo) === null || _c === void 0 ? void 0 : _c.deviceType;
|
|
@@ -1013,6 +1013,7 @@ class VizbeeSnackbar {
|
|
|
1013
1013
|
* Hides the currently displayed snackbar
|
|
1014
1014
|
*/
|
|
1015
1015
|
hide() {
|
|
1016
|
+
var _a;
|
|
1016
1017
|
this.stopIconAnimation();
|
|
1017
1018
|
if (this.timeoutId) {
|
|
1018
1019
|
clearTimeout(this.timeoutId);
|
|
@@ -1028,6 +1029,7 @@ class VizbeeSnackbar {
|
|
|
1028
1029
|
}
|
|
1029
1030
|
this.currentSnackbar = undefined;
|
|
1030
1031
|
}, 300);
|
|
1032
|
+
(_a = this.onHide) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
1031
1033
|
}
|
|
1032
1034
|
}
|
|
1033
1035
|
getScreenScale() {
|
|
@@ -1271,6 +1273,8 @@ class VizbeeHomeSSOManager {
|
|
|
1271
1273
|
this.isScreenSignedIn = false;
|
|
1272
1274
|
/** @internal Tracks if sign-in process is currently active */
|
|
1273
1275
|
this.isSignInInProgress = false;
|
|
1276
|
+
/** @internal Tracks which SSO modal is currently displayed to avoid redundant re-renders */
|
|
1277
|
+
this.currentModalType = 'none';
|
|
1274
1278
|
/** @internal Information about the sender device */
|
|
1275
1279
|
this.senderInfo = null;
|
|
1276
1280
|
this.signInHandler = null;
|
|
@@ -1281,6 +1285,10 @@ class VizbeeHomeSSOManager {
|
|
|
1281
1285
|
this.modalPreferences = {};
|
|
1282
1286
|
this.vizbeeHomeSSOUIManager = VizbeeHomeSSOUIManager.getInstance();
|
|
1283
1287
|
this.snackbar = new VizbeeSnackbar();
|
|
1288
|
+
// Keep tracked modal state in sync when the snackbar auto-hides.
|
|
1289
|
+
this.snackbar.onHide = () => {
|
|
1290
|
+
this.currentModalType = 'none';
|
|
1291
|
+
};
|
|
1284
1292
|
this.vizbeeMetricsManager = new VizbeeMetricsManager();
|
|
1285
1293
|
}
|
|
1286
1294
|
/**
|
|
@@ -1606,6 +1614,14 @@ class VizbeeHomeSSOManager {
|
|
|
1606
1614
|
* @internal
|
|
1607
1615
|
*/
|
|
1608
1616
|
updateProgressUI() {
|
|
1617
|
+
const targetModalType = this.isRemoteSignedIn
|
|
1618
|
+
? 'progress'
|
|
1619
|
+
: 'informational';
|
|
1620
|
+
// Same modal already showing; skip to avoid a hide + reshow flicker.
|
|
1621
|
+
if (this.currentModalType === targetModalType) {
|
|
1622
|
+
logger.debug(`[${LOG_TAG}][updateProgressUI] - '${targetModalType}' modal already showing, skipping re-render`);
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1609
1625
|
if (!this.isRemoteSignedIn) {
|
|
1610
1626
|
const modalOptions = this.vizbeeHomeSSOUIManager.getInformationalSignInModalConfig();
|
|
1611
1627
|
this.snackbar.show(modalOptions);
|
|
@@ -1614,6 +1630,7 @@ class VizbeeHomeSSOManager {
|
|
|
1614
1630
|
const modalOptions = this.vizbeeHomeSSOUIManager.getProgressSignInModalConfig();
|
|
1615
1631
|
this.snackbar.show(Object.assign(Object.assign({}, modalOptions), { shouldAnimateIcon: true }));
|
|
1616
1632
|
}
|
|
1633
|
+
this.currentModalType = targetModalType;
|
|
1617
1634
|
}
|
|
1618
1635
|
/**
|
|
1619
1636
|
* Updates UI for successful sign-in
|
|
@@ -1622,8 +1639,14 @@ class VizbeeHomeSSOManager {
|
|
|
1622
1639
|
* @internal
|
|
1623
1640
|
*/
|
|
1624
1641
|
updateSuccessUI() {
|
|
1642
|
+
// Success modal already showing; leave it as-is.
|
|
1643
|
+
if (this.currentModalType === 'success') {
|
|
1644
|
+
logger.debug(`[${LOG_TAG}][updateSuccessUI] - 'success' modal already showing, skipping re-render`);
|
|
1645
|
+
return;
|
|
1646
|
+
}
|
|
1625
1647
|
const modalOptions = this.vizbeeHomeSSOUIManager.getSuccessSignInModalConfig();
|
|
1626
1648
|
this.snackbar.show(modalOptions);
|
|
1649
|
+
this.currentModalType = 'success';
|
|
1627
1650
|
}
|
|
1628
1651
|
/**
|
|
1629
1652
|
* Updates UI for failed sign-in
|
|
@@ -1632,7 +1655,13 @@ class VizbeeHomeSSOManager {
|
|
|
1632
1655
|
* @internal
|
|
1633
1656
|
*/
|
|
1634
1657
|
updateFailureUI() {
|
|
1658
|
+
// Nothing showing; nothing to hide.
|
|
1659
|
+
if (this.currentModalType === 'none') {
|
|
1660
|
+
logger.debug(`[${LOG_TAG}][updateFailureUI] - no modal showing, nothing to hide`);
|
|
1661
|
+
return;
|
|
1662
|
+
}
|
|
1635
1663
|
this.snackbar.hide();
|
|
1664
|
+
this.currentModalType = 'none';
|
|
1636
1665
|
}
|
|
1637
1666
|
}
|
|
1638
1667
|
/** @internal Singleton instance of the manager */
|
|
@@ -1715,7 +1744,7 @@ const setupHomeSSO = () => {
|
|
|
1715
1744
|
// Replaced at build time with package.json's version by
|
|
1716
1745
|
// @rollup/plugin-replace (same token the metrics manager uses), so
|
|
1717
1746
|
// integrators can read the loaded SDK version off the namespace.
|
|
1718
|
-
VERSION: '1.0.
|
|
1747
|
+
VERSION: '1.0.8-rc1',
|
|
1719
1748
|
};
|
|
1720
1749
|
window.dispatchEvent(new Event('VIZBEE_HOMESSO_READY'));
|
|
1721
1750
|
};
|
package/package.json
CHANGED
|
@@ -41,6 +41,8 @@ export declare class VizbeeHomeSSOManager implements VizbeeSignInStatusCallback
|
|
|
41
41
|
private vizbeeHomeSSOUIManager;
|
|
42
42
|
/** @internal Snackbar instance for showing notifications */
|
|
43
43
|
private readonly snackbar;
|
|
44
|
+
/** @internal Tracks which SSO modal is currently displayed to avoid redundant re-renders */
|
|
45
|
+
private currentModalType;
|
|
44
46
|
/** @internal Information about the sender device */
|
|
45
47
|
private senderInfo;
|
|
46
48
|
/** @internal Manager for handling metrics and analytics */
|
|
@@ -67,6 +67,8 @@ export declare class VizbeeSnackbar {
|
|
|
67
67
|
private animationInterval?;
|
|
68
68
|
private currentIconElement?;
|
|
69
69
|
private readonly uiManager;
|
|
70
|
+
/** Invoked whenever a visible snackbar is torn down (manual hide or auto-hide). */
|
|
71
|
+
onHide?: () => void;
|
|
70
72
|
private readonly BASE_DIMENSIONS;
|
|
71
73
|
/**
|
|
72
74
|
* Creates a new instance of VizbeeSnackbar
|