airport-one-widgets 0.2.95 → 0.2.97
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 +66 -4
- package/dist/airport-one-widgets.iife.js +24 -24
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -5,6 +5,35 @@
|
|
|
5
5
|
|
|
6
6
|
**Fly My Airport FAB local demos:** with the widgets dev server running, open [`/demo/fly-my-airport-fab.html`](http://localhost:3001/demo/fly-my-airport-fab.html) (see root [`index.html`](./index.html) for the full demo menu).
|
|
7
7
|
|
|
8
|
+
**Demo site:** `npm run build:demo` builds the demo pages into `demo-dist/` as a static site against the dev APIs (`https://dev-api.airportonellc.com`), so instance embeds load instances saved in the dev portal. [`vercel.json`](./vercel.json) deploys it: create a Vercel project with root directory `apps/airport-one-widgets` and set `FONTAWESOME_NPM_AUTH_TOKEN` and `VITE_FMA_API_DOMAIN` (the dev FMA site); `VITE_WIDGET_PUBLIC_CONFIG_API_BASE_URL` and `VITE_FIDS_WIDGET_API_BASE_URL` override the dev API. Open the airfare search demo with `?instance=<id>` to show a dev-portal instance; the site's domain must be in that airport's allowed embed domains.
|
|
9
|
+
|
|
10
|
+
## Releases and channels
|
|
11
|
+
|
|
12
|
+
Airports load the bundle through `widgets.flymyairport.com`, which serves one
|
|
13
|
+
of two npm dist-tags ([ADR 0017](../../docs/decisions/0017-widget-release-channels.md)):
|
|
14
|
+
|
|
15
|
+
- **`latest`**: every airport.
|
|
16
|
+
- **`next`**: the pilot airports chosen in the portal under Platform Settings →
|
|
17
|
+
Release Management → Widget Releases, plus portal previews when that page
|
|
18
|
+
says so.
|
|
19
|
+
|
|
20
|
+
A merge that changes this package bumps `version` in `package.json` and
|
|
21
|
+
publishes through `CI | npm-widget | Publish`. The `WIDGET_NPM_DIST_TAG`
|
|
22
|
+
repository variable picks the channel: unset or `latest` reaches everyone,
|
|
23
|
+
`next` reaches only the pilot.
|
|
24
|
+
|
|
25
|
+
To pilot a release:
|
|
26
|
+
|
|
27
|
+
1. Set `WIDGET_NPM_DIST_TAG` to `next`, then merge the version bump.
|
|
28
|
+
2. Choose the pilot airports in the portal and save.
|
|
29
|
+
3. When it looks right, run `CI | npm-widget | Promote` with that version and
|
|
30
|
+
channel `latest`.
|
|
31
|
+
4. Clear the pilot list, and set `WIDGET_NPM_DIST_TAG` back to `latest` unless
|
|
32
|
+
another pilot is coming.
|
|
33
|
+
|
|
34
|
+
To roll back, run `CI | npm-widget | Promote` with the previous version and
|
|
35
|
+
channel `latest`. CDN caches take a few minutes to pick up either change.
|
|
36
|
+
|
|
8
37
|
## Airfare Search (v2)
|
|
9
38
|
|
|
10
39
|
The v2 airfare-search widget is an explicit opt-in contract and does not alias from
|
|
@@ -29,10 +58,43 @@ Required for managed instances:
|
|
|
29
58
|
- `data-widget-instance-id`
|
|
30
59
|
|
|
31
60
|
`origin` and `destination` are resolved per field: a host attribute overrides the saved
|
|
32
|
-
instance config for that field only
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
61
|
+
instance config for that field only. The card is about one airport, named in its header
|
|
62
|
+
with a Fly Out / Fly In toggle: the `origin` when set (a `destination` alongside it renders
|
|
63
|
+
as a locked field), otherwise a lone `destination` (the card opens on Fly In), otherwise
|
|
64
|
+
the subscribing airport.
|
|
65
|
+
|
|
66
|
+
### Design and behavior (FMA Search 2.0, AIR-1722)
|
|
67
|
+
|
|
68
|
+
- **Destination**: empty, it lists every nonstop from the airport's published schedule
|
|
69
|
+
(`GET /v1/iata-auto-complete` on widget-api). Typing matches city, airport code, state
|
|
70
|
+
and country, nonstops first, then "search everywhere" KAYAK places with their nearby
|
|
71
|
+
airports. `autocomplete-type="schedule_data"` and airline-restricted embeds keep typed
|
|
72
|
+
results to the airport's own network.
|
|
73
|
+
- **Dates**: one field and a two-month calendar (one on narrow cards). With a destination
|
|
74
|
+
chosen, each day carries a nonstop bar or a one-stop bar with a dot, per day from
|
|
75
|
+
`GET /v1/route-calendar-month`, and months without the nonstop say so. The calendar stays
|
|
76
|
+
open with the range on wide cards and closes after the last date on narrow ones.
|
|
77
|
+
- **Trip type**, **travelers** (one count, 1–9, booked as adults) and **cabin** are menus above
|
|
78
|
+
the fields, as on the earlier widget; the Search button turns the accent color once the
|
|
79
|
+
form is complete and validates inline otherwise.
|
|
80
|
+
- **Search** opens the redirect worker link, which attributes the click-out and builds the
|
|
81
|
+
KAYAK results URL (cabin, travelers, nearby dates).
|
|
82
|
+
**Car** links FlyMyAirport's car rental page for the airport in a new tab, as the earlier
|
|
83
|
+
widget did.
|
|
84
|
+
|
|
85
|
+
| Attribute | Default | Description |
|
|
86
|
+
| ----------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
87
|
+
| `skin` | `site` when `theme="dark"`, otherwise `light` | `site` (flymyairport.com dark glass), `light` (white card), `dark`, `brand` (tinted by `primary-color`), `none` (no card; the host supplies contrast) |
|
|
88
|
+
| `labels` | `inside` | `outside` renders a visible label above each field for airports that need them |
|
|
89
|
+
| `market-name` | `{City} ({IATA})` | The airport's display name in the header (AIR-1585) |
|
|
90
|
+
| `primary-color` | `#0745A2` | Calendar route bar, destination tiles |
|
|
91
|
+
| `secondary-color` | `#FC6322` | One-stop dot, nonstop dots and badge, Search once complete, focus ring |
|
|
92
|
+
| `hide-branding` | `false` | Hides the FlyMyAirport wordmark and Powered by KAYAK |
|
|
93
|
+
| `hide-fma-logo` | `false` | Hides only the FlyMyAirport wordmark; Powered by KAYAK stays. In the portal only Airport One administrators can set it |
|
|
94
|
+
| `hide-car-button` | `false` | Hides the Flights / Car links |
|
|
95
|
+
|
|
96
|
+
Styling hooks: the `airfare-search-card` and `airfare-search-button` parts, and an
|
|
97
|
+
`--afs-font-family` custom property (the card otherwise inherits the host page's font).
|
|
36
98
|
|
|
37
99
|
## Airfare Content
|
|
38
100
|
|