@esfaenza/es-charts 11.2.22 → 11.2.23

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.
@@ -673,6 +673,92 @@
673
673
  return LineSerie;
674
674
  }());
675
675
 
676
+ /**
677
+ * Componente che si occupa della paginazione dei grafici qualora servisse
678
+ */
679
+ var PageChartSelector = /** @class */ (function () {
680
+ function PageChartSelector() {
681
+ /**
682
+ * Indica un cambio di pagina ed emette un oggetto con i dati attuali e l'indice attuale.
683
+ *
684
+ * Qualora la proprietà **data** fosse null indica un evento di "loading"
685
+ */
686
+ this.onPageChange = new core.EventEmitter();
687
+ }
688
+ /**
689
+ * @ignore
690
+ */
691
+ PageChartSelector.prototype.ngOnChanges = function () {
692
+ if (!(this.Items || this.Dtos) || (this.Items || this.Dtos).length == 0)
693
+ throw new Error("Chart array cannot be empty!");
694
+ var idx = (this.StartIndex || 0);
695
+ this.currentindex = idx;
696
+ this.currentpage = idx + 1;
697
+ this.handlePageChange();
698
+ };
699
+ /**
700
+ * Gestisce un cambio pagina inviando al callback **onPageChange** i dati attuali (siano essi il Dto per il caricamento dati i
701
+ * o i dati già presenti) e l'indice di visualizzazione
702
+ */
703
+ PageChartSelector.prototype.handlePageChange = function () {
704
+ this.finalIndex = this.currentpage - 1;
705
+ this.currentindex = this.currentpage - 1;
706
+ var data = this.Items && this.Items.length > 0 ? this.Items[this.finalIndex].data : this.Dtos[this.finalIndex];
707
+ this.onPageChange.emit({ data: data, index: this.finalIndex });
708
+ };
709
+ /**
710
+ * Visualizza il grafico successivo
711
+ */
712
+ PageChartSelector.prototype.Next = function () {
713
+ var _this = this;
714
+ // Per passare da page a index è sempre un -1
715
+ this.currentpage++;
716
+ this.onPageChange.emit({ data: null, index: this.currentpage - 1 });
717
+ // Delay pseudo-intelligente per click compulsivi.
718
+ // Se dopo questo delay sono andato avanti solo di 1 effettuo il callback altrimenti incremento l'indice
719
+ setTimeout(function () {
720
+ if (_this.currentindex == _this.currentpage - 2)
721
+ _this.handlePageChange();
722
+ else
723
+ _this.currentindex++;
724
+ }, this.BrowseDelayMs);
725
+ };
726
+ /**
727
+ * Visualizza il grafico precedente
728
+ */
729
+ PageChartSelector.prototype.Previous = function () {
730
+ var _this = this;
731
+ // Per passare da page a index è sempre un -1
732
+ this.currentpage--;
733
+ this.onPageChange.emit({ data: null, index: this.currentpage - 1 });
734
+ // Delay pseudo-intelligente per click compulsivi.
735
+ // Se dopo questo delay sono andato indietro solo di 1 effettuo il callback altrimenti decremento l'indice
736
+ setTimeout(function () {
737
+ if (_this.currentindex == _this.currentpage)
738
+ _this.handlePageChange();
739
+ else
740
+ _this.currentindex--;
741
+ }, this.BrowseDelayMs);
742
+ };
743
+ return PageChartSelector;
744
+ }());
745
+ PageChartSelector.decorators = [
746
+ { type: core.Component, args: [{
747
+ selector: "chart-pager",
748
+ template: "<div *ngIf=\"(Items || Dtos) && (Items || Dtos).length > 0\" class=\"pcs-no-selection\">\r\n <div class=\"pcs-button pcs-backward\">\r\n <svg class=\"pcs-svg-header\">\r\n <g class=\"pcs-svg-button-container\" role=\"button\" (click)=\"currentpage != 1 && Previous(); $event.stopPropagation(); $event.preventDefault();\">\r\n <!--Pulsante e freccettina all'interno-->\r\n <g class=\"pcs-svg-button\" [style.cursor]=\"currentpage == 1 ? 'not-allowed' : 'pointer'\"><path d=\"M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z\"></path></g>\r\n <g class=\"pcs-svg-arrow pcs-svg-arrow-left\"><path d=\"M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z\"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"pcs-infos\">\r\n <ng-container *ngIf=\"headerInner_tr\">\r\n <ng-container *ngTemplateOutlet=\"headerInner_tr; context : {$implicit: (Items || Dtos)[currentpage - 1]}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"pcs-button pcs-forward\">\r\n <svg class=\"pcs-svg-header\">\r\n <g class=\"pcs-svg-button-container\" role=\"button\" (click)=\"(Items || Dtos).length != currentpage && Next(); $event.stopPropagation(); $event.preventDefault();\">\r\n <!--Pulsante e freccettina all'interno-->\r\n <g class=\"pcs-svg-button\" [style.cursor]=\"(Items || Dtos).length == currentpage ? 'not-allowed' : 'pointer'\"><path d=\"M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z\"></path></g>\r\n <g class=\"pcs-svg-arrow pcs-svg-arrow-right\"><path d=\"M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z\"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div style=\"clear: both;\"></div>\r\n</div>",
749
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
750
+ styles: [".pcs-button{width:60px}.pcs-forward{float:right;text-align:end}.pcs-backward{float:left}.pcs-svg-header{width:57px;height:40px}.pcs-svg-button-container{outline:medium none currentcolor}.pcs-svg-arrow{pointer-events:none;fill:#555}.pcs-svg-arrow-right{transform:translate(44px,36px) rotate(180deg)}.pcs-svg-arrow-left{transform:translate(13px,4px)}.pcs-svg-button{fill:#d9d9d9;stroke:#fff;fill-opacity:1;stroke-opacity:1}.pcs-svg-button:hover{fill:#a3a3a3;cursor:pointer}.pcs-infos{width:calc(100% - 120px);height:44px;float:left}.pcs-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}"]
751
+ },] }
752
+ ];
753
+ PageChartSelector.propDecorators = {
754
+ Items: [{ type: core.Input }],
755
+ Dtos: [{ type: core.Input }],
756
+ BrowseDelayMs: [{ type: core.Input }],
757
+ StartIndex: [{ type: core.Input }],
758
+ onPageChange: [{ type: core.Output }],
759
+ headerInner_tr: [{ type: core.ContentChild, args: ['header_inner', { static: false },] }]
760
+ };
761
+
676
762
  /** @ignore */
677
763
  var _spiritedaway = 'spiritedaway';
678
764
  /** @ignore */
@@ -3052,92 +3138,6 @@
3052
3138
  return PagedChartData;
3053
3139
  }());
3054
3140
 
3055
- /**
3056
- * Componente che si occupa della paginazione dei grafici qualora servisse
3057
- */
3058
- var PageChartSelector = /** @class */ (function () {
3059
- function PageChartSelector() {
3060
- /**
3061
- * Indica un cambio di pagina ed emette un oggetto con i dati attuali e l'indice attuale.
3062
- *
3063
- * Qualora la proprietà **data** fosse null indica un evento di "loading"
3064
- */
3065
- this.onPageChange = new core.EventEmitter();
3066
- }
3067
- /**
3068
- * @ignore
3069
- */
3070
- PageChartSelector.prototype.ngOnChanges = function () {
3071
- if (!(this.Items || this.Dtos) || (this.Items || this.Dtos).length == 0)
3072
- throw new Error("Chart array cannot be empty!");
3073
- var idx = (this.StartIndex || 0);
3074
- this.currentindex = idx;
3075
- this.currentpage = idx + 1;
3076
- this.handlePageChange();
3077
- };
3078
- /**
3079
- * Gestisce un cambio pagina inviando al callback **onPageChange** i dati attuali (siano essi il Dto per il caricamento dati i
3080
- * o i dati già presenti) e l'indice di visualizzazione
3081
- */
3082
- PageChartSelector.prototype.handlePageChange = function () {
3083
- this.finalIndex = this.currentpage - 1;
3084
- this.currentindex = this.currentpage - 1;
3085
- var data = this.Items && this.Items.length > 0 ? this.Items[this.finalIndex].data : this.Dtos[this.finalIndex];
3086
- this.onPageChange.emit({ data: data, index: this.finalIndex });
3087
- };
3088
- /**
3089
- * Visualizza il grafico successivo
3090
- */
3091
- PageChartSelector.prototype.Next = function () {
3092
- var _this = this;
3093
- // Per passare da page a index è sempre un -1
3094
- this.currentpage++;
3095
- this.onPageChange.emit({ data: null, index: this.currentpage - 1 });
3096
- // Delay pseudo-intelligente per click compulsivi.
3097
- // Se dopo questo delay sono andato avanti solo di 1 effettuo il callback altrimenti incremento l'indice
3098
- setTimeout(function () {
3099
- if (_this.currentindex == _this.currentpage - 2)
3100
- _this.handlePageChange();
3101
- else
3102
- _this.currentindex++;
3103
- }, this.BrowseDelayMs);
3104
- };
3105
- /**
3106
- * Visualizza il grafico precedente
3107
- */
3108
- PageChartSelector.prototype.Previous = function () {
3109
- var _this = this;
3110
- // Per passare da page a index è sempre un -1
3111
- this.currentpage--;
3112
- this.onPageChange.emit({ data: null, index: this.currentpage - 1 });
3113
- // Delay pseudo-intelligente per click compulsivi.
3114
- // Se dopo questo delay sono andato indietro solo di 1 effettuo il callback altrimenti decremento l'indice
3115
- setTimeout(function () {
3116
- if (_this.currentindex == _this.currentpage)
3117
- _this.handlePageChange();
3118
- else
3119
- _this.currentindex--;
3120
- }, this.BrowseDelayMs);
3121
- };
3122
- return PageChartSelector;
3123
- }());
3124
- PageChartSelector.decorators = [
3125
- { type: core.Component, args: [{
3126
- selector: "chart-pager",
3127
- template: "<div *ngIf=\"(Items || Dtos) && (Items || Dtos).length > 0\" class=\"pcs-no-selection\">\r\n <div class=\"pcs-button pcs-backward\">\r\n <svg class=\"pcs-svg-header\">\r\n <g class=\"pcs-svg-button-container\" role=\"button\" (click)=\"currentpage != 1 && Previous(); $event.stopPropagation(); $event.preventDefault();\">\r\n <!--Pulsante e freccettina all'interno-->\r\n <g class=\"pcs-svg-button\" [style.cursor]=\"currentpage == 1 ? 'not-allowed' : 'pointer'\"><path d=\"M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z\"></path></g>\r\n <g class=\"pcs-svg-arrow pcs-svg-arrow-left\"><path d=\"M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z\"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"pcs-infos\">\r\n <ng-container *ngIf=\"headerInner_tr\">\r\n <ng-container *ngTemplateOutlet=\"headerInner_tr; context : {$implicit: (Items || Dtos)[currentpage - 1]}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class=\"pcs-button pcs-forward\">\r\n <svg class=\"pcs-svg-header\">\r\n <g class=\"pcs-svg-button-container\" role=\"button\" (click)=\"(Items || Dtos).length != currentpage && Next(); $event.stopPropagation(); $event.preventDefault();\">\r\n <!--Pulsante e freccettina all'interno-->\r\n <g class=\"pcs-svg-button\" [style.cursor]=\"(Items || Dtos).length == currentpage ? 'not-allowed' : 'pointer'\"><path d=\"M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z\"></path></g>\r\n <g class=\"pcs-svg-arrow pcs-svg-arrow-right\"><path d=\"M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z\"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div style=\"clear: both;\"></div>\r\n</div>",
3128
- changeDetection: core.ChangeDetectionStrategy.OnPush,
3129
- styles: [".pcs-button{width:60px}.pcs-forward{float:right;text-align:end}.pcs-backward{float:left}.pcs-svg-header{width:57px;height:40px}.pcs-svg-button-container{outline:medium none currentcolor}.pcs-svg-arrow{pointer-events:none;fill:#555}.pcs-svg-arrow-right{transform:translate(44px,36px) rotate(180deg)}.pcs-svg-arrow-left{transform:translate(13px,4px)}.pcs-svg-button{fill:#d9d9d9;stroke:#fff;fill-opacity:1;stroke-opacity:1}.pcs-svg-button:hover{fill:#a3a3a3;cursor:pointer}.pcs-infos{width:calc(100% - 120px);height:44px;float:left}.pcs-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}"]
3130
- },] }
3131
- ];
3132
- PageChartSelector.propDecorators = {
3133
- Items: [{ type: core.Input }],
3134
- Dtos: [{ type: core.Input }],
3135
- BrowseDelayMs: [{ type: core.Input }],
3136
- StartIndex: [{ type: core.Input }],
3137
- onPageChange: [{ type: core.Output }],
3138
- headerInner_tr: [{ type: core.ContentChild, args: ['header_inner', { static: false },] }]
3139
- };
3140
-
3141
3141
  /** Componenti esportati dal modulo */
3142
3142
  var COMPONENTS = [
3143
3143
  EsChartComponent,
@@ -3208,6 +3208,7 @@
3208
3208
  exports.LineChartData = LineChartData;
3209
3209
  exports.LineChartSettings = LineChartSettings;
3210
3210
  exports.LineSerie = LineSerie;
3211
+ exports.PageChartSelector = PageChartSelector;
3211
3212
  exports.PagedChartData = PagedChartData;
3212
3213
  exports.PieChartData = PieChartData;
3213
3214
  exports.PieChartSettings = PieChartSettings;
@@ -3223,7 +3224,6 @@
3223
3224
  exports.ɵd = ESC_ANIMATIONS;
3224
3225
  exports.ɵe = ESC_THEME;
3225
3226
  exports.ɵf = ESC_LOGS;
3226
- exports.ɵg = PageChartSelector;
3227
3227
 
3228
3228
  Object.defineProperty(exports, '__esModule', { value: true });
3229
3229