UNPKG

@bimplus/navigation

Version:

bimplus angular components library for navigation

1 lines 162 kB
{"version":3,"file":"bimplus-navigation.mjs","sources":["../../../../projects/@bimplus/navigation/src/lib/navigation.service.ts","../../../../projects/@bimplus/navigation/src/lib/navigation.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-localized-widget/bimplus-localized-widget.component.ts","../../../../projects/@bimplus/navigation/src/lib/utils/utils.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-contact/bimplus-contact.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-contact/bimplus-contact.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-language-menu/bimplus-language-menu.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-language-menu/bimplus-language-menu.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-project-menu/bimplus-project-menu.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-project-menu/bimplus-project-menu.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-main-menu/bimplus-main-menu.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-main-menu/bimplus-main-menu.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-navbar/logo-state.enum.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-navbar/bimplus-navbar.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-navbar/bimplus-navbar.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-scrollable-container/bimplus-scrollable-container.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-scrollable-container/bimplus-scrollable-container.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-notify/bimplus-notify.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-notify/bimplus-notify.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-storage-info/bimplus-storage-info.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-storage-info/bimplus-storage-info.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-upgrade-link/bimplus-upgrade-link.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-upgrade-link/bimplus-upgrade-link.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-user-menu/bimplus-user-menu.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-user-menu/bimplus-user-menu.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-zoom/bimplus-zoom.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-zoom/bimplus-zoom.component.html","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-touch-menu/bimplus-touch-menu.component.ts","../../../../projects/@bimplus/navigation/src/lib/components/bimplus-touch-menu/bimplus-touch-menu.component.html","../../../../projects/@bimplus/navigation/src/lib/services/language-strings.service.ts","../../../../projects/@bimplus/navigation/src/public-api.ts","../../../../projects/@bimplus/navigation/src/bimplus-navigation.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NavigationService {\r\n\r\n constructor() { }\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-navigation',\r\n imports: [],\r\n template: `\r\n <p>\r\n navigation works!\r\n </p>\r\n `,\r\n styles: ``\r\n})\r\nexport class NavigationComponent {\r\n\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, ViewEncapsulation, Input, signal, WritableSignal, inject } from '@angular/core';\r\nimport { TranslateService, TranslateModule } from '@ngx-translate/core';\r\nimport { LocalizedStrings } from './../../types/types'\r\n\r\n@Component({\r\n selector: 'lib-bimplus-localized-widget',\r\n imports: [CommonModule, TranslateModule],\r\n providers: [TranslateService],\r\n template: `\r\n <p>\r\n localized widget works!\r\n </p>\r\n `,\r\n styles: [],\r\n encapsulation: ViewEncapsulation.ShadowDom\r\n})\r\nexport class BimplusLocalizedWidgetComponent {\r\n translateService = inject(TranslateService);\r\n\r\n\r\n _selectedLanguage: WritableSignal<string> = signal('en');\r\n get selectedLanguage(): string {\r\n return this._selectedLanguage();\r\n }\r\n @Input() set selectedLanguage(value: string) {\r\n this._selectedLanguage.set(value);\r\n this.translateService.use(value);\r\n try {\r\n this.translateService.setTranslation(this.selectedLanguage, this._localizedStrings());\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n\r\n _localizedStrings: WritableSignal<LocalizedStrings> = signal({} as LocalizedStrings);\r\n get localizedStrings(): LocalizedStrings {\r\n return this._localizedStrings();\r\n }\r\n @Input() set localizedStrings(value: LocalizedStrings) {\r\n this._localizedStrings.set(value);\r\n this.translateService.use(this.selectedLanguage);\r\n try {\r\n this.translateService.setTranslation(this.selectedLanguage, value);\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n}\r\n","// Define the type of the window.BimPlus object\r\nexport interface BimPlusObject {\r\n [key: string]: (dataDetail: { detail: unknown }) => void;\r\n}\r\nexport interface Source {\r\n[key: string]: { emit: (arg0: unknown) => void; };\r\n}\r\n\r\n\r\n/**--------------------------------------------------------------------------\r\n* fire event from component in two ways : \r\n- fire custom event from component in standard recommended way via. this.eventName.emit function\r\n\r\n- call window.BimPlus.eventName function directly on window object (eventName is name\r\n of the event we want to fire e.g. bimplusNavbarClicked so it will be window.BimPlus.bimplusNavbarClicked).\r\n Function must be defined in app. where we are using our components.\r\n This was implemented because MS Edge browser has problems with custom events and in some \r\n situations(e.g. after file download) it stops handling custom events.\r\n Disadvantage is that we can have only one event handler which is shared between the multiple components.\r\n--------------------------------------------------------------------------*/\r\nexport function fireEvent(source: unknown, eventName: string, data: unknown = null){\r\n if ( !eventName ) {\r\n console.error(\"ERROR: Missing event name in fireEvent function in Bimplus components!\");\r\n return;\r\n }\r\n // Check if eventName exists on window.BimPlus and if it's a function\r\n const bimPlus = ('BimPlus' in window) && typeof window.BimPlus === 'object' && (window.BimPlus as BimPlusObject);\r\n if (bimPlus && typeof bimPlus[eventName] === 'function') {\r\n bimPlus[eventName]({detail: data});\r\n }\r\n\r\n const _source = (source as Source);\r\n if (eventName in _source) {\r\n _source[eventName].emit(data);\r\n }\r\n}","import { CommonModule } from '@angular/common';\r\nimport { Component, ViewEncapsulation, Output, EventEmitter } from '@angular/core';\r\nimport { TranslateService, TranslateModule } from '@ngx-translate/core';\r\nimport { BimplusLocalizedWidgetComponent } from '../../components/bimplus-localized-widget/bimplus-localized-widget.component';\r\nimport { fireEvent } from '../../utils/utils';\r\n\r\n@Component({\r\n selector: 'lib-bimplus-contact',\r\n imports: [CommonModule, TranslateModule],\r\n providers: [TranslateService],\r\n templateUrl: './bimplus-contact.component.html',\r\n styleUrl: './bimplus-contact.component.less',\r\n encapsulation: ViewEncapsulation.ShadowDom\r\n})\r\nexport class BimplusContactComponent extends BimplusLocalizedWidgetComponent{\r\n constructor(){\r\n super();\r\n }\r\n \r\n @Output() bimplusContactClicked = new EventEmitter<string>();\r\n\r\n _contactClicked(){\r\n fireEvent(this, \"bimplusContactClicked\", \"contact\");\r\n }\r\n}\r\n","<a\r\n href=\"https://connect.allplan.com/support/contact.ct?SSO=1&autolang\"\r\n class=\"bimplus-contact-link\"\r\n rel=\"noopener\"\r\n target=\"_blank\"\r\n (click)=\"_contactClicked()\"\r\n [title]=\"'_BimplusContactTitle' | translate\"\r\n>\r\n <div class=\"bimplus-contact\"></div>\r\n</a>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, ViewEncapsulation, Input, Output, EventEmitter, booleanAttribute } from '@angular/core';\r\nimport { fireEvent } from '../../utils/utils';\r\n\r\n@Component({\r\n selector: 'lib-bimplus-language-menu',\r\n imports: [CommonModule],\r\n templateUrl: './bimplus-language-menu.component.html',\r\n styleUrl: './bimplus-language-menu.component.less',\r\n encapsulation: ViewEncapsulation.ShadowDom\r\n})\r\nexport class BimplusLanguageMenuComponent {\r\n\r\n _languagesList = [\r\n { symbol: \"cs\", text: \"Čeština\"},\r\n { symbol: \"de\", text: \"Deutsch\"},\r\n { symbol: \"en\", text: \"English (UK)\"},\r\n { symbol: \"us\", text: \"English (US)\"},\r\n { symbol: \"es\", text: \"Español\"},\r\n { symbol: \"fr\", text: \"Français\"},\r\n { symbol: \"it\", text: \"Italiano\"},\r\n { symbol: \"ru\", text: \"Русский\"},\r\n { symbol: \"ro\", text: \"Romana\"},\r\n { symbol: \"tr\", text: \"Türkçe\"}\r\n ];\r\n\r\n @Input({ transform: booleanAttribute }) isTouch : boolean = false;\r\n @Input() selectedLanguage : string = \"en\";\r\n @Input({ transform: booleanAttribute }) expandUp : boolean = false;\r\n _menuOpened : boolean = false;\r\n\r\n @Output() bimplusLanguageSelected = new EventEmitter<string>();\r\n\r\n _switchLanguage( language: string ){\r\n fireEvent(this, \"bimplusLanguageSelected\", language);\r\n }\r\n\r\n _toggleOpened(){\r\n this._menuOpened = !this._menuOpened;\r\n }\r\n}\r\n","<div \r\n class=\"bimcomp-overlay\"\r\n [ngClass]=\"_menuOpened ? 'open' : ''\" \r\n (click)=\"_toggleOpened()\"\r\n (keypress)=\"_toggleOpened()\"\r\n >\r\n</div>\r\n<div data-test=\"language-menu-dropdown\"\r\n class=\"dropdown\" \r\n [ngClass]=\"_menuOpened ? 'open' : ''\" [ngClass]=\"isTouch ? 'is-touch' : ''\" \r\n (click)=\"_toggleOpened()\"\r\n (keypress)=\"_toggleOpened()\"\r\n >\r\n <div class=\"dropdown-toggle\" >\r\n <div class='main-icon icon-languages'></div>\r\n <span class=\"caret\"></span>\r\n </div>\r\n\r\n <ul class= \"bimcomp-dropdown-menu\" [ngClass]=\"{'open':_menuOpened, 'expand-up':expandUp }\">\r\n <li [attr.data-test]=\"'langmenu_item_' + languageItem.text\" \r\n class=\"bimcomp-dropdown-menu-item\" \r\n [ngClass]=\"selectedLanguage === languageItem.symbol ? 'selected' : ''\" \r\n (click)=\"_switchLanguage(languageItem.symbol)\"\r\n (keypress)=\"_switchLanguage(languageItem.symbol)\"\r\n *ngFor=\"let languageItem of _languagesList\"\r\n >\r\n <span>{{languageItem.text}}</span>\r\n </li>\r\n </ul>\r\n</div>","import { CommonModule } from '@angular/common';\r\nimport { Component, ViewEncapsulation, Input, booleanAttribute } from '@angular/core';\r\nimport { TranslateService, TranslateModule } from '@ngx-translate/core';\r\nimport { BimplusLocalizedWidgetComponent } from \"../../components/bimplus-localized-widget/bimplus-localized-widget.component\"\r\nimport { fireEvent } from '../../utils/utils';\r\nimport { MenuListType } from '../../types/types';\r\n\r\nexport interface BimplusProjectMenuComponentAttribute {\r\n [key: string]: unknown; // Add index signature allowing string indexing\r\n //Other properties and methods...\r\n}\r\n\r\n@Component({\r\n selector: 'lib-bimplus-project-menu',\r\n imports: [CommonModule, TranslateModule],\r\n providers: [TranslateService],\r\n templateUrl: './bimplus-project-menu.component.html',\r\n styleUrl: './bimplus-project-menu.component.less',\r\n encapsulation: ViewEncapsulation.ShadowDom\r\n})\r\nexport class BimplusProjectMenuComponent extends BimplusLocalizedWidgetComponent {\r\n constructor(){\r\n super()\r\n }\r\n\r\n @Input() projectName: string = \"\";\r\n @Input() projectImageUrl: string = \"\";\r\n @Input() projectExplorerUrl: string = \"\";\r\n @Input() projectActiveItem: string = \"\";\r\n @Input({ transform: booleanAttribute }) projectmembersDisabled: boolean = false;\r\n @Input({ transform: booleanAttribute }) modelsDisabled: boolean = false;\r\n @Input({ transform: booleanAttribute }) documentsDisabled: boolean = false;\r\n @Input({ transform: booleanAttribute }) projectsettingsDisabled: boolean = false;\r\n @Input({ transform: booleanAttribute }) processesDisabled: boolean = false;\r\n\r\n @Input({ transform: booleanAttribute }) projectmembersVisible: boolean = true;\r\n @Input({ transform: booleanAttribute }) modelsVisible: boolean = true;\r\n @Input({ transform: booleanAttribute }) documentsVisible: boolean = true;\r\n @Input({ transform: booleanAttribute }) projectsettingsVisible: boolean = true;\r\n @Input({ transform: booleanAttribute }) processesVisible: boolean = true;\r\n\r\n @Input({ transform: booleanAttribute }) isCollapsed: boolean = false;\r\n @Input({ transform: booleanAttribute }) isMiniMode: boolean = false;\r\n @Input({ transform: booleanAttribute }) isTouch: boolean = false;\r\n @Input({ transform: booleanAttribute }) hideMenuIcons: boolean = false;\r\n @Input({ transform: booleanAttribute }) showHorizontalMenuIcons: boolean = false;\r\n @Input() menuItemsOrder : string[] = [];\r\n @Input({ transform: booleanAttribute }) showCoworkBackups: boolean = false;\r\n\r\n get prjImgUrl() {\r\n return this.projectImageUrl ? this.projectImageUrl : \"./assets/@bimplus/navigation/assets/bimplus_Components_Project_Pic_Default.webp\";\r\n }\r\n get backgroundValue() {\r\n return `linear-gradient(rgba(245, 245, 245, 0.8),rgba(245, 245, 245, 0.5) 25%, 75%, rgba(245, 245, 245, 0.8)), url(${this.projectImageUrl ? this.projectImageUrl : './assets/@bimplus/navigation/assets/bimplus_Components_Project_Pic_Default.webp'})`;\r\n }\r\n\r\n get prjImageOverlayStyle() {\r\n return { 'background': `${this.backgroundValue}` };\r\n }\r\n\r\n get prjImageStyle() {\r\n return { 'background': `url(${this.prjImgUrl})` };\r\n }\r\n\r\n /**--------------------------------------------------------------------------\r\n * List of menu items\r\n * Note : action is used to identify action which should be executed\r\n * and also it serves as info topic id\r\n --------------------------------------------------------------------------*/\r\n _menuPrjList: MenuListType[] = [\r\n { action: \"projectmembers\", id: \"portalBimUsers\", type: \"\", class: \"bim-pm-icon-users\", textId: \"_Project_members_tooltip\", textIdDisabled: \"_Insufficient rights title\", disabledTitle: '', checkSubscription: false, devOrStageOnly: false, clickPolicy: \"\" },\r\n { action: \"models\", id: \"portalBimModels\", type: \"\", class: \"bim-pm-icon-models\", textId: \"_Models_tooltip\", textIdDisabled: \"\", disabledTitle: '', checkSubscription: false, devOrStageOnly: false, clickPolicy: \"\" },\r\n { action: \"documents\", id: \"portalBimDocuments\", type: \"\", class: \"bim-pm-icon-documents\", textId: \"_Documents_tooltip\", textIdDisabled: \"\", disabledTitle: '', checkSubscription: false, devOrStageOnly: false, clickPolicy: \"\" },\r\n { action: \"projectsettings\", id: \"portalBimProjectSettings\", type: \"\", class: \"bim-pm-icon-project-settings\", textId: \"_Project_settings_tooltip\", textIdDisabled: \"\", disabledTitle: '', checkSubscription: false, devOrStageOnly: false, clickPolicy: \"\" },\r\n { action: \"processes\", id: \"portalBimProcesses\", type: \"\", class: \"bim-pm-icon-processes\", textId: \"_Approvals\", textIdDisabled: \"\", disabledTitle: '', checkSubscription: false, devOrStageOnly: false, clickPolicy: \"\" }\r\n ];\r\n\r\n get menuItems() : MenuListType[] {\r\n const items = this._menuPrjList.sort((a, b) => this.menuItemsOrder.indexOf(a.id) - this.menuItemsOrder.indexOf(b.id));\r\n \r\n const docs = items.find(item => item.id === \"portalBimDocuments\");\r\n if(docs) {\r\n docs.textId = this.showCoworkBackups ? \"_Backups_Tooltip\" : \"_Documents_tooltip\";\r\n }\r\n\r\n return items;\r\n }\r\n\r\n /**--------------------------------------------------------------------------\r\n * check if app is subscribed/visible\r\n --------------------------------------------------------------------------*/\r\n _isHidden(item: MenuListType): boolean {\r\n if (item) {\r\n const key = `${item.action ? item.action : item.id}Visible`;\r\n\r\n return !((this as unknown as BimplusProjectMenuComponentAttribute)[key]);\r\n }\r\n return false;\r\n }\r\n /**--------------------------------------------------------------------------\r\n * check if app is subscribed/visible\r\n --------------------------------------------------------------------------*/\r\n _isDisabled(item: MenuListType): boolean {\r\n\r\n if (item) {\r\n const key = `${item.action ? item.action : item.id}Disabled`;\r\n return !!(this as unknown as BimplusProjectMenuComponentAttribute)[key];\r\n }\r\n return false;\r\n }\r\n\r\n\r\n _projectMenuItemClicked(action: string, param: string) {\r\n console.log(action, param);\r\n }\r\n\r\n /**--------------------------------------------------------------------------\r\n* item clicked\r\n--------------------------------------------------------------------------*/\r\n _menuItemClicked(item: MenuListType, type: string, event: Event) {\r\n if (event) {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n console.log(item, type, event);\r\n\r\n\r\n if (type != \"info\") {\r\n if (this._isDisabled(item)) {\r\n return;\r\n }\r\n }\r\n const action = item.action;\r\n fireEvent(this, \"bimplusProjectMenuClicked\", { action, type });\r\n }\r\n\r\n _menuItemIgnoreAction(event: Event) {\r\n if (event) {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n _getPrjItemClassAttributes(item: MenuListType, isTouch: boolean) {\r\n const retval: string = `${this._isDisabled(item) ? 'disabled' : ''} ${isTouch ? '' : 'hover-show-info'}`;\r\n return retval;\r\n }\r\n\r\n _getPrjIconClassAttributes(item: MenuListType) {\r\n const retval: string = `${item.class} ${item.action === this.projectActiveItem ? 'active' : ''} ${this._isDisabled(item) ? 'disabled' : ''}`;\r\n return retval;\r\n }\r\n}\r\n","<ng-template #navigationPrjList>\r\n@for(item of menuItems; track item.id){\r\n @if (!_isHidden(item)){\r\n <!--* prjList *-->\r\n <div class=\"bim-pm-prj-item\"\r\n [ngClass] = \"_getPrjItemClassAttributes(item,isTouch)\"\r\n [title]=\"((_isDisabled(item) && item.textIdDisabled) ? item.textIdDisabled : item.textId) | translate\"\r\n (dblclick)=\"_menuItemIgnoreAction($event)\"\r\n (click)=\"_menuItemClicked(item, 'normal',$event)\"\r\n (keypress)=\"_menuItemClicked(item, 'normal',$event)\"\r\n >\r\n <div\r\n class=\"bim-pm-prj-icon\"\r\n [ngClass] = \"_getPrjIconClassAttributes(item)\"\r\n >\r\n </div>\r\n <div class=\"bim-pm-app-item-info bim-pm-icon bim-pm-icon-info\"\r\n (click)=\"_menuItemClicked(item, 'info',$event)\"\r\n (keypress)=\"_menuItemClicked(item, 'info',$event)\"\r\n >\r\n </div>\r\n </div>\r\n }\r\n}\r\n</ng-template>\r\n\r\n<ng-template #navigationPrjListThumbnail>\r\n@for(item of menuItems; track item.id){\r\n @if (!_isHidden(item) && (isCollapsed || item.action !== 'processes' )){\r\n <!--* navigationPrjList *-->\r\n <div class=\"bim-pm-prj-item\"\r\n [ngClass] = \"_getPrjItemClassAttributes(item,isTouch)\"\r\n [title]=\"((_isDisabled(item) && item.textIdDisabled) ? item.textIdDisabled : item.textId) | translate\"\r\n (dblclick)=\"_menuItemIgnoreAction($event)\"\r\n (click)=\"_menuItemClicked(item, 'normal',$event)\"\r\n (keypress)=\"_menuItemClicked(item, 'normal',$event)\"\r\n >\r\n <div\r\n class=\"bim-pm-prj-icon\"\r\n [ngClass] = \"_getPrjIconClassAttributes(item)\"\r\n >\r\n </div>\r\n <div class=\"bim-pm-app-item-info bim-pm-icon bim-pm-icon-info\"\r\n (click)=\"_menuItemClicked(item, 'info',$event)\"\r\n (keypress)=\"_menuItemClicked(item, 'info',$event)\"\r\n >\r\n </div>\r\n </div>\r\n }\r\n}\r\n</ng-template>\r\n\r\n<div class=\"bim-pm-prj-container\"\r\n [ngClass]=\"{ collapsed: isCollapsed, 'mini-mode': isMiniMode, 'is-touch': isTouch }\"\r\n >\r\n @if (isMiniMode && !isCollapsed) {\r\n <div class=\"bim-pm-prj-details-mini\">\r\n <div class=\"bim-pm-prj-image-bkg-mini\"\r\n [ngStyle]=\"prjImageOverlayStyle\">\r\n <div class=\"bim-pm-prj-image-thumbnail\" [ngStyle]=\"prjImageStyle\"></div>\r\n </div>\r\n <div class=\"bim-pm-prj-name-mini\">\r\n {{projectName}}\r\n </div>\r\n </div>\r\n <div class=\"bim-pm-prj-items-horizontal\"\r\n [ngClass]=\"showHorizontalMenuIcons ? '' : 'hidden'\">\r\n <div class=\"bim-pm-prj-items-list\">\r\n @if (showHorizontalMenuIcons) {\r\n <ng-container *ngTemplateOutlet=\"navigationPrjList\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @else {\r\n <a href={{projectExplorerUrl}} class=\"bim-pm-prj-details\"\r\n [ngStyle]=\"prjImageOverlayStyle\"\r\n (dblclick)=\"_projectMenuItemClicked('prjimagedblclick','normal')\"\r\n (click)=\"_projectMenuItemClicked('prjimageclick','normal')\"\r\n [title]=\"'_ModelThumbnailTooltip' | translate\">\r\n\r\n <div class=\"bim-pm-prj-image\" [ngStyle]=\"prjImageStyle\">\r\n <div class=\"bim-pm-prj-items-overlay\" [ngClass] = \"hideMenuIcons || showHorizontalMenuIcons ? 'hidden' : ''\">\r\n </div>\r\n <div\r\n class=\"bim-pm-prj-items-list\"\r\n [ngClass] = \"hideMenuIcons || showHorizontalMenuIcons ? 'hidden' : ''\"\r\n >\r\n @if (!hideMenuIcons && !showHorizontalMenuIcons){\r\n <ng-container *ngTemplateOutlet=\"navigationPrjListThumbnail\">\r\n </ng-container>\r\n }\r\n </div>\r\n <div class=\"bim-pm-prj-name\">\r\n {{projectName}}\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"bim-pm-prj-items-horizontal\"\r\n [ngClass] = \"showHorizontalMenuIcons ? '' : 'hidden'\">\r\n <div class=\"bim-pm-prj-items-list\">\r\n @if (showHorizontalMenuIcons) {\r\n <ng-container *ngTemplateOutlet=\"navigationPrjList\">\r\n </ng-container>\r\n }\r\n </div>\r\n </div>\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, ViewEncapsulation, Input, Output, EventEmitter, booleanAttribute, OnChanges, SimpleChanges } from '@angular/core';\r\nimport {TranslateService, TranslateModule} from '@ngx-translate/core';\r\nimport {BimplusProjectMenuComponent} from './../bimplus-project-menu/bimplus-project-menu.component';\r\nimport {BimplusLocalizedWidgetComponent} from \"../../components/bimplus-localized-widget/bimplus-localized-widget.component\"\r\nimport { fireEvent } from '../../utils/utils';\r\nimport {MenuListType} from '../../types/types';\r\n\r\nconst MenuListTypeId = {\r\n PORTAL_TEAM_MANAGEMENT_BTN: 'portalTeamManagementBtn',\r\n PORTAL_PROPERTY_MANAGER_BTN: 'portalPropertyManagerBtn',\r\n PORTAL_BIM_USERS: 'portalBimUsers',\r\n PORTAL_BIM_MODELS: 'portalBimModels',\r\n PORTAL_BIM_DOCUMENTS: 'portalBimDocuments',\r\n PORTAL_BIM_PROJECT_SETTINGS: 'portalBimProjectSettings',\r\n PORTAL_BIM_PROCESSES: 'portalBimProcesses',\r\n DIVIDER_PROJECT_MANAGEMENT: 'dividerprojectmanagement',\r\n PORTAL_BIM_VIEWER_BTN: 'portalBimViewerBtn',\r\n PORTAL_CLOUD_VIEWER_BTN: 'portalCloudViewerBtn',\r\n PORTAL_CONNEXIS_BTN: 'portalConnexisBtn',\r\n PORTAL_BIM_AUTOCONVERTER_BTN: 'portalBimAutoconverterBtn',\r\n DIVIDERAPPS: 'dividerapps',\r\n PORTAL_ADD_INS_BTN: 'portalAddInsBtn',\r\n PORTAL_SHOP_BTN: 'portalShopBtn',\r\n PORTAL_GET_YOUR_TEAM_BTN: 'portalGetYourTeamBtn',\r\n PORTAL_TRY_BIMPLUS_PRO_BTN: 'portalTryBimplusProBtn',\r\n} as const;\r\n\r\nexport interface BimplusMainMenuComponentAttribute {\r\n [key: string]: unknown; // Add index signature allowing string indexing\r\n //Other properties and methods...\r\n}\r\n\r\n@Component({\r\n selector: 'lib-bimplus-main-menu',\r\n imports: [CommonModule, TranslateModule, BimplusProjectMenuComponent],\r\n providers: [TranslateService],\r\n templateUrl: './bimplus-main-menu.component.html',\r\n styleUrl: './bimplus-main-menu.component.less',\r\n encapsulation: ViewEncapsulation.ShadowDom\r\n})\r\n\r\nexport class BimplusMainMenuComponent extends BimplusLocalizedWidgetComponent implements OnChanges {\r\n constructor(){\r\n super();\r\n }\r\n\r\n @Input({ transform: booleanAttribute }) isEmbedded : boolean = false;\r\n @Input({ transform: booleanAttribute }) isTouch : boolean = false;\r\n @Input({ transform: booleanAttribute }) isIpadApp : boolean = false;\r\n @Input({ transform: booleanAttribute }) isDev : boolean = false;\r\n @Input({ transform: booleanAttribute }) isStage : boolean = false;\r\n @Input({ transform: booleanAttribute }) hideProjectMenuIcons : boolean = false;\r\n @Input({ transform: booleanAttribute }) showHorizontalMenuIcons : boolean = false;\r\n @Input() projectName : string = \"\";\r\n @Input() projectImageUrl : string = \"\";\r\n @Input() projectExplorerUrl : string = \"\";\r\n @Input() projectActiveItem : string = \"\";\r\n @Input({ transform: booleanAttribute }) projectmembersDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) modelsDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) documentsDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) projectsettingsDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) processesDisabled : boolean = false;\r\n @Input() footerActiveItem : string = \"\";\r\n @Input() menuActiveItem : string = \"\";\r\n @Input({ transform: booleanAttribute }) isCollapsed : boolean = false;\r\n @Input({ transform: booleanAttribute }) showOverlay : boolean = false;\r\n @Input({ transform: booleanAttribute }) teammembersSubscribed : boolean = false;\r\n @Input({ transform: booleanAttribute }) propertymanagerSubscribed : boolean = false;\r\n @Input({ transform: booleanAttribute }) autoconverterSubscribed : boolean = false;\r\n @Input({ transform: booleanAttribute }) openProjectDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) bimexplorerDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) autoconverterDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) teammembersDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) propertymanagerDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) shopDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) addinsDisabled : boolean = false;\r\n @Input({ transform: booleanAttribute }) openProjectVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) bimplusProjectMenuVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) projectmembersVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) modelsVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) documentsVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) projectsettingsVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) processesVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) bimexplorerVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) autoconverterVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) teammembersVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) propertymanagerVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) shopVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) addinsVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) dividerprojectmanagementVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) dividerappsVisible : boolean = true;\r\n @Input({ transform: booleanAttribute }) getYourTeamVisible : boolean = false;\r\n @Input({ transform: booleanAttribute }) tryBimplusProVisible : boolean = false;\r\n @Input({ transform: booleanAttribute }) cloudviewerVisible : boolean = true;\r\n @Input() appsWithInfo : string[] = [];\r\n @Input() appsOrder : string[] = [];\r\n @Input() menuItemsOrder : string[] = [];\r\n @Input({ transform: booleanAttribute }) showCoworkBackups: boolean = false;\r\n\r\n @Output() bimplusMainMenuClicked = new EventEmitter<{ action: string, type: string }>();\r\n @Output() bimplusMainMenuOverlayClicked = new EventEmitter<void>();\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['localizedStrings']) {\r\n this._localizedStrings.set(changes['localizedStrings'].currentValue);\r\n }\r\n }\r\n\r\n get apps(): MenuListType[] {\r\n let appsList = this.appsList.slice().sort((a, b) => this.appsOrder.indexOf(a.id) - this.appsOrder.indexOf(b.id));\r\n\r\n // if not modelsVisible remove PORTAL_BIM_MODELS.\r\n if (!this.modelsVisible) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.PORTAL_BIM_MODELS);\r\n }\r\n\r\n // if not processesVisible remove PORTAL_BIM_PROCESSES.\r\n if (!this.processesVisible) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.PORTAL_BIM_PROCESSES);\r\n }\r\n\r\n // if not cloudviewerVisible remove PORTAL_CLOUD_VIEWER_BTN.\r\n if (!this.cloudviewerVisible) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.PORTAL_CLOUD_VIEWER_BTN);\r\n }\r\n\r\n // if not bimexplorerVisible remove PORTAL_BIM_VIEWER_BTN.\r\n if (!this.bimexplorerVisible) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.PORTAL_BIM_VIEWER_BTN);\r\n }\r\n\r\n // if not autoconverterVisible remove PORTAL_AUTOCONVERTER_BTN.\r\n if (!this.autoconverterVisible) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.PORTAL_BIM_AUTOCONVERTER_BTN);\r\n }\r\n\r\n // if not dividerappsVisible remove DIVIDERAPPS divider.\r\n if (!this.dividerappsVisible) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.DIVIDERAPPS);\r\n }\r\n\r\n // if teammembersDisabled remove PORTAL_TEAM_MANAGEMENT_BTN.\r\n if (this.teammembersDisabled) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.PORTAL_TEAM_MANAGEMENT_BTN);\r\n }\r\n\r\n // if propertymanagerDisabled remove PORTAL_PROPERTY_MANAGER_BTN.\r\n if (this.propertymanagerDisabled) {\r\n appsList = appsList.filter(({ id }) => id !== MenuListTypeId.PORTAL_PROPERTY_MANAGER_BTN);\r\n }\r\n\r\n // if isTouch remove property manager btn. & approvals btn.\r\n if(this.isTouch) {\r\n appsList = appsList.filter(({ id }) => \r\n id !== MenuListTypeId.PORTAL_PROPERTY_MANAGER_BTN && \r\n id !== MenuListTypeId.PORTAL_BIM_PROCESSES\r\n );\r\n }\r\n\r\n const docs = appsList.find(item => item.id === MenuListTypeId.PORTAL_BIM_DOCUMENTS);\r\n if(docs) {\r\n docs.textId = this.showCoworkBackups ? \"_Backups\" : \"_Files\";\r\n }\r\n\r\n\r\n return appsList;\r\n }\r\n\r\n get footerList(): MenuListType[] {\r\n let footerList = this._menuFooterList.filter(item => this._isSubscribed(item) && !this._isHidden(item));\r\n\r\n // in case that \"Get Your Team\" is not visible and teammembers are disabled then remove divider first, or is not isTouch mode\r\n if (this.teammembersDisabled || !this.isTouch) {\r\n footerList = footerList.filter(({ id }) => id !== MenuListTypeId.DIVIDERAPPS);\r\n }\r\n\r\n // if team is assigned then remove \"Get Your Team\" button\r\n if (!this.getYourTeamVisible) {\r\n return footerList.filter(({ id }) => id !== MenuListTypeId.PORTAL_GET_YOUR_TEAM_BTN);\r\n }\r\n\r\n // remove divider if there is no \"Get Your Team\" button\r\n return footerList.filter(({ id }) => id !== MenuListTypeId.DIVIDERAPPS);\r\n }\r\n\r\n /**--------------------------------------------------------------------------\r\n * check if app is subscribed\r\n --------------------------------------------------------------------------*/\r\n _isSubscribed(item:MenuListType):boolean {\r\n\r\n if (item.checkSubscription) {\r\n const key = `${item.action}Subscribed`;\r\n return !!((this as unknown as BimplusMainMenuComponentAttribute )[key]);\r\n }\r\n return true;\r\n }\r\n /**--------------------------------------------------------------------------\r\n * check if app is clickable\r\n --------------------------------------------------------------------------*/\r\n _isClickable(item:MenuListType):boolean {\r\n\r\n if (item.clickPolicy === \"noProjectNoSubscription\") {\r\n return this.projectName !== \"\";\r\n }\r\n return true;\r\n }\r\n\r\n /**--------------------------------------------------------------------------\r\n * check if app is subscribed/visible\r\n --------------------------------------------------------------------------*/\r\n _isHidden(item:MenuListType):boolean {\r\n\r\n if (item) {\r\n const key = `${item.action ? item.action : item.id}Visible`;\r\n return !((this as unknown as BimplusMainMenuComponentAttribute )[key]);\r\n }\r\n return false;\r\n }\r\n\r\n /**--------------------------------------------------------------------------\r\n * check if app is disabled\r\n --------------------------------------------------------------------------*/\r\n _isDisabled(item:MenuListType) {\r\n const key = `${item.action}Disabled`;\r\n return !!((this as unknown as BimplusMainMenuComponentAttribute )[key]);\r\n }\r\n\r\n _getContextData(item: MenuListType, active: boolean, disabled: boolean, clickable: boolean, selected: boolean) {\r\n return {\r\n item: item,\r\n active: active,\r\n disabled: disabled,\r\n clickable: clickable,\r\n selected: selected,\r\n showInfoIcon: this.appsWithInfo.includes(item.id)\r\n };\r\n }\r\n\r\n _openPrjBtn:MenuListType = { action:\"openProject\", id:\"portalSelectProjectBtn\",type:\"\", class: \"bim-mm-icon-folder\", textId: \"_Portal_Menu_Open_Project\", textIdDisabled: \"_Portal_Menu_Open_Project\",disabledTitle:'',checkSubscription: true, devOrStageOnly : false,clickPolicy: \"\"};\r\n\r\n contextData = {item:\"haha\",active:true,disabled:true,clickable:true,selected:true};\r\n\r\n\r\n appsList: MenuListType[] = [\r\n { action:\"projectmembers\", id: MenuListTypeId.PORTAL_BIM_USERS, type:\"\", class: \"bim-mm-icon-users\", textId: \"_projectStatisticsMembers\", textIdDisabled: \"_projectStatisticsMembers\", disabledTitle:\"_Insufficient rights title\",checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"},\r\n { action:\"models\", id: MenuListTypeId.PORTAL_BIM_MODELS, type:\"\",class: \"bim-mm-icon-models\", textId: \"_Divisions\", textIdDisabled: \"_Divisions\",disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"},\r\n { action:\"documents\", id: MenuListTypeId.PORTAL_BIM_DOCUMENTS, type:\"\",class: \"bim-mm-icon-documents\", textId: \"_Files\", textIdDisabled: \"_Files\",disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"},\r\n { action:\"projectsettings\", id: MenuListTypeId.PORTAL_BIM_PROJECT_SETTINGS, type:\"\",class: \"bim-mm-icon-project-settings\", textId: \"_Settings\", textIdDisabled: \"_Settings\",disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"},\r\n { action:\"processes\", id: MenuListTypeId.PORTAL_BIM_PROCESSES, type:\"\",class: \"bim-mm-icon-processes\", textId: \"_Approvals\", textIdDisabled: \"_Approvals\",disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"},\r\n { action:\"\",id: MenuListTypeId.DIVIDER_PROJECT_MANAGEMENT, type:\"divider\", class: \"bim-mm-app-item-divider\", textId: \"\",textIdDisabled:\"\",disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"},\r\n\r\n { action:\"bimexplorer\", id: MenuListTypeId.PORTAL_BIM_VIEWER_BTN, type:\"\",class: \"bim-mm-icon-bim-explorer\", textId: \"BIM Explorer\", textIdDisabled: \"BIM Explorer\", disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"noProjectNoSubscription\"},\r\n { action:\"cloudviewer\", id: MenuListTypeId.PORTAL_CLOUD_VIEWER_BTN, type:\"\",class: \"bim-mm-icon-cloud-viewer\", textId: \"Model Viewer\", textIdDisabled: \"Model Viewer\", disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"noProjectNoSubscription\"},\r\n { action:\"autoconverter\", id: MenuListTypeId.PORTAL_BIM_AUTOCONVERTER_BTN, type:\"\",class: \"bim-mm-icon-autoconverter\", textId: \"Autoconverter\", textIdDisabled: \"Autoconverter\", disabledTitle:'',checkSubscription: true, devOrStageOnly : false, clickPolicy: \"noProjectNoSubscription\"},\r\n\r\n { action:\"\",id: MenuListTypeId.DIVIDERAPPS, type:\"divider\", class: \"bim-mm-app-item-divider\", textId: \"\",textIdDisabled:\"\",disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"},\r\n\r\n { action:\"teammembers\", id: MenuListTypeId.PORTAL_TEAM_MANAGEMENT_BTN, type:\"\", class: \"bim-mm-icon-team-members\", textId: \"_Portal_Menu_Team_Members\", textIdDisabled: \"_Portal_Menu_Team_Members\", disabledTitle:'',checkSubscription: true, devOrStageOnly : false,clickPolicy: \"\"},\r\n { action:\"propertymanager\", id: MenuListTypeId.PORTAL_PROPERTY_MANAGER_BTN, type:\"\",class: \"bim-mm-icon-property-manager\", textId: \"_Portal_Menu_Properties\", textIdDisabled: \"_Portal_Menu_Properties\", disabledTitle:'',checkSubscription: true, devOrStageOnly : false,clickPolicy: \"\"},\r\n ];\r\n\r\n _menuFooterList: MenuListType[] = [\r\n { action:\"\",id: MenuListTypeId.DIVIDERAPPS, type:\"divider\", class: \"bim-mm-app-item-divider\",checkSubscription: false,devOrStageOnly : false } as MenuListType,\r\n { action:\"addins\", id: MenuListTypeId.PORTAL_ADD_INS_BTN, type:\"\", class: \"bim-mm-icon-add-ins\", textId: \"_AddIns\", textIdDisabled: \"_AddIns\", disabledTitle:'', checkSubscription: false, devOrStageOnly : false, clickPolicy: \"\"},\r\n { \r\n action:\"getYourTeam\", \r\n id: MenuListTypeId.PORTAL_GET_YOUR_TEAM_BTN,\r\n class: \"bim-mm-icon-get-your-team\", \r\n textId: \"_Get_Your_Team\", \r\n textIdDisabled: \"_Get_Your_Team\",\r\n } as MenuListType,\r\n { \r\n action:\"tryBimplusPro\", \r\n id: MenuListTypeId.PORTAL_TRY_BIMPLUS_PRO_BTN,\r\n class: \"bim-mm-icon-try-bimplus-pro\", \r\n textId: \"_Try_Bimplus_Pro\", \r\n textIdDisabled: \"_Try_Bimplus_Pro\",\r\n } as MenuListType, \r\n { action:\"shop\", id: MenuListTypeId.PORTAL_SHOP_BTN, type:\"\",class: \"bim-mm-icon-shop\", textId: \"_Get_More\", textIdDisabled: \"_Get_More\",disabledTitle:'',checkSubscription: false,devOrStageOnly : false,clickPolicy: \"\"}\r\n ];\r\n\r\n _overlayClicked(){\r\n fireEvent(this, \"bimplusMainMenuOverlayClicked\");\r\n }\r\n\r\n _mainMenuItemClicked(item: MenuListType,type:string,event: Event | undefined ){\r\n if (event) {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n\r\n if(type != \"info\") {\r\n if (this._isDisabled(item)){\r\n return;\r\n }\r\n }\r\n\r\n const action = item.action;\r\n fireEvent(this,\"bimplusMainMenuClicked\", {action,type:type } );\r\n }\r\n}\r\n","<ng-template #appNavigationItemContent let-contextData>\r\n @if (contextData.item.type === 'divider') {\r\n <div class=\"bim-mm-app-item\" [class]=\"contextData.item.class\" [id]=\"contextData.item.id\"></div>\r\n } @else {\r\n <div class=\"bim-mm-app-item\" [id]=\"contextData.item.id\"\r\n [ngClass]=\"isTouch?'':'hover-show-info '+(contextData.active?'active ':' ') +(contextData.disabled?'disabled ':' ')+(contextData.clickable?' ':'not-clickable ')+(contextData.selected?'selected ':' ')\"\r\n [title] =\"((contextData.disabled) ? (contextData.item.disabledTitle | translate) : '' )\"\r\n >\r\n <div class=\"bim-mm-app-item-details\"\r\n [ngClass] = \" contextData.clickable ? '' : 'not-clickable' \"\r\n (click)=\"_mainMenuItemClicked(contextData.item,'normal',$event)\"\r\n (keypress)=\"_mainMenuItemClicked(contextData.item,'normal',$event)\">\r\n <div class=\"bim-mm-icon\"\r\n [ngClass]=\"contextData.item.class + (contextData.active?' active':'') + (contextData.disabled?' disabled ':'')\">\r\n </div>\r\n <span>{{(contextData.isDisabled && (contextData.item.textIdDisabled !==\"\") ? contextData.item.textIdDisabled : contextData.item.textId) | translate}}</span>\r\n </div>\r\n @if(contextData.showInfoIcon){\r\n <div class=\"bim-mm-app-item-info bim-mm-icon bim-mm-icon-info\"\r\n (click)=\"_mainMenuItemClicked(contextData.item, 'info',$event)\"\r\n (keypress)=\"_mainMenuItemClicked(contextData.item, 'info',$event)\">\r\n </div>\r\n }\r\n </div>\r\n }\r\n</ng-template>\r\n\r\n\r\n\r\n<div \r\n class=\"bim-mm-wrapper\" \r\n [ngClass]=\"showOverlay ? 'bim-mm-overlay' : ''\" \r\n (click)=\"_overlayClicked()\"\r\n (keypress)=\"_overlayClicked()\"\r\n >\r\n <div class= \"bim-mm-container\">\r\n @if(!_isHidden(_openPrjBtn)){\r\n <ng-container\r\n *ngTemplateOutlet=\"appNavigationItemContent; context: { $implicit: _getContextData(_openPrjBtn,projectActiveItem === 'projectlist',_isDisabled(_openPrjBtn),true,projectActiveItem === 'projectlist') }\"\r\n ></ng-container>\r\n }\r\n\r\n @if(bimplusProjectMenuVisible){\r\n <lib-bimplus-project-menu\r\n projectName = {{projectName}}\r\n projectImageUrl = {{projectImageUrl}}\r\n projectExplorerUrl = {{projectExplorerUrl}}\r\n projectActiveItem = {{projectActiveItem}}\r\n projectmembersDisabled = {{projectmembersDisabled}}\r\n modelsDisabled = {{modelsDisabled}}\r\n documentsDisabled = {{documentsDisabled}}\r\n projectsettingsDisabled = {{projectsettingsDisabled}}\r\n processesDisabled = {{processesDisabled}}\r\n projectmembersVisible = {{projectmembersVisible}}\r\n modelsVisible = {{modelsVisible}}\r\n documentsVisible = {{documentsVisible}}\r\n projectsettingsVisible = {{projectsettingsVisible}}\r\n processesVisible = {{processesVisible}}\r\n isCollapsed = {{isCollapsed}}\r\n isMiniMode = {{isTouch}}\r\n isTouch = {{isTouch}}\r\n hideMenuIcons = {{hideProjectMenuIcons}}\r\n showHorizontalMenuIcons = {{showHorizontalMenuIcons}}\r\n [menuItemsOrder]=\"menuItemsOrder\"\r\n ></lib-bimplus-project-menu>\r\n }\r\n <div [ngClass]=\"apps.length || footerList.length ? 'bim-mm-apps-container' : ''\">\r\n <div class=\"bim-mm-apps-list\">\r\n <div *ngFor=\"let appItem of apps\">\r\n <ng-container\r\n *ngTemplateOutlet=\"appNavigationItemContent; context: { $implicit: _getContextData(appItem,!_isSubscribed(appItem),_isDisabled(appItem),_isClickable(appItem),menuActiveItem === appItem.action)}\"\r\n ></ng-container>\r\n </div>\r\n </div>\r\n <div class=\"bim-mm-footer-container\">\r\n <div *ngFor=\"let footerItem of footerList\">\r\n <ng-container\r\n *ngTemplateOutlet=\"appNavigationItemContent; context: { $implicit: _getContextData(footerItem,footerActiveItem === footerItem.action,_isDisabled(footerItem),true,false)}\"\r\n ></ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","export enum LogoState {\r\n BimplusViewer = 'bimplusViewer', // Bimplus logo\r\n ModelViewerBlack = 'modelViewerBlack', // Model viewer black logo\r\n ModelViewer = 'modelViewer', // Cloud viewer logo\r\n ConnexisViewer = 'connexisViewer', // Connexis viewer logo\r\n ConnexisViewerBlack = 'connexisViewerBlack' // Connexis viewer logo (black)\r\n}\r\n\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, ViewEncapsulation, Input, Output, EventEmitter, booleanAttribute, computed, input } from '@angular/core';\r\nimport { fireEvent } from '../../utils/utils';\r\nimport { LogoState } from './logo-state.enum';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { BimplusLocalizedWidgetComponent } from '../bimplus-localized-widget/bimplus-localized-widget.component';\r\n\r\n@Component({\r\n selector: 'lib-bimplus-navbar',\r\n imports: [CommonModule, TranslateModule],\r\n templateUrl: './bimplus-navbar.component.html',\r\n styleUrl: './bimplus-navbar.component.less',\r\n encapsulation: ViewEncapsulation.ShadowDom\r\n})\r\nexport class BimplusNavbarComponent extends BimplusLocalizedWidgetComponent {\r\n @Input() projectInfo : string = \"\";\r\n @Input() teamInfo : string = \"\";\r\n @Input({ transform: booleanAttribute }) isDev : boolean = false;\r\n @Input({ transform: booleanAttribute }) isStage : boolean = false;\r\n @Input() teamInfoOffset : string = \"\";\r\n @Input({ transform: booleanAttribute }) isNavbarMenuVisible : boolean = false;\r\n @Input({ transform: booleanAttribute }) isNavbarInfoVisible : boolean = false;\r\n logoState = input<LogoState>(LogoState.BimplusViewer);\r\n isModelViewerActive = input(false , { transform: booleanAttribute });\r\n @Input({ transform: booleanAttribute }) isNavbarMessageVisible : boolean = false;\r\n @Input({ transform: booleanAttribute }) isNavbarMenuActive : boolean = false;\r\n @Input({ transform: booleanAttribute }) isNavbarMenuEnabled : boolean = true;\r\n @Input({ transform: booleanAttribute }) isTouch : boolean = false;\r\n @Input({ transform: booleanAttribute }) isDashboardTooltipEnabled: boolean = true;\r\n\r\n @Output() bimplusNavbarClicked = new EventEmitter<string>();\r\n\r\n // Make the enum available in the template\r\n public LogoState = LogoState;\r\n\r\n public readonly logoTooltipSignal = computed<string>(() => {\r\n if (this.isModelViewerActive()) {\r\n return \"_Open_new_file\";\r\n }\r\n\r\n return (this.isDashboardTooltipEnabled ? '_dashboard_tooltip' : '');\r\n });\r\n\r\n protected readonly logoStateSignal = computed<LogoState>(() => {\r\n if (this.isModelViewerActive()) {\r\n return LogoState.ModelViewerBlack;\r\n }\r\n\r\n return this.logoState();\r\n });\r\n\r\n _menuClicked() {\r\n if ( this.isNavbarMenuEnabled ) {\r\n fireEvent(this, \"bimplusNavbarClicked\", \"menu\");\r\n }\r\n }\r\n\r\n _logoClicked() {\r\n fireEvent(this, \"bimplusNavbarClicked\", \"logo\");\r\n }\r\n\r\n _projectInfoClicked() {\r\n if ( this.isDev ) {\r\n fireEvent(this, \"bimplusNavbarClicked\", \"project\");\r\n }\r\n }\r\n}\r\n","<div\r\n class=\"bimplus-navbar\"\r\n [ngClass]=\"isTouch ? 'is-touch' : ''\"\r\n>\r\n <div class=\"bimplus-navbar-logo-container\">\r\n <div\r\n class=\"bimplus-logo\"\r\n [ngClass]=\"{\r\n 'model-viewer': logoStateSignal() === LogoState.ModelViewer,\r\n 'model-viewer-black': logoStateSignal() === LogoState.ModelViewerBlack,\r\n 'connexis-viewer': logoStateSignal() === LogoState.ConnexisViewer,\r\n 'connexis-viewer-black': logoStateSignal() === LogoState.ConnexisViewerBlack,\r\n 'burger-menu-not-visible': !isNavbarMenuVisible\r\n }\"\r\n (click)=\"_logoClicked()\"\r\n (keypress)=\"_logoClicked()\"\r\n [title]=\"logoTooltipSignal() | translate\"\r\n ></div>\r\n\r\n <div\r\n class=\"bimplus-navbar-menu icon\"\r\n [ngClass]=\"{'active':isNavbarMenuActive, 'hidden': !isNavbarMenuVisible, 'disabled': !isNavbarMenuEnabled}\"\r\n (click)=\"_menuClicked()\"\r\n (keypress)=\"_menuClicked()\"\r\n ></div>\r\n </div>\r\n\r\n <div class=\"bimplus-navbar-container\">\r\n <div\r\n class=\"bimplus-navbar-info\"\r\n [ngClass]=\"{'hidden': !isNavbarInfoVisible}\"\r\n [style.margin-left]=\"teamInfoOffset\"\r\n >\r\n <span class=\"team\">{{teamInfo}}</span>\r\n <span *ngIf=\"projectInfo && !isTouch\">&nbsp;&nbsp; -&nbsp;&nbsp;</span>\r\n <span\r\n class=\"project\"\r\n [ngClass]=\"isDev ? 'clickable' : ''\"\r\n (click)=\"_projectInfoClicked()\"\r\n (keypress)=\"_projectInfoClicked()\"\r\n >\r\n {{projectInfo}}\r\n </span>\r\n </div>\r\n\r\n <div class=\"bimplus-navbar-slot\">\r\n <slot></slot>\r\n </div>\r\n\r\n </div>\r\n</div>\r\n","import { Component, ViewEncapsulation, ElementRef, After