@bcrs-shared-components/base-address 2.1.4 → 2.2.0

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 (2) hide show
  1. package/BaseAddress.vue +5 -4
  2. package/package.json +3 -3
package/BaseAddress.vue CHANGED
@@ -228,24 +228,25 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
228
228
  readonly isInactive: boolean
229
229
 
230
230
  /** Called, possibly externally, to validate all registered form inputs. */
231
- public validate (): any {
231
+ public async validate (): Promise<boolean> {
232
232
  this.postalCodeRulesEnabled = true
233
+ await Vue.nextTick() // ensure postal code rules are functional before validating
233
234
  return this.$refs.addressForm.validate()
234
235
  }
235
236
 
236
237
  /** Called, possibly externally, to reset validation of all registered form inputs and clear their values. */
237
- public reset (): any {
238
+ public reset (): void {
238
239
  this.postalCodeRulesEnabled = false
239
240
  return this.$refs.addressForm.reset()
240
241
  }
241
242
 
242
243
  /** Called, possibly externally, to reset validation of all registered form inputs without modifying their values. */
243
- public resetValidation (): any {
244
+ public resetValidation (): void {
244
245
  return this.$refs.addressForm.resetValidation()
245
246
  }
246
247
 
247
248
  /** When country changes, resets fields. */
248
- onCountryChange () {
249
+ onCountryChange (): void {
249
250
  this.addressLocal['addressRegion'] = ''
250
251
  this.addressLocal['postalCode'] = ''
251
252
  // clear any existing validation errors
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@bcrs-shared-components/base-address",
3
- "version": "2.1.4",
3
+ "version": "2.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "dependencies": {
8
- "@bcrs-shared-components/mixins": "^1.2.4",
8
+ "@bcrs-shared-components/mixins": "^1.2.5",
9
9
  "lodash.uniqueid": "^4.0.1",
10
10
  "vue": "^2.7.14",
11
11
  "vuelidate": "0.6.2"
@@ -14,5 +14,5 @@
14
14
  "vue-property-decorator": "^9.1.2",
15
15
  "vuelidate-property-decorators": "1.0.28"
16
16
  },
17
- "gitHead": "6c26a10fa7eaaca56677221c469f85126493d956"
17
+ "gitHead": "d7b055ea9d67842bbf0bc63e790032fed00d051f"
18
18
  }