@sbc-connect/nuxt-base 0.1.22 → 0.1.23
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,15 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-base
|
|
2
2
|
|
|
3
|
+
## 0.1.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#77](https://github.com/bcgov/connect-nuxt/pull/77) [`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5) Thanks [@deetz99](https://github.com/deetz99)! - feat: Allow different element in ConnectI18nHelper and sanitize html.
|
|
8
|
+
|
|
9
|
+
- [#77](https://github.com/bcgov/connect-nuxt/pull/77) [`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5) Thanks [@deetz99](https://github.com/deetz99)! - Update dependencies
|
|
10
|
+
|
|
11
|
+
- [#77](https://github.com/bcgov/connect-nuxt/pull/77) [`86ec3d0`](https://github.com/bcgov/connect-nuxt/commit/86ec3d03baa7dae3137f6c4c96a328f13eb46ce5) Thanks [@deetz99](https://github.com/deetz99)! - fix: reactivity issue in ConnectAddressDisplay component.
|
|
12
|
+
|
|
3
13
|
## 0.1.22
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -54,7 +54,9 @@ const getAddressDisplayParts = (
|
|
|
54
54
|
].filter(val => !!val && val !== ',')
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
const addressDisplay =
|
|
57
|
+
const addressDisplay = computed<string[]>(() =>
|
|
58
|
+
getAddressDisplayParts(props.address, props.separateCity, props.textDecor, props.omitCountry)
|
|
59
|
+
)
|
|
58
60
|
</script>
|
|
59
61
|
|
|
60
62
|
<template>
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
/* eslint-disable vue/no-v-html */
|
|
3
|
+
/* eslint-disable vue/no-v-text-v-html-on-component */
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
translationPath,
|
|
7
|
+
as = 'span'
|
|
8
|
+
} = defineProps<{
|
|
3
9
|
translationPath: string
|
|
10
|
+
as?: 'h1'
|
|
11
|
+
| 'h2'
|
|
12
|
+
| 'h3'
|
|
13
|
+
| 'h4'
|
|
14
|
+
| 'h5'
|
|
15
|
+
| 'h6'
|
|
16
|
+
| 'label'
|
|
17
|
+
| 'span'
|
|
18
|
+
| 'p'
|
|
19
|
+
| 'div'
|
|
20
|
+
| 'li'
|
|
21
|
+
| 'legend'
|
|
22
|
+
| 'strong'
|
|
23
|
+
| 'em'
|
|
4
24
|
}>()
|
|
5
25
|
|
|
6
26
|
const attrs = useAttrs()
|
|
@@ -14,11 +34,10 @@ const textToDisplay = computed(() => {
|
|
|
14
34
|
italicStart: '<em>',
|
|
15
35
|
italicEnd: '</em>'
|
|
16
36
|
}
|
|
17
|
-
return t(
|
|
37
|
+
return t(translationPath, translationProps)
|
|
18
38
|
})
|
|
19
39
|
</script>
|
|
20
40
|
|
|
21
41
|
<template>
|
|
22
|
-
|
|
23
|
-
<span v-html="textToDisplay" />
|
|
42
|
+
<component :is="as" v-html="$sanitize(textToDisplay)" />
|
|
24
43
|
</template>
|
package/i18n/locales/en-CA.ts
CHANGED
|
@@ -60,7 +60,10 @@ export default {
|
|
|
60
60
|
strong: 'This should have {boldStart} bold {boldEnd} text',
|
|
61
61
|
strongWithProps: 'This should have {boldStart} bold {boldEnd} text and allow a {prop}',
|
|
62
62
|
italic: 'Italic test {italicStart} goes here {italicEnd}.',
|
|
63
|
-
computed: 'This text will be updated. Updated {boldStart}{count}{boldEnd} times.'
|
|
63
|
+
computed: 'This text will be updated. Updated {boldStart}{count}{boldEnd} times.',
|
|
64
|
+
sanitized: () => {
|
|
65
|
+
return "This is <strong>safe bold text</strong>, with a sanitized <script>alert('XSS')</script> script element."
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.23",
|
|
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": "^
|
|
11
|
-
"@nuxtjs/i18n": "^10.
|
|
12
|
-
"@vueuse/core": "
|
|
13
|
-
"@vueuse/nuxt": "
|
|
14
|
-
"dompurify": "^3.
|
|
15
|
-
"es-toolkit": "^1.
|
|
10
|
+
"@nuxt/ui": "^4.1.0",
|
|
11
|
+
"@nuxtjs/i18n": "^10.1.2",
|
|
12
|
+
"@vueuse/core": "14.0.0",
|
|
13
|
+
"@vueuse/nuxt": "14.0.0",
|
|
14
|
+
"dompurify": "^3.3.0",
|
|
15
|
+
"es-toolkit": "^1.41.0",
|
|
16
16
|
"launchdarkly-vue-client-sdk": "^2.4.1",
|
|
17
|
-
"maska": "^3.2.0"
|
|
17
|
+
"maska": "^3.2.0",
|
|
18
|
+
"zod": "^4.1.12"
|
|
18
19
|
},
|
|
19
20
|
"devDependencies": {
|
|
20
|
-
"@axe-core/playwright": "
|
|
21
|
-
"@vitest/coverage-v8": "
|
|
22
|
-
"dotenv": "
|
|
23
|
-
"nuxt": "
|
|
24
|
-
"typescript": "
|
|
25
|
-
"vue-tsc": "
|
|
26
|
-
"@sbc-connect/eslint-config": "0.0.
|
|
21
|
+
"@axe-core/playwright": "4.11.0",
|
|
22
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
23
|
+
"dotenv": "17.2.3",
|
|
24
|
+
"nuxt": "4.1.3",
|
|
25
|
+
"typescript": "5.9.3",
|
|
26
|
+
"vue-tsc": "3.1.2",
|
|
27
|
+
"@sbc-connect/eslint-config": "0.0.8",
|
|
27
28
|
"@sbc-connect/playwright-config": "0.0.7",
|
|
28
29
|
"@sbc-connect/vitest-config": "0.0.6"
|
|
29
30
|
},
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"test": "pnpm run test:unit; pnpm run test:e2e",
|
|
40
41
|
"test:unit": "vitest run --passWithNoTests",
|
|
41
42
|
"test:unit:watch": "vitest",
|
|
43
|
+
"test:unit:cov": "vitest --dir tests/unit --coverage",
|
|
42
44
|
"test:e2e": "npx playwright test",
|
|
43
45
|
"test:e2e:ui": "npx playwright test --ui",
|
|
44
46
|
"typecheck": "npx nuxt typecheck"
|