@astro-utils/forms
Version:
Server component for Astro (call server functions from client side with validation and state management)
21 lines (20 loc) • 640 B
TypeScript
import { AstroGlobal } from 'astro';
import { BindForm } from './bind-form.js';
export default class ViewStateManager {
private _bind;
private _elementsState;
private _astro;
private _bindId;
private readonly _FORM_OPTIONS;
private _VALID_KEY;
get filedName(): string;
get stateProp(): any;
get omitProps(): any;
get useState(): any;
constructor(_bind: BindForm<any>, _elementsState: any, _astro: AstroGlobal, _bindId: string | number);
private _initKey;
private _extractStateFromForm;
private _parseState;
loadState(): Promise<boolean>;
createViewState(): Promise<string>;
}