gamma-app-controller 1.1.6 → 1.1.8

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.
Files changed (19) hide show
  1. package/esm2020/lib/application-controller/application-controller.module.mjs +10 -5
  2. package/esm2020/lib/application-controller/application-dataset-call.service.mjs +15 -10
  3. package/esm2020/lib/application-controller/application-dataset-component/application-dataset/application-dataset.component.mjs +14 -10
  4. package/esm2020/lib/application-controller/application-view-components/create-comp-view/create-comp-view.component.mjs +17 -11
  5. package/esm2020/lib/application-controller/shared/advanced-component/gamma-today-previous/gamma-today-previous.component.mjs +30 -19
  6. package/esm2020/lib/application-controller/support-components/dash-today-previous/dash-today-previous.component.mjs +278 -0
  7. package/esm2020/public-api.mjs +2 -1
  8. package/fesm2015/gamma-app-controller.mjs +346 -48
  9. package/fesm2015/gamma-app-controller.mjs.map +1 -1
  10. package/fesm2020/gamma-app-controller.mjs +339 -48
  11. package/fesm2020/gamma-app-controller.mjs.map +1 -1
  12. package/lib/application-controller/application-controller.module.d.ts +12 -11
  13. package/lib/application-controller/application-dataset-call.service.d.ts +2 -1
  14. package/lib/application-controller/application-dataset-component/application-dataset/application-dataset.component.d.ts +2 -1
  15. package/lib/application-controller/application-view-components/create-comp-view/create-comp-view.component.d.ts +2 -1
  16. package/lib/application-controller/shared/advanced-component/gamma-today-previous/gamma-today-previous.component.d.ts +3 -0
  17. package/lib/application-controller/support-components/dash-today-previous/dash-today-previous.component.d.ts +63 -0
  18. package/package.json +1 -1
  19. package/public-api.d.ts +1 -0
@@ -2300,7 +2300,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2300
2300
  }] });
2301
2301
 
2302
2302
  class ApplicationDatasetComponent {
2303
- constructor(service, commonService, toastr, activatedRoute, router, title, kpiService) {
2303
+ constructor(service, commonService, toastr, activatedRoute, router, title, kpiService, environment) {
2304
2304
  this.service = service;
2305
2305
  this.commonService = commonService;
2306
2306
  this.toastr = toastr;
@@ -2308,6 +2308,7 @@ class ApplicationDatasetComponent {
2308
2308
  this.router = router;
2309
2309
  this.title = title;
2310
2310
  this.kpiService = kpiService;
2311
+ this.environment = environment;
2311
2312
  this.dataSourceModal = {};
2312
2313
  this.title.setTitle('Application Datasets');
2313
2314
  }
@@ -2516,7 +2517,6 @@ class ApplicationDatasetComponent {
2516
2517
  }
2517
2518
  transformedObject['measures'] = request.measures;
2518
2519
  transformedObject['dimensions'] = request.dimensions;
2519
- let defaultFilters = { operationFilter: { startDate: moment().subtract('15', 'days').format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD') } };
2520
2520
  transformedObject['filters'] = this.transformDataForMFilter([], request.mapedFilters);
2521
2521
  transformedObject['sorters'] = request.sorters;
2522
2522
  transformedObject["paginationRequired"] = false;
@@ -2539,7 +2539,7 @@ class ApplicationDatasetComponent {
2539
2539
  value: mapping.defaultValue
2540
2540
  };
2541
2541
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
2542
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYY-MM-DD");
2542
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
2543
2543
  }
2544
2544
  const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
2545
2545
  if (filter) {
@@ -2553,7 +2553,7 @@ class ApplicationDatasetComponent {
2553
2553
  resultObj.value = value;
2554
2554
  }
2555
2555
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
2556
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYY-MM-DD");
2556
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
2557
2557
  }
2558
2558
  }
2559
2559
  }
@@ -2572,7 +2572,7 @@ class ApplicationDatasetComponent {
2572
2572
  serviceJson[filter.serverColumn] = filter.defaultValue;
2573
2573
  let datecolumn = filter.serverColumn.toLowerCase();
2574
2574
  if (datecolumn.includes('date') && typeof filter.dataType === 'string') {
2575
- serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYYMMDD").format("YYYY-MM-DD");
2575
+ serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(this.environment.dataFormat);
2576
2576
  }
2577
2577
  else {
2578
2578
  serviceJson[filter.serverColumn] = filter.defaultValue;
@@ -2653,19 +2653,24 @@ class ApplicationDatasetComponent {
2653
2653
  value: mapping.defaultValue
2654
2654
  };
2655
2655
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
2656
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYY-MM-DD");
2656
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
2657
2657
  }
2658
2658
  result.push(resultObj);
2659
2659
  });
2660
2660
  return result;
2661
2661
  }
2662
2662
  }
2663
- ApplicationDatasetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatasetComponent, deps: [{ token: ApplicationContentService }, { token: CommonService }, { token: i2$1.ToastrService }, { token: i4.ActivatedRoute }, { token: i4.Router }, { token: i1.Title }, { token: kpicommonService$2 }], target: i0.ɵɵFactoryTarget.Component });
2663
+ ApplicationDatasetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatasetComponent, deps: [{ token: ApplicationContentService }, { token: CommonService }, { token: i2$1.ToastrService }, { token: i4.ActivatedRoute }, { token: i4.Router }, { token: i1.Title }, { token: kpicommonService$2 }, { token: APP_ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Component });
2664
2664
  ApplicationDatasetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ApplicationDatasetComponent, selector: "app-application-dataset", viewQueries: [{ propertyName: "scrollToElement", first: true, predicate: ["scrollToElement"], descendants: true }], ngImport: i0, template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Application Datasets'\"></lib-common-header>\n\n <div class=\"p-4 w-full\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n <h6 class=\"mb-2 text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n <i class=\"fa fa-table mr-2\"></i> Manage Datasets\n <div class=\"ml-auto\">\n <button class=\"{{commonService.btnLightWhite}}\" (click)=\"backToView()\" *ngIf=\"pageViewId\">\n Back To View\n </button>\n <button class=\"{{commonService.btnLightWhite}}\" (click)=\"backToPage()\" *ngIf=\"pageConfigId\">\n Back To Page\n </button>\n\n <button class=\"{{commonService.btn_primary_md}}\" (click)=\"getCreateNewDataset()\">\n Add Dataset\n </button>\n\n </div>\n </h6>\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <dx-data-grid [columnAutoWidth]=\"true\" [dataSource]=\"dataSettableDataSource\" [hoverStateEnabled]=\"true\"\n *ngIf=\"!isLoader\" [selectedRowKeys]=\"[]\" [showBorders]=\"true\" [showColumnLines]=\"true\"\n [showRowLines]=\"true\" id=\"gridContainer\">\n <dxo-paging [pageSize]=\"10\"></dxo-paging>\n <dxo-export [enabled]=\"true\"></dxo-export>\n <dxo-search-panel [highlightCaseSensitive]=\"true\" [visible]=\"true\"></dxo-search-panel>\n\n <dxi-column dataField=\"datasetName\"></dxi-column>\n <dxi-column dataField=\"datasetType\"></dxi-column>\n <dxi-column dataField=\"createdBy\"></dxi-column>\n <dxi-column dataField=\"creationDate\" sortOrder=\"desc\"></dxi-column>\n <dxi-column dataField=\"action\" cellTemplate=\"cellTemplate\" [fixed]=\"true\"\n fixedPosition=\"right\"></dxi-column>\n <div *dxTemplate=\"let data of 'cellTemplate'\">\n <button class=\"{{commonService.btn_primary_md}}\" (click)=\"editDataset(data.data)\">\n Edit\n </button>\n <button class=\"{{commonService.btn_warning_md}}\" (click)=\"duplicateDataset(data.data)\">\n Duplicate\n </button>\n <button class=\"{{commonService.btn_danger_md}}\" (click)=\"deleteDataset(data.data)\">\n Delete\n </button>\n <button class=\"{{commonService.btn_success_md}}\" (click)=\"testDataset(data.data)\">\n Test Data\n </button>\n </div>\n\n\n </dx-data-grid>\n </div>\n </div>\n\n\n</div>\n\n\n<dx-popup [(visible)]=\"isDatasetPreview\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"800\"\n [height]=\"'auto'\" [showTitle]=\"true\" class=\"popup\" title=\"{{dataSourceModal.datasetName}}\">\n <div *dxTemplate=\"let data of 'content'\">\n <!-- <div class=\"text-2xl \">{{dataSourceModal.datasetName}}</div> -->\n <div class=\"flex flex-row mt-2\">\n <ng-container *ngIf=\"isFilterInputs\">\n <ng-container *ngIf=\"dataSourceModal.config.queryConfig\">\n <ng-container *ngFor=\"let request of dataSourceModal.config.queryConfig.mapedFilters\">\n <div class=\"m-2\">\n <div class=\"text-md mb-1\"> {{getCapitalize(request.localColumn)}}</div>\n <dx-date-box displayFormat=\"yyyy-MM-dd\" type=\"date\"\n (onValueChanged)=\"startDateChange($event,request)\"\n *ngIf=\"getFilter(request.localColumn)\">\n </dx-date-box>\n <dx-text-box [(ngModel)]=\"request.defaultValue\"\n *ngIf=\"!getFilter(request.localColumn)\"></dx-text-box>\n </div>\n </ng-container>\n </ng-container>\n\n <div class=\"mt-2\">\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer my-4\" (click)=\"getDataPreview()\">\n Check\n </button>\n </div>\n </ng-container>\n </div>\n\n\n <div class=\"w-full border p-3\">\n <app-loader *ngIf=\"isDatasetloader\"></app-loader>\n <ng-container *ngIf=\"!isDatasetloader\">\n\n <pre><code>{{dataSourceModal.data | json}}</code></pre>\n </ng-container>\n </div>\n </div>\n</dx-popup>", styles: [""], dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i6.DxoExportComponent, selector: "dxo-export", inputs: ["backgroundColor", "enabled", "fileName", "formats", "margin", "printingEnabled", "proxyUrl", "svgToCanvas", "allowExportSelectedData", "customizeExcelCell", "excelFilterEnabled", "excelWrapTextEnabled", "ignoreExcelErrors", "texts"] }, { kind: "component", type: i9.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "customizeExportData", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "focusStateEnabled", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExported", "onExporting", "onFileSaving", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "customizeExportDataChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "focusStateEnabledChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i6.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i6.DxoPagingComponent, selector: "dxo-paging", inputs: ["enabled", "pageIndex", "pageSize"], outputs: ["pageIndexChange", "pageSizeChange"] }, { kind: "component", type: i6.DxoSearchPanelComponent, selector: "dxo-search-panel", inputs: ["highlightCaseSensitive", "highlightSearchText", "placeholder", "searchVisibleColumnsOnly", "text", "visible", "width"], outputs: ["textChange"] }, { kind: "component", type: i11.DxDateBoxComponent, selector: "dx-date-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "adaptivityEnabled", "applyButtonText", "applyValueMode", "buttons", "calendarOptions", "cancelButtonText", "dateOutOfRangeMessage", "dateSerializationFormat", "deferRendering", "disabled", "disabledDates", "displayFormat", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "interval", "invalidDateMessage", "isValid", "label", "labelMode", "max", "maxLength", "min", "name", "opened", "openOnFieldClick", "pickerType", "placeholder", "readOnly", "rtlEnabled", "showAnalogClock", "showClearButton", "showDropDownButton", "spellcheck", "stylingMode", "tabIndex", "text", "type", "useMaskBehavior", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "adaptivityEnabledChange", "applyButtonTextChange", "applyValueModeChange", "buttonsChange", "calendarOptionsChange", "cancelButtonTextChange", "dateOutOfRangeMessageChange", "dateSerializationFormatChange", "deferRenderingChange", "disabledChange", "disabledDatesChange", "displayFormatChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "intervalChange", "invalidDateMessageChange", "isValidChange", "labelChange", "labelModeChange", "maxChange", "maxLengthChange", "minChange", "nameChange", "openedChange", "openOnFieldClickChange", "pickerTypeChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showAnalogClockChange", "showClearButtonChange", "showDropDownButtonChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "typeChange", "useMaskBehaviorChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i4$2.DxPopupComponent, selector: "dx-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "elementAttr", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "accessKeyChange", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "dragAndResizeAreaChange", "dragEnabledChange", "dragOutsideBoundaryChange", "elementAttrChange", "focusStateEnabledChange", "fullScreenChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "resizeEnabledChange", "restorePositionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showTitleChange", "tabIndexChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i7.DxTextBoxComponent, selector: "dx-text-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "label", "labelMode", "mask", "maskChar", "maskInvalidMessage", "maskRules", "maxLength", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showMaskMode", "spellcheck", "stylingMode", "tabIndex", "text", "useMaskedValue", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "labelChange", "labelModeChange", "maskChange", "maskCharChange", "maskInvalidMessageChange", "maskRulesChange", "maxLengthChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showMaskModeChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useMaskedValueChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoaderComponent, selector: "app-loader" }, { kind: "component", type: CommonHeaderComponent, selector: "lib-common-header", inputs: ["pageTitle"] }, { kind: "pipe", type: i4$1.JsonPipe, name: "json" }] });
2665
2665
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatasetComponent, decorators: [{
2666
2666
  type: Component,
2667
2667
  args: [{ selector: 'app-application-dataset', template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Application Datasets'\"></lib-common-header>\n\n <div class=\"p-4 w-full\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n <h6 class=\"mb-2 text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n <i class=\"fa fa-table mr-2\"></i> Manage Datasets\n <div class=\"ml-auto\">\n <button class=\"{{commonService.btnLightWhite}}\" (click)=\"backToView()\" *ngIf=\"pageViewId\">\n Back To View\n </button>\n <button class=\"{{commonService.btnLightWhite}}\" (click)=\"backToPage()\" *ngIf=\"pageConfigId\">\n Back To Page\n </button>\n\n <button class=\"{{commonService.btn_primary_md}}\" (click)=\"getCreateNewDataset()\">\n Add Dataset\n </button>\n\n </div>\n </h6>\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <dx-data-grid [columnAutoWidth]=\"true\" [dataSource]=\"dataSettableDataSource\" [hoverStateEnabled]=\"true\"\n *ngIf=\"!isLoader\" [selectedRowKeys]=\"[]\" [showBorders]=\"true\" [showColumnLines]=\"true\"\n [showRowLines]=\"true\" id=\"gridContainer\">\n <dxo-paging [pageSize]=\"10\"></dxo-paging>\n <dxo-export [enabled]=\"true\"></dxo-export>\n <dxo-search-panel [highlightCaseSensitive]=\"true\" [visible]=\"true\"></dxo-search-panel>\n\n <dxi-column dataField=\"datasetName\"></dxi-column>\n <dxi-column dataField=\"datasetType\"></dxi-column>\n <dxi-column dataField=\"createdBy\"></dxi-column>\n <dxi-column dataField=\"creationDate\" sortOrder=\"desc\"></dxi-column>\n <dxi-column dataField=\"action\" cellTemplate=\"cellTemplate\" [fixed]=\"true\"\n fixedPosition=\"right\"></dxi-column>\n <div *dxTemplate=\"let data of 'cellTemplate'\">\n <button class=\"{{commonService.btn_primary_md}}\" (click)=\"editDataset(data.data)\">\n Edit\n </button>\n <button class=\"{{commonService.btn_warning_md}}\" (click)=\"duplicateDataset(data.data)\">\n Duplicate\n </button>\n <button class=\"{{commonService.btn_danger_md}}\" (click)=\"deleteDataset(data.data)\">\n Delete\n </button>\n <button class=\"{{commonService.btn_success_md}}\" (click)=\"testDataset(data.data)\">\n Test Data\n </button>\n </div>\n\n\n </dx-data-grid>\n </div>\n </div>\n\n\n</div>\n\n\n<dx-popup [(visible)]=\"isDatasetPreview\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"800\"\n [height]=\"'auto'\" [showTitle]=\"true\" class=\"popup\" title=\"{{dataSourceModal.datasetName}}\">\n <div *dxTemplate=\"let data of 'content'\">\n <!-- <div class=\"text-2xl \">{{dataSourceModal.datasetName}}</div> -->\n <div class=\"flex flex-row mt-2\">\n <ng-container *ngIf=\"isFilterInputs\">\n <ng-container *ngIf=\"dataSourceModal.config.queryConfig\">\n <ng-container *ngFor=\"let request of dataSourceModal.config.queryConfig.mapedFilters\">\n <div class=\"m-2\">\n <div class=\"text-md mb-1\"> {{getCapitalize(request.localColumn)}}</div>\n <dx-date-box displayFormat=\"yyyy-MM-dd\" type=\"date\"\n (onValueChanged)=\"startDateChange($event,request)\"\n *ngIf=\"getFilter(request.localColumn)\">\n </dx-date-box>\n <dx-text-box [(ngModel)]=\"request.defaultValue\"\n *ngIf=\"!getFilter(request.localColumn)\"></dx-text-box>\n </div>\n </ng-container>\n </ng-container>\n\n <div class=\"mt-2\">\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer my-4\" (click)=\"getDataPreview()\">\n Check\n </button>\n </div>\n </ng-container>\n </div>\n\n\n <div class=\"w-full border p-3\">\n <app-loader *ngIf=\"isDatasetloader\"></app-loader>\n <ng-container *ngIf=\"!isDatasetloader\">\n\n <pre><code>{{dataSourceModal.data | json}}</code></pre>\n </ng-container>\n </div>\n </div>\n</dx-popup>" }]
2668
- }], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.ActivatedRoute }, { type: i4.Router }, { type: i1.Title }, { type: kpicommonService$2 }]; }, propDecorators: { scrollToElement: [{
2668
+ }], ctorParameters: function () {
2669
+ return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.ActivatedRoute }, { type: i4.Router }, { type: i1.Title }, { type: kpicommonService$2 }, { type: undefined, decorators: [{
2670
+ type: Inject,
2671
+ args: [APP_ENVIRONMENT]
2672
+ }] }];
2673
+ }, propDecorators: { scrollToElement: [{
2669
2674
  type: ViewChild,
2670
2675
  args: ['scrollToElement']
2671
2676
  }] } });
@@ -4942,14 +4947,280 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
4942
4947
  args: ['datasetmodal']
4943
4948
  }] } });
4944
4949
 
4950
+ class DashTodayPreviousComponent {
4951
+ constructor(commonService, cdr, service, taostr) {
4952
+ this.commonService = commonService;
4953
+ this.cdr = cdr;
4954
+ this.service = service;
4955
+ this.taostr = taostr;
4956
+ this.dataSourseForTable = [];
4957
+ this.allConfiguredViews = [];
4958
+ this.optionalDrilDownDataSource = [];
4959
+ this.table_columns_config = {
4960
+ "kpiConfig": {
4961
+ "serviceId": "",
4962
+ "api": "/kpi/trends/network/get-metric-data",
4963
+ "displayType": "table",
4964
+ "formate": "",
4965
+ "keyToPass": [],
4966
+ "componentName": "GammaAdvanceOperatorTableComponent",
4967
+ "dataConfig": {}
4968
+ },
4969
+ };
4970
+ this.tableDataConfig = {
4971
+ "timeUnit": "Day",
4972
+ "timeValue": 1,
4973
+ "isPreviousDay": true,
4974
+ "color": "",
4975
+ "size": "",
4976
+ "sortBy": [],
4977
+ "columns": []
4978
+ };
4979
+ this.enrichNameList = ["abbreviateNumber", "getColorCodeSpan", "ThousandSeparator", "ThousandSeparatorWithTwoDecimals"];
4980
+ this.isLoader = true;
4981
+ this.activeTab = 'basic';
4982
+ this.gettodayPreviousConfigOutPut = new EventEmitter();
4983
+ }
4984
+ set chartconfigData(value) {
4985
+ if (value === undefined || value.length === 0) {
4986
+ return;
4987
+ }
4988
+ else {
4989
+ this.jsaonDatasource = value.data[0];
4990
+ this.previousRevenue = value.data.length > 1 ? value.data[1].revenue : null;
4991
+ this.configColume = Object.keys(value.data[0]);
4992
+ this.dataSourseForTable = value.data.slice(0, 10);
4993
+ this.selectedViewConfigs = value;
4994
+ this.selectedTableViewType = value.selectedViewType;
4995
+ if (value.selectedWidgetConfig) {
4996
+ this.table_columns_config['kpiConfig'] = value.selectedWidgetConfig;
4997
+ this.tableDataConfig = value.selectedWidgetConfig.dataConfig;
4998
+ this.tableDataConfig.columns = (value.selectedWidgetConfig.dataConfig.columns) ? value.selectedWidgetConfig.dataConfig.columns : [];
4999
+ if (value.selectedWidgetConfig.viewProperties) {
5000
+ this.viewProperties = value.selectedWidgetConfig.viewProperties;
5001
+ this.viewProperties = {
5002
+ "enableClickEvent": value.selectedWidgetConfig.viewProperties.enableClickEvent,
5003
+ "enableRightClickEvent": value.selectedWidgetConfig.viewProperties.enableRightClickEvent
5004
+ };
5005
+ if (value.selectedWidgetConfig.viewProperties.enableClickEvent) {
5006
+ if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == 'optionalDrillDown') {
5007
+ this.optionalDrilDownDataSource = value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews;
5008
+ this.viewProperties['clickEventOptions'] = {
5009
+ "eventType": value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType,
5010
+ "associatedViews": []
5011
+ };
5012
+ }
5013
+ else if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == 'drilldown') {
5014
+ this.viewProperties['clickEventOptions'] = {
5015
+ "eventType": value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType,
5016
+ "associatedViews": value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews
5017
+ };
5018
+ }
5019
+ else if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == '') {
5020
+ this.viewProperties['clickEventOptions'] = {
5021
+ "eventType": "",
5022
+ "associatedViews": []
5023
+ };
5024
+ }
5025
+ else {
5026
+ this.viewProperties = {
5027
+ enableClickEvent: false,
5028
+ enableRightClickEvent: true,
5029
+ clickEventOptions: {
5030
+ associatedViews: [],
5031
+ eventType: ""
5032
+ }
5033
+ };
5034
+ }
5035
+ }
5036
+ else {
5037
+ this.viewProperties['clickEventOptions'] = {};
5038
+ }
5039
+ }
5040
+ else {
5041
+ this.viewProperties = {
5042
+ enableClickEvent: false,
5043
+ enableRightClickEvent: true,
5044
+ clickEventOptions: {
5045
+ associatedViews: [],
5046
+ eventType: ""
5047
+ }
5048
+ };
5049
+ }
5050
+ this.cdr.detectChanges();
5051
+ }
5052
+ else {
5053
+ this.tableDataConfig.columns = value.columnData;
5054
+ this.viewProperties = {
5055
+ enableClickEvent: false,
5056
+ enableRightClickEvent: true,
5057
+ clickEventOptions: {
5058
+ associatedViews: [],
5059
+ eventType: ""
5060
+ }
5061
+ };
5062
+ if (!this.tableDataConfig.columns) {
5063
+ this.tableDataConfig.columns = [];
5064
+ this.configColume.forEach(element => {
5065
+ let obj = {
5066
+ "visible": true,
5067
+ "dataField": element,
5068
+ "caption": this.commonService.convertString(element),
5069
+ "enrichName": "",
5070
+ };
5071
+ this.tableDataConfig.columns.push(obj);
5072
+ });
5073
+ console.log(this.configColume);
5074
+ }
5075
+ this.cdr.detectChanges();
5076
+ }
5077
+ }
5078
+ }
5079
+ ngOnInit() {
5080
+ this.isLoader = true;
5081
+ this.service.getAppViewConfigs().subscribe({
5082
+ next: (data) => {
5083
+ this.allConfiguredViews = data;
5084
+ this.isLoader = false;
5085
+ }, error: (err) => {
5086
+ this.taostr.error('Unexpected Server Exception. Please contact System Admin.', 'All Views');
5087
+ }
5088
+ });
5089
+ if (this.optionalDrilDownDataSource.length == 0) {
5090
+ this.optionalDrilDownDataSource = [
5091
+ {
5092
+ 'viewId': "",
5093
+ 'filterCondition': ""
5094
+ }
5095
+ ];
5096
+ }
5097
+ this.cdr.detectChanges();
5098
+ }
5099
+ addColumns() {
5100
+ let obj = {
5101
+ "visible": true,
5102
+ "dataField": "",
5103
+ "caption": "",
5104
+ "enrichName": "",
5105
+ };
5106
+ if (this.selectedTableViewType === 'groupTable') {
5107
+ obj['group'] = '';
5108
+ }
5109
+ this.tableDataConfig.columns.push(obj);
5110
+ }
5111
+ deleteColumns(i) {
5112
+ this.tableDataConfig.columns.splice(i, 1);
5113
+ }
5114
+ getEnrichClassName(e, item) {
5115
+ item.enrichName = e.value;
5116
+ }
5117
+ moveItemForColumns(index, direction) {
5118
+ if (index < 0 || index >= this.tableDataConfig.columns.length)
5119
+ return;
5120
+ const newPosition = direction === 'up' ? index - 1 : index + 1;
5121
+ if (newPosition < 0 || newPosition >= this.tableDataConfig.columns.length)
5122
+ return;
5123
+ const itemToMove = this.tableDataConfig.columns[index];
5124
+ this.tableDataConfig.columns.splice(index, 1);
5125
+ this.tableDataConfig.columns.splice(newPosition, 0, itemToMove);
5126
+ }
5127
+ getObjectKeys(obj) {
5128
+ return Object.keys(obj);
5129
+ }
5130
+ setActiveTab(tab) {
5131
+ this.activeTab = tab;
5132
+ }
5133
+ getGroupColumns(columns) {
5134
+ const groupedColumns = columns.reduce((acc, column) => {
5135
+ let group = acc.find(item => item.caption === column.group);
5136
+ if (!group) {
5137
+ group = {
5138
+ caption: column.group,
5139
+ columns: []
5140
+ };
5141
+ acc.push(group);
5142
+ }
5143
+ group.columns.push({
5144
+ dataField: column.dataField,
5145
+ visible: column.visible,
5146
+ caption: column.caption
5147
+ });
5148
+ return acc;
5149
+ }, []);
5150
+ return groupedColumns;
5151
+ }
5152
+ geColumnsFromGroup(columns) {
5153
+ const newColumns = [];
5154
+ columns.forEach(group => {
5155
+ group.columns.forEach(col => {
5156
+ newColumns.push({
5157
+ dataField: col.dataField,
5158
+ visible: col.visible,
5159
+ caption: col.caption,
5160
+ group: group.caption
5161
+ });
5162
+ });
5163
+ });
5164
+ return newColumns;
5165
+ }
5166
+ getSaveConfig() {
5167
+ debugger;
5168
+ if (this.viewProperties.clickEventOptions.eventType == 'optionalDrillDown') {
5169
+ this.viewProperties['clickEventOptions']['associatedViews'] = this.optionalDrilDownDataSource;
5170
+ }
5171
+ this.table_columns_config.kpiConfig['viewProperties'] = this.viewProperties;
5172
+ this.table_columns_config.kpiConfig.dataConfig = JSON.parse(JSON.stringify(this.tableDataConfig));
5173
+ this.gettodayPreviousConfigOutPut.emit(this.table_columns_config);
5174
+ }
5175
+ deleteAssociatedParams(index) {
5176
+ this.optionalDrilDownDataSource.splice(index, 1);
5177
+ }
5178
+ addAssociatedParams() {
5179
+ this.optionalDrilDownDataSource.push({
5180
+ 'viewId': "",
5181
+ 'filterCondition': ""
5182
+ });
5183
+ }
5184
+ getSelectedEventType(e) {
5185
+ if (e.event) {
5186
+ this.optionalDrilDownDataSource = [];
5187
+ if (this.viewProperties.clickEventOptions.eventType == 'drilldown') {
5188
+ this.table_columns_config.kpiConfig['viewProperties']['associatedViews'] = [];
5189
+ }
5190
+ }
5191
+ }
5192
+ resetViewProprstise() {
5193
+ this.viewProperties = {
5194
+ enableClickEvent: false,
5195
+ enableRightClickEvent: true,
5196
+ clickEventOptions: {
5197
+ associatedViews: [],
5198
+ eventType: ""
5199
+ }
5200
+ };
5201
+ }
5202
+ }
5203
+ DashTodayPreviousComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashTodayPreviousComponent, deps: [{ token: CommonService }, { token: i0.ChangeDetectorRef }, { token: ApplicationContentService }, { token: i2$1.ToastrService }], target: i0.ɵɵFactoryTarget.Component });
5204
+ DashTodayPreviousComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DashTodayPreviousComponent, selector: "lib-dash-today-previous", inputs: { chartconfigData: ["datasetmodal", "chartconfigData"] }, outputs: { gettodayPreviousConfigOutPut: "gettodayPreviousConfigOutPut" }, ngImport: i0, template: "\n\n<div class=\"m-2\"></div>\n <div class=\"w-full m-2 border-r\">\n <ng-container *ngIf=\"!isJsonPreview\">\n <pre><code>{{jsaonDatasource | json}}</code></pre>\n </ng-container>\n <ng-container *ngIf=\"isJsonPreview\"> \n <div class=\"flex justify-center items-start bg-gray-800 p-3 mx-2 text-center\">\n <div class=\"w-full\">\n <div [style.color]=\"tableDataConfig.color\"\n [style.font-size.px]=\"tableDataConfig.size || 16\"\n class=\"font-semibold\">{{jsaonDatasource.revenue}}</div>\n <div class=\"text-gray-400 text-sm font-light m-2\">\n Previous: {{ previousRevenue !== null ? previousRevenue : 'N/A' }}\n <span class=\"text-teal-400\">(0.0001%)</span>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"w-full mx-2 border-r\">\n <div class=\"mb-4 border-b border-gray-200 dark:border-gray-700\">\n <ul class=\"flex flex-wrap -mb-px text-sm font-medium text-center\" role=\"tablist\">\n <li class=\"me-2\" role=\"presentation\">\n <button class=\"inline-block p-4 border-b-2 rounded-t-lg\" [ngClass]=\"{\n 'text-purple-600 border-purple-600 dark:text-purple-500 dark:border-purple-500': activeTab === 'basic',\n 'text-gray-500 dark:text-gray-400 border-transparent': activeTab !== 'basic'\n }\" (click)=\"setActiveTab('basic')\" type=\"button\" role=\"tab\">\n Basic\n </button>\n </li>\n <li class=\"me-2\" role=\"presentation\">\n <button class=\"inline-block p-4 border-b-2 rounded-t-lg\" [ngClass]=\"{\n 'text-purple-600 border-purple-600 dark:text-purple-500 dark:border-purple-500': activeTab === 'columns',\n 'text-gray-500 dark:text-gray-400 border-transparent': activeTab !== 'columns'\n }\" (click)=\"setActiveTab('columns')\" type=\"button\" role=\"tab\">\n Columns\n </button>\n </li>\n <li class=\"me-2\" role=\"presentation\">\n <button class=\"inline-block p-4 border-b-2 rounded-t-lg\" [ngClass]=\"{\n 'text-purple-600 border-purple-600 dark:text-purple-500 dark:border-purple-500': activeTab === 'properties',\n 'text-gray-500 dark:text-gray-400 border-transparent': activeTab !== 'properties'\n }\" (click)=\"setActiveTab('properties')\" type=\"button\" role=\"tab\">\n Properties\n </button>\n </li>\n\n </ul>\n </div>\n\n <div id=\"default-styled-tab-content\"> \n <div *ngIf=\"activeTab === 'basic'\">\n <div class=\"flex flex-col flex-auto min-w-0\">\n <div class=\"text-sm py-1 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Title Config\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\">\n \n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\">Color</div>\n <dx-color-box [(ngModel)]=\"tableDataConfig.color\"></dx-color-box>\n\n </div>\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\">Size</div>\n <dx-text-box placeholder=\"Enter size\" [(ngModel)]=\"tableDataConfig.size\"></dx-text-box>\n \n </div>\n \n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\"> Key To Pass </div>\n <dx-tag-box [items]=\"configColume\"\n [(ngModel)]=\"table_columns_config.kpiConfig.keyToPass\"></dx-tag-box>\n </div>\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\"> Display Formate </div>\n <dx-select-box [items]=\"['daily','hourly','monthly']\"\n [(ngModel)]=\"table_columns_config.kpiConfig.formate\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\"> Sort By </div>\n <dx-tag-box [items]=\"configColume\"\n [(ngModel)]=\"tableDataConfig.sortBy\"></dx-tag-box>\n </div>\n </div> \n </div>\n </div>\n </div>\n <div *ngIf=\"activeTab === 'basic'\" class=\"flex flex-col flex-auto min-w-0\">\n <div class=\"text-sm py-1 font-extrabold border-b bg-gray-700 text-white px-2\"> Select The Previos Date Range\n </div>\n <div class=\"flex flse-row border-x border-b p-4\">\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\" style=\"margin-top: 37px;\">\n <dx-check-box [(value)]=\"tableDataConfig.isPreviousDay\" text=\"Previous Day\"></dx-check-box>\n \n </div>\n <ng-container *ngIf=\"tableDataConfig.isPreviousDay\">\n <div class=\"px-1 mb-1 w-1/2 flex items-center\">\n <dx-select-box \n [items]=\"['Day', 'Month', 'Year']\"\n class=\"ml-2\"\n [(ngModel)]=\"tableDataConfig.timeUnit\">\n </dx-select-box>\n \n <dx-text-box type=\"number\" [(ngModel)]=\"tableDataConfig.timeValue\"\n class=\"ml-2\"></dx-text-box>\n </div>\n </ng-container>\n \n </div>\n </div>\n\n </div>\n <div *ngIf=\"activeTab === 'columns'\">\n <div class=\"h-full overflow-x-auto\">\n <div class=\"flex flex-col flex-auto min-w-0\">\n\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 border-b flex flex-row\"\n *ngFor=\"let item of tableDataConfig.columns; let i = index;\">\n <div class=\"px-1 mb-2 mt-6 w-full\">\n <dx-check-box [(ngModel)]=\"item.visible\"\n text=\"Visiblity\"></dx-check-box>\n </div>\n \n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value Field</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"configColume\"\n [(ngModel)]=\"item.dataField\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Caption</div>\n <dx-text-box [(ngModel)]=\"item.caption\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> UI Function</div>\n <dx-select-box [items]=\"enrichNameList\" [(ngModel)]=\"item.enrichName\"\n [searchEnabled]=\"true\"></dx-select-box>\n </div>\n <div class=\"text-center mt-8 w-full\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== tableDataConfig.columns.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n </div>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n <div *ngIf=\"activeTab === 'properties'\">\n <div class=\"h-full overflow-x-auto\">\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <ng-container *ngIf=\"!isLoader\">\n <div class=\"flex flex-row justify-between border-b py-3\">\n <div class=\"mx-2\">\n <dx-check-box [value]=\"viewProperties.enableClickEvent\"\n [(ngModel)]=\"viewProperties.enableClickEvent\"\n text=\"Enable Click Event\"></dx-check-box>\n </div>\n <div class=\"mx-2\">\n <dx-check-box [value]=\"viewProperties.enableRightClickEvent\"\n [(ngModel)]=\"viewProperties.enableRightClickEvent\"\n text=\"Enable Right Click\"></dx-check-box>\n </div>\n </div>\n <div class=\"w-full p-2\" *ngIf=\"viewProperties.enableClickEvent\">\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-sm py-1 font-extrabold border-b bg-gray-700 text-white px-2\"> Event\n Type\n Option\n </div>\n <div class=\"w-full p-3 border-x border-b \">\n <div class=\"flex flex-row\">\n <div class=\"w-full\">\n <div class=\"text-md mb-2\"> Event Type</div>\n </div>\n <div class=\"w-full\">\n <dx-select-box [items]=\"['drilldown','sameViewDrilldown','optionalDrillDown']\"\n (onValueChanged)=\"getSelectedEventType($event)\"\n [(ngModel)]=\"viewProperties.clickEventOptions.eventType\"></dx-select-box>\n </div>\n </div>\n <ng-container *ngIf=\"viewProperties.clickEventOptions.eventType == 'drilldown'\">\n <div class=\"flex flex-row justify-between mt-3\">\n <div class=\"w-full\">\n <div class=\"text-md mb-2\"> Associated Views</div>\n <dx-tag-box [items]=\"allConfiguredViews\"\n [(ngModel)]=\"viewProperties.clickEventOptions.associatedViews\"\n valueExpr=\"viewId\" displayExpr=\"viewName\"\n [showSelectionControls]=\"true\" [searchEnabled]=\"true\"></dx-tag-box>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"viewProperties.clickEventOptions.eventType == 'sameViewDrilldown'\">\n <div class=\"flex flex-row justify-between mt-3\">\n <div class=\"w-full\">\n <div class=\"text-md mb-2\"> Associated Views</div>\n <dx-tag-box [items]=\"allConfiguredViews\"\n [(ngModel)]=\"viewProperties.clickEventOptions.associatedViews\"\n valueExpr=\"viewId\" displayExpr=\"viewName\"\n [showSelectionControls]=\"true\" [searchEnabled]=\"true\"></dx-tag-box>\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"viewProperties.clickEventOptions.eventType == 'optionalDrillDown'\">\n <div class=\"flex flex-row justify-between mt-3\">\n <div class=\"w-full\">\n <ng-container\n *ngFor=\"let item of optionalDrilDownDataSource;let i = index;\">\n\n <div class=\"flex flex-row justify-between\">\n <div class=\"mx-2 w-1/2\">\n <div class=\"text-md mb-2\"> Associated Views</div>\n <dx-tag-box [items]=\"allConfiguredViews\"\n [(ngModel)]=\"item.viewId\" valueExpr=\"viewId\"\n displayExpr=\"viewName\" [showSelectionControls]=\"true\"\n [maxDisplayedTags]=\"2\"\n [searchEnabled]=\"true\"></dx-tag-box>\n\n </div>\n <div class=\"mx-2 w-1/2\">\n <div class=\"text-md mb-2\"> Associated Params</div>\n <dx-text-box\n [(ngModel)]=\"item.filterCondition\"></dx-text-box>\n </div>\n <div class=\"mx-2\">\n <button\n class=\"{{commonService.btn_danger_sm}} cursor-pointer mt-8\"\n (click)=\"deleteAssociatedParams(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </ng-container>\n <div class=\"flex flex-row justify-end mt-4\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addAssociatedParams()\">Add\n Params</button>\n </div>\n </div>\n </div>\n </ng-container>\n <button class=\"{{commonService.btn_light_md}} cursor-pointer mt-4\"\n (click)=\"resetViewProprstise()\">Reset All Event</button>\n </div>\n </div>\n\n </div>\n </ng-container>\n </div>\n </div>\n\n </div>\n </div>\n\n\n<div class=\"flex flex-row border-t pl-3\">\n <div class=\"flex justify-start mx-1\">\n <button class=\"{{commonService.btn_warning_md}} cursor-pointer mt-2\" (click)=\"isJsonPreview = true\">\n Preview</button>\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer mt-2\" (click)=\"isJsonPreview = false\">Data\n Preview</button>\n </div>\n <div class=\"flex justify-end mx-1 flex-grow\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mt-2\"\n (click)=\"getSaveConfig()\">Submit</button>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.DxCheckBoxComponent, selector: "dx-check-box", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "iconSize", "isValid", "name", "readOnly", "rtlEnabled", "tabIndex", "text", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "visible", "width"], outputs: ["onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconSizeChange", "isValidChange", "nameChange", "readOnlyChange", "rtlEnabledChange", "tabIndexChange", "textChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i6$2.DxColorBoxComponent, selector: "dx-color-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "applyButtonText", "applyValueMode", "buttons", "cancelButtonText", "deferRendering", "disabled", "dropDownButtonTemplate", "dropDownOptions", "editAlphaChannel", "elementAttr", "fieldTemplate", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "keyStep", "label", "labelMode", "name", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showDropDownButton", "stylingMode", "tabIndex", "text", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "visible", "width"], outputs: ["onChange", "onClosed", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "applyButtonTextChange", "applyValueModeChange", "buttonsChange", "cancelButtonTextChange", "deferRenderingChange", "disabledChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "editAlphaChannelChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "keyStepChange", "labelChange", "labelModeChange", "nameChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showDropDownButtonChange", "stylingModeChange", "tabIndexChange", "textChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i6$1.DxSelectBoxComponent, selector: "dx-select-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "buttons", "dataSource", "deferRendering", "disabled", "displayExpr", "displayValue", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "fieldTemplate", "focusStateEnabled", "grouped", "groupTemplate", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "items", "itemTemplate", "label", "labelMode", "maxLength", "minSearchLength", "name", "noDataText", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchEnabled", "searchExpr", "searchMode", "searchTimeout", "selectedItem", "showClearButton", "showDataBeforeSearch", "showDropDownButton", "showSelectionControls", "spellcheck", "stylingMode", "tabIndex", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCustomItemCreating", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onSelectionChanged", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayExprChange", "displayValueChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxLengthChange", "minSearchLengthChange", "nameChange", "noDataTextChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectedItemChange", "showClearButtonChange", "showDataBeforeSearchChange", "showDropDownButtonChange", "showSelectionControlsChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }, { kind: "component", type: i8$1.DxTagBoxComponent, selector: "dx-tag-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "applyValueMode", "buttons", "dataSource", "deferRendering", "disabled", "displayExpr", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "fieldTemplate", "focusStateEnabled", "grouped", "groupTemplate", "height", "hideSelectedItems", "hint", "hoverStateEnabled", "inputAttr", "isValid", "items", "itemTemplate", "label", "labelMode", "maxDisplayedTags", "maxFilterQueryLength", "maxLength", "minSearchLength", "multiline", "name", "noDataText", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchEnabled", "searchExpr", "searchMode", "searchTimeout", "selectAllMode", "selectAllText", "selectedItems", "showClearButton", "showDataBeforeSearch", "showDropDownButton", "showMultiTagOnly", "showSelectionControls", "stylingMode", "tabIndex", "tagTemplate", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCustomItemCreating", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onMultiTagPreparing", "onOpened", "onOptionChanged", "onSelectAllValueChanged", "onSelectionChanged", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "applyValueModeChange", "buttonsChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayExprChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hideSelectedItemsChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxDisplayedTagsChange", "maxFilterQueryLengthChange", "maxLengthChange", "minSearchLengthChange", "multilineChange", "nameChange", "noDataTextChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectAllModeChange", "selectAllTextChange", "selectedItemsChange", "showClearButtonChange", "showDataBeforeSearchChange", "showDropDownButtonChange", "showMultiTagOnlyChange", "showSelectionControlsChange", "stylingModeChange", "tabIndexChange", "tagTemplateChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }, { kind: "component", type: i7.DxTextBoxComponent, selector: "dx-text-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "label", "labelMode", "mask", "maskChar", "maskInvalidMessage", "maskRules", "maxLength", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showMaskMode", "spellcheck", "stylingMode", "tabIndex", "text", "useMaskedValue", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "labelChange", "labelModeChange", "maskChange", "maskCharChange", "maskInvalidMessageChange", "maskRulesChange", "maxLengthChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showMaskModeChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useMaskedValueChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoaderComponent, selector: "app-loader" }, { kind: "pipe", type: i4$1.JsonPipe, name: "json" }] });
5205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashTodayPreviousComponent, decorators: [{
5206
+ type: Component,
5207
+ args: [{ selector: 'lib-dash-today-previous', template: "\n\n<div class=\"m-2\"></div>\n <div class=\"w-full m-2 border-r\">\n <ng-container *ngIf=\"!isJsonPreview\">\n <pre><code>{{jsaonDatasource | json}}</code></pre>\n </ng-container>\n <ng-container *ngIf=\"isJsonPreview\"> \n <div class=\"flex justify-center items-start bg-gray-800 p-3 mx-2 text-center\">\n <div class=\"w-full\">\n <div [style.color]=\"tableDataConfig.color\"\n [style.font-size.px]=\"tableDataConfig.size || 16\"\n class=\"font-semibold\">{{jsaonDatasource.revenue}}</div>\n <div class=\"text-gray-400 text-sm font-light m-2\">\n Previous: {{ previousRevenue !== null ? previousRevenue : 'N/A' }}\n <span class=\"text-teal-400\">(0.0001%)</span>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"w-full mx-2 border-r\">\n <div class=\"mb-4 border-b border-gray-200 dark:border-gray-700\">\n <ul class=\"flex flex-wrap -mb-px text-sm font-medium text-center\" role=\"tablist\">\n <li class=\"me-2\" role=\"presentation\">\n <button class=\"inline-block p-4 border-b-2 rounded-t-lg\" [ngClass]=\"{\n 'text-purple-600 border-purple-600 dark:text-purple-500 dark:border-purple-500': activeTab === 'basic',\n 'text-gray-500 dark:text-gray-400 border-transparent': activeTab !== 'basic'\n }\" (click)=\"setActiveTab('basic')\" type=\"button\" role=\"tab\">\n Basic\n </button>\n </li>\n <li class=\"me-2\" role=\"presentation\">\n <button class=\"inline-block p-4 border-b-2 rounded-t-lg\" [ngClass]=\"{\n 'text-purple-600 border-purple-600 dark:text-purple-500 dark:border-purple-500': activeTab === 'columns',\n 'text-gray-500 dark:text-gray-400 border-transparent': activeTab !== 'columns'\n }\" (click)=\"setActiveTab('columns')\" type=\"button\" role=\"tab\">\n Columns\n </button>\n </li>\n <li class=\"me-2\" role=\"presentation\">\n <button class=\"inline-block p-4 border-b-2 rounded-t-lg\" [ngClass]=\"{\n 'text-purple-600 border-purple-600 dark:text-purple-500 dark:border-purple-500': activeTab === 'properties',\n 'text-gray-500 dark:text-gray-400 border-transparent': activeTab !== 'properties'\n }\" (click)=\"setActiveTab('properties')\" type=\"button\" role=\"tab\">\n Properties\n </button>\n </li>\n\n </ul>\n </div>\n\n <div id=\"default-styled-tab-content\"> \n <div *ngIf=\"activeTab === 'basic'\">\n <div class=\"flex flex-col flex-auto min-w-0\">\n <div class=\"text-sm py-1 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Title Config\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\">\n \n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\">Color</div>\n <dx-color-box [(ngModel)]=\"tableDataConfig.color\"></dx-color-box>\n\n </div>\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\">Size</div>\n <dx-text-box placeholder=\"Enter size\" [(ngModel)]=\"tableDataConfig.size\"></dx-text-box>\n \n </div>\n \n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\"> Key To Pass </div>\n <dx-tag-box [items]=\"configColume\"\n [(ngModel)]=\"table_columns_config.kpiConfig.keyToPass\"></dx-tag-box>\n </div>\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\"> Display Formate </div>\n <dx-select-box [items]=\"['daily','hourly','monthly']\"\n [(ngModel)]=\"table_columns_config.kpiConfig.formate\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\"> Sort By </div>\n <dx-tag-box [items]=\"configColume\"\n [(ngModel)]=\"tableDataConfig.sortBy\"></dx-tag-box>\n </div>\n </div> \n </div>\n </div>\n </div>\n <div *ngIf=\"activeTab === 'basic'\" class=\"flex flex-col flex-auto min-w-0\">\n <div class=\"text-sm py-1 font-extrabold border-b bg-gray-700 text-white px-2\"> Select The Previos Date Range\n </div>\n <div class=\"flex flse-row border-x border-b p-4\">\n <div class=\"px-1 mb-1 w-full\">\n <div class=\"text-md mb-2\" style=\"margin-top: 37px;\">\n <dx-check-box [(value)]=\"tableDataConfig.isPreviousDay\" text=\"Previous Day\"></dx-check-box>\n \n </div>\n <ng-container *ngIf=\"tableDataConfig.isPreviousDay\">\n <div class=\"px-1 mb-1 w-1/2 flex items-center\">\n <dx-select-box \n [items]=\"['Day', 'Month', 'Year']\"\n class=\"ml-2\"\n [(ngModel)]=\"tableDataConfig.timeUnit\">\n </dx-select-box>\n \n <dx-text-box type=\"number\" [(ngModel)]=\"tableDataConfig.timeValue\"\n class=\"ml-2\"></dx-text-box>\n </div>\n </ng-container>\n \n </div>\n </div>\n\n </div>\n <div *ngIf=\"activeTab === 'columns'\">\n <div class=\"h-full overflow-x-auto\">\n <div class=\"flex flex-col flex-auto min-w-0\">\n\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 border-b flex flex-row\"\n *ngFor=\"let item of tableDataConfig.columns; let i = index;\">\n <div class=\"px-1 mb-2 mt-6 w-full\">\n <dx-check-box [(ngModel)]=\"item.visible\"\n text=\"Visiblity\"></dx-check-box>\n </div>\n \n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value Field</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"configColume\"\n [(ngModel)]=\"item.dataField\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Caption</div>\n <dx-text-box [(ngModel)]=\"item.caption\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> UI Function</div>\n <dx-select-box [items]=\"enrichNameList\" [(ngModel)]=\"item.enrichName\"\n [searchEnabled]=\"true\"></dx-select-box>\n </div>\n <div class=\"text-center mt-8 w-full\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== tableDataConfig.columns.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n </div>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n <div *ngIf=\"activeTab === 'properties'\">\n <div class=\"h-full overflow-x-auto\">\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <ng-container *ngIf=\"!isLoader\">\n <div class=\"flex flex-row justify-between border-b py-3\">\n <div class=\"mx-2\">\n <dx-check-box [value]=\"viewProperties.enableClickEvent\"\n [(ngModel)]=\"viewProperties.enableClickEvent\"\n text=\"Enable Click Event\"></dx-check-box>\n </div>\n <div class=\"mx-2\">\n <dx-check-box [value]=\"viewProperties.enableRightClickEvent\"\n [(ngModel)]=\"viewProperties.enableRightClickEvent\"\n text=\"Enable Right Click\"></dx-check-box>\n </div>\n </div>\n <div class=\"w-full p-2\" *ngIf=\"viewProperties.enableClickEvent\">\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-sm py-1 font-extrabold border-b bg-gray-700 text-white px-2\"> Event\n Type\n Option\n </div>\n <div class=\"w-full p-3 border-x border-b \">\n <div class=\"flex flex-row\">\n <div class=\"w-full\">\n <div class=\"text-md mb-2\"> Event Type</div>\n </div>\n <div class=\"w-full\">\n <dx-select-box [items]=\"['drilldown','sameViewDrilldown','optionalDrillDown']\"\n (onValueChanged)=\"getSelectedEventType($event)\"\n [(ngModel)]=\"viewProperties.clickEventOptions.eventType\"></dx-select-box>\n </div>\n </div>\n <ng-container *ngIf=\"viewProperties.clickEventOptions.eventType == 'drilldown'\">\n <div class=\"flex flex-row justify-between mt-3\">\n <div class=\"w-full\">\n <div class=\"text-md mb-2\"> Associated Views</div>\n <dx-tag-box [items]=\"allConfiguredViews\"\n [(ngModel)]=\"viewProperties.clickEventOptions.associatedViews\"\n valueExpr=\"viewId\" displayExpr=\"viewName\"\n [showSelectionControls]=\"true\" [searchEnabled]=\"true\"></dx-tag-box>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"viewProperties.clickEventOptions.eventType == 'sameViewDrilldown'\">\n <div class=\"flex flex-row justify-between mt-3\">\n <div class=\"w-full\">\n <div class=\"text-md mb-2\"> Associated Views</div>\n <dx-tag-box [items]=\"allConfiguredViews\"\n [(ngModel)]=\"viewProperties.clickEventOptions.associatedViews\"\n valueExpr=\"viewId\" displayExpr=\"viewName\"\n [showSelectionControls]=\"true\" [searchEnabled]=\"true\"></dx-tag-box>\n </div>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"viewProperties.clickEventOptions.eventType == 'optionalDrillDown'\">\n <div class=\"flex flex-row justify-between mt-3\">\n <div class=\"w-full\">\n <ng-container\n *ngFor=\"let item of optionalDrilDownDataSource;let i = index;\">\n\n <div class=\"flex flex-row justify-between\">\n <div class=\"mx-2 w-1/2\">\n <div class=\"text-md mb-2\"> Associated Views</div>\n <dx-tag-box [items]=\"allConfiguredViews\"\n [(ngModel)]=\"item.viewId\" valueExpr=\"viewId\"\n displayExpr=\"viewName\" [showSelectionControls]=\"true\"\n [maxDisplayedTags]=\"2\"\n [searchEnabled]=\"true\"></dx-tag-box>\n\n </div>\n <div class=\"mx-2 w-1/2\">\n <div class=\"text-md mb-2\"> Associated Params</div>\n <dx-text-box\n [(ngModel)]=\"item.filterCondition\"></dx-text-box>\n </div>\n <div class=\"mx-2\">\n <button\n class=\"{{commonService.btn_danger_sm}} cursor-pointer mt-8\"\n (click)=\"deleteAssociatedParams(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </ng-container>\n <div class=\"flex flex-row justify-end mt-4\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addAssociatedParams()\">Add\n Params</button>\n </div>\n </div>\n </div>\n </ng-container>\n <button class=\"{{commonService.btn_light_md}} cursor-pointer mt-4\"\n (click)=\"resetViewProprstise()\">Reset All Event</button>\n </div>\n </div>\n\n </div>\n </ng-container>\n </div>\n </div>\n\n </div>\n </div>\n\n\n<div class=\"flex flex-row border-t pl-3\">\n <div class=\"flex justify-start mx-1\">\n <button class=\"{{commonService.btn_warning_md}} cursor-pointer mt-2\" (click)=\"isJsonPreview = true\">\n Preview</button>\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer mt-2\" (click)=\"isJsonPreview = false\">Data\n Preview</button>\n </div>\n <div class=\"flex justify-end mx-1 flex-grow\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mt-2\"\n (click)=\"getSaveConfig()\">Submit</button>\n </div>\n</div>" }]
5208
+ }], ctorParameters: function () { return [{ type: CommonService }, { type: i0.ChangeDetectorRef }, { type: ApplicationContentService }, { type: i2$1.ToastrService }]; }, propDecorators: { gettodayPreviousConfigOutPut: [{
5209
+ type: Output
5210
+ }], chartconfigData: [{
5211
+ type: Input,
5212
+ args: ['datasetmodal']
5213
+ }] } });
5214
+
4945
5215
  class CreateCompViewComponent {
4946
- constructor(toastr, commonService, service, kpiService, router, activatedRoute) {
5216
+ constructor(toastr, commonService, service, kpiService, router, activatedRoute, environment) {
4947
5217
  this.toastr = toastr;
4948
5218
  this.commonService = commonService;
4949
5219
  this.service = service;
4950
5220
  this.kpiService = kpiService;
4951
5221
  this.router = router;
4952
5222
  this.activatedRoute = activatedRoute;
5223
+ this.environment = environment;
4953
5224
  this.selectedDataSet = {};
4954
5225
  this.isFilterInputs = false;
4955
5226
  this.selectedDataSetOnedit = {};
@@ -5140,7 +5411,7 @@ class CreateCompViewComponent {
5140
5411
  };
5141
5412
  const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
5142
5413
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
5143
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYY-MM-DD");
5414
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
5144
5415
  }
5145
5416
  if (filter) {
5146
5417
  if (mapping.defaultValue === "") {
@@ -5153,7 +5424,7 @@ class CreateCompViewComponent {
5153
5424
  resultObj.value = value;
5154
5425
  }
5155
5426
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
5156
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYY-MM-DD");
5427
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
5157
5428
  }
5158
5429
  }
5159
5430
  }
@@ -5181,7 +5452,7 @@ class CreateCompViewComponent {
5181
5452
  dataset.config.queryConfig.mapedFilters.forEach((filter) => {
5182
5453
  let datecolumn = filter.serverColumn.toLowerCase();
5183
5454
  if (datecolumn.includes('date') && typeof filter.dataType === 'string') {
5184
- serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYYMMDD").format("YYYY-MM-DD");
5455
+ serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYYMMDD").format(this.environment.dataFormat);
5185
5456
  }
5186
5457
  else {
5187
5458
  serviceJson[filter.serverColumn] = filter.defaultValue;
@@ -5464,19 +5735,24 @@ class CreateCompViewComponent {
5464
5735
  value: mapping.defaultValue
5465
5736
  };
5466
5737
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
5467
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYY-MM-DD");
5738
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
5468
5739
  }
5469
5740
  result.push(resultObj);
5470
5741
  });
5471
5742
  return result;
5472
5743
  }
5473
5744
  }
5474
- CreateCompViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreateCompViewComponent, deps: [{ token: i2$1.ToastrService }, { token: CommonService }, { token: ApplicationContentService }, { token: kpicommonService$2 }, { token: i4.Router }, { token: i4.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
5475
- CreateCompViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CreateCompViewComponent, selector: "app-create-comp-view", inputs: { kpiTreeData: "kpiTreeData", isHeader: "isHeader", selectedViewId: "selectedViewId" }, ngImport: i0, template: "<div class=\"flex flex-col flex-auto min-w-0\">\n\n <lib-common-header [pageTitle]=\"'Views Editor'\" *ngIf=\"isHeader\"></lib-common-header>\n\n\n\n <div>\n <div class=\"p-2 w-full\">\n <div\n class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n\n <div class=\"flex flex-row justify-between\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Dataset List <span *ngIf=\"isFilterInputs\"\n class=\"text-blue-500 cursor-pointer\"><i class=\"fa fa-pencil\"\n (click)=\"getEditDataSet()\"></i></span></div>\n <dx-select-box [items]=\"dataSettableDataSource\" (onValueChanged)=\"getDataSetDetails($event)\"\n displayExpr=\"datasetName\" valueExpr=\"datasetId\" [searchEnabled]=\"true\"\n [value]=\"selectedDataSetOnedit.datasetId\"></dx-select-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select View Type</div>\n <dx-select-box [items]=\"['chart','table','groupTable','others']\" [(ngModel)]=\"selectedViewType\"\n (onValueChanged)=\"getViewType($event)\"></dx-select-box>\n </div>\n <ng-container *ngIf=\"selectedViewType =='others'\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select Component</div>\n <dx-select-box [items]=\"componentNamesOthers\" displayExpr=\"item\" valueExpr=\"compName\"\n [(ngModel)]=\"componentName\"></dx-select-box>\n </div>\n </ng-container>\n\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Name</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewName\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Label</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewLabel\"></dx-text-box>\n </div>\n </div>\n <ng-container *ngIf=\"isFilterInputs\">\n <div class=\"flex flex-row mt-2\">\n <ng-container *ngFor=\"let request of selectedDataSet.config.queryConfig.mapedFilters\">\n <div class=\"m-2\">\n <div class=\"text-md mb-1\"> {{getCapitalize(request.localColumn)}}</div>\n <dx-date-box displayFormat=\"yyyy-MM-dd\" type=\"date\"\n (onValueChanged)=\"startDateChange($event,request)\"\n *ngIf=\"getFilter(request.localColumn)\">\n </dx-date-box>\n <dx-text-box [(ngModel)]=\"request.defaultValue\"\n *ngIf=\"!getFilter(request.localColumn)\"></dx-text-box>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"flex flex-row mt-5 justify-center items-center\">\n <button class=\"{{commonService.btn_success_md}}\" (click)=\"addNewView()\">\n Reset View\n </button>\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer mx-4 my-2\" (click)=\"createNewView()\">\n Proceed\n </button>\n\n </div>\n <div class=\"m-5 border\">\n <div class=\"m-2\">\n <div class=\"mt-5\">\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <!-- for chart view -->\n <ng-container *ngIf=\"isGenerate\">\n <ng-container *ngIf=\"selectedViewType == 'chart'\">\n <app-dash-chart [datasetmodal]=\"dataSourceModal\"\n (getChartConfigOutPut)=\"getEmitNewChartCongig($event)\"></app-dash-chart>\n </ng-container>\n <!-- for table view -->\n <ng-container *ngIf=\"selectedViewType == 'table' || selectedViewType == 'groupTable'\">\n <app-dash-table [datasetmodal]=\"dataSourceModal\"\n (getTableConfigOutPut)=\"getEmitNewTableConfig($event)\"></app-dash-table>\n </ng-container>\n <!-- for others view -->\n <ng-container *ngIf=\"selectedViewType == 'others'\">\n <ng-container *ngIf=\"componentName == 'GammaTableWithPercentageComponent'\">\n <app-table-with-bar [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-table-with-bar>\n </ng-container>\n <ng-container\n *ngIf=\"componentName == 'GammaGeoChartComponent' && componentName != 'GammaTableWithPercentageComponent'\">\n <!-- <app-gamma-geo-chart></app-gamma-geo-chart> -->\n <app-geo-map [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-geo-map>\n </ng-container>\n <ng-container\n *ngIf=\"componentName != 'GammaTableWithPercentageComponent' && componentName != 'GammaGeoChartComponent'\">\n <!-- <app-dash-other [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-dash-other> -->\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.DxDateBoxComponent, selector: "dx-date-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "adaptivityEnabled", "applyButtonText", "applyValueMode", "buttons", "calendarOptions", "cancelButtonText", "dateOutOfRangeMessage", "dateSerializationFormat", "deferRendering", "disabled", "disabledDates", "displayFormat", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "interval", "invalidDateMessage", "isValid", "label", "labelMode", "max", "maxLength", "min", "name", "opened", "openOnFieldClick", "pickerType", "placeholder", "readOnly", "rtlEnabled", "showAnalogClock", "showClearButton", "showDropDownButton", "spellcheck", "stylingMode", "tabIndex", "text", "type", "useMaskBehavior", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "adaptivityEnabledChange", "applyButtonTextChange", "applyValueModeChange", "buttonsChange", "calendarOptionsChange", "cancelButtonTextChange", "dateOutOfRangeMessageChange", "dateSerializationFormatChange", "deferRenderingChange", "disabledChange", "disabledDatesChange", "displayFormatChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "intervalChange", "invalidDateMessageChange", "isValidChange", "labelChange", "labelModeChange", "maxChange", "maxLengthChange", "minChange", "nameChange", "openedChange", "openOnFieldClickChange", "pickerTypeChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showAnalogClockChange", "showClearButtonChange", "showDropDownButtonChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "typeChange", "useMaskBehaviorChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i6$1.DxSelectBoxComponent, selector: "dx-select-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "buttons", "dataSource", "deferRendering", "disabled", "displayExpr", "displayValue", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "fieldTemplate", "focusStateEnabled", "grouped", "groupTemplate", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "items", "itemTemplate", "label", "labelMode", "maxLength", "minSearchLength", "name", "noDataText", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchEnabled", "searchExpr", "searchMode", "searchTimeout", "selectedItem", "showClearButton", "showDataBeforeSearch", "showDropDownButton", "showSelectionControls", "spellcheck", "stylingMode", "tabIndex", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCustomItemCreating", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onSelectionChanged", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayExprChange", "displayValueChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxLengthChange", "minSearchLengthChange", "nameChange", "noDataTextChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectedItemChange", "showClearButtonChange", "showDataBeforeSearchChange", "showDropDownButtonChange", "showSelectionControlsChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }, { kind: "component", type: i7.DxTextBoxComponent, selector: "dx-text-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "label", "labelMode", "mask", "maskChar", "maskInvalidMessage", "maskRules", "maxLength", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showMaskMode", "spellcheck", "stylingMode", "tabIndex", "text", "useMaskedValue", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "labelChange", "labelModeChange", "maskChange", "maskCharChange", "maskInvalidMessageChange", "maskRulesChange", "maxLengthChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showMaskModeChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useMaskedValueChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: GeoMapComponent, selector: "app-geo-map", inputs: ["datasetmodal"], outputs: ["createOtherComponentView"] }, { kind: "component", type: DashChartComponent, selector: "app-dash-chart", inputs: ["datasetmodal"], outputs: ["getChartConfigOutPut"] }, { kind: "component", type: DashTableComponent, selector: "app-dash-table", inputs: ["datasetmodal"], outputs: ["getTableConfigOutPut"] }, { kind: "component", type: TableWithBarComponent, selector: "app-table-with-bar", inputs: ["datasetmodal"], outputs: ["createOtherComponentView"] }, { kind: "component", type: LoaderComponent, selector: "app-loader" }, { kind: "component", type: CommonHeaderComponent, selector: "lib-common-header", inputs: ["pageTitle"] }] });
5745
+ CreateCompViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreateCompViewComponent, deps: [{ token: i2$1.ToastrService }, { token: CommonService }, { token: ApplicationContentService }, { token: kpicommonService$2 }, { token: i4.Router }, { token: i4.ActivatedRoute }, { token: APP_ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Component });
5746
+ CreateCompViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CreateCompViewComponent, selector: "app-create-comp-view", inputs: { kpiTreeData: "kpiTreeData", isHeader: "isHeader", selectedViewId: "selectedViewId" }, ngImport: i0, template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Views Editor'\" *ngIf=\"isHeader\"></lib-common-header>\n <div>\n <div class=\"p-2 w-full\">\n <div\n class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n <div class=\"flex flex-row justify-between\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Dataset List <span *ngIf=\"isFilterInputs\"\n class=\"text-blue-500 cursor-pointer\"><i class=\"fa fa-pencil\"\n (click)=\"getEditDataSet()\"></i></span></div>\n <dx-select-box [items]=\"dataSettableDataSource\" (onValueChanged)=\"getDataSetDetails($event)\"\n displayExpr=\"datasetName\" valueExpr=\"datasetId\" [searchEnabled]=\"true\"\n [value]=\"selectedDataSetOnedit.datasetId\"></dx-select-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select View Type</div>\n <dx-select-box [items]=\"['chart','table','groupTable','others']\" [(ngModel)]=\"selectedViewType\"\n (onValueChanged)=\"getViewType($event)\"></dx-select-box>\n </div>\n <ng-container *ngIf=\"selectedViewType =='others'\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select Component</div>\n <dx-select-box [items]=\"componentNamesOthers\" displayExpr=\"item\" valueExpr=\"compName\"\n [(ngModel)]=\"componentName\"></dx-select-box>\n </div>\n </ng-container>\n\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Name</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewName\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Label</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewLabel\"></dx-text-box>\n </div>\n </div>\n <ng-container *ngIf=\"isFilterInputs\">\n <div class=\"flex flex-row mt-2\">\n <ng-container *ngFor=\"let request of selectedDataSet.config.queryConfig.mapedFilters\">\n <div class=\"m-2\">\n <div class=\"text-md mb-1\"> {{getCapitalize(request.localColumn)}}</div>\n <dx-date-box displayFormat=\"yyyy-MM-dd\" type=\"date\"\n (onValueChanged)=\"startDateChange($event,request)\"\n *ngIf=\"getFilter(request.localColumn)\">\n </dx-date-box>\n <dx-text-box [(ngModel)]=\"request.defaultValue\"\n *ngIf=\"!getFilter(request.localColumn)\"></dx-text-box>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"flex flex-row mt-5 justify-center items-center\">\n <button class=\"{{commonService.btn_success_md}}\" (click)=\"addNewView()\">\n Reset View\n </button>\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer mx-4 my-2\" (click)=\"createNewView()\">\n Proceed\n </button>\n\n </div>\n <div class=\"m-5 border\">\n <div class=\"m-2\">\n <div class=\"mt-5\">\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <!-- for chart view -->\n <ng-container *ngIf=\"isGenerate\">\n <ng-container *ngIf=\"selectedViewType == 'chart'\">\n <app-dash-chart [datasetmodal]=\"dataSourceModal\"\n (getChartConfigOutPut)=\"getEmitNewChartCongig($event)\"></app-dash-chart>\n </ng-container>\n <!-- for table view -->\n <ng-container *ngIf=\"selectedViewType == 'table' || selectedViewType == 'groupTable'\">\n <app-dash-table [datasetmodal]=\"dataSourceModal\"\n (getTableConfigOutPut)=\"getEmitNewTableConfig($event)\"></app-dash-table>\n </ng-container>\n <!-- for others view -->\n <ng-container *ngIf=\"selectedViewType == 'others'\">\n <ng-container *ngIf=\"componentName == 'GammaTableWithPercentageComponent'\">\n <app-table-with-bar [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-table-with-bar>\n </ng-container>\n <ng-container\n *ngIf=\"componentName == 'GammaGeoChartComponent' && componentName != 'GammaTableWithPercentageComponent'\">\n <!-- <app-gamma-geo-chart></app-gamma-geo-chart> -->\n <app-geo-map [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-geo-map>\n </ng-container>\n <ng-container\n *ngIf=\"componentName != 'GammaTableWithPercentageComponent' && componentName != 'GammaGeoChartComponent'\">\n <lib-dash-today-previous [datasetmodal]=\"dataSourceModal\"\n (gettodayPreviousConfigOutPut)=\"getEmitNewOtherSetCongig($event)\"></lib-dash-today-previous>\n </ng-container>\n\n \n </ng-container>\n </ng-container>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.DxDateBoxComponent, selector: "dx-date-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "adaptivityEnabled", "applyButtonText", "applyValueMode", "buttons", "calendarOptions", "cancelButtonText", "dateOutOfRangeMessage", "dateSerializationFormat", "deferRendering", "disabled", "disabledDates", "displayFormat", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "interval", "invalidDateMessage", "isValid", "label", "labelMode", "max", "maxLength", "min", "name", "opened", "openOnFieldClick", "pickerType", "placeholder", "readOnly", "rtlEnabled", "showAnalogClock", "showClearButton", "showDropDownButton", "spellcheck", "stylingMode", "tabIndex", "text", "type", "useMaskBehavior", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "adaptivityEnabledChange", "applyButtonTextChange", "applyValueModeChange", "buttonsChange", "calendarOptionsChange", "cancelButtonTextChange", "dateOutOfRangeMessageChange", "dateSerializationFormatChange", "deferRenderingChange", "disabledChange", "disabledDatesChange", "displayFormatChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "intervalChange", "invalidDateMessageChange", "isValidChange", "labelChange", "labelModeChange", "maxChange", "maxLengthChange", "minChange", "nameChange", "openedChange", "openOnFieldClickChange", "pickerTypeChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showAnalogClockChange", "showClearButtonChange", "showDropDownButtonChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "typeChange", "useMaskBehaviorChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i6$1.DxSelectBoxComponent, selector: "dx-select-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "buttons", "dataSource", "deferRendering", "disabled", "displayExpr", "displayValue", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "fieldTemplate", "focusStateEnabled", "grouped", "groupTemplate", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "items", "itemTemplate", "label", "labelMode", "maxLength", "minSearchLength", "name", "noDataText", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchEnabled", "searchExpr", "searchMode", "searchTimeout", "selectedItem", "showClearButton", "showDataBeforeSearch", "showDropDownButton", "showSelectionControls", "spellcheck", "stylingMode", "tabIndex", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCustomItemCreating", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onSelectionChanged", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayExprChange", "displayValueChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxLengthChange", "minSearchLengthChange", "nameChange", "noDataTextChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectedItemChange", "showClearButtonChange", "showDataBeforeSearchChange", "showDropDownButtonChange", "showSelectionControlsChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }, { kind: "component", type: i7.DxTextBoxComponent, selector: "dx-text-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "isValid", "label", "labelMode", "mask", "maskChar", "maskInvalidMessage", "maskRules", "maxLength", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showMaskMode", "spellcheck", "stylingMode", "tabIndex", "text", "useMaskedValue", "validationError", "validationErrors", "validationMessageMode", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isValidChange", "labelChange", "labelModeChange", "maskChange", "maskCharChange", "maskInvalidMessageChange", "maskRulesChange", "maxLengthChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showMaskModeChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useMaskedValueChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: GeoMapComponent, selector: "app-geo-map", inputs: ["datasetmodal"], outputs: ["createOtherComponentView"] }, { kind: "component", type: DashChartComponent, selector: "app-dash-chart", inputs: ["datasetmodal"], outputs: ["getChartConfigOutPut"] }, { kind: "component", type: DashTableComponent, selector: "app-dash-table", inputs: ["datasetmodal"], outputs: ["getTableConfigOutPut"] }, { kind: "component", type: TableWithBarComponent, selector: "app-table-with-bar", inputs: ["datasetmodal"], outputs: ["createOtherComponentView"] }, { kind: "component", type: LoaderComponent, selector: "app-loader" }, { kind: "component", type: CommonHeaderComponent, selector: "lib-common-header", inputs: ["pageTitle"] }, { kind: "component", type: DashTodayPreviousComponent, selector: "lib-dash-today-previous", inputs: ["datasetmodal"], outputs: ["gettodayPreviousConfigOutPut"] }] });
5476
5747
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreateCompViewComponent, decorators: [{
5477
5748
  type: Component,
5478
- args: [{ selector: 'app-create-comp-view', template: "<div class=\"flex flex-col flex-auto min-w-0\">\n\n <lib-common-header [pageTitle]=\"'Views Editor'\" *ngIf=\"isHeader\"></lib-common-header>\n\n\n\n <div>\n <div class=\"p-2 w-full\">\n <div\n class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n\n <div class=\"flex flex-row justify-between\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Dataset List <span *ngIf=\"isFilterInputs\"\n class=\"text-blue-500 cursor-pointer\"><i class=\"fa fa-pencil\"\n (click)=\"getEditDataSet()\"></i></span></div>\n <dx-select-box [items]=\"dataSettableDataSource\" (onValueChanged)=\"getDataSetDetails($event)\"\n displayExpr=\"datasetName\" valueExpr=\"datasetId\" [searchEnabled]=\"true\"\n [value]=\"selectedDataSetOnedit.datasetId\"></dx-select-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select View Type</div>\n <dx-select-box [items]=\"['chart','table','groupTable','others']\" [(ngModel)]=\"selectedViewType\"\n (onValueChanged)=\"getViewType($event)\"></dx-select-box>\n </div>\n <ng-container *ngIf=\"selectedViewType =='others'\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select Component</div>\n <dx-select-box [items]=\"componentNamesOthers\" displayExpr=\"item\" valueExpr=\"compName\"\n [(ngModel)]=\"componentName\"></dx-select-box>\n </div>\n </ng-container>\n\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Name</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewName\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Label</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewLabel\"></dx-text-box>\n </div>\n </div>\n <ng-container *ngIf=\"isFilterInputs\">\n <div class=\"flex flex-row mt-2\">\n <ng-container *ngFor=\"let request of selectedDataSet.config.queryConfig.mapedFilters\">\n <div class=\"m-2\">\n <div class=\"text-md mb-1\"> {{getCapitalize(request.localColumn)}}</div>\n <dx-date-box displayFormat=\"yyyy-MM-dd\" type=\"date\"\n (onValueChanged)=\"startDateChange($event,request)\"\n *ngIf=\"getFilter(request.localColumn)\">\n </dx-date-box>\n <dx-text-box [(ngModel)]=\"request.defaultValue\"\n *ngIf=\"!getFilter(request.localColumn)\"></dx-text-box>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"flex flex-row mt-5 justify-center items-center\">\n <button class=\"{{commonService.btn_success_md}}\" (click)=\"addNewView()\">\n Reset View\n </button>\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer mx-4 my-2\" (click)=\"createNewView()\">\n Proceed\n </button>\n\n </div>\n <div class=\"m-5 border\">\n <div class=\"m-2\">\n <div class=\"mt-5\">\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <!-- for chart view -->\n <ng-container *ngIf=\"isGenerate\">\n <ng-container *ngIf=\"selectedViewType == 'chart'\">\n <app-dash-chart [datasetmodal]=\"dataSourceModal\"\n (getChartConfigOutPut)=\"getEmitNewChartCongig($event)\"></app-dash-chart>\n </ng-container>\n <!-- for table view -->\n <ng-container *ngIf=\"selectedViewType == 'table' || selectedViewType == 'groupTable'\">\n <app-dash-table [datasetmodal]=\"dataSourceModal\"\n (getTableConfigOutPut)=\"getEmitNewTableConfig($event)\"></app-dash-table>\n </ng-container>\n <!-- for others view -->\n <ng-container *ngIf=\"selectedViewType == 'others'\">\n <ng-container *ngIf=\"componentName == 'GammaTableWithPercentageComponent'\">\n <app-table-with-bar [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-table-with-bar>\n </ng-container>\n <ng-container\n *ngIf=\"componentName == 'GammaGeoChartComponent' && componentName != 'GammaTableWithPercentageComponent'\">\n <!-- <app-gamma-geo-chart></app-gamma-geo-chart> -->\n <app-geo-map [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-geo-map>\n </ng-container>\n <ng-container\n *ngIf=\"componentName != 'GammaTableWithPercentageComponent' && componentName != 'GammaGeoChartComponent'\">\n <!-- <app-dash-other [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-dash-other> -->\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
5479
- }], ctorParameters: function () { return [{ type: i2$1.ToastrService }, { type: CommonService }, { type: ApplicationContentService }, { type: kpicommonService$2 }, { type: i4.Router }, { type: i4.ActivatedRoute }]; }, propDecorators: { kpiTreeData: [{
5749
+ args: [{ selector: 'app-create-comp-view', template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Views Editor'\" *ngIf=\"isHeader\"></lib-common-header>\n <div>\n <div class=\"p-2 w-full\">\n <div\n class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n <div class=\"flex flex-row justify-between\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Dataset List <span *ngIf=\"isFilterInputs\"\n class=\"text-blue-500 cursor-pointer\"><i class=\"fa fa-pencil\"\n (click)=\"getEditDataSet()\"></i></span></div>\n <dx-select-box [items]=\"dataSettableDataSource\" (onValueChanged)=\"getDataSetDetails($event)\"\n displayExpr=\"datasetName\" valueExpr=\"datasetId\" [searchEnabled]=\"true\"\n [value]=\"selectedDataSetOnedit.datasetId\"></dx-select-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select View Type</div>\n <dx-select-box [items]=\"['chart','table','groupTable','others']\" [(ngModel)]=\"selectedViewType\"\n (onValueChanged)=\"getViewType($event)\"></dx-select-box>\n </div>\n <ng-container *ngIf=\"selectedViewType =='others'\">\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">Select Component</div>\n <dx-select-box [items]=\"componentNamesOthers\" displayExpr=\"item\" valueExpr=\"compName\"\n [(ngModel)]=\"componentName\"></dx-select-box>\n </div>\n </ng-container>\n\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Name</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewName\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-full\">\n <div class=\"text-md mb-2\">View Label</div>\n <dx-text-box [(ngModel)]=\"creatCompViewObject.viewLabel\"></dx-text-box>\n </div>\n </div>\n <ng-container *ngIf=\"isFilterInputs\">\n <div class=\"flex flex-row mt-2\">\n <ng-container *ngFor=\"let request of selectedDataSet.config.queryConfig.mapedFilters\">\n <div class=\"m-2\">\n <div class=\"text-md mb-1\"> {{getCapitalize(request.localColumn)}}</div>\n <dx-date-box displayFormat=\"yyyy-MM-dd\" type=\"date\"\n (onValueChanged)=\"startDateChange($event,request)\"\n *ngIf=\"getFilter(request.localColumn)\">\n </dx-date-box>\n <dx-text-box [(ngModel)]=\"request.defaultValue\"\n *ngIf=\"!getFilter(request.localColumn)\"></dx-text-box>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"flex flex-row mt-5 justify-center items-center\">\n <button class=\"{{commonService.btn_success_md}}\" (click)=\"addNewView()\">\n Reset View\n </button>\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer mx-4 my-2\" (click)=\"createNewView()\">\n Proceed\n </button>\n\n </div>\n <div class=\"m-5 border\">\n <div class=\"m-2\">\n <div class=\"mt-5\">\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <!-- for chart view -->\n <ng-container *ngIf=\"isGenerate\">\n <ng-container *ngIf=\"selectedViewType == 'chart'\">\n <app-dash-chart [datasetmodal]=\"dataSourceModal\"\n (getChartConfigOutPut)=\"getEmitNewChartCongig($event)\"></app-dash-chart>\n </ng-container>\n <!-- for table view -->\n <ng-container *ngIf=\"selectedViewType == 'table' || selectedViewType == 'groupTable'\">\n <app-dash-table [datasetmodal]=\"dataSourceModal\"\n (getTableConfigOutPut)=\"getEmitNewTableConfig($event)\"></app-dash-table>\n </ng-container>\n <!-- for others view -->\n <ng-container *ngIf=\"selectedViewType == 'others'\">\n <ng-container *ngIf=\"componentName == 'GammaTableWithPercentageComponent'\">\n <app-table-with-bar [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-table-with-bar>\n </ng-container>\n <ng-container\n *ngIf=\"componentName == 'GammaGeoChartComponent' && componentName != 'GammaTableWithPercentageComponent'\">\n <!-- <app-gamma-geo-chart></app-gamma-geo-chart> -->\n <app-geo-map [datasetmodal]=\"dataSourceModal\"\n (createOtherComponentView)=\"getEmitNewOtherSetCongig($event)\"></app-geo-map>\n </ng-container>\n <ng-container\n *ngIf=\"componentName != 'GammaTableWithPercentageComponent' && componentName != 'GammaGeoChartComponent'\">\n <lib-dash-today-previous [datasetmodal]=\"dataSourceModal\"\n (gettodayPreviousConfigOutPut)=\"getEmitNewOtherSetCongig($event)\"></lib-dash-today-previous>\n </ng-container>\n\n \n </ng-container>\n </ng-container>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
5750
+ }], ctorParameters: function () {
5751
+ return [{ type: i2$1.ToastrService }, { type: CommonService }, { type: ApplicationContentService }, { type: kpicommonService$2 }, { type: i4.Router }, { type: i4.ActivatedRoute }, { type: undefined, decorators: [{
5752
+ type: Inject,
5753
+ args: [APP_ENVIRONMENT]
5754
+ }] }];
5755
+ }, propDecorators: { kpiTreeData: [{
5480
5756
  type: Input
5481
5757
  }], isHeader: [{
5482
5758
  type: Input
@@ -5491,6 +5767,7 @@ class GammaTodayPreviousComponent {
5491
5767
  this.commonService = commonService;
5492
5768
  }
5493
5769
  set chartDataSource(value) {
5770
+ var _a, _b, _c, _d, _e, _f, _g;
5494
5771
  this.objectdataSource = value;
5495
5772
  if (this.objectdataSource === undefined || this.objectdataSource.length === 0) {
5496
5773
  this.isChartvisible = false;
@@ -5498,35 +5775,46 @@ class GammaTodayPreviousComponent {
5498
5775
  }
5499
5776
  else {
5500
5777
  this.isLoader = true;
5778
+ this.selectedColumn = (value.kpiConfig.dataConfig.columns &&
5779
+ value.kpiConfig.dataConfig.columns.length !== 0) ? value.kpiConfig.dataConfig.columns[0].dataField : "";
5780
+ this.sortBy = (_b = (_a = value.kpiConfig) === null || _a === void 0 ? void 0 : _a.dataConfig) === null || _b === void 0 ? void 0 : _b.sortBy;
5781
+ this.isPreviousDay = (_d = (_c = value.kpiConfig) === null || _c === void 0 ? void 0 : _c.dataConfig) === null || _d === void 0 ? void 0 : _d.isPreviousDay;
5501
5782
  if (value.kpiConfig.dataSource && value.kpiConfig.dataSource.length !== 0) {
5502
5783
  this.page_config = value;
5503
- const sortedData = value.kpiConfig.dataSource.sort((a, b) => {
5504
- return moment(b.recordDate, "YYYY-MM-DD").diff(moment(a.recordDate, "YYYY-MM-DD"));
5505
- });
5784
+ let sortedData = value.kpiConfig.dataSource;
5785
+ if ((_e = this.sortBy) === null || _e === void 0 ? void 0 : _e.length) {
5786
+ let sortKey = this.sortBy[0];
5787
+ sortedData = sortedData.sort((a, b) => {
5788
+ return moment(b[sortKey], "YYYY-MM-DD").diff(moment(a[sortKey], "YYYY-MM-DD"));
5789
+ });
5790
+ }
5506
5791
  this.currentDateData = sortedData[0];
5507
- this.prevousDaysData = sortedData[1];
5508
- let calValue = Math.abs((parseInt(this.getDynamicValue(this.currentDateData)) - parseInt(this.getDynamicValue(this.prevousDaysData))) / parseInt(this.getDynamicValue(this.currentDateData)));
5509
- this.calculatedValue = this.commonService.reformatNumberWithThousandSeparatorV4(calValue, 3);
5792
+ const timeValue = parseInt((_g = (_f = value.kpiConfig) === null || _f === void 0 ? void 0 : _f.dataConfig) === null || _g === void 0 ? void 0 : _g.timeValue) || 1;
5793
+ this.prevousDaysData = this.isPreviousDay ? sortedData[timeValue] || null : null;
5794
+ if (this.isPreviousDay && this.prevousDaysData) {
5795
+ let calValue = Math.abs((parseInt(this.getDynamicValue(this.currentDateData)) - parseInt(this.getDynamicValue(this.prevousDaysData))) /
5796
+ parseInt(this.getDynamicValue(this.currentDateData)));
5797
+ this.calculatedValue = this.commonService.reformatNumberWithThousandSeparatorV4(calValue, 3);
5798
+ }
5799
+ else {
5800
+ this.calculatedValue = null;
5801
+ }
5510
5802
  this.isLoader = false;
5511
5803
  }
5512
- else {
5513
- }
5514
5804
  }
5515
5805
  }
5516
5806
  ngOnInit() {
5517
5807
  }
5518
5808
  getDynamicValue(data) {
5519
- const keys = Object.keys(data);
5520
- const dynamicKey = keys.find(key => !key.toLowerCase().includes('date'));
5521
- if (dynamicKey) {
5522
- let value = data[dynamicKey];
5523
- const numericValue = Number(value);
5524
- if (!isNaN(numericValue)) {
5525
- return this.commonService.abbreviateNumber(numericValue);
5526
- }
5527
- return value;
5809
+ if (!this.selectedColumn || !data.hasOwnProperty(this.selectedColumn)) {
5810
+ return null;
5528
5811
  }
5529
- return null;
5812
+ let value = data[this.selectedColumn];
5813
+ const numericValue = Number(value);
5814
+ if (!isNaN(numericValue)) {
5815
+ return this.commonService.abbreviateNumber(numericValue);
5816
+ }
5817
+ return value;
5530
5818
  }
5531
5819
  formatNumber(value) {
5532
5820
  if (value >= 1e9) {
@@ -8399,9 +8687,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
8399
8687
  }], ctorParameters: function () { return [{ type: CommonService }]; } });
8400
8688
 
8401
8689
  class ApplicationDatssetsCall {
8402
- constructor(service, kpiService) {
8690
+ constructor(service, kpiService, environment) {
8403
8691
  this.service = service;
8404
8692
  this.kpiService = kpiService;
8693
+ this.environment = environment;
8405
8694
  this.uniqueDataSetObject = {};
8406
8695
  }
8407
8696
  getDataFromDataSet(dataset, datasetId, filters) {
@@ -8494,7 +8783,7 @@ class ApplicationDatssetsCall {
8494
8783
  value: mapping.defaultValue
8495
8784
  };
8496
8785
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
8497
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYYMMDD");
8786
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
8498
8787
  }
8499
8788
  const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
8500
8789
  if (filter) {
@@ -8508,7 +8797,7 @@ class ApplicationDatssetsCall {
8508
8797
  resultObj.value = value;
8509
8798
  }
8510
8799
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
8511
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYYMMDD");
8800
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
8512
8801
  }
8513
8802
  }
8514
8803
  }
@@ -8559,7 +8848,7 @@ class ApplicationDatssetsCall {
8559
8848
  dataset.config.queryConfig.mapedFilters.forEach((filter) => {
8560
8849
  let datecolumn = filter.serverColumn.toLowerCase();
8561
8850
  if (datecolumn.includes('date') && typeof filter.dataType === 'string') {
8562
- serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYYMMDD").format("YYYY-MM-DD");
8851
+ serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(this.environment.dataFormat);
8563
8852
  }
8564
8853
  else {
8565
8854
  serviceJson[filter.serverColumn] = filter.defaultValue;
@@ -8650,7 +8939,7 @@ class ApplicationDatssetsCall {
8650
8939
  aliasColumnName: mapping.localColumn,
8651
8940
  };
8652
8941
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
8653
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYYMMDD");
8942
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
8654
8943
  }
8655
8944
  const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
8656
8945
  if (filter) {
@@ -8664,7 +8953,7 @@ class ApplicationDatssetsCall {
8664
8953
  resultObj.value = value;
8665
8954
  }
8666
8955
  if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
8667
- resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format("YYYYMMDD");
8956
+ resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
8668
8957
  }
8669
8958
  }
8670
8959
  }
@@ -8706,11 +8995,16 @@ class ApplicationDatssetsCall {
8706
8995
  return this.uniqueDataSetObject;
8707
8996
  }
8708
8997
  }
8709
- ApplicationDatssetsCall.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatssetsCall, deps: [{ token: ApplicationContentService }, { token: kpicommonService }], target: i0.ɵɵFactoryTarget.Injectable });
8998
+ ApplicationDatssetsCall.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatssetsCall, deps: [{ token: ApplicationContentService }, { token: kpicommonService }, { token: APP_ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Injectable });
8710
8999
  ApplicationDatssetsCall.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatssetsCall });
8711
9000
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatssetsCall, decorators: [{
8712
9001
  type: Injectable
8713
- }], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: kpicommonService }]; } });
9002
+ }], ctorParameters: function () {
9003
+ return [{ type: ApplicationContentService }, { type: kpicommonService }, { type: undefined, decorators: [{
9004
+ type: Inject,
9005
+ args: [APP_ENVIRONMENT]
9006
+ }] }];
9007
+ } });
8714
9008
 
8715
9009
  class LoadingComponent$1 {
8716
9010
  constructor() {
@@ -12566,7 +12860,8 @@ PackageApplicationControllerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion
12566
12860
  CreateMetricsComponent,
12567
12861
  OnlineMetricsComponent,
12568
12862
  OflineMetricsComponent,
12569
- AllMetricsConfigComponent], imports: [CommonModule, i4.RouterModule, DevExtremeModule,
12863
+ AllMetricsConfigComponent,
12864
+ DashTodayPreviousComponent], imports: [CommonModule, i4.RouterModule, DevExtremeModule,
12570
12865
  DxButtonModule,
12571
12866
  DxCheckBoxModule,
12572
12867
  DxNumberBoxModule,
@@ -12629,7 +12924,8 @@ PackageApplicationControllerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion
12629
12924
  CreateMetricsComponent,
12630
12925
  OnlineMetricsComponent,
12631
12926
  OflineMetricsComponent,
12632
- AllMetricsConfigComponent] });
12927
+ AllMetricsConfigComponent,
12928
+ DashTodayPreviousComponent] });
12633
12929
  PackageApplicationControllerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PackageApplicationControllerModule, providers: [
12634
12930
  ApplicationContentService,
12635
12931
  ApplicationDatssetsCall
@@ -12717,7 +13013,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
12717
13013
  CreateMetricsComponent,
12718
13014
  OnlineMetricsComponent,
12719
13015
  OflineMetricsComponent,
12720
- AllMetricsConfigComponent
13016
+ AllMetricsConfigComponent,
13017
+ DashTodayPreviousComponent
12721
13018
  ],
12722
13019
  imports: [
12723
13020
  CommonModule,
@@ -12788,7 +13085,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
12788
13085
  CreateMetricsComponent,
12789
13086
  OnlineMetricsComponent,
12790
13087
  OflineMetricsComponent,
12791
- AllMetricsConfigComponent
13088
+ AllMetricsConfigComponent,
13089
+ DashTodayPreviousComponent
12792
13090
  ],
12793
13091
  providers: [
12794
13092
  ApplicationContentService,
@@ -12838,5 +13136,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
12838
13136
  }]
12839
13137
  }] });
12840
13138
 
12841
- export { APP_ENVIRONMENT, AdvanceWidgetHeaderFilterComponent, AllMetricsConfigComponent, AppAdvanceHeaderComponent, AppHttpService, AppTitleComponent, ApplicationContentService, ApplicationDatssetsCall, ApplicationFilterComponent, ApplicationViewsComponent, BreadCrumbsComponent, CdrConfigComponent, CommonHeaderComponent, CommonService, CreateCompViewComponent, CreateDatasetComponent, CreateDatasetJsonComponent, CreateDatasetSqlComponent, CreateMetricsComponent, DashChartComponent, DashTableComponent, GamamWidgetComponent, GammSingleNumberCardComponent, GammaAdvanceChartComponent, GammaAdvanceFilterComponent, GammaAdvanceOperatorTableComponent, GammaAppControllerComponent, GammaAppControllerModule, GammaAppControllerService, GammaGeoChartComponent, GammaTableClumnBarChartComponent, GammaTableWithPercentageComponent, GammaTodayPreviousComponent, GeoMapComponent, GoogleGeoMapComponent, IconsModule, LoaderComponent, LoadingComponent, LoadingModule, OflineMetricsComponent, OnlineMetricsComponent, PackageApplicationControllerModule, PageConfigComponent, PageConfigMultilayoutComponent, PageControlerComponent, SafeHtmlPipe, SqlPipe, TableWithBarComponent, contentSafeHtml, kpicommonService$2 as kpicommonService };
13139
+ export { APP_ENVIRONMENT, AdvanceWidgetHeaderFilterComponent, AllMetricsConfigComponent, AppAdvanceHeaderComponent, AppHttpService, AppTitleComponent, ApplicationContentService, ApplicationDatssetsCall, ApplicationFilterComponent, ApplicationViewsComponent, BreadCrumbsComponent, CdrConfigComponent, CommonHeaderComponent, CommonService, CreateCompViewComponent, CreateDatasetComponent, CreateDatasetJsonComponent, CreateDatasetSqlComponent, CreateMetricsComponent, DashChartComponent, DashTableComponent, DashTodayPreviousComponent, GamamWidgetComponent, GammSingleNumberCardComponent, GammaAdvanceChartComponent, GammaAdvanceFilterComponent, GammaAdvanceOperatorTableComponent, GammaAppControllerComponent, GammaAppControllerModule, GammaAppControllerService, GammaGeoChartComponent, GammaTableClumnBarChartComponent, GammaTableWithPercentageComponent, GammaTodayPreviousComponent, GeoMapComponent, GoogleGeoMapComponent, IconsModule, LoaderComponent, LoadingComponent, LoadingModule, OflineMetricsComponent, OnlineMetricsComponent, PackageApplicationControllerModule, PageConfigComponent, PageConfigMultilayoutComponent, PageControlerComponent, SafeHtmlPipe, SqlPipe, TableWithBarComponent, contentSafeHtml, kpicommonService$2 as kpicommonService };
12842
13140
  //# sourceMappingURL=gamma-app-controller.mjs.map