@phormal/use-email
Advanced tools
Comparing version 0.1.0-alpha.12 to 0.1.0-alpha.14
@@ -8,5 +8,5 @@ import { MaquetteComponent } from 'maquette'; | ||
private readonly language; | ||
constructor(errorMsgId: string, errors: string[], errorMessages: Record<string, string | ErrorMessageObject>, language: string); | ||
constructor(errorMsgId: string, errors: string[], errorMessages: Record<string, ErrorMessageObject>, language: string); | ||
render(): import("maquette").VNode; | ||
private listOfErrors; | ||
private getErrorMessageElements; | ||
} |
@@ -8,5 +8,5 @@ import { MaquetteComponent } from 'maquette'; | ||
private globalInputOptions; | ||
constructor(option: RadioButtonOption, groupName: string, checked?: boolean, globalInputOptions?: Record<string, string | boolean | EventHandler>); | ||
constructor(option: RadioButtonOption, groupName: string, checked: boolean, globalInputOptions: Record<string, string | boolean | EventHandler>); | ||
get radioButtonId(): string; | ||
render(): import("maquette").VNode; | ||
} |
import { FormField } from '../FormField'; | ||
import { VNode } from 'maquette'; | ||
import { MultiSelectOption } from '../types/globals'; | ||
import { FormFieldConfig } from '../types/interfaces/FormConfig.interface'; | ||
import { MultiSelectConfig } from '../types/interfaces/FormConfig.interface'; | ||
import { Phormal } from "../Phormal"; | ||
@@ -13,3 +13,3 @@ export declare class MultiSelect extends FormField { | ||
private wrapperElement; | ||
constructor(name: string, formField: FormFieldConfig, form: Phormal); | ||
constructor(name: string, formField: MultiSelectConfig, form: Phormal); | ||
render(mountingElement: HTMLElement): void; | ||
@@ -16,0 +16,0 @@ private getSelectWrapper; |
import { FormField } from "../FormField"; | ||
import { RadioButtonOption } from "../types/globals"; | ||
import { FormFieldConfig } from "../types/interfaces/FormConfig.interface"; | ||
import { RadioGroupConfig } from "../types/interfaces/FormConfig.interface"; | ||
import { Phormal } from "../Phormal"; | ||
export declare class RadioGroup extends FormField { | ||
import RadioGroupInterface from "../types/interfaces/RadioGroup.interface"; | ||
export declare class RadioGroup extends FormField implements RadioGroupInterface { | ||
options: RadioButtonOption[]; | ||
constructor(name: string, formField: FormFieldConfig, form: Phormal); | ||
constructor(name: string, formField: RadioGroupConfig, form: Phormal); | ||
get globalInputProperties(): { | ||
@@ -9,0 +10,0 @@ type: string; |
@@ -15,3 +15,3 @@ import FormFieldInterface from './interfaces/FormField.interface'; | ||
export declare type EventHandler = (event: Event, field: FormFieldInterface) => void; | ||
export declare type ErrorMessageObject = string | { | ||
export declare type ErrorMessageObject = { | ||
en: string; | ||
@@ -18,0 +18,0 @@ } & Record<string, string>; |
@@ -1,2 +0,2 @@ | ||
import { FieldCondition, FormFieldType, MultiSelectOption, ValidationType } from '../globals'; | ||
import { FieldCondition, FormFieldType, MultiSelectOption, RadioButtonOption, ValidationType } from '../globals'; | ||
import { HookReturnValue } from './Hook.interface'; | ||
@@ -20,6 +20,13 @@ import EventHandlers from './EventHandlers'; | ||
row?: string; | ||
options?: MultiSelectOption[]; | ||
focus?: boolean; | ||
options?: MultiSelectOption[] | RadioButtonOption[]; | ||
hooks?: HookReturnValue[]; | ||
}; | ||
export declare type FormFieldConfig = FormFieldConfigBase & EventHandlers; | ||
export declare type MultiSelectConfig = Omit<FormFieldConfig, 'options'> & { | ||
options: MultiSelectOption[]; | ||
}; | ||
export declare type RadioGroupConfig = Omit<FormFieldConfig, 'options'> & { | ||
options: RadioButtonOption[]; | ||
}; | ||
export {}; |
@@ -12,2 +12,8 @@ import { FormFieldConfig } from "../types/interfaces/FormConfig.interface"; | ||
resolveField(): void; | ||
/** | ||
* Focuses the input element after having been rendered to the DOM | ||
* | ||
* Is handled here instead of being called in render(), since render() is reimplemented in all FormField subclasses | ||
* */ | ||
focusOnMount(): void; | ||
} |
@@ -21,4 +21,13 @@ 'use strict'; | ||
en: 'Invalid email', | ||
de: 'Ungültige E-Mail', | ||
ru: 'Неверный адрес электронной почты', | ||
es: 'Correo electrónico no válido', | ||
tr: 'Geçersiz e-posta', | ||
// fa: 'ایمیل نامعتبر', | ||
fr: 'Courriel non valide', | ||
de: 'Ungültige E-Mail-Adresse', | ||
ja: '無効なメール', | ||
it: 'Email non valida', | ||
pt: 'E-mail inválido', | ||
zh: '无效的电子邮件', | ||
vi: 'Email không hợp lệ', | ||
} | ||
@@ -25,0 +34,0 @@ } |
@@ -19,4 +19,13 @@ const useEmail = () => { | ||
en: 'Invalid email', | ||
de: 'Ungültige E-Mail', | ||
ru: 'Неверный адрес электронной почты', | ||
es: 'Correo electrónico no válido', | ||
tr: 'Geçersiz e-posta', | ||
// fa: 'ایمیل نامعتبر', | ||
fr: 'Courriel non valide', | ||
de: 'Ungültige E-Mail-Adresse', | ||
ja: '無効なメール', | ||
it: 'Email non valida', | ||
pt: 'E-mail inválido', | ||
zh: '无效的电子邮件', | ||
vi: 'Email không hợp lệ', | ||
} | ||
@@ -23,0 +32,0 @@ } |
@@ -25,4 +25,13 @@ (function (global, factory) { | ||
en: 'Invalid email', | ||
de: 'Ungültige E-Mail', | ||
ru: 'Неверный адрес электронной почты', | ||
es: 'Correo electrónico no válido', | ||
tr: 'Geçersiz e-posta', | ||
// fa: 'ایمیل نامعتبر', | ||
fr: 'Courriel non valide', | ||
de: 'Ungültige E-Mail-Adresse', | ||
ja: '無効なメール', | ||
it: 'Email non valida', | ||
pt: 'E-mail inválido', | ||
zh: '无效的电子邮件', | ||
vi: 'Email không hợp lệ', | ||
} | ||
@@ -29,0 +38,0 @@ } |
{ | ||
"name": "@phormal/use-email", | ||
"version": "0.1.0-alpha.12", | ||
"version": "0.1.0-alpha.14", | ||
"license": "MIT", | ||
@@ -38,3 +38,3 @@ "author": { | ||
], | ||
"gitHead": "d6a5d4f83e700e1fbff4bcfe3af2e02b273352d8" | ||
"gitHead": "1558b6f3f2d03f5b28268724b703fe8954d3fb3d" | ||
} |
@@ -23,4 +23,13 @@ import {Hook, HookReturnValue} from "@phormal/core/src/types/interfaces/Hook.interface"; | ||
en: 'Invalid email', | ||
de: 'Ungültige E-Mail', | ||
ru: 'Неверный адрес электронной почты', | ||
es: 'Correo electrónico no válido', | ||
tr: 'Geçersiz e-posta', | ||
// fa: 'ایمیل نامعتبر', | ||
fr: 'Courriel non valide', | ||
de: 'Ungültige E-Mail-Adresse', | ||
ja: '無効なメール', | ||
it: 'Email non valida', | ||
pt: 'E-mail inválido', | ||
zh: '无效的电子邮件', | ||
vi: 'Email không hợp lệ', | ||
} | ||
@@ -27,0 +36,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25344
38
543
0