mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
Separate Identity constants into its own class
This commit is contained in:
@@ -1,16 +1,4 @@
|
||||
export class AutoFillConstants {
|
||||
static readonly IdentityAttributes: string[] = [
|
||||
"autoCompleteType",
|
||||
"data-stripe",
|
||||
"htmlName",
|
||||
"htmlID",
|
||||
"label-tag",
|
||||
"placeholder",
|
||||
"label-left",
|
||||
"label-top",
|
||||
"data-recurly",
|
||||
];
|
||||
|
||||
static readonly UsernameFieldNames: string[] = [
|
||||
// English
|
||||
"username",
|
||||
@@ -32,6 +20,58 @@ export class AutoFillConstants {
|
||||
"benutzer id",
|
||||
];
|
||||
|
||||
static readonly ExcludedAutofillTypes: string[] = [
|
||||
"radio",
|
||||
"checkbox",
|
||||
"hidden",
|
||||
"file",
|
||||
"button",
|
||||
"image",
|
||||
"reset",
|
||||
"search",
|
||||
];
|
||||
|
||||
static readonly OperationDelays = new Map<string, number>([["buzzsprout.com", 100]]);
|
||||
}
|
||||
|
||||
export class CreditCardAutoFillConstants {
|
||||
static readonly CardAttributes: string[] = [
|
||||
"autoCompleteType",
|
||||
"data-stripe",
|
||||
"htmlName",
|
||||
"htmlID",
|
||||
"label-tag",
|
||||
"placeholder",
|
||||
"label-left",
|
||||
"label-top",
|
||||
"data-recurly",
|
||||
];
|
||||
|
||||
static readonly CardAttributesExtended: string[] = [
|
||||
...CreditCardAutoFillConstants.CardAttributes,
|
||||
"label-right",
|
||||
];
|
||||
|
||||
// Each index represents a language. These three arrays should all be the same length.
|
||||
// 0: English, 1: Danish, 2: German/Dutch, 3: French/Spanish/Italian, 4: Russian, 5: Portuguese
|
||||
static readonly MonthAbbr = ["mm", "mm", "mm", "mm", "mm", "mm"];
|
||||
static readonly YearAbbrShort = ["yy", "åå", "jj", "aa", "гг", "rr"];
|
||||
static readonly YearAbbrLong = ["yyyy", "åååå", "jjjj", "aa", "гггг", "rrrr"];
|
||||
}
|
||||
|
||||
export class IdentityAutoFillConstants {
|
||||
static readonly IdentityAttributes: string[] = [
|
||||
"autoCompleteType",
|
||||
"data-stripe",
|
||||
"htmlName",
|
||||
"htmlID",
|
||||
"label-tag",
|
||||
"placeholder",
|
||||
"label-left",
|
||||
"label-top",
|
||||
"data-recurly",
|
||||
];
|
||||
|
||||
static readonly FirstnameFieldNames: string[] = [
|
||||
// English
|
||||
"f-name",
|
||||
@@ -56,19 +96,6 @@ export class AutoFillConstants {
|
||||
"familienname",
|
||||
];
|
||||
|
||||
static readonly ExcludedAutofillTypes: string[] = [
|
||||
"radio",
|
||||
"checkbox",
|
||||
"hidden",
|
||||
"file",
|
||||
"button",
|
||||
"image",
|
||||
"reset",
|
||||
"search",
|
||||
];
|
||||
|
||||
static readonly OperationDelays = new Map<string, number>([["buzzsprout.com", 100]]);
|
||||
|
||||
static readonly IsoCountries: { [id: string]: string } = {
|
||||
afghanistan: "AF",
|
||||
"aland islands": "AX",
|
||||
@@ -395,28 +422,3 @@ export class AutoFillConstants {
|
||||
saskatchewan: "SK",
|
||||
};
|
||||
}
|
||||
|
||||
export class CreditCardAutoFillConstants {
|
||||
static readonly CardAttributes: string[] = [
|
||||
"autoCompleteType",
|
||||
"data-stripe",
|
||||
"htmlName",
|
||||
"htmlID",
|
||||
"label-tag",
|
||||
"placeholder",
|
||||
"label-left",
|
||||
"label-top",
|
||||
"data-recurly",
|
||||
];
|
||||
|
||||
static readonly CardAttributesExtended: string[] = [
|
||||
...CreditCardAutoFillConstants.CardAttributes,
|
||||
"label-right",
|
||||
];
|
||||
|
||||
// Each index represents a language. These three arrays should all be the same length.
|
||||
// 0: English, 1: Danish, 2: German/Dutch, 3: French/Spanish/Italian, 4: Russian, 5: Portuguese
|
||||
static readonly MonthAbbr = ["mm", "mm", "mm", "mm", "mm", "mm"];
|
||||
static readonly YearAbbrShort = ["yy", "åå", "jj", "aa", "гг", "rr"];
|
||||
static readonly YearAbbrLong = ["yyyy", "åååå", "jjjj", "aa", "гггг", "rrrr"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user