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

Binary file not shown.

View File

@@ -0,0 +1,11 @@
# Beckhoff.TwinCAT.HMI.Framework
This package provides the client framework for TwinCAT HMI applications.
## Usage
Add `Beckhoff.TwinCAT.HMI.Framework` to your TwinCAT HMI project to enable the core runtime environment and essential services for building web-based HMIs.
## Documentation
For detailed usage and configuration, refer to the [Beckhoff TwinCAT HMI documentation](https://infosys.beckhoff.de/content/1033/te2000_tc3_hmi_engineering/index.html).

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,52 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiContainer",
"namespace": "TcHmi.Controls.System",
"displayName": "Container",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": true,
"themeable": "Standard",
"base": "TcHmi.Controls.System.TcHmiContainerControl",
"description": "A container for other controls.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": true,
"geometry": {
"width": 200,
"height": 200
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiContainer/TcHmiContainer.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiContainer": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiContainer",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiContainer": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiContainer"
}
}
}

View File

@@ -0,0 +1,15 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiContainer,
.tchmi-container {
}
.TcHmi_Controls_System_TcHmiContainer-template,
.tchmi-container-template {
perspective: inherit;
perspective-origin: inherit;
position: relative;
width: 100%;
height: 100%;
}

View File

@@ -0,0 +1,63 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiContainer extends TcHmi.Controls.System.TcHmiContainerControl {
#private;
/** Constructor */
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
protected __elementTemplateRoot: JQuery;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This will also add child's DOM element to the container DOM.
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
addChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null, pos?: number | null): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This will also add child's DOM element to the container DOM.
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
__addChild(control: TcHmi.Controls.System.baseTcHmiControl, pos?: number | null): void;
/**
*/
removeChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null): void;
__removeChild(control: TcHmi.Controls.System.baseTcHmiControl): void;
}
export { TcHmiContainer as Control };
declare const _TcHmiContainer: typeof TcHmiContainer;
type tTcHmiContainer = TcHmiContainer;
declare global {
namespace TcHmi.Controls.System {
const TcHmiContainer: typeof _TcHmiContainer;
type TcHmiContainer = tTcHmiContainer;
}
}

View File

@@ -0,0 +1 @@
<div class="TcHmi_Controls_System_TcHmiContainer-template tchmi-container-template tchmi-box"></div>

View File

@@ -0,0 +1,110 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiContainerControl",
"namespace": "TcHmi.Controls.System",
"displayName": "Container Control",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": false,
"themeable": "Advanced",
"base": "TcHmi.Controls.System.TcHmiControl",
"description": "Base class for all controls which can contain other controls.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": true,
"geometry": {
"width": 0,
"height": 0
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiContainerControl/TcHmiContainerControl.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"functions": [],
"attributes": [
{
"name": "data-tchmi-is-enabled",
"propertyName": "IsEnabled",
"propertySetterName": "setIsEnabled",
"propertyGetterName": "getIsEnabled",
"displayName": "Is Enabled",
"visible": true,
"themeable": "Standard",
"displayPriority": 30,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "If disabled this overwrites the state of all children.\nOnly enabled controls will react on events.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": true
},
{
"name": "data-tchmi-width-mode",
"propertyName": "WidthMode",
"propertySetterName": "setWidthMode",
"propertyGetterName": "getWidthMode",
"displayName": "Width Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the width is taken from the width value, calculated from left and right (parent) or calculated from child controls.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
},
{
"name": "data-tchmi-height-mode",
"propertyName": "HeightMode",
"propertySetterName": "setHeightMode",
"propertyGetterName": "getHeightMode",
"displayName": "Height Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the height is taken from the height value, calculated from top and bottom (parent) or calculated from child controls.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
}
],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiContainerControl": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiContainerControl",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiContainerControl": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiContainerControl"
}
}
}

View File

@@ -0,0 +1,7 @@
/** Styles for all themes */
/* container have no own visual representation so the white overlay is not nice on non white backgrounds */
.TcHmi_Controls_System_TcHmiContainerControl.TcHmi_Controls_System_TcHmiControl-disabled::after,
.tchmi-container-control.tchmi-control-disabled::after {
background-color: transparent;
}

View File

@@ -0,0 +1,90 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiContainerControl extends TcHmi.Controls.System.TcHmiControl {
#private;
/** Constructor */
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
protected __widthMode: TcHmi.SizeModeWithContent | undefined;
protected __heightMode: TcHmi.SizeModeWithContent | undefined;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Sets __keepAlive
* @param value
*/
__setKeepAlive(value: boolean): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This base class does not append child's DOM element to the container DOM!
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
addChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null, pos?: number | null): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This base class does not append child's DOM element to the container DOM!
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
__addChild(control: TcHmi.Controls.System.baseTcHmiControl, pos?: number | null): void;
/**
* Remove a child control.
*/
removeChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null): void;
__removeChild(control: TcHmi.Controls.System.baseTcHmiControl): void;
/**
* Processes the current height and height unit.
*/
__processHeight(callerControl?: TcHmiControl): void;
/**
* Processes the current width and width unit.
*/
__processWidth(callerControl?: TcHmiControl): void;
/**
* Sets the value of the width mode attribute.
* @param valueNew The new width mode value..
*/
setWidthMode(valueNew: TcHmi.SizeModeWithContent | null): void;
/**
* Sets the value of the height mode attribute.
* @param valueNew The new height mode value..
*/
setHeightMode(valueNew: TcHmi.SizeModeWithContent | null): void;
__getContentWidth(): number | null;
__getContentHeight(): number | null;
}
export { TcHmiContainerControl as Control };
declare const _TcHmiContainerControl: typeof TcHmiContainerControl;
type tTcHmiContainerControl = TcHmiContainerControl;
declare global {
namespace TcHmi.Controls.System {
const TcHmiContainerControl: typeof _TcHmiContainerControl;
type TcHmiContainerControl = tTcHmiContainerControl;
}
}

View File

@@ -0,0 +1,48 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiContent",
"namespace": "TcHmi.Controls.System",
"displayName": "Content",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": false,
"themeable": "Standard",
"base": "TcHmi.Controls.System.TcHmiPartial",
"description": "A reusable Container which can be loaded in a Region.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": true,
"geometry": {
"width": 500,
"height": 500
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"dependencyFiles": [
{
"name": "../../../dist/Controls/System/TcHmiContent/TcHmiContent.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [],
"functions": [],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiContent": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiContent",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiContent": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiContent"
}
}
}

View File

@@ -0,0 +1,23 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiContent extends TcHmi.Controls.System.TcHmiPartial {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
}
export { TcHmiContent as Control };
declare const _TcHmiContent: typeof TcHmiContent;
type tTcHmiContent = TcHmiContent;
declare global {
namespace TcHmi.Controls.System {
const TcHmiContent: typeof _TcHmiContent;
type TcHmiContent = tTcHmiContent;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiControl": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiControl",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiControl": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiControl"
}
}
}

View File

@@ -0,0 +1,34 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiControl,
.tchmi-control {
position: absolute;
/* Browser default is 3 px! */
border-top-width: 0px;
border-left-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
}
/* Mark disabled controls without interupting control logic */
.TcHmi_Controls_System_TcHmiControl-disabled::after,
.tchmi-control-disabled::after {
content: '';
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
/*background-color: rgba(255, 255, 255, 0.5); color is defined in theme css*/
z-index: 100;
}
/* Hide controls which has no observe right.
This is no security fail. If an attacker got some stuff from the server he can manipulate the running script or DOM in the browser anyway.
The real security has to be implemented in the server config.
*/
.TcHmi_Controls_System_TcHmiControl-observe-disallowed,
.tchmi-control-observe-disallowed {
display: none !important; /* Force this value to be valid and override style display definitions if available! */
}

View File

@@ -0,0 +1,7 @@
/** Styles for theme: Base-Dark */
/* Mark disabled controls without interupting control logic */
.TcHmi_Controls_System_TcHmiControl-disabled::after,
.tchmi-control-disabled::after {
background-color: var(--tchmi-disabled-color);
}

View File

@@ -0,0 +1,7 @@
/** Styles for theme: Base */
/* Mark disabled controls without interupting control logic */
.TcHmi_Controls_System_TcHmiControl-disabled::after,
.tchmi-control-disabled::after {
background-color: var(--tchmi-disabled-color);
}

View File

@@ -0,0 +1,184 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiGrid",
"namespace": "TcHmi.Controls.System",
"displayName": "Grid",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": true,
"themeable": "Standard",
"base": "TcHmi.Controls.System.TcHmiContainerControl",
"description": "A layout Grid for Controls which reacts fluid and responsive.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": true,
"geometry": {
"width": 300,
"height": 300
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiGrid/TcHmiGrid.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [
{
"name": "data-tchmi-width-mode",
"propertyName": "WidthMode",
"propertySetterName": "setWidthMode",
"propertyGetterName": "getWidthMode",
"displayName": "Width Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the width is taken from the width value, calculated from left and right (parent) or calculated from the child controls in columns.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
},
{
"name": "data-tchmi-height-mode",
"propertyName": "HeightMode",
"propertySetterName": "setHeightMode",
"propertyGetterName": "getHeightMode",
"displayName": "Height Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the height is taken from the height value, calculated from top and bottom (parent) or calculated from child controls in rows.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
},
{
"name": "data-tchmi-column-options",
"propertyName": "ColumnOptions",
"propertySetterName": "setColumnOptions",
"propertyGetterName": "getColumnOptions",
"displayName": "Column Options",
"visible": true,
"themeable": "Advanced",
"displayPriority": 10,
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.ColumnOptions",
"category": "Common",
"description": "Options for the columns.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": [
{
"width": 1,
"widthUnit": "factor",
"widthMode": "Value",
"overflow": false
}
]
},
{
"name": "data-tchmi-row-options",
"propertyName": "RowOptions",
"propertySetterName": "setRowOptions",
"propertyGetterName": "getRowOptions",
"displayName": "Row Options",
"visible": true,
"themeable": "Advanced",
"displayPriority": 10,
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.RowOptions",
"category": "Common",
"description": "Options for the rows.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": [
{
"height": 1,
"heightUnit": "factor",
"heightMode": "Value",
"overflow": false
}
]
},
{
"name": "data-tchmi-cell-options",
"propertyName": "CellOptions",
"propertyGetterName": "getCellOptions",
"propertySetterName": "setCellOptions",
"displayName": "Cell Options",
"visible": true,
"themeable": "Advanced",
"displayPriority": 10,
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.CellOptions",
"category": "Common",
"description": "Options for the cells.",
"readOnly": false,
"heritable": true,
"allowSymbolExpressionsInObject": true,
"bindable": true,
"defaultBindingMode": "OneWay",
"defaultValue": null,
"defaultValueInternal": []
},
{
"name": "data-tchmi-cell-wrap",
"propertyName": "CellWrap",
"propertySetterName": "setCellWrap",
"propertyGetterName": "getCellWrap",
"displayName": "Cell Wrap",
"visible": true,
"themeable": "Advanced",
"displayPriority": 60,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines if the cells wraps if there is not enough space in the row.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": true
}
],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

View File

@@ -0,0 +1,780 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"CellOptions": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.CellOptions"
},
"ColumnOptions": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.ColumnOptions"
},
"MeasurementUnitOrFactor": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor"
},
"RowOptions": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.RowOptions"
},
"TcHmi.Controls.System.TcHmiGrid": {
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiGrid",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmi.Controls.System.TcHmiGrid.CellOptions": {
"title": "CellOptions",
"description": "Definition of cell options in the grid.",
"type": "array",
"items": {
"title": "Cell definition",
"description": "Definition of a cell.",
"type": "object",
"engineeringColumns": ["columnIndex", "rowIndex"],
"propertiesMeta": [
{
"name": "columnIndex",
"category": "Layout",
"displayName": "Column Index",
"displayPriority": 10,
"description": "Column index of the defined cell.",
"defaultValueInternal": null
},
{
"name": "rowIndex",
"category": "Layout",
"displayName": "Row Index",
"displayPriority": 10,
"description": "Row index of the defined cell.",
"defaultValueInternal": null
},
{
"name": "padding",
"category": "Layout",
"displayPriority": 60,
"displayName": "Padding",
"description": "Inner padding of the cell. \nNote: Percentages always refer to the width of the cell, never its height (even for top and bottom).",
"defaultValueInternal": null
},
{
"name": "backgroundColor",
"category": "Colors",
"displayPriority": 10,
"displayName": "Background Color",
"description": "Definition of the background color which is used if no or a transparent Background image is set.",
"defaultValueInternal": null
},
{
"name": "borderColor",
"category": "Colors",
"displayPriority": 10,
"displayName": "Border Color",
"description": "Definition of the border color.",
"defaultValueInternal": null
},
{
"name": "borderWidth",
"category": "Border",
"displayPriority": 10,
"displayName": "Border Width",
"description": "Definition of the border width.",
"defaultValueInternal": null
},
{
"name": "borderStyle",
"category": "Border",
"displayPriority": 10,
"displayName": "Border Style",
"description": "Definition of the border style.",
"defaultValueInternal": null
},
{
"name": "backgroundImage",
"category": "Background Image",
"displayPriority": 10,
"displayName": "Background Image",
"description": "Definition of the background image.",
"defaultValueInternal": null
},
{
"name": "backgroundImageWidth",
"category": "Background Image",
"displayPriority": 20,
"displayName": "Background Image Width",
"description": "Width of the background image.",
"defaultValueInternal": null
},
{
"name": "backgroundImageWidthUnit",
"refTo": "backgroundImageWidth",
"category": "Background Image",
"displayPriority": 20,
"displayName": "Background Image Width Unit",
"description": "Width Unit of the background image.",
"defaultValue": null,
"defaultValueInternal": "px"
},
{
"name": "backgroundImageHeight",
"category": "Background Image",
"displayPriority": 20,
"displayName": "Background Image Height",
"description": "Height of the background image.",
"defaultValueInternal": null
},
{
"name": "backgroundImageHeightUnit",
"refTo": "backgroundImageHeight",
"category": "Background Image",
"displayPriority": 20,
"displayName": "Background Image Height Unit",
"description": "Height Unit of the background image.",
"defaultValue": null,
"defaultValueInternal": "px"
},
{
"name": "backgroundImageHorizontalAlignment",
"category": "Background Image",
"displayPriority": 30,
"displayName": "Background Image Horizontal Alignment",
"description": "Horizontal Aligment of the background image.",
"defaultValue": null,
"defaultValueInternal": "Center"
},
{
"name": "backgroundImageVerticalAlignment",
"category": "Background Image",
"displayPriority": 30,
"displayName": "Background Image Vertical Alignment",
"description": "Vertical Aligment of the background image.",
"defaultValue": null,
"defaultValueInternal": "Center"
},
{
"name": "backgroundImagePadding",
"category": "Background Image",
"displayPriority": 60,
"displayName": "Background Image Padding",
"description": "Padding of the background image.",
"defaultValueInternal": null
}
],
"properties": {
"columnIndex": {
"type": "integer",
"minimum": 0,
"title": "ColumnIndex",
"description": "Column index of the defined cell.",
"default": null,
"category": "Layout",
"displayPriority": 10
},
"rowIndex": {
"type": "integer",
"minimum": 0,
"title": "RowIndex",
"description": "Row index of the defined cell.",
"default": null,
"category": "Layout",
"displayPriority": 10
},
"padding": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/Padding"
},
{
"title": "Padding",
"description": "Inner padding of the cell. \nNote: Percentages always refer to the width of the cell, never its height (even for top and bottom).",
"default": null,
"category": "Layout",
"displayPriority": 60
}
]
},
"backgroundColor": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/SolidColor"
},
{
"title": "BackgroundColor",
"description": "Definition of the background color which is used if no or a transparent Background image is set.",
"default": null,
"category": "Colors",
"displayPriority": 10
}
]
},
"borderColor": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/SolidColor"
},
{
"title": "BorderColor",
"description": "Definition of the border color.",
"default": null,
"category": "Colors",
"displayPriority": 10
}
]
},
"borderWidth": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/BorderWidth"
},
{
"title": "BorderWidth",
"description": "Definition of the border width.",
"default": null,
"category": "Border",
"displayPriority": 10
}
]
},
"borderStyle": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/BorderStyle"
},
{
"title": "BorderStyle",
"description": "Definition of the border style.",
"default": null,
"category": "Border",
"displayPriority": 10
}
]
},
"backgroundImage": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/Path"
},
{
"title": "BackgroundImage",
"description": "Definition of the background image.",
"default": null,
"category": "Background Image",
"displayPriority": 10
}
]
},
"backgroundImageWidth": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "BackgroundImageWidth",
"description": "Width of the background image.",
"default": null,
"category": "Background Image",
"displayPriority": 20
}
]
},
"backgroundImageWidthUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementUnit"
},
{
"title": "BackgroundImageWidthUnit",
"description": "Width Unit of the background image.",
"default": "px",
"refTo": "backgroundImageWidth",
"category": "Background Image",
"displayPriority": 20
}
]
},
"backgroundImageHeight": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "BackgroundImageHeight",
"description": "Height of the background image.",
"default": null,
"category": "Background Image",
"displayPriority": 20
}
]
},
"backgroundImageHeightUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementUnit"
},
{
"title": "BackgroundImageHeightUnit",
"description": "Height Unit of the background image.",
"default": "px",
"refTo": "backgroundImageHeight",
"category": "Background Image",
"displayPriority": 20
}
]
},
"backgroundImageHorizontalAlignment": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/HorizontalAlignment"
},
{
"title": "BackgroundImageHorizontalAligment",
"description": "Horizontal Aligment of the background image.",
"default": "Center",
"category": "Background Image",
"displayPriority": 30
}
]
},
"backgroundImageVerticalAlignment": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/VerticalAlignment"
},
{
"title": "BackgroundImageVerticalAligment",
"description": "Vertical Aligment of the background image.",
"default": "Center",
"category": "Background Image",
"displayPriority": 30
}
]
},
"backgroundImagePadding": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/Padding"
},
{
"title": "BackgroundImagePadding",
"description": "Padding of the background image.",
"default": null,
"category": "Background Image",
"displayPriority": 60
}
]
}
},
"additionalProperties": false
}
},
"TcHmi.Controls.System.TcHmiGrid.ColumnOptions": {
"title": "ColumnOptions",
"type": "array",
"items": {
"type": "object",
"title": "Column definition",
"description": "Defines one column.",
"engineeringColumns": ["width", "widthUnit", "widthMode"],
"propertiesMeta": [
{
"name": "width",
"category": "Layout",
"displayName": "Width",
"displayPriority": 10,
"description": "Defines width of the column in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
"defaultValue": 1,
"defaultValueInternal": 1
},
{
"name": "widthUnit",
"refTo": "width",
"category": "Layout",
"displayName": "Width Unit",
"displayPriority": 10,
"description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
"defaultValue": "factor",
"defaultValueInternal": "factor"
},
{
"name": "widthMode",
"category": "Layout",
"displayName": "Width Mode",
"displayPriority": 30,
"description": "Defines if the width is taken from the width value or calculated from child controls in this Column.",
"defaultValue": "Value",
"defaultValueInternal": "Value"
},
{
"name": "maxWidth",
"category": "Layout",
"displayName": "Max Width",
"displayPriority": 60,
"description": "Defines maximal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
"defaultValueInternal": null
},
{
"name": "maxWidthUnit",
"refTo": "maxWidth",
"category": "Layout",
"displayName": "Max Width Unit",
"displayPriority": 60,
"description": "Max Width Unit of the column.",
"defaultValueInternal": "px"
},
{
"name": "minWidth",
"category": "Layout",
"displayName": "Min Width",
"displayPriority": 61,
"description": "Defines minimal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
"defaultValueInternal": null
},
{
"name": "minWidthUnit",
"refTo": "minWidth",
"category": "Layout",
"displayName": "Min Width Unit",
"displayPriority": 61,
"description": "Min Width Unit of the column.",
"defaultValueInternal": "px"
},
{
"name": "overflow",
"category": "Layout",
"displayName": "Overflow",
"displayPriority": 65,
"description": "Defines if a control should be fully visible if it is outside of this column.",
"defaultValue": null,
"defaultValueInternal": false
}
],
"properties": {
"width": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "Width",
"description": "Defines width of the column in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
"default": 1,
"category": "Layout",
"displayPriority": 10
}
]
},
"widthUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor"
},
{
"title": "WidthUnit",
"description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
"default": "factor",
"refTo": "width",
"category": "Layout",
"displayPriority": 10
}
]
},
"widthMode": {
"allOf": [
{
"type": "string",
"enum": ["Value", "Content"]
},
{
"title": "WidthMode",
"description": "Defines if the width is taken from the width value or calculated from child controls in this Column.",
"default": "Value",
"category": "Layout",
"displayPriority": 30
}
]
},
"maxWidth": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "MaxWidth",
"description": "Defines maximal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
"default": null,
"displayPriority": 60,
"category": "Layout"
}
]
},
"maxWidthUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementUnit"
},
{
"title": "MaxWidthUnit",
"description": "Max Width Unit of the column.",
"default": "px",
"category": "Layout",
"displayPriority": 60,
"refTo": "maxWidth"
}
]
},
"minWidth": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "MinWidth",
"description": "Defines minimal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
"default": null,
"category": "Layout",
"displayPriority": 61
}
]
},
"minWidthUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementUnit"
},
{
"title": "MinWidthUnit",
"description": "Min Width Unit of the column.",
"default": "px",
"refTo": "minWidth",
"category": "Layout",
"displayPriority": 61
}
]
},
"overflow": {
"allOf": [
{
"$ref": "tchmi:general#/definitions/Boolean"
},
{
"title": "Overflow",
"description": "Defines if a control should be fully visible if it is outside of this column.",
"default": false,
"category": "Layout",
"displayPriority": 65
}
]
}
},
"additionalProperties": false
}
},
"TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor": {
"description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
"type": "string",
"enum": ["factor", "px", "%"],
"default": "factor"
},
"TcHmi.Controls.System.TcHmiGrid.RowOptions": {
"title": "RowOptions",
"type": "array",
"items": {
"type": "object",
"title": "Row definition",
"description": "Defines one row.",
"engineeringColumns": ["height", "heightUnit", "heightMode"],
"propertiesMeta": [
{
"name": "height",
"category": "Layout",
"displayName": "Height",
"displayPriority": 10,
"description": "Defines height of the cells of this row in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
"defaultValue": 1,
"defaultValueInternal": 1
},
{
"name": "heightUnit",
"refTo": "height",
"category": "Layout",
"displayName": "Height Unit",
"displayPriority": 10,
"description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
"defaultValue": "factor",
"defaultValueInternal": "factor"
},
{
"name": "heightMode",
"category": "Layout",
"displayName": "Height Mode",
"displayPriority": 30,
"description": "Defines if the height is taken from the height value or calculated from child controls in row.",
"defaultValue": "Value",
"defaultValueInternal": "Value"
},
{
"name": "maxHeight",
"category": "Layout",
"displayName": "Max Height",
"displayPriority": 60,
"description": "Defines maximal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
"defaultValueInternal": null
},
{
"name": "maxHeightUnit",
"refTo": "maxHeight",
"category": "Layout",
"displayName": "Max Height Unit",
"displayPriority": 60,
"description": "Max Height Unit of the row.",
"defaultValueInternal": "px"
},
{
"name": "minHeight",
"category": "Layout",
"displayName": "Min Height",
"displayPriority": 61,
"description": "Defines minimal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
"defaultValueInternal": null
},
{
"name": "minHeightUnit",
"refTo": "minHeight",
"category": "Layout",
"displayName": "Min Height Unit",
"displayPriority": 61,
"description": "Min Height Unit of the row.",
"defaultValueInternal": "px"
},
{
"name": "overflow",
"category": "Layout",
"displayName": "Overflow",
"displayPriority": 65,
"description": "Defines if a control should be fully visible if it is outside of this row.",
"defaultValue": null,
"defaultValueInternal": false
}
],
"properties": {
"height": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "Height",
"description": "Defines height of the cells of this row in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
"default": 1,
"category": "Layout",
"displayPriority": 10
}
]
},
"heightUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor"
},
{
"title": "HeightUnit",
"description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
"default": "factor",
"refTo": "height",
"category": "Layout",
"displayPriority": 10
}
]
},
"heightMode": {
"allOf": [
{
"type": "string",
"enum": ["Value", "Content"]
},
{
"title": "HeightMode",
"description": "Defines if the height is taken from the height value or calculated from child controls in row.",
"default": "Value",
"category": "Layout",
"displayPriority": 30
}
]
},
"maxHeight": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "MaxHeight",
"description": "Defines maximal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
"default": null,
"refTo": "maxHeight",
"category": "Layout",
"displayPriority": 60
}
]
},
"maxHeightUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementUnit"
},
{
"title": "MaxHeightUnit",
"description": "Max Height Unit of the row.",
"default": "px",
"category": "Layout",
"displayPriority": 60
}
]
},
"minHeight": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementValue"
},
{
"title": "MinHeight",
"description": "Defines minimal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
"default": null,
"category": "Layout",
"displayPriority": 61
}
]
},
"minHeightUnit": {
"allOf": [
{
"$ref": "tchmi:framework#/definitions/MeasurementUnit"
},
{
"title": "MinHeightUnit",
"description": "Min Height Unit of the row.",
"default": "px",
"refTo": "minHeight",
"category": "Layout",
"displayPriority": 61
}
]
},
"overflow": {
"allOf": [
{
"$ref": "tchmi:general#/definitions/Boolean"
},
{
"title": "Overflow",
"description": "Defines if a control should be fully visible if it is outside of this row.",
"default": false,
"category": "Layout",
"displayPriority": 65
}
]
}
},
"additionalProperties": false
}
},
"TcHmiGrid": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid"
}
}
}

View File

@@ -0,0 +1,51 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiGrid,
.tchmi-grid {
overflow: hidden; /* DO NOT CHANGE Would cut 100% sized child control shadows */
}
.TcHmi_Controls_System_TcHmiGrid-template,
.tchmi-grid-template {
position: relative;
width: 100%;
height: 100%;
}
.TcHmi_Controls_System_TcHmiGrid-grid,
.tchmi-grid-grid {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
/* some styles for debugging */
/*border:1px solid green;*/
}
.TcHmi_Controls_System_TcHmiGrid-gridrow,
.tchmi-grid-gridrow {
display: flex;
flex-direction: row;
/* some styles for debugging */
/*border:1px solid red;*/
}
.TcHmi_Controls_System_TcHmiGrid-gridcell,
.tchmi-grid-gridcell {
position: relative;
/* Browser default is 3 px! */
border-top-width: 0px;
border-left-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
/* some styles for debugging */
/*border: 1px solid black;*/
/*background-color: cyan;*/
}
.TcHmi_Controls_System_TcHmiGrid-cellpaddingmover,
.tchmi-grid-cellpaddingmover {
position: absolute;
width: 100%;
height: 100%;
}

View File

@@ -0,0 +1,357 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiGrid extends TcHmi.Controls.System.TcHmiContainerControl {
#private;
/**
* Constructor
* @param element
* @param attrs
* @param pcElement
* @param pcAttrs
*/
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/**
* Reference to the root dom element of the current control template as jquery object.
*/
private __elementTemplateRoot;
/** Main Gridcontainer of this tchmigrid */
private __elementGridcontainer;
/**
* Internal reference to the attribute 'data-tchmi-cell-wrap'
*/
protected __cellWrap: boolean | undefined;
/**
* Internal reference to the attribute 'data-tchmi-cell-options'
*/
protected __cellOptions: ICellOptions[] | undefined;
/**
* Internal reference to the attribute 'data-tchmi-row-options'
*/
protected __rowOptions: IRowOptions[] | undefined;
/**
* Internal reference to the attribute 'data-tchmi-column-options'
*/
protected __columnOptions: IColumnOptions[] | undefined;
/** Holds the pixel size the column uses, null if all relative. Cache has to be rebuild if variable is null */
protected __cacheWidthPerColumn: (null | number)[] | null;
/** Holds the pixel size the row uses, null if all relative. Cache has to be rebuild if variable is null */
protected __cacheHeightPerRow: (null | number)[] | null;
/** Is the current layout known? This does not imply a precise layout for responsive configurations */
protected __roughLayoutKnown: boolean;
/** In how many lines this row is wrapped? Cache has to be rebuild if variable is null */
private __cacheCellHeightPerRow;
private __onControlGridRowIndexChangedDestroyEvent;
private __onControlGridColumnIndexChangedDestroyEvent;
private __onControlsMovedDestroyEvent;
private __onControlsResizedDestroyEvent;
private __onThemeChangedDestroyEvent;
private __onControlPositionParameterChangedDestroyEvent;
private __onControlSizeParameterChangedDestroyEvent;
protected __asyncWorkData: IControlSpecificData;
/** True if a large control stretches a column dimension */
protected __controlStretchedWidth: boolean;
/** True if a large control stretches a row dimension */
protected __controlStretchedHeight: boolean;
/** True if we need to check wrapping on next attach */
protected __wrapCheckNeeded: boolean;
/** The grid border width shifts the child but is not often changed. */
protected __borderOffsets: {
left: number;
right: number;
top: number;
bottom: number;
};
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This will also add child's DOM element to the container DOM.
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
addChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null, pos?: number | null): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This will also add child's DOM element to the container DOM.
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
__addChild(control: TcHmi.Controls.System.baseTcHmiControl, pos?: number | null): void;
/**
* Remove a child control.
*/
removeChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null): void;
__removeChild(control: TcHmi.Controls.System.baseTcHmiControl): void;
/** Updates border width cache */
protected __updateBorderCache(): void;
protected __processBorderWidth(): void;
/**
* Moves a control to the correct Grid cell
*/
protected __onGridRowOrColumnIndexChanged(_event: TcHmi.EventProvider.Event, control: TcHmi.Controls.System.baseTcHmiControl): void;
/**
* Adjust Cell Dimension on Control resize or move
* @param move Is this a moved control? If not it was resized
*/
protected __onControlGeometryChanged(event: TcHmi.EventProvider.Event, controls: TcHmi.Controls.System.baseTcHmiControl[]): void;
protected __doAsyncWork(timestamp?: number): void;
/**
* Calls processHeight if needed
* @returns true if a change was detected
*/
private __rebuildCellHeightPerRowCache;
/**
* Returns the current cell wrap value.
* @returns The current cell wrap value.
*/
getCellWrap(): boolean | undefined;
/**
* Sets a new cell wrap
* @param valueNew
*/
setCellWrap(valueNew: boolean | null): void;
/**
*
*/
protected __processCellWrap(): void;
/**
* Returns if inner widths depends on child controls.
* @preserve (Part of the public API)
*/
innerWidthDependsOnChilds(): boolean;
/**
* Updates the inner dimension depending on child controls.
* @preserve (Part of the public API)
*/
updateInnerWidthDependingOnChilds(): void;
/**
* Updates caches...
*/
protected __processWidthMode(): void;
/**
* Returns if inner heights depends on child controls.
* @preserve (Part of the public API)
*/
innerHeightDependsOnChilds(): boolean;
/**
* Updates the inner dimension depending on child controls.
* @preserve (Part of the public API)
*/
updateInnerHeightDependingOnChilds(): void;
/**
* Updates caches...
*/
protected __processHeightMode(): void;
/**
* Adds new Rows if needed.
* If Rows are removed the affected controls are moved in the correct cell if needed.
*/
__recalculateRowCount(): void;
/**
* Checks each Row in the Grid and adds/removes cells if needed.
* After that all controls are moved in the correct cell if needed.
*/
__recalculateColumnCount(): void;
/**
* Returns the current row options value.
* @returns The current row options value.
*/
getRowOptions(): IRowOptions[] | undefined;
/**
* Sets new Row options
* @param valueNew
*/
setRowOptions(valueNew: IRowOptions[] | null): void;
/**
* The watch callback for the rowOptions object resolver.
*/
protected __onResolverForRowOptionsWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<IRowOptions[]>): void;
/**
* Processes row options
* height is set directly
* min/max value are set after comparing to the content dimension
*/
protected __processRowOptions(): void;
/**
* Returns the current column options value.
* @returns The current column options value.
*/
getColumnOptions(): IColumnOptions[] | undefined;
/**
* Sets new column options
* @param valueNew
*/
setColumnOptions(valueNew: IColumnOptions[] | null): void;
/**
* The watch callback for the columnOptions object resolver.
*/
protected __onResolverForColumnOptionsWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<IColumnOptions[]>): void;
/**
* Processes column options
* width is set directly
* min/max value are set after comparing to the content dimension
*/
protected __processColumnOptions(): void;
/**
* PaddingTop
*/
getCellOptions(): ICellOptions[] | undefined;
setCellOptions(valueNew: ICellOptions[] | null): void;
/**
* The watch callback for the cellOptions object resolver.
*/
protected __onResolverForCellOptionsWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<ICellOptions[]>): void;
protected __processCellOptions(): void;
/**
* Moves all Controls to the correct Grid Container.
*/
private __correctAllGridPositions;
/**
* Moves the Control to the correct Grid Container
* @param control
* @param pos
*/
private __correctGridPosition;
/**
* Append a number of Rows
* If the number is undefined or null one row is created
* @param num Number of Rows to create. If undefined or null one row is created
* @returns Array with all new Rows (last Element in Array is last one in DOM) or a empty Array
*/
private __appendRows;
/**
* Remove Rows from DOM and returns it as a JQuery Obj
* If the index is undefined the last row is deleted
* If the index is not valid a empty JQuery is returned.
* @param num Number of Rows to delete. If undefined or null one row is created
* @returns JQuery Object of the deleted Row or a empty JQuery Object
*/
private __removeRows;
/**
* Creates columns till the Grid is fulfilled
* @param targetRow
* @returns Object of the new Cell
*/
private __createColumns;
/**
* Creates a new Cell and appends it to the last DOM element in given JQuery Object
* @param targetRow
* @returns Element of the new Cell
*/
private __createCell;
/**
* Processes column / row options
* width/height is set directly
* min/max value are set after comparing to the content dimension
* @param direction
*/
private __processSequenceOptions;
/**
* Returns the calculated width in pixel if self defined (not percent based) or based on the children.
*/
__getContentWidth(): number | null;
/**
* Returns the calculated height in pixel if self defined (not percent based) or based on the children.
*/
__getContentHeight(): number | null;
/**
* Processes the current height and height unit.
*/
__processHeight(callerControl?: TcHmiControl): void;
private __processHeightAsync;
/**
* Processes the current width and width unit.
*/
__processWidth(callerControl?: TcHmiControl): void;
private __processWidthAsync;
}
export interface IControlSpecificData extends ITcHmiControlSpecificData {
'System.TcHmiGrid.triggerRebuildAll': boolean;
'System.TcHmiGrid.triggerRecheckHeight': boolean;
'System.TcHmiGrid.triggerProcessWidth': boolean;
'System.TcHmiGrid.triggerProcessHeight': boolean;
}
interface IColumnOptions {
width?: number | null;
widthUnit?: TcHmi.DimensionUnit | 'factor' | null;
widthMode?: 'Value' | 'Content' | null;
minWidth?: number | null;
minWidthUnit?: TcHmi.DimensionUnit | null;
maxWidth?: number | null;
maxWidthUnit?: TcHmi.DimensionUnit | null;
overflow?: boolean | null;
}
interface IRowOptions {
height?: number | null;
heightUnit?: TcHmi.DimensionUnit | 'factor' | null;
heightMode?: 'Value' | 'Content' | null;
minHeight?: number | null;
minHeightUnit?: TcHmi.DimensionUnit | null;
maxHeight?: number | null;
maxHeightUnit?: TcHmi.DimensionUnit | null;
overflow?: boolean | null;
}
interface ICellOptions {
rowIndex: number | null;
columnIndex: number | null;
borderWidth?: TcHmi.BorderWidth | null;
borderStyle?: TcHmi.BorderStyle | null;
borderColor?: TcHmi.SolidColor | null;
padding?: TcHmi.FourSidedCss | null;
backgroundColor?: TcHmi.Color | null;
backgroundImage?: string | null;
backgroundImagePadding?: TcHmi.FourSidedCss | null;
backgroundImageWidth?: number | null;
backgroundImageWidthUnit?: TcHmi.DimensionUnit | null;
backgroundImageHeight?: number | null;
backgroundImageHeightUnit?: TcHmi.DimensionUnit | null;
backgroundImageHorizontalAlignment?: TcHmi.HorizontalAlignment | null;
backgroundImageVerticalAlignment?: TcHmi.VerticalAlignment | null;
}
export type { IRowOptions as TcHmiGridIRowOptions, IColumnOptions as TcHmiGridIColumnOptions, ICellOptions as TcHmiGridICellOptions, };
export { TcHmiGrid as Control };
declare const _TcHmiGrid: typeof TcHmiGrid;
type tTcHmiGrid = TcHmiGrid;
type tIControlSpecificData = IControlSpecificData;
type tIColumnOptions = IColumnOptions;
type tIRowOptions = IRowOptions;
type tICellOptions = ICellOptions;
declare global {
namespace TcHmi.Controls.System {
const TcHmiGrid: typeof _TcHmiGrid;
type TcHmiGrid = tTcHmiGrid;
namespace TcHmiGrid {
type IControlSpecificData = tIControlSpecificData;
type IColumnOptions = tIColumnOptions;
type IRowOptions = tIRowOptions;
type ICellOptions = tICellOptions;
}
}
}

View File

@@ -0,0 +1 @@
<div class="TcHmi_Controls_System_TcHmiGrid-template tchmi-grid-template tchmi-box"></div>

View File

@@ -0,0 +1,82 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiHtmlHost",
"namespace": "TcHmi.Controls.System",
"displayName": "HTML Host",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": true,
"themeable": "Standard",
"base": "TcHmi.Controls.System.TcHmiControl",
"description": "A container for HTML content.\nEditable in HTML source of the view.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": false,
"geometry": {
"width": 300,
"height": 300
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiHtmlHost/TcHmiHtmlHost.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"functions": [
{
"name": "getContent",
"displayName": "getContent",
"description": "Returns the HTML content of this control.",
"type": "tchmi:general#/definitions/String",
"category": "Common",
"heritable": true,
"params": [],
"visible": true
},
{
"name": "setContent",
"displayName": "setContent",
"description": "Sets the HTML content of this control.",
"type": "tchmi:general#/definitions/String",
"category": "Common",
"heritable": true,
"params": [
{
"name": "newValue",
"displayName": "newValue",
"description": "The new HTML code",
"type": "tchmi:general#/definitions/String",
"visible": true
}
],
"visible": true
}
],
"attributes": [],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiHtmlHost": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiHtmlHost",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiHtmlHost": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiHtmlHost"
}
}
}

View File

@@ -0,0 +1,15 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiHtmlHost,
.tchmi-html-host {
/* Prevent overflow if the border radius is huge */
overflow: hidden;
}
.TcHmi_Controls_System_TcHmiHtmlHost-template,
.tchmi-html-host-template {
position: relative;
width: 100%;
height: 100%;
}

View File

@@ -0,0 +1,63 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiHtmlHost extends TcHmi.Controls.System.TcHmiControl {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/** */
protected __elementTemplateRoot: JQuery;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Set new HTML content to this control.
* The caller is responsible to handle/filter malicious content.
*/
setContent(value: string | null): void;
/**
*/
getContent(): string;
/**
* Returns the calculated width in pixel if self defined (not percent based).
* max-width overrides width, but min-width overrides max-width.
*/
__getContentWidth(): number | null;
/**
* Returns the calculated height in pixel if self defined (not percent based).
* max-height overrides height, but min-height overrides max-height.
*/
__getContentHeight(): number | null;
}
export { TcHmiHtmlHost as Control };
declare const _TcHmiHtmlHost: typeof TcHmiHtmlHost;
type tTcHmiHtmlHost = TcHmiHtmlHost;
declare global {
namespace TcHmi.Controls.System {
const TcHmiHtmlHost: typeof _TcHmiHtmlHost;
type TcHmiHtmlHost = tTcHmiHtmlHost;
}
}

View File

@@ -0,0 +1 @@
<div class="TcHmi_Controls_System_TcHmiHtmlHost-template tchmi-html-host-template tchmi-box"></div>

View File

@@ -0,0 +1,70 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiPartial",
"namespace": "TcHmi.Controls.System",
"displayName": "Partial",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": false,
"themeable": "Advanced",
"base": "TcHmi.Controls.System.TcHmiContainerControl",
"description": "A base class for reusable control container.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": true,
"geometry": {
"width": 500,
"height": 500
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiPartial/TcHmiPartial.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [],
"creator": {
"attributes": [
{
"name": "data-tchmi-creator-viewport-width",
"type": "tchmi:framework#/definitions/PositiveNumber",
"required": false,
"defaultValue": 800,
"defaultValueInternal": 800
},
{
"name": "data-tchmi-creator-viewport-height",
"type": "tchmi:framework#/definitions/PositiveNumber",
"required": false,
"defaultValue": 600,
"defaultValueInternal": 600
}
]
},
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiPartial": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiPartial",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiPartial": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiPartial"
}
}
}

View File

@@ -0,0 +1,15 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiPartial,
.tchmi-partial {
overflow: hidden; /* DO NOT CHANGE Would cut 100% sized child control shadows */
}
.TcHmi_Controls_System_TcHmiPartial-template,
.tchmi-partial-template {
position: relative;
width: 100%;
height: 100%;
overflow: hidden; /* DO NOT CHANGE Would cut 100% sized child control shadows */
}

View File

@@ -0,0 +1,63 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiPartial extends TcHmi.Controls.System.TcHmiContainerControl {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/** Member */
protected __elementTemplateRoot: JQuery;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This will also add child's DOM element to the container DOM.
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
addChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null, pos?: number | null): void;
/**
* Adds a child to this control and handles the hierarchical management layer.
* This will also add child's DOM element to the container DOM.
* @param control Class instance of the child.
* @param pos Optional index of the position for the new child.
*/
__addChild(control: TcHmi.Controls.System.baseTcHmiControl, pos?: number | null): void;
/**
*/
removeChild(control: TcHmi.Controls.System.baseTcHmiControl | undefined | null): void;
__removeChild(control: TcHmi.Controls.System.baseTcHmiControl): void;
}
export { TcHmiPartial as Control };
declare const _TcHmiPartial: typeof TcHmiPartial;
type tTcHmiPartial = TcHmiPartial;
declare global {
namespace TcHmi.Controls.System {
const TcHmiPartial: typeof _TcHmiPartial;
type TcHmiPartial = tTcHmiPartial;
}
}

View File

@@ -0,0 +1 @@
<div class="TcHmi_Controls_System_TcHmiPartial-template tchmi-partial-template tchmi-box"></div>

View File

@@ -0,0 +1,820 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiPopup",
"namespace": "TcHmi.Controls.System",
"displayName": "Popup",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": true,
"themeable": "Advanced",
"base": "TcHmi.Controls.System.TcHmiControl",
"description": "A generic popup control to embed a content or user control.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": false,
"geometry": {
"width": 500,
"height": 500
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiPopup/TcHmiPopup.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [
{
"name": "data-tchmi-target-file",
"propertyName": "TargetFile",
"propertySetterName": "setTargetFile",
"propertyGetterName": "getTargetFile",
"displayName": "Target File",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiPopup.TargetFile",
"category": "Common",
"description": "An object ({ path: string; attributes?: Dictionary<any>; }) with a file path and an attributes dictionary for the target file host control (when path points to a *.usercontrol file).",
"readOnly": false,
"bindable": true,
"themeable": "Advanced",
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-target-file-host-preload",
"propertyName": "TargetFileHostPreload",
"propertySetterName": "setTargetFileHostPreload",
"propertyGetterName": "getTargetFileHostPreload",
"displayName": "Target File Host Preload",
"visible": true,
"displayPriority": 12,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines whether the target file host is preloaded when the control is initialized or loaded when the popup is opened.",
"readOnly": false,
"bindable": true,
"themeable": "Advanced",
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": false
},
{
"name": "data-tchmi-target-file-host-keep-alive",
"propertyName": "TargetFileHostKeepAlive",
"propertySetterName": "setTargetFileHostKeepAlive",
"propertyGetterName": "getTargetFileHostKeepAlive",
"displayName": "Target File Host Keep Alive",
"visible": true,
"displayPriority": 13,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines whether the target file host is kept alive when the popup is closed. Has no effect when TargetFileHostPreload is set to true.",
"readOnly": false,
"bindable": true,
"themeable": "Advanced",
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": false
},
{
"name": "data-tchmi-header-text",
"propertyName": "HeaderText",
"propertySetterName": "setHeaderText",
"propertyGetterName": "getHeaderText",
"displayName": "Header Text",
"visible": true,
"displayPriority": 14,
"type": "tchmi:general#/definitions/String",
"category": "Common",
"description": "String that will be displayed as header text of the popup.",
"readOnly": false,
"themeable": "Standard",
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-buttons",
"propertyName": "Buttons",
"propertySetterName": "setButtons",
"propertyGetterName": "getButtons",
"displayName": "Buttons",
"visible": true,
"displayPriority": 15,
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiPopup.ButtonList",
"category": "Common",
"description": "Buttons that will be available in the popup footer.",
"readOnly": false,
"themeable": "Advanced",
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": []
},
{
"name": "data-tchmi-value-property",
"propertyName": "ValueProperty",
"propertySetterName": "setValueProperty",
"propertyGetterName": "getValueProperty",
"displayName": "Value Property",
"visible": true,
"displayPriority": 16,
"type": "tchmi:general#/definitions/String",
"category": "Common",
"description": "If the popup contains a user control, this attribute can be set to the name of a user control parameter to gain direct access to it via the Value attribute.",
"readOnly": false,
"themeable": "Advanced",
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-value",
"propertyName": "Value",
"propertySetterName": "setValue",
"propertyGetterName": "getValue",
"displayName": "Value",
"visible": true,
"displayPriority": 17,
"type": "tchmi:general#/definitions/Any",
"category": "Common",
"description": "If the popup contains a user control, this attribute will be a direct passthrough to the user control parameter configured in the ValueProperty attribute.",
"readOnly": false,
"themeable": "Advanced",
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-modal",
"propertyName": "Modal",
"propertySetterName": "setModal",
"propertyGetterName": "getModal",
"displayName": "Modal",
"visible": true,
"displayPriority": 18,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines if the popup overlay is modal. A modal popup darkens the background and is not moveable. A click on the darkened background closes the modal popup.",
"readOnly": false,
"themeable": "Standard",
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": false
},
{
"name": "data-tchmi-close-on-background",
"propertyName": "CloseOnBackground",
"propertySetterName": "setCloseOnBackground",
"propertyGetterName": "getCloseOnBackground",
"displayName": "Close On Background",
"visible": true,
"displayPriority": 19,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines if the popup is closed when the background overlay in modal mode is clicked.",
"readOnly": false,
"themeable": "Standard",
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": true
},
{
"name": "data-tchmi-movable",
"propertyName": "Movable",
"propertySetterName": "setMovable",
"propertyGetterName": "getMovable",
"displayName": "Movable",
"visible": true,
"displayPriority": 20,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines if the popup overlay is movable (when Modal is false).",
"readOnly": false,
"bindable": true,
"themeable": "Standard",
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": true
},
{
"name": "data-tchmi-restore-bounds",
"propertyName": "RestoreBounds",
"propertySetterName": "setRestoreBounds",
"propertyGetterName": "getRestoreBounds",
"displayName": "Restore Bounds",
"visible": true,
"displayPriority": 21,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Defines if the last bounds after moving the popup will be restored when opened the next time.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"themeable": "Advanced",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": true
},
{
"name": "data-tchmi-scrolling",
"propertyName": "Scrolling",
"propertySetterName": "setScrolling",
"propertyGetterName": "getScrolling",
"displayName": "Scrolling",
"visible": true,
"themeable": "Advanced",
"displayPriority": 22,
"type": "tchmi:framework#/definitions/ScrollMode",
"category": "Common",
"description": "Defines whether a content is scrollable. Possible values are No, Yes, Auto. Does not affect user controls.",
"defaultValue": null,
"defaultValueInternal": "No",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-popup-left",
"propertyName": "PopupLeft",
"propertyGetterName": "getPopupLeft",
"displayName": "Popup Left",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/MeasurementValue",
"category": "Layout (rendered)",
"description": "Returns the pixel distance between the left margin edge of the popup and the left edge of the viewport/screen.\nThese numbers will probably have rounding errors!",
"readOnly": true,
"bindable": false,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-popup-top",
"propertyName": "PopupTop",
"propertyGetterName": "getPopupTop",
"displayName": "Popup Top",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/MeasurementValue",
"category": "Layout (rendered)",
"description": "Returns the pixel distance between the top margin edge of the popup and the top edge of the viewport/screen.\nThese numbers will probably have rounding errors!",
"readOnly": true,
"bindable": false,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-popup-width",
"propertyName": "PopupWidth",
"propertyGetterName": "getPopupWidth",
"displayName": "Popup Width",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/MeasurementValue",
"category": "Layout (rendered)",
"description": "Returns the outer pixel width of the popup.\nThese numbers will probably have rounding errors!",
"readOnly": true,
"bindable": false,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-popup-height",
"propertyName": "PopupHeight",
"propertyGetterName": "getPopupHeight",
"displayName": "Popup Height",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/MeasurementValue",
"category": "Layout (rendered)",
"description": "Returns the outer pixel height of the popup.\nThese numbers will probably have rounding errors!",
"readOnly": true,
"bindable": false,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-is-open",
"propertyName": "IsOpen",
"propertyGetterName": "getIsOpen",
"displayName": "Is Open",
"visible": true,
"displayPriority": 21,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "Returns a boolean determining if the popup is open or not.",
"readOnly": true,
"heritable": true
},
{
"name": "data-tchmi-background-color",
"propertyName": "BackgroundColor",
"propertySetterName": "setBackgroundColor",
"propertyGetterName": "getBackgroundColor",
"displayName": "Background Color",
"visible": false,
"themeable": "Standard",
"displayPriority": 30,
"type": "tchmi:framework#/definitions/Color",
"category": "Colors",
"description": "Definition of the background color which is used if no or a transparent Background image is set.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-tooltip",
"propertyName": "Tooltip",
"propertySetterName": "setTooltip",
"propertyGetterName": "getTooltip",
"displayName": "Tooltip",
"visible": false,
"themeable": "Standard",
"displayPriority": 90,
"type": "tchmi:general#/definitions/String",
"category": "Common",
"description": "Specifies a tooltip for this control.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-border-color",
"propertyName": "BorderColor",
"propertySetterName": "setBorderColor",
"propertyGetterName": "getBorderColor",
"displayName": "Border Color",
"visible": false,
"themeable": "Standard",
"displayPriority": 30,
"type": "tchmi:framework#/definitions/Color",
"category": "Colors",
"description": "Color of the border.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-opacity",
"propertyName": "Opacity",
"propertySetterName": "setOpacity",
"propertyGetterName": "getOpacity",
"displayName": "Opacity",
"visible": false,
"themeable": "Standard",
"displayPriority": 60,
"type": "tchmi:framework#/definitions/Fraction",
"category": "Layout",
"description": "A number between 0 (not visible) and 1 (full visible). \nIf you do not need mouse/touch interaction and want to have maximum performance consider using attribute Visibility='Collapsed'.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": 1
},
{
"name": "data-tchmi-visibility",
"propertyName": "Visibility",
"propertySetterName": "setVisibility",
"propertyGetterName": "getVisibility",
"displayName": "Visibility",
"visible": false,
"themeable": "Standard",
"displayPriority": 60,
"type": "tchmi:framework#/definitions/Visibility",
"category": "Layout",
"description": "The visibility property can be used to hide (still receives pointer events) or collapse (does not use space or receive pointer events) an element and its childrens. Hidden still uses space in fluid calculations, collapsed is ignored there.\nCollapsed controls are skipped in layouting so it is much faster then opacity=0",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Visible"
},
{
"name": "data-tchmi-transform",
"propertyName": "Transform",
"propertySetterName": "setTransform",
"propertyGetterName": "getTransform",
"displayName": "Transform",
"visible": false,
"themeable": "Standard",
"displayPriority": 70,
"type": "tchmi:framework#/definitions/TransformList",
"category": "Layout",
"description": "A way to scale, rotate, translate and/or skew a control.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-width-mode",
"propertyName": "WidthMode",
"propertySetterName": "setWidthMode",
"propertyGetterName": "getWidthMode",
"displayName": "Width Mode",
"visible": false,
"themeable": "Advanced",
"displayPriority": 60,
"type": "tchmi:framework#/definitions/SizeMode",
"category": "Layout",
"description": "Defines if the width is taken from the width value or calculated from left and right (parent).",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
},
{
"name": "data-tchmi-height-mode",
"propertyName": "HeightMode",
"propertySetterName": "setHeightMode",
"propertyGetterName": "getHeightMode",
"displayName": "Height Mode",
"visible": false,
"themeable": "Advanced",
"displayPriority": 60,
"type": "tchmi:framework#/definitions/SizeMode",
"category": "Layout",
"description": "Defines if the height is taken from the height value or calculated from top and bottom (parent).",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
},
{
"name": "data-tchmi-border-width",
"propertyName": "BorderWidth",
"propertySetterName": "setBorderWidth",
"propertyGetterName": "getBorderWidth",
"displayName": "Border Width",
"visible": false,
"themeable": "Standard",
"displayPriority": 10,
"type": "tchmi:framework#/definitions/BorderWidth",
"category": "Border",
"description": "Width of the border of the control.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-border-style",
"propertyName": "BorderStyle",
"propertySetterName": "setBorderStyle",
"propertyGetterName": "getBorderStyle",
"displayName": "Border Style",
"visible": false,
"themeable": "Standard",
"displayPriority": 10,
"type": "tchmi:framework#/definitions/BorderStyle",
"category": "Border",
"description": "Defines the style of the border. Valid values are 'Solid', 'Dashed', 'Dotted', 'None'.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-border-radius",
"propertyName": "BorderRadius",
"propertySetterName": "setBorderRadius",
"propertyGetterName": "getBorderRadius",
"displayName": "Border Radius",
"visible": false,
"themeable": "Standard",
"displayPriority": 60,
"type": "tchmi:framework#/definitions/BorderRadius",
"category": "Border",
"description": "Border radius for rounded corners.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-background-image",
"propertyName": "BackgroundImage",
"propertySetterName": "setBackgroundImage",
"propertyGetterName": "getBackgroundImage",
"displayName": "Background Image",
"visible": false,
"themeable": "Standard",
"displayPriority": 10,
"type": "tchmi:framework#/definitions/Path",
"category": "Background Image",
"description": "An image in the background which is rendered over a background color.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-background-image-width",
"propertyName": "BackgroundImageWidth",
"propertySetterName": "setBackgroundImageWidth",
"propertyGetterName": "getBackgroundImageWidth",
"displayName": "Background Image Width",
"visible": false,
"themeable": "Standard",
"displayPriority": 20,
"type": "tchmi:framework#/definitions/MeasurementValue",
"category": "Background Image",
"description": "Width of the background image.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-background-image-width-unit",
"propertyName": "BackgroundImageWidthUnit",
"propertySetterName": "setBackgroundImageWidthUnit",
"propertyGetterName": "getBackgroundImageWidthUnit",
"refTo": "BackgroundImageWidth",
"displayName": "Background Image Width Unit",
"visible": false,
"themeable": "Advanced",
"displayPriority": 20,
"type": "tchmi:framework#/definitions/MeasurementUnit",
"category": "Background Image",
"description": "Could be 'px' or for relative positioning '%'.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "px"
},
{
"name": "data-tchmi-background-image-height",
"propertyName": "BackgroundImageHeight",
"propertySetterName": "setBackgroundImageHeight",
"propertyGetterName": "getBackgroundImageHeight",
"displayName": "Background Image Height",
"visible": false,
"themeable": "Standard",
"displayPriority": 20,
"type": "tchmi:framework#/definitions/MeasurementValue",
"category": "Background Image",
"description": "Height of the background image.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-background-image-height-unit",
"propertyName": "BackgroundImageHeightUnit",
"propertySetterName": "setBackgroundImageHeightUnit",
"propertyGetterName": "getBackgroundImageHeightUnit",
"refTo": "BackgroundImageHeight",
"displayName": "Background Image Height Unit",
"visible": false,
"themeable": "Advanced",
"displayPriority": 20,
"type": "tchmi:framework#/definitions/MeasurementUnit",
"category": "Background Image",
"description": "Could be 'px' or for relative positioning '%'.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "px"
},
{
"name": "data-tchmi-background-image-horizontal-alignment",
"propertyName": "BackgroundImageHorizontalAlignment",
"propertySetterName": "setBackgroundImageHorizontalAlignment",
"propertyGetterName": "getBackgroundImageHorizontalAlignment",
"displayName": "Background Image Horizontal Alignment",
"visible": false,
"themeable": "Advanced",
"displayPriority": 30,
"type": "tchmi:framework#/definitions/HorizontalAlignment",
"category": "Background Image",
"description": "Position of the background image.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Center"
},
{
"name": "data-tchmi-background-image-vertical-alignment",
"propertyName": "BackgroundImageVerticalAlignment",
"propertySetterName": "setBackgroundImageVerticalAlignment",
"propertyGetterName": "getBackgroundImageVerticalAlignment",
"displayName": "Background Image Vertical Alignment",
"visible": false,
"themeable": "Advanced",
"displayPriority": 30,
"type": "tchmi:framework#/definitions/VerticalAlignment",
"category": "Background Image",
"description": "Position of the background image.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Center"
},
{
"name": "data-tchmi-background-image-padding",
"propertyName": "BackgroundImagePadding",
"propertySetterName": "setBackgroundImagePadding",
"propertyGetterName": "getBackgroundImagePadding",
"displayName": "Background Image Padding",
"visible": false,
"themeable": "Advanced",
"displayPriority": 60,
"type": "tchmi:framework#/definitions/Padding",
"category": "Background Image",
"description": "Padding of the background image.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "data-tchmi-box-shadow",
"propertyName": "BoxShadow",
"propertySetterName": "setBoxShadow",
"propertyGetterName": "getBoxShadow",
"displayName": "Box Shadow",
"visible": false,
"themeable": "Standard",
"displayPriority": 200,
"type": "tchmi:framework#/definitions/BoxShadowList",
"category": "Layout",
"description": "Defines the box shadows.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"allowSymbolExpressionsInObject": true,
"defaultValue": null,
"defaultValueInternal": null
}
],
"events": [
{
"name": ".onOpened",
"displayName": ".onOpened",
"category": "Control",
"description": "The onOpened event is raised after the popup is opened.",
"visible": true,
"displayPriority": 10,
"heritable": true,
"arguments": []
},
{
"name": ".onClosed",
"displayName": ".onClosed",
"category": "Control",
"description": "The onClosed event is raised after the popup is closed.",
"visible": true,
"displayPriority": 10,
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/TcHmiPopupResultEventObject",
"description": "The event object containing information about the result."
}
]
},
{
"name": ".onButtonPressed",
"displayName": ".onButtonPressed",
"category": "Control",
"description": "The onButtonPressed event is raised when one of the buttons in the footer is pressed.",
"visible": true,
"displayPriority": 10,
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/TcHmiPopupButtonPressedEventObject",
"description": "The event object containing information about the pressed button."
}
]
}
],
"functions": [
{
"name": "open",
"displayName": "open",
"visible": true,
"description": "Opens the Popup.",
"category": "Common",
"params": [],
"type": null,
"heritable": true
},
{
"name": "close",
"displayName": "close",
"visible": true,
"description": "Closes the Popup.",
"category": "Common",
"params": [],
"type": null,
"heritable": true
},
{
"name": "resetBounds",
"displayName": "resetBounds",
"visible": true,
"description": "Resets the size and position of the Popup and clears that data from localStorage.",
"category": "Common",
"params": [],
"type": null,
"heritable": true
}
],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

View File

@@ -0,0 +1,266 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiPopup": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiPopup",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiPopup": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiPopup"
},
"TcHmi.Controls.System.TcHmiPopup.TargetFile": {
"type": "object",
"properties": {
"path": {
"anyOf": [
{
"$ref": "tchmi:framework#/definitions/UserControlPath"
},
{
"$ref": "tchmi:framework#/definitions/ContentPath"
}
]
},
"attributes": {
"description": "A dictionary for the attributes with the html attribute names as keys.",
"type": "object",
"additionalProperties": {
"type": ["object", "array", "string", "boolean", "integer", "number"]
}
}
},
"additionalProperties": false,
"required": ["path"]
},
"TcHmi.Controls.System.TcHmiPopup.ButtonList": {
"title": "ButtonList",
"type": "array",
"items": {
"title": "Button",
"type": "object",
"propertiesMeta": [
{
"name": "name",
"displayName": "Name",
"category": "General",
"displayPriority": 10,
"description": "The name of the button. Used to identify it in events and for styling.",
"defaultValue": "",
"defaultValueInternal": null
},
{
"name": "value",
"displayName": "Value",
"category": "General",
"displayPriority": 10,
"description": "The value of the button. Used as an event parameter.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "width",
"displayName": "Width",
"category": "General",
"displayPriority": 10,
"description": "The width of the button in pixels.",
"defaultValue": 60,
"defaultValueInternal": null
},
{
"name": "height",
"displayName": "Height",
"category": "General",
"displayPriority": 10,
"description": "The height of the button in pixels.",
"defaultValue": 30,
"defaultValueInternal": null
},
{
"name": "widthMode",
"displayName": "Width Mode",
"category": "General",
"displayPriority": 10,
"description": "The width mode of the button. If set to 'Content', the button will adjust itself to the length its text, ignoring the width value.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "heightMode",
"displayName": "Height Mode",
"category": "General",
"displayPriority": 10,
"description": "The height mode of the button. If set to 'Content', the button will adjust itself to the height its text, ignoring the height value.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "minWidth",
"displayName": "Min Width",
"category": "General",
"displayPriority": 10,
"description": "The minimum width of the button in pixels.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "maxWidth",
"displayName": "Max Width",
"category": "General",
"displayPriority": 10,
"description": "The maximum width of the button in pixels.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "minHeight",
"displayName": "Min Height",
"category": "General",
"displayPriority": 10,
"description": "The minimum height of the button in pixels.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "maxHeight",
"displayName": "Max Height",
"category": "General",
"displayPriority": 10,
"description": "The maximum height of the button in pixels.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "textPadding",
"displayName": "Text Padding",
"category": "General",
"displayPriority": 10,
"description": "The size of the padding around the text.",
"defaultValue": null,
"defaultValueInternal": null
},
{
"name": "text",
"displayName": "Text",
"category": "General",
"displayPriority": 10,
"description": "A string to display on the button. Can be bound to a symbol.",
"defaultValue": "",
"defaultValueInternal": null
},
{
"name": "tooltip",
"displayName": "Tooltip",
"category": "General",
"displayPriority": 10,
"description": "An optional tooltip.",
"defaultValue": "",
"defaultValueInternal": null
},
{
"name": "keepPopupOpen",
"displayName": "Keep Popup Open",
"category": "General",
"displayPriority": 10,
"description": "Whether to close the popup when a button is pressed or keep it open. If not specified, this defaults to closing the popup.",
"defaultValue": false,
"defaultValueInternal": false
},
{
"name": "actions",
"displayName": "Actions",
"category": "General",
"displayPriority": 10,
"description": "Actions to perform when the button is pressed.",
"defaultValue": [],
"defaultValueInternal": null
}
],
"properties": {
"name": {
"type": "string"
},
"value": {
"allOf": [
{
"$ref": "tchmi:general#/definitions/Any"
},
{
"default": null
}
]
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"widthMode": {
"type": "string",
"enum": ["Value", "Content"]
},
"heightMode": {
"type": "string",
"enum": ["Value", "Content"]
},
"minWidth": {
"type": "number"
},
"maxWidth": {
"type": "number"
},
"minHeight": {
"type": "number"
},
"maxHeight": {
"type": "number"
},
"textPadding": {
"$ref": "tchmi:framework#/definitions/Padding"
},
"text": {
"type": "string"
},
"tooltip": {
"type": "string"
},
"keepPopupOpen": {
"type": "boolean",
"default": false
},
"actions": {
"$ref": "tchmi:framework#/definitions/Trigger/definitions/actionList"
}
},
"required": ["name", "text", "width", "height"],
"additionalProperties": false
}
},
"TcHmi.Controls.System.TcHmiPopup.ResultEventObject": {
"type": "object",
"properties": {
"result": {}
},
"additionalProperties": false
},
"TcHmiPopupResultEventObject": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiPopup.ResultEventObject"
},
"TcHmi.Controls.System.TcHmiPopup.ButtonPressedEventObject": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {}
},
"additionalProperties": false
},
"TcHmiPopupButtonPressedEventObject": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiPopup.ButtonPressedEventObject"
}
}
}

View File

@@ -0,0 +1,22 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiPopup,
.tchmi-popup {
overflow: auto;
pointer-events: none;
opacity: 0;
}
.TcHmi_Controls_System_TcHmiPopup-template,
.tchmi-popup-template {
position: relative;
width: 100%;
height: 100%;
}
/* Container have no own visual representation so the white overlay is not nice on non white backgrounds */
.TcHmi_Controls_System_TcHmiPopup.TcHmi_Controls_System_TcHmiControl-disabled::after,
.tchmi-popup.tchmi-control-disabled::after {
background-color: transparent;
}

View File

@@ -0,0 +1,299 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiPopup extends TcHmi.Controls.System.TcHmiControl {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
protected __elementTemplateRoot: HTMLElement | undefined;
protected __popup: TcHmi.UiProvider.PopupProvider.HtmlElementBox<any> | null;
protected __targetFile: TargetFile | null | undefined;
protected __targetFileAttributesPreserved: TcHmi.Dictionary<any> | null | undefined;
protected __headerText: string | null | undefined;
protected __buttons: Button[] | null | undefined;
protected __value: {
property: string | null | undefined;
description: TcHmiUserControlParameter["description"] | null;
destroyPropertyChanged: TcHmi.DestroyFunction | null;
value: any | undefined;
writeToUserControl: boolean;
hasBeenSet: boolean;
};
protected __restoreBounds: boolean | undefined;
protected __movable: boolean | undefined;
protected __modal: boolean | undefined;
protected __closeOnBackground: boolean | undefined;
protected __targetFileHostPreload: boolean | undefined;
protected __targetFileHostKeepAlive: boolean | undefined;
protected __scrolling: 'No' | 'Yes' | 'Auto' | undefined;
protected __fileHost: TcHmiRegion | TcHmiUserControlHost | null | undefined;
protected __popupSize: {
top: null | number;
left: null | number;
width: null | number;
height: null | number;
};
protected __resizeDestroyFnc: TcHmi.DestroyFunction | undefined;
protected __moveDestroyFnc: TcHmi.DestroyFunction | undefined;
protected __boundsChangedDestroy: TcHmi.DestroyFunction | undefined;
protected __buttonPressedDestroy: TcHmi.DestroyFunction | undefined;
/** Used to prevent firing the onPropertyChanged events for popup size during opening of the popup */
protected __openInProgress: boolean;
protected __ignoreNextPromptAnswer: boolean;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Builds the file host instance based on TargetFile and TargetFileHostAttributes.
*/
protected __buildFileHost(): void;
/**
* Sets the TargetFile value and calls the associated process function.
* @param valueNew The new value for the TargetFile attribute as string. Relative path value.
*/
setTargetFile(valueNew: TargetFile | null): void;
/**
* The watch callback for the targetFile object resolver.
*/
protected __onResolverForTargetFileWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<TargetFile>): void;
/**
* Returns the current TargetFile value.
* @returns The current value of the TargetFile member variable as string. Relative path value.
*/
getTargetFile(): TargetFile | null | undefined;
/**
* Processes the current target file.
* @param override
*/
protected __processTargetFile(): void;
/**
* Sets the HeaderText attribute value and calls the associated process function.
* @param valueNew The new value for the HeaderText attribute.
*/
setHeaderText(valueNew: string | null): void;
/**
* Returns the currents HeaderText attribute value.
*/
getHeaderText(): string | null | undefined;
/**
* Processes the current HeaderText attribute value.
*/
protected __processHeaderText(): void;
/**
* Sets the Buttons attribute value and calls the associated process function.
* @param valueNew The new value for the Buttons attribute.
*/
setButtons(valueNew: Button[] | null): void;
/**
* Returns the currents Buttons attribute value.
*/
getButtons(): Button[] | null | undefined;
/**
* Processes the current Buttons attribute value.
*/
protected __processButtons(): void;
/**
* Sets the ValueProperty attribute value and calls the associated process function.
* @param valueNew The new value for the ValueProperty attribute.
*/
setValueProperty(valueNew: string | null): void;
/**
* Returns the currents ValueProperty attribute value.
*/
getValueProperty(): string | null | undefined;
/**
* Processes the current ValueProperty attribute value.
*/
protected __processValueProperty(): void;
/**
* Sets the Value attribute value and calls the associated process function.
* @param valueNew The new value for the Value attribute.
*/
setValue(valueNew: any): void;
/**
* Internal setter for Value with additional writeToUserControl parameter.
* @param valueNew The new value.
* @param writeToUserControl Whether to write this value to the user control.
*/
protected __setValue(valueNew: any | undefined, writeToUserControl: boolean): void;
/**
* Returns the currents Value attribute value.
*/
getValue(): any | undefined;
/**
* Processes the current Value attribute value.
*/
protected __processValue(): void;
/**
* Reads the value from the user control, if possible. If not, returns undefined.
*/
protected __readValue(): any | undefined;
/**
* Sets the RestoreBounds attribute value and calls the associated process function.
* @param valueNew The new value for the RestoreBounds attribute.
*/
setRestoreBounds(valueNew: boolean | null): void;
/**
* Returns the currents RestoreBounds attribute value.
*/
getRestoreBounds(): boolean | undefined;
/**
* Processes the current RestoreBounds attribute value.
*/
protected __processRestoreBounds(): void;
/**
* Sets the Movable attribute value and calls the associated process function.
* @param valueNew The new value for the Movable attribute.
*/
setMovable(valueNew: boolean | null): void;
/**
* Returns the currents Movable attribute value.
*/
getMovable(): boolean | undefined;
/**
* Processes the current Movable attribute value.
*/
protected __processMovable(): void;
/**
* Sets the Modal attribute value and calls the associated process function.
* @param valueNew The new value for the Modal attribute.
*/
setModal(valueNew: boolean | null): void;
/**
* Returns the currents Modal attribute value.
*/
getModal(): boolean | undefined;
/**
* Processes the current Modal attribute value.
*/
protected __processModal(): void;
/**
* Sets the Modal attribute value and calls the associated process function.
* @param valueNew The new value for the Modal attribute.
*/
setCloseOnBackground(valueNew: boolean | null): void;
/**
* Returns the currents Modal attribute value.
*/
getCloseOnBackground(): boolean | undefined;
/**
* Processes the current Modal attribute value.
*/
protected __processCloseOnBackground(): void;
/**
* Sets the options for the popup.
*/
protected __setPopupOptions(): void;
/**
* Set the value for the attribute scrolling.
* @param valueNew
*/
setScrolling(valueNew: 'No' | 'Yes' | 'Auto' | null): void;
getScrolling(): "No" | "Yes" | "Auto" | undefined;
protected __processScrolling(): void;
/**
* Opens the Popup.
*/
open(suppressEvents?: boolean): void;
/**
* Closes the Popup.
*/
close(): void;
/**
* Resets the size and position of the Popup and clears that data from localStorage.
*/
resetBounds(): void;
getPopupLeft(): number | null;
getPopupTop(): number | null;
getPopupHeight(): number | null;
getPopupWidth(): number | null;
/**
* Sets the TargetFileHostPreload attribute value and calls the associated process function.
* @param valueNew The new value for the TargetFileHostPreload attribute.
*/
setTargetFileHostPreload(valueNew: boolean | null): void;
/**
* Returns the currents TargetFileHostPreload attribute value.
*/
getTargetFileHostPreload(): boolean | undefined;
/**
* Processes the current TargetFileHostPreload attribute value.
*/
protected __processTargetFileHostPreload(): void;
/**
* Sets the TargetFileHostKeepAlive attribute value and calls the associated process function.
* @param valueNew The new value for the TargetFileHostKeepAlive attribute.
*/
setTargetFileHostKeepAlive(valueNew: boolean | null): void;
/**
* Returns the currents TargetFileHostKeepAlive attribute value.
*/
getTargetFileHostKeepAlive(): boolean | undefined;
/**
* Returns a boolean determining if the popup is open or not.
*/
getIsOpen(): boolean;
}
export interface TargetFile {
/** Path to the content/usercontrol file to show. */
path: string;
/** A dictionary for the attributes with the html attribute names as keys. */
attributes?: TcHmi.Dictionary<any>;
}
export interface Button {
name: string;
value?: any;
width: number;
height: number;
widthMode?: 'Value' | 'Content';
heightMode?: 'Value' | 'Content';
minWidth?: number;
maxWidth?: number;
minHeight?: number;
maxHeight?: number;
textPadding?: TcHmi.FourSidedCss;
text: string;
tooltip?: string;
keepPopupOpen?: boolean;
actions?: TcHmi.Trigger.Action[];
}
export { TcHmiPopup as Control };
declare const _TcHmiPopup: typeof TcHmiPopup;
type tTcHmiPopup = TcHmiPopup;
type tTargetFile = TargetFile;
type tButton = Button;
declare global {
namespace TcHmi.Controls.System {
const TcHmiPopup: typeof _TcHmiPopup;
type TcHmiPopup = tTcHmiPopup;
namespace TcHmiPopup {
type TargetFile = tTargetFile;
type Button = tButton;
}
}
}

View File

@@ -0,0 +1 @@
<div class="TcHmi_Controls_System_TcHmiPopup-template tchmi-popup-template tchmi-box"></div>

View File

@@ -0,0 +1,198 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiRegion",
"namespace": "TcHmi.Controls.System",
"displayName": "Region",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": true,
"themeable": "Advanced",
"base": "TcHmi.Controls.System.TcHmiControl",
"description": "A container for content controls.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": false,
"geometry": {
"width": 500,
"height": 500
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiRegion/TcHmiRegion.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {
"Base": {
"resources": [
{
"name": "Themes/Base/Style.css",
"type": "Stylesheet"
}
]
},
"Base-Dark": {
"resources": [
{
"name": "Themes/Base-Dark/Style.css",
"type": "Stylesheet"
}
]
}
},
"attributes": [
{
"name": "data-tchmi-target-content",
"propertyName": "TargetContent",
"propertySetterName": "setTargetContent",
"propertyGetterName": "getTargetContent",
"displayName": "Target Content",
"visible": true,
"themeable": "Advanced",
"displayPriority": 10,
"type": "tchmi:framework#/definitions/ContentPath",
"category": "Common",
"description": "Path to the content file to show.",
"defaultValue": null,
"defaultValueInternal": null,
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-current-content",
"propertyName": "CurrentContent",
"propertyGetterName": "getCurrentContent",
"displayName": "Current Content",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiContent",
"category": "Common",
"description": "The currently loaded TcHmiContent control object.",
"readOnly": true,
"bindable": false,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-scale-mode",
"propertyName": "ScaleMode",
"propertySetterName": "setScaleMode",
"propertyGetterName": "getScaleMode",
"displayName": "Scale Mode",
"visible": true,
"themeable": "Standard",
"displayPriority": 60,
"type": "tchmi:framework#/definitions/ScaleMode",
"category": "Common",
"description": "Possible values are ScaleToFit, ScaleToFitWidth, ScaleToFitHeight, ScaleToFill, None.",
"defaultValue": null,
"defaultValueInternal": "None",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-scrolling",
"propertyName": "Scrolling",
"propertySetterName": "setScrolling",
"propertyGetterName": "getScrolling",
"displayName": "Scrolling",
"visible": true,
"themeable": "Advanced",
"displayPriority": 70,
"type": "tchmi:framework#/definitions/ScrollMode",
"category": "Common",
"description": "Possible values are No, Yes, Auto.",
"defaultValue": null,
"defaultValueInternal": "No",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-width-mode",
"propertyName": "WidthMode",
"propertySetterName": "setWidthMode",
"propertyGetterName": "getWidthMode",
"displayName": "Width Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the width is taken from the width value, calculated from left and right (parent) or calculated from content.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
},
{
"name": "data-tchmi-height-mode",
"propertyName": "HeightMode",
"propertySetterName": "setHeightMode",
"propertyGetterName": "getHeightMode",
"displayName": "Height Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the height is taken from the height value, calculated from top and bottom (parent) or calculated from content.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
}
],
"events": [
{
"name": ".onTargetContentReplaced",
"displayName": ".onTargetContentReplaced",
"category": "Control",
"description": "This event is fired when the targetContent has been replaced inside this region. \nThe content control is not attached at this time.",
"visible": true,
"displayPriority": 10,
"heritable": true,
"arguments": [
{
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiContent",
"description": "The new content control that has been set as targetContent."
}
]
}
],
"functions": [],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiRegion": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiRegion",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiRegion": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiRegion"
}
}
}

View File

@@ -0,0 +1,42 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiRegion,
.tchmi-region {
overflow: auto;
}
.TcHmi_Controls_System_TcHmiRegion-template,
.tchmi-region-template {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
/* container have no own visual representation so the white overlay is not nice on non white backgrounds */
.TcHmi_Controls_System_TcHmiRegion.TcHmi_Controls_System_TcHmiControl-disabled::after,
.tchmi-region.tchmi-control-disabled::after {
background-color: transparent;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner-container {
position: relative;
width: 100%;
height: 100%;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner {
display: inline-block;
width: 64px;
height: 64px;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
max-width: 100%;
max-height: 100%;
overflow: hidden;
}

View File

@@ -0,0 +1,190 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiRegion extends TcHmi.Controls.System.TcHmiControl {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/** Html template loaded from templateCache. */
protected __template: string | undefined;
/** Internal reference to the attribute "data-tchmi-target-content" */
protected __targetContent: string | null | undefined;
protected __targetContentMarkup: string | null | undefined;
/** Current Content Markup */
protected __targetMarkup: string | null;
/** Current Content Object */
protected __currentContent: TcHmiContent | null;
protected __widthMode: TcHmi.SizeModeWithContent | undefined;
protected __heightMode: TcHmi.SizeModeWithContent | undefined;
/** Internal reference to the attribute "data-tchmi-scale-mode" */
protected __scaleMode: TcHmi.ScaleModeString | undefined;
/** Internal reference to the attribute "data-tchmi-size-mode" */
protected __scrolling: 'No' | 'Yes' | 'Auto' | undefined;
protected __elementTemplateRoot: JQuery;
private __xhr;
private __destroyRequestCurrentPartialContents;
/** Timeout id for async compile new content */
protected __processTargetMarkupCompileTimeout: number;
/** Timeout id for async removing/restoring old content */
protected __processTargetMarkupCleanupOldTimeout: number;
protected readonly __processTargetMarkupLoadingSpinnerDiv: Element;
protected __processTargetMarkupOldContent: TcHmiContent | null;
/** if undefined we have no pending opacity restore */
protected __processTargetMarkupOldContentOldOpacity: string | undefined;
protected __asyncWorkData: IControlSpecificData;
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Sets __keepAlive
* @param value
*/
__setKeepAlive(value: boolean): void;
/**
* @param url
*/
private __tryContentRefresh;
protected __onContentCreated(_event: TcHmi.EventProvider.Event, data: {
url: string;
}): void;
protected __onContentRemoved(_event: TcHmi.EventProvider.Event, data: {
url: string;
}): void;
protected __onResized(_event: TcHmi.EventProvider.Event, ctrl: TcHmiControl): void;
protected __doAsyncWork(timestamp?: number): void;
/**
* Checks if partial does alredy exist in parent hierarchy of current region instance!
* @param partial
*/
protected __isRecursionSave(path: string): boolean;
/**
* Sets the value of the width mode attribute.
* @param valueNew The new width mode value..
*/
setWidthMode(valueNew: TcHmi.SizeModeWithContent | null): void;
/**
* Processes the current width and width unit.
*/
__processWidth(callerControl?: TcHmiControl): void;
/**
* Sets the value of the height mode attribute.
* @param valueNew The new height mode value..
*/
setHeightMode(valueNew: TcHmi.SizeModeWithContent | null): void;
/**
* Processes the current height and height unit.
*/
__processHeight(callerControl?: TcHmiControl): void;
__getContentWidth(): number | null;
__getContentHeight(): number | null;
/**
* Sets the content value and calls the associated process function (processContent).
* @param valueNew The new value for the content attribute as string. Relative path value.
*/
setTargetContent(valueNew: string | null): void;
/**
* Returns the current content value.
* @returns The current value of the content member variable as string. Relative path value.
*/
getTargetContent(): string | null | undefined;
/**
* Destroy and remove currently existing content...
*/
private __destroyAndRemoveTargetCtrl;
/**
* Reports Region measurement from detail information in an object.
* Try `performance.getEntriesByType('measure')` in devTools
*/
private __reportBenchmarkObject;
/**
* Processes the current content value.
* @param override
*/
protected __processTargetContent(override?: string | null): void;
/**
* Restore opacity of the old content.
* Important when this is keepAlive.
* @param benchmarkObj
*/
protected __cleanUpPostAttach(benchmarkObj?: BenchmarkObject): void;
protected __processTargetMarkup(controlId: string | undefined, benchmarkObj: BenchmarkObject): void;
/**
* Processes the current isEnabled attribute value and of its target.
*/
__processIsEnabled(): void;
/**
* Processes the current AccessConfig attribute value and of its target.
*/
__processAccessConfig(): void;
setScaleMode(valueNew: TcHmi.ScaleModeString | null): void;
getScaleMode(): TcHmi.ScaleModeString | undefined;
protected __rescaleId: number;
protected __processScaleMode(): void;
setScrolling(valueNew: 'No' | 'Yes' | 'Auto' | null): void;
getScrolling(): "No" | "Yes" | "Auto" | undefined;
protected __processScrolling(): void;
/**
* Return the currently loaded TcHmiContent control object.
*/
getCurrentContent(): TcHmiContent | null;
}
interface BenchmarkObject {
targetContent: string | null;
processStart: number;
htmlFetchStart: number;
htmlFetchEnd: number;
compileStart: number;
compileEnd: number;
addContentToDomStart: number;
addContentToDomEnd: number;
syncAttachStart: number;
syncAttachEnd: number;
asyncAttachStart: number;
asyncAttachEnd: number;
screenUpdated: number;
removeContentFromDomStart: number;
removeContentFromDomEnd: number;
}
export type { BenchmarkObject as TcHmiRegionBenchmarkObject };
export interface IControlSpecificData extends ITcHmiControlSpecificData {
'System.TcHmiRegion.resized': boolean;
}
export { TcHmiRegion as Control };
declare const _TcHmiRegion: typeof TcHmiRegion;
type tTcHmiRegion = TcHmiRegion;
type tIControlSpecificData = IControlSpecificData;
type tBenchmarkObject = BenchmarkObject;
declare global {
namespace TcHmi.Controls.System {
const TcHmiRegion: typeof _TcHmiRegion;
type TcHmiRegion = tTcHmiRegion;
namespace TcHmiRegion {
type IControlSpecificData = tIControlSpecificData;
type BenchmarkObject = tBenchmarkObject;
}
}
}

View File

@@ -0,0 +1 @@
<div class="TcHmi_Controls_System_TcHmiRegion-template tchmi-region-template tchmi-box"></div>

View File

@@ -0,0 +1,62 @@
/** TcHmiRegion styles for theme: Base-Dark */
/**
Loading Spinner
Usage: <div class="TcHmi_System_Controls_TcHmiRegion-loading-spinner-container"><div class="TcHmi_System_Controls_TcHmiRegion-loading-spinner"><div></div><div></div><div></div><div></div></div></div>
*/
@keyframes TcHmi_System_Controls_TcHmiRegion-loading-spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner-container {
position: relative;
width: 100%;
height: 100%;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner {
display: inline-block;
width: 64px;
height: 64px;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
max-width: 100%;
max-height: 100%;
overflow: hidden;
--TcHmi_System_Controls_TcHmiRegion-loading-spinner-color: var(--tchmi-foreground-color-1);
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div {
box-sizing: border-box;
display: block;
position: absolute;
width: 51px;
height: 51px;
margin: 6px;
border: 6px solid var(--TcHmi_System_Controls_TcHmiRegion-loading-spinner-color);
border-radius: 50%;
animation: TcHmi_System_Controls_TcHmiRegion-loading-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: var(--TcHmi_System_Controls_TcHmiRegion-loading-spinner-color) transparent transparent transparent;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div:nth-child(1) {
animation-delay: -0.45s;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div:nth-child(2) {
animation-delay: -0.3s;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div:nth-child(3) {
animation-delay: -0.15s;
}

View File

@@ -0,0 +1,44 @@
/** TcHmiRegion styles for theme: Base */
/**
Loading Spinner
Usage: <div class="TcHmi_System_Controls_TcHmiRegion-loading-spinner-container"><div class="TcHmi_System_Controls_TcHmiRegion-loading-spinner"><div></div><div></div><div></div><div></div></div></div>
*/
.TcHmi_System_Controls_TcHmiRegion-loading-spinner {
--TcHmi_System_Controls_TcHmiRegion-loading-spinner-color: var(--tchmi-foreground-color-1);
}
@keyframes TcHmi_System_Controls_TcHmiRegion-loading-spinner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div {
box-sizing: border-box;
display: block;
position: absolute;
width: 51px;
height: 51px;
margin: 6px;
border: 6px solid var(--TcHmi_System_Controls_TcHmiRegion-loading-spinner-color);
border-radius: 50%;
animation: TcHmi_System_Controls_TcHmiRegion-loading-spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: var(--TcHmi_System_Controls_TcHmiRegion-loading-spinner-color) transparent transparent transparent;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div:nth-child(1) {
animation-delay: -0.45s;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div:nth-child(2) {
animation-delay: -0.3s;
}
.TcHmi_System_Controls_TcHmiRegion-loading-spinner div:nth-child(3) {
animation-delay: -0.15s;
}

View File

@@ -0,0 +1,48 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiUserControl",
"namespace": "TcHmi.Controls.System",
"displayName": "User Control",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": false,
"themeable": "Advanced",
"base": "TcHmi.Controls.System.TcHmiPartial",
"description": "A reusable collection of Controls.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": true,
"geometry": {
"width": 100,
"height": 100
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"dependencyFiles": [
{
"name": "../../../dist/Controls/System/TcHmiUserControl/TcHmiUserControl.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [],
"functions": [],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiUserControl": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiUserControl",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiUserControl": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiUserControl"
}
}
}

View File

@@ -0,0 +1,23 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiUserControl extends TcHmi.Controls.System.TcHmiPartial {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
}
export { TcHmiUserControl as Control };
declare const _TcHmiUserControl: typeof TcHmiUserControl;
type tTcHmiUserControl = TcHmiUserControl;
declare global {
namespace TcHmi.Controls.System {
const TcHmiUserControl: typeof _TcHmiUserControl;
type TcHmiUserControl = tTcHmiUserControl;
}
}

View File

@@ -0,0 +1,148 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiUserControlHost",
"namespace": "TcHmi.Controls.System",
"displayName": "User Control Host",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": false,
"themeable": "Advanced",
"base": "TcHmi.Controls.System.TcHmiControl",
"description": "A container for UserControls.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": false,
"geometry": {
"width": 100,
"height": 100
},
"reservedPropertyNames": [
"Params",
"CurrentUserControl",
"TargetUserControl"
]
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"template": "Template.html",
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiUserControlHost/TcHmiUserControlHost.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"events": [],
"functions": [],
"attributes": [
{
"name": "data-tchmi-target-user-control",
"propertyName": "TargetUserControl",
"propertyGetterName": "getTargetUserControl",
"displayName": "Target User Control",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/UserControlPath",
"category": "Common",
"description": "Path to the UserControl file to show.",
"requiredOnCompile": true,
"readOnly": true,
"bindable": false,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-current-user-control",
"propertyName": "CurrentUserControl",
"propertyGetterName": "getCurrentUserControl",
"displayName": "Current User Control",
"visible": true,
"displayPriority": 10,
"type": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiUserControl",
"category": "Common",
"description": "The TcHmiUserControl control object.",
"readOnly": true,
"bindable": false,
"defaultBindingMode": "OneWay",
"heritable": true
},
{
"name": "data-tchmi-is-enabled",
"propertyName": "IsEnabled",
"propertySetterName": "setIsEnabled",
"propertyGetterName": "getIsEnabled",
"displayName": "Is Enabled",
"visible": true,
"themeable": "Advanced",
"displayPriority": 60,
"type": "tchmi:general#/definitions/Boolean",
"category": "Common",
"description": "If disabled this overwrites the state of all children in the user control.\nOnly enabled controls will react on events.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": true
},
{
"name": "data-tchmi-width-mode",
"propertyName": "WidthMode",
"propertySetterName": "setWidthMode",
"propertyGetterName": "getWidthMode",
"displayName": "Width Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the width is taken from the width value, calculated from left and right (parent) or calculated from user control.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
},
{
"name": "data-tchmi-height-mode",
"propertyName": "HeightMode",
"propertySetterName": "setHeightMode",
"propertyGetterName": "getHeightMode",
"displayName": "Height Mode",
"visible": true,
"themeable": "Advanced",
"displayPriority": 40,
"type": "tchmi:framework#/definitions/SizeModeWithContent",
"category": "Layout",
"description": "Defines if the height is taken from the height value, calculated from top and bottom (parent) or calculated from user control.",
"readOnly": false,
"bindable": true,
"defaultBindingMode": "OneWay",
"heritable": true,
"defaultValue": null,
"defaultValueInternal": "Value"
}
],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiUserControlHost": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiUserControlHost",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiUserControlHost": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiUserControlHost"
}
}
}

View File

@@ -0,0 +1,13 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiUserControlHost,
.tchmi-user-control-host {
overflow: hidden;
}
/* container have no own visual representation so the white overlay is not nice on non white backgrounds */
.TcHmi_Controls_System_TcHmiUserControlHost.TcHmi_Controls_System_TcHmiControl-disabled::after,
.tchmi-user-control-host.tchmi-control-disabled::after {
background-color: transparent;
}

View File

@@ -0,0 +1,167 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiUserControlHost extends TcHmi.Controls.System.TcHmiControl {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
protected __markup: string | null | undefined;
protected __config: UserControlConfig | null | undefined;
protected readonly __targetUserControlUrl: string;
protected readonly __targetUserControlUrlClean: string;
protected readonly __targetUserControlConfigUrl: string;
protected readonly __targetUserControlConfigUrlClean: string;
protected __targetUserControlControlObject: TcHmiUserControl | null;
/** Maps user control parameter values and descriptions to their html attribute name */
protected __params: Map<`data-tchmi-${string}`, TcHmiUserControlParameter>;
protected __partialDefaultVirtualRights: Map<string, TcHmi.Controls.ControlAccessDescription>;
protected __widthMode: TcHmi.SizeModeWithContent | undefined;
protected __heightMode: TcHmi.SizeModeWithContent | undefined;
protected __elementTemplateRoot: JQuery;
/** User control getter. */
[setter: `set${string}`]: undefined | ((valueNew: any, dirtyPaths?: string[]) => void);
/** User control setter. */
[getter: `get${string}`]: undefined | ((_unused?: any) => any);
/**
* If raised, the control object exists in control cache and constructor of each inheritation level was called.
* This function is only to be used by the System. Other function calls are not intended.
*/
__previnit(): void;
/**
* If raised, all attributes have been set to it's default or dom values.
* This function is only to be used by the System. Other function calls are not intended.
*/
__init(): void;
/**
* Is called by the system after the control instance gets part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__attach(): void;
/**
* Is called by the system after the control instance is no longer part of the current DOM.
* This function is only to be used by the System. Other function calls are not intended.
*/
__detach(): void;
/**
* Destroy the current control instance.
* Will be called automatically if system destroys control!
*/
destroy(): void;
/**
* Sets __keepAlive
* @param value
*/
__setKeepAlive(value: boolean): void;
/**
* Provides the child user control object.
* @returns
*/
getCurrentUserControl(): TcHmiUserControl | null;
/**
* @param _event
* @param data
*/
protected __onUserControlChanged(_event: TcHmi.EventProvider.Event, data: {
url: string;
content: string;
}): void;
/**
* @param _event
* @param data
*/
protected __onUserControlConfigChanged(_event: TcHmi.EventProvider.Event, data: {
url: string;
}): void;
/**
* @param _event
* @param data
*/
protected __onUserControlCreated(_event: TcHmi.EventProvider.Event, data: {
url: string;
}): void;
/**
* @param _event
* @param data
*/
protected __onUserControlRemoved(_event: TcHmi.EventProvider.Event, data: {
url: string;
}): void;
/**
* Returns the current value of attribute member "targetPartial".
*/
getTargetUserControl(): string;
/**
* Sets the value of the width mode attribute.
* @param valueNew The new width mode value..
*/
setWidthMode(valueNew: TcHmi.SizeModeWithContent | null): void;
/**
* Processes the current width and width unit.
*/
__processWidth(callerControl?: TcHmiControl): void;
/**
* Sets the value of the height mode attribute.
* @param valueNew The new height mode value..
*/
setHeightMode(valueNew: TcHmi.SizeModeWithContent | null): void;
/**
* Processes the current height and height unit.
*/
__processHeight(callerControl?: TcHmiControl): void;
/**
* Returns the calculated width in pixel if self defined (not percent based) or based on the usercontrol.
*/
__getContentWidth(): number | null;
/**
* Returns the calculated height in pixel if self defined (not percent based) or based on the usercontrol.
*/
__getContentHeight(): number | null;
/**
* Gets virtual access of a user control
* @param name name of the control right to fetch
*/
getDescriptionAccessByName(name: string): TcHmi.Controls.ControlAccessDescription | null;
/**
* Gets a map of parameters that are configured on the current user control.
*/
getParams(): Map<`data-tchmi-${string}`, TcHmiUserControlParameter>;
}
export interface TcHmiUserControlParameter {
description: ControlAttributeDescription;
value: any;
isReady: boolean;
}
export interface ControlAttributeDescription extends TcHmi.ControlAttributeDescription {
/** The name is generated via Engineering with the prefix */
name: `data-tchmi-${string}`;
/** The getter name is generated via Engineering with the prefix */
propertyGetterName: `get${string}`;
/** The setter name is generated via Engineering with the prefix */
propertySetterName: `set${string}`;
}
export { TcHmiUserControlHost as Control };
declare const _TcHmiUserControlHost: typeof TcHmiUserControlHost;
type tTcHmiUserControlHost = TcHmiUserControlHost;
type tControlAttributeDescription = ControlAttributeDescription;
type tTcHmiUserControlParameter = TcHmiUserControlParameter;
declare global {
namespace TcHmi.Controls.System {
const TcHmiUserControlHost: typeof _TcHmiUserControlHost;
type TcHmiUserControlHost = tTcHmiUserControlHost;
namespace TcHmiUserControlHost {
type TcHmiUserControlParameter = tTcHmiUserControlParameter;
type ControlAttributeDescription = tControlAttributeDescription;
}
}
}
/**
* Resolved User Control ids.
*/
export declare function resolveIdScopedMarkup(hostId: string, ucUrl: string, markup: string): IScopedMarkupResultObject;
export interface IScopedMarkupResultObject extends TcHmi.IResultObject {
markup?: string;
}

View File

@@ -0,0 +1 @@
<div class="TcHmi_Controls_System_TcHmiUserControlHost-template tchmi-user-control-host-template tchmi-box"></div>

View File

@@ -0,0 +1,72 @@
{
"$schema": "../../../Schema/ControlDescription.Schema.json",
"apiVersion": 1,
"name": "TcHmiView",
"namespace": "TcHmi.Controls.System",
"displayName": "View",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"visible": false,
"themeable": "Standard",
"base": "TcHmi.Controls.System.TcHmiPartial",
"description": "A top level control for a TcHmi visualization.",
"defaultDesignerEvent": "",
"properties": {
"containerControl": true,
"geometry": {
"width": 500,
"height": 500
}
},
"icons": [
{
"name": "Icons/16x16.png",
"width": 16,
"height": 16
}
],
"dependencyFiles": [
{
"name": "Style.css",
"type": "Stylesheet"
},
{
"name": "../../../dist/Controls/System/TcHmiView/TcHmiView.esm.js",
"type": "EsModule",
"description": "Contains all the main logic as ES module."
}
],
"themes": {},
"attributes": [],
"access": [
{
"name": "operate",
"displayName": "Operate",
"description": "Controls the ability to operate. This defaults to true.",
"visible": true,
"defaultValueInternal": true
},
{
"name": "observe",
"displayName": "Observe",
"description": "Controls the ability to observe. This defaults to true.",
"visible": true,
"defaultValueInternal": true
}
],
"functions": [],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
],
"languages": {
"en": "Lang/Language.en.json",
"de": "Lang/Language.de.json"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

View File

@@ -0,0 +1,10 @@
{
"$schema": "../../../../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
"locale": "de",
"localizedText": {
"Error_Dialog_Load_View_Insufficient_Access": "Keine Berechtigung zur Anzeige der View: '{0}'.",
"Error_Dialog_Load_View_Insufficient_Access_User_Details": "Keine Berechtigung zur Anzeige der View: '{0}' für Benutzer {1}.",
"Error_Dialog_Load_View_Insufficient_Access_User_Details_Title": "Gruppenzugehörigkeit: {0}\nAutorisiert von {1} in der Session:\n{2}",
"Error_Dialog_Load_View_Insufficient_Access_Logout": "Ausloggen"
}
}

View File

@@ -0,0 +1,10 @@
{
"$schema": "../../../../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
"locale": "en",
"localizedText": {
"Error_Dialog_Load_View_Insufficient_Access": "Access to view: '{0}' is not allowed.",
"Error_Dialog_Load_View_Insufficient_Access_User_Details": "Access to view: '{0}' is not allowed for user {1}.",
"Error_Dialog_Load_View_Insufficient_Access_User_Details_Title": "Group membership: {0}\nAuthorized by {1} in Session:\n{2}",
"Error_Dialog_Load_View_Insufficient_Access_Logout": "Logout"
}
}

View File

@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"TcHmi.Controls.System.TcHmiView": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
"frameworkControlType": "TcHmiView",
"frameworkControlNamespace": "TcHmi.Controls.System"
},
"TcHmiView": {
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiView"
}
}
}

View File

@@ -0,0 +1,7 @@
/** Styles for all themes */
/* Style for the main element */
.TcHmi_Controls_System_TcHmiView,
.tchmi-view {
overflow: auto; /* view is a special case as it clones the size of the browser */
}

View File

@@ -0,0 +1,22 @@
// Compatibility file for non-module typescript compiles without adjustments.
// Use the following line for modern code (needs adjustments to tsconfig.json#configOptions/paths)
// import { TcHmiControl } from "Beckhoff.TwinCAT.HMI.Framework/index.esm.js";
// ***************************************************************************
declare class TcHmiView extends TcHmi.Controls.System.TcHmiPartial {
#private;
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
/**
* Shows/hides the control depending of the current 'observe' right
*/
__processAccessConfig(): void;
}
export { TcHmiView as Control };
declare const _TcHmiView: typeof TcHmiView;
type tTcHmiView = TcHmiView;
declare global {
namespace TcHmi.Controls.System {
const TcHmiView: typeof _TcHmiView;
type TcHmiView = tTcHmiView;
}
}

View File

@@ -0,0 +1,95 @@
{
"$schema": "../TcHmiFramework/Schema/FrameworkDescription.Schema.json",
"version": {
"full": "14.3.360.0",
"major": 14,
"minor": 3,
"build": 360,
"revision": 0
},
"events": [
{
"name": "onInitialized",
"displayName": "onInitialized",
"category": "Framework",
"description": "This event is fired after the framework is initialized. \nNote that not all bound symbols may have finished their initial value resolving at this time when a symbol is working asynchronous for example."
},
{
"name": "onLocaleChanged",
"displayName": "onLocaleChanged",
"category": "Framework",
"description": "This event is fired after a (perhaps new) locale has been loaded."
},
{
"name": "onThemeDataChanged",
"displayName": "onThemeDataChanged",
"category": "Framework",
"description": "This event is fired after the theme json and all css files have been loaded at a theme change. \nIt is additionally fired when a new font-face file has been fetched or devicePixelRatio has changed."
},
{
"name": "onUserChanged",
"displayName": "onUserChanged",
"category": "Framework",
"description": "This event is fired, if a new user is logged in."
},
{
"name": "onUserDataChanged",
"displayName": "onUserDataChanged",
"category": "Framework",
"description": "This event is fired, if a new user is logged in or the user configuration (group membership, timezone...) of the logged in user has changed."
},
{
"name": "onUserInGroupChanged",
"displayName": "onUserInGroupChanged",
"category": "Framework",
"description": "This event is fired after a user is known to be in different usergroups or no authentication is required."
},
{
"name": "onConfigChanged",
"displayName": "onConfigChanged",
"category": "Framework",
"description": "This event is fired when the tchmiconfig.json has changed. This file can only change while engineering."
},
{
"name": "onSystemKeyboardOpened",
"displayName": "onSystemKeyboardOpened",
"category": "Framework",
"description": "This event is fired after the system keyboard is opened or another text element is focused."
},
{
"name": "onSystemKeyboardClosed",
"displayName": "onSystemKeyboardClosed",
"category": "Framework",
"description": "This event is fired after the system keyboard is closed."
},
{
"name": "onWebsocketOpened",
"displayName": "onWebsocketOpened",
"category": "Framework",
"description": "This is event is fired when the websocket is ready. Please use onServerReady instead."
},
{
"name": "onWebsocketClosed",
"displayName": "onWebsocketClosed",
"category": "Framework",
"description": "This is event is fired when the websocket was closed. Please use onServerNotReady instead."
},
{
"name": "onServerReady",
"displayName": "onServerReady",
"category": "Framework",
"description": "This is event is fired when framework and server handshakes are done."
},
{
"name": "onServerNotReady",
"displayName": "onServerReady",
"category": "Framework",
"description": "This is event is fired when the framework to server connection is no longer ready. Will only be raised when the connection was ready before."
}
],
"dataTypes": [
{
"schema": "Schema/Types.Schema.json"
}
]
}

View File

@@ -0,0 +1,72 @@
{
"$schema": "../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
"locale": "de",
"localizedText": {
"System_Service_Initialization_Failed": "System-Dienst Initialisierung ist fehlgeschlagen.",
"Control_Description_Response_Invalid": "Laden der Beschreibungsdatei '{0}' ist fehlgeschlagen. Die Antwort enthielt keine gültige Beschreibungsdatei für Controls.",
"Resolving_Control_Description_Inheritation_Failed": "Das Auflösen der Control Vererbung ist fehlgeschlagen.",
"Loading_File_Failed_With_Error": "Laden von '{0}' ist fehlgeschlagen. Details: {1}",
"Resolving_Type_Definition_Failed": "Das Auflösen der Typdefinitionen ist fehlgeschlagen",
"Resolving_Server_Symbol_Meta_Data_Cache_Failed": "Das Auflösen des Zwischenspeichers für Meta-Daten der Server-Symbole ist fehlgeschlagen.",
"Open_Engineering_Server_Connection_Failed": "Der Verbindungsaufbau mit dem Server der Entwicklungsumgebung Visual Studio ist fehlgeschlagen.",
"Try_Reopen_Designer_Window": "Bitte versuchen Sie das Editor-Fenster zu schließen und erneut zu öffnen.",
"Please_Start_Engineering_Server": "Bitte starten Sie den Server über das Kontextmenü im Projektbaum.",
"Open_Server_Connection_Failed": "Der Verbindungsaufbau mit dem Server ist fehlgeschlagen.",
"Server_Denied_Access": "Der Server hat den Zugriff wegen fehlender Rechte verweigert.",
"License_Missing": "Server-Lizenz fehlt",
"Server_Command_Error": "Der Verbindungsaufbau mit dem Server ist fehlgesclahgen. Fehler im Server-Kommando.",
"Server_License_Check_Failed": "Das Prüfen der Server-Lizenz ist fehlgeschlagen",
"Reload_In_N_Seconds": "Neuladen in {0} Sekunden.",
"Reopen_Editor_Window": "Bitte öffnen Sie das Editor-Fenster neu.",
"OK": "OK",
"Possible_Reasons": "Mögliche Ursachen",
"Possibly_Reason_Server_Websocket_Certificate_Not_Trusted": "Dem Server Zertifikat wird nicht für Websockets vertraut.",
"Possibly_Reason_Url_Targets_No_Running_Websocket_Server": "Die Url: '{0}' verweist nicht auf einen laufenden Websocket-Server.",
"Possibly_Reason_Proxy_Problem": "Es gibt ein Problem mit einem existierenden Proxyserver.",
"Browser_Console_Could_Have_More_Information": "Die Browser-Konsole könnte weitere Hinweise enthalten.",
"Startup_View_Not_Defined_Please_Configure": "Fehlende Definition der Startup-View. Bitte definieren Sie eine Startup-View in der Projektkonfiguration.",
"Unable_To_Find_View_Definition_Matching_Startup_View_Definition": "Es konnte keine View Datei gefunden werden, die der Startup-View Definition entspricht.",
"Loading_File_Failed": "Das Laden der Datei: '{0}' ist fehlgeschlagen.",
"Details_Placeholder": "Details: '{0}'",
"Propably_Syntax_Error_Html_Or_Wrong_Entry_Config": "Möglicherweise ein Syntaxfehler im HTML oder ein falscher Eintrag in der Datei: 'Properties/tchmiconfig.json'.",
"Reload": "Neuladen",
"Engineering_Websocket_Lost": "Die Websocket-Verbindung zu der Entwicklungsumgebung wurde unterbrochen. Verbindung wird wiederhergestellt...",
"Engineering_Websocket_Restored": "Die Websocket-Verbindung zu der Entwicklungsumgebung wurde nach einem unerwarteten Verbindungsabbruch wieder hergestellt.",
"Engineering_Websocket_Rejected": "Die Websocket-Verbindung zu der Entwicklungsumgebung wurde abgelehnt.",
"Engineering_Websocket_Large_Cookie": "Der Browser hat viele und/oder große Cookie-Daten. Dies könnte die Ursache für die Verbindungsprobleme sein. Versuchen Sie die Cookies im Browser zu löschen.",
"Changes_To_Project_Require_Reload": "Änderungen am Projekt erfordern ein Neuladen.",
"Click_Here_For_Reload": "Bitte hier klicken um neuzuladen.",
"Publish_In_Progress": "Veröffentlichung...",
"Application_Reload_When_Publish_Done": "Anwendung wird neu geladen wenn die Veröffentlichung abgeschlossen ist.",
"License_State_Placeholder": "Lizenzstatus: '{0}'.",
"License_State_Unknown_Placeholder": "Unbekannter Lizenzstatus: '{0}'.",
"Server_Response_Invalid": "Die Server-Antwort ist ungültig.",
"Missing_Commands_Or_Command": "Command Array oder Command Array Eintrag fehlt.",
"Missing_ReadValue": "Fehlende Eigenschaft: 'readValue' in Kommando.",
"Insufficient_Access": "Fehlende Berechtigung.",
"Server_Connection_Lost": "Verbindung zum Server unterbrochen.",
"Reopen_Connection_In_Progress": "Verbindung wird wiederhergestellt...",
"Determining_Publish_Or_Failure": "Es wird ermittelt ob die Ursache dafür eine Veröffentlichung oder ein Fehler ist.",
"Client_Limit_Exceeded": "Lizenz-Limit wurde überschritten.",
"Reloading_When_Client_License_Available": "Es wird automatisch neu geladen sobald die Lizenz wieder gültig wird.",
"Reloading_When_Error_State_Cleared": "Es wird automatisch neu geladen sobald der Fehlerzustand aufgehoben ist.",
"Restore_When_Maintenance_Mode_Lock_Cleared": "Die Sitzung wird wiederhergestellt wenn die Wartungssitzung beendet wurde.",
"Time_Based_Client_License_Mode": "Temporäre Client-Lizenz (TF2049) läuft in {0} ab.",
"Time_Based_Client_License_Client_Limit_Exceeded": "Lizenz-Limit und Zeit-Limit für temporäre Client-Lizenzen (TF2049) überschritten.",
"Time_Based_Client_License_Available_Again_In": "Wieder gültig in: {0}",
"Maintenance_Mode": "Wartungssitzung läuft in {0} ab.",
"Maintenance_Mode_Lock": "Dieser Client wurde blockiert, da eine Wartungssitzung auf einem anderen Client gestartet wurde.",
"License_Expired": "Lizenz abgelaufen.",
"Forced_Logout_By_Server": "Die Websocket-Verbindung wurde vom Server per 'force logout' beendet.",
"Forced_Logout_By_Framework": "Die Websocket-Verbindung wurde vom Framework beendet.",
"Loading_User_Config_Failed": "Laden der User Zugriffsdaten vom Server fehlgeschlagen",
"Connection_Recovered_Auth_Invalid": "Verbindung zum Server wurde wieder hergestellt. Die Authentifizierung ist jedoch nicht mehr gültig.",
"Speech_playing_audio_needs_confirmation": "TwinCAT Speech: Abspielen von Ton erfordert eine Bestätigung.",
"This_Will_Take_A_Few_Seconds": "Dies kann ein paar Sekunden dauern.",
"Server_State_Request_Failed": "Die Abfrage des Server Status ist fehlgeschlagen. Details: {0}",
"Popup_Button_Text_OK": "OK",
"Popup_Button_Tooltip_OK": "Eingegebene Werte akzeptieren und Popup schließen",
"Popup_Button_Text_Cancel": "Abbrechen",
"Popup_Button_Tooltip_Cancel": "Eingegebene Werte verwerfen und Popup schließen"
}
}

View File

@@ -0,0 +1,72 @@
{
"$schema": "../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
"locale": "en",
"localizedText": {
"System_Service_Initialization_Failed": "System service initialization has failed",
"Control_Description_Response_Invalid": "Failed to load description file '{0}'. Response contains no valid control description file.",
"Resolving_Control_Description_Inheritation_Failed": "Resolving control description inheritation failed.",
"Loading_File_Failed_With_Error": "Loading '{0}' failed with: {1}",
"Resolving_Type_Definition_Failed": "Resolving type definitions failed",
"Resolving_Server_Symbol_Meta_Data_Cache_Failed": "Resolving server symbol meta data cache failed.",
"Open_Engineering_Server_Connection_Failed": "Opening connection to TwinCAT HMI Creator (Visual Studio Engineering) failed.",
"Try_Reopen_Designer_Window": "Please try to close and reopen the designer window.",
"Please_Start_Engineering_Server": "Please start the server from the context menu in the project tree.",
"Open_Server_Connection_Failed": "Opening connection to server failed.",
"Server_Denied_Access": "Server denied access because of missing rights.",
"License_Missing": "Server license is missing.",
"Server_Command_Error": "Server command error.",
"Server_License_Check_Failed": "Failed to check server license.",
"Reload_In_N_Seconds": "Reloading in {0} seconds.",
"Reopen_Editor_Window": "Please reopen editor window.",
"OK": "OK",
"Possible_Reasons": "Possible reasons",
"Possibly_Reason_Server_Websocket_Certificate_Not_Trusted": "The server certificate is not trusted for websocket (missing trust always).",
"Possibly_Reason_Url_Targets_No_Running_Websocket_Server": "The url: '{0}' does not target a working websocket server.",
"Possibly_Reason_Proxy_Problem": "There is a problem with an existing proxy server.",
"Browser_Console_Could_Have_More_Information": "The browser console could have some more information.",
"Startup_View_Not_Defined_Please_Configure": "No startup view defined. Please configure a startup view in project configuration.",
"Unable_To_Find_View_Definition_Matching_Startup_View_Definition": "Can't find a valid view definition matching the defined startup view.",
"Loading_File_Failed": "Loading file: '{0}' failed.",
"Details_Placeholder": "Details: '{0}'",
"Propably_Syntax_Error_Html_Or_Wrong_Entry_Config": "Probably a syntax error in HTML or a wrong entry in file: 'Properties/tchmiconfig.json'.",
"Reload": "Reload",
"Engineering_Websocket_Lost": "Websocket connection to engineering was lost. Reopening connection...",
"Engineering_Websocket_Restored": "Websocket connection to engineering was restored from unexpected shutdown.",
"Engineering_Websocket_Rejected": "Websocket connection to engineering was rejected.",
"Engineering_Websocket_Large_Cookie": "The browser has many and/or large cookie data. This could be the cause of the connection problems. Try to clear cookies in your browser.",
"Changes_To_Project_Require_Reload": "Your changes to the project require a client reload.",
"Click_Here_For_Reload": "Click here to reload.",
"Publish_In_Progress": "Publishing...",
"Application_Reload_When_Publish_Done": "Application will be reloaded if publish has finished.",
"License_State_Placeholder": "License state: '{0}'.",
"License_State_Unknown_Placeholder": "Unknown license state: '{0}'.",
"Server_Response_Invalid": "Server response is invalid.",
"Missing_Commands_Or_Command": "Missing command array or command array entry.",
"Missing_ReadValue": "Missing readValue in command object.",
"Insufficient_Access": "Insufficient access.",
"Server_Connection_Lost": "Connection to server lost.",
"Reopen_Connection_In_Progress": "Reopening connection...",
"Determining_Publish_Or_Failure": "We are determining if this is caused by publish or by failure.",
"Client_Limit_Exceeded": "Client limit was exceeded.",
"Reloading_When_Client_License_Available": "Will be reloaded automatically as soon as a valid client license becomes available.",
"Reloading_When_Error_State_Cleared": "Will be reloaded automatically as soon as the error state has been cleared.",
"Restore_When_Maintenance_Mode_Lock_Cleared": "The session will be restored as soon as the maintenance mode session has ended.",
"Time_Based_Client_License_Mode": "Temporarily client license (TF2049) expires in {0}",
"Time_Based_Client_License_Client_Limit_Exceeded": "Client limit and time limit for temporarily client license (TF2049) exceeded.",
"Time_Based_Client_License_Available_Again_In": "Available again in: {0}",
"Maintenance_Mode": "Maintenance mode expires in {0}.",
"Maintenance_Mode_Lock": "This client is locked because of a running maintenance mode session from another client.",
"License_Expired": "License expired.",
"Forced_Logout_By_Server": "The websocket connection was forcefully closed by the server.",
"Forced_Logout_By_Framework": "The websocket connection was forcefully closed by the framework.",
"Loading_User_Config_Failed": "Loading User Login Config from Server failed",
"Connection_Recovered_Auth_Invalid": "Connection to Server recovered but authentication is not valid anymore.",
"Speech_playing_audio_needs_confirmation": "TwinCAT Speech: Playing audio needs confirmation.",
"This_Will_Take_A_Few_Seconds": "This will take a few seconds.",
"Server_State_Request_Failed": "Requesting the server state has failed. Details: {0}",
"Popup_Button_Text_OK": "OK",
"Popup_Button_Tooltip_OK": "Apply the entered values and close the popup",
"Popup_Button_Text_Cancel": "Cancel",
"Popup_Button_Tooltip_Cancel": "Discard the entered values and close the popup"
}
}

View File

@@ -0,0 +1,70 @@
// @ts-check
/// <reference path="../TcHmi.d.ts" />
/* eslint-disable no-var */
/**
* Extends an object with inheritance information.
* If you see here an error this is probably a problem with inheritance, include order or missing dependency.
* @preserve (Part of the public API)
*/
// Override __extends from tslib!
var __extends = (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (
b === undefined
&& d && d.name
&& TcHmi && TcHmi.Log && TcHmi.Log.error
) {
TcHmi.Log.error('Inheritance parent of control type "' + d.name + '" is not known and will therefore not be available.' +
'\nPossible reasons:' +
'\n- Related source file is not included in html document.' +
'\n- Related source file is not included in required order in html document.'
);
throw new TypeError('Inheritance parent of control type "' + d.name + '" is not known.');
}
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
/**
* Add compatibility for `_super.call(xy)` calls of (customer) ES5 controls.
*
* This `call` throws with native ES6 classes, so we reroute this call to a no-op.
* TcHmiFramework will fix the constructor chain on instanciation.
*
* Note: The __extends helper is only called from transpiled ES5 controls.
* @preserve (Part of the public API)
*/
if (
!b.hasOwnProperty('call') // Detect defineProperty in base control, so 'call' is only overwritten once
&& b.prototype instanceof TcHmi.Controls.System.baseTcHmiControl // Do not hack other TS constructs
&& b.toString().startsWith('class') // ES6 requires this for native classes (ClassDeclaration) and we only want to tune these
) {
// ES5 transpiled controls call _super.call(this, element, pcElement, attrs) which throws on native ES6 classes
Object.defineProperty(b, 'call', {
// Warning: Don't use variable d in here, as d is the first extended class and perhaps not the current one
get: function () {
if (!this.toString().startsWith('class')) { // Better performance but harder to understand: if (!this.hasOwnProperty('call')) {
// We are a transpiled ES5 class. But got called in the prototype chain of the ES6 inheritance parent!
return function controlInheritanceCallthrough(derivedCtrlObj, element, pcElement, attrs, ...rest) {
// Use "apply", as "call" is tainted in the prototype chain with this defineProperty
this.apply(derivedCtrlObj, [element, pcElement, attrs, ...rest]);
};
} else {
// We are a native ES6 class. Our constructor is called from the controlManger so our 'call' has to be a no-op (but must not throw)
return function controlInheritanceCallUpgrade(derivedCtrlObj, element, pcElement, attrs) {
return derivedCtrlObj;
};
}
}
});
}
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();

View File

@@ -0,0 +1,87 @@
// Type definitions for Acorn v1.0.1
// Project: https://github.com/marijnh/acorn
// Definitions by: RReverser <https://github.com/RReverser>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="estree.d.ts" />
declare namespace acorn {
var version: string;
function parse(input: string, options?: Options): ESTree.Program;
function parseExpressionAt(input: string, pos: number, options?: Options): ESTree.Expression;
function getLineInfo(input: string, offset: number): ESTree.Position;
var defaultOptions: Options;
function isIdentifierChar(code: number, astral?: boolean): boolean;
function isIdentifierStart(code: number, astral?: boolean): boolean;
var plugins: any;
interface ITokenType {
label: string;
keyword: string;
beforeExpr: boolean;
startsExpr: boolean;
isLoop: boolean;
isAssign: boolean;
prefix: boolean;
postfix: boolean;
binop: number;
updateContext: (prevType: TokenType) => any;
}
interface AbstractToken {
start: number;
end: number;
loc: ESTree.SourceLocation;
range: [number, number];
}
interface Token extends AbstractToken {
type: ITokenType;
value: any;
}
interface Comment extends AbstractToken {
type: string;
value: string;
}
interface Options {
ecmaVersion?: number;
sourceType?: string;
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => any;
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: ESTree.Position) => any;
allowReserved?: boolean;
allowReturnOutsideFunction?: boolean;
allowImportExportEverywhere?: boolean;
allowHashBang?: boolean;
locations?: boolean;
onToken?: ((token: Token) => any) | Token[];
onComment?: ((isBlock: boolean, text: string, start: number, end: number, startLoc?: ESTree.Position, endLoc?: ESTree.Position) => any) | Comment[];
ranges?: boolean;
program?: ESTree.Program;
sourceFile?: string;
directSourceFile?: string;
preserveParens?: boolean;
plugins?: { [name: string]: Function; };
}
var tokTypes: any;
var tokContexts: any;
export class TokContext {
constructor(token: string, isExpression: boolean, preserveSpace?: boolean, override?: boolean);
}
export class TokenType {
constructor(name : string, options? : Object);
}
export class Parser {
}
}
declare module "acorn" {
export = acorn
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,368 @@
// Type definitions for ESTree AST specification
// Project: https://github.com/estree/estree
// Definitions by: RReverser <https://github.com/RReverser>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace ESTree {
interface Node {
type: string;
loc?: SourceLocation;
range?: [number, number];
}
interface SourceLocation {
source?: string;
start: Position;
end: Position;
}
interface Position {
line: number;
column: number;
}
interface Program extends Node {
body: Array<Statement | ModuleDeclaration>;
sourceType: string;
}
interface Function extends Node {
id?: Identifier;
params: Array<Pattern>;
body: BlockStatement | Expression;
generator: boolean;
}
interface Statement extends Node {}
interface EmptyStatement extends Statement {}
interface BlockStatement extends Statement {
body: Array<Statement>;
}
interface ExpressionStatement extends Statement {
expression: Expression;
}
interface IfStatement extends Statement {
test: Expression;
consequent: Statement;
alternate?: Statement;
}
interface LabeledStatement extends Statement {
label: Identifier;
body: Statement;
}
interface BreakStatement extends Statement {
label?: Identifier;
}
interface ContinueStatement extends Statement {
label?: Identifier;
}
interface WithStatement extends Statement {
object: Expression;
body: Statement;
}
interface SwitchStatement extends Statement {
discriminant: Expression;
cases: Array<SwitchCase>;
}
interface ReturnStatement extends Statement {
argument?: Expression;
}
interface ThrowStatement extends Statement {
argument: Expression;
}
interface TryStatement extends Statement {
block: BlockStatement;
handler?: CatchClause;
finalizer?: BlockStatement;
}
interface WhileStatement extends Statement {
test: Expression;
body: Statement;
}
interface DoWhileStatement extends Statement {
body: Statement;
test: Expression;
}
interface ForStatement extends Statement {
init?: VariableDeclaration | Expression;
test?: Expression;
update?: Expression;
body: Statement;
}
interface ForInStatement extends Statement {
left: VariableDeclaration | Expression;
right: Expression;
body: Statement;
}
interface DebuggerStatement extends Statement {}
interface Declaration extends Statement {}
interface FunctionDeclaration extends Function, Declaration {
id: Identifier;
}
interface VariableDeclaration extends Declaration {
declarations: Array<VariableDeclarator>;
kind: string;
}
interface VariableDeclarator extends Node {
id: Pattern;
init?: Expression;
}
interface Expression extends Node {}
interface ThisExpression extends Expression {}
interface ArrayExpression extends Expression {
elements: Array<Expression | SpreadElement>;
}
interface ObjectExpression extends Expression {
properties: Array<Property>;
}
interface Property extends Node {
key: Expression;
value: Expression;
kind: string;
method: boolean;
shorthand: boolean;
computed: boolean;
}
interface FunctionExpression extends Function, Expression {}
interface SequenceExpression extends Expression {
expressions: Array<Expression>;
}
interface UnaryExpression extends Expression {
operator: UnaryOperator;
prefix: boolean;
argument: Expression;
}
interface BinaryExpression extends Expression {
operator: BinaryOperator;
left: Expression;
right: Expression;
}
interface AssignmentExpression extends Expression {
operator: AssignmentOperator;
left: Pattern | MemberExpression;
right: Expression;
}
interface UpdateExpression extends Expression {
operator: UpdateOperator;
argument: Expression;
prefix: boolean;
}
interface LogicalExpression extends Expression {
operator: LogicalOperator;
left: Expression;
right: Expression;
}
interface ConditionalExpression extends Expression {
test: Expression;
alternate: Expression;
consequent: Expression;
}
interface CallExpression extends Expression {
callee: Expression | Super;
arguments: Array<Expression | SpreadElement>;
}
interface NewExpression extends CallExpression {}
interface MemberExpression extends Expression, Pattern {
object: Expression | Super;
property: Expression;
computed: boolean;
}
interface Pattern extends Node {}
interface SwitchCase extends Node {
test?: Expression;
consequent: Array<Statement>;
}
interface CatchClause extends Node {
param: Pattern;
body: BlockStatement;
}
interface Identifier extends Node, Expression, Pattern {
name: string;
}
interface Literal extends Node, Expression {
value?: string | boolean | number | RegExp;
}
interface RegExpLiteral extends Literal {
regex: {
pattern: string;
flags: string;
};
}
type UnaryOperator = string;
type BinaryOperator = string;
type LogicalOperator = string;
type AssignmentOperator = string;
type UpdateOperator = string;
interface ForOfStatement extends ForInStatement {}
interface Super extends Node {}
interface SpreadElement extends Node {
argument: Expression;
}
interface ArrowFunctionExpression extends Function, Expression {
expression: boolean;
}
interface YieldExpression extends Expression {
argument?: Expression;
delegate: boolean;
}
interface TemplateLiteral extends Expression {
quasis: Array<TemplateElement>;
expressions: Array<Expression>;
}
interface TaggedTemplateExpression extends Expression {
tag: Expression;
quasi: TemplateLiteral;
}
interface TemplateElement extends Node {
tail: boolean;
value: {
cooked: string;
raw: string;
};
}
interface AssignmentProperty extends Property {
value: Pattern;
kind: string;
method: boolean;
}
interface ObjectPattern extends Pattern {
properties: Array<AssignmentProperty>;
}
interface ArrayPattern extends Pattern {
elements: Array<Pattern>;
}
interface RestElement extends Pattern {
argument: Pattern;
}
interface AssignmentPattern extends Pattern {
left: Pattern;
right: Expression;
}
interface Class extends Node {
id?: Identifier;
superClass: Expression;
body: ClassBody;
}
interface ClassBody extends Node {
body: Array<MethodDefinition>;
}
interface MethodDefinition extends Node {
key: Expression;
value: FunctionExpression;
kind: string;
computed: boolean;
static: boolean;
}
interface ClassDeclaration extends Class, Declaration {
id: Identifier;
}
interface ClassExpression extends Class, Expression {}
interface MetaProperty extends Expression {
meta: Identifier;
property: Identifier;
}
interface ModuleDeclaration extends Node {}
interface ModuleSpecifier extends Node {
local: Identifier;
}
interface ImportDeclaration extends ModuleDeclaration {
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
source: Literal;
}
interface ImportSpecifier extends ModuleSpecifier {
imported: Identifier;
}
interface ImportDefaultSpecifier extends ModuleSpecifier {}
interface ImportNamespaceSpecifier extends ModuleSpecifier {}
interface ExportNamedDeclaration extends ModuleDeclaration {
declaration?: Declaration;
specifiers: Array<ExportSpecifier>;
source?: Literal;
}
interface ExportSpecifier extends ModuleSpecifier {
exported: Identifier;
}
interface ExportDefaultDeclaration extends ModuleDeclaration {
declaration: Declaration | Expression;
}
interface ExportAllDeclaration extends ModuleDeclaration {
source: Literal;
}
}

View File

@@ -0,0 +1,204 @@
// tslint:disable:no-irregular-whitespace
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface JQueryCallback extends JQuery.Callbacks {}
interface JQueryDeferred<T> extends JQuery.Deferred<T> {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface JQueryEventConstructor extends JQuery.EventStatic {}
interface JQueryDeferred<T> extends JQuery.Deferred<T> {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface JQueryAjaxSettings extends JQuery.AjaxSettings {}
interface JQueryAnimationOptions extends JQuery.EffectsOptions<Element> {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface JQueryCoordinates extends JQuery.Coordinates {}
interface JQueryGenericPromise<T> extends JQuery.Thenable<T> {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface JQueryXHR extends JQuery.jqXHR {}
interface JQueryPromise<T> extends JQuery.Promise<T> {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface JQuerySerializeArrayElement extends JQuery.NameValuePair {}
/**
* @deprecated Deprecated since 1.9. See \`{@link https://api.jquery.com/jQuery.support/ }\`.
*/
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface JQuerySupport extends JQuery.PlainObject {}
// Legacy types that are not represented in the current type definitions are marked deprecated.
/**
* @deprecated Deprecated. Use \`{@link JQuery.Deferred.Callback }\` or \`{@link JQuery.Deferred.CallbackBase }\`.
*/
interface JQueryPromiseCallback<T> {
(value?: T, ...args: any[]): void;
}
/**
* @deprecated Deprecated. Use \`{@link JQueryStatic.param JQueryStatic&#91;'param'&#93;}\`.
*/
interface JQueryParam {
/**
* Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
* @param obj An array or object to serialize.
* @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
*/
(obj: any, traditional?: boolean): string;
}
/**
* @deprecated Deprecated. Use \`{@link JQuery.Event }\`.
*/
interface BaseJQueryEventObject extends Event {
/**
* The current DOM element within the event bubbling phase.
* @see \`{@link https://api.jquery.com/event.currentTarget/ }\`
*/
currentTarget: Element;
/**
* An optional object of data passed to an event method when the current executing handler is bound.
* @see \`{@link https://api.jquery.com/event.data/ }\`
*/
data: any;
/**
* The element where the currently-called jQuery event handler was attached.
* @see \`{@link https://api.jquery.com/event.delegateTarget/ }\`
*/
delegateTarget: Element;
/**
* Returns whether event.preventDefault() was ever called on this event object.
* @see \`{@link https://api.jquery.com/event.isDefaultPrevented/ }\`
*/
isDefaultPrevented(): boolean;
/**
* Returns whether event.stopImmediatePropagation() was ever called on this event object.
* @see \`{@link https://api.jquery.com/event.isImmediatePropagationStopped/ }\`
*/
isImmediatePropagationStopped(): boolean;
/**
* Returns whether event.stopPropagation() was ever called on this event object.
* @see \`{@link https://api.jquery.com/event.isPropagationStopped/ }\`
*/
isPropagationStopped(): boolean;
/**
* The namespace specified when the event was triggered.
* @see \`{@link https://api.jquery.com/event.namespace/ }\`
*/
namespace: string;
/**
* The browser's original Event object.
* @see \`{@link https://api.jquery.com/category/events/event-object/ }\`
*/
originalEvent: Event;
/**
* If this method is called, the default action of the event will not be triggered.
* @see \`{@link https://api.jquery.com/event.preventDefault/ }\`
*/
preventDefault(): any;
/**
* The other DOM element involved in the event, if any.
* @see \`{@link https://api.jquery.com/event.relatedTarget/ }\`
*/
relatedTarget: Element;
/**
* The last value returned by an event handler that was triggered by this event, unless the value was undefined.
* @see \`{@link https://api.jquery.com/event.result/ }\`
*/
result: any;
/**
* Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.
* @see \`{@link https://api.jquery.com/event.stopImmediatePropagation/ }\`
*/
stopImmediatePropagation(): void;
/**
* Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
* @see \`{@link https://api.jquery.com/event.stopPropagation/ }\`
*/
stopPropagation(): void;
/**
* The DOM element that initiated the event.
* @see \`{@link https://api.jquery.com/event.target/ }\`
*/
target: Element;
/**
* The mouse position relative to the left edge of the document.
* @see \`{@link https://api.jquery.com/event.pageX/ }\`
*/
pageX: number;
/**
* The mouse position relative to the top edge of the document.
* @see \`{@link https://api.jquery.com/event.pageY/ }\`
*/
pageY: number;
/**
* For key or mouse events, this property indicates the specific key or button that was pressed.
* @see \`{@link https://api.jquery.com/event.which/ }\`
*/
which: number;
/**
* Indicates whether the META key was pressed when the event fired.
* @see \`{@link https://api.jquery.com/event.metaKey/ }\`
*/
metaKey: boolean;
}
/**
* @deprecated Deprecated. Use \`{@link JQuery.Event }\`.
*/
interface JQueryInputEventObject extends BaseJQueryEventObject {
altKey: boolean;
ctrlKey: boolean;
metaKey: boolean;
shiftKey: boolean;
}
/**
* @deprecated Deprecated. Use \`{@link JQuery.Event }\`.
*/
interface JQueryMouseEventObject extends JQueryInputEventObject {
button: number;
clientX: number;
clientY: number;
offsetX: number;
offsetY: number;
pageX: number;
pageY: number;
screenX: number;
screenY: number;
}
/**
* @deprecated Deprecated. Use \`{@link JQuery.Event }\`.
*/
interface JQueryKeyEventObject extends JQueryInputEventObject {
/** @deprecated */
char: string;
/** @deprecated */
charCode: number;
key: string;
/** @deprecated */
keyCode: number;
}
/**
* @deprecated Deprecated. Use \`{@link JQuery.Event }\`.
*/
interface JQueryEventObject
extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject
{}
/**
* @deprecated Deprecated.
*/
interface JQueryPromiseOperator<T, U> {
(
callback1: JQuery.TypeOrArray<JQueryPromiseCallback<T>>,
...callbacksN: Array<JQuery.TypeOrArray<JQueryPromiseCallback<any>>>
): JQueryPromise<U>;
}
/**
* @deprecated Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`.
*/
interface JQueryEasingFunction {
(percent: number): number;
}
/**
* @deprecated Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`.
*/
interface JQueryEasingFunctions {
[name: string]: JQueryEasingFunction;
linear: JQueryEasingFunction;
swing: JQueryEasingFunction;
}

View File

@@ -0,0 +1,97 @@
export as namespace Sizzle;
declare const Sizzle: SizzleStatic;
export = Sizzle;
// For users who don't have "dom" types
// See: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/73082
type Element = typeof globalThis extends { Element: { new(): infer T } } ? T : never;
type Document = typeof globalThis extends { Document: { new(): infer T } } ? T : never;
type DocumentFragment = typeof globalThis extends { DocumentFragment: { new(): infer T } } ? T : never;
interface SizzleStatic {
selectors: Sizzle.Selectors;
<TArrayLike extends ArrayLike<Element>>(
selector: string,
context: Element | Document | DocumentFragment,
results: TArrayLike,
): TArrayLike;
(selector: string, context?: Element | Document | DocumentFragment): Element[];
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
compile(selector: string): Function;
matchesSelector(element: Element, selector: string): boolean;
matches(selector: string, elements: Element[]): Element[];
}
declare namespace Sizzle {
interface Selectors {
cacheLength: number;
match: Selectors.Matches;
find: Selectors.FindFunctions;
preFilter: Selectors.PreFilterFunctions;
filter: Selectors.FilterFunctions;
attrHandle: Selectors.AttrHandleFunctions;
pseudos: Selectors.PseudoFunctions;
setFilters: Selectors.SetFilterFunctions;
createPseudo(fn: Selectors.CreatePseudoFunction): Selectors.PseudoFunction;
}
namespace Selectors {
interface Matches {
[name: string]: RegExp;
}
interface FindFunction {
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
(match: RegExpMatchArray, context: Element | Document, isXML: boolean): Element[] | void;
}
interface FindFunctions {
[name: string]: FindFunction;
}
interface PreFilterFunction {
(match: RegExpMatchArray): string[];
}
interface PreFilterFunctions {
[name: string]: PreFilterFunction;
}
interface FilterFunction {
(element: string, ...matches: string[]): boolean;
}
interface FilterFunctions {
[name: string]: FilterFunction;
}
interface AttrHandleFunction {
(elem: any, casePreservedName: string, isXML: boolean): string;
}
interface AttrHandleFunctions {
[name: string]: AttrHandleFunction;
}
interface PseudoFunction {
(elem: Element): boolean;
}
interface PseudoFunctions {
[name: string]: PseudoFunction;
}
interface SetFilterFunction {
(elements: Element[], argument: number, not: boolean): Element[];
}
interface SetFilterFunctions {
[name: string]: SetFilterFunction;
}
interface CreatePseudoFunction {
(...args: any[]): PseudoFunction;
}
}
}

View File

@@ -0,0 +1,7 @@
/// <reference path="JQuery/sizzle.d.ts" />
/// <reference path="JQuery/JQueryStatic.d.ts" />
/// <reference path="JQuery/JQuery.d.ts" />
/// <reference path="JQuery/misc.d.ts" />
/// <reference path="JQuery/legacy.d.ts" />
export = jQuery;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,484 @@
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __esDecorate;
var __runInitializers;
var __propKey;
var __setFunctionName;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __spreadArrays;
var __spreadArray;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
var __classPrivateFieldGet;
var __classPrivateFieldSet;
var __classPrivateFieldIn;
var __createBinding;
var __addDisposableResource;
var __disposeResources;
var __rewriteRelativeImportExtension;
(function (factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
}
else if (typeof module === "object" && typeof module.exports === "object") {
factory(createExporter(root, createExporter(module.exports)));
}
else {
factory(createExporter(root));
}
function createExporter(exports, previous) {
if (exports !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports, "__esModule", { value: true });
}
else {
exports.__esModule = true;
}
}
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
}
})
(function (exporter) {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
__extends = function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
__decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param = function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
__esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : 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])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
};
__runInitializers = function (thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
};
__propKey = function (x) {
return typeof x === "symbol" ? x : "".concat(x);
};
__setFunctionName = function (f, name, prefix) {
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
__metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
};
__awaiter = function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
__exportStar = function(m, o) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
};
__createBinding = Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
});
__values = function (o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
__read = function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
/** @deprecated */
__spread = function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
};
/** @deprecated */
__spreadArrays = function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
__spreadArray = function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
__await = function (v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
};
__asyncGenerator = function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
__asyncDelegator = function (o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
};
__asyncValues = function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
__makeTemplateObject = function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
};
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
__importStar = function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
__importDefault = function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
__classPrivateFieldGet = function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
__classPrivateFieldIn = function (state, receiver) {
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
};
__addDisposableResource = function (env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
var dispose, inner;
if (async) {
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
dispose = value[Symbol.asyncDispose];
}
if (dispose === void 0) {
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
dispose = value[Symbol.dispose];
if (async) inner = dispose;
}
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
env.stack.push({ value: value, dispose: dispose, async: async });
}
else if (async) {
env.stack.push({ async: true });
}
return value;
};
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
__disposeResources = function (env) {
function fail(e) {
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
env.hasError = true;
}
var r, s = 0;
function next() {
while (r = env.stack.pop()) {
try {
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
if (r.dispose) {
var result = r.dispose.call(r.value);
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
}
else s |= 1;
}
catch (e) {
fail(e);
}
}
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
if (env.hasError) throw env.error;
}
return next();
};
__rewriteRelativeImportExtension = function (path, preserveJsx) {
if (typeof path === "string" && /^\.\.?\//.test(path)) {
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
});
}
return path;
};
exporter("__extends", __extends);
exporter("__assign", __assign);
exporter("__rest", __rest);
exporter("__decorate", __decorate);
exporter("__param", __param);
exporter("__esDecorate", __esDecorate);
exporter("__runInitializers", __runInitializers);
exporter("__propKey", __propKey);
exporter("__setFunctionName", __setFunctionName);
exporter("__metadata", __metadata);
exporter("__awaiter", __awaiter);
exporter("__generator", __generator);
exporter("__exportStar", __exportStar);
exporter("__createBinding", __createBinding);
exporter("__values", __values);
exporter("__read", __read);
exporter("__spread", __spread);
exporter("__spreadArrays", __spreadArrays);
exporter("__spreadArray", __spreadArray);
exporter("__await", __await);
exporter("__asyncGenerator", __asyncGenerator);
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
exporter("__addDisposableResource", __addDisposableResource);
exporter("__disposeResources", __disposeResources);
exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
});
0 && (module.exports = {
__extends: __extends,
__assign: __assign,
__rest: __rest,
__decorate: __decorate,
__param: __param,
__esDecorate: __esDecorate,
__runInitializers: __runInitializers,
__propKey: __propKey,
__setFunctionName: __setFunctionName,
__metadata: __metadata,
__awaiter: __awaiter,
__generator: __generator,
__exportStar: __exportStar,
__createBinding: __createBinding,
__values: __values,
__read: __read,
__spread: __spread,
__spreadArrays: __spreadArrays,
__spreadArray: __spreadArray,
__await: __await,
__asyncGenerator: __asyncGenerator,
__asyncDelegator: __asyncDelegator,
__asyncValues: __asyncValues,
__makeTemplateObject: __makeTemplateObject,
__importStar: __importStar,
__importDefault: __importDefault,
__classPrivateFieldGet: __classPrivateFieldGet,
__classPrivateFieldSet: __classPrivateFieldSet,
__classPrivateFieldIn: __classPrivateFieldIn,
__addDisposableResource: __addDisposableResource,
__disposeResources: __disposeResources,
__rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
});

View File

@@ -0,0 +1,148 @@
{
"$schema": "Schema/Manifest.Schema.json",
"apiVersion": 1,
"modules": [
{
"path": "Lib/tslib.js",
"type": "Resource"
},
{
"path": "Lib/EsHelper.js",
"type": "Resource"
},
{
"path": "Lib/jquery.min.js",
"type": "Resource"
},
{
"path": "Lib/acorn.js",
"type": "Resource"
},
{
"path": "dist/TcHmiCore/GlobalFunctions.js",
"type": "Resource"
},
{
"path": "dist/TcHmiCore/StaticDefines.js",
"type": "Resource"
},
{
"path": "dist/TcHmiCore/_Types.js",
"type": "Resource"
},
{
"path": "dist/TcHmiCore/Destroyable.js",
"type": "Resource"
},
{
"path": "dist/TcHmiCore/baseTcHmiControl.js",
"type": "Resource"
},
{
"type": "Resource",
"path": "System/Style.css"
},
{
"type": "Resource",
"path": "Themes/Base/Style.css",
"theme": "Base",
"component": "General"
},
{
"type": "Resource",
"path": "Themes/Base-Dark/Style.css",
"theme": "Base-Dark",
"component": "General"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiControl",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiContainerControl",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiPartial",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiPopup",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiContainer",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiContent",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiGrid",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiHtmlHost",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiUserControl",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiView",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiRegion",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Control",
"basePath": "Controls/System/TcHmiUserControlHost",
"descriptionFile": "Description.json",
"toolboxCategory": "Beckhoff.TwinCAT.HMI.Framework:200"
},
{
"type": "Language",
"locale": "de",
"files": "Lang/Language.de.json"
},
{
"type": "Language",
"locale": "en",
"files": "Lang/Language.en.json"
}
],
"provideMetadata": {
"toolbox": {
"Beckhoff.TwinCAT.HMI.Framework": {
"200": "System"
}
}
},
"features": ["ContentPackages"]
}

View File

@@ -0,0 +1,762 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"description": "Description of one TcHmi control",
"properties": {
"$schema": {
"type": "string",
"description": "URL to a schema file"
},
"apiVersion": {
"description": "API Version",
"type": "integer"
},
"name": {
"description": "Control type name",
"type": "string",
"minLength": 1
},
"namespace": {
"type": "string",
"description": "Control name space"
},
"displayName": {
"type": "string",
"description": "Name which should be presented to the user."
},
"version": {
"type": "object",
"properties": {
"full": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$"
},
"major": {
"type": "integer",
"minimum": 0
},
"minor": {
"type": "integer",
"minimum": 0
},
"revision": {
"type": "integer",
"minimum": 0
},
"build": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false,
"required": ["full", "major", "minor", "revision", "build"]
},
"visible": {
"type": "boolean",
"default": true,
"description": "Determine if a control is shown in the toolbox to the user."
},
"themeable": {
"type": "string",
"enum": ["None", "Standard", "Advanced"],
"default": "Standard",
"description": "Determine if the control can be changed by a theme. Defaults to Standard. Controls with Advanced will be hidden by default in the theme editor."
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Base class of this control."
},
"description": {
"type": "string",
"default": "",
"description": "A long description of this control."
},
"defaultDesignerEvent": {
"type": "string",
"default": "",
"description": "The event which is manipulated on double click in designer."
},
"properties": {
"type": "object",
"description": "Information for the engineering process.",
"properties": {
"containerControl": {
"type": "boolean",
"default": false,
"description": "Can contain other controls while engineering. Only used in system controls."
},
"geometry": {
"type": "object",
"properties": {
"width": {
"type": "number",
"minimum": 0
},
"height": {
"type": "number",
"minimum": 0
}
},
"description": "Default size of control after instantiation in the engineering.",
"additionalProperties": false,
"required": ["width", "height"]
},
"reservedPropertyNames": {
"type": "array",
"description": "List of property names which are reserved by the control implementation and must not be used as attribute names.",
"items": {
"type": "string",
"minLength": 1
}
}
},
"additionalProperties": false,
"required": ["geometry"]
},
"icons": {
"type": "array",
"description": "Definition of the icon of this control.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^(?!(/Controls/)).*$",
"description": "Path to the file with the control directory as base path.",
"minLength": 1
},
"width": {
"type": "number",
"description": "Width which should match this file",
"minimum": 0
},
"height": {
"type": "number",
"description": "Height which should match this file",
"minimum": 0
}
},
"additionalProperties": false,
"required": ["name", "width", "height"]
}
},
"template": {
"type": "string"
},
"dependencyFiles": {
"type": "array",
"description": "All files which will be included in the HTML file of the HMI.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^(?!(/Controls/)|(.*THEMENAME)|(.*[.]ts$)).*$",
"description": "Path to the file with the control directory as base path.",
"minLength": 1
},
"type": {
"type": "string",
"enum": ["Stylesheet", "JavaScript", "EsModule"],
"description": "Type of the control asset. Stylesheet, JavaScript and EsModule are supported."
},
"description": {
"type": "string",
"default": "",
"description": "A long description of this file."
}
},
"additionalProperties": false,
"required": ["name", "type"]
}
},
"themes": {
"type": "object",
"description": "All files which will be loaded based on the theme settings.",
"additionalProperties": {
"type": "object",
"description": "Theme definition",
"properties": {
"resources": {
"type": "array",
"description": "Resources for this theme.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^(?!.*THEMENAME).*$",
"description": "Path to the file with the control directory as base path.",
"minLength": 1
},
"type": {
"type": "string",
"enum": ["Stylesheet", "ThemedValues"],
"description": "Type of the control asset."
},
"description": {
"type": "string",
"default": "",
"description": "A long description of this file."
}
},
"additionalProperties": false,
"required": ["name", "type"]
}
}
},
"additionalProperties": false
}
},
"attributes": {
"type": "array",
"description": "A list of attributes of this control.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "id|^data-tchmi",
"description": "Name of the attribute in the HTML."
},
"propertyName": {
"type": "string",
"minLength": 1,
"description": "Name of the attribute property."
},
"propertySetterName": {
"type": "string",
"description": "Name of the attribute property setter (can be empty string or missing if the attribute is readonly)."
},
"propertyGetterName": {
"type": "string",
"minLength": 1,
"description": "Name of the attribute property getter."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"refTo": {
"type": "string",
"description": "The name of an attribute which contains information relevant for this attribute.\nThe engineering will use this information to optimize position of attribute inputs.\nExample: MeasurementUnits are shown in the same row as the main value."
},
"searchTerms": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of search terms/alias names for populating a search. For example [\"source\", \"image\", \"picture\"]."
},
"visible": {
"type": "boolean",
"default": true,
"description": "Determine if an attribute is shown to the user."
},
"themeable": {
"type": "string",
"enum": ["None", "Standard", "Advanced"],
"default": "Standard",
"description": "Determine if the attribute can be changed by a theme. Defaults to Standard. Attributes with Advanced will be hidden by default in the theme editor."
},
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
},
"displayPriority": {
"type": "integer",
"default": 10,
"description": "Display priority of the Attribute.\nA low number means higher priority (is shown on top). Attributes with a priority above 50 are collapsed by default.\nAttributes which are used often should get a high priority. Common attributes derived from TcHmiControl like top, left etc. have a priority of 10. Attributes without this property are handled as priority 10."
},
"allowedFunctions": {
"type": "object",
"description": "A definition of functions which are allowed to use here. The functions must match the requiredArguments signature.",
"properties": {
"returnType": {
"type": "string",
"minLength": 1,
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
},
"requiredArguments": {
"description": "A list of arguments which will be filled from the control itself. They are not changeable in the creator.",
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
},
"description": {
"type": "string",
"description": "Tooltip in Visual Studio."
}
},
"additionalProperties": false
}
},
"requiredWaitMode": {
"type": "string",
"enum": ["Synchronous", "Asynchronous"],
"description": "A compatible function must match this waitmode."
}
},
"additionalProperties": false
},
"category": {
"type": "string",
"default": "General",
"description": "Name of the area this attribute will be listed in the creator. The ordering can be manipulated with the attributeCategories block."
},
"description": {
"type": "string",
"default": "",
"description": "A long description of this attribute."
},
"requiredOnCompile": {
"type": "boolean",
"default": false,
"description": "The attribute has to be set in the HTML. Otherwise the control is not valid."
},
"readOnly": {
"type": "boolean",
"default": false,
"description": "Readonly attributes do not need a setter. propertySetterName should be empty in that case."
},
"bindable": {
"type": "boolean",
"default": true,
"description": "Defines if this is bindable to a Symbol."
},
"defaultBindingMode": {
"type": "string",
"enum": ["OneWay", "TwoWay"],
"description": "Defines which BindingMode is used as default for Bindings added to this attribute. This will be ignored if a BindingMode is defined in the symbol expression. Defaults to OneWay."
},
"heritable": {
"type": "boolean",
"default": true,
"description": "The attribute is also usable on inheritance childs."
},
"allowSymbolExpressionsInObject": {
"type": "boolean",
"default": false,
"description": "Determines if the control has implemented support for symbol expressions in properties of object or array values for this attribute."
},
"allowEarlySymbolReferenceInjection": {
"type": "boolean",
"default": false,
"description": "Determines if the control has implemented support for injection of symbol references before initialization for this attribute."
},
"defaultValue": {
"default": null,
"description": "This property indicates the default value for the attribute that is used in the Engineering Properties window when instantiating the control and written to the HTML code."
},
"defaultValueInternal": {
"default": null,
"description": "This property specifies the internal default value for the attribute. This value is passed to the Setter function when the control has no other value in HTML code. The internal default aka runtime default may differ from the normal default (drop default)."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "propertyName", "propertyGetterName", "type"]
}
},
"themedResources": {
"type": "array",
"description": "Resources of the control.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the resource."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"description": {
"type": "string",
"default": "",
"description": "A long description of this resource."
},
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "The type of the resource gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "type"]
}
},
"attributeCategories": {
"type": "array",
"description": "Holds information about the categories of the attributes itself.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the Category."
},
"displayPriority": {
"type": "integer",
"description": "An optional display priority of the attributeCategory. Categories with higher numbers are shown below lower numbers. Few main attributes should be in Common which is shown by default.\n-10 are Colors as they must be always on top.\nCustom categories should start at 500. Layout is 100, Common is 200, Border is 300 and Background Image is 400."
},
"defaultCollapsed": {
"type": "boolean",
"default": false,
"description": "The Category should be collapsed as default."
},
"description": {
"type": "string",
"description": "A long description of this Category."
}
},
"additionalProperties": false,
"required": ["name", "displayPriority"]
}
},
"functions": {
"type": "array",
"description": "A list of API Functions of this Control.",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Internal name of function.",
"type": "string",
"minLength": 1
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"visible": {
"type": "boolean",
"description": "Determine if a function is shown to the user."
},
"description": {
"type": "string",
"description": "A long description of this function."
},
"category": {
"description": "Name of the area this function will be listed in the creator.",
"type": "string",
"minLength": 1
},
"searchTerms": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of search terms/alias names for populating a search."
},
"params": {
"type": "array",
"description": "Description of the parameters of the function.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the parameter"
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"description": {
"type": "string",
"description": "A long description of this parameter."
},
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "Information about the expected type as a tchmi reference name. \nThe type of the parameter gives the tchmi creator a hint to use a custom editor."
},
"bindable": {
"type": "boolean",
"description": "Defines if this is bindable to a Symbol.",
"default": true
},
"visible": {
"type": "boolean",
"description": "Determine if a parameter is shown to the user."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "type", "visible"]
}
},
"type": {
"description": "Datatype of return value.",
"anyOf": [
{
"description": "Return value type as a tchmi reference name.",
"type": "string",
"pattern": "^tchmi:",
"minLength": 6
},
{
"description": "The function has no return value.",
"type": "null"
}
]
},
"heritable": {
"type": "boolean",
"description": "The function is also usable on inheritance childs."
},
"injectContextObject": {
"type": "boolean",
"description": "Adds a context object to the function as the first parameter."
},
"waitMode": {
"type": "string",
"default": "Synchronous",
"enum": ["Synchronous", "Asynchronous"],
"description": "Tells the system if the function is finished synchronous or if the user will call a feedback function in the context object of the context object to signal finish."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "visible", "category", "type", "heritable"]
}
},
"events": {
"type": "array",
"description": "A list of events associated to this control.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Internal name of the Event."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"description": {
"type": "string",
"description": "A long description of this event."
},
"category": {
"anyOf": [
{
"type": "string",
"enum": ["Operator", "Control", "Framework"]
},
{
"type": "string"
}
],
"description": "The category of this event. Used to sort and prioritize the events in the creator."
},
"displayPriority": {
"type": "integer",
"description": "An optional display priority of the event. Events with higher numbers are shown below lower numbers. Most users will only use events with a low number.\nEvents without this value are very rare used.\nOwn primary control events should be 5, secondary events 7. 10 is load, unload, pressed. 15 are major interaction events like click, right click, double click. 50 are enter, leave, mousedown, mouseup. Events without this property are hidden by default."
},
"visible": {
"type": "boolean",
"default": true,
"description": "Determine if an event is shown to the user."
},
"heritable": {
"type": "boolean",
"default": true,
"description": "The event is also usable on inheritance childs."
},
"allowsPreventDefault": {
"type": "boolean",
"default": false,
"description": "The event can have the option preventDefault."
},
"arguments": {
"type": "array",
"description": "Description of the arguments of the event.",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A long description of this argument."
},
"type": {
"type": "string",
"description": "The type of this argument.",
"pattern": "^tchmi:"
}
},
"additionalProperties": false,
"required": ["description", "type"]
}
}
},
"additionalProperties": false,
"required": ["name", "displayName", "category", "visible", "heritable"]
}
},
"dataTypes": {
"type": "array",
"description": "List of data type schema definition files.",
"items": {
"type": "object",
"properties": {
"schema": {
"type": "string",
"minLength": 1,
"description": "Path to the file."
}
},
"additionalProperties": false,
"required": ["schema"]
}
},
"languages": {
"type": "object",
"description": "List of language files delivered by the control.",
"additionalProperties": {
"description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path or array of paths.",
"oneOf": [
{
"type": "string",
"description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path."
},
{
"type": "array",
"items": {
"type": "string",
"description": "List of localization files. If some keys are referenced in multiple files, the last file will win."
}
}
]
}
},
"access": {
"type": "array",
"description": "A list of access rights which is checked by this control. Will be checked by its child controls, too, if they are configured with a matching virtual mapping.",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"description": "An access right which is checked by controls. In the Schema a defaultValue of true mean access is granted, false is denied, null is ask parent.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the access definition in the HTML."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"visible": {
"type": "boolean",
"default": true,
"description": "Determine if an access definition is shown to the user."
},
"description": {
"type": "string",
"default": "",
"description": "A long description of this access definition."
},
"dependsOn": {
"type": "array",
"description": "Names of access rights which must be valid, if this right should be granted. For example 'create' should work only when 'operate' is granted.",
"items": {
"type": "string",
"description": "Names of access rights which must be valid, if this right should be granted. For example 'create' should work only when 'operate' is granted."
}
},
"defaultValueInternal": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Defines the default of this control access right. This will be used if the check for this access right does not return a result. true mean access is granted, false is denied, null is ask parent."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "visible", "defaultValueInternal"]
}
},
"creator": {
"type": "object",
"description": "Information which are only used in the engineering process. Only used in system controls.",
"properties": {
"attributes": {
"type": "array",
"description": "A list of attributes of this control which are only used while the design process.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the attribute in the HTML."
},
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
},
"description": {
"type": "string",
"description": "A long description of this attribute."
},
"required": {
"type": "boolean"
},
"defaultValue": {
"description": "aka drop default. This value will be used as value while control is generated in engineering. If set to null the control will get no configured value for this attribute."
},
"defaultValueInternal": {
"description": "aka runtime default. This value will be used if no value is configured. This value must be valid for this attributes."
}
},
"additionalProperties": false,
"required": ["name", "type", "required", "defaultValue", "defaultValueInternal"]
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"name",
"displayName",
"version",
"visible",
"base",
"description",
"properties",
"icons",
"dependencyFiles",
"attributes"
]
}

View File

@@ -0,0 +1,88 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "URL to a schema file"
},
"version": {
"type": "object",
"properties": {
"full": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$"
},
"major": {
"type": "integer",
"minimum": 0
},
"minor": {
"type": "integer",
"minimum": 0
},
"revision": {
"type": "integer",
"minimum": 0
},
"build": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false,
"required": ["full", "major", "minor", "revision", "build"]
},
"events": {
"type": "array",
"description": "A list of events associated to the framework.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Internal name of the event."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"description": {
"type": "string",
"description": "A long description of this event."
},
"category": {
"type": "string",
"enum": ["Framework"],
"description": "Defines this event is associated to the framework"
},
"allowsPreventDefault": {
"type": "boolean",
"description": "The event can have the option preventDefault."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "description"]
}
},
"dataTypes": {
"type": "array",
"description": "List of custom data types",
"items": {
"type": "object",
"properties": {
"schema": {
"type": "string",
"minLength": 1,
"description": "Path to the schema describing the datatype."
}
},
"additionalProperties": false,
"required": ["schema"]
}
}
},
"additionalProperties": false,
"required": ["version", "events", "dataTypes"]
}

View File

@@ -0,0 +1,237 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "URL to a schema file"
},
"apiVersion": {
"description": "API Version",
"type": "integer"
},
"version": {
"type": "object",
"description": "Version of the asset.",
"properties": {
"full": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$"
},
"major": {
"type": "number",
"minimum": 0
},
"minor": {
"type": "number",
"minimum": 0
},
"revision": {
"type": "number",
"minimum": 0
},
"build": {
"type": "number",
"minimum": 0
}
},
"additionalProperties": false,
"required": ["full", "major", "minor", "revision", "build"]
},
"dependencyFiles": {
"type": "array",
"description": "All files which will be included in the HTML file of the HMI.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^(?!(/)).*$",
"description": "Path to the file with the function directory as base path.",
"minLength": 1
},
"type": {
"type": "string",
"enum": ["Stylesheet", "JavaScript", "EsModule"],
"description": "Type of the function asset. Stylesheet, JavaScript and EsModule are supported."
},
"description": {
"type": "string",
"description": "A long description of this file."
}
},
"additionalProperties": false,
"required": ["name", "type", "description"]
}
},
"function": {
"type": "object",
"description": "Description for the function itself.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the function."
},
"namespace": {
"type": "string",
"description": "The namespace of the function."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"visible": {
"type": "boolean",
"description": "Determine if a function is shown to the user."
},
"description": {
"type": "string",
"description": "A long description of this function."
},
"category": {
"type": "string",
"default": "Other",
"description": "Name of the area this function will be listed in the creator."
},
"injectContextObject": {
"type": "boolean",
"description": "Adds a context object to the function as the first parameter."
},
"waitMode": {
"type": "string",
"default": "Synchronous",
"enum": ["Synchronous", "Asynchronous"],
"description": "Tells the system if the function is finished synchronous or if the user will call a feedback function in the context object of the context object to signal finish."
},
"returnValue": {
"description": "Return value type as a tchmi reference name or null if the function has no return value.",
"anyOf": [
{
"description": "Return value type as a tchmi reference name.",
"type": "object",
"properties": {
"type": {
"type": "string",
"pattern": "^tchmi:",
"description": "Type from the return value."
},
"description": {
"type": "string",
"description": "A long description of the return value."
}
},
"additionalProperties": false
},
{
"description": "The function has no return value.",
"type": "null"
}
]
},
"arguments": {
"type": "array",
"description": "Function arguments.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Variable name in the function."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "Information about the expected type as a tchmi reference name."
},
"description": {
"type": "string",
"description": "A long description of this argument."
},
"required": {
"type": "boolean",
"description": "This parameter is mandatory for this function."
},
"bindable": {
"type": "boolean",
"description": "This parameter can be binded to a symbol."
},
"allowControlAttributeBindingOptions": {
"type": "boolean",
"description": "This parameter can have the same binding options as a control attribute."
},
"allowSymbolReferenceWatchDelegation": {
"type": "boolean",
"description": "Determines if symbol references injected via this parameter will be watched by the function itself if 'delegatedWatch: true' is defined in the context object when calling the function."
},
"asReference": {
"type": "boolean",
"description": "TcHmiCreator ui state. Do not manipulate."
},
"defaultValue": {
"description": "This value will be used as initial value while function is generated in engineering."
},
"restParameter": {
"type": "boolean",
"description": "Specified the argument as rest parameter (variable number of arguments)."
},
"refTo": {
"type": "string",
"description": "The name of an arguments which contains information relevant for this parameter.\nThe engineering will use this information to optimize data selection based on the underlying types.\nExample: Argument which contains the name of a control properrty may refer to an argument which holds a control reference."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "description", "type", "required", "bindable"]
}
}
},
"additionalProperties": false,
"required": ["name", "displayName", "namespace", "description", "arguments", "returnValue"]
},
"dataTypes": {
"type": "array",
"description": "List of custom data types.",
"items": {
"type": "object",
"properties": {
"schema": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(/)).*$",
"description": "Path to the schema describing the datatype."
}
},
"additionalProperties": false,
"required": ["schema"]
}
},
"languages": {
"type": "object",
"description": "List of language files delivered by the function.",
"additionalProperties": {
"description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path or array of paths.",
"oneOf": [
{
"type": "string",
"description": "Key is the language and region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US'). Value is the file path."
},
{
"type": "array",
"items": {
"type": "string",
"description": "List of localization files. If some keys are referenced in multiple files, the last file will win."
}
}
]
}
}
},
"required": ["function"],
"additionalProperties": false
}

View File

@@ -0,0 +1,56 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "URL to a schema file"
},
"scope": {
"type": "string",
"enum": [
"Server",
"Framework",
"Control",
"Application",
"Package"
],
"description": "Describes if this file targets a server, framework, control or package file when it is copied inside the hmi project."
},
"source": {
"type": "string",
"description": "Identifies the localization file source for project level override. Required in engineering environment if file is used to override localization files with Control or Function scope. Example: 'TcHmi.Controls.System.TcHmiControl'"
},
"order": {
"type": "integer",
"description": "Load order of language files. If multiple files of the same language are available the one with the lowest order will be used for conflicting variables."
},
"locale": {
"description": "Language and Region (optionally) as described in ISO 639/BCP 47 (Examples: 'en', 'en-US').",
"format": "locale",
"type": "string"
},
"localizedText": {
"type": "object",
"description": "Name of each additionalProperties entry is the name of each text variable.",
"additionalProperties": {
"description": "Localized text. It may contain placeholders like {0}, {1}, ... May be null if current locale does not have a text.",
"anyOf": [
{
"description": "Localized text. It may contain placeholders like {0}, {1}, ...",
"type": "string"
},
{
"description": "Localized key which has no text value in this locale.",
"type": "null"
}
]
}
}
},
"required": [
"locale",
"localizedText"
],
"additionalProperties": false
}

View File

@@ -0,0 +1,63 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "ThemeDescription",
"type": "object",
"description": "Definition of a Theme. This file is referenced with one themeName in tchmiconfig.json or control Description.json",
"properties": {
"$schema": {
"type": "string",
"description": "URL to a schema file"
},
"controlClassValues": {
"type": "object",
"description": "Project only: Theme values for for controls with this class. (This file is referenced in tchmiconfig.json)",
"additionalProperties": {
"type": "object",
"description": "Control class this value matches.",
"properties": {
"attributes": {
"type": "object",
"description": "List of control property names.",
"additionalProperties": {
"description": "Value of the control property in this theme"
}
},
"themedResources": {
"type": "object",
"description": "List of general purpose themed resources for this control class.",
"additionalProperties": {
"description": "Value of the general purpose themed resources for a control class."
}
}
},
"additionalProperties": false
}
},
"controlTypeValues": {
"type": "object",
"description": "Theme values for controls. (This file is referenced with one themeName in tchmiconfig.json or control Description.json)",
"additionalProperties": {
"type": "object",
"description": "Control type this value matches.",
"properties": {
"attributes": {
"type": "object",
"description": "List of control property names.",
"additionalProperties": {
"description": "Name of the control property in this theme"
}
},
"themedResources": {
"type": "object",
"description": "List of general purpose themed resources for this control. Will be available as '%tr%control::<fullCtrlTypeName>::<thisName>%/tr%",
"additionalProperties": {
"description": "Name of the general purpose themed resource for a control."
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,182 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "URL to a schema file"
},
"parameters": {
"type": "array",
"description": "A list of attributes of this User Control.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^data-tchmi-",
"description": "Name of the attribute in the HTML."
},
"propertyName": {
"type": "string",
"minLength": 1,
"description": "Name of the attribute property."
},
"propertySetterName": {
"type": "string",
"description": "Name of the attribute property setter (can be empty string or missing if the attribute is readonly)."
},
"propertyGetterName": {
"type": "string",
"minLength": 1,
"description": "Name of the attribute property getter."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"visible": {
"type": "boolean",
"description": "Determine if an attribute is shown to the user."
},
"themeable": {
"type": "string",
"enum": ["None", "Standard", "Advanced"],
"description": "Determine if the attribute can be changed by a theme. Defaults to standard."
},
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
},
"allowedFunctions": {
"type": "object",
"description": "A definition of functions which are allowed to use here. The functions must match the requiredArguments signature.",
"properties": {
"returnType": {
"type": "string",
"minLength": 1,
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
},
"requiredArguments": {
"description": "A list of arguments which will be filled from the control itself. They are not changeable in the creator.",
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 6,
"pattern": "^tchmi:",
"description": "The type of the attribute gives the tchmi creator a hint to use a custom editor for this attribute.\nThe corresponding schemas are described as dataTypes."
}
},
"additionalProperties": false
}
},
"requiredWaitMode": {
"type": "string",
"enum": ["Synchronous", "Asynchronous"],
"description": "A compatible function must match this waitmode."
}
},
"additionalProperties": false
},
"allowSymbolExpressionsInObject": {
"type": "boolean",
"default": false,
"description": "Allows symbol expressions in properties of object or array values."
},
"category": {
"type": "string",
"description": "Name of the area this attribute will be listed in the creator."
},
"description": {
"type": "string",
"description": "A long description of this attribute."
},
"requiredOnCompile": {
"type": "boolean",
"description": "The attribute has to be set in the HTML. Otherwise the control is not valid."
},
"refTo": {
"type": "string",
"description": "The name of an attribute which contains information relevant for this attribute.\nThe engineering will use this information to optimize position of attribute inputs.\nExample: MeasurementUnits are shown in the same row as the main value."
},
"readOnly": {
"type": "boolean",
"description": "Readonly attributes do not need a setter."
},
"bindable": {
"type": "boolean",
"description": "Defines if this is bindable to a Symbol."
},
"heritable": {
"type": "boolean",
"description": "This attribute can be overwritten by a inheritance child."
},
"defaultValue": {
"default": null,
"description": "This property indicates the default value for the attribute that is used in the Engineering Properties window when instantiating the control and written to the HTML code."
},
"defaultValueInternal": {
"default": null,
"description": "This property specifies the internal default value for the attribute. This value is passed to the Setter function when the control has no other value in HTML code. The internal default aka runtime default may differ from the normal default (drop default)."
}
},
"additionalProperties": false,
"required": ["name", "displayName", "visible", "type", "category", "readOnly", "bindable", "heritable"]
}
},
"virtualRights": {
"type": "array",
"description": "Additional virtual rights for the User Control. For example the 'operate' right of an embedded button can be configured to react on 'canStartPump' right of this User Control.",
"items": {
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"description": "An access right which is checked by controls. In the schema a defaultValue of true mean access is granted, false is denied, null is ask parent.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the access definition in the HTML."
},
"displayName": {
"type": "string",
"description": "Name which should be presented the user."
},
"visible": {
"type": "boolean",
"description": "Determine if an access definition is shown to the user."
},
"description": {
"type": "string",
"description": "A long description of this access definition."
},
"defaultValueInternal": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Defines the default of this control access right. This will be used if the check for this access right does not return a result. true mean access is granted, false is denied, null is ask parent."
}
},
"additionalProperties": false,
"required": ["name", "defaultValueInternal"]
}
},
"description": {
"type": "string",
"default": "",
"description": "A long description of this User Control."
}
},
"additionalProperties": false,
"required": ["parameters"]
}

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