@sbc-connect/nuxt-forms 0.1.27 → 0.1.29

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,23 @@
1
1
  # @sbc-connect/nuxt-forms
2
2
 
3
+ ## 0.1.29
4
+
5
+ ### Patch Changes
6
+
7
+ - [#88](https://github.com/bcgov/connect-nuxt/pull/88) [`11ccded`](https://github.com/bcgov/connect-nuxt/commit/11ccdedb47c73d36a335ddd96e529fe74ca17480) Thanks [@kialj876](https://github.com/kialj876)! - Base layer - Update tombstone component stateKey prop to optional
8
+
9
+ - Updated dependencies [[`11ccded`](https://github.com/bcgov/connect-nuxt/commit/11ccdedb47c73d36a335ddd96e529fe74ca17480)]:
10
+ - @sbc-connect/nuxt-base@0.1.27
11
+
12
+ ## 0.1.28
13
+
14
+ ### Patch Changes
15
+
16
+ - [#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.
17
+
18
+ - Updated dependencies [[`c1fb4f2`](https://github.com/bcgov/connect-nuxt/commit/c1fb4f2a217b3d57e7ea7aed8b9773e215a21978)]:
19
+ - @sbc-connect/nuxt-base@0.1.26
20
+
3
21
  ## 0.1.27
4
22
 
5
23
  ### 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.27",
4
+ "version": "0.1.29",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",
@@ -13,11 +13,11 @@
13
13
  "typescript": "5.9.3",
14
14
  "vue-tsc": "3.1.2",
15
15
  "@sbc-connect/playwright-config": "0.0.8",
16
- "@sbc-connect/eslint-config": "0.0.8",
17
- "@sbc-connect/vitest-config": "0.0.6"
16
+ "@sbc-connect/vitest-config": "0.0.6",
17
+ "@sbc-connect/eslint-config": "0.0.8"
18
18
  },
19
19
  "dependencies": {
20
- "@sbc-connect/nuxt-base": "0.1.25"
20
+ "@sbc-connect/nuxt-base": "0.1.27"
21
21
  },
22
22
  "scripts": {
23
23
  "preinstall": "npx only-allow pnpm",