@sbc-connect/nuxt-base 0.1.14 → 0.1.15

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,11 @@
1
1
  # @sbc-connect/nuxt-base
2
2
 
3
+ ## 0.1.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [#56](https://github.com/bcgov/connect-nuxt/pull/56) [`cab53dc`](https://github.com/bcgov/connect-nuxt/commit/cab53dc83ab8c8032bdb424a9e135febdfebf645) Thanks [@kialj876](https://github.com/kialj876)! - Address display component update
8
+
3
9
  ## 0.1.14
4
10
 
5
11
  ### Patch Changes
@@ -2,6 +2,8 @@
2
2
  const props = defineProps<{
3
3
  address: Partial<ConnectAddress>
4
4
  omitCountry?: boolean
5
+ separateCity?: boolean
6
+ textDecor?: boolean
5
7
  }>()
6
8
 
7
9
  const getAddressDisplayParts = (
@@ -37,9 +39,12 @@ const getAddressDisplayParts = (
37
39
  }
38
40
 
39
41
  const getCountry = () => {
40
- return address.country && !omitCountry ? (regionNamesInEnglish.of(address.country) || address.country) : ''
42
+ try {
43
+ return address.country && !omitCountry ? (regionNamesInEnglish.of(address.country) || address.country) : ''
44
+ } catch {
45
+ return address.country || ''
46
+ }
41
47
  }
42
-
43
48
  return [
44
49
  getLine1(),
45
50
  getLine2(),
@@ -49,7 +54,7 @@ const getAddressDisplayParts = (
49
54
  ].filter(val => !!val && val !== ',')
50
55
  }
51
56
 
52
- const addressDisplay = getAddressDisplayParts(props.address, false, true, props.omitCountry)
57
+ const addressDisplay = getAddressDisplayParts(props.address, props.separateCity, props.textDecor, props.omitCountry)
53
58
  </script>
54
59
 
55
60
  <template>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-base",
3
3
  "type": "module",
4
- "version": "0.1.14",
4
+ "version": "0.1.15",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "./nuxt.config.ts",