@dsivd/prestations-ng 15.5.14 → 15.5.16
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 +27 -1
- package/dsivd-prestations-ng-v15.5.16.tgz +0 -0
- package/esm2020/foehn-address/foehn-input-address.component.mjs +1 -1
- package/esm2020/foehn-autocomplete/foehn-autocomplete.component.mjs +94 -37
- package/esm2020/foehn-input-date-time/foehn-input-date-time.component.mjs +6 -18
- package/esm2020/foehn-input-time/foehn-input-time.component.mjs +8 -17
- package/esm2020/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.mjs +1 -1
- package/esm2020/sdk-date/date.helper.mjs +10 -1
- package/fesm2015/dsivd-prestations-ng.mjs +111 -67
- package/fesm2015/dsivd-prestations-ng.mjs.map +1 -1
- package/fesm2020/dsivd-prestations-ng.mjs +110 -67
- package/fesm2020/dsivd-prestations-ng.mjs.map +1 -1
- package/foehn-autocomplete/foehn-autocomplete.component.d.ts +19 -3
- package/foehn-input-date-time/foehn-input-date-time.component.d.ts +1 -0
- package/foehn-input-time/foehn-input-time.component.d.ts +1 -0
- package/package.json +1 -1
- package/sdk-date/date.helper.d.ts +1 -0
- package/dsivd-prestations-ng-v15.5.14.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,32 @@ A change is considered **breaking** if you have to change your code or update yo
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
+
## [15.5.15]
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- [foehn-multiselect-autocomplete](projects/prestations-ng/src/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.ts)
|
|
34
|
+
- add `@Input() isSuggestionListDynamic = false` to specifies if suggestion elements list is being retrieved dynamically while user inputs in search field.
|
|
35
|
+
- add `@Output() userSearchInput = new EventEmitter<string>()` fired when user changes search input value
|
|
36
|
+
|
|
37
|
+
## [15.5.15]
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- [foehn-input-date-time.ts](projects/prestations-ng/src/foehn-input-date-time/foehn-input-date-time.component.ts)
|
|
42
|
+
- fixed time input (hours and seconds) not accepting 0 as number value
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- [date-helper.ts](projects/prestations-ng/src/sdk-date/date.helper.ts)
|
|
47
|
+
- added `leftPad` function taken from `FoehnDateTimeComponent` and `FoehnTimeComponent` and fixed not adding 0 on empty string
|
|
48
|
+
|
|
49
|
+
### Updated
|
|
50
|
+
|
|
51
|
+
- [foehn-input-time.ts](projects/prestations-ng/src/foehn-input-time/foehn-input-time.component.ts)
|
|
52
|
+
- [foehn-input-date-time.ts](projects/prestations-ng/src/foehn-input-date-time/foehn-input-date-time.component.ts)
|
|
53
|
+
- now uses `leftPad` function from `DateHelper`
|
|
54
|
+
|
|
29
55
|
## [15.5.14]
|
|
30
56
|
|
|
31
57
|
### Fixed
|
|
@@ -179,7 +205,7 @@ data: {
|
|
|
179
205
|
- `@Input() disableYear = false` used to disable date input year
|
|
180
206
|
- `@Input() minDate: number[]` used as minDate in datePicker
|
|
181
207
|
- `@Input() maxDate: number[]` used as maxDate in datePicker
|
|
182
|
-
- `@
|
|
208
|
+
- `@Input() hideDatePickerButton = false` used to hide date picker for date input
|
|
183
209
|
|
|
184
210
|
### Updated
|
|
185
211
|
|
|
Binary file
|
|
@@ -344,7 +344,7 @@ FoehnInputAddressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
344
344
|
useExisting: forwardRef(() => FoehnInputAddressComponent),
|
|
345
345
|
multi: true
|
|
346
346
|
}
|
|
347
|
-
], 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, 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)=\"userInputCountry()\"\n [model]=\"country\"\n [name]=\"name + '.country'\"\n [required]=\"countryRequired\"\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)=\"userInputLocality($event)\"\n [model]=\"locality\"\n [name]=\"name + '.locality'\"\n [allowCustomValue]=\"disabled\"\n [required]=\"swissNpaLocalityRequired\"\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 [allowCustomValue]=\"true\"\n [customValueModelGenerator]=\"streetGenerator\"\n [required]=\"isStreetRequired()\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [customErrors]=\"streetCustomErrors\"\n [allElementDisabled]=\"!country\"\n (userInput)=\"userInputStreet($event)\"\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 [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 [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 [name]=\"name + '.street'\"\n [(model)]=\"street\"\n [required]=\"isForeignStreetRequired()\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [customErrors]=\"streetCustomErrors\"\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 [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 [name]=\"name + '.postOfficeBoxText'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"isPostOfficeBoxTextRequired()\"\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 [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 [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: i3.FoehnValidationAlertsComponent, selector: "foehn-validation-alerts", inputs: ["component", "shouldErrorsBeLive"] }, { type: i4.FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "customValueModelGenerator", "itemHeightInSuggestionListInPx", "elementSuggestionLabel", "caseSensitiveSearch", "disabled"] }, { type: i5.FoehnInputForeignLocalityComponent, selector: "foehn-input-foreign-locality", inputs: ["localityRequired", "zipCodeRequired"] }, { type: i6.FoehnInputForeignStreetComponent, selector: "foehn-input-foreign-street" }, { type: i7.FoehnInputTextComponent, selector: "foehn-input-text", inputs: ["numberOnly"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fromDictionary": i9.SdkDictionaryPipe, "async": i8.AsyncPipe } });
|
|
347
|
+
], 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, 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)=\"userInputCountry()\"\n [model]=\"country\"\n [name]=\"name + '.country'\"\n [required]=\"countryRequired\"\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)=\"userInputLocality($event)\"\n [model]=\"locality\"\n [name]=\"name + '.locality'\"\n [allowCustomValue]=\"disabled\"\n [required]=\"swissNpaLocalityRequired\"\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 [allowCustomValue]=\"true\"\n [customValueModelGenerator]=\"streetGenerator\"\n [required]=\"isStreetRequired()\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [customErrors]=\"streetCustomErrors\"\n [allElementDisabled]=\"!country\"\n (userInput)=\"userInputStreet($event)\"\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 [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 [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 [name]=\"name + '.street'\"\n [(model)]=\"street\"\n [required]=\"isForeignStreetRequired()\"\n [helpText]=\"\n 'foehn-input-address.street.help-text' | fromDictionary\n \"\n [customErrors]=\"streetCustomErrors\"\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 [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 [name]=\"name + '.postOfficeBoxText'\"\n (modelChange)=\"updateAddress()\"\n (userInput)=\"handleUserInput()\"\n [required]=\"isPostOfficeBoxTextRequired()\"\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 [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 [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: i3.FoehnValidationAlertsComponent, selector: "foehn-validation-alerts", inputs: ["component", "shouldErrorsBeLive"] }, { type: i4.FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "isSuggestionListDynamic", "customValueModelGenerator", "itemHeightInSuggestionListInPx", "elementSuggestionLabel", "caseSensitiveSearch", "disabled"], outputs: ["userSearchInput"] }, { type: i5.FoehnInputForeignLocalityComponent, selector: "foehn-input-foreign-locality", inputs: ["localityRequired", "zipCodeRequired"] }, { type: i6.FoehnInputForeignStreetComponent, selector: "foehn-input-foreign-street" }, { type: i7.FoehnInputTextComponent, selector: "foehn-input-text", inputs: ["numberOnly"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "fromDictionary": i9.SdkDictionaryPipe, "async": i8.AsyncPipe } });
|
|
348
348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FoehnInputAddressComponent, decorators: [{
|
|
349
349
|
type: Component,
|
|
350
350
|
args: [{ selector: 'foehn-input-address', providers: [
|