@smartbit4all/ng-client 3.3.196 → 3.3.198
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/esm2020/lib/session/api/model/sessionInfoData.mjs +1 -1
- package/esm2020/lib/session/smart-timer/smart-session-timer.service.mjs +11 -5
- package/esm2020/lib/smart-client/smart-component-api-client.mjs +1 -1
- package/fesm2015/smartbit4all-ng-client.mjs +10 -4
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +10 -4
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/session/api/model/sessionInfoData.d.ts +4 -0
- package/lib/smart-client/smart-component-api-client.d.ts +2 -2
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.198.tgz +0 -0
- package/smartbit4all-ng-client-3.3.196.tgz +0 -0
|
@@ -8768,10 +8768,16 @@ class SmartSessionTimerService {
|
|
|
8768
8768
|
this._destroy$.complete();
|
|
8769
8769
|
}
|
|
8770
8770
|
startTimer() {
|
|
8771
|
-
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8771
|
+
const sessionInfoData = this.session.sessionInfoData;
|
|
8772
|
+
const lifetimeSeconds = sessionInfoData?.duration;
|
|
8773
|
+
if (lifetimeSeconds && lifetimeSeconds !== 0) {
|
|
8774
|
+
this.timeLeftInSeconds = lifetimeSeconds;
|
|
8775
|
+
}
|
|
8776
|
+
else {
|
|
8777
|
+
const expiration = new Date(sessionInfoData.expiration);
|
|
8778
|
+
const now = new Date();
|
|
8779
|
+
this.timeLeftInSeconds = Math.floor((expiration.getTime() - now.getTime()) / 1000);
|
|
8780
|
+
}
|
|
8775
8781
|
this.timer = setInterval(() => {
|
|
8776
8782
|
this.timeLeftInSeconds--;
|
|
8777
8783
|
if (this.timeLeftInSeconds === 0) {
|