gamma-app-controller 1.1.11 → 1.1.14
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-dataset-call.service.mjs +19 -4
- package/esm2020/lib/application-controller/application-dataset-component/application-dataset/application-dataset.component.mjs +19 -4
- package/esm2020/lib/application-controller/application-dataset-component/create-dataset/create-dataset.component.mjs +8 -1
- package/esm2020/lib/application-controller/application-dataset-component/create-dataset-sql/create-dataset-sql.component.mjs +21 -11
- package/esm2020/lib/application-controller/application-dataset-component/dataset-query-bulder/dataset-query-bulder.component.mjs +6 -5
- package/esm2020/lib/application-controller/application-dataset-component/dataset-rest-api/dataset-rest-api.component.mjs +5 -5
- package/esm2020/lib/application-controller/application-filter/application-filter.component.mjs +36 -21
- package/esm2020/lib/application-controller/application-view-components/create-comp-view/create-comp-view.component.mjs +25 -6
- package/esm2020/lib/application-controller/page-controller/page-config/page-config.component.mjs +21 -1
- package/esm2020/lib/application-controller/shared/advanced-component/google-geo-map/google-geo-map.component.mjs +2 -8
- package/esm2020/lib/application-controller/support-components/dash-table/dash-table.component.mjs +9 -21
- package/fesm2015/gamma-app-controller.mjs +162 -75
- package/fesm2015/gamma-app-controller.mjs.map +1 -1
- package/fesm2020/gamma-app-controller.mjs +159 -75
- package/fesm2020/gamma-app-controller.mjs.map +1 -1
- package/lib/application-controller/application-filter/application-filter.component.d.ts +3 -1
- package/lib/application-controller/page-controller/page-config/page-config.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
10
10
|
import { DxScrollViewComponent, DevExtremeModule, DxButtonModule, DxCheckBoxModule, DxNumberBoxModule, DxDataGridModule, DxDropDownBoxModule, DxTreeViewModule, DxScrollViewModule, DxFormModule, DxAccordionModule, DxTagBoxModule, DxHtmlEditorModule, DxBulletModule, DxChartModule, DxDateBoxModule, DxLoadPanelModule, DxLookupModule, DxPivotGridModule, DxTemplateModule, DxTextAreaModule, DxValidationSummaryModule, DxValidatorModule, DxCalendarModule, DxTooltipModule, DxContextMenuModule, DxLoadIndicatorModule, DxPieChartModule, DxPopupModule, DxSelectBoxModule, DxTextBoxModule } from 'devextreme-angular';
|
|
11
11
|
import * as i8 from '@angular/forms';
|
|
12
12
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
13
|
+
import { __awaiter, __rest } from 'tslib';
|
|
13
14
|
import { confirm } from 'devextreme/ui/dialog';
|
|
14
15
|
import * as i1$1 from '@angular/common/http';
|
|
15
16
|
import { HttpHeaders } from '@angular/common/http';
|
|
@@ -26,7 +27,6 @@ import * as i11 from 'devextreme-angular/ui/date-box';
|
|
|
26
27
|
import * as i4$2 from 'devextreme-angular/ui/popup';
|
|
27
28
|
import * as i6$2 from 'devextreme-angular/ui/color-box';
|
|
28
29
|
import * as i8$1 from 'devextreme-angular/ui/tag-box';
|
|
29
|
-
import { __rest, __awaiter } from 'tslib';
|
|
30
30
|
import * as i5$1 from 'devextreme-angular/ui/chart';
|
|
31
31
|
import * as i8$2 from 'devextreme-angular/ui/pie-chart';
|
|
32
32
|
import * as i10 from 'devextreme-angular/ui/scroll-view';
|
|
@@ -2012,7 +2012,8 @@ class ApplicationFilterComponent {
|
|
|
2012
2012
|
"defaultFilterType": "dynamic",
|
|
2013
2013
|
"defaultFilterValue": "15,days",
|
|
2014
2014
|
"momentFunction": "subtract",
|
|
2015
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2015
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2016
|
+
"queryFormat": "YYYYMMDD"
|
|
2016
2017
|
},
|
|
2017
2018
|
{
|
|
2018
2019
|
"apiName": "endDate",
|
|
@@ -2023,7 +2024,8 @@ class ApplicationFilterComponent {
|
|
|
2023
2024
|
"defaultFilterType": "dynamic",
|
|
2024
2025
|
"defaultFilterValue": "1,days",
|
|
2025
2026
|
"momentFunction": "subtract",
|
|
2026
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2027
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2028
|
+
"queryFormat": "YYYYMMDD"
|
|
2027
2029
|
}]
|
|
2028
2030
|
};
|
|
2029
2031
|
this.filter_type = ['single', 'multiple', 'date', 'datetime', "content", "context"];
|
|
@@ -2036,14 +2038,18 @@ class ApplicationFilterComponent {
|
|
|
2036
2038
|
this.getFilterDataSet();
|
|
2037
2039
|
}
|
|
2038
2040
|
getFilterDataSet() {
|
|
2039
|
-
this
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
this.
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2041
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2042
|
+
return new Promise((resolve) => {
|
|
2043
|
+
this.isLoader = true;
|
|
2044
|
+
this.service.getAppFilterConfigs().subscribe({
|
|
2045
|
+
next: (data) => {
|
|
2046
|
+
this.filterDataSource = data;
|
|
2047
|
+
this.isLoader = false;
|
|
2048
|
+
}, error: (err) => {
|
|
2049
|
+
this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'Filter Creation');
|
|
2050
|
+
}
|
|
2051
|
+
});
|
|
2052
|
+
});
|
|
2047
2053
|
});
|
|
2048
2054
|
}
|
|
2049
2055
|
addFilter() {
|
|
@@ -2074,7 +2080,8 @@ class ApplicationFilterComponent {
|
|
|
2074
2080
|
"defaultFilterType": "dynamic",
|
|
2075
2081
|
"defaultFilterValue": "15,days",
|
|
2076
2082
|
"momentFunction": "subtract",
|
|
2077
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2083
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2084
|
+
"queryFormat": "YYYYMMDD"
|
|
2078
2085
|
},
|
|
2079
2086
|
{
|
|
2080
2087
|
"apiName": "endDate",
|
|
@@ -2085,23 +2092,31 @@ class ApplicationFilterComponent {
|
|
|
2085
2092
|
"defaultFilterType": "dynamic",
|
|
2086
2093
|
"defaultFilterValue": "1,days",
|
|
2087
2094
|
"momentFunction": "subtract",
|
|
2088
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2095
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2096
|
+
"queryFormat": "YYYYMMDD"
|
|
2089
2097
|
}]
|
|
2090
2098
|
};
|
|
2091
2099
|
}
|
|
2092
2100
|
editFilter(data) {
|
|
2101
|
+
debugger;
|
|
2093
2102
|
this.creatFilterObject = data;
|
|
2094
2103
|
this.isNewFilterCreate = true;
|
|
2095
2104
|
}
|
|
2096
2105
|
deleteFilter(item) {
|
|
2097
2106
|
let result = confirm("<i>Are You Sure?</i>", "Delete Filter");
|
|
2098
2107
|
result.then((dialogResult) => {
|
|
2108
|
+
var _a;
|
|
2099
2109
|
if (dialogResult) {
|
|
2100
2110
|
this.isLoader = true;
|
|
2111
|
+
const currentPageIndex = (_a = this.dataGrid) === null || _a === void 0 ? void 0 : _a.instance.pageIndex();
|
|
2101
2112
|
this.service.deleteAppFilterConfig(item.filterId).subscribe((val) => {
|
|
2102
|
-
this.getFilterDataSet()
|
|
2103
|
-
|
|
2104
|
-
|
|
2113
|
+
this.getFilterDataSet().then(() => {
|
|
2114
|
+
if (currentPageIndex !== undefined) {
|
|
2115
|
+
this.dataGrid.instance.pageIndex(currentPageIndex);
|
|
2116
|
+
}
|
|
2117
|
+
this.isLoader = false;
|
|
2118
|
+
this.toastr.success('Filter Deleted Successfully');
|
|
2119
|
+
});
|
|
2105
2120
|
}, err => {
|
|
2106
2121
|
console.log(err);
|
|
2107
2122
|
this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'Rule Module');
|
|
@@ -2187,11 +2202,14 @@ class ApplicationFilterComponent {
|
|
|
2187
2202
|
}
|
|
2188
2203
|
}
|
|
2189
2204
|
ApplicationFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationFilterComponent, deps: [{ token: ApplicationContentService }, { token: CommonService }, { token: i2$1.ToastrService }, { token: i4.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
2190
|
-
ApplicationFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ApplicationFilterComponent, selector: "app-application-filter", ngImport: i0, template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Application Filters'\"></lib-common-header>\n\n\n\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\n class=\"mb-2 font-bold 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> Filters\n <div class=\"ml-auto\">\n <button class=\"bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-3 rounded\"\n (click)=\"getCreateNewFilter()\">\n Add Filter\n </button>\n </div>\n </h6>\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <dx-data-grid [columnAutoWidth]=\"true\" [dataSource]=\"filterDataSource\" [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\n <dxi-column dataField=\"filterName\"></dxi-column>\n <dxi-column dataField=\"filterId\"></dxi-column>\n <dxi-column dataField=\"createdBy\"></dxi-column>\n <dxi-column dataField=\"creationDate\"></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)=\"editFilter(data.data)\">\n Edit\n </button>\n <button class=\"{{commonService.btn_danger_md}}\" (click)=\"deleteFilter(data.data)\">\n Delete\n </button>\n </div>\n\n\n </dx-data-grid>\n </div>\n </div>\n <div class=\"p-2 w-full\" *ngIf=\"isNewFilterCreate\">\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\n class=\"mb-2 font-bold 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> Create Filters\n\n </h6>\n <div class=\"flex flex-row my-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Filter Name</div>\n <dx-text-box [(ngModel)]=\"creatFilterObject.filterName\"></dx-text-box>\n </div>\n </div>\n <div class=\"m-5 border\">\n <div class=\"flex flex-col flex-auto min-w-0 \">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Select Filters\n </div>\n <div class=\"pt-2 border-x border-b \">\n <ng-container *ngFor=\"let item of creatFilterObject.filterItems; let i = index;\">\n <div class=\"my-2 flex flex-row justify-between border-b\">\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2 mt-5\"> </div>\n <dx-check-box [(ngModel)]=\"item.display\" text=\"Display\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Filter Name </div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpiFilterConfigService\"\n displayExpr=\"apiName\" valueExpr=\"apiUrl\"\n [(ngModel)]=\"item.apiName\"></dx-select-box>\n </div>\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Operator Key Name </div>\n <dx-text-box [(ngModel)]=\"item.operatorName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Label</div>\n <dx-text-box [(ngModel)]=\"item.label\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Container</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"filter_type\"\n [(ngModel)]=\"item.filterType\"></dx-select-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"defaultFilterTypeDataSource\"\n [(ngModel)]=\"item.defaultFilterType\"\n value=\"defaultFilterTypeDataSource[0]\"></dx-select-box>\n\n </div>\n\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Function </div>\n <dx-select-box [items]=\"momentFunction\"\n [(ngModel)]=\"item.momentFunction\"></dx-select-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Additionals </div>\n <dx-text-box [(ngModel)]=\"item.momentFormat\"></dx-text-box>\n </div>\n\n </ng-container>\n <ng-container\n *ngIf=\"item.defaultFilterType == 'static' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Default Value </div>\n <dx-text-box \n [(ngModel)]=\"item.defaultFilterValue\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Display Format </div>\n <dx-text-box [(ngModel)]=\"item.momentFormat\"></dx-text-box>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType !== 'date' || item.filterType !== 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultFilterValue\"></dx-text-box>\n </div>\n </ng-container>\n\n <div class=\"px-2 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilters(i)\"><i 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 my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addFilter()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createFilterItems()\">\n Submit Filter\n </button>\n </div>\n\n </div>\n </div>\n\n\n\n</div>", 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: 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: 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$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: LoaderComponent, selector: "app-loader" }, { kind: "component", type: CommonHeaderComponent, selector: "lib-common-header", inputs: ["pageTitle"] }] });
|
|
2205
|
+
ApplicationFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ApplicationFilterComponent, selector: "app-application-filter", viewQueries: [{ propertyName: "dataGrid", first: true, predicate: ["gridContainer"], descendants: true }], ngImport: i0, template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Application Filters'\"></lib-common-header>\n\n\n\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\n class=\"mb-2 font-bold 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> Filters\n <div class=\"ml-auto\">\n <button class=\"bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-3 rounded\"\n (click)=\"getCreateNewFilter()\">\n Add Filter\n </button>\n </div>\n </h6>\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <dx-data-grid [columnAutoWidth]=\"true\" [dataSource]=\"filterDataSource\" [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\n <dxi-column dataField=\"filterName\"></dxi-column>\n <dxi-column dataField=\"filterId\"></dxi-column>\n <dxi-column dataField=\"createdBy\"></dxi-column>\n <dxi-column dataField=\"creationDate\"></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)=\"editFilter(data.data)\">\n Edit\n </button>\n <button class=\"{{commonService.btn_danger_md}}\" (click)=\"deleteFilter(data.data)\">\n Delete\n </button>\n </div>\n\n\n </dx-data-grid>\n </div>\n </div>\n <div class=\"p-2 w-full\" *ngIf=\"isNewFilterCreate\">\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\n class=\"mb-2 font-bold 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> Create Filters\n\n </h6>\n <div class=\"flex flex-row my-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Filter Name</div>\n <dx-text-box [(ngModel)]=\"creatFilterObject.filterName\"></dx-text-box>\n </div>\n </div>\n <div class=\"m-5 border\">\n <div class=\"flex flex-col flex-auto min-w-0 \">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Select Filters\n </div>\n <div class=\"pt-2 border-x border-b \">\n <ng-container *ngFor=\"let item of creatFilterObject.filterItems; let i = index;\">\n <div class=\"my-2 flex flex-row justify-between border-b\">\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2 mt-5\"> </div>\n <dx-check-box [(ngModel)]=\"item.display\" text=\"Display\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Filter Name </div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpiFilterConfigService\"\n displayExpr=\"apiName\" valueExpr=\"apiUrl\"\n [(ngModel)]=\"item.apiName\"></dx-select-box>\n </div>\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Operator Key Name </div>\n <dx-text-box [(ngModel)]=\"item.operatorName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Label</div>\n <dx-text-box [(ngModel)]=\"item.label\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Container</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"filter_type\"\n [(ngModel)]=\"item.filterType\"></dx-select-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"defaultFilterTypeDataSource\"\n [(ngModel)]=\"item.defaultFilterType\"\n value=\"defaultFilterTypeDataSource[0]\"></dx-select-box>\n\n </div>\n\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Function </div>\n <dx-select-box [items]=\"momentFunction\"\n [(ngModel)]=\"item.momentFunction\"></dx-select-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Display Format </div>\n <dx-text-box [(ngModel)]=\"item.momentFormat\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Query Format </div>\n <dx-text-box [(ngModel)]=\"item.queryFormat\"></dx-text-box>\n </div>\n\n </ng-container>\n <ng-container\n *ngIf=\"item.defaultFilterType == 'static' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Default Value </div>\n <dx-text-box \n [(ngModel)]=\"item.defaultFilterValue\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Display Format </div>\n <dx-text-box [(ngModel)]=\"item.momentFormat\"></dx-text-box>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType !== 'date' || item.filterType !== 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultFilterValue\"></dx-text-box>\n </div>\n </ng-container>\n\n <div class=\"px-2 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilters(i)\"><i 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 my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addFilter()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createFilterItems()\">\n Submit Filter\n </button>\n </div>\n\n </div>\n </div>\n\n\n\n</div>", 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: 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: 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$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: LoaderComponent, selector: "app-loader" }, { kind: "component", type: CommonHeaderComponent, selector: "lib-common-header", inputs: ["pageTitle"] }] });
|
|
2191
2206
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationFilterComponent, decorators: [{
|
|
2192
2207
|
type: Component,
|
|
2193
|
-
args: [{ selector: 'app-application-filter', template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Application Filters'\"></lib-common-header>\n\n\n\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\n class=\"mb-2 font-bold 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> Filters\n <div class=\"ml-auto\">\n <button class=\"bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-3 rounded\"\n (click)=\"getCreateNewFilter()\">\n Add Filter\n </button>\n </div>\n </h6>\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <dx-data-grid [columnAutoWidth]=\"true\" [dataSource]=\"filterDataSource\" [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\n <dxi-column dataField=\"filterName\"></dxi-column>\n <dxi-column dataField=\"filterId\"></dxi-column>\n <dxi-column dataField=\"createdBy\"></dxi-column>\n <dxi-column dataField=\"creationDate\"></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)=\"editFilter(data.data)\">\n Edit\n </button>\n <button class=\"{{commonService.btn_danger_md}}\" (click)=\"deleteFilter(data.data)\">\n Delete\n </button>\n </div>\n\n\n </dx-data-grid>\n </div>\n </div>\n <div class=\"p-2 w-full\" *ngIf=\"isNewFilterCreate\">\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\n class=\"mb-2 font-bold 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> Create Filters\n\n </h6>\n <div class=\"flex flex-row my-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Filter Name</div>\n <dx-text-box [(ngModel)]=\"creatFilterObject.filterName\"></dx-text-box>\n </div>\n </div>\n <div class=\"m-5 border\">\n <div class=\"flex flex-col flex-auto min-w-0 \">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Select Filters\n </div>\n <div class=\"pt-2 border-x border-b \">\n <ng-container *ngFor=\"let item of creatFilterObject.filterItems; let i = index;\">\n <div class=\"my-2 flex flex-row justify-between border-b\">\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2 mt-5\"> </div>\n <dx-check-box [(ngModel)]=\"item.display\" text=\"Display\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Filter Name </div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpiFilterConfigService\"\n displayExpr=\"apiName\" valueExpr=\"apiUrl\"\n [(ngModel)]=\"item.apiName\"></dx-select-box>\n </div>\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Operator Key Name </div>\n <dx-text-box [(ngModel)]=\"item.operatorName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Label</div>\n <dx-text-box [(ngModel)]=\"item.label\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Container</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"filter_type\"\n [(ngModel)]=\"item.filterType\"></dx-select-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"defaultFilterTypeDataSource\"\n [(ngModel)]=\"item.defaultFilterType\"\n value=\"defaultFilterTypeDataSource[0]\"></dx-select-box>\n\n </div>\n\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Function </div>\n <dx-select-box [items]=\"momentFunction\"\n [(ngModel)]=\"item.momentFunction\"></dx-select-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">
|
|
2194
|
-
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.Router }]; }
|
|
2208
|
+
args: [{ selector: 'app-application-filter', template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Application Filters'\"></lib-common-header>\n\n\n\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\n class=\"mb-2 font-bold 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> Filters\n <div class=\"ml-auto\">\n <button class=\"bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-3 rounded\"\n (click)=\"getCreateNewFilter()\">\n Add Filter\n </button>\n </div>\n </h6>\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <dx-data-grid [columnAutoWidth]=\"true\" [dataSource]=\"filterDataSource\" [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\n <dxi-column dataField=\"filterName\"></dxi-column>\n <dxi-column dataField=\"filterId\"></dxi-column>\n <dxi-column dataField=\"createdBy\"></dxi-column>\n <dxi-column dataField=\"creationDate\"></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)=\"editFilter(data.data)\">\n Edit\n </button>\n <button class=\"{{commonService.btn_danger_md}}\" (click)=\"deleteFilter(data.data)\">\n Delete\n </button>\n </div>\n\n\n </dx-data-grid>\n </div>\n </div>\n <div class=\"p-2 w-full\" *ngIf=\"isNewFilterCreate\">\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\n class=\"mb-2 font-bold 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> Create Filters\n\n </h6>\n <div class=\"flex flex-row my-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Filter Name</div>\n <dx-text-box [(ngModel)]=\"creatFilterObject.filterName\"></dx-text-box>\n </div>\n </div>\n <div class=\"m-5 border\">\n <div class=\"flex flex-col flex-auto min-w-0 \">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Select Filters\n </div>\n <div class=\"pt-2 border-x border-b \">\n <ng-container *ngFor=\"let item of creatFilterObject.filterItems; let i = index;\">\n <div class=\"my-2 flex flex-row justify-between border-b\">\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2 mt-5\"> </div>\n <dx-check-box [(ngModel)]=\"item.display\" text=\"Display\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Filter Name </div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpiFilterConfigService\"\n displayExpr=\"apiName\" valueExpr=\"apiUrl\"\n [(ngModel)]=\"item.apiName\"></dx-select-box>\n </div>\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Operator Key Name </div>\n <dx-text-box [(ngModel)]=\"item.operatorName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Label</div>\n <dx-text-box [(ngModel)]=\"item.label\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Container</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"filter_type\"\n [(ngModel)]=\"item.filterType\"></dx-select-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"defaultFilterTypeDataSource\"\n [(ngModel)]=\"item.defaultFilterType\"\n value=\"defaultFilterTypeDataSource[0]\"></dx-select-box>\n\n </div>\n\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Function </div>\n <dx-select-box [items]=\"momentFunction\"\n [(ngModel)]=\"item.momentFunction\"></dx-select-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Display Format </div>\n <dx-text-box [(ngModel)]=\"item.momentFormat\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Query Format </div>\n <dx-text-box [(ngModel)]=\"item.queryFormat\"></dx-text-box>\n </div>\n\n </ng-container>\n <ng-container\n *ngIf=\"item.defaultFilterType == 'static' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Default Value </div>\n <dx-text-box \n [(ngModel)]=\"item.defaultFilterValue\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Display Format </div>\n <dx-text-box [(ngModel)]=\"item.momentFormat\"></dx-text-box>\n </div>\n </ng-container>\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType !== 'date' || item.filterType !== 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultFilterValue\"></dx-text-box>\n </div>\n </ng-container>\n\n <div class=\"px-2 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilters(i)\"><i 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 my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addFilter()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createFilterItems()\">\n Submit Filter\n </button>\n </div>\n\n </div>\n </div>\n\n\n\n</div>" }]
|
|
2209
|
+
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.Router }]; }, propDecorators: { dataGrid: [{
|
|
2210
|
+
type: ViewChild,
|
|
2211
|
+
args: ['gridContainer', { static: false }]
|
|
2212
|
+
}] } });
|
|
2195
2213
|
|
|
2196
2214
|
class kpicommonService$2 {
|
|
2197
2215
|
getAllSeviceApiJson(apiJsonObject) {
|
|
@@ -2539,7 +2557,12 @@ class ApplicationDatasetComponent {
|
|
|
2539
2557
|
value: mapping.defaultValue
|
|
2540
2558
|
};
|
|
2541
2559
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2542
|
-
|
|
2560
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
2561
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
2562
|
+
}
|
|
2563
|
+
else {
|
|
2564
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2565
|
+
}
|
|
2543
2566
|
}
|
|
2544
2567
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
2545
2568
|
if (filter) {
|
|
@@ -2553,7 +2576,12 @@ class ApplicationDatasetComponent {
|
|
|
2553
2576
|
resultObj.value = value;
|
|
2554
2577
|
}
|
|
2555
2578
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2556
|
-
|
|
2579
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
2580
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
2581
|
+
}
|
|
2582
|
+
else {
|
|
2583
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2584
|
+
}
|
|
2557
2585
|
}
|
|
2558
2586
|
}
|
|
2559
2587
|
}
|
|
@@ -2653,7 +2681,12 @@ class ApplicationDatasetComponent {
|
|
|
2653
2681
|
value: mapping.defaultValue
|
|
2654
2682
|
};
|
|
2655
2683
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2656
|
-
|
|
2684
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
2685
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
2686
|
+
}
|
|
2687
|
+
else {
|
|
2688
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2689
|
+
}
|
|
2657
2690
|
}
|
|
2658
2691
|
result.push(resultObj);
|
|
2659
2692
|
});
|
|
@@ -2966,7 +2999,7 @@ class DatasetQueryBulderComponent {
|
|
|
2966
2999
|
}
|
|
2967
3000
|
if (value.queryConfig.mapedFilters == undefined) {
|
|
2968
3001
|
value.queryConfig.mapedFilters = [];
|
|
2969
|
-
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" });
|
|
3002
|
+
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" });
|
|
2970
3003
|
}
|
|
2971
3004
|
if (value.queryConfig.sorters == undefined) {
|
|
2972
3005
|
value.queryConfig.sorters = [];
|
|
@@ -3185,7 +3218,7 @@ class DatasetQueryBulderComponent {
|
|
|
3185
3218
|
this.toastr.success('Pagination Request Params Saved Successfully');
|
|
3186
3219
|
}
|
|
3187
3220
|
addFilterMapingColumns() {
|
|
3188
|
-
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" };
|
|
3221
|
+
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" };
|
|
3189
3222
|
this.queryBulderDataset.queryConfig.mapedFilters.push(obj);
|
|
3190
3223
|
}
|
|
3191
3224
|
deleteFilterMapingColumns(i) {
|
|
@@ -3248,6 +3281,7 @@ class DatasetQueryBulderComponent {
|
|
|
3248
3281
|
let resultObj = {
|
|
3249
3282
|
columnName: mapping.serverColumn,
|
|
3250
3283
|
dataType: mapping.dataType,
|
|
3284
|
+
formatter: mapping.formatter,
|
|
3251
3285
|
operator: mapping.operatorName,
|
|
3252
3286
|
value: mapping.defaultValue
|
|
3253
3287
|
};
|
|
@@ -3298,10 +3332,10 @@ class DatasetQueryBulderComponent {
|
|
|
3298
3332
|
}
|
|
3299
3333
|
}
|
|
3300
3334
|
DatasetQueryBulderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatasetQueryBulderComponent, deps: [{ token: CommonService }, { token: i2$1.ToastrService }, { token: ApplicationContentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3301
|
-
DatasetQueryBulderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DatasetQueryBulderComponent, selector: "app-dataset-query-bulder", inputs: { bulderDataset: "bulderDataset" }, outputs: { getQueryBulbderDataSet: "getQueryBulbderDataSet" }, ngImport: i0, template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"queryBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Query Type</div>\n <dx-select-box [dataSource]=\"['Aggregate','Basic']\" (onValueChanged)=\"getQueryForDetailsData($event)\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3 mt-6\" *ngIf=\"selectedDataSource == 'mongo'\">\n <dx-check-box [(ngModel)]=\"isReconColume\" text='Recon Column'>\n </dx-check-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Request Params\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\" *ngFor=\"let item of reqFieldsDataSource; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.name\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Value </div>\n <ng-container *ngIf=\"item.name == 'dbConfig'\">\n <dx-select-box [items]=\"['mongo','impala','postgres','mysql','bigquery']\"\n (onValueChanged)=\"getDataConfig($event)\" [(ngModel)]=\"item.value\"></dx-select-box>\n </ng-container>\n <ng-container *ngIf=\"item.name !== 'dbConfig'\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </ng-container>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteParams(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Request Params Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveParams()\">Save\n Params</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addParams()\">Add\n Params</button>\n\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"isQueryTypeSelect\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Columns and Measures\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.columns; let i = index;\">\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Measures</div>\n <dx-check-box [value]=\"item.measures\" [(ngModel)]=\"item.measures\"></dx-check-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Function Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_function\"\n [(ngModel)]=\"item.functionName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\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-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== queryBulderDataset.queryConfig.columns.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteColumns(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-end my-2\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Columns And Measures Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveColumnsAndMasures()\">Save\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n <ng-container *ngIf=\"isReconColume\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Recon Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\" *ngFor=\"let item of reconColumeDatasource; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> First Key</div>\n <dx-text-box [(ngModel)]=\"item.columeOne\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Second Key</div>\n <dx-text-box [(ngModel)]=\"item.columeTwo\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Recon Type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"['variance','percentage','absolute']\"\n [(ngModel)]=\"item.reconType\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Caption</div>\n <dx-text-box [(ngModel)]=\"item.caption\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteReconColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveReconsColume()\">Save To\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addReconColume()\">Add\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <ng-container>\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Having Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.havings; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Data Type</div>\n <dx-text-box [(ngModel)]=\"item.dataType\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [items]=\"['get','lte']\" [(ngModel)]=\"item.operator\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value</div>\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteHavingsColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addHavingsColume()\">Add\n Havings\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Sort By\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.sorters; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mt-8\">\n\n <dx-check-box text=\"Descending\" [(ngModel)]=\"item.descending\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteShortColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addShortColumns()\">Add\n Column</button>\n\n </div>\n </div>\n </div>\n\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex flex-row justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== queryBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\" *ngIf=\"selectedDataSource !== 'mongo'\">\n <div class=\"flex flex-row justify-start my-2\">\n <button class=\"{{commonService.btnOthersPurple}} cursor-pointer\" (click)=\"checkForQuery()\">Check\n Query</button>\n </div>\n </div>\n <div class=\"w-full\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n </ng-container>\n\n\n</div>\n\n\n<ng-container *ngIf=\"isModelVisible\">\n <div class=\"fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50\">\n <div class=\"relative p-4 w-full max-w-3xl max-h-full\">\n <div class=\"relative bg-white rounded-lg shadow \">\n <div class=\"flex items-center justify-between p-4 md:p-5 border-b rounded-t \">\n <h3 class=\"text-xl font-semibold text-gray-900 \">\n Query </h3>\n <button type=\"button\" (click)=\"closeModalVisibleModal()\"\n class=\"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center \"\n data-modal-hide=\"static-modal\">\n <svg class=\"w-3 h-3\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\"\n viewBox=\"0 0 14 14\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"\n d=\"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6\" />\n </svg>\n <span class=\"sr-only\">Close</span>\n </button>\n </div>\n <!-- Modal body -->\n <div class=\"w-69 p-5\">\n <div class=\"flex flex-row bg-gray-800 text-white text-lg p-4 rounded-md text-wrap\">\n <code>\n {{query_data}}\n </code>\n </div>\n </div>\n <div class=\"flex items-center border-t border-gray-200 rounded-b p-2 justify-end\">\n <span class=\"text-gray-700 px-2\" *ngIf=\"isSqlCopiedText\">Copied</span>\n <button data-modal-hide=\"static-modal\" type=\"button\" class=\"{{commonService.btn_success_sm}} py-2\"\n (click)=\"copySqlFromModal()\">Copy</button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>", 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: 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$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"] }] });
|
|
3335
|
+
DatasetQueryBulderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DatasetQueryBulderComponent, selector: "app-dataset-query-bulder", inputs: { bulderDataset: "bulderDataset" }, outputs: { getQueryBulbderDataSet: "getQueryBulbderDataSet" }, ngImport: i0, template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"queryBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Query Type</div>\n <dx-select-box [dataSource]=\"['Aggregate','Basic']\" (onValueChanged)=\"getQueryForDetailsData($event)\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3 mt-6\" *ngIf=\"selectedDataSource == 'mongo'\">\n <dx-check-box [(ngModel)]=\"isReconColume\" text='Recon Column'>\n </dx-check-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Request Params\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\" *ngFor=\"let item of reqFieldsDataSource; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.name\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Value </div>\n <ng-container *ngIf=\"item.name == 'dbConfig'\">\n <dx-select-box [items]=\"['mongo','impala','postgres','mysql','bigquery']\"\n (onValueChanged)=\"getDataConfig($event)\" [(ngModel)]=\"item.value\"></dx-select-box>\n </ng-container>\n <ng-container *ngIf=\"item.name !== 'dbConfig'\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </ng-container>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteParams(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Request Params Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveParams()\">Save\n Params</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addParams()\">Add\n Params</button>\n\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"isQueryTypeSelect\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Columns and Measures\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.columns; let i = index;\">\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Measures</div>\n <dx-check-box [value]=\"item.measures\" [(ngModel)]=\"item.measures\"></dx-check-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Function Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_function\"\n [(ngModel)]=\"item.functionName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\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-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== queryBulderDataset.queryConfig.columns.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteColumns(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-end my-2\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Columns And Measures Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveColumnsAndMasures()\">Save\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n <ng-container *ngIf=\"isReconColume\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Recon Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\" *ngFor=\"let item of reconColumeDatasource; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> First Key</div>\n <dx-text-box [(ngModel)]=\"item.columeOne\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Second Key</div>\n <dx-text-box [(ngModel)]=\"item.columeTwo\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Recon Type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"['variance','percentage','absolute']\"\n [(ngModel)]=\"item.reconType\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Caption</div>\n <dx-text-box [(ngModel)]=\"item.caption\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteReconColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveReconsColume()\">Save To\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addReconColume()\">Add\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <ng-container>\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Having Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.havings; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Data Type</div>\n <dx-text-box [(ngModel)]=\"item.dataType\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [items]=\"['get','lte']\" [(ngModel)]=\"item.operator\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value</div>\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteHavingsColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addHavingsColume()\">Add\n Havings\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Sort By\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.sorters; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mt-8\">\n\n <dx-check-box text=\"Descending\" [(ngModel)]=\"item.descending\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteShortColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addShortColumns()\">Add\n Column</button>\n\n </div>\n </div>\n </div>\n\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex flex-row justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Formatter</div>\n <dx-text-box [(ngModel)]=\"item.formatter\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== queryBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\" *ngIf=\"selectedDataSource !== 'mongo'\">\n <div class=\"flex flex-row justify-start my-2\">\n <button class=\"{{commonService.btnOthersPurple}} cursor-pointer\" (click)=\"checkForQuery()\">Check\n Query</button>\n </div>\n </div>\n <div class=\"w-full\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n </ng-container>\n\n\n</div>\n\n\n<ng-container *ngIf=\"isModelVisible\">\n <div class=\"fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50\">\n <div class=\"relative p-4 w-full max-w-3xl max-h-full\">\n <div class=\"relative bg-white rounded-lg shadow \">\n <div class=\"flex items-center justify-between p-4 md:p-5 border-b rounded-t \">\n <h3 class=\"text-xl font-semibold text-gray-900 \">\n Query </h3>\n <button type=\"button\" (click)=\"closeModalVisibleModal()\"\n class=\"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center \"\n data-modal-hide=\"static-modal\">\n <svg class=\"w-3 h-3\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\"\n viewBox=\"0 0 14 14\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"\n d=\"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6\" />\n </svg>\n <span class=\"sr-only\">Close</span>\n </button>\n </div>\n <!-- Modal body -->\n <div class=\"w-69 p-5\">\n <div class=\"flex flex-row bg-gray-800 text-white text-lg p-4 rounded-md text-wrap\">\n <code>\n {{query_data}}\n </code>\n </div>\n </div>\n <div class=\"flex items-center border-t border-gray-200 rounded-b p-2 justify-end\">\n <span class=\"text-gray-700 px-2\" *ngIf=\"isSqlCopiedText\">Copied</span>\n <button data-modal-hide=\"static-modal\" type=\"button\" class=\"{{commonService.btn_success_sm}} py-2\"\n (click)=\"copySqlFromModal()\">Copy</button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>", 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: 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$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"] }] });
|
|
3302
3336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatasetQueryBulderComponent, decorators: [{
|
|
3303
3337
|
type: Component,
|
|
3304
|
-
args: [{ selector: 'app-dataset-query-bulder', template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"queryBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Query Type</div>\n <dx-select-box [dataSource]=\"['Aggregate','Basic']\" (onValueChanged)=\"getQueryForDetailsData($event)\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3 mt-6\" *ngIf=\"selectedDataSource == 'mongo'\">\n <dx-check-box [(ngModel)]=\"isReconColume\" text='Recon Column'>\n </dx-check-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Request Params\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\" *ngFor=\"let item of reqFieldsDataSource; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.name\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Value </div>\n <ng-container *ngIf=\"item.name == 'dbConfig'\">\n <dx-select-box [items]=\"['mongo','impala','postgres','mysql','bigquery']\"\n (onValueChanged)=\"getDataConfig($event)\" [(ngModel)]=\"item.value\"></dx-select-box>\n </ng-container>\n <ng-container *ngIf=\"item.name !== 'dbConfig'\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </ng-container>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteParams(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Request Params Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveParams()\">Save\n Params</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addParams()\">Add\n Params</button>\n\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"isQueryTypeSelect\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Columns and Measures\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.columns; let i = index;\">\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Measures</div>\n <dx-check-box [value]=\"item.measures\" [(ngModel)]=\"item.measures\"></dx-check-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Function Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_function\"\n [(ngModel)]=\"item.functionName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\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-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== queryBulderDataset.queryConfig.columns.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteColumns(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-end my-2\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Columns And Measures Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveColumnsAndMasures()\">Save\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n <ng-container *ngIf=\"isReconColume\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Recon Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\" *ngFor=\"let item of reconColumeDatasource; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> First Key</div>\n <dx-text-box [(ngModel)]=\"item.columeOne\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Second Key</div>\n <dx-text-box [(ngModel)]=\"item.columeTwo\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Recon Type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"['variance','percentage','absolute']\"\n [(ngModel)]=\"item.reconType\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Caption</div>\n <dx-text-box [(ngModel)]=\"item.caption\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteReconColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveReconsColume()\">Save To\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addReconColume()\">Add\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <ng-container>\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Having Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.havings; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Data Type</div>\n <dx-text-box [(ngModel)]=\"item.dataType\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [items]=\"['get','lte']\" [(ngModel)]=\"item.operator\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value</div>\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteHavingsColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addHavingsColume()\">Add\n Havings\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Sort By\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.sorters; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mt-8\">\n\n <dx-check-box text=\"Descending\" [(ngModel)]=\"item.descending\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteShortColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addShortColumns()\">Add\n Column</button>\n\n </div>\n </div>\n </div>\n\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex flex-row justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== queryBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\" *ngIf=\"selectedDataSource !== 'mongo'\">\n <div class=\"flex flex-row justify-start my-2\">\n <button class=\"{{commonService.btnOthersPurple}} cursor-pointer\" (click)=\"checkForQuery()\">Check\n Query</button>\n </div>\n </div>\n <div class=\"w-full\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n </ng-container>\n\n\n</div>\n\n\n<ng-container *ngIf=\"isModelVisible\">\n <div class=\"fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50\">\n <div class=\"relative p-4 w-full max-w-3xl max-h-full\">\n <div class=\"relative bg-white rounded-lg shadow \">\n <div class=\"flex items-center justify-between p-4 md:p-5 border-b rounded-t \">\n <h3 class=\"text-xl font-semibold text-gray-900 \">\n Query </h3>\n <button type=\"button\" (click)=\"closeModalVisibleModal()\"\n class=\"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center \"\n data-modal-hide=\"static-modal\">\n <svg class=\"w-3 h-3\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\"\n viewBox=\"0 0 14 14\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"\n d=\"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6\" />\n </svg>\n <span class=\"sr-only\">Close</span>\n </button>\n </div>\n <!-- Modal body -->\n <div class=\"w-69 p-5\">\n <div class=\"flex flex-row bg-gray-800 text-white text-lg p-4 rounded-md text-wrap\">\n <code>\n {{query_data}}\n </code>\n </div>\n </div>\n <div class=\"flex items-center border-t border-gray-200 rounded-b p-2 justify-end\">\n <span class=\"text-gray-700 px-2\" *ngIf=\"isSqlCopiedText\">Copied</span>\n <button data-modal-hide=\"static-modal\" type=\"button\" class=\"{{commonService.btn_success_sm}} py-2\"\n (click)=\"copySqlFromModal()\">Copy</button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>" }]
|
|
3338
|
+
args: [{ selector: 'app-dataset-query-bulder', template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"queryBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Query Type</div>\n <dx-select-box [dataSource]=\"['Aggregate','Basic']\" (onValueChanged)=\"getQueryForDetailsData($event)\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3 mt-6\" *ngIf=\"selectedDataSource == 'mongo'\">\n <dx-check-box [(ngModel)]=\"isReconColume\" text='Recon Column'>\n </dx-check-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Request Params\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\" *ngFor=\"let item of reqFieldsDataSource; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.name\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Value </div>\n <ng-container *ngIf=\"item.name == 'dbConfig'\">\n <dx-select-box [items]=\"['mongo','impala','postgres','mysql','bigquery']\"\n (onValueChanged)=\"getDataConfig($event)\" [(ngModel)]=\"item.value\"></dx-select-box>\n </ng-container>\n <ng-container *ngIf=\"item.name !== 'dbConfig'\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </ng-container>\n\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteParams(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Request Params Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveParams()\">Save\n Params</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addParams()\">Add\n Params</button>\n\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"isQueryTypeSelect\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Columns and Measures\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.columns; let i = index;\">\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Measures</div>\n <dx-check-box [value]=\"item.measures\" [(ngModel)]=\"item.measures\"></dx-check-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Function Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_function\"\n [(ngModel)]=\"item.functionName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\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-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== queryBulderDataset.queryConfig.columns.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\" (click)=\"deleteColumns(i)\"><i\n class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n\n <div class=\"flex flex-row justify-end my-2\">\n <p class=\"text-sm italic text-gray-300 mr-6\">** Please Save Columns And Measures Before Submit\n Dataset\n </p>\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveColumnsAndMasures()\">Save\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n <ng-container *ngIf=\"isReconColume\">\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Recon Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\" *ngFor=\"let item of reconColumeDatasource; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.dataField\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> First Key</div>\n <dx-text-box [(ngModel)]=\"item.columeOne\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Second Key</div>\n <dx-text-box [(ngModel)]=\"item.columeTwo\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Recon Type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"['variance','percentage','absolute']\"\n [(ngModel)]=\"item.reconType\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Caption</div>\n <dx-text-box [(ngModel)]=\"item.caption\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteReconColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\"\n (click)=\"saveReconsColume()\">Save To\n Columns</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addReconColume()\">Add\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <ng-container>\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Add Having Column\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.havings; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Column Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Advanced Column</div>\n <dx-text-box [(ngModel)]=\"item.advancedColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Data Type</div>\n <dx-text-box [(ngModel)]=\"item.dataType\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [items]=\"['get','lte']\" [(ngModel)]=\"item.operator\"></dx-select-box>\n </div>\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value</div>\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteHavingsColume(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addHavingsColume()\">Add\n Havings\n </button>\n </div>\n </div>\n </div>\n\n </ng-container>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-3\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Sort By\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"grid grid-cols-2 gap-4 w-full p-2\">\n <div class=\"my-2 flex flex-row px-2 border-r\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.sorters; let i = index;\">\n <div class=\"px-2 mb-2\">\n <div class=\"text-md mb-2\"> Params Name</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mt-8\">\n\n <dx-check-box text=\"Descending\" [(ngModel)]=\"item.descending\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2\">\n <div class=\"text-center mt-8\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteShortColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row my-2 justify-end\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\" (click)=\"addShortColumns()\">Add\n Column</button>\n\n </div>\n </div>\n </div>\n\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex flex-row justify-between\"\n *ngFor=\"let item of queryBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Formatter</div>\n <dx-text-box [(ngModel)]=\"item.formatter\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== queryBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\" *ngIf=\"selectedDataSource !== 'mongo'\">\n <div class=\"flex flex-row justify-start my-2\">\n <button class=\"{{commonService.btnOthersPurple}} cursor-pointer\" (click)=\"checkForQuery()\">Check\n Query</button>\n </div>\n </div>\n <div class=\"w-full\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n </ng-container>\n\n\n</div>\n\n\n<ng-container *ngIf=\"isModelVisible\">\n <div class=\"fixed inset-0 flex items-center justify-center z-50 bg-black bg-opacity-50\">\n <div class=\"relative p-4 w-full max-w-3xl max-h-full\">\n <div class=\"relative bg-white rounded-lg shadow \">\n <div class=\"flex items-center justify-between p-4 md:p-5 border-b rounded-t \">\n <h3 class=\"text-xl font-semibold text-gray-900 \">\n Query </h3>\n <button type=\"button\" (click)=\"closeModalVisibleModal()\"\n class=\"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center \"\n data-modal-hide=\"static-modal\">\n <svg class=\"w-3 h-3\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\"\n viewBox=\"0 0 14 14\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"\n d=\"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6\" />\n </svg>\n <span class=\"sr-only\">Close</span>\n </button>\n </div>\n <!-- Modal body -->\n <div class=\"w-69 p-5\">\n <div class=\"flex flex-row bg-gray-800 text-white text-lg p-4 rounded-md text-wrap\">\n <code>\n {{query_data}}\n </code>\n </div>\n </div>\n <div class=\"flex items-center border-t border-gray-200 rounded-b p-2 justify-end\">\n <span class=\"text-gray-700 px-2\" *ngIf=\"isSqlCopiedText\">Copied</span>\n <button data-modal-hide=\"static-modal\" type=\"button\" class=\"{{commonService.btn_success_sm}} py-2\"\n (click)=\"copySqlFromModal()\">Copy</button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>" }]
|
|
3305
3339
|
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2$1.ToastrService }, { type: ApplicationContentService }]; }, propDecorators: { getQueryBulbderDataSet: [{
|
|
3306
3340
|
type: Output
|
|
3307
3341
|
}], bulderDataset: [{
|
|
@@ -3320,14 +3354,14 @@ class DatasetRestApiComponent {
|
|
|
3320
3354
|
set restApiDataset(value) {
|
|
3321
3355
|
if (value.queryConfig.mapedFilters == undefined) {
|
|
3322
3356
|
value.queryConfig.mapedFilters = [];
|
|
3323
|
-
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" });
|
|
3357
|
+
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" });
|
|
3324
3358
|
}
|
|
3325
3359
|
this.apiBulderDataset = value;
|
|
3326
3360
|
}
|
|
3327
3361
|
ngOnInit() {
|
|
3328
3362
|
}
|
|
3329
3363
|
addFilterMapingColumns() {
|
|
3330
|
-
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" };
|
|
3364
|
+
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" };
|
|
3331
3365
|
this.apiBulderDataset.queryConfig.mapedFilters.push(obj);
|
|
3332
3366
|
}
|
|
3333
3367
|
deleteFilterMapingColumns(i) {
|
|
@@ -3351,10 +3385,10 @@ class DatasetRestApiComponent {
|
|
|
3351
3385
|
}
|
|
3352
3386
|
}
|
|
3353
3387
|
DatasetRestApiComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatasetRestApiComponent, deps: [{ token: i2$1.ToastrService }, { token: CommonService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3354
|
-
DatasetRestApiComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DatasetRestApiComponent, selector: "app-dataset-rest-api", inputs: { restApiDataset: "restApiDataset" }, outputs: { getRestApiBulbderDataSet: "getRestApiBulbderDataSet" }, ngImport: i0, template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>", 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: 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"] }] });
|
|
3388
|
+
DatasetRestApiComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DatasetRestApiComponent, selector: "app-dataset-rest-api", inputs: { restApiDataset: "restApiDataset" }, outputs: { getRestApiBulbderDataSet: "getRestApiBulbderDataSet" }, ngImport: i0, template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Formatter</div>\n <dx-text-box [(ngModel)]=\"item.formatter\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>", 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: 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"] }] });
|
|
3355
3389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatasetRestApiComponent, decorators: [{
|
|
3356
3390
|
type: Component,
|
|
3357
|
-
args: [{ selector: 'app-dataset-rest-api', template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>" }]
|
|
3391
|
+
args: [{ selector: 'app-dataset-rest-api', template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Formatter</div>\n <dx-text-box [(ngModel)]=\"item.formatter\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>" }]
|
|
3358
3392
|
}], ctorParameters: function () { return [{ type: i2$1.ToastrService }, { type: CommonService }]; }, propDecorators: { getRestApiBulbderDataSet: [{
|
|
3359
3393
|
type: Output
|
|
3360
3394
|
}], restApiDataset: [{
|
|
@@ -3595,13 +3629,7 @@ class GoogleGeoMapComponent {
|
|
|
3595
3629
|
width: 32,
|
|
3596
3630
|
height: 32,
|
|
3597
3631
|
},
|
|
3598
|
-
} :
|
|
3599
|
-
path: google.maps.SymbolPath.CIRCLE,
|
|
3600
|
-
scale: 5,
|
|
3601
|
-
fillColor: 'blue',
|
|
3602
|
-
fillOpacity: 0.6,
|
|
3603
|
-
strokeWeight: 0,
|
|
3604
|
-
},
|
|
3632
|
+
} : "",
|
|
3605
3633
|
map: this.map,
|
|
3606
3634
|
title: `${location.city}: $${location.total_sales_amount}`,
|
|
3607
3635
|
});
|
|
@@ -4420,6 +4448,14 @@ class DashTableComponent {
|
|
|
4420
4448
|
this.taostr = taostr;
|
|
4421
4449
|
this.dataSourseForTable = [];
|
|
4422
4450
|
this.allConfiguredViews = [];
|
|
4451
|
+
this.viewProperties = {
|
|
4452
|
+
enableClickEvent: false,
|
|
4453
|
+
enableRightClickEvent: true,
|
|
4454
|
+
clickEventOptions: {
|
|
4455
|
+
associatedViews: [],
|
|
4456
|
+
eventType: ""
|
|
4457
|
+
}
|
|
4458
|
+
};
|
|
4423
4459
|
this.optionalDrilDownDataSource = [];
|
|
4424
4460
|
this.table_columns_config = {
|
|
4425
4461
|
"kpiConfig": {
|
|
@@ -4473,10 +4509,6 @@ class DashTableComponent {
|
|
|
4473
4509
|
this.tableDataConfig.columns = value.selectedWidgetConfig.dataConfig.columns;
|
|
4474
4510
|
if (value.selectedWidgetConfig.viewProperties) {
|
|
4475
4511
|
this.viewProperties = value.selectedWidgetConfig.viewProperties;
|
|
4476
|
-
this.viewProperties = {
|
|
4477
|
-
"enableClickEvent": value.selectedWidgetConfig.viewProperties.enableClickEvent,
|
|
4478
|
-
"enableRightClickEvent": value.selectedWidgetConfig.viewProperties.enableRightClickEvent
|
|
4479
|
-
};
|
|
4480
4512
|
if (value.selectedWidgetConfig.viewProperties.enableClickEvent) {
|
|
4481
4513
|
if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == 'optionalDrillDown') {
|
|
4482
4514
|
this.optionalDrilDownDataSource = value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews;
|
|
@@ -4491,22 +4523,6 @@ class DashTableComponent {
|
|
|
4491
4523
|
"associatedViews": value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews
|
|
4492
4524
|
};
|
|
4493
4525
|
}
|
|
4494
|
-
else if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == '') {
|
|
4495
|
-
this.viewProperties['clickEventOptions'] = {
|
|
4496
|
-
"eventType": "",
|
|
4497
|
-
"associatedViews": []
|
|
4498
|
-
};
|
|
4499
|
-
}
|
|
4500
|
-
else {
|
|
4501
|
-
this.viewProperties = {
|
|
4502
|
-
enableClickEvent: false,
|
|
4503
|
-
enableRightClickEvent: true,
|
|
4504
|
-
clickEventOptions: {
|
|
4505
|
-
associatedViews: [],
|
|
4506
|
-
eventType: ""
|
|
4507
|
-
}
|
|
4508
|
-
};
|
|
4509
|
-
}
|
|
4510
4526
|
}
|
|
4511
4527
|
else {
|
|
4512
4528
|
this.viewProperties['clickEventOptions'] = {};
|
|
@@ -5642,7 +5658,6 @@ class CreateCompViewComponent {
|
|
|
5642
5658
|
this.activatedRoute = activatedRoute;
|
|
5643
5659
|
this.environment = environment;
|
|
5644
5660
|
this.selectedDataSet = {};
|
|
5645
|
-
this.isFilterInputs = false;
|
|
5646
5661
|
this.selectedDataSetOnedit = {};
|
|
5647
5662
|
this.creatCompViewObject = {};
|
|
5648
5663
|
this.componentNamesOthers = [
|
|
@@ -5831,7 +5846,12 @@ class CreateCompViewComponent {
|
|
|
5831
5846
|
};
|
|
5832
5847
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
5833
5848
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
5834
|
-
|
|
5849
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
5850
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
5851
|
+
}
|
|
5852
|
+
else {
|
|
5853
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
5854
|
+
}
|
|
5835
5855
|
}
|
|
5836
5856
|
if (filter) {
|
|
5837
5857
|
if (mapping.defaultValue === "") {
|
|
@@ -5844,7 +5864,12 @@ class CreateCompViewComponent {
|
|
|
5844
5864
|
resultObj.value = value;
|
|
5845
5865
|
}
|
|
5846
5866
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
5847
|
-
|
|
5867
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
5868
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
5869
|
+
}
|
|
5870
|
+
else {
|
|
5871
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
5872
|
+
}
|
|
5848
5873
|
}
|
|
5849
5874
|
}
|
|
5850
5875
|
}
|
|
@@ -5872,7 +5897,12 @@ class CreateCompViewComponent {
|
|
|
5872
5897
|
dataset.config.queryConfig.mapedFilters.forEach((filter) => {
|
|
5873
5898
|
let datecolumn = filter.serverColumn.toLowerCase();
|
|
5874
5899
|
if (datecolumn.includes('date') && typeof filter.dataType === 'string') {
|
|
5875
|
-
|
|
5900
|
+
if (filter.formatter && filter.formatter !== "") {
|
|
5901
|
+
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(filter.formatter);
|
|
5902
|
+
}
|
|
5903
|
+
else {
|
|
5904
|
+
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
5905
|
+
}
|
|
5876
5906
|
}
|
|
5877
5907
|
else {
|
|
5878
5908
|
serviceJson[filter.serverColumn] = filter.defaultValue;
|
|
@@ -6155,7 +6185,12 @@ class CreateCompViewComponent {
|
|
|
6155
6185
|
value: mapping.defaultValue
|
|
6156
6186
|
};
|
|
6157
6187
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
6158
|
-
|
|
6188
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
6189
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
6190
|
+
}
|
|
6191
|
+
else {
|
|
6192
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
6193
|
+
}
|
|
6159
6194
|
}
|
|
6160
6195
|
result.push(resultObj);
|
|
6161
6196
|
});
|
|
@@ -9351,7 +9386,12 @@ class ApplicationDatssetsCall {
|
|
|
9351
9386
|
value: mapping.defaultValue
|
|
9352
9387
|
};
|
|
9353
9388
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
9354
|
-
|
|
9389
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
9390
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
9391
|
+
}
|
|
9392
|
+
else {
|
|
9393
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
9394
|
+
}
|
|
9355
9395
|
}
|
|
9356
9396
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
9357
9397
|
if (filter) {
|
|
@@ -9365,7 +9405,12 @@ class ApplicationDatssetsCall {
|
|
|
9365
9405
|
resultObj.value = value;
|
|
9366
9406
|
}
|
|
9367
9407
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
9368
|
-
|
|
9408
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
9409
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
9410
|
+
}
|
|
9411
|
+
else {
|
|
9412
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
9413
|
+
}
|
|
9369
9414
|
}
|
|
9370
9415
|
}
|
|
9371
9416
|
}
|
|
@@ -9507,7 +9552,12 @@ class ApplicationDatssetsCall {
|
|
|
9507
9552
|
aliasColumnName: mapping.localColumn,
|
|
9508
9553
|
};
|
|
9509
9554
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
9510
|
-
|
|
9555
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
9556
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
9557
|
+
}
|
|
9558
|
+
else {
|
|
9559
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
9560
|
+
}
|
|
9511
9561
|
}
|
|
9512
9562
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
9513
9563
|
if (filter) {
|
|
@@ -9623,11 +9673,21 @@ class CreateDatasetSqlComponent {
|
|
|
9623
9673
|
set sqlBulderDataset(value) {
|
|
9624
9674
|
if (value.queryConfig.mapedFilters == undefined) {
|
|
9625
9675
|
value.queryConfig.mapedFilters = [];
|
|
9626
|
-
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" });
|
|
9676
|
+
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" });
|
|
9627
9677
|
}
|
|
9628
9678
|
if (value.queryConfig.templateQuery != "") {
|
|
9629
9679
|
this.queryStringData = value.queryConfig.templateQuery;
|
|
9630
9680
|
}
|
|
9681
|
+
const hasLimit = value.queryConfig.mapedFilters.some(filter => filter.serverColumn === 'limit');
|
|
9682
|
+
if (!hasLimit) {
|
|
9683
|
+
value.queryConfig.mapedFilters.push({
|
|
9684
|
+
localColumn: "limit",
|
|
9685
|
+
serverColumn: "limit",
|
|
9686
|
+
operatorName: "eq",
|
|
9687
|
+
defaultValue: "5000",
|
|
9688
|
+
dataType: "string"
|
|
9689
|
+
});
|
|
9690
|
+
}
|
|
9631
9691
|
this.apiBulderDataset = value;
|
|
9632
9692
|
}
|
|
9633
9693
|
ngOnInit() {
|
|
@@ -9636,7 +9696,7 @@ class CreateDatasetSqlComponent {
|
|
|
9636
9696
|
});
|
|
9637
9697
|
}
|
|
9638
9698
|
addFilterMapingColumns() {
|
|
9639
|
-
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" };
|
|
9699
|
+
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" };
|
|
9640
9700
|
this.apiBulderDataset.queryConfig.mapedFilters.push(obj);
|
|
9641
9701
|
}
|
|
9642
9702
|
deleteFilterMapingColumns(i) {
|
|
@@ -9668,36 +9728,36 @@ class CreateDatasetSqlComponent {
|
|
|
9668
9728
|
}
|
|
9669
9729
|
else {
|
|
9670
9730
|
fval = this.sqlFormatter.transform(val);
|
|
9671
|
-
splittedValuesOfQuery =
|
|
9672
|
-
return item.trim().replace(/(^,)|(,)|(;)/g, '');
|
|
9673
|
-
});
|
|
9731
|
+
splittedValuesOfQuery = fval.match(/'[^']*'|\S+/g) || [];
|
|
9674
9732
|
this.queryStringData = fval;
|
|
9675
9733
|
const re = /{([^}]+)}/g;
|
|
9676
9734
|
let m = [];
|
|
9677
9735
|
while (m = re.exec(fval)) {
|
|
9678
9736
|
this.duplicateMatches.push(m[1]);
|
|
9679
9737
|
}
|
|
9738
|
+
let limit_key = [];
|
|
9739
|
+
limit_key = splittedValuesOfQuery.filter(s => s.toLowerCase().includes('limit'));
|
|
9680
9740
|
this.matches = this.duplicateMatches.filter((v, i) => this.duplicateMatches.indexOf(v) === i);
|
|
9681
9741
|
for (let i = 0; i < this.matches.length; i++) {
|
|
9682
9742
|
let value;
|
|
9683
9743
|
let key;
|
|
9684
9744
|
let th_key;
|
|
9685
9745
|
let keyarr = [];
|
|
9686
|
-
let th_keyArr = [];
|
|
9687
9746
|
value = this.matches[i];
|
|
9688
9747
|
keyarr = splittedValuesOfQuery.filter(s => s.includes('$P{' + this.matches[i] + '}'));
|
|
9689
|
-
th_keyArr = splittedValuesOfQuery.filter(s => s.includes('$T{' + this.matches[i] + '}'));
|
|
9690
9748
|
if (keyarr.length !== 0) {
|
|
9691
9749
|
if (keyarr[0].split('=')[0].indexOf('.') > 0) {
|
|
9692
9750
|
key = keyarr[0].split('=')[0].split('.')[1];
|
|
9693
9751
|
}
|
|
9694
9752
|
else {
|
|
9695
9753
|
key = keyarr[0].split('=')[0];
|
|
9696
|
-
let labelName = key.replace(/^./, key[0].toUpperCase());
|
|
9697
9754
|
}
|
|
9698
9755
|
}
|
|
9699
9756
|
this.argumentData.push(key);
|
|
9700
9757
|
}
|
|
9758
|
+
if (limit_key && limit_key.length !== 0) {
|
|
9759
|
+
this.argumentData.push(limit_key[0].toLowerCase());
|
|
9760
|
+
}
|
|
9701
9761
|
this.isValidate = false;
|
|
9702
9762
|
this.isNotValidate = true;
|
|
9703
9763
|
}
|
|
@@ -9756,10 +9816,10 @@ class CreateDatasetSqlComponent {
|
|
|
9756
9816
|
}
|
|
9757
9817
|
}
|
|
9758
9818
|
CreateDatasetSqlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreateDatasetSqlComponent, deps: [{ token: i2$1.ToastrService }, { token: CommonService }, { token: SqlPipe }, { token: ApplicationContentService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9759
|
-
CreateDatasetSqlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CreateDatasetSqlComponent, selector: "app-create-dataset-sql", inputs: { sqlBulderDataset: "sqlBulderDataset" }, outputs: { getSqlQueryBulbderDataSet: "getSqlQueryBulbderDataSet" }, providers: [SqlPipe], ngImport: i0, template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Database Name</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.queryConfig.databaseName\">\n </dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">DB Config</div>\n <dx-select-box [items]=\"['impala','postgres','mysql','bigquery']\"\n [(ngModel)]=\"apiBulderDataset.queryConfig.dbConfig\"></dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n\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 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Configure SQL Expression\n </h6>\n <div class=\"p-5 font-light border border-b-0 border-gray-200 dark:border-gray-700 dark:bg-gray-900\">\n <div class=\"mt-5 p-2\">\n <textarea id=\"message\" rows=\"20\"\n class=\"block p-2.5 w-full text-lg text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500\"\n placeholder=\"Write your SQL query here...\" [(ngModel)]=\"queryStringData\"\n id=\"exampleTextarea\">{{ sqlString | sql }}</textarea>\n\n\n <div class=\"row no-margin\" *ngIf=\"validateArgumentError\">\n <p class=\"text-red-400\">This query is not valid</p>\n </div>\n\n <div class=\"flex\">\n <button *ngIf=\"formatButtonStatus\" type=\"button\"\n class=\"focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4\n focus:ring-purple-300 font-medium dark:bg-purple-600 my-2 px-5 py-2.5 dark:hover:bg-purple-700 dark:focus:ring-purple-900\"\n (click)=\"format()\">Format\n </button>\n <button type=\"button\" *ngIf=\"!formatButtonStatus\"\n class=\"focus:outline-none text-white bg-yellow-800 hover:bg-yellow-500 focus:ring-4\n focus:ring-yellow-300 font-medium mr-2 px-5 py-2.5 my-2 dark:focus:ring-yellow-900\" (click)=\"format()\">\n Reformat\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"flex justify-end mt-2\">\n\n </div>\n </div>\n <div class=\"my-2\">\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 <h6 class=\"mb-2 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Data Enrichment\n </h6>\n <div class=\"grid grid-cols-1 gap-2 w-full\">\n <div class=\"p-2 w-full\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.enrichments; let i = index;\">\n <div class=\"flex flex-row\">\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Type</div>\n <dx-select-box [items]=\"['Basic','Lookup']\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== apiBulderDataset.queryConfig.enrichments.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\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 </div>\n\n </div>\n </div>\n\n\n <div class=\"flex justify-end mt-2\">\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button type=\"button\" class=\"{{commonService.btn_primary_md}} cursor-pointer mx-1 my-2\"\n (click)=\"validateNewReport()\" [disabled]=\"isValidate\">\n Validate\n </button>\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\"\n [disabled]=\"isNotValidate\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>", 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: 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.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: "pipe", type: SqlPipe, name: "sql" }] });
|
|
9819
|
+
CreateDatasetSqlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CreateDatasetSqlComponent, selector: "app-create-dataset-sql", inputs: { sqlBulderDataset: "sqlBulderDataset" }, outputs: { getSqlQueryBulbderDataSet: "getSqlQueryBulbderDataSet" }, providers: [SqlPipe], ngImport: i0, template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Database Name</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.queryConfig.databaseName\">\n </dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">DB Config</div>\n <dx-select-box [items]=\"['impala','postgres','mysql','bigquery']\"\n [(ngModel)]=\"apiBulderDataset.queryConfig.dbConfig\"></dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n \n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Formatter</div>\n <dx-text-box [(ngModel)]=\"item.formatter\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n\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 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Configure SQL Expression\n </h6>\n <div class=\"p-5 font-light border border-b-0 border-gray-200 dark:border-gray-700 dark:bg-gray-900\">\n <div class=\"mt-5 p-2\">\n <textarea id=\"message\" rows=\"20\"\n class=\"block p-2.5 w-full text-lg text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500\"\n placeholder=\"Write your SQL query here...\" [(ngModel)]=\"queryStringData\"\n id=\"exampleTextarea\">{{ sqlString | sql }}</textarea>\n\n\n <div class=\"row no-margin\" *ngIf=\"validateArgumentError\">\n <p class=\"text-red-400\">This query is not valid</p>\n </div>\n\n <div class=\"flex\">\n <button *ngIf=\"formatButtonStatus\" type=\"button\"\n class=\"focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4\n focus:ring-purple-300 font-medium dark:bg-purple-600 my-2 px-5 py-2.5 dark:hover:bg-purple-700 dark:focus:ring-purple-900\"\n (click)=\"format()\">Format\n </button>\n <button type=\"button\" *ngIf=\"!formatButtonStatus\"\n class=\"focus:outline-none text-white bg-yellow-800 hover:bg-yellow-500 focus:ring-4\n focus:ring-yellow-300 font-medium mr-2 px-5 py-2.5 my-2 dark:focus:ring-yellow-900\" (click)=\"format()\">\n Reformat\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"flex justify-end mt-2\">\n\n </div>\n </div>\n <div class=\"my-2\">\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 <h6 class=\"mb-2 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Data Enrichment\n </h6>\n <div class=\"grid grid-cols-1 gap-2 w-full\">\n <div class=\"p-2 w-full\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.enrichments; let i = index;\">\n <div class=\"flex flex-row\">\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Type</div>\n <dx-select-box [items]=\"['Basic','Lookup']\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== apiBulderDataset.queryConfig.enrichments.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\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 </div>\n\n </div>\n </div>\n\n\n <div class=\"flex justify-end mt-2\">\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button type=\"button\" class=\"{{commonService.btn_primary_md}} cursor-pointer mx-1 my-2\"\n (click)=\"validateNewReport()\" [disabled]=\"isValidate\">\n Validate\n </button>\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\"\n [disabled]=\"isNotValidate\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>", 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: 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.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: "pipe", type: SqlPipe, name: "sql" }] });
|
|
9760
9820
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreateDatasetSqlComponent, decorators: [{
|
|
9761
9821
|
type: Component,
|
|
9762
|
-
args: [{ selector: 'app-create-dataset-sql', providers: [SqlPipe], template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Database Name</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.queryConfig.databaseName\">\n </dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">DB Config</div>\n <dx-select-box [items]=\"['impala','postgres','mysql','bigquery']\"\n [(ngModel)]=\"apiBulderDataset.queryConfig.dbConfig\"></dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n\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 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Configure SQL Expression\n </h6>\n <div class=\"p-5 font-light border border-b-0 border-gray-200 dark:border-gray-700 dark:bg-gray-900\">\n <div class=\"mt-5 p-2\">\n <textarea id=\"message\" rows=\"20\"\n class=\"block p-2.5 w-full text-lg text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500\"\n placeholder=\"Write your SQL query here...\" [(ngModel)]=\"queryStringData\"\n id=\"exampleTextarea\">{{ sqlString | sql }}</textarea>\n\n\n <div class=\"row no-margin\" *ngIf=\"validateArgumentError\">\n <p class=\"text-red-400\">This query is not valid</p>\n </div>\n\n <div class=\"flex\">\n <button *ngIf=\"formatButtonStatus\" type=\"button\"\n class=\"focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4\n focus:ring-purple-300 font-medium dark:bg-purple-600 my-2 px-5 py-2.5 dark:hover:bg-purple-700 dark:focus:ring-purple-900\"\n (click)=\"format()\">Format\n </button>\n <button type=\"button\" *ngIf=\"!formatButtonStatus\"\n class=\"focus:outline-none text-white bg-yellow-800 hover:bg-yellow-500 focus:ring-4\n focus:ring-yellow-300 font-medium mr-2 px-5 py-2.5 my-2 dark:focus:ring-yellow-900\" (click)=\"format()\">\n Reformat\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"flex justify-end mt-2\">\n\n </div>\n </div>\n <div class=\"my-2\">\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 <h6 class=\"mb-2 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Data Enrichment\n </h6>\n <div class=\"grid grid-cols-1 gap-2 w-full\">\n <div class=\"p-2 w-full\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.enrichments; let i = index;\">\n <div class=\"flex flex-row\">\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Type</div>\n <dx-select-box [items]=\"['Basic','Lookup']\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== apiBulderDataset.queryConfig.enrichments.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\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 </div>\n\n </div>\n </div>\n\n\n <div class=\"flex justify-end mt-2\">\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button type=\"button\" class=\"{{commonService.btn_primary_md}} cursor-pointer mx-1 my-2\"\n (click)=\"validateNewReport()\" [disabled]=\"isValidate\">\n Validate\n </button>\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\"\n [disabled]=\"isNotValidate\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>" }]
|
|
9822
|
+
args: [{ selector: 'app-create-dataset-sql', providers: [SqlPipe], template: "<div class=\"m-2\">\n <div class=\"flex flex-row mb-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">End Point</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.api\"></dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Api Type</div>\n <dx-select-box [dataSource]=\"['get','post']\" [(ngModel)]=\"apiBulderDataset.apiType\">\n </dx-select-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Database Name</div>\n <dx-text-box [(ngModel)]=\"apiBulderDataset.queryConfig.databaseName\">\n </dx-text-box>\n </div>\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">DB Config</div>\n <dx-select-box [items]=\"['impala','postgres','mysql','bigquery']\"\n [(ngModel)]=\"apiBulderDataset.queryConfig.dbConfig\"></dx-select-box>\n </div>\n </div>\n\n <div class=\"flex flex-col flex-auto min-w-0 my-2\">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Filter Maping\n </div>\n <div class=\"pt-2 border-x border-b \">\n <div class=\"my-2 flex justify-between\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.mapedFilters; let i = index;\">\n\n\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Server Column</div>\n <dx-text-box [(ngModel)]=\"item.serverColumn\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Local Column(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.localColumn\"></dx-text-box>\n </div>\n \n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Operator</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_operator\"\n [(ngModel)]=\"item.operatorName\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Datatype</div>\n <dx-select-box [searchEnabled]=\"true\"\n [items]=\"['date','string','timestamp','int', 'double', 'boolean']\"\n [(ngModel)]=\"item.dataType\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Formatter</div>\n <dx-text-box [(ngModel)]=\"item.formatter\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2\">\n <div class=\"text-md mb-2\"> Default Value</div>\n <dx-text-box [(ngModel)]=\"item.defaultValue\"></dx-text-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\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 !== apiBulderDataset.queryConfig.mapedFilters.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 </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n <button class=\"{{commonService.btn_danger_sm}} cursor-pointer\"\n (click)=\"deleteFilterMapingColumns(i)\"><i class=\"fa fa-trash-o\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n </div>\n <div class=\"flex flex-row\">\n <div class=\"w-1/2\">\n <div class=\"flex flex-row justify-end my-2\">\n <button class=\"{{commonService.btn_success_sm}} cursor-pointer\" (click)=\"saveColumnMaping()\">Save\n Maping</button>\n <button class=\"{{commonService.btn_primary_sm}} cursor-pointer\"\n (click)=\"addFilterMapingColumns()\">Add\n Maping</button>\n </div>\n </div>\n </div>\n\n\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 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Configure SQL Expression\n </h6>\n <div class=\"p-5 font-light border border-b-0 border-gray-200 dark:border-gray-700 dark:bg-gray-900\">\n <div class=\"mt-5 p-2\">\n <textarea id=\"message\" rows=\"20\"\n class=\"block p-2.5 w-full text-lg text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500\"\n placeholder=\"Write your SQL query here...\" [(ngModel)]=\"queryStringData\"\n id=\"exampleTextarea\">{{ sqlString | sql }}</textarea>\n\n\n <div class=\"row no-margin\" *ngIf=\"validateArgumentError\">\n <p class=\"text-red-400\">This query is not valid</p>\n </div>\n\n <div class=\"flex\">\n <button *ngIf=\"formatButtonStatus\" type=\"button\"\n class=\"focus:outline-none text-white bg-purple-700 hover:bg-purple-800 focus:ring-4\n focus:ring-purple-300 font-medium dark:bg-purple-600 my-2 px-5 py-2.5 dark:hover:bg-purple-700 dark:focus:ring-purple-900\"\n (click)=\"format()\">Format\n </button>\n <button type=\"button\" *ngIf=\"!formatButtonStatus\"\n class=\"focus:outline-none text-white bg-yellow-800 hover:bg-yellow-500 focus:ring-4\n focus:ring-yellow-300 font-medium mr-2 px-5 py-2.5 my-2 dark:focus:ring-yellow-900\" (click)=\"format()\">\n Reformat\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"flex justify-end mt-2\">\n\n </div>\n </div>\n <div class=\"my-2\">\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 <h6 class=\"mb-2 font-bold tracking-tight text-gray-900 dark:text-white border-b pb-3\">\n Data Enrichment\n </h6>\n <div class=\"grid grid-cols-1 gap-2 w-full\">\n <div class=\"p-2 w-full\"\n *ngFor=\"let item of apiBulderDataset.queryConfig.enrichments; let i = index;\">\n <div class=\"flex flex-row\">\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Value Field(aliasName)</div>\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Type</div>\n <dx-select-box [items]=\"['Basic','Lookup']\"></dx-select-box>\n </div>\n <div class=\"px-1 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Enrich Name</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpi_enrichment_name\"\n [(ngModel)]=\"item.enrichFunction\"></dx-select-box>\n </div>\n <div class=\"px-1 mt-8\">\n <div class=\"flex flex-row\">\n <button *ngIf=\"i !== 0\" class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'up')\">\n <i class=\"fa fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n\n <button *ngIf=\"i !== apiBulderDataset.queryConfig.enrichments.length - 1\"\n class=\"{{commonService.btn_light_sm}} cursor-pointer mx-1\"\n (click)=\"moveItemForMeasuresColumns(i, 'down')\">\n <i class=\"fa fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"px-1 mt-8 text-center\">\n\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 </div>\n\n </div>\n </div>\n\n\n <div class=\"flex justify-end mt-2\">\n <button class=\"{{commonService.btn_primary_md}} cursor-pointer\" (click)=\"addColumns()\">Add\n Columns</button>\n </div>\n </div>\n </div>\n\n\n\n <div class=\"flex w-full justify-end mt-5 border-t\">\n <button type=\"button\" class=\"{{commonService.btn_primary_md}} cursor-pointer mx-1 my-2\"\n (click)=\"validateNewReport()\" [disabled]=\"isValidate\">\n Validate\n </button>\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mx-1 my-2\" (click)=\"createDataSet()\"\n [disabled]=\"isNotValidate\">\n Submit DataSet\n </button>\n </div>\n\n </div>\n</div>" }]
|
|
9763
9823
|
}], ctorParameters: function () { return [{ type: i2$1.ToastrService }, { type: CommonService }, { type: SqlPipe }, { type: ApplicationContentService }]; }, propDecorators: { getSqlQueryBulbderDataSet: [{
|
|
9764
9824
|
type: Output
|
|
9765
9825
|
}], sqlBulderDataset: [{
|
|
@@ -10023,6 +10083,13 @@ class CreateDatasetComponent {
|
|
|
10023
10083
|
"operatorName": "lte",
|
|
10024
10084
|
"defaultValue": "",
|
|
10025
10085
|
"dataType": "string"
|
|
10086
|
+
},
|
|
10087
|
+
{
|
|
10088
|
+
"localColumn": "limit",
|
|
10089
|
+
"serverColumn": "limit",
|
|
10090
|
+
"operatorName": "eq",
|
|
10091
|
+
"defaultValue": "5000",
|
|
10092
|
+
"dataType": "string"
|
|
10026
10093
|
}
|
|
10027
10094
|
]
|
|
10028
10095
|
}
|
|
@@ -10824,6 +10891,10 @@ class PageConfigComponent {
|
|
|
10824
10891
|
const datasetWithLimit = this.setDataSetsLimit(dataset);
|
|
10825
10892
|
apiCalls.push(this.datasetService.getDataFromDataSet(datasetWithLimit, datasetWithLimit.datasetId, this.defaultApplyedFilter));
|
|
10826
10893
|
}
|
|
10894
|
+
else if (dataset.datasetType == "sqlQuery") {
|
|
10895
|
+
const filterWithLimit = this.setDataSetsLimitForSql(dataset);
|
|
10896
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(filterWithLimit, filterWithLimit.datasetId, this.defaultApplyedFilter));
|
|
10897
|
+
}
|
|
10827
10898
|
else {
|
|
10828
10899
|
apiCalls.push(this.datasetService.getDataFromDataSet(dataset, dataset.datasetId, this.defaultApplyedFilter));
|
|
10829
10900
|
}
|
|
@@ -11124,6 +11195,22 @@ class PageConfigComponent {
|
|
|
11124
11195
|
dataset.config.queryConfig.reqFields.push(limit);
|
|
11125
11196
|
return dataset;
|
|
11126
11197
|
}
|
|
11198
|
+
setDataSetsLimitForSql(dataset) {
|
|
11199
|
+
const limitIndex = dataset.config.queryConfig.mapedFilters.findIndex(filter => filter.serverColumn === 'limit');
|
|
11200
|
+
if (limitIndex === -1) {
|
|
11201
|
+
dataset.config.queryConfig.mapedFilters.push({
|
|
11202
|
+
localColumn: "limit",
|
|
11203
|
+
serverColumn: "limit",
|
|
11204
|
+
operatorName: "eq",
|
|
11205
|
+
defaultValue: "100",
|
|
11206
|
+
dataType: "string"
|
|
11207
|
+
});
|
|
11208
|
+
}
|
|
11209
|
+
else {
|
|
11210
|
+
dataset.config.queryConfig.mapedFilters[limitIndex].defaultValue = "10";
|
|
11211
|
+
}
|
|
11212
|
+
return dataset;
|
|
11213
|
+
}
|
|
11127
11214
|
getViewPopupHide(e) {
|
|
11128
11215
|
this.getAllViewsItems();
|
|
11129
11216
|
}
|