ng-inail-common 1.0.441 → 1.0.445
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/ng-inail-common.umd.js +52 -19
- package/bundles/ng-inail-common.umd.js.map +1 -1
- package/bundles/ng-inail-common.umd.min.js +1 -1
- package/bundles/ng-inail-common.umd.min.js.map +1 -1
- package/esm2015/lib/components/ux/paged-table-renderer/paged-table-renderer.component.js +24 -6
- package/esm2015/lib/components/ux/textarea/textarea.component.js +7 -3
- package/esm2015/lib/components/ux/th-label/th-label.component.js +34 -25
- package/esm5/lib/components/ux/paged-table-renderer/paged-table-renderer.component.js +24 -6
- package/esm5/lib/components/ux/textarea/textarea.component.js +7 -3
- package/esm5/lib/components/ux/th-label/th-label.component.js +42 -29
- package/fesm2015/ng-inail-common.js +50 -19
- package/fesm2015/ng-inail-common.js.map +1 -1
- package/fesm5/ng-inail-common.js +54 -19
- package/fesm5/ng-inail-common.js.map +1 -1
- package/lib/components/ux/textarea/textarea.component.d.ts +1 -0
- package/lib/components/ux/th-label/th-label.component.d.ts +6 -6
- package/ng-inail-common.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -2590,6 +2590,7 @@
|
|
|
2590
2590
|
function TextareaComponent() {
|
|
2591
2591
|
var _this = _super.call(this) || this;
|
|
2592
2592
|
_this.valueChange = new i0.EventEmitter();
|
|
2593
|
+
_this.selfValidation = true;
|
|
2593
2594
|
return _this;
|
|
2594
2595
|
}
|
|
2595
2596
|
/**
|
|
@@ -2657,7 +2658,7 @@
|
|
|
2657
2658
|
* @return {?}
|
|
2658
2659
|
*/
|
|
2659
2660
|
function () {
|
|
2660
|
-
return (this.hasError || isNotEmptyOrNull(this.descError) || this.isTextTooLong()) === true;
|
|
2661
|
+
return (this.hasError || isNotEmptyOrNull(this.descError) || (this.isTextTooLong() && this.selfValidation)) === true;
|
|
2661
2662
|
};
|
|
2662
2663
|
/**
|
|
2663
2664
|
* @return {?}
|
|
@@ -2688,7 +2689,7 @@
|
|
|
2688
2689
|
* @return {?}
|
|
2689
2690
|
*/
|
|
2690
2691
|
function () {
|
|
2691
|
-
return (isEmptyOrNull(this.descError) && this.isTextTooLong())
|
|
2692
|
+
return (isEmptyOrNull(this.descError) && this.isTextTooLong() && this.selfValidation)
|
|
2692
2693
|
? "Il testo non può essere lungo di " + this.maxlength + " caratteri"
|
|
2693
2694
|
: this.descError;
|
|
2694
2695
|
};
|
|
@@ -2731,6 +2732,7 @@
|
|
|
2731
2732
|
rows: [{ type: i0.Input }],
|
|
2732
2733
|
cols: [{ type: i0.Input }],
|
|
2733
2734
|
preventPasting: [{ type: i0.Input }],
|
|
2735
|
+
selfValidation: [{ type: i0.Input }],
|
|
2734
2736
|
value: [{ type: i0.Input }]
|
|
2735
2737
|
};
|
|
2736
2738
|
return TextareaComponent;
|
|
@@ -2745,9 +2747,6 @@
|
|
|
2745
2747
|
this.ASC = ThLabelComponent.ASC;
|
|
2746
2748
|
this.DESC = ThLabelComponent.DESC;
|
|
2747
2749
|
this.UNSORTED = ThLabelComponent.UNSORTED;
|
|
2748
|
-
// Deprecato!
|
|
2749
|
-
// Obbligatorio se paginazione interna: Da usare in 2-way-data-binding
|
|
2750
|
-
this.elementsChange = new i0.EventEmitter();
|
|
2751
2750
|
this.click = new i0.EventEmitter();
|
|
2752
2751
|
this.direction = ThLabelComponent.UNSORTED;
|
|
2753
2752
|
this.elementRef = element;
|
|
@@ -2764,6 +2763,30 @@
|
|
|
2764
2763
|
* @return {?}
|
|
2765
2764
|
*/
|
|
2766
2765
|
ThLabelComponent.prototype.ngAfterViewInit = /**
|
|
2766
|
+
* @return {?}
|
|
2767
|
+
*/
|
|
2768
|
+
function () {
|
|
2769
|
+
var _this = this;
|
|
2770
|
+
this.thParent = this.elementRef.nativeElement.parentNode;
|
|
2771
|
+
if (this.thParent != undefined) {
|
|
2772
|
+
this.thParent.onclick = ( /**
|
|
2773
|
+
* @param {?} ev
|
|
2774
|
+
* @return {?}
|
|
2775
|
+
*/function (ev) { return _this.onClick(ev); });
|
|
2776
|
+
this.thParent.onkeyup = ( /**
|
|
2777
|
+
* @param {?} ev
|
|
2778
|
+
* @return {?}
|
|
2779
|
+
*/function (ev) {
|
|
2780
|
+
if (ev.key === 'Enter' || ev.keyCode === 13) {
|
|
2781
|
+
_this.onClick(ev);
|
|
2782
|
+
}
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
2786
|
+
/**
|
|
2787
|
+
* @return {?}
|
|
2788
|
+
*/
|
|
2789
|
+
ThLabelComponent.prototype.ngOnDestroy = /**
|
|
2767
2790
|
* @return {?}
|
|
2768
2791
|
*/
|
|
2769
2792
|
function () {
|
|
@@ -2801,8 +2824,6 @@
|
|
|
2801
2824
|
* @return {?}
|
|
2802
2825
|
*/
|
|
2803
2826
|
function (event) {
|
|
2804
|
-
// todo
|
|
2805
|
-
// console.warn('th-label-click')
|
|
2806
2827
|
event.stopPropagation();
|
|
2807
2828
|
this.emettiEventoOrdinamento();
|
|
2808
2829
|
};
|
|
@@ -2815,8 +2836,6 @@
|
|
|
2815
2836
|
* @return {?}
|
|
2816
2837
|
*/
|
|
2817
2838
|
function () {
|
|
2818
|
-
// todo
|
|
2819
|
-
// console.warn('th-label emettiEventoOrdinamento', this.sortable, this.property)
|
|
2820
2839
|
if (this.sortable && this.property) {
|
|
2821
2840
|
this.direction = this.direction * -1;
|
|
2822
2841
|
if (this.direction == ThLabelComponent.UNSORTED) {
|
|
@@ -2827,8 +2846,6 @@
|
|
|
2827
2846
|
direction: this.direction,
|
|
2828
2847
|
property: this.property
|
|
2829
2848
|
};
|
|
2830
|
-
// todo
|
|
2831
|
-
// console.warn('th-label emettiEventoOrdinamento', info)
|
|
2832
2849
|
this.click.emit(info);
|
|
2833
2850
|
}
|
|
2834
2851
|
};
|
|
@@ -2847,7 +2864,7 @@
|
|
|
2847
2864
|
ThLabelComponent.decorators = [
|
|
2848
2865
|
{ type: i0.Component, args: [{
|
|
2849
2866
|
selector: 'inail-th-label',
|
|
2850
|
-
template: "
|
|
2867
|
+
template: "<!--<a *ngIf=\"sortable\"\n href=\"javascript:void(0)\"\n role=\"button\"\n class=\"inail-th-label-view-encapsulation\"\n [attr.aria-label]=\"sortable ? label + ': attiva per ordinare la colonna in ordine ' + (direction == ASC ? 'decrescente' : 'crescente') : undefined\"\n (click)=\"onClick($event)\">\n<span class=\"sortable thLabel\" [innerHTML]=\"label\" [attr.title]=\"title\">\n <!– <span *ngIf=\"sortable\" class=\"fa {{direction==0 ? 'fa-sort' : direction==1 ? 'fa-sort-asc' : 'fa-sort-desc'}}\"></span>–>\n</span>\n</a>\n<span *ngIf=\"!sortable\"\n (click)=\"onClick($event)\" [innerHTML]=\"label\" [attr.title]=\"title\">\n <!– <span *ngIf=\"sortable\" class=\"fa {{direction==0 ? 'fa-sort' : direction==1 ? 'fa-sort-asc' : 'fa-sort-desc'}}\"></span>–>\n</span>\n<div *comment>\n <!– con aria sort (problema con W3C) –>\n <a *ngIf=\"sortable\"\n href=\"javascript:void(0)\"\n role=\"button\"\n class=\"inail-th-label-view-encapsulation\"\n [attr.aria-label]=\"sortable ? label + ': attiva per ordinare la colonna in ordine ' + (direction == ASC ? 'decrescente' : 'crescente') : undefined\"\n [attr.aria-sort]=\"sortable ? getAriaSortValue(direction) : undefined\"\n (click)=\"onClick($event)\">\n <span class=\"sortable thLabel\" [innerHTML]=\"label\" [attr.title]=\"title\">\n <!– <span *ngIf=\"sortable\" class=\"fa {{direction==0 ? 'fa-sort' : direction==1 ? 'fa-sort-asc' : 'fa-sort-desc'}}\"></span>–>\n </span>\n </a>\n</div>-->\n\n<span [innerHTML]=\"label\"\n [attr.title]=\"title\">\n</span>\n",
|
|
2851
2868
|
encapsulation: i0.ViewEncapsulation.None,
|
|
2852
2869
|
styles: [".inail-th-label-view-encapsulation .sortable{cursor:pointer}.inail-th-label-view-encapsulation .fa{padding:0 10px}a.inail-th-label-view-encapsulation{background:0 0;color:#000;text-decoration:none}"]
|
|
2853
2870
|
}] }
|
|
@@ -2860,8 +2877,6 @@
|
|
|
2860
2877
|
};
|
|
2861
2878
|
ThLabelComponent.propDecorators = {
|
|
2862
2879
|
label: [{ type: i0.Input }],
|
|
2863
|
-
elements: [{ type: i0.Input }],
|
|
2864
|
-
elementsChange: [{ type: i0.Output }],
|
|
2865
2880
|
property: [{ type: i0.Input }],
|
|
2866
2881
|
title: [{ type: i0.Input }],
|
|
2867
2882
|
sortable: [{ type: i0.Input }],
|
|
@@ -3482,16 +3497,34 @@
|
|
|
3482
3497
|
*/
|
|
3483
3498
|
function (thLabelComponent) {
|
|
3484
3499
|
if (thLabelComponent && thLabelComponent.sortable === true) {
|
|
3500
|
+
// let th: HTMLElement = thLabelComponent.elementRef.nativeElement.parentNode;
|
|
3485
3501
|
/** @type {?} */
|
|
3486
|
-
var th = thLabelComponent.
|
|
3502
|
+
var th = thLabelComponent.thParent;
|
|
3503
|
+
// if (th) {
|
|
3504
|
+
//
|
|
3505
|
+
// this.removeSortClass(th);
|
|
3506
|
+
// this.renderer.addClass(th, this.getThSortClass(thLabelComponent.direction));
|
|
3507
|
+
//
|
|
3508
|
+
// // Spostato in th-label
|
|
3509
|
+
// // th.setAttribute('aria-label', thLabelComponent.label + ": attiva per ordinare la colonna in ordine " + (thLabelComponent.direction == ThLabelComponent.ASC ? 'decrescente' : 'crescente'));
|
|
3510
|
+
//
|
|
3511
|
+
// th.setAttribute('aria-sort', this.getAriaSortValue(thLabelComponent.direction));
|
|
3512
|
+
//
|
|
3513
|
+
// if (thLabelComponent.direction == ThLabelComponent.UNSORTED) {
|
|
3514
|
+
//
|
|
3515
|
+
// th.removeAttribute('aria-sort');
|
|
3516
|
+
// }
|
|
3517
|
+
// }
|
|
3487
3518
|
if (th) {
|
|
3488
3519
|
this.removeSortClass(th);
|
|
3489
3520
|
this.renderer.addClass(th, this.getThSortClass(thLabelComponent.direction));
|
|
3490
|
-
// Spostato in th-label
|
|
3491
|
-
// th.setAttribute('aria-label', thLabelComponent.label + ": attiva per ordinare la colonna in ordine " + (thLabelComponent.direction == ThLabelComponent.ASC ? 'decrescente' : 'crescente'));
|
|
3492
|
-
th.setAttribute('aria-sort', this.getAriaSortValue(thLabelComponent.direction));
|
|
3493
3521
|
if (thLabelComponent.direction == ThLabelComponent.UNSORTED) {
|
|
3494
|
-
|
|
3522
|
+
this.renderer.removeAttribute(th, 'aria-sort');
|
|
3523
|
+
this.renderer.setAttribute(th, 'aria-label', "Colonna " + thLabelComponent.label + " non ordinata, attiva per ordinare in ordine crescente");
|
|
3524
|
+
}
|
|
3525
|
+
else {
|
|
3526
|
+
this.renderer.setAttribute(th, 'aria-sort', this.getAriaSortValue(thLabelComponent.direction));
|
|
3527
|
+
this.renderer.setAttribute(th, 'aria-label', "Colonna " + thLabelComponent.label + " ordinata in ordine " + (thLabelComponent.direction == ThLabelComponent.ASC ? 'crescente' : 'decrescente') + ", attiva per ordinare in ordine " + (thLabelComponent.direction == ThLabelComponent.ASC ? 'decrescente' : 'crescente'));
|
|
3495
3528
|
}
|
|
3496
3529
|
}
|
|
3497
3530
|
}
|