airport-one-embeddable-widgets 2.16.0 → 2.18.0
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 +27 -0
- package/dist/airport-one-embeddable-widgets.iife.js +135 -342
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ You can customize the behavior and appearance of the element by setting its attr
|
|
|
22
22
|
|
|
23
23
|
| Attribute | Type | Default | Description |
|
|
24
24
|
| --------------------- | ------ | ------- | ------------------------------------------- |
|
|
25
|
+
| subscribingAirport | string | null | The subscribing airport code |
|
|
25
26
|
| origin | string | null | The origin airport code |
|
|
26
27
|
| destination | string | null | The destination airport code |
|
|
27
28
|
| airlines | string | null | A comma-separated list of airline codes |
|
|
@@ -36,6 +37,8 @@ You can customize the behavior and appearance of the element by setting its attr
|
|
|
36
37
|
| departureAirportLabel | string | null | The label for the departure airport input |
|
|
37
38
|
| departureDateLabel | string | null | The label for the departure date input |
|
|
38
39
|
| returnDateLabel | string | null | The label for the return date input |
|
|
40
|
+
| consentAdvertising | string | true | Dynamically turn off/on consent for Advertising - by passing a "true" or "false" |
|
|
41
|
+
| consentAnalytics | string | true | Dynamically turn off/on consent for Analytics - by passing a "true" or "false" |
|
|
39
42
|
|
|
40
43
|
## Examples
|
|
41
44
|
|
|
@@ -208,3 +211,27 @@ flight-search-form::part(flight-search-widget-search-button-svg) {
|
|
|
208
211
|
fill: #fff;
|
|
209
212
|
}
|
|
210
213
|
```
|
|
214
|
+
|
|
215
|
+
# Consent Management
|
|
216
|
+
|
|
217
|
+
## How to dynamically manage user consent preferences and pass them into the widget
|
|
218
|
+
|
|
219
|
+
There are two consent categories that can optionally be turned off/on via DOM manipulation and modifying attributes on the widget.
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
<flight-search-form origin="JFK" destination="LAX"></flight-search-form>
|
|
223
|
+
|
|
224
|
+
...
|
|
225
|
+
|
|
226
|
+
// Call a similar function via your CMP integration to pass in the consent values for Analytics or Advertising
|
|
227
|
+
function changeConsent(consentAdvertising, consentAnalytics) {
|
|
228
|
+
// Select the flightWidget element
|
|
229
|
+
var flightWidget = document.getElementsByTagName('flight-search-form');
|
|
230
|
+
|
|
231
|
+
// Set user's advertising consent from CMP
|
|
232
|
+
flightWidget.setAttribute('consentAdvertising', consentAdvertising); // consentAdvertising param should be a string of "true" or "false"
|
|
233
|
+
|
|
234
|
+
// Set user's analytics consent from CMP
|
|
235
|
+
flightWidget.setAttribute('consentAnalytics', 'true') // consentAnalytics param should be a string of "true" or "false"
|
|
236
|
+
}
|
|
237
|
+
```
|