@fmidev/smartmet-alert-client 4.7.0-alpha.0 → 4.7.0-beta.3
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/AGENTS.md +26 -0
- package/dist/index.html +2 -2
- package/dist/index.js +183 -236
- package/dist/index.mjs +184 -237
- package/dist/locale-en-DCEKDw5G.js +1 -1
- package/dist/locale-fi-XDTFwO-_.js +8 -0
- package/dist/locale-sv-B0FlbgEF.js +1 -1
- package/dist/vendor-DlLAhxdV.js +21 -0
- package/dist/vue/AlertClientVue.vue.d.ts +112 -0
- package/dist/vue/index.mjs +14373 -14503
- package/dist/vue/style.css +1 -1
- package/dist/vue/vue.d.ts +3 -0
- package/dist/xml-parser-BiNO9kc-.js +1 -1
- package/index.html +1 -1
- package/package.json +32 -9
- package/src/AlertClientVue.vue +126 -136
- package/src/App.vue +138 -130
- package/src/assets/img/ui/ext-link.svg +7 -0
- package/src/components/AlertClient.vue +348 -291
- package/src/components/CollapsiblePanel.vue +25 -28
- package/src/components/DayLarge.vue +153 -122
- package/src/components/DaySmall.vue +101 -95
- package/src/components/Days.vue +190 -145
- package/src/components/DescriptionWarning.vue +91 -54
- package/src/components/GrayScaleToggle.vue +56 -57
- package/src/components/Legend.vue +102 -113
- package/src/components/MapLarge.vue +541 -317
- package/src/components/MapSmall.vue +150 -151
- package/src/components/PopupRow.vue +27 -18
- package/src/components/Region.vue +140 -105
- package/src/components/RegionWarning.vue +42 -36
- package/src/components/Regions.vue +196 -143
- package/src/components/Warning.vue +67 -50
- package/src/components/Warnings.vue +146 -97
- package/src/composables/useAlertClient.ts +360 -0
- package/src/composables/useConfig.ts +573 -0
- package/src/composables/useFields.ts +66 -0
- package/src/composables/useI18n.ts +62 -0
- package/src/composables/useKeyCodes.ts +16 -0
- package/src/composables/useMapPaths.ts +477 -0
- package/src/composables/useUtils.ts +683 -0
- package/src/composables/useWarningsProcessor.ts +1007 -0
- package/src/data/geometries.json +993 -0
- package/src/locales/fi.json +1 -1
- package/src/mixins/geojsonsvg.d.ts +57 -0
- package/src/mixins/geojsonsvg.js +5 -3
- package/src/plugins/index.ts +5 -0
- package/src/scss/colors.scss +1 -0
- package/src/scss/themes/dark-gray.scss +1 -0
- package/src/scss/themes/dark.scss +1 -0
- package/src/scss/themes/light-gray.scss +1 -0
- package/src/scss/themes/light.scss +1 -0
- package/src/types/index.ts +509 -0
- package/src/vite-env.d.ts +23 -0
- package/tests/fixtures/{mockWarningData.js → mockWarningData.ts} +29 -12
- package/tests/integration/{warning-flow.spec.js → warning-flow.spec.ts} +124 -131
- package/tests/{setup.js → setup.ts} +5 -5
- package/tests/unit/components/{AlertClient.spec.js → AlertClient.spec.ts} +151 -184
- package/tests/unit/components/DayLarge.spec.ts +348 -0
- package/tests/unit/components/DaySmall.spec.ts +352 -0
- package/tests/unit/components/{Days.spec.js → Days.spec.ts} +88 -105
- package/tests/unit/components/DescriptionWarning.spec.ts +385 -0
- package/tests/unit/components/{GrayScaleToggle.spec.js → GrayScaleToggle.spec.ts} +64 -57
- package/tests/unit/components/Legend.spec.ts +295 -0
- package/tests/unit/components/MapLarge.spec.ts +448 -0
- package/tests/unit/components/MapSmall.spec.ts +367 -0
- package/tests/unit/components/{PopupRow.spec.js → PopupRow.spec.ts} +21 -12
- package/tests/unit/components/Region.spec.ts +373 -0
- package/tests/unit/components/RegionWarning.snapshot.spec.ts +361 -0
- package/tests/unit/components/RegionWarning.spec.ts +381 -0
- package/tests/unit/components/Regions.spec.ts +503 -0
- package/tests/unit/components/Warning.snapshot.spec.ts +483 -0
- package/tests/unit/components/{Warning.spec.js → Warning.spec.ts} +110 -93
- package/tests/unit/components/{Warnings.spec.js → Warnings.spec.ts} +77 -63
- package/tests/unit/components/__snapshots__/RegionWarning.snapshot.spec.ts.snap +41 -0
- package/tests/unit/components/__snapshots__/Warning.snapshot.spec.ts.snap +433 -0
- package/tests/unit/{mixins/config.spec.js → composables/useConfig.spec.ts} +69 -59
- package/tests/unit/composables/useI18n.spec.ts +116 -0
- package/tests/unit/composables/useKeyCodes.spec.ts +27 -0
- package/tests/unit/composables/useUtils.spec.ts +213 -0
- package/tsconfig.json +43 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.js +11 -4
- package/vitest.config.js +1 -1
- package/dist/locale-fi-DPiOM1rB.js +0 -8
- package/dist/vendor-Cfkkvdz7.js +0 -21
- package/src/mixins/alertClientCore.js +0 -210
- package/src/mixins/config.js +0 -1384
- package/src/mixins/fields.js +0 -26
- package/src/mixins/i18n.js +0 -25
- package/src/mixins/keycodes.js +0 -10
- package/src/mixins/utils.js +0 -914
- package/src/plugins/index.js +0 -3
- package/tests/unit/components/DayLarge.spec.js +0 -281
- package/tests/unit/components/DaySmall.spec.js +0 -278
- package/tests/unit/components/DescriptionWarning.spec.js +0 -432
- package/tests/unit/components/Legend.spec.js +0 -223
- package/tests/unit/components/MapLarge.spec.js +0 -276
- package/tests/unit/components/MapSmall.spec.js +0 -226
- package/tests/unit/components/Region.spec.js +0 -430
- package/tests/unit/components/RegionWarning.snapshot.spec.js +0 -73
- package/tests/unit/components/RegionWarning.spec.js +0 -408
- package/tests/unit/components/Regions.spec.js +0 -335
- package/tests/unit/components/Warning.snapshot.spec.js +0 -107
- package/tests/unit/components/__snapshots__/RegionWarning.snapshot.spec.js.snap +0 -21
- package/tests/unit/components/__snapshots__/Warning.snapshot.spec.js.snap +0 -199
- package/tests/unit/mixins/i18n.spec.js +0 -115
- package/tests/unit/mixins/keycodes.spec.js +0 -37
- package/tests/unit/mixins/utils.spec.js +0 -624
- /package/src/{main.js → main.ts} +0 -0
- /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/dist/index.html
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
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-
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./vendor-DlLAhxdV.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="./xml-parser-BiNO9kc-.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./locale-en-DCEKDw5G.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./locale-fi-
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./locale-fi-XDTFwO-_.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="./locale-sv-B0FlbgEF.js">
|
|
15
15
|
</head>
|
|
16
16
|
|