@mobx-sentinel/react
Version:
A TypeScript library for non-intrusive model enhancement in MobX applications. Provides model change detection, validation, and form integration capabilities while maintaining the purity of domain models.
1 lines • 20.3 kB
Source Map (JSON)
{"version":3,"sources":["../src/CheckBoxBinding.ts","../src/InputBinding.ts","../src/RadioButtonBinding.ts","../src/SelectBoxBinding.ts","../src/SubmitButtonBinding.ts","../src/LabelBinding.ts"],"sourcesContent":["import { FormBinding, FormField } from \"@mobx-sentinel/form\";\nimport { makeObservable, computed, action } from \"mobx\";\n\nexport namespace CheckBoxBinding {\n export type Attrs = React.InputHTMLAttributes<HTMLInputElement>;\n export type AttrsRequired = Required<Attrs>;\n\n export type Config = {\n /** Get the value from the model @computed */\n getter: () => boolean;\n /** Set the value to the model @action */\n setter: (value: boolean) => void;\n\n /** [Override] ID of the input element */\n id?: Attrs[\"id\"];\n /** [Extend] Change handler */\n onChange?: Attrs[\"onChange\"];\n /** [Extend] Focus handler */\n onFocus?: Attrs[\"onFocus\"];\n };\n}\n\nexport class CheckBoxBinding implements FormBinding {\n constructor(\n private readonly field: FormField,\n public config: CheckBoxBinding.Config\n ) {\n makeObservable(this);\n }\n\n @computed\n get checked(): CheckBoxBinding.AttrsRequired[\"checked\"] {\n return this.config.getter();\n }\n\n @action\n onChange: CheckBoxBinding.AttrsRequired[\"onChange\"] = (e) => {\n this.config.setter(e.currentTarget.checked);\n this.field.markAsChanged();\n this.config.onChange?.(e);\n };\n\n onFocus: CheckBoxBinding.AttrsRequired[\"onFocus\"] = (e) => {\n this.field.markAsTouched();\n this.config.onFocus?.(e);\n };\n\n @computed\n get errorMessages() {\n if (!this.field.isErrorReported) return null;\n return Array.from(this.field.errors).join(\", \") || null;\n }\n\n get props() {\n return {\n type: \"checkbox\",\n id: this.config.id ?? this.field.id,\n checked: this.checked,\n onChange: this.onChange,\n onFocus: this.onFocus,\n \"aria-invalid\": this.field.isErrorReported,\n \"aria-errormessage\": this.errorMessages ?? undefined,\n } satisfies CheckBoxBinding.Attrs;\n }\n}\n","import { FormBinding, FormField } from \"@mobx-sentinel/form\";\nimport { makeObservable, computed, action } from \"mobx\";\n\nexport namespace InputBinding {\n export type Attrs = React.InputHTMLAttributes<HTMLInputElement>;\n export type AttrsRequired = Required<Attrs>;\n\n type DateValueType = \"date\" | \"datetime-local\" | \"month\" | \"time\" | \"week\";\n type NumericValueType = \"number\" | \"range\" | DateValueType;\n type StringType =\n | \"color\"\n | \"text\"\n | \"tel\"\n | \"url\"\n | \"email\"\n | \"password\"\n | \"search\"\n | DateValueType\n | NumericValueType;\n\n export type Config = {\n /** [Override] ID of the input element */\n id?: Attrs[\"id\"];\n /** [Extend] Change handler */\n onChange?: Attrs[\"onChange\"];\n /** [Extend] Focus handler */\n onFocus?: Attrs[\"onFocus\"];\n /** [Extend] Blur handler */\n onBlur?: Attrs[\"onBlur\"];\n } & (\n | {\n /**\n * Type of form control.\n *\n * When unspecified, it is deduced from the valueAs.\n * @default \"text\" - when valueAs is undefined or \"string\"\n */\n type?: StringType;\n /**\n * Value type of the input element.\n * It determines how getter/setter should handle the value.\n */\n valueAs?: \"string\";\n /** Get the value from the model @computed */\n getter: () => string | null;\n /** Set the value to the model @action */\n setter: (value: string) => void;\n }\n | {\n /**\n * Type of form control.\n *\n * When unspecified, it is deduced from the valueAs.\n * @default \"number\" - when valueAs is \"number\"\n */\n type?: NumericValueType;\n /**\n * Value type of the input element.\n * It determines how getter/setter should handle the value.\n */\n valueAs: \"number\";\n /** Get the value from the model @computed */\n getter: () => number | null;\n /** Set the value to the model @action */\n setter: (value: number | null) => void;\n }\n | {\n /**\n * Type of form control.\n *\n * When unspecified, it is deduced from the valueAs.\n * @default \"date\" - when valueAs is \"date\"\n */\n type?: DateValueType;\n /**\n * Value type of the input element.\n * It determines how getter/setter should handle the value.\n */\n valueAs: \"date\";\n /**\n * Get the value from the model @computed\n *\n * String representation of the date.\n * As Date instance has no distinction between date and datetime,\n * it's developers' responsibility to format the date correctly.\n *\n * | `type` attr | Expected format | Example |\n * |----------------|-------------------|-------------------|\n * | date | YYYY-MM-DD | 2024-12-31 |\n * | datetime-local | YYYY-MM-DDTHH:mm | 2024-12-31T23:59 |\n * | time | HH:mm or HH:mm:ss | 23:59 or 23:59:59 |\n * | week | YYYY-Www | 2024-W52 |\n * | month | YYYY-MM | 2024-12 |\n *\n * @example\n * ```\n * date.toISOString().split(\"T\")[0]\n * ```\n */\n getter: () => string | null;\n /** Set the value to the model @action */\n setter: (value: Date | null) => void;\n }\n );\n}\n\nexport class InputBinding implements FormBinding {\n constructor(\n private readonly field: FormField,\n public config: InputBinding.Config\n ) {\n makeObservable(this);\n }\n\n @computed\n get value(): InputBinding.AttrsRequired[\"value\"] {\n return this.config.getter() ?? \"\";\n }\n\n get type(): InputBinding.AttrsRequired[\"type\"] {\n if (this.config.type) return this.config.type;\n\n switch (this.config.valueAs) {\n case \"number\":\n return \"number\";\n case \"date\":\n return \"date\";\n default:\n return \"text\";\n }\n }\n\n @action\n onChange: InputBinding.AttrsRequired[\"onChange\"] = (e) => {\n switch (this.config.valueAs) {\n case \"number\": {\n const value = e.currentTarget.valueAsNumber;\n this.config.setter(isNaN(value) ? null : value);\n break;\n }\n case \"date\":\n this.config.setter(e.currentTarget.valueAsDate);\n break;\n default:\n this.config.setter(e.currentTarget.value);\n break;\n }\n this.field.markAsChanged(\"intermediate\");\n this.config.onChange?.(e);\n };\n\n onBlur: InputBinding.AttrsRequired[\"onBlur\"] = (e) => {\n this.field.finalizeChangeIfNeeded();\n this.config.onBlur?.(e);\n };\n\n onFocus: InputBinding.AttrsRequired[\"onFocus\"] = (e) => {\n this.field.markAsTouched();\n this.config.onFocus?.(e);\n };\n\n @computed\n get errorMessages() {\n if (!this.field.isErrorReported) return null;\n return Array.from(this.field.errors).join(\", \") || null;\n }\n\n get props() {\n return {\n type: this.type,\n value: this.value,\n id: this.config.id ?? this.field.id,\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n \"aria-invalid\": this.field.isErrorReported,\n \"aria-errormessage\": this.errorMessages ?? undefined,\n } satisfies InputBinding.Attrs;\n }\n}\n","import { FormBinding, FormField } from \"@mobx-sentinel/form\";\nimport { makeObservable, computed, action } from \"mobx\";\n\nexport namespace RadioButtonBinding {\n export type Attrs = React.InputHTMLAttributes<HTMLInputElement>;\n export type AttrsRequired = Required<Attrs>;\n export type Config = {\n /** Get the value from the model */\n getter: () => string | null;\n /** Set the value to the model */\n setter: (value: string) => void;\n\n /** [Extend] Change handler */\n onChange?: Attrs[\"onChange\"];\n /** [Extend] Focus handler */\n onFocus?: Attrs[\"onFocus\"];\n };\n}\n\nexport class RadioButtonBinding implements FormBinding {\n constructor(\n private readonly field: FormField,\n public config: RadioButtonBinding.Config\n ) {\n makeObservable(this);\n }\n\n @computed\n get value(): RadioButtonBinding.AttrsRequired[\"value\"] {\n return this.config.getter() ?? \"\";\n }\n\n @action\n onChange: RadioButtonBinding.AttrsRequired[\"onChange\"] = (e) => {\n if (!e.currentTarget.checked) return;\n this.config.setter(e.currentTarget.value);\n this.field.markAsChanged();\n this.config.onChange?.(e);\n };\n\n onFocus: RadioButtonBinding.AttrsRequired[\"onFocus\"] = (e) => {\n this.field.markAsTouched();\n this.config.onFocus?.(e);\n };\n\n @computed\n get errorMessages() {\n if (!this.field.isErrorReported) return null;\n return Array.from(this.field.errors).join(\", \") || null;\n }\n\n props = (\n /** Value of the radio button */\n value: string | null,\n opt?: {\n /**\n * [Override] ID of the input element.\n *\n * - `true`: Use the field ID as the ID.\n * - `false`: No ID.\n * - `string`: Use the given string as the ID.\n */\n id?: string | boolean;\n /** [Override] Name attribute of the input element */\n name?: string;\n }\n ) => {\n return {\n type: \"radio\",\n id: opt?.id === true ? this.field.id : opt?.id ? opt?.id : undefined,\n value: value ?? \"\",\n name: opt?.name ?? this.field.id,\n checked: this.value === value,\n onChange: this.onChange,\n onFocus: this.onFocus,\n \"aria-invalid\": this.field.isErrorReported,\n \"aria-errormessage\": this.errorMessages ?? undefined,\n } satisfies RadioButtonBinding.Attrs;\n };\n}\n","import { FormBinding, FormField } from \"@mobx-sentinel/form\";\nimport { makeObservable, computed, action } from \"mobx\";\n\nexport namespace SelectBoxBinding {\n export type Attrs = React.SelectHTMLAttributes<HTMLSelectElement>;\n export type AttrsRequired = Required<Attrs>;\n export type Config = {\n /** [Override] ID of the input element */\n id?: Attrs[\"id\"];\n /** [Extend] Change handler */\n onChange?: Attrs[\"onChange\"];\n /** [Extend] Focus handler */\n onFocus?: Attrs[\"onFocus\"];\n } & (\n | {\n /** Whether multiple options can be selected in the list */\n multiple?: false;\n /** Get the value from the model */\n getter: () => string;\n /** Set the value to the model */\n setter: (value: string) => void;\n }\n | {\n /** Whether multiple options can be selected in the list */\n multiple: true;\n /** Get the value from the model */\n getter: () => string[];\n /** Set the value to the model */\n setter: (value: string[]) => void;\n }\n );\n}\n\nexport class SelectBoxBinding implements FormBinding {\n constructor(\n private readonly field: FormField,\n public config: SelectBoxBinding.Config\n ) {\n makeObservable(this);\n }\n\n @computed\n get value(): SelectBoxBinding.AttrsRequired[\"value\"] {\n return this.config.getter() ?? \"\";\n }\n\n @action\n onChange: SelectBoxBinding.AttrsRequired[\"onChange\"] = (e) => {\n if (this.config.multiple) {\n this.config.setter(Array.from(e.currentTarget.selectedOptions, (o) => o.value));\n } else {\n this.config.setter(e.currentTarget.value);\n }\n this.field.markAsChanged();\n this.config.onChange?.(e);\n };\n\n onFocus: SelectBoxBinding.AttrsRequired[\"onFocus\"] = (e) => {\n this.field.markAsTouched();\n this.config.onFocus?.(e);\n };\n\n @computed\n get errorMessages() {\n if (!this.field.isErrorReported) return null;\n return Array.from(this.field.errors).join(\", \") || null;\n }\n\n get props() {\n return {\n id: this.config.id ?? this.field.id,\n multiple: this.config.multiple,\n value: this.value,\n onChange: this.onChange,\n onFocus: this.onFocus,\n \"aria-invalid\": this.field.isErrorReported,\n \"aria-errormessage\": this.errorMessages ?? undefined,\n } satisfies SelectBoxBinding.Attrs;\n }\n}\n","import { Form, FormBinding } from \"@mobx-sentinel/form\";\nimport { makeObservable, computed } from \"mobx\";\n\nexport namespace SubmitButtonBinding {\n export type Attrs = React.ButtonHTMLAttributes<HTMLButtonElement>;\n export type AttrsRequired = Required<Attrs>;\n\n export type Config = {\n /** [Extend] Click handler */\n onClick?: Attrs[\"onClick\"];\n /** [Extend] Mouse enter handler */\n onMouseOver?: Attrs[\"onMouseOver\"];\n };\n}\n\nexport class SubmitButtonBinding implements FormBinding {\n constructor(\n private readonly form: Form<unknown>,\n public config: SubmitButtonBinding.Config\n ) {\n makeObservable(this);\n }\n\n @computed\n get busy(): boolean {\n return this.form.isSubmitting || this.form.isValidating;\n }\n\n onClick: SubmitButtonBinding.AttrsRequired[\"onClick\"] = (e) => {\n this.form.submit().catch((e) => void e);\n this.config.onClick?.(e);\n };\n\n onMouseOver: SubmitButtonBinding.AttrsRequired[\"onMouseOver\"] = (e) => {\n this.form.reportError();\n this.config.onMouseOver?.(e);\n };\n\n get props() {\n return {\n onClick: this.onClick,\n onMouseOver: this.onMouseOver,\n disabled: !this.form.canSubmit,\n \"aria-busy\": this.busy,\n \"aria-invalid\": !this.form.isValid,\n } satisfies SubmitButtonBinding.Attrs;\n }\n}\n","import { FormBinding, FormField } from \"@mobx-sentinel/form\";\nimport { makeObservable, computed } from \"mobx\";\n\nexport namespace LabelBinding {\n export type Attrs = React.LabelHTMLAttributes<HTMLLabelElement>;\n export type AttrsRequired = Required<Attrs>;\n\n export type Config = {\n /** [Override] ID of the target element */\n htmlFor?: Attrs[\"htmlFor\"];\n };\n}\n\nexport class LabelBinding implements FormBinding {\n constructor(\n private readonly fields: FormField[],\n public config: LabelBinding.Config\n ) {\n makeObservable(this);\n }\n\n @computed\n get firstFieldId() {\n return this.fields.at(0)?.id;\n }\n\n @computed\n get firstErrorMessage() {\n for (const field of this.fields) {\n if (!field.isErrorReported) continue;\n for (const error of field.errors) {\n return error;\n }\n }\n return null;\n }\n\n get props() {\n return {\n htmlFor: this.config.htmlFor ?? this.firstFieldId,\n \"aria-invalid\": !!this.firstErrorMessage,\n \"aria-errormessage\": this.firstErrorMessage ?? undefined,\n } satisfies LabelBinding.Attrs;\n }\n}\n"],"mappings":"wMACA,OAAS,kBAAAA,EAAgB,YAAAC,EAAU,UAAAC,MAAc,OAqB1C,IAAMC,EAAN,KAA6C,CAClD,YACmBC,EACVC,EACP,CAFiB,WAAAD,EACV,YAAAC,EAEPC,EAAe,IAAI,CACrB,CAGA,IAAI,SAAoD,CACtD,OAAO,KAAK,OAAO,OAAO,CAC5B,CAGA,SAAuD,GAAM,CAC3D,KAAK,OAAO,OAAO,EAAE,cAAc,OAAO,EAC1C,KAAK,MAAM,cAAc,EACzB,KAAK,OAAO,WAAW,CAAC,CAC1B,EAEA,QAAqD,GAAM,CACzD,KAAK,MAAM,cAAc,EACzB,KAAK,OAAO,UAAU,CAAC,CACzB,EAGA,IAAI,eAAgB,CAClB,OAAK,KAAK,MAAM,iBACT,MAAM,KAAK,KAAK,MAAM,MAAM,EAAE,KAAK,IAAI,GAAK,IACrD,CAEA,IAAI,OAAQ,CACV,MAAO,CACL,KAAM,WACN,GAAI,KAAK,OAAO,IAAM,KAAK,MAAM,GACjC,QAAS,KAAK,QACd,SAAU,KAAK,SACf,QAAS,KAAK,QACd,eAAgB,KAAK,MAAM,gBAC3B,oBAAqB,KAAK,eAAiB,MAC7C,CACF,CACF,EAjCMC,EAAA,CADHC,GARUL,EASP,uBAKJI,EAAA,CADCE,GAbUN,EAcX,wBAYII,EAAA,CADHC,GAzBUL,EA0BP,6BC/CN,OAAS,kBAAAO,EAAgB,YAAAC,EAAU,UAAAC,MAAc,OAyG1C,IAAMC,EAAN,KAA0C,CAC/C,YACmBC,EACVC,EACP,CAFiB,WAAAD,EACV,YAAAC,EAEPC,EAAe,IAAI,CACrB,CAGA,IAAI,OAA6C,CAC/C,OAAO,KAAK,OAAO,OAAO,GAAK,EACjC,CAEA,IAAI,MAA2C,CAC7C,GAAI,KAAK,OAAO,KAAM,OAAO,KAAK,OAAO,KAEzC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AEPC,EAAe,IAAI,CACrB,CAGA,IAAI,cAAe,CACjB,OAAO,KAAK,OAAO,GAAG,CAAC,GAAG,EAC5B,CAGA,IAAI,mBAAoB,CACtB,QAAWC,KAAS,KAAK,OACvB,GAAKA,EAAM,gBACX,QAAWC,KAASD,EAAM,OACxB,OAAOC,EAGX,OAAO,IACT,CAEA,IAAI,OAAQ,CACV,MAAO,CACL,QAAS,KAAK,OAAO,SAAW,KAAK,aACrC,eAAgB,CAAC,CAAC,KAAK,kBACvB,oBAAqB,KAAK,mBAAqB,MACjD,CACF,CACF,EAtBMC,EAAA,CADHC,GARUP,EASP,4BAKAM,EAAA,CADHC,GAbUP,EAcP","names":["makeObservable","computed","action","CheckBoxBinding","field","config","makeObservable","__decorateClass","computed","action","makeObservable","computed","action","InputBinding","field","config","makeObservable","value","__decorateClass","computed","action","makeObservable","computed","action","RadioButtonBinding","field","config","makeObservable","value","opt","__decorateClass","computed","action","makeObservable","computed","action","SelectBoxBinding","field","config","makeObservable","o","__decorateClass","computed","action","makeObservable","computed","SubmitButtonBinding","form","config","makeObservable","e","__decorateClass","computed","makeObservable","computed","LabelBinding","fields","config","makeObservable","field","error","__decorateClass","computed"]}