flughaveno-sdk 1.4.10 → 1.4.11
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/README.md +94 -16
- package/dist/flughaveno-sdk.js +2 -2
- package/dist/flughaveno-sdk.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,29 +1,107 @@
|
|
|
1
1
|
# flughaveno-sdk
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
> **Owner:** `pedrof@cartodb.com` | **Last Updated:** 2026-05-21
|
|
4
|
+
|
|
5
|
+
Embeddable Vue 2 SDK for interactive airport map navigation at AENA airports. Published as the `flughaveno-sdk` npm package (v1.4.10) and consumed as a global class `window.AMap`.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Provides an embeddable map component that renders AENA airport interiors (terminals, floors, POIs) and supports route navigation, search, PMR accessibility, MUPI signage mode, AVA mode and print mode. Consumers instantiate `AMap` against a DOM container and drive it through options + callbacks.
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
Requires Node `>=16`.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
5
16
|
npm install
|
|
17
|
+
cp .env.dev .env # or .env.staging for staging
|
|
18
|
+
npm run serve # dev server with hot reload
|
|
6
19
|
```
|
|
7
20
|
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
npm run serve
|
|
11
|
-
```
|
|
21
|
+
Environment variables:
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
- `VUE_APP_API_URL` — base URL of the Data Connector API
|
|
24
|
+
- `VUE_APP_API_VERSION` — API version appended to baseURL by the Axios interceptor
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Build artifacts (`dist/flughaveno-sdk.js` + `dist/flughaveno-sdk.css`) expose the global `AMap` class:
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
const map = new AMap('container-id', {
|
|
32
|
+
airport: 'LEMD',
|
|
33
|
+
building: 'T4',
|
|
34
|
+
floor: '1',
|
|
35
|
+
explorerMode: true,
|
|
36
|
+
language: 'es',
|
|
37
|
+
// optional: category, subcategories, poi, route, mupiMode, avaMode, printMode
|
|
38
|
+
})
|
|
17
39
|
|
|
18
|
-
|
|
40
|
+
map.onPoiSelected((poi) => console.log(poi))
|
|
41
|
+
map.onPoiClicked((poi) => console.log(poi))
|
|
19
42
|
```
|
|
20
|
-
|
|
43
|
+
|
|
44
|
+
Public methods: `getSelectedPoiId()`, `getSelectedPoi()`, `getOriginPoiId()`, `onPoiSelected(cb)`, `onPoiClicked(cb)`.
|
|
45
|
+
|
|
46
|
+
### Commands
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm run serve # dev server (mode=dev)
|
|
50
|
+
npm run build # production build
|
|
51
|
+
npm run build:dev # development build
|
|
52
|
+
npm run build:staging # staging build
|
|
53
|
+
npm run lint # ESLint + Prettier
|
|
54
|
+
npm run docs # local Docsify docs
|
|
55
|
+
npm run i18n:report # missing/unused translation keys
|
|
56
|
+
npm run plop # scaffold a new component
|
|
21
57
|
```
|
|
22
58
|
|
|
23
|
-
|
|
59
|
+
## Dependencies
|
|
60
|
+
|
|
61
|
+
**Runtime**
|
|
62
|
+
|
|
63
|
+
- Vue 2.6 + Vuex 3.0 + Vue-i18n 8.0 (locales: `en`, `es`, `ca`, `eu`, `gl`, `va`; fallback `en`)
|
|
64
|
+
- Mapbox GL 1.1, Turf.js 5.1, proj4 2.7
|
|
65
|
+
- Axios 0.19
|
|
66
|
+
|
|
67
|
+
**Build / tooling**
|
|
68
|
+
|
|
69
|
+
- Vue CLI 3 + Webpack (single-file output, no code splitting)
|
|
70
|
+
- SCSS with `style-resources-loader` injecting `src/styles/style.scss` globally
|
|
71
|
+
- ESLint 5 + Prettier, Plop for scaffolding, Docsify for docs
|
|
72
|
+
|
|
73
|
+
**Upstream service**
|
|
74
|
+
|
|
75
|
+
- Data Connector API (see `../../data-connector/`) for airports, POIs, routes
|
|
76
|
+
|
|
77
|
+
## Project Structure
|
|
78
|
+
|
|
24
79
|
```
|
|
25
|
-
|
|
80
|
+
src/
|
|
81
|
+
api/ Axios layer (mapService.js)
|
|
82
|
+
app-shell/ Root AppShell.vue (modes: explorer, route, print, MUPI, AVA)
|
|
83
|
+
assets/ SVG icons, sprites
|
|
84
|
+
components/
|
|
85
|
+
common/ Globally registered UI (checkbox, dropdown, modal, tabs, tooltip...)
|
|
86
|
+
aena-*/ Feature components (points, legend, pmr, terminal-selector...)
|
|
87
|
+
map-component/ Mapbox GL wrapper
|
|
88
|
+
layers/ popups/ searcher/ feedback/
|
|
89
|
+
directives/ v-click-outside
|
|
90
|
+
filters/ durationTime, capitalize, displayCoordinates
|
|
91
|
+
locales/ *.json per language
|
|
92
|
+
mixins/ saveActions, getRoutePoint, setLocation, setDeviceWidthClass
|
|
93
|
+
store/ Vuex (state, mutations, actions, getters, constants)
|
|
94
|
+
styles/ theme.scss, mixins.scss, grid.scss, fonts.scss, buttons.scss
|
|
95
|
+
utils/ getCategoryIcon, matchString, isMobile, routing-actions...
|
|
96
|
+
main.js Exports the AMap class
|
|
26
97
|
```
|
|
27
98
|
|
|
28
|
-
|
|
29
|
-
|
|
99
|
+
Component convention — each component is split into `ComponentName.vue` (wrapper) + `component-name.js` (logic) + `component-name.html` (template) + `component-name.scss` (scoped styles) + `index.js`. Components under `components/common/` are auto-registered globally via `require.context()` in `main.js`.
|
|
100
|
+
|
|
101
|
+
Naming: `.vue` PascalCase, internal `.js/.html/.scss` kebab-case, utilities camelCase, store constants UPPER_SNAKE_CASE.
|
|
102
|
+
|
|
103
|
+
## Known Issues
|
|
104
|
+
|
|
105
|
+
- No automated test framework configured.
|
|
106
|
+
- Pinned to Vue 2 / Vue CLI 3 / Webpack 4 era; upgrades blocked by Mapbox GL 1.x and several legacy peer deps.
|
|
107
|
+
- Single-bundle output (no code splitting) — full SDK ships on first load.
|