desy-angular 2.0.2 → 5.0.1
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/README.md +5 -5
- package/bundles/desy-angular.umd.js +5961 -1898
- 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 +30 -17
- package/desy-angular.metadata.json +1 -1
- package/esm2015/desy-angular.js +31 -18
- package/esm2015/lib/desy-angular.module.js +6 -3
- package/esm2015/lib/desy-buttons/components/button/button.component.js +9 -20
- package/esm2015/lib/desy-buttons/components/button-loader/button-loader.component.js +8 -3
- package/esm2015/lib/desy-buttons/components/dropdown/dropdown.component.js +76 -17
- package/esm2015/lib/desy-buttons/components/listbox/listbox-item/listbox-item.component.js +26 -0
- package/esm2015/lib/desy-buttons/components/listbox/listbox-label/listbox-label.component.js +14 -0
- package/esm2015/lib/desy-buttons/components/listbox/listbox.component.js +287 -0
- package/esm2015/lib/desy-buttons/components/pill/pill.component.js +8 -10
- package/esm2015/lib/desy-buttons/desy-buttons.module.js +15 -4
- package/esm2015/lib/desy-buttons/interfaces/listbox-item-data.js +2 -0
- package/esm2015/lib/desy-buttons/interfaces/listbox-label-data.js +2 -0
- package/esm2015/lib/desy-commons/components/content/content.component.js +14 -0
- package/esm2015/lib/desy-commons/components/description/description.component.js +14 -0
- package/esm2015/lib/desy-commons/components/icon/icon.component.js +14 -0
- package/esm2015/lib/desy-commons/components/title/title.component.js +14 -0
- package/esm2015/lib/desy-commons/desy-commons.module.js +33 -0
- package/esm2015/lib/desy-commons/interfaces/content-data.js +2 -0
- package/esm2015/lib/desy-commons/interfaces/description-data.js +2 -0
- package/esm2015/lib/desy-commons/interfaces/icon-data.js +2 -0
- package/esm2015/lib/desy-commons/interfaces/index.js +5 -0
- package/esm2015/lib/desy-commons/interfaces/title-data.js +2 -0
- package/esm2015/lib/desy-forms/components/character-count/character-count.component.js +2 -2
- package/esm2015/lib/desy-forms/components/checkboxes/checkbox-item/checkbox-item.component.js +190 -0
- package/esm2015/lib/desy-forms/components/checkboxes/checkboxes.component.js +181 -74
- package/esm2015/lib/desy-forms/components/date-input/date-input-day/date-input-day.component.js +46 -0
- package/esm2015/lib/desy-forms/components/date-input/date-input-divider/date-input-divider.component.js +19 -0
- package/esm2015/lib/desy-forms/components/date-input/date-input-item/date-input-item.component.js +13 -0
- package/esm2015/lib/desy-forms/components/date-input/date-input-month/date-input-month.component.js +46 -0
- package/esm2015/lib/desy-forms/components/date-input/date-input-year/date-input-year.component.js +44 -0
- package/esm2015/lib/desy-forms/components/date-input/date-input.component.js +132 -27
- package/esm2015/lib/desy-forms/components/error-message/error-message.component.js +17 -5
- package/esm2015/lib/desy-forms/components/fieldset/fieldset.component.js +27 -4
- package/esm2015/lib/desy-forms/components/fieldset/legend/legend.component.js +6 -5
- package/esm2015/lib/desy-forms/components/file-upload/file-upload.component.js +1 -1
- package/esm2015/lib/desy-forms/components/form-field/form-field.component.js +45 -7
- package/esm2015/lib/desy-forms/components/hint/hint.component.js +18 -6
- package/esm2015/lib/desy-forms/components/input/input.component.js +2 -3
- package/esm2015/lib/desy-forms/components/input-group/input-group-divider/input-group-divider.component.js +20 -0
- package/esm2015/lib/desy-forms/components/input-group/input-group-input/input-group-input.component.js +46 -0
- package/esm2015/lib/desy-forms/components/input-group/input-group-item/input-group-item.component.js +13 -0
- package/esm2015/lib/desy-forms/components/input-group/input-group-select/input-group-select.component.js +42 -0
- package/esm2015/lib/desy-forms/components/input-group/input-group.component.js +115 -21
- package/esm2015/lib/desy-forms/components/label/label.component.js +21 -8
- package/esm2015/lib/desy-forms/components/radios/radio-item/radio-item.component.js +147 -0
- package/esm2015/lib/desy-forms/components/radios/radios.component.js +198 -12
- package/esm2015/lib/desy-forms/components/search-bar/search-bar.component.js +14 -4
- package/esm2015/lib/desy-forms/components/select/option/option.component.js +17 -0
- package/esm2015/lib/desy-forms/components/select/option-group/option-group.component.js +17 -0
- package/esm2015/lib/desy-forms/components/select/select-item/select-item.component.js +14 -0
- package/esm2015/lib/desy-forms/components/select/select.component.js +33 -18
- package/esm2015/lib/desy-forms/components/template-driven-wrapper/template-driven-wrapper.component.js +1 -1
- package/esm2015/lib/desy-forms/components/textarea/textarea.component.js +1 -1
- package/esm2015/lib/desy-forms/desy-forms.module.js +43 -6
- package/esm2015/lib/desy-forms/directives/condition.directive.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/accesibility-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/error-message-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/fieldset-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/hint-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/index.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/item-checkbox-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/item-date-input-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/item-divider-date-input-data.js +2 -0
- package/esm2015/lib/desy-forms/interfaces/item-divider-input-group-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/item-input-group-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/item-radio-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/item-radio-with-template-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/label-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/legend-data.js +1 -1
- package/esm2015/lib/desy-forms/interfaces/select-item-data.js +1 -1
- package/esm2015/lib/desy-modals/components/dialog/dialog.component.js +1 -1
- package/esm2015/lib/desy-modals/components/modal/modal-button-primary/modal-button-primary.component.js +19 -0
- package/esm2015/lib/desy-modals/components/modal/modal-button-secondary/modal-button-secondary.component.js +19 -0
- package/esm2015/lib/desy-modals/components/modal/modal.component.js +106 -21
- package/esm2015/lib/desy-modals/desy-modals.module.js +7 -1
- package/esm2015/lib/desy-modals/interfaces/dialog-options.js +1 -1
- package/esm2015/lib/desy-modals/interfaces/index.js +1 -1
- package/esm2015/lib/desy-modals/interfaces/modal-button-data.js +1 -1
- package/esm2015/lib/desy-modals/interfaces/modal-data.js +1 -1
- package/esm2015/lib/desy-modals/interfaces/modal-icon-data.js +1 -1
- package/esm2015/lib/desy-modals/interfaces/modal-options.js +1 -1
- package/esm2015/lib/desy-modals/interfaces/open-dialog-result.js +1 -1
- package/esm2015/lib/desy-modals/services/dialog.service.js +1 -1
- package/esm2015/lib/desy-nav/components/breadcrumbs/breadcrumbs-item/breadcrumbs-item.component.js +15 -0
- package/esm2015/lib/desy-nav/components/breadcrumbs/breadcrumbs.component.js +18 -16
- package/esm2015/lib/desy-nav/components/error-summary/error-summary-item/error-summary-item.component.js +15 -0
- package/esm2015/lib/desy-nav/components/error-summary/error-summary.component.js +34 -13
- package/esm2015/lib/desy-nav/components/footer/footer-meta/footer-meta-item/footer-meta-item.component.js +16 -0
- package/esm2015/lib/desy-nav/components/footer/footer-meta/footer-meta.component.js +23 -0
- package/esm2015/lib/desy-nav/components/footer/footer-navigation/footer-navigation-item/footer-navigation-item.component.js +16 -0
- package/esm2015/lib/desy-nav/components/footer/footer-navigation/footer-navigation.component.js +16 -0
- package/esm2015/lib/desy-nav/components/footer/footer.component.js +31 -8
- package/esm2015/lib/desy-nav/components/header/header-dropdown/header-dropdown.component.js +26 -36
- package/esm2015/lib/desy-nav/components/header/header-navigation/header-navigation-item/header-navigation-item.component.js +19 -0
- package/esm2015/lib/desy-nav/components/header/header-navigation/header-navigation.component.js +14 -7
- package/esm2015/lib/desy-nav/components/header/header-offcanvas/header-offcanvas-button/header-offcanvas-button.component.js +25 -0
- package/esm2015/lib/desy-nav/components/header/header-offcanvas/header-offcanvas-close-button/header-offcanvas-close-button.component.js +11 -0
- package/esm2015/lib/desy-nav/components/header/header-offcanvas/header-offcanvas.component.js +76 -14
- package/esm2015/lib/desy-nav/components/header/header-subnav/header-subnav.component.js +26 -36
- package/esm2015/lib/desy-nav/components/header/header.component.js +38 -7
- package/esm2015/lib/desy-nav/components/menu-horizontal/menu-horizontal-item/menu-horizontal-item.component.js +28 -0
- package/esm2015/lib/desy-nav/components/menu-horizontal/menu-horizontal.component.js +41 -21
- package/esm2015/lib/desy-nav/components/menu-vertical/menu-vertical-item/menu-vertical-item.component.js +32 -0
- package/esm2015/lib/desy-nav/components/menu-vertical/menu-vertical-item-sub/menu-vertical-item-sub.component.js +16 -0
- package/esm2015/lib/desy-nav/components/menu-vertical/menu-vertical-item-sub-item/menu-vertical-item-sub-item.component.js +24 -0
- package/esm2015/lib/desy-nav/components/menu-vertical/menu-vertical.component.js +43 -93
- package/esm2015/lib/desy-nav/components/menubar/components/menubar-item/menubar-item.component.js +36 -0
- package/esm2015/lib/desy-nav/components/menubar/components/menubar-label/menubar-label.component.js +14 -0
- package/esm2015/lib/desy-nav/components/menubar/components/menubar-subitem/menubar-subitem.component.js +29 -0
- package/esm2015/lib/desy-nav/components/menubar/components/menubar-subsubitem/menubar-subsubitem.component.js +23 -0
- package/esm2015/lib/desy-nav/components/menubar/directives/menubaritem.directive.js +37 -0
- package/esm2015/lib/desy-nav/components/menubar/menubar.component.js +656 -0
- package/esm2015/lib/desy-nav/components/nav/nav-item/nav-item.component.js +30 -0
- package/esm2015/lib/desy-nav/components/nav/nav.component.js +44 -22
- package/esm2015/lib/desy-nav/components/notification/notification-item/notification-item.component.js +18 -0
- package/esm2015/lib/desy-nav/components/notification/notification.component.js +49 -22
- package/esm2015/lib/desy-nav/components/skip-link/skip-link.component.js +24 -5
- package/esm2015/lib/desy-nav/desy-nav.module.js +78 -12
- package/esm2015/lib/desy-nav/interfaces/breadcrumbs.data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/error-summary-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/footer-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/header-dropdown-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/header-navigation-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/header-navigation-item-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/header-offcanvas-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/header-subnav-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/index.js +1 -5
- package/esm2015/lib/desy-nav/interfaces/menu-horizontal-item-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/menu-horizontal-item-event-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/menu-vertical-items-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/menu-vertical-sub-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/menu-vertical-sub-items-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/menubar-item-sub-item-sub-item.js +2 -0
- package/esm2015/lib/desy-nav/interfaces/menubar-item-sub-item.js +2 -0
- package/esm2015/lib/desy-nav/interfaces/menubar-item-sub.js +2 -0
- package/esm2015/lib/desy-nav/interfaces/menubar-item.js +2 -0
- package/esm2015/lib/desy-nav/interfaces/nav-item-event.data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/nav-item.data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/notification-items-data.js +1 -1
- package/esm2015/lib/desy-nav/interfaces/notification-options.js +1 -1
- package/esm2015/lib/desy-pagination/components/pagination/pagination.component.js +41 -76
- package/esm2015/lib/desy-pagination/desy-pagination.module.js +1 -1
- package/esm2015/lib/desy-pagination/interfaces/index.js +1 -1
- package/esm2015/lib/desy-pagination/interfaces/pagination-item.data.js +1 -1
- package/esm2015/lib/desy-tables/components/table/components/table-caption.component.js +14 -0
- package/esm2015/lib/desy-tables/components/table/components/table-cell.component.js +17 -0
- package/esm2015/lib/desy-tables/components/table/components/table-header.component.js +14 -0
- package/esm2015/lib/desy-tables/components/table/components/table-row.component.js +14 -0
- package/esm2015/lib/desy-tables/components/table/table.component.js +47 -14
- package/esm2015/lib/desy-tables/components/table-advanced/components/table-advanced-header-cell.component.js +20 -0
- package/esm2015/lib/desy-tables/components/table-advanced/components/table-advanced-header.component.js +14 -0
- package/esm2015/lib/desy-tables/components/table-advanced/components/table-advanced-row-cell.component.js +17 -0
- package/esm2015/lib/desy-tables/components/table-advanced/components/table-advanced-row.component.js +20 -0
- package/esm2015/lib/desy-tables/components/table-advanced/table-advanced.component.js +173 -149
- package/esm2015/lib/desy-tables/desy-tables.module.js +31 -3
- package/esm2015/lib/desy-tables/directives/cell.directive.js +26 -0
- package/esm2015/lib/desy-tables/directives/focus-clicked-cell.directive.js +12 -8
- package/esm2015/lib/desy-tables/directives/row.directive.js +24 -0
- package/esm2015/lib/desy-tables/interfaces/cell-data.js +1 -1
- package/esm2015/lib/desy-tables/interfaces/head-cell-data.js +1 -1
- package/esm2015/lib/desy-tables/interfaces/index.js +2 -1
- package/esm2015/lib/desy-tables/interfaces/recalculate-table-params.js +2 -0
- package/esm2015/lib/desy-tables/interfaces/row-data.js +1 -1
- package/esm2015/lib/desy-tables/interfaces/wrapper-data.js +2 -0
- package/esm2015/lib/desy-views/components/accordion/accordion-header/accordion-header.component.js +14 -0
- package/esm2015/lib/desy-views/components/accordion/accordion-item/accordion-item.component.js +33 -0
- package/esm2015/lib/desy-views/components/accordion/accordion.component.js +84 -56
- package/esm2015/lib/desy-views/components/alert/alert.component.js +28 -23
- package/esm2015/lib/desy-views/components/collapsible/collapsible.component.js +6 -10
- package/esm2015/lib/desy-views/components/description-list/definition/definition.component.js +15 -0
- package/esm2015/lib/desy-views/components/description-list/description-item/description-item.component.js +26 -0
- package/esm2015/lib/desy-views/components/description-list/description-list.component.js +13 -23
- package/esm2015/lib/desy-views/components/description-list/term/term.component.js +15 -0
- package/esm2015/lib/desy-views/components/details/details.component.js +1 -1
- package/esm2015/lib/desy-views/components/item/item-content-bottom/item-content-bottom.component.js +14 -0
- package/esm2015/lib/desy-views/components/item/item-content-right/item-content-right.component.js +11 -0
- package/esm2015/lib/desy-views/components/item/item-item/item-item.component.js +11 -0
- package/esm2015/lib/desy-views/components/item/item.component.js +57 -24
- package/esm2015/lib/desy-views/components/media-object/media-object.component.js +1 -1
- package/esm2015/lib/desy-views/components/spinner/spinner.component.js +1 -1
- package/esm2015/lib/desy-views/components/status/status.component.js +2 -2
- package/esm2015/lib/desy-views/components/status-item/status-item.component.js +39 -26
- package/esm2015/lib/desy-views/components/tabs/panel/panel.component.js +15 -0
- package/esm2015/lib/desy-views/components/tabs/tab-item/tab-item.component.js +28 -0
- package/esm2015/lib/desy-views/components/tabs/tabs.component.js +58 -36
- package/esm2015/lib/desy-views/components/tooltip/tooltip-content/tooltip-content.component.js +11 -0
- package/esm2015/lib/desy-views/components/tooltip/tooltip.component.js +132 -0
- package/esm2015/lib/desy-views/desy-views.module.js +41 -1
- package/esm2015/lib/desy-views/interfaces/accordion-header.data.js +1 -1
- package/esm2015/lib/desy-views/interfaces/accordion-item.data.js +1 -1
- package/esm2015/lib/desy-views/interfaces/alert-options.js +1 -1
- package/esm2015/lib/desy-views/interfaces/description-item.data.js +2 -0
- package/esm2015/lib/desy-views/interfaces/index.js +4 -4
- package/esm2015/lib/desy-views/interfaces/open-alert-result.js +1 -1
- package/esm2015/lib/desy-views/interfaces/status-data.js +1 -1
- package/esm2015/lib/desy-views/interfaces/status-icon-data.js +1 -1
- package/esm2015/lib/desy-views/interfaces/status-item-title-data.js +1 -1
- package/esm2015/lib/desy-views/interfaces/tabs-items-data.js +1 -1
- package/esm2015/lib/desy-views/interfaces/tabs-panel-data.js +1 -1
- package/esm2015/lib/desy-views/interfaces/term-definition.data.js +2 -0
- package/esm2015/lib/desy-views/services/alert.service.js +1 -1
- package/esm2015/lib/shared/components/accessibility/accessibility.component.js +1 -1
- package/esm2015/lib/shared/components/accessibility-and-content-required/accessibility-and-content-required.component.js +27 -0
- 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/content-base/content-base.component.js +20 -0
- package/esm2015/lib/shared/components/index.js +3 -1
- package/esm2015/lib/shared/components/text-or-html-required/text-or-html-required.component.js +1 -1
- package/esm2015/lib/shared/decorators/desy-content-child.decorator.js +41 -0
- package/esm2015/lib/shared/decorators/desy-on-input-change.decorator.js +19 -0
- package/esm2015/lib/shared/directives/attribute-change.directive.js +43 -0
- package/esm2015/lib/shared/directives/click-outside.directive.js +1 -1
- package/esm2015/lib/shared/directives/content-change.directive.js +43 -0
- package/esm2015/lib/shared/directives/content-empty.directive.js +86 -0
- package/esm2015/lib/shared/directives/custom-inner-content.directive.js +62 -0
- package/esm2015/lib/shared/directives/inner-content.directive.js +5 -3
- package/esm2015/lib/shared/interfaces/accesibility-data.js +1 -1
- package/esm2015/lib/shared/pipes/external-href.pipe.js +28 -0
- package/esm2015/lib/shared/pipes/inner-html.pipe.js +1 -1
- package/esm2015/lib/shared/pipes/make-html-list.pipe.js +1 -1
- package/esm2015/lib/shared/shared.module.js +23 -4
- package/esm2015/lib/shared/utils/focus-utils.js +1 -1
- package/esm2015/lib/shared/utils/search-utils.js +1 -1
- package/esm2015/lib/shared/utils/string-utils.js +18 -0
- package/esm2015/public-api.js +88 -29
- package/fesm2015/desy-angular.js +5759 -2069
- package/fesm2015/desy-angular.js.map +1 -1
- package/lib/desy-buttons/components/button/button.component.d.ts +6 -7
- package/lib/desy-buttons/components/button-loader/button-loader.component.d.ts +1 -0
- package/lib/desy-buttons/components/dropdown/dropdown.component.d.ts +9 -7
- package/lib/desy-buttons/components/listbox/listbox-item/listbox-item.component.d.ts +12 -0
- package/lib/desy-buttons/components/listbox/listbox-label/listbox-label.component.d.ts +4 -0
- package/lib/desy-buttons/components/listbox/listbox.component.d.ts +53 -0
- package/lib/desy-buttons/components/pill/pill.component.d.ts +3 -3
- package/lib/desy-buttons/interfaces/listbox-item-data.d.ts +9 -0
- package/lib/{desy-nav/interfaces/notification-title-data.d.ts → desy-buttons/interfaces/listbox-label-data.d.ts} +1 -1
- package/lib/desy-commons/components/content/content.component.d.ts +5 -0
- package/lib/desy-commons/components/description/description.component.d.ts +5 -0
- package/lib/desy-commons/components/icon/icon.component.d.ts +5 -0
- package/lib/desy-commons/components/title/title.component.d.ts +5 -0
- package/lib/desy-commons/desy-commons.module.d.ts +2 -0
- package/lib/{desy-nav/interfaces/notification-content-data.d.ts → desy-commons/interfaces/content-data.d.ts} +1 -1
- package/lib/desy-commons/interfaces/description-data.d.ts +5 -0
- package/lib/desy-commons/interfaces/icon-data.d.ts +4 -0
- package/lib/desy-commons/interfaces/index.d.ts +4 -0
- package/lib/desy-commons/interfaces/title-data.d.ts +6 -0
- package/lib/desy-forms/components/checkboxes/checkbox-item/checkbox-item.component.d.ts +47 -0
- package/lib/desy-forms/components/checkboxes/checkboxes.component.d.ts +53 -15
- package/lib/desy-forms/components/date-input/date-input-day/date-input-day.component.d.ts +22 -0
- package/lib/desy-forms/components/date-input/date-input-divider/date-input-divider.component.d.ts +7 -0
- package/lib/desy-forms/components/date-input/date-input-item/date-input-item.component.d.ts +4 -0
- package/lib/desy-forms/components/date-input/date-input-month/date-input-month.component.d.ts +22 -0
- package/lib/desy-forms/components/date-input/date-input-year/date-input-year.component.d.ts +19 -0
- package/lib/desy-forms/components/date-input/date-input.component.d.ts +21 -4
- package/lib/desy-forms/components/error-message/error-message.component.d.ts +8 -2
- package/lib/desy-forms/components/fieldset/fieldset.component.d.ts +12 -4
- package/lib/desy-forms/components/fieldset/legend/legend.component.d.ts +3 -2
- package/lib/desy-forms/components/form-field/form-field.component.d.ts +7 -18
- package/lib/desy-forms/components/hint/hint.component.d.ts +8 -2
- package/lib/desy-forms/components/input-group/input-group-divider/input-group-divider.component.d.ts +8 -0
- package/lib/desy-forms/components/input-group/input-group-input/input-group-input.component.d.ts +20 -0
- package/lib/desy-forms/components/input-group/input-group-item/input-group-item.component.d.ts +4 -0
- package/lib/desy-forms/components/input-group/input-group-select/input-group-select.component.d.ts +16 -0
- package/lib/desy-forms/components/input-group/input-group.component.d.ts +24 -6
- package/lib/desy-forms/components/label/label.component.d.ts +12 -5
- package/lib/desy-forms/components/radios/radio-item/radio-item.component.d.ts +43 -0
- package/lib/desy-forms/components/radios/radios.component.d.ts +56 -11
- package/lib/desy-forms/components/search-bar/search-bar.component.d.ts +7 -3
- package/lib/desy-forms/components/select/option/option.component.d.ts +7 -0
- package/lib/desy-forms/components/select/option-group/option-group.component.d.ts +7 -0
- package/lib/desy-forms/components/select/select-item/select-item.component.d.ts +4 -0
- package/lib/desy-forms/components/select/select.component.d.ts +9 -2
- package/lib/desy-forms/interfaces/error-message-data.d.ts +5 -5
- package/lib/desy-forms/interfaces/fieldset-data.d.ts +5 -4
- package/lib/desy-forms/interfaces/hint-data.d.ts +4 -4
- package/lib/desy-forms/interfaces/item-checkbox-data.d.ts +1 -0
- package/lib/desy-forms/interfaces/item-date-input-data.d.ts +3 -0
- package/lib/desy-forms/interfaces/item-divider-date-input-data.d.ts +5 -0
- package/lib/desy-forms/interfaces/item-input-group-data.d.ts +1 -2
- package/lib/desy-forms/interfaces/item-radio-data.d.ts +15 -12
- package/lib/desy-forms/interfaces/legend-data.d.ts +4 -4
- package/lib/desy-forms/interfaces/select-item-data.d.ts +2 -1
- package/lib/desy-modals/components/modal/modal-button-primary/modal-button-primary.component.d.ts +7 -0
- package/lib/desy-modals/components/modal/modal-button-secondary/modal-button-secondary.component.d.ts +7 -0
- package/lib/desy-modals/components/modal/modal.component.d.ts +27 -2
- package/lib/desy-modals/interfaces/modal-button-data.d.ts +2 -2
- package/lib/desy-nav/components/breadcrumbs/breadcrumbs-item/breadcrumbs-item.component.d.ts +6 -0
- package/lib/desy-nav/components/breadcrumbs/breadcrumbs.component.d.ts +7 -4
- package/lib/desy-nav/components/error-summary/error-summary-item/error-summary-item.component.d.ts +6 -0
- package/lib/desy-nav/components/error-summary/error-summary.component.d.ts +12 -4
- package/lib/desy-nav/components/footer/footer-meta/footer-meta-item/footer-meta-item.component.d.ts +7 -0
- package/lib/desy-nav/components/footer/footer-meta/footer-meta.component.d.ts +10 -0
- package/lib/desy-nav/components/footer/footer-navigation/footer-navigation-item/footer-navigation-item.component.d.ts +7 -0
- package/lib/desy-nav/components/footer/footer-navigation/footer-navigation.component.d.ts +8 -0
- package/lib/desy-nav/components/footer/footer.component.d.ts +15 -3
- package/lib/desy-nav/components/header/header-dropdown/header-dropdown.component.d.ts +10 -6
- package/lib/desy-nav/components/header/header-navigation/header-navigation-item/header-navigation-item.component.d.ts +10 -0
- package/lib/desy-nav/components/header/header-navigation/header-navigation.component.d.ts +6 -2
- package/lib/desy-nav/components/header/header-offcanvas/header-offcanvas-button/header-offcanvas-button.component.d.ts +6 -0
- package/lib/desy-nav/components/header/header-offcanvas/header-offcanvas-close-button/header-offcanvas-close-button.component.d.ts +3 -0
- package/lib/desy-nav/components/header/header-offcanvas/header-offcanvas.component.d.ts +30 -9
- package/lib/desy-nav/components/header/header-subnav/header-subnav.component.d.ts +11 -8
- package/lib/desy-nav/components/header/header.component.d.ts +16 -5
- package/lib/desy-nav/components/menu-horizontal/menu-horizontal-item/menu-horizontal-item.component.d.ts +15 -0
- package/lib/desy-nav/components/menu-horizontal/menu-horizontal.component.d.ts +6 -5
- package/lib/desy-nav/components/menu-vertical/menu-vertical-item/menu-vertical-item.component.d.ts +18 -0
- package/lib/desy-nav/components/menu-vertical/menu-vertical-item-sub/menu-vertical-item-sub.component.d.ts +8 -0
- package/lib/desy-nav/components/menu-vertical/menu-vertical-item-sub-item/menu-vertical-item-sub-item.component.d.ts +15 -0
- package/lib/desy-nav/components/menu-vertical/menu-vertical.component.d.ts +13 -18
- package/lib/desy-nav/components/menubar/components/menubar-item/menubar-item.component.d.ts +23 -0
- package/lib/desy-nav/components/menubar/components/menubar-label/menubar-label.component.d.ts +4 -0
- package/lib/desy-nav/components/menubar/components/menubar-subitem/menubar-subitem.component.d.ts +15 -0
- package/lib/desy-nav/components/menubar/components/menubar-subsubitem/menubar-subsubitem.component.d.ts +10 -0
- package/lib/desy-nav/components/menubar/directives/menubaritem.directive.d.ts +16 -0
- package/lib/desy-nav/components/menubar/menubar.component.d.ts +88 -0
- package/lib/desy-nav/components/nav/nav-item/nav-item.component.d.ts +17 -0
- package/lib/desy-nav/components/nav/nav.component.d.ts +7 -5
- package/lib/desy-nav/components/notification/notification-item/notification-item.component.d.ts +9 -0
- package/lib/desy-nav/components/notification/notification.component.d.ts +25 -11
- package/lib/desy-nav/components/skip-link/skip-link.component.d.ts +9 -2
- package/lib/desy-nav/interfaces/breadcrumbs.data.d.ts +4 -4
- package/lib/desy-nav/interfaces/error-summary-data.d.ts +4 -4
- package/lib/desy-nav/interfaces/footer-data.d.ts +7 -10
- package/lib/desy-nav/interfaces/header-dropdown-data.d.ts +5 -1
- package/lib/desy-nav/interfaces/header-offcanvas-data.d.ts +0 -1
- package/lib/desy-nav/interfaces/header-subnav-data.d.ts +6 -1
- package/lib/desy-nav/interfaces/index.d.ts +0 -4
- package/lib/desy-nav/interfaces/menu-vertical-items-data.d.ts +15 -13
- package/lib/desy-nav/interfaces/menu-vertical-sub-data.d.ts +3 -4
- package/lib/desy-nav/interfaces/menu-vertical-sub-items-data.d.ts +15 -12
- package/lib/desy-nav/interfaces/menubar-item-sub-item-sub-item.d.ts +6 -0
- package/lib/desy-nav/interfaces/menubar-item-sub-item.d.ts +9 -0
- package/lib/desy-nav/interfaces/menubar-item-sub.d.ts +6 -0
- package/lib/desy-nav/interfaces/menubar-item.d.ts +18 -0
- package/lib/desy-nav/interfaces/nav-item.data.d.ts +2 -1
- package/lib/desy-nav/interfaces/notification-items-data.d.ts +8 -5
- package/lib/desy-nav/interfaces/notification-options.d.ts +5 -8
- package/lib/desy-pagination/components/pagination/pagination.component.d.ts +7 -12
- package/lib/desy-tables/components/table/components/table-caption.component.d.ts +4 -0
- package/lib/desy-tables/components/table/components/table-cell.component.d.ts +8 -0
- package/lib/desy-tables/components/table/components/table-header.component.d.ts +5 -0
- package/lib/desy-tables/components/table/components/table-row.component.d.ts +5 -0
- package/lib/desy-tables/components/table/table.component.d.ts +16 -4
- package/lib/desy-tables/components/table-advanced/components/table-advanced-header-cell.component.d.ts +13 -0
- package/lib/desy-tables/components/table-advanced/components/table-advanced-header.component.d.ts +5 -0
- package/lib/desy-tables/components/table-advanced/components/table-advanced-row-cell.component.d.ts +8 -0
- package/lib/desy-tables/components/table-advanced/components/table-advanced-row.component.d.ts +8 -0
- package/lib/desy-tables/components/table-advanced/table-advanced.component.d.ts +66 -39
- package/lib/desy-tables/directives/cell.directive.d.ts +14 -0
- package/lib/desy-tables/directives/focus-clicked-cell.directive.d.ts +3 -3
- package/lib/desy-tables/directives/row.directive.d.ts +16 -0
- package/lib/desy-tables/interfaces/head-cell-data.d.ts +2 -2
- package/lib/desy-tables/interfaces/index.d.ts +1 -0
- package/lib/desy-tables/interfaces/recalculate-table-params.d.ts +11 -0
- package/lib/desy-tables/interfaces/row-data.d.ts +1 -0
- package/lib/desy-tables/interfaces/wrapper-data.d.ts +4 -0
- package/lib/desy-views/components/accordion/accordion-header/accordion-header.component.d.ts +5 -0
- package/lib/desy-views/components/accordion/accordion-item/accordion-item.component.d.ts +13 -0
- package/lib/desy-views/components/accordion/accordion.component.d.ts +20 -11
- package/lib/desy-views/components/alert/alert.component.d.ts +6 -4
- package/lib/desy-views/components/collapsible/collapsible.component.d.ts +4 -6
- package/lib/desy-views/components/description-list/definition/definition.component.d.ts +6 -0
- package/lib/desy-views/components/description-list/description-item/description-item.component.d.ts +9 -0
- package/lib/desy-views/components/description-list/description-list.component.d.ts +9 -6
- package/lib/desy-views/components/description-list/term/term.component.d.ts +6 -0
- package/lib/desy-views/components/item/item-content-bottom/item-content-bottom.component.d.ts +5 -0
- package/lib/desy-views/components/item/item-content-right/item-content-right.component.d.ts +3 -0
- package/lib/desy-views/components/item/item-item/item-item.component.d.ts +3 -0
- package/lib/desy-views/components/item/item.component.d.ts +28 -9
- package/lib/desy-views/components/status-item/status-item.component.d.ts +17 -6
- package/lib/desy-views/components/tabs/panel/panel.component.d.ts +6 -0
- package/lib/desy-views/components/tabs/tab-item/tab-item.component.d.ts +12 -0
- package/lib/desy-views/components/tabs/tabs.component.d.ts +15 -3
- package/lib/desy-views/components/tooltip/tooltip-content/tooltip-content.component.d.ts +3 -0
- package/lib/desy-views/components/tooltip/tooltip.component.d.ts +35 -0
- package/lib/desy-views/interfaces/accordion-header.data.d.ts +3 -3
- package/lib/desy-views/interfaces/accordion-item.data.d.ts +8 -8
- package/lib/desy-views/interfaces/description-item.data.d.ts +8 -0
- package/lib/desy-views/interfaces/index.d.ts +3 -3
- package/lib/desy-views/interfaces/tabs-items-data.d.ts +5 -5
- package/lib/desy-views/interfaces/tabs-panel-data.d.ts +4 -4
- package/lib/desy-views/interfaces/term-definition.data.d.ts +7 -0
- package/lib/shared/components/accessibility-and-content-required/accessibility-and-content-required.component.d.ts +26 -0
- package/lib/shared/components/content-base/content-base.component.d.ts +9 -0
- package/lib/shared/components/index.d.ts +2 -0
- package/lib/shared/decorators/desy-content-child.decorator.d.ts +15 -0
- package/lib/shared/decorators/desy-on-input-change.decorator.d.ts +5 -0
- package/lib/shared/directives/attribute-change.directive.d.ts +10 -0
- package/lib/shared/directives/content-change.directive.d.ts +19 -0
- package/lib/shared/directives/content-empty.directive.d.ts +26 -0
- package/lib/shared/directives/custom-inner-content.directive.d.ts +22 -0
- package/lib/shared/directives/inner-content.directive.d.ts +1 -0
- package/lib/shared/pipes/external-href.pipe.d.ts +8 -0
- package/lib/shared/utils/string-utils.d.ts +10 -0
- package/package.json +16 -11
- package/public-api.d.ts +75 -25
- package/esm2015/lib/desy-forms/components/checkboxes/item-checkbox/item-checkbox.component.js +0 -100
- package/esm2015/lib/desy-forms/components/radios/item-radio/item-radio.component.js +0 -89
- package/esm2015/lib/desy-nav/components/header/header-offcanvas-button/header-offcanvas-button.component.js +0 -62
- package/esm2015/lib/desy-nav/interfaces/notification-content-data.js +0 -2
- package/esm2015/lib/desy-nav/interfaces/notification-description-data.js +0 -2
- package/esm2015/lib/desy-nav/interfaces/notification-icon-data.js +0 -2
- package/esm2015/lib/desy-nav/interfaces/notification-title-data.js +0 -2
- package/esm2015/lib/desy-views/interfaces/description.data.js +0 -2
- package/esm2015/lib/desy-views/interfaces/item-data.js +0 -2
- package/esm2015/lib/desy-views/interfaces/item-description.data.js +0 -2
- package/esm2015/lib/shared/utils/navigation-utils.js +0 -18
- package/lib/desy-forms/components/checkboxes/item-checkbox/item-checkbox.component.d.ts +0 -39
- package/lib/desy-forms/components/radios/item-radio/item-radio.component.d.ts +0 -36
- package/lib/desy-nav/components/header/header-offcanvas-button/header-offcanvas-button.component.d.ts +0 -19
- package/lib/desy-nav/interfaces/notification-description-data.d.ts +0 -5
- package/lib/desy-nav/interfaces/notification-icon-data.d.ts +0 -3
- package/lib/desy-views/interfaces/description.data.d.ts +0 -7
- package/lib/desy-views/interfaces/item-data.d.ts +0 -19
- package/lib/desy-views/interfaces/item-description.data.d.ts +0 -8
- package/lib/shared/utils/navigation-utils.d.ts +0 -3
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { ContentBaseComponent } from '../../../../shared/components';
|
|
3
|
+
export class NavItemComponent extends ContentBaseComponent {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.clickEvent = new EventEmitter();
|
|
7
|
+
this.activeChange = new EventEmitter();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
NavItemComponent.decorators = [
|
|
11
|
+
{ type: Component, args: [{
|
|
12
|
+
selector: 'desy-nav-item',
|
|
13
|
+
template: "<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n"
|
|
14
|
+
},] }
|
|
15
|
+
];
|
|
16
|
+
NavItemComponent.propDecorators = {
|
|
17
|
+
id: [{ type: Input }],
|
|
18
|
+
active: [{ type: Input }],
|
|
19
|
+
classes: [{ type: Input }],
|
|
20
|
+
title: [{ type: Input }],
|
|
21
|
+
href: [{ type: Input }],
|
|
22
|
+
routerLink: [{ type: Input }],
|
|
23
|
+
fragment: [{ type: Input }],
|
|
24
|
+
target: [{ type: Input }],
|
|
25
|
+
disabled: [{ type: Input }],
|
|
26
|
+
divider: [{ type: Input }],
|
|
27
|
+
clickEvent: [{ type: Output }],
|
|
28
|
+
activeChange: [{ type: Output }]
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2LWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGVzeS1hbmd1bGFyL3NyYy9saWIvZGVzeS1uYXYvY29tcG9uZW50cy9uYXYvbmF2LWl0ZW0vbmF2LWl0ZW0uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFckUsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0sK0JBQStCLENBQUM7QUFNbkUsTUFBTSxPQUFPLGdCQUFpQixTQUFRLG9CQUFvQjtJQUoxRDs7UUFpQlksZUFBVSxHQUFHLElBQUksWUFBWSxFQUFvQixDQUFDO1FBQ2xELGlCQUFZLEdBQUcsSUFBSSxZQUFZLEVBQVcsQ0FBQztJQUN2RCxDQUFDOzs7WUFuQkEsU0FBUyxTQUFDO2dCQUNULFFBQVEsRUFBRSxlQUFlO2dCQUN6QiwrRkFBd0M7YUFDekM7OztpQkFHRSxLQUFLO3FCQUNMLEtBQUs7c0JBQ0wsS0FBSztvQkFDTCxLQUFLO21CQUNMLEtBQUs7eUJBQ0wsS0FBSzt1QkFDTCxLQUFLO3FCQUNMLEtBQUs7dUJBQ0wsS0FBSztzQkFDTCxLQUFLO3lCQUVMLE1BQU07MkJBQ04sTUFBTSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Q29tcG9uZW50LCBFd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ldyBFdmVudEVtaXR0ZXI8Ym9vbGVhbj4oKTtcclxufVxyXG4iXX0=
|
|
@@ -1,34 +1,55 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { AccessibilityComponent
|
|
3
|
-
import {
|
|
1
|
+
import { Component, ContentChildren, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { AccessibilityComponent } from '../../../shared/components';
|
|
3
|
+
import { NavItemComponent } from './nav-item/nav-item.component';
|
|
4
4
|
export class NavComponent extends AccessibilityComponent {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
7
|
+
this.hasNav = true;
|
|
7
8
|
this.clickEvent = new EventEmitter();
|
|
8
9
|
}
|
|
9
|
-
getExternalHref(item) {
|
|
10
|
-
return NavigationUtils.getExternalHref(item.href);
|
|
11
|
-
}
|
|
12
10
|
onClick(event, item) {
|
|
13
|
-
|
|
11
|
+
const itemsActiveChange = [];
|
|
12
|
+
if (!item.active) {
|
|
13
|
+
itemsActiveChange.push(item);
|
|
14
|
+
}
|
|
15
|
+
const itemList = this.getItemList();
|
|
16
|
+
itemList.forEach(i => {
|
|
17
|
+
if (i.active && i !== item) {
|
|
18
|
+
itemsActiveChange.push(i);
|
|
19
|
+
}
|
|
20
|
+
i.active = false;
|
|
21
|
+
});
|
|
14
22
|
item.active = true;
|
|
23
|
+
// Se emite el evento sólo para los items cuyo valor de active ha sido modificado
|
|
24
|
+
itemsActiveChange.forEach(i => {
|
|
25
|
+
if (i instanceof NavItemComponent) {
|
|
26
|
+
i.activeChange.emit(i.active);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
15
29
|
this.clickEvent.emit({ item, event });
|
|
30
|
+
if (item instanceof NavItemComponent) {
|
|
31
|
+
item.clickEvent.emit({ item, event });
|
|
32
|
+
}
|
|
16
33
|
}
|
|
17
34
|
ngOnChanges(changes) {
|
|
18
|
-
this.
|
|
35
|
+
if (!this.idPrefix) {
|
|
36
|
+
throw new Error(`idPrefix is required`);
|
|
37
|
+
}
|
|
19
38
|
}
|
|
20
|
-
|
|
21
|
-
|
|
39
|
+
getItemList() {
|
|
40
|
+
const itemList = this.itemComponentList && this.itemComponentList.length > 0 ? this.itemComponentList.toArray() : this.items;
|
|
41
|
+
if (!itemList || itemList.length === 0) {
|
|
22
42
|
throw new Error(`items are required`);
|
|
23
43
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
itemList.forEach(element => {
|
|
45
|
+
if (!element.href && !element.routerLink) {
|
|
46
|
+
throw new Error(`href or routerLink are required`);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return itemList;
|
|
50
|
+
}
|
|
51
|
+
handleContentEmpty(position) {
|
|
52
|
+
throw new Error(`item content, html or text are required at position ${position}`);
|
|
32
53
|
}
|
|
33
54
|
getItemId(item, index) {
|
|
34
55
|
let id;
|
|
@@ -50,14 +71,15 @@ export class NavComponent extends AccessibilityComponent {
|
|
|
50
71
|
NavComponent.decorators = [
|
|
51
72
|
{ type: Component, args: [{
|
|
52
73
|
selector: 'desy-nav',
|
|
53
|
-
template: "<ng-template #innerHtml>\r\n <ng-container *ngFor=\"let item of
|
|
74
|
+
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"
|
|
54
75
|
},] }
|
|
55
76
|
];
|
|
56
77
|
NavComponent.propDecorators = {
|
|
57
|
-
|
|
78
|
+
hasNav: [{ type: Input }],
|
|
58
79
|
idPrefix: [{ type: Input }],
|
|
59
80
|
items: [{ type: Input }],
|
|
60
81
|
classes: [{ type: Input }],
|
|
61
|
-
clickEvent: [{ type: Output }]
|
|
82
|
+
clickEvent: [{ type: Output }],
|
|
83
|
+
itemComponentList: [{ type: ContentChildren, args: [NavItemComponent,] }]
|
|
62
84
|
};
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
85
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Rlc3ktYW5ndWxhci9zcmMvbGliL2Rlc3ktbmF2L2NvbXBvbmVudHMvbmF2L25hdi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxlQUFlLEVBQ2YsWUFBWSxFQUNaLEtBQUssRUFFTCxNQUFNLEVBR1AsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUNMLHNCQUFzQixFQUN2QixNQUFNLDRCQUE0QixDQUFDO0FBRXBDLE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLCtCQUErQixDQUFDO0FBTy9ELE1BQU0sT0FBTyxZQUFhLFNBQVEsc0JBQXNCO0lBSnhEOztRQU1XLFdBQU0sR0FBRyxJQUFJLENBQUM7UUFLYixlQUFVLEdBQUcsSUFBSSxZQUFZLEVBQW9CLENBQUM7SUFzRTlELENBQUM7SUFuRUMsT0FBTyxDQUFDLEtBQVUsRUFBRSxJQUFpQjtRQUNuQyxNQUFNLGlCQUFpQixHQUFHLEVB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ogJ25hdi1pdGVtJztcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { ContentBaseComponent } from '../../../../shared/components';
|
|
3
|
+
export class NotificationItemComponent extends ContentBaseComponent {
|
|
4
|
+
}
|
|
5
|
+
NotificationItemComponent.decorators = [
|
|
6
|
+
{ type: Component, args: [{
|
|
7
|
+
selector: 'desy-notification-item',
|
|
8
|
+
template: '<ng-template #contentTemplate><ng-content></ng-content></ng-template>'
|
|
9
|
+
},] }
|
|
10
|
+
];
|
|
11
|
+
NotificationItemComponent.propDecorators = {
|
|
12
|
+
href: [{ type: Input }],
|
|
13
|
+
target: [{ type: Input }],
|
|
14
|
+
routerLink: [{ type: Input }],
|
|
15
|
+
fragment: [{ type: Input }],
|
|
16
|
+
id: [{ type: Input }]
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGVzeS1hbmd1bGFyL3NyYy9saWIvZGVzeS1uYXYvY29tcG9uZW50cy9ub3RpZmljYXRpb24vbm90aWZpY2F0aW9uLWl0ZW0vbm90aWZpY2F0aW9uLWl0ZW0uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQy9DLE9BQU8sRUFBQyxvQkFBb0IsRUFBQyxNQUFNLCtCQUErQixDQUFDO0FBT25FLE1BQU0sT0FBTyx5QkFBMEIsU0FBUSxvQkFBb0I7OztZQUpsRSxTQUFTLFNBQUM7Z0JBQ1QsUUFBUSxFQUFFLHdCQUF3QjtnQkFDbEMsUUFBUSxFQUFFLHVFQUF1RTthQUNsRjs7O21CQUVFLEtBQUs7cUJBQ0wsS0FBSzt5QkFDTCxLQUFLO3VCQUNMLEtBQUs7aUJBQ0wsS0FBSyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Q29tcG9uZW50LCBJbnB1dH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7Q29udGVudEJhc2VDb21wb25lbnR9IGZyb20gJy4uLy4uLy4uLy4uL3NoYXJlZC9jb21wb25lbnRzJztcclxuaW1wb3J0IHtOb3RpZmljYXRpb25JdGVtc0RhdGF9IGZyb20gJy4uLy4uLy4uL2ludGVyZmFjZXMnO1xyXG5cclxuQENvbXBvbmVudCh7XHJcbiAgc2VsZWN0b3I6ICdkZXN5LW5vdGlmaWNhdGlvbi1pdGVtJyxcclxuICB0ZW1wbGF0ZTogJzxuZy10ZW1wbGF0ZSAjY29udGVudFRlbXBsYXRlPjxuZy1jb250ZW50PjwvbmctY29udGVudD48L25nLXRlbXBsYXRlPidcclxufSlcclxuZXhwb3J0IGNsYXNzIE5vdGlmaWNhdGlvbkl0ZW1Db21wb25lbnQgZXh0ZW5kcyBDb250ZW50QmFzZUNvbXBvbmVudCBpbXBsZW1lbnRzIE5vdGlmaWNhdGlvbkl0ZW1zRGF0YSB7XHJcbiAgQElucHV0KCkgaHJlZjogc3RyaW5nO1xyXG4gIEBJbnB1dCgpIHRhcmdldD86IHN0cmluZztcclxuICBASW5wdXQoKSByb3V0ZXJMaW5rPzogc3RyaW5nO1xyXG4gIEBJbnB1dCgpIGZyYWdtZW50Pzogc3RyaW5nO1xyXG4gIEBJbnB1dCgpIGlkOiBzdHJpbmc7XHJcbn1cclxuIl19
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, Output } from '@angular/core';
|
|
3
|
+
import { AccessibilityComponent } from '../../../shared/components';
|
|
3
4
|
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
5
|
+
import { TitleComponent } from '../../../desy-commons/components/title/title.component';
|
|
6
|
+
import { IconComponent } from '../../../desy-commons/components/icon/icon.component';
|
|
7
|
+
import { DescriptionComponent } from '../../../desy-commons/components/description/description.component';
|
|
8
|
+
import { ContentComponent } from '../../../desy-commons/components/content/content.component';
|
|
9
|
+
import { NotificationItemComponent } from './notification-item/notification-item.component';
|
|
10
|
+
import { DesyContentChild } from '../../../shared/decorators/desy-content-child.decorator';
|
|
4
11
|
export class NotificationComponent extends AccessibilityComponent {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(
|
|
12
|
+
constructor(changeDetectorRef) {
|
|
13
|
+
super();
|
|
14
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
7
15
|
this.isOpen = true;
|
|
8
16
|
this.isOpenChange = new EventEmitter();
|
|
9
17
|
this.isDismissing = false;
|
|
18
|
+
this.displayDefaultIcon = false;
|
|
10
19
|
}
|
|
11
20
|
dismiss() {
|
|
12
21
|
// Se emite 75ms más tarde para poder visualizar la animación en cualquier caso
|
|
@@ -23,30 +32,27 @@ export class NotificationComponent extends AccessibilityComponent {
|
|
|
23
32
|
}
|
|
24
33
|
return type;
|
|
25
34
|
}
|
|
35
|
+
getItems() {
|
|
36
|
+
return this.itemCompontents && this.itemCompontents.length > 0 ? this.itemCompontents.toArray() : this.items;
|
|
37
|
+
}
|
|
38
|
+
handleIconEmpty(empty) {
|
|
39
|
+
this.displayDefaultIcon = empty;
|
|
40
|
+
// Como que el contenido vacío se comprueba a posteriori, es necesario forzar la detección de cambios para mostrar el icono por defecto
|
|
41
|
+
this.changeDetectorRef.detectChanges();
|
|
42
|
+
}
|
|
43
|
+
handleRequiredEmpty(text) {
|
|
44
|
+
throw new Error(text);
|
|
45
|
+
}
|
|
26
46
|
ngOnChanges(changes) {
|
|
27
47
|
if (!this.id) {
|
|
28
|
-
throw new Error(`id
|
|
29
|
-
}
|
|
30
|
-
if (!this.title) {
|
|
31
|
-
throw new Error(`title are required`);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
textOrHtmlRequiredFunction(this.title.text, this.title.html);
|
|
35
|
-
}
|
|
36
|
-
if (this.description) {
|
|
37
|
-
textOrHtmlRequiredFunction(this.description.text, this.description.html);
|
|
38
|
-
}
|
|
39
|
-
if (this.items) {
|
|
40
|
-
this.items.forEach(element => {
|
|
41
|
-
textOrHtmlRequiredFunction(element.text, element.html);
|
|
42
|
-
});
|
|
48
|
+
throw new Error(`id is required`);
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
NotificationComponent.decorators = [
|
|
47
53
|
{ type: Component, args: [{
|
|
48
54
|
selector: 'desy-notification',
|
|
49
|
-
template: "<div [attr.id]=\"id ? id : null\" [class]=\"(classes ? 'c-notification ' + classes : type=='success' ? 'c-notification c-notification--' + type : type=='alert' ? 'c-notification c-notification--' + type : 'c-notification c-notification--primary') \"\r\n *ngIf=\"isOpen && !isDismissing\"\r\n @displayNotification\r\n [attr.role]=\"role\"\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 <ng-container *ngIf=\"icon || type\">\r\n <ng-container *ngIf=\"!icon; else elseBlock\">\r\n <div class=\"h-full mr-base\">\r\n <ng-container [ngSwitch]=\"getType()\">\r\n <ng-container *ngSwitchCase=\"'success'\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-5 h-5 text-success-dark\" aria-label=\"\u00C9xito\" focusable=\"false\" role=\"img\"><path d=\"M39.94 125a19.88 19.88 0 01-15.53-7.81L2.48 92.26a10 10 0 0115-13.2l20.55 23.39a2.5 2.5 0 003.68.08l81-84.42a10.002 10.002 0 1114.5 13.78l-82.02 86.33A19.41 19.41 0 0139.94 125z\" fill=\"currentColor\"/></svg>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'alert'\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-5 h-5 text-alert-base\" aria-label=\"Error\" focusable=\"false\" role=\"img\"><path d=\"M138.42 118.29l-55-110a15 15 0 00-26.84 0l-55 110A15 15 0 0015 140h110a15 15 0 0013.42-21.71zM62.5 50a7.5 7.5 0 0115 0v30a7.5 7.5 0 01-15 0zm7.5 70a10 10 0 1110-10 10 10 0 01-10 10z\" fill=\"currentColor\"/></svg>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'info'\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-5 h-5 text-primary-base\" aria-label=\"Informaci\u00F3n\" focusable=\"false\" role=\"img\"><path d=\"M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zm7.5 105a7.5 7.5 0 01-15 0V70a7.5 7.5 0 0115 0zM70 50a10 10 0 1110-10 10 10 0 01-10 10z\" fill=\"currentColor\"/></svg>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseBlock>\r\n <div class=\"h-full mr-base\" [desyInnerContent]=\"icon\" [isHtml]=\"icon\"></div>\r\n </ng-template>\r\n <div class=\"lg:flex flex-1 self-center\">\r\n <div class=\"lg:flex-1 lg:self-center\">\r\n <ng-container *ngIf=\"title\">\r\n <p [id]=\"id ? id + '-title' : null\"\r\n [class]=\"(title.classes ? 'font-bold pr-base focus:outline-none focus:underline ' + title.classes : 'font-bold pr-base focus:outline-none focus:underline')\" tabindex=\"-1\"\r\n [desyInnerContent]=\"title.html ? title.html : title.text\" [isHtml]=\"title.html\">\r\n </p>\r\n </ng-container>\r\n <ng-container *ngIf=\"description\">\r\n <p [class]=\"description.classes ? description.classes : null\" [desyInnerContent]=\"description.html ? description.html : description.text\" [isHtml]=\"description.html\" ></p>\r\n </ng-container>\r\n <ng-container *ngIf=\"items\">\r\n <ul>\r\n <ng-container *ngFor=\"let item of items\">\r\n <ng-container *ngIf=\"item.href\">\r\n <li>\r\n <a [href]=\"item.href\" class=\"c-link\"\r\n [ngClass]=\"{'c-link--alert': type==='alert'}\"\r\n [desyInnerContent]=\"item.html ? item.html : item.text\" [isHtml]=\"item.html\"\r\n [attr.id]=\"item.id ? item.id : null\"\r\n [attr.role]=\"item.role\"\r\n [attr.ariaLabel]=\"item.ariaLabel\"\r\n [attr.ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [attr.ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [attr.ariaHidden]=\"item.ariaHidden\"\r\n [attr.ariaDisabled]=\"item.ariaDisabled\"\r\n [attr.ariaControls]=\"item.ariaControls\"\r\n [attr.ariaCurrent]=\"item.ariaCurrent\"\r\n [attr.ariaLive]=\"item.ariaLive\"\r\n [attr.ariaExpanded]=\"item.ariaExpanded\"\r\n [attr.ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [attr.ariaHasPopup]=\"item.ariaHasPopup\"\r\n [attr.tabindex]=\"item.tabindex\" ></a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.href\">\r\n <li [desyInnerContent]=\"item.html ? item.html : item.text\" [isHtml]=\"item.html\"></li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n <p *ngIf=\"content\" [class]=\"['text-sm', content.classes] | makeHtmlList\"\r\n [desyInnerContent]=\"content.html ? content.html : content.text\" [isHtml]=\"content.html\"></p>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngIf=\"isDismissible\">\r\n <div class=\"absolute top-0 right-0 p-sm\">\r\n <button (click)=\"dismiss()\" class=\"p-sm focus:bg-warning-base focus:border-warning-base focus:shadow-outline-black focus:text-black focus:outline-none\" aria-label=\"X: Cerrar notificaci\u00F3n\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-4 h-4\" aria-hidden=\"true\" role=\"presentation\"><path d=\"M85.91 71.77a2.5 2.5 0 010-3.54l46.16-46.16a10 10 0 10-14.14-14.14L71.77 54.09a2.5 2.5 0 01-3.54 0L22.07 7.93A10 10 0 007.93 22.07l46.16 46.16a2.5 2.5 0 010 3.54L7.93 117.93a10 10 0 0014.14 14.14l46.16-46.16a2.5 2.5 0 013.54 0l46.16 46.16a10 10 0 0014.14-14.14z\" fill=\"currentColor\"/></svg>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n",
|
|
55
|
+
template: "<div [attr.id]=\"id ? id : null\" [class]=\"(classes ? 'c-notification ' + classes : type=='success' ? 'c-notification c-notification--' + type : type=='alert' ? 'c-notification c-notification--' + type : 'c-notification c-notification--primary') \"\r\n *ngIf=\"isOpen && !isDismissing\"\r\n @displayNotification\r\n [attr.role]=\"role\"\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 <div *ngIf=\"iconComponent || icon || type\" class=\"h-full mr-base\"\r\n (desyContentEmpty)=\"handleIconEmpty(true)\"\r\n (desyContentNotEmpty)=\"handleIconEmpty(false)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: iconComponent, html: icon ? icon.html : null }\"></ng-container>\r\n <ng-container *ngIf=\"displayDefaultIcon && type\">\r\n <ng-container [ngSwitch]=\"getType()\">\r\n <svg *ngSwitchCase=\"'success'\" #desyContentEmptyIgnore xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-5 h-5 text-success-dark\" aria-label=\"\u00C9xito\" focusable=\"false\" role=\"img\"><path d=\"M39.94 125a19.88 19.88 0 01-15.53-7.81L2.48 92.26a10 10 0 0115-13.2l20.55 23.39a2.5 2.5 0 003.68.08l81-84.42a10.002 10.002 0 1114.5 13.78l-82.02 86.33A19.41 19.41 0 0139.94 125z\" fill=\"currentColor\"/></svg>\r\n <svg *ngSwitchCase=\"'alert'\" #desyContentEmptyIgnore xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-5 h-5 text-alert-base\" aria-label=\"Error\" focusable=\"false\" role=\"img\"><path d=\"M138.42 118.29l-55-110a15 15 0 00-26.84 0l-55 110A15 15 0 0015 140h110a15 15 0 0013.42-21.71zM62.5 50a7.5 7.5 0 0115 0v30a7.5 7.5 0 01-15 0zm7.5 70a10 10 0 1110-10 10 10 0 01-10 10z\" fill=\"currentColor\"/></svg>\r\n <svg *ngSwitchCase=\"'info'\" #desyContentEmptyIgnore xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-5 h-5 text-primary-base\" aria-label=\"Informaci\u00F3n\" focusable=\"false\" role=\"img\"><path d=\"M70 0a70 70 0 1070 70A70.08 70.08 0 0070 0zm7.5 105a7.5 7.5 0 01-15 0V70a7.5 7.5 0 0115 0zM70 50a10 10 0 1110-10 10 10 0 01-10 10z\" fill=\"currentColor\"/></svg>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"lg:flex flex-1 self-center\">\r\n <div class=\"lg:flex-1 lg:self-center\">\r\n <ng-container [ngSwitch]=\"headingLevel\">\r\n <h1 *ngSwitchCase=\"1\" [id]=\"id ? id + '-title' : null\" tabindex=\"-1\"\r\n [class]=\"['font-bold pr-base focus:outline-none focus:underline', titleComponent ? titleComponent.classes : title.classes] | makeHtmlList\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('title content, html or text are required')\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: titleComponent,\r\n html: title ? title.html : null,\r\n text: title ? title.text : null\r\n }\"></ng-container>\r\n </h1>\r\n <h2 *ngSwitchCase=\"2\" [id]=\"id ? id + '-title' : null\" tabindex=\"-1\"\r\n [class]=\"['font-bold pr-base focus:outline-none focus:underline', titleComponent ? titleComponent.classes : title.classes] | makeHtmlList\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('title content, html or text are required')\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: titleComponent,\r\n html: title ? title.html : null,\r\n text: title ? title.text : null\r\n }\"></ng-container>\r\n </h2>\r\n <h3 *ngSwitchCase=\"3\" [id]=\"id ? id + '-title' : null\" tabindex=\"-1\"\r\n [class]=\"['font-bold pr-base focus:outline-none focus:underline', titleComponent ? titleComponent.classes : title.classes] | makeHtmlList\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('title content, html or text are required')\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: titleComponent,\r\n html: title ? title.html : null,\r\n text: title ? title.text : null\r\n }\"></ng-container>\r\n </h3>\r\n <h4 *ngSwitchCase=\"4\" [id]=\"id ? id + '-title' : null\" tabindex=\"-1\"\r\n [class]=\"['font-bold pr-base focus:outline-none focus:underline', titleComponent ? titleComponent.classes : title.classes] | makeHtmlList\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('title content, html or text are required')\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: titleComponent,\r\n html: title ? title.html : null,\r\n text: title ? title.text : null\r\n }\"></ng-container>\r\n </h4>\r\n <h5 *ngSwitchCase=\"5\" [id]=\"id ? id + '-title' : null\" tabindex=\"-1\"\r\n [class]=\"['font-bold pr-base focus:outline-none focus:underline', titleComponent ? titleComponent.classes : title.classes] | makeHtmlList\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('title content, html or text are required')\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: titleComponent,\r\n html: title ? title.html : null,\r\n text: title ? title.text : null\r\n }\"></ng-container>\r\n </h5>\r\n <p *ngSwitchDefault [id]=\"id ? id + '-title' : null\" tabindex=\"-1\"\r\n [class]=\"['font-bold pr-base focus:outline-none focus:underline', titleComponent ? titleComponent.classes : title.classes] | makeHtmlList\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('title content, html or text are required')\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: titleComponent,\r\n html: title ? title.html : null,\r\n text: title ? title.text : null\r\n }\"></ng-container>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngIf=\"descriptionComponent || description\">\r\n <p [class]=\"descriptionComponent ? descriptionComponent.classes : description.classes\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('description content, html or text are required')\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: descriptionComponent,\r\n html: description ? description.html : null,\r\n text: description ? description.text : null\r\n }\"></ng-container>\r\n </p>\r\n </ng-container>\r\n <ul *ngIf=\"(itemCompontents && itemCompontents.length > 0) || items\">\r\n <ng-container *ngFor=\"let item of getItems(); index as i\">\r\n <li *ngIf=\"item.routerLink || item.href\">\r\n <a *ngIf=\"item.routerLink\" class=\"c-link\"\r\n [routerLink]=\"item.routerLink\"\r\n [fragment]=\"item.fragment\"\r\n [ngClass]=\"{'c-link--alert': type==='alert'}\"\r\n [attr.id]=\"item.id ? item.id : null\"\r\n [attr.role]=\"item.role\"\r\n [attr.ariaLabel]=\"item.ariaLabel\"\r\n [attr.ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [attr.ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [attr.ariaHidden]=\"item.ariaHidden\"\r\n [attr.ariaDisabled]=\"item.ariaDisabled\"\r\n [attr.ariaControls]=\"item.ariaControls\"\r\n [attr.ariaCurrent]=\"item.ariaCurrent\"\r\n [attr.ariaLive]=\"item.ariaLive\"\r\n [attr.ariaExpanded]=\"item.ariaExpanded\"\r\n [attr.ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [attr.ariaHasPopup]=\"item.ariaHasPopup\"\r\n [attr.tabindex]=\"item.tabindex\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('item content, html or text are required at position ' + i)\">\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\" class=\"c-link\"\r\n [href]=\"item.href | externalHref\"\r\n [target]=\"item.target\"\r\n [ngClass]=\"{'c-link--alert': type==='alert'}\"\r\n [attr.id]=\"item.id ? item.id : null\"\r\n [attr.role]=\"item.role\"\r\n [attr.ariaLabel]=\"item.ariaLabel\"\r\n [attr.ariaDescribedBy]=\"item.ariaDescribedBy\"\r\n [attr.ariaLabelledBy]=\"item.ariaLabelledBy\"\r\n [attr.ariaHidden]=\"item.ariaHidden\"\r\n [attr.ariaDisabled]=\"item.ariaDisabled\"\r\n [attr.ariaControls]=\"item.ariaControls\"\r\n [attr.ariaCurrent]=\"item.ariaCurrent\"\r\n [attr.ariaLive]=\"item.ariaLive\"\r\n [attr.ariaExpanded]=\"item.ariaExpanded\"\r\n [attr.ariaErrorMessage]=\"item.ariaErrorMessage\"\r\n [attr.ariaHasPopup]=\"item.ariaHasPopup\"\r\n [attr.tabindex]=\"item.tabindex\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('item content, html or text are required at position ' + i)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n </a>\r\n </li>\r\n <li *ngIf=\"!item.routerLink && !item.href\"\r\n (desyContentEmpty)=\"handleRequiredEmpty('item content, html or text are required at position ' + i)\">\r\n <ng-container *desyCustomInnerContent=\"{ component: item, html: item.html, text: item.text }\"></ng-container>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n <p *ngIf=\"contentComponent || content\" [class]=\"['text-sm', contentComponent ? contentComponent.classes : content.classes] | makeHtmlList\">\r\n <ng-container *desyCustomInnerContent=\"{\r\n component: contentComponent,\r\n html: content ? content.html : null,\r\n text: content ? content.text : null\r\n }\"></ng-container>\r\n </p>\r\n </div>\r\n <ng-container *ngIf=\"isDismissible\">\r\n <div class=\"absolute top-0 right-0 p-sm\">\r\n <button (click)=\"dismiss()\" class=\"p-sm focus:bg-warning-base focus:border-warning-base focus:shadow-outline-black focus:text-black focus:outline-none\" aria-label=\"X: Cerrar notificaci\u00F3n\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 140 140\" width=\"1em\" height=\"1em\" class=\"w-4 h-4\" aria-hidden=\"true\" role=\"presentation\"><path d=\"M85.91 71.77a2.5 2.5 0 010-3.54l46.16-46.16a10 10 0 10-14.14-14.14L71.77 54.09a2.5 2.5 0 01-3.54 0L22.07 7.93A10 10 0 007.93 22.07l46.16 46.16a2.5 2.5 0 010 3.54L7.93 117.93a10 10 0 0014.14 14.14l46.16-46.16a2.5 2.5 0 013.54 0l46.16 46.16a10 10 0 0014.14-14.14z\" fill=\"currentColor\"/></svg>\r\n </button>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n",
|
|
50
56
|
animations: [
|
|
51
57
|
trigger('displayNotification', [
|
|
52
58
|
state('void', style({
|
|
@@ -67,6 +73,9 @@ NotificationComponent.decorators = [
|
|
|
67
73
|
]
|
|
68
74
|
},] }
|
|
69
75
|
];
|
|
76
|
+
NotificationComponent.ctorParameters = () => [
|
|
77
|
+
{ type: ChangeDetectorRef }
|
|
78
|
+
];
|
|
70
79
|
NotificationComponent.propDecorators = {
|
|
71
80
|
id: [{ type: Input }],
|
|
72
81
|
classes: [{ type: Input }],
|
|
@@ -78,6 +87,24 @@ NotificationComponent.propDecorators = {
|
|
|
78
87
|
items: [{ type: Input }],
|
|
79
88
|
icon: [{ type: Input }],
|
|
80
89
|
type: [{ type: Input }],
|
|
81
|
-
isDismissible: [{ type: Input }]
|
|
90
|
+
isDismissible: [{ type: Input }],
|
|
91
|
+
headingLevel: [{ type: Input }],
|
|
92
|
+
titleComponent: [{ type: ContentChildren, args: [TitleComponent,] }],
|
|
93
|
+
descriptionComponent: [{ type: ContentChildren, args: [DescriptionComponent,] }],
|
|
94
|
+
contentComponent: [{ type: ContentChildren, args: [ContentComponent,] }],
|
|
95
|
+
iconComponent: [{ type: ContentChildren, args: [IconComponent,] }],
|
|
96
|
+
itemCompontents: [{ type: ContentChildren, args: [NotificationItemComponent,] }]
|
|
82
97
|
};
|
|
83
|
-
|
|
98
|
+
__decorate([
|
|
99
|
+
DesyContentChild()
|
|
100
|
+
], NotificationComponent.prototype, "titleComponent", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
DesyContentChild()
|
|
103
|
+
], NotificationComponent.prototype, "descriptionComponent", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
DesyContentChild()
|
|
106
|
+
], NotificationComponent.prototype, "contentComponent", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
DesyContentChild()
|
|
109
|
+
], NotificationComponent.prototype, "iconComponent", void 0);
|
|
110
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Rlc3ktYW5ndWxhci9zcmMvbGliL2Rlc3ktbmF2L2Nv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yByZXF1aXJlZGApO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
export class SkipLinkComponent extends
|
|
1
|
+
import { ChangeDetectorRef, Component, Input } from '@angular/core';
|
|
2
|
+
import { AccessibilityComponent } from '../../../shared/components';
|
|
3
|
+
export class SkipLinkComponent extends AccessibilityComponent {
|
|
4
|
+
constructor(changeDetectorRef) {
|
|
5
|
+
super();
|
|
6
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
7
|
+
this.hasContent = true;
|
|
8
|
+
}
|
|
4
9
|
getClassNames() {
|
|
5
10
|
let classNames = 'c-skip-link sr-only active:not-sr-only focus:not-sr-only focus:outline-none focus:shadow-outline-focus block p-base bg-warning-base text-center text-black underline';
|
|
6
11
|
if (this.classes) {
|
|
@@ -8,16 +13,30 @@ export class SkipLinkComponent extends AccessibilityAndTextOrHtmlRequiredCompone
|
|
|
8
13
|
}
|
|
9
14
|
return classNames;
|
|
10
15
|
}
|
|
16
|
+
handleNoContent() {
|
|
17
|
+
if (!this.html && !this.text) {
|
|
18
|
+
throw new Error('skip-link content, html or text are required');
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.hasContent = false;
|
|
22
|
+
this.changeDetectorRef.detectChanges();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
11
25
|
}
|
|
12
26
|
SkipLinkComponent.decorators = [
|
|
13
27
|
{ type: Component, args: [{
|
|
14
28
|
selector: 'desy-skip-link',
|
|
15
|
-
template: "<a [
|
|
29
|
+
template: "<a *ngIf=\"hasContent\"\r\n [routerLink]=\"[]\" [fragment]=\"fragment ? fragment : 'content'\"\r\n [class]=\"getClassNames()\"\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 (desyContentEmpty)=\"handleNoContent()\">\r\n <ng-content></ng-content>\r\n</a>\r\n\r\n<a *ngIf=\"!hasContent\"\r\n [routerLink]=\"[]\" [fragment]=\"fragment ? fragment : 'content'\"\r\n [class]=\"getClassNames()\"\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 *desyCustomInnerContent=\"{ html: html, text: text }\"></ng-container>\r\n</a>\r\n"
|
|
16
30
|
},] }
|
|
17
31
|
];
|
|
32
|
+
SkipLinkComponent.ctorParameters = () => [
|
|
33
|
+
{ type: ChangeDetectorRef }
|
|
34
|
+
];
|
|
18
35
|
SkipLinkComponent.propDecorators = {
|
|
36
|
+
html: [{ type: Input }],
|
|
37
|
+
text: [{ type: Input }],
|
|
19
38
|
fragment: [{ type: Input }],
|
|
20
39
|
classes: [{ type: Input }],
|
|
21
40
|
id: [{ type: Input }]
|
|
22
41
|
};
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tpcC1saW5rLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Rlc3ktYW5ndWxhci9zcmMvbGliL2Rlc3ktbmF2L2NvbXBvbmVudHMvc2tpcC1saW5rL3NraXAtbGluay5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGlCQUFpQixFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDbEUsT0FBTyxFQUFDLHNCQUFzQixFQUFDLE1BQU0sNEJBQTRCLENBQUM7QUFNbEUsTUFBTSxPQUFPLGlCQUFrQixTQUFRLHNCQUFzQjtJQVUzRCxZQUFvQixpQkFBb0M7UUFDdEQsS0FBSyxFQUFFLENBQUM7UUFEVSxzQkFBaUIsR0FBakIsaUJBQWlCLENBQW1CO1FBRnhELGVBQVUsR0FBRyxJQUFJLENBQUM7SUFJbEIsQ0FBQztJQUVELGFBQWE7UUFDWCxJQUFJLFVBQVUsR0FBRyxzS0FBc0ssQ0FBQztRQUN4TCxJQUFJLElBQUksQ0FBQyxPQUFPLEVBQUU7WUFDaEIsV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