@dsivd/prestations-ng 14.5.14-beta3 → 14.5.15
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 +20 -0
- package/README.md +2 -0
- package/bundles/dsivd-prestations-ng.umd.js +50 -33
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v14.5.15.tgz +0 -0
- package/esm2015/foehn-list/foehn-list.component.js +13 -12
- package/esm2015/foehn-table/foehn-table.component.js +12 -7
- package/esm2015/foehn-table/tableSort.js +1 -1
- package/esm2015/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.js +4 -3
- package/esm2015/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.js +6 -3
- package/esm2015/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.js +7 -4
- package/esm2015/foehn-upload/foehn-multi-upload/multi-upload.service.js +4 -3
- package/esm2015/foehn-upload/foehn-multi-upload/pending-upload.service.js +4 -3
- package/esm2015/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.js +6 -3
- package/esm2015/foehn-upload/pending-upload.type.js +1 -1
- package/esm2015/gesdem-confirmation/gesdem-confirmation.component.js +2 -2
- package/esm2015/sdk-dictionary/default-dictionary.js +4 -3
- package/fesm2015/dsivd-prestations-ng.js +50 -33
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/foehn-list/foehn-list.component.d.ts +0 -1
- package/foehn-table/tableSort.d.ts +1 -1
- package/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.d.ts +1 -1
- package/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.d.ts +2 -1
- package/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.d.ts +2 -1
- package/foehn-upload/foehn-multi-upload/multi-upload.service.d.ts +1 -1
- package/foehn-upload/foehn-multi-upload/pending-upload.service.d.ts +1 -1
- package/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.d.ts +2 -1
- package/foehn-upload/pending-upload.type.d.ts +1 -0
- package/package.json +1 -1
- package/dsivd-prestations-ng-v14.5.14-beta3.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,26 @@ A change is considered **breaking** if you have to change your code or update yo
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
+
|
|
30
|
+
## [14.5.15]
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- [Autogenerated documentation](https://dsi-vd.github.io/prestations-ng/generateddoc)
|
|
34
|
+
- prestations-ng documentation generated automatically by `compodoc`
|
|
35
|
+
|
|
36
|
+
- [foehn-multi-upload.component.ts](projects/prestations-ng/src/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.ts)
|
|
37
|
+
- [foehn-bo-multi-upload.component.ts](projects/prestations-ng/src/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.ts)
|
|
38
|
+
- Add possibility to hide confirmation message when a file is saved. Default is message is displayed. To change default value, add [shouldDisplayFileSavedConfirmation]="false" in your upload
|
|
39
|
+
|
|
40
|
+
- [gesdem-confirmation.component.html](projects/prestations-ng/src/gesdem-confirmation/gesdem-confirmation.component.html)
|
|
41
|
+
- `telechargerBtn` (Télécharger la demande (pdf)) is also shown to a connected user
|
|
42
|
+
- `logoutBtn` (Se déconnecter) is shown to a connected user instead of `terminerBtn` (Terminer)
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- [foehn-table.component.ts](projects/prestations-ng/src/foehn-table/foehn-table.component.ts)
|
|
47
|
+
- table content was not being refreshed when sorting column
|
|
48
|
+
|
|
29
49
|
## [14.5.14]
|
|
30
50
|
|
|
31
51
|
### Added
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ Best practice guide online in our DSI WiKi at [https://portail.etat-de-vaud.ch/o
|
|
|
4
4
|
|
|
5
5
|
An implementation of [Foehn](https://dsi-vd.github.io/foehn-design-system/) with Angular for [PrestaKit](https://www.vd.ch/prestakit/).
|
|
6
6
|
|
|
7
|
+
The generated documentation of our entire library is available online at [https://dsi-vd.github.io/prestations-ng/generateddoc](https://dsi-vd.github.io/prestations-ng/generateddoc)
|
|
8
|
+
|
|
7
9
|
The documentation is available online at [https://dsi-vd.github.io/prestations-ng/](https://dsi-vd.github.io/prestations-ng/)
|
|
8
10
|
|
|
9
11
|
- If you're using **Angular 12**, use `@dsivd/prestations-ng` at version `^14.5.0`.
|
|
@@ -1867,6 +1867,7 @@
|
|
|
1867
1867
|
'gesdem-confirmation.mail-sent.label': 'Vous recevrez un email de confirmation dans quelques instants.',
|
|
1868
1868
|
'gesdem-confirmation.download-pdf-recap-button': 'Télécharger la demande (pdf)',
|
|
1869
1869
|
'gesdem-confirmation.exit-button': 'Terminer',
|
|
1870
|
+
'gesdem-confirmation.logout-button': 'Se déconnecter',
|
|
1870
1871
|
'gesdem-confirmation.extra-content': ' ',
|
|
1871
1872
|
'foehn-date-picker-button.icon-title': 'Afficher le calendrier',
|
|
1872
1873
|
'foehn-date-picker-button.screen-reader.selected-date': 'Date sélectionnée :',
|
|
@@ -1912,8 +1913,8 @@
|
|
|
1912
1913
|
'foehn-picture-upload.cancel-selection-label': 'Annuler',
|
|
1913
1914
|
'foehn-picture-upload.selection-not-validated-label': 'Merci de valider votre sélection',
|
|
1914
1915
|
'foehn-picture-upload.delete-picture-label': 'Supprimer',
|
|
1915
|
-
'foehn-table.totalElements': '{total} éléments
|
|
1916
|
-
'foehn-table.totalElements.1': '1 élément
|
|
1916
|
+
'foehn-table.totalElements': '{total} éléments trouvés',
|
|
1917
|
+
'foehn-table.totalElements.1': '1 élément trouvé',
|
|
1917
1918
|
'foehn-table.totalElements.0': 'Aucun résultat'
|
|
1918
1919
|
};
|
|
1919
1920
|
|
|
@@ -2932,7 +2933,7 @@
|
|
|
2932
2933
|
});
|
|
2933
2934
|
this.uploaderHelper = new UploaderHelper(dictionaryService, applicationInfoService);
|
|
2934
2935
|
}
|
|
2935
|
-
MultiUploadService.prototype.uploadDocuments = function (baseUrl, formKey, label, files, key, isMultiple, language) {
|
|
2936
|
+
MultiUploadService.prototype.uploadDocuments = function (baseUrl, formKey, label, files, key, isMultiple, language, shouldDisplayFileSavedConfirmation) {
|
|
2936
2937
|
var _this = this;
|
|
2937
2938
|
if (this.reference) {
|
|
2938
2939
|
var documents = files.map(function (file) { return _this.uploaderHelper.mapToDocumentReference(file, label, key, isMultiple, _this.uniqPrefix, _this.globalSequence++); });
|
|
@@ -2942,7 +2943,8 @@
|
|
|
2942
2943
|
.post(url, formData)
|
|
2943
2944
|
.pipe(operators.tap(function (result) {
|
|
2944
2945
|
var successfulDocumentsCount = result.documents && result.documents.length;
|
|
2945
|
-
if (successfulDocumentsCount
|
|
2946
|
+
if (successfulDocumentsCount &&
|
|
2947
|
+
shouldDisplayFileSavedConfirmation) {
|
|
2946
2948
|
var message = successfulDocumentsCount + " fichier(s) sauvegard\u00E9(s) avec succ\u00E8s";
|
|
2947
2949
|
_this.growlService.addWithType(GrowlType.SUCCESS, message);
|
|
2948
2950
|
}
|
|
@@ -3044,7 +3046,7 @@
|
|
|
3044
3046
|
// Return true if at least one files for a given formKey exist
|
|
3045
3047
|
return !!this.pendingFilesByFormKey.get(formKey).files.length;
|
|
3046
3048
|
};
|
|
3047
|
-
PendingUploadService.prototype.addPendingFiles = function (baseUrl, formKey, label, files, key, isMultiple) {
|
|
3049
|
+
PendingUploadService.prototype.addPendingFiles = function (baseUrl, formKey, label, files, key, isMultiple, shouldDisplayFileSavedConfirmation) {
|
|
3048
3050
|
// Initialize pending files by formKey
|
|
3049
3051
|
if (!this.hasPendingFiles(formKey)) {
|
|
3050
3052
|
this.pendingFilesByFormKey.set(formKey, new PendingFiles());
|
|
@@ -3057,6 +3059,7 @@
|
|
|
3057
3059
|
this.pendingFilesByFormKey.get(formKey).files = __spreadArray(__spreadArray([], __read(this.pendingFilesByFormKey.get(formKey).files)), __read(files));
|
|
3058
3060
|
this.pendingFilesByFormKey.get(formKey).key = key;
|
|
3059
3061
|
this.pendingFilesByFormKey.get(formKey).isMultiple = isMultiple;
|
|
3062
|
+
this.pendingFilesByFormKey.get(formKey).shouldDisplayFileSavedConfirmation = shouldDisplayFileSavedConfirmation;
|
|
3060
3063
|
};
|
|
3061
3064
|
PendingUploadService.prototype.removePendingFile = function (file, formKey) {
|
|
3062
3065
|
if (this.hasPendingFiles(formKey)) {
|
|
@@ -3073,7 +3076,7 @@
|
|
|
3073
3076
|
var mergedResponse = new DocumentsWithErrors();
|
|
3074
3077
|
filesToUpload.forEach(function (pendingFiles, formKey) {
|
|
3075
3078
|
_this.multiUploadService
|
|
3076
|
-
.uploadDocuments(pendingFiles.url, formKey, pendingFiles.label, pendingFiles.files, pendingFiles.key, pendingFiles.isMultiple, form.language)
|
|
3079
|
+
.uploadDocuments(pendingFiles.url, formKey, pendingFiles.label, pendingFiles.files, pendingFiles.key, pendingFiles.isMultiple, form.language, pendingFiles.shouldDisplayFileSavedConfirmation)
|
|
3077
3080
|
.subscribe(function (response) {
|
|
3078
3081
|
// Merge all uploads response
|
|
3079
3082
|
_this.mergePendingUploadedServerResult(mergedResponse, response);
|
|
@@ -4291,7 +4294,7 @@
|
|
|
4291
4294
|
return GesdemConfirmationComponent;
|
|
4292
4295
|
}());
|
|
4293
4296
|
GesdemConfirmationComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GesdemConfirmationComponent, deps: [{ token: GesdemHandlerService }, { token: FoehnPageService }, { token: i1__namespace$1.ActivatedRoute }, { token: SdkDictionaryService }, { token: i3__namespace.Location }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
4294
|
-
GesdemConfirmationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: GesdemConfirmationComponent, selector: "gesdem-confirmation", inputs: { reference: "reference", setPageTitle: "setPageTitle", hasEmailSent: "hasEmailSent", closeHref: "closeHref", showDownloadPdfRecapButton: "showDownloadPdfRecapButton", showLinkToMyDemandes: "showLinkToMyDemandes", demandeIsClosedOnTransmit: "demandeIsClosedOnTransmit", actionStatut: "actionStatut", connectedConfirmationMessage: "connectedConfirmationMessage", connectedConfirmationMessageIfAbandoned: "connectedConfirmationMessageIfAbandoned", downloadPdfRecapButtonText: "downloadPdfRecapButtonText", closeButtonText: "closeButtonText", baseUrlPdf: "baseUrlPdf" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"container mt-5\" *ngIf=\"reference && !isInProgress\">\n <div\n class=\"alert text-center mb-2\"\n [ngClass]=\"isTransferred ? 'alert-success' : 'alert-danger'\"\n >\n <p class=\"h2\">\n {{\n isTransferred\n ? (successLabelDicoKey | fromDictionary)\n : ('gesdem-confirmation.abort-label' | fromDictionary)\n }}\n </p>\n <dl>\n <dt class=\"font-weight-light\">\n {{\n 'gesdem-confirmation.reference-title.label' | fromDictionary\n }}\n </dt>\n <dd id=\"numDemande\" class=\"h4 d-block mt-3\">{{ reference }}</dd>\n </dl>\n <p *ngIf=\"hasEmailSent && !(isConnectedCyber | async)\">\n {{ 'gesdem-confirmation.mail-sent.label' | fromDictionary }}\n </p>\n </div>\n\n <span\n [innerHTML]=\"'gesdem-confirmation.extra-content' | fromDictionary\"\n ></span>\n\n <ng-content></ng-content>\n\n <div\n class=\"col-md-12 vd-highlight\"\n *ngIf=\"(isConnectedCyber | async) && hasConnectedContent()\"\n >\n <span class=\"sr-only\">\n Information suite \u00E0 la transmission de votre demande\n </span>\n <div class=\"row\">\n <div class=\"col-md-1\">\n <foehn-icon-info-circle class=\"h3\"></foehn-icon-info-circle>\n </div>\n <div class=\"col-md-11\">\n <p\n [innerHTML]=\"\n isTransferred\n ? connectedConfirmationMessage\n : connectedConfirmationMessageIfAbandoned\n \"\n ></p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n (demandeIsClosedOnTransmit || isAbandoned)\n \"\n >\n Vous pouvez consulter votre demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/TREATED\">\n Mes nouvelles demandes trait\u00E9es\n </a>\n .\n </p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n !demandeIsClosedOnTransmit &&\n !isAbandoned\n \"\n >\n Vous pouvez suivre l'avancement du traitement de votre\n demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/IN_PROGRESS\">\n Mes demandes en cours de traitement\n </a>\n .\n </p>\n </div>\n </div>\n </div>\n\n <div
|
|
4297
|
+
GesdemConfirmationComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: GesdemConfirmationComponent, selector: "gesdem-confirmation", inputs: { reference: "reference", setPageTitle: "setPageTitle", hasEmailSent: "hasEmailSent", closeHref: "closeHref", showDownloadPdfRecapButton: "showDownloadPdfRecapButton", showLinkToMyDemandes: "showLinkToMyDemandes", demandeIsClosedOnTransmit: "demandeIsClosedOnTransmit", actionStatut: "actionStatut", connectedConfirmationMessage: "connectedConfirmationMessage", connectedConfirmationMessageIfAbandoned: "connectedConfirmationMessageIfAbandoned", downloadPdfRecapButtonText: "downloadPdfRecapButtonText", closeButtonText: "closeButtonText", baseUrlPdf: "baseUrlPdf" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"container mt-5\" *ngIf=\"reference && !isInProgress\">\n <div\n class=\"alert text-center mb-2\"\n [ngClass]=\"isTransferred ? 'alert-success' : 'alert-danger'\"\n >\n <p class=\"h2\">\n {{\n isTransferred\n ? (successLabelDicoKey | fromDictionary)\n : ('gesdem-confirmation.abort-label' | fromDictionary)\n }}\n </p>\n <dl>\n <dt class=\"font-weight-light\">\n {{\n 'gesdem-confirmation.reference-title.label' | fromDictionary\n }}\n </dt>\n <dd id=\"numDemande\" class=\"h4 d-block mt-3\">{{ reference }}</dd>\n </dl>\n <p *ngIf=\"hasEmailSent && !(isConnectedCyber | async)\">\n {{ 'gesdem-confirmation.mail-sent.label' | fromDictionary }}\n </p>\n </div>\n\n <span\n [innerHTML]=\"'gesdem-confirmation.extra-content' | fromDictionary\"\n ></span>\n\n <ng-content></ng-content>\n\n <div\n class=\"col-md-12 vd-highlight\"\n *ngIf=\"(isConnectedCyber | async) && hasConnectedContent()\"\n >\n <span class=\"sr-only\">\n Information suite \u00E0 la transmission de votre demande\n </span>\n <div class=\"row\">\n <div class=\"col-md-1\">\n <foehn-icon-info-circle class=\"h3\"></foehn-icon-info-circle>\n </div>\n <div class=\"col-md-11\">\n <p\n [innerHTML]=\"\n isTransferred\n ? connectedConfirmationMessage\n : connectedConfirmationMessageIfAbandoned\n \"\n ></p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n (demandeIsClosedOnTransmit || isAbandoned)\n \"\n >\n Vous pouvez consulter votre demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/TREATED\">\n Mes nouvelles demandes trait\u00E9es\n </a>\n .\n </p>\n <p\n *ngIf=\"\n showLinkToMyDemandes &&\n !demandeIsClosedOnTransmit &&\n !isAbandoned\n \"\n >\n Vous pouvez suivre l'avancement du traitement de votre\n demande en cliquant sur :\n <a href=\"/100002/demandes/search/MINE/IN_PROGRESS\">\n Mes demandes en cours de traitement\n </a>\n .\n </p>\n </div>\n </div>\n </div>\n\n <div class=\"col-md-12 list-unstyled d-md-flex p-0 mt-4\">\n <div class=\"ml-0 mr-md-auto mr-md-2 mb-2 mt-2\">\n <a\n *ngIf=\"showDownloadPdfRecapButton\"\n [href]=\"urlPdf\"\n id=\"telechargerBtn\"\n class=\"btn btn-secondary w-100\"\n title=\"T\u00E9l\u00E9charger le PDF\"\n >\n {{ downloadPdfRecapButtonText | fromDictionary }}\n </a>\n </div>\n\n <div\n class=\"mr-0 ml-md-auto mb-2 mt-2\"\n *ngIf=\"!(isConnectedCyber | async) && closeLink | async as link\"\n >\n <a [href]=\"link\" id=\"terminerBtn\" class=\"btn btn-primary w-100\">\n {{ closeButtonText | fromDictionary }}\n </a>\n </div>\n\n <div\n class=\"mr-0 ml-md-auto mb-2 mt-2\"\n *ngIf=\"!!(isConnectedCyber | async)\"\n >\n <a\n href=\"/100018/logout\"\n id=\"logoutBtn\"\n class=\"btn btn-primary w-100\"\n >\n {{ 'gesdem-confirmation.logout-button' | fromDictionary }}\n </a>\n </div>\n </div>\n</div>\n\n<div class=\"container mt-5\" *ngIf=\"reference && isInProgress\">\n <div class=\"alert alert-info text-center mb-2\">\n <p class=\"h2\">Demande en cours</p>\n <dl>\n <dt class=\"font-weight-light\">\n {{\n 'gesdem-confirmation.reference-title.label' | fromDictionary\n }}\n </dt>\n <dd id=\"numDemandeEnCours\" class=\"h4 d-block mt-3\">\n {{ reference }}\n </dd>\n </dl>\n </div>\n\n <div class=\"col-md-12 vd-highlight\">\n <div class=\"row\">\n <div class=\"col-md-1\">\n <foehn-icon-info-circle class=\"h3\"></foehn-icon-info-circle>\n </div>\n <div class=\"col-md-11\">\n <p>\n Vous pouvez reprendre votre demande en cliquant sur le lien\n ci-dessous\n </p>\n <p>\n <a [routerLink]=\"firstPageLink\">Reprendre ma demande</a>\n </p>\n </div>\n </div>\n </div>\n</div>\n", components: [{ type: FoehnIconInfoCircleComponent, selector: "foehn-icon-info-circle" }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "fromDictionary": SdkDictionaryPipe, "async": i3__namespace.AsyncPipe } });
|
|
4295
4298
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: GesdemConfirmationComponent, decorators: [{
|
|
4296
4299
|
type: i0.Component,
|
|
4297
4300
|
args: [{
|
|
@@ -9555,6 +9558,9 @@
|
|
|
9555
9558
|
}]
|
|
9556
9559
|
}] });
|
|
9557
9560
|
|
|
9561
|
+
var hasInputChanged$1 = function (change) { return !(!change ||
|
|
9562
|
+
!change.currentValue ||
|
|
9563
|
+
ObjectHelper.isEqual(change.previousValue, change.currentValue)); };
|
|
9558
9564
|
var FoehnListComponent = /** @class */ (function () {
|
|
9559
9565
|
function FoehnListComponent() {
|
|
9560
9566
|
this.itemsPerPage = 10;
|
|
@@ -9580,9 +9586,9 @@
|
|
|
9580
9586
|
var itemsPerPageChange = changes.itemsPerPage;
|
|
9581
9587
|
var listChange = changes.list;
|
|
9582
9588
|
var fixedPageCountChange = changes.fixedPageCount;
|
|
9583
|
-
if (!
|
|
9584
|
-
!
|
|
9585
|
-
!
|
|
9589
|
+
if (!hasInputChanged$1(itemsPerPageChange) &&
|
|
9590
|
+
!hasInputChanged$1(listChange) &&
|
|
9591
|
+
!hasInputChanged$1(fixedPageCountChange)) {
|
|
9586
9592
|
return;
|
|
9587
9593
|
}
|
|
9588
9594
|
this.buildFilteredList();
|
|
@@ -9636,6 +9642,10 @@
|
|
|
9636
9642
|
: 0;
|
|
9637
9643
|
};
|
|
9638
9644
|
FoehnListComponent.prototype.buildFilteredList = function () {
|
|
9645
|
+
if (!this._list) {
|
|
9646
|
+
this.filteredList = [];
|
|
9647
|
+
return;
|
|
9648
|
+
}
|
|
9639
9649
|
if (!!this.fixedPageCount) {
|
|
9640
9650
|
this.filteredList = this._list;
|
|
9641
9651
|
return;
|
|
@@ -9645,14 +9655,7 @@
|
|
|
9645
9655
|
this.currentPage = 1;
|
|
9646
9656
|
}
|
|
9647
9657
|
var start = (this.currentPage - 1) * this.itemsPerPage;
|
|
9648
|
-
this.filteredList = this._list
|
|
9649
|
-
? this._list.slice(start, start + this.itemsPerPage)
|
|
9650
|
-
: [];
|
|
9651
|
-
};
|
|
9652
|
-
FoehnListComponent.prototype.hasInputChanged = function (change) {
|
|
9653
|
-
return !(!change ||
|
|
9654
|
-
!change.currentValue ||
|
|
9655
|
-
change.previousValue === change.currentValue);
|
|
9658
|
+
this.filteredList = this._list.slice(start, start + this.itemsPerPage);
|
|
9656
9659
|
};
|
|
9657
9660
|
return FoehnListComponent;
|
|
9658
9661
|
}());
|
|
@@ -9717,7 +9720,7 @@
|
|
|
9717
9720
|
|
|
9718
9721
|
var hasInputChanged = function (change) { return !(!change ||
|
|
9719
9722
|
!change.currentValue ||
|
|
9720
|
-
change.previousValue
|
|
9723
|
+
ObjectHelper.isEqual(change.previousValue, change.currentValue)); };
|
|
9721
9724
|
var FoehnTableComponent = /** @class */ (function () {
|
|
9722
9725
|
function FoehnTableComponent() {
|
|
9723
9726
|
this.itemsPerPage = 10;
|
|
@@ -9742,9 +9745,11 @@
|
|
|
9742
9745
|
var itemsPerPageChange = changes.itemsPerPage;
|
|
9743
9746
|
var listChange = changes.list;
|
|
9744
9747
|
var fixedPageCountChange = changes.fixedPageCount;
|
|
9748
|
+
var sortInputChange = changes.sort;
|
|
9745
9749
|
if (!hasInputChanged(itemsPerPageChange) &&
|
|
9746
9750
|
!hasInputChanged(listChange) &&
|
|
9747
|
-
!hasInputChanged(fixedPageCountChange)
|
|
9751
|
+
!hasInputChanged(fixedPageCountChange) &&
|
|
9752
|
+
!hasInputChanged(sortInputChange)) {
|
|
9748
9753
|
return;
|
|
9749
9754
|
}
|
|
9750
9755
|
this.buildFilteredList();
|
|
@@ -9808,6 +9813,10 @@
|
|
|
9808
9813
|
});
|
|
9809
9814
|
};
|
|
9810
9815
|
FoehnTableComponent.prototype.buildFilteredList = function () {
|
|
9816
|
+
if (!this._list) {
|
|
9817
|
+
this.filteredList = [];
|
|
9818
|
+
return;
|
|
9819
|
+
}
|
|
9811
9820
|
if (!!this.fixedPageCount) {
|
|
9812
9821
|
this.filteredList = this._list;
|
|
9813
9822
|
return;
|
|
@@ -9817,14 +9826,12 @@
|
|
|
9817
9826
|
this.currentPage = 1;
|
|
9818
9827
|
}
|
|
9819
9828
|
var start = (this.currentPage - 1) * this.itemsPerPage;
|
|
9820
|
-
this.filteredList = this._list
|
|
9821
|
-
? this._list.slice(start, start + this.itemsPerPage)
|
|
9822
|
-
: [];
|
|
9829
|
+
this.filteredList = this._list.slice(start, start + this.itemsPerPage);
|
|
9823
9830
|
};
|
|
9824
9831
|
return FoehnTableComponent;
|
|
9825
9832
|
}());
|
|
9826
9833
|
FoehnTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnTableComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9827
|
-
FoehnTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnTableComponent, selector: "foehn-table", inputs: { itemsPerPage: "itemsPerPage", id: "id", previousLabel: "previousLabel", nextLabel: "nextLabel", totalElements: "totalElements", fixedPageCount: "fixedPageCount", columnsConfiguration: "columnsConfiguration", sort: "sort", trackByFn: "trackByFn", list: "list" }, outputs: { pageChange: "pageChange", sortChange: "sortChange" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"row\" [id]=\"id\">\n <div class=\"col-12\">\n <h4 *ngIf=\"!!totalElements && totalElements === 1\">\n {{ 'foehn-table.totalElements.1' | fromDictionary }}\n </h4>\n <h4 *ngIf=\"!!totalElements && totalElements !== 1\">\n {{\n 'foehn-table.totalElements'\n | fromDictionary: { total: totalElements.toString() }\n }}\n </h4>\n </div>\n\n <div class=\"col-12 table-responsive\">\n <table class=\"table table-hover\">\n <thead class=\"vd-bg-pattern-bars-gray\">\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id\"\n >\n <ng-container *ngIf=\"!col.sortAttribute\">\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n </ng-container>\n\n <ng-container *ngIf=\"!!col.sortAttribute\">\n <a\n href=\"#\"\n class=\"vd-text-thin\"\n (click)=\"\n $event.preventDefault();\n triggerSort(col.sortAttribute)\n \"\n [title]=\"\n 'Trier par ' +\n (col.columnLabelKey | fromDictionary)\n \"\n >\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n <ng-container\n *ngIf=\"\n sort.sortAttribute === col.sortAttribute\n \"\n >\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'ASC'\"\n >\n <foehn-icon-chevron-up></foehn-icon-chevron-up>\n </span>\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'DESC'\"\n >\n <foehn-icon-chevron-down></foehn-icon-chevron-down>\n </span>\n </ng-container>\n </a>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"\n let item of filteredList;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <td\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id + '-' + index\"\n >\n <ng-container *ngIf=\"!!col.isImportant\">\n <span\n *ngIf=\"col.isImportant(item)\"\n class=\"cell-vertical-align-middle\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n style=\"color: var(--red)\"\n fill=\"currentColor\"\n class=\"bi bi-exclamation\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.553.553 0 0 1-1.1 0L7.1 4.995z\"\n />\n </svg>\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"!col.routerLinkGetter\">\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n class=\"cell-vertical-align-middle\"\n ></span>\n </ng-container>\n\n <ng-container *ngIf=\"!!col.routerLinkGetter\">\n <a\n [routerLink]=\"col.routerLinkGetter(item)\"\n queryParamsHandling=\"merge\"\n class=\"cell-vertical-align-middle\"\n >\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n ></span>\n </a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"!filteredList.length\">\n <td [colSpan]=\"columnsConfiguration.length\">\n <div class=\"w-100 text-center\">\n {{ 'foehn-table.totalElements.0' | fromDictionary }}\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"row d-flex justify-content-between p-1\">\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasPreviousPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--previous\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"previousPage()\"\n >\n <span class=\"vd-pagination__title\">\n <foehn-icon-chevron-left></foehn-icon-chevron-left>\n {{ previousLabel }}\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage - 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasNextPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--next\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"nextPage()\"\n >\n <span class=\"vd-pagination__title\">\n {{ nextLabel }}\n <foehn-icon-chevron-right></foehn-icon-chevron-right>\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage + 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n </div>\n </div>\n</div>\n", styles: [".btn-no-extra{padding:0;border:none;font-weight:400;-webkit-text-decoration-line:none;text-decoration-line:none}.vd-pagination__link-reset{background:none;border:none;font-weight:inherit;-webkit-text-decoration-line:none;text-decoration-line:none;text-align:inherit;cursor:pointer}.vd-pagination__link-reset:focus{background-color:#ffbf47}.cell-vertical-align-middle{vertical-align:middle}\n"], components: [{ type: FoehnIconChevronUpComponent, selector: "foehn-icon-chevron-up" }, { type: FoehnIconChevronDownComponent, selector: "foehn-icon-chevron-down" }, { type: FoehnIconChevronLeftComponent, selector: "foehn-icon-chevron-left" }, { type: FoehnIconChevronRightComponent, selector: "foehn-icon-chevron-right" }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
|
|
9834
|
+
FoehnTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnTableComponent, selector: "foehn-table", inputs: { itemsPerPage: "itemsPerPage", id: "id", previousLabel: "previousLabel", nextLabel: "nextLabel", totalElements: "totalElements", fixedPageCount: "fixedPageCount", columnsConfiguration: "columnsConfiguration", sort: "sort", trackByFn: "trackByFn", list: "list" }, outputs: { pageChange: "pageChange", sortChange: "sortChange" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"row\" [id]=\"id\">\n <div class=\"col-12\">\n <h4 *ngIf=\"!!totalElements && totalElements === 1\">\n {{ 'foehn-table.totalElements.1' | fromDictionary }}\n </h4>\n <h4 *ngIf=\"!!totalElements && totalElements !== 1\">\n {{\n 'foehn-table.totalElements'\n | fromDictionary: { total: totalElements.toString() }\n }}\n </h4>\n </div>\n\n <div class=\"col-12 table-responsive\">\n <table class=\"table table-hover\">\n <thead class=\"vd-bg-pattern-bars-gray\">\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id\"\n >\n <ng-container\n *ngIf=\"!filteredList.length || !col.sortAttribute\"\n >\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n </ng-container>\n\n <ng-container\n *ngIf=\"!!filteredList.length && !!col.sortAttribute\"\n >\n <a\n href=\"#\"\n class=\"vd-text-thin\"\n (click)=\"\n $event.preventDefault();\n triggerSort(col.sortAttribute)\n \"\n [title]=\"\n 'Trier par ' +\n (col.columnLabelKey | fromDictionary)\n \"\n >\n <span\n [innerHTML]=\"\n col.columnLabelKey | fromDictionary\n \"\n ></span>\n <ng-container\n *ngIf=\"\n sort.sortAttribute === col.sortAttribute\n \"\n >\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'ASC'\"\n >\n <foehn-icon-chevron-up></foehn-icon-chevron-up>\n </span>\n <span\n class=\"ml-3\"\n *ngIf=\"sort.sortDirection === 'DESC'\"\n >\n <foehn-icon-chevron-down></foehn-icon-chevron-down>\n </span>\n </ng-container>\n </a>\n </ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"\n let item of filteredList;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <td\n *ngFor=\"let col of columnsConfiguration\"\n [id]=\"col.id + '-' + index\"\n >\n <ng-container *ngIf=\"!!col.isImportant\">\n <span\n *ngIf=\"col.isImportant(item)\"\n class=\"cell-vertical-align-middle\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n style=\"color: var(--red)\"\n fill=\"currentColor\"\n class=\"bi bi-exclamation\"\n viewBox=\"0 0 16 16\"\n >\n <path\n d=\"M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.553.553 0 0 1-1.1 0L7.1 4.995z\"\n />\n </svg>\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"!col.routerLinkGetter\">\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n class=\"cell-vertical-align-middle\"\n ></span>\n </ng-container>\n\n <ng-container *ngIf=\"!!col.routerLinkGetter\">\n <a\n [routerLink]=\"col.routerLinkGetter(item)\"\n queryParamsHandling=\"merge\"\n class=\"cell-vertical-align-middle\"\n >\n <span\n [innerHTML]=\"col.valueGetter(item)\"\n ></span>\n </a>\n </ng-container>\n </td>\n </tr>\n <tr *ngIf=\"!!columnsConfiguration && !filteredList.length\">\n <td [colSpan]=\"columnsConfiguration.length\">\n <div class=\"w-100 text-center\">\n {{ 'foehn-table.totalElements.0' | fromDictionary }}\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"row d-flex justify-content-between p-1\">\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasPreviousPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--previous\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"previousPage()\"\n >\n <span class=\"vd-pagination__title\">\n <foehn-icon-chevron-left></foehn-icon-chevron-left>\n {{ previousLabel }}\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage - 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n\n <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-6\">\n <nav\n class=\"vd-pagination\"\n aria-label=\"Pagination\"\n *ngIf=\"hasNextPage()\"\n >\n <ul class=\"vd-pagination__list\">\n <li\n class=\"vd-pagination__item vd-pagination__item--next\"\n >\n <button\n class=\"btn-link vd-pagination__link btn-no-extra vd-pagination__link-reset\"\n (click)=\"nextPage()\"\n >\n <span class=\"vd-pagination__title\">\n {{ nextLabel }}\n <foehn-icon-chevron-right></foehn-icon-chevron-right>\n </span>\n <span class=\"sr-only\">:</span>\n <span class=\"vd-pagination__label\">\n {{ currentPage + 1 }} sur {{ pagesCount() }}\n </span>\n </button>\n </li>\n </ul>\n </nav>\n </div>\n </div>\n </div>\n</div>\n", styles: [".btn-no-extra{padding:0;border:none;font-weight:400;-webkit-text-decoration-line:none;text-decoration-line:none}.vd-pagination__link-reset{background:none;border:none;font-weight:inherit;-webkit-text-decoration-line:none;text-decoration-line:none;text-align:inherit;cursor:pointer}.vd-pagination__link-reset:focus{background-color:#ffbf47}.cell-vertical-align-middle{vertical-align:middle}\n"], components: [{ type: FoehnIconChevronUpComponent, selector: "foehn-icon-chevron-up" }, { type: FoehnIconChevronDownComponent, selector: "foehn-icon-chevron-down" }, { type: FoehnIconChevronLeftComponent, selector: "foehn-icon-chevron-left" }, { type: FoehnIconChevronRightComponent, selector: "foehn-icon-chevron-right" }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
|
|
9828
9835
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnTableComponent, decorators: [{
|
|
9829
9836
|
type: i0.Component,
|
|
9830
9837
|
args: [{
|
|
@@ -10632,6 +10639,7 @@
|
|
|
10632
10639
|
_this.confirmModalService = confirmModalService;
|
|
10633
10640
|
_this.dictionaryService = dictionaryService;
|
|
10634
10641
|
_this.url = 'api/document';
|
|
10642
|
+
_this.shouldDisplayFileSavedConfirmation = true;
|
|
10635
10643
|
_this.pendingUploadService = pendingUploadService;
|
|
10636
10644
|
_this.multiUploadService = multiUploadService;
|
|
10637
10645
|
return _this;
|
|
@@ -10648,7 +10656,7 @@
|
|
|
10648
10656
|
// Only one call every 300ms to stop concurrent access
|
|
10649
10657
|
operators.throttleTime(300),
|
|
10650
10658
|
// Only one concurrent call at the time
|
|
10651
|
-
operators.mergeMap(function (files) { return _this.multiUploadService.uploadDocuments(_this.url, _this.name, _this.label, files, _this.key, _this.multiple, _this.currentLanguage); }, 1))
|
|
10659
|
+
operators.mergeMap(function (files) { return _this.multiUploadService.uploadDocuments(_this.url, _this.name, _this.label, files, _this.key, _this.multiple, _this.currentLanguage, _this.shouldDisplayFileSavedConfirmation); }, 1))
|
|
10652
10660
|
.subscribe(function (_a) {
|
|
10653
10661
|
var documents = _a.documents, errors = _a.errors;
|
|
10654
10662
|
_this.displayResultFromServer(documents, errors);
|
|
@@ -10754,7 +10762,7 @@
|
|
|
10754
10762
|
// only when no error so isPristine is set to false for validation purpose
|
|
10755
10763
|
this.markAsDirty();
|
|
10756
10764
|
// Otherwise, we store files in pending storage
|
|
10757
|
-
this.pendingUploadService.addPendingFiles(this.url, this.name, this.label, files, this.key, this.multiple);
|
|
10765
|
+
this.pendingUploadService.addPendingFiles(this.url, this.name, this.label, files, this.key, this.multiple, this.shouldDisplayFileSavedConfirmation);
|
|
10758
10766
|
}
|
|
10759
10767
|
};
|
|
10760
10768
|
FoehnMultiUploadComponent.prototype.displayPendingUploadedErrorsFromServerByFormKey = function (errors, formKey) {
|
|
@@ -10810,7 +10818,7 @@
|
|
|
10810
10818
|
return FoehnMultiUploadComponent;
|
|
10811
10819
|
}(AbstractFoehnUploaderComponent));
|
|
10812
10820
|
FoehnMultiUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnMultiUploadComponent, deps: [{ token: MultiUploadService }, { token: PendingUploadService }, { token: ApplicationInfoService }, { token: FoehnConfirmModalService }, { token: SdkDictionaryService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
10813
|
-
FoehnMultiUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnMultiUploadComponent, selector: "foehn-multi-upload", inputs: { url: "url", reference: "reference" }, providers: [
|
|
10821
|
+
FoehnMultiUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnMultiUploadComponent, selector: "foehn-multi-upload", inputs: { url: "url", reference: "reference", shouldDisplayFileSavedConfirmation: "shouldDisplayFileSavedConfirmation" }, providers: [
|
|
10814
10822
|
{
|
|
10815
10823
|
provide: FoehnInputComponent,
|
|
10816
10824
|
useExisting: i0.forwardRef(function () { return FoehnMultiUploadComponent; }),
|
|
@@ -10835,6 +10843,8 @@
|
|
|
10835
10843
|
type: i0.Input
|
|
10836
10844
|
}], reference: [{
|
|
10837
10845
|
type: i0.Input
|
|
10846
|
+
}], shouldDisplayFileSavedConfirmation: [{
|
|
10847
|
+
type: i0.Input
|
|
10838
10848
|
}] } });
|
|
10839
10849
|
|
|
10840
10850
|
var FoehnMultiUploadModule = /** @class */ (function () {
|
|
@@ -10881,13 +10891,14 @@
|
|
|
10881
10891
|
this.uniqPrefix = new Date().getTime();
|
|
10882
10892
|
this.uploaderHelper = new UploaderHelper(dictionaryService, applicationInfoService);
|
|
10883
10893
|
}
|
|
10884
|
-
BoMultiUploadService.prototype.uploadDocuments = function (url, formKey, label, files, key, isMultiple, language) {
|
|
10894
|
+
BoMultiUploadService.prototype.uploadDocuments = function (url, formKey, label, files, key, isMultiple, language, shouldDisplayFileSavedConfirmation) {
|
|
10885
10895
|
var _this = this;
|
|
10886
10896
|
var documents = files.map(function (file) { return _this.uploaderHelper.mapToDocumentReference(file, label, key, isMultiple, _this.uniqPrefix, _this.globalSequence++); });
|
|
10887
10897
|
var formData = this.uploaderHelper.mapToFormData(documents, formKey, language);
|
|
10888
10898
|
return this.httpClient.post(url, formData).pipe(operators.tap(function (result) {
|
|
10889
10899
|
var successfulDocumentsCount = result.documents && result.documents.length;
|
|
10890
|
-
if (successfulDocumentsCount
|
|
10900
|
+
if (successfulDocumentsCount &&
|
|
10901
|
+
shouldDisplayFileSavedConfirmation) {
|
|
10891
10902
|
var message = successfulDocumentsCount + " fichier(s) sauvegard\u00E9(s) avec succ\u00E8s";
|
|
10892
10903
|
_this.growlService.addWithType(GrowlType.SUCCESS, message);
|
|
10893
10904
|
}
|
|
@@ -10932,6 +10943,7 @@
|
|
|
10932
10943
|
_this.applicationInfoService = applicationInfoService;
|
|
10933
10944
|
_this.confirmModalService = confirmModalService;
|
|
10934
10945
|
_this.dictionaryService = dictionaryService;
|
|
10946
|
+
_this.shouldDisplayFileSavedConfirmation = true;
|
|
10935
10947
|
_this.documentDeleted = new i0.EventEmitter();
|
|
10936
10948
|
_this.boMultiUploadService = boMultiUploadService;
|
|
10937
10949
|
return _this;
|
|
@@ -10945,7 +10957,7 @@
|
|
|
10945
10957
|
// Only one call every 300ms to stop concurrent access
|
|
10946
10958
|
operators.throttleTime(300),
|
|
10947
10959
|
// Only one concurrent call at the time
|
|
10948
|
-
operators.mergeMap(function (files) { return _this.boMultiUploadService.uploadDocuments(_this.uploadUrl, _this.name, _this.label, files, _this.key, _this.multiple, _this.currentLanguage); }, 1))
|
|
10960
|
+
operators.mergeMap(function (files) { return _this.boMultiUploadService.uploadDocuments(_this.uploadUrl, _this.name, _this.label, files, _this.key, _this.multiple, _this.currentLanguage, _this.shouldDisplayFileSavedConfirmation); }, 1))
|
|
10949
10961
|
.subscribe(function (_a) {
|
|
10950
10962
|
var documents = _a.documents, errors = _a.errors;
|
|
10951
10963
|
_this.displayResultFromServer(documents, errors);
|
|
@@ -11055,7 +11067,7 @@
|
|
|
11055
11067
|
return FoehnBoMultiUploadComponent;
|
|
11056
11068
|
}(AbstractFoehnUploaderComponent));
|
|
11057
11069
|
FoehnBoMultiUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnBoMultiUploadComponent, deps: [{ token: BoMultiUploadService }, { token: ApplicationInfoService }, { token: FoehnConfirmModalService }, { token: SdkDictionaryService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11058
|
-
FoehnBoMultiUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnBoMultiUploadComponent, selector: "foehn-bo-multi-upload", inputs: { uploadUrl: "uploadUrl", deleteUrl: "deleteUrl", downloadUrl: "downloadUrl" }, outputs: { documentDeleted: "documentDeleted" }, providers: [
|
|
11070
|
+
FoehnBoMultiUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnBoMultiUploadComponent, selector: "foehn-bo-multi-upload", inputs: { uploadUrl: "uploadUrl", deleteUrl: "deleteUrl", downloadUrl: "downloadUrl", shouldDisplayFileSavedConfirmation: "shouldDisplayFileSavedConfirmation" }, outputs: { documentDeleted: "documentDeleted" }, providers: [
|
|
11059
11071
|
{
|
|
11060
11072
|
provide: FoehnInputComponent,
|
|
11061
11073
|
useExisting: i0.forwardRef(function () { return FoehnBoMultiUploadComponent; }),
|
|
@@ -11082,6 +11094,8 @@
|
|
|
11082
11094
|
type: i0.Input
|
|
11083
11095
|
}], downloadUrl: [{
|
|
11084
11096
|
type: i0.Input
|
|
11097
|
+
}], shouldDisplayFileSavedConfirmation: [{
|
|
11098
|
+
type: i0.Input
|
|
11085
11099
|
}], documentDeleted: [{
|
|
11086
11100
|
type: i0.Output
|
|
11087
11101
|
}] } });
|
|
@@ -11166,6 +11180,7 @@
|
|
|
11166
11180
|
_this.croppedPictureFilename = 'photo.png';
|
|
11167
11181
|
_this.resizeToWidth = 300;
|
|
11168
11182
|
_this.resizeToHeight = 0;
|
|
11183
|
+
_this.shouldDisplayFileSavedConfirmation = true;
|
|
11169
11184
|
_this.loading = false;
|
|
11170
11185
|
return _this;
|
|
11171
11186
|
}
|
|
@@ -11208,7 +11223,7 @@
|
|
|
11208
11223
|
this.markAsPristine();
|
|
11209
11224
|
var photo = convertBase64UrlToFile(this.croppedPictureAsBase64Url, this.croppedPictureFilename);
|
|
11210
11225
|
this.uploadService
|
|
11211
|
-
.uploadDocuments(this.baseUrl, this.name, this.label, [photo], this.key, false, this.currentLanguage)
|
|
11226
|
+
.uploadDocuments(this.baseUrl, this.name, this.label, [photo], this.key, false, this.currentLanguage, this.shouldDisplayFileSavedConfirmation)
|
|
11212
11227
|
.pipe(operators.filter(function (result) { return !!result; }))
|
|
11213
11228
|
.subscribe(function (_a) {
|
|
11214
11229
|
var documents = _a.documents, errors = _a.errors;
|
|
@@ -11259,7 +11274,7 @@
|
|
|
11259
11274
|
return FoehnPictureUploadComponent;
|
|
11260
11275
|
}(FoehnInputComponent));
|
|
11261
11276
|
FoehnPictureUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnPictureUploadComponent, deps: [{ token: GrowlBrokerService }, { token: MultiUploadService }, { token: SdkDictionaryService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
11262
|
-
FoehnPictureUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnPictureUploadComponent, selector: "foehn-picture-upload", inputs: { name: "name", key: "key", label: "label", baseUrl: "baseUrl", croppedPictureFilename: "croppedPictureFilename", resizeToWidth: "resizeToWidth", resizeToHeight: "resizeToHeight" }, providers: [
|
|
11277
|
+
FoehnPictureUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnPictureUploadComponent, selector: "foehn-picture-upload", inputs: { name: "name", key: "key", label: "label", baseUrl: "baseUrl", croppedPictureFilename: "croppedPictureFilename", resizeToWidth: "resizeToWidth", resizeToHeight: "resizeToHeight", shouldDisplayFileSavedConfirmation: "shouldDisplayFileSavedConfirmation" }, providers: [
|
|
11263
11278
|
{
|
|
11264
11279
|
provide: FoehnInputComponent,
|
|
11265
11280
|
useExisting: i0.forwardRef(function () { return FoehnPictureUploadComponent; }),
|
|
@@ -11293,6 +11308,8 @@
|
|
|
11293
11308
|
type: i0.Input
|
|
11294
11309
|
}], resizeToHeight: [{
|
|
11295
11310
|
type: i0.Input
|
|
11311
|
+
}], shouldDisplayFileSavedConfirmation: [{
|
|
11312
|
+
type: i0.Input
|
|
11296
11313
|
}] } });
|
|
11297
11314
|
|
|
11298
11315
|
var FoehnPictureUploadModule = /** @class */ (function () {
|