gamma-app-controller 2.0.15 → 2.0.17

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.
@@ -3633,7 +3633,6 @@ class GammaGeoChartComponent {
3633
3633
  };
3634
3634
  }
3635
3635
  else if (this.mapTYpe == "choroplethMap") {
3636
- debugger;
3637
3636
  let chartConfig = value.kpiConfig.dataConfig;
3638
3637
  if (chartConfig.isDataAggregation) {
3639
3638
  const aggreationData = this.getGroupDataForChart(value.kpiConfig.dataSource, chartConfig['dataAggregationConfig']['dataAggregateColumes'], chartConfig['dataAggregationConfig']['aggregateFields']);
@@ -3664,9 +3663,6 @@ class GammaGeoChartComponent {
3664
3663
  this.choroplethMapslideSpeed = chartConfig.slideSpeed;
3665
3664
  }
3666
3665
  this.initChoroplethMap(chartConfig, tootTipColumn);
3667
- setTimeout(() => {
3668
- this.isLoader = false;
3669
- }, 200);
3670
3666
  }
3671
3667
  else {
3672
3668
  this.locations = value.kpiConfig.dataSource;
@@ -4114,6 +4110,7 @@ class GammaGeoChartComponent {
4114
4110
  };
4115
4111
  }
4116
4112
  initChoroplethMap(chartConfig, tootTipColumn) {
4113
+ this.isLoader = true;
4117
4114
  this.map = new google.maps.Map(document.getElementById("googlemap"), {
4118
4115
  center: { lat: parseFloat(chartConfig.centerLat), lng: parseFloat(chartConfig.centerLng) },
4119
4116
  zoom: parseInt(chartConfig.zoom)
@@ -4129,6 +4126,7 @@ class GammaGeoChartComponent {
4129
4126
  infoWindow.setPosition(event.latLng);
4130
4127
  infoWindow.open(this.map);
4131
4128
  });
4129
+ this.isLoader = false;
4132
4130
  this.map.data.addListener('mouseout', () => infoWindow.close());
4133
4131
  }
4134
4132
  buildInfoWindowContent(district, row, tootTipColumn) {
@@ -4236,10 +4234,10 @@ class GammaGeoChartComponent {
4236
4234
  }
4237
4235
  }
4238
4236
  GammaGeoChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GammaGeoChartComponent, deps: [{ token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
4239
- GammaGeoChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GammaGeoChartComponent, selector: "app-gamma-geo-chart", inputs: { rightClickEnable: "rightClickEnable", chartDataSource: "chartDataSource" }, outputs: { getTableConfigOutPut: "getTableConfigOutPut", oRowClick: "oRowClick", onrightClickContextSelection: "onrightClickContextSelection" }, viewQueries: [{ propertyName: "googlMap", first: true, predicate: ["googlMap"], descendants: true }], ngImport: i0, template: "<div class=\"mx-2 bg-gray-800\">\n <ng-container *ngIf=\"isLoader\">\n <div class=\"flex justify-center items-start bg-gray-800 p-2\">\n <app-loader></app-loader>\n </div>\n </ng-container>\n\n <div class=\"mx-2 pb-2\">\n\n <ng-container>\n <div id=\"regions_div\" #googlMap style=\"width: 100%\"></div>\n \n <div id=\"googlemap\" style=\"width: 100%;\" [style.height]=\"chartHeight\"></div>\n <div class=\" mx-auto w-full mt-3\" *ngIf=\"isRangeSliderVisible\">\n <div class=\"flex items-center justify-between mb-2\">\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"togglePlay()\">\n <i class=\"fa\" [ngClass]=\"isPlaying ? 'fa-pause' : 'fa-play'\"></i>\n </button>\n\n <div class=\"flex space-x-2 text-sm font-semibold\">\n <ng-container *ngFor=\"let year of allSelectedRangeSliderValues; let i = index\">\n <span class=\"cursor-pointer select-none px-2 py-1 rounded-md transition\" [ngClass]=\"{\n 'bg-black text-white shadow': year === selectedRangeSliderValue,\n 'text-gray-300 hover:text-white': year !== selectedRangeSliderValue\n }\" (click)=\"setYearByIndex(i)\">\n {{ year }}\n </span>\n </ng-container>\n </div>\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"restart()\">\n <i class=\"fa fa-refresh\"></i>\n </button>\n\n </div>\n\n <input type=\"range\" class=\"w-full h-2 rounded-lg appearance-none cursor-pointer\n bg-gradient-to-r from-green-400 via-yellow-400 to-red-500\" [min]=\"0\"\n [max]=\"allSelectedRangeSliderValues.length - 1\" [value]=\"choroplethMapCurrentIndex\" (input)=\"onYearChange($event)\" />\n </div>\n\n </ng-container>\n\n\n\n </div>\n\n\n</div>", dependencies: [{ kind: "directive", type: i4$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoaderComponent, selector: "app-loader" }] });
4237
+ GammaGeoChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GammaGeoChartComponent, selector: "app-gamma-geo-chart", inputs: { rightClickEnable: "rightClickEnable", chartDataSource: "chartDataSource" }, outputs: { getTableConfigOutPut: "getTableConfigOutPut", oRowClick: "oRowClick", onrightClickContextSelection: "onrightClickContextSelection" }, viewQueries: [{ propertyName: "googlMap", first: true, predicate: ["googlMap"], descendants: true }], ngImport: i0, template: "<div class=\"mx-2 bg-gray-800\">\n <!-- <ng-container *ngIf=\"isLoader\">\n <div class=\"flex justify-center items-start bg-gray-800 p-2\">\n <app-loader></app-loader>\n </div>\n </ng-container> -->\n\n\n <div class=\"relative w-full\">\n\n <div id=\"regions_div\" #googlMap style=\"width: 100%\"></div>\n <div id=\"googlemap\" style=\"width: 100%;\" [style.height]=\"chartHeight\"></div>\n\n <div *ngIf=\"isLoader\" class=\"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm\">\n <div class=\"loader\"></div>\n </div>\n\n\n\n <div class=\"mx-2 pb-2\">\n <div class=\" mx-auto w-full mt-3\" *ngIf=\"isRangeSliderVisible\">\n <div class=\"flex items-center justify-between mb-2\">\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"togglePlay()\">\n <i class=\"fa\" [ngClass]=\"isPlaying ? 'fa-pause' : 'fa-play'\"></i>\n </button>\n\n <div class=\"flex space-x-2 text-sm font-semibold\">\n <ng-container *ngFor=\"let year of allSelectedRangeSliderValues; let i = index\">\n <span class=\"cursor-pointer select-none px-2 py-1 rounded-md transition\" [ngClass]=\"{\n 'bg-black text-white shadow': year === selectedRangeSliderValue,\n 'text-gray-300 hover:text-white': year !== selectedRangeSliderValue\n }\" (click)=\"setYearByIndex(i)\">\n {{ year }}\n </span>\n </ng-container>\n </div>\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"restart()\">\n <i class=\"fa fa-refresh\"></i>\n </button>\n\n </div>\n\n <input type=\"range\" class=\"w-full h-2 rounded-lg appearance-none cursor-pointer\n bg-gradient-to-r from-green-400 via-yellow-400 to-red-500\" [min]=\"0\"\n [max]=\"allSelectedRangeSliderValues.length - 1\" [value]=\"choroplethMapCurrentIndex\"\n (input)=\"onYearChange($event)\" />\n </div>\n\n\n\n\n </div>\n\n </div>\n\n\n\n\n\n</div>", styles: [".loader{width:64px;height:64px;border:6px solid rgba(255,255,255,.2);border-top-color:#4ade80;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}\n"], dependencies: [{ kind: "directive", type: i4$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
4240
4238
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GammaGeoChartComponent, decorators: [{
4241
4239
  type: Component,
4242
- args: [{ selector: "app-gamma-geo-chart", template: "<div class=\"mx-2 bg-gray-800\">\n <ng-container *ngIf=\"isLoader\">\n <div class=\"flex justify-center items-start bg-gray-800 p-2\">\n <app-loader></app-loader>\n </div>\n </ng-container>\n\n <div class=\"mx-2 pb-2\">\n\n <ng-container>\n <div id=\"regions_div\" #googlMap style=\"width: 100%\"></div>\n \n <div id=\"googlemap\" style=\"width: 100%;\" [style.height]=\"chartHeight\"></div>\n <div class=\" mx-auto w-full mt-3\" *ngIf=\"isRangeSliderVisible\">\n <div class=\"flex items-center justify-between mb-2\">\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"togglePlay()\">\n <i class=\"fa\" [ngClass]=\"isPlaying ? 'fa-pause' : 'fa-play'\"></i>\n </button>\n\n <div class=\"flex space-x-2 text-sm font-semibold\">\n <ng-container *ngFor=\"let year of allSelectedRangeSliderValues; let i = index\">\n <span class=\"cursor-pointer select-none px-2 py-1 rounded-md transition\" [ngClass]=\"{\n 'bg-black text-white shadow': year === selectedRangeSliderValue,\n 'text-gray-300 hover:text-white': year !== selectedRangeSliderValue\n }\" (click)=\"setYearByIndex(i)\">\n {{ year }}\n </span>\n </ng-container>\n </div>\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"restart()\">\n <i class=\"fa fa-refresh\"></i>\n </button>\n\n </div>\n\n <input type=\"range\" class=\"w-full h-2 rounded-lg appearance-none cursor-pointer\n bg-gradient-to-r from-green-400 via-yellow-400 to-red-500\" [min]=\"0\"\n [max]=\"allSelectedRangeSliderValues.length - 1\" [value]=\"choroplethMapCurrentIndex\" (input)=\"onYearChange($event)\" />\n </div>\n\n </ng-container>\n\n\n\n </div>\n\n\n</div>" }]
4240
+ args: [{ selector: "app-gamma-geo-chart", template: "<div class=\"mx-2 bg-gray-800\">\n <!-- <ng-container *ngIf=\"isLoader\">\n <div class=\"flex justify-center items-start bg-gray-800 p-2\">\n <app-loader></app-loader>\n </div>\n </ng-container> -->\n\n\n <div class=\"relative w-full\">\n\n <div id=\"regions_div\" #googlMap style=\"width: 100%\"></div>\n <div id=\"googlemap\" style=\"width: 100%;\" [style.height]=\"chartHeight\"></div>\n\n <div *ngIf=\"isLoader\" class=\"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm\">\n <div class=\"loader\"></div>\n </div>\n\n\n\n <div class=\"mx-2 pb-2\">\n <div class=\" mx-auto w-full mt-3\" *ngIf=\"isRangeSliderVisible\">\n <div class=\"flex items-center justify-between mb-2\">\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"togglePlay()\">\n <i class=\"fa\" [ngClass]=\"isPlaying ? 'fa-pause' : 'fa-play'\"></i>\n </button>\n\n <div class=\"flex space-x-2 text-sm font-semibold\">\n <ng-container *ngFor=\"let year of allSelectedRangeSliderValues; let i = index\">\n <span class=\"cursor-pointer select-none px-2 py-1 rounded-md transition\" [ngClass]=\"{\n 'bg-black text-white shadow': year === selectedRangeSliderValue,\n 'text-gray-300 hover:text-white': year !== selectedRangeSliderValue\n }\" (click)=\"setYearByIndex(i)\">\n {{ year }}\n </span>\n </ng-container>\n </div>\n\n <button class=\"text-white px-3 py-2 rounded bg-gray-800 hover:bg-gray-700\" (click)=\"restart()\">\n <i class=\"fa fa-refresh\"></i>\n </button>\n\n </div>\n\n <input type=\"range\" class=\"w-full h-2 rounded-lg appearance-none cursor-pointer\n bg-gradient-to-r from-green-400 via-yellow-400 to-red-500\" [min]=\"0\"\n [max]=\"allSelectedRangeSliderValues.length - 1\" [value]=\"choroplethMapCurrentIndex\"\n (input)=\"onYearChange($event)\" />\n </div>\n\n\n\n\n </div>\n\n </div>\n\n\n\n\n\n</div>", styles: [".loader{width:64px;height:64px;border:6px solid rgba(255,255,255,.2);border-top-color:#4ade80;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}\n"] }]
4243
4241
  }], ctorParameters: function () { return [{ type: CommonService }]; }, propDecorators: { googlMap: [{
4244
4242
  type: ViewChild,
4245
4243
  args: ["googlMap"]
@@ -5427,6 +5425,7 @@ class GammaAdvanceChartComponent {
5427
5425
  return;
5428
5426
  }
5429
5427
  else {
5428
+ this.isLoader = true;
5430
5429
  this.page_config = value;
5431
5430
  this.page_parms = value.titleParams;
5432
5431
  this.chartOrderBy = (value.kpiConfig.descendingOrder) ? value.kpiConfig.descendingOrder : false;
@@ -6014,6 +6013,12 @@ class DashChartComponent {
6014
6013
  if (value.selectedWidgetConfig) {
6015
6014
  this.userOptionContainer = value.selectedWidgetConfig?.permissions ? value.selectedWidgetConfig.permissions : [];
6016
6015
  this.chartConfig = value.selectedWidgetConfig.dataConfig;
6016
+ value.selectedWidgetConfig['dataConfig']['isDataAggregation'] = (value.selectedWidgetConfig['dataConfig']['isDataAggregation']) ? value.selectedWidgetConfig['dataConfig']['isDataAggregation'] : false;
6017
+ if (value.selectedWidgetConfig['dataConfig']['isDataAggregation']) {
6018
+ this.dataAggregationContainer = value.selectedWidgetConfig['dataConfig']['dataAggregationConfig']['dataAggregateColumes'];
6019
+ this.dataAggregateGroupByColume = value.selectedWidgetConfig['dataConfig']['dataAggregationConfig']['aggregateFields'];
6020
+ this.saveAggregationColume();
6021
+ }
6017
6022
  this.mainChartCourceObject['kpiConfig'] = value.selectedWidgetConfig;
6018
6023
  this.chartType = value.selectedWidgetConfig.dataConfig['chartType'];
6019
6024
  if (this.chartType == 'doughnut' || this.chartType == 'pie' || this.chartType == 'stackedBar' || this.chartType == 'multiLine' || this.chartType == 'multiBar') {
@@ -6027,8 +6032,6 @@ class DashChartComponent {
6027
6032
  value.selectedWidgetConfig['keyToPass'] = (value.selectedWidgetConfig['keyToPass']) ? value.selectedWidgetConfig['keyToPass'] : [];
6028
6033
  value.selectedWidgetConfig['dataConfig']['chartGroupBy'] = (value.selectedWidgetConfig['dataConfig']['chartGroupBy']) ? value.selectedWidgetConfig['dataConfig']['chartGroupBy'] : "";
6029
6034
  value.selectedWidgetConfig['dataConfig']['chartSortBy'] = (value.selectedWidgetConfig['dataConfig']['chartSortBy']) ? value.selectedWidgetConfig['dataConfig']['chartSortBy'] : "";
6030
- value.selectedWidgetConfig['dataConfig']['dataGroupBy'] = (value.selectedWidgetConfig['dataConfig']['dataGroupBy']) ? value.selectedWidgetConfig['dataConfig']['dataGroupBy'] : "";
6031
- value.selectedWidgetConfig['dataConfig']['functionType'] = (value.selectedWidgetConfig['dataConfig']['functionType']) ? value.selectedWidgetConfig['dataConfig']['functionType'] : "";
6032
6035
  if (value.selectedWidgetConfig['dataConfig']['chartGroupBy']) {
6033
6036
  const { dataSourceForChart, listOfGroupByData } = this.geChartWithGroupByForMultiSeris(this.previewData, this.chartConfig.argumentField, this.chartConfig.chart_config[0].valueField, value.selectedWidgetConfig['dataConfig']['chartGroupBy']);
6034
6037
  this.dataSourseForChart = dataSourceForChart;