gamma-app-controller 1.1.12 → 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.
@@ -2032,15 +2032,17 @@ class ApplicationFilterComponent {
2032
2032
  this.getKPIReferenceEndPoints();
2033
2033
  this.getFilterDataSet();
2034
2034
  }
2035
- getFilterDataSet() {
2036
- this.isLoader = true;
2037
- this.service.getAppFilterConfigs().subscribe({
2038
- next: (data) => {
2039
- this.filterDataSource = data;
2040
- this.isLoader = false;
2041
- }, error: (err) => {
2042
- this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'Filter Creation');
2043
- }
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
+ });
2044
2046
  });
2045
2047
  }
2046
2048
  addFilter() {
@@ -2098,10 +2100,15 @@ class ApplicationFilterComponent {
2098
2100
  result.then((dialogResult) => {
2099
2101
  if (dialogResult) {
2100
2102
  this.isLoader = true;
2103
+ const currentPageIndex = this.dataGrid?.instance.pageIndex();
2101
2104
  this.service.deleteAppFilterConfig(item.filterId).subscribe((val) => {
2102
- this.getFilterDataSet();
2103
- this.isLoader = false;
2104
- this.toastr.success('Filter Deleted Successfully');
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
+ });
2105
2112
  }, err => {
2106
2113
  console.log(err);
2107
2114
  this.toastr.error('Unexpected Server Exception. Please contact System Admin.', 'Rule Module');
@@ -2187,11 +2194,14 @@ class ApplicationFilterComponent {
2187
2194
  }
2188
2195
  }
2189
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 });
2190
- ApplicationFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ApplicationFilterComponent, selector: "app-application-filter", ngImport: i0, template: "<div class=\"flex flex-col flex-auto min-w-0\">\n <lib-common-header [pageTitle]=\"'Application Filters'\"></lib-common-header>\n\n\n\n\n <div class=\"p-4 w-full\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n <h6\n class=\"mb-2 font-bold text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n <i class=\"fa fa-table mr-2\"></i> Filters\n <div class=\"ml-auto\">\n <button class=\"bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-3 rounded\"\n (click)=\"getCreateNewFilter()\">\n Add Filter\n </button>\n </div>\n </h6>\n <app-loader *ngIf=\"isLoader\"></app-loader>\n <dx-data-grid [columnAutoWidth]=\"true\" [dataSource]=\"filterDataSource\" [hoverStateEnabled]=\"true\"\n *ngIf=\"!isLoader\" [selectedRowKeys]=\"[]\" [showBorders]=\"true\" [showColumnLines]=\"true\"\n [showRowLines]=\"true\" id=\"gridContainer\">\n <dxo-paging [pageSize]=\"10\"></dxo-paging>\n <dxo-export [enabled]=\"true\"></dxo-export>\n\n <dxi-column dataField=\"filterName\"></dxi-column>\n <dxi-column dataField=\"filterId\"></dxi-column>\n <dxi-column dataField=\"createdBy\"></dxi-column>\n <dxi-column dataField=\"creationDate\"></dxi-column>\n <dxi-column dataField=\"action\" cellTemplate=\"cellTemplate\" [fixed]=\"true\"\n fixedPosition=\"right\"></dxi-column>\n <div *dxTemplate=\"let data of 'cellTemplate'\">\n <button class=\"{{commonService.btn_primary_md}}\" (click)=\"editFilter(data.data)\">\n Edit\n </button>\n <button class=\"{{commonService.btn_danger_md}}\" (click)=\"deleteFilter(data.data)\">\n Delete\n </button>\n </div>\n\n\n </dx-data-grid>\n </div>\n </div>\n <div class=\"p-2 w-full\" *ngIf=\"isNewFilterCreate\">\n <div class=\"m-3 p-4 bg-white border border-gray-200 rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700\">\n <h6\n class=\"mb-2 font-bold text-lg tracking-tight text-gray-900 dark:text-white border-b pb-3 flex items-center\">\n <i class=\"fa fa-table mr-2\"></i> Create Filters\n\n </h6>\n <div class=\"flex flex-row my-2\">\n <div class=\"mx-2 w-1/3\">\n <div class=\"text-md mb-2\">Filter Name</div>\n <dx-text-box [(ngModel)]=\"creatFilterObject.filterName\"></dx-text-box>\n </div>\n </div>\n <div class=\"m-5 border\">\n <div class=\"flex flex-col flex-auto min-w-0 \">\n <div class=\"text-lg py-2 font-extrabold border-b bg-gray-700 text-white px-2\"> Select Filters\n </div>\n <div class=\"pt-2 border-x border-b \">\n <ng-container *ngFor=\"let item of creatFilterObject.filterItems; let i = index;\">\n <div class=\"my-2 flex flex-row justify-between border-b\">\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2 mt-5\"> </div>\n <dx-check-box [(ngModel)]=\"item.display\" text=\"Display\"></dx-check-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Filter Name </div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"kpiFilterConfigService\"\n displayExpr=\"apiName\" valueExpr=\"apiUrl\"\n [(ngModel)]=\"item.apiName\"></dx-select-box>\n </div>\n\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\">Operator Key Name </div>\n <dx-text-box [(ngModel)]=\"item.operatorName\"></dx-text-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Label</div>\n <dx-text-box [(ngModel)]=\"item.label\"></dx-text-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter Container</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"filter_type\"\n [(ngModel)]=\"item.filterType\"></dx-select-box>\n\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> FIlter type</div>\n <dx-select-box [searchEnabled]=\"true\" [items]=\"defaultFilterTypeDataSource\"\n [(ngModel)]=\"item.defaultFilterType\"\n value=\"defaultFilterTypeDataSource[0]\"></dx-select-box>\n\n </div>\n\n <ng-container\n *ngIf=\"item.defaultFilterType == 'dynamic' && (item.filterType == 'date' || item.filterType == 'datetime')\">\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> Function </div>\n <dx-select-box [items]=\"momentFunction\"\n [(ngModel)]=\"item.momentFunction\"></dx-select-box>\n </div>\n <div class=\"px-2 mb-2 w-full\">\n <div class=\"text-md mb-2\"> 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"] }] });
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"] }] });
2191
2198
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApplicationFilterComponent, decorators: [{
2192
2199
  type: Component,
2193
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>" }]
2194
- }], ctorParameters: function () { return [{ type: ApplicationContentService }, { type: CommonService }, { type: i2$1.ToastrService }, { type: i4.Router }]; } });
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
+ }] } });
2195
2205
 
2196
2206
  class kpicommonService$2 {
2197
2207
  getAllSeviceApiJson(apiJsonObject) {
@@ -5639,7 +5649,6 @@ class CreateCompViewComponent {
5639
5649
  this.activatedRoute = activatedRoute;
5640
5650
  this.environment = environment;
5641
5651
  this.selectedDataSet = {};
5642
- this.isFilterInputs = false;
5643
5652
  this.selectedDataSetOnedit = {};
5644
5653
  this.creatCompViewObject = {};
5645
5654
  this.componentNamesOthers = [
@@ -9654,6 +9663,16 @@ class CreateDatasetSqlComponent {
9654
9663
  if (value.queryConfig.templateQuery != "") {
9655
9664
  this.queryStringData = value.queryConfig.templateQuery;
9656
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
+ }
9657
9676
  this.apiBulderDataset = value;
9658
9677
  }
9659
9678
  ngOnInit() {
@@ -9694,36 +9713,36 @@ class CreateDatasetSqlComponent {
9694
9713
  }
9695
9714
  else {
9696
9715
  fval = this.sqlFormatter.transform(val);
9697
- splittedValuesOfQuery = val.split(' ').map(function (item) {
9698
- return item.trim().replace(/(^,)|(,)|(;)/g, '');
9699
- });
9716
+ splittedValuesOfQuery = fval.match(/'[^']*'|\S+/g) || [];
9700
9717
  this.queryStringData = fval;
9701
9718
  const re = /{([^}]+)}/g;
9702
9719
  let m = [];
9703
9720
  while (m = re.exec(fval)) {
9704
9721
  this.duplicateMatches.push(m[1]);
9705
9722
  }
9723
+ let limit_key = [];
9724
+ limit_key = splittedValuesOfQuery.filter(s => s.toLowerCase().includes('limit'));
9706
9725
  this.matches = this.duplicateMatches.filter((v, i) => this.duplicateMatches.indexOf(v) === i);
9707
9726
  for (let i = 0; i < this.matches.length; i++) {
9708
9727
  let value;
9709
9728
  let key;
9710
9729
  let th_key;
9711
9730
  let keyarr = [];
9712
- let th_keyArr = [];
9713
9731
  value = this.matches[i];
9714
9732
  keyarr = splittedValuesOfQuery.filter(s => s.includes('$P{' + this.matches[i] + '}'));
9715
- th_keyArr = splittedValuesOfQuery.filter(s => s.includes('$T{' + this.matches[i] + '}'));
9716
9733
  if (keyarr.length !== 0) {
9717
9734
  if (keyarr[0].split('=')[0].indexOf('.') > 0) {
9718
9735
  key = keyarr[0].split('=')[0].split('.')[1];
9719
9736
  }
9720
9737
  else {
9721
9738
  key = keyarr[0].split('=')[0];
9722
- let labelName = key.replace(/^./, key[0].toUpperCase());
9723
9739
  }
9724
9740
  }
9725
9741
  this.argumentData.push(key);
9726
9742
  }
9743
+ if (limit_key && limit_key.length !== 0) {
9744
+ this.argumentData.push(limit_key[0].toLowerCase());
9745
+ }
9727
9746
  this.isValidate = false;
9728
9747
  this.isNotValidate = true;
9729
9748
  }
@@ -10049,6 +10068,13 @@ class CreateDatasetComponent {
10049
10068
  "operatorName": "lte",
10050
10069
  "defaultValue": "",
10051
10070
  "dataType": "string"
10071
+ },
10072
+ {
10073
+ "localColumn": "limit",
10074
+ "serverColumn": "limit",
10075
+ "operatorName": "eq",
10076
+ "defaultValue": "5000",
10077
+ "dataType": "string"
10052
10078
  }
10053
10079
  ]
10054
10080
  }
@@ -10848,6 +10874,10 @@ class PageConfigComponent {
10848
10874
  const datasetWithLimit = this.setDataSetsLimit(dataset);
10849
10875
  apiCalls.push(this.datasetService.getDataFromDataSet(datasetWithLimit, datasetWithLimit.datasetId, this.defaultApplyedFilter));
10850
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
+ }
10851
10881
  else {
10852
10882
  apiCalls.push(this.datasetService.getDataFromDataSet(dataset, dataset.datasetId, this.defaultApplyedFilter));
10853
10883
  }
@@ -11148,6 +11178,22 @@ class PageConfigComponent {
11148
11178
  dataset.config.queryConfig.reqFields.push(limit);
11149
11179
  return dataset;
11150
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
+ }
11151
11197
  getViewPopupHide(e) {
11152
11198
  this.getAllViewsItems();
11153
11199
  }