Files
infineon_plc/Packages/Beckhoff.TwinCAT.HMI.Controls.14.4.1/runtimes/native1.12-tchmi/dist/TcHmiTabNavigation/TcHmiTabNavigation.esm.js
m.heisig 2d11c43579 Added minimal functionality for Robot teaching
- Added minimal HMI
- Added possibility to open and close all chamber doors
2026-01-17 09:20:39 +01:00

1 line
29 KiB
JavaScript

var __runInitializers=this&&this.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0},__esDecorate=this&&this.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(void 0!==f&&"function"!=typeof f)throw new TypeError("Function expected");return f}for(var _,kind=contextIn.kind,key="getter"===kind?"get":"setter"===kind?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]="access"===p?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])("accessor"===kind?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if("accessor"===kind){if(void 0===result)continue;if(null===result||"object"!=typeof result)throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&("field"===kind?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0};import{TcHmiControl}from"Beckhoff.TwinCAT.HMI.Framework/index.esm.js";let TcHmiTabNavigation=(()=>{var _a,_b,_c,_d,_e;let ___tabChangeCallback_decorators,___onUserDataChanged_decorators,___onResolverForTabsWatchCallback_decorators,___onResolverForTextPaddingWatchCallback_decorators,___onResolverForTabTextColorWatchCallback_decorators,___onResolverForActiveTabTextColorWatchCallback_decorators,___onResolverForActiveTabColorWatchCallback_decorators,_classSuper=TcHmiControl.Control,_instanceExtraInitializers=[];return class TcHmiTabNavigation extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___tabChangeCallback_decorators=[TcHmi.EventHandler()],___onUserDataChanged_decorators=[TcHmi.EventHandler()],___onResolverForTabsWatchCallback_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],___onResolverForTextPaddingWatchCallback_decorators=[(_b=TcHmi).CallbackMethod.bind(_b)],___onResolverForTabTextColorWatchCallback_decorators=[(_c=TcHmi).CallbackMethod.bind(_c)],___onResolverForActiveTabTextColorWatchCallback_decorators=[(_d=TcHmi).CallbackMethod.bind(_d)],___onResolverForActiveTabColorWatchCallback_decorators=[(_e=TcHmi).CallbackMethod.bind(_e)],__esDecorate(this,null,___tabChangeCallback_decorators,{kind:"method",name:"__tabChangeCallback",static:!1,private:!1,access:{has:obj=>"__tabChangeCallback"in obj,get:obj=>obj.__tabChangeCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onUserDataChanged_decorators,{kind:"method",name:"__onUserDataChanged",static:!1,private:!1,access:{has:obj=>"__onUserDataChanged"in obj,get:obj=>obj.__onUserDataChanged},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTabsWatchCallback_decorators,{kind:"method",name:"__onResolverForTabsWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTabsWatchCallback"in obj,get:obj=>obj.__onResolverForTabsWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTextPaddingWatchCallback_decorators,{kind:"method",name:"__onResolverForTextPaddingWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTextPaddingWatchCallback"in obj,get:obj=>obj.__onResolverForTextPaddingWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTabTextColorWatchCallback_decorators,{kind:"method",name:"__onResolverForTabTextColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTabTextColorWatchCallback"in obj,get:obj=>obj.__onResolverForTabTextColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForActiveTabTextColorWatchCallback_decorators,{kind:"method",name:"__onResolverForActiveTabTextColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForActiveTabTextColorWatchCallback"in obj,get:obj=>obj.__onResolverForActiveTabTextColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForActiveTabColorWatchCallback_decorators,{kind:"method",name:"__onResolverForActiveTabColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForActiveTabColorWatchCallback"in obj,get:obj=>obj.__onResolverForActiveTabColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),_metadata&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static#tchmiFQN="TcHmi.Controls.Beckhoff."+this.name;constructor(element,pcElement,attrs){super(element,pcElement,attrs)}__elementTemplateRoot=__runInitializers(this,_instanceExtraInitializers);__elementContentTabs;__tabs;__oldTabs;__fileHostAttributesCache=new Map;__activeTabName;__initialTabName;__tabAlignment;__textHorizontalAlignment;__textVerticalAlignment;__textFontSize;__textFontSizeUnit;__textFontFamily;__textFontStyle;__textFontWeight;__textPadding;__tabTextColor;__activeTabTextColor;__activeTabColor;__tabOverflowMode;__previnit(){if(this.__elementTemplateRoot=this.__element.find(".TcHmi_Controls_Beckhoff_TcHmiTabNavigation-template")[0],this.__elementContentTabs=this.__elementTemplateRoot.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiTabNavigation-content-tabs")[0],!this.__elementTemplateRoot||!this.__elementContentTabs)throw new Error("Invalid Template.html");super.__previnit()}__init(){super.__init()}__attach(){super.__attach(),this.__elementContentTabs.addTabChangeCallback(this.__tabChangeCallback),this.__processTabs(),this.__processTabOverflowMode(),this.setActiveTabName(this.__initialTabName||this.__activeTabName||(this.__tabs?.[0].name??null)),this.__destroyOnDetach.push(TcHmi.EventProvider.register("onUserDataChanged",this.__onUserDataChanged))}__detach(){super.__detach(),this.__elementContentTabs.removeTabChangeCallback(this.__tabChangeCallback)}destroy(){this.__keepAlive||super.destroy()}__tabChangeCallback(newTabName){if(!this.__tabs)return;let oldTab=this.__tabs.find(tab=>tab.name===this.__activeTabName);oldTab&&(oldTab.targetFileHostPreload||oldTab.targetFileHostKeepAlive?oldTab.targetFileHostPreAttach||this.__detachTargetFileHost(oldTab):(this.__detachTargetFileHost(oldTab),oldTab.fileHost?.destroy(),oldTab.fileHost=void 0)),this.setActiveTabName(newTabName);let activeTab=this.__tabs.find(tab=>tab.name===newTabName);activeTab&&(activeTab.fileHost||this.__buildFileHost(activeTab),document.body.contains(activeTab.fileHost?.getElement()[0]??null)||this.__attachTargetFileHost(activeTab))}__onUserDataChanged(){for(const tab of this.__tabs??[])this.__elementContentTabs.removeContentTab(tab.name);this.__processTabs()}__buildFileHost(tab){if(tab.fileHost&&(tab.fileHost.destroy(),tab.fileHost=void 0),!tab.targetFile)return;let path=tab.targetFile.path,attributes=tab.targetFile.attributes;if(path)if(path.toLowerCase().endsWith(".content")){let attributesExtended={"data-tchmi-target-content":path,"data-tchmi-left":0,"data-tchmi-top":0,"data-tchmi-width":100,"data-tchmi-height":100,"data-tchmi-width-unit":"%","data-tchmi-height-unit":"%","data-tchmi-scrolling":tab.scrolling??"Auto"};tab.fileHost=TcHmi.ControlFactory.createEx("TcHmi.Controls.System.TcHmiRegion",this.getId()+".Region_"+tab.name,{...attributesExtended},this)}else if(path.toLowerCase().endsWith(".usercontrol")){let attributesExtended={"data-tchmi-target-user-control":path,"data-tchmi-left":0,"data-tchmi-top":0,"data-tchmi-width":100,"data-tchmi-height":100,"data-tchmi-width-unit":"%","data-tchmi-height-unit":"%"};tab.fileHost=TcHmi.ControlFactory.createEx("TcHmi.Controls.System.TcHmiUserControlHost",this.getId()+".UserControlHost_"+tab.name,{...attributes,...attributesExtended},this)}}__attachTargetFileHost(tab){tab.fileHost&&tab.contentElement&&(tab.contentElement.textContent="",tab.contentElement.append(tab.fileHost.getElement()[0]))}__detachTargetFileHost(tab){tab.fileHost?.getElement()[0].remove()}__buildLink(tab){tab.linkElement=document.createElement("tchmi-tab-link"),tab.linkElement.textContent="",tab.linkElement.classList.add("tchmi-tab-navigation-tab-link"),tab.iconElement&&tab.linkElement.append(tab.iconElement),tab.linkElement.insertAdjacentHTML("beforeend",tab.displayName)}__buildIcon(tab){tab.icon?(tab.iconElement=document.createElement("div"),tab.iconElement.classList.add("tab-icon"),TcHmi.StyleProvider.processBackground(tab.iconElement,{image:tab.icon.iconPath,imageWidth:tab.icon.iconWidth??32,imageWidthUnit:tab.icon.iconWidthUnit,imageHeight:tab.icon.iconHeight??32,imageHeightUnit:tab.icon.iconHeightUnit}),tab.iconElement.style.height=(tab.icon.iconHeight??32)+(tab.icon.iconHeightUnit??"px"),tab.iconElement.style.width=(tab.icon.iconWidth??32)+(tab.icon.iconWidthUnit??"px"),tab.iconElement.style.minWidth=(tab.icon.iconWidth??32)+(tab.icon.iconWidthUnit??"px")):tab.iconElement=void 0}__removeTabs(tabs,destroy=!1){if(tabs)for(const tab of tabs)tab.fileHost&&destroy&&(tab.fileHost.destroy(),tab.fileHost=void 0),this.__elementContentTabs.getTab(tab.name)&&this.__elementContentTabs.removeContentTab(tab.name)}getAccessConfig(){const currentAccessConfig=super.getAccessConfig();return this.__getSubRights(this.__tabs??[],tchmi_clone_object(currentAccessConfig))}__getSubRights(items,accessList){if(!items)return accessList;for(const item of items)if(item.accessRights)for(const itemAccessRight of item.accessRights)if(itemAccessRight){let curAccess={accessright:item.name+":"+itemAccessRight.accessright,group:itemAccessRight.group,permission:itemAccessRight.permission};accessList.push(curAccess)}return accessList}getDescriptionAccessByName(name){return name.includes(":")?{name,defaultValueInternal:!0}:null}setTabs(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("Tabs"));let resolverInfo=this.__objectResolvers.get("tab");if(resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy()),this.__fileHostAttributesCache=new Map,null!==convertedValue)for(let value of convertedValue)value.targetFile&&value.targetFile.attributes&&(this.__fileHostAttributesCache.set(value.name,value.targetFile.attributes),"string"!=typeof value.targetFile.attributes&&(value.targetFile.attributes=void 0));let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("Tabs")?.type});this.__objectResolvers.set("tab",{resolver,watchCallback:this.__onResolverForTabsWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTabsWatchCallback)})}__onResolverForTabsWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("Tabs"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__tabs)||(this.__oldTabs=this.__tabs,this.__tabs=data.value,this.__fileHostAttributesCache.forEach((fileHostAttributes,name)=>{if(this.__tabs)for(let tab of this.__tabs)tab.name===name&&"object"==typeof tab.targetFile&&"string"!=typeof fileHostAttributes&&(tab.targetFile.attributes=fileHostAttributes)}),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"Tabs"}),this.__processTabs()):TcHmi.Log.Controls.error(this,TcHmiTabNavigation.#tchmiFQN,{Attribute:"Tabs"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTabs(){return this.__tabs}__processTabs(){if(!this.__isAttached||!this.__tabs)return;let activeTabIndex=0;this.__oldTabs?(activeTabIndex=this.__oldTabs?.findIndex(tab=>tab.name===this.__elementContentTabs.activeTab),this.__removeTabs(this.__oldTabs)):this.__activeTabName&&(activeTabIndex=this.__tabs?.findIndex(tab=>tab.name===this.__activeTabName)),-1===activeTabIndex&&(activeTabIndex=0);for(let i=0;i<this.__tabs.length;i++){let tab=this.__tabs[i],observeAccessId=tab.name+":observe",operateAccessId=tab.name+":operate";if(tab.hidden||!TcHmi.Access.checkAccess(this,observeAccessId))continue;let oldTab=this.__oldTabs?.find(current=>current.targetFile&&tab.targetFile&&current.targetFile.path===tab.targetFile.path);if(oldTab&&!tab.fileHost){!!tchmi_equal(tab.targetFile.attributes,oldTab.targetFile.attributes)&&tab.targetFileHostPreload?(tab.fileHost=oldTab.fileHost,tab.contentElement=oldTab.contentElement,tab.linkElement=oldTab.linkElement,tab.iconElement=oldTab.iconElement,oldTab.fileHost=void 0):(oldTab.fileHost?.destroy(),oldTab.fileHost=void 0)}tab.contentElement||(tab.contentElement=document.createElement("tchmi-tab-content")),!tab.fileHost&&tab.targetFileHostPreload&&this.__buildFileHost(tab),tab.targetFileHostPreload&&tab.targetFileHostPreAttach&&this.__attachTargetFileHost(tab),tab.linkElement&&tab.displayName===oldTab?.displayName&&tchmi_equal(tab.icon,oldTab?.icon)||(this.__buildIcon(tab),this.__buildLink(tab));const accessResult=TcHmi.Access.checkAccess(this,operateAccessId);tab.contentElement&&tab.linkElement&&(this.__elementContentTabs.addContentTab(tab.name,tab.linkElement,tab.contentElement),accessResult?(tab.linkElement.removeAttribute("disabled"),tab.linkElement.style.pointerEvents=""):(tab.linkElement.setAttribute("disabled","true"),tab.linkElement.style.pointerEvents="none")),i===activeTabIndex&&(accessResult?this.__elementContentTabs.openTab(tab.name):this.__tabs.length-1>i&&(activeTabIndex=i+1))}if(this.__oldTabs)for(const oldTab of this.__oldTabs)oldTab.fileHost?.destroy(),oldTab.fileHost=void 0;this.__isAttached&&(this.__processTextFontSize(),this.__processTextFontFamily(),this.__processTextPadding(),this.__processTextFontWeight(),this.__processTextFontStyle(),this.__processBackgroundColor(),this.__processActiveTabColor(),this.__processActiveTabTextColor(),this.__processTabTextColor(),this.__processTextHorizontalAlignment(),this.__processTextVerticalAlignment())}setTabAlignment(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);if(null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TabAlignment")),convertedValue!==this.__tabAlignment){switch(convertedValue){case"Right":case"Bottom":case"Left":this.__tabAlignment=convertedValue;break;default:this.__tabAlignment="Top"}TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TabAlignment"}),this.__processTabAlignment()}}getTabAlignment(){return this.__tabAlignment}__processTabAlignment(){this.__tabAlignment&&this.__elementContentTabs.setTabAlignment(this.__tabAlignment)}setActiveTabName(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ActiveTabName")),convertedValue!==this.__activeTabName&&(this.__activeTabName=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ActiveTabName"}),this.__processActiveTabName())}getActiveTabName(){return this.__activeTabName}__processActiveTabName(){this.__activeTabName&&this.__elementContentTabs.activeTab!==this.__activeTabName&&this.__isAttached&&this.__elementContentTabs.openTab(this.__activeTabName),this.__processBackgroundColor(),this.__processActiveTabColor(),this.__processActiveTabTextColor(),this.__processTabTextColor()}setInitialTabName(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("InitialTabName")),convertedValue!==this.__initialTabName&&(this.__initialTabName=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"InitialTabName"}))}getInitialTabName(){return this.__initialTabName}__processBorderRadius(){super.__processBorderRadius(),TcHmi.StyleProvider.processBorderRadius(this.__elementContentTabs,this.__borderRadius)}setTextHorizontalAlignment(valueNew){let convertedValue=TcHmi.ValueConverter.toHorizontalAlignment(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextHorizontalAlignment")),convertedValue!==this.__textHorizontalAlignment&&(this.__textHorizontalAlignment=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextHorizontalAlignment"}),this.__processTextHorizontalAlignment())}getTextHorizontalAlignment(){return this.__textHorizontalAlignment}__processTextHorizontalAlignment(){for(let tab of this.__tabs??[])tab.linkElement&&TcHmi.StyleProvider.processContentHorizontalAlignment(tab.linkElement,this.__textHorizontalAlignment);let selectedOverflowElement=this.__elementContentTabs.querySelector("tchmi-tab-links-overflow tchmi-tab-link");selectedOverflowElement&&TcHmi.StyleProvider.processContentHorizontalAlignment(selectedOverflowElement,this.__textHorizontalAlignment)}setTextVerticalAlignment(valueNew){let convertedValue=TcHmi.ValueConverter.toVerticalAlignment(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextVerticalAlignment")),convertedValue!==this.__textVerticalAlignment&&(this.__textVerticalAlignment=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextVerticalAlignment"}),this.__processTextVerticalAlignment())}getTextVerticalAlignment(){return this.__textVerticalAlignment}__processTextVerticalAlignment(){for(let tab of this.__tabs??[])tab.linkElement&&TcHmi.StyleProvider.processContentVerticalAlignment(tab.linkElement,this.__textVerticalAlignment);let selectedOverflowElement=this.__elementContentTabs.querySelector("tchmi-tab-links-overflow tchmi-tab-link");selectedOverflowElement&&TcHmi.StyleProvider.processContentVerticalAlignment(selectedOverflowElement,this.__textVerticalAlignment)}setTextFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontSize")),convertedValue!==this.__textFontSize&&(this.__textFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontSize"}),this.__processTextFontSize())}getTextFontSize(){return this.__textFontSize}__processTextFontSize(){for(let tab of this.__tabs??[])tab.linkElement&&(this.__textFontSize?tab.linkElement.style.fontSize=this.__textFontSize+(this.__textFontSizeUnit??"px"):tab.linkElement.style.fontSize="");let selectedOverflowElement=this.__elementContentTabs.querySelector("tchmi-tab-links-overflow tchmi-tab-link");selectedOverflowElement&&(this.__textFontSize?selectedOverflowElement.style.fontSize=this.__textFontSize+(this.__textFontSizeUnit??"px"):selectedOverflowElement.style.fontSize="")}setTextFontSizeUnit(valueNew){let convertedValue=TcHmi.ValueConverter.toFontSizeUnit(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontSizeUnit")),convertedValue!==this.__textFontSizeUnit&&(this.__textFontSizeUnit=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontSizeUnit"}),this.__processTextFontSizeUnit())}getTextFontSizeUnit(){return this.__textFontSizeUnit}__processTextFontSizeUnit(){this.__processTextFontSize()}setTextFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontFamily")),convertedValue!==this.__textFontFamily&&(this.__textFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontFamily"}),this.__processTextFontFamily())}getTextFontFamily(){return this.__textFontFamily}__processTextFontFamily(){for(let tab of this.__tabs??[])tab.linkElement&&(tab.linkElement.style.fontFamily=this.__textFontFamily??"");let selectedOverflowElement=this.__elementContentTabs.querySelector("tchmi-tab-links-overflow tchmi-tab-link");selectedOverflowElement&&(selectedOverflowElement.style.fontFamily=this.__textFontFamily??"")}setTextFontStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toFontStyle(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontStyle")),convertedValue!==this.__textFontStyle&&(this.__textFontStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontStyle"}),this.__processTextFontStyle())}getTextFontStyle(){return this.__textFontStyle}__processTextFontStyle(){for(let tab of this.__tabs??[])tab.linkElement&&TcHmi.StyleProvider.processFontStyle(tab.linkElement,this.__textFontStyle);let selectedOverflowElement=this.__elementContentTabs.querySelector("tchmi-tab-links-overflow tchmi-tab-link");selectedOverflowElement&&TcHmi.StyleProvider.processFontStyle(selectedOverflowElement,this.__textFontStyle)}setTextFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextFontWeight")),convertedValue!==this.__textFontWeight&&(this.__textFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextFontWeight"}),this.__processTextFontWeight())}getTextFontWeight(){return this.__textFontWeight}__processTextFontWeight(){for(let tab of this.__tabs??[])tab.linkElement&&TcHmi.StyleProvider.processFontWeight(tab.linkElement,this.__textFontWeight);let selectedOverflowElement=this.__elementContentTabs.querySelector("tchmi-tab-links-overflow tchmi-tab-link");selectedOverflowElement&&TcHmi.StyleProvider.processFontWeight(selectedOverflowElement,this.__textFontWeight)}setTextPadding(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextPadding"));let resolverInfo=this.__objectResolvers.get("textPadding");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("TextPadding")?.type});this.__objectResolvers.set("textPadding",{resolver,watchCallback:this.__onResolverForTextPaddingWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTextPaddingWatchCallback)})}__onResolverForTextPaddingWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("textPadding"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__textPadding)||(this.__textPadding=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextPadding"}),this.__processTextPadding()):TcHmi.Log.Controls.error(this,TcHmiTabNavigation.#tchmiFQN,{Attribute:"TextPadding"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTextPadding(){return this.__textPadding}__processTextPadding(){for(let tab of this.__tabs??[])tab.linkElement&&TcHmi.StyleProvider.processContentPadding(tab.linkElement,this.__textPadding);let selectedOverflowElement=this.__elementContentTabs.querySelector("tchmi-tab-links-overflow tchmi-tab-link");selectedOverflowElement&&TcHmi.StyleProvider.processContentPadding(selectedOverflowElement,this.__textPadding)}__processBackgroundColor(){super.__processBackgroundColor();const tabLinksInactive=this.__elementContentTabs.querySelectorAll("tchmi-tab-link:not([active])");TcHmi.StyleProvider.processBackgroundColor(tabLinksInactive,this.__background.color);const tabLinksActive=this.__elementContentTabs.querySelectorAll("tchmi-tab-link[active]");TcHmi.StyleProvider.processBackgroundColor(tabLinksActive,null)}setTabTextColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TabTextColor"));let resolverInfo=this.__objectResolvers.get("tabTextColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("TabTextColor")?.type});this.__objectResolvers.set("tabTextColor",{resolver,watchCallback:this.__onResolverForTabTextColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTabTextColorWatchCallback)})}__onResolverForTabTextColorWatchCallback(data){!this.__isAttached&&data.destroy&&data.destroy(),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__tabTextColor)||(this.__tabTextColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TabTextColor"}),this.__processTabTextColor()):TcHmi.Log.Controls.error(this,TcHmiTabNavigation.#tchmiFQN,{Attribute:"TabTextColor"},"Resolving symbols from object failed with error: "+TcHmi.Log.buildMessage(data.details))}getTabTextColor(){return this.__tabTextColor}__processTabTextColor(){const tabLinksInactive=this.__elementContentTabs.querySelectorAll("tchmi-tab-link:not([active])");TcHmi.StyleProvider.processTextColor(tabLinksInactive,this.__tabTextColor)}setActiveTabTextColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ActiveTabTextColor"));let resolverInfo=this.__objectResolvers.get("activeTabTextColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("ActiveTabTextColor")?.type});this.__objectResolvers.set("activeTabTextColor",{resolver,watchCallback:this.__onResolverForActiveTabTextColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForActiveTabTextColorWatchCallback)})}__onResolverForActiveTabTextColorWatchCallback(data){!this.__isAttached&&data.destroy&&data.destroy(),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__activeTabTextColor)||(this.__activeTabTextColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ActiveTabTextColor"}),this.__processActiveTabTextColor()):TcHmi.Log.Controls.error(this,TcHmiTabNavigation.#tchmiFQN,{Attribute:"ActiveTabTextColor"},"Resolving symbols from object failed with error: "+TcHmi.Log.buildMessage(data.details))}getActiveTabTextColor(){return this.__activeTabTextColor}__processActiveTabTextColor(){const tabLinksActive=this.__elementContentTabs.querySelectorAll("tchmi-tab-link[active]");TcHmi.StyleProvider.processTextColor(tabLinksActive,this.__activeTabTextColor)}setActiveTabColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ActiveTabColor"));let resolverInfo=this.__objectResolvers.get("activeTabColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("ActiveTabColor")?.type});this.__objectResolvers.set("activeTabColor",{resolver,watchCallback:this.__onResolverForActiveTabColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForActiveTabColorWatchCallback)})}__onResolverForActiveTabColorWatchCallback(data){!this.__isAttached&&data.destroy&&data.destroy(),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__activeTabColor)||(this.__activeTabColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ActiveTabColor"}),this.__processActiveTabColor()):TcHmi.Log.Controls.error(this,TcHmiTabNavigation.#tchmiFQN,{Attribute:"ActiveTabColor"},"Resolving symbols from object failed with error: "+TcHmi.Log.buildMessage(data.details))}getActiveTabColor(){return this.__activeTabColor}__processActiveTabColor(){const tabLinksActive=this.__elementContentTabs.querySelectorAll("tchmi-tab-link[active]");TcHmi.StyleProvider.processBackgroundColor(tabLinksActive,this.__activeTabColor);const tabContents=this.__elementContentTabs.querySelectorAll("tchmi-tab-contents");TcHmi.StyleProvider.processBackgroundColor(tabContents,this.__activeTabColor)}setTabOverflowMode(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);if(null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TabOverflowMode")),convertedValue!==this.__tabOverflowMode){if("Scroll"===convertedValue)this.__tabOverflowMode=convertedValue;else this.__tabOverflowMode="Popup";TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TabOverflowMode"}),this.__processTabOverflowMode()}}getTabOverflowMode(){return this.__tabOverflowMode}__processTabOverflowMode(){this.__tabOverflowMode&&this.__tabs&&(this.__elementContentTabs.setTabOverflowMode(this.__tabOverflowMode),this.__elementContentTabs.arrangeTabLinks())}}})();TcHmi.Controls.registerEx("TcHmiTabNavigation","TcHmi.Controls.Beckhoff",TcHmiTabNavigation,{injectInGlobalObject:!0});export{TcHmiTabNavigation as Control};