@protontech/autofill 0.0.22991789 → 0.0.33835493

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/constants/features.d.ts +1 -0
  2. package/constants/features.js +1 -0
  3. package/constants/heuristics.d.ts +5 -4
  4. package/constants/heuristics.js +5 -10
  5. package/constants/selectors.d.ts +13 -7
  6. package/constants/selectors.js +29 -17
  7. package/debug.d.ts +24 -1
  8. package/debug.js +15 -13
  9. package/dictionary/generate.js +30 -21
  10. package/dictionary/generated/dictionary.d.ts +18 -4
  11. package/dictionary/generated/dictionary.js +31 -17
  12. package/dictionary/source/dictionary.d.ts +4 -3
  13. package/dictionary/source/dictionary.js +155 -89
  14. package/dictionary/source/patterns.js +2 -2
  15. package/features/feature.d.ts +18 -0
  16. package/features/feature.js +79 -0
  17. package/features/feature.spec.d.ts +1 -0
  18. package/features/feature.spec.js +55 -0
  19. package/features/v1/abstract.field.d.ts +20401 -0
  20. package/features/v1/abstract.field.js +95 -0
  21. package/features/v1/abstract.form.d.ts +1226 -0
  22. package/features/v1/abstract.form.js +336 -0
  23. package/features/v1/field.email.d.ts +62 -0
  24. package/features/v1/field.email.js +27 -0
  25. package/features/v1/field.otp.d.ts +142 -0
  26. package/features/v1/field.otp.js +105 -0
  27. package/features/v1/field.password.d.ts +162 -0
  28. package/features/v1/field.password.js +81 -0
  29. package/features/v1/field.username-hidden.d.ts +62 -0
  30. package/features/v1/field.username-hidden.js +25 -0
  31. package/features/v1/field.username.d.ts +72 -0
  32. package/features/v1/field.username.js +31 -0
  33. package/features/v1/index.d.ts +4428 -0
  34. package/features/v1/index.js +22 -0
  35. package/features/v1/index.spec.d.ts +1 -0
  36. package/features/v1/index.spec.js +30 -0
  37. package/index.d.ts +7 -2
  38. package/index.js +11 -3
  39. package/models/perceptron/index.d.ts +2 -0
  40. package/models/perceptron/index.js +42 -0
  41. package/models/perceptron/params/email-model.json +53 -0
  42. package/models/perceptron/params/login-model.json +465 -0
  43. package/models/perceptron/params/new-password-model.json +133 -0
  44. package/models/perceptron/params/otp-model.json +117 -0
  45. package/models/perceptron/params/password-change-model.json +465 -0
  46. package/models/perceptron/params/password-model.json +133 -0
  47. package/models/perceptron/params/recovery-model.json +465 -0
  48. package/models/perceptron/params/register-model.json +465 -0
  49. package/models/perceptron/params/username-hidden-model.json +53 -0
  50. package/models/perceptron/params/username-model.json +61 -0
  51. package/models/random_forest/index.d.ts +2 -0
  52. package/models/random_forest/index.js +42 -0
  53. package/models/random_forest/params/email-model.json +1456 -0
  54. package/models/random_forest/params/login-model.json +4194 -0
  55. package/models/random_forest/params/new-password-model.json +1448 -0
  56. package/models/random_forest/params/otp-model.json +2004 -0
  57. package/models/random_forest/params/password-change-model.json +1422 -0
  58. package/models/random_forest/params/password-model.json +1292 -0
  59. package/models/random_forest/params/recovery-model.json +2754 -0
  60. package/models/random_forest/params/register-model.json +3678 -0
  61. package/models/random_forest/params/username-hidden-model.json +1108 -0
  62. package/models/random_forest/params/username-model.json +1052 -0
  63. package/package.json +17 -15
  64. package/rules/v1/index.d.ts +4 -0
  65. package/rules/v1/index.js +66 -0
  66. package/rulesets.d.ts +9 -2
  67. package/rulesets.js +14 -9
  68. package/types/index.d.ts +70 -17
  69. package/types/index.js +34 -1
  70. package/utils/attributes.js +1 -1
  71. package/utils/clustering.js +18 -5
  72. package/utils/credit-card.d.ts +32 -0
  73. package/utils/credit-card.js +259 -0
  74. package/utils/credit-card.samples.spec.d.ts +1 -0
  75. package/utils/credit-card.samples.spec.js +452 -0
  76. package/utils/credit-card.spec.d.ts +1 -0
  77. package/utils/credit-card.spec.js +296 -0
  78. package/utils/dom.d.ts +3 -2
  79. package/utils/dom.js +12 -7
  80. package/utils/exclusion.d.ts +1 -0
  81. package/utils/exclusion.js +22 -10
  82. package/utils/extract.d.ts +1 -0
  83. package/utils/extract.js +26 -7
  84. package/utils/fathom.d.ts +10 -23
  85. package/utils/fathom.js +7 -12
  86. package/utils/field.d.ts +12 -4
  87. package/utils/field.js +25 -14
  88. package/utils/flags.d.ts +9 -3
  89. package/utils/flags.js +27 -9
  90. package/utils/form.d.ts +16 -5
  91. package/utils/form.js +35 -14
  92. package/utils/identity.d.ts +12 -21
  93. package/utils/identity.js +66 -41
  94. package/utils/identity.samples.spec.d.ts +1 -0
  95. package/utils/identity.samples.spec.js +28 -0
  96. package/utils/iframe.d.ts +2 -0
  97. package/utils/iframe.js +22 -0
  98. package/utils/overrides.d.ts +19 -0
  99. package/utils/overrides.js +40 -0
  100. package/utils/prepass.js +6 -4
  101. package/utils/re.d.ts +19 -4
  102. package/utils/re.js +22 -7
  103. package/utils/re.spec.d.ts +1 -0
  104. package/utils/re.spec.js +62 -0
  105. package/utils/shadow-dom.d.ts +8 -0
  106. package/utils/shadow-dom.js +53 -0
  107. package/utils/shadow-dom.spec.d.ts +1 -0
  108. package/utils/shadow-dom.spec.js +215 -0
  109. package/utils/visible.d.ts +3 -2
  110. package/utils/visible.js +42 -22
  111. package/cli.d.ts +0 -2
  112. package/cli.js +0 -128
  113. package/features/abstract.field.d.ts +0 -123
  114. package/features/abstract.field.js +0 -63
  115. package/features/abstract.form.d.ts +0 -98
  116. package/features/abstract.form.js +0 -281
  117. package/features/field.email.d.ts +0 -18
  118. package/features/field.email.js +0 -43
  119. package/features/field.otp.d.ts +0 -36
  120. package/features/field.otp.js +0 -116
  121. package/features/field.password.d.ts +0 -35
  122. package/features/field.password.js +0 -104
  123. package/features/field.username-hidden.d.ts +0 -15
  124. package/features/field.username-hidden.js +0 -40
  125. package/features/field.username.d.ts +0 -16
  126. package/features/field.username.js +0 -41
  127. package/features/form.combined.d.ts +0 -1
  128. package/features/form.combined.js +0 -6
  129. package/trainees/field.email.d.ts +0 -2
  130. package/trainees/field.email.js +0 -16
  131. package/trainees/field.identity.d.ts +0 -2
  132. package/trainees/field.identity.js +0 -9
  133. package/trainees/field.otp.d.ts +0 -2
  134. package/trainees/field.otp.js +0 -16
  135. package/trainees/field.password.current.d.ts +0 -2
  136. package/trainees/field.password.current.js +0 -16
  137. package/trainees/field.password.new.d.ts +0 -2
  138. package/trainees/field.password.new.js +0 -16
  139. package/trainees/field.username-hidden.d.ts +0 -2
  140. package/trainees/field.username-hidden.js +0 -22
  141. package/trainees/field.username.d.ts +0 -2
  142. package/trainees/field.username.js +0 -16
  143. package/trainees/form.login.d.ts +0 -2
  144. package/trainees/form.login.js +0 -16
  145. package/trainees/form.noop.d.ts +0 -1
  146. package/trainees/form.noop.js +0 -7
  147. package/trainees/form.password-change.d.ts +0 -2
  148. package/trainees/form.password-change.js +0 -16
  149. package/trainees/form.recovery.d.ts +0 -2
  150. package/trainees/form.recovery.js +0 -16
  151. package/trainees/form.register.d.ts +0 -2
  152. package/trainees/form.register.js +0 -16
  153. package/trainees/index.d.ts +0 -9
  154. package/trainees/index.js +0 -72
  155. package/trainees/results/result.email.d.ts +0 -2
  156. package/trainees/results/result.email.js +0 -17
  157. package/trainees/results/result.login.d.ts +0 -2
  158. package/trainees/results/result.login.js +0 -110
  159. package/trainees/results/result.new-password.d.ts +0 -2
  160. package/trainees/results/result.new-password.js +0 -36
  161. package/trainees/results/result.otp.d.ts +0 -2
  162. package/trainees/results/result.otp.js +0 -43
  163. package/trainees/results/result.password-change.d.ts +0 -2
  164. package/trainees/results/result.password-change.js +0 -110
  165. package/trainees/results/result.password.d.ts +0 -2
  166. package/trainees/results/result.password.js +0 -36
  167. package/trainees/results/result.recovery.d.ts +0 -2
  168. package/trainees/results/result.recovery.js +0 -110
  169. package/trainees/results/result.register.d.ts +0 -2
  170. package/trainees/results/result.register.js +0 -110
  171. package/trainees/results/result.username-hidden.d.ts +0 -2
  172. package/trainees/results/result.username-hidden.js +0 -15
  173. package/trainees/results/result.username.d.ts +0 -2
  174. package/trainees/results/result.username.js +0 -16
  175. package/utils/memoize.d.ts +0 -5
  176. package/utils/memoize.js +0 -12
@@ -1,281 +0,0 @@
1
- import { utils } from "@protontech/fathom";
2
- import { any } from "../utils/combinators";
3
- import { isVisibleEl, isVisibleField } from "../utils/visible";
4
- import { buttonSelector, kAnchorLinkSelector, kCaptchaSelector, kFieldSelector, kLayoutSelector, kPasswordSelector, kSocialSelector, } from "../constants/selectors";
5
- import { getFormAttributes } from "../utils/attributes";
6
- import { uniqueNodes } from "../utils/dom";
7
- import { getAllFieldHaystacks, getAllNodeHaystacks, getFormText, getNearestHeadingsText, getNodeAttributes, getPageDescriptionText } from "../utils/extract";
8
- import { boolInt, safeInt } from "../utils/fathom";
9
- import { isBtnCandidate, isEmailCandidate, isOAuthCandidate, isUsernameCandidate, splitFieldsByVisibility } from "../utils/field";
10
- import { createInputIterator, getFormParent } from "../utils/form";
11
- import { matchLogin, matchMfa, matchMfaAttr, matchMultiStep, matchNewsletter, matchOtpAttr, matchOtpOutlier, matchPasswordConfirmAttr, matchPasswordCreateAttr, matchPasswordReset, matchPasswordResetAttr, matchRecovery, matchRegister, matchRememberMe, matchSearchAction, matchStepAction, matchTOS, matchTrouble, } from "../utils/re";
12
- const { linearScale } = utils;
13
- const getFormFeatures = (fnode) => {
14
- const form = fnode.element;
15
- const parent = getFormParent(form);
16
- const fields = Array.from(form.querySelectorAll(kFieldSelector));
17
- const visibleFields = fields.filter(isVisibleField);
18
- const doc = form.ownerDocument;
19
- const inputs = fields.filter((el) => el.matches('input:not([type="submit"])'));
20
- const visibleInputs = visibleFields.filter((el) => el.matches('input:not([type="submit"])'));
21
- const fieldsets = form.querySelectorAll("fieldset");
22
- const textareas = visibleFields.filter((el) => el.matches("textarea"));
23
- const selects = visibleFields.filter((el, idx, fields) => { var _a; return el.matches("select") && ((_a = fields === null || fields === void 0 ? void 0 : fields[idx + 1]) === null || _a === void 0 ? void 0 : _a.type) !== "tel"; });
24
- const optionsCount = selects.reduce((total, el) => total + el.querySelectorAll("option").length, 0);
25
- const submits = visibleFields.filter((el) => el.matches('[type="submit"]'));
26
- const hidden = inputs.filter((el) => el.matches('[type="hidden"]'));
27
- const texts = visibleInputs.filter((el) => el.matches('[type="text"]'));
28
- const usernames = inputs.filter(isUsernameCandidate);
29
- const emails = inputs.filter(isEmailCandidate);
30
- const tels = inputs.filter((el) => el.matches('[type="tel"]'));
31
- const pws = inputs.filter((el) => el.matches(kPasswordSelector));
32
- const [identifiers, hiddenIdentifiers] = splitFieldsByVisibility(uniqueNodes(usernames, emails, tels));
33
- const [passwords, hiddenPasswords] = splitFieldsByVisibility(pws);
34
- const radios = visibleInputs.filter((el) => el.matches('[type="radio"]'));
35
- const checkboxes = visibleInputs.filter((el) => el.matches('[type="checkbox"]'));
36
- const numbers = visibleInputs.filter((el) => el.matches('[type="number"]'));
37
- const dates = visibleInputs.filter((el) => el.matches('[type="date"]'));
38
- const files = visibleInputs.filter((el) => el.matches('[type="file"]'));
39
- const mfas = tels.concat(numbers).concat(texts);
40
- const required = visibleInputs.filter((el) => el.matches("[required]"));
41
- const patterns = visibleInputs.filter((el) => el.matches("[pattern]"));
42
- const minMaxLengths = visibleInputs.filter((el) => el.matches("[minLength], [maxLength]"));
43
- const autofocused = visibleInputs.find((el) => el.matches("input[autofocus]:first-of-type"));
44
- const captchas = parent.querySelectorAll(kCaptchaSelector);
45
- const socialEls = Array.from(parent.querySelectorAll(kSocialSelector));
46
- const btns = Array.from(form.querySelectorAll(buttonSelector));
47
- const btnsTypeSubmit = btns.filter((el) => el.matches('[type="submit"]'));
48
- const candidateBtns = btns.filter(isBtnCandidate);
49
- const submitBtns = btnsTypeSubmit.length > 0 ? btnsTypeSubmit : candidateBtns;
50
- const anchors = Array.from(form.querySelectorAll(kAnchorLinkSelector)).filter(isVisibleEl);
51
- const oauths = socialEls.concat(candidateBtns).filter(isOAuthCandidate);
52
- const layouts = Array.from(form.querySelectorAll(kLayoutSelector));
53
- const autofocusedIsIdentifier = Boolean(autofocused && identifiers.includes(autofocused));
54
- const autofocusedIsPassword = Boolean(autofocused && passwords.includes(autofocused));
55
- const pageDescriptionText = getPageDescriptionText(doc);
56
- const nearestHeadingsText = getNearestHeadingsText(form);
57
- const formTextAttrText = getFormText(form);
58
- const formAttributes = getFormAttributes(form);
59
- const pwHaystack = pws.flatMap(getAllFieldHaystacks);
60
- const identifierHaystack = identifiers.flatMap(getAllFieldHaystacks);
61
- const btnHaystack = candidateBtns.flatMap(getAllFieldHaystacks);
62
- const submitBtnHaystack = submitBtns.flatMap(getAllFieldHaystacks);
63
- const checkboxesHaystack = checkboxes.flatMap(getAllFieldHaystacks);
64
- const anchorsHaystack = anchors.flatMap(getAllNodeHaystacks);
65
- const mfaInputsHaystack = mfas.flatMap(getAllFieldHaystacks);
66
- const layoutHaystack = layouts.map(getNodeAttributes);
67
- const outlierHaystack = [formTextAttrText, formTextAttrText, nearestHeadingsText];
68
- const pageLogin = matchLogin(pageDescriptionText);
69
- const formTextLogin = matchLogin(formTextAttrText);
70
- const formAttrsLogin = any(matchLogin)(formAttributes);
71
- const headingsLogin = matchLogin(nearestHeadingsText);
72
- const layoutLogin = any(matchLogin)(layoutHaystack);
73
- const rememberMeCheckbox = any(matchRememberMe)(checkboxesHaystack);
74
- const submitLogin = any(matchLogin)(submitBtnHaystack);
75
- const troubleLink = any(matchTrouble)(anchorsHaystack);
76
- const pageRegister = matchRegister(pageDescriptionText);
77
- const formTextRegister = matchRegister(formTextAttrText);
78
- const formAttrsRegister = any(matchRegister)(formAttributes);
79
- const headingsRegister = matchRegister(nearestHeadingsText);
80
- const layoutRegister = any(matchRegister)(layoutHaystack);
81
- const TOSRef = any(matchTOS)(checkboxesHaystack.concat(anchorsHaystack));
82
- const submitRegister = any(matchRegister)(submitBtnHaystack);
83
- const pwNewRegister = any(matchPasswordCreateAttr)(pwHaystack);
84
- const pwConfirmRegister = any(matchPasswordConfirmAttr)(pwHaystack);
85
- const pagePwReset = matchPasswordReset(pageDescriptionText);
86
- const formTextPwReset = matchPasswordReset(formTextAttrText);
87
- const formAttrsPwReset = any(matchPasswordResetAttr)(formAttributes);
88
- const headingsPwReset = matchPasswordReset(nearestHeadingsText);
89
- const layoutPwReset = any(matchPasswordResetAttr)(layoutHaystack);
90
- const pageRecovery = matchRecovery(pageDescriptionText);
91
- const formTextRecovery = matchRecovery(formTextAttrText);
92
- const formAttrsRecovery = any(matchRecovery)(formAttributes);
93
- const headingsRecovery = matchRecovery(nearestHeadingsText);
94
- const layoutRecovery = any(matchRecovery)(layoutHaystack);
95
- const submitRecovery = any(matchRecovery)(submitBtnHaystack);
96
- const identifierRecovery = any(matchRecovery)(identifierHaystack);
97
- const inputsMFA = any(matchMfaAttr)(mfaInputsHaystack);
98
- const inputsOTP = any(matchOtpAttr)(mfaInputsHaystack);
99
- const formTextMFA = matchMfa(formTextAttrText.concat(nearestHeadingsText));
100
- const formAttrsMFA = any(matchMfaAttr)(formAttributes);
101
- const formOTPOutlier = any(matchOtpOutlier)(formAttributes);
102
- const linkOTPOutlier = any(matchOtpOutlier)(anchorsHaystack.concat(btnHaystack));
103
- const newsletterForm = any(matchNewsletter)(outlierHaystack);
104
- const searchForm = any(matchSearchAction)(outlierHaystack);
105
- const buttonMultiStep = any(matchStepAction)(submitBtnHaystack);
106
- const headingsMultiStep = matchMultiStep(nearestHeadingsText);
107
- return {
108
- fieldsCount: linearScale(visibleFields.length, 1, 5),
109
- inputCount: linearScale(visibleInputs.length, 1, 5),
110
- fieldsetCount: linearScale(fieldsets.length, 1, 5),
111
- textCount: linearScale(texts.length, 0, 3),
112
- textareaCount: linearScale(textareas.length, 0, 2),
113
- selectCount: linearScale(selects.length, 0, 2),
114
- optionsCount: linearScale(optionsCount, 0, 5),
115
- checkboxCount: linearScale(checkboxes.length, 0, 2),
116
- radioCount: linearScale(radios.length, 0, 5),
117
- identifierCount: linearScale(identifiers.length, 0, 2),
118
- hiddenIdentifierCount: linearScale(hiddenIdentifiers.length, 0, 2),
119
- hiddenCount: linearScale(hidden.length, 0, 5),
120
- passwordCount: linearScale(passwords.length, 0, 2),
121
- hiddenPasswordCount: linearScale(hiddenPasswords.length, 0, 2),
122
- usernameCount: linearScale(usernames.length, 0, 2),
123
- emailCount: linearScale(emails.length, 0, 2),
124
- submitCount: linearScale(submits.length, 0, 2),
125
- hasTels: boolInt(tels.length > 0),
126
- hasOAuth: boolInt(oauths.length > 0),
127
- hasCaptchas: boolInt(captchas.length > 0),
128
- hasFiles: boolInt(files.length > 0),
129
- hasDate: boolInt(dates.length > 0),
130
- hasNumber: boolInt(numbers.length > 0),
131
- oneVisibleField: boolInt(visibleInputs.length === 1),
132
- twoVisibleFields: boolInt(visibleInputs.length === 2),
133
- threeOrMoreVisibleFields: boolInt(visibleInputs.length >= 3),
134
- noPasswords: boolInt(passwords.length === 0),
135
- onePassword: boolInt(passwords.length === 1),
136
- twoPasswords: boolInt(passwords.length === 2),
137
- threeOrMorePasswords: boolInt(passwords.length >= 3),
138
- noIdentifiers: boolInt(identifiers.length === 0),
139
- oneIdentifier: boolInt(identifiers.length === 1),
140
- twoIdentifiers: boolInt(identifiers.length === 2),
141
- threeOrMoreIdentifiers: boolInt(identifiers.length >= 3),
142
- autofocusedIsIdentifier: boolInt(autofocusedIsIdentifier),
143
- autofocusedIsPassword: boolInt(autofocusedIsPassword),
144
- visibleInputsCount: safeInt(visibleInputs.length),
145
- inputRatio: safeInt(inputs.length / fields.length),
146
- hiddenRatio: safeInt(hidden.length / fields.length),
147
- visibleRatio: safeInt(visibleInputs.length / fields.length),
148
- identifierRatio: safeInt(identifiers.length / visibleFields.length),
149
- emailRatio: safeInt(emails.length / visibleFields.length),
150
- usernameRatio: safeInt(usernames.length / visibleFields.length),
151
- passwordRatio: safeInt(passwords.length / visibleFields.length),
152
- checkboxRatio: safeInt(checkboxes.length / visibleFields.length),
153
- requiredRatio: safeInt(required.length / visibleFields.length),
154
- patternRatio: safeInt(patterns.length / visibleFields.length),
155
- minMaxLengthRatio: safeInt(minMaxLengths.length / visibleFields.length),
156
- pageLogin: boolInt(pageLogin),
157
- formTextLogin: boolInt(formTextLogin),
158
- formAttrsLogin: boolInt(formAttrsLogin),
159
- headingsLogin: boolInt(headingsLogin),
160
- layoutLogin: boolInt(layoutLogin),
161
- rememberMeCheckbox: boolInt(rememberMeCheckbox),
162
- troubleLink: boolInt(troubleLink),
163
- submitLogin: boolInt(submitLogin),
164
- pageRegister: boolInt(pageRegister),
165
- formTextRegister: boolInt(formTextRegister),
166
- formAttrsRegister: boolInt(formAttrsRegister),
167
- headingsRegister: boolInt(headingsRegister),
168
- layoutRegister: boolInt(layoutRegister),
169
- pwNewRegister: boolInt(pwNewRegister),
170
- pwConfirmRegister: boolInt(pwConfirmRegister),
171
- submitRegister: boolInt(submitRegister),
172
- TOSRef: boolInt(TOSRef),
173
- pagePwReset: boolInt(pagePwReset),
174
- formTextPwReset: boolInt(formTextPwReset),
175
- formAttrsPwReset: boolInt(formAttrsPwReset),
176
- headingsPwReset: boolInt(headingsPwReset),
177
- layoutPwReset: boolInt(layoutPwReset),
178
- pageRecovery: boolInt(pageRecovery),
179
- formTextRecovery: boolInt(formTextRecovery),
180
- formAttrsRecovery: boolInt(formAttrsRecovery),
181
- headingsRecovery: boolInt(headingsRecovery),
182
- layoutRecovery: boolInt(layoutRecovery),
183
- identifierRecovery: boolInt(identifierRecovery),
184
- submitRecovery: boolInt(submitRecovery),
185
- formMFA: boolInt(formTextMFA || formAttrsMFA),
186
- formTextMFA: boolInt(formTextMFA),
187
- formAttrsMFA: boolInt(formAttrsMFA),
188
- formOTPOutlier: boolInt(formOTPOutlier),
189
- linkOTPOutlier: boolInt(linkOTPOutlier),
190
- inputsMFA: boolInt(inputsMFA),
191
- inputsOTP: boolInt(inputsOTP),
192
- newsletterForm: boolInt(newsletterForm),
193
- searchForm: boolInt(searchForm),
194
- multiStepForm: boolInt(buttonMultiStep || headingsMultiStep),
195
- multiAuthForm: boolInt(submitRegister && submitLogin),
196
- formInputIterator: createInputIterator(form),
197
- };
198
- };
199
- export default getFormFeatures;
200
- export const FORM_FEATURES = [
201
- "fieldsCount",
202
- "inputCount",
203
- "fieldsetCount",
204
- "textCount",
205
- "textareaCount",
206
- "selectCount",
207
- "optionsCount",
208
- "radioCount",
209
- "identifierCount",
210
- "hiddenIdentifierCount",
211
- "usernameCount",
212
- "emailCount",
213
- "hiddenCount",
214
- "hiddenPasswordCount",
215
- "submitCount",
216
- "hasTels",
217
- "hasOAuth",
218
- "hasCaptchas",
219
- "hasFiles",
220
- "hasDate",
221
- "hasNumber",
222
- "oneVisibleField",
223
- "twoVisibleFields",
224
- "threeOrMoreVisibleFields",
225
- "noPasswords",
226
- "onePassword",
227
- "twoPasswords",
228
- "threeOrMorePasswords",
229
- "noIdentifiers",
230
- "oneIdentifier",
231
- "twoIdentifiers",
232
- "threeOrMoreIdentifiers",
233
- "autofocusedIsIdentifier",
234
- "autofocusedIsPassword",
235
- "visibleRatio",
236
- "inputRatio",
237
- "hiddenRatio",
238
- "identifierRatio",
239
- "emailRatio",
240
- "usernameRatio",
241
- "passwordRatio",
242
- "requiredRatio",
243
- "checkboxRatio",
244
- "pageLogin",
245
- "formTextLogin",
246
- "formAttrsLogin",
247
- "headingsLogin",
248
- "layoutLogin",
249
- "rememberMeCheckbox",
250
- "troubleLink",
251
- "submitLogin",
252
- "pageRegister",
253
- "formTextRegister",
254
- "formAttrsRegister",
255
- "headingsRegister",
256
- "layoutRegister",
257
- "pwNewRegister",
258
- "pwConfirmRegister",
259
- "submitRegister",
260
- "TOSRef",
261
- "pagePwReset",
262
- "formTextPwReset",
263
- "formAttrsPwReset",
264
- "headingsPwReset",
265
- "layoutPwReset",
266
- "pageRecovery",
267
- "formTextRecovery",
268
- "formAttrsRecovery",
269
- "headingsRecovery",
270
- "layoutRecovery",
271
- "identifierRecovery",
272
- "submitRecovery",
273
- "formTextMFA",
274
- "formAttrsMFA",
275
- "inputsMFA",
276
- "inputsOTP",
277
- "newsletterForm",
278
- "searchForm",
279
- "multiStepForm",
280
- "multiAuthForm",
281
- ];
@@ -1,18 +0,0 @@
1
- import { Fnode } from "@protontech/fathom";
2
- declare const getEmailFieldFeatures: (fnode: Fnode) => {
3
- autocompleteUsername: number;
4
- autocompleteNickname: number;
5
- autocompleteEmail: number;
6
- autocompleteOff: number;
7
- typeEmail: number;
8
- exactAttrEmail: number;
9
- attrEmail: number;
10
- textEmail: number;
11
- labelEmail: number;
12
- placeholderEmail: number;
13
- searchField: number;
14
- identityField: number;
15
- };
16
- export default getEmailFieldFeatures;
17
- export type EmailFieldFeatures = ReturnType<typeof getEmailFieldFeatures>;
18
- export declare const EMAIL_FIELD_FEATURES: (keyof EmailFieldFeatures)[];
@@ -1,43 +0,0 @@
1
- import { kEmailSelector } from "../constants/selectors";
2
- import { any, or } from "../utils/combinators";
3
- import { boolInt } from "../utils/fathom";
4
- import { matchEmail, matchEmailAttr, matchEmailValue } from "../utils/re";
5
- const getEmailFieldFeatures = (fnode) => {
6
- const field = fnode.element;
7
- const fieldFeatures = fnode.noteFor("field");
8
- const { fieldAttrs, fieldText, labelText } = fieldFeatures;
9
- const typeEmail = fieldFeatures.type === "email";
10
- const exactAttrEmail = field.matches(kEmailSelector);
11
- const attrEmail = any(matchEmailAttr)(fieldAttrs);
12
- const textEmail = matchEmail(fieldText);
13
- const labelEmail = matchEmail(labelText);
14
- const placeholderEmail = any(or(matchEmailValue, matchEmail))(field.placeholder.split(" "));
15
- return {
16
- autocompleteUsername: boolInt(fieldFeatures.autocomplete === "username"),
17
- autocompleteNickname: boolInt(fieldFeatures.autocomplete === "nickname"),
18
- autocompleteEmail: boolInt(fieldFeatures.autocomplete === "email"),
19
- autocompleteOff: boolInt(fieldFeatures.autocomplete === "off"),
20
- typeEmail: boolInt(typeEmail),
21
- exactAttrEmail: boolInt(exactAttrEmail),
22
- attrEmail: boolInt(attrEmail),
23
- textEmail: boolInt(textEmail),
24
- labelEmail: boolInt(labelEmail),
25
- placeholderEmail: boolInt(placeholderEmail),
26
- searchField: boolInt(fieldFeatures.searchField),
27
- identityField: boolInt(fieldFeatures.identityField)
28
- };
29
- };
30
- export default getEmailFieldFeatures;
31
- export const EMAIL_FIELD_FEATURES = [
32
- "autocompleteUsername",
33
- "autocompleteNickname",
34
- "autocompleteEmail",
35
- "typeEmail",
36
- "exactAttrEmail",
37
- "attrEmail",
38
- "textEmail",
39
- "labelEmail",
40
- "placeholderEmail",
41
- "searchField",
42
- "identityField"
43
- ];
@@ -1,36 +0,0 @@
1
- import { Fnode } from "@protontech/fathom";
2
- declare const getOTPFieldFeatures: (fnode: Fnode) => {
3
- formMFA: number;
4
- formOutlier: number;
5
- fieldOutlier: number;
6
- linkOutlier: number;
7
- emailOutlierCount: number;
8
- inputCountOutlier: number;
9
- nameMatch: number;
10
- idMatch: number;
11
- numericMode: number;
12
- patternOTP: number;
13
- maxLengthExpected: number;
14
- maxLengthInvalid: number;
15
- maxLength1: number;
16
- maxLength5: number;
17
- minLength6: number;
18
- maxLength6: number;
19
- autocompleteOTC: number;
20
- siblingOfInterest: number;
21
- prevAligned: number;
22
- prevArea: number;
23
- nextAligned: number;
24
- nextArea: number;
25
- attrOTP: number;
26
- textOTP: number;
27
- wrapperOTP: number;
28
- labelOTP: number;
29
- attrMFA: number;
30
- textMFA: number;
31
- labelMFA: number;
32
- };
33
- export default getOTPFieldFeatures;
34
- export type OTPFieldFeatures = ReturnType<typeof getOTPFieldFeatures>;
35
- export declare const BASE_OTP_FIELD_FEATURES: (keyof OTPFieldFeatures)[];
36
- export declare const OTP_FIELD_FEATURES: ("formMFA" | "formOutlier" | "fieldOutlier" | "linkOutlier" | "emailOutlierCount" | "inputCountOutlier" | "nameMatch" | "idMatch" | "numericMode" | "patternOTP" | "maxLengthExpected" | "maxLengthInvalid" | "maxLength1" | "maxLength5" | "minLength6" | "maxLength6" | "autocompleteOTC" | "siblingOfInterest" | "prevAligned" | "prevArea" | "nextAligned" | "nextArea" | "attrOTP" | "textOTP" | "wrapperOTP" | "labelOTP" | "attrMFA" | "textMFA" | "labelMFA" | ["formMFA" | "formOutlier" | "fieldOutlier" | "linkOutlier" | "emailOutlierCount" | "inputCountOutlier" | "nameMatch" | "idMatch" | "numericMode" | "patternOTP" | "maxLengthExpected" | "maxLengthInvalid" | "maxLength1" | "maxLength5" | "minLength6" | "maxLength6" | "autocompleteOTC" | "siblingOfInterest" | "prevAligned" | "prevArea" | "nextAligned" | "nextArea" | "attrOTP" | "textOTP" | "wrapperOTP" | "labelOTP" | "attrMFA" | "textMFA" | "labelMFA", "formMFA" | "formOutlier" | "fieldOutlier" | "linkOutlier" | "emailOutlierCount" | "inputCountOutlier" | "nameMatch" | "idMatch" | "numericMode" | "patternOTP" | "maxLengthExpected" | "maxLengthInvalid" | "maxLength1" | "maxLength5" | "minLength6" | "maxLength6" | "autocompleteOTC" | "siblingOfInterest" | "prevAligned" | "prevArea" | "nextAligned" | "nextArea" | "attrOTP" | "textOTP" | "wrapperOTP" | "labelOTP" | "attrMFA" | "textMFA" | "labelMFA"])[];
@@ -1,116 +0,0 @@
1
- import { any } from "../utils/combinators";
2
- import { OTP_PATTERNS } from "../constants/heuristics";
3
- import { getBaseAttributes } from "../utils/attributes";
4
- import { getNodeRect, getNthParent } from "../utils/dom";
5
- import { boolInt, combineFeatures } from "../utils/fathom";
6
- import { matchMfa, matchMfaAttr, matchOtpAttr, matchOtpOutlier } from "../utils/re";
7
- const getOTPFieldFeatures = (fnode) => {
8
- var _a, _b, _c, _d, _e;
9
- const field = fnode.element;
10
- const fieldFeatures = fnode.noteFor("field");
11
- const { fieldAttrs, fieldText, labelText, prevField, nextField, type, minLength, maxLength } = fieldFeatures;
12
- const formFeatures = fieldFeatures.formFeatures;
13
- const formMFA = Boolean(formFeatures === null || formFeatures === void 0 ? void 0 : formFeatures.formMFA);
14
- const formOTPOutlier = Boolean(formFeatures === null || formFeatures === void 0 ? void 0 : formFeatures.formOTPOutlier);
15
- const linkOutlier = Boolean(formFeatures === null || formFeatures === void 0 ? void 0 : formFeatures.linkOTPOutlier);
16
- const visibleInputsCount = formFeatures === null || formFeatures === void 0 ? void 0 : formFeatures.visibleInputsCount;
17
- const patternOTP = OTP_PATTERNS.some(([maxLength, pattern]) => field.pattern.includes(pattern) && maxLength === field.maxLength);
18
- const exactNames = ["code", "token", "otp", "otc", "totp"];
19
- const nameMatch = exactNames.some((match) => field.name === match);
20
- const idMatch = exactNames.some((match) => field.id === match);
21
- const { area, top, bottom, width } = getNodeRect(field);
22
- const maybeGroup = width < 100;
23
- const prevRect = prevField ? getNodeRect(prevField) : null;
24
- const nextRect = nextField ? getNodeRect(nextField) : null;
25
- const prevCheck = maybeGroup && prevField && (prevField === null || prevField === void 0 ? void 0 : prevField.getAttribute("type")) === type;
26
- const nextCheck = maybeGroup && nextField && (nextField === null || nextField === void 0 ? void 0 : nextField.getAttribute("type")) === type;
27
- const prevAligned = prevCheck ? top === (prevRect === null || prevRect === void 0 ? void 0 : prevRect.top) && bottom === (prevRect === null || prevRect === void 0 ? void 0 : prevRect.bottom) : false;
28
- const prevArea = prevCheck ? area === (prevRect === null || prevRect === void 0 ? void 0 : prevRect.area) : false;
29
- const nextAligned = nextCheck ? top === (nextRect === null || nextRect === void 0 ? void 0 : nextRect.top) && bottom === (nextRect === null || nextRect === void 0 ? void 0 : nextRect.bottom) : false;
30
- const nextArea = nextCheck ? area === (nextRect === null || nextRect === void 0 ? void 0 : nextRect.area) : false;
31
- const attrOTP = any(matchOtpAttr)(fieldAttrs);
32
- const attrMFA = any(matchMfaAttr)(fieldAttrs);
33
- const attrOutlier = any(matchOtpOutlier)(fieldAttrs);
34
- const textOTP = matchOtpAttr(fieldText);
35
- const textMFA = matchMfa(fieldText);
36
- const labelOTP = matchOtpAttr(labelText);
37
- const labelMFA = matchMfa(labelText);
38
- const labelOutlier = matchOtpOutlier(labelText);
39
- const formText = (_c = (_b = (_a = fieldFeatures === null || fieldFeatures === void 0 ? void 0 : fieldFeatures.formFnode) === null || _a === void 0 ? void 0 : _a.element) === null || _b === void 0 ? void 0 : _b.innerText) !== null && _c !== void 0 ? _c : "";
40
- const parents = [getNthParent(field)(1), getNthParent(field)(2)];
41
- const wrapperAttrs = parents.flatMap(getBaseAttributes);
42
- const wrapperOTP = any(matchOtpAttr)(wrapperAttrs);
43
- const wrapperOutlier = any(matchOtpOutlier)(wrapperAttrs);
44
- const invalidInputCount = !(visibleInputsCount === 1 || visibleInputsCount === 6);
45
- const maxLengthExpected = maxLength === 1 || maxLength === 6;
46
- const maxLengthInvalid = maxLength > 10;
47
- const siblingOfInterest = prevAligned || nextAligned;
48
- const otpSmells = wrapperOTP || attrOTP || textOTP || labelOTP;
49
- const emailOutlierCount = otpSmells ? (_e = (_d = formText.match(/@/g)) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0 : 0;
50
- return {
51
- formMFA: boolInt(fieldFeatures.isFormNoop && formMFA),
52
- formOutlier: boolInt(formOTPOutlier),
53
- fieldOutlier: boolInt(wrapperOutlier || attrOutlier || labelOutlier),
54
- linkOutlier: boolInt(linkOutlier),
55
- emailOutlierCount: boolInt(emailOutlierCount > 1),
56
- inputCountOutlier: boolInt(invalidInputCount),
57
- nameMatch: boolInt(nameMatch),
58
- idMatch: boolInt(idMatch),
59
- numericMode: boolInt(field.inputMode === "numeric"),
60
- patternOTP: boolInt(patternOTP),
61
- maxLengthExpected: boolInt(maxLengthExpected),
62
- maxLengthInvalid: boolInt(maxLengthInvalid),
63
- maxLength1: boolInt(maxLength === 1),
64
- maxLength5: boolInt(maxLength === 5),
65
- minLength6: boolInt(minLength === 6),
66
- maxLength6: boolInt(maxLength === 6),
67
- autocompleteOTC: boolInt(fieldFeatures.autocomplete === "one-time-code"),
68
- siblingOfInterest: boolInt(siblingOfInterest),
69
- prevAligned: boolInt(prevAligned),
70
- prevArea: boolInt(prevArea),
71
- nextAligned: boolInt(nextAligned),
72
- nextArea: boolInt(nextArea),
73
- attrOTP: boolInt(attrOTP),
74
- textOTP: boolInt(textOTP),
75
- wrapperOTP: boolInt(wrapperOTP),
76
- labelOTP: boolInt(labelOTP),
77
- attrMFA: boolInt(attrMFA),
78
- textMFA: boolInt(textMFA),
79
- labelMFA: boolInt(labelMFA),
80
- };
81
- };
82
- export default getOTPFieldFeatures;
83
- export const BASE_OTP_FIELD_FEATURES = [
84
- "formMFA",
85
- "formOutlier",
86
- "fieldOutlier",
87
- "linkOutlier",
88
- "emailOutlierCount",
89
- "inputCountOutlier",
90
- "nameMatch",
91
- "idMatch",
92
- "numericMode",
93
- "patternOTP",
94
- "maxLengthExpected",
95
- "maxLengthInvalid",
96
- "maxLength1",
97
- "maxLength5",
98
- "minLength6",
99
- "maxLength6",
100
- "autocompleteOTC",
101
- "prevAligned",
102
- "prevArea",
103
- "nextAligned",
104
- "nextArea",
105
- "attrMFA",
106
- "attrOTP",
107
- "textMFA",
108
- "textOTP",
109
- "labelMFA",
110
- "labelOTP",
111
- "wrapperOTP",
112
- ];
113
- export const OTP_FIELD_FEATURES = [
114
- ...BASE_OTP_FIELD_FEATURES,
115
- ...combineFeatures(["autocompleteOTC", "siblingOfInterest", "formMFA"], ["inputCountOutlier", "maxLengthInvalid", "attrOTP"]),
116
- ];
@@ -1,35 +0,0 @@
1
- import { Fnode } from "@protontech/fathom";
2
- declare const getPasswordFieldFeatures: (fnode: Fnode) => {
3
- loginScore: number;
4
- registerScore: number;
5
- pwChangeScore: number;
6
- exotic: number;
7
- autocompleteNew: number;
8
- autocompleteCurrent: number;
9
- autocompleteOff: number;
10
- isOnlyPassword: number;
11
- prevPwField: number;
12
- nextPwField: number;
13
- attrCreate: number;
14
- attrCurrent: number;
15
- attrConfirm: number;
16
- attrReset: number;
17
- textCreate: number;
18
- textCurrent: number;
19
- textConfirm: number;
20
- textReset: number;
21
- labelCreate: number;
22
- labelCurrent: number;
23
- labelConfirm: number;
24
- labelReset: number;
25
- passwordOutlier: number;
26
- prevPwNew: number;
27
- prevPwCurrent: number;
28
- prevPwConfirm: number;
29
- nextPwNew: number;
30
- nextPwCurrent: number;
31
- nextPwConfirm: number;
32
- };
33
- export default getPasswordFieldFeatures;
34
- export type PasswordFieldFeatures = ReturnType<typeof getPasswordFieldFeatures>;
35
- export declare const PW_FIELD_FEATURES: ("autocompleteOff" | "loginScore" | "registerScore" | "pwChangeScore" | "exotic" | "autocompleteNew" | "autocompleteCurrent" | "isOnlyPassword" | "prevPwField" | "nextPwField" | "attrCreate" | "attrCurrent" | "attrConfirm" | "attrReset" | "textCreate" | "textCurrent" | "textConfirm" | "textReset" | "labelCreate" | "labelCurrent" | "labelConfirm" | "labelReset" | "passwordOutlier" | "prevPwNew" | "prevPwCurrent" | "prevPwConfirm" | "nextPwNew" | "nextPwCurrent" | "nextPwConfirm" | ["autocompleteOff" | "loginScore" | "registerScore" | "pwChangeScore" | "exotic" | "autocompleteNew" | "autocompleteCurrent" | "isOnlyPassword" | "prevPwField" | "nextPwField" | "attrCreate" | "attrCurrent" | "attrConfirm" | "attrReset" | "textCreate" | "textCurrent" | "textConfirm" | "textReset" | "labelCreate" | "labelCurrent" | "labelConfirm" | "labelReset" | "passwordOutlier" | "prevPwNew" | "prevPwCurrent" | "prevPwConfirm" | "nextPwNew" | "nextPwCurrent" | "nextPwConfirm", "autocompleteOff" | "loginScore" | "registerScore" | "pwChangeScore" | "exotic" | "autocompleteNew" | "autocompleteCurrent" | "isOnlyPassword" | "prevPwField" | "nextPwField" | "attrCreate" | "attrCurrent" | "attrConfirm" | "attrReset" | "textCreate" | "textCurrent" | "textConfirm" | "textReset" | "labelCreate" | "labelCurrent" | "labelConfirm" | "labelReset" | "passwordOutlier" | "prevPwNew" | "prevPwCurrent" | "prevPwConfirm" | "nextPwNew" | "nextPwCurrent" | "nextPwConfirm"])[];
@@ -1,104 +0,0 @@
1
- import { any } from "../utils/combinators";
2
- import { getAllFieldHaystacks } from "../utils/extract";
3
- import { boolInt, combineFeatures } from "../utils/fathom";
4
- import { matchPasswordConfirm, matchPasswordConfirmAttr, matchPasswordCreate, matchPasswordCreateAttr, matchPasswordCurrent, matchPasswordCurrentAttr, matchPasswordOutlier, matchPasswordReset, matchPasswordResetAttr, } from "../utils/re";
5
- const isAutocompleteCurrentPassword = (value) => value === "current-password" || value === "password";
6
- const isAutocompleteNewPassword = (value) => value === "new-password";
7
- const getPasswordFieldFeatures = (fnode) => {
8
- var _a, _b;
9
- const fieldFeatures = fnode.noteFor("field");
10
- const { autocomplete, fieldAttrs, fieldText, labelText, prevField, nextField } = fieldFeatures;
11
- const attrCreate = any(matchPasswordCreateAttr)(fieldAttrs);
12
- const attrCurrent = any(matchPasswordCurrentAttr)(fieldAttrs);
13
- const attrConfirm = any(matchPasswordConfirmAttr)(fieldAttrs);
14
- const attrReset = any(matchPasswordResetAttr)(fieldAttrs);
15
- const textCreate = matchPasswordCreate(fieldText);
16
- const textCurrent = matchPasswordCurrent(fieldText);
17
- const textConfirm = matchPasswordConfirm(fieldText);
18
- const textReset = matchPasswordReset(fieldText);
19
- const labelCreate = matchPasswordCreate(labelText);
20
- const labelCurrent = matchPasswordCurrent(labelText);
21
- const labelConfirm = matchPasswordConfirm(labelText);
22
- const labelReset = matchPasswordReset(labelText);
23
- const passwordOutlier = any(matchPasswordOutlier)(fieldAttrs.concat(labelText, fieldText));
24
- const prevPwField = prevField && prevField.getAttribute("type") === "password" ? prevField : null;
25
- const nextPwField = nextField && nextField.getAttribute("type") === "password" ? nextField : null;
26
- const prevPwHaystack = prevPwField ? getAllFieldHaystacks(prevPwField) : [];
27
- const nextPwHaystack = nextPwField ? getAllFieldHaystacks(nextPwField) : [];
28
- const prevAutocomplete = prevPwField === null || prevPwField === void 0 ? void 0 : prevPwField.getAttribute("autocomplete");
29
- const prevAutocompleteCurrent = isAutocompleteCurrentPassword(prevAutocomplete);
30
- const prevPwCurrent = prevAutocompleteCurrent || any(matchPasswordCurrent)(prevPwHaystack);
31
- const prevAutocompleteNew = isAutocompleteNewPassword(prevAutocomplete);
32
- const prevPwNew = prevAutocompleteNew || any(matchPasswordCreate)(prevPwHaystack);
33
- const prevPwConfirm = any(matchPasswordConfirm)(prevPwHaystack);
34
- const nextAutocomplete = nextPwField === null || nextPwField === void 0 ? void 0 : nextPwField.getAttribute("autocomplete");
35
- const nextAutocompleteCurrent = isAutocompleteCurrentPassword(nextAutocomplete);
36
- const nextPwCurrent = nextAutocompleteCurrent || any(matchPasswordCurrent)(nextPwHaystack);
37
- const nextAutocompleteNew = isAutocompleteNewPassword(nextAutocomplete);
38
- const nextPwNew = nextAutocompleteNew || any(matchPasswordCreate)(nextPwHaystack);
39
- const nextPwConfirm = any(matchPasswordConfirm)(nextPwHaystack);
40
- return {
41
- loginScore: boolInt(fieldFeatures.isFormLogin),
42
- registerScore: boolInt(fieldFeatures.isFormRegister),
43
- pwChangeScore: boolInt(fieldFeatures.isFormPWChange),
44
- exotic: boolInt(fieldFeatures.isFormNoop),
45
- autocompleteNew: boolInt(isAutocompleteNewPassword(autocomplete)),
46
- autocompleteCurrent: boolInt(isAutocompleteCurrentPassword(autocomplete)),
47
- autocompleteOff: boolInt(fieldFeatures.autocomplete === "off"),
48
- isOnlyPassword: (_b = (_a = fieldFeatures.formFeatures) === null || _a === void 0 ? void 0 : _a.onePassword) !== null && _b !== void 0 ? _b : 0,
49
- prevPwField: boolInt(prevPwField !== null),
50
- nextPwField: boolInt(nextPwField !== null),
51
- attrCreate: boolInt(attrCreate),
52
- attrCurrent: boolInt(attrCurrent),
53
- attrConfirm: boolInt(attrConfirm),
54
- attrReset: boolInt(attrReset),
55
- textCreate: boolInt(textCreate),
56
- textCurrent: boolInt(textCurrent),
57
- textConfirm: boolInt(textConfirm),
58
- textReset: boolInt(textReset),
59
- labelCreate: boolInt(labelCreate),
60
- labelCurrent: boolInt(labelCurrent),
61
- labelConfirm: boolInt(labelConfirm),
62
- labelReset: boolInt(labelReset),
63
- passwordOutlier: boolInt(passwordOutlier),
64
- prevPwNew: boolInt(prevPwNew),
65
- prevPwCurrent: boolInt(prevPwCurrent),
66
- prevPwConfirm: boolInt(prevPwConfirm),
67
- nextPwNew: boolInt(nextPwNew),
68
- nextPwCurrent: boolInt(nextPwCurrent),
69
- nextPwConfirm: boolInt(nextPwConfirm),
70
- };
71
- };
72
- export default getPasswordFieldFeatures;
73
- const BASE_PW_FIELD_FEATURES = [
74
- "loginScore",
75
- "registerScore",
76
- "pwChangeScore",
77
- "exotic",
78
- "autocompleteNew",
79
- "autocompleteCurrent",
80
- "autocompleteOff",
81
- "isOnlyPassword",
82
- "prevPwField",
83
- "nextPwField",
84
- "attrCreate",
85
- "attrCurrent",
86
- "attrConfirm",
87
- "attrReset",
88
- "textCreate",
89
- "textCurrent",
90
- "textConfirm",
91
- "textReset",
92
- "labelCreate",
93
- "labelCurrent",
94
- "labelConfirm",
95
- "labelReset",
96
- "prevPwNew",
97
- "prevPwCurrent",
98
- "prevPwConfirm",
99
- "nextPwNew",
100
- "nextPwCurrent",
101
- "nextPwConfirm",
102
- "passwordOutlier",
103
- ];
104
- export const PW_FIELD_FEATURES = [...BASE_PW_FIELD_FEATURES, ...combineFeatures(["prevPwCurrent"], ["nextPwNew"])];
@@ -1,15 +0,0 @@
1
- import { Fnode } from "@protontech/fathom";
2
- declare const getHiddenUserFieldFeatures: (fnode: Fnode) => {
3
- exotic: number;
4
- attrUsername: number;
5
- attrEmail: number;
6
- usernameAttr: number;
7
- autocompleteUsername: number;
8
- visibleReadonly: number;
9
- hiddenEmailValue: number;
10
- hiddenTelValue: number;
11
- hiddenUsernameValue: number;
12
- };
13
- export default getHiddenUserFieldFeatures;
14
- export type HiddenUserFieldFeatures = ReturnType<typeof getHiddenUserFieldFeatures>;
15
- export declare const HIDDEN_USER_FIELD_FEATURES: (keyof HiddenUserFieldFeatures)[];