UNPKG

@react-form-builder/core

Version:

React JSON Schema Form Builder to create complex, validated, reusable forms with no deep React knowledge required

38 lines (37 loc) 1.07 kB
import { BiDi as o } from "./bidi.js"; class t { /** * Creates a localization language for the form builder. * @param code the language code, for example, 'en'. * @param dialect the dialect code, for example, 'US'. * @param name the name of the language, for example 'English'. * @param description the description of the language, for example 'American English'. * @param bidi the type of text layout, for example, BiDi.LTR. */ constructor(i, e, d, c, n = o.LTR) { this.code = i, this.dialect = e, this.name = d, this.description = c, this.bidi = n; } code; dialect; name; description; bidi; /** * @returns the full code of the Language i.e. en-US, en-GB etc. */ get fullCode() { return `${this.code}-${this.dialect}`; } /** * Clones an existing instance of the language. * @param source the cloning object. * @returns the object clone. */ static clone(i) { return new t(i.code, i.dialect, i.name, i.description, i.bidi); } } export { t as Language }; //# sourceMappingURL=language.js.map