one
Version:
One is a React framework for web, iOS, and Android apps.
94 lines (93 loc) • 2.47 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all) __defProp(target, name, {
get: all[name],
enumerable: true
});
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
get: () => from[key],
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
});
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var textTypes_exports = {};
__export(textTypes_exports, {
assertTextInputOptions: () => assertTextInputOptions,
keyboardTypes: () => keyboardTypes,
textContentTypes: () => textContentTypes
});
module.exports = __toCommonJS(textTypes_exports);
const keyboardTypes = [
"default",
"asciiCapable",
"numbersAndPunctuation",
"url",
"numberPad",
"phonePad",
"namePhonePad",
"emailAddress",
"decimalPad",
"twitter",
"webSearch",
"asciiCapableNumberPad"
];
const textContentTypes = [
"none",
"URL",
"addressCity",
"addressCityAndState",
"addressState",
"countryName",
"creditCardNumber",
"creditCardExpiration",
"creditCardExpirationMonth",
"creditCardExpirationYear",
"creditCardSecurityCode",
"creditCardType",
"creditCardName",
"creditCardGivenName",
"creditCardMiddleName",
"creditCardFamilyName",
"emailAddress",
"familyName",
"fullStreetAddress",
"givenName",
"jobTitle",
"location",
"middleName",
"name",
"namePrefix",
"nameSuffix",
"nickname",
"organizationName",
"postalCode",
"streetAddressLine1",
"streetAddressLine2",
"sublocality",
"telephoneNumber",
"username",
"password",
"newPassword",
"oneTimeCode",
"birthdate",
"birthdateDay",
"birthdateMonth",
"birthdateYear",
"cellularEID",
"cellularIMEI",
"dateTime",
"flightNumber",
"shipmentTrackingNumber"
];
function assertTextInputOptions(owner, keyboardType, textContentType) {
if (keyboardType && !keyboardTypes.includes(keyboardType)) throw new Error(`${owner} keyboardType must be a supported UIKit keyboard type`);
if (textContentType && !textContentTypes.includes(textContentType)) throw new Error(`${owner} textContentType must be a supported UIKit text content type`);
}