@dsivd/prestations-ng 14.5.10-beta5 → 14.5.10-beta6

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.
@@ -8316,8 +8316,8 @@
8316
8316
  this.localities
8317
8317
  ]).pipe(
8318
8318
  // The zipCodeId when locality changes or match locality (postalLocalityHistoryId) from model
8319
- operators.map(function (_a) {
8320
- var _b = __read(_a, 2), zipCodeId = _b[0], localities = _b[1];
8319
+ operators.map(function (_d) {
8320
+ var _e = __read(_d, 2), zipCodeId = _e[0], localities = _e[1];
8321
8321
  return zipCodeId ||
8322
8322
  _this.extractLocalityZipCodeId(localities, _this.locality);
8323
8323
  }), operators.debounceTime(0), operators.distinctUntilChanged(),
@@ -8328,8 +8328,8 @@
8328
8328
  this.streets
8329
8329
  ]).pipe(
8330
8330
  // The estrid when street changes or match street (longName) from model
8331
- operators.map(function (_a) {
8332
- var _b = __read(_a, 2), estrid = _b[0], streets = _b[1];
8331
+ operators.map(function (_d) {
8332
+ var _e = __read(_d, 2), estrid = _e[0], streets = _e[1];
8333
8333
  return estrid || _this.extractStreetEstrid(streets, _this.street);
8334
8334
  }), operators.debounceTime(0), operators.distinctUntilChanged(),
8335
8335
  // The list of streets or a default value to an empty array
@@ -8385,14 +8385,16 @@
8385
8385
  (this.country && this.country.iso2Id === SWISS_ISO_ID));
8386
8386
  };
8387
8387
  FoehnInputAddressComponent.prototype.userInputCountryOrLocality = function (emptyLocality) {
8388
+ var _a, _b, _c;
8388
8389
  if (emptyLocality) {
8389
8390
  this.locality = null;
8390
8391
  this.postOfficeBoxText = null;
8391
8392
  this.addressLine1 = null;
8392
8393
  this.addressLine2 = null;
8393
8394
  // subcomponents will be enabled but should not display errors yet
8394
- console.log('here 2');
8395
- this.getNativeInputList().forEach(function (ngModel) { return ngModel.control.markAsDirty(); });
8395
+ (_a = this.foreignLocalityComponent) === null || _a === void 0 ? void 0 : _a.getNativeInputList().forEach(function (ngModel) { return ngModel.control.markAsDirty(); });
8396
+ (_b = this.foreignStreetComponent) === null || _b === void 0 ? void 0 : _b.getNativeInputList().forEach(function (ngModel) { return ngModel.control.markAsDirty(); });
8397
+ (_c = this.foreignHouseNumber) === null || _c === void 0 ? void 0 : _c.getNativeInputList().forEach(function (ngModel) { return ngModel.control.markAsDirty(); });
8396
8398
  }
8397
8399
  this.street = null;
8398
8400
  this.houseNumber = null;
@@ -8551,7 +8553,7 @@
8551
8553
  useExisting: i0.forwardRef(function () { return FoehnInputAddressComponent; }),
8552
8554
  multi: true
8553
8555
  }
8554
- ], usesInheritance: true, ngImport: i0__namespace, template: "<div\n [attr.id]=\"buildId() + 'Container'\"\n class=\"form-group\"\n [class.has-danger]=\"hasErrorsToDisplay()\"\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n [tabIndex]=\"-1\"\n>\n <fieldset\n class=\"mb-3\"\n [attr.aria-describedby]=\"getDescribedBy()\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n >\n <legend *ngIf=\"!!label\" [ngClass]=\"isLabelSrOnly ? 'sr-only' : 'vd-p'\">\n <span [innerHTML]=\"label\"></span>\n <span\n *ngIf=\"!required && !hideNotRequiredExtraLabel\"\n aria-hidden=\"true\"\n >\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n </legend>\n\n <foehn-validation-alerts [component]=\"this\"></foehn-validation-alerts>\n\n <small\n *ngIf=\"helpText\"\n [attr.id]=\"buildId() + 'Help'\"\n class=\"text-secondary\"\n [innerHTML]=\"helpText\"\n ></small>\n\n <ng-content></ng-content>\n\n <foehn-autocomplete\n *ngIf=\"!isOnlySwiss\"\n [label]=\"'foehn-input-address.country.label' | fromDictionary\"\n [elements]=\"countries | async\"\n elementLabel=\"shortNameFr\"\n [elementValue]=\"identity\"\n [elementValueIdentity]=\"countryIdentity\"\n (modelChange)=\"countryUpdated($event)\"\n (userInput)=\"userInputCountryOrLocality(true)\"\n [model]=\"country\"\n [name]=\"name + '.country'\"\n [id]=\"buildId() + '.country'\"\n [required]=\"countryRequired\"\n [searchValueMinCharsCount]=\"3\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n\n <ng-container *ngIf=\"isSwiss()\">\n <foehn-autocomplete\n [label]=\"'foehn-input-address.locality.label' | fromDictionary\"\n [elements]=\"localities | async\"\n [elementLabel]=\"getLocalityDisplayedName\"\n [elementValue]=\"identity\"\n [elementValueIdentity]=\"localityIdentity\"\n (modelChange)=\"localityUpdated($event)\"\n (userInput)=\"userInputCountryOrLocality(false)\"\n [model]=\"locality\"\n [name]=\"name + '.locality'\"\n [id]=\"buildId() + '.locality'\"\n [required]=\"swissNpaLocalityRequired\"\n [searchValueMinCharsCount]=\"3\"\n [allElementDisabled]=\"!country\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n\n <foehn-autocomplete\n [label]=\"'foehn-input-address.street.label' | fromDictionary\"\n [elements]=\"streets | async\"\n elementLabel=\"longName\"\n [elementValue]=\"identity\"\n [elementValueIdentity]=\"streetIdentity\"\n (modelChange)=\"streetUpdated($event)\"\n [model]=\"street\"\n [name]=\"name + '.street'\"\n [id]=\"buildId() + '.street'\"\n [allowCustomValue]=\"true\"\n [customValueModelGenerator]=\"streetGenerator\"\n [required]=\"streetRequired\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [allElementDisabled]=\"!country\"\n (userInput)=\"handleUserInput()\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n\n <foehn-autocomplete\n [label]=\"\n 'foehn-input-address.houseNumber.label' | fromDictionary\n \"\n [elements]=\"streetNumbers | async\"\n elementLabel=\"name\"\n elementValue=\"name\"\n [(model)]=\"houseNumber\"\n [name]=\"name + '.houseNumber'\"\n [id]=\"buildId() + '.houseNumber'\"\n [allowCustomValue]=\"true\"\n [helpText]=\"\n 'foehn-input-address.houseNumber.help-text' | fromDictionary\n \"\n [allElementDisabled]=\"!country\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"streetNumberRequired\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n </ng-container>\n\n <ng-container *ngIf=\"!isSwiss()\">\n <!--\n Component <foehn-input-foreign-locality> is special because we use the same model when swiss or foreigner.\n To do so, we need:\n - Errors will be bind on 'locality' when NULL or on 'zipCode' and 'longName' model inside component when EMPTY\n - Hide label from component because we need label from children to be displayed (isLabelSrOnly: true)\n - required and disabled params are transmitted to children\n -->\n <foehn-input-foreign-locality\n [label]=\"'foehn-input-address.locality.label' | fromDictionary\"\n [id]=\"buildId() + '.locality'\"\n [name]=\"name + '.locality'\"\n [(model)]=\"locality\"\n [zipCodeRequired]=\"foreignZipCodeRequired\"\n [localityRequired]=\"foreignLocalityRequired\"\n [isLabelSrOnly]=\"true\"\n [disabled]=\"!country || disabled\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n ></foehn-input-foreign-locality>\n <!--\n Component <foehn-input-foreign-street> is special because we use the same model when swiss or foreigner.\n To do so, we need:\n - Errors will be bind on 'street' when NULL or on 'longName' model inside component when EMPTY\n - required, helpText, isLabelSrOnly and disabled params are transmitted to children\n -->\n <foehn-input-foreign-street\n [label]=\"'foehn-input-address.street.label' | fromDictionary\"\n [id]=\"buildId() + '.street'\"\n [name]=\"name + '.street'\"\n [(model)]=\"street\"\n [required]=\"foreignStreetRequired\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [disabled]=\"!country || disabled\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n ></foehn-input-foreign-street>\n\n <foehn-input-text\n [label]=\"\n 'foehn-input-address.houseNumber.label' | fromDictionary\n \"\n [id]=\"buildId() + '.houseNumber'\"\n [name]=\"name + '.houseNumber'\"\n [(model)]=\"houseNumber\"\n [helpText]=\"\n 'foehn-input-address.houseNumber.help-text' | fromDictionary\n \"\n [disabled]=\"!country || disabled\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"foreignStreetNumberRequired\"\n ></foehn-input-text>\n </ng-container>\n\n <foehn-input-text\n *ngIf=\"showPostOfficeBoxText\"\n [(model)]=\"postOfficeBoxText\"\n [helpText]=\"\n 'foehn-input-address.postOfficeBoxText.help-text'\n | fromDictionary\n \"\n [label]=\"\n 'foehn-input-address.postOfficeBoxText.label' | fromDictionary\n \"\n [id]=\"buildId() + '_postOfficeBoxText'\"\n [name]=\"name + '.postOfficeBoxText'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"postOfficeBoxTextRequired\"\n [disabled]=\"disabled\"\n ></foehn-input-text>\n\n <foehn-input-text\n *ngIf=\"showAdressLines && showAdressLine1\"\n [(model)]=\"addressLine1\"\n [label]=\"'foehn-input-address.addressLine1.label' | fromDictionary\"\n [id]=\"buildId() + '_addressLine1'\"\n [name]=\"name + '.addressLine1'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"addressLine1Required\"\n [autocomplete]=\"'address-line2'\"\n [disabled]=\"disabled\"\n ></foehn-input-text>\n\n <foehn-input-text\n *ngIf=\"showAdressLines && showAdressLine2\"\n [(model)]=\"addressLine2\"\n [label]=\"'foehn-input-address.addressLine2.label' | fromDictionary\"\n [id]=\"buildId() + '_addressLine2'\"\n [name]=\"name + '.addressLine2'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"addressLine2Required\"\n [autocomplete]=\"'address-line3'\"\n [disabled]=\"disabled\"\n ></foehn-input-text>\n </fieldset>\n</div>\n", components: [{ type: FoehnValidationAlertsComponent, selector: "foehn-validation-alerts", inputs: ["component", "shouldErrorsBeLive"] }, { type: FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "customValueModelGenerator"] }, { type: FoehnInputForeignLocalityComponent, selector: "foehn-input-foreign-locality", inputs: ["localityRequired", "zipCodeRequired"] }, { type: FoehnInputForeignStreetComponent, selector: "foehn-input-foreign-street" }, { type: FoehnInputTextComponent, selector: "foehn-input-text", inputs: ["numberOnly"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fromDictionary": SdkDictionaryPipe, "async": i3__namespace.AsyncPipe } });
8556
+ ], viewQueries: [{ propertyName: "foreignLocalityComponent", first: true, predicate: FoehnInputForeignLocalityComponent, descendants: true }, { propertyName: "foreignStreetComponent", first: true, predicate: FoehnInputForeignStreetComponent, descendants: true }, { propertyName: "foreignHouseNumber", first: true, predicate: ["foreignHouseNumber"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n [attr.id]=\"buildId() + 'Container'\"\n class=\"form-group\"\n [class.has-danger]=\"hasErrorsToDisplay()\"\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n [tabIndex]=\"-1\"\n>\n <fieldset\n class=\"mb-3\"\n [attr.aria-describedby]=\"getDescribedBy()\"\n [attr.aria-invalid]=\"hasErrorsToDisplay() || null\"\n >\n <legend *ngIf=\"!!label\" [ngClass]=\"isLabelSrOnly ? 'sr-only' : 'vd-p'\">\n <span [innerHTML]=\"label\"></span>\n <span\n *ngIf=\"!required && !hideNotRequiredExtraLabel\"\n aria-hidden=\"true\"\n >\n {{ 'foehn-input.optional' | fromDictionary }}\n </span>\n </legend>\n\n <foehn-validation-alerts [component]=\"this\"></foehn-validation-alerts>\n\n <small\n *ngIf=\"helpText\"\n [attr.id]=\"buildId() + 'Help'\"\n class=\"text-secondary\"\n [innerHTML]=\"helpText\"\n ></small>\n\n <ng-content></ng-content>\n\n <foehn-autocomplete\n *ngIf=\"!isOnlySwiss\"\n [label]=\"'foehn-input-address.country.label' | fromDictionary\"\n [elements]=\"countries | async\"\n elementLabel=\"shortNameFr\"\n [elementValue]=\"identity\"\n [elementValueIdentity]=\"countryIdentity\"\n (modelChange)=\"countryUpdated($event)\"\n (userInput)=\"userInputCountryOrLocality(true)\"\n [model]=\"country\"\n [name]=\"name + '.country'\"\n [id]=\"buildId() + '.country'\"\n [required]=\"countryRequired\"\n [searchValueMinCharsCount]=\"3\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n\n <ng-container *ngIf=\"isSwiss()\">\n <foehn-autocomplete\n [label]=\"'foehn-input-address.locality.label' | fromDictionary\"\n [elements]=\"localities | async\"\n [elementLabel]=\"getLocalityDisplayedName\"\n [elementValue]=\"identity\"\n [elementValueIdentity]=\"localityIdentity\"\n (modelChange)=\"localityUpdated($event)\"\n (userInput)=\"userInputCountryOrLocality(false)\"\n [model]=\"locality\"\n [name]=\"name + '.locality'\"\n [id]=\"buildId() + '.locality'\"\n [required]=\"swissNpaLocalityRequired\"\n [searchValueMinCharsCount]=\"3\"\n [allElementDisabled]=\"!country\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n\n <foehn-autocomplete\n [label]=\"'foehn-input-address.street.label' | fromDictionary\"\n [elements]=\"streets | async\"\n elementLabel=\"longName\"\n [elementValue]=\"identity\"\n [elementValueIdentity]=\"streetIdentity\"\n (modelChange)=\"streetUpdated($event)\"\n [model]=\"street\"\n [name]=\"name + '.street'\"\n [id]=\"buildId() + '.street'\"\n [allowCustomValue]=\"true\"\n [customValueModelGenerator]=\"streetGenerator\"\n [required]=\"streetRequired\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [allElementDisabled]=\"!country\"\n (userInput)=\"handleUserInput()\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n\n <foehn-autocomplete\n [label]=\"\n 'foehn-input-address.houseNumber.label' | fromDictionary\n \"\n [elements]=\"streetNumbers | async\"\n elementLabel=\"name\"\n elementValue=\"name\"\n [(model)]=\"houseNumber\"\n [name]=\"name + '.houseNumber'\"\n [id]=\"buildId() + '.houseNumber'\"\n [allowCustomValue]=\"true\"\n [helpText]=\"\n 'foehn-input-address.houseNumber.help-text' | fromDictionary\n \"\n [allElementDisabled]=\"!country\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"streetNumberRequired\"\n [disabled]=\"disabled\"\n ></foehn-autocomplete>\n </ng-container>\n\n <ng-container *ngIf=\"!isSwiss()\">\n <!--\n Component <foehn-input-foreign-locality> is special because we use the same model when swiss or foreigner.\n To do so, we need:\n - Errors will be bind on 'locality' when NULL or on 'zipCode' and 'longName' model inside component when EMPTY\n - Hide label from component because we need label from children to be displayed (isLabelSrOnly: true)\n - required and disabled params are transmitted to children\n -->\n <foehn-input-foreign-locality\n [label]=\"'foehn-input-address.locality.label' | fromDictionary\"\n [id]=\"buildId() + '.locality'\"\n [name]=\"name + '.locality'\"\n [(model)]=\"locality\"\n [zipCodeRequired]=\"foreignZipCodeRequired\"\n [localityRequired]=\"foreignLocalityRequired\"\n [isLabelSrOnly]=\"true\"\n [disabled]=\"!country || disabled\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n ></foehn-input-foreign-locality>\n <!--\n Component <foehn-input-foreign-street> is special because we use the same model when swiss or foreigner.\n To do so, we need:\n - Errors will be bind on 'street' when NULL or on 'longName' model inside component when EMPTY\n - required, helpText, isLabelSrOnly and disabled params are transmitted to children\n -->\n <foehn-input-foreign-street\n [label]=\"'foehn-input-address.street.label' | fromDictionary\"\n [id]=\"buildId() + '.street'\"\n [name]=\"name + '.street'\"\n [(model)]=\"street\"\n [required]=\"foreignStreetRequired\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [disabled]=\"!country || disabled\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n ></foehn-input-foreign-street>\n\n <foehn-input-text\n #foreignHouseNumber\n [label]=\"\n 'foehn-input-address.houseNumber.label' | fromDictionary\n \"\n [id]=\"buildId() + '.houseNumber'\"\n [name]=\"name + '.houseNumber'\"\n [(model)]=\"houseNumber\"\n [helpText]=\"\n 'foehn-input-address.houseNumber.help-text' | fromDictionary\n \"\n [disabled]=\"!country || disabled\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"foreignStreetNumberRequired\"\n ></foehn-input-text>\n </ng-container>\n\n <foehn-input-text\n *ngIf=\"showPostOfficeBoxText\"\n [(model)]=\"postOfficeBoxText\"\n [helpText]=\"\n 'foehn-input-address.postOfficeBoxText.help-text'\n | fromDictionary\n \"\n [label]=\"\n 'foehn-input-address.postOfficeBoxText.label' | fromDictionary\n \"\n [id]=\"buildId() + '_postOfficeBoxText'\"\n [name]=\"name + '.postOfficeBoxText'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"postOfficeBoxTextRequired\"\n [disabled]=\"disabled\"\n ></foehn-input-text>\n\n <foehn-input-text\n *ngIf=\"showAdressLines && showAdressLine1\"\n [(model)]=\"addressLine1\"\n [label]=\"'foehn-input-address.addressLine1.label' | fromDictionary\"\n [id]=\"buildId() + '_addressLine1'\"\n [name]=\"name + '.addressLine1'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"addressLine1Required\"\n [autocomplete]=\"'address-line2'\"\n [disabled]=\"disabled\"\n ></foehn-input-text>\n\n <foehn-input-text\n *ngIf=\"showAdressLines && showAdressLine2\"\n [(model)]=\"addressLine2\"\n [label]=\"'foehn-input-address.addressLine2.label' | fromDictionary\"\n [id]=\"buildId() + '_addressLine2'\"\n [name]=\"name + '.addressLine2'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"addressLine2Required\"\n [autocomplete]=\"'address-line3'\"\n [disabled]=\"disabled\"\n ></foehn-input-text>\n </fieldset>\n</div>\n", components: [{ type: FoehnValidationAlertsComponent, selector: "foehn-validation-alerts", inputs: ["component", "shouldErrorsBeLive"] }, { type: FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "customValueModelGenerator"] }, { type: FoehnInputForeignLocalityComponent, selector: "foehn-input-foreign-locality", inputs: ["localityRequired", "zipCodeRequired"] }, { type: FoehnInputForeignStreetComponent, selector: "foehn-input-foreign-street" }, { type: FoehnInputTextComponent, selector: "foehn-input-text", inputs: ["numberOnly"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fromDictionary": SdkDictionaryPipe, "async": i3__namespace.AsyncPipe } });
8555
8557
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnInputAddressComponent, decorators: [{
8556
8558
  type: i0.Component,
8557
8559
  args: [{
@@ -8565,7 +8567,16 @@
8565
8567
  }
8566
8568
  ]
8567
8569
  }]
8568
- }], ctorParameters: function () { return [{ type: i1__namespace.HttpClient }, { type: i0__namespace.NgZone }]; }, propDecorators: { countriesUrl: [{
8570
+ }], ctorParameters: function () { return [{ type: i1__namespace.HttpClient }, { type: i0__namespace.NgZone }]; }, propDecorators: { foreignLocalityComponent: [{
8571
+ type: i0.ViewChild,
8572
+ args: [FoehnInputForeignLocalityComponent, { static: false }]
8573
+ }], foreignStreetComponent: [{
8574
+ type: i0.ViewChild,
8575
+ args: [FoehnInputForeignStreetComponent, { static: false }]
8576
+ }], foreignHouseNumber: [{
8577
+ type: i0.ViewChild,
8578
+ args: ['foreignHouseNumber', { static: false }]
8579
+ }], countriesUrl: [{
8569
8580
  type: i0.Input
8570
8581
  }], isOnlySwiss: [{
8571
8582
  type: i0.Input