@fy-/fws-vue 2.1.8 → 2.1.10

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.
@@ -62,6 +62,24 @@ const formData = ref<Record<string, any>>({
62
62
  })
63
63
  const completed = ref(false)
64
64
 
65
+ function autocompleteValue(fieldName: string): string | undefined {
66
+ switch (fieldName) {
67
+ case 'username':
68
+ return 'username'
69
+ case 'password':
70
+ return 'current-password'
71
+ case 'password2':
72
+ case 'confirm':
73
+ return 'new-password'
74
+ case 'email':
75
+ return 'email'
76
+ case 'phone_number':
77
+ return 'tel'
78
+ default:
79
+ return undefined
80
+ }
81
+ }
82
+
65
83
  async function doTrigger(field: any) {
66
84
  // eslint-disable-next-line no-eval
67
85
  const _res = await eval(
@@ -158,8 +176,11 @@ async function userFlow(params: paramsType = { initial: false }) {
158
176
  return
159
177
  }
160
178
  formData.value = {
179
+ ...formData.value,
161
180
  session: response.value.data.session,
162
181
  }
182
+ delete formData.value.initial
183
+
163
184
  session.value = response.value.data.session
164
185
  inputs.value = []
165
186
  responseFields.value = response.value.data.fields
@@ -310,6 +331,7 @@ onMounted(async () => {
310
331
  :error="fieldsError[field.name]"
311
332
  :type="field.type"
312
333
  :req="responseReq.includes(field.name)"
334
+ :autocomplete="autocompleteValue(field.name)"
313
335
  />
314
336
  </template>
315
337
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",