Added minimal functionality for Robot teaching

- Added minimal HMI
- Added possibility to open and close all chamber doors
This commit is contained in:
2026-01-17 09:20:39 +01:00
parent 9f058db2a3
commit 2d11c43579
2274 changed files with 912690 additions and 162 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import*as Domains from"../API/Server.Domains.js";export let isEnabled=!1;let __running=!1;export function run(done){__running?TcHmi.Callback.callSafeEx(done,null):(__running=!0,Domains.watch("TcHmiAuditTrail",data=>{isEnabled=!(data.error!==TcHmi.Errors.NONE||!data.value||"Loaded"!==data.value.state&&"Initialized"!==data.value.state),TcHmi.Callback.callSafeEx(done,null)}))}

View File

@@ -0,0 +1 @@
import{splashScreen}from"./SplashScreen.js";import{Init}from"./System.js";export class AutomationCommandManager{constructor(){window.parent&&window.parent!==window&&window.addEventListener("message",event=>{const eventData=event.data;if(event.source===window.parent&&eventData.messageType)return"System.setSingleControlMode"===eventData.messageType?(TCHMI_SINGLECONTROL=!0,this.postMessageToParent({messageType:"Ack:System.setSingleControlMode"}),TCHMI_DESIGNER=!1,TCHMI_ENGINEERING=!1,TCHMI_LIVEVIEW=!1,void splashScreen.hide()):"System.hideSplashScreen"===eventData.messageType?(splashScreen.disableSplash(),void this.postMessageToParent({messageType:"Ack:System.hideSplashScreen"})):"Theme.set"===eventData.messageType?(Init.initializedThemes.then(()=>{TcHmi.Theme.set(eventData.themename)}),void this.postMessageToParent({messageType:"Ack:Theme.set"})):"Locale.set"===eventData.messageType?(Init.initializedServerCommunication.then(()=>{TcHmi.Locale.load(eventData.locale)}),void this.postMessageToParent({messageType:"Ack:Locale.set"})):void("System.generateControl"===eventData.messageType&&Init.initialized.then(()=>{const control=TcHmi.ControlFactory.createEx(eventData.controlType,eventData.controlId,eventData.controlAttributes,null);if(!control)return;const controlElem=control.getElement()[0];document.body.replaceChildren(controlElem),this.postMessageToParent({messageType:"Ack:System.generateControl"})}))})}postMessageToParent(message){window.parent&&window.parent!==window&&window.parent.postMessage(message,"*")}}export const automationCommandManager=new AutomationCommandManager;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
export function callSafeCallbacks1Param(callbacks,thisArg,data){let callbackList=[];for(let i=0,ii=callbacks.length;i<ii;i++)callbackList.push(callbacks[i]);for(let innerCallback of callbackList)callbacks.includes(innerCallback)&&TcHmi.Callback.callSafeEx(innerCallback,thisArg,data)}export function createTask(friendlyName){return friendlyName&&"createTask"in console&&"function"==typeof console.createTask?console.createTask(friendlyName):{run:f=>f()}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{metaDataManager}from"./DesignerModeControlMetaDataMngr.js";import{designerModeManager}from"./DesignerModeManager.js";import{highlightManager}from"./DesignerModeMasterControlHighlightMngr.js";import{Symbol as SystemSymbol}from"../Symbol.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class DesignerModeMasterSyncManager{constructor(){}updatePcElementAndSync(eventName){const tcoList=[],stylenames=["top","left","width","right","height","bottom"],selectedControlsMeta=metaDataManager.getSelectedControlsMetaData();for(const ctrlMeta of selectedControlsMeta.values()){if(!ctrlMeta)continue;const tco=TcHmi.Controls.get(ctrlMeta.id);if(!tco)continue;tcoList.push(tco);let horizontalCount=0,verticalCount=0;const pcElementClone=tco.getPcElement()[0].cloneNode(!0),tValue=TcHmi.StyleProvider.getSimpleElementStyle(tco.getElement(),stylenames);for(let stylename of stylenames)if(void 0!==tValue[stylename]){const styleHtmlName="data-tchmi-"+stylename;let oldValue=pcElementClone.getAttribute(styleHtmlName);if(oldValue){["top","height","bottom"].includes(stylename)?verticalCount++:["right","width","left"].includes(stylename)&&horizontalCount++;let isSymbolExpression=TcHmi.Symbol.isSymbolExpression(oldValue),isSymbolExpressionEscaped=TcHmi.Symbol.isSymbolExpressionEscaped(oldValue);if(isSymbolExpression&&!isSymbolExpressionEscaped){let sym=new SystemSymbol(oldValue);if(sym){if(sym.getExpression().getType()===TcHmi.SymbolType.Server){sym.destroy();continue}sym.read(function(data){data.error===TcHmi.Errors.NONE&&(oldValue=data.value),sym.destroy()})}}}"string"==typeof oldValue&&(oldValue=parseFloat(oldValue));const styleUnitHtmlName="data-tchmi-"+stylename+"-unit",oldUnit=pcElementClone.getAttribute(styleUnitHtmlName);let tUnitValue=tValue[stylename].replace(/[-.0-9]/g,"");"px"!==tUnitValue&&"%"!==tUnitValue&&(tUnitValue="px"),oldUnit?oldUnit!==tUnitValue&&pcElementClone.setAttribute(styleUnitHtmlName,tUnitValue):"px"!==tUnitValue&&pcElementClone.setAttribute(styleUnitHtmlName,tUnitValue);let newValue=parseFloat(tValue[stylename]);void 0===oldValue||"number"!=typeof oldValue||Math.round(oldValue)===Math.round(newValue)||["height","width"].includes(stylename)&&["Content","Parent"].includes(pcElementClone.getAttribute("data-tchmi-"+stylename+"-mode")??"")||("px"===tUnitValue?pcElementClone.setAttribute(styleHtmlName,newValue.toFixed(0)):"%"===tUnitValue&&pcElementClone.setAttribute(styleHtmlName,newValue.toFixed(1)))}horizontalCount<2&&tValue.left&&"0px"!==tValue.left&&!pcElementClone.hasAttribute("data-tchmi-left")&&pcElementClone.setAttribute("data-tchmi-left",tValue.left.replace("px","")),verticalCount<2&&tValue.top&&"0px"!==tValue.top&&!pcElementClone.hasAttribute("data-tchmi-top")&&pcElementClone.setAttribute("data-tchmi-top",tValue.top.replace("px","")),ctrlMeta.domVisibility?pcElementClone.removeAttribute("data-tchmi-creator-visibility"):pcElementClone.setAttribute("data-tchmi-creator-visibility","False"),ctrlMeta.locked?pcElementClone.setAttribute("data-tchmi-creator-locked","True"):pcElementClone.removeAttribute("data-tchmi-creator-locked"),designerModeManager.syncControl(TCHMI_TARGET_PARTIAL,ctrlMeta.id,pcElementClone.outerHTML)}TcHmi.EventProvider.raise(eventName,tcoList),highlightManager.requestAsyncHighlighterUpdate()}}export const syncManager=new DesignerModeMasterSyncManager;

View File

@@ -0,0 +1 @@
TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class DesignerModeUserControlParameterManager{constructor(){this.__params=new Map}__params=new Map;add(name,param){this.__params.set(name,param)}remove(name){this.__params.delete(name)}get(name){if(name)return this.__params.get(name)}}export const userControlParameterManager=new DesignerModeUserControlParameterManager;

View File

@@ -0,0 +1 @@
import{SyncCmdToCreatorMessages}from"./SyncCmdToCreatorMessages.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class ErrorPane{constructor(){}__messages={};add(name,content,type){if(!TCHMI_DESIGNER)return;this.remove(name);let guid=tchmi_create_guid(),message={identifier:guid,type,content},m={append:!0,identifier:guid,targetPartial:TCHMI_TARGET_PARTIAL,targetInstance:TCHMI_DYNAMIC_INSTANCE_ID,type,content,line:null,position:null,unixTimestamp:Math.round(Date.now()/1e3)};this.__messages[name]=message,new SyncCmdToCreatorMessages({name:"Messages",frameworkType:TCHMI_DESIGNER?"Designer":"LiveView",messages:[m],replyTo:null}).send()}remove(name){if(!TCHMI_DESIGNER)return;let message=this.__messages[name];if(!message)return;let m={remove:!0,identifier:message.identifier};new SyncCmdToCreatorMessages({name:"Messages",frameworkType:TCHMI_DESIGNER?"Designer":"LiveView",messages:[m],replyTo:null}).send(),delete this.__messages[name]}}export const errorPane=new ErrorPane;

View File

@@ -0,0 +1 @@
let designerModeComManager;TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`),import("./DesignerModeComManager.js").then(module=>{designerModeComManager=module.designerModeComManager}).catch(ex=>{TcHmi.Log.errorEx("Failed to load designerModeComManager in Framework SyncCmdToCreator:",ex)});export class SyncCmdToCreator{constructor(cmd){this.__cmd=cmd}__cmd;send(timestamp){designerModeComManager?("RegisterSyncView"===this.__cmd.name||designerModeComManager.supportedCommandFromVS.includes(this.__cmd.name)||TcHmi.Log.warnEx("[Source=Framework, Module=TcHmi.System.Engineering.SyncCmdToCreator] Command to send is not supported by TwinCAT HMI Engineering: ",this.__cmd),designerModeComManager.sendCommand(this.__cmd,timestamp)):TcHmi.Log.errorEx("[Source=Framework, Module=TcHmi.System.Engineering.SyncCmdToCreator] Internal error: designerModeComManager not loaded")}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToCreatorControlDoubleClick extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToCreatorCopyMoveControls extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToCreatorDropControlPosition extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToCreatorHierarchyMoveControls extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToCreatorMessages extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToCreatorRegisterSyncView extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToCreatorRequestCurrentPartialContent extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToCreatorRequestCurrentPartialContents extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToCreatorRequestRequiredViewPortSize extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToCreatorSelectedControls extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export let lastSyncControls=0;export class SyncCmdToCreatorSyncControls extends SyncCmdToCreator{constructor(cmd){super(cmd)}send(){lastSyncControls=Date.now(),super.send(lastSyncControls)}}

View File

@@ -0,0 +1 @@
import{SyncCmdToCreator}from"./SyncCmdToCreator.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToCreatorZoom extends SyncCmdToCreator{constructor(cmd){super(cmd)}}

View File

@@ -0,0 +1 @@
TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToFramework{static supportedCommand;constructor(cmd){this.__cmd=cmd,this.__result=TcHmi.Errors.NONE}__result}export const supportedCommandFromFramework=[];export const registerCommand=cmd=>{supportedCommandFromFramework.push(cmd.supportedCommand)};

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeManager}from"./DesignerModeManager.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkControlLocked extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);TCHMI_DESIGNER&&preparedTargetPartial===TCHMI_TARGET_PARTIAL&&designerModeManager.setControlLocked(this.__cmd.targetControl,this.__cmd.locked)}}SyncCmdToFrameworkControlLocked.supportedCommand="ControlLocked",registerCommand(SyncCmdToFrameworkControlLocked);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeManager}from"./DesignerModeManager.js";import{metaDataManager}from"./DesignerModeControlMetaDataMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);let SyncCmdToFrameworkCreateControls=(()=>{var _a;let ___onControlCreated_decorators,_classSuper=SyncCmdToFramework,_instanceExtraInitializers=[];return class extends _classSuper{static{const _metadata="function"==typeof Symbol&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;___onControlCreated_decorators=[(_a=TcHmi).CallbackMethod.bind(_a)],__esDecorate(this,null,___onControlCreated_decorators,{kind:"method",name:"__onControlCreated",static:!1,private:!1,access:{has:obj=>"__onControlCreated"in obj,get:obj=>obj.__onControlCreated},metadata:_metadata},null,_instanceExtraInitializers),_metadata&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}constructor(cmd){super(cmd)}__controlsToSelect=(__runInitializers(this,_instanceExtraInitializers),[]);__createsPending=0;__onControlCreated(_data){if(this.__createsPending--,this.__createsPending<=0&&this.__controlsToSelect.length>0){designerModeManager.unselectEach({bIgnoreSync:!0,rebuildCacheAndClasses:"none"});for(const controlToSelect of this.__controlsToSelect)designerModeManager.select({controlId:controlToSelect,bIgnoreSync:!0,rebuildCacheAndClasses:"none"});metaDataManager.rebuildCacheAndClasses(),designerModeManager.resyncSelectedControls()}}run(){if(!TCHMI_DESIGNER)return;if(tchmi_path(this.__cmd.targetPartial)===TCHMI_TARGET_PARTIAL)if(this.__cmd.controls)for(const control of this.__cmd.controls)if(control.controlHtml){this.__createsPending++,control.select&&this.__controlsToSelect.push(control.controlId);const parentControl=TcHmi.Controls.get(control.targetParentControl),pcElementInParent=parentControl?.getPcElement()[0].querySelector(`#${CSS.escape(control.controlId)}`);if(pcElementInParent&&pcElementInParent.outerHTML===control.controlHtml.replaceAll("\r\n","\n")&&TcHmi.Controls.get(control.controlId)){this.__onControlCreated({error:TcHmi.Errors.NONE});continue}const compileResult=designerModeManager.createControl(control.targetParentControl,control.domPosition,control.controlHtml,this.__onControlCreated);compileResult.error&&(TcHmi.Log.errorEx(`[Source=Framework, Module=TcHmi.System.Engineering.SyncCmdToFrameworkCreateControls] compile of ${control.controlId} has failed:`,TcHmi.Log.buildMessage(compileResult.details)),this.__onControlCreated({error:compileResult.error}))}else TcHmi.Log.error(`[Source=Framework, Module=TcHmi.System.Engineering.SyncCmdToFrameworkCreateControls] html content of ${control.controlId} is empty`),this.__result=TcHmi.Errors.E_PARAMETER_INVALID;else this.__result=TcHmi.Errors.E_PARAMETER_INVALID}}})();export{SyncCmdToFrameworkCreateControls};SyncCmdToFrameworkCreateControls.supportedCommand="CreateControls",registerCommand(SyncCmdToFrameworkCreateControls);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{partialContentManager}from"./DesignerModePartialContentManager.js";import{updatePartial}from"./SyncCmdToFrameworkCurrentPartialContent.js";let highlightManager;TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`),TCHMI_DESIGNER&&import("./DesignerModeMasterControlHighlightMngr.js").then(module=>{highlightManager=module.highlightManager}).catch(ex=>{TcHmi.Log.error("Failed to load highlightManager in Framework SyncCmdToFrameworkCurrentPartialContent: "+ex)});export class SyncCmdToFrameworkCurrentPartialContents extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){if(!this.__cmd.targetPartials)return TcHmi.Log.error("[Source=Framework, Module=TcHmi.System.Engineering.SyncCmdToFrameworkCurrentPartialContent] Failed to synchronize partial. Missing command property targetPartials."),void(this.__result=TcHmi.Errors.E_PARAMETER_INVALID);const piggyBackObj=TcHmi.ValueConverter.toObject(this.__cmd.piggyBack);if(null!=piggyBackObj&&void 0!==piggyBackObj.requestId&&null!==piggyBackObj.requestId){if(piggyBackObj.requestInstance!==TCHMI_DYNAMIC_INSTANCE_ID)return;let request=partialContentManager.getRequestMulti(piggyBackObj.requestId);return void(request&&request.resolve(this.__cmd.targetPartials))}for(const targetPartial of this.__cmd.targetPartials){if(!targetPartial.content)continue;const res=updatePartial(targetPartial.path,targetPartial.content);res&&(this.__result=res)}TCHMI_DESIGNER&&highlightManager?.processDomVisibility()}}SyncCmdToFrameworkCurrentPartialContents.supportedCommand="CurrentPartialContents",registerCommand(SyncCmdToFrameworkCurrentPartialContents);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeManager}from"./DesignerModeManager.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToFrameworkCurrentPartialEditorLockState extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){tchmi_path(this.__cmd.targetPartial)===TCHMI_TARGET_PARTIAL&&this.__cmd.locked&&designerModeManager.lock()}}SyncCmdToFrameworkCurrentPartialEditorLockState.supportedCommand="CurrentPartialEditorLockState",registerCommand(SyncCmdToFrameworkCurrentPartialEditorLockState);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{highlightManager}from"./DesignerModeMasterControlHighlightMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkCurrentPartialHighlightContainerState extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){if(!TCHMI_DESIGNER)return;tchmi_path(this.__cmd.targetPartial)===TCHMI_TARGET_PARTIAL&&highlightManager.setHighlightContainerVisibility(this.__cmd.state)}}SyncCmdToFrameworkCurrentPartialHighlightContainerState.supportedCommand="CurrentPartialHighlightContainerState",registerCommand(SyncCmdToFrameworkCurrentPartialHighlightContainerState);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeManager}from"./DesignerModeManager.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkDesignerSettings extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){TCHMI_DESIGNER&&designerModeManager.updateSettings(this.__cmd.settings)}}SyncCmdToFrameworkDesignerSettings.supportedCommand="DesignerSettings",registerCommand(SyncCmdToFrameworkDesignerSettings);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{highlightManager}from"./DesignerModeMasterControlHighlightMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkDomVisibility extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);TCHMI_DESIGNER&&preparedTargetPartial===TCHMI_TARGET_PARTIAL&&highlightManager.setCreatorVisibilityAttribute(this.__cmd.targetControl,this.__cmd.visibility)}}SyncCmdToFrameworkDomVisibility.supportedCommand="DomVisibility",registerCommand(SyncCmdToFrameworkDomVisibility);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{interactionManager}from"./DesignerModeMasterInteractionMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkKeyStates extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){if(!TCHMI_DESIGNER)return;if(tchmi_path(this.__cmd.targetPartial)!==TCHMI_TARGET_PARTIAL)return;let s=this.__cmd.states;null!=s?(void 0!==s.leftCtrl&&null!==s.leftCtrl&&void 0!==s.leftCtrl.down&&s.leftCtrl.down||void 0!==s.rightCtrl&&null!==s.rightCtrl&&void 0!==s.rightCtrl.down&&s.rightCtrl.down?interactionManager.setCtrlModifierKeyState(!0):interactionManager.setCtrlModifierKeyState(!1),void 0!==s.leftShift&&null!==s.leftShift&&void 0!==s.leftShift.down&&s.leftShift.down||void 0!==s.rightShift&&null!==s.rightShift&&void 0!==s.rightShift.down&&s.rightShift.down?interactionManager.setShiftModifierKeyState(!0):interactionManager.setShiftModifierKeyState(!1)):this.__result=TcHmi.Errors.E_PARAMETER_INVALID}}SyncCmdToFrameworkKeyStates.supportedCommand="KeyStates",registerCommand(SyncCmdToFrameworkKeyStates);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{accessManager}from"../AccessManager.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToFrameworkLogoutClient extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){4!==accessManager.getCurrentUserConfig().state||this.__cmd.targetInstance&&this.__cmd.targetInstance!==TCHMI_DYNAMIC_INSTANCE_ID||TcHmi.Server.logout()}}SyncCmdToFrameworkLogoutClient.supportedCommand="LogoutClient",registerCommand(SyncCmdToFrameworkLogoutClient);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeManager}from"./DesignerModeManager.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToFrameworkPartialEditorLocked extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){tchmi_path(this.__cmd.targetPartial)===TCHMI_TARGET_PARTIAL&&designerModeManager.lock()}}SyncCmdToFrameworkPartialEditorLocked.supportedCommand="PartialEditorLocked",registerCommand(SyncCmdToFrameworkPartialEditorLocked);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToFrameworkPartialEditorUnlocked extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){if(TCHMI_DESIGNER){if(tchmi_path(this.__cmd.targetPartial)!==TCHMI_TARGET_PARTIAL)return;if(void 0!==window.location&&null!==window.location)return void window.location.reload()}}}SyncCmdToFrameworkPartialEditorUnlocked.supportedCommand="PartialEditorUnlocked",registerCommand(SyncCmdToFrameworkPartialEditorUnlocked);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{SyncCmdToCreatorSyncControls}from"./SyncCmdToCreatorSyncControls.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkRemoveControls extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){if(!TCHMI_DESIGNER)return;if(tchmi_path(this.__cmd.targetPartial)!==TCHMI_TARGET_PARTIAL)return;const deletedChildControls=new Set;for(const controlId of this.__cmd.controls){if(deletedChildControls.has(controlId))continue;const tco=TcHmi.Controls.get(controlId);if(!tco){TcHmi.Log.error(`[Source=Framework, Module=TcHmi.System.Engineering.SyncCmdToFrameworkRemoveControls] Failed to remove control "${controlId}": Not found in control cache.\n`);break}const updateParents=ctrl=>{const parentCtrl=ctrl.getParent();if(!parentCtrl)return;const parentPcElem=parentCtrl.getPcElement(),deletedChildInPc=parentPcElem?.[0].querySelector("#"+CSS.escape(controlId));deletedChildInPc?.remove(),updateParents(parentCtrl)};updateParents(tco),TcHmi.Engineering.ErrorPane.remove(controlId+"requiredAttributeTouched");for(const children of tco.getElement()[0].querySelectorAll("div[id][data-tchmi-type]"))deletedChildControls.add(children.id);tco.__getKeepAlive()&&tco.__setKeepAlive(!1),tco.destroy()}new SyncCmdToCreatorSyncControls({name:"SyncControls",controls:[],frameworkType:TCHMI_DESIGNER?"Designer":"LiveView",targetPartial:TCHMI_TARGET_PARTIAL,replyTo:null}).send()}}SyncCmdToFrameworkRemoveControls.supportedCommand="RemoveControls",registerCommand(SyncCmdToFrameworkRemoveControls);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{SyncCmdToCreatorDropControlPosition}from"./SyncCmdToCreatorDropControlPosition.js";import{hierarchyManager}from"./DesignerModeMasterHierarchyMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkRequestDropControlPosition extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){if(!TCHMI_DESIGNER)return;const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);if(preparedTargetPartial!==TCHMI_TARGET_PARTIAL)return;if(void 0===this.__cmd.type||null===this.__cmd.type)return void(this.__result=TcHmi.Errors.E_PARAMETER_INVALID);const dropConfig=hierarchyManager.getContainerFromPoint({left:this.__cmd.position.left+window.scrollX,top:this.__cmd.position.top+window.scrollY});if(!dropConfig)return void(this.__result=TcHmi.Errors.ERROR);let command={name:"DropControlPosition",controls:[{piggyBack:this.__cmd.piggyBack,targetParentControl:dropConfig.tco.getId(),type:this.__cmd.type,position:{centerX:dropConfig.mousePosXinTarget,centerY:dropConfig.mousePosYinTarget}}],targetPartial:preparedTargetPartial,frameworkType:TCHMI_DESIGNER?"Designer":"LiveView",replyTo:null};null===dropConfig.rowIndex||null===dropConfig.columnIndex||0===dropConfig.rowIndex&&0===dropConfig.columnIndex||(command.controls[0].attributes=[{name:"data-tchmi-grid-row-index",value:dropConfig.rowIndex},{name:"data-tchmi-grid-column-index",value:dropConfig.columnIndex}]),new SyncCmdToCreatorDropControlPosition(command).send()}}SyncCmdToFrameworkRequestDropControlPosition.supportedCommand="RequestDropControlPosition",registerCommand(SyncCmdToFrameworkRequestDropControlPosition);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{rootControlManager}from"./DesignerModeMasterRootControlMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkScrollPositionChanged extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);TCHMI_DESIGNER&&preparedTargetPartial===TCHMI_TARGET_PARTIAL&&rootControlManager.scroll(this.__cmd.position)}}SyncCmdToFrameworkScrollPositionChanged.supportedCommand="ScrollPositionChanged",registerCommand(SyncCmdToFrameworkScrollPositionChanged);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeManager}from"./DesignerModeManager.js";import{metaDataManager}from"./DesignerModeControlMetaDataMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkSelectedControls extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);if(TCHMI_DESIGNER&&preparedTargetPartial===TCHMI_TARGET_PARTIAL){designerModeManager.unselectEach({bIgnoreSync:!0,rebuildCacheAndClasses:"none"});for(const controlId of this.__cmd.controls)designerModeManager.select({controlId,bIgnoreSync:!0,rebuildCacheAndClasses:"none"});metaDataManager.rebuildCacheAndClasses()}}}SyncCmdToFrameworkSelectedControls.supportedCommand="SelectedControls",registerCommand(SyncCmdToFrameworkSelectedControls);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{serverManager}from"../ServerManager.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkServerAddress extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);TCHMI_DESIGNER&&preparedTargetPartial===TCHMI_TARGET_PARTIAL&&serverManager.setServerAddress(this.__cmd.protocol,this.__cmd.host,this.__cmd.port)}}SyncCmdToFrameworkServerAddress.supportedCommand="ServerAddress",registerCommand(SyncCmdToFrameworkServerAddress);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeManager}from"./DesignerModeManager.js";import{highlightManager}from"./DesignerModeMasterControlHighlightMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkSyncControls extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){if(!TCHMI_DESIGNER)return;const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);if(preparedTargetPartial!==TCHMI_TARGET_PARTIAL)return;let bCausedChanges=!1;for(const control of this.__cmd.controls)try{designerModeManager.syncControl(preparedTargetPartial,control.targetControl,control.controlHtml)&&(bCausedChanges=!0)}catch(e){TcHmi.Log.error(e),this.__result=TcHmi.Errors.ERROR}bCausedChanges&&highlightManager.processDomVisibility()}}SyncCmdToFrameworkSyncControls.supportedCommand="SyncControls",registerCommand(SyncCmdToFrameworkSyncControls);

View File

@@ -0,0 +1 @@
import{SyncCmdToFramework,registerCommand}from"./SyncCmdToFramework.js";import{designerModeComManager}from"./DesignerModeComManager.js";TCHMI_ENGINEERING||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer or live view.`);export class SyncCmdToFrameworkSyncViewRegistered extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){this.__cmd.supportedCommands?.length&&designerModeComManager.fillSupportedCommandFromVS(this.__cmd.supportedCommands)}}SyncCmdToFrameworkSyncViewRegistered.supportedCommand="SyncViewRegistered",registerCommand(SyncCmdToFrameworkSyncViewRegistered);

View File

@@ -0,0 +1 @@
import{registerCommand,SyncCmdToFramework}from"./SyncCmdToFramework.js";import{rootControlManager}from"./DesignerModeMasterRootControlMngr.js";TCHMI_DESIGNER||TcHmi.Log.errorEx(`Internal error: The file "${import.meta.url}" is restricted to use within the designer.`);export class SyncCmdToFrameworkZoom extends SyncCmdToFramework{constructor(cmd){super(cmd)}run(){const preparedTargetPartial=tchmi_path(this.__cmd.targetPartial);TCHMI_DESIGNER&&preparedTargetPartial===TCHMI_TARGET_PARTIAL&&rootControlManager.setCreatorZoom(this.__cmd.factor)}}SyncCmdToFrameworkZoom.supportedCommand="Zoom",registerCommand(SyncCmdToFrameworkZoom);

View File

@@ -0,0 +1 @@
export function gIsolatedEval_TcHmi_System_TriggerManager_JavaScriptAction(ctx,s){return s+="\n//# sourceURL=gIsolatedEval_TcHmi_System_TriggerManager_JavaScriptAction",eval(s)}export function gIsolatedEval_TcHmi_System_TriggerManager_ConditionExpressionsResult(s,results){return s+="\n//# sourceURL=gIsolatedEval_TcHmi_System_TriggerManager_ConditionExpressionsResult",eval(s)}export function gIsolatedEval_TcHmi_System_FunctionExpression_Results(s,resSE,resFCE){return s+="\n//# sourceURL=gIsolatedEval_TcHmi_System_FunctionExpression_Results",eval(s)}export function gIsolatedEval_TcHmi_System_FunctionExpression(s){return s+="\n//# sourceURL=gIsolatedEval_TcHmi_System_FunctionExpression",eval(s)}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
let __current,__inc=0,__queue=[];function __next(){if(__current)return;let c=__queue.shift();c&&(__current=c,__current.prompt.prompt().then(result=>{__current&&(__current?.resolve(result),__current.prompt.destroy(),__current=null),__next()}).catch(reason=>{__current&&(__current?.reject(reason),__current.prompt.destroy(),__current=null),__next()}))}export function add(symbol,options,parentControl){let id=(__inc++,__inc);return{id,promise:new Promise((resolve,reject)=>{let popupUiProvider;try{popupUiProvider=TcHmi.UiProvider.getPreferredProvider("popup")}catch(e){return void reject(new Error("Resolving UiProvider 'popup' for TcHmiInteractiveWritePrompt has failed with unexpected exception: '"+e+"'."))}if(!popupUiProvider)return void reject(new Error("Resolving UiProvider 'popup' for TcHmiInteractiveWritePrompt has failed."));if(!popupUiProvider.createInteractiveWritePrompt)return void reject(new Error("The configured popup provider does not implement the method 'createInteractiveWritePrompt'."));let prompt=popupUiProvider.createInteractiveWritePrompt(symbol,options,parentControl);prompt.setBackgroundAction({close:!0,action:"cancel"});let entry={id,prompt,resolve,reject};__queue.push(entry),__next()})}}export function remove(id){if(__current?.id===id)__current.prompt.abort({action:"cancel"}),__current.prompt.destroy(),__current=null;else{let pos=-1;for(let i=0;i<__queue.length;i++){let entry=__queue[i];if(entry.id===id){pos=i,entry.prompt.abort({action:"cancel"}),entry.prompt.destroy();break}}-1!==pos&&__queue.splice(pos,1)}}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{run as triggerActionsRun}from"../API/Trigger.Actions.js";export class IntervalManager{__items=new Map;__createIntervalHandler(item){return()=>{triggerActionsRun(item.actions)}}add(name,item){this.__items.has(name)||this.__items.set(name,{...item,intervalId:0})}remove(name){this.stop(name),this.__items.delete(name)}update(name,itemNew){let start=!1,item=this.__items.get(name);item&&item.intervalId&&(start=!0,this.stop(name)),this.__items.set(name,{...itemNew,intervalId:0}),start&&this.start(name)}start(name){let item=this.__items.get(name);item&&(item.intervalId&&(clearInterval(item.intervalId),item.intervalId=0),item.intervalId=setInterval(this.__createIntervalHandler(item),item.interval))}stop(name){let item=this.__items.get(name);item&&item.intervalId&&(clearInterval(item.intervalId),item.intervalId=0)}}export const intervalManager=new IntervalManager;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{Localization}from"../API/Locale.js";export class Framework extends Localization{constructor(){super(),this.__namespace="TcHmi.System.Localization.Framework"}}export const frameworkLocalization=new Framework;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
export class PackageSymbolManager{__mappings=new Map;add(name,mapping){this.__mappings.set(name,mapping),TcHmi.EventProvider.raise(`TcHmi.PackageSymbolManager<${name}>.onAdd`,{name,mapping}),TcHmi.EventProvider.raise("TcHmi.PackageSymbolManager.onAdd",{name,mapping})}get(name){return this.__mappings.get(name)}remove(name){this.__mappings.delete(name),TcHmi.EventProvider.raise(`TcHmi.PackageSymbolManager<${name}>.onRemove`,{name}),TcHmi.EventProvider.raise("TcHmi.PackageSymbolManager.onRemove",{name})}update(name,mapping){let current=this.__mappings.get(name);if(!current)return void this.add(name,mapping);let refresh=!1;tchmi_equal(current.type,mapping.type)||(current.type=mapping.type,refresh=!0),tchmi_equal(current.symbol,mapping.symbol)||(current.symbol=mapping.symbol,refresh=!0),refresh&&(TcHmi.EventProvider.raise(`TcHmi.PackageSymbolManager<${name}>.onUpdate`,{name,mapping:current}),TcHmi.EventProvider.raise("TcHmi.PackageSymbolManager.onUpdate",{name,mapping:current}))}}export const packageSymbolManager=new PackageSymbolManager;

View File

@@ -0,0 +1 @@
export const controlRegistrations={map:new Map,array:[]};export const functionRegistrations={map:new Map,array:[]};export function injectInGlobalObject(fullName,injectObj){const pathArr=fullName.split(".");if(pathArr.some(path=>!path))throw new Error("Empty parts for namespace not allowed.");const name=pathArr.pop();let iteratingTargetObject=window;for(const path of pathArr){if(path in iteratingTargetObject||(iteratingTargetObject[path]={}),"object"!=typeof iteratingTargetObject[path]&&"function"!=typeof iteratingTargetObject[path]||null===iteratingTargetObject[path])throw new Error(`The requested namespace ${fullName} has conflicts with existing window properties.`);iteratingTargetObject=iteratingTargetObject[path]}if(name in iteratingTargetObject)throw new Error("There is already an object at the requested place "+fullName);iteratingTargetObject[name]=injectObj}export const mapControlNamesFromPackageManifestApi1ToApi0=new Map([["TcHmi.Controls.Beckhoff.TcHmiBarChart","tchmi-bar-chart"],["TcHmi.Controls.Beckhoff.TcHmiButton","tchmi-button"],["TcHmi.Controls.Beckhoff.TcHmiCheckbox","tchmi-checkbox"],["TcHmi.Controls.Beckhoff.TcHmiCombobox","tchmi-combobox"],["TcHmi.Controls.Beckhoff.TcHmiDatagrid","tchmi-datagrid"],["TcHmi.Controls.Beckhoff.TcHmiDateTimePicker","tchmi-date-time-picker"],["TcHmi.Controls.Beckhoff.TcHmiEllipse","tchmi-ellipse"],["TcHmi.Controls.Beckhoff.TcHmiEventGrid","tchmi-event-grid"],["TcHmi.Controls.Beckhoff.TcHmiIFrame","tchmi-iframe"],["TcHmi.Controls.Beckhoff.TcHmiImage","tchmi-image"],["TcHmi.Controls.Beckhoff.TcHmiKeyboard","tchmi-keyboard"],["TcHmi.Controls.Beckhoff.TcHmiLine","tchmi-line"],["TcHmi.Controls.Beckhoff.TcHmiLinearGauge","tchmi-linear-gauge"],["TcHmi.Controls.Beckhoff.TcHmiLineChart","tchmi-line-chart"],["TcHmi.Controls.Beckhoff.TcHmiPolygon","tchmi-polygon"],["TcHmi.Controls.Beckhoff.TcHmiRadialGauge","tchmi-radial-gauge"],["TcHmi.Controls.Beckhoff.TcHmiRectangle","tchmi-rectangle"],["TcHmi.Controls.Beckhoff.TcHmiTextblock","tchmi-textblock"],["TcHmi.Controls.Beckhoff.TcHmiTextbox","tchmi-textbox"],["TcHmi.Controls.Beckhoff.TcHmiTimespanPicker","tchmi-timespan-picker"],["TcHmi.Controls.Beckhoff.TcHmiToggleButton","tchmi-toggle-button"],["TcHmi.Controls.Beckhoff.TcHmiTrendLineChart","tchmi-trend-line-chart"],["TcHmi.Controls.Beckhoff.TcHmiVideo","tchmi-video"],["TcHmi.Controls.System.TcHmiContainer","tchmi-container"],["TcHmi.Controls.System.TcHmiContainerControl","tchmi-container-control"],["TcHmi.Controls.System.TcHmiContent","tchmi-content"],["TcHmi.Controls.System.TcHmiControl","tchmi-control"],["TcHmi.Controls.System.TcHmiGrid","tchmi-grid"],["TcHmi.Controls.System.TcHmiHtmlHost","tchmi-html-host"],["TcHmi.Controls.System.TcHmiPartial","tchmi-partial"],["TcHmi.Controls.System.TcHmiRegion","tchmi-region"],["TcHmi.Controls.System.TcHmiUserControl","tchmi-user-control"],["TcHmi.Controls.System.TcHmiUserControlHost","tchmi-user-control-host"],["TcHmi.Controls.System.TcHmiView","tchmi-view"]]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{isInitialized}from"./System.js";import{viewManager}from"./ViewManager.js";import{Log}from"../API/Log.js";export class SplashScreen{constructor(){let tempDivSplashScreenContainer=document.createElement("div");tempDivSplashScreenContainer.innerHTML='<div id="tchmi-splash-container">\n <div class="tchmi-splash-content-container">\n <div class="tchmi-splash-stage-progress-container"><div class="tchmi-splash-stage-progress"></div></div>\n <div class="tchmi-splash-stage-info">Loading...</div>\n <div class="tchmi-splash-version-info"></div>\n </div>\n </div>',this.__elementSplashScreenContainer=tempDivSplashScreenContainer.firstElementChild,this.__elementSplashScreenContainer?(this.__elementSplashScreenContainer.remove(),this.__elementSplashProgress=this.__elementSplashScreenContainer.querySelector(".tchmi-splash-stage-progress"),this.__elementSplashInfo=this.__elementSplashScreenContainer.querySelector(".tchmi-splash-stage-info"),this.__elementVersionInfo=this.__elementSplashScreenContainer.querySelector(".tchmi-splash-version-info")):Log.error("[Source=Framework, Module=TcHmi.System.SplashScreen] Internal error. Did not find tchmi-splash-container element.")}__elementSplashScreenContainer;__elementSplashProgress;__elementSplashInfo;__elementVersionInfo;__forcedHideSplash=!1;disableSplash(){this.__forcedHideSplash=!0,this.hide()}__isVisible=!1;isVisible(){return this.__isVisible}updateVersionInfo(message){this.__elementVersionInfo&&(this.__elementVersionInfo.textContent=message)}updateStageInfo(message){this.__elementSplashInfo&&(this.__elementSplashInfo.textContent=message)}updateStageProgress(progress){this.__elementSplashProgress&&(this.__elementSplashProgress.style.width=progress.toString()+"%")}show(){this.__isVisible||isInitialized||this.__forcedHideSplash||(viewManager.addViewportElement(this.__elementSplashScreenContainer,{name:"splash",area:"main"}),this.__isVisible=!0,TcHmi.EventProvider.raise("System.onSplashScreenShow"))}hide(){this.__isVisible&&(viewManager.removeViewportElement(this.__elementSplashScreenContainer),this.__isVisible=!1,TcHmi.EventProvider.raise("System.onSplashScreenHide"))}}export const splashScreen=new SplashScreen;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{SymbolExpression}from"../API/SymbolExpression.js";export class SymbolExpressionFromText{constructor(text){this.__text=text}__text;__parseExpressionFromString(text,typeString,res){const typeStringlength=typeString.length,textlength=text.length;for(let pos=0;pos<=textlength;pos++){if("%"!==text[pos])continue;let esccount=0,otag="";if(pos+typeStringlength+2<=textlength)if("$"!==text.substr(pos+1,1))otag=text.substr(pos,typeStringlength+2);else{let temppos=pos+1;for(;temppos+2<=textlength&&"$"===text.substr(temppos,1);)esccount++,temppos++;otag=text.substr(pos,typeStringlength+esccount+2)}let exptag="%";for(let i=0,ii=esccount;i<ii;i++)exptag+="$";if(exptag+=typeString+"%",otag===exptag){let ocount=0,ccount=0,subText=text.substr(pos+otag.length,textlength-(pos+otag.length)),subTextlength=textlength-(pos+otag.length);for(let subPos=0;subPos<=subTextlength;subPos++){if("%"!==subText[subPos])continue;let subOTag="";subPos+typeStringlength+2<=subTextlength&&(subOTag=subText.substr(subPos,typeStringlength+2));let subCTag="";if(subPos+typeStringlength+3<=subTextlength&&(subCTag=subText.substr(subPos,typeStringlength+3)),subCTag==="%/"+typeString+"%"){if(ccount===ocount){let e=text.substr(pos,otag.length+subCTag.length+subPos);try{let se=new SymbolExpression(e);se.getType()!==TcHmi.SymbolType.Invalid&&res.push(se)}catch(e){}break}ccount++}else subOTag==="%"+typeString+"%"&&ocount++}}}return res}resolveExpressionsBySymbolType(type){let res=[],typeString=null;switch(type){case TcHmi.SymbolType.Internal:typeString="i";break;case TcHmi.SymbolType.Server:typeString="s";break;case TcHmi.SymbolType.LocalizedText:typeString="l";break;case TcHmi.SymbolType.PartialParam:typeString="pp";break;case TcHmi.SymbolType.TemplateParam:typeString="tp";break;case TcHmi.SymbolType.Control:typeString="ctrl";break;case TcHmi.SymbolType.Function:typeString="f";break;case TcHmi.SymbolType.Context:typeString="ctx";break;case TcHmi.SymbolType.ThemedResource:typeString="tr";break;default:return res}return null===typeString?res:this.__text?(res=this.__parseExpressionFromString(this.__text,typeString,res),res.sort(function(a,b){const alength=a.toString().length,blength=b.toString().length;return alength>blength?-1:alength<blength?1:0}),res):res}resolveExpressions(){let res=[];if(null===this.__text||0===this.__text.length)return res;let typeStrings=["i","s","l","pp","tp","ctrl","f","ctx","tr"];for(let i=0,ii=typeStrings.length;i<ii;i++)res=this.__parseExpressionFromString(this.__text,typeStrings[i],res);return res.sort(function(a,b){return a.toString().length>b.toString().length?-1:a.toString().length<b.toString().length?1:0}),res}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
import{getSchema}from"../API/Type.js";import{Symbol as SystemSymbol}from"./Symbol.js";import{resolveDefault}from"./Type.Schema.js";export class TemplateParamSymbolManager extends TcHmi.Destroyable{constructor(){super()}__entries=new Map;add(name,type,value){let prepValue;if(void 0===value){let schema=getSchema(type);schema&&(prepValue=resolveDefault(schema))}else prepValue=value;let entry={name,type,value:prepValue,callbacks:[]};this.__entries.set(name,entry)}remove(name){let entry=this.__entries.get(name);entry&&(entry.value instanceof SystemSymbol&&entry.value.destroy(),entry.value=null,this.__entries.delete(name))}get(name){return this.__entries.get(name)}destroy(){this.isDestroyed()||(this.__releaseDestroyPrivilege(),this.isDestroyable()&&(this.__entries.forEach(entry=>{entry.value instanceof SystemSymbol&&entry.value.destroy()}),this.__entries.clear()))}keepAlive(name){let entry=this.__entries.get(name);return!!(entry&&entry.callbacks.length>0)}}export const templateParamSymbolManager=new TemplateParamSymbolManager;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More