gamma-app-controller 1.2.24 → 1.2.26
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/shared/advanced-component/app-advance-header/app-header.component.mjs +4 -2
- package/esm2020/lib/shared/gamma-bread-crumbs/bread-crumbs.component.mjs +8 -3
- package/esm2020/lib/template-module/defaulLandingComponent/landing-component.component.mjs +63 -17
- package/esm2020/lib/template-module/defaulLandingMultiLayoutComponent/defaulLandingMultiLayout.component.mjs +1 -1
- package/esm2020/lib/template-module/kpiWithMultiLayout/kpi-with-multilayout.component.mjs +35 -4
- package/esm2020/lib/template-module/kpiWithSingleLayout/kpi-with-dataset.component.mjs +50 -15
- package/fesm2015/gamma-app-controller.mjs +156 -36
- package/fesm2015/gamma-app-controller.mjs.map +1 -1
- package/fesm2020/gamma-app-controller.mjs +155 -36
- package/fesm2020/gamma-app-controller.mjs.map +1 -1
- package/lib/template-module/defaulLandingComponent/landing-component.component.d.ts +4 -2
- package/lib/template-module/kpiWithMultiLayout/kpi-with-multilayout.component.d.ts +4 -2
- package/lib/template-module/kpiWithSingleLayout/kpi-with-dataset.component.d.ts +4 -2
- package/package.json +1 -1
|
@@ -8033,6 +8033,7 @@ class BreadCrumbsComponent {
|
|
|
8033
8033
|
return;
|
|
8034
8034
|
}
|
|
8035
8035
|
else {
|
|
8036
|
+
debugger;
|
|
8036
8037
|
let relativePath = 'rakpiBrowser';
|
|
8037
8038
|
this.getKpiName(value, relativePath);
|
|
8038
8039
|
setTimeout(() => {
|
|
@@ -8058,12 +8059,14 @@ class BreadCrumbsComponent {
|
|
|
8058
8059
|
'desc': result['desc'],
|
|
8059
8060
|
'relativePath': result['relativePath'],
|
|
8060
8061
|
'kpiId': result['id'],
|
|
8062
|
+
'pageId': result['pageId'],
|
|
8061
8063
|
'isBookmarked': result['isBookmarked'],
|
|
8062
8064
|
};
|
|
8063
8065
|
}
|
|
8064
8066
|
item['externalLink'] = relativePath + '/' + result['name'];
|
|
8065
8067
|
item['tid'] = result['tid'];
|
|
8066
8068
|
item['id'] = result['id'];
|
|
8069
|
+
item['pageId'] = result['pageId'];
|
|
8067
8070
|
item['name'] = result['name'];
|
|
8068
8071
|
this.kpiListData.push(item);
|
|
8069
8072
|
});
|
|
@@ -8074,11 +8077,13 @@ class BreadCrumbsComponent {
|
|
|
8074
8077
|
const item = {};
|
|
8075
8078
|
item["relativePath"] = result.relativePath;
|
|
8076
8079
|
item["name"] = result["name"];
|
|
8080
|
+
item["pageId"] = result["pageId"];
|
|
8077
8081
|
item["tid"] = result["tid"].trim();
|
|
8078
8082
|
if (result["nodes"] !== undefined) {
|
|
8079
8083
|
item["nodes"] = this.getBreadCrumbsData(result["nodes"]);
|
|
8080
8084
|
}
|
|
8081
|
-
|
|
8085
|
+
debugger;
|
|
8086
|
+
this.kpi_names[result["pageId"]] = item["tid"];
|
|
8082
8087
|
structures[result["tid"]] = item;
|
|
8083
8088
|
this.kpi_structures[result["tid"]] = item;
|
|
8084
8089
|
});
|
|
@@ -8093,7 +8098,7 @@ class BreadCrumbsComponent {
|
|
|
8093
8098
|
else {
|
|
8094
8099
|
kpiContainer = this.getBreadCrumbsData(this.commonService.allKpibrowserDetailContainer);
|
|
8095
8100
|
}
|
|
8096
|
-
const kpiId = this.activatedRoute.snapshot.queryParams['
|
|
8101
|
+
const kpiId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
8097
8102
|
const kpiTid = this.kpi_names[kpiId];
|
|
8098
8103
|
const props = this.kpi_structures[kpiTid];
|
|
8099
8104
|
const propsList = props["relativePath"] + "/" + props["name"];
|
|
@@ -8374,7 +8379,9 @@ class AppAdvanceHeaderComponent {
|
|
|
8374
8379
|
else if (displayEndDate) {
|
|
8375
8380
|
selectedText = displayEndDate;
|
|
8376
8381
|
}
|
|
8377
|
-
const element =
|
|
8382
|
+
const element = this.filterObjects?.widgetId
|
|
8383
|
+
? document.getElementById(this.filterObjects.widgetId)
|
|
8384
|
+
: null;
|
|
8378
8385
|
if (element) {
|
|
8379
8386
|
element.innerText = selectedText;
|
|
8380
8387
|
}
|
|
@@ -18487,7 +18494,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
18487
18494
|
}] } });
|
|
18488
18495
|
|
|
18489
18496
|
class KpiWithDataSetTestComponent {
|
|
18490
|
-
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, chatApiService, storage) {
|
|
18497
|
+
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, chatApiService, storage, cdr) {
|
|
18491
18498
|
this.commonService = commonService;
|
|
18492
18499
|
this.activatedRoute = activatedRoute;
|
|
18493
18500
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -18498,6 +18505,7 @@ class KpiWithDataSetTestComponent {
|
|
|
18498
18505
|
this.datasetService = datasetService;
|
|
18499
18506
|
this.chatApiService = chatApiService;
|
|
18500
18507
|
this.storage = storage;
|
|
18508
|
+
this.cdr = cdr;
|
|
18501
18509
|
this.dashbord_container = [];
|
|
18502
18510
|
this.widget_width = ['w-full', 'w-1/2', 'w-1/3', 'w-1/4', 'w-1/5', 'w-1/6'];
|
|
18503
18511
|
this.page_title = 'Dashboard';
|
|
@@ -18549,29 +18557,32 @@ class KpiWithDataSetTestComponent {
|
|
|
18549
18557
|
});
|
|
18550
18558
|
this.loadingModal = true;
|
|
18551
18559
|
this.pageId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
18560
|
+
const { pageId } = this.activatedRoute.snapshot.queryParams;
|
|
18561
|
+
if (this.pageId) {
|
|
18562
|
+
this.router.navigate([], {
|
|
18563
|
+
queryParams: { pageId },
|
|
18564
|
+
replaceUrl: true,
|
|
18565
|
+
});
|
|
18566
|
+
}
|
|
18552
18567
|
this.getPadeDataSource(false);
|
|
18553
18568
|
}
|
|
18554
18569
|
async getFiltersForTemplate(filter) {
|
|
18555
18570
|
this.filters = filter;
|
|
18556
|
-
this.defaultStartDate = filter.startDate;
|
|
18557
|
-
this.defaultEndDate = filter.endDate;
|
|
18558
18571
|
filter.operationFilter['startDate'] = filter.startDate;
|
|
18559
18572
|
filter.operationFilter['endDate'] = filter.endDate;
|
|
18560
18573
|
this.loadingModal = true;
|
|
18561
|
-
this.dashBoardWidgetConfig = [];
|
|
18562
|
-
let navigation = {
|
|
18563
|
-
queryParams: filter.operationFilter,
|
|
18564
|
-
queryParamsHandling: "merge"
|
|
18565
|
-
};
|
|
18566
|
-
this.router.navigate([], navigation);
|
|
18567
18574
|
await this.getPadeDataSource(true);
|
|
18568
18575
|
this.uniqueDataSetObject = {};
|
|
18569
18576
|
let apiCalls = [];
|
|
18570
18577
|
this.allWidgetByDataset.forEach(view => {
|
|
18571
18578
|
view.datasetIds.forEach(id => {
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18579
|
+
if (view.widgetId == filter.filterObjects.widgetId) {
|
|
18580
|
+
let found = this.dataSetModal.find(d => d.datasetId === id);
|
|
18581
|
+
let widgetFilter = this.getWidgetFilterItems(filter.filterObjects.filters.filterItems);
|
|
18582
|
+
view.filters = widgetFilter;
|
|
18583
|
+
if (found) {
|
|
18584
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(found, id, widgetFilter));
|
|
18585
|
+
}
|
|
18575
18586
|
}
|
|
18576
18587
|
});
|
|
18577
18588
|
});
|
|
@@ -18579,9 +18590,39 @@ class KpiWithDataSetTestComponent {
|
|
|
18579
18590
|
this.globalDefaultFilter = filter;
|
|
18580
18591
|
this.uniqueDataSetObject = this.datasetService.getUniqueDataSetObject();
|
|
18581
18592
|
this.createDivElements(this.uniqueDataSetObject, true);
|
|
18593
|
+
this.cdr.detectChanges();
|
|
18582
18594
|
this.loadingModal = false;
|
|
18583
18595
|
});
|
|
18584
18596
|
}
|
|
18597
|
+
getWidgetFilterItems(widgetFilterData) {
|
|
18598
|
+
let apiJsonObject = {};
|
|
18599
|
+
apiJsonObject['operationFilter'] = {};
|
|
18600
|
+
widgetFilterData.forEach(element => {
|
|
18601
|
+
if (element.filterType == 'date' || element.filterType == 'datetime') {
|
|
18602
|
+
apiJsonObject['operationFilter'][element.apiName] = moment$1(element.filterDataSourceValue).format(element.momentFormat);
|
|
18603
|
+
}
|
|
18604
|
+
else {
|
|
18605
|
+
if ((typeof element.filterDataSourceValue === "string" && element.filterDataSourceValue !== "") ||
|
|
18606
|
+
(Array.isArray(element.filterDataSourceValue) && element.filterDataSourceValue.length > 0)) {
|
|
18607
|
+
if (element.operatorName !== "") {
|
|
18608
|
+
if (element.filterType == "content") {
|
|
18609
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
18610
|
+
}
|
|
18611
|
+
if (element.filterType == "single") {
|
|
18612
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
18613
|
+
}
|
|
18614
|
+
else {
|
|
18615
|
+
apiJsonObject['operationFilter'][element.operatorName] = Array.isArray(element.filterDataSourceValue) ? element.filterDataSourceValue : [element.filterDataSourceValue];
|
|
18616
|
+
}
|
|
18617
|
+
}
|
|
18618
|
+
else {
|
|
18619
|
+
apiJsonObject[element.apiName] = element.filterDataSourceValue;
|
|
18620
|
+
}
|
|
18621
|
+
}
|
|
18622
|
+
}
|
|
18623
|
+
});
|
|
18624
|
+
return apiJsonObject;
|
|
18625
|
+
}
|
|
18585
18626
|
getPadeDataSource(context) {
|
|
18586
18627
|
return new Promise((resolve, reject) => {
|
|
18587
18628
|
this.service.getAppPageDetailConfig(this.pageId).subscribe({
|
|
@@ -18977,6 +19018,7 @@ class KpiWithDataSetTestComponent {
|
|
|
18977
19018
|
dynamicComponentInstance.selectedDates = selectedDates;
|
|
18978
19019
|
dynamicComponentInstance.filterItems = filterItems;
|
|
18979
19020
|
dynamicComponentInstance.contextFilterItems = context_filter;
|
|
19021
|
+
dynamicComponentInstance.filterObjects = indexObj;
|
|
18980
19022
|
dynamicComponentInstance.pageTitle = this.pageTitle;
|
|
18981
19023
|
dynamicComponentInstance.bread_crumbs_container = this.kpi_breadcrumbs_container;
|
|
18982
19024
|
dynamicComponentInstance.isEditButton = (userName && userName == "admin") ? true : false;
|
|
@@ -19664,12 +19706,12 @@ class KpiWithDataSetTestComponent {
|
|
|
19664
19706
|
return results.join('\n');
|
|
19665
19707
|
}
|
|
19666
19708
|
}
|
|
19667
|
-
KpiWithDataSetTestComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithDataSetTestComponent, deps: [{ token: CommonService }, { token: i2.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: KpiWithSingleLayoutService }, { token: i3$1.ToastrService }, { token: i2.Router }, { token: SingleLayoutApplicationDatssetsCall }, { token: ApplicationChatApiCallService }, { token: AppSingleLayoutLocalStorage }], target: i0.ɵɵFactoryTarget.Component });
|
|
19709
|
+
KpiWithDataSetTestComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithDataSetTestComponent, deps: [{ token: CommonService }, { token: i2.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: KpiWithSingleLayoutService }, { token: i3$1.ToastrService }, { token: i2.Router }, { token: SingleLayoutApplicationDatssetsCall }, { token: ApplicationChatApiCallService }, { token: AppSingleLayoutLocalStorage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
19668
19710
|
KpiWithDataSetTestComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KpiWithDataSetTestComponent, selector: "app-kpi-with-dataset", viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }, { propertyName: "dynamicContainer", first: true, predicate: ["dynamicContainer"], descendants: true, static: true }, { propertyName: "dynamicContainerForPopup", first: true, predicate: ["dynamicContainerForPopup"], descendants: true, static: true }], ngImport: i0, template: "<app-loading *ngIf=\"loadingModal\"></app-loading>\n\n<div class=\"w-full\">\n <div class=\"flex flex-wrap \" #dynamicContainer></div>\n</div>\n\n<dx-popup [(visible)]=\"isWidgetFilters\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"800\" [height]=\"400\"\n [showTitle]=\"true\" class=\"popup\" title=\"Dataset Filter\">\n <div *dxTemplate=\"let data of 'content'\">\n <div class=\"my-2\">\n <dx-scroll-view [width]=\"'100%'\" [height]=\"'85%'\">\n <ng-container *ngFor=\"let item of nodeproperticeFilterDataSource.havingConfig; let i = index\">\n <div class=\"flex flex-row my-2\">\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"m-1\">\n <dx-select-box [items]=\"['get','let']\" [(ngModel)]=\"item.operator\"\n placeholder=\"Operator\"></dx-select-box>\n </div>\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n </div>\n </ng-container>\n\n </dx-scroll-view>\n <div class=\"flex justify-end mx-1 flex-grow border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mt-2\"\n (click)=\"submitFilter()\">Submit</button>\n </div>\n\n </div>\n\n </div>\n</dx-popup>\n<dx-popup [(visible)]=\"isPopupView\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"1000\" [height]=\"'auto'\"\n [showTitle]=\"true\" class=\"popup\" title=\"Popup View\">\n <div *dxTemplate=\"let data of 'content'\">\n <div class=\"w-full\">\n <app-dynamic-widget [modalConfigs]=\"modalConfigs\" [contextMenuDataSource]=\"contextMenuDataSource\">\n </app-dynamic-widget>\n </div>\n </div>\n</dx-popup>", styles: [".custom-tooltip{display:none;position:absolute;top:100%;left:0;background:rgba(0,0,0,.8);color:#fff;padding:8px;border-radius:5px;font-size:12px;white-space:nowrap;z-index:100}\n"], 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: LoadingComponent$1, selector: "app-loading" }, { kind: "directive", type: i5.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i9$1.DxPopupComponent, selector: "dx-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "elementAttr", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "accessKeyChange", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "dragAndResizeAreaChange", "dragEnabledChange", "dragOutsideBoundaryChange", "elementAttrChange", "focusStateEnabledChange", "fullScreenChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "resizeEnabledChange", "restorePositionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showTitleChange", "tabIndexChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i10$1.DxScrollViewComponent, selector: "dx-scroll-view", inputs: ["bounceEnabled", "direction", "disabled", "elementAttr", "height", "pulledDownText", "pullingDownText", "reachBottomText", "refreshingText", "rtlEnabled", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onPullDown", "onReachBottom", "onScroll", "onUpdated", "bounceEnabledChange", "directionChange", "disabledChange", "elementAttrChange", "heightChange", "pulledDownTextChange", "pullingDownTextChange", "reachBottomTextChange", "refreshingTextChange", "rtlEnabledChange", "scrollByContentChange", "scrollByThumbChange", "showScrollbarChange", "useNativeChange", "widthChange"] }, { 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: DynamicWidgetComponent, selector: "app-dynamic-widget", inputs: ["view", "datasetById", "contextMenuDataSource", "modalConfigs"] }] });
|
|
19669
19711
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithDataSetTestComponent, decorators: [{
|
|
19670
19712
|
type: Component,
|
|
19671
19713
|
args: [{ selector: 'app-kpi-with-dataset', template: "<app-loading *ngIf=\"loadingModal\"></app-loading>\n\n<div class=\"w-full\">\n <div class=\"flex flex-wrap \" #dynamicContainer></div>\n</div>\n\n<dx-popup [(visible)]=\"isWidgetFilters\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"800\" [height]=\"400\"\n [showTitle]=\"true\" class=\"popup\" title=\"Dataset Filter\">\n <div *dxTemplate=\"let data of 'content'\">\n <div class=\"my-2\">\n <dx-scroll-view [width]=\"'100%'\" [height]=\"'85%'\">\n <ng-container *ngFor=\"let item of nodeproperticeFilterDataSource.havingConfig; let i = index\">\n <div class=\"flex flex-row my-2\">\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"m-1\">\n <dx-select-box [items]=\"['get','let']\" [(ngModel)]=\"item.operator\"\n placeholder=\"Operator\"></dx-select-box>\n </div>\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n </div>\n </ng-container>\n\n </dx-scroll-view>\n <div class=\"flex justify-end mx-1 flex-grow border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mt-2\"\n (click)=\"submitFilter()\">Submit</button>\n </div>\n\n </div>\n\n </div>\n</dx-popup>\n<dx-popup [(visible)]=\"isPopupView\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"1000\" [height]=\"'auto'\"\n [showTitle]=\"true\" class=\"popup\" title=\"Popup View\">\n <div *dxTemplate=\"let data of 'content'\">\n <div class=\"w-full\">\n <app-dynamic-widget [modalConfigs]=\"modalConfigs\" [contextMenuDataSource]=\"contextMenuDataSource\">\n </app-dynamic-widget>\n </div>\n </div>\n</dx-popup>", styles: [".custom-tooltip{display:none;position:absolute;top:100%;left:0;background:rgba(0,0,0,.8);color:#fff;padding:8px;border-radius:5px;font-size:12px;white-space:nowrap;z-index:100}\n"] }]
|
|
19672
|
-
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: KpiWithSingleLayoutService }, { type: i3$1.ToastrService }, { type: i2.Router }, { type: SingleLayoutApplicationDatssetsCall }, { type: ApplicationChatApiCallService }, { type: AppSingleLayoutLocalStorage }]; }, propDecorators: { dynamicComponentContainer: [{
|
|
19714
|
+
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: KpiWithSingleLayoutService }, { type: i3$1.ToastrService }, { type: i2.Router }, { type: SingleLayoutApplicationDatssetsCall }, { type: ApplicationChatApiCallService }, { type: AppSingleLayoutLocalStorage }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { dynamicComponentContainer: [{
|
|
19673
19715
|
type: ViewChild,
|
|
19674
19716
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
19675
19717
|
}], containerRef: [{
|
|
@@ -20498,7 +20540,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
20498
20540
|
}] }]; } });
|
|
20499
20541
|
|
|
20500
20542
|
class KpiWithMultilayoutSetTestComponent {
|
|
20501
|
-
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage) {
|
|
20543
|
+
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage, cdr) {
|
|
20502
20544
|
this.commonService = commonService;
|
|
20503
20545
|
this.activatedRoute = activatedRoute;
|
|
20504
20546
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -20508,6 +20550,7 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
20508
20550
|
this.router = router;
|
|
20509
20551
|
this.datasetService = datasetService;
|
|
20510
20552
|
this.storage = storage;
|
|
20553
|
+
this.cdr = cdr;
|
|
20511
20554
|
this.dashbord_container = [];
|
|
20512
20555
|
this.widget_width = ['w-full', 'w-1/2', 'w-1/3', 'w-1/4', 'w-1/5', 'w-1/6'];
|
|
20513
20556
|
this.page_title = 'Dashboard';
|
|
@@ -20584,6 +20627,35 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
20584
20627
|
this.loadingModal = false;
|
|
20585
20628
|
});
|
|
20586
20629
|
}
|
|
20630
|
+
getWidgetFilterItems(widgetFilterData) {
|
|
20631
|
+
let apiJsonObject = {};
|
|
20632
|
+
apiJsonObject['operationFilter'] = {};
|
|
20633
|
+
widgetFilterData.forEach(element => {
|
|
20634
|
+
if (element.filterType == 'date' || element.filterType == 'datetime') {
|
|
20635
|
+
apiJsonObject['operationFilter'][element.apiName] = moment$1(element.filterDataSourceValue).format(element.momentFormat);
|
|
20636
|
+
}
|
|
20637
|
+
else {
|
|
20638
|
+
if ((typeof element.filterDataSourceValue === "string" && element.filterDataSourceValue !== "") ||
|
|
20639
|
+
(Array.isArray(element.filterDataSourceValue) && element.filterDataSourceValue.length > 0)) {
|
|
20640
|
+
if (element.operatorName !== "") {
|
|
20641
|
+
if (element.filterType == "content") {
|
|
20642
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
20643
|
+
}
|
|
20644
|
+
if (element.filterType == "single") {
|
|
20645
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
20646
|
+
}
|
|
20647
|
+
else {
|
|
20648
|
+
apiJsonObject['operationFilter'][element.operatorName] = Array.isArray(element.filterDataSourceValue) ? element.filterDataSourceValue : [element.filterDataSourceValue];
|
|
20649
|
+
}
|
|
20650
|
+
}
|
|
20651
|
+
else {
|
|
20652
|
+
apiJsonObject[element.apiName] = element.filterDataSourceValue;
|
|
20653
|
+
}
|
|
20654
|
+
}
|
|
20655
|
+
}
|
|
20656
|
+
});
|
|
20657
|
+
return apiJsonObject;
|
|
20658
|
+
}
|
|
20587
20659
|
getPadeDataSource(context) {
|
|
20588
20660
|
return new Promise((resolve, reject) => {
|
|
20589
20661
|
this.service.getAppPageDetailConfig(this.pageId).subscribe({
|
|
@@ -20922,6 +20994,7 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
20922
20994
|
dynamicComponentInstance.selectedDates = selectedDates;
|
|
20923
20995
|
dynamicComponentInstance.filterItems = filterItems;
|
|
20924
20996
|
dynamicComponentInstance.contextFilterItems = context_filter;
|
|
20997
|
+
dynamicComponentInstance.filterObjects = indexObj;
|
|
20925
20998
|
dynamicComponentInstance.pageTitle = this.pageTitle;
|
|
20926
20999
|
dynamicComponentInstance.bread_crumbs_container = this.kpi_breadcrumbs_container;
|
|
20927
21000
|
dynamicComponentInstance.isEditButton = (userName && userName == "admin") ? true : false;
|
|
@@ -21447,12 +21520,12 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
21447
21520
|
}
|
|
21448
21521
|
}
|
|
21449
21522
|
}
|
|
21450
|
-
KpiWithMultilayoutSetTestComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithMultilayoutSetTestComponent, deps: [{ token: CommonService }, { token: i2.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: KpiWithMultiLayoutService }, { token: i3$1.ToastrService }, { token: i2.Router }, { token: MultilayoutApplicationDatssetsCall }, { token: AppMultiLayoutLocalStorage }], target: i0.ɵɵFactoryTarget.Component });
|
|
21523
|
+
KpiWithMultilayoutSetTestComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithMultilayoutSetTestComponent, deps: [{ token: CommonService }, { token: i2.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: KpiWithMultiLayoutService }, { token: i3$1.ToastrService }, { token: i2.Router }, { token: MultilayoutApplicationDatssetsCall }, { token: AppMultiLayoutLocalStorage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
21451
21524
|
KpiWithMultilayoutSetTestComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KpiWithMultilayoutSetTestComponent, selector: "app-kpi-with-multilayout", viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }, { propertyName: "dynamicContainer", first: true, predicate: ["dynamicContainer"], descendants: true, static: true }], ngImport: i0, template: "<app-loading *ngIf=\"loadingModal\"></app-loading>\n\n<div class=\"w-full\">\n <div class=\"flex flex-wrap \" #dynamicContainer></div>\n</div>\n\n<dx-popup [(visible)]=\"isWidgetFilters\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"800\" [height]=\"400\"\n [showTitle]=\"true\" class=\"popup\" title=\"Dataset Filter\">\n <div *dxTemplate=\"let data of 'content'\">\n <div class=\"my-2\">\n <dx-scroll-view [width]=\"'100%'\" [height]=\"'85%'\">\n <ng-container *ngFor=\"let item of nodeproperticeFilterDataSource.havingConfig; let i = index\">\n <div class=\"flex flex-row my-2\">\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"m-1\">\n <dx-select-box [items]=\"['get','let']\" [(ngModel)]=\"item.operator\"\n placeholder=\"Operator\"></dx-select-box>\n </div>\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n </div>\n </ng-container>\n\n </dx-scroll-view>\n <div class=\"flex justify-end mx-1 flex-grow border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mt-2\"\n (click)=\"submitFilter()\">Submit</button>\n </div>\n\n </div>\n\n </div>\n</dx-popup>\n\n\n\n", styles: [""], dependencies: [{ kind: "directive", type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingComponent$1, selector: "app-loading" }, { kind: "directive", type: i5.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i9$1.DxPopupComponent, selector: "dx-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "elementAttr", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "accessKeyChange", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "dragAndResizeAreaChange", "dragEnabledChange", "dragOutsideBoundaryChange", "elementAttrChange", "focusStateEnabledChange", "fullScreenChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "resizeEnabledChange", "restorePositionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showTitleChange", "tabIndexChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i10$1.DxScrollViewComponent, selector: "dx-scroll-view", inputs: ["bounceEnabled", "direction", "disabled", "elementAttr", "height", "pulledDownText", "pullingDownText", "reachBottomText", "refreshingText", "rtlEnabled", "scrollByContent", "scrollByThumb", "showScrollbar", "useNative", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onPullDown", "onReachBottom", "onScroll", "onUpdated", "bounceEnabledChange", "directionChange", "disabledChange", "elementAttrChange", "heightChange", "pulledDownTextChange", "pullingDownTextChange", "reachBottomTextChange", "refreshingTextChange", "rtlEnabledChange", "scrollByContentChange", "scrollByThumbChange", "showScrollbarChange", "useNativeChange", "widthChange"] }, { 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"] }] });
|
|
21452
21525
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithMultilayoutSetTestComponent, decorators: [{
|
|
21453
21526
|
type: Component,
|
|
21454
21527
|
args: [{ selector: 'app-kpi-with-multilayout', template: "<app-loading *ngIf=\"loadingModal\"></app-loading>\n\n<div class=\"w-full\">\n <div class=\"flex flex-wrap \" #dynamicContainer></div>\n</div>\n\n<dx-popup [(visible)]=\"isWidgetFilters\" [closeOnOutsideClick]=\"false\" [dragEnabled]=\"false\" [width]=\"800\" [height]=\"400\"\n [showTitle]=\"true\" class=\"popup\" title=\"Dataset Filter\">\n <div *dxTemplate=\"let data of 'content'\">\n <div class=\"my-2\">\n <dx-scroll-view [width]=\"'100%'\" [height]=\"'85%'\">\n <ng-container *ngFor=\"let item of nodeproperticeFilterDataSource.havingConfig; let i = index\">\n <div class=\"flex flex-row my-2\">\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.columnName\"></dx-text-box>\n </div>\n <div class=\"m-1\">\n <dx-select-box [items]=\"['get','let']\" [(ngModel)]=\"item.operator\"\n placeholder=\"Operator\"></dx-select-box>\n </div>\n <div class=\"m-1\">\n <dx-text-box [(ngModel)]=\"item.value\"></dx-text-box>\n </div>\n </div>\n </ng-container>\n\n </dx-scroll-view>\n <div class=\"flex justify-end mx-1 flex-grow border-t\">\n <button class=\"{{commonService.btn_success_md}} cursor-pointer mt-2\"\n (click)=\"submitFilter()\">Submit</button>\n </div>\n\n </div>\n\n </div>\n</dx-popup>\n\n\n\n" }]
|
|
21455
|
-
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: KpiWithMultiLayoutService }, { type: i3$1.ToastrService }, { type: i2.Router }, { type: MultilayoutApplicationDatssetsCall }, { type: AppMultiLayoutLocalStorage }]; }, propDecorators: { dynamicComponentContainer: [{
|
|
21528
|
+
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: KpiWithMultiLayoutService }, { type: i3$1.ToastrService }, { type: i2.Router }, { type: MultilayoutApplicationDatssetsCall }, { type: AppMultiLayoutLocalStorage }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { dynamicComponentContainer: [{
|
|
21456
21529
|
type: ViewChild,
|
|
21457
21530
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
21458
21531
|
}], containerRef: [{
|
|
@@ -22110,7 +22183,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
22110
22183
|
}] }]; } });
|
|
22111
22184
|
|
|
22112
22185
|
class LandingComponentComponent {
|
|
22113
|
-
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage) {
|
|
22186
|
+
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage, cdr) {
|
|
22114
22187
|
this.commonService = commonService;
|
|
22115
22188
|
this.activatedRoute = activatedRoute;
|
|
22116
22189
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -22120,6 +22193,7 @@ class LandingComponentComponent {
|
|
|
22120
22193
|
this.router = router;
|
|
22121
22194
|
this.datasetService = datasetService;
|
|
22122
22195
|
this.storage = storage;
|
|
22196
|
+
this.cdr = cdr;
|
|
22123
22197
|
this.dashbord_container = [];
|
|
22124
22198
|
this.widget_width = ['w-full', 'w-1/2', 'w-1/3', 'w-1/4', 'w-1/5', 'w-1/6'];
|
|
22125
22199
|
this.page_title = 'Dashboard';
|
|
@@ -22166,29 +22240,43 @@ class LandingComponentComponent {
|
|
|
22166
22240
|
ngOnInit() {
|
|
22167
22241
|
this.loadingModal = true;
|
|
22168
22242
|
this.pageId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
22169
|
-
this.
|
|
22243
|
+
const { pageId } = this.activatedRoute.snapshot.queryParams;
|
|
22244
|
+
if (this.pageId) {
|
|
22245
|
+
this.router.navigate([], {
|
|
22246
|
+
queryParams: { pageId },
|
|
22247
|
+
replaceUrl: true,
|
|
22248
|
+
});
|
|
22249
|
+
}
|
|
22170
22250
|
}
|
|
22171
22251
|
async getFiltersForTemplate(filter) {
|
|
22172
22252
|
this.filters = filter;
|
|
22173
|
-
this.defaultStartDate = filter.startDate;
|
|
22174
|
-
this.defaultEndDate = filter.endDate;
|
|
22175
22253
|
filter.operationFilter['startDate'] = filter.startDate;
|
|
22176
22254
|
filter.operationFilter['endDate'] = filter.endDate;
|
|
22177
|
-
let navigation = {
|
|
22178
|
-
queryParams: filter.operationFilter,
|
|
22179
|
-
queryParamsHandling: "merge"
|
|
22180
|
-
};
|
|
22181
|
-
this.router.navigate([], navigation);
|
|
22182
22255
|
this.loadingModal = true;
|
|
22183
|
-
|
|
22184
|
-
|
|
22256
|
+
if (filter.filterObjects && Object.entries(filter.filterObjects).length !== 0) {
|
|
22257
|
+
if (Array.isArray(this.dashBoardWidgetConfig.widgets)) {
|
|
22258
|
+
const index = this.dashBoardWidgetConfig.widgets.findIndex((widget) => widget.widgetId === filter.filterObjects.widgetId);
|
|
22259
|
+
if (index !== -1) {
|
|
22260
|
+
this.dashBoardWidgetConfig.widgets[index] = filter.filterObjects;
|
|
22261
|
+
}
|
|
22262
|
+
else {
|
|
22263
|
+
}
|
|
22264
|
+
}
|
|
22265
|
+
}
|
|
22266
|
+
else {
|
|
22267
|
+
await this.getPadeDataSource(true);
|
|
22268
|
+
}
|
|
22185
22269
|
this.uniqueDataSetObject = {};
|
|
22186
22270
|
let apiCalls = [];
|
|
22187
22271
|
this.allWidgetByDataset.forEach(view => {
|
|
22188
22272
|
view.datasetIds.forEach(id => {
|
|
22189
|
-
|
|
22190
|
-
|
|
22191
|
-
|
|
22273
|
+
if (view.widgetId == filter.filterObjects.widgetId) {
|
|
22274
|
+
let found = this.dataSetModal.find(d => d.datasetId === id);
|
|
22275
|
+
let widgetFilter = this.getWidgetFilterItems(filter.filterObjects.filters.filterItems);
|
|
22276
|
+
view.filters = widgetFilter;
|
|
22277
|
+
if (found) {
|
|
22278
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(found, id, widgetFilter));
|
|
22279
|
+
}
|
|
22192
22280
|
}
|
|
22193
22281
|
});
|
|
22194
22282
|
});
|
|
@@ -22196,9 +22284,39 @@ class LandingComponentComponent {
|
|
|
22196
22284
|
this.globalDefaultFilter = filter;
|
|
22197
22285
|
this.uniqueDataSetObject = this.datasetService.getUniqueDataSetObject();
|
|
22198
22286
|
this.createDivElements(this.uniqueDataSetObject, true);
|
|
22287
|
+
this.cdr.detectChanges();
|
|
22199
22288
|
this.loadingModal = false;
|
|
22200
22289
|
});
|
|
22201
22290
|
}
|
|
22291
|
+
getWidgetFilterItems(widgetFilterData) {
|
|
22292
|
+
let apiJsonObject = {};
|
|
22293
|
+
apiJsonObject['operationFilter'] = {};
|
|
22294
|
+
widgetFilterData.forEach(element => {
|
|
22295
|
+
if (element.filterType == 'date' || element.filterType == 'datetime') {
|
|
22296
|
+
apiJsonObject['operationFilter'][element.apiName] = moment$1(element.filterDataSourceValue).format(element.momentFormat);
|
|
22297
|
+
}
|
|
22298
|
+
else {
|
|
22299
|
+
if ((typeof element.filterDataSourceValue === "string" && element.filterDataSourceValue !== "") ||
|
|
22300
|
+
(Array.isArray(element.filterDataSourceValue) && element.filterDataSourceValue.length > 0)) {
|
|
22301
|
+
if (element.operatorName !== "") {
|
|
22302
|
+
if (element.filterType == "content") {
|
|
22303
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
22304
|
+
}
|
|
22305
|
+
if (element.filterType == "single") {
|
|
22306
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
22307
|
+
}
|
|
22308
|
+
else {
|
|
22309
|
+
apiJsonObject['operationFilter'][element.operatorName] = Array.isArray(element.filterDataSourceValue) ? element.filterDataSourceValue : [element.filterDataSourceValue];
|
|
22310
|
+
}
|
|
22311
|
+
}
|
|
22312
|
+
else {
|
|
22313
|
+
apiJsonObject[element.apiName] = element.filterDataSourceValue;
|
|
22314
|
+
}
|
|
22315
|
+
}
|
|
22316
|
+
}
|
|
22317
|
+
});
|
|
22318
|
+
return apiJsonObject;
|
|
22319
|
+
}
|
|
22202
22320
|
getPadeDataSource(context) {
|
|
22203
22321
|
return new Promise((resolve, reject) => {
|
|
22204
22322
|
this.service.getAppPageDetailConfig(this.pageId).subscribe({
|
|
@@ -22596,6 +22714,7 @@ class LandingComponentComponent {
|
|
|
22596
22714
|
dynamicComponentInstance.selectedDates = selectedDates;
|
|
22597
22715
|
dynamicComponentInstance.filterItems = filterItems;
|
|
22598
22716
|
dynamicComponentInstance.contextFilterItems = context_filter;
|
|
22717
|
+
dynamicComponentInstance.filterObjects = indexObj;
|
|
22599
22718
|
dynamicComponentInstance.pageTitle = this.pageTitle;
|
|
22600
22719
|
dynamicComponentInstance.bread_crumbs_container = this.kpi_breadcrumbs_container;
|
|
22601
22720
|
dynamicComponentInstance.isEditButton = (userName && userName == "admin") ? true : false;
|
|
@@ -23279,12 +23398,12 @@ class LandingComponentComponent {
|
|
|
23279
23398
|
return results.join('\n');
|
|
23280
23399
|
}
|
|
23281
23400
|
}
|
|
23282
|
-
LandingComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LandingComponentComponent, deps: [{ token: CommonService }, { token: i2.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: LandingComponentService }, { token: i3$1.ToastrService }, { token: i2.Router }, { token: LandingApplicationDatssetsCall }, { token: AppLandingLayoutLocalStorage }], target: i0.ɵɵFactoryTarget.Component });
|
|
23401
|
+
LandingComponentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LandingComponentComponent, deps: [{ token: CommonService }, { token: i2.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: LandingComponentService }, { token: i3$1.ToastrService }, { token: i2.Router }, { token: LandingApplicationDatssetsCall }, { token: AppLandingLayoutLocalStorage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
23283
23402
|
LandingComponentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LandingComponentComponent, selector: "app-landing-component", viewQueries: [{ propertyName: "dynamicComponentContainer", first: true, predicate: ["dynamicComponentContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }, { propertyName: "dynamicContainer", first: true, predicate: ["dynamicContainer"], descendants: true, static: true }, { propertyName: "dynamicContainerForPopup", first: true, predicate: ["dynamicContainerForPopup"], descendants: true, static: true }], ngImport: i0, template: "<app-loading *ngIf=\"loadingModal\"></app-loading>\n\n<div class=\"w-full\">\n <div class=\"flex flex-wrap \" #dynamicContainer></div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: LoadingComponent$1, selector: "app-loading" }] });
|
|
23284
23403
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LandingComponentComponent, decorators: [{
|
|
23285
23404
|
type: Component,
|
|
23286
23405
|
args: [{ selector: 'app-landing-component', template: "<app-loading *ngIf=\"loadingModal\"></app-loading>\n\n<div class=\"w-full\">\n <div class=\"flex flex-wrap \" #dynamicContainer></div>\n</div>" }]
|
|
23287
|
-
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: LandingComponentService }, { type: i3$1.ToastrService }, { type: i2.Router }, { type: LandingApplicationDatssetsCall }, { type: AppLandingLayoutLocalStorage }]; }, propDecorators: { dynamicComponentContainer: [{
|
|
23406
|
+
}], ctorParameters: function () { return [{ type: CommonService }, { type: i2.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: LandingComponentService }, { type: i3$1.ToastrService }, { type: i2.Router }, { type: LandingApplicationDatssetsCall }, { type: AppLandingLayoutLocalStorage }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { dynamicComponentContainer: [{
|
|
23288
23407
|
type: ViewChild,
|
|
23289
23408
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
23290
23409
|
}], containerRef: [{
|