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,114 @@
|
||||
import type { Control as TcHmiTextbox } from '../../TcHmiTextbox/TcHmiTextbox.esm.js';
|
||||
import type { Control as TcHmiButton } from '../../TcHmiButton/TcHmiButton.esm.js';
|
||||
import { SelectRecipeTypePrompt } from './SelectRecipeTypePrompt.js';
|
||||
import { OkCancelPrompt } from '../../Helpers/TcHmiPopups/OkCancelPrompt.js';
|
||||
export declare class CreateRecipePrompt extends OkCancelPrompt<{
|
||||
name: string;
|
||||
recipeTypeName: string;
|
||||
recipeType: TcHmi.Server.RecipeManagement.RecipeType;
|
||||
}> {
|
||||
protected __parentControl: TcHmi.Controls.System.TcHmiControl;
|
||||
protected __textbox: TcHmiTextbox;
|
||||
protected __forbiddenNames: Set<string>;
|
||||
protected __nameLabel: HTMLSpanElement;
|
||||
protected __recipeTypeLabel: HTMLSpanElement;
|
||||
protected __pathBoxElement: HTMLDivElement;
|
||||
protected __selectRecipeTypePrompt: SelectRecipeTypePrompt;
|
||||
protected __selectButton: TcHmiButton;
|
||||
protected __recipeType: {
|
||||
name: string;
|
||||
recipeType: TcHmi.Server.RecipeManagement.RecipeType;
|
||||
} | null;
|
||||
/**
|
||||
* Creates a new CreateRecipePrompt instance.
|
||||
* @param parentControl The control which owns the popup.
|
||||
*/
|
||||
constructor(parentControl: TcHmi.Controls.System.TcHmiControl);
|
||||
/**
|
||||
* Destroys the popup and all its controls.
|
||||
* @param force If true, child controls will be removed from the parent control before destruction, to ensure destruction in case of keepAlive === true.
|
||||
*/
|
||||
destroy(force?: boolean): void;
|
||||
/**
|
||||
* Handler for the onTextChanged event of the textbox.
|
||||
*/
|
||||
protected __onTextChanged(): void;
|
||||
/**
|
||||
* Handler for the onPressed event of the select button.
|
||||
*/
|
||||
protected __onSelectPressed(): void;
|
||||
/**
|
||||
* Handler for the keydown event of the popup element.
|
||||
*/
|
||||
protected __onKeydown(event: KeyboardEvent): void;
|
||||
/**
|
||||
* Handler for the click event of path items.
|
||||
* @param event
|
||||
*/
|
||||
protected __onPathItemClicked(event: MouseEvent): void;
|
||||
/**
|
||||
* Validates the given text as a name. A valid name must not be empty and not contain '::'.
|
||||
* @param text The text to validate.
|
||||
*/
|
||||
protected __isValidName(text: string): boolean;
|
||||
/**
|
||||
* Prompts the user for a recipe type.
|
||||
*/
|
||||
protected __promptRecipeType(): Promise<void>;
|
||||
/**
|
||||
* Performs the action for the OK button, i.e. calling prompt.answer().
|
||||
*/
|
||||
protected __ok(): void;
|
||||
/**
|
||||
* Sets the recipeManagementDomain. The recipeManagementDomain must be set to be able to browse recipe types.
|
||||
* @param recipeManagementDomain The server domain that is used for recipe management.
|
||||
*/
|
||||
setRecipeManagementDomain(recipeManagementDomain: string | null): void;
|
||||
/**
|
||||
* Sets the allowedRecipeTypes. If not an empty array or null, only recipe types that are included will be shown.
|
||||
* @param allowedRecipeTypes The list of allowed recipe types.
|
||||
*/
|
||||
setAllowedRecipeTypes(allowedRecipeTypes: string[] | null): void;
|
||||
/**
|
||||
* Sets the preselectedRecipeType.
|
||||
* @param preselectedRecipeType The preselected recipe type.
|
||||
*/
|
||||
setPreselectedRecipeType(preselectedRecipeType: string[]): void;
|
||||
/**
|
||||
* Shows the popup and waits for the user to answer the prompt. A Promise is returned that will be resolved with the value the user provides.
|
||||
* @param forbiddenNames Names that cannot be entered (i.e. because another item with this name already exists).
|
||||
*/
|
||||
prompt(forbiddenNames?: Iterable<string> | null, defaultValue?: string): Promise<{
|
||||
isOk: true;
|
||||
value: {
|
||||
name: string;
|
||||
recipeTypeName: string;
|
||||
recipeType: TcHmi.Server.RecipeManagement.RecipeType;
|
||||
};
|
||||
} | {
|
||||
isOk: false;
|
||||
value?: void | undefined;
|
||||
}>;
|
||||
/**
|
||||
* Shows the popup.
|
||||
*/
|
||||
show(): void;
|
||||
/**
|
||||
* Hides the popup.
|
||||
*/
|
||||
hide(): void;
|
||||
/**
|
||||
* Sets localizable texts to the given localization symbols.
|
||||
* @param texts A collection of localization symbol expressions.
|
||||
*/
|
||||
setLocalizations(texts: Partial<LocalizableTexts>): void;
|
||||
}
|
||||
export interface LocalizableTexts extends OkCancelPrompt.LocalizableTexts {
|
||||
headerText: TcHmi.Localizable;
|
||||
nameLabelText: TcHmi.Localizable;
|
||||
recipeTypeLabelText: TcHmi.Localizable;
|
||||
selectButtonTooltip: TcHmi.Localizable;
|
||||
recipeTypePopupHeaderText: TcHmi.Localizable;
|
||||
noRecipeTypesText: TcHmi.Localizable;
|
||||
}
|
||||
//# sourceMappingURL=CreateRecipePrompt.d.ts.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,72 @@
|
||||
import type { Control as TcHmiRadioButton } from '../../TcHmiRadioButton/TcHmiRadioButton.esm.js';
|
||||
import { OkCancelPrompt } from '../../Helpers/TcHmiPopups/OkCancelPrompt.js';
|
||||
export declare class FileConflictPrompt extends OkCancelPrompt<Map<string, string>> {
|
||||
protected __existingNames: Set<string>;
|
||||
protected __elementLabel: HTMLElement;
|
||||
protected __rows: Map<string, {
|
||||
skip: TcHmiRadioButton;
|
||||
replace: TcHmiRadioButton;
|
||||
both: TcHmiRadioButton;
|
||||
}>;
|
||||
protected __doAll: {
|
||||
label: HTMLElement;
|
||||
controls: {
|
||||
skip: TcHmiRadioButton;
|
||||
replace: TcHmiRadioButton;
|
||||
both: TcHmiRadioButton;
|
||||
};
|
||||
} | undefined;
|
||||
/**
|
||||
* Creates a new FileConflictPrompt instance.
|
||||
* @param conflictingNames A map of the names that produce conflicts and whether the original file is replaceable (i. e. not read only).
|
||||
* @param parentControl The control which owns the popup.
|
||||
*/
|
||||
constructor(conflictingNames: Map<string, boolean>, existingNames: Iterable<string>, parentControl: TcHmi.Controls.System.TcHmiControl);
|
||||
/**
|
||||
* Destroys the popup and all its controls.
|
||||
* @param force If true, child controls will be removed from the parent control before destruction, to ensure destruction in case of keepAlive === true.
|
||||
*/
|
||||
destroy(force?: boolean): void;
|
||||
/**
|
||||
* Creates a container element with a label and three radio buttons.
|
||||
* @param labelText The text that is displayed in the label.
|
||||
* @param replaceable Whether to enable or disable the 'Replace' radio button.
|
||||
* @param eventHandler The event handler for the radioStateChanged event of the radio buttons.
|
||||
*/
|
||||
protected __buildRow(labelText: string, replaceable?: boolean, eventHandler?: () => void): {
|
||||
container: HTMLDivElement;
|
||||
label: HTMLSpanElement;
|
||||
controls: {
|
||||
skip: TcHmiRadioButton;
|
||||
replace: TcHmiRadioButton;
|
||||
both: TcHmiRadioButton;
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Event handler for the radioStateChanged event of the radio buttons
|
||||
*/
|
||||
protected __onRadioStateChanged(): void;
|
||||
/**
|
||||
* Create an event handler for radioStateChanged event of an all
|
||||
* @param name
|
||||
*/
|
||||
protected __getOnAllRadioStateChangedHandler(name: 'skip' | 'replace' | 'both'): () => void;
|
||||
/**
|
||||
* Performs the action for the OK button, i.e. calling prompt.answer().
|
||||
*/
|
||||
protected __ok(): void;
|
||||
/**
|
||||
* Sets localizable texts to the given localization symbols.
|
||||
* @param texts A collection of localization symbol expressions.
|
||||
*/
|
||||
setLocalizations(texts: Partial<LocalizableTexts>): void;
|
||||
}
|
||||
export interface LocalizableTexts extends OkCancelPrompt.LocalizableTexts {
|
||||
headerText: TcHmi.Localizable;
|
||||
labelText: TcHmi.Localizable;
|
||||
radioTextSkip: TcHmi.Localizable;
|
||||
radioTextReplace: TcHmi.Localizable;
|
||||
radioTextKeepBoth: TcHmi.Localizable;
|
||||
labelDoForAll: TcHmi.Localizable;
|
||||
}
|
||||
//# sourceMappingURL=FileConflictPrompt.d.ts.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,87 @@
|
||||
import type { Control as TcHmiRecipeEdit } from '../TcHmiRecipeEdit.esm.js';
|
||||
import { OkCancelPrompt } from '../../Helpers/TcHmiPopups/OkCancelPrompt.js';
|
||||
import { DirectoryBrowser } from '../../Helpers/TcHmiDirectoryBrowser/DirectoryBrowser.js';
|
||||
import type { PathDisplay } from '../../Helpers/TcHmiDirectoryBrowser/PathDisplay.js';
|
||||
export declare class SelectRecipePrompt extends OkCancelPrompt<{
|
||||
name: string;
|
||||
recipe: TcHmi.Server.RecipeManagement.Recipe;
|
||||
}> {
|
||||
#private;
|
||||
protected __parentControl: TcHmi.Controls.System.TcHmiControl;
|
||||
protected __recipeBrowser: DirectoryBrowser<TcHmi.Server.RecipeManagement.Recipe, TcHmi.Server.RecipeManagement.FolderRecipe>;
|
||||
protected __initialPath: string[] | null;
|
||||
/**
|
||||
* Creates a new SelectRecipePrompt instance.
|
||||
* @param pathDisplay The display to show the currently chosen path in.
|
||||
* @param parentControl The control which owns the popup.
|
||||
*/
|
||||
constructor(pathDisplay: PathDisplay, parentControl: TcHmiRecipeEdit);
|
||||
/**
|
||||
* Handler for the PathChanged event of the recipe type browser.
|
||||
* @param currentItem The current item.
|
||||
* @param path The path to the current item.
|
||||
*/
|
||||
protected __onPathChanged(currentItem: DirectoryBrowser.Item<TcHmi.Server.RecipeManagement.Recipe, TcHmi.Server.RecipeManagement.FolderRecipe> | null, path: string[] | null): void;
|
||||
/**
|
||||
* Handler for the SelectionChanged event of the recipe type browser.
|
||||
* @param selectedItem The selected item, or null if nothing is selected.
|
||||
* @param path The current path.
|
||||
* @param selectedItemName The name of the selected item, or null if nothing is selected.
|
||||
*/
|
||||
protected __onSelectionChanged(selectedItems: DirectoryBrowser.DescendantItem<TcHmi.Server.RecipeManagement.Recipe, TcHmi.Server.RecipeManagement.FolderRecipe>[] | null): void;
|
||||
/**
|
||||
* Suspends the RecipeBrowser of this popup.
|
||||
*/
|
||||
suspend(): void;
|
||||
/**
|
||||
* Resumes the RecipeBrowser of this popoup.
|
||||
*/
|
||||
resume(): void;
|
||||
/**
|
||||
* Sets the path of the RecipeBrowser to the specified value.
|
||||
* @param value The path.
|
||||
*/
|
||||
setPath(value: string[]): Promise<{
|
||||
name: string;
|
||||
recipe: import("Beckhoff.TwinCAT.HMI.Framework/dist/API/Server.RecipeManagement.js").Recipe;
|
||||
} | null>;
|
||||
/**
|
||||
* Sets the path of the RecipeBrowser to the root directory.
|
||||
*/
|
||||
reset(): void;
|
||||
/**
|
||||
* Callback function for TcHmi.Server.RecipeManagement.watchRecipeList.
|
||||
* @param data The recipes.
|
||||
*/
|
||||
setRecipeList(rootDirectory: TcHmi.Server.RecipeManagement.FolderRecipe | null): void;
|
||||
/**
|
||||
* Performs the action for the OK button, i.e. calling prompt.answer(). Must be implemented by inheriting class.
|
||||
*/
|
||||
protected __ok(): Promise<void>;
|
||||
/**
|
||||
* Performs the action for the Cancel button.
|
||||
*/
|
||||
protected __cancel(): void;
|
||||
/**
|
||||
* Shows the popup and waits for the user to answer the prompt. A Promise is returned that will be resolved with the value the user provides.
|
||||
*/
|
||||
prompt(): Promise<{
|
||||
isOk: true;
|
||||
value: {
|
||||
name: string;
|
||||
recipe: TcHmi.Server.RecipeManagement.Recipe;
|
||||
};
|
||||
} | {
|
||||
isOk: false;
|
||||
value?: void | undefined;
|
||||
}>;
|
||||
/**
|
||||
* Sets localizable texts to the given localization symbols.
|
||||
* @param texts A collection of localization symbol expressions.
|
||||
*/
|
||||
setLocalizations(texts: Partial<LocalizableTexts>): void;
|
||||
}
|
||||
export interface LocalizableTexts extends OkCancelPrompt.LocalizableTexts {
|
||||
headerText: TcHmi.Localizable;
|
||||
}
|
||||
//# sourceMappingURL=SelectRecipePrompt.d.ts.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,110 @@
|
||||
import { OkCancelPrompt } from '../../Helpers/TcHmiPopups/OkCancelPrompt.js';
|
||||
import { DirectoryBrowser } from '../../Helpers/TcHmiDirectoryBrowser/DirectoryBrowser.js';
|
||||
import type { PathDisplay } from '../../Helpers/TcHmiDirectoryBrowser/PathDisplay.js';
|
||||
export declare class SelectRecipeTypePrompt extends OkCancelPrompt<{
|
||||
name: string;
|
||||
recipeType: TcHmi.Server.RecipeManagement.RecipeType;
|
||||
}> {
|
||||
#private;
|
||||
protected __parentControl: TcHmi.Controls.System.TcHmiControl;
|
||||
protected __recipeTypeBrowser: DirectoryBrowser<TcHmi.Server.RecipeManagement.RecipeType, TcHmi.Server.RecipeManagement.FolderRecipeType>;
|
||||
protected __initialPath: string[] | null;
|
||||
protected __recipeManagementDomain: string | null;
|
||||
protected __allowedRecipeTypes: string[] | null;
|
||||
protected __preselectedRecipeType: string[];
|
||||
protected __unwatchRecipeTypesList: TcHmi.DestroyFunction | null;
|
||||
protected __emptyNotification: HTMLDivElement;
|
||||
/**
|
||||
* Creates a new SelectRecipeTypePrompt instance.
|
||||
* @param pathDisplay The display to show the currently chosen path in.
|
||||
* @param parentControl The control which owns the popup.
|
||||
*/
|
||||
constructor(pathDisplay: PathDisplay, parentControl: TcHmi.Controls.System.TcHmiControl);
|
||||
/**
|
||||
* Handler for the PathChanged event of the recipe type browser.
|
||||
* @param currentItem The current item.
|
||||
* @param path The path to the current item.
|
||||
*/
|
||||
protected __onPathChanged(currentItem: DirectoryBrowser.Item<TcHmi.Server.RecipeManagement.RecipeType, TcHmi.Server.RecipeManagement.FolderRecipeType> | null, path: string[] | null): void;
|
||||
/**
|
||||
* Handler for the SelectionChanged event of the recipe type browser.
|
||||
* @param selectedItem The selected item, or null if nothing is selected.
|
||||
* @param path The current path.
|
||||
* @param selectedItemName The name of the selected item, or null if nothing is selected.
|
||||
*/
|
||||
protected __onSelectionChanged(selectedItems: DirectoryBrowser.DescendantItem<TcHmi.Server.RecipeManagement.RecipeType, TcHmi.Server.RecipeManagement.FolderRecipeType>[] | null): void;
|
||||
/**
|
||||
* Suspends the RecipeTypeBrowser of this popup.
|
||||
*/
|
||||
suspend(): void;
|
||||
/**
|
||||
* Resumes the RecipeTypeBrowser of this popoup.
|
||||
*/
|
||||
resume(): void;
|
||||
/**
|
||||
* Sets the path of the RecipeTypeBrowser to the root directory.
|
||||
*/
|
||||
reset(): Promise<void>;
|
||||
/**
|
||||
* Sets the recipeManagementDomain. The recipeManagementDomain must be set to be able to browse recipe types.
|
||||
* @param recipeManagementDomain The server domain that is used for recipe management.
|
||||
*/
|
||||
setRecipeManagementDomain(recipeManagementDomain: string | null): void;
|
||||
/**
|
||||
* Sets the allowedRecipeTypes. If not an empty array or null, only recipe types that are included will be shown.
|
||||
* @param allowedRecipeTypes The list of allowed recipe types.
|
||||
*/
|
||||
setAllowedRecipeTypes(allowedRecipeTypes: string[] | null): void;
|
||||
/**
|
||||
* Sets the preselectedRecipeType.
|
||||
* @param preselectedRecipeType The preselected recipe type.
|
||||
*/
|
||||
setPreselectedRecipeType(preselectedRecipeType: string[]): void;
|
||||
/**
|
||||
* Gets the currently selected recipe type. Returns null if no recipe type is selected.
|
||||
*/
|
||||
getSelectedRecipeType(): Promise<{
|
||||
name: string;
|
||||
recipeType: import("Beckhoff.TwinCAT.HMI.Framework/dist/API/Server.RecipeManagement.js").RecipeType;
|
||||
} | null>;
|
||||
/**
|
||||
* Unwatches and rewatches the recipe types list.
|
||||
*/
|
||||
protected __watchRecipeTypes(): void;
|
||||
/**
|
||||
* Callback function for TcHmi.Server.RecipeManagement.watchRecipeList.
|
||||
* @param data The recipes.
|
||||
*/
|
||||
protected __onRecipeTypeListWatch(data: TcHmi.Server.RecipeManagement.IWatchResultObject<TcHmi.Server.RecipeManagement.FolderRecipeType>): void;
|
||||
/**
|
||||
* Performs the action for the OK button, i.e. calling prompt.answer(). Must be implemented by inheriting class.
|
||||
*/
|
||||
protected __ok(): Promise<void>;
|
||||
/**
|
||||
* Performs the action for the Cancel button.
|
||||
*/
|
||||
protected __cancel(): void;
|
||||
/**
|
||||
* Shows the popup and waits for the user to answer the prompt. A Promise is returned that will be resolved with the value the user provides.
|
||||
*/
|
||||
prompt(): Promise<{
|
||||
isOk: true;
|
||||
value: {
|
||||
name: string;
|
||||
recipeType: TcHmi.Server.RecipeManagement.RecipeType;
|
||||
};
|
||||
} | {
|
||||
isOk: false;
|
||||
value?: void | undefined;
|
||||
}>;
|
||||
/**
|
||||
* Sets localizable texts to the given localization symbols.
|
||||
* @param texts A collection of localization symbol expressions.
|
||||
*/
|
||||
setLocalizations(texts: Partial<LocalizableTexts>): void;
|
||||
}
|
||||
export interface LocalizableTexts extends OkCancelPrompt.LocalizableTexts {
|
||||
headerText: TcHmi.Localizable;
|
||||
noRecipeTypesText: TcHmi.Localizable;
|
||||
}
|
||||
//# sourceMappingURL=SelectRecipeTypePrompt.d.ts.map
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user