Files
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

5 lines
24 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 TcHmiRadioButton=(()=>{var _a,_b,_c,_d;let ___onPressed_decorators,___onResized_decorators,___onRadioGroupToggled_decorators,___onStateSymbolWatch_decorators,___onResolverForRadioStateIconColorWatchCallback_decorators,___onResolverForRadioStateBackgroundColorWatchCallback_decorators,___onResolverForTextColorWatchCallback_decorators,_classSuper=TcHmiControl.Control,_instanceExtraInitializers=[];return class TcHmiRadioButton extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___onPressed_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkIsReadOnly:!0,checkAccess:"operate"})],___onResized_decorators=[TcHmi.EventHandler()],___onRadioGroupToggled_decorators=[TcHmi.EventHandler()],___onStateSymbolWatch_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],___onResolverForRadioStateIconColorWatchCallback_decorators=[(_b=TcHmi).CallbackMethod.bind(_b)],___onResolverForRadioStateBackgroundColorWatchCallback_decorators=[(_c=TcHmi).CallbackMethod.bind(_c)],___onResolverForTextColorWatchCallback_decorators=[(_d=TcHmi).CallbackMethod.bind(_d)],__esDecorate(this,null,___onPressed_decorators,{kind:"method",name:"__onPressed",static:!1,private:!1,access:{has:obj=>"__onPressed"in obj,get:obj=>obj.__onPressed},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResized_decorators,{kind:"method",name:"__onResized",static:!1,private:!1,access:{has:obj=>"__onResized"in obj,get:obj=>obj.__onResized},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onRadioGroupToggled_decorators,{kind:"method",name:"__onRadioGroupToggled",static:!1,private:!1,access:{has:obj=>"__onRadioGroupToggled"in obj,get:obj=>obj.__onRadioGroupToggled},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onStateSymbolWatch_decorators,{kind:"method",name:"__onStateSymbolWatch",static:!1,private:!1,access:{has:obj=>"__onStateSymbolWatch"in obj,get:obj=>obj.__onStateSymbolWatch},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForRadioStateIconColorWatchCallback_decorators,{kind:"method",name:"__onResolverForRadioStateIconColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForRadioStateIconColorWatchCallback"in obj,get:obj=>obj.__onResolverForRadioStateIconColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForRadioStateBackgroundColorWatchCallback_decorators,{kind:"method",name:"__onResolverForRadioStateBackgroundColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForRadioStateBackgroundColorWatchCallback"in obj,get:obj=>obj.__onResolverForRadioStateBackgroundColorWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForTextColorWatchCallback_decorators,{kind:"method",name:"__onResolverForTextColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForTextColorWatchCallback"in obj,get:obj=>obj.__onResolverForTextColorWatchCallback},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);__textNode=null;__radioGroup;__radioState;__stateSymbol;__stateSymbolInitialized=!1;__radioStateIconColor;__radioStateBackgroundColor;__text;__ignoreEscapeSequences;__textPosition;__textHorizontalAlignment;__textVerticalAlignment;__textFontFamily;__textFontSize;__textFontSizeUnit;__textFontStyle;__textFontWeight;__textColor;__isReadOnly;__onRadioGroupToggledEventDestroyEvent=null;__destroyStateSymbolWatch=null;__state=!1;__isActive=!1;__previnit(){super.__previnit(),this.__elementTemplateRoot=this.__element.find(".TcHmi_Controls_Beckhoff_TcHmiRadioButton-template")}__init(){super.__init()}__attach(){super.__attach(),this.__destroyOnDetach.push(TcHmi.EventProvider.register(this.__id+".onPressed",this.__onPressed),TcHmi.EventProvider.register(this.__id+".onResized",this.__onResized)),this.__stateSymbol&&!this.__destroyStateSymbolWatch&&(this.__destroyStateSymbolWatch=this.__stateSymbol.watch(this.__onStateSymbolWatch))}__detach(){super.__detach(),this.__destroyStateSymbolWatch&&(this.__destroyStateSymbolWatch(),this.__destroyStateSymbolWatch=null)}destroy(){this.__keepAlive||(this.__destroyStateSymbolWatch&&(this.__destroyStateSymbolWatch(),this.__destroyStateSymbolWatch=null),this.__stateSymbol&&this.__stateSymbol.destroy(),null!==this.__onRadioGroupToggledEventDestroyEvent&&(this.__onRadioGroupToggledEventDestroyEvent(),this.__onRadioGroupToggledEventDestroyEvent=null),super.destroy())}__onPressed(){this.__state||this.__writeState(!0,"userInteraction")}__onResized(){let width=this.getRenderedWidth();if(!width)return;let height=this.getRenderedHeight();if(!height)return;this.__borderWidth&&this.__borderStyle&&("None"!==this.__borderStyle.left&&(width-=this.__borderWidth.left),"None"!==this.__borderStyle.right&&(width-=this.__borderWidth.right)),this.__borderWidth&&this.__borderStyle&&("None"!==this.__borderStyle.top&&(height-=this.__borderWidth.top),"None"!==this.__borderStyle.bottom&&(height-=this.__borderWidth.bottom));let compStyles=window.getComputedStyle(this.__elementTemplateRoot[0]);if(compStyles.borderTopStyle&&"none"!==compStyles.borderTopStyle){height-=Number(compStyles.borderTopWidth.replace("px",""))??0}if(compStyles.borderBottomStyle&&"none"!==compStyles.borderBottomStyle){height-=Number(compStyles.borderBottomWidth.replace("px",""))??0}if(compStyles.borderLeftStyle&&"none"!==compStyles.borderLeftStyle){width-=Number(compStyles.borderLeftWidth.replace("px",""))??0}if(compStyles.borderRightStyle&&"none"!==compStyles.borderRightStyle){width-=Number(compStyles.borderRightWidth.replace("px",""))??0}this.__element[0].style.setProperty("--square-size",Math.min(width,height)+"px")}__onRadioGroupToggled(event,data){data&&data.activeElementId&&data.activeElementId!==this.__id&&(this.__stateSymbol&&this.__stateSymbol.getExpression().toString()===data.source||this.__writeState(!1,"toggleGroup"))}setRadioGroup(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("RadioGroup")),convertedValue!==this.__radioGroup&&(this.__radioGroup=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"RadioGroup"}),this.__processRadioGroup())}getRadioGroup(){return this.__radioGroup}__processRadioGroup(){null!==this.__onRadioGroupToggledEventDestroyEvent&&(this.__onRadioGroupToggledEventDestroyEvent(),this.__onRadioGroupToggledEventDestroyEvent=null),null!==this.__radioGroup&&(this.__onRadioGroupToggledEventDestroyEvent=TcHmi.EventProvider.register(this.__radioGroup+".onRadioToggled",this.__onRadioGroupToggled))}__setRadioState(valueNew,forwardStateSymbol,process){let convertedValue=TcHmi.ValueConverter.toToggleState(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("RadioState")),convertedValue!==this.__radioState&&(this.__radioState=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"RadioState"}),TcHmi.EventProvider.raise(this.__id+".onRadioStateChanged"),process&&this.__processRadioState())}setRadioState(valueNew){this.__setRadioState(valueNew,!0,!0)}getRadioState(){return this.__radioState}__processRadioState(forwardStateSymbol=!0){this.__writeState("Active"===this.__radioState,"attribute")}setStateSymbol(valueNew){let newSymbol=valueNew;if(null===newSymbol){let symbolExpression=this.getAttributeDefaultValueInternal("StateSymbol");symbolExpression&&(newSymbol=new TcHmi.Symbol(symbolExpression))}if(this.__stateSymbol!==newSymbol){if(this.__destroyStateSymbolWatch&&(this.__destroyStateSymbolWatch(),this.__destroyStateSymbolWatch=null),this.__stateSymbol&&this.__stateSymbol.destroy(),newSymbol instanceof TcHmi.Symbol)if(this.__stateSymbolInitialized=!1,this.__stateSymbol=newSymbol,this.__isAttached)this.__destroyStateSymbolWatch=this.__stateSymbol.watch(this.__onStateSymbolWatch);else{let referenceDelegation=this.__stateSymbol.getReferenceDelegation();referenceDelegation&&(referenceDelegation.preload=done=>{this.__stateSymbol?.readEx2({forceParallel:!0,forceReadWriteGroup:"TCHMI_BINDING_PRELOAD"},data=>{this.__processStateSymbolResult(data),this.__stateSymbolInitialized=!0,done()})})}else void 0===this.__stateSymbol?this.__stateSymbol=null:(this.__stateSymbol=null,this.__processState(!1,!1,"attribute"));TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"StateSymbol"})}}__processStateSymbolResult(data){data.error===TcHmi.Errors.NONE?!1!==data.value&&!0!==data.value||this.__processState(data.value,!1,this.__stateSymbol.getExpression().toString()):data.details&&TcHmi.Log.Controls.error(this,TcHmiRadioButton.#tchmiFQN,{Attribute:"StateSymbol",Symbol:this.__stateSymbol?.getExpression().toString()},TcHmi.Log.buildMessage(data.details))}__onStateSymbolWatch(data){this.__processStateSymbolResult(data),this.__stateSymbolInitialized=!0}getStateSymbol(){return this.__stateSymbol}__writeState(state,source){return this.__setIsActive(state),this.__stateSymbol&&this.__stateSymbolInitialized?new Promise(resolve=>{this.__stateSymbol.write(state,data=>{if(data.error!==TcHmi.Errors.NONE){data.details??(data.error,TcHmi.Errors[data.error]);return TcHmi.Log.Controls.error(this,TcHmiRadioButton.#tchmiFQN,{Attribute:"StateSymbol",Symbol:this.__stateSymbol?.getExpression().toString()},TcHmi.Log.buildMessage(data.details)),this.__setIsActive(this.__state),void resolve(this.__state)}if(void 0===data.value&&this.__stateSymbol.getExpression().getType()===TcHmi.SymbolType.Server){TcHmi.Errors.E_SERVER_READVALUE_MISSING,TcHmi.Errors[TcHmi.Errors.E_SERVER_READVALUE_MISSING],this.__type;return TcHmi.Log.Controls.error(this,TcHmiRadioButton.#tchmiFQN,{Attribute:"StateSymbol",Symbol:this.__stateSymbol?.getExpression().toString()},TcHmi.Log.buildMessage(data.details)),this.__setIsActive(this.__state),void resolve(this.__state)}this.__setInternalState(data.value??state,source),resolve(this.__state)})}):(this.__setInternalState(state,source),Promise.resolve(this.__state))}__setInternalState(state,source){this.__state!==state?(this.__setRadioState(state?"Active":"Normal",!0,!1),state&&null!==this.__radioGroup&&TcHmi.EventProvider.raise(this.__radioGroup+".onRadioToggled",{activeElementId:this.__id,source}),this.__state=state,this.__setIsActive(state),TcHmi.EventProvider.raise(this.getId()+".onStateChanged",{control:this,state,stateOld:!state})):this.__setIsActive(this.__state)}__processState(state,forwardStateSymbol,source){forwardStateSymbol?this.__writeState(state,source):this.__setInternalState(state,source)}__setIsActive(valueNew){this.__isActive!==valueNew&&(this.__isActive=valueNew,this.__element[0].classList.toggle("TcHmi_Controls_Beckhoff_TcHmiRadioButton-active",this.__isActive))}setRadioStateIconColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("RadioStateIconColor"));let resolverInfo=this.__objectResolvers.get("radioStateIconColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("RadioStateIconColor")?.type});this.__objectResolvers.set("radioStateIconColor",{resolver,watchCallback:this.__onResolverForRadioStateIconColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForRadioStateIconColorWatchCallback)})}__onResolverForRadioStateIconColorWatchCallback(data){!this.__isAttached&&data.destroy&&data.destroy(),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__radioStateIconColor)||(this.__radioStateIconColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"RadioStateIconColor"}),this.__processRadioStateIconColor()):TcHmi.Log.Controls.error(this,TcHmiRadioButton.#tchmiFQN,{Attribute:"RadioStateIconColor"},"Resolving symbols from object failed with error: "+TcHmi.Log.buildMessage(data.details))}getRadioStateIconColor(){return this.__radioStateIconColor}__processRadioStateIconColor(){this.__element[0].style.setProperty("--tchmi-radio-state-icon-color",this.__radioStateIconColor?this.__radioStateIconColor.color:"")}setRadioStateBackgroundColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("RadioStateBackgroundColor"));let resolverInfo=this.__objectResolvers.get("radioStateBackgroundColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("RadioStateBackgroundColor")?.type});this.__objectResolvers.set("radioStateBackgroundColor",{resolver,watchCallback:this.__onResolverForRadioStateBackgroundColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForRadioStateBackgroundColorWatchCallback)})}__onResolverForRadioStateBackgroundColorWatchCallback(data){!this.__isAttached&&data.destroy&&data.destroy(),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__radioStateBackgroundColor)||(this.__radioStateBackgroundColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"RadioStateBackgroundColor"}),this.__processRadioStateBackgroundColor()):TcHmi.Log.Controls.error(this,TcHmiRadioButton.#tchmiFQN,{Attribute:"RadioStateBackgroundColor"},"Resolving symbols from object failed with error: "+TcHmi.Log.buildMessage(data.details))}getRadioStateBackgroundColor(){return this.__radioStateBackgroundColor}__processRadioStateBackgroundColor(){this.__element[0].style.setProperty("--tchmi-background-color",this.__radioStateBackgroundColor?this.__radioStateBackgroundColor.color:""),this.__element[0].style.setProperty("--tchmi-active-background-color",this.__radioStateBackgroundColor?this.__radioStateBackgroundColor.color:"")}setText(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("Text")),convertedValue!==this.__text&&(this.__text=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"Text"}),this.__processText())}getText(){return this.__text}__processText(){if(void 0===this.__text)return;let text=this.__text??"";this.__ignoreEscapeSequences||(text=tchmi_decode_control_characters(text)),this.__textNode?this.__textNode.data=text:(this.__textNode=document.createTextNode(text),this.__element[0].appendChild(this.__textNode))}setIgnoreEscapeSequences(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("IgnoreEscapeSequences")),convertedValue!==this.__ignoreEscapeSequences&&(this.__ignoreEscapeSequences=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"IgnoreEscapeSequences"}),this.__processText())}getIgnoreEscapeSequences(){return this.__ignoreEscapeSequences}setTextPosition(valueNew){const convertedValue=TcHmi.ValueConverter.toEnum(valueNew,{Left:"Left",Right:"Right"})??this.getAttributeDefaultValueInternal("TextPosition");convertedValue!==this.__textPosition&&(this.__textPosition=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextPosition"}),this.__processTextPosition())}getTextPosition(){return this.__textPosition}__processTextPosition(){if("Left"===this.__textPosition)this.__element[0].classList.add("text-left");else this.__element[0].classList.remove("text-left")}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(){switch(this.__textHorizontalAlignment){case"Left":default:this.__element[0].style.justifyItems="start",this.__element[0].style.textAlign="start";break;case"Center":this.__element[0].style.justifyItems="center",this.__element[0].style.textAlign="center";break;case"Right":this.__element[0].style.justifyItems="end",this.__element[0].style.textAlign="end"}}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(){switch(this.__textVerticalAlignment){case"Top":this.__element[0].style.alignItems="start",this.__element[0].style.alignContent="start";break;case"Center":default:this.__element[0].style.alignItems="center",this.__element[0].style.alignContent="center";break;case"Bottom":this.__element[0].style.alignItems="end",this.__element[0].style.alignContent="end"}}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(){TcHmi.StyleProvider.processFontFamily(this.__element,this.__textFontFamily)}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(){TcHmi.StyleProvider.processFontSize(this.__element,this.__textFontSize,this.__textFontSizeUnit)}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()}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(){TcHmi.StyleProvider.processFontStyle(this.__element,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(){TcHmi.StyleProvider.processFontWeight(this.__element,this.__textFontWeight)}setTextColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("TextColor"));let resolverInfo=this.__objectResolvers.get("textColor");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("TextColor")?.type});this.__objectResolvers.set("textColor",{resolver,watchCallback:this.__onResolverForTextColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForTextColorWatchCallback)})}__onResolverForTextColorWatchCallback(data){!this.__isAttached&&data.destroy&&data.destroy(),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__textColor)||(this.__textColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"TextColor"}),this.__processTextColor()):TcHmi.Log.Controls.error(this,TcHmiRadioButton.#tchmiFQN,{Attribute:"TextColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getTextColor(){return this.__textColor}__processTextColor(){TcHmi.StyleProvider.processTextColor(this.__element,this.__textColor)}
/**
* Sets the isReadOnly attribute and calls the associated process function (processIsReadOnly).
* @preserve (Part of the public API)
*/setIsReadOnly(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("IsReadOnly")),convertedValue!==this.__isReadOnly&&(this.__isReadOnly=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"IsReadOnly"}),this.__processIsReadOnly())}getIsReadOnly(){return this.__isReadOnly}__processIsReadOnly(){this.__element[0].classList.toggle("read-only",this.__isReadOnly??!1)}}})();TcHmi.Controls.registerEx("TcHmiRadioButton","TcHmi.Controls.Beckhoff",TcHmiRadioButton,{injectInGlobalObject:!0});export{TcHmiRadioButton as Control};