@dsivd/prestations-ng 14.5.17-beta1 → 14.5.19
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 +12 -7
- package/bundles/dsivd-prestations-ng.umd.js +37 -70
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v14.5.19.tgz +0 -0
- package/esm2015/abstract-page-component.js +4 -6
- package/esm2015/foehn-confirm-modal/foehn-confirm-modal-content.js +1 -1
- package/esm2015/foehn-confirm-modal/foehn-confirm-modal.component.js +2 -2
- package/esm2015/foehn-list/foehn-list.component.js +2 -4
- package/esm2015/foehn-page/foehn-page.component.js +1 -2
- package/esm2015/foehn-table/foehn-table.component.js +2 -4
- package/esm2015/helpers/object.helper.js +13 -12
- package/esm2015/sdk-session-info/session-info.service.js +23 -52
- package/fesm2015/dsivd-prestations-ng.js +38 -71
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/foehn-confirm-modal/foehn-confirm-modal-content.d.ts +1 -0
- 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
|
@@ -25,17 +25,22 @@ A change is considered **breaking** if you have to change your code or update yo
|
|
|
25
25
|
- adding a new constructor argument in one of our service is OK, if you just have to update your constructor's signature and your call to `super(...)`
|
|
26
26
|
|
|
27
27
|
---
|
|
28
|
+
## [14.5.19]
|
|
29
|
+
### Added
|
|
30
|
+
- [foehn-confirm-modal.component.html](projects/prestations-ng/src/foehn-confirm-modal/foehn-confirm-modal.component.html)
|
|
31
|
+
- Add closeable on FoehnConfirmModalContent. Default value is true. If false, modal has to be closed by the yes and no buttons.
|
|
28
32
|
|
|
29
|
-
## [14.5.
|
|
33
|
+
## [14.5.18]
|
|
34
|
+
### Fixed
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
- [object.helper.ts](projects/prestations-ng/src/helpers/object.helper.ts)
|
|
37
|
+
- Fix isEqual method for arrays. The issue was if first array has same objects but less items.
|
|
38
|
+
- This issue impacts foehn-select, foehn-list and foehn-table
|
|
39
|
+
|
|
32
40
|
|
|
33
|
-
|
|
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`.
|
|
41
|
+
## [14.5.17]
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
- `@Input() neverConnected` is now set to `false` by default to retrieve `SessionInfoData` data for backwards compatibility purposes.
|
|
43
|
+
### Updated
|
|
39
44
|
|
|
40
45
|
- [support-alert.service.ts](projects/prestations-ng/src/sdk-support-alert/support-alert.service.ts)
|
|
41
46
|
- removed `setRefreshIntervalInSeconds(refreshIntervalsInSeconds: number)`, support alerts are now refreshed on every NavigationStart event from the Angular Router, but at most every 3 minutes.
|
|
@@ -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();
|
|
@@ -4873,18 +4844,19 @@
|
|
|
4873
4844
|
value2 &&
|
|
4874
4845
|
typeof value1 === 'object' &&
|
|
4875
4846
|
typeof value2 === 'object') {
|
|
4876
|
-
var matches_1 = function (obj, source) { return Object.keys(source).
|
|
4877
|
-
|
|
4878
|
-
if (obj
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4847
|
+
var matches_1 = function (obj, source) { return Object.keys(source).length === Object.keys(obj).length &&
|
|
4848
|
+
Object.keys(source).every(function (key) {
|
|
4849
|
+
if (obj.hasOwnProperty(key)) {
|
|
4850
|
+
if (obj[key] &&
|
|
4851
|
+
source[key] &&
|
|
4852
|
+
typeof obj[key] === 'object' &&
|
|
4853
|
+
typeof source[key] === 'object') {
|
|
4854
|
+
return matches_1(obj[key], source[key]);
|
|
4855
|
+
}
|
|
4856
|
+
return obj[key] === source[key];
|
|
4883
4857
|
}
|
|
4884
|
-
return
|
|
4885
|
-
}
|
|
4886
|
-
return false;
|
|
4887
|
-
}); };
|
|
4858
|
+
return false;
|
|
4859
|
+
}); };
|
|
4888
4860
|
return matches_1(value1, value2);
|
|
4889
4861
|
}
|
|
4890
4862
|
return value1 === value2;
|
|
@@ -5740,7 +5712,7 @@
|
|
|
5740
5712
|
return FoehnConfirmModalComponent;
|
|
5741
5713
|
}());
|
|
5742
5714
|
FoehnConfirmModalComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnConfirmModalComponent, deps: [{ token: FoehnConfirmModalService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
5743
|
-
FoehnConfirmModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnConfirmModalComponent, selector: "foehn-confirm-modal", ngImport: i0__namespace, template: "<foehn-modal\n [modalHeaderText]=\"modalContent.title || 'Confirmation'\"\n modalSize=\"modal-md\"\n [isModalVisible]=\"isVisible\"\n (isModalVisibleChange)=\"updateVisibilityStatus($event)\"\n *ngIf=\"content | async as modalContent\"\n>\n <p [innerHTML]=\"modalContent.htmlContent\"></p>\n\n <div modal-footer>\n <div class=\"d-flex justify-content-end mr-2 mb-2 mt-2\">\n <button\n id=\"confirmButton\"\n class=\"btn btn-secondary\"\n (click)=\"cancel()\"\n >\n {{ modalContent.cancelButtonLabel || 'Annuler' }}\n </button>\n <button\n id=\"cancelButton\"\n class=\"btn btn-primary ml-3\"\n (click)=\"ok()\"\n >\n {{ modalContent.okButtonLabel || 'Confirmer' }}\n </button>\n </div>\n </div>\n</foehn-modal>\n", components: [{ type: FoehnModalComponent, selector: "foehn-modal", inputs: ["id", "name", "modalSize", "modalBodyText", "modalHeaderText", "modalFooterText", "closeable", "modalTriggerHtmlElement", "isModalVisible"], outputs: ["isModalVisibleChange"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3__namespace.AsyncPipe } });
|
|
5715
|
+
FoehnConfirmModalComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnConfirmModalComponent, selector: "foehn-confirm-modal", ngImport: i0__namespace, template: "<foehn-modal\n [modalHeaderText]=\"modalContent.title || 'Confirmation'\"\n modalSize=\"modal-md\"\n [isModalVisible]=\"isVisible\"\n (isModalVisibleChange)=\"updateVisibilityStatus($event)\"\n [closeable]=\"\n modalContent.closeable !== null && modalContent.closeable !== undefined\n ? modalContent.closeable\n : true\n \"\n *ngIf=\"content | async as modalContent\"\n>\n <p [innerHTML]=\"modalContent.htmlContent\"></p>\n\n <div modal-footer>\n <div class=\"d-flex justify-content-end mr-2 mb-2 mt-2\">\n <button\n id=\"confirmButton\"\n class=\"btn btn-secondary\"\n (click)=\"cancel()\"\n >\n {{ modalContent.cancelButtonLabel || 'Annuler' }}\n </button>\n <button\n id=\"cancelButton\"\n class=\"btn btn-primary ml-3\"\n (click)=\"ok()\"\n >\n {{ modalContent.okButtonLabel || 'Confirmer' }}\n </button>\n </div>\n </div>\n</foehn-modal>\n", components: [{ type: FoehnModalComponent, selector: "foehn-modal", inputs: ["id", "name", "modalSize", "modalBodyText", "modalHeaderText", "modalFooterText", "closeable", "modalTriggerHtmlElement", "isModalVisible"], outputs: ["isModalVisibleChange"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i3__namespace.AsyncPipe } });
|
|
5744
5716
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnConfirmModalComponent, decorators: [{
|
|
5745
5717
|
type: i0.Component,
|
|
5746
5718
|
args: [{
|
|
@@ -5766,7 +5738,6 @@
|
|
|
5766
5738
|
this.sessionInfo = sessionInfo;
|
|
5767
5739
|
this.foehnPageModalService = foehnPageModalService;
|
|
5768
5740
|
this.sdkDictionaryService = sdkDictionaryService;
|
|
5769
|
-
this.neverConnected = false;
|
|
5770
5741
|
this.supportAlertEnabled = true;
|
|
5771
5742
|
this.userConnectedAsDisplayed = true;
|
|
5772
5743
|
this.confirmLeavingAlert = {
|
|
@@ -9587,9 +9558,7 @@
|
|
|
9587
9558
|
}]
|
|
9588
9559
|
}] });
|
|
9589
9560
|
|
|
9590
|
-
var hasInputChanged$1 = function (change) { return !(
|
|
9591
|
-
!change.currentValue ||
|
|
9592
|
-
ObjectHelper.isEqual(change.previousValue, change.currentValue)); };
|
|
9561
|
+
var hasInputChanged$1 = function (change) { return change && !ObjectHelper.isEqual(change.previousValue, change.currentValue); };
|
|
9593
9562
|
var FoehnListComponent = /** @class */ (function () {
|
|
9594
9563
|
function FoehnListComponent() {
|
|
9595
9564
|
this.itemsPerPage = 10;
|
|
@@ -9747,9 +9716,7 @@
|
|
|
9747
9716
|
return PageChangeEvent;
|
|
9748
9717
|
}());
|
|
9749
9718
|
|
|
9750
|
-
var hasInputChanged = function (change) { return !(
|
|
9751
|
-
!change.currentValue ||
|
|
9752
|
-
ObjectHelper.isEqual(change.previousValue, change.currentValue)); };
|
|
9719
|
+
var hasInputChanged = function (change) { return change && !ObjectHelper.isEqual(change.previousValue, change.currentValue); };
|
|
9753
9720
|
var FoehnTableComponent = /** @class */ (function () {
|
|
9754
9721
|
function FoehnTableComponent() {
|
|
9755
9722
|
this.itemsPerPage = 10;
|