@bcrs-shared-components/base-address 2.0.6 → 2.0.8

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 +17 -2
  2. package/package.json +3 -3
package/BaseAddress.vue CHANGED
@@ -108,7 +108,8 @@
108
108
  :label="addressRegionLabel"
109
109
  item-text="name"
110
110
  item-value="short"
111
- :items="getCountryRegions(addressCountry)"
111
+ :items="isAddressCountryCanadaAndExcludeBc ? getCanadaRegionsExcludeBC() :
112
+ getCountryRegions(addressCountry)"
112
113
  :rules="[...rules.addressRegion, ...spaceRules]"
113
114
  />
114
115
  <v-text-field
@@ -218,6 +219,12 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
218
219
  @Prop({ default: false })
219
220
  readonly noPoBox: boolean
220
221
 
222
+ @Prop({ default: '' })
223
+ readonly deliveryInstructionsText: string
224
+
225
+ @Prop({ default: false })
226
+ readonly excludeBC: boolean
227
+
221
228
  resetRegion () {
222
229
  this.addressLocal['addressRegion'] = ''
223
230
  }
@@ -246,6 +253,10 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
246
253
  return this.addressLocal['addressCountry']
247
254
  }
248
255
 
256
+ get isAddressCountryCanadaAndExcludeBc (): boolean {
257
+ return this.addressLocal['addressCountry'] === 'CA' && this.excludeBC
258
+ }
259
+
249
260
  /** The Street Address Additional label with 'optional' as needed. */
250
261
  get streetAddressAdditionalLabel (): string {
251
262
  return 'Additional Street Address' + (this.isSchemaRequired('streetAddressAdditional') ? '' : ' (Optional)')
@@ -298,7 +309,11 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
298
309
 
299
310
  /** The Delivery Instructions label with 'optional' as needed. */
300
311
  get deliveryInstructionsLabel (): string {
301
- return 'Delivery Instructions' + (this.isSchemaRequired('deliveryInstructions') ? '' : ' (Optional)')
312
+ if (this.deliveryInstructionsText) {
313
+ return this.deliveryInstructionsText + (this.isSchemaRequired('deliveryInstructions') ? '' : ' (Optional)')
314
+ } else {
315
+ return 'Delivery Instructions' + (this.isSchemaRequired('deliveryInstructions') ? '' : ' (Optional)')
316
+ }
302
317
  }
303
318
 
304
319
  get streetAddressHint (): string {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@bcrs-shared-components/base-address",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "dependencies": {
8
- "@bcrs-shared-components/mixins": "^1.1.24",
8
+ "@bcrs-shared-components/mixins": "^1.1.26",
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": "2a81f4e91757b1252c87e60e386fbcc7874423f8"
17
+ "gitHead": "11403a5365ab8f5768a3f2611c91ed3f5c00b10a"
18
18
  }