gamma-app-controller 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/application-controller/application-controller.module.mjs +10 -5
- package/esm2020/lib/application-controller/application-dataset-call.service.mjs +15 -10
- package/esm2020/lib/application-controller/application-dataset-component/application-dataset/application-dataset.component.mjs +14 -10
- package/esm2020/lib/application-controller/application-view-components/create-comp-view/create-comp-view.component.mjs +4 -3
- package/esm2020/lib/application-controller/shared/advanced-component/gamma-today-previous/gamma-today-previous.component.mjs +30 -19
- package/esm2020/lib/application-controller/support-components/dash-today-previous/dash-today-previous.component.mjs +278 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/gamma-app-controller.mjs +333 -41
- package/fesm2015/gamma-app-controller.mjs.map +1 -1
- package/fesm2020/gamma-app-controller.mjs +328 -41
- package/fesm2020/gamma-app-controller.mjs.map +1 -1
- package/lib/application-controller/application-controller.module.d.ts +12 -11
- package/lib/application-controller/application-dataset-call.service.d.ts +2 -1
- package/lib/application-controller/application-dataset-component/application-dataset/application-dataset.component.d.ts +2 -1
- package/lib/application-controller/shared/advanced-component/gamma-today-previous/gamma-today-previous.component.d.ts +3 -0
- package/lib/application-controller/support-components/dash-today-previous/dash-today-previous.component.d.ts +63 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -2295,7 +2295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2295
2295
|
}] });
|
|
2296
2296
|
|
|
2297
2297
|
class ApplicationDatasetComponent {
|
|
2298
|
-
constructor(service, commonService, toastr, activatedRoute, router, title, kpiService) {
|
|
2298
|
+
constructor(service, commonService, toastr, activatedRoute, router, title, kpiService, environment) {
|
|
2299
2299
|
this.service = service;
|
|
2300
2300
|
this.commonService = commonService;
|
|
2301
2301
|
this.toastr = toastr;
|
|
@@ -2303,6 +2303,7 @@ class ApplicationDatasetComponent {
|
|
|
2303
2303
|
this.router = router;
|
|
2304
2304
|
this.title = title;
|
|
2305
2305
|
this.kpiService = kpiService;
|
|
2306
|
+
this.environment = environment;
|
|
2306
2307
|
this.dataSourceModal = {};
|
|
2307
2308
|
this.title.setTitle('Application Datasets');
|
|
2308
2309
|
}
|
|
@@ -2511,7 +2512,6 @@ class ApplicationDatasetComponent {
|
|
|
2511
2512
|
}
|
|
2512
2513
|
transformedObject['measures'] = request.measures;
|
|
2513
2514
|
transformedObject['dimensions'] = request.dimensions;
|
|
2514
|
-
let defaultFilters = { operationFilter: { startDate: moment().subtract('15', 'days').format('YYYY-MM-DD'), endDate: moment().format('YYYY-MM-DD') } };
|
|
2515
2515
|
transformedObject['filters'] = this.transformDataForMFilter([], request.mapedFilters);
|
|
2516
2516
|
transformedObject['sorters'] = request.sorters;
|
|
2517
2517
|
transformedObject["paginationRequired"] = false;
|
|
@@ -2534,7 +2534,7 @@ class ApplicationDatasetComponent {
|
|
|
2534
2534
|
value: mapping.defaultValue
|
|
2535
2535
|
};
|
|
2536
2536
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2537
|
-
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(
|
|
2537
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2538
2538
|
}
|
|
2539
2539
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
2540
2540
|
if (filter) {
|
|
@@ -2548,7 +2548,7 @@ class ApplicationDatasetComponent {
|
|
|
2548
2548
|
resultObj.value = value;
|
|
2549
2549
|
}
|
|
2550
2550
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2551
|
-
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(
|
|
2551
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
}
|
|
@@ -2567,7 +2567,7 @@ class ApplicationDatasetComponent {
|
|
|
2567
2567
|
serviceJson[filter.serverColumn] = filter.defaultValue;
|
|
2568
2568
|
let datecolumn = filter.serverColumn.toLowerCase();
|
|
2569
2569
|
if (datecolumn.includes('date') && typeof filter.dataType === 'string') {
|
|
2570
|
-
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "
|
|
2570
|
+
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2571
2571
|
}
|
|
2572
2572
|
else {
|
|
2573
2573
|
serviceJson[filter.serverColumn] = filter.defaultValue;
|
|
@@ -2648,19 +2648,22 @@ class ApplicationDatasetComponent {
|
|
|
2648
2648
|
value: mapping.defaultValue
|
|
2649
2649
|
};
|
|
2650
2650
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2651
|
-
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(
|
|
2651
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2652
2652
|
}
|
|
2653
2653
|
result.push(resultObj);
|
|
2654
2654
|
});
|
|
2655
2655
|
return result;
|
|
2656
2656
|
}
|
|
2657
2657
|
}
|
|
2658
|
-
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 });
|
|
2658
|
+
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 });
|
|
2659
2659
|
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" }] });
|
|
2660
2660
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatasetComponent, decorators: [{
|
|
2661
2661
|
type: Component,
|
|
2662
2662
|
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>" }]
|
|
2663
|
-
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.ActivatedRoute }, { type: i4.Router }, { type: i1.Title }, { type: kpicommonService$2 }
|
|
2663
|
+
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.ActivatedRoute }, { type: i4.Router }, { type: i1.Title }, { type: kpicommonService$2 }, { type: undefined, decorators: [{
|
|
2664
|
+
type: Inject,
|
|
2665
|
+
args: [APP_ENVIRONMENT]
|
|
2666
|
+
}] }]; }, propDecorators: { scrollToElement: [{
|
|
2664
2667
|
type: ViewChild,
|
|
2665
2668
|
args: ['scrollToElement']
|
|
2666
2669
|
}] } });
|
|
@@ -4939,6 +4942,271 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
4939
4942
|
args: ['datasetmodal']
|
|
4940
4943
|
}] } });
|
|
4941
4944
|
|
|
4945
|
+
class DashTodayPreviousComponent {
|
|
4946
|
+
constructor(commonService, cdr, service, taostr) {
|
|
4947
|
+
this.commonService = commonService;
|
|
4948
|
+
this.cdr = cdr;
|
|
4949
|
+
this.service = service;
|
|
4950
|
+
this.taostr = taostr;
|
|
4951
|
+
this.dataSourseForTable = [];
|
|
4952
|
+
this.allConfiguredViews = [];
|
|
4953
|
+
this.optionalDrilDownDataSource = [];
|
|
4954
|
+
this.table_columns_config = {
|
|
4955
|
+
"kpiConfig": {
|
|
4956
|
+
"serviceId": "",
|
|
4957
|
+
"api": "/kpi/trends/network/get-metric-data",
|
|
4958
|
+
"displayType": "table",
|
|
4959
|
+
"formate": "",
|
|
4960
|
+
"keyToPass": [],
|
|
4961
|
+
"componentName": "GammaAdvanceOperatorTableComponent",
|
|
4962
|
+
"dataConfig": {}
|
|
4963
|
+
},
|
|
4964
|
+
};
|
|
4965
|
+
this.tableDataConfig = {
|
|
4966
|
+
"timeUnit": "Day",
|
|
4967
|
+
"timeValue": 1,
|
|
4968
|
+
"isPreviousDay": true,
|
|
4969
|
+
"color": "",
|
|
4970
|
+
"size": "",
|
|
4971
|
+
"sortBy": [],
|
|
4972
|
+
"columns": []
|
|
4973
|
+
};
|
|
4974
|
+
this.enrichNameList = ["abbreviateNumber", "getColorCodeSpan", "ThousandSeparator", "ThousandSeparatorWithTwoDecimals"];
|
|
4975
|
+
this.isLoader = true;
|
|
4976
|
+
this.activeTab = 'basic';
|
|
4977
|
+
this.gettodayPreviousConfigOutPut = new EventEmitter();
|
|
4978
|
+
}
|
|
4979
|
+
set chartconfigData(value) {
|
|
4980
|
+
if (value === undefined || value.length === 0) {
|
|
4981
|
+
return;
|
|
4982
|
+
}
|
|
4983
|
+
else {
|
|
4984
|
+
this.jsaonDatasource = value.data[0];
|
|
4985
|
+
this.previousRevenue = value.data.length > 1 ? value.data[1].revenue : null;
|
|
4986
|
+
this.configColume = Object.keys(value.data[0]);
|
|
4987
|
+
this.dataSourseForTable = value.data.slice(0, 10);
|
|
4988
|
+
this.selectedViewConfigs = value;
|
|
4989
|
+
this.selectedTableViewType = value.selectedViewType;
|
|
4990
|
+
if (value.selectedWidgetConfig) {
|
|
4991
|
+
this.table_columns_config['kpiConfig'] = value.selectedWidgetConfig;
|
|
4992
|
+
this.tableDataConfig = value.selectedWidgetConfig.dataConfig;
|
|
4993
|
+
this.tableDataConfig.columns = (value.selectedWidgetConfig.dataConfig.columns) ? value.selectedWidgetConfig.dataConfig.columns : [];
|
|
4994
|
+
if (value.selectedWidgetConfig.viewProperties) {
|
|
4995
|
+
this.viewProperties = value.selectedWidgetConfig.viewProperties;
|
|
4996
|
+
this.viewProperties = {
|
|
4997
|
+
"enableClickEvent": value.selectedWidgetConfig.viewProperties.enableClickEvent,
|
|
4998
|
+
"enableRightClickEvent": value.selectedWidgetConfig.viewProperties.enableRightClickEvent
|
|
4999
|
+
};
|
|
5000
|
+
if (value.selectedWidgetConfig.viewProperties.enableClickEvent) {
|
|
5001
|
+
if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == 'optionalDrillDown') {
|
|
5002
|
+
this.optionalDrilDownDataSource = value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews;
|
|
5003
|
+
this.viewProperties['clickEventOptions'] = {
|
|
5004
|
+
"eventType": value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType,
|
|
5005
|
+
"associatedViews": []
|
|
5006
|
+
};
|
|
5007
|
+
}
|
|
5008
|
+
else if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == 'drilldown') {
|
|
5009
|
+
this.viewProperties['clickEventOptions'] = {
|
|
5010
|
+
"eventType": value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType,
|
|
5011
|
+
"associatedViews": value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews
|
|
5012
|
+
};
|
|
5013
|
+
}
|
|
5014
|
+
else if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == '') {
|
|
5015
|
+
this.viewProperties['clickEventOptions'] = {
|
|
5016
|
+
"eventType": "",
|
|
5017
|
+
"associatedViews": []
|
|
5018
|
+
};
|
|
5019
|
+
}
|
|
5020
|
+
else {
|
|
5021
|
+
this.viewProperties = {
|
|
5022
|
+
enableClickEvent: false,
|
|
5023
|
+
enableRightClickEvent: true,
|
|
5024
|
+
clickEventOptions: {
|
|
5025
|
+
associatedViews: [],
|
|
5026
|
+
eventType: ""
|
|
5027
|
+
}
|
|
5028
|
+
};
|
|
5029
|
+
}
|
|
5030
|
+
}
|
|
5031
|
+
else {
|
|
5032
|
+
this.viewProperties['clickEventOptions'] = {};
|
|
5033
|
+
}
|
|
5034
|
+
}
|
|
5035
|
+
else {
|
|
5036
|
+
this.viewProperties = {
|
|
5037
|
+
enableClickEvent: false,
|
|
5038
|
+
enableRightClickEvent: true,
|
|
5039
|
+
clickEventOptions: {
|
|
5040
|
+
associatedViews: [],
|
|
5041
|
+
eventType: ""
|
|
5042
|
+
}
|
|
5043
|
+
};
|
|
5044
|
+
}
|
|
5045
|
+
this.cdr.detectChanges();
|
|
5046
|
+
}
|
|
5047
|
+
else {
|
|
5048
|
+
this.tableDataConfig.columns = value.columnData;
|
|
5049
|
+
this.viewProperties = {
|
|
5050
|
+
enableClickEvent: false,
|
|
5051
|
+
enableRightClickEvent: true,
|
|
5052
|
+
clickEventOptions: {
|
|
5053
|
+
associatedViews: [],
|
|
5054
|
+
eventType: ""
|
|
5055
|
+
}
|
|
5056
|
+
};
|
|
5057
|
+
if (!this.tableDataConfig.columns) {
|
|
5058
|
+
this.tableDataConfig.columns = [];
|
|
5059
|
+
this.configColume.forEach(element => {
|
|
5060
|
+
let obj = {
|
|
5061
|
+
"visible": true,
|
|
5062
|
+
"dataField": element,
|
|
5063
|
+
"caption": this.commonService.convertString(element),
|
|
5064
|
+
"enrichName": "",
|
|
5065
|
+
};
|
|
5066
|
+
this.tableDataConfig.columns.push(obj);
|
|
5067
|
+
});
|
|
5068
|
+
console.log(this.configColume);
|
|
5069
|
+
}
|
|
5070
|
+
this.cdr.detectChanges();
|
|
5071
|
+
}
|
|
5072
|
+
}
|
|
5073
|
+
}
|
|
5074
|
+
ngOnInit() {
|
|
5075
|
+
this.isLoader = true;
|
|
5076
|
+
this.service.getAppViewConfigs().subscribe({
|
|
5077
|
+
next: (data) => {
|
|
5078
|
+
this.allConfiguredViews = data;
|
|
5079
|
+
this.isLoader = false;
|
|
5080
|
+
}, error: (err) => {
|
|
5081
|
+
this.taostr.error('Unexpected Server Exception. Please contact System Admin.', 'All Views');
|
|
5082
|
+
}
|
|
5083
|
+
});
|
|
5084
|
+
if (this.optionalDrilDownDataSource.length == 0) {
|
|
5085
|
+
this.optionalDrilDownDataSource = [
|
|
5086
|
+
{
|
|
5087
|
+
'viewId': "",
|
|
5088
|
+
'filterCondition': ""
|
|
5089
|
+
}
|
|
5090
|
+
];
|
|
5091
|
+
}
|
|
5092
|
+
this.cdr.detectChanges();
|
|
5093
|
+
}
|
|
5094
|
+
addColumns() {
|
|
5095
|
+
let obj = {
|
|
5096
|
+
"visible": true,
|
|
5097
|
+
"dataField": "",
|
|
5098
|
+
"caption": "",
|
|
5099
|
+
"enrichName": "",
|
|
5100
|
+
};
|
|
5101
|
+
if (this.selectedTableViewType === 'groupTable') {
|
|
5102
|
+
obj['group'] = '';
|
|
5103
|
+
}
|
|
5104
|
+
this.tableDataConfig.columns.push(obj);
|
|
5105
|
+
}
|
|
5106
|
+
deleteColumns(i) {
|
|
5107
|
+
this.tableDataConfig.columns.splice(i, 1);
|
|
5108
|
+
}
|
|
5109
|
+
getEnrichClassName(e, item) {
|
|
5110
|
+
item.enrichName = e.value;
|
|
5111
|
+
}
|
|
5112
|
+
moveItemForColumns(index, direction) {
|
|
5113
|
+
if (index < 0 || index >= this.tableDataConfig.columns.length)
|
|
5114
|
+
return;
|
|
5115
|
+
const newPosition = direction === 'up' ? index - 1 : index + 1;
|
|
5116
|
+
if (newPosition < 0 || newPosition >= this.tableDataConfig.columns.length)
|
|
5117
|
+
return;
|
|
5118
|
+
const itemToMove = this.tableDataConfig.columns[index];
|
|
5119
|
+
this.tableDataConfig.columns.splice(index, 1);
|
|
5120
|
+
this.tableDataConfig.columns.splice(newPosition, 0, itemToMove);
|
|
5121
|
+
}
|
|
5122
|
+
getObjectKeys(obj) {
|
|
5123
|
+
return Object.keys(obj);
|
|
5124
|
+
}
|
|
5125
|
+
setActiveTab(tab) {
|
|
5126
|
+
this.activeTab = tab;
|
|
5127
|
+
}
|
|
5128
|
+
getGroupColumns(columns) {
|
|
5129
|
+
const groupedColumns = columns.reduce((acc, column) => {
|
|
5130
|
+
let group = acc.find(item => item.caption === column.group);
|
|
5131
|
+
if (!group) {
|
|
5132
|
+
group = {
|
|
5133
|
+
caption: column.group,
|
|
5134
|
+
columns: []
|
|
5135
|
+
};
|
|
5136
|
+
acc.push(group);
|
|
5137
|
+
}
|
|
5138
|
+
group.columns.push({
|
|
5139
|
+
dataField: column.dataField,
|
|
5140
|
+
visible: column.visible,
|
|
5141
|
+
caption: column.caption
|
|
5142
|
+
});
|
|
5143
|
+
return acc;
|
|
5144
|
+
}, []);
|
|
5145
|
+
return groupedColumns;
|
|
5146
|
+
}
|
|
5147
|
+
geColumnsFromGroup(columns) {
|
|
5148
|
+
const newColumns = [];
|
|
5149
|
+
columns.forEach(group => {
|
|
5150
|
+
group.columns.forEach(col => {
|
|
5151
|
+
newColumns.push({
|
|
5152
|
+
dataField: col.dataField,
|
|
5153
|
+
visible: col.visible,
|
|
5154
|
+
caption: col.caption,
|
|
5155
|
+
group: group.caption
|
|
5156
|
+
});
|
|
5157
|
+
});
|
|
5158
|
+
});
|
|
5159
|
+
return newColumns;
|
|
5160
|
+
}
|
|
5161
|
+
getSaveConfig() {
|
|
5162
|
+
debugger;
|
|
5163
|
+
if (this.viewProperties.clickEventOptions.eventType == 'optionalDrillDown') {
|
|
5164
|
+
this.viewProperties['clickEventOptions']['associatedViews'] = this.optionalDrilDownDataSource;
|
|
5165
|
+
}
|
|
5166
|
+
this.table_columns_config.kpiConfig['viewProperties'] = this.viewProperties;
|
|
5167
|
+
this.table_columns_config.kpiConfig.dataConfig = JSON.parse(JSON.stringify(this.tableDataConfig));
|
|
5168
|
+
this.gettodayPreviousConfigOutPut.emit(this.table_columns_config);
|
|
5169
|
+
}
|
|
5170
|
+
deleteAssociatedParams(index) {
|
|
5171
|
+
this.optionalDrilDownDataSource.splice(index, 1);
|
|
5172
|
+
}
|
|
5173
|
+
addAssociatedParams() {
|
|
5174
|
+
this.optionalDrilDownDataSource.push({
|
|
5175
|
+
'viewId': "",
|
|
5176
|
+
'filterCondition': ""
|
|
5177
|
+
});
|
|
5178
|
+
}
|
|
5179
|
+
getSelectedEventType(e) {
|
|
5180
|
+
if (e.event) {
|
|
5181
|
+
this.optionalDrilDownDataSource = [];
|
|
5182
|
+
if (this.viewProperties.clickEventOptions.eventType == 'drilldown') {
|
|
5183
|
+
this.table_columns_config.kpiConfig['viewProperties']['associatedViews'] = [];
|
|
5184
|
+
}
|
|
5185
|
+
}
|
|
5186
|
+
}
|
|
5187
|
+
resetViewProprstise() {
|
|
5188
|
+
this.viewProperties = {
|
|
5189
|
+
enableClickEvent: false,
|
|
5190
|
+
enableRightClickEvent: true,
|
|
5191
|
+
clickEventOptions: {
|
|
5192
|
+
associatedViews: [],
|
|
5193
|
+
eventType: ""
|
|
5194
|
+
}
|
|
5195
|
+
};
|
|
5196
|
+
}
|
|
5197
|
+
}
|
|
5198
|
+
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 });
|
|
5199
|
+
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" }] });
|
|
5200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DashTodayPreviousComponent, decorators: [{
|
|
5201
|
+
type: Component,
|
|
5202
|
+
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>" }]
|
|
5203
|
+
}], ctorParameters: function () { return [{ type: CommonService }, { type: i0.ChangeDetectorRef }, { type: ApplicationContentService }, { type: i2$1.ToastrService }]; }, propDecorators: { gettodayPreviousConfigOutPut: [{
|
|
5204
|
+
type: Output
|
|
5205
|
+
}], chartconfigData: [{
|
|
5206
|
+
type: Input,
|
|
5207
|
+
args: ['datasetmodal']
|
|
5208
|
+
}] } });
|
|
5209
|
+
|
|
4942
5210
|
class CreateCompViewComponent {
|
|
4943
5211
|
constructor(toastr, commonService, service, kpiService, router, activatedRoute) {
|
|
4944
5212
|
this.toastr = toastr;
|
|
@@ -5469,10 +5737,10 @@ class CreateCompViewComponent {
|
|
|
5469
5737
|
}
|
|
5470
5738
|
}
|
|
5471
5739
|
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 });
|
|
5472
|
-
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"] }] });
|
|
5740
|
+
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"] }] });
|
|
5473
5741
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreateCompViewComponent, decorators: [{
|
|
5474
5742
|
type: Component,
|
|
5475
|
-
args: [{ selector: 'app-create-comp-view', template: "<div class=\"flex flex-col flex-auto min-w-0\">\n
|
|
5743
|
+
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" }]
|
|
5476
5744
|
}], ctorParameters: function () { return [{ type: i2$1.ToastrService }, { type: CommonService }, { type: ApplicationContentService }, { type: kpicommonService$2 }, { type: i4.Router }, { type: i4.ActivatedRoute }]; }, propDecorators: { kpiTreeData: [{
|
|
5477
5745
|
type: Input
|
|
5478
5746
|
}], isHeader: [{
|
|
@@ -5495,35 +5763,46 @@ class GammaTodayPreviousComponent {
|
|
|
5495
5763
|
}
|
|
5496
5764
|
else {
|
|
5497
5765
|
this.isLoader = true;
|
|
5766
|
+
this.selectedColumn = (value.kpiConfig.dataConfig.columns &&
|
|
5767
|
+
value.kpiConfig.dataConfig.columns.length !== 0) ? value.kpiConfig.dataConfig.columns[0].dataField : "";
|
|
5768
|
+
this.sortBy = value.kpiConfig?.dataConfig?.sortBy;
|
|
5769
|
+
this.isPreviousDay = value.kpiConfig?.dataConfig?.isPreviousDay;
|
|
5498
5770
|
if (value.kpiConfig.dataSource && value.kpiConfig.dataSource.length !== 0) {
|
|
5499
5771
|
this.page_config = value;
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5772
|
+
let sortedData = value.kpiConfig.dataSource;
|
|
5773
|
+
if (this.sortBy?.length) {
|
|
5774
|
+
let sortKey = this.sortBy[0];
|
|
5775
|
+
sortedData = sortedData.sort((a, b) => {
|
|
5776
|
+
return moment(b[sortKey], "YYYY-MM-DD").diff(moment(a[sortKey], "YYYY-MM-DD"));
|
|
5777
|
+
});
|
|
5778
|
+
}
|
|
5503
5779
|
this.currentDateData = sortedData[0];
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
this.
|
|
5780
|
+
const timeValue = parseInt(value.kpiConfig?.dataConfig?.timeValue) || 1;
|
|
5781
|
+
this.prevousDaysData = this.isPreviousDay ? sortedData[timeValue] || null : null;
|
|
5782
|
+
if (this.isPreviousDay && this.prevousDaysData) {
|
|
5783
|
+
let calValue = Math.abs((parseInt(this.getDynamicValue(this.currentDateData)) - parseInt(this.getDynamicValue(this.prevousDaysData))) /
|
|
5784
|
+
parseInt(this.getDynamicValue(this.currentDateData)));
|
|
5785
|
+
this.calculatedValue = this.commonService.reformatNumberWithThousandSeparatorV4(calValue, 3);
|
|
5786
|
+
}
|
|
5787
|
+
else {
|
|
5788
|
+
this.calculatedValue = null;
|
|
5789
|
+
}
|
|
5507
5790
|
this.isLoader = false;
|
|
5508
5791
|
}
|
|
5509
|
-
else {
|
|
5510
|
-
}
|
|
5511
5792
|
}
|
|
5512
5793
|
}
|
|
5513
5794
|
ngOnInit() {
|
|
5514
5795
|
}
|
|
5515
5796
|
getDynamicValue(data) {
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
if (dynamicKey) {
|
|
5519
|
-
let value = data[dynamicKey];
|
|
5520
|
-
const numericValue = Number(value);
|
|
5521
|
-
if (!isNaN(numericValue)) {
|
|
5522
|
-
return this.commonService.abbreviateNumber(numericValue);
|
|
5523
|
-
}
|
|
5524
|
-
return value;
|
|
5797
|
+
if (!this.selectedColumn || !data.hasOwnProperty(this.selectedColumn)) {
|
|
5798
|
+
return null;
|
|
5525
5799
|
}
|
|
5526
|
-
|
|
5800
|
+
let value = data[this.selectedColumn];
|
|
5801
|
+
const numericValue = Number(value);
|
|
5802
|
+
if (!isNaN(numericValue)) {
|
|
5803
|
+
return this.commonService.abbreviateNumber(numericValue);
|
|
5804
|
+
}
|
|
5805
|
+
return value;
|
|
5527
5806
|
}
|
|
5528
5807
|
formatNumber(value) {
|
|
5529
5808
|
if (value >= 1e9) {
|
|
@@ -8397,9 +8676,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
8397
8676
|
}], ctorParameters: function () { return [{ type: CommonService }]; } });
|
|
8398
8677
|
|
|
8399
8678
|
class ApplicationDatssetsCall {
|
|
8400
|
-
constructor(service, kpiService) {
|
|
8679
|
+
constructor(service, kpiService, environment) {
|
|
8401
8680
|
this.service = service;
|
|
8402
8681
|
this.kpiService = kpiService;
|
|
8682
|
+
this.environment = environment;
|
|
8403
8683
|
this.uniqueDataSetObject = {};
|
|
8404
8684
|
}
|
|
8405
8685
|
getDataFromDataSet(dataset, datasetId, filters) {
|
|
@@ -8492,7 +8772,7 @@ class ApplicationDatssetsCall {
|
|
|
8492
8772
|
value: mapping.defaultValue
|
|
8493
8773
|
};
|
|
8494
8774
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
8495
|
-
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(
|
|
8775
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
8496
8776
|
}
|
|
8497
8777
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
8498
8778
|
if (filter) {
|
|
@@ -8506,7 +8786,7 @@ class ApplicationDatssetsCall {
|
|
|
8506
8786
|
resultObj.value = value;
|
|
8507
8787
|
}
|
|
8508
8788
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
8509
|
-
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(
|
|
8789
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
8510
8790
|
}
|
|
8511
8791
|
}
|
|
8512
8792
|
}
|
|
@@ -8557,7 +8837,7 @@ class ApplicationDatssetsCall {
|
|
|
8557
8837
|
dataset.config.queryConfig.mapedFilters.forEach((filter) => {
|
|
8558
8838
|
let datecolumn = filter.serverColumn.toLowerCase();
|
|
8559
8839
|
if (datecolumn.includes('date') && typeof filter.dataType === 'string') {
|
|
8560
|
-
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "
|
|
8840
|
+
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
8561
8841
|
}
|
|
8562
8842
|
else {
|
|
8563
8843
|
serviceJson[filter.serverColumn] = filter.defaultValue;
|
|
@@ -8648,7 +8928,7 @@ class ApplicationDatssetsCall {
|
|
|
8648
8928
|
aliasColumnName: mapping.localColumn,
|
|
8649
8929
|
};
|
|
8650
8930
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
8651
|
-
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(
|
|
8931
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
8652
8932
|
}
|
|
8653
8933
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
8654
8934
|
if (filter) {
|
|
@@ -8662,7 +8942,7 @@ class ApplicationDatssetsCall {
|
|
|
8662
8942
|
resultObj.value = value;
|
|
8663
8943
|
}
|
|
8664
8944
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
8665
|
-
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(
|
|
8945
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
8666
8946
|
}
|
|
8667
8947
|
}
|
|
8668
8948
|
}
|
|
@@ -8704,11 +8984,14 @@ class ApplicationDatssetsCall {
|
|
|
8704
8984
|
return this.uniqueDataSetObject;
|
|
8705
8985
|
}
|
|
8706
8986
|
}
|
|
8707
|
-
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 });
|
|
8987
|
+
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 });
|
|
8708
8988
|
ApplicationDatssetsCall.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatssetsCall });
|
|
8709
8989
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationDatssetsCall, decorators: [{
|
|
8710
8990
|
type: Injectable
|
|
8711
|
-
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: kpicommonService }
|
|
8991
|
+
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: kpicommonService }, { type: undefined, decorators: [{
|
|
8992
|
+
type: Inject,
|
|
8993
|
+
args: [APP_ENVIRONMENT]
|
|
8994
|
+
}] }]; } });
|
|
8712
8995
|
|
|
8713
8996
|
class LoadingComponent$1 {
|
|
8714
8997
|
constructor() {
|
|
@@ -12577,7 +12860,8 @@ PackageApplicationControllerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion
|
|
|
12577
12860
|
CreateMetricsComponent,
|
|
12578
12861
|
OnlineMetricsComponent,
|
|
12579
12862
|
OflineMetricsComponent,
|
|
12580
|
-
AllMetricsConfigComponent
|
|
12863
|
+
AllMetricsConfigComponent,
|
|
12864
|
+
DashTodayPreviousComponent], imports: [CommonModule, i4.RouterModule, DevExtremeModule,
|
|
12581
12865
|
DxButtonModule,
|
|
12582
12866
|
DxCheckBoxModule,
|
|
12583
12867
|
DxNumberBoxModule,
|
|
@@ -12640,7 +12924,8 @@ PackageApplicationControllerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion
|
|
|
12640
12924
|
CreateMetricsComponent,
|
|
12641
12925
|
OnlineMetricsComponent,
|
|
12642
12926
|
OflineMetricsComponent,
|
|
12643
|
-
AllMetricsConfigComponent
|
|
12927
|
+
AllMetricsConfigComponent,
|
|
12928
|
+
DashTodayPreviousComponent] });
|
|
12644
12929
|
PackageApplicationControllerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PackageApplicationControllerModule, providers: [
|
|
12645
12930
|
ApplicationContentService,
|
|
12646
12931
|
ApplicationDatssetsCall
|
|
@@ -12728,7 +13013,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
12728
13013
|
CreateMetricsComponent,
|
|
12729
13014
|
OnlineMetricsComponent,
|
|
12730
13015
|
OflineMetricsComponent,
|
|
12731
|
-
AllMetricsConfigComponent
|
|
13016
|
+
AllMetricsConfigComponent,
|
|
13017
|
+
DashTodayPreviousComponent
|
|
12732
13018
|
],
|
|
12733
13019
|
imports: [
|
|
12734
13020
|
CommonModule,
|
|
@@ -12799,7 +13085,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
12799
13085
|
CreateMetricsComponent,
|
|
12800
13086
|
OnlineMetricsComponent,
|
|
12801
13087
|
OflineMetricsComponent,
|
|
12802
|
-
AllMetricsConfigComponent
|
|
13088
|
+
AllMetricsConfigComponent,
|
|
13089
|
+
DashTodayPreviousComponent
|
|
12803
13090
|
],
|
|
12804
13091
|
providers: [
|
|
12805
13092
|
ApplicationContentService,
|
|
@@ -12849,5 +13136,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
12849
13136
|
}]
|
|
12850
13137
|
}] });
|
|
12851
13138
|
|
|
12852
|
-
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 };
|
|
12853
13140
|
//# sourceMappingURL=gamma-app-controller.mjs.map
|