@fmidev/smartmet-alert-client 4.7.0-alpha.0 → 4.7.0-beta.13

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 (117) hide show
  1. package/AGENTS.md +26 -0
  2. package/Jenkinsfile +2 -0
  3. package/dist/index.html +4 -4
  4. package/dist/index.js +222 -236
  5. package/dist/index.mjs +223 -237
  6. package/dist/locale-en-DHsK0f7r.js +8 -0
  7. package/dist/locale-fi-BvhOIS2k.js +8 -0
  8. package/dist/locale-sv-DjUExDp4.js +8 -0
  9. package/dist/vendor-DlLAhxdV.js +21 -0
  10. package/dist/vue/AlertClientVue.vue.d.ts +112 -0
  11. package/dist/vue/index.mjs +14465 -14523
  12. package/dist/vue/style.css +1 -1
  13. package/dist/vue/vue.d.ts +3 -0
  14. package/dist/xml-parser-BiNO9kc-.js +1 -1
  15. package/index.html +1 -1
  16. package/package.json +34 -10
  17. package/src/AlertClientVue.vue +126 -136
  18. package/src/App.vue +138 -130
  19. package/src/assets/img/ui/ext-link.svg +7 -0
  20. package/src/components/AlertClient.vue +348 -291
  21. package/src/components/CollapsiblePanel.vue +25 -28
  22. package/src/components/DayLarge.vue +154 -123
  23. package/src/components/DaySmall.vue +101 -95
  24. package/src/components/Days.vue +190 -145
  25. package/src/components/DescriptionWarning.vue +91 -54
  26. package/src/components/GrayScaleToggle.vue +56 -57
  27. package/src/components/Legend.vue +102 -113
  28. package/src/components/MapLarge.vue +549 -322
  29. package/src/components/MapSmall.vue +150 -151
  30. package/src/components/PopupRow.vue +27 -18
  31. package/src/components/Region.vue +140 -105
  32. package/src/components/RegionWarning.vue +42 -36
  33. package/src/components/Regions.vue +196 -143
  34. package/src/components/Warning.vue +67 -50
  35. package/src/components/Warnings.vue +146 -97
  36. package/src/composables/useAlertClient.ts +360 -0
  37. package/src/composables/useConfig.ts +612 -0
  38. package/src/composables/useFields.ts +66 -0
  39. package/src/composables/useI18n.ts +62 -0
  40. package/src/composables/useKeyCodes.ts +16 -0
  41. package/src/composables/useMapPaths.ts +477 -0
  42. package/src/composables/useUtils.ts +683 -0
  43. package/src/composables/useWarningsProcessor.ts +1007 -0
  44. package/src/data/geometries.json +993 -0
  45. package/src/locales/en.json +30 -0
  46. package/src/locales/fi.json +32 -2
  47. package/src/locales/sv.json +30 -0
  48. package/src/mixins/geojsonsvg.d.ts +57 -0
  49. package/src/mixins/geojsonsvg.js +5 -3
  50. package/src/plugins/index.ts +5 -0
  51. package/src/scss/colors.scss +1 -0
  52. package/src/scss/themes/dark-gray.scss +1 -0
  53. package/src/scss/themes/dark.scss +1 -0
  54. package/src/scss/themes/light-gray.scss +1 -0
  55. package/src/scss/themes/light.scss +1 -0
  56. package/src/types/index.ts +509 -0
  57. package/src/vite-env.d.ts +23 -0
  58. package/tests/fixtures/{mockWarningData.js → mockWarningData.ts} +29 -12
  59. package/tests/integration/{warning-flow.spec.js → warning-flow.spec.ts} +124 -131
  60. package/tests/{setup.js → setup.ts} +5 -5
  61. package/tests/unit/components/{AlertClient.spec.js → AlertClient.spec.ts} +151 -184
  62. package/tests/unit/components/DayLarge.spec.ts +348 -0
  63. package/tests/unit/components/DaySmall.spec.ts +352 -0
  64. package/tests/unit/components/{Days.spec.js → Days.spec.ts} +88 -105
  65. package/tests/unit/components/DescriptionWarning.spec.ts +385 -0
  66. package/tests/unit/components/{GrayScaleToggle.spec.js → GrayScaleToggle.spec.ts} +64 -57
  67. package/tests/unit/components/Legend.spec.ts +295 -0
  68. package/tests/unit/components/MapLarge.spec.ts +448 -0
  69. package/tests/unit/components/MapSmall.spec.ts +367 -0
  70. package/tests/unit/components/{PopupRow.spec.js → PopupRow.spec.ts} +21 -12
  71. package/tests/unit/components/Region.spec.ts +373 -0
  72. package/tests/unit/components/RegionWarning.snapshot.spec.ts +361 -0
  73. package/tests/unit/components/RegionWarning.spec.ts +381 -0
  74. package/tests/unit/components/Regions.spec.ts +503 -0
  75. package/tests/unit/components/Warning.snapshot.spec.ts +483 -0
  76. package/tests/unit/components/{Warning.spec.js → Warning.spec.ts} +110 -93
  77. package/tests/unit/components/{Warnings.spec.js → Warnings.spec.ts} +77 -63
  78. package/tests/unit/components/__snapshots__/RegionWarning.snapshot.spec.ts.snap +41 -0
  79. package/tests/unit/components/__snapshots__/Warning.snapshot.spec.ts.snap +433 -0
  80. package/tests/unit/{mixins/config.spec.js → composables/useConfig.spec.ts} +69 -59
  81. package/tests/unit/composables/useI18n.spec.ts +116 -0
  82. package/tests/unit/composables/useKeyCodes.spec.ts +27 -0
  83. package/tests/unit/composables/useUtils.spec.ts +213 -0
  84. package/tsconfig.json +43 -0
  85. package/tsconfig.node.json +11 -0
  86. package/vite.config.js +11 -4
  87. package/vitest.config.js +1 -1
  88. package/dist/locale-en-DCEKDw5G.js +0 -8
  89. package/dist/locale-fi-DPiOM1rB.js +0 -8
  90. package/dist/locale-sv-B0FlbgEF.js +0 -8
  91. package/dist/vendor-Cfkkvdz7.js +0 -21
  92. package/src/assets/img/ui/ext-link.gif +0 -0
  93. package/src/mixins/alertClientCore.js +0 -210
  94. package/src/mixins/config.js +0 -1384
  95. package/src/mixins/fields.js +0 -26
  96. package/src/mixins/i18n.js +0 -25
  97. package/src/mixins/keycodes.js +0 -10
  98. package/src/mixins/utils.js +0 -914
  99. package/src/plugins/index.js +0 -3
  100. package/tests/unit/components/DayLarge.spec.js +0 -281
  101. package/tests/unit/components/DaySmall.spec.js +0 -278
  102. package/tests/unit/components/DescriptionWarning.spec.js +0 -432
  103. package/tests/unit/components/Legend.spec.js +0 -223
  104. package/tests/unit/components/MapLarge.spec.js +0 -276
  105. package/tests/unit/components/MapSmall.spec.js +0 -226
  106. package/tests/unit/components/Region.spec.js +0 -430
  107. package/tests/unit/components/RegionWarning.snapshot.spec.js +0 -73
  108. package/tests/unit/components/RegionWarning.spec.js +0 -408
  109. package/tests/unit/components/Regions.spec.js +0 -335
  110. package/tests/unit/components/Warning.snapshot.spec.js +0 -107
  111. package/tests/unit/components/__snapshots__/RegionWarning.snapshot.spec.js.snap +0 -21
  112. package/tests/unit/components/__snapshots__/Warning.snapshot.spec.js.snap +0 -199
  113. package/tests/unit/mixins/i18n.spec.js +0 -115
  114. package/tests/unit/mixins/keycodes.spec.js +0 -37
  115. package/tests/unit/mixins/utils.spec.js +0 -624
  116. /package/src/{main.js → main.ts} +0 -0
  117. /package/src/{vue.js → vue.ts} +0 -0
package/AGENTS.md ADDED
@@ -0,0 +1,26 @@
1
+ # Agent Guidelines for SmartMet Alert Client
2
+
3
+ ## Build & Test Commands
4
+
5
+ - `npm run dev` - Start dev server with hot reload
6
+ - `npm run build` - Production build
7
+ - `npm run lint` - Lint .js and .vue files
8
+ - `npm run lint:fix` - Auto-fix linting issues
9
+ - `npm test` - Run tests in watch mode
10
+ - `npm run test:run` - Run all tests once (CI/CD)
11
+ - `vitest path/to/file.spec.js` - Run single test file
12
+
13
+ ## Code Style
14
+
15
+ - **Formatting**: Prettier with single quotes, no semicolons, bracket spacing, arrowParens always
16
+ - **Imports**: Use `@/` alias for src imports (e.g., `import AlertClient from '@/components/AlertClient.vue'`)
17
+ - **Vue**: Vue 3 composition API, relaxed rules (self-closing, multi-word names, v-html allowed)
18
+ - **ESLint**: Standard + Vue3-recommended + SonarJS (cognitive complexity/duplicate strings disabled)
19
+ - **Naming**: camelCase for variables/functions, PascalCase for components
20
+
21
+ ## Architecture
22
+
23
+ - Vue 3 web components with custom elements
24
+ - Mixins for shared logic (config, utils, i18n, geojsonsvg, fields, keycodes)
25
+ - ES2020 modules, SCSS with modern compiler
26
+ - Vitest + @vue/test-utils + jsdom for testing
package/Jenkinsfile CHANGED
@@ -83,6 +83,7 @@ pipeline {
83
83
  }
84
84
  }
85
85
 
86
+ /* Disabled npmjs.com deployment for now
86
87
  stage('Publish package to npmjs.com') {
87
88
  when { environment name: 'BRANCH_NAME', value: 'main' }
88
89
  environment {
@@ -95,6 +96,7 @@ pipeline {
95
96
  }
96
97
  }
97
98
  }
99
+ */
98
100
 
99
101
  post {
100
102
  success {
package/dist/index.html CHANGED
@@ -7,11 +7,11 @@
7
7
  content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
8
8
  <title>SmartMet Alert Client</title>
9
9
  <script type="module" crossorigin src="./index.mjs"></script>
10
- <link rel="modulepreload" crossorigin href="./vendor-Cfkkvdz7.js">
10
+ <link rel="modulepreload" crossorigin href="./vendor-DlLAhxdV.js">
11
11
  <link rel="modulepreload" crossorigin href="./xml-parser-BiNO9kc-.js">
12
- <link rel="modulepreload" crossorigin href="./locale-en-DCEKDw5G.js">
13
- <link rel="modulepreload" crossorigin href="./locale-fi-DPiOM1rB.js">
14
- <link rel="modulepreload" crossorigin href="./locale-sv-B0FlbgEF.js">
12
+ <link rel="modulepreload" crossorigin href="./locale-en-DHsK0f7r.js">
13
+ <link rel="modulepreload" crossorigin href="./locale-fi-BvhOIS2k.js">
14
+ <link rel="modulepreload" crossorigin href="./locale-sv-DjUExDp4.js">
15
15
  </head>
16
16
 
17
17
  <body>