@dsivd/prestations-ng 14.5.17-beta1 → 14.5.17-beta2
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/CHANGELOG.md +0 -7
- package/bundles/dsivd-prestations-ng.umd.js +22 -52
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v14.5.17-beta2.tgz +0 -0
- package/esm2015/abstract-page-component.js +4 -6
- package/esm2015/foehn-page/foehn-page.component.js +1 -2
- package/esm2015/sdk-session-info/session-info.service.js +23 -52
- package/fesm2015/dsivd-prestations-ng.js +23 -53
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/package.json +1 -1
- package/sdk-session-info/session-info.service.d.ts +1 -8
- package/dsivd-prestations-ng-v14.5.17-beta1.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -30,13 +30,6 @@ A change is considered **breaking** if you have to change your code or update yo
|
|
|
30
30
|
|
|
31
31
|
### Updated
|
|
32
32
|
|
|
33
|
-
- [session-info.service.ts](projects/prestations-ng/src/sdk-session-info/session-info.service.ts)
|
|
34
|
-
- `SessionInfoData` data getter now depends on `neverConnected` attribute to avoid unnecessary calls to sessionInfo api (PRESTAKIT-364).
|
|
35
|
-
- To retrieve `SessionInfoData` data from api url, you need to explicitly set `neverConnected` attribute to `false`.
|
|
36
|
-
|
|
37
|
-
- [foehn-page.component.ts](projects/prestations-ng/src/foehn-page/foehn-page.component.ts)
|
|
38
|
-
- `@Input() neverConnected` is now set to `false` by default to retrieve `SessionInfoData` data for backwards compatibility purposes.
|
|
39
|
-
|
|
40
33
|
- [support-alert.service.ts](projects/prestations-ng/src/sdk-support-alert/support-alert.service.ts)
|
|
41
34
|
- removed `setRefreshIntervalInSeconds(refreshIntervalsInSeconds: number)`, support alerts are now refreshed on every NavigationStart event from the Angular Router, but at most every 3 minutes.
|
|
42
35
|
- [foehn-page.component.html](projects/prestations-ng/src/foehn-page/foehn-page.component.html)
|
|
@@ -867,79 +867,52 @@
|
|
|
867
867
|
|
|
868
868
|
var SESSION_INFO_API_URL = 'api/sessionInfo/data';
|
|
869
869
|
var SessionInfo = /** @class */ (function () {
|
|
870
|
-
function SessionInfo(http
|
|
870
|
+
function SessionInfo(http) {
|
|
871
871
|
this.http = http;
|
|
872
|
-
this.growlService = growlService;
|
|
873
|
-
this.ngZone = ngZone;
|
|
874
|
-
this.neverConnected_ = new rxjs.BehaviorSubject(undefined);
|
|
875
872
|
}
|
|
876
873
|
Object.defineProperty(SessionInfo.prototype, "data", {
|
|
877
874
|
get: function () {
|
|
878
875
|
var _this = this;
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
}
|
|
892
|
-
return _this.onMicroTaskEmptyPulling_;
|
|
893
|
-
}
|
|
894
|
-
else {
|
|
895
|
-
if (!_this.pulling_) {
|
|
896
|
-
_this.pulling_ = _this.http
|
|
897
|
-
.get(SESSION_INFO_API_URL)
|
|
898
|
-
.pipe(operators.catchError(function () {
|
|
899
|
-
var message = 'Impossible de récupérer les informations de la personne connectée';
|
|
900
|
-
_this.growlService.addWithType(GrowlType.DANGER, message);
|
|
901
|
-
return rxjs.of(null);
|
|
902
|
-
}), operators.map(function (r) {
|
|
903
|
-
if (r) {
|
|
904
|
-
return (_this.sessionData = r);
|
|
905
|
-
}
|
|
906
|
-
return null;
|
|
907
|
-
}), operators.shareReplay(1));
|
|
908
|
-
}
|
|
909
|
-
return _this.pulling_;
|
|
876
|
+
if (this.neverConnected_) {
|
|
877
|
+
return rxjs.of(null);
|
|
878
|
+
}
|
|
879
|
+
else {
|
|
880
|
+
if (!this.pulling_) {
|
|
881
|
+
this.pulling_ = this.http
|
|
882
|
+
.get(SESSION_INFO_API_URL)
|
|
883
|
+
.pipe(operators.map(function (r) {
|
|
884
|
+
if (r) {
|
|
885
|
+
return (_this.sessionData = r);
|
|
886
|
+
}
|
|
887
|
+
return null;
|
|
888
|
+
}), operators.shareReplay(1));
|
|
910
889
|
}
|
|
911
|
-
|
|
890
|
+
return this.pulling_;
|
|
891
|
+
}
|
|
912
892
|
},
|
|
913
893
|
enumerable: false,
|
|
914
894
|
configurable: true
|
|
915
895
|
});
|
|
916
896
|
Object.defineProperty(SessionInfo.prototype, "neverConnected", {
|
|
917
897
|
get: function () {
|
|
918
|
-
return this.neverConnected_
|
|
898
|
+
return this.neverConnected_;
|
|
919
899
|
},
|
|
920
900
|
set: function (neverConnected) {
|
|
921
|
-
this.neverConnected_
|
|
901
|
+
this.neverConnected_ = neverConnected;
|
|
922
902
|
},
|
|
923
903
|
enumerable: false,
|
|
924
904
|
configurable: true
|
|
925
905
|
});
|
|
926
|
-
SessionInfo.prototype.logErrorNeverConnectedIsNotSet = function () {
|
|
927
|
-
// Use of setTimeout to avoid unnecessary error log
|
|
928
|
-
this.timeoutLogError = setTimeout(function () {
|
|
929
|
-
console.error("Error: 'neverConnected' is not set. " +
|
|
930
|
-
'Find more at https://dsi-vd.github.io/prestations-ng/CHANGELOG.md#_14_5_16_');
|
|
931
|
-
}, 2000);
|
|
932
|
-
};
|
|
933
906
|
return SessionInfo;
|
|
934
907
|
}());
|
|
935
|
-
SessionInfo.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SessionInfo, deps: [{ token: i1__namespace.HttpClient }
|
|
908
|
+
SessionInfo.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SessionInfo, deps: [{ token: i1__namespace.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
936
909
|
SessionInfo.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SessionInfo, providedIn: 'root' });
|
|
937
910
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: SessionInfo, decorators: [{
|
|
938
911
|
type: i0.Injectable,
|
|
939
912
|
args: [{
|
|
940
913
|
providedIn: 'root'
|
|
941
914
|
}]
|
|
942
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.HttpClient }
|
|
915
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.HttpClient }]; } });
|
|
943
916
|
|
|
944
917
|
var GesdemHandlerService = /** @class */ (function () {
|
|
945
918
|
function GesdemHandlerService(http, growlService, validationHandlerService, router, route, errorHandlerService, sessionInfo) {
|
|
@@ -3289,14 +3262,12 @@
|
|
|
3289
3262
|
else {
|
|
3290
3263
|
this._validationHandlerService.shouldDisplayErrors(true);
|
|
3291
3264
|
}
|
|
3292
|
-
this.sendForFormConcurrentSafe
|
|
3293
|
-
.pipe(operators.first())
|
|
3294
|
-
.subscribe(function () { return _this.onFormSent(goToNextPage); });
|
|
3265
|
+
this.sendForFormConcurrentSafe.subscribe(function () { return _this.onFormSent(goToNextPage); });
|
|
3295
3266
|
};
|
|
3296
3267
|
AbstractPageComponent.prototype.transmit = function () {
|
|
3297
3268
|
var _this = this;
|
|
3298
3269
|
this._validationHandlerService.shouldDisplayErrors(true);
|
|
3299
|
-
this.transmitConcurrentSafe.
|
|
3270
|
+
this.transmitConcurrentSafe.subscribe(function () {
|
|
3300
3271
|
if (!_this._gesdemService.lastResponse.errors.length) {
|
|
3301
3272
|
_this._gesdemEventService.formTransmittedSubject.next(_this._gesdemService.lastResponse);
|
|
3302
3273
|
_this._navigation.next();
|
|
@@ -5766,7 +5737,6 @@
|
|
|
5766
5737
|
this.sessionInfo = sessionInfo;
|
|
5767
5738
|
this.foehnPageModalService = foehnPageModalService;
|
|
5768
5739
|
this.sdkDictionaryService = sdkDictionaryService;
|
|
5769
|
-
this.neverConnected = false;
|
|
5770
5740
|
this.supportAlertEnabled = true;
|
|
5771
5741
|
this.userConnectedAsDisplayed = true;
|
|
5772
5742
|
this.confirmLeavingAlert = {
|