Added minimal functionality for Robot teaching
- Added minimal HMI - Added possibility to open and close all chamber doors
This commit is contained in:
@@ -0,0 +1,656 @@
|
||||
{
|
||||
"$schema": "../../TcHmiFramework/Schema/ControlDescription.Schema.json",
|
||||
"apiVersion": 1,
|
||||
"name": "TcHmiNumericInput",
|
||||
"namespace": "TcHmi.Controls.Beckhoff",
|
||||
"displayName": "Numeric Input",
|
||||
"version": {
|
||||
"full": "14.4.1.0",
|
||||
"major": 14,
|
||||
"minor": 4,
|
||||
"build": 1,
|
||||
"revision": 0
|
||||
},
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"base": "TcHmi.Controls.System.TcHmiControl",
|
||||
"description": "An input control which only accepts numeric values.",
|
||||
"defaultDesignerEvent": ".onValueChanged",
|
||||
"properties": {
|
||||
"containerControl": false,
|
||||
"geometry": {
|
||||
"width": 150,
|
||||
"height": 26
|
||||
}
|
||||
},
|
||||
"icons": [
|
||||
{
|
||||
"name": "Icons/16x16.png",
|
||||
"width": 16,
|
||||
"height": 16
|
||||
}
|
||||
],
|
||||
"template": "Template.html",
|
||||
"dependencyFiles": [
|
||||
{
|
||||
"name": "Style.css",
|
||||
"type": "Stylesheet",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "../dist/TcHmiNumericInput/TcHmiNumericInput.esm.js",
|
||||
"type": "EsModule",
|
||||
"description": "Contains all the main logic as ES module."
|
||||
}
|
||||
],
|
||||
"themes": {
|
||||
"Base": {
|
||||
"resources": [
|
||||
{
|
||||
"name": "Themes/Base/Style.css",
|
||||
"type": "Stylesheet",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"Base-Dark": {
|
||||
"resources": [
|
||||
{
|
||||
"name": "Themes/Base-Dark/Style.css",
|
||||
"type": "Stylesheet",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"attributes": [
|
||||
{
|
||||
"name": "data-tchmi-value-color",
|
||||
"propertyName": "ValueColor",
|
||||
"propertySetterName": "setValueColor",
|
||||
"propertyGetterName": "getValueColor",
|
||||
"displayName": "Value Color",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 10,
|
||||
"type": "tchmi:framework#/definitions/SolidColor",
|
||||
"category": "Colors",
|
||||
"description": "The color of the displayed value",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"allowSymbolExpressionsInObject": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value",
|
||||
"propertyName": "Value",
|
||||
"propertySetterName": "setValue",
|
||||
"propertyGetterName": "getValue",
|
||||
"displayName": "Value",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 10,
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput.Value",
|
||||
"category": "Common",
|
||||
"description": "Value of the NumericInput",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": 0,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-min-value",
|
||||
"propertyName": "MinValue",
|
||||
"propertySetterName": "setMinValue",
|
||||
"propertyGetterName": "getMinValue",
|
||||
"displayName": "Min Value",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 20,
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput.Value",
|
||||
"category": "Common",
|
||||
"description": "Minimal value of the NumericInput.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-max-value",
|
||||
"propertyName": "MaxValue",
|
||||
"propertySetterName": "setMaxValue",
|
||||
"propertyGetterName": "getMaxValue",
|
||||
"displayName": "Max Value",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 30,
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput.Value",
|
||||
"category": "Common",
|
||||
"description": "Maximal value of the NumericInput.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value-type",
|
||||
"propertyName": "ValueType",
|
||||
"propertySetterName": "setValueType",
|
||||
"propertyGetterName": "getValueType",
|
||||
"displayName": "Value Type",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 10,
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput.ValueType",
|
||||
"category": "Common",
|
||||
"description": "ValueType of the NumericInput. Value, MinValue and MaxValue will be based on the selected type.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "Number"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-decimal-digits",
|
||||
"propertyName": "DecimalDigits",
|
||||
"propertySetterName": "setDecimalDigits",
|
||||
"propertyGetterName": "getDecimalDigits",
|
||||
"displayName": "Decimal Digits",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 40,
|
||||
"type": "tchmi:general#/definitions/Number",
|
||||
"category": "Common",
|
||||
"description": "Number of displayed decimal digits. Does not affect the value. Only compatible with ValueType 'Number'. \nIf it's unset, the precision is limited by the ValueType 'Number'.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": 0,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-decimal-precision-mode",
|
||||
"propertyName": "DecimalPrecisionMode",
|
||||
"propertySetterName": "setDecimalPrecisionMode",
|
||||
"propertyGetterName": "getDecimalPrecisionMode",
|
||||
"displayName": "Decimal Precision Mode",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 40,
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput.DecimalPrecisionMode",
|
||||
"category": "Common",
|
||||
"description": "Select whether decimal digits are rounded or truncated.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "Truncate"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-unit",
|
||||
"propertyName": "Unit",
|
||||
"propertySetterName": "setUnit",
|
||||
"propertyGetterName": "getUnit",
|
||||
"displayName": "Unit",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 10,
|
||||
"type": "tchmi:general#/definitions/String",
|
||||
"category": "Common",
|
||||
"description": "Unit of the numeric input. Only has a visual effect.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-unit-Position",
|
||||
"propertyName": "UnitPosition",
|
||||
"propertySetterName": "setUnitPosition",
|
||||
"propertyGetterName": "getUnitPosition",
|
||||
"displayName": "Unit Position",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 10,
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput.UnitPosition",
|
||||
"category": "Unit",
|
||||
"description": "Defines the position of the unit",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "Right"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-system-keyboard-input-mode",
|
||||
"propertyName": "SystemKeyboardInputMode",
|
||||
"propertySetterName": "setSystemKeyboardInputMode",
|
||||
"propertyGetterName": "getSystemKeyboardInputMode",
|
||||
"displayName": "System Keyboard Input Mode",
|
||||
"visible": true,
|
||||
"themeable": "Advanced",
|
||||
"displayPriority": 90,
|
||||
"type": "tchmi:framework#/definitions/Inputmode",
|
||||
"category": "Value",
|
||||
"description": "Defines which keyboard layout should be loaded in the system keyboard when interacting. The exact layout file is defined in the project. \nEmpty InputMode uses 'numeric' or 'decimal' depending on DecimalDigits. \nThe most common one are: 'numeric', 'decimal', 'text'. Own project keywords are possible. \n'skip' ignores a focusIn, 'none' closes a keyboard on focusIn.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value-horizontal-alignment",
|
||||
"propertyName": "ValueHorizontalAlignment",
|
||||
"propertySetterName": "setValueHorizontalAlignment",
|
||||
"propertyGetterName": "getValueHorizontalAlignment",
|
||||
"displayName": "Value Horizontal Alignment",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 20,
|
||||
"type": "tchmi:framework#/definitions/HorizontalAlignment",
|
||||
"category": "Value",
|
||||
"description": "Defines the horizontal alignment of the displayed value.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "Right"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-content-padding",
|
||||
"propertyName": "ContentPadding",
|
||||
"propertySetterName": "setContentPadding",
|
||||
"propertyGetterName": "getContentPadding",
|
||||
"displayName": "Content Padding",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 55,
|
||||
"type": "tchmi:framework#/definitions/Padding",
|
||||
"category": "Value",
|
||||
"description": "The distance of the value to the border.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"allowSymbolExpressionsInObject": true,
|
||||
"defaultValue": {
|
||||
"top": 3,
|
||||
"right": 3,
|
||||
"bottom": 3,
|
||||
"left": 3
|
||||
},
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value-font-family",
|
||||
"propertyName": "ValueFontFamily",
|
||||
"propertySetterName": "setValueFontFamily",
|
||||
"propertyGetterName": "getValueFontFamily",
|
||||
"displayName": "Value Font Family",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 60,
|
||||
"type": "tchmi:framework#/definitions/FontFamily",
|
||||
"category": "Value",
|
||||
"description": "Comma separated list of family name or keyword: 'serif', 'sans-serif', 'monospace'.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value-font-size",
|
||||
"propertyName": "ValueFontSize",
|
||||
"propertySetterName": "setValueFontSize",
|
||||
"propertyGetterName": "getValueFontSize",
|
||||
"displayName": "Value Font Size",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 30,
|
||||
"type": "tchmi:framework#/definitions/MeasurementValue",
|
||||
"category": "Value",
|
||||
"description": "The size of the font. Percent values are relative to the parent elements font size.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value-font-size-unit",
|
||||
"propertyName": "ValueFontSizeUnit",
|
||||
"propertySetterName": "setValueFontSizeUnit",
|
||||
"propertyGetterName": "getValueFontSizeUnit",
|
||||
"refTo": "ValueFontSize",
|
||||
"displayName": "Value Font Size Unit",
|
||||
"visible": true,
|
||||
"themeable": "Advanced",
|
||||
"displayPriority": 30,
|
||||
"type": "tchmi:framework#/definitions/MeasurementUnit",
|
||||
"category": "Value",
|
||||
"description": "Could be 'px' or for relative sizing '%'.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "px"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value-font-style",
|
||||
"propertyName": "ValueFontStyle",
|
||||
"propertySetterName": "setValueFontStyle",
|
||||
"propertyGetterName": "getValueFontStyle",
|
||||
"displayName": "Value Font Style",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 60,
|
||||
"type": "tchmi:framework#/definitions/FontStyle",
|
||||
"category": "Value",
|
||||
"description": "'Normal', 'Italic' (slanted with special glyphs), 'Oblique' (slanted normal glyphs) or 'Auto' for inherited.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "Auto"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-value-font-weight",
|
||||
"propertyName": "ValueFontWeight",
|
||||
"propertySetterName": "setValueFontWeight",
|
||||
"propertyGetterName": "getValueFontWeight",
|
||||
"displayName": "Value Font Weight",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 60,
|
||||
"type": "tchmi:framework#/definitions/FontWeight",
|
||||
"category": "Value",
|
||||
"description": "'Normal', 'Bold' (glyphs with more weight) or 'Auto' for inherited.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "Auto"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-placeholder",
|
||||
"propertyName": "Placeholder",
|
||||
"propertySetterName": "setPlaceholder",
|
||||
"propertyGetterName": "getPlaceholder",
|
||||
"displayName": "Placeholder",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 50,
|
||||
"type": "tchmi:general#/definitions/String",
|
||||
"category": "Value",
|
||||
"description": "A placeholder text to display if the numeric input is empty.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": null
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-zero-padding",
|
||||
"propertyName": "ZeroPadding",
|
||||
"propertySetterName": "setZeroPadding",
|
||||
"propertyGetterName": "getZeroPadding",
|
||||
"displayName": "Zero Padding",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 50,
|
||||
"type": "tchmi:general#/definitions/Number",
|
||||
"category": "Value",
|
||||
"description": "Pads the non fractional part of the number with zeros until the resulting part reaches the given length.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": 0
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-auto-focus-out",
|
||||
"propertyName": "AutoFocusOut",
|
||||
"propertySetterName": "setAutoFocusOut",
|
||||
"propertyGetterName": "getAutoFocusOut",
|
||||
"displayName": "Auto Focus Out",
|
||||
"visible": true,
|
||||
"themeable": "Advanced",
|
||||
"displayPriority": 45,
|
||||
"type": "tchmi:general#/definitions/Boolean",
|
||||
"category": "Common",
|
||||
"description": "Whether the control should automatically lose focus when the user confirms or cancels his interaction via enter or escape.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": true,
|
||||
"defaultValueInternal": false
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-auto-select-text",
|
||||
"propertyName": "AutoSelectText",
|
||||
"propertySetterName": "setAutoSelectText",
|
||||
"propertyGetterName": "getAutoSelectText",
|
||||
"displayName": "Auto Select Text",
|
||||
"visible": true,
|
||||
"themeable": "Advanced",
|
||||
"displayPriority": 50,
|
||||
"type": "tchmi:general#/definitions/Boolean",
|
||||
"category": "Common",
|
||||
"description": "Whether a focusIn selects the whole text or not.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": false
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-ignore-invalid-values",
|
||||
"propertyName": "IgnoreInvalidValues",
|
||||
"propertySetterName": "setIgnoreInvalidValues",
|
||||
"propertyGetterName": "getIgnoreInvalidValues",
|
||||
"displayName": "Ignore Invalid Values",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 50,
|
||||
"type": "tchmi:general#/definitions/Boolean",
|
||||
"category": "Common",
|
||||
"description": "Whether an invalid value should be displayed or not. If not, invalid values are discarded.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": false
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-reset-to-last-valid-value",
|
||||
"propertyName": "ResetToLastValidValue",
|
||||
"propertySetterName": "setResetToLastValidValue",
|
||||
"propertyGetterName": "getResetToLastValidValue",
|
||||
"displayName": "Reset to Last Valid Value",
|
||||
"visible": true,
|
||||
"themeable": "Advanced",
|
||||
"displayPriority": 45,
|
||||
"type": "tchmi:general#/definitions/Boolean",
|
||||
"category": "Common",
|
||||
"description": "Whether the displayed text is reset to the last valid value on focus out.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": true,
|
||||
"defaultValueInternal": false
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-input-processing-point",
|
||||
"propertyName": "InputProcessingPoint",
|
||||
"propertySetterName": "setInputProcessingPoint",
|
||||
"propertyGetterName": "getInputProcessingPoint",
|
||||
"displayName": "Input Processing Point",
|
||||
"visible": true,
|
||||
"themeable": "Advanced",
|
||||
"displayPriority": 50,
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.InputProcessingPoint",
|
||||
"category": "Common",
|
||||
"description": "When to process the input made by the user. Either while the input is still happening (i.e. on every keystroke) or after the interaction has finished (i.e. the control loses focus).",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": "Change"
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-is-read-only",
|
||||
"propertyName": "IsReadOnly",
|
||||
"propertySetterName": "setIsReadOnly",
|
||||
"propertyGetterName": "getIsReadOnly",
|
||||
"displayName": "Is Read Only",
|
||||
"visible": true,
|
||||
"themeable": "Standard",
|
||||
"displayPriority": 52,
|
||||
"type": "tchmi:general#/definitions/Boolean",
|
||||
"category": "Common",
|
||||
"description": "Controls whose primary purpose is data input can be set to read-only to only display data without allowing modification.",
|
||||
"readOnly": false,
|
||||
"bindable": true,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true,
|
||||
"defaultValue": null,
|
||||
"defaultValueInternal": false
|
||||
},
|
||||
{
|
||||
"name": "data-tchmi-is-valid",
|
||||
"propertyName": "IsValid",
|
||||
"propertyGetterName": "getIsValid",
|
||||
"displayName": "Is Valid",
|
||||
"visible": true,
|
||||
"type": "tchmi:general#/definitions/Boolean",
|
||||
"category": "Common",
|
||||
"description": "Whether the input is valid",
|
||||
"readOnly": true,
|
||||
"bindable": false,
|
||||
"defaultBindingMode": "OneWay",
|
||||
"heritable": true
|
||||
}
|
||||
],
|
||||
"attributeCategories": [
|
||||
{
|
||||
"name": "Value",
|
||||
"displayPriority": 500,
|
||||
"defaultCollapsed": true,
|
||||
"description": "Attributes defining the value of the control."
|
||||
},
|
||||
{
|
||||
"name": "Unit",
|
||||
"displayPriority": 510,
|
||||
"defaultCollapsed": true,
|
||||
"description": "Attributes defining the unit of the control."
|
||||
}
|
||||
],
|
||||
"functions": [],
|
||||
"events": [
|
||||
{
|
||||
"name": ".onFocusIn",
|
||||
"displayName": ".onFocusIn",
|
||||
"visible": true,
|
||||
"displayPriority": 7,
|
||||
"category": "Operator",
|
||||
"description": "The focusin event is fired when an element is about to receive focus.",
|
||||
"heritable": true,
|
||||
"arguments": [
|
||||
{
|
||||
"type": "tchmi:framework#/definitions/DOMFocusEvent",
|
||||
"description": "The FocusEvent object of the underlying focusin dom event."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": ".onFocusOut",
|
||||
"displayName": ".onFocusOut",
|
||||
"visible": true,
|
||||
"displayPriority": 7,
|
||||
"category": "Operator",
|
||||
"description": "The focusout event is fired when an element is about to lose focus.",
|
||||
"heritable": true,
|
||||
"arguments": [
|
||||
{
|
||||
"type": "tchmi:framework#/definitions/DOMEvent",
|
||||
"description": "The Event object of the underlying focusout dom event."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": ".onValueChanged",
|
||||
"displayName": ".onValueChanged",
|
||||
"visible": true,
|
||||
"displayPriority": 10,
|
||||
"category": "Control",
|
||||
"description": "The valuechanged event is fired when the value was changed. This event could be fired multiples times while a user interaction.",
|
||||
"heritable": true,
|
||||
"arguments": [
|
||||
{
|
||||
"type": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput.Value",
|
||||
"description": "The new value of the NumericInput."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": ".onUserInteractionFinished",
|
||||
"displayName": ".onUserInteractionFinished",
|
||||
"visible": true,
|
||||
"displayPriority": 5,
|
||||
"category": "Operator",
|
||||
"description": "The userinteractionfinished event is fired after leaving the numerical input.",
|
||||
"heritable": true,
|
||||
"arguments": []
|
||||
},
|
||||
{
|
||||
"name": ".onUserInteractionCanceled",
|
||||
"displayName": ".onUserInteractionCanceled",
|
||||
"visible": true,
|
||||
"displayPriority": 7,
|
||||
"category": "Operator",
|
||||
"description": "The userinteractioncanceled event is fired when the user presses the escape key, causing the value to reset to its previous value.",
|
||||
"heritable": true,
|
||||
"arguments": []
|
||||
}
|
||||
],
|
||||
"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: 150 B |
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "../../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
|
||||
"locale": "de",
|
||||
"localizedText": {
|
||||
"ValueNaN": "Der eingegebene Wert ist keine Zahl.",
|
||||
"ValueEmpty": "Es wurde kein Wert eingegeben.",
|
||||
"ValueOutOfRangeMin": "Der eingegebene Wert ist kleiner als der minimale Wert ({0}).",
|
||||
"ValueOutOfRangeMax": "Der eingegebene Wert ist größer als der maximale Wert ({0})."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "../../../TwinCAT-HMI-Common/JsonSchemas/Language.Schema.json",
|
||||
"locale": "en",
|
||||
"localizedText": {
|
||||
"ValueNaN": "Value is not a number.",
|
||||
"ValueEmpty": "No value entered.",
|
||||
"ValueOutOfRangeMin": "Value is lower than the min value ({0}).",
|
||||
"ValueOutOfRangeMax": "Value is higher than the max value ({0})."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema",
|
||||
"definitions": {
|
||||
"TcHmi.Controls.Beckhoff.TcHmiNumericInput": {
|
||||
"$schema": "http://json-schema.org/draft-04/schema",
|
||||
"type": "object",
|
||||
"frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
|
||||
"frameworkControlType": "TcHmiNumericInput",
|
||||
"frameworkControlNamespace": "TcHmi.Controls.Beckhoff"
|
||||
},
|
||||
"TcHmiNumericInput": {
|
||||
"$ref": "tchmi:framework#/definitions/TcHmi.Controls.Beckhoff.TcHmiNumericInput"
|
||||
},
|
||||
"TcHmi.Controls.Beckhoff.TcHmiNumericInput.Value": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "tchmi:general#/definitions/Number"
|
||||
},
|
||||
{
|
||||
"$ref": "tchmi:general#/definitions/BigInt64"
|
||||
},
|
||||
{
|
||||
"$ref": "tchmi:general#/definitions/UnsignedBigInt64"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TcHmi.Controls.Beckhoff.TcHmiNumericInput.ValueType": {
|
||||
"type": "string",
|
||||
"enum": ["Number", "BigInt64", "UnsignedBigInt64"]
|
||||
},
|
||||
"TcHmi.Controls.Beckhoff.TcHmiNumericInput.UnitPosition": {
|
||||
"title": "Numeric Input Unit Position",
|
||||
"type": "string",
|
||||
"enum": ["Left", "Right"],
|
||||
"default": "Right"
|
||||
},
|
||||
"TcHmi.Controls.Beckhoff.TcHmiNumericInput.DecimalPrecisionMode": {
|
||||
"type": "string",
|
||||
"enum": ["Truncate", "Round"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/** Styles for all themes */
|
||||
|
||||
/* Style for the main element */
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput {
|
||||
/* Prevent overflow if the border radius is huge */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template {
|
||||
position: relative;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input {
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-style: inherit;
|
||||
font-weight: inherit;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
padding: 2px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
cursor: text;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
/* The main use for this control is interaction. So mark when this is not allowed. */
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput.TcHmi_Controls_System_TcHmiControl-operate-disallowed::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
z-index: 100;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-invalid-notification {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
pointer-events: none;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input:not(:invalid)
|
||||
+ .TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-invalid-notification {
|
||||
visibility: hidden;
|
||||
}
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input
|
||||
+ .TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-invalid-notification.invalid-notification-alignment-left {
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-unit {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
padding: 0 3px;
|
||||
font-weight: lighter;
|
||||
}
|
||||
@@ -0,0 +1,629 @@
|
||||
// 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 TcHmiNumericInput extends TcHmi.Controls.System.TcHmiControl {
|
||||
#private;
|
||||
constructor(element: JQuery, pcElement: JQuery, attrs: TcHmi.Controls.ControlAttributeList);
|
||||
/** Reference to the root dom element of the current control template as jquery object. */
|
||||
protected __elementTemplateRoot: HTMLElement;
|
||||
/** Reference to the underlying html text textarea or input element as jquery object. */
|
||||
protected __elementInput: HTMLInputElement;
|
||||
/** Reference to the invalid notification label element as jquery object. */
|
||||
protected __elementInvalidNotificationLabel: HTMLLabelElement;
|
||||
protected __elementUnit: HTMLElement;
|
||||
/**
|
||||
* Is set to true if the control is locked and to false if the control is unlocked.
|
||||
* When the control is locked, calls to setValue are ignored.
|
||||
*/
|
||||
protected __locked: boolean;
|
||||
/** Internal reference to the attribute "data-tchmi-value-type" */
|
||||
protected __valueType: 'Number' | 'BigInt64' | 'UnsignedBigInt64' | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-value" */
|
||||
protected __value: number | bigint | null | undefined;
|
||||
protected __valueInit: number | bigint | null | undefined;
|
||||
/** Value at focusin time */
|
||||
protected __oldValue: number | bigint | null | undefined;
|
||||
/** Value of the input element at focusin time */
|
||||
protected __oldStringValue: string;
|
||||
/** Last input string which could be converted into a number */
|
||||
protected __lastValidValue: number | bigint | undefined;
|
||||
/** Last value reported via onPropertyChanged (The value returned by getValue when onPropertyChanged was raised) */
|
||||
protected __lastReportedValue: number | bigint | null | undefined;
|
||||
/** Last input string which could be converted into a number */
|
||||
protected __lastInput: string | undefined;
|
||||
/** Last cursor position when there was a string entered that could be converted to a number */
|
||||
protected __lastSelection: {
|
||||
start: number | null;
|
||||
end: number | null;
|
||||
direction: "forward" | "backward" | "none" | null;
|
||||
};
|
||||
/** Internal reference to the attribute "data-tchmi-min-value" */
|
||||
protected __maxValue: number | bigint | null | undefined;
|
||||
protected __maxValueInit: number | bigint | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-max-value" */
|
||||
protected __minValue: number | bigint | null | undefined;
|
||||
protected __minValueInit: number | bigint | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-decimal-digits" */
|
||||
protected __decimalDigits: number | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-unit" */
|
||||
protected __unit: string | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-system-keyboard-input-mode" */
|
||||
protected __systemKeyboardInputMode: TcHmi.Keyboard.KeyboardInputMode | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-text-horizontal-alignment */
|
||||
protected __valueHorizontalAlignment: TcHmi.HorizontalAlignment | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-content-padding" */
|
||||
protected __contentPadding: TcHmi.FourSidedCss | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-text-font-size" */
|
||||
protected __valueFontSize: number | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-text-font-size-unit" */
|
||||
protected __valueFontSizeUnit: TcHmi.FontSizeUnit | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-text-font-family" */
|
||||
protected __valueFontFamily: TcHmi.FontFamily | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-text-font-style" */
|
||||
protected __valueFontStyle: TcHmi.FontStyle | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-text-font-style" */
|
||||
protected __valueFontWeight: TcHmi.FontWeight | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-placeholder" */
|
||||
protected __placeholder: string | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-zero-padding" */
|
||||
protected __zeroPadding: number | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-text-color" */
|
||||
protected __valueColor: TcHmi.SolidColor | null | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-auto-focus-out" */
|
||||
protected __autoFocusOut: boolean | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-auto-select-text" */
|
||||
protected __autoSelectText: boolean | undefined;
|
||||
/** Internal reference to the attribute 'data-tchmi-ignore-invalid-values' */
|
||||
protected __ignoreInvalidValues: boolean | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-reset-to-last-valid-value" */
|
||||
protected __resetToLastValidValue: boolean | undefined;
|
||||
/** Internal reference to the attribute "data-tchmi-is-valid" */
|
||||
protected __isValid: boolean | undefined;
|
||||
protected __valueBuffer: ValueBuffer<number | bigint | null> | undefined;
|
||||
/** Number formatter */
|
||||
protected __numberFormatter: Intl.NumberFormat;
|
||||
/** Internal reference to the attribute 'data-tchmi-unit-position' */
|
||||
protected __unitPosition: UnitPosition | undefined;
|
||||
/** Internal reference to the attribute 'data-tchmi-decimal-precision-mode' */
|
||||
protected __decimalPrecisionMode: DecimalPrecisionMode | undefined;
|
||||
/**
|
||||
* ReadOnly state of the control.
|
||||
*/
|
||||
protected __isReadOnly: boolean | undefined;
|
||||
/** Interaction has started so we should raise event after it. */
|
||||
protected __triggerUIFinishedOnBlur: boolean;
|
||||
/** The internal min value */
|
||||
protected __internalMinValue: number | bigint | null;
|
||||
/** The internal max value */
|
||||
protected __internalMaxValue: number | bigint | null;
|
||||
/** Localization */
|
||||
protected __localizedInput: {
|
||||
key: string;
|
||||
parameters: any[];
|
||||
};
|
||||
protected __localizationReader: TcHmi.Locale.LocalizationReader | undefined;
|
||||
protected __resizeObserver: ResizeObserver;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Callback function of the resize observer
|
||||
*/
|
||||
protected __onResize(): void;
|
||||
/**
|
||||
* Reads the current value from input element and calls __setValue with the result.
|
||||
*/
|
||||
protected __setValueFromInput(): void;
|
||||
/**
|
||||
* Validates the value of the html input element. Input can ba a number or ''.
|
||||
* Higlights the controls if value is out of range.
|
||||
*/
|
||||
protected __validateInput(): void;
|
||||
/**
|
||||
* Sets the internalMinValue and internalMaxValue and checks if the current value is in the range.
|
||||
* Switches min and max value if minValue is bigger than maxValue.
|
||||
*/
|
||||
protected __setInternalMinMaxValues(): void;
|
||||
/**
|
||||
* Handle submit on keydown
|
||||
*/
|
||||
protected __onKeydown(event: KeyboardEvent): void;
|
||||
/**
|
||||
* Store current selection before modification.
|
||||
*/
|
||||
protected __onBeforeInput(event: InputEvent): void;
|
||||
/**
|
||||
* Handle value change on "input" to support virtual keyboards on mobile devices
|
||||
* which caches the value while editing (iOS for example)
|
||||
* input is fired when the keys has changed text
|
||||
*/
|
||||
protected __onInput(event: InputEvent): void;
|
||||
/**
|
||||
* Is raised if text is pasted into the underlying textarea element.
|
||||
*/
|
||||
protected __onPaste(event: Event): void;
|
||||
/**
|
||||
* Is raised if text is cut from the underlying textarea element.
|
||||
*/
|
||||
protected __onCut(event: Event): void;
|
||||
/**
|
||||
* Is raised if the underlying input element gets the focus.
|
||||
*/
|
||||
protected __onFocusIn(event: FocusEvent): void;
|
||||
/**
|
||||
* Is raised if the underlying input element has lost its focus.
|
||||
*/
|
||||
protected __onFocusOut(event: FocusEvent): void;
|
||||
/**
|
||||
* Performs the steps after a focusout event was received.
|
||||
* @param event The focusout event.
|
||||
*/
|
||||
protected __performFocusOut(event: Event): void;
|
||||
/**
|
||||
* Is raised after successful interaction with a TcHmiKeyboard control with indirect input.
|
||||
* @param event
|
||||
*/
|
||||
protected __onIndirectInputFinished(event: Event): void;
|
||||
/**
|
||||
* Is raised after canceled interaction with a TcHmiKeyboard control with indirect input.
|
||||
* @param event
|
||||
*/
|
||||
protected __onIndirectInputCanceled(event: Event): void;
|
||||
/**
|
||||
* Change the localization of the input elements validity
|
||||
* @param key The localization key.
|
||||
* @param parameters Optional parameters to pass to tchmi_format_string.
|
||||
*/
|
||||
__setLocalizedInputValidity(key: string, ...parameters: any[]): void;
|
||||
/**
|
||||
* Process the value currently held in the input element of the control
|
||||
*/
|
||||
protected __processCurrentValue(): void;
|
||||
/**
|
||||
* Sets the value of the member variable "valueType" if the new value is not equal to the current value.
|
||||
* @param valueNew The new value for value.
|
||||
*/
|
||||
setValueType(valueNew: 'Number' | 'BigInt64' | 'UnsignedBigInt64' | null): void;
|
||||
/**
|
||||
* Processes the current value of valueType by calling all setter functions related to valueType.
|
||||
*/
|
||||
protected __processValueType(): void;
|
||||
/**
|
||||
* Returns the current value of the member variable "valueType".
|
||||
* @returns The current value of the member variable "valueType".
|
||||
*/
|
||||
getValueType(): void;
|
||||
/**
|
||||
* Sets the value of the member variable "value" if the new value is not equal to the current value
|
||||
* or the current control instance is locked and calls the associated process function (processValue) after that.
|
||||
* @param valueNew The new value for value.
|
||||
*/
|
||||
setValue(valueNew: number | bigint | null): void;
|
||||
/**
|
||||
* Sets the value of the member variable "value" regardless of lock.
|
||||
* @param valueNew The new value for value
|
||||
*/
|
||||
protected __setValue(valueNew: number | bigint | null | undefined, options?: {
|
||||
process?: boolean;
|
||||
fromInput?: boolean;
|
||||
}): void;
|
||||
/**
|
||||
* Returns the last valid value.
|
||||
* @returns the last valid value.
|
||||
*/
|
||||
getValue<T extends number | bigint = number>(): T | null | undefined;
|
||||
/**
|
||||
* Processes the current value of value and forwards it to the value attribute of the underlying input variable.
|
||||
* The current value of value is only forwarded if it is no binding expression.
|
||||
*/
|
||||
protected __processValue(fromInput?: boolean): void;
|
||||
/**
|
||||
* Formats a value due to the current decimal digit, zero padding configuration.
|
||||
* @param value
|
||||
*/
|
||||
protected __formatValue(value: number | bigint | null | undefined): string;
|
||||
/**
|
||||
* Floor a numeric value to specific decimal digits
|
||||
*/
|
||||
protected __floorToDecimals(value: number | bigint): string;
|
||||
/**
|
||||
* Ceil a numeric value to specific decimal digits
|
||||
*/
|
||||
protected __ceilToDecimals(value: number | bigint): string;
|
||||
/**
|
||||
* Sets the value of the member variable "minValue".
|
||||
* @param valueNew The new value for minValue
|
||||
*/
|
||||
setMinValue(valueNew: number | bigint | null | undefined): void;
|
||||
/**
|
||||
* Returns the current value of the member variable minValue.
|
||||
* @returns the current value of the member variable minValue.
|
||||
*/
|
||||
getMinValue<T extends number | bigint = number>(): T | null | undefined;
|
||||
/**
|
||||
* Processes the current minValue
|
||||
*/
|
||||
protected __processMinMaxValue(): void;
|
||||
/**
|
||||
* Sets the value of the member variable "maxValue".
|
||||
* @param valueNew The new value for maxValue
|
||||
*/
|
||||
setMaxValue(valueNew: number | bigint | null | undefined): void;
|
||||
/**
|
||||
* Returns the current value of the member variable maxValue.
|
||||
* @returns the current value of the member variable maxValue.
|
||||
*/
|
||||
getMaxValue<T extends number | bigint = number>(): T | null | undefined;
|
||||
/**
|
||||
* Sets the value of the member variable decimalDigits.
|
||||
* @param valueNew The new value for decimalDigits
|
||||
*/
|
||||
setDecimalDigits(valueNew: number | null): void;
|
||||
/**
|
||||
* Returns the current value of the member variable decimalDigits.
|
||||
* @returns the current value of the member variable decimalDigits.
|
||||
*/
|
||||
getDecimalDigits(): number | null | undefined;
|
||||
/**
|
||||
* Processes the current value of decimalDigits and .
|
||||
*/
|
||||
protected __processDecimalDigits(): void;
|
||||
/**
|
||||
* Updates the NumberFormat object that formats the numeric value to the displayed string due to the current zeroPadding, decimalDigits and decimalPrecisionMode.
|
||||
*/
|
||||
protected __updateFormatter(): void;
|
||||
/**
|
||||
* Sets the decimalPrecisionMode attribute.
|
||||
* @param valueNew The new value for decimalPrecisionMode.
|
||||
*/
|
||||
setDecimalPrecisionMode(valueNew: DecimalPrecisionMode | null): void;
|
||||
/**
|
||||
* Returns the current value of decimalPrecisionMode.
|
||||
*/
|
||||
getDecimalPrecisionMode(): DecimalPrecisionMode | undefined;
|
||||
/**
|
||||
* Processes the current value of attribute decimalPrecisionMode.
|
||||
*/
|
||||
protected __processDecimalPrecisionMode(): void;
|
||||
/**
|
||||
* Sets the unit value and calls the associated process function (processUnit).
|
||||
* @param valueNew The new value for unit.
|
||||
*/
|
||||
setUnit(valueNew: string | null): void;
|
||||
/**
|
||||
* Returns the current value of unit.
|
||||
* @returns The current value of unit.
|
||||
*/
|
||||
getUnit(): string | null | undefined;
|
||||
/**
|
||||
* Processes the current unit attribute value.
|
||||
*/
|
||||
protected __processUnit(): void;
|
||||
/**
|
||||
* Sets the unitPosition attribute.
|
||||
* @param valueNew The new value for unitPosition.
|
||||
*/
|
||||
setUnitPosition(valueNew: UnitPosition | null): void;
|
||||
/**
|
||||
* Returns the current value of unitPosition.
|
||||
*/
|
||||
getUnitPosition(): UnitPosition | undefined;
|
||||
/**
|
||||
* Processes the current value of attribute unitPosition.
|
||||
*/
|
||||
protected __processUnitPosition(): void;
|
||||
/**
|
||||
* Sets the value of the member variable SystemKeyboardInputMode.
|
||||
* @param valueNew The new value for SystemKeyboardInputMode.
|
||||
*/
|
||||
setSystemKeyboardInputMode(valueNew: TcHmi.Keyboard.KeyboardInputMode | null): void;
|
||||
/**
|
||||
* Returns the current value of the member variable text.
|
||||
* @returns the current value of the member variable text.
|
||||
*/
|
||||
getSystemKeyboardInputMode(): string | null | undefined;
|
||||
protected __processSystemKeyboardInputMode(): void;
|
||||
/**
|
||||
* Sets the text horizontal alignment and calls the associated process function (processValueHorizontalAlignment).
|
||||
* @param valueNew The new value for textHorizontalAlignment.
|
||||
*/
|
||||
setValueHorizontalAlignment(valueNew: TcHmi.HorizontalAlignment | null): void;
|
||||
/**
|
||||
* Returns the current value of textHorizontalAlignment.
|
||||
* @returns The current value of textHorizontalAlignment.
|
||||
*/
|
||||
getValueHorizontalAlignment(): TcHmi.HorizontalAlignment | null | undefined;
|
||||
/**
|
||||
* Processes the current textHorizontalAlignment attribute value.
|
||||
*/
|
||||
protected __processValueHorizontalAlignment(): void;
|
||||
/**
|
||||
* Sets the contentPadding value and calls the associated process function (processContentPadding) after it.
|
||||
* @param valueNew The new value for the contentPadding attribute as object.
|
||||
*/
|
||||
setContentPadding(valueNew: TcHmi.FourSidedCss | null): void;
|
||||
/**
|
||||
* The watch callback for the contentPadding object resolver.
|
||||
*/
|
||||
protected __onResolverForContentPaddingWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<TcHmi.FourSidedCss>): void;
|
||||
/**
|
||||
* Returns the current contentPadding value.
|
||||
* @returns The current value of the contentPadding member variable as json in string format.
|
||||
*/
|
||||
getContentPadding(): TcHmi.FourSidedCss | null | undefined;
|
||||
/**
|
||||
* Processes the current contentPadding attribute.
|
||||
*/
|
||||
protected __processContentPadding(): void;
|
||||
/**
|
||||
* Sets the font size and calls the associated process function (processValueFontSize).
|
||||
* @param valueNew The new value for textFontSize.
|
||||
*/
|
||||
setValueFontSize(valueNew: number | null): void;
|
||||
/**
|
||||
* Returns the current value of textFontSize.
|
||||
* @returns The current value of textFontSize.
|
||||
*/
|
||||
getValueFontSize(): number | undefined;
|
||||
/**
|
||||
* Processes the current textFontSize attribute value.
|
||||
*/
|
||||
protected __processValueFontSize(): void;
|
||||
/**
|
||||
* Sets the font size and calls the associated process function (processValueFontSizeUnit).
|
||||
* @param valueNew The new value for textFontSize.
|
||||
*/
|
||||
setValueFontSizeUnit(valueNew: TcHmi.FontSizeUnit | null): void;
|
||||
/**
|
||||
* Returns the current value of textFontSizeUnit.
|
||||
* @returns The current value of textFontSizeUnit.
|
||||
*/
|
||||
getValueFontSizeUnit(): TcHmi.FontSizeUnit | undefined;
|
||||
/**
|
||||
* Processes the current textFontSizeUnit attribute value.
|
||||
*/
|
||||
protected __processValueFontSizeUnit(): void;
|
||||
/**
|
||||
* Sets the font family and calls the associated process function (processValueFontFamily).
|
||||
* @param valueNew The new value for textFontFamily.
|
||||
*/
|
||||
setValueFontFamily(valueNew: TcHmi.FontFamily | null): void;
|
||||
/**
|
||||
* Returns the current value of textFontFamily.
|
||||
* @returns The current value of textFontFamily.
|
||||
*/
|
||||
getValueFontFamily(): string | null | undefined;
|
||||
/**
|
||||
* Processes the current textFontFamily attribute value.
|
||||
*/
|
||||
protected __processValueFontFamily(): void;
|
||||
/**
|
||||
* Sets the font style and calls the associated process function (processValueFontStyle).
|
||||
* @param valueNew The new value for textFontStyle.
|
||||
*/
|
||||
setValueFontStyle(valueNew: TcHmi.FontStyle | null): void;
|
||||
/**
|
||||
* Returns the current value of textFontStyle.
|
||||
* @returns The current value of textFontStyle.
|
||||
*/
|
||||
getValueFontStyle(): TcHmi.FontStyle | undefined;
|
||||
/**
|
||||
* Processes the current textFontStyle attribute value.
|
||||
*/
|
||||
protected __processValueFontStyle(): void;
|
||||
/**
|
||||
* Sets the font weight and calls the associated process function (processValueFontWeight).
|
||||
* @param valueNew The new value for textFontWeight.
|
||||
*/
|
||||
setValueFontWeight(valueNew: TcHmi.FontWeight | null): void;
|
||||
/**
|
||||
* Returns the current value of textFontWeight.
|
||||
* @returns The current value of textFontWeight.
|
||||
*/
|
||||
getValueFontWeight(): TcHmi.FontWeight | undefined;
|
||||
/**
|
||||
* Processes the current textFontWeight attribute value.
|
||||
*/
|
||||
protected __processValueFontWeight(): void;
|
||||
/**
|
||||
* Sets the placeholder value and calls the associated process function (processPlaceholder).
|
||||
* @param valueNew The new value for placeholder.
|
||||
*/
|
||||
setPlaceholder(valueNew: string | null): void;
|
||||
/**
|
||||
* Returns the current value of placeholder.
|
||||
* @returns The current value of placeholder.
|
||||
*/
|
||||
getPlaceholder(): string | null | undefined;
|
||||
/**
|
||||
* Processes the current placeholder attribute value.
|
||||
*/
|
||||
protected __processPlaceholder(): void;
|
||||
/**
|
||||
* Sets the value of the member variable "ZeroPadding".
|
||||
* @param valueNew The new value for ZeroPadding
|
||||
*/
|
||||
setZeroPadding(valueNew: number | null | undefined): void;
|
||||
/**
|
||||
* Returns the current value of the member variable ZeroPadding.
|
||||
* @returns the current value of the member variable ZeroPadding.
|
||||
*/
|
||||
getZeroPadding(): number | null | undefined;
|
||||
/**
|
||||
* Processes the current ZeroPadding
|
||||
*/
|
||||
protected __processZeroPadding(): void;
|
||||
/**
|
||||
* Sets the text color and calls the associated process function (processValueColor).
|
||||
* @param valueNew The new value for textColor.
|
||||
*/
|
||||
setValueColor(valueNew: TcHmi.SolidColor | null): void;
|
||||
/**
|
||||
* The watch callback for the textColor object resolver.
|
||||
*/
|
||||
protected __onResolverForValueColorWatchCallback(data: TcHmi.Symbol.ObjectResolver.IWatchResultObject<TcHmi.SolidColor>): void;
|
||||
/**
|
||||
* Returns the current value of textColor.
|
||||
* @returns The current value of textColor.
|
||||
*/
|
||||
getValueColor(): TcHmi.SolidColor | null | undefined;
|
||||
/**
|
||||
* Processes the current textColor attribute value.
|
||||
*/
|
||||
protected __processValueColor(): void;
|
||||
/**
|
||||
* Sets the auto focus out attribute and calls the associated process function (processAutoFocusOut).
|
||||
* @param valueNew The new value for autoFocusOut.
|
||||
*/
|
||||
setAutoFocusOut(valueNew: boolean | null): void;
|
||||
/**
|
||||
* Returns the current value of autoFocusOut.
|
||||
* @returns The current value of autoFocusOut.
|
||||
*/
|
||||
getAutoFocusOut(): boolean | undefined;
|
||||
/**
|
||||
* Processes the current autoFocusOut attribute value.
|
||||
*/
|
||||
protected __processAutoFocusOut(): void;
|
||||
/** Lock handling */
|
||||
/**
|
||||
* Lock the control. Calls to setValue will be ignored until control is unlocked.
|
||||
*/
|
||||
__lock(): void;
|
||||
/**
|
||||
* Unlocks the control.
|
||||
*/
|
||||
__unlock(): void;
|
||||
/**
|
||||
* Checks if the Control is deactivated and adjusts the visualization
|
||||
*/
|
||||
protected __processControlActivation(): void;
|
||||
/**
|
||||
* Processes the current isEnabled attribute value.
|
||||
*/
|
||||
__processIsEnabled(): void;
|
||||
/**
|
||||
* Processes the current AccessConfig attribute value.
|
||||
*/
|
||||
__processAccessConfig(): void;
|
||||
/**
|
||||
* Sets the isReadOnly attribute and calls the associated process function (processIsReadOnly).
|
||||
* @preserve (Part of the public API)
|
||||
*/
|
||||
setIsReadOnly(valueNew: boolean | null): void;
|
||||
/**
|
||||
* Returns the effective value of isReadOnly based on own and parent isReadOnly variable.
|
||||
*/
|
||||
getIsReadOnly(): boolean | undefined;
|
||||
/**
|
||||
* Process IsReadOnly.
|
||||
*/
|
||||
protected __processIsReadOnly(): void;
|
||||
/**
|
||||
* Sets the auto select text attribute and calls the associated process function (processAutoSelectText).
|
||||
* @param valueNew The new value for autoSelectText.
|
||||
*/
|
||||
setAutoSelectText(valueNew: boolean | null): void;
|
||||
/**
|
||||
* Returns the current value of autoSelectText.
|
||||
* @returns The current value of autoSelectText.
|
||||
*/
|
||||
getAutoSelectText(): boolean | undefined;
|
||||
/**
|
||||
* Sets the resetToLastValidValue attribute.
|
||||
* @param valueNew The new value for resetToLastValidValue.
|
||||
*/
|
||||
setResetToLastValidValue(valueNew: boolean | null): void;
|
||||
/**
|
||||
* Returns the current value of resetToLastValidValue.
|
||||
* @returns The current value of resetToLastValidValue.
|
||||
*/
|
||||
getResetToLastValidValue(): boolean | undefined;
|
||||
/**
|
||||
* Processes the current ResetToLastValidValue attribute value.
|
||||
*/
|
||||
__processResetToLastValidValue(): void;
|
||||
/**
|
||||
* Sets the inputProcessingPoint attribute.
|
||||
* @param valueNew The new value for inputProcessingPoint.
|
||||
*/
|
||||
setInputProcessingPoint(valueNew: InputProcessingPoint | keyof typeof InputProcessingPoint | null): void;
|
||||
/**
|
||||
* Returns the current value of inputProcessingPoint.
|
||||
* @returns The current value of inputProcessingPoint.
|
||||
*/
|
||||
getInputProcessingPoint(): InputProcessingPoint | undefined;
|
||||
/**
|
||||
* Processes the current InputProcessingPoint attribute value.
|
||||
*/
|
||||
__processInputProcessingPoint(): void;
|
||||
/**
|
||||
* Sets the ignoreInvalidValues attribute.
|
||||
* @param valueNew The new value for ignoreInvalidValues.
|
||||
*/
|
||||
setIgnoreInvalidValues(valueNew: boolean | null): void;
|
||||
/**
|
||||
* Returns the current value of ignoreInvalidValues.
|
||||
* @returns The current value of ignoreInvalidValues.
|
||||
*/
|
||||
getIgnoreInvalidValues(): boolean | undefined;
|
||||
/**
|
||||
* Processes the current value of attribute ignoreInvalidValues.
|
||||
*/
|
||||
protected __processIgnoreInvalidValues(): void;
|
||||
/**
|
||||
* Sets the focus to the html input element.
|
||||
*/
|
||||
focus(): void;
|
||||
/**
|
||||
* Sets the value of isValid.
|
||||
*/
|
||||
protected __setIsValid(newValue: boolean): void;
|
||||
/**
|
||||
* Returns the current value of isValid.
|
||||
* @returns The current value of isValid.
|
||||
*/
|
||||
getIsValid(): boolean | undefined;
|
||||
}
|
||||
export type UnitPosition = 'Left' | 'Right';
|
||||
export type DecimalPrecisionMode = 'Truncate' | 'Round';
|
||||
export { TcHmiNumericInput as Control };
|
||||
declare const _TcHmiNumericInput: typeof TcHmiNumericInput;
|
||||
type tTcHmiNumericInput = TcHmiNumericInput;
|
||||
type tUnitPosition = UnitPosition;
|
||||
type tDecimalPrecisionMode = DecimalPrecisionMode;
|
||||
declare global {
|
||||
namespace TcHmi.Controls.Beckhoff {
|
||||
const TcHmiNumericInput: typeof _TcHmiNumericInput;
|
||||
type TcHmiNumericInput = tTcHmiNumericInput;
|
||||
namespace TcHmiNumericInput {
|
||||
type UnitPosition = tUnitPosition;
|
||||
type DecimalPrecisionMode = tDecimalPrecisionMode;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="TcHmi_Controls_Beckhoff_TcHmiNumericInput-template tchmi-box">
|
||||
<input
|
||||
class="TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input tchmi-box"
|
||||
inputmode="text"
|
||||
spellcheck="false"
|
||||
/>
|
||||
<label class="TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-invalid-notification tchmi-box hidden"
|
||||
>!</label
|
||||
>
|
||||
<div class="TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-unit tchmi-box"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
/** Styles for the theme: Base-Dark */
|
||||
|
||||
/* Style for the main element */
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput {
|
||||
--tchmi-background: var(--tchmi-background-color-4);
|
||||
--tchmi-color: var(--tchmi-foreground-color-1);
|
||||
--tchmi-background-invalid: var(--tchmi-invalid-color);
|
||||
--tchmi-border-color: var(--tchmi-background-color-2);
|
||||
--tchmi-unit-color: var(--tchmi-foreground-color-4);
|
||||
background-color: var(--tchmi-background);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template {
|
||||
border: 1px solid var(--tchmi-border-color);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input {
|
||||
-webkit-appearance: none; /* Important to have visible box-shadow on input elements in iOS/Safari. */
|
||||
appearance: none;
|
||||
color: var(--tchmi-color);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input:is(:focus, .tchmi-focus, .tchmi-keyboard-user-input) {
|
||||
background: rgba(76, 99, 116, 0.05);
|
||||
}
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input:invalid {
|
||||
background: var(--tchmi-background-invalid);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-invalid-notification {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput.read-only {
|
||||
background: var(--tchmi-read-only-color);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-unit {
|
||||
color: var(--tchmi-unit-color);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/** Styles for the theme: Base */
|
||||
|
||||
/* Style for the main element */
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput {
|
||||
--tchmi-background: var(--tchmi-background-color-4);
|
||||
--tchmi-color: var(--tchmi-foreground-color-1);
|
||||
--tchmi-background-invalid: var(--tchmi-invalid-color);
|
||||
--tchmi-border-color: var(--tchmi-background-color-2);
|
||||
--tchmi-unit-color: var(--tchmi-foreground-color-5);
|
||||
background-color: var(--tchmi-background);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template {
|
||||
border: 1px solid var(--tchmi-border-color);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input {
|
||||
-webkit-appearance: none; /* Important to have visible box-shadow on input elements in iOS/Safari. */
|
||||
appearance: none;
|
||||
color: var(--tchmi-color);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input:is(:focus, .tchmi-focus, .tchmi-keyboard-user-input) {
|
||||
background: rgba(76, 99, 116, 0.05);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input:invalid {
|
||||
background: var(--tchmi-background-invalid);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-invalid-notification {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput.read-only {
|
||||
background: var(--tchmi-read-only-color);
|
||||
}
|
||||
|
||||
.TcHmi_Controls_Beckhoff_TcHmiNumericInput-template-input-unit {
|
||||
color: var(--tchmi-unit-color);
|
||||
}
|
||||
Reference in New Issue
Block a user