Move pin templates to subdirectory

This commit is contained in:
barsdeveloper
2022-12-17 10:46:30 +01:00
parent 0c2625aa05
commit 60a8aa544a
24 changed files with 70 additions and 73 deletions

View File

@@ -0,0 +1,22 @@
import { html } from "lit"
import IntegerEntity from "../../entity/IntegerEntity"
import INumericInputPinTemplate from "./INumericInputPinTemplate"
/** @typedef {import("../../entity/IntegerEntity").default} IntEntity */
/** @extends INumericInputPinTemplate<IntEntity> */
export default class IntInputPinTemplate extends INumericInputPinTemplate {
setDefaultValue(values = [], rawValues = values) {
this.element.setDefaultValue(new IntegerEntity(values[0]))
}
renderInput() {
return html`
<div class="ueb-pin-input">
<ueb-input .singleLine="${true}" .innerText="${this.element.entity.DefaultValue?.toString() ?? "0"}">
</ueb-input>
</div>
`
}
}