ng-inail-common 1.0.445 → 1.0.453

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.
@@ -2747,6 +2747,9 @@
2747
2747
  this.ASC = ThLabelComponent.ASC;
2748
2748
  this.DESC = ThLabelComponent.DESC;
2749
2749
  this.UNSORTED = ThLabelComponent.UNSORTED;
2750
+ // Deprecato!
2751
+ // Obbligatorio se paginazione interna: Da usare in 2-way-data-binding
2752
+ this.elementsChange = new i0.EventEmitter();
2750
2753
  this.click = new i0.EventEmitter();
2751
2754
  this.direction = ThLabelComponent.UNSORTED;
2752
2755
  this.elementRef = element;
@@ -2763,30 +2766,6 @@
2763
2766
  * @return {?}
2764
2767
  */
2765
2768
  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 = /**
2790
2769
  * @return {?}
2791
2770
  */
2792
2771
  function () {
@@ -2824,6 +2803,8 @@
2824
2803
  * @return {?}
2825
2804
  */
2826
2805
  function (event) {
2806
+ // todo
2807
+ // console.warn('th-label-click')
2827
2808
  event.stopPropagation();
2828
2809
  this.emettiEventoOrdinamento();
2829
2810
  };
@@ -2836,6 +2817,8 @@
2836
2817
  * @return {?}
2837
2818
  */
2838
2819
  function () {
2820
+ // todo
2821
+ // console.warn('th-label emettiEventoOrdinamento', this.sortable, this.property)
2839
2822
  if (this.sortable && this.property) {
2840
2823
  this.direction = this.direction * -1;
2841
2824
  if (this.direction == ThLabelComponent.UNSORTED) {
@@ -2846,6 +2829,8 @@
2846
2829
  direction: this.direction,
2847
2830
  property: this.property
2848
2831
  };
2832
+ // todo
2833
+ // console.warn('th-label emettiEventoOrdinamento', info)
2849
2834
  this.click.emit(info);
2850
2835
  }
2851
2836
  };
@@ -2864,7 +2849,7 @@
2864
2849
  ThLabelComponent.decorators = [
2865
2850
  { type: i0.Component, args: [{
2866
2851
  selector: 'inail-th-label',
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 &lt;!&ndash; <span *ngIf=\"sortable\" class=\"fa {{direction==0 ? 'fa-sort' : direction==1 ? 'fa-sort-asc' : 'fa-sort-desc'}}\"></span>&ndash;&gt;\n</span>\n</a>\n<span *ngIf=\"!sortable\"\n (click)=\"onClick($event)\" [innerHTML]=\"label\" [attr.title]=\"title\">\n &lt;!&ndash; <span *ngIf=\"sortable\" class=\"fa {{direction==0 ? 'fa-sort' : direction==1 ? 'fa-sort-asc' : 'fa-sort-desc'}}\"></span>&ndash;&gt;\n</span>\n<div *comment>\n &lt;!&ndash; con aria sort (problema con W3C) &ndash;&gt;\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 &lt;!&ndash; <span *ngIf=\"sortable\" class=\"fa {{direction==0 ? 'fa-sort' : direction==1 ? 'fa-sort-asc' : 'fa-sort-desc'}}\"></span>&ndash;&gt;\n </span>\n </a>\n</div>-->\n\n<span [innerHTML]=\"label\"\n [attr.title]=\"title\">\n</span>\n",
2852
+ template: "<a *ngIf=\"sortable\"\n href=\"javascript:void(0)\"\n role=\"button\"\n class=\"inail-th-label-view-encapsulation\"\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",
2868
2853
  encapsulation: i0.ViewEncapsulation.None,
2869
2854
  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}"]
2870
2855
  }] }
@@ -2877,6 +2862,8 @@
2877
2862
  };
2878
2863
  ThLabelComponent.propDecorators = {
2879
2864
  label: [{ type: i0.Input }],
2865
+ elements: [{ type: i0.Input }],
2866
+ elementsChange: [{ type: i0.Output }],
2880
2867
  property: [{ type: i0.Input }],
2881
2868
  title: [{ type: i0.Input }],
2882
2869
  sortable: [{ type: i0.Input }],
@@ -3497,9 +3484,8 @@
3497
3484
  */
3498
3485
  function (thLabelComponent) {
3499
3486
  if (thLabelComponent && thLabelComponent.sortable === true) {
3500
- // let th: HTMLElement = thLabelComponent.elementRef.nativeElement.parentNode;
3501
3487
  /** @type {?} */
3502
- var th = thLabelComponent.thParent;
3488
+ var th = thLabelComponent.elementRef.nativeElement.parentNode;
3503
3489
  // if (th) {
3504
3490
  //
3505
3491
  // this.removeSortClass(th);