mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:28:17 +08:00
* Fix folder name typo * Smaller fixes * Shortcut rename to Shortcuts * Fix quoted attributes in UE 5.3 * remove KeyboardShortcutAction * Remove more trivial classes * Rename IKeyboardShortcut * Node delete shortcut
66 lines
1.3 KiB
JavaScript
66 lines
1.3 KiB
JavaScript
import { html } from "lit"
|
|
|
|
/**
|
|
* @typedef {import("../element/IElement.js").default} IElement
|
|
* @typedef {import("../input/IInput.js").default} IInput
|
|
* @typedef {import("lit").PropertyValues} PropertyValues
|
|
*/
|
|
|
|
/** @template {IElement} T */
|
|
export default class ITemplate {
|
|
|
|
/** @type {T} */
|
|
element
|
|
|
|
get blueprint() {
|
|
return this.element.blueprint
|
|
}
|
|
|
|
/** @type {IInput[]} */
|
|
#inputObjects = []
|
|
get inputObjects() {
|
|
return this.#inputObjects
|
|
}
|
|
|
|
/** @param {T} element */
|
|
initialize(element) {
|
|
this.element = element
|
|
}
|
|
|
|
createInputObjects() {
|
|
return /** @type {IInput[]} */([])
|
|
}
|
|
|
|
setup() {
|
|
this.#inputObjects.forEach(v => v.setup())
|
|
}
|
|
|
|
cleanup() {
|
|
this.#inputObjects.forEach(v => v.cleanup())
|
|
}
|
|
|
|
/** @param {PropertyValues} changedProperties */
|
|
willUpdate(changedProperties) {
|
|
}
|
|
|
|
/** @param {PropertyValues} changedProperties */
|
|
update(changedProperties) {
|
|
}
|
|
|
|
render() {
|
|
return html``
|
|
}
|
|
|
|
/** @param {PropertyValues} changedProperties */
|
|
firstUpdated(changedProperties) {
|
|
}
|
|
|
|
/** @param {PropertyValues} changedProperties */
|
|
updated(changedProperties) {
|
|
}
|
|
|
|
inputSetup() {
|
|
this.#inputObjects = this.createInputObjects()
|
|
}
|
|
}
|