@dsivd/prestations-ng 14.5.10 → 15.5.13
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 +25 -0
- package/bundles/dsivd-prestations-ng.umd.js +238 -23
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v15.5.13.tgz +0 -0
- package/esm2015/foehn-footer/foehn-footer.component.js +2 -2
- package/esm2015/foehn-page/foehn-page.component.js +22 -17
- package/esm2015/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.js +164 -0
- package/esm2015/foehn-upload/foehn-picture-upload/foehn-picture-upload.module.js +42 -0
- package/esm2015/index.js +4 -1
- package/esm2015/sdk-dictionary/default-dictionary.js +9 -2
- package/fesm2015/dsivd-prestations-ng.js +218 -19
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.d.ts +39 -0
- package/foehn-upload/foehn-picture-upload/foehn-picture-upload.module.d.ts +13 -0
- package/index.d.ts +2 -0
- package/package.json +2 -1
- package/dsivd-prestations-ng-v14.5.10.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,31 @@ A change is considered **breaking** if you have to change your code or update yo
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
+
## [14.5.13]
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- [foehn-picture-upload.module.ts](projects/prestations-ng/src/foehn-upload/foehn-picture-upload/foehn-picture-upload.module.ts)
|
|
34
|
+
- [foehn-picture-upload.component.ts](projects/prestations-ng/src/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.ts)
|
|
35
|
+
- [foehn-picture-upload.component.html](projects/prestations-ng/src/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.html)
|
|
36
|
+
- added a picture uploader that allows the user to crop the uploaded picture
|
|
37
|
+
- requires `ngx-image-cropper@~5.0.0`
|
|
38
|
+
- for examples, see related page in the devtool (https://dsi-vd.github.io/prestations-ng/upload#foehn_picture_upload)
|
|
39
|
+
|
|
40
|
+
## [14.5.12]
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- [foehn-footer.component.ts](projects/prestations-ng/src/foehn-footer/foehn-footer.component.ts)
|
|
45
|
+
- Fixed "SecurityBestPracticeLink" URL
|
|
46
|
+
|
|
47
|
+
## [14.5.11]
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- [foehn-page.component.html](projects/prestations-ng/src/foehn-page/foehn-page.component.html)
|
|
52
|
+
- do not try to display login messages when `neverConnected` is `true`
|
|
53
|
+
|
|
29
54
|
## [14.5.10]
|
|
30
55
|
|
|
31
56
|
### Removed
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/router'), require('@angular/common'), require('@angular/forms'), require('@fortawesome/free-solid-svg-icons'), require('@fortawesome/angular-fontawesome'), require('@angular/platform-browser'), require('@angular/cdk/a11y'), require('@fortawesome/free-regular-svg-icons'), require('core-js/modules/es.array.includes'), require('@angular/cdk/scrolling'), require('@angular/common/locales/fr'), require('dayjs'), require('dayjs/plugin/isToday'), require('iban'), require('dayjs/plugin/localeData')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@dsivd/prestations-ng', ['exports', '@angular/core', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/router', '@angular/common', '@angular/forms', '@fortawesome/free-solid-svg-icons', '@fortawesome/angular-fontawesome', '@angular/platform-browser', '@angular/cdk/a11y', '@fortawesome/free-regular-svg-icons', 'core-js/modules/es.array.includes', '@angular/cdk/scrolling', '@angular/common/locales/fr', 'dayjs', 'dayjs/plugin/isToday', 'iban', 'dayjs/plugin/localeData'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.dsivd = global.dsivd || {}, global.dsivd['prestations-ng'] = {}), global.ng.core, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.router, global.ng.common, global.ng.forms, global['@fortawesome/free-solid-svg-icons'], global['@fortawesome/angular-fontawesome'], global.ng.platformBrowser, global.ng.cdk.a11y, global['@fortawesome/free-regular-svg-icons'], null, global.ng.cdk.scrolling, global.ng.common.locales.fr, global.dayjs, global['dayjs/plugin/isToday'], global.iban, global['dayjs/plugin/localeData']));
|
|
5
|
-
}(this, (function (exports, i0, i1, rxjs, operators, i1$1, i3, i4, freeSolidSvgIcons, i1$2, i1$3, i2, freeRegularSvgIcons, es_array_includes, i3$1, localeFr, dayjs, isToday, iban, localeData) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/router'), require('@angular/common'), require('@angular/forms'), require('@fortawesome/free-solid-svg-icons'), require('@fortawesome/angular-fontawesome'), require('@angular/platform-browser'), require('@angular/cdk/a11y'), require('@fortawesome/free-regular-svg-icons'), require('core-js/modules/es.array.includes'), require('@angular/cdk/scrolling'), require('@angular/common/locales/fr'), require('dayjs'), require('dayjs/plugin/isToday'), require('ngx-image-cropper'), require('iban'), require('dayjs/plugin/localeData')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@dsivd/prestations-ng', ['exports', '@angular/core', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/router', '@angular/common', '@angular/forms', '@fortawesome/free-solid-svg-icons', '@fortawesome/angular-fontawesome', '@angular/platform-browser', '@angular/cdk/a11y', '@fortawesome/free-regular-svg-icons', 'core-js/modules/es.array.includes', '@angular/cdk/scrolling', '@angular/common/locales/fr', 'dayjs', 'dayjs/plugin/isToday', 'ngx-image-cropper', 'iban', 'dayjs/plugin/localeData'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.dsivd = global.dsivd || {}, global.dsivd['prestations-ng'] = {}), global.ng.core, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.router, global.ng.common, global.ng.forms, global['@fortawesome/free-solid-svg-icons'], global['@fortawesome/angular-fontawesome'], global.ng.platformBrowser, global.ng.cdk.a11y, global['@fortawesome/free-regular-svg-icons'], null, global.ng.cdk.scrolling, global.ng.common.locales.fr, global.dayjs, global['dayjs/plugin/isToday'], global['ngx-image-cropper'], global.iban, global['dayjs/plugin/localeData']));
|
|
5
|
+
}(this, (function (exports, i0, i1, rxjs, operators, i1$1, i3, i4, freeSolidSvgIcons, i1$2, i1$3, i2, freeRegularSvgIcons, es_array_includes, i3$1, localeFr, dayjs, isToday, i5, iban, localeData) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
var localeFr__default = /*#__PURE__*/_interopDefaultLegacy(localeFr);
|
|
39
39
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
40
40
|
var isToday__default = /*#__PURE__*/_interopDefaultLegacy(isToday);
|
|
41
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
41
42
|
var iban__namespace = /*#__PURE__*/_interopNamespace(iban);
|
|
42
43
|
var localeData__default = /*#__PURE__*/_interopDefaultLegacy(localeData);
|
|
43
44
|
|
|
@@ -1903,7 +1904,14 @@
|
|
|
1903
1904
|
'(fichier au format pdf), vous devez demander la prestation en étant connecté au portail sécurisé.',
|
|
1904
1905
|
'use-login.text': "Cette prestation est aussi utilisable au travers de l'espace sécurisé qui vous " +
|
|
1905
1906
|
"permet de pré-remplir le formulaire et de suivre l'avancement de traitement de la demande.",
|
|
1906
|
-
'use-login.button.text': 'Connectez-vous'
|
|
1907
|
+
'use-login.button.text': 'Connectez-vous',
|
|
1908
|
+
'foehn-picture-upload.choose-button-label': 'Choisissez une photo',
|
|
1909
|
+
'foehn-picture-upload.loading-label': 'Chargement...',
|
|
1910
|
+
'foehn-picture-upload.loading-failure-label': 'Impossible de charger la photo sélectionnée',
|
|
1911
|
+
'foehn-picture-upload.validate-selection-label': 'Valider la sélection',
|
|
1912
|
+
'foehn-picture-upload.cancel-selection-label': 'Annuler',
|
|
1913
|
+
'foehn-picture-upload.selection-not-validated-label': 'Merci de valider votre sélection',
|
|
1914
|
+
'foehn-picture-upload.delete-picture-label': 'Supprimer'
|
|
1907
1915
|
};
|
|
1908
1916
|
|
|
1909
1917
|
var DICTIONARY_BASE_URL = 'api/dictionary';
|
|
@@ -5386,7 +5394,7 @@
|
|
|
5386
5394
|
|
|
5387
5395
|
var GUIDE_URL = 'https://www.vd.ch/index.php?id=67827';
|
|
5388
5396
|
var TERM_OF_USE_URL = 'https://www.vd.ch/index.php?id=2015321';
|
|
5389
|
-
var SECURITY_BEST_PRACTICE_URL = 'https://www.vd.ch/
|
|
5397
|
+
var SECURITY_BEST_PRACTICE_URL = 'https://www.vd.ch/index.php?id=2015320';
|
|
5390
5398
|
var FoehnFooterComponent = /** @class */ (function () {
|
|
5391
5399
|
function FoehnFooterComponent(applicationInfoService, gesdemEventService, gesdemService) {
|
|
5392
5400
|
/**
|
|
@@ -5804,23 +5812,28 @@
|
|
|
5804
5812
|
return false;
|
|
5805
5813
|
}));
|
|
5806
5814
|
var formInitializationObservable = rxjs.merge(rxjs.of(undefined), this.gesdemEventService.formInitializationObservable());
|
|
5807
|
-
this.
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
!!
|
|
5819
|
-
isLastPage)
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5815
|
+
if (this.neverConnected) {
|
|
5816
|
+
this.displayLoginMessages = rxjs.of(new DisplayLoginMessagesData(false, false));
|
|
5817
|
+
}
|
|
5818
|
+
else {
|
|
5819
|
+
this.displayLoginMessages = rxjs.combineLatest([
|
|
5820
|
+
formInitializationObservable,
|
|
5821
|
+
this.sessionInfo.data,
|
|
5822
|
+
this.applicationInfoService.currentEtapeInfo
|
|
5823
|
+
]).pipe(operators.debounceTime(0), // without debounceTime, the outcome is less effective...
|
|
5824
|
+
operators.map(function (_a) {
|
|
5825
|
+
var _b = __read(_a, 3), formInitialization = _b[0], sessionInfoData = _b[1], currentEtapeInfo = _b[2];
|
|
5826
|
+
var isConnectedCyberOrIam = !!sessionInfoData;
|
|
5827
|
+
var isLastPage = _this.foehnNavigationService.isLastFormPage();
|
|
5828
|
+
if (isConnectedCyberOrIam ||
|
|
5829
|
+
!currentEtapeInfo.deployeeCyber ||
|
|
5830
|
+
!!formInitialization ||
|
|
5831
|
+
isLastPage) {
|
|
5832
|
+
return new DisplayLoginMessagesData(false, false);
|
|
5833
|
+
}
|
|
5834
|
+
return new DisplayLoginMessagesData(currentEtapeInfo === null || currentEtapeInfo === void 0 ? void 0 : currentEtapeInfo.decisionElectroniqueAvailable, true);
|
|
5835
|
+
}));
|
|
5836
|
+
}
|
|
5824
5837
|
};
|
|
5825
5838
|
FoehnPageComponent.prototype.ngOnChanges = function (changes) {
|
|
5826
5839
|
var etapeIdChange = changes.etapeId;
|
|
@@ -10922,6 +10935,206 @@
|
|
|
10922
10935
|
return BoDocumentsWithErrors;
|
|
10923
10936
|
}());
|
|
10924
10937
|
|
|
10938
|
+
var blobToFile = function (blobData, fileName) {
|
|
10939
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10940
|
+
var blob = blobData;
|
|
10941
|
+
blob.name = fileName;
|
|
10942
|
+
return blob;
|
|
10943
|
+
};
|
|
10944
|
+
var convertBase64UrlToFile = function (croppedImageasBase64Url, filename) {
|
|
10945
|
+
var arr = croppedImageasBase64Url.split(',');
|
|
10946
|
+
var mime = arr[0].match(/:(.*?);/)[1];
|
|
10947
|
+
var bstr = atob(arr[1]);
|
|
10948
|
+
var n = bstr.length;
|
|
10949
|
+
var u8arr = new Uint8Array(n);
|
|
10950
|
+
while (n--) {
|
|
10951
|
+
u8arr[n] = bstr.charCodeAt(n);
|
|
10952
|
+
}
|
|
10953
|
+
if (!navigator.msSaveBlob) {
|
|
10954
|
+
// detect if not Edge
|
|
10955
|
+
return new File([u8arr], filename, { type: mime });
|
|
10956
|
+
}
|
|
10957
|
+
else {
|
|
10958
|
+
// Edge support the FileAPI but not the File constructor.
|
|
10959
|
+
return blobToFile(new Blob([u8arr], { type: mime }), filename);
|
|
10960
|
+
}
|
|
10961
|
+
};
|
|
10962
|
+
var FoehnPictureUploadComponent = /** @class */ (function (_super) {
|
|
10963
|
+
__extends(FoehnPictureUploadComponent, _super);
|
|
10964
|
+
function FoehnPictureUploadComponent(growlService, uploadService, dictionaryService) {
|
|
10965
|
+
var _this = _super.call(this) || this;
|
|
10966
|
+
_this.growlService = growlService;
|
|
10967
|
+
_this.uploadService = uploadService;
|
|
10968
|
+
_this.dictionaryService = dictionaryService;
|
|
10969
|
+
_this.baseUrl = 'api/document';
|
|
10970
|
+
_this.croppedPictureFilename = 'photo.png';
|
|
10971
|
+
_this.resizeToWidth = 300;
|
|
10972
|
+
_this.resizeToHeight = 0;
|
|
10973
|
+
_this.loading = false;
|
|
10974
|
+
return _this;
|
|
10975
|
+
}
|
|
10976
|
+
FoehnPictureUploadComponent.prototype.ngOnInit = function () {
|
|
10977
|
+
var _this = this;
|
|
10978
|
+
_super.prototype.ngOnInit.call(this);
|
|
10979
|
+
this.currentLanguageSubscription = this.dictionaryService
|
|
10980
|
+
.getCurrentLanguageCode()
|
|
10981
|
+
.pipe(operators.distinctUntilChanged())
|
|
10982
|
+
.subscribe(function (language) {
|
|
10983
|
+
_this.currentLanguage = language;
|
|
10984
|
+
});
|
|
10985
|
+
};
|
|
10986
|
+
FoehnPictureUploadComponent.prototype.onPictureSelection = function (imgEvent) {
|
|
10987
|
+
this.refreshErrors([[], true]);
|
|
10988
|
+
this.pictureToCrop = imgEvent;
|
|
10989
|
+
this.loading = true;
|
|
10990
|
+
};
|
|
10991
|
+
FoehnPictureUploadComponent.prototype.onPictureSelectionFailed = function () {
|
|
10992
|
+
var errors = [
|
|
10993
|
+
{
|
|
10994
|
+
name: this.name,
|
|
10995
|
+
code: 'LoadingFailure',
|
|
10996
|
+
message: this.dictionaryService.getKeySync('foehn-picture-upload.loading-failure-label')
|
|
10997
|
+
}
|
|
10998
|
+
];
|
|
10999
|
+
this.refreshErrors([errors, true]);
|
|
11000
|
+
this.resetPictureSelection();
|
|
11001
|
+
};
|
|
11002
|
+
FoehnPictureUploadComponent.prototype.onImageCropped = function (croppedEvent) {
|
|
11003
|
+
this.croppedPictureAsBase64Url = croppedEvent.base64;
|
|
11004
|
+
};
|
|
11005
|
+
FoehnPictureUploadComponent.prototype.resetPictureSelection = function () {
|
|
11006
|
+
this.croppedPictureAsBase64Url = null;
|
|
11007
|
+
this.pictureToCrop = null;
|
|
11008
|
+
this.loading = false;
|
|
11009
|
+
};
|
|
11010
|
+
FoehnPictureUploadComponent.prototype.savePicture = function () {
|
|
11011
|
+
var _this = this;
|
|
11012
|
+
this.markAsPristine();
|
|
11013
|
+
var photo = convertBase64UrlToFile(this.croppedPictureAsBase64Url, this.croppedPictureFilename);
|
|
11014
|
+
this.uploadService
|
|
11015
|
+
.uploadDocuments(this.baseUrl, this.name, this.label, [photo], this.key, false, this.currentLanguage)
|
|
11016
|
+
.pipe(operators.filter(function (result) { return !!result; }))
|
|
11017
|
+
.subscribe(function (_a) {
|
|
11018
|
+
var documents = _a.documents, errors = _a.errors;
|
|
11019
|
+
_this.resetPictureSelection();
|
|
11020
|
+
if (!!documents.length) {
|
|
11021
|
+
_this.markAsDirty();
|
|
11022
|
+
_this.model = documents;
|
|
11023
|
+
_this.refreshErrors([[], true]);
|
|
11024
|
+
}
|
|
11025
|
+
else {
|
|
11026
|
+
_this.model = [];
|
|
11027
|
+
_this.refreshErrors([errors, true]);
|
|
11028
|
+
}
|
|
11029
|
+
});
|
|
11030
|
+
};
|
|
11031
|
+
FoehnPictureUploadComponent.prototype.deleteFile = function () {
|
|
11032
|
+
var _this = this;
|
|
11033
|
+
this.uploadService
|
|
11034
|
+
.deleteDocument(this.baseUrl, this.model[0])
|
|
11035
|
+
.subscribe(function () {
|
|
11036
|
+
_this.model = [];
|
|
11037
|
+
_this.resetPictureSelection();
|
|
11038
|
+
});
|
|
11039
|
+
};
|
|
11040
|
+
FoehnPictureUploadComponent.prototype.getDownloadUrl = function () {
|
|
11041
|
+
return this.uploadService.getDownloadUrl(this.baseUrl, this.model[0]);
|
|
11042
|
+
};
|
|
11043
|
+
Object.defineProperty(FoehnPictureUploadComponent.prototype, "hasPicture", {
|
|
11044
|
+
get: function () {
|
|
11045
|
+
return this.model && this.model.length && !!this.model[0].reference;
|
|
11046
|
+
},
|
|
11047
|
+
enumerable: false,
|
|
11048
|
+
configurable: true
|
|
11049
|
+
});
|
|
11050
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11051
|
+
FoehnPictureUploadComponent.prototype.refreshErrors = function (results) {
|
|
11052
|
+
var _this = this;
|
|
11053
|
+
var errors = results[0];
|
|
11054
|
+
var isInSelectionMode = !this.hasPicture && !!this.croppedPictureAsBase64Url;
|
|
11055
|
+
if (isInSelectionMode) {
|
|
11056
|
+
var notNullError = errors.find(function (e) { return e.name === _this.name && e.code === 'NotEmpty'; });
|
|
11057
|
+
if (notNullError) {
|
|
11058
|
+
notNullError.message = this.dictionaryService.getKeySync('foehn-picture-upload.selection-not-validated-label');
|
|
11059
|
+
}
|
|
11060
|
+
}
|
|
11061
|
+
_super.prototype.refreshErrors.call(this, results);
|
|
11062
|
+
};
|
|
11063
|
+
return FoehnPictureUploadComponent;
|
|
11064
|
+
}(FoehnInputComponent));
|
|
11065
|
+
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 });
|
|
11066
|
+
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: [
|
|
11067
|
+
{
|
|
11068
|
+
provide: FoehnInputComponent,
|
|
11069
|
+
useExisting: i0.forwardRef(function () { return FoehnPictureUploadComponent; }),
|
|
11070
|
+
multi: true
|
|
11071
|
+
}
|
|
11072
|
+
], usesInheritance: true, ngImport: i0__namespace, template: "<div\n [attr.id]=\"buildId('Container')\"\n [class.has-danger]=\"hasErrors()\"\n [class.vd-form-group-danger]=\"hasErrors()\"\n class=\"form-group clearable-input-form-group\"\n tabindex=\"-1\"\n>\n <label\n [attr.for]=\"buildChildId()\"\n *ngIf=\"!!label\"\n [ngClass]=\"isLabelSrOnly ? 'sr-only' : labelStyleModifier\"\n >\n <span [innerHTML]=\"label\"></span>\n <span\n *ngIf=\"!required && !hideNotRequiredExtraLabel\"\n aria-hidden=\"true\"\n >\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n </label>\n\n <foehn-validation-alerts [component]=\"this\"></foehn-validation-alerts>\n\n <small\n *ngIf=\"helpText\"\n [attr.id]=\"buildChildId() + 'Help'\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText\"\n ></small>\n\n <input type=\"hidden\" [name]=\"name || label\" [ngModel]=\"model\" />\n\n <ng-content></ng-content>\n\n <div *ngIf=\"hasPicture\" class=\"row\">\n <div class=\"col-md-6\">\n <img\n [id]=\"buildChildId('Picture')\"\n [attr.alt]=\"label\"\n [src]=\"getDownloadUrl()\"\n />\n </div>\n <div class=\"col-md-4\">\n <button\n type=\"button\"\n class=\"btn btn-danger w-100\"\n [attr.id]=\"buildChildId('DeleteButton')\"\n (click)=\"deleteFile()\"\n >\n {{\n 'foehn-picture-upload.delete-picture-label' | fromDictionary\n }}\n </button>\n </div>\n </div>\n\n <div *ngIf=\"!hasPicture && !croppedPictureAsBase64Url\">\n <input\n #inputFile\n type=\"file\"\n class=\"form-control-file d-none\"\n [attr.id]=\"name\"\n [attr.accept]=\"'.jpeg,.jpg,.png'\"\n [multiple]=\"false\"\n [name]=\"name\"\n (change)=\"onPictureSelection($event)\"\n />\n\n <button\n type=\"button\"\n class=\"btn btn-primary my-2\"\n [attr.id]=\"buildChildId('ChooseButton')\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n [attr.aria-describedby]=\"buildId('ErrorsContainer')\"\n (click)=\"inputFile.click()\"\n [disabled]=\"loading\"\n >\n {{ 'foehn-picture-upload.choose-button-label' | fromDictionary }}\n </button>\n </div>\n\n <div *ngIf=\"loading\">\n {{ 'foehn-picture-upload.loading-label' | fromDictionary }}\n </div>\n\n <div *ngIf=\"!hasPicture\" class=\"row\">\n <div class=\"col-md-6\">\n <image-cropper\n [id]=\"buildChildId('Cropper')\"\n (cropperReady)=\"loading = false\"\n (imageCropped)=\"onImageCropped($event)\"\n (loadImageFailed)=\"onPictureSelectionFailed()\"\n [aspectRatio]=\"3 / 4\"\n [imageChangedEvent]=\"pictureToCrop\"\n [maintainAspectRatio]=\"true\"\n [resizeToWidth]=\"resizeToWidth\"\n [resizeToHeight]=\"resizeToHeight\"\n [onlyScaleDown]=\"true\"\n format=\"png\"\n ></image-cropper>\n </div>\n\n <div *ngIf=\"!hasPicture\" class=\"col-md-4\">\n <div class=\"row mb-3\">\n <button\n *ngIf=\"croppedPictureAsBase64Url\"\n type=\"button\"\n class=\"btn btn-primary w-100\"\n [attr.id]=\"buildChildId('SaveButton')\"\n (click)=\"savePicture()\"\n >\n {{\n 'foehn-picture-upload.validate-selection-label'\n | fromDictionary\n }}\n </button>\n </div>\n <div class=\"row\">\n <button\n *ngIf=\"croppedPictureAsBase64Url\"\n type=\"button\"\n class=\"btn btn-secondary w-100\"\n [attr.id]=\"buildChildId('CancelButton')\"\n (click)=\"resetPictureSelection()\"\n >\n {{\n 'foehn-picture-upload.cancel-selection-label'\n | fromDictionary\n }}\n </button>\n </div>\n </div>\n </div>\n</div>\n", components: [{ type: FoehnValidationAlertsComponent, selector: "foehn-validation-alerts", inputs: ["component", "shouldErrorsBeLive"] }, { type: i5__namespace.ImageCropperComponent, selector: "image-cropper", inputs: ["format", "transform", "maintainAspectRatio", "aspectRatio", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "autoCrop", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "cropper", "alignImage", "disabled", "imageChangedEvent", "imageURL", "imageBase64", "imageFile"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
|
|
11073
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnPictureUploadComponent, decorators: [{
|
|
11074
|
+
type: i0.Component,
|
|
11075
|
+
args: [{
|
|
11076
|
+
selector: 'foehn-picture-upload',
|
|
11077
|
+
templateUrl: './foehn-picture-upload.component.html',
|
|
11078
|
+
providers: [
|
|
11079
|
+
{
|
|
11080
|
+
provide: FoehnInputComponent,
|
|
11081
|
+
useExisting: i0.forwardRef(function () { return FoehnPictureUploadComponent; }),
|
|
11082
|
+
multi: true
|
|
11083
|
+
}
|
|
11084
|
+
]
|
|
11085
|
+
}]
|
|
11086
|
+
}], ctorParameters: function () { return [{ type: GrowlBrokerService }, { type: MultiUploadService }, { type: SdkDictionaryService }]; }, propDecorators: { name: [{
|
|
11087
|
+
type: i0.Input
|
|
11088
|
+
}], key: [{
|
|
11089
|
+
type: i0.Input
|
|
11090
|
+
}], label: [{
|
|
11091
|
+
type: i0.Input
|
|
11092
|
+
}], baseUrl: [{
|
|
11093
|
+
type: i0.Input
|
|
11094
|
+
}], croppedPictureFilename: [{
|
|
11095
|
+
type: i0.Input
|
|
11096
|
+
}], resizeToWidth: [{
|
|
11097
|
+
type: i0.Input
|
|
11098
|
+
}], resizeToHeight: [{
|
|
11099
|
+
type: i0.Input
|
|
11100
|
+
}] } });
|
|
11101
|
+
|
|
11102
|
+
var FoehnPictureUploadModule = /** @class */ (function () {
|
|
11103
|
+
function FoehnPictureUploadModule() {
|
|
11104
|
+
}
|
|
11105
|
+
return FoehnPictureUploadModule;
|
|
11106
|
+
}());
|
|
11107
|
+
FoehnPictureUploadModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnPictureUploadModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
11108
|
+
FoehnPictureUploadModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnPictureUploadModule, declarations: [FoehnPictureUploadComponent], imports: [i3.CommonModule,
|
|
11109
|
+
FoehnIconsModule,
|
|
11110
|
+
FoehnValidationAlertsModule,
|
|
11111
|
+
SdkDictionaryModule,
|
|
11112
|
+
i4.FormsModule,
|
|
11113
|
+
i5.ImageCropperModule], exports: [FoehnPictureUploadComponent] });
|
|
11114
|
+
FoehnPictureUploadModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnPictureUploadModule, imports: [[
|
|
11115
|
+
i3.CommonModule,
|
|
11116
|
+
FoehnIconsModule,
|
|
11117
|
+
FoehnValidationAlertsModule,
|
|
11118
|
+
SdkDictionaryModule,
|
|
11119
|
+
i4.FormsModule,
|
|
11120
|
+
i5.ImageCropperModule
|
|
11121
|
+
]] });
|
|
11122
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnPictureUploadModule, decorators: [{
|
|
11123
|
+
type: i0.NgModule,
|
|
11124
|
+
args: [{
|
|
11125
|
+
imports: [
|
|
11126
|
+
i3.CommonModule,
|
|
11127
|
+
FoehnIconsModule,
|
|
11128
|
+
FoehnValidationAlertsModule,
|
|
11129
|
+
SdkDictionaryModule,
|
|
11130
|
+
i4.FormsModule,
|
|
11131
|
+
i5.ImageCropperModule
|
|
11132
|
+
],
|
|
11133
|
+
declarations: [FoehnPictureUploadComponent],
|
|
11134
|
+
exports: [FoehnPictureUploadComponent]
|
|
11135
|
+
}]
|
|
11136
|
+
}] });
|
|
11137
|
+
|
|
10925
11138
|
var EPaymentRequest = /** @class */ (function () {
|
|
10926
11139
|
function EPaymentRequest() {
|
|
10927
11140
|
}
|
|
@@ -12893,6 +13106,8 @@
|
|
|
12893
13106
|
exports.FoehnPageModalComponent = FoehnPageModalComponent;
|
|
12894
13107
|
exports.FoehnPageModule = FoehnPageModule;
|
|
12895
13108
|
exports.FoehnPageService = FoehnPageService;
|
|
13109
|
+
exports.FoehnPictureUploadComponent = FoehnPictureUploadComponent;
|
|
13110
|
+
exports.FoehnPictureUploadModule = FoehnPictureUploadModule;
|
|
12896
13111
|
exports.FoehnRadioComponent = FoehnRadioComponent;
|
|
12897
13112
|
exports.FoehnRecapSectionComponent = FoehnRecapSectionComponent;
|
|
12898
13113
|
exports.FoehnRecapSectionModule = FoehnRecapSectionModule;
|