{ "version": 3, "sources": ["projects/shared-lib/src/lib/components/gse-data/gse-data.component.ts", "projects/shared-lib/src/lib/components/gse-data/gse-data.component.html"], "sourcesContent": ["import {\r\n\tChangeDetectorRef,\r\n\tComponent,\r\n\tElementRef,\r\n\tEventEmitter,\r\n\tInput,\r\n\tOnDestroy,\r\n\tOnInit,\r\n\tOptional,\r\n\tViewChild,\r\n\tViewEncapsulation,\r\n} from \"@angular/core\";\r\n\r\nimport { Subscription } from \"rxjs\";\r\n\r\nimport { process } from \"@progress/kendo-data-query\";\r\nimport { ResizeResult } from \"ngxtension/resize\";\r\n\r\nimport _ from \"lodash\";\r\n\r\nimport { Global } from \"../../_constants/global.variables\";\r\n\r\nimport { GridSettings } from \"../../_models/grid-settings.interface\";\r\nimport { IAsset } from \"../../_models/asset.model\";\r\nimport { IGlobal } from \"../../_models/global.model\";\r\nimport { ITag } from \"../../_models/tag.model\";\r\nimport { IWidgetSignalRGroupObject } from \"../../_models/signalr-widget-group.model\";\r\n\r\nimport { DashboardService } from \"../../services/dashboard.service\";\r\nimport { DataService } from \"../../services/data.service\";\r\nimport { KendoSettingsService } from \"../../services/kendo-settings.service\";\r\nimport { SignalRCoreService } from \"../../services/signalr-core.service\";\r\nimport { UtilityService } from \"projects/shared-lib/src/lib/services/utility.service\";\r\n\r\nimport { KendoGridParentComponent } from \"../kendo-grid-parent/kendo-grid-parent.component\";\r\n\r\n@Component({\r\n\tencapsulation: ViewEncapsulation.None,\r\n\tselector: \"lib-gse-data\",\r\n\ttemplateUrl: \"./gse-data.component.html\",\r\n\tstyleUrls: [\"./gse-data.component.scss\"],\r\n})\r\nexport class GSEDataComponent implements OnInit, OnDestroy {\r\n\t@ViewChild(\"tagDataGrid\") tagDataGrid: KendoGridParentComponent;\r\n\t@Optional() @Input() widgetObject: any;\r\n\t@Optional() @Input() dataObject: any;\r\n\t@ViewChild(\"eventDataRowForCalculation\")\r\n\teventDataRowForCalculation: ElementRef;\r\n\t@Input() private dashboardTimeZoneChanged: EventEmitter;\r\n\teventDataRowHeight: any = 47;\r\n\teventDataPageSize: number;\r\n\tassetTagIds: any;\r\n\tisLoading: boolean;\r\n\ttimeZoneType: any;\r\n\tpublic global: IGlobal = Global;\r\n\ttheme: string;\r\n\tassetTags: any;\r\n\r\n\tfullDataCacheSubscription: Subscription;\r\n\tsignalRTagUpdateSubscription: Subscription;\r\n\twidgetIsInViewSubscription: Subscription;\r\n\twidgetGroupSettings: IWidgetSignalRGroupObject;\r\n\tdashboardTimeZoneChangedSubscription: Subscription;\r\n\tprivate lastUpdateTimeinMilliseconds: number;\r\n\tprivate requestToRunInitializeFunction: boolean = false;\r\n\tprivate initialLoad: boolean = true;\r\n\tprivate componentName: string = \"gse-data: \";\r\n\r\n\tpublic options: any = [];\r\n\tpublic selected: any;\r\n\tpublic selectedAsset: any;\r\n\tpublic selectedAssetGroup: string;\r\n\tpublic assetGroups: any;\r\n\tpublic searchResults: any;\r\n\tpublic service: any;\r\n\tpublic navigationOpened: boolean = false;\r\n\tpublic searchText: string;\r\n\r\n\tpublic gridSettings: GridSettings = {\r\n\t\tstate: {\r\n\t\t\tskip: 0,\r\n\t\t\tfilter: {\r\n\t\t\t\tlogic: \"and\",\r\n\t\t\t\tfilters: [],\r\n\t\t\t},\r\n\t\t\ttake: 15,\r\n\t\t},\r\n\t\tcolumnsConfig: [\r\n\t\t\t{\r\n\t\t\t\tfield: \"chart\",\r\n\t\t\t\ttitle: \"Chart\",\r\n\t\t\t\tfilterable: false,\r\n\t\t\t\t_width: 5,\r\n\t\t\t\thidden: false,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"Id\",\r\n\t\t\t\ttitle: \"Tag Id\",\r\n\t\t\t\t_width: 7,\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\thidden: Global.isMobile,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"Name\",\r\n\t\t\t\ttitle: \"Name\",\r\n\t\t\t\t_width: 30,\r\n\t\t\t\tfilterable: true,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"ShortTagName\",\r\n\t\t\t\ttitle: \"Standard Name\",\r\n\t\t\t\t_width: 15,\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\thidden: Global.isMobile,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"JBTStandardObservationId\",\r\n\t\t\t\ttitle: \"Std Obs Id\",\r\n\t\t\t\t_width: 5,\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\thidden: Global.isMobile,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"Severity\",\r\n\t\t\t\ttitle: \"Severity\",\r\n\t\t\t\t_width: 5,\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\thidden: Global.isMobile,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"Value\",\r\n\t\t\t\ttitle: \"Value\",\r\n\t\t\t\t_width: 10,\r\n\t\t\t\tfilterable: true,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"RedisKeyName\",\r\n\t\t\t\ttitle: \"Redis Key\",\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\t_width: 15,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"UserDateFull\",\r\n\t\t\t\ttitle: \"User Time\",\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\t_width: 15,\r\n\t\t\t\tfilter: \"date\",\r\n\t\t\t\thidden: Global.isMobile,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"SiteDateFull\",\r\n\t\t\t\ttitle: \"Site Time\",\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\tfilter: \"date\",\r\n\t\t\t\t_width: 15,\r\n\t\t\t\thidden: Global.isMobile,\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tfield: \"UTCDateFull\",\r\n\t\t\t\ttitle: \"UTC Time\",\r\n\t\t\t\tfilterable: true,\r\n\t\t\t\tfilter: \"date\",\r\n\t\t\t\t_width: 15,\r\n\t\t\t},\r\n\t\t],\r\n\t};\r\n\r\n\tpublic guid: string;\r\n\r\n\tconstructor(\r\n\t\tpublic dataService: DataService,\r\n\t\tprivate dashboardService: DashboardService,\r\n\t\tprivate kendoSettingsService: KendoSettingsService,\r\n\t\tprivate ref: ChangeDetectorRef,\r\n\t\tpublic signalRCore: SignalRCoreService,\r\n\t\tpublic utilityService: UtilityService\r\n\t) {}\r\n\r\n\tngOnInit() {\r\n\t\tthis.guid = this.dataService.guid();\r\n\t\tthis.service = this;\r\n\t\tthis.isLoading = true;\r\n\t\tGlobal.User.DebugMode &&\r\n\t\t\tconsole.log(\r\n\t\t\t\tthis.componentName + \"this.widgetObject = %O\",\r\n\t\t\t\tthis.widgetObject\r\n\t\t\t);\r\n\t\tthis.buildNavigationOptionsArray();\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.clearRecentlyUpdatedStatus();\r\n\t\t}, 2000);\r\n\r\n\t\tsetInterval(() => {\r\n\t\t\tif (this.requestToRunInitializeFunction) {\r\n\t\t\t\tthis.initialize();\r\n\t\t\t}\r\n\t\t}, 1000);\r\n\r\n\t\tif (!_.isNil(this.widgetObject)) {\r\n\t\t\tif (Global.FullDataCacheExists === false) {\r\n\t\t\t\tthis.fullDataCacheSubscription =\r\n\t\t\t\t\tthis.dataService.fullDataCacheExists$.subscribe(\r\n\t\t\t\t\t\t(data: any) => {\r\n\t\t\t\t\t\t\tif (data === true) {\r\n\t\t\t\t\t\t\t\tthis.theme = Global.Theme;\r\n\t\t\t\t\t\t\t\tthis.initialize();\r\n\t\t\t\t\t\t\t\tthis.initialLoad = false;\r\n\t\t\t\t\t\t\t\tthis.fullDataCacheSubscription.unsubscribe();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tthis.theme = Global.Theme;\r\n\t\t\t\tthis.initialLoad = false;\r\n\t\t\t\tthis.initialize();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthis.isLoading = false;\r\n\t\t\tthis.initialLoad = false;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.dashboardTimeZoneChanged) {\r\n\t\t\tthis.dashboardTimeZoneChangedSubscription =\r\n\t\t\t\tthis.dashboardTimeZoneChanged.subscribe((data) => {\r\n\t\t\t\t\tGlobal.User.DebugMode &&\r\n\t\t\t\t\t\tconsole.log(this.componentName + \"data: %O\", data);\r\n\t\t\t\t\tlet foundWidgetWithSameWidgetId = data.find(\r\n\t\t\t\t\t\t(widgetThatWasChanged) => {\r\n\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\twidgetThatWasChanged.WidgetId ===\r\n\t\t\t\t\t\t\t\tthis.widgetObject.WidgetId\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif (!_.isNil(foundWidgetWithSameWidgetId)) {\r\n\t\t\t\t\t\tGlobal.User.DebugMode &&\r\n\t\t\t\t\t\t\tconsole.log(\r\n\t\t\t\t\t\t\t\tthis.componentName + \"Widget Time Zone Changed\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\tthis.timeZoneType =\r\n\t\t\t\t\t\t\tthis.dashboardService.determineTimeZoneType(\r\n\t\t\t\t\t\t\t\tthis.widgetObject\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\tconst localDateCol =\r\n\t\t\t\t\t\t\tthis.gridSettings.columnsConfig.find(\r\n\t\t\t\t\t\t\t\t(col) => col.field == \"JavascriptDate\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\tconst siteDateCol =\r\n\t\t\t\t\t\t\tthis.gridSettings.columnsConfig.find(\r\n\t\t\t\t\t\t\t\t(col) => col.field == \"SiteLocalJavascriptDate\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\tconst utcDateCol = this.gridSettings.columnsConfig.find(\r\n\t\t\t\t\t\t\t(col) => col.field == \"UTCJavascriptDate\"\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\tlocalDateCol.hidden = this.timeZoneType !== \"User Time\";\r\n\t\t\t\t\t\tsiteDateCol.hidden = this.timeZoneType !== \"Site Time\";\r\n\t\t\t\t\t\tutcDateCol.hidden = this.timeZoneType !== \"UTC Time\";\r\n\t\t\t\t\t\tlocalDateCol.includeInChooser = !localDateCol.hidden;\r\n\t\t\t\t\t\tsiteDateCol.includeInChooser = !siteDateCol.hidden;\r\n\t\t\t\t\t\tutcDateCol.includeInChooser = !utcDateCol.hidden;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tinitialize() {\r\n\t\tif (this.widgetObject?.WidgetAssetId != null) {\r\n\t\t\tthis.dataService\r\n\t\t\t\t.GetAllSignalRObservationFormattedTagsForAssetIdIntoInventory(\r\n\t\t\t\t\tthis.widgetObject.WidgetAssetId\r\n\t\t\t\t)\r\n\t\t\t\t.subscribe((data: any) => {\r\n\t\t\t\t\tthis.assetTags =\r\n\t\t\t\t\t\tthis.dataService.cache.assetsObject[\r\n\t\t\t\t\t\t\tthis.widgetObject.WidgetAssetId\r\n\t\t\t\t\t\t].Tags;\r\n\t\t\t\t\tGlobal.User.DebugMode &&\r\n\t\t\t\t\t\tconsole.log(\r\n\t\t\t\t\t\t\tthis.componentName + \"this.assetTags = %O\",\r\n\t\t\t\t\t\t\tthis.assetTags\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif (this.tagDataGrid) {\r\n\t\t\t\t\t\tthis.tagDataGrid.gridDataSubject.next(this.assetTags);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.widgetObject.isDisplayDataLive = true;\r\n\t\t\t\t\tthis.finishInitializingWidget();\r\n\t\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis.requestToRunInitializeFunction = false;\r\n\t\t\tthis.isLoading = false;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic assetTagsOrderByDateInMilliseconds() {\r\n\t\treturn this.assetTags\r\n\t\t\t.orderByDescending((a: any) => {\r\n\t\t\t\treturn a.DateInMilliseconds;\r\n\t\t\t})\r\n\t\t\t.toArray();\r\n\t}\r\n\r\n\tsaveGridSettings() {\r\n\t\tif (this.widgetObject !== undefined) {\r\n\t\t\tthis.kendoSettingsService\r\n\t\t\t\t.saveGridSettings(\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tgridObject: this.tagDataGrid.kendoGridParent,\r\n\t\t\t\t\t\t\tgridState: this.gridSettings.state,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t],\r\n\t\t\t\t\tthis.widgetObject.WidgetId\r\n\t\t\t\t)\r\n\t\t\t\t.then((data: any) => {\r\n\t\t\t\t\tGlobal.User.DebugMode &&\r\n\t\t\t\t\t\tconsole.log(this.componentName + \"data: %O\", data);\r\n\t\t\t\t\tthis.widgetObject.WidgetKendoUIJson = data;\r\n\t\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tgetSignalRUpdates() {\r\n\t\tlet assetObjectInCache =\r\n\t\t\tthis.dataService.cache.assetsObject[\r\n\t\t\t\tthis.widgetObject.WidgetAssetId\r\n\t\t\t];\r\n\t\tlet tagNamePrefixesString = assetObjectInCache.TagNamePrefix;\r\n\t\tGlobal.SignalR.ListOfTagNamePrefixes =\r\n\t\t\tGlobal.SignalR.ListOfTagNamePrefixes != null\r\n\t\t\t\t? (Global.SignalR.ListOfTagNamePrefixes +=\r\n\t\t\t\t\t\t\",\" + tagNamePrefixesString)\r\n\t\t\t\t: tagNamePrefixesString;\r\n\r\n\t\tthis.signalRCore.joinGroups();\r\n\r\n\t\tif (this.widgetObject && this.widgetObject.WidgetId !== undefined) {\r\n\t\t\tthis.widgetGroupSettings = {\r\n\t\t\t\tWidgetId: this.widgetObject.WidgetId,\r\n\t\t\t\tGroupList: tagNamePrefixesString,\r\n\t\t\t\tIsPopup: false,\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.widgetGroupSettings = {\r\n\t\t\t\tWidgetId: this.signalRCore.generateIdForPopupThatIsUnique(),\r\n\t\t\t\tGroupList: tagNamePrefixesString,\r\n\t\t\t\tIsPopup: true,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tGlobal.User.DebugMode &&\r\n\t\t\tconsole.log(\r\n\t\t\t\tthis.componentName + \": this.widgetGroupSettings = %O\",\r\n\t\t\t\tthis.widgetGroupSettings\r\n\t\t\t);\r\n\r\n\t\tthis.dataService\r\n\t\t\t.createSubjectAndSubscribe({\r\n\t\t\t\tId: this.guid,\r\n\t\t\t\tWidgetName:\r\n\t\t\t\t\tthis.dataObject != null\r\n\t\t\t\t\t\t? this.dataObject.WidgetName\r\n\t\t\t\t\t\t: this.widgetObject.WidgetName,\r\n\t\t\t\tTagNamePrefix: [tagNamePrefixesString],\r\n\t\t\t})\r\n\t\t\t.then((data) => {\r\n\t\t\t\t//subscribe to existing subject\r\n\t\t\t\tGlobal.User.DebugMode &&\r\n\t\t\t\t\tconsole.log(\r\n\t\t\t\t\t\tthis.componentName + \"current active subjects: %O\",\r\n\t\t\t\t\t\tthis.dataService.activeSubjects\r\n\t\t\t\t\t);\r\n\t\t\t\tvar activeSubject = this.dataService.returnCorrectActiveSubject(\r\n\t\t\t\t\tthis.guid\r\n\t\t\t\t);\r\n\r\n\t\t\t\tGlobal.User.DebugMode &&\r\n\t\t\t\t\tconsole.log(\r\n\t\t\t\t\t\tthis.componentName + \"active subjects: %O\",\r\n\t\t\t\t\t\tactiveSubject\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\tactiveSubject &&\r\n\t\t\t\t\tactiveSubject.Subject$.subscribe((tag: ITag) => {\r\n\t\t\t\t\t\t//console.log(this.componentName + \"Updating tag we care about: %O\", tag);\r\n\t\t\t\t\t\tthis.updateGridData();\r\n\t\t\t\t\t});\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublic searchForText(searchText: any) {\r\n\t\tGlobal.User.DebugMode &&\r\n\t\t\tconsole.log(this.componentName + \"searchText = %O\", searchText);\r\n\t\tthis.searchText = searchText;\r\n\t\tif (this.searchText == \"\" || this.searchText == null) {\r\n\t\t\tthis.assetTags =\r\n\t\t\t\tthis.dataService.cache.assetsObject[\r\n\t\t\t\t\tthis.widgetObject.WidgetAssetId\r\n\t\t\t\t].Tags; //-- put the list back the way it initially started.\r\n\t\t} else {\r\n\t\t\tthis.signalRCore.LogActivity(\r\n\t\t\t\t\"Searched for '\" +\r\n\t\t\t\t\tsearchText +\r\n\t\t\t\t\t\"' in the \" +\r\n\t\t\t\t\tthis.widgetObject.WidgetTypeName +\r\n\t\t\t\t\t\" widget.\"\r\n\t\t\t);\r\n\t\t\tthis.assetTags = this.assetTags.where((tag: ITag) => {\r\n\t\t\t\treturn (\r\n\t\t\t\t\ttag.Name.contains(searchText) ||\r\n\t\t\t\t\ttag.JBTStandardObservation.Name.contains(searchText)\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tupdateGridData() {\r\n\t\tif (this.tagDataGrid) {\r\n\t\t\tthis.tagDataGrid.gridDataSubject.next(this.assetTags);\r\n\t\t}\r\n\t}\r\n\r\n\tclearRecentlyUpdatedStatus() {\r\n\t\tvar recentlyUpdated = this.assetTags\r\n\t\t\t?.where((data: any) => {\r\n\t\t\t\treturn data.RecentlyUpdated == true;\r\n\t\t\t})\r\n\t\t\t.toArray();\r\n\t\tif (recentlyUpdated != null) {\r\n\t\t\trecentlyUpdated.forEach((item: any) => {\r\n\t\t\t\titem.RecentlyUpdated = false;\r\n\t\t\t});\r\n\r\n\t\t\tif (this.tagDataGrid) {\r\n\t\t\t\tthis.tagDataGrid.gridDataSubject.next(this.assetTags);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tonResized(event: ResizeResult): void {\r\n\t\tthis.eventDataPageSize = Math.floor(\r\n\t\t\t((event.height - 120) / this.eventDataRowHeight) * 3\r\n\t\t);\r\n\t}\r\n\r\n\tfinishInitializingWidget() {\r\n\t\tthis.widgetIsInViewSubscription =\r\n\t\t\tthis.dashboardService.widgetInViewChanged$.subscribe(\r\n\t\t\t\t(data: any) => {\r\n\t\t\t\t\tif (data.widgetId === this.widgetObject.WidgetId) {\r\n\t\t\t\t\t\tif (this.eventDataRowForCalculation !== undefined) {\r\n\t\t\t\t\t\t\tthis.eventDataRowHeight =\r\n\t\t\t\t\t\t\t\tthis.eventDataRowForCalculation.nativeElement.getBoundingClientRect().height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// this.isWidgetInView = data.isInView;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t);\r\n\r\n\t\tif (this.widgetObject.WidgetKendoUIJson) {\r\n\t\t\tlet jsonObjectParsed =\r\n\t\t\t\tthis.kendoSettingsService.parseReturnedSettingsForDates(\r\n\t\t\t\t\tthis.widgetObject.WidgetKendoUIJson\r\n\t\t\t\t);\r\n\t\t\t//the first item in the array is the gridSettings for the first tab of data for GSE-Overview\r\n\r\n\t\t\tlet returnedParsedObject = jsonObjectParsed[0];\r\n\t\t\t//We pass it into the function in the kendo service to compare what has been saved vs the template declaration of columns to make sure they get the lastest updates.\r\n\t\t\tthis.gridSettings = this.mapGridSettings(\r\n\t\t\t\tthis.kendoSettingsService.mergeTemplateAndSavedColumnsToOneGrid(\r\n\t\t\t\t\tthis.gridSettings,\r\n\t\t\t\t\treturnedParsedObject\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tif (this.tagDataGrid) {\r\n\t\t\t\tthis.tagDataGrid.gridDataSubject.next(this.assetTags);\r\n\t\t\t}\r\n\t\t\tthis.dashboardService.addOrUpdateHiddenColumnCountToDashboardWidget(\r\n\t\t\t\t[this.gridSettings.columnsConfig],\r\n\t\t\t\tthis.widgetObject.WidgetId\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tif (this.tagDataGrid) {\r\n\t\t\t\tthis.tagDataGrid.gridDataSubject.next(this.assetTags);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.timeZoneType = this.dashboardService.determineTimeZoneType(\r\n\t\t\tthis.widgetObject\r\n\t\t);\r\n\r\n\t\tthis.getSignalRUpdates();\r\n\t\tthis.requestToRunInitializeFunction = false;\r\n\r\n\t\tthis.isLoading = false;\r\n\t}\r\n\r\n\tpublic mapGridSettings(gridSettings: GridSettings) {\r\n\t\tconst state = gridSettings.state;\r\n\t\tlet emptyArray: any = [];\r\n\t\treturn {\r\n\t\t\tstate,\r\n\t\t\tcolumnsConfig: gridSettings.columnsConfig.sort(\r\n\t\t\t\t(a, b) => a.orderIndex - b.orderIndex\r\n\t\t\t),\r\n\t\t\tgridData:\r\n\t\t\t\tthis.dataService.cache !== undefined\r\n\t\t\t\t\t? process(this.assetTags, state)\r\n\t\t\t\t\t: emptyArray,\r\n\t\t};\r\n\t}\r\n\r\n\tngOnDestroy() {\r\n\t\tGlobal.User.DebugMode &&\r\n\t\t\tconsole.log(this.componentName + \": ngOnDestroy invoked...\");\r\n\t\tthis.dataService.unsubscribeAndLeaveActiveSubjects(this.guid);\r\n\t\tthis.dashboardTimeZoneChangedSubscription &&\r\n\t\t\tthis.dashboardTimeZoneChangedSubscription.unsubscribe();\r\n\t\tthis.widgetIsInViewSubscription &&\r\n\t\t\tthis.widgetIsInViewSubscription.unsubscribe();\r\n\t}\r\n\r\n\tprivate buildNavigationOptionsArray() {\r\n\t\tvar navigationWidth = Global.isMobile ? \"90px\" : \"105px\";\r\n\t\tthis.selectedAsset =\r\n\t\t\tthis.widgetObject?.WidgetAssetId != null\r\n\t\t\t\t? this.dataService.cache.assetsObject[\r\n\t\t\t\t\t\tthis.widgetObject?.WidgetAssetId\r\n\t\t\t\t ]\r\n\t\t\t\t: null;\r\n\t\tthis.searchResults = localStorage.getItem(\"searchResults\");\r\n\r\n\t\tthis.options = [\r\n\t\t\t{\r\n\t\t\t\tid: 1,\r\n\t\t\t\twidth: navigationWidth,\r\n\t\t\t\tname: \"Navigation\",\r\n\t\t\t\tsearch: true,\r\n\t\t\t\tdataToSearch: this.dataService.cache.assets\r\n\t\t\t\t\t.where((asset: IAsset) => {\r\n\t\t\t\t\t\treturn asset.AssetType?.AssetTypeGroupId != 1;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.orderBy((asset: IAsset) => {\r\n\t\t\t\t\t\treturn asset.Name;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.toArray(),\r\n\t\t\t\tselected: this.selectedAsset,\r\n\t\t\t\tservice: this,\r\n\t\t\t\taction: this.changeAsset,\r\n\t\t\t\twidget: this.widgetObject,\r\n\t\t\t\troot: true,\r\n\t\t\t\topened: this.selectedAsset != null ? false : true, //--only displaying the initial navigation menu if no asset has been selected.\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tid: 2,\r\n\t\t\t\twidth: navigationWidth,\r\n\t\t\t\tname: \"Settings\",\r\n\t\t\t\tchildren: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tid: 10,\r\n\t\t\t\t\t\twidth: navigationWidth,\r\n\t\t\t\t\t\tname: \"Edit Name\",\r\n\t\t\t\t\t\taction: () =>\r\n\t\t\t\t\t\t\tthis.widgetObject.editWidgetName(this.widgetObject),\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tid: 10,\r\n\t\t\t\t\t\twidth: navigationWidth,\r\n\t\t\t\t\t\tname: \"Reload\",\r\n\t\t\t\t\t\taction: () =>\r\n\t\t\t\t\t\t\tthis.dashboardService._reloadedWidget.next(\r\n\t\t\t\t\t\t\t\tthis.widgetObject\r\n\t\t\t\t\t\t\t),\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tid: 10,\r\n\t\t\t\t\t\twidth: navigationWidth,\r\n\t\t\t\t\t\tname: \"Delete\",\r\n\t\t\t\t\t\taction: () => this.widgetObject.deleteFunction(),\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\troot: true,\r\n\t\t\t\topened: false,\r\n\t\t\t},\r\n\t\t];\r\n\r\n\t\tif (Global.isMobile) {\r\n\t\t\tthis.options = this.options\r\n\t\t\t\t.where((item: any) => {\r\n\t\t\t\t\treturn item.id != 2;\r\n\t\t\t\t})\r\n\t\t\t\t.toArray(); //--removing Settings tab for mobile.\r\n\t\t}\r\n\t\tGlobal.User.DebugMode &&\r\n\t\t\tconsole.log(this.componentName + \"this.options = %O\", this.options);\r\n\t}\r\n\r\n\tchangeAsset(asset: any, parentWidgetObject: any, service: any) {\r\n\t\tconsole.log(\"this.widgetObject = %O\", parentWidgetObject);\r\n\t\tif (!service.initialLoad) {\r\n\t\t\tparentWidgetObject.WidgetAssetId = asset?.Id;\r\n\t\t\tparentWidgetObject.WidgetSiteId = asset?.Site?.Id;\r\n\t\t\tservice.selectedAsset = asset;\r\n\t\t\tservice.saveWidgetObject(\"AssetId\", asset?.Id);\r\n\t\t\tservice.saveWidgetObject(\"SiteId\", asset?.Site?.Id);\r\n\t\t\tparentWidgetObject.assetChange();\r\n\t\t\tparentWidgetObject.siteChange();\r\n\t\t\tservice.requestToRunInitializeFunction = true;\r\n\t\t} else {\r\n\t\t\tservice.selectedAsset =\r\n\t\t\t\tthis.dataService.cache.assetsObject[\r\n\t\t\t\t\tparentWidgetObject.WidgetAssetId\r\n\t\t\t\t];\r\n\t\t}\r\n\t}\r\n\r\n\tfindAsset(string: any) {}\r\n\r\n\tpublic checkNavigation(opened: any) {\r\n\t\tGlobal.User.DebugMode &&\r\n\t\t\tconsole.log(\r\n\t\t\t\tthis.componentName + \"checkNavigation opened = %O\",\r\n\t\t\t\topened\r\n\t\t\t);\r\n\t\tthis.navigationOpened = opened;\r\n\t\tthis.isLoading = false;\r\n\t}\r\n\r\n\tpublic checkSelectedItem(selected: any) {\r\n\t\tGlobal.User.DebugMode &&\r\n\t\t\tconsole.log(\r\n\t\t\t\tthis.componentName + \"checkSelectedItem invoked. selected = %O\",\r\n\t\t\t\tselected\r\n\t\t\t);\r\n\t\tthis.signalRCore.LogActivity(\r\n\t\t\t\"Chose '\" +\r\n\t\t\t\tselected.name +\r\n\t\t\t\t\"' in the navigation of the \" +\r\n\t\t\t\tthis.widgetObject.WidgetTypeName +\r\n\t\t\t\t\" widget.\"\r\n\t\t);\r\n\t}\r\n\r\n\tsaveWidgetObject(fieldName: string, fieldValue: string) {\r\n\t\tthis.dataService\r\n\t\t\t.SQLActionAsPromise(\r\n\t\t\t\t\"API.Widget_UpdateRecordByIdAndFieldName \" +\r\n\t\t\t\t\tthis.widgetObject.WidgetId +\r\n\t\t\t\t\t\", '\" +\r\n\t\t\t\t\tfieldName +\r\n\t\t\t\t\t\"', '\" +\r\n\t\t\t\t\tfieldValue +\r\n\t\t\t\t\t\"'\"\r\n\t\t\t)\r\n\t\t\t.then((data: any) => {\r\n\t\t\t\tGlobal.User.DebugMode &&\r\n\t\t\t\t\tconsole.log(this.componentName + \"data updated: %O\", data);\r\n\t\t\t\tthis.signalRCore.LogActivity(\r\n\t\t\t\t\t\"Updated '\" +\r\n\t\t\t\t\t\tfieldName +\r\n\t\t\t\t\t\t\"' = \" +\r\n\t\t\t\t\t\tfieldValue +\r\n\t\t\t\t\t\t\" for the \" +\r\n\t\t\t\t\t\tthis.widgetObject.WidgetTypeName +\r\n\t\t\t\t\t\t\" (WidgetId: \" +\r\n\t\t\t\t\t\tthis.widgetObject.WidgetId +\r\n\t\t\t\t\t\t\") widget.\"\r\n\t\t\t\t);\r\n\t\t\t});\r\n\t}\r\n}\r\n", "
\r\n\t
\r\n\t\t\t\t\r\n\t
\r\n\t
0\" class=\"flex-container\" style=\"position: relative\">\r\n\t\t\r\n\t\t
\r\n\t\t\t\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t
\r\n\t
\r\n
\r\n"], "mappings": "8mBAkBA,IAAAA,EAAc,mFChBZC,EAA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AAA,CAAA,CAAA,CAAA,+BAAhBlL,EAAgBmL,UAAA,CAAA,CAAA,cAAA,CAAA,EAAAC,UAAA,SAAAC,EAAAC,EAAA,IAAAD,EAAA,woCC1C7BlN,EAAA,EAAA,MAAA,CAAA,EAAuCC,EAAA,YAAA,SAAAY,EAAA,CAAA,OAAasM,EAAApM,UAAAF,CAAA,CAAiB,CAAA,EACpEb,EAAA,EAAA,KAAA,EACCgB,EAAA,EAAAoM,EAAA,EAAA,EAAA,uBAAA,CAAA,EACD5M,EAAA,EACAQ,EAAA,EAAAqM,EAAA,EAAA,EAAA,MAAA,CAAA,EA0DD7M,EAAA,SA5DyBU,EAAA,CAAA,EAAAnB,EAAA,OAAAoN,EAAAvM,eAAAO,SAAAgM,EAAAvM,cAAA,KAAA,KAAAuM,EAAAvM,aAAAgB,gBAAA,IAAA,EAElBV,EAAA,EAAAnB,EAAA,OAAAoN,EAAA1L,QAAA6L,OAAA,CAAA;;6BDsCMzL,CAAgB,GAAA", "names": ["import_lodash", "\u0275\u0275element", "\u0275\u0275property", "\u0275\u0275elementStart", "\u0275\u0275listener", "\u0275\u0275restoreView", "_r4", "ctx_r1", "\u0275\u0275nextContext", "\u0275\u0275resetView", "saveGridSettings", "\u0275\u0275elementEnd", "\u0275\u0275styleProp", "assetTags", "gridSettings", "widgetObject", "$event", "_r3", "onResized", "\u0275\u0275template", "GSEDataComponent_div_3_div_4_lib_kendo_grid_parent_2_Template", "\u0275\u0275advance", "undefined", "_r1", "checkNavigation", "checkSelectedItem", "GSEDataComponent_div_3_lib_loading_spinner_3_Template", "GSEDataComponent_div_3_div_4_Template", "options", "navigationOpened", "isLoading", "WidgetAssetId", "GSEDataComponent", "constructor", "dataService", "dashboardService", "kendoSettingsService", "ref", "signalRCore", "utilityService", "eventDataRowHeight", "global", "Global", "requestToRunInitializeFunction", "initialLoad", "componentName", "state", "skip", "filter", "logic", "filters", "take", "columnsConfig", "field", "title", "filterable", "_width", "hidden", "isMobile", "ngOnInit", "guid", "service", "User", "DebugMode", "console", "log", "buildNavigationOptionsArray", "setInterval", "clearRecentlyUpdatedStatus", "initialize", "_", "isNil", "FullDataCacheExists", "fullDataCacheSubscription", "fullDataCacheExists$", "subscribe", "data", "theme", "Theme", "unsubscribe", "dashboardTimeZoneChanged", "dashboardTimeZoneChangedSubscription", "foundWidgetWithSameWidgetId", "find", "widgetThatWasChanged", "WidgetId", "timeZoneType", "determineTimeZoneType", "localDateCol", "col", "siteDateCol", "utcDateCol", "includeInChooser", "GetAllSignalRObservationFormattedTagsForAssetIdIntoInventory", "cache", "assetsObject", "Tags", "tagDataGrid", "gridDataSubject", "next", "isDisplayDataLive", "finishInitializingWidget", "assetTagsOrderByDateInMilliseconds", "orderByDescending", "a", "DateInMilliseconds", "toArray", "gridObject", "kendoGridParent", "gridState", "then", "WidgetKendoUIJson", "getSignalRUpdates", "tagNamePrefixesString", "TagNamePrefix", "SignalR", "ListOfTagNamePrefixes", "joinGroups", "widgetGroupSettings", "GroupList", "IsPopup", "generateIdForPopupThatIsUnique", "createSubjectAndSubscribe", "Id", "WidgetName", "dataObject", "activeSubjects", "activeSubject", "returnCorrectActiveSubject", "Subject$", "tag", "updateGridData", "searchForText", "searchText", "LogActivity", "WidgetTypeName", "where", "Name", "contains", "JBTStandardObservation", "recentlyUpdated", "RecentlyUpdated", "forEach", "item", "event", "eventDataPageSize", "Math", "floor", "height", "widgetIsInViewSubscription", "widgetInViewChanged$", "widgetId", "eventDataRowForCalculation", "nativeElement", "getBoundingClientRect", "returnedParsedObject", "parseReturnedSettingsForDates", "mapGridSettings", "mergeTemplateAndSavedColumnsToOneGrid", "addOrUpdateHiddenColumnCountToDashboardWidget", "emptyArray", "sort", "b", "orderIndex", "gridData", "process", "ngOnDestroy", "unsubscribeAndLeaveActiveSubjects", "navigationWidth", "selectedAsset", "searchResults", "localStorage", "getItem", "id", "width", "name", "search", "dataToSearch", "assets", "asset", "AssetType", "AssetTypeGroupId", "orderBy", "selected", "action", "changeAsset", "widget", "root", "opened", "children", "editWidgetName", "_reloadedWidget", "deleteFunction", "parentWidgetObject", "WidgetSiteId", "Site", "saveWidgetObject", "assetChange", "siteChange", "findAsset", "string", "fieldName", "fieldValue", "SQLActionAsPromise", "\u0275\u0275directiveInject", "DataService", "DashboardService", "KendoSettingsService", "ChangeDetectorRef", "SignalRCoreService", "UtilityService", "selectors", "viewQuery", "rf", "ctx", "GSEDataComponent_lib_centered_message_2_Template", "GSEDataComponent_div_3_Template", "length"] }