desy-angular 5.0.0 → 5.1.2

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.
Files changed (49) hide show
  1. package/bundles/desy-angular.umd.js +1454 -344
  2. package/bundles/desy-angular.umd.js.map +1 -1
  3. package/bundles/desy-angular.umd.min.js +2 -2
  4. package/bundles/desy-angular.umd.min.js.map +1 -1
  5. package/desy-angular.d.ts +29 -24
  6. package/desy-angular.metadata.json +1 -1
  7. package/esm2015/desy-angular.js +30 -25
  8. package/esm2015/lib/desy-buttons/components/dropdown/dropdown.component.js +70 -70
  9. package/esm2015/lib/desy-buttons/components/listbox/listbox-label/listbox-label.component.js +6 -15
  10. package/esm2015/lib/desy-buttons/components/listbox/listbox.component.js +67 -55
  11. package/esm2015/lib/desy-buttons/components/toggle/toggle-off-state/toggle-off-state.component.js +15 -0
  12. package/esm2015/lib/desy-buttons/components/toggle/toggle-on-state/toggle-on-state.component.js +15 -0
  13. package/esm2015/lib/desy-buttons/components/toggle/toggle.component.js +41 -0
  14. package/esm2015/lib/desy-buttons/desy-buttons.module.js +12 -3
  15. package/esm2015/lib/desy-forms/components/tree/interfaces/itree-item.js +3 -0
  16. package/esm2015/lib/desy-forms/components/tree/interfaces/quit-tree-item-focus-options.js +2 -0
  17. package/esm2015/lib/desy-forms/components/tree/tree-checkbox/tree-checkbox.component.js +151 -0
  18. package/esm2015/lib/desy-forms/components/tree/tree-item/tree-item.component.js +370 -0
  19. package/esm2015/lib/desy-forms/components/tree/tree-items-generator/tree-items-generator.component.js +25 -0
  20. package/esm2015/lib/desy-forms/components/tree/tree-sub/tree-sub.component.js +14 -0
  21. package/esm2015/lib/desy-forms/components/tree/tree.component.js +396 -0
  22. package/esm2015/lib/desy-forms/desy-forms.module.js +15 -1
  23. package/esm2015/lib/desy-nav/components/header/header-dropdown/header-dropdown.component.js +8 -3
  24. package/esm2015/lib/desy-nav/components/header/header-offcanvas/header-offcanvas.component.js +7 -4
  25. package/esm2015/lib/desy-nav/components/header/header-subnav/header-subnav.component.js +2 -2
  26. package/esm2015/lib/desy-nav/components/menu-vertical/menu-vertical.component.js +3 -3
  27. package/esm2015/lib/desy-nav/components/menubar/menubar.component.js +1 -1
  28. package/esm2015/lib/desy-nav/components/nav/nav.component.js +38 -2
  29. package/esm2015/lib/desy-pagination/components/pagination/pagination.component.js +2 -2
  30. package/esm2015/public-api.js +5 -1
  31. package/fesm2015/desy-angular.js +1361 -309
  32. package/fesm2015/desy-angular.js.map +1 -1
  33. package/lib/desy-buttons/components/dropdown/dropdown.component.d.ts +4 -7
  34. package/lib/desy-buttons/components/listbox/listbox-label/listbox-label.component.d.ts +2 -6
  35. package/lib/desy-buttons/components/listbox/listbox.component.d.ts +1 -2
  36. package/lib/desy-buttons/components/toggle/toggle-off-state/toggle-off-state.component.d.ts +5 -0
  37. package/lib/desy-buttons/components/toggle/toggle-on-state/toggle-on-state.component.d.ts +5 -0
  38. package/lib/desy-buttons/components/toggle/toggle.component.d.ts +15 -0
  39. package/lib/desy-forms/components/tree/interfaces/itree-item.d.ts +5 -0
  40. package/lib/desy-forms/components/tree/interfaces/quit-tree-item-focus-options.d.ts +5 -0
  41. package/lib/desy-forms/components/tree/tree-checkbox/tree-checkbox.component.d.ts +43 -0
  42. package/lib/desy-forms/components/tree/tree-item/tree-item.component.d.ts +87 -0
  43. package/lib/desy-forms/components/tree/tree-items-generator/tree-items-generator.component.d.ts +10 -0
  44. package/lib/desy-forms/components/tree/tree-sub/tree-sub.component.d.ts +6 -0
  45. package/lib/desy-forms/components/tree/tree.component.d.ts +107 -0
  46. package/lib/desy-nav/components/header/header-dropdown/header-dropdown.component.d.ts +2 -0
  47. package/lib/desy-nav/components/nav/nav.component.d.ts +4 -0
  48. package/package.json +2 -2
  49. package/public-api.d.ts +4 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, ViewChild, EventEmitter, HostBinding, Output, ElementRef, HostListener, QueryList, ViewChildren, ContentChildren, ChangeDetectorRef, forwardRef, Pipe, Optional, Host, Directive, TemplateRef, ComponentFactoryResolver, ViewContainerRef, Type, ComponentRef, Injectable, Injector, ApplicationRef, ContentChild, SecurityContext, NgModule } from '@angular/core';
2
+ import { Component, Input, ViewChild, EventEmitter, HostBinding, Output, ElementRef, QueryList, ViewChildren, ContentChildren, ChangeDetectorRef, HostListener, forwardRef, Pipe, Optional, Host, Directive, TemplateRef, ChangeDetectionStrategy, ViewContainerRef, ComponentFactoryResolver, Type, ComponentRef, Injectable, Injector, ApplicationRef, ContentChild, SecurityContext, NgModule } from '@angular/core';
3
3
  import { __decorate, __awaiter } from 'tslib';
4
4
  import { NG_VALUE_ACCESSOR, ControlContainer, NgForm, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
5
  import { trigger, state, style, transition, animate, query, animateChild } from '@angular/animations';
@@ -323,96 +323,97 @@ class DropdownComponent extends AccessibilityAndContentRequiredComponent {
323
323
  constructor() {
324
324
  super(...arguments);
325
325
  this.clickEvent = new EventEmitter();
326
- this.show = false;
326
+ this.isOpen = false;
327
327
  this.clickOutsideEnabled = false;
328
328
  }
329
329
  ngOnInit() {
330
- setTimeout(() => {
331
- let contentTooltip;
332
- if (this.dropdownContent && this.dropdownContent.nativeElement) {
333
- contentTooltip = this.dropdownContent.nativeElement;
334
- contentTooltip.style.display = 'block';
335
- this.tippyProperties = {
336
- placement: 'bottom-start',
337
- inlinePositioning: true,
338
- content: contentTooltip,
339
- allowHTML: true,
340
- trigger: 'click',
341
- hideOnClick: true,
342
- interactive: true,
343
- arrow: false,
344
- offset: [0, -10],
345
- theme: '',
346
- plugins: [{
347
- name: 'hideOnEsc',
348
- defaultValue: true,
349
- fn({ hide }) {
350
- function onKeyDown(event) {
351
- if (event.key === DropdownComponent.KEY_CODE_ESC) {
352
- hide();
353
- }
354
- }
355
- return {
356
- onShow() {
357
- document.addEventListener('keydown', onKeyDown);
358
- },
359
- onHide() {
360
- document.removeEventListener('keydown', onKeyDown);
361
- },
362
- };
363
- },
364
- }],
365
- role: false,
366
- aria: {
367
- content: 'auto',
368
- },
369
- onShown(instance) {
370
- const firstFocusable = FocusUtils.getFirstFocusableElement(contentTooltip);
371
- if (firstFocusable) {
372
- setTimeout(() => firstFocusable.focus());
330
+ let contentTooltip;
331
+ if (this.dropdownContent && this.dropdownContent.nativeElement) {
332
+ contentTooltip = this.dropdownContent.nativeElement;
333
+ contentTooltip.style.display = 'block';
334
+ this.tippyProperties = {
335
+ placement: 'bottom-start',
336
+ inlinePositioning: true,
337
+ content: contentTooltip,
338
+ allowHTML: true,
339
+ trigger: 'click',
340
+ hideOnClick: true,
341
+ interactive: true,
342
+ arrow: false,
343
+ offset: [0, -10],
344
+ theme: '',
345
+ plugins: [
346
+ {
347
+ name: 'hideOnPopperBlur',
348
+ defaultValue: true,
349
+ fn(instance) {
350
+ return {
351
+ onCreate() {
352
+ instance.popper.addEventListener('focusout', (event) => {
353
+ if (instance.props.hideOnPopperBlur &&
354
+ event.relatedTarget &&
355
+ !instance.popper.contains(event.relatedTarget)) {
356
+ instance.hide();
357
+ }
358
+ });
359
+ },
360
+ };
373
361
  }
362
+ },
363
+ {
364
+ name: 'hideOnEsc',
365
+ defaultValue: true,
366
+ fn({ hide }) {
367
+ function onKeyDown(event) {
368
+ if (event.key === DropdownComponent.KEY_CODE_ESC) {
369
+ hide();
370
+ }
371
+ }
372
+ return {
373
+ onShow() {
374
+ document.addEventListener('keydown', onKeyDown);
375
+ },
376
+ onHide() {
377
+ document.removeEventListener('keydown', onKeyDown);
378
+ },
379
+ };
380
+ },
374
381
  }
375
- };
376
- }
377
- });
378
- }
379
- ngOnChanges(changes) {
380
- if (this.isDisabled()) { // se pone disable se cierra el dropdown
381
- this.closeDropdown();
382
+ ],
383
+ role: false,
384
+ aria: {
385
+ content: 'auto',
386
+ },
387
+ onShown(instance) {
388
+ const firstFocusable = FocusUtils.getFirstFocusableElement(contentTooltip);
389
+ if (firstFocusable) {
390
+ firstFocusable.focus();
391
+ }
392
+ }
393
+ };
382
394
  }
383
395
  }
384
396
  onClick(event) {
385
397
  if (!this.isDisabled()) {
386
- this.toggleDropdown();
387
398
  this.clickEvent.emit(event);
388
399
  }
389
400
  }
390
- toggleDropdown() {
391
- this.show = !this.show;
392
- setTimeout(() => this.clickOutsideEnabled = this.show);
393
- }
394
- closeDropdown() {
395
- this.show = false;
396
- this.clickOutsideEnabled = false;
401
+ setOpen(isOpen) {
402
+ this.isOpen = isOpen;
397
403
  }
398
404
  isDisabled() {
399
405
  return this.disabled ? true : null;
400
406
  }
401
- onKeyDown(event) {
402
- if (event.key === DropdownComponent.KEY_CODE_ESC) {
403
- this.closeDropdown();
404
- }
405
- }
406
407
  }
407
408
  DropdownComponent.KEY_CODE_ESC = 'Escape';
408
409
  DropdownComponent.decorators = [
409
410
  { type: Component, args: [{
410
411
  selector: 'desy-dropdown',
411
- template: "<!-- dropdown -->\r\n<div [class]=\"classesContainer ? classesContainer : 'relative'\">\r\n <button *ngIf=\"tippyProperties\" aria-haspopup=\"true\" (click)=\"onClick($event)\" ngxTippy [tippyProps]=\"tippyProperties\"\r\n [class]=\"['c-dropdown', classes] | makeHtmlList\"\r\n [attr.disabled]=\"isDisabled() ? 'disabled' : null\"\r\n [attr.aria-disabled]=\"isDisabled() ? 'true' : (ariaDisabled ? ariaDisabled : null)\"\r\n [attr.aria-expanded]=\"show\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.tabIndex]=\"isDisabled() ? '-1' : tabindex\">\r\n <span class=\"inline-flex self-center max-w-xs align-middle truncate\" [desyInnerContent]=\"html ? html : text\" [isHtml]=\"html\" [deleteContentIfEmpty]=\"false\">\r\n <ng-content></ng-content>\r\n </span> \r\n <svg class=\"inline-block -mr-2 align-middle -my-px\" viewBox=\"0 0 96 96\" aria-hidden=\"true\" fill=\"currentColor\" focusable=\"false\" width=\"1.5em\" height=\"1.5em\"><g><path d=\"M46.71 58.037a1.823 1.823 0 002.581 0L62.048 45.28a1.823 1.823 0 00-1.29-3.113H35.243a1.823 1.823 0 00-1.291 3.113z\"/></g></svg>\r\n </button>\r\n <span *ngIf=\"hiddenText\" class=\"sr-only\">{{ hiddenText }}</span>\r\n <div #dropdownContent style=\"display: none;\"\r\n [class]=\"['-ml-sm mt-2 border border-neutral-base shadow-md bg-white', classesTooltip] | makeHtmlList\"\r\n [desyClickOutside]=\"clickOutsideEnabled\" (clickOutside)=\"closeDropdown()\">\r\n <ng-container *ngTemplateOutlet=\"caller\"></ng-container>\r\n </div>\r\n</div>\r\n<!-- /dropdown -->\r\n"
412
+ template: "<div [class]=\"classesContainer ? classesContainer : 'relative'\"\r\n (desyContentEmpty)=\"setOpen(false)\" (desyContentNotEmpty)=\"setOpen(true)\">\r\n <button #desyContentEmptyIgnore (click)=\"onClick($event)\"\r\n ngxTippy [tippyProps]=\"tippyProperties\"\r\n [class]=\"['c-dropdown', classes] | makeHtmlList\"\r\n [attr.disabled]=\"isDisabled() ? 'disabled' : null\"\r\n aria-haspopup=\"true\"\r\n [attr.aria-disabled]=\"isDisabled() ? 'true' : (ariaDisabled ? ariaDisabled : null)\"\r\n [attr.aria-expanded]=\"isOpen\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.tabIndex]=\"isDisabled() ? '-1' : tabindex\">\r\n <span class=\"inline-flex self-center max-w-xs align-middle truncate\">\r\n <ng-container *desyCustomInnerContent=\"{ html: html, text: text }\"></ng-container>\r\n <ng-content></ng-content>\r\n </span>\r\n <svg class=\"inline-block -mr-2 align-middle -my-px\" viewBox=\"0 0 96 96\" aria-hidden=\"true\" fill=\"currentColor\" focusable=\"false\" width=\"1.5em\" height=\"1.5em\"><g><path d=\"M46.71 58.037a1.823 1.823 0 002.581 0L62.048 45.28a1.823 1.823 0 00-1.29-3.113H35.243a1.823 1.823 0 00-1.291 3.113z\"/></g></svg>\r\n </button>\r\n <span *ngIf=\"hiddenText\" #desyContentEmptyIgnore class=\"sr-only\">{{ hiddenText }}</span>\r\n <div #dropdownContent style=\"display: none;\"\r\n [class]=\"['-ml-sm mt-2 border border-neutral-base shadow-md bg-white', classesTooltip] | makeHtmlList\">\r\n <ng-container *ngTemplateOutlet=\"caller\"></ng-container>\r\n </div>\r\n</div>\r\n"
412
413
  },] }
413
414
  ];
414
415
  DropdownComponent.propDecorators = {
415
- dropdownContent: [{ type: ViewChild, args: ['dropdownContent', { read: ElementRef },] }],
416
+ dropdownContent: [{ type: ViewChild, args: ['dropdownContent', { read: ElementRef, static: true },] }],
416
417
  id: [{ type: Input }],
417
418
  disabled: [{ type: Input }],
418
419
  hiddenText: [{ type: Input }],
@@ -420,8 +421,7 @@ DropdownComponent.propDecorators = {
420
421
  classesTooltip: [{ type: Input }],
421
422
  classes: [{ type: Input }],
422
423
  caller: [{ type: Input }],
423
- clickEvent: [{ type: Output }],
424
- onKeyDown: [{ type: HostListener, args: ['window:keydown', ['$event'],] }]
424
+ clickEvent: [{ type: Output }]
425
425
  };
426
426
 
427
427
  /**
@@ -442,26 +442,16 @@ class StringUtils {
442
442
  }
443
443
  }
444
444
 
445
- class ListboxLabelComponent {
446
- constructor() {
447
- this.isInit = false;
448
- }
449
- ngOnInit() {
450
- setTimeout(() => this.isInit = !!this.content);
451
- }
452
- getContent() {
453
- return this.isInit ? this.content : null;
454
- }
445
+ class ListboxLabelComponent extends ContentBaseComponent {
455
446
  }
456
447
  ListboxLabelComponent.decorators = [
457
448
  { type: Component, args: [{
458
449
  selector: 'desy-listbox-label',
459
- template: "<ng-template #childComponentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n"
450
+ template: "<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n"
460
451
  },] }
461
452
  ];
462
453
  ListboxLabelComponent.propDecorators = {
463
- classes: [{ type: Input }],
464
- content: [{ type: ViewChild, args: ['childComponentTemplate',] }]
454
+ classes: [{ type: Input }]
465
455
  };
466
456
 
467
457
  class ListboxItemComponent extends AccessibilityComponent {
@@ -533,51 +523,70 @@ class ListboxComponent extends AccessibilityAndTextOrHtmlRequiredComponent {
533
523
  super(...arguments);
534
524
  this.itemsChange = new EventEmitter();
535
525
  this.activeItemChange = new EventEmitter();
536
- this.isListVisible = false;
526
+ this.isListVisible = false; // Indica si la lista se está mostrando
537
527
  }
538
528
  ngOnInit() {
539
- setTimeout(() => {
540
- if (this.listboxContent && this.listboxContent.nativeElement) {
541
- const contentTooltip = this.listboxContent.nativeElement;
542
- this.tippyProperties = {
543
- placement: 'bottom-start',
544
- inlinePositioning: true,
545
- content: contentTooltip,
546
- allowHTML: true,
547
- trigger: 'click',
548
- hideOnClick: true,
549
- interactive: true,
550
- arrow: false,
551
- offset: [0, -10],
552
- theme: '',
553
- plugins: [{
554
- name: 'hideOnEsc',
555
- defaultValue: true,
556
- fn({ hide }) {
557
- function onKeyDown(event) {
558
- if (event.key === ListboxComponent.KEY_CODE_ESC) {
559
- hide();
560
- }
561
- }
562
- return {
563
- onShow() {
564
- document.addEventListener('keydown', onKeyDown);
565
- },
566
- onHide() {
567
- document.removeEventListener('keydown', onKeyDown);
568
- },
569
- };
570
- },
571
- }],
572
- role: false,
573
- aria: {
574
- content: 'auto',
529
+ const listboxButtonElement = this.listboxButton.nativeElement;
530
+ if (this.listboxContent && this.listboxContent.nativeElement) {
531
+ const contentTooltip = this.listboxContent.nativeElement;
532
+ this.tippyProperties = {
533
+ placement: 'bottom-start',
534
+ inlinePositioning: true,
535
+ content: contentTooltip,
536
+ allowHTML: true,
537
+ trigger: 'click',
538
+ hideOnClick: true,
539
+ interactive: true,
540
+ arrow: false,
541
+ offset: [0, -10],
542
+ theme: '',
543
+ plugins: [
544
+ {
545
+ name: 'hideOnPopperBlur',
546
+ defaultValue: true,
547
+ fn(instance) {
548
+ return {
549
+ onCreate() {
550
+ instance.popper.addEventListener('focusout', (event) => {
551
+ if (instance.props.hideOnPopperBlur &&
552
+ event.relatedTarget &&
553
+ !instance.popper.contains(event.relatedTarget)) {
554
+ instance.hide();
555
+ }
556
+ });
557
+ },
558
+ };
559
+ }
575
560
  },
576
- onShow: this.onListShow.bind(this),
577
- onHidden: this.onListClose.bind(this)
578
- };
579
- }
580
- });
561
+ {
562
+ name: 'hideOnEsc',
563
+ defaultValue: true,
564
+ fn({ hide }) {
565
+ function onKeyDown(event) {
566
+ if (event.key === ListboxComponent.KEY_CODE_ESC) {
567
+ hide();
568
+ listboxButtonElement.focus();
569
+ }
570
+ }
571
+ return {
572
+ onShow() {
573
+ document.addEventListener('keydown', onKeyDown);
574
+ },
575
+ onHide() {
576
+ document.removeEventListener('keydown', onKeyDown);
577
+ },
578
+ };
579
+ },
580
+ }
581
+ ],
582
+ role: false,
583
+ aria: {
584
+ content: 'auto',
585
+ },
586
+ onShow: this.onListShow.bind(this),
587
+ onHidden: this.onListClose.bind(this)
588
+ };
589
+ }
581
590
  }
582
591
  ngOnChanges() {
583
592
  setTimeout(() => {
@@ -664,11 +673,11 @@ class ListboxComponent extends AccessibilityAndTextOrHtmlRequiredComponent {
664
673
  if (this.doesChangeButtonText && !this.isMultiselectable && activeItems.length > 0) {
665
674
  const activeItemOption = this.listboxOptions.find((item, index) => index === activeItems[0].index);
666
675
  if (activeItemOption) {
667
- this.buttonContent = activeItemOption.nativeElement.innerHTML;
676
+ this.buttonContentHtml = activeItemOption.nativeElement.innerHTML;
668
677
  }
669
678
  }
670
679
  else {
671
- this.buttonContent = this.html ? this.html : this.text;
680
+ this.buttonContentHtml = this.html ? this.html : null;
672
681
  }
673
682
  // Si hay cambios, se emiten
674
683
  if (hasActiveItemChange) {
@@ -684,9 +693,6 @@ class ListboxComponent extends AccessibilityAndTextOrHtmlRequiredComponent {
684
693
  }
685
694
  onListClose() {
686
695
  this.isListVisible = false;
687
- if (this.listboxButton) {
688
- this.listboxButton.nativeElement.focus();
689
- }
690
696
  }
691
697
  onListFocus() {
692
698
  const activeItemsData = this.getActiveItemsData();
@@ -760,22 +766,18 @@ class ListboxComponent extends AccessibilityAndTextOrHtmlRequiredComponent {
760
766
  getLabelContent(label) {
761
767
  return label.html ? label.html : `<p>${StringUtils.escapeHtml(label.text)}</p>`;
762
768
  }
763
- isButtonContentHtml() {
764
- const activeItemsData = this.getActiveItemsData();
765
- return !!(this.doesChangeButtonText && !this.isMultiselectable && activeItemsData.length > 0 ? true : this.html);
766
- }
767
769
  }
768
770
  ListboxComponent.KEY_CODE_ESC = 'Escape';
769
771
  ListboxComponent.decorators = [
770
772
  { type: Component, args: [{
771
773
  selector: 'desy-listbox',
772
- template: "<div [ngClass]=\"classesContainer ? classesContainer : 'relative'\">\r\n <div *ngIf=\"labelComponent\" [id]=\"id + '-label'\" [class]=\"['mb-sm', labelComponent.classes] | makeHtmlList\">\r\n <ng-container *ngTemplateOutlet=\"labelComponent.getContent()\"></ng-container>\r\n </div>\r\n <div *ngIf=\"!labelComponent && label\" [id]=\"id + '-label'\" [class]=\"['mb-sm', label.classes] | makeHtmlList\"\r\n [desyInnerContent]=\"getLabelContent(label)\" [isHtml]=\"true\">\r\n </div>\r\n <button *ngIf=\"tippyProperties\"\r\n #button [id]=\"id + '-button'\"\r\n [class]=\"['c-listbox', classes] | makeHtmlList\"\r\n ngxTippy [tippyProps]=\"tippyProperties\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-labelledby]=\"[hasLabel() ? id + '-label' : null, id + '-button'] | makeHtmlList\"\r\n [attr.disabled]=\"disabled ? 'disabled' : null\"\r\n [attr.aria-disabled]=\"disabled ? 'true' : (ariaDisabled ? ariaDisabled : null)\"\r\n [attr.aria-role] = \"role ? role : null\"\r\n [attr.aria-label] = \"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby] = \"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-hidden] = \"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-controls] = \"ariaControls ? ariaControls : null\"\r\n [attr.aria-current] = \"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live] = \"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded] = \"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errorMessage] = \"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-hasppup] = \"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-tabindex] = \"tabindex ? tabindex : null\">\r\n <span class=\"inline-flex self-center max-w-xs align-middle truncate\"\r\n [desyInnerContent]=\"buttonContent\" [isHtml]=\"isButtonContentHtml()\">\r\n </span>\r\n <svg class=\"inline-block -mr-2 align-middle -my-px\" viewBox=\"0 0 96 96\" aria-hidden=\"true\" fill=\"currentColor\" focusable=\"false\" width=\"1.5em\" height=\"1.5em\"><g><path d=\"M46.71 58.037a1.823 1.823 0 002.581 0L62.048 45.28a1.823 1.823 0 00-1.29-3.113H35.243a1.823 1.823 0 00-1.291 3.113z\"/></g></svg>\r\n </button>\r\n <div #tooltip [class]=\"['c-listbox__tooltip -ml-sm mt-2 border border-neutral-base shadow-md bg-white', classesTooltip] | makeHtmlList\">\r\n <ul *ngIf=\"itemList\"\r\n #list [id]=\"id\"\r\n (focus)=\"onListFocus()\"\r\n (keydown.arrowUp)=\"moveFocus(currentFocusIndex - 1, $event)\"\r\n (keydown.arrowDown)=\"moveFocus(currentFocusIndex + 1, $event)\"\r\n (keydown.home)=\"moveFocus(0, $event)\"\r\n (keydown.end)=\"moveFocus(items.length - 1, $event)\"\r\n (keydown.space)=\"onSpace($event)\"\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"text-sm outline-none\"\r\n [attr.aria-labelledby]=\"hasLabel() ? id : (ariaLabelledBy ? ariaLabelledBy : null)\"\r\n [attr.aria-multiselectable]=\"isMultiselectable ? 'true' : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-label] = \"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby] = \"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-hidden] = \"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-controls] = \"ariaControls ? ariaControls : null\"\r\n [attr.aria-current] = \"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live] = \"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded] = \"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage] = \"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup] = \"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-activedescendant] = \"lastActiveItems.length > 0 ? getItemId(lastActiveItems[0].item, lastActiveItems[0].index) : null\">\r\n <ng-container *ngFor=\"let item of itemList; index as index\">\r\n <li #option *ngIf=\"item\" role=\"option\" (click)=\"selectItem(index)\"\r\n [class]=\"['flex items-center pr-base pl-lg py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'focused': index === currentFocusIndex}\"\r\n [attr.aria-label]=\"item.active ? 'true' : (item.ariaLabel ? item.ariaLabel : null)\"\r\n [id]=\"getItemId(item, index)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-hidden] = \"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current] = \"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live] = \"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup] = \"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.aria-tabindex] = \"item.tabindex ? item.tabindex : null\"\r\n\r\n [attr.aria-checked]=\"item.active\"\r\n [attr.aria-selected]=\"item.active\"\r\n [desyInnerContent]=\"!item['content'] ? (item.html ? item.html : item.text) : null\"\r\n [isHtml]=\"!item['content'] ? item.html : undefined\" [deleteContentIfEmpty]=\"false\">\r\n <ng-container *ngTemplateOutlet=\"item['content']\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n</div>\r\n"
774
+ template: "<div [ngClass]=\"classesContainer ? classesContainer : 'relative'\">\r\n <div [id]=\"id + '-label'\" [class]=\"['mb-sm', labelComponent?.classes, label?.classes] | makeHtmlList\">\r\n <ng-container *desyCustomInnerContent=\"{ component: labelComponent, html: label ? getLabelContent(label) : null }\"></ng-container>\r\n </div>\r\n <button #button [id]=\"id + '-button'\"\r\n [class]=\"['c-listbox', classes] | makeHtmlList\"\r\n ngxTippy [tippyProps]=\"tippyProperties\"\r\n aria-haspopup=\"listbox\"\r\n [attr.aria-labelledby]=\"[hasLabel() ? id + '-label' : null, id + '-button'] | makeHtmlList\"\r\n [attr.disabled]=\"disabled ? 'disabled' : null\"\r\n [attr.aria-disabled]=\"disabled ? 'true' : (ariaDisabled ? ariaDisabled : null)\"\r\n [attr.aria-role] = \"role ? role : null\"\r\n [attr.aria-label] = \"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby] = \"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-hidden] = \"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-controls] = \"ariaControls ? ariaControls : null\"\r\n [attr.aria-current] = \"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live] = \"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded] = \"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errorMessage] = \"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-hasppup] = \"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-tabindex] = \"tabindex ? tabindex : null\">\r\n <span class=\"inline-flex self-center max-w-xs align-middle truncate\">\r\n <ng-container *desyCustomInnerContent=\"{ html: buttonContentHtml, text: text }\"></ng-container>\r\n </span>\r\n <svg class=\"inline-block -mr-2 align-middle -my-px\" viewBox=\"0 0 96 96\" aria-hidden=\"true\" fill=\"currentColor\" focusable=\"false\" width=\"1.5em\" height=\"1.5em\"><g><path d=\"M46.71 58.037a1.823 1.823 0 002.581 0L62.048 45.28a1.823 1.823 0 00-1.29-3.113H35.243a1.823 1.823 0 00-1.291 3.113z\"/></g></svg>\r\n </button>\r\n <div #tooltip [class]=\"['c-listbox__tooltip -ml-sm mt-2 border border-neutral-base shadow-md bg-white', classesTooltip] | makeHtmlList\">\r\n <ul *ngIf=\"itemList\"\r\n #list [id]=\"id\"\r\n (focus)=\"onListFocus()\"\r\n (keydown.arrowUp)=\"moveFocus(currentFocusIndex - 1, $event)\"\r\n (keydown.arrowDown)=\"moveFocus(currentFocusIndex + 1, $event)\"\r\n (keydown.home)=\"moveFocus(0, $event)\"\r\n (keydown.end)=\"moveFocus(items.length - 1, $event)\"\r\n (keydown.space)=\"onSpace($event)\"\r\n role=\"listbox\"\r\n tabindex=\"-1\"\r\n class=\"text-sm outline-none\"\r\n [attr.aria-labelledby]=\"hasLabel() ? id : (ariaLabelledBy ? ariaLabelledBy : null)\"\r\n [attr.aria-multiselectable]=\"isMultiselectable ? 'true' : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-label] = \"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby] = \"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-hidden] = \"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-controls] = \"ariaControls ? ariaControls : null\"\r\n [attr.aria-current] = \"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live] = \"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded] = \"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage] = \"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup] = \"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-activedescendant] = \"lastActiveItems.length > 0 ? getItemId(lastActiveItems[0].item, lastActiveItems[0].index) : null\">\r\n <ng-container *ngFor=\"let item of itemList; index as index\">\r\n <li #option *ngIf=\"item\" role=\"option\" (click)=\"selectItem(index)\"\r\n [class]=\"['flex items-center pr-base pl-lg py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'focused': index === currentFocusIndex}\"\r\n [attr.aria-label]=\"item.active ? 'true' : (item.ariaLabel ? item.ariaLabel : null)\"\r\n [id]=\"getItemId(item, index)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-hidden] = \"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current] = \"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live] = \"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup] = \"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.aria-tabindex] = \"item.tabindex ? item.tabindex : null\"\r\n\r\n [attr.aria-checked]=\"item.active\"\r\n [attr.aria-selected]=\"item.active\">\r\n <ng-container *desyCustomInnerContent=\"{ template: item['content'], html: item.html, text: item.text }\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n</div>\r\n"
773
775
  },] }
774
776
  ];
775
777
  ListboxComponent.propDecorators = {
776
- listboxButton: [{ type: ViewChild, args: ['button', { read: ElementRef },] }],
778
+ listboxButton: [{ type: ViewChild, args: ['button', { read: ElementRef, static: true },] }],
777
779
  listboxList: [{ type: ViewChild, args: ['list', { read: ElementRef },] }],
778
- listboxContent: [{ type: ViewChild, args: ['tooltip', { read: ElementRef },] }],
780
+ listboxContent: [{ type: ViewChild, args: ['tooltip', { read: ElementRef, static: true },] }],
779
781
  listboxOptions: [{ type: ViewChildren, args: ['option', { read: ElementRef },] }],
780
782
  labelComponent: [{ type: ContentChildren, args: [ListboxLabelComponent,] }],
781
783
  itemComponentList: [{ type: ContentChildren, args: [ListboxItemComponent,] }],
@@ -2923,131 +2925,1095 @@ class DateInputComponent extends FormFieldComponent {
2923
2925
  throw new Error('Item name is required');
2924
2926
  }
2925
2927
  });
2926
- return items;
2928
+ return items;
2929
+ }
2930
+ getItemDividerTemplate(item) {
2931
+ return item.divider instanceof DateInputDividerComponent ? item.divider.dividerContent : null;
2932
+ }
2933
+ getItemDividerHtml(item) {
2934
+ return item.divider.html ? item.divider.html : `<p>${StringUtils.escapeHtml(item.divider.text)}</p>`;
2935
+ }
2936
+ }
2937
+ DateInputComponent.defaultItems = [
2938
+ {
2939
+ name: 'day',
2940
+ classes: 'w-14',
2941
+ maxlength: 2
2942
+ },
2943
+ {
2944
+ name: 'month',
2945
+ classes: 'w-14',
2946
+ maxlength: 2
2947
+ },
2948
+ {
2949
+ name: 'year',
2950
+ classes: 'w-20',
2951
+ maxlength: 4
2952
+ }
2953
+ ];
2954
+ DateInputComponent.decorators = [
2955
+ { type: Component, args: [{
2956
+ selector: 'desy-date-input',
2957
+ template: "\r\n<ng-template #innerHtml>\r\n <ng-container *ngIf=\"hasHintComponent()\">\r\n <ng-content select=\"desy-hint\"></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasHintComponent()\">\r\n <ng-container *ngTemplateOutlet=\"hintRef\"></ng-container>\r\n <desy-hint *ngIf=\"!hintRef && hintData\"\r\n [id]=\"getHintId()\"\r\n [text]=\"hintData.text\"\r\n [html]=\"hintData.html\"\r\n [classes]=\"hintData.classes\"\r\n [role]=\"hintData.role\"\r\n [ariaLabel]=\"hintData.ariaLabel\"\r\n [ariaDescribedBy]=\"hintData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"hintData.ariaLabelledBy\"\r\n [ariaHidden]=\"hintData.ariaHidden\"\r\n [ariaDisabled]=\"hintData.ariaDisabled\"\r\n [ariaControls]=\"hintData.ariaControls\"\r\n [ariaCurrent]=\"hintData.ariaCurrent\"\r\n [ariaLive]=\"hintData.ariaLive\"\r\n [ariaExpanded]=\"hintData.ariaExpanded\"\r\n [ariaErrorMessage]=\"hintData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"hintData.ariaHasPopup\"\r\n [tabindex]=\"hintData.tabindex\"></desy-hint>\r\n <desy-hint *ngIf=\"!hintRef && !hintData && hintText\" [text]=\"hintText\" [id]=\"getHintId()\"></desy-hint>\r\n </ng-container>\r\n\r\n\r\n <ng-container *ngIf=\"hasErrorMessageComponent()\">\r\n <ng-content select=\"desy-error-message\"></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasErrorMessageComponent()\">\r\n <ng-container *ngTemplateOutlet=\"errorMessageRef\"></ng-container>\r\n <desy-error-message *ngIf=\"!errorMessageRef && errorMessageData\"\r\n [id]=\"getErrorId()\"\r\n [text]=\"errorMessageData.text\"\r\n [html]=\"errorMessageData.html\"\r\n [classes]=\"errorMessageData.classes\"\r\n [visuallyHiddenText]=\"errorMessageData.visuallyHiddenText\"\r\n [role]=\"errorMessageData.role\"\r\n [ariaLabel]=\"errorMessageData.ariaLabel\"\r\n [ariaDescribedBy]=\"errorMessageData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"errorMessageData.ariaLabelledBy\"\r\n [ariaHidden]=\"errorMessageData.ariaHidden\"\r\n [ariaDisabled]=\"errorMessageData.ariaDisabled\"\r\n [ariaControls]=\"errorMessageData.ariaControls\"\r\n [ariaCurrent]=\"errorMessageData.ariaCurrent\"\r\n [ariaLive]=\"errorMessageData.ariaLive\"\r\n [ariaExpanded]=\"errorMessageData.ariaExpanded\"\r\n [ariaErrorMessage]=\"errorMessageData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"errorMessageData.ariaHasPopup\"\r\n [tabindex]=\"errorMessageData.tabindex\"></desy-error-message>\r\n <desy-error-message *ngIf=\"!errorMessageRef && !errorMessageData && errorMessageText\"\r\n [text]=\"errorMessageText\" [id]=\"getErrorId()\"></desy-error-message>\r\n </ng-container>\r\n\r\n <!-- With reactive forms -->\r\n <div *ngIf=\"controlContainer && !ngModelGroup\"\r\n [formGroup]=\"controlContainer.control\"\r\n [class]=\"['flex', classes] | makeHtmlList\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as i\">\r\n <ng-container *ngIf=\"item.divider\">\r\n <div role=\"separator\" [ngClass]=\"item.divider.classes\">\r\n <ng-container *desyCustomInnerContent=\"{ template: getItemDividerTemplate(item), html: getItemDividerHtml(item) }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.divider\">\r\n <div class=\"mr-base\">\r\n <desy-input [labelData]=\"getItemLabel(item)\"\r\n [labelRef]=\"getItemLabelRef(item)\"\r\n [id]=\"item.id ? item.id : id + '-' + item.name\"\r\n [classes]=\"['mb-0', item.classes] | makeHtmlList\"\r\n [errorId]=\"item.hasErrors ? getErrorId() : null\"\r\n [name]=\"getItemName(item)\"\r\n [formControlName]=\"getItemName(item)\"\r\n [type]=\"'text'\"\r\n [inputmode]=\"'numeric'\"\r\n [autocomplete]=\"item.autocomplete\"\r\n [pattern]=\"item.pattern ? item.pattern : '[0-9]*'\"\r\n\r\n [maxlength]=\"item.maxlength\"\r\n [role]=\"item.role\"\r\n [ariaLabel]=\"item.ariaLabel\"\r\n [ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [ariaHidden]=\"item.ariaHidden\"\r\n [ariaDisabled]=\"item.ariaDisabled\"\r\n [ariaControls]=\"item.ariaControls\"\r\n [ariaCurrent]=\"item.ariaCurrent\"\r\n [ariaLive]=\"item.ariaLive\"\r\n [ariaExpanded]=\"item.ariaExpanded\"\r\n [ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [ariaHasPopup]=\"item.ariaHasPopup\"\r\n [tabindex]=\"item.tabindex\"></desy-input>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Template-driven forms -->\r\n <desy-template-driven-wrapper *ngIf=\"controlContainer && ngModelGroup\">\r\n <div [ngModelGroup]=\"ngModelGroup\"\r\n [class]=\"['flex', classes] | makeHtmlList\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as i\">\r\n \r\n <ng-container *ngIf=\"item.divider\">\r\n <div role=\"separator\" [ngClass]=\"item.divider.classes\">\r\n <ng-container *desyCustomInnerContent=\"{ template: getItemDividerTemplate(item), html: getItemDividerHtml(item) }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.divider\">\r\n <div class=\"mr-base\">\r\n <desy-input [labelData]=\"getItemLabel(item)\"\r\n [labelRef]=\"getItemLabelRef(item)\"\r\n [id]=\"item.id ? item.id : id + '-' + item.name\"\r\n [classes]=\"['mb-0', item.classes] | makeHtmlList\"\r\n [errorId]=\"item.hasErrors ? getErrorId() : null\"\r\n [name]=\"getItemName(item)\"\r\n [ngModel]=\"item.value\" (ngModelChange)=\"onInternalChange(item, +$event)\"\r\n [type]=\"'text'\"\r\n [inputmode]=\"'numeric'\"\r\n [autocomplete]=\"item.autocomplete\"\r\n [pattern]=\"item.pattern ? item.pattern : '[0-9]*'\"\r\n [disabled]=\"disabled ? true : null\"\r\n\r\n [maxlength]=\"item.maxlength\"\r\n [role]=\"item.role\"\r\n [ariaLabel]=\"item.ariaLabel\"\r\n [ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [ariaHidden]=\"item.ariaHidden\"\r\n [ariaDisabled]=\"item.ariaDisabled\"\r\n [ariaControls]=\"item.ariaControls\"\r\n [ariaCurrent]=\"item.ariaCurrent\"\r\n [ariaLive]=\"item.ariaLive\"\r\n [ariaExpanded]=\"item.ariaExpanded\"\r\n [ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [ariaHasPopup]=\"item.ariaHasPopup\"\r\n [tabindex]=\"item.tabindex\"></desy-input>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </desy-template-driven-wrapper>\r\n\r\n <!-- With ngModel-->\r\n <div *ngIf=\"!controlContainer\"\r\n [class]=\"['flex', classes] | makeHtmlList\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as i\">\r\n \r\n <ng-container *ngIf=\"item.divider\">\r\n <div role=\"separator\" [ngClass]=\"item.divider.classes\">\r\n <ng-container *desyCustomInnerContent=\"{ template: getItemDividerTemplate(item), html: getItemDividerHtml(item) }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.divider\">\r\n <div class=\"mr-base\">\r\n <desy-input [labelData]=\"getItemLabel(item)\"\r\n [labelRef]=\"getItemLabelRef(item)\"\r\n [id]=\"item.id ? item.id : id + '-' + item.name\"\r\n [classes]=\"['mb-0', item.classes] | makeHtmlList\"\r\n [errorId]=\"item.hasErrors ? getErrorId() : null\"\r\n [name]=\"getItemName(item)\"\r\n [ngModel]=\"item.value\" (ngModelChange)=\"onInternalChange(item, +$event)\"\r\n [type]=\"'text'\"\r\n [inputmode]=\"'numeric'\"\r\n [autocomplete]=\"item.autocomplete\"\r\n [pattern]=\"item.pattern ? item.pattern : '[0-9]*'\"\r\n [disabled]=\"disabled ? true : null\"\r\n\r\n [maxlength]=\"item.maxlength\"\r\n [role]=\"item.role\"\r\n [ariaLabel]=\"item.ariaLabel\"\r\n [ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [ariaHidden]=\"item.ariaHidden\"\r\n [ariaDisabled]=\"item.ariaDisabled\"\r\n [ariaControls]=\"item.ariaControls\"\r\n [ariaCurrent]=\"item.ariaCurrent\"\r\n [ariaLive]=\"item.ariaLive\"\r\n [ariaExpanded]=\"item.ariaExpanded\"\r\n [ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [ariaHasPopup]=\"item.ariaHasPopup\"\r\n [tabindex]=\"item.tabindex\"></desy-input>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n</ng-template>\r\n\r\n<div [class]=\"['c-form-group', formGroupClasses] | makeHtmlList\"\r\n [ngClass]=\"{'c-form-group--error' : (hasErrorsMessage() || formGroupClasses == 'c-form-group--error')}\">\r\n\r\n <ng-container *ngIf=\"hasFieldsetComponent()\">\r\n <ng-content select=\"desy-fieldset\"></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasFieldsetComponent()\">\r\n <desy-fieldset *ngIf=\"fieldsetData\"\r\n [classes]=\"fieldsetData.classes\"\r\n [id]=\"fieldsetData.id\"\r\n [legendData]=\"fieldsetData.legend\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[fieldsetData.describedBy, getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"\r\n [ariaLabel]=\"fieldsetData.ariaLabel\"\r\n [ariaLabelledBy]=\"fieldsetData.ariaLabelledBy\"\r\n [ariaHidden]=\"fieldsetData.ariaHidden\"\r\n [ariaDisabled]=\"fieldsetData.ariaDisabled\"\r\n [ariaControls]=\"fieldsetData.ariaControls\"\r\n [ariaCurrent]=\"fieldsetData.ariaCurrent\"\r\n [ariaLive]=\"fieldsetData.ariaLive\"\r\n [ariaExpanded]=\"fieldsetData.ariaExpanded\"\r\n [ariaHasPopup]=\"fieldsetData.ariaHasPopup\"\r\n [tabindex]=\"fieldsetData.tabindex\"></desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && hasLegendComponent()\"\r\n [legendRef]=\"legendTemplate\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\">\r\n <ng-template #legendTemplate>\r\n <ng-content select=\"desy-legend\"></ng-content>\r\n </ng-template>\r\n </desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && !hasLegendComponent() && legendRef\"\r\n [legendRef]=\"legendRef\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"></desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && !hasLegendComponent() && !legendRef && legendData\"\r\n [legendData]=\"{text: legendData.text, html: legendData.html, classes: legendData.classes, isPageHeading: legendData.isPageHeading}\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"></desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && !hasLegendComponent() && !legendRef && !legendData && legendText\"\r\n [legendText]=\"legendText\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"></desy-fieldset>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!hasFieldset()\">\r\n <ng-container *ngTemplateOutlet=\"innerHtml\"></ng-container>\r\n </ng-container>\r\n</div>\r\n",
2958
+ providers: [
2959
+ {
2960
+ provide: NG_VALUE_ACCESSOR,
2961
+ useExisting: forwardRef(() => DateInputComponent),
2962
+ multi: true
2963
+ }
2964
+ ]
2965
+ },] }
2966
+ ];
2967
+ DateInputComponent.ctorParameters = () => [
2968
+ { type: ControlContainer, decorators: [{ type: Optional }] }
2969
+ ];
2970
+ DateInputComponent.propDecorators = {
2971
+ ngModelGroup: [{ type: Input }],
2972
+ items: [{ type: Input }],
2973
+ itemsChange: [{ type: Output }],
2974
+ namePrefix: [{ type: Input }],
2975
+ classes: [{ type: Input }],
2976
+ formGroupClasses: [{ type: Input }],
2977
+ errorMessage: [{ type: Input }],
2978
+ id: [{ type: Input }],
2979
+ fieldsetComponent: [{ type: ContentChildren, args: [FieldsetComponent,] }],
2980
+ legendComponent: [{ type: ContentChildren, args: [LegendComponent,] }],
2981
+ dateInputItemComponents: [{ type: ContentChildren, args: [DateInputItemComponent,] }],
2982
+ fieldsetData: [{ type: Input }],
2983
+ legendRef: [{ type: Input }],
2984
+ legendData: [{ type: Input }],
2985
+ legendText: [{ type: Input }],
2986
+ innerHtml: [{ type: ViewChild, args: ['innerHtml', { static: true },] }]
2987
+ };
2988
+ __decorate([
2989
+ DesyOnInputChange('onExternalChange')
2990
+ ], DateInputComponent.prototype, "items", void 0);
2991
+ __decorate([
2992
+ DesyOnInputChange('onExternalChange')
2993
+ ], DateInputComponent.prototype, "namePrefix", void 0);
2994
+ __decorate([
2995
+ DesyContentChild({ onSetCallbackName: 'overrideFieldsetParams' })
2996
+ ], DateInputComponent.prototype, "fieldsetComponent", void 0);
2997
+ __decorate([
2998
+ DesyContentChild()
2999
+ ], DateInputComponent.prototype, "legendComponent", void 0);
3000
+
3001
+ class SearchBarComponent extends FormFieldComponent {
3002
+ constructor() {
3003
+ super(...arguments);
3004
+ this.clickEvent = new EventEmitter();
3005
+ this.value = '';
3006
+ }
3007
+ ngOnChanges(changes) {
3008
+ this.checkRequiredParams();
3009
+ }
3010
+ checkRequiredParams() {
3011
+ if (!this.id) {
3012
+ throw Error('id is required');
3013
+ }
3014
+ if (!this.hasLabel()) {
3015
+ throw Error('label is required');
3016
+ }
3017
+ }
3018
+ ngAfterViewInit() {
3019
+ if (this.button && this.button.length > 1) {
3020
+ throw Error('only 1 button in content is allowed');
3021
+ }
3022
+ }
3023
+ onClick(event) {
3024
+ if (!this.disabled) {
3025
+ this.clickEvent.emit(event);
3026
+ }
3027
+ }
3028
+ hasButton() {
3029
+ return this.button && this.button.length > 0;
3030
+ }
3031
+ }
3032
+ SearchBarComponent.decorators = [
3033
+ { type: Component, args: [{
3034
+ selector: 'desy-search-bar',
3035
+ template: "<!-- searchbar -->\r\n<div class=\"relative\" [ngClass]=\"{'flex flex-wrap items-end': hasButton()}\">\r\n <ng-container *ngTemplateOutlet=\"labelRef\"></ng-container>\r\n <desy-label *ngIf=\"!labelRef && labelData\"\r\n [text]=\"labelData.text\"\r\n [html]=\"labelData.html\"\r\n classes=\"sr-only\"\r\n [isPageHeading]=\"labelData.isPageHeading\"\r\n [for]=\"id\"\r\n [role]=\"labelData.role\"\r\n [ariaLabel]=\"labelData.ariaLabel\"\r\n [ariaDescribedBy]=\"labelData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"labelData.ariaLabelledBy\"\r\n [ariaHidden]=\"labelData.ariaHidden\"\r\n [ariaDisabled]=\"labelData.ariaDisabled\"\r\n [ariaControls]=\"labelData.ariaControls\"\r\n [ariaCurrent]=\"labelData.ariaCurrent\"\r\n [ariaLive]=\"labelData.ariaLive\"\r\n [ariaExpanded]=\"labelData.ariaExpanded\"\r\n [ariaErrorMessage]=\"labelData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"labelData.ariaHasPopup\"\r\n [tabindex]=\"labelData.tabindex\"></desy-label>\r\n <desy-label *ngIf=\"!labelRef && !labelData && labelText\" [text]=\"labelText\" classes=\"sr-only\" [for]=\"id\"></desy-label>\r\n <input type=\"search\"\r\n [class]=\"['c-input block mt-sm pr-12 border-black rounded font-semibold placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base', classes] | makeHtmlList\"\r\n [ngClass]=\"{'border-alert-base ring-2 ring-alert-base': hasErrorsMessage(),'w-full': !hasButton()}\"\r\n [value]=\"value\" (input)=\"onInput($event.target.value)\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.name]=\"id ? id : null\"\r\n [attr.aria-describedby]=\"[describedBy, getErrorId()] | makeHtmlList:null\"\r\n [attr.aria-errormessage]=\"hasErrorsMessage() ? getErrorId() : null\"\r\n [attr.aria-invalid]=\"hasErrorsMessage() ? true : null\"\r\n [attr.disabled]=\"disabled ? true : null\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngIf=\"hasButton(); else defaultButton\">\r\n <ng-content select=\"desy-button\"></ng-content>\r\n </ng-container>\r\n <ng-template #defaultButton>\r\n <button type=\"submit\" [attr.disabled]=\"disabled ? 'disabled' : null\" [attr.aria-disabled]=\"disabled ? 'true' : null\"\r\n (click)=\"onClick($event)\"\r\n [class]=\"['absolute top-0 right-0 m-sm p-0.5 text-primary-base hover:text-primary-dark focus:bg-warning-base focus:outline-none focus:shadow-outline-focus', buttonClasses] | makeHtmlList\">\r\n <span class=\"sr-only\">Buscar</span>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"1.375em\" height=\"1.375em\" aria-hidden=\"true\"><path d=\"M23.498 23.487a1.713 1.713 0 000-2.421l-4.572-4.575a.43.43 0 01-.062-.539 10.283 10.283 0 10-2.911 2.911.43.43 0 01.539.055l4.574 4.574a1.712 1.712 0 002.433-.005zM3.451 10.289a6.85 6.85 0 116.85 6.85 6.85 6.85 0 01-6.85-6.85z\" fill=\"currentColor\"/></svg>\r\n </button>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"errorMessageRef\"></ng-container>\r\n <desy-error-message *ngIf=\"!errorMessageRef && errorMessageData\"\r\n [id]=\"getErrorId()\"\r\n [text]=\"errorMessageData.text\"\r\n [html]=\"errorMessageData.html\"\r\n [classes]=\"errorMessageData.classes\"\r\n [visuallyHiddenText]=\"errorMessageData.visuallyHiddenText\"\r\n [role]=\"errorMessageData.role\"\r\n [ariaLabel]=\"errorMessageData.ariaLabel\"\r\n [ariaDescribedBy]=\"errorMessageData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"errorMessageData.ariaLabelledBy\"\r\n [ariaHidden]=\"errorMessageData.ariaHidden\"\r\n [ariaDisabled]=\"errorMessageData.ariaDisabled\"\r\n [ariaControls]=\"errorMessageData.ariaControls\"\r\n [ariaCurrent]=\"errorMessageData.ariaCurrent\"\r\n [ariaLive]=\"errorMessageData.ariaLive\"\r\n [ariaExpanded]=\"errorMessageData.ariaExpanded\"\r\n [ariaErrorMessage]=\"errorMessageData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"errorMessageData.ariaHasPopup\"\r\n [tabindex]=\"errorMessageData.tabindex\"></desy-error-message>\r\n <desy-error-message *ngIf=\"!errorMessageRef && !errorMessageData && errorMessageText\"\r\n [text]=\"errorMessageText\" [id]=\"getErrorId()\"></desy-error-message>\r\n</div>\r\n<!-- /searchbar -->\r\n",
3036
+ providers: [
3037
+ {
3038
+ provide: NG_VALUE_ACCESSOR,
3039
+ useExisting: forwardRef(() => SearchBarComponent),
3040
+ multi: true
3041
+ }
3042
+ ]
3043
+ },] }
3044
+ ];
3045
+ SearchBarComponent.propDecorators = {
3046
+ button: [{ type: ContentChildren, args: [ButtonComponent,] }],
3047
+ describedBy: [{ type: Input }],
3048
+ classes: [{ type: Input }],
3049
+ buttonClasses: [{ type: Input }],
3050
+ placeholder: [{ type: Input }],
3051
+ clickEvent: [{ type: Output }]
3052
+ };
3053
+
3054
+ class TreeSubComponent extends ContentBaseComponent {
3055
+ }
3056
+ TreeSubComponent.decorators = [
3057
+ { type: Component, args: [{
3058
+ selector: 'desy-tree-sub',
3059
+ template: "<ng-template #contentTemplate>\r\n <ul [class]=\"['c-tree__itemgroup', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : 'group'\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-modal]=\"ariaModal ? ariaModal : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-content></ng-content>\r\n </ul>\r\n</ng-template>\r\n"
3060
+ },] }
3061
+ ];
3062
+ TreeSubComponent.propDecorators = {
3063
+ classes: [{ type: Input }]
3064
+ };
3065
+
3066
+ class ITreeItem {
3067
+ }
3068
+
3069
+ class SearchUtils {
3070
+ /**
3071
+ * Comprueba si una cadena de texto (target) contiene cualquier palabra de otro texto (text)
3072
+ * @param target - Texto en el que buscar
3073
+ * @param text - Texto a buscar
3074
+ * @param fullWord - Indica si las palabras del texto a buscar deben aparecer enteras
3075
+ */
3076
+ static containsAnyWordFrom(target, text, fullWord) {
3077
+ let words = [];
3078
+ let includes = false;
3079
+ const simplifiedTarget = this.getSimplifiedString(target);
3080
+ if (text && text.split(' ').length > 1) {
3081
+ words = text.split(' ');
3082
+ }
3083
+ words.push(text);
3084
+ words.forEach(word => {
3085
+ if (simplifiedTarget && word) {
3086
+ if ((fullWord && simplifiedTarget === this.getSimplifiedString(word))
3087
+ || (!fullWord && simplifiedTarget.includes(this.getSimplifiedString(word)))) {
3088
+ includes = true;
3089
+ }
3090
+ }
3091
+ });
3092
+ return includes;
3093
+ }
3094
+ /**
3095
+ * Convierte a mayúsculas, elimina espacios y reemplaza/elimina caracteres especiales para realizar comparaciones más tolerantes
3096
+ * @param str - cadena de entrada
3097
+ */
3098
+ static getSimplifiedString(str) {
3099
+ let res = str;
3100
+ if (str) {
3101
+ res = str.toLocaleUpperCase().trim();
3102
+ res = res.replace('Á', 'A');
3103
+ res = res.replace('É', 'E');
3104
+ res = res.replace('Í', 'I');
3105
+ res = res.replace('Ó', 'O');
3106
+ res = res.replace('Ú', 'U');
3107
+ res = res.replace('À', 'A');
3108
+ res = res.replace('È', 'E');
3109
+ res = res.replace('Ì', 'I');
3110
+ res = res.replace('Ò', 'O');
3111
+ res = res.replace('Ù', 'U');
3112
+ res = res.replace('Ä', 'A');
3113
+ res = res.replace('Ë', 'E');
3114
+ res = res.replace('Ï', 'I');
3115
+ res = res.replace('Ö', 'O');
3116
+ res = res.replace('Ü', 'U');
3117
+ res = res.replace(',', '');
3118
+ res = res.replace('.', '');
3119
+ res = res.replace('\'', '');
3120
+ res = res.replace('"', '');
3121
+ }
3122
+ return res;
3123
+ }
3124
+ }
3125
+
3126
+ class TreeCheckboxComponent extends AccessibilityComponent {
3127
+ constructor(changeDetector) {
3128
+ super();
3129
+ this.changeDetector = changeDetector;
3130
+ this.checkedChange = new EventEmitter();
3131
+ this.indeterminateCheckedChange = new EventEmitter();
3132
+ this.hasError = false;
3133
+ this._hasInit = false;
3134
+ }
3135
+ ngOnInit() {
3136
+ this._hasInit = true;
3137
+ this.onDescribedByChange();
3138
+ }
3139
+ detectChanges() {
3140
+ this.changeDetector.detectChanges();
3141
+ }
3142
+ hasChanged() {
3143
+ if (this._hasInit) {
3144
+ const input = this.inputElement.nativeElement;
3145
+ // Se establece el cambio a visualizar en el input
3146
+ if (this.isIndeterminate) {
3147
+ if (input.readOnly) {
3148
+ input.checked = false;
3149
+ input.readOnly = false;
3150
+ }
3151
+ else if (!input.checked) {
3152
+ input.readOnly = true;
3153
+ input.indeterminate = true;
3154
+ }
3155
+ }
3156
+ this.setIndeterminateChecked(input.indeterminate);
3157
+ this.checkedChange.emit(input.checked);
3158
+ }
3159
+ }
3160
+ onIdChange() {
3161
+ this.overrideLabelParams();
3162
+ this.overrideHintParams();
3163
+ }
3164
+ setIndeterminateStatus() {
3165
+ var _a;
3166
+ const input = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.nativeElement;
3167
+ if (input) {
3168
+ if (this.indeterminateChecked) {
3169
+ input.readOnly = true;
3170
+ input.indeterminate = true;
3171
+ }
3172
+ else if (input.readOnly) {
3173
+ input.readOnly = false;
3174
+ input.indeterminate = false;
3175
+ }
3176
+ }
3177
+ }
3178
+ setIndeterminateChecked(indeterminateChecked) {
3179
+ this.indeterminateChecked = indeterminateChecked;
3180
+ this._lastIndeterminate = indeterminateChecked;
3181
+ this.indeterminateCheckedChange.emit(indeterminateChecked);
3182
+ this.changeDetector.detectChanges(); // Avisa al elemento input para que actualice su estado
3183
+ }
3184
+ focus() {
3185
+ this.inputElement.nativeElement.focus();
3186
+ }
3187
+ matchesText(value) {
3188
+ const checkboxText = this.contentWrapper.nativeElement.textContent;
3189
+ return SearchUtils.containsAnyWordFrom(checkboxText, value);
3190
+ }
3191
+ preventDefault(event) {
3192
+ event.preventDefault();
3193
+ }
3194
+ getHintId() {
3195
+ return this.hintComponent ? this.hintComponent.id : '';
3196
+ }
3197
+ overrideLabelParams() {
3198
+ if (this.labelComponent) {
3199
+ this.labelComponent.for = this.id + '-input';
3200
+ if (!this.labelComponent.classes) {
3201
+ this.labelComponent.classes = 'block relative -top-xs -left-8 pl-8 py-xs';
3202
+ }
3203
+ this.labelComponent.detectChanges();
3204
+ }
3205
+ }
3206
+ overrideHintParams() {
3207
+ if (this.hintComponent) {
3208
+ if (!this.hintComponent.id) {
3209
+ this.hintComponent.id = this.id + '-item-hint';
3210
+ }
3211
+ this.hintComponent.detectChanges();
3212
+ }
3213
+ this.onDescribedByChange();
3214
+ }
3215
+ getItemDescribedBy() {
3216
+ return (this.describedBy ? this.describedBy : '') + ' ' + this.getHintId();
3217
+ }
3218
+ onDescribedByChange() {
3219
+ if (this.ariaDescribedBy) {
3220
+ this.itemDescribedBy = this.ariaDescribedBy;
3221
+ }
3222
+ else {
3223
+ this.itemDescribedBy = this.getItemDescribedBy();
3224
+ }
3225
+ }
3226
+ }
3227
+ TreeCheckboxComponent.decorators = [
3228
+ { type: Component, args: [{
3229
+ selector: 'desy-tree-checkbox',
3230
+ template: "<div [class]=\"classes\" [ngClass]=\"{'border-t border-b border-neutral-base -mb-px': hasDividers}\">\r\n <div class=\"relative flex items-start py-xs\">\r\n <div class=\"flex items-center mx-sm\">\r\n <input #input class=\"w-6 h-6 transition duration-150 ease-in-out border-black focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-offset-0 focus:ring-warning-base disabled:bg-neutral-base disabled:border-neutral-base text-primary-base\"\r\n [id]=\"id + '-input'\"\r\n [name]=\"name\"\r\n [type]=\"type === 'checkbox' ? 'checkbox' : 'radio'\"\r\n [value]=\"value\"\r\n [checked]=\"checked\"\r\n (change)=\"hasChanged()\"\r\n [disabled]=\"disabled ? disabled : null\"\r\n [attr.aria-invalid]=\"hasError ? 'true' : null\"\r\n\r\n [attr.role]=\"role ? role : 'group'\"\r\n [attr.aria-describedby]=\"itemDescribedBy\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-modal]=\"ariaModal ? ariaModal : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\"\r\n\r\n (keydown.home)=\"preventDefault($event)\"\r\n (keydown.end)=\"preventDefault($event)\"\r\n (keydown.arrowup)=\"preventDefault($event)\"\r\n (keydown.arrowdown)=\"preventDefault($event)\"\r\n (keydown.arrowright)=\"preventDefault($event)\"\r\n (keydown.arrowleft)=\"preventDefault($event)\">\r\n </div>\r\n <div #contentWrapper class=\"flex-1 pt-0.5 leading-5\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n"
3231
+ },] }
3232
+ ];
3233
+ TreeCheckboxComponent.ctorParameters = () => [
3234
+ { type: ChangeDetectorRef }
3235
+ ];
3236
+ TreeCheckboxComponent.propDecorators = {
3237
+ inputElement: [{ type: ViewChild, args: ['input', { static: true },] }],
3238
+ contentWrapper: [{ type: ViewChild, args: ['contentWrapper', { static: true },] }],
3239
+ id: [{ type: Input }],
3240
+ name: [{ type: Input }],
3241
+ type: [{ type: Input }],
3242
+ classes: [{ type: Input }],
3243
+ value: [{ type: Input }],
3244
+ checked: [{ type: Input }],
3245
+ checkedChange: [{ type: Output }],
3246
+ isIndeterminate: [{ type: Input }],
3247
+ indeterminateChecked: [{ type: Input }],
3248
+ indeterminateCheckedChange: [{ type: Output }],
3249
+ disabled: [{ type: Input }],
3250
+ hasDividers: [{ type: Input }],
3251
+ describedBy: [{ type: Input }],
3252
+ hasError: [{ type: Input }],
3253
+ labelComponent: [{ type: Input }],
3254
+ hintComponent: [{ type: Input }]
3255
+ };
3256
+ __decorate([
3257
+ DesyOnInputChange('onIdChange')
3258
+ ], TreeCheckboxComponent.prototype, "id", void 0);
3259
+ __decorate([
3260
+ DesyOnInputChange('setIndeterminateStatus')
3261
+ ], TreeCheckboxComponent.prototype, "indeterminateChecked", void 0);
3262
+ __decorate([
3263
+ DesyOnInputChange('onDescribedByChange')
3264
+ ], TreeCheckboxComponent.prototype, "describedBy", void 0);
3265
+ __decorate([
3266
+ DesyOnInputChange('overrideLabelParams')
3267
+ ], TreeCheckboxComponent.prototype, "labelComponent", void 0);
3268
+ __decorate([
3269
+ DesyOnInputChange('overrideHintParams')
3270
+ ], TreeCheckboxComponent.prototype, "hintComponent", void 0);
3271
+
3272
+ class TreeItemComponent extends AccessibilityComponent {
3273
+ constructor(changeDetector, element) {
3274
+ super();
3275
+ this.changeDetector = changeDetector;
3276
+ this.element = element;
3277
+ this.checkedChange = new EventEmitter();
3278
+ this.checkedChangeForTree = new EventEmitter();
3279
+ this.expandedChange = new EventEmitter();
3280
+ this.indeterminateCheckedChange = new EventEmitter();
3281
+ /*
3282
+ * Identificador del wrapper del componente. Se utiliza para recorrer el árbol en sentido inverso y que cada item
3283
+ * sepa cuál es su item/árbol padre.
3284
+ * Esto es necesario ya que, a la hora de construir un árbol dinámico con templates,
3285
+ * el decorador @ContentChildren no funciona correctamente y no los detecta.
3286
+ * Dejo el enlace de un problema similar: https://github.com/angular/angular/issues/21751
3287
+ */
3288
+ this.treeItemKey = TreeItemComponent.generateStaticItemKey();
3289
+ this.allParentsExpanded = true; // True si el elemento es visible según los elementos expandidos
3290
+ this.inheritedMatchesSearch = true; // True si el elemento es visible según los criterios de búsqueda
3291
+ // Evento para emitir al componente arbol cuando se pretende abandonar el foco del item
3292
+ this.quitFocus = new EventEmitter();
3293
+ this.isFocus = false;
3294
+ this.isHover = false;
3295
+ this._matchesValidText = false; // True si el contenido del item encaja con los criterios de búsqueda y se está filtrando
3296
+ }
3297
+ ngOnChanges(changes) {
3298
+ if (this.sub && this.sub.itemList) {
3299
+ this.sub.itemList.forEach(item => item.refreshAllParentsExpandedRecursive(this.allParentsExpanded && this.expanded));
3300
+ }
3301
+ for (const propName in changes) {
3302
+ if (changes.hasOwnProperty(propName)) {
3303
+ switch (propName) {
3304
+ case 'checked': {
3305
+ // Reasignamos el valor de checked cuando detectamos el cambio en la entrada
3306
+ setTimeout(() => {
3307
+ this.setChecked(this.checked, false, false);
3308
+ if (this.inheritedExpandedFirstLevel && this.checked && !this.expanded) {
3309
+ this.expandSub(true);
3310
+ }
3311
+ });
3312
+ break;
3313
+ }
3314
+ }
3315
+ }
3316
+ }
3317
+ }
3318
+ /*
3319
+ * Métodos expuestos que permiten configurar al ítem de forma externa
3320
+ */
3321
+ focus() {
3322
+ var _a;
3323
+ (_a = this.checkbox) === null || _a === void 0 ? void 0 : _a.focus();
3324
+ this.handleItemFocus(true);
3325
+ }
3326
+ setCheckedAutomaticallyDependingOnChildren() {
3327
+ if (this.sub) {
3328
+ this.sub.itemList.forEach(item => item.setCheckedAutomaticallyDependingOnChildren());
3329
+ if (this.areAllChildrenChecked()) {
3330
+ if (this.indeterminateChecked) {
3331
+ this.setIndeterminateChecked(false);
3332
+ }
3333
+ if (!this.checked) {
3334
+ this.setChecked(true, true);
3335
+ }
3336
+ }
3337
+ else if (this.hasChildrenCheckedOrIndeterminate()) {
3338
+ if (!this.indeterminateChecked) {
3339
+ this.setIndeterminateChecked(true);
3340
+ }
3341
+ if (this.checked) {
3342
+ this.setChecked(false, true);
3343
+ }
3344
+ }
3345
+ else {
3346
+ if (this.indeterminateChecked) {
3347
+ this.setIndeterminateChecked(false);
3348
+ }
3349
+ if (this.checked) {
3350
+ this.setChecked(false, true);
3351
+ }
3352
+ }
3353
+ }
3354
+ }
3355
+ refreshAllParentsExpandedRecursive(value) {
3356
+ this.allParentsExpanded = value;
3357
+ if (this.sub) {
3358
+ this.sub.itemList.forEach(item => item.refreshAllParentsExpandedRecursive(value && this.expanded));
3359
+ }
3360
+ }
3361
+ detectChanges() {
3362
+ this.changeDetector.detectChanges();
3363
+ }
3364
+ expandSub(value) {
3365
+ this.expanded = value;
3366
+ if (this.sub) {
3367
+ this.sub.itemList.forEach(item => item.refreshAllParentsExpandedRecursive(this.allParentsExpanded && value));
3368
+ }
3369
+ this.expandedChange.emit(value);
3370
+ }
3371
+ /*
3372
+ * Gestion de eventos
3373
+ */
3374
+ handleCheckboxChange(checked) {
3375
+ this.setChecked(checked, false);
3376
+ if (this.inheritedExpandedFirstLevel && checked && !this.expanded) {
3377
+ this.expandSub(true);
3378
+ }
3379
+ }
3380
+ handleIndeterminateCheckedChange(indeterminate) {
3381
+ this.indeterminateCheckedChange.emit(indeterminate);
3382
+ }
3383
+ handleItemFocus(value, condition = true) {
3384
+ if (condition) {
3385
+ this.isFocus = value;
3386
+ }
3387
+ }
3388
+ handleItemHover(value, condition = true) {
3389
+ if (condition) {
3390
+ this.isHover = value;
3391
+ }
3392
+ }
3393
+ handleArrowUp(event, condition = true) {
3394
+ if (condition) {
3395
+ event.preventDefault();
3396
+ this.quitFocus.emit({
3397
+ nextElement: 'previous',
3398
+ currentItem: this
3399
+ });
3400
+ }
3401
+ }
3402
+ handleHome(event, condition = true) {
3403
+ if (condition) {
3404
+ event.preventDefault();
3405
+ this.quitFocus.emit({
3406
+ nextElement: 'first',
3407
+ currentItem: this
3408
+ });
3409
+ }
3410
+ }
3411
+ handleEnd(event, condition = true) {
3412
+ if (condition) {
3413
+ event.preventDefault();
3414
+ this.quitFocus.emit({
3415
+ nextElement: 'last',
3416
+ currentItem: this
3417
+ });
3418
+ }
3419
+ }
3420
+ handleArrowDown(event, condition = true) {
3421
+ if (condition) {
3422
+ event.preventDefault();
3423
+ this.quitFocus.emit({
3424
+ nextElement: 'next',
3425
+ currentItem: this
3426
+ });
3427
+ }
3428
+ }
3429
+ handleArrowRight(event, condition = true) {
3430
+ var _a;
3431
+ if (condition && this.sub && ((_a = this.sub.itemList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
3432
+ event.preventDefault();
3433
+ if (this.expanded) {
3434
+ this.quitFocus.emit({
3435
+ nextElement: 'firstChild',
3436
+ currentItem: this
3437
+ });
3438
+ }
3439
+ else {
3440
+ this.expandSub(true);
3441
+ }
3442
+ }
3443
+ }
3444
+ handleArrowLeft(event, condition = true) {
3445
+ if (condition) {
3446
+ event.preventDefault();
3447
+ if (this.expanded) {
3448
+ this.expandSub(false);
3449
+ }
3450
+ else if (this.subLevel > 0) {
3451
+ this.quitFocus.emit({
3452
+ nextElement: 'parent',
3453
+ currentItem: this
3454
+ });
3455
+ }
3456
+ }
3457
+ }
3458
+ /*
3459
+ * Setters and getters
3460
+ */
3461
+ setChecked(checked, ignoreInTree, emitEvent = true) {
3462
+ if (!this.disabled) {
3463
+ this.checked = checked;
3464
+ }
3465
+ if (!this.inheritedDecoupleChildFromParent && this.sub && this.sub.itemList && !this.indeterminateChecked) {
3466
+ this.sub.itemList.forEach(item => {
3467
+ item.setIndeterminateChecked(false);
3468
+ item.setChecked(checked, true);
3469
+ });
3470
+ }
3471
+ if (emitEvent) {
3472
+ this.checkedChange.emit(checked);
3473
+ }
3474
+ if (!ignoreInTree) {
3475
+ this.checkedChangeForTree.emit(checked);
3476
+ }
3477
+ }
3478
+ setIndeterminateChecked(indeterminate) {
3479
+ if (!this.disabled) {
3480
+ this.indeterminateChecked = indeterminate;
3481
+ this.indeterminateCheckedChange.emit(indeterminate);
3482
+ }
3483
+ }
3484
+ setSubLevel(subLevel) {
3485
+ this.subLevel = subLevel;
3486
+ if (this.sub && this.sub.itemList) {
3487
+ this.sub.itemList.forEach(item => item.setSubLevel(subLevel + 1));
3488
+ }
3489
+ }
3490
+ setOrderRecursively(order) {
3491
+ this.orderInTree = order;
3492
+ let newOrder = order + 1;
3493
+ if (this.sub && this.sub.itemList) {
3494
+ this.sub.itemList.forEach(item => {
3495
+ newOrder = item.setOrderRecursively(newOrder);
3496
+ });
3497
+ }
3498
+ return newOrder;
3499
+ }
3500
+ setDefaultId(defaultId) {
3501
+ this.defaultId = defaultId;
3502
+ this.setDefaultIdRecursive();
3503
+ }
3504
+ setDefaultIdRecursive() {
3505
+ if (this.sub && this.sub.itemList) {
3506
+ this.sub.itemList.forEach((item, index) => {
3507
+ item.setDefaultId(`sub-${this.getId()}-${index}`);
3508
+ });
3509
+ }
3510
+ }
3511
+ getId() {
3512
+ return this.id ? this.id : this.defaultId;
3513
+ }
3514
+ isHidden() {
3515
+ return !this.inheritedMatchesSearch && (!this.sub || this.areAllChildrenHidden());
3516
+ }
3517
+ areAllChildrenHidden() {
3518
+ const children = this.sub.itemList;
3519
+ return children.findIndex(child => !child.isHidden()) < 0;
3520
+ }
3521
+ areAllChildrenChecked() {
3522
+ const children = this.sub.itemList;
3523
+ return children.findIndex(child => !child.checked) < 0;
3524
+ }
3525
+ hasChildrenCheckedOrIndeterminate() {
3526
+ const children = this.sub.itemList;
3527
+ return children.findIndex(child => child.checked || child.indeterminateChecked) >= 0;
3528
+ }
3529
+ matchesText(value) {
3530
+ var _a;
3531
+ let matches;
3532
+ if (this.allParentsExpanded && !this.isHidden()) {
3533
+ matches = (_a = this.checkbox) === null || _a === void 0 ? void 0 : _a.matchesText(value);
3534
+ }
3535
+ else {
3536
+ const itemText = this.hiddenWrapper.nativeElement.textContent;
3537
+ matches = SearchUtils.containsAnyWordFrom(itemText, value);
3538
+ }
3539
+ this._matchesValidText = value ? matches : false;
3540
+ return matches;
3541
+ }
3542
+ getKey() {
3543
+ return this.treeItemKey;
3544
+ }
3545
+ getParentKey() {
3546
+ let parentKey;
3547
+ let parentElement = this.element.nativeElement.parentElement;
3548
+ while (parentElement && parentElement.tagName !== 'BODY' && parentElement.tagName !== 'DESY-TREE-ITEM' && parentElement.tagName !== 'DESY-TREE') {
3549
+ parentElement = parentElement.parentElement;
3550
+ }
3551
+ if (parentElement.tagName === 'BODY') {
3552
+ throw new Error('Parent for tree-item not found');
3553
+ }
3554
+ if (parentElement.tagName === 'DESY-TREE') {
3555
+ parentKey = 'root';
3556
+ }
3557
+ if (parentElement.tagName === 'DESY-TREE-ITEM') {
3558
+ parentKey = parentElement.getAttribute('desy-tree-item-key');
3559
+ }
3560
+ return parentKey;
3561
+ }
3562
+ isActive() {
3563
+ return this.active || this._matchesValidText;
3564
+ }
3565
+ /*
3566
+ * Métodos privados
3567
+ */
3568
+ /**
3569
+ * Genera una clave única para el componente
3570
+ * @private
3571
+ */
3572
+ static generateStaticItemKey() {
3573
+ const key = 'tree-item-key-' + TreeItemComponent._treeItemKeySuffix;
3574
+ TreeItemComponent._treeItemKeySuffix++;
3575
+ return key;
3576
+ }
3577
+ }
3578
+ TreeItemComponent._treeItemKeySuffix = 0; // Sufijo estático para generar siempre claves distintas
3579
+ TreeItemComponent.decorators = [
3580
+ { type: Component, args: [{
3581
+ selector: 'desy-tree-item',
3582
+ template: "<li *ngIf=\"allParentsExpanded && !isHidden(); else hidden\"\r\n [id]=\"id\"\r\n [class]=\"'c-tree__item focus:outline-none'\"\r\n [ngClass]=\"{\r\n 'ml-4': subLevel === 0,\r\n 'ml-8': subLevel !== 0,\r\n 'c-tree__item--focus': isFocus && !sub,\r\n 'c-tree__item--hover': isHover && !sub\r\n }\"\r\n (focusin)=\"handleItemFocus(true, !sub)\"\r\n (focusout)=\"handleItemFocus(false, !sub)\"\r\n (mouseover)=\"handleItemHover(true, !sub)\"\r\n (mouseout)=\"handleItemHover(false, !sub)\"\r\n (keydown.home)=\"handleHome($event, !sub)\"\r\n (keydown.end)=\"handleEnd($event, !sub)\"\r\n (keydown.arrowup)=\"handleArrowUp($event, !sub)\"\r\n (keydown.arrowdown)=\"handleArrowDown($event, !sub)\"\r\n (keydown.arrowright)=\"handleArrowRight($event, !sub)\"\r\n (keydown.arrowleft)=\"handleArrowLeft($event, !sub)\"\r\n role=\"treeitem\"\r\n [attr.aria-expanded]=\"sub ? (expanded ? 'true' : 'false') : null\"\r\n [attr.aria-current]=\"isActive() && subLevel === 0 ? 'page' : null\"\r\n [attr.disabled]=\"disabled && subLevel === 0 ? 'disabled' : null\"\r\n [attr.aria-disabled]=\"disabled && subLevel === 0 ? 'true' : null\"\r\n [attr.tabIndex]=\"disabled && subLevel === 0 ? '-1' : null\">\r\n <div *ngIf=\"!sub && subLevel !== 0; else childrenTree\"\r\n [id]=\"id\"\r\n [class]=\"['block', classes] | makeHtmlList\"\r\n [attr.title]=\"title ? title : null\"\r\n [attr.disabled]=\"disabled ? 'disabled' : null\"\r\n\r\n [attr.role]=\"role ? role : 'tree'\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : (disabled ? 'true' : null)\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : (isActive() ? 'page' : null)\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-modal]=\"ariaModal ? ariaModal : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : (disabled ? '-1' : null)\">\r\n <ng-container *ngTemplateOutlet=\"checkbox\"></ng-container>\r\n </div>\r\n</li>\r\n\r\n<ng-template #childrenTree>\r\n <div *ngIf=\"sub; else checkbox\" class=\"w-full h-full\"\r\n [ngClass]=\"{'c-tree__item--focus': isFocus && sub, 'c-tree__item--hover': isHover && sub}\"\r\n (focusin)=\"handleItemFocus(true)\"\r\n (focusout)=\"handleItemFocus(false)\"\r\n (mouseover)=\"handleItemHover(true)\"\r\n (mouseout)=\"handleItemHover(false)\"\r\n (keydown.home)=\"handleHome($event)\"\r\n (keydown.end)=\"handleEnd($event)\"\r\n (keydown.arrowup)=\"handleArrowUp($event)\"\r\n (keydown.arrowdown)=\"handleArrowDown($event)\"\r\n (keydown.arrowright)=\"handleArrowRight($event)\"\r\n (keydown.arrowLeft)=\"handleArrowLeft($event)\">\r\n <div [class]=\"['w-full flex items-center relative focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black text-left', classes] | makeHtmlList\"\r\n\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-modal]=\"ariaModal ? ariaModal : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <span class=\"absolute top-3 -left-4 flex items-center w-4 h-2.5 text-primary-base font-bold\">\r\n <svg (click)=\"expandSub(false)\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 10 10\" width=\"10\" height=\"10\" aria-hidden=\"true\" class=\"c-tree__minus\"><path fill=\"currentColor\" d=\"M9.286 5.714H.714a.714.714 0 010-1.428h8.572a.714.714 0 010 1.428z\"/></svg>\r\n <svg (click)=\"expandSub(true)\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 10 10\" width=\"10\" height=\"10\" aria-hidden=\"true\" class=\"c-tree__plus\"><path fill=\"currentColor\" d=\"M9.286 4.286H5.893a.179.179 0 01-.179-.179V.714a.714.714 0 00-1.428 0v3.393a.179.179 0 01-.179.179H.714a.714.714 0 000 1.428h3.393a.179.179 0 01.179.179v3.393a.714.714 0 001.428 0V5.893a.179.179 0 01.179-.179h3.393a.714.714 0 000-1.428z\"/></svg>\r\n </span>\r\n <ng-container *ngTemplateOutlet=\"checkbox\"></ng-container>\r\n </div>\r\n </div>\r\n\r\n <ng-container *desyCustomInnerContent=\"{ component: sub }\"></ng-container>\r\n</ng-template>\r\n\r\n<!-- Se incorpora el contenido m\u00EDnimo para funcionar con el objetivo de mejorar el rendimiento -->\r\n<ng-template #hidden>\r\n <li class=\"hidden\">\r\n <div #hiddenWrapper>\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </div>\r\n <ng-container *desyCustomInnerContent=\"{ component: sub }\"></ng-container>\r\n </li>\r\n</ng-template>\r\n\r\n<ng-template #checkbox>\r\n <desy-tree-checkbox [name]=\"name ? name : parentName\"\r\n [id]=\"getId()\"\r\n [value]=\"value\"\r\n [classes]=\"classes\"\r\n [type]=\"type\"\r\n [(checked)]=\"checked\" (checkedChange)=\"handleCheckboxChange($event)\"\r\n [hasError]=\"inheritedHasError\"\r\n [disabled]=\"disabled\"\r\n [hasDividers]=\"hasDividers\"\r\n [describedBy]=\"[inheritedDescribedBy, hint?.id] | makeHtmlList\"\r\n [isIndeterminate]=\"isIndeterminate\"\r\n [(indeterminateChecked)]=\"indeterminateChecked\"\r\n (indeterminateCheckedChange)=\"handleIndeterminateCheckedChange($event)\"\r\n\r\n [labelComponent]=\"label\"\r\n [hintComponent]=\"hint\"\r\n\r\n [role]=\"role\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [ariaDescribedBy]=\"ariaDescribedBy\"\r\n [ariaLabelledBy]=\"ariaLabelledBy\"\r\n [ariaHidden]=\"ariaHidden\"\r\n [ariaDisabled]=\"ariaDisabled\"\r\n [ariaControls]=\"ariaControls\"\r\n [ariaCurrent]=\"ariaCurrent\"\r\n [ariaLive]=\"ariaLive\"\r\n [ariaExpanded]=\"ariaExpanded\"\r\n [ariaErrorMessage]=\"ariaErrorMessage\"\r\n [ariaHasPopup]=\"ariaHasPopup\"\r\n [ariaModal]=\"ariaModal\"\r\n [tabindex]=\"tabindex\">\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n </desy-tree-checkbox>\r\n</ng-template>\r\n\r\n<ng-template #content>\r\n <div class=\"font-bold\" *ngIf=\"isActive(); else contentLabel\">\r\n <ng-container *ngTemplateOutlet=\"contentLabel\"></ng-container>\r\n </div>\r\n <ng-content select=\"desy-hint\"></ng-content>\r\n</ng-template>\r\n\r\n<ng-template #contentLabel>\r\n <ng-content select=\"desy-label\"></ng-content>\r\n</ng-template>\r\n",
3583
+ providers: [
3584
+ {
3585
+ provide: ITreeItem,
3586
+ useExisting: forwardRef(() => TreeItemComponent)
3587
+ }
3588
+ ]
3589
+ },] }
3590
+ ];
3591
+ TreeItemComponent.ctorParameters = () => [
3592
+ { type: ChangeDetectorRef },
3593
+ { type: ElementRef }
3594
+ ];
3595
+ TreeItemComponent.propDecorators = {
3596
+ hiddenWrapper: [{ type: ViewChild, args: ['hiddenWrapper',] }],
3597
+ id: [{ type: Input }],
3598
+ name: [{ type: Input }],
3599
+ value: [{ type: Input }],
3600
+ classes: [{ type: Input }],
3601
+ active: [{ type: Input }],
3602
+ disabled: [{ type: Input }],
3603
+ title: [{ type: Input }],
3604
+ hasDividers: [{ type: Input }],
3605
+ isIndeterminate: [{ type: Input }],
3606
+ checked: [{ type: Input }],
3607
+ checkedChange: [{ type: Output }],
3608
+ expanded: [{ type: Input }],
3609
+ expandedChange: [{ type: Output }],
3610
+ indeterminateChecked: [{ type: Input }],
3611
+ indeterminateCheckedChange: [{ type: Output }],
3612
+ sub: [{ type: ContentChildren, args: [TreeSubComponent,] }],
3613
+ hint: [{ type: ContentChildren, args: [HintComponent,] }],
3614
+ label: [{ type: ContentChildren, args: [LabelComponent,] }],
3615
+ checkbox: [{ type: ViewChild, args: [TreeCheckboxComponent,] }],
3616
+ treeItemKey: [{ type: HostBinding, args: ['attr.desy-tree-item-key',] }]
3617
+ };
3618
+ __decorate([
3619
+ DesyOnInputChange('setDefaultIdRecursive')
3620
+ ], TreeItemComponent.prototype, "id", void 0);
3621
+ __decorate([
3622
+ DesyContentChild({ onSetCallbackName: 'overrideSubValues' })
3623
+ ], TreeItemComponent.prototype, "sub", void 0);
3624
+ __decorate([
3625
+ DesyContentChild()
3626
+ ], TreeItemComponent.prototype, "hint", void 0);
3627
+ __decorate([
3628
+ DesyContentChild()
3629
+ ], TreeItemComponent.prototype, "label", void 0);
3630
+
3631
+ class TreeComponent extends FormFieldComponent {
3632
+ constructor(changeDetector) {
3633
+ super();
3634
+ this.changeDetector = changeDetector;
3635
+ this.expandedFirstLevel = true;
3636
+ this.decoupleChildFromParent = false;
3637
+ this.disableDefaultSearch = false;
3638
+ this.searchMatchValuesChange = new EventEmitter();
3639
+ this.rootItems = [];
3640
+ this._itemListCheckedSubscriptions = [];
3641
+ this._itemListQuitFocusSubscriptions = [];
3642
+ this._alreadyConfiguringItems = false;
3643
+ }
3644
+ ngOnDestroy() {
3645
+ var _a, _b;
3646
+ this.clearSubscriptions(this._itemListCheckedSubscriptions);
3647
+ this.clearSubscriptions(this._itemListQuitFocusSubscriptions);
3648
+ (_a = this._itemListSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
3649
+ (_b = this._allItemListSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
3650
+ }
3651
+ ngOnChanges(changes) {
3652
+ this.configureAllItems();
3653
+ }
3654
+ /*
3655
+ * Eventos
3656
+ */
3657
+ /**
3658
+ * Actualiza el valor del componente al checkquearse un ítem
3659
+ * @param originItem ítem modificado
3660
+ */
3661
+ updateValueFromItems(originItem) {
3662
+ // Si es radio, se desactivan el resto de items cuando se activa otro item
3663
+ if (this.type !== 'checkbox') {
3664
+ const items = this.getAllItemsInOrder();
3665
+ items.forEach(item => {
3666
+ if (item !== originItem && item.checked) {
3667
+ item.setChecked(false, true);
3668
+ }
3669
+ });
3670
+ }
3671
+ else if (!this.decoupleChildFromParent) {
3672
+ this.rootItems.forEach(item => item.setCheckedAutomaticallyDependingOnChildren());
3673
+ }
3674
+ // Si es checkbox se modifica el valor y se emite
3675
+ if (this.type === 'checkbox') {
3676
+ this.value = [];
3677
+ const items = this.getAllItemsInOrder();
3678
+ items.forEach(item => {
3679
+ if (item.checked) {
3680
+ this.value.push(item.value);
3681
+ }
3682
+ });
3683
+ this.onChange(this.value);
3684
+ }
3685
+ }
3686
+ /**
3687
+ * Gestiona cuando el foco abandona un ítem desde un evento de teclado controlado
3688
+ * @param options
3689
+ */
3690
+ handleItemQuitFocus(options) {
3691
+ if (options && options.nextElement) {
3692
+ const items = this.getAllItemsInOrder();
3693
+ const focusableItems = items.filter(item => !item.isHidden() && !item.disabled && item.allParentsExpanded);
3694
+ switch (options.nextElement) {
3695
+ case "first":
3696
+ focusableItems[0].focus();
3697
+ break;
3698
+ case "last":
3699
+ focusableItems[focusableItems.length - 1].focus();
3700
+ break;
3701
+ case "parent":
3702
+ const currentSubLevel = options.currentItem.subLevel;
3703
+ if (currentSubLevel > 0) {
3704
+ const currentItemIndex = focusableItems.findIndex(item => item === options.currentItem);
3705
+ const parent = focusableItems.slice(0, currentItemIndex).reverse().find(item => item.subLevel < currentSubLevel);
3706
+ if (parent) {
3707
+ parent.focus();
3708
+ }
3709
+ }
3710
+ break;
3711
+ case "firstChild":
3712
+ case "next":
3713
+ if (options.currentItem) {
3714
+ let currentItemIndex = focusableItems.findIndex(item => item === options.currentItem);
3715
+ if (currentItemIndex < focusableItems.length - 1) {
3716
+ focusableItems[currentItemIndex + 1].focus();
3717
+ }
3718
+ }
3719
+ break;
3720
+ case "previous":
3721
+ if (options.currentItem) {
3722
+ const currentItemIndex = focusableItems.findIndex(item => item === options.currentItem);
3723
+ if (currentItemIndex > 0) {
3724
+ focusableItems[currentItemIndex - 1].focus();
3725
+ }
3726
+ }
3727
+ break;
3728
+ }
3729
+ }
3730
+ }
3731
+ /**
3732
+ * Realiza la búsqueda interna de los items en el componente
3733
+ * @param value texto de búsqueda
3734
+ */
3735
+ onSearch(value) {
3736
+ if (!this.disableDefaultSearch) {
3737
+ if (value && value.length > 0) {
3738
+ this.searchMatchValues = this.allItems.filter(item => item.matchesText(value)).map(item => item.value);
3739
+ }
3740
+ else {
3741
+ this.searchMatchValues = null;
3742
+ }
3743
+ this.searchMatchValuesChange.emit(this.searchMatchValues);
3744
+ }
3745
+ }
3746
+ /*
3747
+ * Eventos al cambiar propiedades
3748
+ */
3749
+ /**
3750
+ * Configura los items del árbol
3751
+ */
3752
+ configureAllItems() {
3753
+ if (!this._alreadyConfiguringItems) {
3754
+ this._alreadyConfiguringItems = true;
3755
+ // Lo realizamos desde un setTimeout para que todos los inputs, values y demás vivan en paz y armonía
3756
+ setTimeout(() => {
3757
+ var _a;
3758
+ if (((_a = this.allItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
3759
+ this.clearSubscriptions(this._itemListCheckedSubscriptions);
3760
+ this.clearSubscriptions(this._itemListQuitFocusSubscriptions);
3761
+ this.allItems.forEach(item => {
3762
+ item.parentName = this.name;
3763
+ item.type = this.type;
3764
+ item.inheritedDescribedBy = this.getDescribedByForItems();
3765
+ item.inheritedExpandedFirstLevel = this.expandedFirstLevel;
3766
+ item.inheritedDecoupleChildFromParent = this.decoupleChildFromParent;
3767
+ if (this.value && this.value.length > 0) {
3768
+ item.setChecked(!!this.value.find(v => v === item.value), true);
3769
+ }
3770
+ item.detectChanges();
3771
+ const checkedSubscription = item.checkedChangeForTree.subscribe(() => this.updateValueFromItems(item));
3772
+ this._itemListCheckedSubscriptions.push(checkedSubscription);
3773
+ const quitFocusSubscription = item.quitFocus.subscribe(options => this.handleItemQuitFocus(options));
3774
+ this._itemListQuitFocusSubscriptions.push(quitFocusSubscription);
3775
+ });
3776
+ this.setErrorInItems(this.hasErrorMessageComponent());
3777
+ this.buildTree();
3778
+ if (!this.value) {
3779
+ this.updateValueFromItems();
3780
+ }
3781
+ }
3782
+ if (this.allItems && !this._allItemListSubscription) {
3783
+ this._allItemListSubscription = this.allItems.changes.subscribe(() => this.configureAllItems());
3784
+ }
3785
+ this.changeDetector.detectChanges();
3786
+ this._alreadyConfiguringItems = false;
3787
+ });
3788
+ }
3789
+ }
3790
+ /**
3791
+ * Modifica los items visibles según el filtro de búsqueda
3792
+ */
3793
+ onSearchMatchValuesChange() {
3794
+ if (this.allItems) {
3795
+ this.allItems.forEach(item => {
3796
+ item.inheritedMatchesSearch = true;
3797
+ });
3798
+ if (this.searchMatchValues !== null && this.searchMatchValues !== undefined) {
3799
+ this.allItems.forEach(item => {
3800
+ if (this.searchMatchValues.findIndex(value => item.value === value) < 0) {
3801
+ item.inheritedMatchesSearch = false;
3802
+ }
3803
+ });
3804
+ }
3805
+ }
3806
+ }
3807
+ /*
3808
+ * Getters and setters
3809
+ */
3810
+ getIdPrefix() {
3811
+ return this.idPrefix ? this.idPrefix : this.name;
3812
+ }
3813
+ getDescribedBy() {
3814
+ let describedBy = '';
3815
+ if (this.describedBy) {
3816
+ describedBy = this.describedBy;
3817
+ }
3818
+ if (this.hasHintComponent() && this.hintComponent.id) {
3819
+ describedBy = describedBy + ' ' + this.hintComponent.id;
3820
+ }
3821
+ if (this.hasErrorMessageComponent() && this.errorMessageComponent.id) {
3822
+ describedBy = describedBy + ' ' + this.errorMessageComponent.id;
3823
+ }
3824
+ return describedBy;
3825
+ }
3826
+ /**
3827
+ * Devuelve el valor de describedBy que se transmitirá a los items
3828
+ */
3829
+ getDescribedByForItems() {
3830
+ let describedBy;
3831
+ if (this.hasFieldsetComponent()) {
3832
+ describedBy = this.fieldsetComponent.describedBy;
3833
+ }
3834
+ else {
3835
+ describedBy = this.getDescribedBy();
3836
+ }
3837
+ return describedBy;
3838
+ }
3839
+ hasFieldsetComponent() {
3840
+ return !!this.fieldsetComponent;
3841
+ }
3842
+ /**
3843
+ * Overrides super.getHintId();
3844
+ */
3845
+ getHintId() {
3846
+ var _a;
3847
+ return this.idPrefix ? this.idPrefix + '-hint' : (_a = this.hintComponent) === null || _a === void 0 ? void 0 : _a.id;
3848
+ }
3849
+ /**
3850
+ * Overrides super.getHintId();
3851
+ */
3852
+ getErrorId() {
3853
+ var _a;
3854
+ return this.idPrefix ? this.idPrefix + '-error' : (_a = this.errorMessageComponent) === null || _a === void 0 ? void 0 : _a.id;
3855
+ }
3856
+ /*
3857
+ * Funciones para reemplazar el contenido del fieldset, label, hint o errormessage
3858
+ */
3859
+ overrideFieldsetParams(fieldset) {
3860
+ fieldset.caller = this.innerHtml;
3861
+ fieldset.errorId = this.getErrorId();
3862
+ fieldset.describedBy = this.getDescribedBy();
3863
+ fieldset.detectChanges();
3864
+ }
3865
+ overrideSearchBarParams(searchbar) {
3866
+ const defaultOnChange = searchbar.onChange;
3867
+ const newOnChange = value => {
3868
+ this.onSearch(value);
3869
+ defaultOnChange(value);
3870
+ };
3871
+ searchbar.registerOnChange(newOnChange);
3872
+ }
3873
+ /**
3874
+ * Se llama desde FormField
3875
+ */
3876
+ overrideHintParams(hint) {
3877
+ hint.id = this.getHintId();
3878
+ hint.detectChanges();
3879
+ }
3880
+ /**
3881
+ * Se llama desde FormField
3882
+ */
3883
+ overrideErrorMessageParams(errorMessage) {
3884
+ errorMessage.id = this.getErrorId();
3885
+ this.setErrorInItems(this.hasErrorMessageComponent());
3886
+ errorMessage.detectChanges();
3887
+ }
3888
+ /**
3889
+ * Se llama desde FormField
3890
+ */
3891
+ onDeleteErrorMessage(errorMessage) {
3892
+ this.setErrorInItems(this.hasErrorMessageComponent());
3893
+ }
3894
+ /*
3895
+ * Métodos privados
3896
+ */
3897
+ /**
3898
+ * Configura la estructura del árbol
3899
+ * @private
3900
+ */
3901
+ buildTree() {
3902
+ // Se crea un mapa para tener accesibles los items por key y se borran los listados existentes
3903
+ const itemMap = {};
3904
+ this.rootItems = [];
3905
+ this.allItems.forEach(item => {
3906
+ const key = item.getKey();
3907
+ itemMap[key] = item;
3908
+ if (item.sub) {
3909
+ item.sub.itemList = [];
3910
+ }
3911
+ });
3912
+ // Se añaden los items a los listados correspondientes
3913
+ this.allItems.forEach(item => {
3914
+ const parentKey = item.getParentKey();
3915
+ if (parentKey === 'root') {
3916
+ this.rootItems.push(item);
3917
+ }
3918
+ else if (parentKey) {
3919
+ const sub = itemMap[parentKey].sub;
3920
+ if (sub) {
3921
+ sub.itemList.push(item);
3922
+ }
3923
+ }
3924
+ });
3925
+ // Se configuran los items desde root
3926
+ let order = 0;
3927
+ this.rootItems.forEach((item, index) => {
3928
+ item.setSubLevel(0);
3929
+ item.setDefaultId(`${this.idPrefix}-${index}`);
3930
+ item.refreshAllParentsExpandedRecursive(true);
3931
+ item.setCheckedAutomaticallyDependingOnChildren();
3932
+ order = item.setOrderRecursively(order);
3933
+ });
2927
3934
  }
2928
- getItemDividerTemplate(item) {
2929
- return item.divider instanceof DateInputDividerComponent ? item.divider.dividerContent : null;
3935
+ /**
3936
+ * Si tiene un mensaje de error, se indica a los items
3937
+ * @param hasError
3938
+ * @private
3939
+ */
3940
+ setErrorInItems(hasError) {
3941
+ var _a;
3942
+ if (((_a = this.allItems) === null || _a === void 0 ? void 0 : _a.length) > 0) {
3943
+ this.allItems.forEach(item => {
3944
+ item.inheritedHasError = hasError;
3945
+ item.detectChanges();
3946
+ });
3947
+ }
2930
3948
  }
2931
- getItemDividerHtml(item) {
2932
- return item.divider.html ? item.divider.html : `<p>${StringUtils.escapeHtml(item.divider.text)}</p>`;
3949
+ /**
3950
+ * Limpia un listado de subscripciones
3951
+ * @param subscriptionList
3952
+ * @private
3953
+ */
3954
+ clearSubscriptions(subscriptionList) {
3955
+ if (subscriptionList.length > 0) {
3956
+ subscriptionList.forEach(s => s.unsubscribe());
3957
+ subscriptionList.splice(0, subscriptionList.length);
3958
+ }
2933
3959
  }
2934
- }
2935
- DateInputComponent.defaultItems = [
2936
- {
2937
- name: 'day',
2938
- classes: 'w-14',
2939
- maxlength: 2
2940
- },
2941
- {
2942
- name: 'month',
2943
- classes: 'w-14',
2944
- maxlength: 2
2945
- },
2946
- {
2947
- name: 'year',
2948
- classes: 'w-20',
2949
- maxlength: 4
3960
+ /**
3961
+ * Devuelve los items del árbol ordenados
3962
+ * @private
3963
+ */
3964
+ getAllItemsInOrder() {
3965
+ let list = [];
3966
+ if (this.allItems) {
3967
+ list = this.allItems.toArray().sort((a, b) => a.orderInTree > b.orderInTree ? 1 : -1);
3968
+ }
3969
+ return list;
2950
3970
  }
2951
- ];
2952
- DateInputComponent.decorators = [
3971
+ }
3972
+ TreeComponent.decorators = [
2953
3973
  { type: Component, args: [{
2954
- selector: 'desy-date-input',
2955
- template: "\r\n<ng-template #innerHtml>\r\n <ng-container *ngIf=\"hasHintComponent()\">\r\n <ng-content select=\"desy-hint\"></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasHintComponent()\">\r\n <ng-container *ngTemplateOutlet=\"hintRef\"></ng-container>\r\n <desy-hint *ngIf=\"!hintRef && hintData\"\r\n [id]=\"getHintId()\"\r\n [text]=\"hintData.text\"\r\n [html]=\"hintData.html\"\r\n [classes]=\"hintData.classes\"\r\n [role]=\"hintData.role\"\r\n [ariaLabel]=\"hintData.ariaLabel\"\r\n [ariaDescribedBy]=\"hintData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"hintData.ariaLabelledBy\"\r\n [ariaHidden]=\"hintData.ariaHidden\"\r\n [ariaDisabled]=\"hintData.ariaDisabled\"\r\n [ariaControls]=\"hintData.ariaControls\"\r\n [ariaCurrent]=\"hintData.ariaCurrent\"\r\n [ariaLive]=\"hintData.ariaLive\"\r\n [ariaExpanded]=\"hintData.ariaExpanded\"\r\n [ariaErrorMessage]=\"hintData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"hintData.ariaHasPopup\"\r\n [tabindex]=\"hintData.tabindex\"></desy-hint>\r\n <desy-hint *ngIf=\"!hintRef && !hintData && hintText\" [text]=\"hintText\" [id]=\"getHintId()\"></desy-hint>\r\n </ng-container>\r\n\r\n\r\n <ng-container *ngIf=\"hasErrorMessageComponent()\">\r\n <ng-content select=\"desy-error-message\"></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasErrorMessageComponent()\">\r\n <ng-container *ngTemplateOutlet=\"errorMessageRef\"></ng-container>\r\n <desy-error-message *ngIf=\"!errorMessageRef && errorMessageData\"\r\n [id]=\"getErrorId()\"\r\n [text]=\"errorMessageData.text\"\r\n [html]=\"errorMessageData.html\"\r\n [classes]=\"errorMessageData.classes\"\r\n [visuallyHiddenText]=\"errorMessageData.visuallyHiddenText\"\r\n [role]=\"errorMessageData.role\"\r\n [ariaLabel]=\"errorMessageData.ariaLabel\"\r\n [ariaDescribedBy]=\"errorMessageData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"errorMessageData.ariaLabelledBy\"\r\n [ariaHidden]=\"errorMessageData.ariaHidden\"\r\n [ariaDisabled]=\"errorMessageData.ariaDisabled\"\r\n [ariaControls]=\"errorMessageData.ariaControls\"\r\n [ariaCurrent]=\"errorMessageData.ariaCurrent\"\r\n [ariaLive]=\"errorMessageData.ariaLive\"\r\n [ariaExpanded]=\"errorMessageData.ariaExpanded\"\r\n [ariaErrorMessage]=\"errorMessageData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"errorMessageData.ariaHasPopup\"\r\n [tabindex]=\"errorMessageData.tabindex\"></desy-error-message>\r\n <desy-error-message *ngIf=\"!errorMessageRef && !errorMessageData && errorMessageText\"\r\n [text]=\"errorMessageText\" [id]=\"getErrorId()\"></desy-error-message>\r\n </ng-container>\r\n\r\n <!-- With reactive forms -->\r\n <div *ngIf=\"controlContainer && !ngModelGroup\"\r\n [formGroup]=\"controlContainer.control\"\r\n [class]=\"['flex', classes] | makeHtmlList\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as i\">\r\n <ng-container *ngIf=\"item.divider\">\r\n <div role=\"separator\" [ngClass]=\"item.divider.classes\">\r\n <ng-container *desyCustomInnerContent=\"{ template: getItemDividerTemplate(item), html: getItemDividerHtml(item) }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.divider\">\r\n <div class=\"mr-base\">\r\n <desy-input [labelData]=\"getItemLabel(item)\"\r\n [labelRef]=\"getItemLabelRef(item)\"\r\n [id]=\"item.id ? item.id : id + '-' + item.name\"\r\n [classes]=\"['mb-0', item.classes] | makeHtmlList\"\r\n [errorId]=\"item.hasErrors ? getErrorId() : null\"\r\n [name]=\"getItemName(item)\"\r\n [formControlName]=\"getItemName(item)\"\r\n [type]=\"'text'\"\r\n [inputmode]=\"'numeric'\"\r\n [autocomplete]=\"item.autocomplete\"\r\n [pattern]=\"item.pattern ? item.pattern : '[0-9]*'\"\r\n\r\n [maxlength]=\"item.maxlength\"\r\n [role]=\"item.role\"\r\n [ariaLabel]=\"item.ariaLabel\"\r\n [ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [ariaHidden]=\"item.ariaHidden\"\r\n [ariaDisabled]=\"item.ariaDisabled\"\r\n [ariaControls]=\"item.ariaControls\"\r\n [ariaCurrent]=\"item.ariaCurrent\"\r\n [ariaLive]=\"item.ariaLive\"\r\n [ariaExpanded]=\"item.ariaExpanded\"\r\n [ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [ariaHasPopup]=\"item.ariaHasPopup\"\r\n [tabindex]=\"item.tabindex\"></desy-input>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Template-driven forms -->\r\n <desy-template-driven-wrapper *ngIf=\"controlContainer && ngModelGroup\">\r\n <div [ngModelGroup]=\"ngModelGroup\"\r\n [class]=\"['flex', classes] | makeHtmlList\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as i\">\r\n \r\n <ng-container *ngIf=\"item.divider\">\r\n <div role=\"separator\" [ngClass]=\"item.divider.classes\">\r\n <ng-container *desyCustomInnerContent=\"{ template: getItemDividerTemplate(item), html: getItemDividerHtml(item) }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.divider\">\r\n <div class=\"mr-base\">\r\n <desy-input [labelData]=\"getItemLabel(item)\"\r\n [labelRef]=\"getItemLabelRef(item)\"\r\n [id]=\"item.id ? item.id : id + '-' + item.name\"\r\n [classes]=\"['mb-0', item.classes] | makeHtmlList\"\r\n [errorId]=\"item.hasErrors ? getErrorId() : null\"\r\n [name]=\"getItemName(item)\"\r\n [ngModel]=\"item.value\" (ngModelChange)=\"onInternalChange(item, +$event)\"\r\n [type]=\"'text'\"\r\n [inputmode]=\"'numeric'\"\r\n [autocomplete]=\"item.autocomplete\"\r\n [pattern]=\"item.pattern ? item.pattern : '[0-9]*'\"\r\n [disabled]=\"disabled ? true : null\"\r\n\r\n [maxlength]=\"item.maxlength\"\r\n [role]=\"item.role\"\r\n [ariaLabel]=\"item.ariaLabel\"\r\n [ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [ariaHidden]=\"item.ariaHidden\"\r\n [ariaDisabled]=\"item.ariaDisabled\"\r\n [ariaControls]=\"item.ariaControls\"\r\n [ariaCurrent]=\"item.ariaCurrent\"\r\n [ariaLive]=\"item.ariaLive\"\r\n [ariaExpanded]=\"item.ariaExpanded\"\r\n [ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [ariaHasPopup]=\"item.ariaHasPopup\"\r\n [tabindex]=\"item.tabindex\"></desy-input>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </desy-template-driven-wrapper>\r\n\r\n <!-- With ngModel-->\r\n <div *ngIf=\"!controlContainer\"\r\n [class]=\"['flex', classes] | makeHtmlList\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as i\">\r\n \r\n <ng-container *ngIf=\"item.divider\">\r\n <div role=\"separator\" [ngClass]=\"item.divider.classes\">\r\n <ng-container *desyCustomInnerContent=\"{ template: getItemDividerTemplate(item), html: getItemDividerHtml(item) }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.divider\">\r\n <div class=\"mr-base\">\r\n <desy-input [labelData]=\"getItemLabel(item)\"\r\n [labelRef]=\"getItemLabelRef(item)\"\r\n [id]=\"item.id ? item.id : id + '-' + item.name\"\r\n [classes]=\"['mb-0', item.classes] | makeHtmlList\"\r\n [errorId]=\"item.hasErrors ? getErrorId() : null\"\r\n [name]=\"getItemName(item)\"\r\n [ngModel]=\"item.value\" (ngModelChange)=\"onInternalChange(item, +$event)\"\r\n [type]=\"'text'\"\r\n [inputmode]=\"'numeric'\"\r\n [autocomplete]=\"item.autocomplete\"\r\n [pattern]=\"item.pattern ? item.pattern : '[0-9]*'\"\r\n [disabled]=\"disabled ? true : null\"\r\n\r\n [maxlength]=\"item.maxlength\"\r\n [role]=\"item.role\"\r\n [ariaLabel]=\"item.ariaLabel\"\r\n [ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [ariaHidden]=\"item.ariaHidden\"\r\n [ariaDisabled]=\"item.ariaDisabled\"\r\n [ariaControls]=\"item.ariaControls\"\r\n [ariaCurrent]=\"item.ariaCurrent\"\r\n [ariaLive]=\"item.ariaLive\"\r\n [ariaExpanded]=\"item.ariaExpanded\"\r\n [ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [ariaHasPopup]=\"item.ariaHasPopup\"\r\n [tabindex]=\"item.tabindex\"></desy-input>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n</div>\r\n</ng-template>\r\n\r\n<div [class]=\"['c-form-group', formGroupClasses] | makeHtmlList\"\r\n [ngClass]=\"{'c-form-group--error' : (hasErrorsMessage() || formGroupClasses == 'c-form-group--error')}\">\r\n\r\n <ng-container *ngIf=\"hasFieldsetComponent()\">\r\n <ng-content select=\"desy-fieldset\"></ng-content>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasFieldsetComponent()\">\r\n <desy-fieldset *ngIf=\"fieldsetData\"\r\n [classes]=\"fieldsetData.classes\"\r\n [id]=\"fieldsetData.id\"\r\n [legendData]=\"fieldsetData.legend\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[fieldsetData.describedBy, getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"\r\n [ariaLabel]=\"fieldsetData.ariaLabel\"\r\n [ariaLabelledBy]=\"fieldsetData.ariaLabelledBy\"\r\n [ariaHidden]=\"fieldsetData.ariaHidden\"\r\n [ariaDisabled]=\"fieldsetData.ariaDisabled\"\r\n [ariaControls]=\"fieldsetData.ariaControls\"\r\n [ariaCurrent]=\"fieldsetData.ariaCurrent\"\r\n [ariaLive]=\"fieldsetData.ariaLive\"\r\n [ariaExpanded]=\"fieldsetData.ariaExpanded\"\r\n [ariaHasPopup]=\"fieldsetData.ariaHasPopup\"\r\n [tabindex]=\"fieldsetData.tabindex\"></desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && hasLegendComponent()\"\r\n [legendRef]=\"legendTemplate\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\">\r\n <ng-template #legendTemplate>\r\n <ng-content select=\"desy-legend\"></ng-content>\r\n </ng-template>\r\n </desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && !hasLegendComponent() && legendRef\"\r\n [legendRef]=\"legendRef\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"></desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && !hasLegendComponent() && !legendRef && legendData\"\r\n [legendData]=\"{text: legendData.text, html: legendData.html, classes: legendData.classes, isPageHeading: legendData.isPageHeading}\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"></desy-fieldset>\r\n <desy-fieldset *ngIf=\"!fieldsetData && !hasLegendComponent() && !legendRef && !legendData && legendText\"\r\n [legendText]=\"legendText\"\r\n [caller]=\"innerHtml\"\r\n [errorId]=\"getErrorId()\"\r\n [describedBy]=\"[ getHintId(), getErrorId()] | makeHtmlList:null\"\r\n role=\"group\"></desy-fieldset>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!hasFieldset()\">\r\n <ng-container *ngTemplateOutlet=\"innerHtml\"></ng-container>\r\n </ng-container>\r\n</div>\r\n",
3974
+ selector: 'desy-tree',
3975
+ template: "\r\n<ng-template #innerHtml>\r\n <ng-content select=\"desy-hint\"></ng-content>\r\n <ng-content select=\"desy-error-message\"></ng-content>\r\n <ng-content select=\"desy-search-bar\"></ng-content>\r\n <ul [class]=\"['c-tree', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : 'tree'\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-modal]=\"ariaModal ? ariaModal : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-content></ng-content>\r\n </ul>\r\n</ng-template>\r\n\r\n<!-- tree -->\r\n<div [class]=\"['c-form-group', formGroupClasses] | makeHtmlList\"\r\n [ngClass]=\"{'c-form-group--error': (hasErrorsMessage() || formGroupClasses === 'c-form-group--error') }\">\r\n <ng-container *ngIf=\"hasFieldsetComponent(); else innerHtml\">\r\n <ng-content select=\"desy-fieldset\"></ng-content>\r\n </ng-container>\r\n</div>\r\n",
2956
3976
  providers: [
2957
3977
  {
2958
3978
  provide: NG_VALUE_ACCESSOR,
2959
- useExisting: forwardRef(() => DateInputComponent),
3979
+ useExisting: forwardRef(() => TreeComponent),
2960
3980
  multi: true
2961
3981
  }
2962
3982
  ]
2963
3983
  },] }
2964
3984
  ];
2965
- DateInputComponent.ctorParameters = () => [
2966
- { type: ControlContainer, decorators: [{ type: Optional }] }
3985
+ TreeComponent.ctorParameters = () => [
3986
+ { type: ChangeDetectorRef }
2967
3987
  ];
2968
- DateInputComponent.propDecorators = {
2969
- ngModelGroup: [{ type: Input }],
2970
- items: [{ type: Input }],
2971
- itemsChange: [{ type: Output }],
2972
- namePrefix: [{ type: Input }],
3988
+ TreeComponent.propDecorators = {
3989
+ idPrefix: [{ type: Input }],
2973
3990
  classes: [{ type: Input }],
2974
3991
  formGroupClasses: [{ type: Input }],
2975
- errorMessage: [{ type: Input }],
2976
- id: [{ type: Input }],
3992
+ name: [{ type: Input }],
3993
+ type: [{ type: Input }],
3994
+ describedBy: [{ type: Input }],
3995
+ expandedFirstLevel: [{ type: Input }],
3996
+ decoupleChildFromParent: [{ type: Input }],
3997
+ disableDefaultSearch: [{ type: Input }],
3998
+ searchMatchValues: [{ type: Input }],
3999
+ searchMatchValuesChange: [{ type: Output }],
4000
+ allItems: [{ type: ContentChildren, args: [TreeItemComponent, { descendants: true },] }],
2977
4001
  fieldsetComponent: [{ type: ContentChildren, args: [FieldsetComponent,] }],
2978
- legendComponent: [{ type: ContentChildren, args: [LegendComponent,] }],
2979
- dateInputItemComponents: [{ type: ContentChildren, args: [DateInputItemComponent,] }],
2980
- fieldsetData: [{ type: Input }],
2981
- legendRef: [{ type: Input }],
2982
- legendData: [{ type: Input }],
2983
- legendText: [{ type: Input }],
4002
+ searchBarComponent: [{ type: ContentChildren, args: [SearchBarComponent,] }],
2984
4003
  innerHtml: [{ type: ViewChild, args: ['innerHtml', { static: true },] }]
2985
4004
  };
2986
4005
  __decorate([
2987
- DesyOnInputChange('onExternalChange')
2988
- ], DateInputComponent.prototype, "items", void 0);
4006
+ DesyOnInputChange('onSearchMatchValuesChange')
4007
+ ], TreeComponent.prototype, "searchMatchValues", void 0);
2989
4008
  __decorate([
2990
- DesyOnInputChange('onExternalChange')
2991
- ], DateInputComponent.prototype, "namePrefix", void 0);
4009
+ DesyOnInputChange('configureAllItems')
4010
+ ], TreeComponent.prototype, "allItems", void 0);
2992
4011
  __decorate([
2993
4012
  DesyContentChild({ onSetCallbackName: 'overrideFieldsetParams' })
2994
- ], DateInputComponent.prototype, "fieldsetComponent", void 0);
4013
+ ], TreeComponent.prototype, "fieldsetComponent", void 0);
2995
4014
  __decorate([
2996
- DesyContentChild()
2997
- ], DateInputComponent.prototype, "legendComponent", void 0);
2998
-
2999
- class SearchBarComponent extends FormFieldComponent {
3000
- constructor() {
3001
- super(...arguments);
3002
- this.clickEvent = new EventEmitter();
3003
- this.value = '';
3004
- }
3005
- ngOnChanges(changes) {
3006
- this.checkRequiredParams();
3007
- }
3008
- checkRequiredParams() {
3009
- if (!this.id) {
3010
- throw Error('id is required');
3011
- }
3012
- if (!this.hasLabel()) {
3013
- throw Error('label is required');
3014
- }
3015
- }
3016
- ngAfterViewInit() {
3017
- if (this.button && this.button.length > 1) {
3018
- throw Error('only 1 button in content is allowed');
3019
- }
3020
- }
3021
- onClick(event) {
3022
- if (!this.disabled) {
3023
- this.clickEvent.emit(event);
3024
- }
3025
- }
3026
- hasButton() {
3027
- return this.button && this.button.length > 0;
3028
- }
3029
- }
3030
- SearchBarComponent.decorators = [
3031
- { type: Component, args: [{
3032
- selector: 'desy-search-bar',
3033
- template: "<!-- searchbar -->\r\n<div class=\"relative\" [ngClass]=\"{'flex flex-wrap items-end': hasButton()}\">\r\n <ng-container *ngTemplateOutlet=\"labelRef\"></ng-container>\r\n <desy-label *ngIf=\"!labelRef && labelData\"\r\n [text]=\"labelData.text\"\r\n [html]=\"labelData.html\"\r\n classes=\"sr-only\"\r\n [isPageHeading]=\"labelData.isPageHeading\"\r\n [for]=\"id\"\r\n [role]=\"labelData.role\"\r\n [ariaLabel]=\"labelData.ariaLabel\"\r\n [ariaDescribedBy]=\"labelData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"labelData.ariaLabelledBy\"\r\n [ariaHidden]=\"labelData.ariaHidden\"\r\n [ariaDisabled]=\"labelData.ariaDisabled\"\r\n [ariaControls]=\"labelData.ariaControls\"\r\n [ariaCurrent]=\"labelData.ariaCurrent\"\r\n [ariaLive]=\"labelData.ariaLive\"\r\n [ariaExpanded]=\"labelData.ariaExpanded\"\r\n [ariaErrorMessage]=\"labelData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"labelData.ariaHasPopup\"\r\n [tabindex]=\"labelData.tabindex\"></desy-label>\r\n <desy-label *ngIf=\"!labelRef && !labelData && labelText\" [text]=\"labelText\" classes=\"sr-only\" [for]=\"id\"></desy-label>\r\n <input type=\"search\"\r\n [class]=\"['c-input block mt-sm pr-12 border-black rounded font-semibold placeholder-neutral-dark focus:border-black focus:shadow-outline-focus-input focus:ring-4 focus:ring-warning-base disabled:bg-neutral-light disabled:border-neutral-base', classes] | makeHtmlList\"\r\n [ngClass]=\"{'border-alert-base ring-2 ring-alert-base': hasErrorsMessage(),'w-full': !hasButton()}\"\r\n [value]=\"value\" (input)=\"onInput($event.target.value)\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.name]=\"id ? id : null\"\r\n [attr.aria-describedby]=\"[describedBy, getErrorId()] | makeHtmlList:null\"\r\n [attr.aria-errormessage]=\"hasErrorsMessage() ? getErrorId() : null\"\r\n [attr.aria-invalid]=\"hasErrorsMessage() ? true : null\"\r\n [attr.disabled]=\"disabled ? true : null\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngIf=\"hasButton(); else defaultButton\">\r\n <ng-content select=\"desy-button\"></ng-content>\r\n </ng-container>\r\n <ng-template #defaultButton>\r\n <button type=\"submit\" [attr.disabled]=\"disabled ? 'disabled' : null\" [attr.aria-disabled]=\"disabled ? 'true' : null\"\r\n (click)=\"onClick($event)\"\r\n [class]=\"['absolute top-0 right-0 m-sm p-0.5 text-primary-base hover:text-primary-dark focus:bg-warning-base focus:outline-none focus:shadow-outline-focus', buttonClasses] | makeHtmlList\">\r\n <span class=\"sr-only\">Buscar</span>\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"1.375em\" height=\"1.375em\" aria-hidden=\"true\"><path d=\"M23.498 23.487a1.713 1.713 0 000-2.421l-4.572-4.575a.43.43 0 01-.062-.539 10.283 10.283 0 10-2.911 2.911.43.43 0 01.539.055l4.574 4.574a1.712 1.712 0 002.433-.005zM3.451 10.289a6.85 6.85 0 116.85 6.85 6.85 6.85 0 01-6.85-6.85z\" fill=\"currentColor\"/></svg>\r\n </button>\r\n </ng-template>\r\n <ng-container *ngTemplateOutlet=\"errorMessageRef\"></ng-container>\r\n <desy-error-message *ngIf=\"!errorMessageRef && errorMessageData\"\r\n [id]=\"getErrorId()\"\r\n [text]=\"errorMessageData.text\"\r\n [html]=\"errorMessageData.html\"\r\n [classes]=\"errorMessageData.classes\"\r\n [visuallyHiddenText]=\"errorMessageData.visuallyHiddenText\"\r\n [role]=\"errorMessageData.role\"\r\n [ariaLabel]=\"errorMessageData.ariaLabel\"\r\n [ariaDescribedBy]=\"errorMessageData.ariaDescribedBy\"\r\n [ariaLabelledBy]=\"errorMessageData.ariaLabelledBy\"\r\n [ariaHidden]=\"errorMessageData.ariaHidden\"\r\n [ariaDisabled]=\"errorMessageData.ariaDisabled\"\r\n [ariaControls]=\"errorMessageData.ariaControls\"\r\n [ariaCurrent]=\"errorMessageData.ariaCurrent\"\r\n [ariaLive]=\"errorMessageData.ariaLive\"\r\n [ariaExpanded]=\"errorMessageData.ariaExpanded\"\r\n [ariaErrorMessage]=\"errorMessageData.ariaErrorMessage\"\r\n [ariaHasPopup]=\"errorMessageData.ariaHasPopup\"\r\n [tabindex]=\"errorMessageData.tabindex\"></desy-error-message>\r\n <desy-error-message *ngIf=\"!errorMessageRef && !errorMessageData && errorMessageText\"\r\n [text]=\"errorMessageText\" [id]=\"getErrorId()\"></desy-error-message>\r\n</div>\r\n<!-- /searchbar -->\r\n",
3034
- providers: [
3035
- {
3036
- provide: NG_VALUE_ACCESSOR,
3037
- useExisting: forwardRef(() => SearchBarComponent),
3038
- multi: true
3039
- }
3040
- ]
3041
- },] }
3042
- ];
3043
- SearchBarComponent.propDecorators = {
3044
- button: [{ type: ContentChildren, args: [ButtonComponent,] }],
3045
- describedBy: [{ type: Input }],
3046
- classes: [{ type: Input }],
3047
- buttonClasses: [{ type: Input }],
3048
- placeholder: [{ type: Input }],
3049
- clickEvent: [{ type: Output }]
3050
- };
4015
+ DesyContentChild({ onSetCallbackName: 'overrideSearchBarParams' })
4016
+ ], TreeComponent.prototype, "searchBarComponent", void 0);
3051
4017
 
3052
4018
  class ConditionDirective {
3053
4019
  constructor(templateRef) {
@@ -3083,6 +4049,30 @@ ConditionDirective.propDecorators = {
3083
4049
  items: [{ type: Input }]
3084
4050
  };
3085
4051
 
4052
+ class TreeItemsGeneratorComponent {
4053
+ constructor(viewContainerRef) {
4054
+ this.viewContainerRef = viewContainerRef;
4055
+ }
4056
+ ngOnInit() {
4057
+ this.viewContainerRef.createEmbeddedView(this.content);
4058
+ }
4059
+ }
4060
+ TreeItemsGeneratorComponent.decorators = [
4061
+ { type: Component, args: [{
4062
+ selector: 'desy-tree-items-generator',
4063
+ template: "<ng-template #content>\r\n <ng-container *ngIf=\"items && itemTemplate\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate; context: {item: item}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n",
4064
+ changeDetection: ChangeDetectionStrategy.OnPush
4065
+ },] }
4066
+ ];
4067
+ TreeItemsGeneratorComponent.ctorParameters = () => [
4068
+ { type: ViewContainerRef }
4069
+ ];
4070
+ TreeItemsGeneratorComponent.propDecorators = {
4071
+ content: [{ type: ViewChild, args: ['content', { static: true },] }],
4072
+ items: [{ type: Input }],
4073
+ itemTemplate: [{ type: Input }]
4074
+ };
4075
+
3086
4076
  class ModalButtonPrimaryComponent extends ContentBaseComponent {
3087
4077
  constructor() {
3088
4078
  super(...arguments);
@@ -3598,6 +4588,8 @@ class HeaderOffcanvasComponent {
3598
4588
  if (this.isOpen()) {
3599
4589
  this.dialogService.closeDialog(this.dialog);
3600
4590
  this.dialog = null;
4591
+ const elementToFocus = document.getElementById('header-offcanvas-button');
4592
+ elementToFocus === null || elementToFocus === void 0 ? void 0 : elementToFocus.focus();
3601
4593
  }
3602
4594
  }
3603
4595
  isOpen() {
@@ -3622,14 +4614,15 @@ class HeaderOffcanvasComponent {
3622
4614
  }
3623
4615
  HeaderOffcanvasComponent.dialogOptions = {
3624
4616
  id: 'header-offcanvas-dialog',
3625
- focusOnClose: 'header-offcanvas',
4617
+ focusOnClose: 'header-offcanvas-button',
3626
4618
  ariaModal: 'true',
3627
- ariaLabelledBy: 'header-offcanvas-button-text'
4619
+ ariaLabelledBy: 'header-offcanvas-button-text',
4620
+ role: 'dialog'
3628
4621
  };
3629
4622
  HeaderOffcanvasComponent.decorators = [
3630
4623
  { type: Component, args: [{
3631
4624
  selector: 'desy-header-offcanvas',
3632
- template: "\r\n<ng-template #offcanvasContent>\r\n <div class=\"origin-top-left left-0 fixed inset-0 h-screen\">\r\n <div class=\"h-full overflow-auto relative w-offcanvas h-screen ml-offcanvas-negative bg-white z-10\"\r\n [desyClickOutside]=\"isOpen()\" (clickOutside)=\"close()\">\r\n <div class=\"text-right p-sm\">\r\n <button (click)=\"close()\" id=\"header-offcanvas-button-close\" class=\"c-button c-button--sm c-button--transparent m-sm\"\r\n (desyContentEmpty)=\"handleEmptyContent('Header-offcanvas close button')\">\r\n <ng-container *desyCustomInnerContent=\"{ component: closeButton }\"></ng-container> <svg #desyContentEmptyIgnore xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\" width=\"14\" height=\"14\" class=\"self-center ml-2\"><path fill=\"currentColor\" d=\"M8.591 7.177a.25.25 0 010-.354l4.616-4.616A1 1 0 1011.793.793L7.177 5.409a.25.25 0 01-.354 0L2.207.793A1 1 0 00.793 2.207l4.616 4.616a.25.25 0 010 .354L.793 11.793a1 1 0 001.414 1.414l4.616-4.616a.25.25 0 01.354 0l4.616 4.616a1 1 0 001.414-1.414z\"/></svg>\r\n </button>\r\n </div>\r\n <ng-container *desyCustomInnerContent=\"{ component: content }\"></ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-container *desyCustomInnerContent=\"{ component: button }\"></ng-container>\r\n"
4625
+ template: "\r\n<ng-template #offcanvasContent>\r\n <div class=\"origin-top-left left-0 fixed inset-0 h-screen\">\r\n <div class=\"h-full overflow-auto relative w-offcanvas h-screen ml-offcanvas-negative bg-white z-10\"\r\n [desyClickOutside]=\"isOpen()\" (clickOutside)=\"close()\">\r\n <div class=\"text-right p-sm\">\r\n <button (click)=\"close()\" id=\"header-offcanvas-button-close\" class=\"c-button c-button--sm c-button--transparent m-sm\"\r\n (desyContentEmpty)=\"handleEmptyContent('Header-offcanvas close button')\">\r\n <ng-container *desyCustomInnerContent=\"{ component: closeButton }\"></ng-container> <svg #desyContentEmptyIgnore xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 14 14\" width=\"14\" height=\"14\" class=\"self-center ml-2\" aria-hidden=\"true\"><path fill=\"currentColor\" d=\"M8.591 7.177a.25.25 0 010-.354l4.616-4.616A1 1 0 1011.793.793L7.177 5.409a.25.25 0 01-.354 0L2.207.793A1 1 0 00.793 2.207l4.616 4.616a.25.25 0 010 .354L.793 11.793a1 1 0 001.414 1.414l4.616-4.616a.25.25 0 01.354 0l4.616 4.616a1 1 0 001.414-1.414z\"/></svg>\r\n </button>\r\n </div>\r\n <ng-container *desyCustomInnerContent=\"{ component: content }\"></ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-container *desyCustomInnerContent=\"{ component: button }\"></ng-container>\r\n"
3633
4626
  },] }
3634
4627
  ];
3635
4628
  HeaderOffcanvasComponent.ctorParameters = () => [
@@ -3796,11 +4789,47 @@ class NavComponent extends AccessibilityComponent {
3796
4789
  getIdPrefix() {
3797
4790
  return this.idPrefix ? this.idPrefix : 'nav-item';
3798
4791
  }
4792
+ movePrevious(event, currentIndex) {
4793
+ event.preventDefault();
4794
+ const items = this.getItemList();
4795
+ let nextIndex = currentIndex - 1;
4796
+ while (nextIndex >= 0 && !this.isFocusableItem(items[nextIndex])) {
4797
+ nextIndex--;
4798
+ }
4799
+ if (nextIndex < items.length) {
4800
+ const itemElem = document.getElementById(this.getItemId(items[nextIndex], nextIndex));
4801
+ if (itemElem) {
4802
+ itemElem.focus();
4803
+ }
4804
+ }
4805
+ }
4806
+ moveNext(event, currentIndex) {
4807
+ event.preventDefault();
4808
+ const items = this.getItemList();
4809
+ let nextIndex = currentIndex + 1;
4810
+ while (nextIndex < items.length && !this.isFocusableItem(items[nextIndex])) {
4811
+ nextIndex++;
4812
+ }
4813
+ if (nextIndex < items.length) {
4814
+ const itemElem = document.getElementById(this.getItemId(items[nextIndex], nextIndex));
4815
+ if (itemElem) {
4816
+ itemElem.focus();
4817
+ }
4818
+ }
4819
+ }
4820
+ simulateClick(event, item, index) {
4821
+ event.preventDefault();
4822
+ const element = document.getElementById(this.getItemId(item, index));
4823
+ element === null || element === void 0 ? void 0 : element.click();
4824
+ }
4825
+ isFocusableItem(item) {
4826
+ return !item.active && !item.disabled;
4827
+ }
3799
4828
  }
3800
4829
  NavComponent.decorators = [
3801
4830
  { type: Component, args: [{
3802
4831
  selector: 'desy-nav',
3803
- template: "<ng-template #innerHtml>\r\n <ng-container *ngFor=\"let item of getItemList(); index as i\">\r\n <li>\r\n <span *ngIf=\"item.active\"\r\n [class]=\"['flex items-center px-base py-sm font-semibold', item.classes] | makeHtmlList\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"hasNav ? 'true' : 'page'\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.tabindex]=\"item.tabindex\"\r\n (click)=\"onClick($event, item)\">\r\n <strong>\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n </strong>\r\n </span>\r\n <a *ngIf=\"!item.active && item.href\"\r\n [href]=\"item.href | externalHref\" [target]=\"item.target\"\r\n [class]=\"['flex items-center px-base py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'pointer-events-none': item.disabled}\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : item.tabindex\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n (desyContentEmpty)=\"handleContentEmpty(i)\"\r\n (click)=\"onClick($event, item)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n <svg #desyContentEmptyIgnore *ngIf=\"item.disabled\" viewBox=\"0 0 140 140\" height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\" class=\"inline-block align-middle ml-sm text-neutral-base fill-current\" aria-hidden=\"true\" focusable=\"false\" ><path d=\"M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zM20 70a50 50 0 0174.8-43.4 2.51 2.51 0 011.23 1.84 2.48 2.48 0 01-.71 2.1L30.54 95.32a2.51 2.51 0 01-3.94-.52A49.63 49.63 0 0120 70zm100 0a50 50 0 01-74.8 43.4 2.51 2.51 0 01-1.23-1.84 2.48 2.48 0 01.71-2.1l64.78-64.78a2.51 2.51 0 013.94.52A49.63 49.63 0 01120 70z\"/></svg>\r\n </a>\r\n <a *ngIf=\"!item.active && !item.href\"\r\n [routerLink]=\"item.routerLink\" [fragment]=\"item.fragment\"\r\n [class]=\"['flex items-center px-base py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'pointer-events-none': item.disabled}\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : item.tabindex\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n (click)=\"onClick($event, item)\"\r\n (desyContentEmpty)=\"handleContentEmpty(i)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n <svg #desyContentEmptyIgnore *ngIf=\"item.disabled\" viewBox=\"0 0 140 140\" height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\" class=\"inline-block align-middle ml-sm text-neutral-base fill-current\" aria-hidden=\"true\" focusable=\"false\" ><path d=\"M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zM20 70a50 50 0 0174.8-43.4 2.51 2.51 0 011.23 1.84 2.48 2.48 0 01-.71 2.1L30.54 95.32a2.51 2.51 0 01-3.94-.52A49.63 49.63 0 0120 70zm100 0a50 50 0 01-74.8 43.4 2.51 2.51 0 01-1.23-1.84 2.48 2.48 0 01.71-2.1l64.78-64.78a2.51 2.51 0 013.94.52A49.63 49.63 0 01120 70z\"/></svg>\r\n </a>\r\n </li>\r\n <li *ngIf=\"item.divider\" class=\"my-sm border-b border-neutral-base\" aria-hidden=\"true\">\r\n <div class=\"sr-only\">Separador</div>\r\n </li>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\r\n<ul *ngIf=\"!hasNav; else wrapIntoNav\"\r\n [class]=\"['text-sm', classes] | makeHtmlList\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngTemplateOutlet=\"innerHtml\"></ng-container>\r\n</ul>\r\n<ng-template #wrapIntoNav>\r\n <nav [class]=\"['text-sm', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ul>\r\n <ng-container *ngTemplateOutlet=\"innerHtml\"></ng-container>\r\n </ul>\r\n </nav>\r\n</ng-template>\r\n"
4832
+ template: "<ng-template #innerHtml>\r\n <ng-container *ngFor=\"let item of getItemList(); index as i\">\r\n <li>\r\n <span *ngIf=\"item.active\"\r\n [class]=\"['flex items-center px-base py-sm font-semibold', item.classes] | makeHtmlList\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"hasNav ? 'true' : 'page'\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.tabindex]=\"item.tabindex\"\r\n (click)=\"onClick($event, item)\">\r\n <strong>\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n </strong>\r\n </span>\r\n <a *ngIf=\"!item.active && item.href\"\r\n [href]=\"item.href | externalHref\" [target]=\"item.target\"\r\n [class]=\"['flex items-center px-base py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'pointer-events-none': item.disabled}\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : item.tabindex\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n (desyContentEmpty)=\"handleContentEmpty(i)\"\r\n (keydown.arrowUp)=\"movePrevious($event, i)\"\r\n (keydown.arrowDown)=\"moveNext($event, i)\"\r\n (click)=\"onClick($event, item)\"\r\n (keydown.space)=\"simulateClick($event, item, i)\"\r\n (keydown.enter)=\"simulateClick($event, item, i)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n <svg #desyContentEmptyIgnore *ngIf=\"item.disabled\" viewBox=\"0 0 140 140\" height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\" class=\"inline-block align-middle ml-sm text-neutral-base fill-current\" aria-hidden=\"true\" focusable=\"false\" ><path d=\"M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zM20 70a50 50 0 0174.8-43.4 2.51 2.51 0 011.23 1.84 2.48 2.48 0 01-.71 2.1L30.54 95.32a2.51 2.51 0 01-3.94-.52A49.63 49.63 0 0120 70zm100 0a50 50 0 01-74.8 43.4 2.51 2.51 0 01-1.23-1.84 2.48 2.48 0 01.71-2.1l64.78-64.78a2.51 2.51 0 013.94.52A49.63 49.63 0 01120 70z\"/></svg>\r\n </a>\r\n <a *ngIf=\"!item.active && !item.href\"\r\n [routerLink]=\"item.routerLink\" [fragment]=\"item.fragment\"\r\n [class]=\"['flex items-center px-base py-sm hover:bg-primary-base hover:text-white focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'pointer-events-none': item.disabled}\"\r\n [attr.aria-disabled]=\"item.disabled ? 'true' : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : item.tabindex\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n (keydown.arrowUp)=\"movePrevious($event, i)\"\r\n (keydown.arrowDown)=\"moveNext($event, i)\"\r\n (click)=\"onClick($event, item)\"\r\n (keydown.space)=\"simulateClick($event, item, i)\"\r\n (keydown.enter)=\"simulateClick($event, item, i)\"\r\n (desyContentEmpty)=\"handleContentEmpty(i)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n <svg #desyContentEmptyIgnore *ngIf=\"item.disabled\" viewBox=\"0 0 140 140\" height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\" class=\"inline-block align-middle ml-sm text-neutral-base fill-current\" aria-hidden=\"true\" focusable=\"false\" ><path d=\"M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zM20 70a50 50 0 0174.8-43.4 2.51 2.51 0 011.23 1.84 2.48 2.48 0 01-.71 2.1L30.54 95.32a2.51 2.51 0 01-3.94-.52A49.63 49.63 0 0120 70zm100 0a50 50 0 01-74.8 43.4 2.51 2.51 0 01-1.23-1.84 2.48 2.48 0 01.71-2.1l64.78-64.78a2.51 2.51 0 013.94.52A49.63 49.63 0 01120 70z\"/></svg>\r\n </a>\r\n </li>\r\n <li *ngIf=\"item.divider\" class=\"my-sm border-b border-neutral-base\" aria-hidden=\"true\">\r\n <div class=\"sr-only\">Separador</div>\r\n </li>\r\n </ng-container>\r\n</ng-template>\r\n\r\n\r\n<ul *ngIf=\"!hasNav; else wrapIntoNav\"\r\n [class]=\"['text-sm', classes] | makeHtmlList\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngTemplateOutlet=\"innerHtml\"></ng-container>\r\n</ul>\r\n<ng-template #wrapIntoNav>\r\n <nav [class]=\"['text-sm', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ul>\r\n <ng-container *ngTemplateOutlet=\"innerHtml\"></ng-container>\r\n </ul>\r\n </nav>\r\n</ng-template>\r\n"
3804
4833
  },] }
3805
4834
  ];
3806
4835
  NavComponent.propDecorators = {
@@ -3830,7 +4859,7 @@ class HeaderSubnavComponent extends AccessibilityComponent {
3830
4859
  HeaderSubnavComponent.decorators = [
3831
4860
  { type: Component, args: [{
3832
4861
  selector: 'desy-header-subnav',
3833
- template: "<ng-template #templateNav>\r\n <ng-content select=\"desy-nav\"></ng-content>\r\n</ng-template>\r\n\r\n<ng-template #templateContent>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n<div class=\"hidden lg:flex items-center\" *ngIf=\"hasSubnavItems(); else noItems\">\r\n <div class=\"ml-3 py-2 relative border-r border-l border-neutral-base\">\r\n <h2 id=\"subnav-title\" class=\"\">\r\n <desy-dropdown [hiddenText]=\"hiddenText\"\r\n [classesContainer]=\"classesContainer\"\r\n [classesTooltip]=\"classesTooltip\"\r\n [classes]=\"classes ? classes : 'c-dropdown--header'\"\r\n [caller]=\"caller\"\r\n\r\n [role]=\"role\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [ariaDescribedBy]=\"ariaDescribedBy\"\r\n [ariaLabelledBy]=\"ariaLabelledBy\"\r\n [ariaHidden]=\"ariaHidden\"\r\n [ariaDisabled]=\"ariaDisabled\"\r\n [ariaControls]=\"ariaControls\"\r\n [ariaCurrent]=\"ariaCurrent\"\r\n [ariaLive]=\"ariaLive\"\r\n [ariaExpanded]=\"ariaExpanded\"\r\n [ariaErrorMessage]=\"ariaErrorMessage\"\r\n [ariaHasPopup]=\"ariaHasPopup\"\r\n [tabindex]=\"tabindex\">\r\n <ng-container *ngTemplateOutlet=\"templateContent\"></ng-container>\r\n </desy-dropdown>\r\n <ng-template #caller>\r\n <ng-container *ngTemplateOutlet=\"templateNav\"></ng-container>\r\n </ng-template>\r\n </h2>\r\n </div>\r\n</div>\r\n<ng-template #noItems>\r\n <p class=\"hidden lg:inline-block align-middle ml-4 px-3 py-4 border-r border-l border-neutral-base text-sm text-white\"\r\n (desyContentEmpty)=\"handleEmptyContent('Header-subnav')\">\r\n <span #desyContentEmptyIgnore class=\"sr-only\">Aplicaci\u00F3n actual: </span>\r\n <ng-container *ngTemplateOutlet=\"templateContent\"></ng-container>\r\n </p>\r\n</ng-template>\r\n\r\n\r\n"
4862
+ template: "<ng-template #templateNav>\r\n <ng-content select=\"desy-nav\"></ng-content>\r\n</ng-template>\r\n\r\n<ng-template #templateContent>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n<div class=\"hidden lg:flex items-center\" *ngIf=\"hasSubnavItems(); else noItems\">\r\n <div class=\"ml-3 py-2 relative border-r border-l border-neutral-base\">\r\n <p class=\"sr-only\">Aplicaci\u00F3n actual: </p>\r\n <desy-dropdown [hiddenText]=\"hiddenText\"\r\n [classesContainer]=\"classesContainer\"\r\n [classesTooltip]=\"classesTooltip\"\r\n [classes]=\"classes ? classes : 'c-dropdown--header'\"\r\n [caller]=\"caller\"\r\n\r\n [role]=\"role\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [ariaDescribedBy]=\"ariaDescribedBy\"\r\n [ariaLabelledBy]=\"ariaLabelledBy\"\r\n [ariaHidden]=\"ariaHidden\"\r\n [ariaDisabled]=\"ariaDisabled\"\r\n [ariaControls]=\"ariaControls\"\r\n [ariaCurrent]=\"ariaCurrent\"\r\n [ariaLive]=\"ariaLive\"\r\n [ariaExpanded]=\"ariaExpanded\"\r\n [ariaErrorMessage]=\"ariaErrorMessage\"\r\n [ariaHasPopup]=\"ariaHasPopup\"\r\n [tabindex]=\"tabindex\">\r\n <ng-container *ngTemplateOutlet=\"templateContent\"></ng-container>\r\n <ng-template #caller>\r\n <ng-container *ngTemplateOutlet=\"templateNav\"></ng-container>\r\n </ng-template>\r\n </desy-dropdown>\r\n </div>\r\n</div>\r\n<ng-template #noItems>\r\n <p class=\"hidden lg:inline-block align-middle ml-4 px-3 py-4 border-r border-l border-neutral-base text-sm text-white\"\r\n (desyContentEmpty)=\"handleEmptyContent('Header-subnav')\">\r\n <span #desyContentEmptyIgnore class=\"sr-only\">Aplicaci\u00F3n actual: </span>\r\n <ng-container *ngTemplateOutlet=\"templateContent\"></ng-container>\r\n </p>\r\n</ng-template>\r\n\r\n\r\n"
3834
4863
  },] }
3835
4864
  ];
3836
4865
  HeaderSubnavComponent.propDecorators = {
@@ -3859,7 +4888,7 @@ class HeaderDropdownComponent extends AccessibilityComponent {
3859
4888
  HeaderDropdownComponent.decorators = [
3860
4889
  { type: Component, args: [{
3861
4890
  selector: 'desy-header-dropdown',
3862
- template: "<div class=\"ml-4 flex items-center lg:ml-6\">\r\n <div class=\"ml-3 relative\">\r\n <desy-dropdown [hiddenText]=\"hiddenText\"\r\n [classesContainer]=\"classesContainer ? classesContainer : 'hidden lg:block'\"\r\n [classesTooltip]=\"classesTooltip\"\r\n [classes]=\"classes ? classes : 'c-dropdown--header'\"\r\n [caller]=\"caller\"\r\n\r\n [role]=\"role\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [ariaDescribedBy]=\"ariaDescribedBy\"\r\n [ariaLabelledBy]=\"ariaLabelledBy\"\r\n [ariaHidden]=\"ariaHidden\"\r\n [ariaDisabled]=\"ariaDisabled\"\r\n [ariaControls]=\"ariaControls\"\r\n [ariaCurrent]=\"ariaCurrent\"\r\n [ariaLive]=\"ariaLive\"\r\n [ariaExpanded]=\"ariaExpanded\"\r\n [ariaErrorMessage]=\"ariaErrorMessage\"\r\n [ariaHasPopup]=\"ariaHasPopup\"\r\n [tabindex]=\"tabindex\">\r\n <ng-content></ng-content>\r\n </desy-dropdown>\r\n <ng-template #caller>\r\n <ng-content select=\"desy-nav\"></ng-content>\r\n </ng-template>\r\n </div>\r\n</div>\r\n"
4891
+ template: "<div class=\"ml-4 flex items-center lg:ml-6\">\r\n <div class=\"ml-3 relative\">\r\n <desy-dropdown [hiddenText]=\"hiddenText\"\r\n [classesContainer]=\"classesContainer ? classesContainer : 'hidden lg:block'\"\r\n [classesTooltip]=\"classesTooltip\"\r\n [classes]=\"classes ? classes : 'c-dropdown--header'\"\r\n [caller]=\"caller\"\r\n\r\n [role]=\"role\"\r\n [ariaLabel]=\"ariaLabel\"\r\n [ariaDescribedBy]=\"ariaDescribedBy\"\r\n [ariaLabelledBy]=\"ariaLabelledBy\"\r\n [ariaHidden]=\"ariaHidden\"\r\n [ariaDisabled]=\"ariaDisabled\"\r\n [ariaControls]=\"ariaControls\"\r\n [ariaCurrent]=\"ariaCurrent\"\r\n [ariaLive]=\"ariaLive\"\r\n [ariaExpanded]=\"ariaExpanded\"\r\n [ariaErrorMessage]=\"ariaErrorMessage\"\r\n [ariaHasPopup]=\"ariaHasPopup\"\r\n [tabindex]=\"tabindex\">\r\n <ng-content></ng-content>\r\n </desy-dropdown>\r\n <ng-template #caller>\r\n <ng-container *desyCustomInnerContent=\"{ component: contentComponent, template: templateNav }\"></ng-container>\r\n </ng-template>\r\n </div>\r\n</div>\r\n\r\n<ng-template #templateNav>\r\n <ng-content select=\"desy-nav\"></ng-content>\r\n</ng-template>\r\n"
3863
4892
  },] }
3864
4893
  ];
3865
4894
  HeaderDropdownComponent.propDecorators = {
@@ -3867,11 +4896,15 @@ HeaderDropdownComponent.propDecorators = {
3867
4896
  classesContainer: [{ type: Input }],
3868
4897
  classesTooltip: [{ type: Input }],
3869
4898
  classes: [{ type: Input }],
3870
- nav: [{ type: ContentChildren, args: [NavComponent,] }]
4899
+ nav: [{ type: ContentChildren, args: [NavComponent,] }],
4900
+ contentComponent: [{ type: ContentChildren, args: [ContentComponent,] }]
3871
4901
  };
3872
4902
  __decorate([
3873
4903
  DesyContentChild({ onSetCallbackName: 'overrideNavParams' })
3874
- ], HeaderDropdownComponent.prototype, "nav", void 0);
4904
+ ], HeaderDropdownComponent.prototype, "nav", void 0);
4905
+ __decorate([
4906
+ DesyContentChild()
4907
+ ], HeaderDropdownComponent.prototype, "contentComponent", void 0);
3875
4908
 
3876
4909
  class SkipLinkComponent extends AccessibilityComponent {
3877
4910
  constructor(changeDetectorRef) {
@@ -4304,7 +5337,7 @@ class MenuVerticalComponent extends AccessibilityComponent {
4304
5337
  else {
4305
5338
  const idPrefix = this.idPrefix ? this.idPrefix : 'nav-item';
4306
5339
  if (i === 0) {
4307
- return idPrefix;
5340
+ return idPrefix + '-0';
4308
5341
  }
4309
5342
  else {
4310
5343
  return idPrefix + '-' + i;
@@ -4345,7 +5378,7 @@ class MenuVerticalComponent extends AccessibilityComponent {
4345
5378
  MenuVerticalComponent.decorators = [
4346
5379
  { type: Component, args: [{
4347
5380
  selector: 'desy-menu-vertical',
4348
- template: "<!--\r\n Template para ser utilizado tanto por los items como por los subitems:\r\n - item: Item que representa\r\n - index: indice del item en la lista\r\n - id: identificador del item\r\n - isRoot: si pertenece al nivel raiz\r\n-->\r\n<ng-template #itemTemplate let-item=\"item\" let-index=\"index\" let-id=\"id\" let-sub=\"sub\" let-isRoot=\"isRoot\">\r\n <ng-container *ngIf=\"item\">\r\n <li class=\"m-base\" [ngClass]=\"{'origin-top-left text-sm': !isRoot}\">\r\n <ng-container *ngIf=\"item.href || item.routerLink; else notHref\">\r\n <a *ngIf=\"item.href; else hasRouterLink\" [attr.id]=\"id\"\r\n (desyContentEmpty)=\"handleItemContentEmpty(index, isRoot)\"\r\n [href]=\"item.href | externalHref\"\r\n [class]=\"['block px-xs focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{\r\n 'underline': hasUnderline,\r\n 'hover:text-primary-base hover:underline': !item.disabled,\r\n 'no-underline pointer-events-none': item.disabled,\r\n 'font-bold': item.active\r\n }\"\r\n [attr.title]=\"item.title\"\r\n [attr.tabindex]=\"item.disabled ? -1 : null\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-current]=\"item.active ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"item.ariaHidden\"\r\n [attr.aria-controls]=\"item.ariaControls\"\r\n [attr.aria-live]=\"item.ariaLive\"\r\n [attr.aria-expanded]=\"item.ariaExpanded\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup\"\r\n [attr.disabled]=\"item.disabled\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: getItemHtml(item), text: item.text }\"></ng-container>\r\n </a>\r\n <ng-template #hasRouterLink>\r\n <!-- Todos los enlaces que admiten o href o routerLink estar\u00EDa bien unificarlos (en todos los componentes).\r\n Para ello, ser\u00EDa necesario crear una directiva para a\u00F1adir o quitar la directiva routerLink si no tiene href.\r\n Sin embargo, esto no es posible actualmente, ya que Angular todav\u00EDa no permite a\u00F1adir directivas din\u00E1micamente:\r\n https://angular.io/guide/roadmap#support-adding-directives-to-host-elements -->\r\n <a [attr.id]=\"id\"\r\n (desyContentEmpty)=\"handleItemContentEmpty(index, isRoot)\"\r\n [routerLink]=\"item.routerLink\" [fragment]=\"item.fragment ? item.fragment : null\" [routerLinkActive]=\"item.routerLinkActiveClasses\"\r\n [class]=\"['block px-xs focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{\r\n 'underline': hasUnderline,\r\n 'hover:text-primary-base hover:underline': !item.disabled,\r\n 'no-underline pointer-events-none': item.disabled,\r\n 'font-bold': item.active\r\n }\"\r\n [attr.title]=\"item.title\"\r\n [attr.tabindex]=\"item.disabled ? -1 : null\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-current]=\"item.active ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"item.ariaHidden\"\r\n [attr.aria-controls]=\"item.ariaControls\"\r\n [attr.aria-live]=\"item.ariaLive\"\r\n [attr.aria-expanded]=\"item.ariaExpanded\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup\"\r\n [attr.disabled]=\"item.disabled\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: getItemHtml(item), text: item.text }\"></ng-container>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #notHref>\r\n <span [attr.id]=\"id\"\r\n (desyContentEmpty)=\"handleItemContentEmpty(index, isRoot)\"\r\n [class]=\"['block px-xs', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'font-bold': item.active}\"\r\n\r\n [attr.title]=\"item.title\"\r\n [attr.tabindex]=\"item.disabled ? -1 : null\"\r\n [attr.aria-current]=\"item.active ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"item.ariaHidden\"\r\n [attr.aria-controls]=\"item.ariaControls\"\r\n [attr.aria-live]=\"item.ariaLive\"\r\n [attr.aria-expanded]=\"item.ariaExpanded\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup\"\r\n [attr.disabled]=\"item.disabled\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: getItemHtml(item), text: item.text }\"></ng-container>\r\n </span>\r\n </ng-template>\r\n <ng-container *ngIf=\"isRoot && sub\">\r\n <ul *ngIf=\"getSubItems(sub)\" [ngClass]=\"sub.classes\"\r\n [attr.aria-describedby]=\"sub.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"sub.ariaErrorMessage\"\r\n [attr.aria-label]=\"sub.ariaLabel\"\r\n [attr.aria-labelledby]=\"sub.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"sub.ariaHidden\"\r\n [attr.aria-disabled]=\"sub.ariaDisabled\"\r\n [attr.aria-controls]=\"sub.ariaControls\"\r\n [attr.aria-current]=\"sub.ariaCurrent\"\r\n [attr.aria-live]=\"sub.ariaLive\"\r\n [attr.aria-expanded]=\"sub.ariaExpanded\"\r\n [attr.aria-haspopup]=\"sub.ariaHasPopup\"\r\n [attr.tabindex]=\"sub.tabindex\">\r\n <ng-container *ngFor=\"let subItem of getSubItems(sub); index as subIndex\">\r\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n item: subItem,\r\n id: getSubItemId(item, index, subIndex),\r\n index: subIndex,\r\n isRoot: false\r\n }\">\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n <div *ngIf=\"!getSubItems(sub)\"\r\n [class]=\"['mb-base px-xs origin-top-left text-sm text-neutral-dark', sub.classes] | makeHtmlList\"\r\n [id]=\"'sub-' + id\">\r\n <ng-container *desyCustomInnerContent=\"{ component: sub, html: sub.html }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n </li>\r\n <li *ngIf=\"item.divider\" class=\"my-sm border-b border-neutral-base\" aria-hidden=\"true\">\r\n <div class=\"sr-only\">Separador</div>\r\n </li>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<nav [ngClass]=\"classes\"\r\n [attr.role]=\"(role ? role : null)\"\r\n [attr.aria-describedby]=\"ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy\"\r\n [attr.aria-hidden]=\"ariaHidden\"\r\n [attr.aria-disabled]=\"ariaDisabled\"\r\n [attr.aria-controls]=\"ariaControls\"\r\n [attr.aria-current]=\"ariaCurrent\"\r\n [attr.aria-live]=\"ariaLive\"\r\n [attr.aria-expanded]=\"ariaExpanded\"\r\n [attr.aria-haspopup]=\"ariaHasPopup\"\r\n [attr.tabindex]=\"tabindex\">\r\n <ul class=\"text-base\">\r\n <ng-container *ngFor=\"let item of getItems(); index as index\">\r\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ item: item, id: getId(item, index), index: index, sub: getItemSub(item), isRoot: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n</nav>\r\n",
5381
+ template: "<!--\r\n Template para ser utilizado tanto por los items como por los subitems:\r\n - item: Item que representa\r\n - index: indice del item en la lista\r\n - id: identificador del item\r\n - isRoot: si pertenece al nivel raiz\r\n-->\r\n<ng-template #itemTemplate let-item=\"item\" let-index=\"index\" let-id=\"id\" let-sub=\"sub\" let-isRoot=\"isRoot\">\r\n <ng-container *ngIf=\"item\">\r\n <li class=\"m-base\" [ngClass]=\"{'origin-top-left text-sm': !isRoot}\">\r\n <ng-container *ngIf=\"item.href || item.routerLink; else notHref\">\r\n <a *ngIf=\"item.href; else hasRouterLink\" [attr.id]=\"id\"\r\n (desyContentEmpty)=\"handleItemContentEmpty(index, isRoot)\"\r\n [href]=\"item.href | externalHref\"\r\n [class]=\"['block px-xs focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{\r\n 'underline': hasUnderline,\r\n 'hover:text-primary-base hover:underline': !item.disabled,\r\n 'no-underline pointer-events-none': item.disabled,\r\n 'font-bold': item.active\r\n }\"\r\n [attr.title]=\"item.title\"\r\n [attr.tabindex]=\"item.disabled ? -1 : null\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-current]=\"item.active ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"item.ariaHidden\"\r\n [attr.aria-controls]=\"item.ariaControls\"\r\n [attr.aria-live]=\"item.ariaLive\"\r\n [attr.aria-expanded]=\"item.ariaExpanded\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup\"\r\n [attr.disabled]=\"item.disabled\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: getItemHtml(item), text: item.text }\"></ng-container>\r\n </a>\r\n <ng-template #hasRouterLink>\r\n <!-- Todos los enlaces que admiten o href o routerLink estar\u00EDa bien unificarlos (en todos los componentes).\r\n Para ello, ser\u00EDa necesario crear una directiva para a\u00F1adir o quitar la directiva routerLink si no tiene href.\r\n Sin embargo, esto no es posible actualmente, ya que Angular todav\u00EDa no permite a\u00F1adir directivas din\u00E1micamente:\r\n https://angular.io/guide/roadmap#support-adding-directives-to-host-elements -->\r\n <a [attr.id]=\"id\"\r\n (desyContentEmpty)=\"handleItemContentEmpty(index, isRoot)\"\r\n [routerLink]=\"item.routerLink\" [fragment]=\"item.fragment ? item.fragment : null\"\r\n [routerLinkActive]=\"item.routerLinkActiveClasses ? item.routerLinkActiveClasses : []\"\r\n [class]=\"['block px-xs focus:bg-warning-base focus:outline-none focus:shadow-outline-focus focus:text-black', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{\r\n 'underline': hasUnderline,\r\n 'hover:text-primary-base hover:underline': !item.disabled,\r\n 'no-underline pointer-events-none': item.disabled,\r\n 'font-bold': item.active\r\n }\"\r\n [attr.title]=\"item.title\"\r\n [attr.tabindex]=\"item.disabled ? -1 : null\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-current]=\"item.active ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"item.ariaHidden\"\r\n [attr.aria-controls]=\"item.ariaControls\"\r\n [attr.aria-live]=\"item.ariaLive\"\r\n [attr.aria-expanded]=\"item.ariaExpanded\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup\"\r\n [attr.disabled]=\"item.disabled\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: getItemHtml(item), text: item.text }\"></ng-container>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #notHref>\r\n <span [attr.id]=\"id\"\r\n (desyContentEmpty)=\"handleItemContentEmpty(index, isRoot)\"\r\n [class]=\"['block px-xs', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'font-bold': item.active}\"\r\n\r\n [attr.title]=\"item.title\"\r\n [attr.tabindex]=\"item.disabled ? -1 : null\"\r\n [attr.aria-current]=\"item.active ? 'page' : null\"\r\n [attr.aria-disabled]=\"item.disabled\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"item.ariaHidden\"\r\n [attr.aria-controls]=\"item.ariaControls\"\r\n [attr.aria-live]=\"item.ariaLive\"\r\n [attr.aria-expanded]=\"item.ariaExpanded\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup\"\r\n [attr.disabled]=\"item.disabled\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: getItemHtml(item), text: item.text }\"></ng-container>\r\n </span>\r\n </ng-template>\r\n <ng-container *ngIf=\"isRoot && sub\">\r\n <ul *ngIf=\"getSubItems(sub)\" [ngClass]=\"sub.classes\"\r\n [attr.aria-describedby]=\"sub.ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"sub.ariaErrorMessage\"\r\n [attr.aria-label]=\"sub.ariaLabel\"\r\n [attr.aria-labelledby]=\"sub.ariaLabelledBy\"\r\n [attr.aria-hidden]=\"sub.ariaHidden\"\r\n [attr.aria-disabled]=\"sub.ariaDisabled\"\r\n [attr.aria-controls]=\"sub.ariaControls\"\r\n [attr.aria-current]=\"sub.ariaCurrent\"\r\n [attr.aria-live]=\"sub.ariaLive\"\r\n [attr.aria-expanded]=\"sub.ariaExpanded\"\r\n [attr.aria-haspopup]=\"sub.ariaHasPopup\"\r\n [attr.tabindex]=\"sub.tabindex\">\r\n <ng-container *ngFor=\"let subItem of getSubItems(sub); index as subIndex\">\r\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{\r\n item: subItem,\r\n id: getSubItemId(item, index, subIndex),\r\n index: subIndex,\r\n isRoot: false\r\n }\">\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n <div *ngIf=\"!getSubItems(sub)\"\r\n [class]=\"['mb-base px-xs origin-top-left text-sm text-neutral-dark', sub.classes] | makeHtmlList\"\r\n [id]=\"'sub-' + id\">\r\n <ng-container *desyCustomInnerContent=\"{ component: sub, html: sub.html }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n </li>\r\n <li *ngIf=\"item.divider\" class=\"my-sm border-b border-neutral-base\" aria-hidden=\"true\">\r\n <div class=\"sr-only\">Separador</div>\r\n </li>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<nav [ngClass]=\"classes\"\r\n [attr.role]=\"(role ? role : null)\"\r\n [attr.aria-describedby]=\"ariaDescribedBy\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy\"\r\n [attr.aria-hidden]=\"ariaHidden\"\r\n [attr.aria-disabled]=\"ariaDisabled\"\r\n [attr.aria-controls]=\"ariaControls\"\r\n [attr.aria-current]=\"ariaCurrent\"\r\n [attr.aria-live]=\"ariaLive\"\r\n [attr.aria-expanded]=\"ariaExpanded\"\r\n [attr.aria-haspopup]=\"ariaHasPopup\"\r\n [attr.tabindex]=\"tabindex\">\r\n <ul class=\"text-base\">\r\n <ng-container *ngFor=\"let item of getItems(); index as index\">\r\n <ng-container [ngTemplateOutlet]=\"itemTemplate\"\r\n [ngTemplateOutletContext]=\"{ item: item, id: getId(item, index), index: index, sub: getItemSub(item), isRoot: true }\">\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n</nav>\r\n",
4349
5382
  animations: [
4350
5383
  trigger('displayMenuVertical', [
4351
5384
  state('void', style({
@@ -5120,7 +6153,7 @@ class MenubarComponent extends AccessibilityComponent {
5120
6153
  MenubarComponent.decorators = [
5121
6154
  { type: Component, args: [{
5122
6155
  selector: 'desy-menubar',
5123
- template: "<div [attr.id]=\"id\" [class]=\"['c-menubar', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-modal]=\"ariaModal ? ariaModal : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngIf=\"getLabelRef()\">\r\n <div [id]=\"id + '-label'\" [class]=\"['mb-sm', labelComponent ? labelComponent.classes : (labelData ? labelData.classes : null)] | makeHtmlList\">\r\n <ng-container *ngTemplateOutlet=\"getLabelRef()\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!getLabelRef() && (labelData || labelText)\">\r\n <div [id]=\"id + '-label'\" [class]=\"['mb-sm', labelData ? labelData.classes : null] | makeHtmlList\">\r\n <ng-container *desyCustomInnerContent=\"{ html: getLabelContent() }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ul #menubar [id]=\"id + '-menubar'\" class=\"lg:flex lg:flex-wrap\" role=\"menubar\"\r\n (focusin)=\"handleMenuFocusIn()\"\r\n (focusout)=\"handleMenuFocusOut($event)\"\r\n [ngClass]=\"{ 'focus': isFocused }\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"getLabelRef() || labelData || labelText ? id + '-label' : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as itemIndex\">\r\n <li class=\"relative\" role=\"none\" desyMenubaritem (contentChanged)=\"checkChanges()\">\r\n <a *ngIf=\"item.sub\" #link\r\n role=\"menuitem\" aria-haspopup=\"true\" aria-expanded=\"false\"\r\n (click)=\"handleMenuItemClick($event, itemIndex)\"\r\n (keydown)=\"handleMenuItemKeydown($event, itemIndex)\"\r\n (mouseover)=\"handleMenuItemMouseOver(itemIndex)\"\r\n (desyAttributeChange)=\"checkChanges()\" [attributesToCheck]=\"'disabled'\"\r\n [id]=\"getItemId(item, itemIndex)\"\r\n [class]=\"['c-menubar__button', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'c-menubar__button--disabled': item.disabled, 'c-menubar__button--primary': item.active}\"\r\n [attr.disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : (item.ariaDisabled ? item.ariaDisabled : null)\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-modal]=\"item.ariaModal ? item.ariaModal : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : (itemIndex === currentFocusItemIndex ? 0 : -1)\">\r\n <span class=\"inline-flex self-center max-w-xs align-middle truncate\" #itemContentWrapper\r\n (desyContentEmpty)=\"handleEmptyItem('item content, html or text is required at position ' + itemIndex)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text}\"></ng-container>\r\n </span>\r\n <svg class=\"inline-block -mr-2 align-middle -my-px\" viewBox=\"0 0 96 96\" aria-hidden=\"true\" fill=\"currentColor\" focusable=\"false\" width=\"1.5em\" height=\"1.5em\"><g><path d=\"M46.71 58.037a1.823 1.823 0 002.581 0L62.048 45.28a1.823 1.823 0 00-1.29-3.113H35.243a1.823 1.823 0 00-1.291 3.113z\"/></g></svg>\r\n </a>\r\n <a *ngIf=\"item.routerLink && !item.sub\" #link #itemContentWrapper\r\n role=\"menuitem\"\r\n (click)=\"handleMenuItemClick($event, itemIndex)\"\r\n (keydown)=\"handleMenuItemKeydown($event, itemIndex)\"\r\n (mouseover)=\"handleMenuItemMouseOver(itemIndex)\"\r\n (desyContentEmpty)=\"handleEmptyItem('item content, html or text is required at position ' + itemIndex)\"\r\n (desyAttributeChange)=\"checkChanges()\" [attributesToCheck]=\"'disabled'\"\r\n [id]=\"getItemId(item, itemIndex)\"\r\n [routerLink]=\"item.routerLink\"\r\n [routerLinkActive]=\"item.routerLinkActiveClasses ? item.routerLinkActiveClasses : ''\"\r\n [fragment]=\"item.fragment\"\r\n [class]=\"['c-menubar__button', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'c-menubar__button--disabled': item.disabled, 'c-menubar__button--primary': item.active}\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : (item.ariaDisabled ? item.ariaDisabled : null)\"\r\n [attr.tabindex]=\"item.disabled ? -1 : (itemIndex === currentFocusItemIndex ? 0 : -1)\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledBy]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.aria-modal]=\"item.ariaModal ? item.ariaModal : null\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text}\"></ng-container>\r\n </a>\r\n <a *ngIf=\"!item.routerLink && item.href && !item.sub\" #link #itemContentWrapper\r\n role=\"menuitem\"\r\n (click)=\"handleMenuItemClick($event, itemIndex)\"\r\n (keydown)=\"handleMenuItemKeydown($event, itemIndex)\"\r\n (mouseover)=\"handleMenuItemMouseOver(itemIndex)\"\r\n (desyContentEmpty)=\"handleEmptyItem('item content, html or text is required at position ' + itemIndex)\"\r\n (desyAttributeChange)=\"checkChanges()\" [attributesToCheck]=\"'disabled'\"\r\n [id]=\"getItemId(item, itemIndex)\"\r\n [href]=\"item.href | externalHref\"\r\n [class]=\"['c-menubar__button', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'c-menubar__button--disabled': item.disabled, 'c-menubar__button--primary': item.active}\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : (item.ariaDisabled ? item.ariaDisabled : null)\"\r\n [attr.tabindex]=\"item.disabled ? -1 : (itemIndex === currentFocusItemIndex ? 0 : -1)\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledBy]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.aria-modal]=\"item.ariaModal ? item.ariaModal : null\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text}\"></ng-container>\r\n </a>\r\n\r\n <ul *ngIf=\"item.sub && getItemSubitems(item)\" #popupMenu role=\"menu\" tabindex=\"-1\"\r\n [ngStyle]=\"getPopupStyle(itemIndex)\"\r\n [class]=\"['c-menubar__tooltip w-max max-w-64 hidden border border-neutral-base shadow-md bg-white text-sm', item.sub.classes] | makeHtmlList\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : (item.sub.ariaLabel ? item.sub.ariaLabel : null)\"\r\n [attr.aria-describedby]=\"item.sub.ariaDescribedBy ? item.sub.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.sub.ariaLabelledBy ? item.sub.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.sub.ariaHidden ? item.sub.ariaHidden : null\"\r\n [attr.aria-disabled]=\"item.sub.ariaDisabled ? item.sub.ariaDisabled : null\"\r\n [attr.aria-controls]=\"item.sub.ariaControls ? item.sub.ariaControls : null\"\r\n [attr.aria-current]=\"item.sub.ariaCurrent ? item.sub.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.sub.ariaLive ? item.sub.ariaLive : null\"\r\n [attr.aria-expanded]=\"!!(menuData && menuData[itemIndex].open)\"\r\n [attr.aria-errormessage]=\"item.sub.ariaErrorMessage ? item.sub.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.sub.ariaHasPopup ? item.sub.ariaHasPopup : null\"\r\n [attr.aria-modal]=\"item.sub.ariaModal ? item.sub.ariaModal : null\">\r\n <ng-container *ngFor=\"let subItem of getItemSubitems(item); index as subItemIndex\">\r\n <ng-container [ngSwitch]=\"subItem.role\">\r\n <li #popupMenuItem *ngSwitchCase=\"'none'\" role=\"none\" tabindex=\"-1\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n (desyContentEmpty)=\"handleEmptyItem('subitem content, html or text is required at position ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subItem, html: subItem.html, text: subItem.text}\"></ng-container>\r\n </li>\r\n <li *ngSwitchCase=\"'group'\" role=\"none\">\r\n <ul role=\"group\" [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n [attr.aria-label]=\"subItem.ariaLabel ? subItem.ariaLabel : null\">\r\n <ng-container *ngFor=\"let subsubitem of getSubItemSubitems(subItem); index as subsubIndex\">\r\n <ng-container *ngIf=\"subsubitem\">\r\n <li #popupMenuItem [attr.role]=\"subsubitem.role ? subsubitem.role : null\" tabindex=\"-1\"\r\n [id]=\"getSubItemId(subsubitem, subsubIndex, getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex)))\"\r\n (desyContentEmpty)=\"handleEmptyItem('subsubitem content, html or text is required at position ' + subsubIndex + ' of subItem ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex, subsubIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex, subsubIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex, subsubIndex)\"\r\n [attr.aria-checked]=\"getSubSubItemAriaChecked(subsubitem)\"\r\n class=\"flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subsubitem, html: subsubitem.html, text: subsubitem.text}\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li #popupMenuItem *ngSwitchCase=\"'menuitem'\" role=\"menuitem\" tabindex=\"-1\"\r\n (desyContentEmpty)=\"handleEmptyItem('subitem content, html or text is required at position ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex)\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n class=\"flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white focus:bg-primary-base focus:text-white focus:outline-none\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subItem, html: subItem.html, text: subItem.text}\"></ng-container>\r\n </li>\r\n <li #popupMenuItem *ngSwitchCase=\"'menuitemcheckbox'\" role=\"menuitemcheckbox\" tabindex=\"-1\"\r\n (desyContentEmpty)=\"handleEmptyItem('subitem content, html or text is required at position ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex)\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n [attr.aria-checked]=\"!!subItem.checked\"\r\n class=\"flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subItem, html: subItem.html, text: subItem.text}\"></ng-container>\r\n </li>\r\n <li #popupMenuItem *ngSwitchCase=\"'separator'\" role=\"separator\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n class=\"my-sm border-b border-neutral-base\">\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>\r\n"
6156
+ template: "<div [attr.id]=\"id\" [class]=\"['c-menubar', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.aria-modal]=\"ariaModal ? ariaModal : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ng-container *ngIf=\"getLabelRef()\">\r\n <div [id]=\"id + '-label'\" [class]=\"['mb-sm', labelComponent ? labelComponent.classes : (labelData ? labelData.classes : null)] | makeHtmlList\">\r\n <ng-container *ngTemplateOutlet=\"getLabelRef()\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!getLabelRef() && (labelData || labelText)\">\r\n <div [id]=\"id + '-label'\" [class]=\"['mb-sm', labelData ? labelData.classes : null] | makeHtmlList\">\r\n <ng-container *desyCustomInnerContent=\"{ html: getLabelContent() }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n <ul #menubar [id]=\"id + '-menubar'\" class=\"lg:flex lg:flex-wrap\" role=\"menubar\"\r\n (focusin)=\"handleMenuFocusIn()\"\r\n (focusout)=\"handleMenuFocusOut($event)\"\r\n [ngClass]=\"{ 'focus': isFocused }\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"getLabelRef() || labelData || labelText ? id + '-label' : null\">\r\n <ng-container *ngFor=\"let item of getItems(); index as itemIndex\">\r\n <li class=\"relative\" role=\"none\" desyMenubaritem (contentChanged)=\"checkChanges()\">\r\n <a *ngIf=\"item.sub\" #link\r\n role=\"menuitem\" aria-haspopup=\"true\" aria-expanded=\"false\"\r\n (click)=\"handleMenuItemClick($event, itemIndex)\"\r\n (keydown)=\"handleMenuItemKeydown($event, itemIndex)\"\r\n (mouseover)=\"handleMenuItemMouseOver(itemIndex)\"\r\n (desyAttributeChange)=\"checkChanges()\" [attributesToCheck]=\"'disabled'\"\r\n [id]=\"getItemId(item, itemIndex)\"\r\n [class]=\"['c-menubar__button', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'c-menubar__button--disabled': item.disabled, 'c-menubar__button--primary': item.active}\"\r\n [attr.disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : (item.ariaDisabled ? item.ariaDisabled : null)\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-modal]=\"item.ariaModal ? item.ariaModal : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : (itemIndex === currentFocusItemIndex ? 0 : -1)\">\r\n <span class=\"inline-flex self-center max-w-xs align-middle truncate\" #itemContentWrapper\r\n (desyContentEmpty)=\"handleEmptyItem('item content, html or text is required at position ' + itemIndex)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text}\"></ng-container>\r\n </span>\r\n <svg class=\"inline-block -mr-2 align-middle -my-px\" viewBox=\"0 0 96 96\" aria-hidden=\"true\" fill=\"currentColor\" focusable=\"false\" width=\"1.5em\" height=\"1.5em\"><g><path d=\"M46.71 58.037a1.823 1.823 0 002.581 0L62.048 45.28a1.823 1.823 0 00-1.29-3.113H35.243a1.823 1.823 0 00-1.291 3.113z\"/></g></svg>\r\n </a>\r\n <a *ngIf=\"item.routerLink && !item.sub\" #link #itemContentWrapper\r\n role=\"menuitem\"\r\n (click)=\"handleMenuItemClick($event, itemIndex)\"\r\n (keydown)=\"handleMenuItemKeydown($event, itemIndex)\"\r\n (mouseover)=\"handleMenuItemMouseOver(itemIndex)\"\r\n (desyContentEmpty)=\"handleEmptyItem('item content, html or text is required at position ' + itemIndex)\"\r\n (desyAttributeChange)=\"checkChanges()\" [attributesToCheck]=\"'disabled'\"\r\n [id]=\"getItemId(item, itemIndex)\"\r\n [routerLink]=\"item.routerLink\"\r\n [routerLinkActive]=\"item.routerLinkActiveClasses ? item.routerLinkActiveClasses : []\"\r\n [fragment]=\"item.fragment\"\r\n [class]=\"['c-menubar__button', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'c-menubar__button--disabled': item.disabled, 'c-menubar__button--primary': item.active}\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : (item.ariaDisabled ? item.ariaDisabled : null)\"\r\n [attr.tabindex]=\"item.disabled ? -1 : (itemIndex === currentFocusItemIndex ? 0 : -1)\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledBy]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.aria-modal]=\"item.ariaModal ? item.ariaModal : null\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text}\"></ng-container>\r\n </a>\r\n <a *ngIf=\"!item.routerLink && item.href && !item.sub\" #link #itemContentWrapper\r\n role=\"menuitem\"\r\n (click)=\"handleMenuItemClick($event, itemIndex)\"\r\n (keydown)=\"handleMenuItemKeydown($event, itemIndex)\"\r\n (mouseover)=\"handleMenuItemMouseOver(itemIndex)\"\r\n (desyContentEmpty)=\"handleEmptyItem('item content, html or text is required at position ' + itemIndex)\"\r\n (desyAttributeChange)=\"checkChanges()\" [attributesToCheck]=\"'disabled'\"\r\n [id]=\"getItemId(item, itemIndex)\"\r\n [href]=\"item.href | externalHref\"\r\n [class]=\"['c-menubar__button', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'c-menubar__button--disabled': item.disabled, 'c-menubar__button--primary': item.active}\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : (item.ariaDisabled ? item.ariaDisabled : null)\"\r\n [attr.tabindex]=\"item.disabled ? -1 : (itemIndex === currentFocusItemIndex ? 0 : -1)\"\r\n [attr.target]=\"item.target ? item.target : null\"\r\n [attr.aria-describedby]=\"item.ariaDescribedBy ? item.ariaDescribedBy : null\"\r\n [attr.aria-labelledBy]=\"item.ariaLabelledBy ? item.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.ariaHidden ? item.ariaHidden : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : null\"\r\n [attr.aria-current]=\"item.ariaCurrent ? item.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.ariaLive ? item.ariaLive : null\"\r\n [attr.aria-expanded]=\"item.ariaExpanded ? item.ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"item.ariaErrorMessage ? item.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.ariaHasPopup ? item.ariaHasPopup : null\"\r\n [attr.aria-modal]=\"item.ariaModal ? item.ariaModal : null\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text}\"></ng-container>\r\n </a>\r\n\r\n <ul *ngIf=\"item.sub && getItemSubitems(item)\" #popupMenu role=\"menu\" tabindex=\"-1\"\r\n [ngStyle]=\"getPopupStyle(itemIndex)\"\r\n [class]=\"['c-menubar__tooltip w-max max-w-64 hidden border border-neutral-base shadow-md bg-white text-sm', item.sub.classes] | makeHtmlList\"\r\n [attr.aria-label]=\"item.ariaLabel ? item.ariaLabel : (item.sub.ariaLabel ? item.sub.ariaLabel : null)\"\r\n [attr.aria-describedby]=\"item.sub.ariaDescribedBy ? item.sub.ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"item.sub.ariaLabelledBy ? item.sub.ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"item.sub.ariaHidden ? item.sub.ariaHidden : null\"\r\n [attr.aria-disabled]=\"item.sub.ariaDisabled ? item.sub.ariaDisabled : null\"\r\n [attr.aria-controls]=\"item.sub.ariaControls ? item.sub.ariaControls : null\"\r\n [attr.aria-current]=\"item.sub.ariaCurrent ? item.sub.ariaCurrent : null\"\r\n [attr.aria-live]=\"item.sub.ariaLive ? item.sub.ariaLive : null\"\r\n [attr.aria-expanded]=\"!!(menuData && menuData[itemIndex].open)\"\r\n [attr.aria-errormessage]=\"item.sub.ariaErrorMessage ? item.sub.ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"item.sub.ariaHasPopup ? item.sub.ariaHasPopup : null\"\r\n [attr.aria-modal]=\"item.sub.ariaModal ? item.sub.ariaModal : null\">\r\n <ng-container *ngFor=\"let subItem of getItemSubitems(item); index as subItemIndex\">\r\n <ng-container [ngSwitch]=\"subItem.role\">\r\n <li #popupMenuItem *ngSwitchCase=\"'none'\" role=\"none\" tabindex=\"-1\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n (desyContentEmpty)=\"handleEmptyItem('subitem content, html or text is required at position ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subItem, html: subItem.html, text: subItem.text}\"></ng-container>\r\n </li>\r\n <li *ngSwitchCase=\"'group'\" role=\"none\">\r\n <ul role=\"group\" [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n [attr.aria-label]=\"subItem.ariaLabel ? subItem.ariaLabel : null\">\r\n <ng-container *ngFor=\"let subsubitem of getSubItemSubitems(subItem); index as subsubIndex\">\r\n <ng-container *ngIf=\"subsubitem\">\r\n <li #popupMenuItem [attr.role]=\"subsubitem.role ? subsubitem.role : null\" tabindex=\"-1\"\r\n [id]=\"getSubItemId(subsubitem, subsubIndex, getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex)))\"\r\n (desyContentEmpty)=\"handleEmptyItem('subsubitem content, html or text is required at position ' + subsubIndex + ' of subItem ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex, subsubIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex, subsubIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex, subsubIndex)\"\r\n [attr.aria-checked]=\"getSubSubItemAriaChecked(subsubitem)\"\r\n class=\"flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subsubitem, html: subsubitem.html, text: subsubitem.text}\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li #popupMenuItem *ngSwitchCase=\"'menuitem'\" role=\"menuitem\" tabindex=\"-1\"\r\n (desyContentEmpty)=\"handleEmptyItem('subitem content, html or text is required at position ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex)\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n class=\"flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white focus:bg-primary-base focus:text-white focus:outline-none\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subItem, html: subItem.html, text: subItem.text}\"></ng-container>\r\n </li>\r\n <li #popupMenuItem *ngSwitchCase=\"'menuitemcheckbox'\" role=\"menuitemcheckbox\" tabindex=\"-1\"\r\n (desyContentEmpty)=\"handleEmptyItem('subitem content, html or text is required at position ' + subItemIndex + ' of item ' + itemIndex)\"\r\n (click)=\"handlePopupMenuItemClick(itemIndex, subItemIndex)\"\r\n (mouseover)=\"handlePopupMenuItemMouseOver(itemIndex, subItemIndex)\"\r\n (keydown)=\"handlePopupMenuItemKeydown($event, itemIndex, subItemIndex)\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n [attr.aria-checked]=\"!!subItem.checked\"\r\n class=\"flex items-center pr-base pl-lg py-sm cursor-pointer hover:bg-primary-base hover:text-white\">\r\n <ng-container *desyCustomInnerContent=\"{ component: subItem, html: subItem.html, text: subItem.text}\"></ng-container>\r\n </li>\r\n <li #popupMenuItem *ngSwitchCase=\"'separator'\" role=\"separator\"\r\n [id]=\"getSubItemId(subItem, subItemIndex, getItemId(item, itemIndex))\"\r\n class=\"my-sm border-b border-neutral-base\">\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>\r\n"
5124
6157
  },] }
5125
6158
  ];
5126
6159
  MenubarComponent.ctorParameters = () => [
@@ -5372,63 +6405,6 @@ __decorate([
5372
6405
  DesyContentChild()
5373
6406
  ], TableComponent.prototype, "headerComponent", void 0);
5374
6407
 
5375
- class SearchUtils {
5376
- /**
5377
- * Comprueba si una cadena de texto (target) contiene cualquier palabra de otro texto (text)
5378
- * @param target - Texto en el que buscar
5379
- * @param text - Texto a buscar
5380
- * @param fullWord - Indica si las palabras del texto a buscar deben aparecer enteras
5381
- */
5382
- static containsAnyWordFrom(target, text, fullWord) {
5383
- let words = [];
5384
- let includes = false;
5385
- const simplifiedTarget = this.getSimplifiedString(target);
5386
- if (text && text.split(' ').length > 1) {
5387
- words = text.split(' ');
5388
- }
5389
- words.push(text);
5390
- words.forEach(word => {
5391
- if (simplifiedTarget && word) {
5392
- if ((fullWord && simplifiedTarget === this.getSimplifiedString(word))
5393
- || (!fullWord && simplifiedTarget.includes(this.getSimplifiedString(word)))) {
5394
- includes = true;
5395
- }
5396
- }
5397
- });
5398
- return includes;
5399
- }
5400
- /**
5401
- * Convierte a mayúsculas, elimina espacios y reemplaza/elimina caracteres especiales para realizar comparaciones más tolerantes
5402
- * @param str - cadena de entrada
5403
- */
5404
- static getSimplifiedString(str) {
5405
- let res = str;
5406
- if (str) {
5407
- res = str.toLocaleUpperCase().trim();
5408
- res = res.replace('Á', 'A');
5409
- res = res.replace('É', 'E');
5410
- res = res.replace('Í', 'I');
5411
- res = res.replace('Ó', 'O');
5412
- res = res.replace('Ú', 'U');
5413
- res = res.replace('À', 'A');
5414
- res = res.replace('È', 'E');
5415
- res = res.replace('Ì', 'I');
5416
- res = res.replace('Ò', 'O');
5417
- res = res.replace('Ù', 'U');
5418
- res = res.replace('Ä', 'A');
5419
- res = res.replace('Ë', 'E');
5420
- res = res.replace('Ï', 'I');
5421
- res = res.replace('Ö', 'O');
5422
- res = res.replace('Ü', 'U');
5423
- res = res.replace(',', '');
5424
- res = res.replace('.', '');
5425
- res = res.replace('\'', '');
5426
- res = res.replace('"', '');
5427
- }
5428
- return res;
5429
- }
5430
- }
5431
-
5432
6408
  var OrderBy;
5433
6409
  (function (OrderBy) {
5434
6410
  OrderBy["none"] = "none";
@@ -6797,7 +7773,7 @@ class PaginationComponent extends AccessibilityComponent {
6797
7773
  PaginationComponent.decorators = [
6798
7774
  { type: Component, args: [{
6799
7775
  selector: 'desy-pagination',
6800
- template: "<div [attr.id]=\"id ? id : null\" [class]=\"['lg:flex lg:flex-wrap lg:align-center', classesContainer] | makeHtmlList\">\r\n <ng-container *ngIf=\"hasSelect\">\r\n <p class=\"w-full mb-xs text-sm text-neutral-dark\">\r\n Selecciona una p\u00E1gina para cargar datos\r\n </p>\r\n <nav [class]=\"['flex flex-wrap items-center flex-1 mb-base lg:mb-0 text-sm', classes] | makeHtmlList\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <desy-button (clickEvent)=\"previous()\" [id]=\"getIdPrefix() + '-previous'\"\r\n [html]=\"previousIcon + prefix + previousText + getSuffix(currentPage - 2)\" [disabled]=\"currentPage === 1 || !hasPrevious\"\r\n classes=\"c-button--sm c-button--transparent mr-xs\"></desy-button>\r\n <desy-listbox [id]=\"id + '-listbox'\"\r\n [idPrefix]=\"idPrefix\"\r\n [text]=\"'P\u00E1gina ' + getActiveItemText()\"\r\n [classes]=\"'c-listbox--sm c-listbox--transparent mr-xs'\"\r\n [doesChangeButtonText]=\"true\"\r\n [label]=\"{ text: 'Selecciona una p\u00E1gina para cargar datos', classes: 'sr-only' }\"\r\n [(items)]=\"items\"\r\n (activeItemChange)=\"changePage(+$event.text)\"></desy-listbox>\r\n <desy-button (clickEvent)=\"next()\" [id]=\"getIdPrefix() + '-next'\"\r\n [html]=\"prefix + nextText + getSuffix(currentPage) + nextIcon\" [disabled]=\"currentPage === nPages || !hasNext\"\r\n classes=\"c-button--sm c-button--transparent mr-xs\"></desy-button>\r\n </nav>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasSelect\">\r\n <nav [class]=\"['flex flex-wrap items-center flex-1 mb-base lg:mb-0 text-sm', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ul class=\"flex flex-wrap\">\r\n <li *ngFor=\"let item of items; index as i\">\r\n <desy-button *ngIf=\"item.active\" [id]=\"getButtonId(i)\"\r\n [html]=\"'<strong>' + prefix + (i + 1) + getSuffix(i) + '</strong>'\"\r\n classes=\"c-button--primary c-button--disabled mb-sm mr-sm\"\r\n disabled=\"true\" ariaCurrent=\"page\" tabindex=\"-1\" ></desy-button>\r\n <desy-button *ngIf=\"!item.active\" [id]=\"getButtonId(i)\"\r\n [html]=\"prefix + (i + 1) + getSuffix(i)\"\r\n (clickEvent)=\"changePage(i + 1)\"\r\n classes=\"mb-sm mr-sm\"></desy-button>\r\n </li>\r\n </ul>\r\n </nav>\r\n </ng-container>\r\n <p class=\"block lg:ml-auto text-sm text-neutral-dark\">\r\n <span class=\"sr-only\">Posici\u00F3n de paginaci\u00F3n: </span>{{(currentPage - 1) * itemsPerPage + 1}} - {{getLastItemNumber(currentPage - 1)}} de {{totalItems}}\r\n </p>\r\n</div>\r\n"
7776
+ template: "<div [attr.id]=\"id ? id : null\" [class]=\"['lg:flex lg:flex-wrap lg:align-center', classesContainer] | makeHtmlList\">\r\n <ng-container *ngIf=\"hasSelect\">\r\n <p class=\"w-full mb-xs text-sm text-neutral-dark\">\r\n Selecciona una p\u00E1gina para cargar datos\r\n </p>\r\n <nav [class]=\"['flex flex-wrap items-center flex-1 mb-base lg:mb-0 text-sm', classes] | makeHtmlList\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <desy-button (clickEvent)=\"previous()\" [id]=\"getIdPrefix() + '-previous'\"\r\n [html]=\"previousIcon + prefix + previousText + getSuffix(currentPage - 2)\" [disabled]=\"currentPage === 1 || !hasPrevious\"\r\n classes=\"c-button--sm c-button--transparent mr-xs\"></desy-button>\r\n <desy-listbox [id]=\"id + '-listbox'\"\r\n [idPrefix]=\"idPrefix\"\r\n [text]=\"'P\u00E1gina ' + getActiveItemText()\"\r\n [classes]=\"'c-listbox--sm c-listbox--transparent mr-xs'\"\r\n [classesTooltip]=\"'max-h-52 overflow-y-auto'\"\r\n [doesChangeButtonText]=\"true\"\r\n [label]=\"{ text: 'Selecciona una p\u00E1gina para cargar datos', classes: 'sr-only' }\"\r\n [(items)]=\"items\"\r\n (activeItemChange)=\"changePage(+$event.text)\"></desy-listbox>\r\n <desy-button (clickEvent)=\"next()\" [id]=\"getIdPrefix() + '-next'\"\r\n [html]=\"prefix + nextText + getSuffix(currentPage) + nextIcon\" [disabled]=\"currentPage === nPages || !hasNext\"\r\n classes=\"c-button--sm c-button--transparent mr-xs\"></desy-button>\r\n </nav>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasSelect\">\r\n <nav [class]=\"['flex flex-wrap items-center flex-1 mb-base lg:mb-0 text-sm', classes] | makeHtmlList\"\r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\"\r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\"\r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\"\r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\"\r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\"\r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\"\r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n <ul class=\"flex flex-wrap\">\r\n <li *ngFor=\"let item of items; index as i\">\r\n <desy-button *ngIf=\"item.active\" [id]=\"getButtonId(i)\"\r\n [html]=\"'<strong>' + prefix + (i + 1) + getSuffix(i) + '</strong>'\"\r\n classes=\"c-button--primary c-button--disabled mb-sm mr-sm\"\r\n disabled=\"true\" ariaCurrent=\"page\" tabindex=\"-1\" ></desy-button>\r\n <desy-button *ngIf=\"!item.active\" [id]=\"getButtonId(i)\"\r\n [html]=\"prefix + (i + 1) + getSuffix(i)\"\r\n (clickEvent)=\"changePage(i + 1)\"\r\n classes=\"mb-sm mr-sm\"></desy-button>\r\n </li>\r\n </ul>\r\n </nav>\r\n </ng-container>\r\n <p class=\"block lg:ml-auto text-sm text-neutral-dark\">\r\n <span class=\"sr-only\">Posici\u00F3n de paginaci\u00F3n: </span>{{(currentPage - 1) * itemsPerPage + 1}} - {{getLastItemNumber(currentPage - 1)}} de {{totalItems}}\r\n </p>\r\n</div>\r\n"
6801
7777
  },] }
6802
7778
  ];
6803
7779
  PaginationComponent.propDecorators = {
@@ -7276,6 +8252,11 @@ DesyFormsModule.decorators = [
7276
8252
  DateInputDayComponent,
7277
8253
  DateInputMonthComponent,
7278
8254
  DateInputYearComponent,
8255
+ TreeComponent,
8256
+ TreeSubComponent,
8257
+ TreeItemComponent,
8258
+ TreeCheckboxComponent,
8259
+ TreeItemsGeneratorComponent,
7279
8260
  ConditionDirective,
7280
8261
  ],
7281
8262
  imports: [
@@ -7312,6 +8293,10 @@ DesyFormsModule.decorators = [
7312
8293
  DateInputDayComponent,
7313
8294
  DateInputMonthComponent,
7314
8295
  DateInputYearComponent,
8296
+ TreeComponent,
8297
+ TreeSubComponent,
8298
+ TreeItemComponent,
8299
+ TreeItemsGeneratorComponent,
7315
8300
  ConditionDirective
7316
8301
  ]
7317
8302
  },] }
@@ -7506,6 +8491,67 @@ DesyViewsModule.decorators = [
7506
8491
  },] }
7507
8492
  ];
7508
8493
 
8494
+ class ToggleOffStateComponent extends AccessibilityComponent {
8495
+ }
8496
+ ToggleOffStateComponent.decorators = [
8497
+ { type: Component, args: [{
8498
+ selector: 'desy-toggle-off-state',
8499
+ template: "<ng-template #contentTemplateOffState>\r\n <ng-content></ng-content>\r\n</ng-template>"
8500
+ },] }
8501
+ ];
8502
+ ToggleOffStateComponent.propDecorators = {
8503
+ content: [{ type: ViewChild, args: ['contentTemplateOffState', { static: true },] }],
8504
+ classes: [{ type: Input }]
8505
+ };
8506
+
8507
+ class ToggleOnStateComponent extends AccessibilityComponent {
8508
+ }
8509
+ ToggleOnStateComponent.decorators = [
8510
+ { type: Component, args: [{
8511
+ selector: 'desy-toggle-on-state',
8512
+ template: "<ng-template #contentTemplateOnState>\r\n <ng-content></ng-content>\r\n</ng-template>"
8513
+ },] }
8514
+ ];
8515
+ ToggleOnStateComponent.propDecorators = {
8516
+ content: [{ type: ViewChild, args: ['contentTemplateOnState', { static: true },] }],
8517
+ classes: [{ type: Input }]
8518
+ };
8519
+
8520
+ class ToggleComponent extends AccessibilityComponent {
8521
+ constructor() {
8522
+ super(...arguments);
8523
+ this.clickEvent = new EventEmitter();
8524
+ this.pressedChange = new EventEmitter();
8525
+ }
8526
+ onClick(event) {
8527
+ this.pressed = !this.pressed;
8528
+ this.pressedChange.emit(this.pressed);
8529
+ this.clickEvent.emit(event);
8530
+ }
8531
+ }
8532
+ ToggleComponent.decorators = [
8533
+ { type: Component, args: [{
8534
+ selector: 'desy-toggle',
8535
+ template: "<!-- toggle -->\r\n<div class=\"relative\">\r\n <button *ngIf=\"isSwitch\"\r\n (click)=\"onClick($event)\"\r\n [type]=\"'button'\"\r\n [class]=\"pressed ? (classes + ' ' + contentTemplateOnState?.classes) : (classes + ' ' + contentTemplateOffState?.classes)\"\r\n [attr.aria-checked]=\"pressed ? 'true' : 'false'\"\r\n \r\n [attr.id]=\"id ? id : null\" \r\n [attr.role]=\"'switch'\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\" \r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\" \r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\" \r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\" \r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\" \r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\" \r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n \r\n <span [class]=\"pressed ? 'hidden' : ''\"><ng-container *ngTemplateOutlet=\"contentTemplateOffState?.content\"></ng-container></span>\r\n <span [class]=\"pressed ? '' : 'hidden'\"><ng-container *ngTemplateOutlet=\"contentTemplateOnState?.content\"></ng-container></span>\r\n </button>\r\n\r\n <button *ngIf=\"!isSwitch\"\r\n (click)=\"onClick($event)\"\r\n [type]=\"'button'\"\r\n [class]=\"pressed ? (classes + ' ' + contentTemplateOnState?.classes) : (classes + ' ' + contentTemplateOffState?.classes)\"\r\n [attr.aria-pressed]=\"pressed ? 'true' : 'false'\"\r\n [attr.id]=\"id ? id : null\" \r\n [attr.role]=\"role ? role : null\"\r\n [attr.aria-label]=\"ariaLabel ? ariaLabel : null\"\r\n [attr.aria-describedby]=\"ariaDescribedBy ? ariaDescribedBy : null\"\r\n [attr.aria-labelledby]=\"ariaLabelledBy ? ariaLabelledBy : null\"\r\n [attr.aria-hidden]=\"ariaHidden ? ariaHidden : null\"\r\n [attr.aria-disabled]=\"ariaDisabled ? ariaDisabled : null\"\r\n [attr.aria-controls]=\"ariaControls ? ariaControls : null\" \r\n [attr.aria-current]=\"ariaCurrent ? ariaCurrent : null\" \r\n [attr.aria-live]=\"ariaLive ? ariaLive : null\" \r\n [attr.aria-expanded]=\"ariaExpanded ? ariaExpanded : null\" \r\n [attr.aria-errormessage]=\"ariaErrorMessage ? ariaErrorMessage : null\" \r\n [attr.aria-haspopup]=\"ariaHasPopup ? ariaHasPopup : null\" \r\n [attr.tabindex]=\"tabindex ? tabindex : null\">\r\n \r\n <span [class]=\"pressed ? 'hidden' : ''\"><ng-container *ngTemplateOutlet=\"contentTemplateOffState?.content\"></ng-container></span>\r\n <span [class]=\"pressed ? '' : 'hidden'\"><ng-container *ngTemplateOutlet=\"contentTemplateOnState?.content\"></ng-container></span>\r\n </button>\r\n</div>\r\n<!-- /toggle -->"
8536
+ },] }
8537
+ ];
8538
+ ToggleComponent.propDecorators = {
8539
+ id: [{ type: Input }],
8540
+ isSwitch: [{ type: Input }],
8541
+ pressed: [{ type: Input }],
8542
+ classes: [{ type: Input }],
8543
+ clickEvent: [{ type: Output }],
8544
+ pressedChange: [{ type: Output }],
8545
+ contentTemplateOnState: [{ type: ContentChildren, args: [ToggleOnStateComponent,] }],
8546
+ contentTemplateOffState: [{ type: ContentChildren, args: [ToggleOffStateComponent,] }]
8547
+ };
8548
+ __decorate([
8549
+ DesyContentChild()
8550
+ ], ToggleComponent.prototype, "contentTemplateOnState", void 0);
8551
+ __decorate([
8552
+ DesyContentChild()
8553
+ ], ToggleComponent.prototype, "contentTemplateOffState", void 0);
8554
+
7509
8555
  class DesyButtonsModule {
7510
8556
  }
7511
8557
  DesyButtonsModule.decorators = [
@@ -7517,7 +8563,10 @@ DesyButtonsModule.decorators = [
7517
8563
  ListboxComponent,
7518
8564
  PillComponent,
7519
8565
  ListboxItemComponent,
7520
- ListboxLabelComponent
8566
+ ListboxLabelComponent,
8567
+ ToggleComponent,
8568
+ ToggleOnStateComponent,
8569
+ ToggleOffStateComponent
7521
8570
  ],
7522
8571
  imports: [
7523
8572
  CommonModule,
@@ -7532,7 +8581,10 @@ DesyButtonsModule.decorators = [
7532
8581
  ListboxComponent,
7533
8582
  PillComponent,
7534
8583
  ListboxItemComponent,
7535
- ListboxLabelComponent
8584
+ ListboxLabelComponent,
8585
+ ToggleComponent,
8586
+ ToggleOnStateComponent,
8587
+ ToggleOffStateComponent
7536
8588
  ]
7537
8589
  },] }
7538
8590
  ];
@@ -7821,5 +8873,5 @@ DesyAngularModule.decorators = [
7821
8873
  * Generated bundle index. Do not edit.
7822
8874
  */
7823
8875
 
7824
- export { AccordionComponent, AccordionHeaderComponent, AccordionItemComponent, AlertComponent, AlertService, BreadcrumbsComponent, BreadcrumbsItemComponent, ButtonComponent, ButtonLoaderComponent, CharacterCountComponent, CheckboxItemComponent, CheckboxesComponent, CollapsibleComponent, ConditionDirective, ContentComponent, DateInputComponent, DefinitionComponent, DescriptionComponent, DescriptionItemComponent, DescriptionListComponent, DesyAngularModule, DesyButtonsModule, DesyCommonsModule, DesyFormsModule, DesyModalsModule, DesyNavModule, DesyPaginationModule, DesyTablesModule, DesyViewsModule, DetailsComponent, DialogComponent, DialogService, DropdownComponent, ErrorMessageComponent, ErrorSummaryComponent, ErrorSummaryItemComponent, FieldsetComponent, FileUploadComponent, FooterComponent, FooterMetaComponent, FooterMetaItemComponent, FooterNavigationComponent, FooterNavigationItemComponent, HeaderComponent, HeaderDropdownComponent, HeaderNavigationComponent, HeaderOffcanvasButtonComponent, HeaderOffcanvasCloseButtonComponent, HeaderOffcanvasComponent, HeaderSubnavComponent, HintComponent, IconComponent, InputComponent, InputGroupComponent, InputGroupDividerComponent, InputGroupInputComponent, InputGroupSelectComponent, ItemComponent, ItemContentBottomComponent, ItemContentRightComponent, ItemItemComponent, LabelComponent, LegendComponent, ListboxComponent, ListboxItemComponent, ListboxLabelComponent, MediaObjectComponent, MenuHorizontalComponent, MenuHorizontalItemComponent, MenuVerticalComponent, MenuVerticalItemComponent, MenuVerticalItemSubComponent, MenuVerticalItemSubItemComponent, MenubarComponent, MenubarItemComponent, MenubarLabelComponent, MenubarSubitemComponent, MenubarSubsubitemComponent, ModalButtonPrimaryComponent, ModalButtonSecondaryComponent, ModalComponent, NavComponent, NavItemComponent, NotificationComponent, NotificationItemComponent, OptionComponent, OptionGroupComponent, OrderBy, PaginationComponent, PillComponent, RadioItemComponent, RadiosComponent, SearchBarComponent, SelectComponent, SkipLinkComponent, SpinnerComponent, StatusComponent, StatusItemComponent, TableAdvancedComponent, TableAdvancedHeaderCellComponent, TableAdvancedHeaderComponent, TableAdvancedRowCellComponent, TableAdvancedRowComponent, TableCaptionComponent, TableCellComponent, TableComponent, TableHeaderComponent, TableRowComponent, TabsComponent, TermComponent, TextareaComponent, TitleComponent, TooltipContentComponent, summaryTextOrSummaryHtmlRequiredFunction, AccessibilityComponent as ɵa, AccessibilityAndContentRequiredComponent as ɵb, CustomInnerContentDirective as ɵba, TooltipComponent as ɵbb, TemplateDrivenWrapperComponent as ɵbc, DateInputDividerComponent as ɵbd, DateInputDayComponent as ɵbe, DateInputMonthComponent as ɵbf, DateInputYearComponent as ɵbg, FocusClickedCellDirective as ɵbh, AccessibilityAndTextOrHtmlRequiredComponent as ɵc, DesyContentChild as ɵd, ContentBaseComponent as ɵe, FormFieldComponent as ɵf, SelectItemComponent as ɵg, DesyOnInputChange as ɵh, InputGroupItemComponent as ɵi, DateInputItemComponent as ɵj, HeaderNavigationItemComponent as ɵk, MenubaritemDirective as ɵl, RowDirective as ɵm, CellDirective as ɵn, TabItemComponent as ɵo, PanelComponent as ɵp, SharedModule as ɵq, TextOrHtmlRequiredComponent as ɵr, InnerHtmlPipe as ɵs, MakeHtmlListPipe as ɵt, ExternalHrefPipe as ɵu, AttributeChangeDirective as ɵv, InnerContentDirective as ɵw, ClickOutsideDirective as ɵx, ContentChangeDirective as ɵy, ContentEmptyDirective as ɵz };
8876
+ export { AccordionComponent, AccordionHeaderComponent, AccordionItemComponent, AlertComponent, AlertService, BreadcrumbsComponent, BreadcrumbsItemComponent, ButtonComponent, ButtonLoaderComponent, CharacterCountComponent, CheckboxItemComponent, CheckboxesComponent, CollapsibleComponent, ConditionDirective, ContentComponent, DateInputComponent, DefinitionComponent, DescriptionComponent, DescriptionItemComponent, DescriptionListComponent, DesyAngularModule, DesyButtonsModule, DesyCommonsModule, DesyFormsModule, DesyModalsModule, DesyNavModule, DesyPaginationModule, DesyTablesModule, DesyViewsModule, DetailsComponent, DialogComponent, DialogService, DropdownComponent, ErrorMessageComponent, ErrorSummaryComponent, ErrorSummaryItemComponent, FieldsetComponent, FileUploadComponent, FooterComponent, FooterMetaComponent, FooterMetaItemComponent, FooterNavigationComponent, FooterNavigationItemComponent, HeaderComponent, HeaderDropdownComponent, HeaderNavigationComponent, HeaderOffcanvasButtonComponent, HeaderOffcanvasCloseButtonComponent, HeaderOffcanvasComponent, HeaderSubnavComponent, HintComponent, IconComponent, InputComponent, InputGroupComponent, InputGroupDividerComponent, InputGroupInputComponent, InputGroupSelectComponent, ItemComponent, ItemContentBottomComponent, ItemContentRightComponent, ItemItemComponent, LabelComponent, LegendComponent, ListboxComponent, ListboxItemComponent, ListboxLabelComponent, MediaObjectComponent, MenuHorizontalComponent, MenuHorizontalItemComponent, MenuVerticalComponent, MenuVerticalItemComponent, MenuVerticalItemSubComponent, MenuVerticalItemSubItemComponent, MenubarComponent, MenubarItemComponent, MenubarLabelComponent, MenubarSubitemComponent, MenubarSubsubitemComponent, ModalButtonPrimaryComponent, ModalButtonSecondaryComponent, ModalComponent, NavComponent, NavItemComponent, NotificationComponent, NotificationItemComponent, OptionComponent, OptionGroupComponent, OrderBy, PaginationComponent, PillComponent, RadioItemComponent, RadiosComponent, SearchBarComponent, SelectComponent, SkipLinkComponent, SpinnerComponent, StatusComponent, StatusItemComponent, TableAdvancedComponent, TableAdvancedHeaderCellComponent, TableAdvancedHeaderComponent, TableAdvancedRowCellComponent, TableAdvancedRowComponent, TableCaptionComponent, TableCellComponent, TableComponent, TableHeaderComponent, TableRowComponent, TabsComponent, TermComponent, TextareaComponent, TitleComponent, TooltipContentComponent, TreeComponent, TreeItemComponent, TreeItemsGeneratorComponent, TreeSubComponent, summaryTextOrSummaryHtmlRequiredFunction, AccessibilityComponent as ɵa, AccessibilityAndContentRequiredComponent as ɵb, AttributeChangeDirective as ɵba, InnerContentDirective as ɵbb, ClickOutsideDirective as ɵbc, ContentChangeDirective as ɵbd, ContentEmptyDirective as ɵbe, CustomInnerContentDirective as ɵbf, TooltipComponent as ɵbg, TemplateDrivenWrapperComponent as ɵbh, DateInputDividerComponent as ɵbi, DateInputDayComponent as ɵbj, DateInputMonthComponent as ɵbk, DateInputYearComponent as ɵbl, FocusClickedCellDirective as ɵbm, AccessibilityAndTextOrHtmlRequiredComponent as ɵc, DesyContentChild as ɵd, ContentBaseComponent as ɵe, FormFieldComponent as ɵf, SelectItemComponent as ɵg, DesyOnInputChange as ɵh, InputGroupItemComponent as ɵi, DateInputItemComponent as ɵj, ITreeItem as ɵk, TreeCheckboxComponent as ɵl, HeaderNavigationItemComponent as ɵm, MenubaritemDirective as ɵn, RowDirective as ɵo, CellDirective as ɵp, TabItemComponent as ɵq, PanelComponent as ɵr, ToggleComponent as ɵs, ToggleOnStateComponent as ɵt, ToggleOffStateComponent as ɵu, SharedModule as ɵv, TextOrHtmlRequiredComponent as ɵw, InnerHtmlPipe as ɵx, MakeHtmlListPipe as ɵy, ExternalHrefPipe as ɵz };
7825
8877
  //# sourceMappingURL=desy-angular.js.map