@dsivd/prestations-ng 14.5.23-beta2 → 14.5.23-beta5
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 +23 -112
- package/bundles/dsivd-prestations-ng.umd.js.map +1 -1
- package/dsivd-prestations-ng-v14.5.23-beta5.tgz +0 -0
- package/esm2015/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.js +22 -106
- package/esm2015/sdk-dictionary/default-dictionary.js +3 -7
- package/fesm2015/dsivd-prestations-ng.js +22 -109
- package/fesm2015/dsivd-prestations-ng.js.map +1 -1
- package/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.d.ts +3 -14
- package/package.json +1 -1
- package/dsivd-prestations-ng-v14.5.23-beta2.tgz +0 -0
|
@@ -1930,12 +1930,8 @@
|
|
|
1930
1930
|
'foehn-status-progress-bar.step3': 'Confirmation',
|
|
1931
1931
|
'foehn-status-progress-bar.step3.srOnly': 'Etape 3 sur 3, Confirmation, demande transmise',
|
|
1932
1932
|
'foehn-multiselect-autocomplete.selected.delete': 'Supprimer {elementLabel}',
|
|
1933
|
-
'foehn-multiselect-autocomplete.
|
|
1934
|
-
'foehn-multiselect-autocomplete.
|
|
1935
|
-
'foehn-multiselect-autocomplete.selected.screen-reader.selected-value': 'Élément sélectionné:',
|
|
1936
|
-
'foehn-multiselect-autocomplete.list-of-selected-items': 'Liste des éléments sélectionnés:',
|
|
1937
|
-
'foehn-multiselect-autocomplete.list-of-selected-items.screen-reader.helper': 'En mode application, Utilisez les flèches ' +
|
|
1938
|
-
'gauche et droite pour naviguer dans la liste.',
|
|
1933
|
+
'foehn-multiselect-autocomplete.sr-announcement.deleted': '{elementLabel} a été supprimé, ',
|
|
1934
|
+
'foehn-multiselect-autocomplete.sr-announcement.added': '{elementLabel} a été ajouté, ',
|
|
1939
1935
|
'foehn-multiselect-autocomplete.autocomplete.empty-message': 'Tous les éléments de la liste de proposition ont déjà été ajoutés.',
|
|
1940
1936
|
'foehn-multiselect-autocomplete.autocomplete.screen-reader.label': 'Sélectionner un élément dans la liste de recherche' +
|
|
1941
1937
|
' ci-dessous pour l\'ajouter à votre sélection.'
|
|
@@ -8860,7 +8856,7 @@
|
|
|
8860
8856
|
var _this = _super.call(this, ngZone) || this;
|
|
8861
8857
|
_this.dictionaryService = dictionaryService;
|
|
8862
8858
|
_this.showEmptyListMessage = false;
|
|
8863
|
-
_this.
|
|
8859
|
+
_this.srAnnouncements = '';
|
|
8864
8860
|
return _this;
|
|
8865
8861
|
}
|
|
8866
8862
|
Object.defineProperty(FoehnMultiselectAutocompleteComponent.prototype, "defaultElementValues", {
|
|
@@ -8883,11 +8879,6 @@
|
|
|
8883
8879
|
enumerable: false,
|
|
8884
8880
|
configurable: true
|
|
8885
8881
|
});
|
|
8886
|
-
FoehnMultiselectAutocompleteComponent.prototype.handleKeyboardDownEvent = function (event) {
|
|
8887
|
-
if (this.keyboardNavigationAllowed) {
|
|
8888
|
-
this.onKeyDownSelectedInner(event);
|
|
8889
|
-
}
|
|
8890
|
-
};
|
|
8891
8882
|
FoehnMultiselectAutocompleteComponent.prototype.updateMultiselectAutocomplete = function () {
|
|
8892
8883
|
var validValue = this.getValidValue();
|
|
8893
8884
|
if (typeof validValue !== 'undefined') {
|
|
@@ -8911,6 +8902,7 @@
|
|
|
8911
8902
|
this.updateMultiselectAutocomplete();
|
|
8912
8903
|
this.handleUserInput();
|
|
8913
8904
|
this.manageSuggestionListAndFocusAfterAddingAnItem();
|
|
8905
|
+
this.manageScreenReaderAnnouncement(item, false);
|
|
8914
8906
|
}
|
|
8915
8907
|
}
|
|
8916
8908
|
};
|
|
@@ -8920,6 +8912,7 @@
|
|
|
8920
8912
|
this.model.splice(index, 1);
|
|
8921
8913
|
this.triggerUserInput(this.model);
|
|
8922
8914
|
this.manageSuggestionListAndFocusAfterRemovingAnItem();
|
|
8915
|
+
this.manageScreenReaderAnnouncement(item, true);
|
|
8923
8916
|
}
|
|
8924
8917
|
};
|
|
8925
8918
|
FoehnMultiselectAutocompleteComponent.prototype.trackByFn = function (index) {
|
|
@@ -8930,30 +8923,9 @@
|
|
|
8930
8923
|
var elem = this.findElementByModelItem(value);
|
|
8931
8924
|
return _super.prototype.getLabel.call(this, elem);
|
|
8932
8925
|
};
|
|
8933
|
-
FoehnMultiselectAutocompleteComponent.prototype.getSelectedElementTabIndex = function (index) {
|
|
8934
|
-
var _this = this;
|
|
8935
|
-
var firstIndexFocusable = 0;
|
|
8936
|
-
if (!!this.defaultElementValues) {
|
|
8937
|
-
firstIndexFocusable = this.model.findIndex(function (selected) { return !_this.defaultElementValues.includes(selected); });
|
|
8938
|
-
}
|
|
8939
|
-
if (index !== firstIndexFocusable) {
|
|
8940
|
-
return -1;
|
|
8941
|
-
}
|
|
8942
|
-
return 0;
|
|
8943
|
-
};
|
|
8944
|
-
FoehnMultiselectAutocompleteComponent.prototype.isSelectedItemFocusable = function (index) {
|
|
8945
|
-
return !this.disabled && !!this.defaultElementValues && this.defaultElementValues.includes(this.model[index]);
|
|
8946
|
-
};
|
|
8947
8926
|
FoehnMultiselectAutocompleteComponent.prototype.canBeDeleted = function (index) {
|
|
8948
8927
|
return !this.defaultElementValues || !this.defaultElementValues.includes(this.model[index]);
|
|
8949
8928
|
};
|
|
8950
|
-
FoehnMultiselectAutocompleteComponent.prototype.onSelectedItemsFocusin = function () {
|
|
8951
|
-
this.keyboardNavigationAllowed = true;
|
|
8952
|
-
this.currentFocusedElem = document.activeElement;
|
|
8953
|
-
};
|
|
8954
|
-
FoehnMultiselectAutocompleteComponent.prototype.onSelectedItemsFocusout = function () {
|
|
8955
|
-
this.keyboardNavigationAllowed = false;
|
|
8956
|
-
};
|
|
8957
8929
|
FoehnMultiselectAutocompleteComponent.prototype.onAutocompleteElementsLoaded = function (elements) {
|
|
8958
8930
|
var _this = this;
|
|
8959
8931
|
// Need to wait for childView to be loaded
|
|
@@ -8967,10 +8939,7 @@
|
|
|
8967
8939
|
});
|
|
8968
8940
|
};
|
|
8969
8941
|
FoehnMultiselectAutocompleteComponent.prototype.getDeleteButtonAriaLabel = function (element) {
|
|
8970
|
-
return "" + this.dictionaryService.getKeySync('foehn-multiselect-autocomplete.selected.delete
|
|
8971
|
-
};
|
|
8972
|
-
FoehnMultiselectAutocompleteComponent.prototype.getSelectedListAriaLabel = function () {
|
|
8973
|
-
return this.label + ": " + this.dictionaryService.getKeySync('foehn-multiselect-autocomplete.list-of-selected-items');
|
|
8942
|
+
return "" + this.dictionaryService.getKeySync('foehn-multiselect-autocomplete.selected.delete', { elementLabel: this.getLabel(element) });
|
|
8974
8943
|
};
|
|
8975
8944
|
FoehnMultiselectAutocompleteComponent.prototype.findElementByModelItem = function (item) {
|
|
8976
8945
|
var _this = this;
|
|
@@ -8992,56 +8961,6 @@
|
|
|
8992
8961
|
}
|
|
8993
8962
|
return this.model;
|
|
8994
8963
|
};
|
|
8995
|
-
FoehnMultiselectAutocompleteComponent.prototype.getFirstDeleteButtonToFocus = function () {
|
|
8996
|
-
var closeButtonsElemRefArray = __spreadArray([], __read(this.closeButtonsElemRef.toArray()));
|
|
8997
|
-
if (!!closeButtonsElemRefArray.length) {
|
|
8998
|
-
return closeButtonsElemRefArray[0].nativeElement;
|
|
8999
|
-
}
|
|
9000
|
-
return null;
|
|
9001
|
-
};
|
|
9002
|
-
FoehnMultiselectAutocompleteComponent.prototype.navigateSelectedList = function (offset) {
|
|
9003
|
-
var _this = this;
|
|
9004
|
-
if (!this.disabled) {
|
|
9005
|
-
var closeButtonsElemRefArray = this.getDefaultSelectedElements().concat(__spreadArray([], __read(this.closeButtonsElemRef.toArray())));
|
|
9006
|
-
if (!!closeButtonsElemRefArray.length) {
|
|
9007
|
-
var focusIndex = closeButtonsElemRefArray.findIndex(function (value) { return _this.currentFocusedElem === value.nativeElement; });
|
|
9008
|
-
var newIndex = focusIndex + offset;
|
|
9009
|
-
if (newIndex >= closeButtonsElemRefArray.length) {
|
|
9010
|
-
newIndex = 0;
|
|
9011
|
-
}
|
|
9012
|
-
if (newIndex < 0) {
|
|
9013
|
-
newIndex = closeButtonsElemRefArray.length - 1;
|
|
9014
|
-
}
|
|
9015
|
-
var elemRef = closeButtonsElemRefArray[newIndex];
|
|
9016
|
-
if (!!elemRef) {
|
|
9017
|
-
elemRef.nativeElement.focus();
|
|
9018
|
-
}
|
|
9019
|
-
}
|
|
9020
|
-
}
|
|
9021
|
-
};
|
|
9022
|
-
FoehnMultiselectAutocompleteComponent.prototype.getDefaultSelectedElements = function () {
|
|
9023
|
-
return __spreadArray([], __read(this.selectedElemRef.toArray())).filter(function (value) { return value.nativeElement.getAttribute('is-default') === 'true'; });
|
|
9024
|
-
};
|
|
9025
|
-
FoehnMultiselectAutocompleteComponent.prototype.onKeyDownSelectedInner = function (keyEvent) {
|
|
9026
|
-
// IE doesn't support keyEvent.code, and has different values
|
|
9027
|
-
// in keyEvent.key (Down instead of ArrowDown for instance), hence the multi-support.
|
|
9028
|
-
var ie11CompatibleCode = keyEvent.code || keyEvent.key;
|
|
9029
|
-
switch (ie11CompatibleCode) {
|
|
9030
|
-
case 'Right':
|
|
9031
|
-
case 'ArrowRight':
|
|
9032
|
-
this.navigateSelectedList(1);
|
|
9033
|
-
break;
|
|
9034
|
-
case 'Left':
|
|
9035
|
-
case 'ArrowLeft':
|
|
9036
|
-
this.navigateSelectedList(-1);
|
|
9037
|
-
break;
|
|
9038
|
-
default:
|
|
9039
|
-
return true;
|
|
9040
|
-
}
|
|
9041
|
-
keyEvent.preventDefault();
|
|
9042
|
-
keyEvent.stopPropagation();
|
|
9043
|
-
return false;
|
|
9044
|
-
};
|
|
9045
8964
|
FoehnMultiselectAutocompleteComponent.prototype.filterAutocompleteElements = function (elements) {
|
|
9046
8965
|
var _this = this;
|
|
9047
8966
|
var filteredElements = ObjectHelper.deepCopy(elements);
|
|
@@ -9071,8 +8990,8 @@
|
|
|
9071
8990
|
};
|
|
9072
8991
|
FoehnMultiselectAutocompleteComponent.prototype.manageSuggestionListAndFocusAfterAddingAnItem = function () {
|
|
9073
8992
|
var _this = this;
|
|
9074
|
-
//
|
|
9075
|
-
this.
|
|
8993
|
+
// Empty autocomplete input
|
|
8994
|
+
this.autocompleteInputValue = null;
|
|
9076
8995
|
// Remove selected item from autocomplete suggestion list
|
|
9077
8996
|
this.autocompleteComponent.elements = this.filterAutocompleteElements(this.elements);
|
|
9078
8997
|
// Check if we still have suggestions to display
|
|
@@ -9088,24 +9007,12 @@
|
|
|
9088
9007
|
}
|
|
9089
9008
|
};
|
|
9090
9009
|
FoehnMultiselectAutocompleteComponent.prototype.manageSuggestionListAndFocusAfterRemovingAnItem = function () {
|
|
9091
|
-
var _this = this;
|
|
9092
9010
|
// Hide message saying no more suggestions to display
|
|
9093
9011
|
this.showEmptyListMessage = false;
|
|
9094
9012
|
// Manually show autocomplete because there is at least one suggestions to display
|
|
9095
9013
|
this.autocompleteComponent.inputElement.nativeElement.hidden = false;
|
|
9096
9014
|
// Add back selected item to autocomplete suggestion list
|
|
9097
9015
|
this.autocompleteComponent.elements = this.filterAutocompleteElements(this.elements);
|
|
9098
|
-
// When deleting a selected item, check were to set focus back
|
|
9099
|
-
this.closeButtonsElemRef.changes.pipe(operators.first()).subscribe(function () {
|
|
9100
|
-
var buttonToFocus = _this.getFirstDeleteButtonToFocus();
|
|
9101
|
-
if (!!buttonToFocus) {
|
|
9102
|
-
buttonToFocus.focus();
|
|
9103
|
-
}
|
|
9104
|
-
else {
|
|
9105
|
-
_this.autocompleteComponent.setFocusOnInput();
|
|
9106
|
-
_this.autocompleteComponent.onInputFocus();
|
|
9107
|
-
}
|
|
9108
|
-
});
|
|
9109
9016
|
};
|
|
9110
9017
|
FoehnMultiselectAutocompleteComponent.prototype.showAlertMessageAndHideAutocomplete = function () {
|
|
9111
9018
|
// Show a message to user indicating there is no more suggestions to display
|
|
@@ -9114,16 +9021,29 @@
|
|
|
9114
9021
|
this.autocompleteInputValue = null;
|
|
9115
9022
|
this.autocompleteComponent.inputElement.nativeElement.hidden = true;
|
|
9116
9023
|
};
|
|
9024
|
+
FoehnMultiselectAutocompleteComponent.prototype.manageScreenReaderAnnouncement = function (element, isDelete) {
|
|
9025
|
+
var _this = this;
|
|
9026
|
+
clearTimeout(this.srAnnouncementAutoClearTimer);
|
|
9027
|
+
if (isDelete) {
|
|
9028
|
+
this.srAnnouncements += "" + this.dictionaryService.getKeySync('foehn-multiselect-autocomplete.sr-announcement.deleted', { elementLabel: this.getLabel(element) });
|
|
9029
|
+
}
|
|
9030
|
+
else {
|
|
9031
|
+
this.srAnnouncements += "" + this.dictionaryService.getKeySync('foehn-multiselect-autocomplete.sr-announcement.added', { elementLabel: this.getLabel(element) });
|
|
9032
|
+
}
|
|
9033
|
+
this.srAnnouncementAutoClearTimer = setTimeout(function () {
|
|
9034
|
+
_this.srAnnouncements = '';
|
|
9035
|
+
}, 10000);
|
|
9036
|
+
};
|
|
9117
9037
|
return FoehnMultiselectAutocompleteComponent;
|
|
9118
9038
|
}(FoehnAutocompleteComponent));
|
|
9119
9039
|
FoehnMultiselectAutocompleteComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnMultiselectAutocompleteComponent, deps: [{ token: i0__namespace.NgZone }, { token: SdkDictionaryService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
9120
|
-
FoehnMultiselectAutocompleteComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnMultiselectAutocompleteComponent, selector: "foehn-multiselect-autocomplete", inputs: { defaultElementValues: "defaultElementValues", defaultElementValue: "defaultElementValue" },
|
|
9040
|
+
FoehnMultiselectAutocompleteComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: FoehnMultiselectAutocompleteComponent, selector: "foehn-multiselect-autocomplete", inputs: { defaultElementValues: "defaultElementValues", defaultElementValue: "defaultElementValue" }, providers: [
|
|
9121
9041
|
{
|
|
9122
9042
|
provide: FoehnInputComponent,
|
|
9123
9043
|
useExisting: i0.forwardRef(function () { return FoehnMultiselectAutocompleteComponent; }),
|
|
9124
9044
|
multi: true
|
|
9125
9045
|
}
|
|
9126
|
-
], viewQueries: [{ propertyName: "autocompleteComponent", first: true, predicate: ["autocompleteComponent"], descendants: true }, { propertyName: "alertMessageContainer", first: true, predicate: ["alertMessageContainer"], descendants: true }
|
|
9046
|
+
], 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 } });
|
|
9127
9047
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0__namespace, type: FoehnMultiselectAutocompleteComponent, decorators: [{
|
|
9128
9048
|
type: i0.Component,
|
|
9129
9049
|
args: [{
|
|
@@ -9144,19 +9064,10 @@
|
|
|
9144
9064
|
}], alertMessageContainer: [{
|
|
9145
9065
|
type: i0.ViewChild,
|
|
9146
9066
|
args: ['alertMessageContainer']
|
|
9147
|
-
}], closeButtonsElemRef: [{
|
|
9148
|
-
type: i0.ViewChildren,
|
|
9149
|
-
args: ['closeButtonsElemRef']
|
|
9150
|
-
}], selectedElemRef: [{
|
|
9151
|
-
type: i0.ViewChildren,
|
|
9152
|
-
args: ['selectedElemRef']
|
|
9153
9067
|
}], defaultElementValues: [{
|
|
9154
9068
|
type: i0.Input
|
|
9155
9069
|
}], defaultElementValue: [{
|
|
9156
9070
|
type: i0.Input
|
|
9157
|
-
}], handleKeyboardDownEvent: [{
|
|
9158
|
-
type: i0.HostListener,
|
|
9159
|
-
args: ['keydown', ['$event']]
|
|
9160
9071
|
}] } });
|
|
9161
9072
|
|
|
9162
9073
|
var FoehnMultiselectAutocompleteModule = /** @class */ (function () {
|