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
|
@@ -2007,7 +2007,8 @@ class ApplicationFilterComponent {
|
|
|
2007
2007
|
"defaultFilterType": "dynamic",
|
|
2008
2008
|
"defaultFilterValue": "15,days",
|
|
2009
2009
|
"momentFunction": "subtract",
|
|
2010
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2010
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2011
|
+
"queryFormat": "YYYYMMDD"
|
|
2011
2012
|
},
|
|
2012
2013
|
{
|
|
2013
2014
|
"apiName": "endDate",
|
|
@@ -2018,7 +2019,8 @@ class ApplicationFilterComponent {
|
|
|
2018
2019
|
"defaultFilterType": "dynamic",
|
|
2019
2020
|
"defaultFilterValue": "1,days",
|
|
2020
2021
|
"momentFunction": "subtract",
|
|
2021
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2022
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2023
|
+
"queryFormat": "YYYYMMDD"
|
|
2022
2024
|
}]
|
|
2023
2025
|
};
|
|
2024
2026
|
this.filter_type = ['single', 'multiple', 'date', 'datetime', "content", "context"];
|
|
@@ -2030,15 +2032,17 @@ class ApplicationFilterComponent {
|
|
|
2030
2032
|
this.getKPIReferenceEndPoints();
|
|
2031
2033
|
this.getFilterDataSet();
|
|
2032
2034
|
}
|
|
2033
|
-
getFilterDataSet() {
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2035
|
+
async getFilterDataSet() {
|
|
2036
|
+
return new Promise((resolve) => {
|
|
2037
|
+
this.isLoader = true;
|
|
2038
|
+
this.service.getAppFilterConfigs().subscribe({
|
|
2039
|
+
next: (data) => {
|
|
2040
|
+
this.filterDataSource = data;
|
|
2041
|
+
this.isLoader = false;
|
|
2042
|
+
}, error: (err) => {
|
|
2043
|
+
this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'Filter Creation');
|
|
2044
|
+
}
|
|
2045
|
+
});
|
|
2042
2046
|
});
|
|
2043
2047
|
}
|
|
2044
2048
|
addFilter() {
|
|
@@ -2069,7 +2073,8 @@ class ApplicationFilterComponent {
|
|
|
2069
2073
|
"defaultFilterType": "dynamic",
|
|
2070
2074
|
"defaultFilterValue": "15,days",
|
|
2071
2075
|
"momentFunction": "subtract",
|
|
2072
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2076
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2077
|
+
"queryFormat": "YYYYMMDD"
|
|
2073
2078
|
},
|
|
2074
2079
|
{
|
|
2075
2080
|
"apiName": "endDate",
|
|
@@ -2080,11 +2085,13 @@ class ApplicationFilterComponent {
|
|
|
2080
2085
|
"defaultFilterType": "dynamic",
|
|
2081
2086
|
"defaultFilterValue": "1,days",
|
|
2082
2087
|
"momentFunction": "subtract",
|
|
2083
|
-
"momentFormat": "YYYY-MM-DD"
|
|
2088
|
+
"momentFormat": "YYYY-MM-DD",
|
|
2089
|
+
"queryFormat": "YYYYMMDD"
|
|
2084
2090
|
}]
|
|
2085
2091
|
};
|
|
2086
2092
|
}
|
|
2087
2093
|
editFilter(data) {
|
|
2094
|
+
debugger;
|
|
2088
2095
|
this.creatFilterObject = data;
|
|
2089
2096
|
this.isNewFilterCreate = true;
|
|
2090
2097
|
}
|
|
@@ -2093,10 +2100,15 @@ class ApplicationFilterComponent {
|
|
|
2093
2100
|
result.then((dialogResult) => {
|
|
2094
2101
|
if (dialogResult) {
|
|
2095
2102
|
this.isLoader = true;
|
|
2103
|
+
const currentPageIndex = this.dataGrid?.instance.pageIndex();
|
|
2096
2104
|
this.service.deleteAppFilterConfig(item.filterId).subscribe((val) => {
|
|
2097
|
-
this.getFilterDataSet()
|
|
2098
|
-
|
|
2099
|
-
|
|
2105
|
+
this.getFilterDataSet().then(() => {
|
|
2106
|
+
if (currentPageIndex !== undefined) {
|
|
2107
|
+
this.dataGrid.instance.pageIndex(currentPageIndex);
|
|
2108
|
+
}
|
|
2109
|
+
this.isLoader = false;
|
|
2110
|
+
this.toastr.success('Filter Deleted Successfully');
|
|
2111
|
+
});
|
|
2100
2112
|
}, err => {
|
|
2101
2113
|
console.log(err);
|
|
2102
2114
|
this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'Rule Module');
|
|
@@ -2182,11 +2194,14 @@ class ApplicationFilterComponent {
|
|
|
2182
2194
|
}
|
|
2183
2195
|
}
|
|
2184
2196
|
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 });
|
|
2185
|
-
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"] }] });
|
|
2197
|
+
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"] }] });
|
|
2186
2198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationFilterComponent, decorators: [{
|
|
2187
2199
|
type: Component,
|
|
2188
|
-
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\">
|
|
2189
|
-
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.Router }]; }
|
|
2200
|
+
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>" }]
|
|
2201
|
+
}], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.Router }]; }, propDecorators: { dataGrid: [{
|
|
2202
|
+
type: ViewChild,
|
|
2203
|
+
args: ['gridContainer', { static: false }]
|
|
2204
|
+
}] } });
|
|
2190
2205
|
|
|
2191
2206
|
class kpicommonService$2 {
|
|
2192
2207
|
getAllSeviceApiJson(apiJsonObject) {
|
|
@@ -2534,7 +2549,12 @@ class ApplicationDatasetComponent {
|
|
|
2534
2549
|
value: mapping.defaultValue
|
|
2535
2550
|
};
|
|
2536
2551
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2537
|
-
|
|
2552
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
2553
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
2554
|
+
}
|
|
2555
|
+
else {
|
|
2556
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2557
|
+
}
|
|
2538
2558
|
}
|
|
2539
2559
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
2540
2560
|
if (filter) {
|
|
@@ -2548,7 +2568,12 @@ class ApplicationDatasetComponent {
|
|
|
2548
2568
|
resultObj.value = value;
|
|
2549
2569
|
}
|
|
2550
2570
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2551
|
-
|
|
2571
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
2572
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
2573
|
+
}
|
|
2574
|
+
else {
|
|
2575
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2576
|
+
}
|
|
2552
2577
|
}
|
|
2553
2578
|
}
|
|
2554
2579
|
}
|
|
@@ -2648,7 +2673,12 @@ class ApplicationDatasetComponent {
|
|
|
2648
2673
|
value: mapping.defaultValue
|
|
2649
2674
|
};
|
|
2650
2675
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
2651
|
-
|
|
2676
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
2677
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
2678
|
+
}
|
|
2679
|
+
else {
|
|
2680
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
2681
|
+
}
|
|
2652
2682
|
}
|
|
2653
2683
|
result.push(resultObj);
|
|
2654
2684
|
});
|
|
@@ -2958,7 +2988,7 @@ class DatasetQueryBulderComponent {
|
|
|
2958
2988
|
}
|
|
2959
2989
|
if (value.queryConfig.mapedFilters == undefined) {
|
|
2960
2990
|
value.queryConfig.mapedFilters = [];
|
|
2961
|
-
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" });
|
|
2991
|
+
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" });
|
|
2962
2992
|
}
|
|
2963
2993
|
if (value.queryConfig.sorters == undefined) {
|
|
2964
2994
|
value.queryConfig.sorters = [];
|
|
@@ -3177,7 +3207,7 @@ class DatasetQueryBulderComponent {
|
|
|
3177
3207
|
this.toastr.success('Pagination Request Params Saved Successfully');
|
|
3178
3208
|
}
|
|
3179
3209
|
addFilterMapingColumns() {
|
|
3180
|
-
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" };
|
|
3210
|
+
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" };
|
|
3181
3211
|
this.queryBulderDataset.queryConfig.mapedFilters.push(obj);
|
|
3182
3212
|
}
|
|
3183
3213
|
deleteFilterMapingColumns(i) {
|
|
@@ -3240,6 +3270,7 @@ class DatasetQueryBulderComponent {
|
|
|
3240
3270
|
let resultObj = {
|
|
3241
3271
|
columnName: mapping.serverColumn,
|
|
3242
3272
|
dataType: mapping.dataType,
|
|
3273
|
+
formatter: mapping.formatter,
|
|
3243
3274
|
operator: mapping.operatorName,
|
|
3244
3275
|
value: mapping.defaultValue
|
|
3245
3276
|
};
|
|
@@ -3290,10 +3321,10 @@ class DatasetQueryBulderComponent {
|
|
|
3290
3321
|
}
|
|
3291
3322
|
}
|
|
3292
3323
|
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 });
|
|
3293
|
-
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"] }] });
|
|
3324
|
+
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"] }] });
|
|
3294
3325
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatasetQueryBulderComponent, decorators: [{
|
|
3295
3326
|
type: Component,
|
|
3296
|
-
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>" }]
|
|
3327
|
+
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>" }]
|
|
3297
3328
|
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2$1.ToastrService }, { type: ApplicationContentService }]; }, propDecorators: { getQueryBulbderDataSet: [{
|
|
3298
3329
|
type: Output
|
|
3299
3330
|
}], bulderDataset: [{
|
|
@@ -3312,14 +3343,14 @@ class DatasetRestApiComponent {
|
|
|
3312
3343
|
set restApiDataset(value) {
|
|
3313
3344
|
if (value.queryConfig.mapedFilters == undefined) {
|
|
3314
3345
|
value.queryConfig.mapedFilters = [];
|
|
3315
|
-
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" });
|
|
3346
|
+
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" });
|
|
3316
3347
|
}
|
|
3317
3348
|
this.apiBulderDataset = value;
|
|
3318
3349
|
}
|
|
3319
3350
|
ngOnInit() {
|
|
3320
3351
|
}
|
|
3321
3352
|
addFilterMapingColumns() {
|
|
3322
|
-
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" };
|
|
3353
|
+
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" };
|
|
3323
3354
|
this.apiBulderDataset.queryConfig.mapedFilters.push(obj);
|
|
3324
3355
|
}
|
|
3325
3356
|
deleteFilterMapingColumns(i) {
|
|
@@ -3343,10 +3374,10 @@ class DatasetRestApiComponent {
|
|
|
3343
3374
|
}
|
|
3344
3375
|
}
|
|
3345
3376
|
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 });
|
|
3346
|
-
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"] }] });
|
|
3377
|
+
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"] }] });
|
|
3347
3378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatasetRestApiComponent, decorators: [{
|
|
3348
3379
|
type: Component,
|
|
3349
|
-
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>" }]
|
|
3380
|
+
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>" }]
|
|
3350
3381
|
}], ctorParameters: function () { return [{ type: i2$1.ToastrService }, { type: CommonService }]; }, propDecorators: { getRestApiBulbderDataSet: [{
|
|
3351
3382
|
type: Output
|
|
3352
3383
|
}], restApiDataset: [{
|
|
@@ -3586,13 +3617,7 @@ class GoogleGeoMapComponent {
|
|
|
3586
3617
|
width: 32,
|
|
3587
3618
|
height: 32,
|
|
3588
3619
|
},
|
|
3589
|
-
} :
|
|
3590
|
-
path: google.maps.SymbolPath.CIRCLE,
|
|
3591
|
-
scale: 5,
|
|
3592
|
-
fillColor: 'blue',
|
|
3593
|
-
fillOpacity: 0.6,
|
|
3594
|
-
strokeWeight: 0,
|
|
3595
|
-
},
|
|
3620
|
+
} : "",
|
|
3596
3621
|
map: this.map,
|
|
3597
3622
|
title: `${location.city}: $${location.total_sales_amount}`,
|
|
3598
3623
|
});
|
|
@@ -4414,6 +4439,14 @@ class DashTableComponent {
|
|
|
4414
4439
|
this.taostr = taostr;
|
|
4415
4440
|
this.dataSourseForTable = [];
|
|
4416
4441
|
this.allConfiguredViews = [];
|
|
4442
|
+
this.viewProperties = {
|
|
4443
|
+
enableClickEvent: false,
|
|
4444
|
+
enableRightClickEvent: true,
|
|
4445
|
+
clickEventOptions: {
|
|
4446
|
+
associatedViews: [],
|
|
4447
|
+
eventType: ""
|
|
4448
|
+
}
|
|
4449
|
+
};
|
|
4417
4450
|
this.optionalDrilDownDataSource = [];
|
|
4418
4451
|
this.table_columns_config = {
|
|
4419
4452
|
"kpiConfig": {
|
|
@@ -4467,10 +4500,6 @@ class DashTableComponent {
|
|
|
4467
4500
|
this.tableDataConfig.columns = value.selectedWidgetConfig.dataConfig.columns;
|
|
4468
4501
|
if (value.selectedWidgetConfig.viewProperties) {
|
|
4469
4502
|
this.viewProperties = value.selectedWidgetConfig.viewProperties;
|
|
4470
|
-
this.viewProperties = {
|
|
4471
|
-
"enableClickEvent": value.selectedWidgetConfig.viewProperties.enableClickEvent,
|
|
4472
|
-
"enableRightClickEvent": value.selectedWidgetConfig.viewProperties.enableRightClickEvent
|
|
4473
|
-
};
|
|
4474
4503
|
if (value.selectedWidgetConfig.viewProperties.enableClickEvent) {
|
|
4475
4504
|
if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == 'optionalDrillDown') {
|
|
4476
4505
|
this.optionalDrilDownDataSource = value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews;
|
|
@@ -4485,22 +4514,6 @@ class DashTableComponent {
|
|
|
4485
4514
|
"associatedViews": value.selectedWidgetConfig.viewProperties.clickEventOptions.associatedViews
|
|
4486
4515
|
};
|
|
4487
4516
|
}
|
|
4488
|
-
else if (value.selectedWidgetConfig.viewProperties.clickEventOptions.eventType == '') {
|
|
4489
|
-
this.viewProperties['clickEventOptions'] = {
|
|
4490
|
-
"eventType": "",
|
|
4491
|
-
"associatedViews": []
|
|
4492
|
-
};
|
|
4493
|
-
}
|
|
4494
|
-
else {
|
|
4495
|
-
this.viewProperties = {
|
|
4496
|
-
enableClickEvent: false,
|
|
4497
|
-
enableRightClickEvent: true,
|
|
4498
|
-
clickEventOptions: {
|
|
4499
|
-
associatedViews: [],
|
|
4500
|
-
eventType: ""
|
|
4501
|
-
}
|
|
4502
|
-
};
|
|
4503
|
-
}
|
|
4504
4517
|
}
|
|
4505
4518
|
else {
|
|
4506
4519
|
this.viewProperties['clickEventOptions'] = {};
|
|
@@ -5636,7 +5649,6 @@ class CreateCompViewComponent {
|
|
|
5636
5649
|
this.activatedRoute = activatedRoute;
|
|
5637
5650
|
this.environment = environment;
|
|
5638
5651
|
this.selectedDataSet = {};
|
|
5639
|
-
this.isFilterInputs = false;
|
|
5640
5652
|
this.selectedDataSetOnedit = {};
|
|
5641
5653
|
this.creatCompViewObject = {};
|
|
5642
5654
|
this.componentNamesOthers = [
|
|
@@ -5825,7 +5837,12 @@ class CreateCompViewComponent {
|
|
|
5825
5837
|
};
|
|
5826
5838
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
5827
5839
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
5828
|
-
|
|
5840
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
5841
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
5842
|
+
}
|
|
5843
|
+
else {
|
|
5844
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
5845
|
+
}
|
|
5829
5846
|
}
|
|
5830
5847
|
if (filter) {
|
|
5831
5848
|
if (mapping.defaultValue === "") {
|
|
@@ -5838,7 +5855,12 @@ class CreateCompViewComponent {
|
|
|
5838
5855
|
resultObj.value = value;
|
|
5839
5856
|
}
|
|
5840
5857
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
5841
|
-
|
|
5858
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
5859
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
5860
|
+
}
|
|
5861
|
+
else {
|
|
5862
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
5863
|
+
}
|
|
5842
5864
|
}
|
|
5843
5865
|
}
|
|
5844
5866
|
}
|
|
@@ -5866,7 +5888,12 @@ class CreateCompViewComponent {
|
|
|
5866
5888
|
dataset.config.queryConfig.mapedFilters.forEach((filter) => {
|
|
5867
5889
|
let datecolumn = filter.serverColumn.toLowerCase();
|
|
5868
5890
|
if (datecolumn.includes('date') && typeof filter.dataType === 'string') {
|
|
5869
|
-
|
|
5891
|
+
if (filter.formatter && filter.formatter !== "") {
|
|
5892
|
+
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(filter.formatter);
|
|
5893
|
+
}
|
|
5894
|
+
else {
|
|
5895
|
+
serviceJson[filter.serverColumn] = moment(filter.defaultValue, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
5896
|
+
}
|
|
5870
5897
|
}
|
|
5871
5898
|
else {
|
|
5872
5899
|
serviceJson[filter.serverColumn] = filter.defaultValue;
|
|
@@ -6149,7 +6176,12 @@ class CreateCompViewComponent {
|
|
|
6149
6176
|
value: mapping.defaultValue
|
|
6150
6177
|
};
|
|
6151
6178
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
6152
|
-
|
|
6179
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
6180
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
6181
|
+
}
|
|
6182
|
+
else {
|
|
6183
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
6184
|
+
}
|
|
6153
6185
|
}
|
|
6154
6186
|
result.push(resultObj);
|
|
6155
6187
|
});
|
|
@@ -9341,7 +9373,12 @@ class ApplicationDatssetsCall {
|
|
|
9341
9373
|
value: mapping.defaultValue
|
|
9342
9374
|
};
|
|
9343
9375
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
9344
|
-
|
|
9376
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
9377
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
9378
|
+
}
|
|
9379
|
+
else {
|
|
9380
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
9381
|
+
}
|
|
9345
9382
|
}
|
|
9346
9383
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
9347
9384
|
if (filter) {
|
|
@@ -9355,7 +9392,12 @@ class ApplicationDatssetsCall {
|
|
|
9355
9392
|
resultObj.value = value;
|
|
9356
9393
|
}
|
|
9357
9394
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
9358
|
-
|
|
9395
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
9396
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
9397
|
+
}
|
|
9398
|
+
else {
|
|
9399
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
9400
|
+
}
|
|
9359
9401
|
}
|
|
9360
9402
|
}
|
|
9361
9403
|
}
|
|
@@ -9497,7 +9539,12 @@ class ApplicationDatssetsCall {
|
|
|
9497
9539
|
aliasColumnName: mapping.localColumn,
|
|
9498
9540
|
};
|
|
9499
9541
|
if (mapping.serverColumn.includes('date') && typeof resultObj.value === 'string') {
|
|
9500
|
-
|
|
9542
|
+
if (mapping.formatter && mapping.formatter !== "") {
|
|
9543
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(mapping.formatter);
|
|
9544
|
+
}
|
|
9545
|
+
else {
|
|
9546
|
+
resultObj.value = moment(resultObj.value, "YYYY-MM-DD").format(this.environment.dataFormat);
|
|
9547
|
+
}
|
|
9501
9548
|
}
|
|
9502
9549
|
const filter = filterdata.find(f => f.hasOwnProperty(mapping.localColumn));
|
|
9503
9550
|
if (filter) {
|
|
@@ -9611,11 +9658,21 @@ class CreateDatasetSqlComponent {
|
|
|
9611
9658
|
set sqlBulderDataset(value) {
|
|
9612
9659
|
if (value.queryConfig.mapedFilters == undefined) {
|
|
9613
9660
|
value.queryConfig.mapedFilters = [];
|
|
9614
|
-
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" });
|
|
9661
|
+
value.queryConfig.mapedFilters.push({ "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" });
|
|
9615
9662
|
}
|
|
9616
9663
|
if (value.queryConfig.templateQuery != "") {
|
|
9617
9664
|
this.queryStringData = value.queryConfig.templateQuery;
|
|
9618
9665
|
}
|
|
9666
|
+
const hasLimit = value.queryConfig.mapedFilters.some(filter => filter.serverColumn === 'limit');
|
|
9667
|
+
if (!hasLimit) {
|
|
9668
|
+
value.queryConfig.mapedFilters.push({
|
|
9669
|
+
localColumn: "limit",
|
|
9670
|
+
serverColumn: "limit",
|
|
9671
|
+
operatorName: "eq",
|
|
9672
|
+
defaultValue: "5000",
|
|
9673
|
+
dataType: "string"
|
|
9674
|
+
});
|
|
9675
|
+
}
|
|
9619
9676
|
this.apiBulderDataset = value;
|
|
9620
9677
|
}
|
|
9621
9678
|
ngOnInit() {
|
|
@@ -9624,7 +9681,7 @@ class CreateDatasetSqlComponent {
|
|
|
9624
9681
|
});
|
|
9625
9682
|
}
|
|
9626
9683
|
addFilterMapingColumns() {
|
|
9627
|
-
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "" };
|
|
9684
|
+
let obj = { "localColumn": "", "serverColumn": "", "operatorName": "", "defaultValue": "", "dataType": "", "formatter": "" };
|
|
9628
9685
|
this.apiBulderDataset.queryConfig.mapedFilters.push(obj);
|
|
9629
9686
|
}
|
|
9630
9687
|
deleteFilterMapingColumns(i) {
|
|
@@ -9656,36 +9713,36 @@ class CreateDatasetSqlComponent {
|
|
|
9656
9713
|
}
|
|
9657
9714
|
else {
|
|
9658
9715
|
fval = this.sqlFormatter.transform(val);
|
|
9659
|
-
splittedValuesOfQuery =
|
|
9660
|
-
return item.trim().replace(/(^,)|(,)|(;)/g, '');
|
|
9661
|
-
});
|
|
9716
|
+
splittedValuesOfQuery = fval.match(/'[^']*'|\S+/g) || [];
|
|
9662
9717
|
this.queryStringData = fval;
|
|
9663
9718
|
const re = /{([^}]+)}/g;
|
|
9664
9719
|
let m = [];
|
|
9665
9720
|
while (m = re.exec(fval)) {
|
|
9666
9721
|
this.duplicateMatches.push(m[1]);
|
|
9667
9722
|
}
|
|
9723
|
+
let limit_key = [];
|
|
9724
|
+
limit_key = splittedValuesOfQuery.filter(s => s.toLowerCase().includes('limit'));
|
|
9668
9725
|
this.matches = this.duplicateMatches.filter((v, i) => this.duplicateMatches.indexOf(v) === i);
|
|
9669
9726
|
for (let i = 0; i < this.matches.length; i++) {
|
|
9670
9727
|
let value;
|
|
9671
9728
|
let key;
|
|
9672
9729
|
let th_key;
|
|
9673
9730
|
let keyarr = [];
|
|
9674
|
-
let th_keyArr = [];
|
|
9675
9731
|
value = this.matches[i];
|
|
9676
9732
|
keyarr = splittedValuesOfQuery.filter(s => s.includes('$P{' + this.matches[i] + '}'));
|
|
9677
|
-
th_keyArr = splittedValuesOfQuery.filter(s => s.includes('$T{' + this.matches[i] + '}'));
|
|
9678
9733
|
if (keyarr.length !== 0) {
|
|
9679
9734
|
if (keyarr[0].split('=')[0].indexOf('.') > 0) {
|
|
9680
9735
|
key = keyarr[0].split('=')[0].split('.')[1];
|
|
9681
9736
|
}
|
|
9682
9737
|
else {
|
|
9683
9738
|
key = keyarr[0].split('=')[0];
|
|
9684
|
-
let labelName = key.replace(/^./, key[0].toUpperCase());
|
|
9685
9739
|
}
|
|
9686
9740
|
}
|
|
9687
9741
|
this.argumentData.push(key);
|
|
9688
9742
|
}
|
|
9743
|
+
if (limit_key && limit_key.length !== 0) {
|
|
9744
|
+
this.argumentData.push(limit_key[0].toLowerCase());
|
|
9745
|
+
}
|
|
9689
9746
|
this.isValidate = false;
|
|
9690
9747
|
this.isNotValidate = true;
|
|
9691
9748
|
}
|
|
@@ -9744,10 +9801,10 @@ class CreateDatasetSqlComponent {
|
|
|
9744
9801
|
}
|
|
9745
9802
|
}
|
|
9746
9803
|
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 });
|
|
9747
|
-
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" }] });
|
|
9804
|
+
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" }] });
|
|
9748
9805
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CreateDatasetSqlComponent, decorators: [{
|
|
9749
9806
|
type: Component,
|
|
9750
|
-
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>" }]
|
|
9807
|
+
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>" }]
|
|
9751
9808
|
}], ctorParameters: function () { return [{ type: i2$1.ToastrService }, { type: CommonService }, { type: SqlPipe }, { type: ApplicationContentService }]; }, propDecorators: { getSqlQueryBulbderDataSet: [{
|
|
9752
9809
|
type: Output
|
|
9753
9810
|
}], sqlBulderDataset: [{
|
|
@@ -10011,6 +10068,13 @@ class CreateDatasetComponent {
|
|
|
10011
10068
|
"operatorName": "lte",
|
|
10012
10069
|
"defaultValue": "",
|
|
10013
10070
|
"dataType": "string"
|
|
10071
|
+
},
|
|
10072
|
+
{
|
|
10073
|
+
"localColumn": "limit",
|
|
10074
|
+
"serverColumn": "limit",
|
|
10075
|
+
"operatorName": "eq",
|
|
10076
|
+
"defaultValue": "5000",
|
|
10077
|
+
"dataType": "string"
|
|
10014
10078
|
}
|
|
10015
10079
|
]
|
|
10016
10080
|
}
|
|
@@ -10810,6 +10874,10 @@ class PageConfigComponent {
|
|
|
10810
10874
|
const datasetWithLimit = this.setDataSetsLimit(dataset);
|
|
10811
10875
|
apiCalls.push(this.datasetService.getDataFromDataSet(datasetWithLimit, datasetWithLimit.datasetId, this.defaultApplyedFilter));
|
|
10812
10876
|
}
|
|
10877
|
+
else if (dataset.datasetType == "sqlQuery") {
|
|
10878
|
+
const filterWithLimit = this.setDataSetsLimitForSql(dataset);
|
|
10879
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(filterWithLimit, filterWithLimit.datasetId, this.defaultApplyedFilter));
|
|
10880
|
+
}
|
|
10813
10881
|
else {
|
|
10814
10882
|
apiCalls.push(this.datasetService.getDataFromDataSet(dataset, dataset.datasetId, this.defaultApplyedFilter));
|
|
10815
10883
|
}
|
|
@@ -11110,6 +11178,22 @@ class PageConfigComponent {
|
|
|
11110
11178
|
dataset.config.queryConfig.reqFields.push(limit);
|
|
11111
11179
|
return dataset;
|
|
11112
11180
|
}
|
|
11181
|
+
setDataSetsLimitForSql(dataset) {
|
|
11182
|
+
const limitIndex = dataset.config.queryConfig.mapedFilters.findIndex(filter => filter.serverColumn === 'limit');
|
|
11183
|
+
if (limitIndex === -1) {
|
|
11184
|
+
dataset.config.queryConfig.mapedFilters.push({
|
|
11185
|
+
localColumn: "limit",
|
|
11186
|
+
serverColumn: "limit",
|
|
11187
|
+
operatorName: "eq",
|
|
11188
|
+
defaultValue: "100",
|
|
11189
|
+
dataType: "string"
|
|
11190
|
+
});
|
|
11191
|
+
}
|
|
11192
|
+
else {
|
|
11193
|
+
dataset.config.queryConfig.mapedFilters[limitIndex].defaultValue = "10";
|
|
11194
|
+
}
|
|
11195
|
+
return dataset;
|
|
11196
|
+
}
|
|
11113
11197
|
getViewPopupHide(e) {
|
|
11114
11198
|
this.getAllViewsItems();
|
|
11115
11199
|
}
|