UNPKG

@jswf/core

Version:

JavaScript Window Framework

50 lines (49 loc) 1.48 kB
import { BaseView, WINDOW_PARAMS, WINDOW_EVENT_MAP } from "./BaseView"; import "../scss/TableFormView.scss"; export interface ITEM_OPTION { label?: string; type?: "date" | "string" | "textarea" | "password" | "number" | "checkbox" | "select" | "submit" | "image"; name?: string; value?: string | number | boolean | Date; link?: string; image?: string; image_width?: string; styles?: { [key: string]: string; }; events?: { [key: string]: () => void; }; options?: { name: string; value: string | number; }[]; } export interface TableFormViewMap extends WINDOW_EVENT_MAP { itemChange: [FormInputElement]; } export declare type FormInputElement = (HTMLTextAreaElement | HTMLInputElement | HTMLSelectElement | HTMLImageElement) & { value?: string; type2?: string; value2?: Date | undefined; }; /** *入力用ウインドウ * * @export * @class TableFormView * @extends {BaseView} */ export declare class TableFormView extends BaseView<TableFormViewMap> { private items; private footer; constructor(params?: WINDOW_PARAMS); addItem(params: ITEM_OPTION | ITEM_OPTION[]): HTMLElement | null; getItem(name: string): HTMLElement | null; getParams(): { [key: string]: string | number | boolean | undefined; }; setParams(params: { [key: string]: string | number | boolean; }): void; }