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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AfterContentInit, ChangeDetectorRef, ElementRef,
|
|
1
|
+
import { AfterContentInit, ChangeDetectorRef, ElementRef, TemplateRef } from '@angular/core';
|
|
2
2
|
import { AccessibilityComponent } from '../../../shared/components';
|
|
3
3
|
import { ContentComponent } from '../../../desy-commons/components/content/content.component';
|
|
4
4
|
import { IconComponent } from '../../../desy-commons/components/icon/icon.component';
|
|
5
5
|
import { IconData } from '../../../desy-commons/interfaces';
|
|
6
6
|
import { TooltipContentComponent } from './tooltip-content/tooltip-content.component';
|
|
7
|
-
export declare class TooltipComponent extends AccessibilityComponent implements
|
|
7
|
+
export declare class TooltipComponent extends AccessibilityComponent implements AfterContentInit {
|
|
8
8
|
private changeDetectorRef;
|
|
9
9
|
static readonly KEY_CODE_ESC = "Escape";
|
|
10
10
|
contentComponent: ContentComponent;
|
|
@@ -23,13 +23,11 @@ export declare class TooltipComponent extends AccessibilityComponent implements
|
|
|
23
23
|
hasContent: boolean;
|
|
24
24
|
hasIconComponentContent: boolean;
|
|
25
25
|
constructor(changeDetectorRef: ChangeDetectorRef);
|
|
26
|
-
ngOnChanges(changes?: SimpleChanges): void;
|
|
27
26
|
ngAfterContentInit(): void;
|
|
28
27
|
getIdButton(): string;
|
|
29
28
|
getIdTooltip(): string;
|
|
30
29
|
handleEmptyContent(isEmpty: boolean): void;
|
|
31
30
|
handleEmptyIconContent(isEmpty: boolean): void;
|
|
32
|
-
handleEmptyTooltipContent(): void;
|
|
33
31
|
getMainContent(): string;
|
|
34
32
|
getIconContent(icon: IconData): string;
|
|
35
33
|
}
|
|
@@ -3,10 +3,8 @@ import { TextOrHtmlRequiredComponent } from '../text-or-html-required/text-or-ht
|
|
|
3
3
|
export declare class AccessibilityAndTextOrHtmlRequiredComponent extends TextOrHtmlRequiredComponent implements AccesibilityData {
|
|
4
4
|
/**
|
|
5
5
|
* componente para heredar los atributos de accesibilidad y
|
|
6
|
-
* el texto o html required
|
|
6
|
+
* el texto o html required - YA NO ES REQUIERIDO
|
|
7
7
|
*
|
|
8
|
-
* si en el componente que extiende de este, se implementa el onInit o Onchanges,
|
|
9
|
-
* habra que incluir la llamada al a funcion textOrHtmlRequiredFunction
|
|
10
8
|
*
|
|
11
9
|
*/
|
|
12
10
|
role: string;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class TextOrHtmlRequiredComponent implements OnChanges {
|
|
1
|
+
export declare class TextOrHtmlRequiredComponent {
|
|
3
2
|
/***
|
|
4
|
-
* componente base para el comportamiento de texto o html required
|
|
5
|
-
*
|
|
6
|
-
* habra que incluir la llamada al a funcion textOrHtmlRequiredFunction
|
|
3
|
+
* componente base para el comportamiento de texto o html required - YA NO ES REQUIRIDO
|
|
4
|
+
*
|
|
7
5
|
**/
|
|
8
6
|
text: string;
|
|
9
7
|
html: string;
|
|
10
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
11
8
|
}
|
|
12
|
-
/**
|
|
13
|
-
* funcion que comprueba si existe text o html
|
|
14
|
-
* salta error si no es así
|
|
15
|
-
*/
|
|
16
|
-
export declare function textOrHtmlRequiredFunction(text: any, html: any): void;
|
package/package.json
CHANGED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { ContentChildren, Directive, ElementRef, EventEmitter, Output } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Emite un evento cuando el contenido de un elemento esté vacío
|
|
4
|
-
* El contenido marcado con #desyContentEmptyIgnore será ignorado
|
|
5
|
-
*
|
|
6
|
-
* NOTA: tener en cuenta que los eventos se emiten después de generarse la vista, por lo que si al gestionar el evento se realizan
|
|
7
|
-
* cambios que afectan a la template, conviene forzar la detección de cambios. (Ejemplo de esto en el icono de NotificationComponent)
|
|
8
|
-
*/
|
|
9
|
-
export class ContentEmptyDirective {
|
|
10
|
-
constructor(elementRef) {
|
|
11
|
-
this.elementRef = elementRef;
|
|
12
|
-
this.desyContentEmpty = new EventEmitter();
|
|
13
|
-
this.desyContentNotEmpty = new EventEmitter();
|
|
14
|
-
this.lastWasEmpty = false;
|
|
15
|
-
this.viewInit = false;
|
|
16
|
-
const element = this.elementRef.nativeElement;
|
|
17
|
-
this.changes = new MutationObserver((mutations) => mutations.forEach(() => this.checkContent()));
|
|
18
|
-
this.changes.observe(element, {
|
|
19
|
-
attributes: false,
|
|
20
|
-
childList: true,
|
|
21
|
-
characterData: true,
|
|
22
|
-
subtree: false
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
ngAfterViewInit() {
|
|
26
|
-
if (!this.viewInit) {
|
|
27
|
-
this.viewInit = true;
|
|
28
|
-
this.checkContent();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Comprueba el contenido del elemento una vez se haya inicializado la vista. Si se detecta que el elemento está vacío, las comprobaciones
|
|
33
|
-
* sucesivas que tampoco detecten contenido no emitirán evento.
|
|
34
|
-
*/
|
|
35
|
-
checkContent() {
|
|
36
|
-
if (this.viewInit) {
|
|
37
|
-
const childs = this.elementRef.nativeElement.childNodes;
|
|
38
|
-
let hasContent = false;
|
|
39
|
-
for (let i = 0; i < childs.length && !hasContent; i++) {
|
|
40
|
-
const item = childs.item(i);
|
|
41
|
-
if (item.nodeType === Node.TEXT_NODE && item.textContent.length > 0) {
|
|
42
|
-
hasContent = true;
|
|
43
|
-
}
|
|
44
|
-
else if ((item.nodeType === Node.ELEMENT_NODE || item.nodeType === Node.CDATA_SECTION_NODE) && this.isContentNode(item)) {
|
|
45
|
-
hasContent = true;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (hasContent) {
|
|
49
|
-
if (this.lastWasEmpty) {
|
|
50
|
-
this.desyContentNotEmpty.emit(this.elementRef.nativeElement.innerHTML);
|
|
51
|
-
}
|
|
52
|
-
this.lastWasEmpty = false;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
if (!this.lastWasEmpty) {
|
|
56
|
-
this.desyContentEmpty.emit(this.elementRef.nativeElement.innerHTML);
|
|
57
|
-
}
|
|
58
|
-
this.lastWasEmpty = true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
isContentNode(elem) {
|
|
63
|
-
let contentNode = true;
|
|
64
|
-
if (this.contentsToIgnore && this.contentsToIgnore.length > 0) {
|
|
65
|
-
contentNode = !this.contentsToIgnore.find(ignoreElem => ignoreElem.nativeElement === elem);
|
|
66
|
-
}
|
|
67
|
-
return contentNode;
|
|
68
|
-
}
|
|
69
|
-
ngOnDestroy() {
|
|
70
|
-
this.changes.disconnect();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
ContentEmptyDirective.decorators = [
|
|
74
|
-
{ type: Directive, args: [{
|
|
75
|
-
selector: '[desyContentEmpty]'
|
|
76
|
-
},] }
|
|
77
|
-
];
|
|
78
|
-
ContentEmptyDirective.ctorParameters = () => [
|
|
79
|
-
{ type: ElementRef }
|
|
80
|
-
];
|
|
81
|
-
ContentEmptyDirective.propDecorators = {
|
|
82
|
-
desyContentEmpty: [{ type: Output }],
|
|
83
|
-
desyContentNotEmpty: [{ type: Output }],
|
|
84
|
-
contentsToIgnore: [{ type: ContentChildren, args: ['desyContentEmptyIgnore', { read: ElementRef },] }]
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1lbXB0eS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9kZXN5LWFuZ3VsYXIvc3JjL2xpYi9zaGFyZWQvZGlyZWN0aXZlcy9jb250ZW50LWVtcHR5LmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFB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RNTCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMubGFzdFdhc0VtcHR5ID0gZmFsc2U7XHJcbiAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgaWYgKCF0aGlzLmxhc3RXYXNFbXB0eSkge1xyXG4gICAgICAgICAgdGhpcy5kZXN5Q29udGVudEVtcHR5LmVtaXQodGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQuaW5uZXJIVE1MKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5sYXN0V2FzRW1wdHkgPSB0cnVlO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIGlzQ29udGVudE5vZGUoZWxlbTogTm9kZSk6IGJvb2xlYW4ge1xyXG4gICAgbGV0IGNvbnRlbnROb2RlID0gdHJ1ZTtcclxuICAgIGlmICh0aGlzLmNvbnRlbnRzVG9JZ25vcmUgJiYgdGhpcy5jb250ZW50c1RvSWdub3JlLmxlbmd0aCA+IDApIHtcclxuICAgICAgY29udGVudE5vZGUgPSAhdGhpcy5jb250ZW50c1RvSWdub3JlLmZpbmQoaWdub3JlRWxlbSA9PiBpZ25vcmVFbGVtLm5hdGl2ZUVsZW1lbnQgPT09IGVsZW0pO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIGNvbnRlbnROb2RlO1xyXG4gIH1cclxuXHJcbiAgbmdPbkRlc3Ryb3koKTogdm9pZCB7XHJcbiAgICB0aGlzLmNoYW5nZXMuZGlzY29ubmVjdCgpO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Emite un evento cuando el contenido de un elemento esté vacío
|
|
4
|
-
* El contenido marcado con #desyContentEmptyIgnore será ignorado
|
|
5
|
-
*
|
|
6
|
-
* NOTA: tener en cuenta que los eventos se emiten después de generarse la vista, por lo que si al gestionar el evento se realizan
|
|
7
|
-
* cambios que afectan a la template, conviene forzar la detección de cambios. (Ejemplo de esto en el icono de NotificationComponent)
|
|
8
|
-
*/
|
|
9
|
-
export declare class ContentEmptyDirective implements OnDestroy, AfterViewInit {
|
|
10
|
-
private elementRef;
|
|
11
|
-
desyContentEmpty: EventEmitter<any>;
|
|
12
|
-
desyContentNotEmpty: EventEmitter<any>;
|
|
13
|
-
contentsToIgnore: QueryList<ElementRef>;
|
|
14
|
-
private changes;
|
|
15
|
-
private lastWasEmpty;
|
|
16
|
-
private viewInit;
|
|
17
|
-
constructor(elementRef: ElementRef);
|
|
18
|
-
ngAfterViewInit(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Comprueba el contenido del elemento una vez se haya inicializado la vista. Si se detecta que el elemento está vacío, las comprobaciones
|
|
21
|
-
* sucesivas que tampoco detecten contenido no emitirán evento.
|
|
22
|
-
*/
|
|
23
|
-
checkContent(): void;
|
|
24
|
-
private isContentNode;
|
|
25
|
-
ngOnDestroy(): void;
|
|
26
|
-
}
|