class CCPInputWidgetEditorController extends HTMLElement{ #input = null #index = null #type = null #delete_icon = ` ` constructor(){ super(); } connectedCallback(){ } get index(){ return this.#index } computeDefaultInputType(){ if(this.#input.schema.format === "secret"){ return "password" }else if(this.#input.schema.format === "date"){ return "date" }else if(this.#input.schema.format === "time"){ return "time" }else if(this.#input.schema.format === "dateTime"){ return "datetime-local" } return "text" } isSelectedFormat(fmt){ return this.#input.schema.format === fmt } renderDefaultByType(){ if(this.#input.schema.format === "code"){ return ` ` } else { return ` ` } } renderDeleteButton(){ return `` } render(input, i, reopen){ this.#index = i this.#input = input this.#type = input.schema.enum ? "enum" : "string" this.innerHTML = `
${ input.id !== 'ccpimage' ? this.renderDeleteButton() : ''}