@smartbit4all/ng-client 1.1.29 → 1.1.31
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/README.md +386 -386
- package/esm2020/lib/session/api/api/api.mjs +4 -4
- package/esm2020/lib/session/api/api/session.service.mjs +306 -306
- package/esm2020/lib/session/api/configuration.mjs +91 -91
- package/esm2020/lib/session/api/encoder.mjs +19 -19
- package/esm2020/lib/session/api/index.mjs +3 -3
- package/esm2020/lib/session/api/model/accountInfo.mjs +13 -13
- package/esm2020/lib/session/api/model/apiError.mjs +13 -13
- package/esm2020/lib/session/api/model/authenticationProviderData.mjs +13 -13
- package/esm2020/lib/session/api/model/getAuthenticationProvidersResponse.mjs +2 -2
- package/esm2020/lib/session/api/model/models.mjs +9 -9
- package/esm2020/lib/session/api/model/refreshSessionRequest.mjs +13 -13
- package/esm2020/lib/session/api/model/session.mjs +2 -2
- package/esm2020/lib/session/api/model/sessionInfoData.mjs +2 -2
- package/esm2020/lib/session/api/model/userActivityLog.mjs +13 -13
- package/esm2020/lib/session/api/param.mjs +2 -2
- package/esm2020/lib/session/api/variables.mjs +9 -9
- package/esm2020/lib/session/cookie-service/smart-cookie.service.mjs +225 -225
- package/esm2020/lib/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.component.mjs +90 -90
- package/esm2020/lib/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.service.mjs +43 -43
- package/esm2020/lib/session/dev-tool/smart-dev-tool-floating-button/smart-dev-tool-floating-button.component.mjs +40 -40
- package/esm2020/lib/session/dev-tool/smart-dev-tool.interceptor.mjs +52 -52
- package/esm2020/lib/session/dev-tool/smart-dev-tool.service.mjs +165 -165
- package/esm2020/lib/session/projects.mjs +12 -12
- package/esm2020/lib/session/smart-error-catching.interceptor.mjs +71 -71
- package/esm2020/lib/session/smart-header-maintainer.interceptor.mjs +46 -39
- package/esm2020/lib/session/smart-session-handler.service.mjs +6 -6
- package/esm2020/lib/session/smart-session.module.mjs +74 -74
- package/esm2020/lib/session/smart-session.service.mjs +225 -225
- package/esm2020/lib/session/smart-timer/smart-session-timer.component.mjs +35 -35
- package/esm2020/lib/session/smart-timer/smart-session-timer.service.mjs +52 -52
- package/esm2020/lib/smart-client/projects.mjs +5 -5
- package/esm2020/lib/smart-client/smart-authentication.service.mjs +21 -21
- package/esm2020/lib/smart-client/smart-component-api-client.mjs +330 -316
- package/esm2020/lib/smart-client/smart.component.mjs +30 -30
- package/esm2020/lib/smart-client/smart.service.mjs +30 -30
- package/esm2020/lib/smart-ng-client.module.mjs +20 -20
- package/esm2020/lib/smart-ng-client.service.mjs +19 -19
- package/esm2020/lib/view-context/api/api/api.mjs +4 -4
- package/esm2020/lib/view-context/api/api/view.service.mjs +859 -701
- package/esm2020/lib/view-context/api/api.module.mjs +40 -40
- package/esm2020/lib/view-context/api/configuration.mjs +91 -91
- package/esm2020/lib/view-context/api/encoder.mjs +19 -19
- package/esm2020/lib/view-context/api/index.mjs +7 -7
- package/esm2020/lib/view-context/api/model/closeResult.mjs +17 -17
- package/esm2020/lib/view-context/api/model/componentConstraint.mjs +2 -2
- package/esm2020/lib/view-context/api/model/componentModel.mjs +2 -2
- package/esm2020/lib/view-context/api/model/componentModelChange.mjs +13 -13
- package/esm2020/lib/view-context/api/model/dataChange.mjs +2 -2
- package/esm2020/lib/view-context/api/model/dataChangeEvent.mjs +2 -2
- package/esm2020/lib/view-context/api/model/dataChangeKind.mjs +17 -17
- package/esm2020/lib/view-context/api/model/messageData.mjs +2 -2
- package/esm2020/lib/view-context/api/model/messageOption.mjs +2 -2
- package/esm2020/lib/view-context/api/model/messageOptionType.mjs +17 -17
- package/esm2020/lib/view-context/api/model/messageResult.mjs +2 -2
- package/esm2020/lib/view-context/api/model/messageType.mjs +18 -18
- package/esm2020/lib/view-context/api/model/models.mjs +40 -37
- package/esm2020/lib/view-context/api/model/openPendingData.mjs +2 -2
- package/esm2020/lib/view-context/api/model/smartLinkData.mjs +2 -2
- package/esm2020/lib/view-context/api/model/uiAction.mjs +2 -2
- package/esm2020/lib/view-context/api/model/uiActionButtonDescriptor.mjs +13 -13
- package/esm2020/lib/view-context/api/model/uiActionButtonIconPos.mjs +16 -16
- package/esm2020/lib/view-context/api/model/uiActionButtonType.mjs +21 -21
- package/esm2020/lib/view-context/api/model/uiActionConstraint.mjs +13 -0
- package/esm2020/lib/view-context/api/model/uiActionDescriptor.mjs +2 -2
- package/esm2020/lib/view-context/api/model/uiActionDialogDescriptor.mjs +2 -2
- package/esm2020/lib/view-context/api/model/uiActionFeedbackType.mjs +16 -16
- package/esm2020/lib/view-context/api/model/uiActionInputType.mjs +20 -18
- package/esm2020/lib/view-context/api/model/uiActionRequest.mjs +13 -13
- package/esm2020/lib/view-context/api/model/uiActionUploadDescriptor.mjs +13 -0
- package/esm2020/lib/view-context/api/model/uploadedFile.mjs +13 -0
- package/esm2020/lib/view-context/api/model/valueSet.mjs +2 -2
- package/esm2020/lib/view-context/api/model/view.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewApiError.mjs +13 -13
- package/esm2020/lib/view-context/api/model/viewConstraint.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewContext.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewContextChange.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewContextData.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewContextUpdate.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewData.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewEventHandler.mjs +20 -20
- package/esm2020/lib/view-context/api/model/viewState.mjs +21 -21
- package/esm2020/lib/view-context/api/model/viewStateUpdate.mjs +2 -2
- package/esm2020/lib/view-context/api/model/viewType.mjs +17 -17
- package/esm2020/lib/view-context/api/param.mjs +2 -2
- package/esm2020/lib/view-context/api/variables.mjs +9 -9
- package/esm2020/lib/view-context/message-dialog/message-dialog.component.mjs +63 -63
- package/esm2020/lib/view-context/projects.mjs +17 -17
- package/esm2020/lib/view-context/property-definition-data.mjs +2 -2
- package/esm2020/lib/view-context/smart-ui-action/components/success-snack-bar/success-snack-bar.component.mjs +30 -30
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.mjs +53 -53
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.mjs +48 -48
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +68 -0
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +53 -0
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.mjs +119 -119
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.mjs +52 -52
- package/esm2020/lib/view-context/smart-ui-action/ui-action-toolbar.component.mjs +109 -109
- package/esm2020/lib/view-context/smart-ui-action/ui-action.descriptor.service.mjs +119 -119
- package/esm2020/lib/view-context/smart-ui-action/ui-action.model.mjs +7 -7
- package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +182 -155
- package/esm2020/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.component.mjs +29 -29
- package/esm2020/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.mjs +69 -69
- package/esm2020/lib/view-context/smart-view-context.interceptor.mjs +39 -39
- package/esm2020/lib/view-context/smart-view-context.model.mjs +2 -2
- package/esm2020/lib/view-context/smart-view-context.module.mjs +87 -84
- package/esm2020/lib/view-context/smart-view-context.service.mjs +536 -510
- package/esm2020/lib/view-context/smart-view-redirect/smart-view-redirect.mjs +33 -33
- package/esm2020/lib/view-context/value-api/api/api.mjs +4 -4
- package/esm2020/lib/view-context/value-api/api/value.service.mjs +138 -138
- package/esm2020/lib/view-context/value-api/api.module.mjs +40 -40
- package/esm2020/lib/view-context/value-api/configuration.mjs +91 -91
- package/esm2020/lib/view-context/value-api/encoder.mjs +19 -19
- package/esm2020/lib/view-context/value-api/index.mjs +7 -7
- package/esm2020/lib/view-context/value-api/model/models.mjs +9 -9
- package/esm2020/lib/view-context/value-api/model/value.mjs +13 -13
- package/esm2020/lib/view-context/value-api/model/valueSetData.mjs +13 -13
- package/esm2020/lib/view-context/value-api/model/valueSetDefinition.mjs +2 -2
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionData.mjs +2 -2
- package/esm2020/lib/view-context/value-api/model/valueSetDefinitionKind.mjs +23 -23
- package/esm2020/lib/view-context/value-api/model/valueSetExpression.mjs +2 -2
- package/esm2020/lib/view-context/value-api/model/valueSetOperand.mjs +2 -2
- package/esm2020/lib/view-context/value-api/model/valueSetOperation.mjs +18 -18
- package/esm2020/lib/view-context/value-api/param.mjs +2 -2
- package/esm2020/lib/view-context/value-api/variables.mjs +9 -9
- package/esm2020/projects.mjs +9 -9
- package/esm2020/smartbit4all-ng-client.mjs +4 -4
- package/fesm2015/smartbit4all-ng-client.mjs +4688 -4336
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +4668 -4291
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/session/api/api/api.d.ts +3 -3
- package/lib/session/api/api/session.service.d.ts +107 -107
- package/lib/session/api/configuration.d.ts +104 -104
- package/lib/session/api/encoder.d.ts +11 -11
- package/lib/session/api/index.d.ts +2 -2
- package/lib/session/api/model/accountInfo.d.ts +22 -22
- package/lib/session/api/model/apiError.d.ts +15 -15
- package/lib/session/api/model/authenticationProviderData.d.ts +17 -17
- package/lib/session/api/model/getAuthenticationProvidersResponse.d.ts +15 -15
- package/lib/session/api/model/models.d.ts +8 -8
- package/lib/session/api/model/refreshSessionRequest.d.ts +14 -14
- package/lib/session/api/model/session.d.ts +32 -32
- package/lib/session/api/model/sessionInfoData.d.ts +22 -22
- package/lib/session/api/model/userActivityLog.d.ts +33 -33
- package/lib/session/api/param.d.ts +37 -37
- package/lib/session/api/variables.d.ts +8 -8
- package/lib/session/cookie-service/smart-cookie.service.d.ts +129 -129
- package/lib/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.component.d.ts +28 -28
- package/lib/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.service.d.ts +18 -18
- package/lib/session/dev-tool/smart-dev-tool-floating-button/smart-dev-tool-floating-button.component.d.ts +15 -15
- package/lib/session/dev-tool/smart-dev-tool.interceptor.d.ts +18 -18
- package/lib/session/dev-tool/smart-dev-tool.service.d.ts +57 -57
- package/lib/session/projects.d.ts +8 -8
- package/lib/session/smart-error-catching.interceptor.d.ts +13 -13
- package/lib/session/smart-header-maintainer.interceptor.d.ts +11 -11
- package/lib/session/smart-session-handler.service.d.ts +11 -11
- package/lib/session/smart-session.module.d.ts +15 -15
- package/lib/session/smart-session.service.d.ts +54 -54
- package/lib/session/smart-timer/smart-session-timer.component.d.ts +14 -14
- package/lib/session/smart-timer/smart-session-timer.service.d.ts +21 -21
- package/lib/smart-client/projects.d.ts +4 -4
- package/lib/smart-client/smart-authentication.service.d.ts +15 -15
- package/lib/smart-client/smart-component-api-client.d.ts +71 -71
- package/lib/smart-client/smart.component.d.ts +11 -11
- package/lib/smart-client/smart.service.d.ts +11 -11
- package/lib/smart-ng-client.module.d.ts +8 -8
- package/lib/smart-ng-client.service.d.ts +10 -10
- package/lib/view-context/api/api/api.d.ts +3 -3
- package/lib/view-context/api/api/view.service.d.ts +313 -266
- package/lib/view-context/api/api.module.d.ts +11 -11
- package/lib/view-context/api/configuration.d.ts +104 -104
- package/lib/view-context/api/encoder.d.ts +11 -11
- package/lib/view-context/api/index.d.ts +6 -6
- package/lib/view-context/api/model/closeResult.d.ts +17 -17
- package/lib/view-context/api/model/componentConstraint.d.ts +25 -25
- package/lib/view-context/api/model/componentModel.d.ts +35 -31
- package/lib/view-context/api/model/componentModelChange.d.ts +29 -29
- package/lib/view-context/api/model/dataChange.d.ts +27 -27
- package/lib/view-context/api/model/dataChangeEvent.d.ts +33 -33
- package/lib/view-context/api/model/dataChangeKind.d.ts +20 -20
- package/lib/view-context/api/model/messageData.d.ts +29 -29
- package/lib/view-context/api/model/messageOption.d.ts +20 -20
- package/lib/view-context/api/model/messageOptionType.d.ts +17 -17
- package/lib/view-context/api/model/messageResult.d.ts +16 -16
- package/lib/view-context/api/model/messageType.d.ts +18 -18
- package/lib/view-context/api/model/models.d.ts +39 -36
- package/lib/view-context/api/model/openPendingData.d.ts +22 -22
- package/lib/view-context/api/model/smartLinkData.d.ts +21 -21
- package/lib/view-context/api/model/uiAction.d.ts +29 -29
- package/lib/view-context/api/model/uiActionButtonDescriptor.d.ts +18 -18
- package/lib/view-context/api/model/uiActionButtonIconPos.d.ts +19 -19
- package/lib/view-context/api/model/uiActionButtonType.d.ts +24 -24
- package/lib/view-context/api/model/uiActionConstraint.d.ts +22 -0
- package/lib/view-context/api/model/uiActionDescriptor.d.ts +36 -34
- package/lib/view-context/api/model/uiActionDialogDescriptor.d.ts +23 -23
- package/lib/view-context/api/model/uiActionFeedbackType.d.ts +19 -19
- package/lib/view-context/api/model/uiActionInputType.d.ts +20 -18
- package/lib/view-context/api/model/uiActionRequest.d.ts +28 -28
- package/lib/view-context/api/model/uiActionUploadDescriptor.d.ts +23 -0
- package/lib/view-context/api/model/uploadedFile.d.ts +19 -0
- package/lib/view-context/api/model/valueSet.d.ts +20 -20
- package/lib/view-context/api/model/view.d.ts +68 -68
- package/lib/view-context/api/model/viewApiError.d.ts +18 -18
- package/lib/view-context/api/model/viewConstraint.d.ts +18 -18
- package/lib/view-context/api/model/viewContext.d.ts +22 -22
- package/lib/view-context/api/model/viewContextChange.d.ts +20 -20
- package/lib/view-context/api/model/viewContextData.d.ts +19 -19
- package/lib/view-context/api/model/viewContextUpdate.d.ts +22 -22
- package/lib/view-context/api/model/viewData.d.ts +27 -27
- package/lib/view-context/api/model/viewEventHandler.d.ts +30 -30
- package/lib/view-context/api/model/viewState.d.ts +21 -21
- package/lib/view-context/api/model/viewStateUpdate.d.ts +24 -24
- package/lib/view-context/api/model/viewType.d.ts +17 -17
- package/lib/view-context/api/param.d.ts +37 -37
- package/lib/view-context/api/variables.d.ts +8 -8
- package/lib/view-context/message-dialog/message-dialog.component.d.ts +17 -17
- package/lib/view-context/projects.d.ts +13 -13
- package/lib/view-context/property-definition-data.d.ts +5 -5
- package/lib/view-context/smart-ui-action/components/success-snack-bar/success-snack-bar.component.d.ts +13 -13
- package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.d.ts +25 -25
- package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.d.ts +18 -18
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.d.ts +30 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +22 -0
- package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.d.ts +29 -29
- package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.d.ts +25 -25
- package/lib/view-context/smart-ui-action/ui-action-toolbar.component.d.ts +30 -30
- package/lib/view-context/smart-ui-action/ui-action.descriptor.service.d.ts +21 -21
- package/lib/view-context/smart-ui-action/ui-action.model.d.ts +32 -32
- package/lib/view-context/smart-ui-action/ui-action.service.d.ts +37 -34
- package/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.component.d.ts +13 -13
- package/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.d.ts +19 -19
- package/lib/view-context/smart-view-context.interceptor.d.ts +13 -13
- package/lib/view-context/smart-view-context.model.d.ts +30 -30
- package/lib/view-context/smart-view-context.module.d.ts +21 -20
- package/lib/view-context/smart-view-context.service.d.ts +106 -102
- package/lib/view-context/smart-view-redirect/smart-view-redirect.d.ts +14 -14
- package/lib/view-context/value-api/api/api.d.ts +3 -3
- package/lib/view-context/value-api/api/value.service.d.ts +35 -35
- package/lib/view-context/value-api/api.module.d.ts +11 -11
- package/lib/view-context/value-api/configuration.d.ts +104 -104
- package/lib/view-context/value-api/encoder.d.ts +11 -11
- package/lib/view-context/value-api/index.d.ts +6 -6
- package/lib/view-context/value-api/model/models.d.ts +8 -8
- package/lib/view-context/value-api/model/value.d.ts +29 -29
- package/lib/view-context/value-api/model/valueSetData.d.ts +41 -41
- package/lib/view-context/value-api/model/valueSetDefinition.d.ts +16 -16
- package/lib/view-context/value-api/model/valueSetDefinitionData.d.ts +55 -55
- package/lib/view-context/value-api/model/valueSetDefinitionKind.d.ts +23 -23
- package/lib/view-context/value-api/model/valueSetExpression.d.ts +20 -20
- package/lib/view-context/value-api/model/valueSetOperand.d.ts +25 -25
- package/lib/view-context/value-api/model/valueSetOperation.d.ts +18 -18
- package/lib/view-context/value-api/param.d.ts +37 -37
- package/lib/view-context/value-api/variables.d.ts +8 -8
- package/package.json +1 -1
- package/projects.d.ts +5 -5
- package/schematics/collection.json +11 -11
- package/schematics/smart-component/index.ts +26 -26
- package/schematics/smart-component/schema.json +20 -20
- package/schematics/smart-component/smart-component.schema.ts +4 -4
- package/schematics/smart-component/templates/__name@dasherize__.component.html.template +2 -2
- package/schematics/smart-component/templates/__name@dasherize__.component.ts.template +26 -26
- package/smartbit4all-ng-client-1.1.31.tgz +0 -0
- package/smartbit4all-ng-client.d.ts +5 -5
- package/src/lib/session/api/README.md +226 -226
- package/src/lib/view-context/api/README.md +226 -226
- package/src/lib/view-context/value-api/README.md +226 -226
- package/smartbit4all-ng-client-1.1.29.tgz +0 -0
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Subject, takeUntil } from 'rxjs';
|
|
3
|
-
import { SmartSubject } from '@smartbit4all/subject';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "../smart-session.service";
|
|
6
|
-
export class SmartSessionTimerService {
|
|
7
|
-
constructor(session) {
|
|
8
|
-
this.session = session;
|
|
9
|
-
this._destroy$ = new Subject();
|
|
10
|
-
this.totalTimeInMinutes = 30;
|
|
11
|
-
this.sessionExpiration = 'sessionExpiracy';
|
|
12
|
-
this.timeChanged = new SmartSubject(this._destroy$);
|
|
13
|
-
this.onTimerExpired = new SmartSubject(this._destroy$);
|
|
14
|
-
this.session.sessionExpiracyChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
15
|
-
this.restart();
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
ngOnDestroy() {
|
|
19
|
-
this._destroy$.next();
|
|
20
|
-
this._destroy$.complete();
|
|
21
|
-
}
|
|
22
|
-
startTimer() {
|
|
23
|
-
let sessionInfoData = this.session.sessionInfoData;
|
|
24
|
-
let expiration = new Date(sessionInfoData.expiration);
|
|
25
|
-
let now = new Date();
|
|
26
|
-
this.timeLeftInSeconds = Math.floor((expiration.getTime() - now.getTime()) / 1000);
|
|
27
|
-
this.timer = setInterval(() => {
|
|
28
|
-
this.timeLeftInSeconds--;
|
|
29
|
-
if (this.timeLeftInSeconds === 0) {
|
|
30
|
-
this.timeout();
|
|
31
|
-
}
|
|
32
|
-
this.timeChanged.next();
|
|
33
|
-
}, 1000);
|
|
34
|
-
}
|
|
35
|
-
restart() {
|
|
36
|
-
clearInterval(this.timer);
|
|
37
|
-
this.startTimer();
|
|
38
|
-
}
|
|
39
|
-
timeout() {
|
|
40
|
-
clearInterval(this.timer);
|
|
41
|
-
this.onTimerExpired.next();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
SmartSessionTimerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, deps: [{ token: i1.SmartSessionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
-
SmartSessionTimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, providedIn: 'root' });
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, decorators: [{
|
|
47
|
-
type: Injectable,
|
|
48
|
-
args: [{
|
|
49
|
-
providedIn: 'root',
|
|
50
|
-
}]
|
|
51
|
-
}], ctorParameters: function () { return [{ type: i1.SmartSessionService }]; } });
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
3
|
+
import { SmartSubject } from '@smartbit4all/subject';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../smart-session.service";
|
|
6
|
+
export class SmartSessionTimerService {
|
|
7
|
+
constructor(session) {
|
|
8
|
+
this.session = session;
|
|
9
|
+
this._destroy$ = new Subject();
|
|
10
|
+
this.totalTimeInMinutes = 30;
|
|
11
|
+
this.sessionExpiration = 'sessionExpiracy';
|
|
12
|
+
this.timeChanged = new SmartSubject(this._destroy$);
|
|
13
|
+
this.onTimerExpired = new SmartSubject(this._destroy$);
|
|
14
|
+
this.session.sessionExpiracyChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
15
|
+
this.restart();
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
ngOnDestroy() {
|
|
19
|
+
this._destroy$.next();
|
|
20
|
+
this._destroy$.complete();
|
|
21
|
+
}
|
|
22
|
+
startTimer() {
|
|
23
|
+
let sessionInfoData = this.session.sessionInfoData;
|
|
24
|
+
let expiration = new Date(sessionInfoData.expiration);
|
|
25
|
+
let now = new Date();
|
|
26
|
+
this.timeLeftInSeconds = Math.floor((expiration.getTime() - now.getTime()) / 1000);
|
|
27
|
+
this.timer = setInterval(() => {
|
|
28
|
+
this.timeLeftInSeconds--;
|
|
29
|
+
if (this.timeLeftInSeconds === 0) {
|
|
30
|
+
this.timeout();
|
|
31
|
+
}
|
|
32
|
+
this.timeChanged.next();
|
|
33
|
+
}, 1000);
|
|
34
|
+
}
|
|
35
|
+
restart() {
|
|
36
|
+
clearInterval(this.timer);
|
|
37
|
+
this.startTimer();
|
|
38
|
+
}
|
|
39
|
+
timeout() {
|
|
40
|
+
clearInterval(this.timer);
|
|
41
|
+
this.onTimerExpired.next();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
SmartSessionTimerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, deps: [{ token: i1.SmartSessionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
SmartSessionTimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, providedIn: 'root' });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, decorators: [{
|
|
47
|
+
type: Injectable,
|
|
48
|
+
args: [{
|
|
49
|
+
providedIn: 'root',
|
|
50
|
+
}]
|
|
51
|
+
}], ctorParameters: function () { return [{ type: i1.SmartSessionService }]; } });
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQtc2Vzc2lvbi10aW1lci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc21hcnQtbmctY2xpZW50L3NyYy9saWIvc2Vzc2lvbi9zbWFydC10aW1lci9zbWFydC1zZXNzaW9uLXRpbWVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBYSxNQUFNLGVBQWUsQ0FBQztBQUN0RCxPQUFPLEVBQUUsT0FBTy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21wbGV0ZSgpO1xuICB9XG5cbiAgc3RhcnRUaW1lcigpOiB2b2lkIHtcbiAgICBsZXQgc2Vzc2lvbkluZm9EYXRhID0gdGhpcy5zZXNzaW9uLnNlc3Npb25JbmZvRGF0YTtcbiAgICBsZXQgZXhwaXJhdGlvbiA9IG5ldyBEYXRlKHNlc3Npb25JbmZvRGF0YSEuZXhwaXJhdGlvbiEpO1xuICAgIGxldCBub3cgPSBuZXcgRGF0ZSgpO1xuXG4gICAgdGhpcy50aW1lTGVmdEluU2Vjb25kcyA9IE1hdGguZmxvb3IoKGV4cGlyYXRpb24uZ2V0VGltZSgpIC0gbm93LmdldFRpbWUoKSkgLyAxMDAwKTtcbiAgICB0aGlzLnRpbWVyID0gc2V0SW50ZXJ2YWwoKCkgPT4ge1xuICAgICAgdGhpcy50aW1lTGVmdEluU2Vjb25kcyEtLTtcbiAgICAgIGlmICh0aGlzLnRpbWVMZWZ0SW5TZWNvbmRzID09PSAwKSB7XG4gICAgICAgIHRoaXMudGltZW91dCgpO1xuICAgICAgfVxuICAgICAgdGhpcy50aW1lQ2hhbmdlZC5uZXh0KCk7XG4gICAgfSwgMTAwMCk7XG4gIH1cblxuICByZXN0YXJ0KCk6IHZvaWQge1xuICAgIGNsZWFySW50ZXJ2YWwodGhpcy50aW1lcik7XG5cbiAgICB0aGlzLnN0YXJ0VGltZXIoKTtcbiAgfVxuXG4gIHRpbWVvdXQoKTogdm9pZCB7XG4gICAgY2xlYXJJbnRlcnZhbCh0aGlzLnRpbWVyKTtcblxuICAgIHRoaXMub25UaW1lckV4cGlyZWQubmV4dCgpO1xuICB9XG59XG4iXX0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './smart-authentication.service';
|
|
2
|
-
export * from './smart.component';
|
|
3
|
-
export * from './smart-component-api-client';
|
|
4
|
-
export * from './smart.service';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './smart-authentication.service';
|
|
2
|
+
export * from './smart.component';
|
|
3
|
+
export * from './smart-component-api-client';
|
|
4
|
+
export * from './smart.service';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvamVjdHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zbWFydC1uZy1jbGllbnQvc3JjL2xpYi9zbWFydC1jbGllbnQvcHJvamVjdHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxpQkFBaUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc21hcnQtYXV0aGVudGljYXRpb24uc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL3NtYXJ0LmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL3NtYXJ0LWNvbXBvbmVudC1hcGktY2xpZW50JztcbmV4cG9ydCAqIGZyb20gJy4vc21hcnQuc2VydmljZSc7XG4iXX0=
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { SmartSubject } from '@smartbit4all/subject';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class SmartAuthService {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.bffApisHaveBeenSetUp = false;
|
|
8
|
-
this._destroy$ = new Subject();
|
|
9
|
-
this.headersUpdated = new SmartSubject(this._destroy$);
|
|
10
|
-
}
|
|
11
|
-
ngOnDestroy() {
|
|
12
|
-
this._destroy$.next();
|
|
13
|
-
this._destroy$.complete();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
SmartAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
-
SmartAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService });
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, decorators: [{
|
|
19
|
-
type: Injectable
|
|
20
|
-
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { SmartSubject } from '@smartbit4all/subject';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class SmartAuthService {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.bffApisHaveBeenSetUp = false;
|
|
8
|
+
this._destroy$ = new Subject();
|
|
9
|
+
this.headersUpdated = new SmartSubject(this._destroy$);
|
|
10
|
+
}
|
|
11
|
+
ngOnDestroy() {
|
|
12
|
+
this._destroy$.next();
|
|
13
|
+
this._destroy$.complete();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
SmartAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
+
SmartAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, decorators: [{
|
|
19
|
+
type: Injectable
|
|
20
|
+
}] });
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnQtYXV0aGVudGljYXRpb24uc2VydmljZS5qcyIsInNv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