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
28 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";import{ValueBuffer,InputProcessingPoint}from"../Helpers/TcHmiValueBuffer/ValueBuffer.js";let TcHmiDateTimeInput=(()=>{var _a,_b;let ___onKeydown_decorators,___onInput_decorators,___onPaste_decorators,___onCut_decorators,___onFocusIn_decorators,___onFocusOut_decorators,___onIndirectInputFinished_decorators,___onIndirectInputCanceled_decorators,___onClick_decorators,___onValueChanged_decorators,___onCancel_decorators,___onConfirmed_decorators,___onResolverForContentPaddingWatchCallback_decorators,___onResolverForValueColorWatchCallback_decorators,_classSuper=TcHmiControl.Control,_instanceExtraInitializers=[];return class TcHmiDateTimeInput extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___onKeydown_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onInput_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onPaste_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onCut_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onFocusIn_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate"})],___onFocusOut_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate"})],___onIndirectInputFinished_decorators=[TcHmi.EventHandler({checkIsEnabled:!0,checkAccess:"operate",checkIsReadOnly:!0})],___onIndirectInputCanceled_decorators=[TcHmi.EventHandler()],___onClick_decorators=[TcHmi.EventHandler()],___onValueChanged_decorators=[TcHmi.EventHandler({checkIsReadOnly:!0})],___onCancel_decorators=[TcHmi.EventHandler({checkIsReadOnly:!0})],___onConfirmed_decorators=[TcHmi.EventHandler({checkIsReadOnly:!0})],___onResolverForContentPaddingWatchCallback_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],___onResolverForValueColorWatchCallback_decorators=[(_b=TcHmi).CallbackMethod.bind(_b)],__esDecorate(this,null,___onKeydown_decorators,{kind:"method",name:"__onKeydown",static:!1,private:!1,access:{has:obj=>"__onKeydown"in obj,get:obj=>obj.__onKeydown},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onInput_decorators,{kind:"method",name:"__onInput",static:!1,private:!1,access:{has:obj=>"__onInput"in obj,get:obj=>obj.__onInput},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onPaste_decorators,{kind:"method",name:"__onPaste",static:!1,private:!1,access:{has:obj=>"__onPaste"in obj,get:obj=>obj.__onPaste},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onCut_decorators,{kind:"method",name:"__onCut",static:!1,private:!1,access:{has:obj=>"__onCut"in obj,get:obj=>obj.__onCut},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onFocusIn_decorators,{kind:"method",name:"__onFocusIn",static:!1,private:!1,access:{has:obj=>"__onFocusIn"in obj,get:obj=>obj.__onFocusIn},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onFocusOut_decorators,{kind:"method",name:"__onFocusOut",static:!1,private:!1,access:{has:obj=>"__onFocusOut"in obj,get:obj=>obj.__onFocusOut},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onIndirectInputFinished_decorators,{kind:"method",name:"__onIndirectInputFinished",static:!1,private:!1,access:{has:obj=>"__onIndirectInputFinished"in obj,get:obj=>obj.__onIndirectInputFinished},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onIndirectInputCanceled_decorators,{kind:"method",name:"__onIndirectInputCanceled",static:!1,private:!1,access:{has:obj=>"__onIndirectInputCanceled"in obj,get:obj=>obj.__onIndirectInputCanceled},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onClick_decorators,{kind:"method",name:"__onClick",static:!1,private:!1,access:{has:obj=>"__onClick"in obj,get:obj=>obj.__onClick},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onValueChanged_decorators,{kind:"method",name:"__onValueChanged",static:!1,private:!1,access:{has:obj=>"__onValueChanged"in obj,get:obj=>obj.__onValueChanged},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onCancel_decorators,{kind:"method",name:"__onCancel",static:!1,private:!1,access:{has:obj=>"__onCancel"in obj,get:obj=>obj.__onCancel},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onConfirmed_decorators,{kind:"method",name:"__onConfirmed",static:!1,private:!1,access:{has:obj=>"__onConfirmed"in obj,get:obj=>obj.__onConfirmed},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForContentPaddingWatchCallback_decorators,{kind:"method",name:"__onResolverForContentPaddingWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForContentPaddingWatchCallback"in obj,get:obj=>obj.__onResolverForContentPaddingWatchCallback},metadata:_metadata},null,_instanceExtraInitializers),__esDecorate(this,null,___onResolverForValueColorWatchCallback_decorators,{kind:"method",name:"__onResolverForValueColorWatchCallback",static:!1,private:!1,access:{has:obj=>"__onResolverForValueColorWatchCallback"in obj,get:obj=>obj.__onResolverForValueColorWatchCallback},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);__elementInput;__elementButton;__dateTimePicker;__elementInvalidNotificationLabel;__locked=!1;__value;__minValue;__maxValue;__ignoreInvalidValues;__valueBuffer;__oldValue;__lastValidValue;__lastInput;__valueHorizontalAlignment;__contentPadding;__valueFontSize;__valueFontSizeUnit;__valueFontFamily;__valueFontStyle;__valueFontWeight;__placeholder;__valueColor;__autoFocusOut;__autoSelectText;__resetToLastValidValue;__buttonPosition;__isReadOnly;__triggerUIFinishedOnBlur=!1;__localizedInput={key:"",parameters:[]};__localizationReader=void 0;__REGEX_ISO_8601=/^\d{4}-(?:0\d|1[0-2])-(?:[0-2]\d|3[01])[Tt\s](?:[01]\d|2[0-3]):[0-5]\d:(?:[0-5]\d|60)(?:.\d+)?(?:[Zz]|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;__previnit(){this.__elementTemplateRoot=this.__element[0].getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiDateTimeInput-template")[0],this.__elementInput=this.__elementTemplateRoot.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiDateTimeInput-template-input")[0],this.__elementButton=this.__elementTemplateRoot.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiDateTimeInput-template-button")[0];let dateTimePicker=TcHmi.Controls.get(this.getId()+"_TcHmiDateTimePicker");if(this.__elementInvalidNotificationLabel=this.__elementTemplateRoot.getElementsByClassName("TcHmi_Controls_Beckhoff_TcHmiDateTimeInput-template-input-invalid-notification")[0],!(this.__elementTemplateRoot&&this.__elementInput&&this.__elementButton&&dateTimePicker&&this.__elementInvalidNotificationLabel))throw new Error("Invalid Template.html");this.__dateTimePicker=dateTimePicker,this.__destroyOnDestroy.push(this.__localization.watch(data=>{if(data.error===TcHmi.Errors.NONE&&data.reader&&(this.__localizationReader=data.reader,""!==this.__localizedInput.key)){let localizedText=data.reader.get(this.__localizedInput.key);this.__localizedInput.parameters.length>0&&(localizedText=tchmi_format_string(localizedText,...this.__localizedInput.parameters)),TCHMI_DESIGNER||this.__elementInput.setCustomValidity(tchmi_decode_control_characters(localizedText))}})),super.__previnit()}__init(){super.__init(),this.__destroyOnDestroy.push(TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"focusin",this.__onFocusIn),TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"focusout",this.__onFocusOut),TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"indirectinputfinished",this.__onIndirectInputFinished),TcHmi.EventProvider.registerDomEvent(this.__elementTemplateRoot,"indirectinputcanceled",this.__onIndirectInputCanceled),TcHmi.EventProvider.registerDomEvent(this.__elementInput,"keydown",this.__onKeydown,{passive:!1}),TcHmi.EventProvider.registerDomEvent(this.__elementInput,"input",this.__onInput),TcHmi.EventProvider.registerDomEvent(this.__elementInput,"paste",this.__onPaste),TcHmi.EventProvider.registerDomEvent(this.__elementInput,"cut",this.__onCut),TcHmi.EventProvider.registerDomEvent(this.__elementButton,"click",this.__onClick))}__attach(){super.__attach(),this.__destroyOnDetach.push(TcHmi.EventProvider.register(this.getId()+"_TcHmiDateTimePicker.onValueChanged",this.__onValueChanged),TcHmi.EventProvider.register(this.getId()+"_TcHmiDateTimePicker.onCancel",this.__onCancel),TcHmi.EventProvider.register(this.getId()+"_TcHmiDateTimePicker.onConfirmed",this.__onConfirmed))}__detach(){super.__detach()}destroy(){this.__keepAlive||super.destroy()}__validateInput(){this.__dateTimePicker.isValid(this.__elementInput.value)||!this.__attributesInitialized?this.__setLocalizedInputValidity(""):""===this.__elementInput.value?this.__setLocalizedInputValidity("ValueEmpty"):this.__setLocalizedInputValidity("ValueFormat")}__onKeydown(event){if(this.__triggerUIFinishedOnBlur=!0,"Escape"===event.key)this.__processValue(),TcHmi.EventProvider.raise(this.__id+".onUserInteractionCanceled"),this.__triggerUIFinishedOnBlur=!1,this.__autoFocusOut&&this.__elementInput.blur();else if("Enter"===event.key){this.__oldValue=this.__value,this.__triggerUIFinishedOnBlur=!1;const value=this.__valueBuffer?.getValue();this.__autoFocusOut?(this.__elementInput.blur(),this.__unlock()):value?(this.__lastValidValue=value,this.__valueBuffer?.interactionFinished()):this.__resetToLastValidValue&&this.__setValue(this.__lastValidValue),TcHmi.EventProvider.raise(this.__id+".onUserInteractionFinished"),event.preventDefault()}}__onInput(_event){this.__triggerUIFinishedOnBlur=!0,this.__validateInput(),this.__dateTimePicker.isValid(this.__elementInput.value)?this.__valueBuffer?.setValue(this.__elementInput.value):this.__valueBuffer?.setValue(null)}__onPaste(_event){this.__triggerUIFinishedOnBlur=!0,window.setTimeout(()=>{this.__validateInput()})}__onCut(_event){this.__triggerUIFinishedOnBlur=!0,window.setTimeout(()=>{this.__validateInput()})}__onFocusIn(event){this.__triggerUIFinishedOnBlur=!0,this.__oldValue=this.__value,this.__elementInput.classList.add("tchmi-focus"),this.__autoSelectText&&(this.__elementInput.setSelectionRange(0,0),this.__elementInput.select()),TcHmi.EventProvider.raise(this.__id+".onFocusIn",event),this.__elementInput===document.activeElement&&this.__lock()}__onFocusOut(event){this.__elementInput.classList.contains("tchmi-keyboard-user-input")||this.__performFocusOut(event)}__performFocusOut(event){this.__unlock(),this.__elementInput.classList.remove("tchmi-focus"),TcHmi.EventProvider.raise(this.__id+".onFocusOut",event),this.__oldValue=this.__value;const value=this.__valueBuffer?.getValue();value?(this.__lastValidValue=value,this.__valueBuffer?.interactionFinished()):this.__resetToLastValidValue&&this.__setValue(this.__lastValidValue),this.__triggerUIFinishedOnBlur&&TcHmi.EventProvider.raise(this.__id+".onUserInteractionFinished"),this.__triggerUIFinishedOnBlur=!1}__onIndirectInputFinished(_event){this.__oldValue=this.__value,this.__dateTimePicker.isValid(this.__elementInput.value)?(this.__lastValidValue=this.__elementInput.value,this.__setValue(this.__elementInput.value)):this.__resetToLastValidValue&&this.__setValue(this.__lastValidValue),this.__autoFocusOut?(this.__elementInput?.blur(),this.__unlock()):(TcHmi.EventProvider.raise(this.__id+".onUserInteractionFinished"),this.__triggerUIFinishedOnBlur=!1)}__onIndirectInputCanceled(event){TcHmi.EventProvider.raise(this.__id+".onUserInteractionCanceled"),this.__triggerUIFinishedOnBlur=!1,this.__elementInput!==document.activeElement?this.__performFocusOut(event):this.__autoFocusOut&&this.__elementInput.blur()}__onClick(_event){this.__REGEX_ISO_8601.test(this.__elementInput.value)&&this.__dateTimePicker.setValue(this.__elementInput.value),this.__dateTimePicker.openDateTimePicker()}__onValueChanged(){const value=this.__dateTimePicker.getValue();this.__lastValidValue=value,this.__setValue(value)}__onCancel(_event){TcHmi.EventProvider.raise(this.__id+".onUserInteractionCanceled")}__onConfirmed(_event){TcHmi.EventProvider.raise(this.__id+".onUserInteractionFinished")}__setLocalizedInputValidity(key,...parameters){if(this.__localizedInput.key=key,this.__localizedInput.parameters=parameters,this.__localizationReader){let localizedText=this.__localizationReader.get(key);this.__localizedInput.parameters.length>0&&(localizedText=tchmi_format_string(localizedText,...this.__localizedInput.parameters)),TCHMI_DESIGNER||this.__elementInput.setCustomValidity(tchmi_decode_control_characters(localizedText))}}setValue(valueNew){if(this.__locked&&!this.__isReadOnly)return;if(valueNew&&this.__ignoreInvalidValues&&this.__dateTimePicker.isValid(valueNew))return;let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("Value")),this.__setValue(convertedValue)}__setValue(valueNew,writeToInput=!0){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("Value")),convertedValue!==this.__value&&(this.__value=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"Value"}),TcHmi.EventProvider.raise(this.__id+".onValueChanged",this.__value),this.__processValue(writeToInput))}getValue(){return this.__value}__processValue(writeToInput=!0){writeToInput&&(this.__elementInput.value=this.__value??""),this.__elementInput.setCustomValidity(""),this.__isReadOnly&&this.__REGEX_ISO_8601.test(this.__elementInput.value)&&this.__dateTimePicker.setValue(this.__elementInput.value),this.__validateInput()}setMinValue(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("MinValue")),convertedValue!==this.__minValue&&(this.__minValue=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MinValue"}),this.__processMinValue())}getMinValue(){return this.__minValue}__processMinValue(){this.__dateTimePicker.setMinValue(this.__minValue||null)}setMaxValue(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("MaxValue")),convertedValue!==this.__maxValue&&(this.__maxValue=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"MaxValue"}),this.__processMaxValue())}getMaxValue(){return this.__minValue}__processMaxValue(){this.__dateTimePicker.setMaxValue(this.__maxValue||null)}setIgnoreInvalidValues(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("IgnoreInvalidValues")),convertedValue!==this.__ignoreInvalidValues&&(this.__ignoreInvalidValues=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"IgnoreInvalidValues"}),this.__processIgnoreInvalidValues())}getIgnoreInvalidValues(){return this.__ignoreInvalidValues}__processIgnoreInvalidValues(){this.__dateTimePicker.setIgnoreInvalidValues(this.__ignoreInvalidValues||null)}setInputProcessingPoint(valueNew){let convertedValue=TcHmi.ValueConverter.toEnum(valueNew,InputProcessingPoint);null===convertedValue&&(convertedValue=InputProcessingPoint[this.getAttributeDefaultValueInternal("InputProcessingPoint")]),convertedValue!==this.__valueBuffer?.processingPoint&&(this.__valueBuffer?this.__valueBuffer.processingPoint=convertedValue:this.__valueBuffer=new ValueBuffer(convertedValue,value=>this.__setValue(value,!1)),TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"InputProcessingPoint"}),this.__processInputProcessingPoint())}getInputProcessingPoint(){return this.__valueBuffer?.processingPoint}__processInputProcessingPoint(){}setValueHorizontalAlignment(valueNew){let convertedValue=TcHmi.ValueConverter.toHorizontalAlignment(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ValueHorizontalAlignment")),convertedValue!==this.__valueHorizontalAlignment&&(this.__valueHorizontalAlignment=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ValueHorizontalAlignment"}),this.__processValueHorizontalAlignment())}getValueHorizontalAlignment(){return this.__valueHorizontalAlignment}__processValueHorizontalAlignment(){switch(this.__valueHorizontalAlignment){case"Left":TcHmi.StyleProvider.setSimpleElementStyle(this.__elementInput,"text-align","left");break;case"Center":TcHmi.StyleProvider.setSimpleElementStyle(this.__elementInput,"text-align","center");break;case"Right":TcHmi.StyleProvider.setSimpleElementStyle(this.__elementInput,"text-align","right");break;default:TcHmi.StyleProvider.setSimpleElementStyle(this.__elementInput,"text-align",null)}}setContentPadding(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ContentPadding"));let resolverInfo=this.__objectResolvers.get("contentPadding");resolverInfo&&(resolverInfo.watchDestroyer&&resolverInfo.watchDestroyer(),resolverInfo.resolver.destroy());let resolver=new TcHmi.Symbol.ObjectResolver(convertedValue,{parentControl:this,type:this.getAttributeDescription("ContentPadding")?.type});this.__objectResolvers.set("contentPadding",{resolver,watchCallback:this.__onResolverForContentPaddingWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForContentPaddingWatchCallback)})}__onResolverForContentPaddingWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("contentPadding"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__contentPadding)||(this.__contentPadding=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ContentPadding"}),this.__processContentPadding()):TcHmi.Log.Controls.error(this,TcHmiDateTimeInput.#tchmiFQN,{Attribute:"ContentPadding"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getContentPadding(){return this.__contentPadding}__processContentPadding(){TcHmi.StyleProvider.processContentPadding(this.__elementInput,this.__contentPadding),TcHmi.StyleProvider.processContentPadding(this.__elementInvalidNotificationLabel,this.__contentPadding)}setValueFontSize(valueNew){let convertedValue=TcHmi.ValueConverter.toNumber(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ValueFontSize")),convertedValue!==this.__valueFontSize&&(this.__valueFontSize=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ValueFontSize"}),this.__processValueFontSize())}getValueFontSize(){return this.__valueFontSize}__processValueFontSize(){TcHmi.StyleProvider.processFontSize(this.__elementInput,this.__valueFontSize,this.__valueFontSizeUnit)}setValueFontSizeUnit(valueNew){let convertedValue=TcHmi.ValueConverter.toFontSizeUnit(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ValueFontSizeUnit")),convertedValue!==this.__valueFontSizeUnit&&(this.__valueFontSizeUnit=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ValueFontSizeUnit"}),this.__processValueFontSizeUnit())}getValueFontSizeUnit(){return this.__valueFontSizeUnit}__processValueFontSizeUnit(){TcHmi.StyleProvider.processFontSize(this.__elementInput,this.__valueFontSize,this.__valueFontSizeUnit)}setValueFontFamily(valueNew){let convertedValue=TcHmi.ValueConverter.toFontFamily(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ValueFontFamily")),convertedValue!==this.__valueFontFamily&&(this.__valueFontFamily=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ValueFontFamily"}),this.__processValueFontFamily())}getValueFontFamily(){return this.__valueFontFamily}__processValueFontFamily(){TcHmi.StyleProvider.processFontFamily(this.__elementInput,this.__valueFontFamily)}setValueFontStyle(valueNew){let convertedValue=TcHmi.ValueConverter.toFontStyle(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ValueFontStyle")),convertedValue!==this.__valueFontStyle&&(this.__valueFontStyle=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ValueFontStyle"}),this.__processValueFontStyle())}getValueFontStyle(){return this.__valueFontStyle}__processValueFontStyle(){TcHmi.StyleProvider.processFontStyle(this.__elementInput,this.__valueFontStyle)}setValueFontWeight(valueNew){let convertedValue=TcHmi.ValueConverter.toFontWeight(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ValueFontWeight")),convertedValue!==this.__valueFontWeight&&(this.__valueFontWeight=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ValueFontWeight"}),this.__processValueFontWeight())}getValueFontWeight(){return this.__valueFontWeight}__processValueFontWeight(){TcHmi.StyleProvider.processFontWeight(this.__elementInput,this.__valueFontWeight)}setPlaceholder(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("Placeholder")),convertedValue!==this.__placeholder&&(this.__placeholder=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"Placeholder"}),this.__processPlaceholder())}getPlaceholder(){return this.__placeholder}__processPlaceholder(){this.__placeholder?this.__elementInput.setAttribute("placeholder",this.__placeholder):this.__elementInput.removeAttribute("placeholder")}setValueColor(valueNew){let convertedValue=TcHmi.ValueConverter.toObject(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ValueColor"));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("ValueColor")?.type});this.__objectResolvers.set("textColor",{resolver,watchCallback:this.__onResolverForValueColorWatchCallback,watchDestroyer:resolver.watch(this.__onResolverForValueColorWatchCallback)})}__onResolverForValueColorWatchCallback(data){this.__isAttached||this.__suspendObjectResolver("textColor"),data.error===TcHmi.Errors.NONE?tchmi_equal(data.value,this.__valueColor)||(this.__valueColor=data.value,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ValueColor"}),this.__processValueColor()):TcHmi.Log.Controls.error(this,TcHmiDateTimeInput.#tchmiFQN,{Attribute:"ValueColor"},`Resolving symbols from object failed with error: ${TcHmi.Log.buildMessage(data.details)}`)}getValueColor(){return this.__valueColor}__processValueColor(){TcHmi.StyleProvider.processTextColor(this.__elementInput,this.__valueColor)}setAutoFocusOut(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("AutoFocusOut")),convertedValue!==this.__autoFocusOut&&(this.__autoFocusOut=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"AutoFocusOut"}),this.__processAutoFocusOut())}getAutoFocusOut(){return this.__autoFocusOut}__processAutoFocusOut(){}__lock(){this.__locked=!0}__unlock(){this.__locked=!1}__processControlActivation(){const valueInput=this.__elementInput;TcHmi.Access.checkAccess(this,"operate")&&this.getIsEnabled()?valueInput.disabled=!1:(this.__unlock(),valueInput.blur(),valueInput.disabled=!0)}__processIsEnabled(){super.__processIsEnabled(),this.__processControlActivation()}__processAccessConfig(){super.__processAccessConfig(),this.__processControlActivation()}
/**
* 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),this.__elementInput.readOnly=this.__isReadOnly??!1,this.__dateTimePicker.setIsReadOnly(this.__isReadOnly??!1)}setAutoSelectText(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("AutoSelectText")),convertedValue!==this.__autoSelectText&&(this.__autoSelectText=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"AutoSelectText"}))}getAutoSelectText(){return this.__autoSelectText}setResetToLastValidValue(valueNew){let convertedValue=TcHmi.ValueConverter.toBoolean(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ResetToLastValidValue")),convertedValue!==this.__resetToLastValidValue&&(this.__resetToLastValidValue=convertedValue,TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ResetToLastValidValue"}),this.__processResetToLastValidValue())}getResetToLastValidValue(){return this.__resetToLastValidValue}__processResetToLastValidValue(){this.__resetToLastValidValue&&(this.__elementInput.value=this.__lastValidValue||"",this.__setValue(this.__lastValidValue))}setButtonPosition(valueNew){let convertedValue=TcHmi.ValueConverter.toString(valueNew);null===convertedValue&&(convertedValue=this.getAttributeDefaultValueInternal("ButtonPosition")),convertedValue!==this.__buttonPosition&&(this.__buttonPosition="Left"===convertedValue?convertedValue:"Right",TcHmi.EventProvider.raise(this.__id+".onPropertyChanged",{propertyName:"ButtonPosition"}),this.__processButtonPosition())}getButtonPosition(){return this.__buttonPosition}__processButtonPosition(){"Right"===this.__buttonPosition?this.__elementTemplateRoot.classList.remove("left"):this.__elementTemplateRoot.classList.add("left")}focus(){this.__elementInput.focus()}}})();TcHmi.Controls.registerEx("TcHmiDateTimeInput","TcHmi.Controls.Beckhoff",TcHmiDateTimeInput,{injectInGlobalObject:!0});export{TcHmiDateTimeInput as Control};