@sbc-connect/nuxt-base 0.1.3 → 0.1.5

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.
Files changed (43) hide show
  1. package/.env.example +11 -1
  2. package/CHANGELOG.md +54 -0
  3. package/LICENSE +28 -0
  4. package/README.md +36 -47
  5. package/app/app.config.ts +56 -138
  6. package/app/app.vue +16 -3
  7. package/app/components/Connect/BCGovLogo.vue +4 -4
  8. package/app/components/Connect/Breadcrumb.vue +61 -0
  9. package/app/components/Connect/Footer.vue +104 -0
  10. package/app/components/Connect/Header/LogoHomeLink.vue +4 -4
  11. package/app/components/Connect/Header/WhatsNew.vue +36 -0
  12. package/app/components/Connect/Header/Wrapper.vue +3 -3
  13. package/app/components/Connect/Header/index.vue +16 -1
  14. package/app/components/Connect/I18n/Helper.vue +24 -0
  15. package/app/components/Connect/Input.vue +32 -0
  16. package/app/components/Connect/LocaleSelect.vue +1 -1
  17. package/app/components/Connect/PageSection.vue +57 -0
  18. package/app/components/Connect/Slideover/WhatsNew.vue +61 -0
  19. package/app/components/Connect/Spinner.vue +94 -0
  20. package/app/components/Connect/SystemBanner.vue +50 -0
  21. package/app/components/Connect/Textarea.vue +30 -0
  22. package/app/composables/useConnectLaunchDarkly.ts +177 -0
  23. package/app/error.vue +53 -0
  24. package/app/interfaces/connect-breadcrumb.ts +5 -0
  25. package/app/interfaces/connect-whatsnew.ts +14 -0
  26. package/app/layouts/{default.vue → ConnectBase.vue} +3 -0
  27. package/app/plugins/launchdarkly.client.ts +9 -0
  28. package/app/plugins/maska.client.ts +10 -0
  29. package/app/plugins/sanitize.client.ts +13 -0
  30. package/app/plugins/whats-new.client.ts +45 -0
  31. package/app/spa-loading-template.html +61 -0
  32. package/app/types/base-app-config.d.ts +15 -0
  33. package/app/types/base-page-meta.d.ts +8 -0
  34. package/app/utils/appendUrlParam.ts +4 -0
  35. package/app/utils/parseSpecialCharacters.ts +25 -0
  36. package/app/utils/setBreadcrumbs.ts +5 -0
  37. package/i18n/locales/en-CA.ts +53 -84
  38. package/i18n/locales/fr-CA.ts +33 -30
  39. package/modules/assets/index.ts +1 -1
  40. package/modules/assets/runtime/assets/core-tw.css +61 -32
  41. package/nuxt.config.ts +80 -1
  42. package/package.json +20 -9
  43. package/app/components/Connect/Header/Base.vue +0 -17
package/nuxt.config.ts CHANGED
@@ -18,7 +18,14 @@ export default defineNuxtConfig({
18
18
 
19
19
  compatibilityDate: '2025-07-10',
20
20
 
21
- modules: ['@nuxtjs/i18n'],
21
+ imports: {
22
+ dirs: ['interfaces', 'types']
23
+ },
24
+
25
+ modules: [
26
+ '@nuxtjs/i18n',
27
+ '@vueuse/nuxt'
28
+ ],
22
29
 
23
30
  // For more details on i18n in layers: https://i18n.nuxtjs.org/docs/guide/layers
24
31
  // For more details on config: https://i18n.nuxtjs.org/docs/api/options
@@ -43,5 +50,77 @@ export default defineNuxtConfig({
43
50
  }
44
51
  ],
45
52
  strategy: 'prefix'
53
+ },
54
+
55
+ ui: {
56
+ colorMode: false,
57
+ theme: {
58
+ colors: [
59
+ 'primary',
60
+ 'secondary',
61
+ 'success',
62
+ 'info',
63
+ 'warning',
64
+ 'error',
65
+ 'brandDark',
66
+ 'brandLight',
67
+ 'lineDark',
68
+ 'lineLight',
69
+ 'lineSpecial',
70
+ 'neutral',
71
+ 'neutralDark',
72
+ 'neutralLight',
73
+ 'shadeCaution',
74
+ 'shadeLight',
75
+ 'shadeNew',
76
+ 'shadePrimary',
77
+ 'shadeSecondary',
78
+ 'shadeSpecial',
79
+ 'shadeWarning'
80
+ ]
81
+ }
82
+ },
83
+
84
+ icon: {
85
+ clientBundle: {
86
+ icons: [
87
+ 'mdi:arrow-left',
88
+ 'mdi:arrow-right',
89
+ 'mdi:info-outline',
90
+ 'mdi:information',
91
+ 'mdi:web',
92
+ 'mdi:check',
93
+ 'mdi:chevron-double-left',
94
+ 'mdi:chevron-double-right',
95
+ 'mdi:menu-down',
96
+ 'mdi:menu-left',
97
+ 'mdi:menu-right',
98
+ 'mdi:menu-up',
99
+ 'mdi:close',
100
+ 'mdi:dots-horizontal',
101
+ 'mdi:open-in-new',
102
+ 'mdi:file',
103
+ 'mdi:folder',
104
+ 'mdi:folder-open',
105
+ 'mdi:loading',
106
+ 'mdi:minus',
107
+ 'mdi:plus',
108
+ 'mdi:magnify',
109
+ 'mdi:upload'
110
+ ]
111
+ }
112
+ },
113
+
114
+ runtimeConfig: {
115
+ public: {
116
+ // Should in alphabetical order
117
+ appName: process.env.npm_package_name || '',
118
+ version: `Connect Base Layer v${process.env.npm_package_version || ''}`,
119
+ baseUrl: '',
120
+ registryHomeUrl: '',
121
+ ldClientId: '',
122
+ statusApiUrl: '',
123
+ statusApiVersion: ''
124
+ }
46
125
  }
47
126
  })
package/package.json CHANGED
@@ -1,23 +1,32 @@
1
1
  {
2
2
  "name": "@sbc-connect/nuxt-base",
3
3
  "type": "module",
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "repository": "github:bcgov/connect-nuxt",
6
+ "license": "BSD-3-Clause",
6
7
  "main": "./nuxt.config.ts",
7
8
  "dependencies": {
8
- "@nuxt/ui": "^3.2.0",
9
- "@nuxtjs/i18n": "^10.0.1"
9
+ "@iconify-json/mdi": "^1.2.3",
10
+ "@nuxt/ui": "^3.3.0",
11
+ "@nuxtjs/i18n": "^10.0.2",
12
+ "dompurify": "^3.2.6",
13
+ "launchdarkly-vue-client-sdk": "^2.4.1",
14
+ "@vueuse/nuxt": "^13.5.0",
15
+ "@vueuse/core": "^13.5.0",
16
+ "lodash-es": "^4.17.21",
17
+ "maska": "^3.1.1"
10
18
  },
11
19
  "devDependencies": {
12
20
  "@axe-core/playwright": "^4.10.2",
13
- "@vitest/coverage-v8": "^3.2.3",
21
+ "@vitest/coverage-v8": "^3.2.4",
14
22
  "dotenv": "^17.2.0",
15
- "nuxt": "4.0.0",
23
+ "nuxt": "^4.0.0",
16
24
  "typescript": "^5.8.3",
17
- "vue-tsc": "^3.0.2",
18
- "@sbc-connect/eslint-config": "0.0.4",
25
+ "vue-tsc": "^3.0.3",
26
+ "@types/lodash-es": "^4.17.12",
19
27
  "@sbc-connect/playwright-config": "0.0.4",
20
- "@sbc-connect/vitest-config": "0.0.4"
28
+ "@sbc-connect/vitest-config": "0.0.5",
29
+ "@sbc-connect/eslint-config": "0.0.5"
21
30
  },
22
31
  "scripts": {
23
32
  "preinstall": "npx only-allow pnpm",
@@ -29,8 +38,10 @@
29
38
  "lint": "eslint .",
30
39
  "lint:fix": "eslint --fix .",
31
40
  "test": "pnpm run test:unit; pnpm run test:e2e",
32
- "test:unit": "vitest run",
41
+ "test:unit": "vitest run --passWithNoTests",
42
+ "test:unit:watch": "vitest",
33
43
  "test:e2e": "npx playwright test",
44
+ "test:e2e:ui": "npx playwright test --ui",
34
45
  "typecheck": "npx nuxt typecheck"
35
46
  }
36
47
  }
@@ -1,17 +0,0 @@
1
- <script setup lang="ts">
2
- const localeSelect = useAppConfig().connect.header.localeSelect
3
- </script>
4
-
5
- <template>
6
- <ConnectHeaderWrapper>
7
- <div class="flex items-center justify-between">
8
- <ConnectHeaderLogoHomeLink />
9
- <ClientOnly>
10
- <div class="flex gap-4">
11
- <slot />
12
- <ConnectLocaleSelect v-if="localeSelect" />
13
- </div>
14
- </ClientOnly>
15
- </div>
16
- </ConnectHeaderWrapper>
17
- </template>