@dsivd/prestations-ng 18.3.5 → 18.3.7

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 CHANGED
@@ -6,6 +6,25 @@
6
6
 
7
7
  ---
8
8
 
9
+ ## [18.3.7]
10
+
11
+ ### Fixed
12
+
13
+ - [support-alert.service.ts](projects/prestations-ng/src/sdk-support-alert/support-alert.service.ts)
14
+ - fixed `canBypassAlerts` (removed extra trailing slash)
15
+
16
+ ## [18.3.6]
17
+
18
+ ### Updated
19
+
20
+ - [foehn-multiselect-autocomplete.component.html](projects/prestations-ng/src/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.html)
21
+ - now uses `innerHTML` to display items selected label
22
+
23
+ ### Fixed
24
+
25
+ - [application-info.service.ts](projects/prestations-ng/src/sdk-appinfo/application-info.service.ts)
26
+ - fixed `getSafeSupportFormUrl(...)` to encode form errors for formsupportcyber.
27
+
9
28
  ## [18.3.5]
10
29
 
11
30
  ### Fixed
package/UPGRADING_V18.md CHANGED
@@ -20,7 +20,7 @@ Let's start by migrating to openshift / spring boot 3 / prestations-be v18.
20
20
 
21
21
  - Demander un namespace visible dans tesserakt (ex : https://portail.etat-de-vaud.ch/outils/tesserakt/namespace-groups/146420/),
22
22
  Easyvista → Nouveau changement → WEB → 030 - Création d'un nouvel environnement WEB (IIS, Apache, Tomcat...), pour chaque environnement
23
- - Si BO, demander à ajouter la network policy "allow-from-cybercloud" au namespace
23
+ - Si BO, demander à ajouter la network policy "allow-from-cybercloud" au namespace (ex : R260330_00015)
24
24
 
25
25
  ### Demande de liaison à un pool d'application
26
26
 
@@ -32,6 +32,8 @@ Let's start by migrating to openshift / spring boot 3 / prestations-be v18.
32
32
  >
33
33
  > Charts : ssh://git@bitbucket.etat-de-vaud.ch/pee/imt-charts.git / prestation
34
34
 
35
+ Exemple pour cyberimtpublic : R260330_00012
36
+
35
37
  ## PRESTATIONS-BE (via parent - Spring boot 3 / java 21)
36
38
 
37
39
  From here on, we are in the root folder of your project, for example ~/git/cybsdk/skeleton.
@@ -41,8 +43,8 @@ From here on, we are in the root folder of your project, for example ~/git/cybsd
41
43
  You can use this openrewrite recipe to simplify the migration (run with java 11)
42
44
 
43
45
  ```bash
44
- source ~/slave-apps/bashrc.slave.pee.jdk17
45
- mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4 -Pnof,noft
46
+ source ~/devtools/fordev.sh 11 22
47
+ mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5 -Pnof,noft
46
48
  ```
47
49
 
48
50
  Fix application.properties :
@@ -235,12 +237,22 @@ replace `@Type(LocalDateUserType.class)` by `@Convert(converter = LocalDateConve
235
237
 
236
238
  ## H2
237
239
 
238
- If you had a fixe H2 version for testing, you should upgrade to the latest version by removing :
240
+ - If you had a fixe H2 version for testing, you should upgrade to the latest version by removing :
239
241
 
240
242
  ```
241
243
  <h2.version>1.4.200</h2.version>
242
244
  ```
243
245
 
246
+ - When using protected keywords in H2 (like "VALUE") add `NON_KEYWORDS=VALUE;` to your `spring.datasource.url` such as:
247
+
248
+ ```
249
+ spring.datasource.url=jdbc:h2:mem:testdb;NON_KEYWORDS=VALUE;
250
+ ```
251
+
252
+ ## JpaExpression cast
253
+
254
+ replace `root.get(attribute).as(String.class)` by `((JpaExpression<?>) root.get(attribute)).cast(String.class)`
255
+
244
256
  ### Jenkins files for Unit tests
245
257
 
246
258
  buildPipeline is not supported anymore, replace the content of jenkins>UT>JenkinsFile with :
@@ -250,12 +262,15 @@ buildPipeline is not supported anymore, replace the content of jenkins>UT>Jenkin
250
262
 
251
263
  buildAppPipelinePodmanUT([
252
264
  name : 'the name of your application',
253
- label : 'your slaves lable',
265
+ label : 'your slaves label',
254
266
  jdk : '21',
255
267
  node : '20'
256
268
  ])
257
269
  ```
258
270
 
271
+ - Example for a repo git containing both BO and FO: https://dsigit.etat-de-vaud.ch/outils/git/projects/PEE/repos/refivdparent/browse/jenkins/UT/Jenkinsfile
272
+ - Example for a repo git containing only one application: https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBSDK/repos/skeleton/browse/jenkins/UT/Jenkinsfile
273
+
259
274
  ### Code cleanup
260
275
 
261
276
  You can use these openrewrite recipes to clean your code :
@@ -290,7 +305,7 @@ properties`
290
305
  - `<t6kt-maven-plugin.application>NOM TECHNIQUE DANS AGREF</t6kt-maven-plugin.application>`
291
306
  - `<t6kt-maven-plugin.configurationVersion>master</t6kt-maven-plugin.configurationVersion>`
292
307
  - `<t6kt-maven-plugin.chartVersion>master</t6kt-maven-plugin.chartVersion>`
293
- - `<t6kt-maven-plugin.cluster>int01 ou extint01</t6kt-maven-plugin.cluster>`
308
+ - `<t6kt-maven-plugin.cluster>int02 ou extint01</t6kt-maven-plugin.cluster>`
294
309
  - Si parent `spring-boot-starter-parent`
295
310
  - Ajouter `tesserakt-maven-plugin` :
296
311
  - ```
@@ -313,6 +328,12 @@ properties`
313
328
  </plugin>
314
329
  ```
315
330
 
331
+ NB : les 2 derniers points sont valables si le code concernée n'est déployé que dans 1 DU. Au cas où il y a
332
+ plusieurs DU, voir exemple ici : https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBER/repos/formsupportcyber/browse/pom.xml#90-109
333
+
334
+ NB : int02 signifie "intégration 2" and "extint01" signifie "extranet intégration 1".
335
+ Donc si c'est pour l'intranet, c'est int02 par exemple, si c'est de l'internet, c'est extint01 par exemple.
336
+
316
337
  ### Move the configs (if it is a fo and it goes into an application pool like cyberimtpublic)
317
338
 
318
339
  Move the files from your configuration repository into the target repository.
@@ -384,6 +405,7 @@ In the next commands, commit before each ng update.
384
405
 
385
406
  ```bash
386
407
  npm install
408
+ npm install @angular/cli@17 -g
387
409
  ng update @angular/core@17 @angular/cli@17
388
410
  ng update @dsivd/prestations-ng@17
389
411
 
Binary file
@@ -261,11 +261,11 @@ class ApplicationInfoService {
261
261
  if (!!errors?.length) {
262
262
  link += !!reference?.length ? '&' : '?';
263
263
  // Need following code to avoid browser Sanitizing error when using JSON.stringify
264
- link += `errors=${errors
264
+ link += `errors=${encodeURIComponent(errors
265
265
  .map(error => Object.entries(error)
266
266
  .map(value => `${value.join('=')}`)
267
267
  .join(','))
268
- .join(';')}`;
268
+ .join(';'))}`;
269
269
  }
270
270
  return link;
271
271
  }));
@@ -4232,7 +4232,7 @@ class SupportAlertService {
4232
4232
  ? new HttpParams().set('alertsByPassUUID', alertsByPassUUID)
4233
4233
  : null;
4234
4234
  return this.http
4235
- .get('api/support-alert/alerts/can-bypass/', { params })
4235
+ .get('api/support-alert/alerts/can-bypass', { params })
4236
4236
  .pipe(catchError(() => of(false)));
4237
4237
  }
4238
4238
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SupportAlertService, deps: [{ token: i1.HttpClient }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -13030,7 +13030,7 @@ class FoehnMultiselectAutocompleteComponent extends FoehnAutocompleteComponent {
13030
13030
  useExisting: forwardRef(() => FoehnMultiselectAutocompleteComponent),
13031
13031
  multi: true
13032
13032
  }
13033
- ], viewQueries: [{ propertyName: "autocompleteComponent", first: true, predicate: ["autocompleteComponent"], descendants: true }, { propertyName: "alertMessageContainer", first: true, predicate: ["alertMessageContainer"], descendants: true }, { propertyName: "defaultDeleteFocusArea", first: true, predicate: ["defaultDeleteFocusArea"], descendants: true }, { propertyName: "selectedElemRef", predicate: ["selectedElemRef"], descendants: true }, { propertyName: "defaultElemRef", predicate: ["defaultElemRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"form-group container-box\"\n [class.has-danger]=\"hasErrorsToDisplay()\"\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n>\n <foehn-autocomplete\n #autocompleteComponent\n [name]=\"name\"\n [label]=\"label\"\n [elements]=\"elements\"\n [elementsUrl]=\"elementsUrl\"\n [elementValue]=\"elementValue\"\n [elementLabel]=\"elementLabel\"\n [elementSuggestionLabel]=\"elementSuggestionLabel\"\n [elementValueIdentity]=\"elementValueIdentity\"\n [elementDisabled]=\"elementDisabled\"\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 [showErrorWhenDisabled]=\"showErrorWhenDisabled\"\n [hideNotRequiredExtraLabel]=\"hideNotRequiredExtraLabel\"\n [itemHeightInSuggestionListInPx]=\"itemHeightInSuggestionListInPx\"\n [caseSensitiveSearch]=\"caseSensitiveSearch\"\n [isLabelSrOnly]=\"isLabelSrOnly\"\n [isSuggestionListDynamic]=\"isSuggestionListDynamic\"\n >\n <small\n *ngIf=\"!showEmptyListMessage\"\n [attr.id]=\"buildChildId('Help')\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"\n helpText\n ? helpText\n : ('foehn-multiselect-autocomplete.autocomplete.screen-reader.label'\n | fromDictionary)\n \"\n ></small>\n\n <ng-content></ng-content>\n\n <div\n [id]=\"buildChildId('AlertMessageContainer')\"\n role=\"status\"\n #alertMessageContainer\n >\n <p\n *ngIf=\"showEmptyListMessage\"\n class=\"alert alert-info mb-0\"\n tabindex=\"0\"\n >\n {{\n 'foehn-multiselect-autocomplete.autocomplete.empty-message'\n | fromDictionary\n }}\n </p>\n </div>\n </foehn-autocomplete>\n\n <div class=\"selected-list-container pt-2\" tabindex=\"-1\">\n <small\n *ngIf=\"hasDefaultDeleteFocusArea()\"\n class=\"form-text text-secondary my-0\"\n [tabindex]=\"0\"\n [innerHTML]=\"noElementsSelectedLabel | fromDictionary\"\n #defaultDeleteFocusArea\n ></small>\n\n <p\n [id]=\"buildChildId('srOnlyAnnouncements')\"\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {{ srAnnouncements }}\n </p>\n\n <fieldset\n *ngIf=\"!!model?.length\"\n class=\"mb-0\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n >\n <legend\n [id]=\"buildChildId('Legend')\"\n class=\"form-text text-secondary small mb-0\"\n [innerHTML]=\"selectedItemsListLegend | fromDictionary\"\n ></legend>\n\n <div class=\"selected-list d-flex align-content-stretch flex-wrap\">\n <ng-container\n *ngFor=\"\n let element of model;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <span\n *ngIf=\"!canBeDeleted(index)\"\n class=\"badge rounded-pill bg-secondary me-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-describedby]=\"buildChildId('Legend')\"\n #defaultElemRef\n >\n {{ getBadgeLabel(element) }}\n <span class=\"visually-hidden\">\n {{\n 'foehn-multiselect-autocomplete.sr-default-selected-element'\n | fromDictionary\n }}\n </span>\n </span>\n <button\n *ngIf=\"canBeDeleted(index)\"\n type=\"button\"\n class=\"btn btn-primary badge rounded-pill me-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('Legend')\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n (click)=\"removeItem(element, index)\"\n #selectedElemRef\n >\n {{ getBadgeLabel(element) }}\n <foehn-icon-times\n aria-hidden=\"true\"\n class=\"ms-2\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n ></foehn-icon-times>\n </button>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</div>\n", styles: ["foehn-autocomplete p.alert:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}:host ::ng-deep foehn-autocomplete .form-group{margin-bottom:0!important}.selected-list-container .btn{text-transform:none}:host ::ng-deep .btn .svg-inline--fa{color:#fff!important}.selected-list-container span.rounded-pill:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}.container-box{border:1px solid #ededed;background-color:#fbfbfb;padding:.5rem}.container-box.vd-form-group-danger{border-left:5px solid var(--vd-danger);padding-left:1rem}:host ::ng-deep foehn-autocomplete div.vd-form-group-danger{border-left:0;padding-left:0}\n"], dependencies: [{ kind: "component", type: FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "isSuggestionListDynamic", "customValueModelGenerator", "itemHeightInSuggestionListInPx", "elementSuggestionLabel", "caseSensitiveSearch", "disabled"], outputs: ["userSearchInput"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FoehnIconTimesComponent, selector: "foehn-icon-times" }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }] }); }
13033
+ ], viewQueries: [{ propertyName: "autocompleteComponent", first: true, predicate: ["autocompleteComponent"], descendants: true }, { propertyName: "alertMessageContainer", first: true, predicate: ["alertMessageContainer"], descendants: true }, { propertyName: "defaultDeleteFocusArea", first: true, predicate: ["defaultDeleteFocusArea"], descendants: true }, { propertyName: "selectedElemRef", predicate: ["selectedElemRef"], descendants: true }, { propertyName: "defaultElemRef", predicate: ["defaultElemRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"form-group container-box\"\n [class.has-danger]=\"hasErrorsToDisplay()\"\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n>\n <foehn-autocomplete\n #autocompleteComponent\n [name]=\"name\"\n [label]=\"label\"\n [elements]=\"elements\"\n [elementsUrl]=\"elementsUrl\"\n [elementValue]=\"elementValue\"\n [elementLabel]=\"elementLabel\"\n [elementSuggestionLabel]=\"elementSuggestionLabel\"\n [elementValueIdentity]=\"elementValueIdentity\"\n [elementDisabled]=\"elementDisabled\"\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 [showErrorWhenDisabled]=\"showErrorWhenDisabled\"\n [hideNotRequiredExtraLabel]=\"hideNotRequiredExtraLabel\"\n [itemHeightInSuggestionListInPx]=\"itemHeightInSuggestionListInPx\"\n [caseSensitiveSearch]=\"caseSensitiveSearch\"\n [isLabelSrOnly]=\"isLabelSrOnly\"\n [isSuggestionListDynamic]=\"isSuggestionListDynamic\"\n >\n <small\n *ngIf=\"!showEmptyListMessage\"\n [attr.id]=\"buildChildId('Help')\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"\n helpText\n ? helpText\n : ('foehn-multiselect-autocomplete.autocomplete.screen-reader.label'\n | fromDictionary)\n \"\n ></small>\n\n <ng-content></ng-content>\n\n <div\n [id]=\"buildChildId('AlertMessageContainer')\"\n role=\"status\"\n #alertMessageContainer\n >\n <p\n *ngIf=\"showEmptyListMessage\"\n class=\"alert alert-info mb-0\"\n tabindex=\"0\"\n >\n {{\n 'foehn-multiselect-autocomplete.autocomplete.empty-message'\n | fromDictionary\n }}\n </p>\n </div>\n </foehn-autocomplete>\n\n <div class=\"selected-list-container pt-2\" tabindex=\"-1\">\n <small\n *ngIf=\"hasDefaultDeleteFocusArea()\"\n class=\"form-text text-secondary my-0\"\n [tabindex]=\"0\"\n [innerHTML]=\"noElementsSelectedLabel | fromDictionary\"\n #defaultDeleteFocusArea\n ></small>\n\n <p\n [id]=\"buildChildId('srOnlyAnnouncements')\"\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {{ srAnnouncements }}\n </p>\n\n <fieldset\n *ngIf=\"!!model?.length\"\n class=\"mb-0\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n >\n <legend\n [id]=\"buildChildId('Legend')\"\n class=\"form-text text-secondary small mb-0\"\n [innerHTML]=\"selectedItemsListLegend | fromDictionary\"\n ></legend>\n\n <div class=\"selected-list d-flex align-content-stretch flex-wrap\">\n <ng-container\n *ngFor=\"\n let element of model;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <span\n *ngIf=\"!canBeDeleted(index)\"\n class=\"badge rounded-pill bg-secondary me-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-describedby]=\"buildChildId('Legend')\"\n #defaultElemRef\n >\n <span [innerHTML]=\"getBadgeLabel(element)\"></span>\n <span class=\"visually-hidden\">\n {{\n 'foehn-multiselect-autocomplete.sr-default-selected-element'\n | fromDictionary\n }}\n </span>\n </span>\n <button\n *ngIf=\"canBeDeleted(index)\"\n type=\"button\"\n class=\"btn btn-primary badge rounded-pill me-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('Legend')\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n (click)=\"removeItem(element, index)\"\n #selectedElemRef\n >\n <span [innerHTML]=\"getBadgeLabel(element)\"></span>\n <foehn-icon-times\n aria-hidden=\"true\"\n class=\"ms-2\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n ></foehn-icon-times>\n </button>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</div>\n", styles: ["foehn-autocomplete p.alert:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}:host ::ng-deep foehn-autocomplete .form-group{margin-bottom:0!important}.selected-list-container .btn{text-transform:none}:host ::ng-deep .btn .svg-inline--fa,:host ::ng-deep .btn a{color:#fff!important}.selected-list-container span.rounded-pill:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}.container-box{border:1px solid #ededed;background-color:#fbfbfb;padding:.5rem}.container-box.vd-form-group-danger{border-left:5px solid var(--vd-danger);padding-left:1rem}:host ::ng-deep foehn-autocomplete div.vd-form-group-danger{border-left:0;padding-left:0}\n"], dependencies: [{ kind: "component", type: FoehnAutocompleteComponent, selector: "foehn-autocomplete", inputs: ["searchValueMinCharsCount", "allowCustomValue", "isSuggestionListDynamic", "customValueModelGenerator", "itemHeightInSuggestionListInPx", "elementSuggestionLabel", "caseSensitiveSearch", "disabled"], outputs: ["userSearchInput"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FoehnIconTimesComponent, selector: "foehn-icon-times" }, { kind: "pipe", type: SdkDictionaryPipe, name: "fromDictionary" }] }); }
13034
13034
  }
13035
13035
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FoehnMultiselectAutocompleteComponent, decorators: [{
13036
13036
  type: Component,
@@ -13040,7 +13040,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
13040
13040
  useExisting: forwardRef(() => FoehnMultiselectAutocompleteComponent),
13041
13041
  multi: true
13042
13042
  }
13043
- ], standalone: false, template: "<div\n class=\"form-group container-box\"\n [class.has-danger]=\"hasErrorsToDisplay()\"\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n>\n <foehn-autocomplete\n #autocompleteComponent\n [name]=\"name\"\n [label]=\"label\"\n [elements]=\"elements\"\n [elementsUrl]=\"elementsUrl\"\n [elementValue]=\"elementValue\"\n [elementLabel]=\"elementLabel\"\n [elementSuggestionLabel]=\"elementSuggestionLabel\"\n [elementValueIdentity]=\"elementValueIdentity\"\n [elementDisabled]=\"elementDisabled\"\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 [showErrorWhenDisabled]=\"showErrorWhenDisabled\"\n [hideNotRequiredExtraLabel]=\"hideNotRequiredExtraLabel\"\n [itemHeightInSuggestionListInPx]=\"itemHeightInSuggestionListInPx\"\n [caseSensitiveSearch]=\"caseSensitiveSearch\"\n [isLabelSrOnly]=\"isLabelSrOnly\"\n [isSuggestionListDynamic]=\"isSuggestionListDynamic\"\n >\n <small\n *ngIf=\"!showEmptyListMessage\"\n [attr.id]=\"buildChildId('Help')\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"\n helpText\n ? helpText\n : ('foehn-multiselect-autocomplete.autocomplete.screen-reader.label'\n | fromDictionary)\n \"\n ></small>\n\n <ng-content></ng-content>\n\n <div\n [id]=\"buildChildId('AlertMessageContainer')\"\n role=\"status\"\n #alertMessageContainer\n >\n <p\n *ngIf=\"showEmptyListMessage\"\n class=\"alert alert-info mb-0\"\n tabindex=\"0\"\n >\n {{\n 'foehn-multiselect-autocomplete.autocomplete.empty-message'\n | fromDictionary\n }}\n </p>\n </div>\n </foehn-autocomplete>\n\n <div class=\"selected-list-container pt-2\" tabindex=\"-1\">\n <small\n *ngIf=\"hasDefaultDeleteFocusArea()\"\n class=\"form-text text-secondary my-0\"\n [tabindex]=\"0\"\n [innerHTML]=\"noElementsSelectedLabel | fromDictionary\"\n #defaultDeleteFocusArea\n ></small>\n\n <p\n [id]=\"buildChildId('srOnlyAnnouncements')\"\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {{ srAnnouncements }}\n </p>\n\n <fieldset\n *ngIf=\"!!model?.length\"\n class=\"mb-0\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n >\n <legend\n [id]=\"buildChildId('Legend')\"\n class=\"form-text text-secondary small mb-0\"\n [innerHTML]=\"selectedItemsListLegend | fromDictionary\"\n ></legend>\n\n <div class=\"selected-list d-flex align-content-stretch flex-wrap\">\n <ng-container\n *ngFor=\"\n let element of model;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <span\n *ngIf=\"!canBeDeleted(index)\"\n class=\"badge rounded-pill bg-secondary me-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-describedby]=\"buildChildId('Legend')\"\n #defaultElemRef\n >\n {{ getBadgeLabel(element) }}\n <span class=\"visually-hidden\">\n {{\n 'foehn-multiselect-autocomplete.sr-default-selected-element'\n | fromDictionary\n }}\n </span>\n </span>\n <button\n *ngIf=\"canBeDeleted(index)\"\n type=\"button\"\n class=\"btn btn-primary badge rounded-pill me-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('Legend')\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n (click)=\"removeItem(element, index)\"\n #selectedElemRef\n >\n {{ getBadgeLabel(element) }}\n <foehn-icon-times\n aria-hidden=\"true\"\n class=\"ms-2\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n ></foehn-icon-times>\n </button>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</div>\n", styles: ["foehn-autocomplete p.alert:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}:host ::ng-deep foehn-autocomplete .form-group{margin-bottom:0!important}.selected-list-container .btn{text-transform:none}:host ::ng-deep .btn .svg-inline--fa{color:#fff!important}.selected-list-container span.rounded-pill:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}.container-box{border:1px solid #ededed;background-color:#fbfbfb;padding:.5rem}.container-box.vd-form-group-danger{border-left:5px solid var(--vd-danger);padding-left:1rem}:host ::ng-deep foehn-autocomplete div.vd-form-group-danger{border-left:0;padding-left:0}\n"] }]
13043
+ ], standalone: false, template: "<div\n class=\"form-group container-box\"\n [class.has-danger]=\"hasErrorsToDisplay()\"\n [class.vd-form-group-danger]=\"hasErrorsToDisplay()\"\n>\n <foehn-autocomplete\n #autocompleteComponent\n [name]=\"name\"\n [label]=\"label\"\n [elements]=\"elements\"\n [elementsUrl]=\"elementsUrl\"\n [elementValue]=\"elementValue\"\n [elementLabel]=\"elementLabel\"\n [elementSuggestionLabel]=\"elementSuggestionLabel\"\n [elementValueIdentity]=\"elementValueIdentity\"\n [elementDisabled]=\"elementDisabled\"\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 [showErrorWhenDisabled]=\"showErrorWhenDisabled\"\n [hideNotRequiredExtraLabel]=\"hideNotRequiredExtraLabel\"\n [itemHeightInSuggestionListInPx]=\"itemHeightInSuggestionListInPx\"\n [caseSensitiveSearch]=\"caseSensitiveSearch\"\n [isLabelSrOnly]=\"isLabelSrOnly\"\n [isSuggestionListDynamic]=\"isSuggestionListDynamic\"\n >\n <small\n *ngIf=\"!showEmptyListMessage\"\n [attr.id]=\"buildChildId('Help')\"\n class=\"form-text text-secondary\"\n [innerHTML]=\"\n helpText\n ? helpText\n : ('foehn-multiselect-autocomplete.autocomplete.screen-reader.label'\n | fromDictionary)\n \"\n ></small>\n\n <ng-content></ng-content>\n\n <div\n [id]=\"buildChildId('AlertMessageContainer')\"\n role=\"status\"\n #alertMessageContainer\n >\n <p\n *ngIf=\"showEmptyListMessage\"\n class=\"alert alert-info mb-0\"\n tabindex=\"0\"\n >\n {{\n 'foehn-multiselect-autocomplete.autocomplete.empty-message'\n | fromDictionary\n }}\n </p>\n </div>\n </foehn-autocomplete>\n\n <div class=\"selected-list-container pt-2\" tabindex=\"-1\">\n <small\n *ngIf=\"hasDefaultDeleteFocusArea()\"\n class=\"form-text text-secondary my-0\"\n [tabindex]=\"0\"\n [innerHTML]=\"noElementsSelectedLabel | fromDictionary\"\n #defaultDeleteFocusArea\n ></small>\n\n <p\n [id]=\"buildChildId('srOnlyAnnouncements')\"\n class=\"visually-hidden\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {{ srAnnouncements }}\n </p>\n\n <fieldset\n *ngIf=\"!!model?.length\"\n class=\"mb-0\"\n [attr.aria-describedby]=\"buildChildId('Label')\"\n >\n <legend\n [id]=\"buildChildId('Legend')\"\n class=\"form-text text-secondary small mb-0\"\n [innerHTML]=\"selectedItemsListLegend | fromDictionary\"\n ></legend>\n\n <div class=\"selected-list d-flex align-content-stretch flex-wrap\">\n <ng-container\n *ngFor=\"\n let element of model;\n let index = index;\n trackBy: trackByFn\n \"\n >\n <span\n *ngIf=\"!canBeDeleted(index)\"\n class=\"badge rounded-pill bg-secondary me-1 mb-1 py-2 px-3 d-flex align-items-center\"\n [tabindex]=\"disabled ? -1 : 0\"\n [attr.aria-describedby]=\"buildChildId('Legend')\"\n #defaultElemRef\n >\n <span [innerHTML]=\"getBadgeLabel(element)\"></span>\n <span class=\"visually-hidden\">\n {{\n 'foehn-multiselect-autocomplete.sr-default-selected-element'\n | fromDictionary\n }}\n </span>\n </span>\n <button\n *ngIf=\"canBeDeleted(index)\"\n type=\"button\"\n class=\"btn btn-primary badge rounded-pill me-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('Legend')\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n (click)=\"removeItem(element, index)\"\n #selectedElemRef\n >\n <span [innerHTML]=\"getBadgeLabel(element)\"></span>\n <foehn-icon-times\n aria-hidden=\"true\"\n class=\"ms-2\"\n [title]=\"getDeleteButtonAriaLabel(element)\"\n ></foehn-icon-times>\n </button>\n </ng-container>\n </div>\n </fieldset>\n </div>\n</div>\n", styles: ["foehn-autocomplete p.alert:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}:host ::ng-deep foehn-autocomplete .form-group{margin-bottom:0!important}.selected-list-container .btn{text-transform:none}:host ::ng-deep .btn .svg-inline--fa,:host ::ng-deep .btn a{color:#fff!important}.selected-list-container span.rounded-pill:focus{outline:0;box-shadow:inset 0 1px 1px #00000013,0 0 0 .2rem var(--vd-focus)}.container-box{border:1px solid #ededed;background-color:#fbfbfb;padding:.5rem}.container-box.vd-form-group-danger{border-left:5px solid var(--vd-danger);padding-left:1rem}:host ::ng-deep foehn-autocomplete div.vd-form-group-danger{border-left:0;padding-left:0}\n"] }]
13044
13044
  }], ctorParameters: () => [{ type: i0.NgZone }, { type: SdkDictionaryService }], propDecorators: { hostName: [{
13045
13045
  type: HostBinding,
13046
13046
  args: ['attr.name']