@dsivd/prestations-ng 14.5.23-beta6 → 14.5.23-beta7
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/bundles/dsivd-prestations-ng.umd.js +19 -5
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v14.5.23-beta7.tgz +0 -0
- package/esm2015/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.js +21 -7
- package/fesm2015/dsivd-prestations-ng.js +18 -5
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.d.ts +3 -1
- package/package.json +1 -1
- package/dsivd-prestations-ng-v14.5.23-beta6.tgz +0 -0
|
@@ -8857,7 +8857,7 @@
|
|
|
8857
8857
|
_this.dictionaryService = dictionaryService;
|
|
8858
8858
|
_this.showEmptyListMessage = false;
|
|
8859
8859
|
_this.srAnnouncements = '';
|
|
8860
|
-
_this.
|
|
8860
|
+
_this.SR_ANNOUNCEMENT_CLEAR_TIMEOUT_INTERVAL_MS = 2000;
|
|
8861
8861
|
return _this;
|
|
8862
8862
|
}
|
|
8863
8863
|
Object.defineProperty(FoehnMultiselectAutocompleteComponent.prototype, "defaultElementValues", {
|
|
@@ -8925,7 +8925,7 @@
|
|
|
8925
8925
|
return _super.prototype.getLabel.call(this, elem);
|
|
8926
8926
|
};
|
|
8927
8927
|
FoehnMultiselectAutocompleteComponent.prototype.canBeDeleted = function (index) {
|
|
8928
|
-
return !this.defaultElementValues || !this.defaultElementValues.includes(this.model[index]);
|
|
8928
|
+
return !this.disabled && (!this.defaultElementValues || !this.defaultElementValues.includes(this.model[index]));
|
|
8929
8929
|
};
|
|
8930
8930
|
FoehnMultiselectAutocompleteComponent.prototype.onAutocompleteElementsLoaded = function (elements) {
|
|
8931
8931
|
var _this = this;
|
|
@@ -8945,7 +8945,7 @@
|
|
|
8945
8945
|
FoehnMultiselectAutocompleteComponent.prototype.findElementByModelItem = function (item) {
|
|
8946
8946
|
var _this = this;
|
|
8947
8947
|
if (!!this.elements && !!this.elements.length) {
|
|
8948
|
-
var itemValue_1 = typeof item
|
|
8948
|
+
var itemValue_1 = typeof item !== 'object' ? item : this.getValue(item);
|
|
8949
8949
|
var elem = this.elements.find(function (element) { return _this.getValue(element) === itemValue_1; });
|
|
8950
8950
|
if (!!elem) {
|
|
8951
8951
|
return elem;
|
|
@@ -9008,12 +9008,20 @@
|
|
|
9008
9008
|
}
|
|
9009
9009
|
};
|
|
9010
9010
|
FoehnMultiselectAutocompleteComponent.prototype.manageSuggestionListAndFocusAfterRemovingAnItem = function () {
|
|
9011
|
+
var _this = this;
|
|
9011
9012
|
// Hide message saying no more suggestions to display
|
|
9012
9013
|
this.showEmptyListMessage = false;
|
|
9013
9014
|
// Manually show autocomplete because there is at least one suggestions to display
|
|
9014
9015
|
this.autocompleteComponent.inputElement.nativeElement.hidden = false;
|
|
9015
9016
|
// Add back selected item to autocomplete suggestion list
|
|
9016
9017
|
this.autocompleteComponent.elements = this.filterAutocompleteElements(this.elements);
|
|
9018
|
+
// When deleting a selected item, check were to set focus back when no more items to delete
|
|
9019
|
+
this.selectedElemRef.changes.pipe(operators.first()).subscribe(function () {
|
|
9020
|
+
var selectedElemRefArray = __spreadArray([], __read(_this.selectedElemRef.toArray()));
|
|
9021
|
+
if (!selectedElemRefArray.length && !!_this.selectedItemsArea) {
|
|
9022
|
+
_this.selectedItemsArea.nativeElement.setFocus();
|
|
9023
|
+
}
|
|
9024
|
+
});
|
|
9017
9025
|
};
|
|
9018
9026
|
FoehnMultiselectAutocompleteComponent.prototype.showAlertMessageAndHideAutocomplete = function () {
|
|
9019
9027
|
// Show a message to user indicating there is no more suggestions to display
|
|
@@ -9033,7 +9041,7 @@
|
|
|
9033
9041
|
}
|
|
9034
9042
|
this.srAnnouncementClearTimer = setTimeout(function () {
|
|
9035
9043
|
_this.srAnnouncements = '';
|
|
9036
|
-
}, this.
|
|
9044
|
+
}, this.SR_ANNOUNCEMENT_CLEAR_TIMEOUT_INTERVAL_MS);
|
|
9037
9045
|
};
|
|
9038
9046
|
return FoehnMultiselectAutocompleteComponent;
|
|
9039
9047
|
}(FoehnAutocompleteComponent));
|
|
@@ -9044,7 +9052,7 @@
|
|
|
9044
9052
|
useExisting: i0.forwardRef(function () { return FoehnMultiselectAutocompleteComponent; }),
|
|
9045
9053
|
multi: true
|
|
9046
9054
|
}
|
|
9047
|
-
], viewQueries: [{ propertyName: "autocompleteComponent", first: true, predicate: ["autocompleteComponent"], descendants: true }, { propertyName: "alertMessageContainer", first: true, predicate: ["alertMessageContainer"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<foehn-autocomplete\n #autocompleteComponent\n [name]=\"name\"\n [label]=\"label\"\n [elements]=\"elements\"\n [elementsUrl]=\"elementsUrl\"\n [elementValue]=\"elementValue\"\n [elementLabel]=\"elementLabel\"\n [elementValueIdentity]=\"elementValueIdentity\"\n [elementDisabled]=\"elementDisabled\"\n [allElementDisabled]=\"allElementDisabled\"\n [elementGroup]=\"elementGroup\"\n [allowCustomValue]=\"false\"\n [searchValueMinCharsCount]=\"searchValueMinCharsCount\"\n [customValueModelGenerator]=\"customValueModelGenerator\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n (userInput)=\"addItem($event)\"\n [(model)]=\"autocompleteInputValue\"\n (elementsLoaded)=\"onAutocompleteElementsLoaded($event)\"\n>\n <small\n *ngIf=\"!showEmptyListMessage\"\n [attr.id]=\"buildChildId('Help')\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText ? helpText : 'foehn-multiselect-autocomplete.autocomplete.screen-reader.label' | fromDictionary\"\n ></small>\n\n <div\n [id]=\"buildChildId('AlertMessageContainer')\"\n role=\"status\"\n #alertMessageContainer\n >\n <p\n *ngIf=\"showEmptyListMessage\"\n class=\"alert alert-info\"\n tabindex=\"0\"\n >{{'foehn-multiselect-autocomplete.autocomplete.empty-message' | fromDictionary}}</p>\n </div>\n</foehn-autocomplete>\n\n<p\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n>\n {{srAnnouncements}}\n</p>\n\n<div\n role=\"presentation\"\n class=\"selected-list-container d-flex align-content-stretch flex-wrap\"\n [ngClass]=\"!!model && !!model.length ? 'mb-2' : 'mb-0'\"\n>\n <ng-container *ngFor=\"let element of model; let index = index; trackBy: trackByFn\">\n <span\n *ngIf=\"!canBeDeleted(index)\"\n class=\"badge badge-pill badge-secondary mr-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"0\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n >\n {{getLabel(element)}}\n </span>\n <button\n *ngIf=\"canBeDeleted(index)\"\n class=\"btn btn-secondary badge badge-pill mr-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"0\"\n [attr.aria-label]=\"getDeleteButtonAriaLabel(element)\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n (click)=\"removeItem(element)\"\n >\n {{getLabel(element)}}\n <foehn-icon-times\n aria-hidden=\"true\"\n class=\"ml-2\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n ></foehn-icon-times>\n </button>\n </ng-container>\n</div>\n", styles: ["foehn-autocomplete p.alert:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem #ffbf47}.selected-list-container button>.btn,.btn-link{line-height:inherit;padding:0}.selected-list-container .btn{text-transform:none}.selected-list-container span.badge-pill:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem #ffbf47}\n"], components: [{ type: FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "customValueModelGenerator"] }, { type: FoehnIconTimesComponent, selector: "foehn-icon-times" }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
|
|
9055
|
+
], viewQueries: [{ propertyName: "autocompleteComponent", first: true, predicate: ["autocompleteComponent"], descendants: true }, { propertyName: "alertMessageContainer", first: true, predicate: ["alertMessageContainer"], descendants: true }, { propertyName: "selectedItemsArea", first: true, predicate: ["selectedItemsArea"], descendants: true }, { propertyName: "selectedElemRef", predicate: ["selectedElemRef"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<foehn-autocomplete\n #autocompleteComponent\n [name]=\"name\"\n [label]=\"label\"\n [elements]=\"elements\"\n [elementsUrl]=\"elementsUrl\"\n [elementValue]=\"elementValue\"\n [elementLabel]=\"elementLabel\"\n [elementValueIdentity]=\"elementValueIdentity\"\n [elementDisabled]=\"elementDisabled\"\n [allElementDisabled]=\"allElementDisabled\"\n [elementGroup]=\"elementGroup\"\n [allowCustomValue]=\"false\"\n [searchValueMinCharsCount]=\"searchValueMinCharsCount\"\n [customValueModelGenerator]=\"customValueModelGenerator\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n (userInput)=\"addItem($event)\"\n [(model)]=\"autocompleteInputValue\"\n (elementsLoaded)=\"onAutocompleteElementsLoaded($event)\"\n>\n <small\n *ngIf=\"!showEmptyListMessage\"\n [attr.id]=\"buildChildId('Help')\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"helpText ? helpText : 'foehn-multiselect-autocomplete.autocomplete.screen-reader.label' | fromDictionary\"\n ></small>\n\n <div\n [id]=\"buildChildId('AlertMessageContainer')\"\n role=\"status\"\n #alertMessageContainer\n >\n <p\n *ngIf=\"showEmptyListMessage\"\n class=\"alert alert-info\"\n tabindex=\"0\"\n >{{'foehn-multiselect-autocomplete.autocomplete.empty-message' | fromDictionary}}</p>\n </div>\n</foehn-autocomplete>\n\n<p\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n>\n {{srAnnouncements}}\n</p>\n\n<div\n role=\"presentation\"\n class=\"selected-list-container d-flex align-content-stretch flex-wrap\"\n [ngClass]=\"!!model && !!model.length ? 'mb-2' : 'mb-0'\"\n #selectedItemsArea\n>\n <ng-container *ngFor=\"let element of model; let index = index; trackBy: trackByFn\">\n <span\n *ngIf=\"!canBeDeleted(index)\"\n class=\"badge badge-pill badge-secondary mr-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n >\n {{getLabel(element)}}\n </span>\n <button\n *ngIf=\"canBeDeleted(index)\"\n class=\"btn btn-secondary badge badge-pill mr-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"0\"\n [attr.aria-label]=\"getDeleteButtonAriaLabel(element)\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n (click)=\"removeItem(element)\"\n #selectedElemRef\n >\n {{getLabel(element)}}\n <foehn-icon-times\n aria-hidden=\"true\"\n class=\"ml-2\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n ></foehn-icon-times>\n </button>\n </ng-container>\n</div>\n", styles: ["foehn-autocomplete p.alert:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem #ffbf47}.selected-list-container button>.btn,.btn-link{line-height:inherit;padding:0}.selected-list-container .btn{text-transform:none}.selected-list-container span.badge-pill:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem #ffbf47}\n"], components: [{ type: FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "customValueModelGenerator"] }, { type: FoehnIconTimesComponent, selector: "foehn-icon-times" }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "fromDictionary": SdkDictionaryPipe } });
|
|
9048
9056
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnMultiselectAutocompleteComponent, decorators: [{
|
|
9049
9057
|
type: i0.Component,
|
|
9050
9058
|
args: [{
|
|
@@ -9065,6 +9073,12 @@
|
|
|
9065
9073
|
}], alertMessageContainer: [{
|
|
9066
9074
|
type: i0.ViewChild,
|
|
9067
9075
|
args: ['alertMessageContainer']
|
|
9076
|
+
}], selectedElemRef: [{
|
|
9077
|
+
type: i0.ViewChildren,
|
|
9078
|
+
args: ['selectedElemRef']
|
|
9079
|
+
}], selectedItemsArea: [{
|
|
9080
|
+
type: i0.ViewChild,
|
|
9081
|
+
args: ['selectedItemsArea']
|
|
9068
9082
|
}], defaultElementValues: [{
|
|
9069
9083
|
type: i0.Input
|
|
9070
9084
|
}], defaultElementValue: [{
|