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
|
@@ -8047,6 +8047,7 @@ class BreadCrumbsComponent {
|
|
|
8047
8047
|
return;
|
|
8048
8048
|
}
|
|
8049
8049
|
else {
|
|
8050
|
+
debugger;
|
|
8050
8051
|
let relativePath = 'rakpiBrowser';
|
|
8051
8052
|
this.getKpiName(value, relativePath);
|
|
8052
8053
|
setTimeout(() => {
|
|
@@ -8072,12 +8073,14 @@ class BreadCrumbsComponent {
|
|
|
8072
8073
|
'desc': result['desc'],
|
|
8073
8074
|
'relativePath': result['relativePath'],
|
|
8074
8075
|
'kpiId': result['id'],
|
|
8076
|
+
'pageId': result['pageId'],
|
|
8075
8077
|
'isBookmarked': result['isBookmarked'],
|
|
8076
8078
|
};
|
|
8077
8079
|
}
|
|
8078
8080
|
item['externalLink'] = relativePath + '/' + result['name'];
|
|
8079
8081
|
item['tid'] = result['tid'];
|
|
8080
8082
|
item['id'] = result['id'];
|
|
8083
|
+
item['pageId'] = result['pageId'];
|
|
8081
8084
|
item['name'] = result['name'];
|
|
8082
8085
|
this.kpiListData.push(item);
|
|
8083
8086
|
});
|
|
@@ -8088,11 +8091,13 @@ class BreadCrumbsComponent {
|
|
|
8088
8091
|
const item = {};
|
|
8089
8092
|
item["relativePath"] = result.relativePath;
|
|
8090
8093
|
item["name"] = result["name"];
|
|
8094
|
+
item["pageId"] = result["pageId"];
|
|
8091
8095
|
item["tid"] = result["tid"].trim();
|
|
8092
8096
|
if (result["nodes"] !== undefined) {
|
|
8093
8097
|
item["nodes"] = this.getBreadCrumbsData(result["nodes"]);
|
|
8094
8098
|
}
|
|
8095
|
-
|
|
8099
|
+
debugger;
|
|
8100
|
+
this.kpi_names[result["pageId"]] = item["tid"];
|
|
8096
8101
|
structures[result["tid"]] = item;
|
|
8097
8102
|
this.kpi_structures[result["tid"]] = item;
|
|
8098
8103
|
});
|
|
@@ -8107,7 +8112,7 @@ class BreadCrumbsComponent {
|
|
|
8107
8112
|
else {
|
|
8108
8113
|
kpiContainer = this.getBreadCrumbsData(this.commonService.allKpibrowserDetailContainer);
|
|
8109
8114
|
}
|
|
8110
|
-
const kpiId = this.activatedRoute.snapshot.queryParams['
|
|
8115
|
+
const kpiId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
8111
8116
|
const kpiTid = this.kpi_names[kpiId];
|
|
8112
8117
|
const props = this.kpi_structures[kpiTid];
|
|
8113
8118
|
const propsList = props["relativePath"] + "/" + props["name"];
|
|
@@ -8336,6 +8341,7 @@ class AppAdvanceHeaderComponent {
|
|
|
8336
8341
|
this.isAdvanceFilter = true;
|
|
8337
8342
|
}
|
|
8338
8343
|
getSerchFilter(filter) {
|
|
8344
|
+
var _a;
|
|
8339
8345
|
this.isAdvanceFilter = false;
|
|
8340
8346
|
let displayStartDate = '';
|
|
8341
8347
|
let displayEndDate = '';
|
|
@@ -8389,7 +8395,9 @@ class AppAdvanceHeaderComponent {
|
|
|
8389
8395
|
else if (displayEndDate) {
|
|
8390
8396
|
selectedText = displayEndDate;
|
|
8391
8397
|
}
|
|
8392
|
-
const element =
|
|
8398
|
+
const element = ((_a = this.filterObjects) === null || _a === void 0 ? void 0 : _a.widgetId)
|
|
8399
|
+
? document.getElementById(this.filterObjects.widgetId)
|
|
8400
|
+
: null;
|
|
8393
8401
|
if (element) {
|
|
8394
8402
|
element.innerText = selectedText;
|
|
8395
8403
|
}
|
|
@@ -18506,7 +18514,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
18506
18514
|
}] } });
|
|
18507
18515
|
|
|
18508
18516
|
class KpiWithDataSetTestComponent {
|
|
18509
|
-
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, chatApiService, storage) {
|
|
18517
|
+
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, chatApiService, storage, cdr) {
|
|
18510
18518
|
this.commonService = commonService;
|
|
18511
18519
|
this.activatedRoute = activatedRoute;
|
|
18512
18520
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -18517,6 +18525,7 @@ class KpiWithDataSetTestComponent {
|
|
|
18517
18525
|
this.datasetService = datasetService;
|
|
18518
18526
|
this.chatApiService = chatApiService;
|
|
18519
18527
|
this.storage = storage;
|
|
18528
|
+
this.cdr = cdr;
|
|
18520
18529
|
this.dashbord_container = [];
|
|
18521
18530
|
this.widget_width = ['w-full', 'w-1/2', 'w-1/3', 'w-1/4', 'w-1/5', 'w-1/6'];
|
|
18522
18531
|
this.page_title = 'Dashboard';
|
|
@@ -18568,30 +18577,33 @@ class KpiWithDataSetTestComponent {
|
|
|
18568
18577
|
});
|
|
18569
18578
|
this.loadingModal = true;
|
|
18570
18579
|
this.pageId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
18580
|
+
const { pageId } = this.activatedRoute.snapshot.queryParams;
|
|
18581
|
+
if (this.pageId) {
|
|
18582
|
+
this.router.navigate([], {
|
|
18583
|
+
queryParams: { pageId },
|
|
18584
|
+
replaceUrl: true,
|
|
18585
|
+
});
|
|
18586
|
+
}
|
|
18571
18587
|
this.getPadeDataSource(false);
|
|
18572
18588
|
}
|
|
18573
18589
|
getFiltersForTemplate(filter) {
|
|
18574
18590
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18575
18591
|
this.filters = filter;
|
|
18576
|
-
this.defaultStartDate = filter.startDate;
|
|
18577
|
-
this.defaultEndDate = filter.endDate;
|
|
18578
18592
|
filter.operationFilter['startDate'] = filter.startDate;
|
|
18579
18593
|
filter.operationFilter['endDate'] = filter.endDate;
|
|
18580
18594
|
this.loadingModal = true;
|
|
18581
|
-
this.dashBoardWidgetConfig = [];
|
|
18582
|
-
let navigation = {
|
|
18583
|
-
queryParams: filter.operationFilter,
|
|
18584
|
-
queryParamsHandling: "merge"
|
|
18585
|
-
};
|
|
18586
|
-
this.router.navigate([], navigation);
|
|
18587
18595
|
yield this.getPadeDataSource(true);
|
|
18588
18596
|
this.uniqueDataSetObject = {};
|
|
18589
18597
|
let apiCalls = [];
|
|
18590
18598
|
this.allWidgetByDataset.forEach(view => {
|
|
18591
18599
|
view.datasetIds.forEach(id => {
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18600
|
+
if (view.widgetId == filter.filterObjects.widgetId) {
|
|
18601
|
+
let found = this.dataSetModal.find(d => d.datasetId === id);
|
|
18602
|
+
let widgetFilter = this.getWidgetFilterItems(filter.filterObjects.filters.filterItems);
|
|
18603
|
+
view.filters = widgetFilter;
|
|
18604
|
+
if (found) {
|
|
18605
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(found, id, widgetFilter));
|
|
18606
|
+
}
|
|
18595
18607
|
}
|
|
18596
18608
|
});
|
|
18597
18609
|
});
|
|
@@ -18599,10 +18611,40 @@ class KpiWithDataSetTestComponent {
|
|
|
18599
18611
|
this.globalDefaultFilter = filter;
|
|
18600
18612
|
this.uniqueDataSetObject = this.datasetService.getUniqueDataSetObject();
|
|
18601
18613
|
this.createDivElements(this.uniqueDataSetObject, true);
|
|
18614
|
+
this.cdr.detectChanges();
|
|
18602
18615
|
this.loadingModal = false;
|
|
18603
18616
|
});
|
|
18604
18617
|
});
|
|
18605
18618
|
}
|
|
18619
|
+
getWidgetFilterItems(widgetFilterData) {
|
|
18620
|
+
let apiJsonObject = {};
|
|
18621
|
+
apiJsonObject['operationFilter'] = {};
|
|
18622
|
+
widgetFilterData.forEach(element => {
|
|
18623
|
+
if (element.filterType == 'date' || element.filterType == 'datetime') {
|
|
18624
|
+
apiJsonObject['operationFilter'][element.apiName] = moment$1(element.filterDataSourceValue).format(element.momentFormat);
|
|
18625
|
+
}
|
|
18626
|
+
else {
|
|
18627
|
+
if ((typeof element.filterDataSourceValue === "string" && element.filterDataSourceValue !== "") ||
|
|
18628
|
+
(Array.isArray(element.filterDataSourceValue) && element.filterDataSourceValue.length > 0)) {
|
|
18629
|
+
if (element.operatorName !== "") {
|
|
18630
|
+
if (element.filterType == "content") {
|
|
18631
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
18632
|
+
}
|
|
18633
|
+
if (element.filterType == "single") {
|
|
18634
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
18635
|
+
}
|
|
18636
|
+
else {
|
|
18637
|
+
apiJsonObject['operationFilter'][element.operatorName] = Array.isArray(element.filterDataSourceValue) ? element.filterDataSourceValue : [element.filterDataSourceValue];
|
|
18638
|
+
}
|
|
18639
|
+
}
|
|
18640
|
+
else {
|
|
18641
|
+
apiJsonObject[element.apiName] = element.filterDataSourceValue;
|
|
18642
|
+
}
|
|
18643
|
+
}
|
|
18644
|
+
}
|
|
18645
|
+
});
|
|
18646
|
+
return apiJsonObject;
|
|
18647
|
+
}
|
|
18606
18648
|
getPadeDataSource(context) {
|
|
18607
18649
|
return new Promise((resolve, reject) => {
|
|
18608
18650
|
this.service.getAppPageDetailConfig(this.pageId).subscribe({
|
|
@@ -19003,6 +19045,7 @@ class KpiWithDataSetTestComponent {
|
|
|
19003
19045
|
dynamicComponentInstance.selectedDates = selectedDates;
|
|
19004
19046
|
dynamicComponentInstance.filterItems = filterItems;
|
|
19005
19047
|
dynamicComponentInstance.contextFilterItems = context_filter;
|
|
19048
|
+
dynamicComponentInstance.filterObjects = indexObj;
|
|
19006
19049
|
dynamicComponentInstance.pageTitle = this.pageTitle;
|
|
19007
19050
|
dynamicComponentInstance.bread_crumbs_container = this.kpi_breadcrumbs_container;
|
|
19008
19051
|
dynamicComponentInstance.isEditButton = (userName && userName == "admin") ? true : false;
|
|
@@ -19699,12 +19742,12 @@ class KpiWithDataSetTestComponent {
|
|
|
19699
19742
|
return results.join('\n');
|
|
19700
19743
|
}
|
|
19701
19744
|
}
|
|
19702
|
-
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 });
|
|
19745
|
+
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 });
|
|
19703
19746
|
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"] }] });
|
|
19704
19747
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithDataSetTestComponent, decorators: [{
|
|
19705
19748
|
type: Component,
|
|
19706
19749
|
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"] }]
|
|
19707
|
-
}], 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: [{
|
|
19750
|
+
}], 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: [{
|
|
19708
19751
|
type: ViewChild,
|
|
19709
19752
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
19710
19753
|
}], containerRef: [{
|
|
@@ -20539,7 +20582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
20539
20582
|
} });
|
|
20540
20583
|
|
|
20541
20584
|
class KpiWithMultilayoutSetTestComponent {
|
|
20542
|
-
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage) {
|
|
20585
|
+
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage, cdr) {
|
|
20543
20586
|
this.commonService = commonService;
|
|
20544
20587
|
this.activatedRoute = activatedRoute;
|
|
20545
20588
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -20549,6 +20592,7 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
20549
20592
|
this.router = router;
|
|
20550
20593
|
this.datasetService = datasetService;
|
|
20551
20594
|
this.storage = storage;
|
|
20595
|
+
this.cdr = cdr;
|
|
20552
20596
|
this.dashbord_container = [];
|
|
20553
20597
|
this.widget_width = ['w-full', 'w-1/2', 'w-1/3', 'w-1/4', 'w-1/5', 'w-1/6'];
|
|
20554
20598
|
this.page_title = 'Dashboard';
|
|
@@ -20627,6 +20671,35 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
20627
20671
|
});
|
|
20628
20672
|
});
|
|
20629
20673
|
}
|
|
20674
|
+
getWidgetFilterItems(widgetFilterData) {
|
|
20675
|
+
let apiJsonObject = {};
|
|
20676
|
+
apiJsonObject['operationFilter'] = {};
|
|
20677
|
+
widgetFilterData.forEach(element => {
|
|
20678
|
+
if (element.filterType == 'date' || element.filterType == 'datetime') {
|
|
20679
|
+
apiJsonObject['operationFilter'][element.apiName] = moment$1(element.filterDataSourceValue).format(element.momentFormat);
|
|
20680
|
+
}
|
|
20681
|
+
else {
|
|
20682
|
+
if ((typeof element.filterDataSourceValue === "string" && element.filterDataSourceValue !== "") ||
|
|
20683
|
+
(Array.isArray(element.filterDataSourceValue) && element.filterDataSourceValue.length > 0)) {
|
|
20684
|
+
if (element.operatorName !== "") {
|
|
20685
|
+
if (element.filterType == "content") {
|
|
20686
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
20687
|
+
}
|
|
20688
|
+
if (element.filterType == "single") {
|
|
20689
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
20690
|
+
}
|
|
20691
|
+
else {
|
|
20692
|
+
apiJsonObject['operationFilter'][element.operatorName] = Array.isArray(element.filterDataSourceValue) ? element.filterDataSourceValue : [element.filterDataSourceValue];
|
|
20693
|
+
}
|
|
20694
|
+
}
|
|
20695
|
+
else {
|
|
20696
|
+
apiJsonObject[element.apiName] = element.filterDataSourceValue;
|
|
20697
|
+
}
|
|
20698
|
+
}
|
|
20699
|
+
}
|
|
20700
|
+
});
|
|
20701
|
+
return apiJsonObject;
|
|
20702
|
+
}
|
|
20630
20703
|
getPadeDataSource(context) {
|
|
20631
20704
|
return new Promise((resolve, reject) => {
|
|
20632
20705
|
this.service.getAppPageDetailConfig(this.pageId).subscribe({
|
|
@@ -20967,6 +21040,7 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
20967
21040
|
dynamicComponentInstance.selectedDates = selectedDates;
|
|
20968
21041
|
dynamicComponentInstance.filterItems = filterItems;
|
|
20969
21042
|
dynamicComponentInstance.contextFilterItems = context_filter;
|
|
21043
|
+
dynamicComponentInstance.filterObjects = indexObj;
|
|
20970
21044
|
dynamicComponentInstance.pageTitle = this.pageTitle;
|
|
20971
21045
|
dynamicComponentInstance.bread_crumbs_container = this.kpi_breadcrumbs_container;
|
|
20972
21046
|
dynamicComponentInstance.isEditButton = (userName && userName == "admin") ? true : false;
|
|
@@ -21501,12 +21575,12 @@ class KpiWithMultilayoutSetTestComponent {
|
|
|
21501
21575
|
}
|
|
21502
21576
|
}
|
|
21503
21577
|
}
|
|
21504
|
-
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 });
|
|
21578
|
+
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 });
|
|
21505
21579
|
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"] }] });
|
|
21506
21580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KpiWithMultilayoutSetTestComponent, decorators: [{
|
|
21507
21581
|
type: Component,
|
|
21508
21582
|
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" }]
|
|
21509
|
-
}], 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: [{
|
|
21583
|
+
}], 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: [{
|
|
21510
21584
|
type: ViewChild,
|
|
21511
21585
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
21512
21586
|
}], containerRef: [{
|
|
@@ -22170,7 +22244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
22170
22244
|
} });
|
|
22171
22245
|
|
|
22172
22246
|
class LandingComponentComponent {
|
|
22173
|
-
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage) {
|
|
22247
|
+
constructor(commonService, activatedRoute, viewContainerRef, componentFactoryResolver, service, toastr, router, datasetService, storage, cdr) {
|
|
22174
22248
|
this.commonService = commonService;
|
|
22175
22249
|
this.activatedRoute = activatedRoute;
|
|
22176
22250
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -22180,6 +22254,7 @@ class LandingComponentComponent {
|
|
|
22180
22254
|
this.router = router;
|
|
22181
22255
|
this.datasetService = datasetService;
|
|
22182
22256
|
this.storage = storage;
|
|
22257
|
+
this.cdr = cdr;
|
|
22183
22258
|
this.dashbord_container = [];
|
|
22184
22259
|
this.widget_width = ['w-full', 'w-1/2', 'w-1/3', 'w-1/4', 'w-1/5', 'w-1/6'];
|
|
22185
22260
|
this.page_title = 'Dashboard';
|
|
@@ -22226,30 +22301,44 @@ class LandingComponentComponent {
|
|
|
22226
22301
|
ngOnInit() {
|
|
22227
22302
|
this.loadingModal = true;
|
|
22228
22303
|
this.pageId = this.activatedRoute.snapshot.queryParams['pageId'];
|
|
22229
|
-
this.
|
|
22304
|
+
const { pageId } = this.activatedRoute.snapshot.queryParams;
|
|
22305
|
+
if (this.pageId) {
|
|
22306
|
+
this.router.navigate([], {
|
|
22307
|
+
queryParams: { pageId },
|
|
22308
|
+
replaceUrl: true,
|
|
22309
|
+
});
|
|
22310
|
+
}
|
|
22230
22311
|
}
|
|
22231
22312
|
getFiltersForTemplate(filter) {
|
|
22232
22313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22233
22314
|
this.filters = filter;
|
|
22234
|
-
this.defaultStartDate = filter.startDate;
|
|
22235
|
-
this.defaultEndDate = filter.endDate;
|
|
22236
22315
|
filter.operationFilter['startDate'] = filter.startDate;
|
|
22237
22316
|
filter.operationFilter['endDate'] = filter.endDate;
|
|
22238
|
-
let navigation = {
|
|
22239
|
-
queryParams: filter.operationFilter,
|
|
22240
|
-
queryParamsHandling: "merge"
|
|
22241
|
-
};
|
|
22242
|
-
this.router.navigate([], navigation);
|
|
22243
22317
|
this.loadingModal = true;
|
|
22244
|
-
|
|
22245
|
-
|
|
22318
|
+
if (filter.filterObjects && Object.entries(filter.filterObjects).length !== 0) {
|
|
22319
|
+
if (Array.isArray(this.dashBoardWidgetConfig.widgets)) {
|
|
22320
|
+
const index = this.dashBoardWidgetConfig.widgets.findIndex((widget) => widget.widgetId === filter.filterObjects.widgetId);
|
|
22321
|
+
if (index !== -1) {
|
|
22322
|
+
this.dashBoardWidgetConfig.widgets[index] = filter.filterObjects;
|
|
22323
|
+
}
|
|
22324
|
+
else {
|
|
22325
|
+
}
|
|
22326
|
+
}
|
|
22327
|
+
}
|
|
22328
|
+
else {
|
|
22329
|
+
yield this.getPadeDataSource(true);
|
|
22330
|
+
}
|
|
22246
22331
|
this.uniqueDataSetObject = {};
|
|
22247
22332
|
let apiCalls = [];
|
|
22248
22333
|
this.allWidgetByDataset.forEach(view => {
|
|
22249
22334
|
view.datasetIds.forEach(id => {
|
|
22250
|
-
|
|
22251
|
-
|
|
22252
|
-
|
|
22335
|
+
if (view.widgetId == filter.filterObjects.widgetId) {
|
|
22336
|
+
let found = this.dataSetModal.find(d => d.datasetId === id);
|
|
22337
|
+
let widgetFilter = this.getWidgetFilterItems(filter.filterObjects.filters.filterItems);
|
|
22338
|
+
view.filters = widgetFilter;
|
|
22339
|
+
if (found) {
|
|
22340
|
+
apiCalls.push(this.datasetService.getDataFromDataSet(found, id, widgetFilter));
|
|
22341
|
+
}
|
|
22253
22342
|
}
|
|
22254
22343
|
});
|
|
22255
22344
|
});
|
|
@@ -22257,10 +22346,40 @@ class LandingComponentComponent {
|
|
|
22257
22346
|
this.globalDefaultFilter = filter;
|
|
22258
22347
|
this.uniqueDataSetObject = this.datasetService.getUniqueDataSetObject();
|
|
22259
22348
|
this.createDivElements(this.uniqueDataSetObject, true);
|
|
22349
|
+
this.cdr.detectChanges();
|
|
22260
22350
|
this.loadingModal = false;
|
|
22261
22351
|
});
|
|
22262
22352
|
});
|
|
22263
22353
|
}
|
|
22354
|
+
getWidgetFilterItems(widgetFilterData) {
|
|
22355
|
+
let apiJsonObject = {};
|
|
22356
|
+
apiJsonObject['operationFilter'] = {};
|
|
22357
|
+
widgetFilterData.forEach(element => {
|
|
22358
|
+
if (element.filterType == 'date' || element.filterType == 'datetime') {
|
|
22359
|
+
apiJsonObject['operationFilter'][element.apiName] = moment$1(element.filterDataSourceValue).format(element.momentFormat);
|
|
22360
|
+
}
|
|
22361
|
+
else {
|
|
22362
|
+
if ((typeof element.filterDataSourceValue === "string" && element.filterDataSourceValue !== "") ||
|
|
22363
|
+
(Array.isArray(element.filterDataSourceValue) && element.filterDataSourceValue.length > 0)) {
|
|
22364
|
+
if (element.operatorName !== "") {
|
|
22365
|
+
if (element.filterType == "content") {
|
|
22366
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
22367
|
+
}
|
|
22368
|
+
if (element.filterType == "single") {
|
|
22369
|
+
apiJsonObject['operationFilter'][element.operatorName] = element.filterDataSourceValue;
|
|
22370
|
+
}
|
|
22371
|
+
else {
|
|
22372
|
+
apiJsonObject['operationFilter'][element.operatorName] = Array.isArray(element.filterDataSourceValue) ? element.filterDataSourceValue : [element.filterDataSourceValue];
|
|
22373
|
+
}
|
|
22374
|
+
}
|
|
22375
|
+
else {
|
|
22376
|
+
apiJsonObject[element.apiName] = element.filterDataSourceValue;
|
|
22377
|
+
}
|
|
22378
|
+
}
|
|
22379
|
+
}
|
|
22380
|
+
});
|
|
22381
|
+
return apiJsonObject;
|
|
22382
|
+
}
|
|
22264
22383
|
getPadeDataSource(context) {
|
|
22265
22384
|
return new Promise((resolve, reject) => {
|
|
22266
22385
|
this.service.getAppPageDetailConfig(this.pageId).subscribe({
|
|
@@ -22663,6 +22782,7 @@ class LandingComponentComponent {
|
|
|
22663
22782
|
dynamicComponentInstance.selectedDates = selectedDates;
|
|
22664
22783
|
dynamicComponentInstance.filterItems = filterItems;
|
|
22665
22784
|
dynamicComponentInstance.contextFilterItems = context_filter;
|
|
22785
|
+
dynamicComponentInstance.filterObjects = indexObj;
|
|
22666
22786
|
dynamicComponentInstance.pageTitle = this.pageTitle;
|
|
22667
22787
|
dynamicComponentInstance.bread_crumbs_container = this.kpi_breadcrumbs_container;
|
|
22668
22788
|
dynamicComponentInstance.isEditButton = (userName && userName == "admin") ? true : false;
|
|
@@ -23355,12 +23475,12 @@ class LandingComponentComponent {
|
|
|
23355
23475
|
return results.join('\n');
|
|
23356
23476
|
}
|
|
23357
23477
|
}
|
|
23358
|
-
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 });
|
|
23478
|
+
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 });
|
|
23359
23479
|
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" }] });
|
|
23360
23480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LandingComponentComponent, decorators: [{
|
|
23361
23481
|
type: Component,
|
|
23362
23482
|
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>" }]
|
|
23363
|
-
}], 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: [{
|
|
23483
|
+
}], 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: [{
|
|
23364
23484
|
type: ViewChild,
|
|
23365
23485
|
args: ['dynamicComponentContainer', { read: ViewContainerRef }]
|
|
23366
23486
|
}], containerRef: [{
|