@sbc-connect/nuxt-base 0.7.0 → 0.7.2
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 +12 -0
- package/app/components/Connect/Input.vue +15 -5
- package/app/components/Connect/InputDate.vue +2 -5
- package/app/components/Connect/LocaleSelect.vue +2 -2
- package/app/components/Connect/Textarea.vue +3 -1
- package/app/components/HelloWorld/Index.vue +1 -1
- package/app/utils/setBreadcrumbs.ts +3 -1
- package/i18n/locales/fr-CA.ts +8 -2
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-base
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149](https://github.com/bcgov/connect-nuxt/pull/149) [`467e679`](https://github.com/bcgov/connect-nuxt/commit/467e679f8bf4b2f3b9ec2294fd28a2a6c5ef3dba) Thanks [@deetz99](https://github.com/deetz99)! - Update dependencies
|
|
8
|
+
|
|
9
|
+
## 0.7.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#138](https://github.com/bcgov/connect-nuxt/pull/138) [`e6dc55d`](https://github.com/bcgov/connect-nuxt/commit/e6dc55d18b84754e2416112ebbf42b780b8bb3ac) Thanks [@deetz99](https://github.com/deetz99)! - Minor update to test trusted publishing.
|
|
14
|
+
|
|
3
15
|
## 0.7.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { InputProps } from '@nuxt/ui'
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const {
|
|
5
|
+
id,
|
|
6
|
+
autoFocus = false
|
|
7
|
+
} = defineProps<{
|
|
5
8
|
id: string
|
|
6
9
|
label: string
|
|
7
10
|
mask?: string
|
|
@@ -9,27 +12,34 @@ const props = defineProps<{
|
|
|
9
12
|
autoFocus?: boolean
|
|
10
13
|
}>()
|
|
11
14
|
|
|
12
|
-
const model = defineModel<
|
|
15
|
+
const model = defineModel<InputProps['modelValue']>({ required: true })
|
|
16
|
+
const inputRef = useTemplateRef('input-ref')
|
|
13
17
|
|
|
14
18
|
// Inject props
|
|
15
19
|
const injectedProps = inject<InputProps>(
|
|
16
|
-
`UInput-props${
|
|
20
|
+
`UInput-props${id ? `-${id}` : ''}`,
|
|
17
21
|
{} as InputProps
|
|
18
22
|
)
|
|
19
23
|
|
|
20
24
|
// Inject slots
|
|
21
25
|
const injectedSlots = inject<{ [key: string]: VNode }>(
|
|
22
|
-
`UInput-slots${
|
|
26
|
+
`UInput-slots${id ? `-${id}` : ''}`,
|
|
23
27
|
{}
|
|
24
28
|
)
|
|
29
|
+
|
|
30
|
+
defineExpose({ input: inputRef })
|
|
31
|
+
|
|
32
|
+
// vue ignore reason - type mismatch between model and defaultValue prop caused by strict generics
|
|
25
33
|
</script>
|
|
26
34
|
|
|
27
35
|
<template>
|
|
36
|
+
<!-- @vue-ignore -->
|
|
28
37
|
<UInput
|
|
38
|
+
ref="input-ref"
|
|
29
39
|
v-bind="{
|
|
30
40
|
id,
|
|
31
41
|
disabled,
|
|
32
|
-
autoFocus,
|
|
42
|
+
autofocus: autoFocus,
|
|
33
43
|
...injectedProps, // injected props will default when provided
|
|
34
44
|
}"
|
|
35
45
|
v-model.trim="model"
|
|
@@ -46,17 +46,14 @@ const calendarRef = useTemplateRef('calendar-ref')
|
|
|
46
46
|
const inputRef = useTemplateRef<InstanceType<typeof ConnectInput>>('input-ref')
|
|
47
47
|
|
|
48
48
|
function focusCalendar() {
|
|
49
|
-
const button = (calendarRef.value as any)
|
|
49
|
+
const button = (calendarRef.value as any)?.$el?.querySelector('button')
|
|
50
50
|
if (button) {
|
|
51
51
|
(button as HTMLButtonElement).focus()
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
function focusInput() {
|
|
56
|
-
|
|
57
|
-
if (input) {
|
|
58
|
-
(input as HTMLInputElement).focus()
|
|
59
|
-
}
|
|
56
|
+
inputRef.value?.input?.inputRef?.focus()
|
|
60
57
|
open.value = false
|
|
61
58
|
emit('blur')
|
|
62
59
|
}
|
|
@@ -4,7 +4,7 @@ import type { LocaleObject } from '@nuxtjs/i18n'
|
|
|
4
4
|
|
|
5
5
|
const { locale, locales, setLocale } = useI18n()
|
|
6
6
|
|
|
7
|
-
const items = computed((): DropdownMenuItem[] => {
|
|
7
|
+
const items = computed((): DropdownMenuItem[][] => {
|
|
8
8
|
const options = locales.value.map((loc: LocaleObject) => {
|
|
9
9
|
const isCurrentLocal = loc.code === locale.value
|
|
10
10
|
return {
|
|
@@ -12,7 +12,7 @@ const items = computed((): DropdownMenuItem[] => {
|
|
|
12
12
|
icon: isCurrentLocal ? 'i-mdi-check' : '',
|
|
13
13
|
onSelect: () => setLocale(loc.code),
|
|
14
14
|
class: isCurrentLocal ? 'bg-gray-100' : 'pl-8',
|
|
15
|
-
color: isCurrentLocal ? 'primary' : 'neutral'
|
|
15
|
+
color: isCurrentLocal ? 'primary' as const : 'neutral' as const
|
|
16
16
|
}
|
|
17
17
|
})
|
|
18
18
|
return [options]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
import type { TextareaProps } from '@nuxt/ui'
|
|
3
|
+
|
|
4
|
+
const model = defineModel<Exclude<TextareaProps['modelValue'], null>>({ required: true })
|
|
3
5
|
|
|
4
6
|
defineProps<{
|
|
5
7
|
id: string
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
1
2
|
export function setBreadcrumbs(breadcrumbs: ConnectBreadcrumb[]) {
|
|
2
3
|
const route = useRoute()
|
|
3
|
-
// @ts-
|
|
4
|
+
// @ts-ignore - Type instantiation is excessively deep and possibly infinite.
|
|
5
|
+
// ignore instead of expect error due to local TS vs typecheck variance
|
|
4
6
|
route.meta.breadcrumbs = breadcrumbs
|
|
5
7
|
}
|
package/i18n/locales/fr-CA.ts
CHANGED
|
@@ -28,9 +28,15 @@ export default {
|
|
|
28
28
|
goBack: 'Retour',
|
|
29
29
|
home: 'Accueil',
|
|
30
30
|
localeSelect: 'Sélectionnez une langue, langue courante: Français',
|
|
31
|
-
privacy: 'Confidentialité'
|
|
31
|
+
privacy: 'Confidentialité',
|
|
32
|
+
whatsNew: 'Nouveautés',
|
|
33
|
+
whatsNewAria: 'Nouveautés, {count} non lues',
|
|
34
|
+
whatsNewSlideover: 'Nouveautés — Registres de la CB'
|
|
32
35
|
},
|
|
33
|
-
text: {
|
|
36
|
+
text: {
|
|
37
|
+
whatsNewSlideoverDescription: ' ',
|
|
38
|
+
whatsNewSlideoverEmpty: 'Aucune nouveauté.'
|
|
39
|
+
}
|
|
34
40
|
},
|
|
35
41
|
btn: {
|
|
36
42
|
bcRegHome: 'Accueil des Registres de la CB',
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@iconify-json/mdi": "1.2.3",
|
|
10
|
-
"@nuxt/ui": "4.
|
|
11
|
-
"@nuxtjs/i18n": "10.2.
|
|
12
|
-
"@vueuse/core": "14.1
|
|
13
|
-
"@vueuse/nuxt": "14.1
|
|
14
|
-
"dompurify": "3.3.
|
|
15
|
-
"es-toolkit": "1.
|
|
16
|
-
"launchdarkly-vue-client-sdk": "2.
|
|
10
|
+
"@nuxt/ui": "4.6.0",
|
|
11
|
+
"@nuxtjs/i18n": "10.2.4",
|
|
12
|
+
"@vueuse/core": "14.2.1",
|
|
13
|
+
"@vueuse/nuxt": "14.2.1",
|
|
14
|
+
"dompurify": "3.3.3",
|
|
15
|
+
"es-toolkit": "1.45.1",
|
|
16
|
+
"launchdarkly-vue-client-sdk": "2.5.0",
|
|
17
17
|
"luxon": "3.7.2",
|
|
18
18
|
"maska": "3.2.0",
|
|
19
|
-
"zod": "4.
|
|
19
|
+
"zod": "4.3.6"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@axe-core/playwright": "4.11.
|
|
22
|
+
"@axe-core/playwright": "4.11.1",
|
|
23
23
|
"@types/luxon": "3.7.1",
|
|
24
|
-
"dotenv": "17.
|
|
24
|
+
"dotenv": "17.3.1",
|
|
25
25
|
"nuxt": "4.2.2",
|
|
26
26
|
"typescript": "5.9.3",
|
|
27
|
-
"vue-tsc": "3.2.
|
|
27
|
+
"vue-tsc": "3.2.5",
|
|
28
28
|
"@sbc-connect/eslint-config": "0.0.8",
|
|
29
|
-
"@sbc-connect/
|
|
30
|
-
"@sbc-connect/
|
|
29
|
+
"@sbc-connect/playwright-config": "0.1.1",
|
|
30
|
+
"@sbc-connect/vitest-config": "0.1.1"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"preinstall": "npx only-allow pnpm",
|