@sbc-connect/nuxt-forms 0.7.12 → 0.8.1

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,22 @@
1
1
  # @sbc-connect/nuxt-forms
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#204](https://github.com/bcgov/connect-nuxt/pull/204) [`a6c655c`](https://github.com/bcgov/connect-nuxt/commit/a6c655c177798565b04ffc0fe76b308d4841c9e5) Thanks [@eve-git](https://github.com/eve-git)! - Country dropdown: keep Canada and United States pinned at the top and also list them in their alphabetical position; search results show each only once.
8
+
9
+ ## 0.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#203](https://github.com/bcgov/connect-nuxt/pull/203) [`fedf109`](https://github.com/bcgov/connect-nuxt/commit/fedf109afdefa2869325afb9c7a268767c0e3d38) Thanks [@deetz99](https://github.com/deetz99)! - Update dependencies
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`fedf109`](https://github.com/bcgov/connect-nuxt/commit/fedf109afdefa2869325afb9c7a268767c0e3d38), [`fedf109`](https://github.com/bcgov/connect-nuxt/commit/fedf109afdefa2869325afb9c7a268767c0e3d38)]:
18
+ - @sbc-connect/nuxt-base@0.14.0
19
+
3
20
  ## 0.7.12
4
21
 
5
22
  ### Patch Changes
@@ -43,11 +43,13 @@ function matchesWordStart(text: string, search: string): boolean {
43
43
  // anything at runtime - the separator object itself stays `{ type: 'separator' }`.
44
44
  type CountryOption = Iso3166_1Country | (Partial<Iso3166_1Country> & { type: 'separator' })
45
45
 
46
+ // CA and US are pinned to the top for convenience, but also stay in their
47
+ // alphabetical position in the full list below the separator.
46
48
  const options: Array<CountryOption> = [
47
49
  countries.find(c => c.alpha_2 === 'CA')!,
48
50
  countries.find(c => c.alpha_2 === 'US')!,
49
51
  { type: 'separator' },
50
- ...countries.filter(c => c.alpha_2 !== 'CA' && c.alpha_2 !== 'US')
52
+ ...countries
51
53
  ]
52
54
 
53
55
  const searchTerm = ref('')
@@ -56,12 +58,8 @@ const filteredItems = computed(() => {
56
58
  if (!searchTerm.value.trim()) {
57
59
  return options
58
60
  }
59
- return options.filter((item) => {
60
- if ('type' in item) {
61
- return false
62
- }
63
- return matchesWordStart(item.name, searchTerm.value)
64
- })
61
+ // Search the full list (not `options`) so pinned countries only appear once
62
+ return countries.filter(item => matchesWordStart(item.name, searchTerm.value))
65
63
  })
66
64
  </script>
67
65
 
@@ -84,7 +82,7 @@ const filteredItems = computed(() => {
84
82
  :data-testid="`${parentId}-input-country`"
85
83
  :aria-labelledby="`${parentId}-input-country-label`"
86
84
  ignore-filter
87
- openOnFocus
85
+ open-on-focus
88
86
  :items="filteredItems"
89
87
  value-key="alpha_2"
90
88
  label-key="name"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-forms",
3
3
  "type": "module",
4
- "version": "0.7.12",
4
+ "version": "0.8.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "github:bcgov/connect-nuxt"
@@ -9,19 +9,19 @@
9
9
  "license": "BSD-3-Clause",
10
10
  "main": "./nuxt.config.ts",
11
11
  "devDependencies": {
12
- "@axe-core/playwright": "4.11.3",
13
- "dotenv": "17.4.2",
14
- "nuxt": "4.4.8",
12
+ "@axe-core/playwright": "4.13.0",
13
+ "dotenv": "18.0.4",
14
+ "nuxt": "4.5.2",
15
15
  "typescript": "6.0.3",
16
- "vue-tsc": "3.3.1",
16
+ "vue-tsc": "3.3.11",
17
17
  "@sbc-connect/eslint-config": "0.0.8",
18
18
  "@sbc-connect/playwright-config": "0.2.1",
19
19
  "@sbc-connect/vitest-config": "0.2.0"
20
20
  },
21
21
  "dependencies": {
22
- "country-codes-list": "2.0.0",
22
+ "country-codes-list": "3.2.0",
23
23
  "vue-country-flag-next": "2.3.2",
24
- "@sbc-connect/nuxt-base": "0.13.3"
24
+ "@sbc-connect/nuxt-base": "0.14.0"
25
25
  },
26
26
  "scripts": {
27
27
  "preinstall": "npx only-allow pnpm",