@sbc-connect/nuxt-forms 0.1.27 → 0.1.28
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-forms
|
|
2
2
|
|
|
3
|
+
## 0.1.28
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#86](https://github.com/bcgov/connect-nuxt/pull/86) [`c1fb4f2`](https://github.com/bcgov/connect-nuxt/commit/c1fb4f2a217b3d57e7ea7aed8b9773e215a21978) Thanks [@deetz99](https://github.com/deetz99)! - Update forms to emit @should-validate event instead of requiring form ref as prop to revalidate inputs on address complete.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`c1fb4f2`](https://github.com/bcgov/connect-nuxt/commit/c1fb4f2a217b3d57e7ea7aed8b9773e215a21978)]:
|
|
10
|
+
- @sbc-connect/nuxt-base@0.1.26
|
|
11
|
+
|
|
3
12
|
## 0.1.27
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */ // allow any for form ref type
|
|
3
|
-
import type { Form } from '@nuxt/ui'
|
|
4
|
-
|
|
5
2
|
const {
|
|
6
3
|
disabledFields,
|
|
7
4
|
excludedFields = ['streetName', 'streetNumber', 'unitNumber'],
|
|
8
5
|
schemaPrefix,
|
|
9
|
-
streetHelpText = 'none'
|
|
10
|
-
formRef
|
|
6
|
+
streetHelpText = 'none'
|
|
11
7
|
} = defineProps<{
|
|
12
8
|
id: string
|
|
13
9
|
schemaPrefix: string
|
|
14
|
-
formRef?: Form<any> | null
|
|
15
10
|
disabledFields?: Array<keyof ConnectAddress>
|
|
16
11
|
excludedFields?: Array<keyof ConnectAddress>
|
|
17
12
|
disableAddressComplete?: boolean
|
|
@@ -19,6 +14,10 @@ const {
|
|
|
19
14
|
required?: boolean
|
|
20
15
|
}>()
|
|
21
16
|
|
|
17
|
+
const emit = defineEmits<{
|
|
18
|
+
'should-validate': []
|
|
19
|
+
}>()
|
|
20
|
+
|
|
22
21
|
const state = defineModel<Partial<ConnectAddress>>({ required: true })
|
|
23
22
|
|
|
24
23
|
async function populateAddressComplete(e: ConnectAddress) {
|
|
@@ -38,12 +37,7 @@ async function populateAddressComplete(e: ConnectAddress) {
|
|
|
38
37
|
|
|
39
38
|
// wait for dom to populate inputs
|
|
40
39
|
await nextTick()
|
|
41
|
-
|
|
42
|
-
// validate populated fields if formRef provided
|
|
43
|
-
if (formRef) {
|
|
44
|
-
const fields = validKeys.map(k => `${schemaPrefix}.${k}`)
|
|
45
|
-
await formRef.validate({ name: fields, silent: true })
|
|
46
|
-
}
|
|
40
|
+
emit('should-validate')
|
|
47
41
|
}
|
|
48
42
|
</script>
|
|
49
43
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-forms",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.28",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"nuxt": "4.1.3",
|
|
13
13
|
"typescript": "5.9.3",
|
|
14
14
|
"vue-tsc": "3.1.2",
|
|
15
|
-
"@sbc-connect/playwright-config": "0.0.8",
|
|
16
15
|
"@sbc-connect/eslint-config": "0.0.8",
|
|
16
|
+
"@sbc-connect/playwright-config": "0.0.8",
|
|
17
17
|
"@sbc-connect/vitest-config": "0.0.6"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@sbc-connect/nuxt-base": "0.1.
|
|
20
|
+
"@sbc-connect/nuxt-base": "0.1.26"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"preinstall": "npx only-allow pnpm",
|