desy-angular 5.1.3 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/desy-angular.umd.js +173 -667
- package/bundles/desy-angular.umd.js.map +1 -1
- package/bundles/desy-angular.umd.min.js +2 -2
- package/bundles/desy-angular.umd.min.js.map +1 -1
- package/desy-angular.d.ts +15 -15
- package/desy-angular.metadata.json +1 -1
- package/esm2015/desy-angular.js +16 -16
- package/esm2015/lib/desy-buttons/components/dropdown/dropdown.component.js +2 -2
- package/esm2015/lib/desy-buttons/components/listbox/listbox.component.js +2 -24
- package/esm2015/lib/desy-buttons/components/pill/pill.component.js +1 -1
- package/esm2015/lib/desy-forms/components/character-count/character-count.component.js +2 -17
- package/esm2015/lib/desy-forms/components/checkboxes/checkbox-item/checkbox-item.component.js +1 -4
- package/esm2015/lib/desy-forms/components/checkboxes/checkboxes.component.js +1 -10
- package/esm2015/lib/desy-forms/components/date-input/date-input-day/date-input-day.component.js +1 -9
- package/esm2015/lib/desy-forms/components/date-input/date-input-month/date-input-month.component.js +1 -9
- package/esm2015/lib/desy-forms/components/date-input/date-input-year/date-input-year.component.js +1 -9
- package/esm2015/lib/desy-forms/components/date-input/date-input.component.js +2 -15
- package/esm2015/lib/desy-forms/components/file-upload/file-upload.component.js +1 -15
- package/esm2015/lib/desy-forms/components/input/input.component.js +12 -16
- package/esm2015/lib/desy-forms/components/input-group/input-group-input/input-group-input.component.js +1 -9
- package/esm2015/lib/desy-forms/components/input-group/input-group-select/input-group-select.component.js +1 -9
- package/esm2015/lib/desy-forms/components/input-group/input-group.component.js +9 -20
- package/esm2015/lib/desy-forms/components/radios/radio-item/radio-item.component.js +1 -4
- package/esm2015/lib/desy-forms/components/radios/radios.component.js +1 -10
- package/esm2015/lib/desy-forms/components/search-bar/search-bar.component.js +1 -17
- package/esm2015/lib/desy-forms/components/select/select.component.js +9 -19
- package/esm2015/lib/desy-forms/components/textarea/textarea.component.js +3 -15
- package/esm2015/lib/desy-forms/components/tree/tree-item/tree-item.component.js +1 -1
- package/esm2015/lib/desy-forms/directives/condition.directive.js +2 -5
- package/esm2015/lib/desy-modals/components/dialog/dialog.component.js +1 -7
- package/esm2015/lib/desy-modals/components/modal/modal.component.js +2 -13
- package/esm2015/lib/desy-modals/services/dialog.service.js +8 -9
- package/esm2015/lib/desy-nav/components/breadcrumbs/breadcrumbs.component.js +2 -8
- package/esm2015/lib/desy-nav/components/error-summary/error-summary.component.js +4 -10
- package/esm2015/lib/desy-nav/components/footer/footer.component.js +2 -2
- package/esm2015/lib/desy-nav/components/header/header-dropdown/header-dropdown.component.js +1 -4
- package/esm2015/lib/desy-nav/components/header/header-navigation/header-navigation.component.js +1 -4
- package/esm2015/lib/desy-nav/components/header/header-offcanvas/header-offcanvas-button/header-offcanvas-button.component.js +2 -5
- package/esm2015/lib/desy-nav/components/header/header-offcanvas/header-offcanvas.component.js +2 -5
- package/esm2015/lib/desy-nav/components/header/header-subnav/header-subnav.component.js +2 -5
- package/esm2015/lib/desy-nav/components/menu-horizontal/menu-horizontal.component.js +2 -15
- package/esm2015/lib/desy-nav/components/menu-vertical/menu-vertical.component.js +2 -8
- package/esm2015/lib/desy-nav/components/menubar/menubar.component.js +2 -14
- package/esm2015/lib/desy-nav/components/nav/nav.component.js +2 -18
- package/esm2015/lib/desy-nav/components/notification/notification.component.js +2 -10
- package/esm2015/lib/desy-nav/components/skip-link/skip-link.component.js +2 -11
- package/esm2015/lib/desy-pagination/components/pagination/pagination.component.js +2 -11
- package/esm2015/lib/desy-tables/components/table/table.component.js +2 -14
- package/esm2015/lib/desy-tables/components/table-advanced/table-advanced.component.js +2 -5
- package/esm2015/lib/desy-views/components/accordion/accordion.component.js +2 -13
- package/esm2015/lib/desy-views/components/alert/alert.component.js +1 -7
- package/esm2015/lib/desy-views/components/collapsible/collapsible.component.js +3 -10
- package/esm2015/lib/desy-views/components/description-list/description-list.component.js +2 -8
- package/esm2015/lib/desy-views/components/details/details.component.js +1 -12
- package/esm2015/lib/desy-views/components/item/item.component.js +3 -13
- package/esm2015/lib/desy-views/components/media-object/media-object-figure/media-object-figure.component.js +11 -0
- package/esm2015/lib/desy-views/components/media-object/media-object.component.js +17 -12
- package/esm2015/lib/desy-views/components/status/status.component.js +3 -11
- package/esm2015/lib/desy-views/components/status-item/status-item.component.js +2 -10
- package/esm2015/lib/desy-views/components/tabs/tabs.component.js +6 -18
- package/esm2015/lib/desy-views/components/tooltip/tooltip.component.js +2 -10
- package/esm2015/lib/desy-views/desy-views.module.js +4 -1
- package/esm2015/lib/desy-views/services/alert.service.js +8 -9
- package/esm2015/lib/shared/components/accessibility-and-text-or-html-required/accessibility-and-text-or-html-required.component.js +1 -1
- package/esm2015/lib/shared/components/text-or-html-required/text-or-html-required.component.js +1 -13
- package/esm2015/lib/shared/shared.module.js +1 -4
- package/esm2015/lib/shared/utils/search-utils.js +22 -1
- package/fesm2015/desy-angular.js +123 -593
- package/fesm2015/desy-angular.js.map +1 -1
- package/lib/desy-forms/components/character-count/character-count.component.d.ts +0 -1
- package/lib/desy-forms/components/date-input/date-input-day/date-input-day.component.d.ts +2 -3
- package/lib/desy-forms/components/date-input/date-input-month/date-input-month.component.d.ts +2 -3
- package/lib/desy-forms/components/date-input/date-input-year/date-input-year.component.d.ts +2 -3
- package/lib/desy-forms/components/date-input/date-input.component.d.ts +2 -4
- package/lib/desy-forms/components/file-upload/file-upload.component.d.ts +1 -4
- package/lib/desy-forms/components/input/input.component.d.ts +3 -2
- package/lib/desy-forms/components/input-group/input-group-input/input-group-input.component.d.ts +2 -3
- package/lib/desy-forms/components/input-group/input-group-select/input-group-select.component.d.ts +2 -3
- package/lib/desy-forms/components/input-group/input-group.component.d.ts +4 -2
- package/lib/desy-forms/components/search-bar/search-bar.component.d.ts +2 -5
- package/lib/desy-forms/components/select/select.component.d.ts +5 -5
- package/lib/desy-forms/components/textarea/textarea.component.d.ts +2 -3
- package/lib/desy-forms/directives/condition.directive.d.ts +2 -2
- package/lib/desy-modals/components/modal/modal.component.d.ts +2 -4
- package/lib/desy-nav/components/breadcrumbs/breadcrumbs.component.d.ts +0 -1
- package/lib/desy-nav/components/error-summary/error-summary.component.d.ts +0 -1
- package/lib/desy-nav/components/header/header-dropdown/header-dropdown.component.d.ts +0 -1
- package/lib/desy-nav/components/header/header-offcanvas/header-offcanvas-button/header-offcanvas-button.component.d.ts +0 -1
- package/lib/desy-nav/components/header/header-offcanvas/header-offcanvas.component.d.ts +0 -1
- package/lib/desy-nav/components/header/header-subnav/header-subnav.component.d.ts +0 -1
- package/lib/desy-nav/components/menu-horizontal/menu-horizontal.component.d.ts +2 -4
- package/lib/desy-nav/components/menu-vertical/menu-vertical.component.d.ts +0 -1
- package/lib/desy-nav/components/menubar/menubar.component.d.ts +0 -1
- package/lib/desy-nav/components/nav/nav.component.d.ts +2 -4
- package/lib/desy-nav/components/notification/notification.component.d.ts +2 -4
- package/lib/desy-nav/components/skip-link/skip-link.component.d.ts +0 -1
- package/lib/desy-tables/components/table/table.component.d.ts +0 -1
- package/lib/desy-tables/components/table-advanced/table-advanced.component.d.ts +0 -1
- package/lib/desy-views/components/accordion/accordion.component.d.ts +2 -4
- package/lib/desy-views/components/collapsible/collapsible.component.d.ts +2 -3
- package/lib/desy-views/components/description-list/description-list.component.d.ts +0 -1
- package/lib/desy-views/components/details/details.component.d.ts +1 -5
- package/lib/desy-views/components/item/item.component.d.ts +2 -5
- package/lib/desy-views/components/media-object/media-object-figure/media-object-figure.component.d.ts +3 -0
- package/lib/desy-views/components/media-object/media-object.component.d.ts +7 -4
- package/lib/desy-views/components/status/status.component.d.ts +1 -3
- package/lib/desy-views/components/status-item/status-item.component.d.ts +2 -4
- package/lib/desy-views/components/tabs/tabs.component.d.ts +2 -4
- package/lib/desy-views/components/tooltip/tooltip.component.d.ts +2 -4
- package/lib/shared/components/accessibility-and-text-or-html-required/accessibility-and-text-or-html-required.component.d.ts +1 -3
- package/lib/shared/components/text-or-html-required/text-or-html-required.component.d.ts +3 -11
- package/package.json +1 -1
- package/esm2015/lib/shared/directives/content-empty.directive.js +0 -86
- package/lib/shared/directives/content-empty.directive.d.ts +0 -26
package/esm2015/lib/desy-nav/components/header/header-offcanvas/header-offcanvas.component.js
CHANGED
|
@@ -48,9 +48,6 @@ export class HeaderOffcanvasComponent {
|
|
|
48
48
|
bindButton(button) {
|
|
49
49
|
button.openOffcanvas = this.open.bind(this);
|
|
50
50
|
}
|
|
51
|
-
handleEmptyContent(element) {
|
|
52
|
-
throw new Error(`${element} content is required`);
|
|
53
|
-
}
|
|
54
51
|
}
|
|
55
52
|
HeaderOffcanvasComponent.dialogOptions = {
|
|
56
53
|
id: 'header-offcanvas-dialog',
|
|
@@ -62,7 +59,7 @@ HeaderOffcanvasComponent.dialogOptions = {
|
|
|
62
59
|
HeaderOffcanvasComponent.decorators = [
|
|
63
60
|
{ type: Component, args: [{
|
|
64
61
|
selector: 'desy-header-offcanvas',
|
|
65
|
-
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\"
|
|
62
|
+
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 <ng-container *desyCustomInnerContent=\"{ component: closeButton }\"></ng-container> <svg 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"
|
|
66
63
|
},] }
|
|
67
64
|
];
|
|
68
65
|
HeaderOffcanvasComponent.ctorParameters = () => [
|
|
@@ -88,4 +85,4 @@ __decorate([
|
|
|
88
85
|
__decorate([
|
|
89
86
|
DesyContentChild()
|
|
90
87
|
], HeaderOffcanvasComponent.prototype, "closeButton", void 0);
|
|
91
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVhZGVyLW9mZmNhbnZhcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kZXN5LWFuZ3VsYXIvc3JjL2xpYi9kZXN5LW5hdi9jb21wb25lbnRzL2hlYWRlci9oZWFkZXItb2ZmY2FudmFzL2hlYWRlci1vZmZjYW52YXMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUVULGVBQWUsRUFDZixXQUFXLEVBQ1gsS0FBSyxFQUdMLFNBQVMsRUFDVixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUMsZ0JBQWdCLEVBQ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c3RDbGFzcygpOiB2b2lkIHtcclxuICAgIHRoaXMuaG9zdENsYXNzID0gdGhpcy5jbGFzc2VzID8gdGhpcy5jbGFzc2VzIDogJy1tci0yIGZsZXggbGc6aGlkZGVuJztcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIEVubGF6YSBlbCBib3TDs24gZGVsIGNvbXBvbmVudGUgaGlqbyBjb24gbGEgYWNjacOzbiBkZSBhYnJpciBkZSBlc3RlIGNvbXBvbmVudGVcclxuICAgKiBAcGFyYW0gYnV0dG9uIGNvbXBvbmVudGUgYm90w7NuIHBhc2FkbyBjb21vIGNvbnRlbmlkb1xyXG4gICAqL1xyXG4gIGJpbmRCdXR0b24oYnV0dG9uOiBIZWFkZXJPZmZjYW52YXNCdXR0b25Db21wb25lbnQpOiB2b2lkIHtcclxuICAgIGJ1dHRvbi5vcGVuT2ZmY2FudmFzID0gdGhpcy5vcGVuLmJpbmQodGhpcyk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -14,14 +14,11 @@ export class HeaderSubnavComponent extends AccessibilityComponent {
|
|
|
14
14
|
nav.classes = 'w-max max-w-64';
|
|
15
15
|
// nav.id = 'id-subnav-nav'; // No existe como param de navComponent
|
|
16
16
|
}
|
|
17
|
-
handleEmptyContent(element) {
|
|
18
|
-
throw new Error(`${element} content is required`);
|
|
19
|
-
}
|
|
20
17
|
}
|
|
21
18
|
HeaderSubnavComponent.decorators = [
|
|
22
19
|
{ type: Component, args: [{
|
|
23
20
|
selector: 'desy-header-subnav',
|
|
24
|
-
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\"
|
|
21
|
+
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 <span 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"
|
|
25
22
|
},] }
|
|
26
23
|
];
|
|
27
24
|
HeaderSubnavComponent.propDecorators = {
|
|
@@ -34,4 +31,4 @@ HeaderSubnavComponent.propDecorators = {
|
|
|
34
31
|
__decorate([
|
|
35
32
|
DesyContentChild({ onSetCallbackName: 'overrideNavParams' })
|
|
36
33
|
], HeaderSubnavComponent.prototype, "nav", void 0);
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVhZGVyLXN1Ym5hdi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kZXN5LWFuZ3VsYXIvc3JjL2xpYi9kZXN5LW5hdi9jb21wb25lbnRzL2hlYWRlci9oZWFkZXItc3VibmF2L2hlYWRlci1zdWJ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XJuIHRoaXMubmF2ICYmIHRoaXMubmF2LmdldEl0ZW1MaXN0KCkubGVuZ3RoID4gMDtcclxuICB9XHJcblxyXG4gIG92ZXJyaWRlTmF2UGFyYW1zKG5hdjogTmF2Q29tcG9uZW50KTogdm9pZCB7XHJcbiAgICBuYXYuaGFzTmF2ID0gdHJ1ZTtcclxuICAgIG5hdi5pZFByZWZpeCA9ICdoZWFkZXItc3VibmF2LW5hdi1pdGVtJztcclxuICAgIG5hdi5hcmlhTGFiZWwgPSAnQXBsaWNhY2lvbmVzJztcclxuICAgIG5hdi5jbGFzc2VzID0gJ3ctbWF4IG1heC13LTY0JztcclxuICAgIC8vIG5hdi5pZCA9ICdpZC1zdWJuYXYtbmF2JzsgLy8gTm8gZXhpc3RlIGNvbW8gcGFyYW0gZGUgbmF2Q29tcG9uZW50XHJcbiAgfVxyXG5cclxuXHJcbn1cclxuIl19
|
|
@@ -6,8 +6,6 @@ export class MenuHorizontalComponent extends AccessibilityComponent {
|
|
|
6
6
|
super(...arguments);
|
|
7
7
|
this.clickEvent = new EventEmitter();
|
|
8
8
|
}
|
|
9
|
-
ngOnChanges(changes) {
|
|
10
|
-
}
|
|
11
9
|
onClick(event, item) {
|
|
12
10
|
const itemsActiveChange = [];
|
|
13
11
|
if (!item.active) {
|
|
@@ -37,19 +35,8 @@ export class MenuHorizontalComponent extends AccessibilityComponent {
|
|
|
37
35
|
}
|
|
38
36
|
getItemList() {
|
|
39
37
|
const itemList = this.itemComponents && this.itemComponents.length > 0 ? this.itemComponents.toArray() : this.items;
|
|
40
|
-
if (!itemList || itemList.length === 0) {
|
|
41
|
-
throw new Error(`items are required`);
|
|
42
|
-
}
|
|
43
|
-
itemList.forEach(item => {
|
|
44
|
-
if (!item.routerLink && !item.href) {
|
|
45
|
-
throw Error('item routerLink or href are required');
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
38
|
return itemList;
|
|
49
39
|
}
|
|
50
|
-
handleEmptyItem(position) {
|
|
51
|
-
throw new Error(`item content, html or text are required at position ${position}`);
|
|
52
|
-
}
|
|
53
40
|
getItemId(item, index) {
|
|
54
41
|
let id;
|
|
55
42
|
if (item.id) {
|
|
@@ -67,7 +54,7 @@ export class MenuHorizontalComponent extends AccessibilityComponent {
|
|
|
67
54
|
MenuHorizontalComponent.decorators = [
|
|
68
55
|
{ type: Component, args: [{
|
|
69
56
|
selector: 'desy-menu-horizontal',
|
|
70
|
-
template: "<!-- menu-horizontal -->\r\n<nav [class]=\"['c-menu-horizontal', 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 <ul class=\"c-menu-horizontal__list lg:flex lg:flex-wrap\">\r\n <ng-container *ngFor=\"let item of getItemList(); index as i\">\r\n <li *ngIf=\"item\">\r\n <span *ngIf=\"item.active; else elseBlock\" [attr.id]=\"getItemId(item, i)\"\r\n [class]=\"['c-menu-horizontal__active flex items-center relative py-sm lg:px-lg lg:py-base border border-transparent truncate font-semibold', item.classes] | makeHtmlList\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n aria-current=\"page\"\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.ariaDisabled ? item.ariaDisabled : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : 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.tabindex]=\"item.tabindex ? item.tabindex : null\">\r\n <strong
|
|
57
|
+
template: "<!-- menu-horizontal -->\r\n<nav [class]=\"['c-menu-horizontal', 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 <ul class=\"c-menu-horizontal__list lg:flex lg:flex-wrap\">\r\n <ng-container *ngFor=\"let item of getItemList(); index as i\">\r\n <li *ngIf=\"item\">\r\n <span *ngIf=\"item.active; else elseBlock\" [attr.id]=\"getItemId(item, i)\"\r\n [class]=\"['c-menu-horizontal__active flex items-center relative py-sm lg:px-lg lg:py-base border border-transparent truncate font-semibold', item.classes] | makeHtmlList\"\r\n [attr.title]=\"item.title ? item.title : null\"\r\n [attr.role]=\"item.role ? item.role : null\"\r\n aria-current=\"page\"\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.ariaDisabled ? item.ariaDisabled : null\"\r\n [attr.aria-controls]=\"item.ariaControls ? item.ariaControls : 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.tabindex]=\"item.tabindex ? item.tabindex : null\">\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 <ng-template #elseBlock>\r\n <a *ngIf=\"item.routerLink && !item.href\" (click)=\"onClick($event, item)\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [routerLink]=\"item.routerLink\"\r\n [fragment]=\"item.fragment\"\r\n [class]=\"['c-menu-horizontal__link relative flex items-center py-sm lg:px-lg lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'no-underline pointer-events-none': item.disabled}\"\r\n [attr.disabled]=\"item.disabled ? 'disabled' : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : item.tabindex\"\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 <span class=\"flex items-center pointer-events-none\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n </span>\r\n </a>\r\n <a *ngIf=\"!item.routerLink && item.href\" (click)=\"onClick($event, item)\"\r\n [attr.id]=\"getItemId(item, i)\"\r\n [href]=\"item.href | externalHref\"\r\n [target]=\"item.target\"\r\n [class]=\"['c-menu-horizontal__link relative flex items-center py-sm lg:px-lg lg:py-base border border-transparent text-black hover:text-primary-base underline truncate focus:outline-none', item.classes] | makeHtmlList\"\r\n [ngClass]=\"{'no-underline pointer-events-none': item.disabled}\"\r\n [attr.disabled]=\"item.disabled ? 'disabled' : null\"\r\n [attr.aria-disabled]=\"item.disabled ? item.disabled : null\"\r\n [attr.tabindex]=\"item.disabled ? -1 : item.tabindex\"\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 <span class=\"flex items-center pointer-events-none\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n </span>\r\n </a>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</nav>\r\n<!-- /menu-horizontal -->\r\n"
|
|
71
58
|
},] }
|
|
72
59
|
];
|
|
73
60
|
MenuHorizontalComponent.propDecorators = {
|
|
@@ -78,4 +65,4 @@ MenuHorizontalComponent.propDecorators = {
|
|
|
78
65
|
itemComponents: [{ type: ContentChildren, args: [MenuHorizontalItemComponent,] }],
|
|
79
66
|
clickEvent: [{ type: Output }]
|
|
80
67
|
};
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS1ob3Jpem9udGFsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Rlc3ktYW5ndWxhci9zcmMvbGliL2Rlc3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OiBNZW51SG9yaXpvbnRhbEl0ZW1EYXRhLCBpbmRleDogbnVtYmVyKTogc3RyaW5nIHtcclxuICAgIGxldCBpZDtcclxuICAgIGlmIChpdGVtLmlkKSB7XHJcbiAgICAgIGlkID0gaXRlbS5pZDtcclxuICAgIH0gZWxzZSBpZiAoaW5kZXggPT09IDApIHtcclxuICAgICAgaWQgPSB0aGlzLmdldElkUHJlZml4KCk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBpZCA9IHRoaXMuZ2V0SWRQcmVmaXgoKSArICctJyArIGluZGV4O1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIGlkO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -5,9 +5,6 @@ import { StringUtils } from '../../../shared/utils/string-utils';
|
|
|
5
5
|
import { MenuVerticalItemComponent } from './menu-vertical-item/menu-vertical-item.component';
|
|
6
6
|
import { MenuVerticalItemSubComponent } from './menu-vertical-item-sub/menu-vertical-item-sub.component';
|
|
7
7
|
export class MenuVerticalComponent extends AccessibilityComponent {
|
|
8
|
-
handleItemContentEmpty(index, isRoot) {
|
|
9
|
-
throw new Error(`${isRoot ? 'Item' : 'Subitem'} content, html or text ar required at position ${index}`);
|
|
10
|
-
}
|
|
11
8
|
getItemHtml(item) {
|
|
12
9
|
let itemHtml;
|
|
13
10
|
if (item.active) {
|
|
@@ -50,9 +47,6 @@ export class MenuVerticalComponent extends AccessibilityComponent {
|
|
|
50
47
|
}
|
|
51
48
|
getItems() {
|
|
52
49
|
const itemList = this.itemComponents && this.itemComponents.length > 0 ? this.itemComponents.toArray() : this.items;
|
|
53
|
-
if (!itemList || itemList.length === 0) {
|
|
54
|
-
throw new Error(`items are required`);
|
|
55
|
-
}
|
|
56
50
|
return itemList;
|
|
57
51
|
}
|
|
58
52
|
getItemSub(item) {
|
|
@@ -66,7 +60,7 @@ export class MenuVerticalComponent extends AccessibilityComponent {
|
|
|
66
60
|
MenuVerticalComponent.decorators = [
|
|
67
61
|
{ type: Component, args: [{
|
|
68
62
|
selector: 'desy-menu-vertical',
|
|
69
|
-
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
|
|
63
|
+
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 [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 [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 [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",
|
|
70
64
|
animations: [
|
|
71
65
|
trigger('displayMenuVertical', [
|
|
72
66
|
state('void', style({
|
|
@@ -92,4 +86,4 @@ MenuVerticalComponent.propDecorators = {
|
|
|
92
86
|
classes: [{ type: Input }],
|
|
93
87
|
itemComponents: [{ type: ContentChildren, args: [MenuVerticalItemComponent,] }]
|
|
94
88
|
};
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS12ZXJ0aWNhbC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kZXN5LWFuZ3VsYXIvc3JjL2xpYi9kZXN5LW5hdi9jb21wb25lbnRzL21lbnUtdmVydGljYWwvbWVudS12ZXJ0aWNhbC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxLQUFLLEVBQUUsZUFBZSxFQUFZLE1BQU0sZUFBZSxDQUFDO0FBQzNFLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBRXBFLE9BQU8sRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxVQUFVLEVBQUUsT0FBTyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDakYsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLG9DQUFvQyxDQUFDO0FBQ2pFLE9BQU8sRUFBQyx5QkF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