@bcrs-shared-components/base-address 2.0.44 → 2.0.45
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/BaseAddress.vue +22 -1
- package/package.json +2 -2
package/BaseAddress.vue
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
menu-props="auto"
|
|
71
71
|
item-text="name"
|
|
72
72
|
item-value="code"
|
|
73
|
-
:items="
|
|
73
|
+
:items="getCountriesList()"
|
|
74
74
|
:rules="[...rules.addressCountry, ...spaceRules]"
|
|
75
75
|
@change="resetRegion()"
|
|
76
76
|
/>
|
|
@@ -497,6 +497,27 @@ export default class BaseAddress extends Mixins(ValidationMixin, CountriesProvin
|
|
|
497
497
|
Vue.nextTick(() => { (this.$refs.addressForm as any).validate() })
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
+
getCountriesList (): Array<object> {
|
|
501
|
+
const countries = this.getCountries()
|
|
502
|
+
|
|
503
|
+
// List of priority countries
|
|
504
|
+
const priorityCountries = ['Canada', 'United States of America']
|
|
505
|
+
|
|
506
|
+
const prioritizedCountries = countries.filter((country: any) =>
|
|
507
|
+
priorityCountries.includes(country.name)
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
const countriesList = countries.filter((country: any) =>
|
|
511
|
+
!priorityCountries.includes(country.name)
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
return [
|
|
515
|
+
...prioritizedCountries,
|
|
516
|
+
{ divider: true },
|
|
517
|
+
...countriesList
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
|
|
500
521
|
combineLines (line1: string, line2: string) {
|
|
501
522
|
if (!line1) return line2
|
|
502
523
|
if (!line2) return line1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcrs-shared-components/base-address",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.45",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"vue-property-decorator": "^9.1.2",
|
|
15
15
|
"vuelidate-property-decorators": "1.0.28"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "173a0b893023c00ed6b18e3c25fd1b5b0c182971"
|
|
18
18
|
}
|