airport-one-widgets 0.1.4 → 0.1.6
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 +25 -23
- package/dist/airport-one-widgets.iife.js +58 -62
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -26,15 +26,18 @@ To use the `fma-airfare-content` custom element, simply add the following HTML t
|
|
|
26
26
|
|
|
27
27
|
You can customize the behavior and appearance of the element by setting its attributes. The available attributes are listed in the table below:
|
|
28
28
|
|
|
29
|
-
| Attribute
|
|
30
|
-
|
|
|
31
|
-
| origin
|
|
32
|
-
| primary-color
|
|
33
|
-
| secondary-color
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
29
|
+
| Attribute | Type | Default | Description |
|
|
30
|
+
| --------------------- | ------ | ------- | ------------------------------------------------------------------------------------- |
|
|
31
|
+
| origin | string | null | The origin airport code |
|
|
32
|
+
| primary-color | string | #0B89FF | The primary color of the form |
|
|
33
|
+
| secondary-color | string | #0B89FF | The secondary color of the form |
|
|
34
|
+
| primary-hover-color | string | — | Primary color on hover (hex). When unset, falls back to primary. |
|
|
35
|
+
| secondary-hover-color | string | — | Secondary color on hover, e.g. price text (hex). When unset, falls back to secondary. |
|
|
36
|
+
| destinations | string | null | A comma-separated list of destination codes |
|
|
37
|
+
| theme | string | light | The theme of the widget - "light" or "dark" |
|
|
38
|
+
| consent-advertising | string | true | Dynamically turn off/on consent for Advertising - pass "true" or "false" |
|
|
39
|
+
| consent-analytics | string | true | Dynamically turn off/on consent for Analytics - pass "true" or "false" |
|
|
40
|
+
| consent-functional | string | true | Dynamically turn off/on consent for Functional - pass "true" or "false" |
|
|
38
41
|
|
|
39
42
|
### Examples
|
|
40
43
|
|
|
@@ -142,15 +145,15 @@ Add the `fma-carfare-search` custom element to your page. If you don't pass an `
|
|
|
142
145
|
|
|
143
146
|
Available attributes:
|
|
144
147
|
|
|
145
|
-
| Attribute
|
|
146
|
-
|
|
|
147
|
-
| origin
|
|
148
|
-
| primary-color
|
|
149
|
-
| secondary-color
|
|
150
|
-
| theme
|
|
151
|
-
| consent-advertising
|
|
152
|
-
| consent-analytics
|
|
153
|
-
| consent-functional
|
|
148
|
+
| Attribute | Type | Default | Description |
|
|
149
|
+
| ------------------- | ------- | ---------------- | -------------------------------------------------------------------------- |
|
|
150
|
+
| origin | string | from global | Origin IATA (3 letters). Falls back to `window.__A1_WIDGET_CONFIG__.iata`. |
|
|
151
|
+
| primary-color | string | `#0B89FF` or cfg | Primary theme color (CSS color). |
|
|
152
|
+
| secondary-color | string | `#0B89FF` or cfg | Secondary theme color (CSS color). |
|
|
153
|
+
| theme | string | `light` | `light` or `dark`. |
|
|
154
|
+
| consent-advertising | boolean | `true` | Enable/disable Advertising consent within the widget. |
|
|
155
|
+
| consent-analytics | boolean | `true` | Enable/disable Analytics consent within the widget. |
|
|
156
|
+
| consent-functional | boolean | `true` | Enable/disable Functional consent within the widget. |
|
|
154
157
|
|
|
155
158
|
### Examples
|
|
156
159
|
|
|
@@ -227,9 +230,9 @@ This widget exposes a CSS part for outer layout and two CSS variables for colors
|
|
|
227
230
|
|
|
228
231
|
Available CSS parts:
|
|
229
232
|
|
|
230
|
-
| Part Name
|
|
231
|
-
|
|
|
232
|
-
| `carfare-search-container`
|
|
233
|
+
| Part Name | Description |
|
|
234
|
+
| -------------------------- | ----------------------------------------- |
|
|
235
|
+
| `carfare-search-container` | Wraps the entire car search form and CTA. |
|
|
233
236
|
|
|
234
237
|
CSS variables (set on the host):
|
|
235
238
|
|
|
@@ -263,10 +266,9 @@ If present, the widget will read defaults from `window.__A1_WIDGET_CONFIG__`:
|
|
|
263
266
|
iata: 'FAT',
|
|
264
267
|
primaryColor: '#0B89FF',
|
|
265
268
|
secondaryColor: '#0B89FF',
|
|
266
|
-
defaultDestinations: []
|
|
269
|
+
defaultDestinations: [],
|
|
267
270
|
};
|
|
268
271
|
// origin/primary/secondary from this object are used only when
|
|
269
272
|
// not explicitly set as attributes on the element.
|
|
270
273
|
</script>
|
|
271
274
|
```
|
|
272
|
-
|