@coras-io/embed 0.1.2 → 0.3.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/CHANGELOG.md +139 -0
- package/README.md +8 -7
- package/dist/components/accordion/accordion-item/accordion-item.styles.js +1 -1
- package/dist/components/alert/alert.styles.js +14 -14
- package/dist/components/attraction-card/base/attraction-card.styles.js +7 -3
- package/dist/components/attraction-discovery/attraction-discovery.styles.js +1 -1
- package/dist/components/attraction-header/attraction-header.styles.js +1 -1
- package/dist/components/attraction-option/attraction-option.styles.js +4 -4
- package/dist/components/basket/basket.styles.js +27 -26
- package/dist/components/basket-empty/basket-empty.styles.js +1 -0
- package/dist/components/basket-item/basket-item.component.js +10 -4
- package/dist/components/basket-item/basket-item.styles.js +9 -3
- package/dist/components/basket-item-ticket/basket-item-ticket.styles.js +1 -3
- package/dist/components/basket-mobile/basket-mobile.styles.js +5 -5
- package/dist/components/better-carousel/better-carousel.styles.js +2 -0
- package/dist/components/bottom-drawer/bottom-drawer.styles.js +6 -4
- package/dist/components/button/button.component.d.ts +0 -1
- package/dist/components/button/button.component.js +1 -8
- package/dist/components/button/button.constants.d.ts +1 -1
- package/dist/components/button/button.constants.js +1 -1
- package/dist/components/button/button.styles.js +66 -39
- package/dist/components/calendar/base/calendar.styles.js +3 -5
- package/dist/components/calendar/multi/multi.styles.js +7 -0
- package/dist/components/category-tag/category-tag.styles.js +10 -7
- package/dist/components/checkbox/checkbox.styles.js +2 -2
- package/dist/components/chip/chip.styles.js +2 -2
- package/dist/components/collect-fida/collect-fida.component.js +5 -3
- package/dist/components/collect-fida/collect-fida.styles.js +9 -16
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +6 -4
- package/dist/components/crypto-auth-modal/crypto-auth-modal.styles.js +2 -2
- package/dist/components/dialog/dialog.styles.js +10 -17
- package/dist/components/drawer/drawer.component.js +6 -0
- package/dist/components/drawer/drawer.styles.js +17 -3
- package/dist/components/dropdown/dropdown.component.js +7 -0
- package/dist/components/dropdown/dropdown.styles.js +3 -6
- package/dist/components/expiration-timer/expiration-timer.styles.js +3 -3
- package/dist/components/explore-card/explore-card.styles.js +1 -1
- package/dist/components/filter-chip/filter-chip.styles.js +11 -9
- package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
- package/dist/components/filters-drawer/filters-drawer.styles.js +6 -5
- package/dist/components/image/image.styles.js +3 -3
- package/dist/components/image-chip/image-chip.styles.js +1 -1
- package/dist/components/input-field/input-field.styles.js +22 -17
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +1 -1
- package/dist/components/joined-fields/joined-fields.styles.js +10 -6
- package/dist/components/loading-spinner/loading-spinner.styles.js +1 -1
- package/dist/components/location-image/location-image.component.d.ts +6 -0
- package/dist/components/location-image/location-image.component.js +15 -2
- package/dist/components/location-image/location-image.styles.js +1 -1
- package/dist/components/locations-results/locations-results.styles.js +4 -6
- package/dist/components/marketing-tag/marketing-tag.styles.js +1 -1
- package/dist/components/message-card/message-card.styles.js +6 -6
- package/dist/components/option-group/option-chip/option-chip.styles.js +4 -3
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.styles.js +9 -0
- package/dist/components/order-confirmation/order-confirmation.component.js +4 -3
- package/dist/components/order-confirmation/order-confirmation.styles.js +1 -1
- package/dist/components/otp/otp.styles.js +6 -6
- package/dist/components/overlay/overlay.styles.js +5 -1
- package/dist/components/pay-in/pay-in.styles.js +2 -2
- package/dist/components/payment-fiat-method/payment-fiat-method.styles.js +20 -4
- package/dist/components/payment-option/payment-option.styles.js +10 -12
- package/dist/components/performance-time/performance-time.styles.js +2 -2
- package/dist/components/phone-country-code/phone-country-code.styles.js +1 -1
- package/dist/components/points/points.styles.js +1 -1
- package/dist/components/search-button/search-button.styles.js +15 -7
- package/dist/components/seated-selector/seated-selector.component.d.ts +4 -1
- package/dist/components/seated-selector/seated-selector.component.js +90 -36
- package/dist/components/seated-selector/seated-selector.styles.js +89 -14
- package/dist/components/seats-io/seats-io.component.d.ts +2 -0
- package/dist/components/seats-io/seats-io.component.js +35 -2
- package/dist/components/seats-io/seats-io.constants.d.ts +5 -0
- package/dist/components/seats-io/seats-io.constants.js +12 -0
- package/dist/components/seats-io/seats-io.transform.d.ts +8 -2
- package/dist/components/seats-io/seats-io.transform.js +12 -4
- package/dist/components/select-list/select-list.styles.js +1 -0
- package/dist/components/select-list/select-option/select-option.styles.js +3 -3
- package/dist/components/sort-dropdown/sort-dropdown.styles.js +1 -1
- package/dist/components/sort-list/sort-list.styles.js +1 -1
- package/dist/components/sport-options/sport-option/sport-option.styles.js +2 -2
- package/dist/components/star-rating/star-rating.component.d.ts +1 -0
- package/dist/components/star-rating/star-rating.component.js +19 -23
- package/dist/components/star-rating/star-rating.styles.js +32 -6
- package/dist/components/tab/tab.styles.js +1 -1
- package/dist/components/tabs/tabs.styles.js +1 -1
- package/dist/components/tag/tag.styles.js +7 -7
- package/dist/components/text-section/text-section.styles.js +2 -1
- package/dist/components/time-tag/time-tag.styles.js +1 -2
- package/dist/components/tooltip/tooltip.styles.js +3 -3
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.styles.js +2 -2
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.component.js +1 -1
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.styles.js +1 -9
- package/dist/components/transfer-modal/transfer-modal.component.js +3 -3
- package/dist/components/transfer-modal/transfer-modal.styles.js +6 -8
- package/dist/containers/basket/basket.component.d.ts +1 -1
- package/dist/containers/basket/basket.component.js +56 -25
- package/dist/containers/footer/footer.styles.js +4 -0
- package/dist/containers/navbar/navbar.component.d.ts +5 -1
- package/dist/containers/navbar/navbar.component.js +38 -9
- package/dist/containers/navbar/navbar.styles.js +38 -12
- package/dist/contexts/basket/basket.provider.d.ts +1 -0
- package/dist/contexts/basket/basket.provider.js +31 -4
- package/dist/contexts/properties.context.d.ts +4 -4
- package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +1 -0
- package/dist/core/api/middlewares/booking-session/booking-session.constants.js +1 -0
- package/dist/core/api/middlewares/booking-session/booking-session.js +18 -27
- package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +4 -4
- package/dist/core/api/middlewares/booking-session/booking-session.utils.js +13 -10
- package/dist/core/api/queries.js +3 -2
- package/dist/core/color-scheme.d.ts +14 -0
- package/dist/core/color-scheme.js +48 -0
- package/dist/core/currency/constants.d.ts +1 -1
- package/dist/core/currency/constants.js +4 -3
- package/dist/core/i18n/date.js +20 -9
- package/dist/core/i18n/locale-codes.d.ts +2 -2
- package/dist/core/i18n/locale-codes.js +4 -0
- package/dist/core/images/constants.d.ts +0 -5
- package/dist/core/images/constants.js +0 -5
- package/dist/core/images/helpers.d.ts +8 -0
- package/dist/core/images/helpers.js +14 -6
- package/dist/core/images/srcset.js +2 -2
- package/dist/core/storybook/demo.d.ts +4 -0
- package/dist/core/storybook/demo.js +17 -0
- package/dist/core/types/locales.d.ts +7 -0
- package/dist/core/utils/datetime.js +10 -4
- package/dist/core/utils/locale.d.ts +8 -1
- package/dist/core/utils/locale.js +10 -0
- package/dist/helpers/helpers.d.ts +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/locales/ar-SA.d.ts +279 -0
- package/dist/locales/ar-SA.js +288 -0
- package/dist/locales/da-DK.d.ts +100 -82
- package/dist/locales/da-DK.js +104 -89
- package/dist/locales/de-DE.d.ts +100 -82
- package/dist/locales/de-DE.js +104 -89
- package/dist/locales/en-IE.d.ts +250 -232
- package/dist/locales/en-IE.js +253 -238
- package/dist/locales/en-US.d.ts +100 -82
- package/dist/locales/en-US.js +105 -90
- package/dist/locales/es-ES.d.ts +100 -82
- package/dist/locales/es-ES.js +104 -89
- package/dist/locales/fr-FR.d.ts +100 -82
- package/dist/locales/fr-FR.js +104 -89
- package/dist/locales/fr-MA.d.ts +100 -82
- package/dist/locales/fr-MA.js +104 -89
- package/dist/locales/is-IS.d.ts +100 -82
- package/dist/locales/is-IS.js +104 -89
- package/dist/locales/it-IT.d.ts +100 -82
- package/dist/locales/it-IT.js +104 -89
- package/dist/locales/ms-MY.d.ts +100 -82
- package/dist/locales/ms-MY.js +104 -89
- package/dist/locales/nb-NO.d.ts +100 -82
- package/dist/locales/nb-NO.js +104 -89
- package/dist/locales/pl-PL.d.ts +100 -82
- package/dist/locales/pl-PL.js +104 -89
- package/dist/locales/pt-PT.d.ts +100 -82
- package/dist/locales/pt-PT.js +104 -89
- package/dist/locales/sv-SE.d.ts +100 -82
- package/dist/locales/sv-SE.js +104 -89
- package/dist/locales/th-TH.d.ts +100 -82
- package/dist/locales/th-TH.js +104 -89
- package/dist/locales/tr-TR.d.ts +100 -82
- package/dist/locales/tr-TR.js +104 -89
- package/dist/locales/zh-CN.d.ts +100 -82
- package/dist/locales/zh-CN.js +105 -90
- package/dist/locales/zh-HK.d.ts +279 -0
- package/dist/locales/zh-HK.js +288 -0
- package/dist/mixins/coinbase.mixin.js +1 -1
- package/dist/mixins/error-modal.styles.js +2 -2
- package/dist/mixins/location-search/location-search.js +3 -3
- package/dist/mixins/location-search/location-search.styles.js +6 -5
- package/dist/sdk/chrome.d.ts +9 -3
- package/dist/sdk/chrome.js +21 -9
- package/dist/sdk/element-adapter.js +11 -8
- package/dist/sdk/mount.d.ts +3 -3
- package/dist/sdk/mount.js +150 -42
- package/dist/sdk/navigation-intent.js +3 -0
- package/dist/sdk/page-registry.d.ts +14 -2
- package/dist/sdk/page-registry.js +33 -13
- package/dist/sdk/theme.d.ts +1 -15
- package/dist/sdk/theme.js +4 -39
- package/dist/sdk/types.d.ts +55 -24
- package/dist/sdk/url.d.ts +24 -3
- package/dist/sdk/url.js +66 -27
- package/dist/sdk/validation.d.ts +0 -7
- package/dist/sdk/validation.js +105 -47
- package/dist/styles/contrast-fixtures.d.ts +0 -5
- package/dist/styles/contrast-fixtures.js +79 -9
- package/dist/styles/contrast.js +4 -3
- package/dist/styles/defaults/component.js +17 -1
- package/dist/styles/primitives.d.ts +0 -10
- package/dist/styles/primitives.js +2 -12
- package/dist/styles/tokens.d.ts +1 -1
- package/dist/styles/tokens.generated.d.ts +1 -1
- package/dist/styles/tokens.generated.js +1 -1
- package/dist/styles/tokens.metadata.d.ts +1 -1
- package/dist/styles/tokens.metadata.js +360 -90
- package/dist/views/details-page/details-page.component.d.ts +5 -5
- package/dist/views/details-page/details-page.component.js +97 -71
- package/dist/views/details-page/details-page.styles.js +64 -9
- package/dist/views/details-page/partials/theater-description/theater-description.component.js +5 -0
- package/dist/views/help-page/help-page.component.d.ts +1 -0
- package/dist/views/help-page/help-page.component.js +11 -4
- package/dist/views/help-page/help-page.styles.js +21 -8
- package/dist/views/landing-page/landing-page.component.d.ts +4 -4
- package/dist/views/landing-page/landing-page.component.js +65 -65
- package/dist/views/landing-page/landing-page.styles.js +70 -3
- package/dist/views/payment-page/partials/activity-details/activity-details.styles.js +10 -33
- package/dist/views/payment-page/partials/billing-address/billing-address.styles.js +4 -9
- package/dist/views/payment-page/partials/confirmation/confirmation.styles.js +6 -6
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.styles.js +4 -4
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.styles.js +1 -0
- package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +1 -1
- package/dist/views/payment-page/partials/stripe/stripe.component.js +11 -12
- package/dist/views/payment-page/partials/stripe/stripe.constants.d.ts +2 -15
- package/dist/views/payment-page/partials/stripe/stripe.constants.js +4 -17
- package/dist/views/payment-page/partials/stripe/stripe.styles.js +16 -23
- package/dist/views/payment-page/partials/stripe/stripe.utils.d.ts +25 -14
- package/dist/views/payment-page/partials/stripe/stripe.utils.js +111 -62
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +1 -1
- package/dist/views/payment-page/payment-page.component.d.ts +1 -0
- package/dist/views/payment-page/payment-page.component.js +19 -9
- package/dist/views/payment-page/payment-page.styles.js +37 -32
- package/dist/views/payment-page/payment-page.utils.d.ts +7 -0
- package/dist/views/payment-page/payment-page.utils.js +29 -14
- package/dist/views/payment-page/payment-page.validators.js +9 -3
- package/dist/views/payment-page/services/payment-api.service.d.ts +1 -1
- package/dist/views/search-page/search-page.component.d.ts +1 -0
- package/dist/views/search-page/search-page.component.js +12 -6
- package/dist/views/search-page/search-page.styles.js +24 -2
- package/dist/views/suggestion-widget/suggestion-widget.styles.js +1 -1
- package/package.json +62 -75
- package/dist/custom-elements.json +0 -37378
- package/dist/sdk/meta.d.ts +0 -7
- package/dist/sdk/meta.js +0 -9
- package/dist/styles/tokens.css +0 -359
|
@@ -15,24 +15,40 @@ export default css `
|
|
|
15
15
|
padding: 0.5rem;
|
|
16
16
|
border: 1px solid var(--coras-color-neutral-400);
|
|
17
17
|
border-radius: var(--coras-radius-xs);
|
|
18
|
-
|
|
18
|
+
/* A selection chip, so it fills from the field colour rather than the card
|
|
19
|
+
colour, which is reserved for cards. */
|
|
20
|
+
background-color: var(--coras-color-field);
|
|
19
21
|
transition: all 0.2s ease;
|
|
20
22
|
|
|
21
23
|
&.checked {
|
|
22
|
-
border-color: var(--coras-color-primary
|
|
23
|
-
background-color: var(--coras-color-primary-
|
|
24
|
+
border-color: var(--coras-color-primary);
|
|
25
|
+
background-color: var(--coras-color-primary-tint);
|
|
24
26
|
box-shadow: var(--coras-shadow-md);
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
/* Height of the mark's visible plate, which is what the eye lines up on.
|
|
31
|
+
The official Apple and Google marks have different plate aspect ratios,
|
|
32
|
+
so they are matched on plate height rather than overall image size. */
|
|
28
33
|
.icon {
|
|
34
|
+
--payment-mark-plate-height: 22px;
|
|
35
|
+
|
|
29
36
|
display: flex;
|
|
30
37
|
align-items: center;
|
|
31
38
|
justify-content: center;
|
|
32
39
|
|
|
40
|
+
/* The Google mark and our matching card mark share a 1094x742 canvas
|
|
41
|
+
whose plate is 400 tall, hence the 742/400 correction. The .card class
|
|
42
|
+
is the base class on every chip, so it cannot select the card type. */
|
|
33
43
|
img {
|
|
34
|
-
height:
|
|
44
|
+
height: calc(var(--payment-mark-plate-height) * 742 / 400);
|
|
35
45
|
object-fit: contain;
|
|
36
46
|
}
|
|
37
47
|
}
|
|
48
|
+
|
|
49
|
+
/* The Apple mark's plate fills its whole canvas, so image height is plate
|
|
50
|
+
height directly. */
|
|
51
|
+
.apple-pay .icon img {
|
|
52
|
+
height: var(--payment-mark-plate-height);
|
|
53
|
+
}
|
|
38
54
|
`;
|
|
@@ -13,23 +13,22 @@ export default css `
|
|
|
13
13
|
--payment-option-button-border-radius: 24px;
|
|
14
14
|
--payment-option-padding: 1rem;
|
|
15
15
|
--payment-option-border-width: 2px;
|
|
16
|
-
--payment-option-border-color: var(--coras-color-
|
|
17
|
-
--payment-option-checked-border-color: var(--coras-
|
|
18
|
-
--payment-option-background: var(--coras-color-
|
|
16
|
+
--payment-option-border-color: var(--coras-color-card-border);
|
|
17
|
+
--payment-option-checked-border-color: var(--coras-color-secondary);
|
|
18
|
+
--payment-option-background: var(--coras-color-card);
|
|
19
19
|
--payment-option-title-color: var(--coras-color-text);
|
|
20
20
|
--payment-option-price-color: var(--coras-color-text);
|
|
21
21
|
--payment-option-button-color: var(--coras-color-neutral-50);
|
|
22
|
-
--payment-option-button-background: var(--coras-color-info
|
|
22
|
+
--payment-option-button-background: var(--coras-color-info);
|
|
23
23
|
--payment-option-radio-size: 1.25rem;
|
|
24
24
|
--payment-option-radio-border-width: 2px;
|
|
25
25
|
--payment-option-radio-border-color: var(--coras-color-neutral-400);
|
|
26
|
-
--payment-option-radio-checked-border-color: var(--coras-
|
|
26
|
+
--payment-option-radio-checked-border-color: var(--coras-color-secondary);
|
|
27
27
|
--payment-option-radio-checked-inner-size: 12px;
|
|
28
28
|
--payment-option-icon-size: 1.25rem;
|
|
29
|
-
--payment-option-icon-background: var(--coras-color-info
|
|
30
|
-
--payment-option-icon-color: var(--coras-color-info
|
|
29
|
+
--payment-option-icon-background: var(--coras-color-info);
|
|
30
|
+
--payment-option-icon-color: var(--coras-color-info);
|
|
31
31
|
|
|
32
|
-
/* Disabled tokens */
|
|
33
32
|
--payment-option-disabled-border-color: var(--coras-color-neutral-300);
|
|
34
33
|
--payment-option-disabled-title-color: var(--coras-color-neutral-500);
|
|
35
34
|
--payment-option-disabled-price-color: var(--coras-color-neutral-600);
|
|
@@ -62,15 +61,15 @@ export default css `
|
|
|
62
61
|
border-color: var(--payment-option-checked-border-color);
|
|
63
62
|
background: linear-gradient(
|
|
64
63
|
to bottom,
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
var(--coras-color-secondary-tint),
|
|
65
|
+
var(--coras-color-secondary-tint)
|
|
67
66
|
);
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
&.disabled {
|
|
71
70
|
pointer-events: none;
|
|
72
71
|
border-color: var(--coras-color-neutral-300);
|
|
73
|
-
background: var(--coras-color-
|
|
72
|
+
background: var(--coras-color-card);
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
|
|
@@ -108,7 +107,6 @@ export default css `
|
|
|
108
107
|
background-color: var(--payment-option-radio-checked-border-color);
|
|
109
108
|
}
|
|
110
109
|
|
|
111
|
-
/* Disabled look */
|
|
112
110
|
.disabled .title,
|
|
113
111
|
:host([disabled]) .title {
|
|
114
112
|
color: var(--coras-color-neutral-500);
|
|
@@ -11,12 +11,12 @@ export default css `
|
|
|
11
11
|
--performance-time-padding-block: 36px;
|
|
12
12
|
|
|
13
13
|
--performance-time-font-size: var(--coras-font-size-base);
|
|
14
|
-
--performance-time-background-color: var(--coras-color-
|
|
14
|
+
--performance-time-background-color: var(--coras-color-field);
|
|
15
15
|
--performance-time-color: var(--coras-color-text);
|
|
16
16
|
--performance-time-border-color: var(--coras-color-neutral-600);
|
|
17
17
|
--performance-time-border-radius: var(--coras-radius-md);
|
|
18
18
|
--performance-time-font-weight: var(--coras-font-weight-normal);
|
|
19
|
-
--performance-time-background-color-hover: var(--coras-color-
|
|
19
|
+
--performance-time-background-color-hover: var(--coras-color-field-hover);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
button {
|
|
@@ -4,7 +4,7 @@ export default css `
|
|
|
4
4
|
${component}
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
|
-
--points-background-color: var(--coras-color-success-
|
|
7
|
+
--points-background-color: var(--coras-color-success-background);
|
|
8
8
|
--points-font-size: var(--coras-font-size-base);
|
|
9
9
|
--points-font-weight: var(--coras-font-weight-semibold);
|
|
10
10
|
--points-font-color: var(--coras-color-text);
|
|
@@ -6,15 +6,23 @@ export default css `
|
|
|
6
6
|
:host {
|
|
7
7
|
--search-button-font-size: var(--coras-font-size-base);
|
|
8
8
|
--search-button-font-weight: var(--coras-font-weight-normal);
|
|
9
|
-
--search-button-background-color: var(--coras-color-
|
|
10
|
-
--search-button-color: var(--coras-color-text-
|
|
11
|
-
--search-button-border-color: var(--coras-color-
|
|
12
|
-
--search-button-border-radius: var(--coras-radius-
|
|
13
|
-
--search-button-background-color-hover:
|
|
14
|
-
|
|
9
|
+
--search-button-background-color: var(--coras-color-field);
|
|
10
|
+
--search-button-color: var(--coras-color-text-muted);
|
|
11
|
+
--search-button-border-color: var(--coras-color-field-border);
|
|
12
|
+
--search-button-border-radius: var(--coras-radius-search);
|
|
13
|
+
--search-button-background-color-hover: color-mix(
|
|
14
|
+
in srgb,
|
|
15
|
+
var(--coras-color-field),
|
|
16
|
+
var(--coras-state-overlay) var(--coras-state-hover)
|
|
17
|
+
);
|
|
18
|
+
--search-button-background-color-active: color-mix(
|
|
19
|
+
in srgb,
|
|
20
|
+
var(--coras-color-field),
|
|
21
|
+
var(--coras-state-overlay) var(--coras-state-active)
|
|
22
|
+
);
|
|
15
23
|
--search-button-border-color-disabled: var(--coras-color-neutral-400);
|
|
16
24
|
--search-button-color-disabled: var(--coras-color-neutral-400);
|
|
17
|
-
--search-button-icon-color: var(--coras-color-text-
|
|
25
|
+
--search-button-icon-color: var(--coras-color-text-muted);
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
button {
|
|
@@ -14,11 +14,13 @@ export declare class CorasSeatedSelector extends LitElement {
|
|
|
14
14
|
workspaceKey: string;
|
|
15
15
|
dateLabel: string;
|
|
16
16
|
region: string;
|
|
17
|
-
|
|
17
|
+
maxSeats: number;
|
|
18
|
+
reserving: boolean;
|
|
18
19
|
private selectedSeats;
|
|
19
20
|
private selectionValid;
|
|
20
21
|
private violations;
|
|
21
22
|
private reserved;
|
|
23
|
+
private sheetExpanded;
|
|
22
24
|
private fallbackFired;
|
|
23
25
|
private seatsTask;
|
|
24
26
|
private chartDataCache;
|
|
@@ -30,6 +32,7 @@ export declare class CorasSeatedSelector extends LitElement {
|
|
|
30
32
|
private seatLabelFor;
|
|
31
33
|
private handleObjectSelected;
|
|
32
34
|
private handleObjectDeselected;
|
|
35
|
+
private toggleSheet;
|
|
33
36
|
reservationCreated(): void;
|
|
34
37
|
private handleSelectionValid;
|
|
35
38
|
private handleSelectionInvalid;
|
|
@@ -34,9 +34,14 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
34
34
|
// Formatted performance date shown in the heading, e.g. "Sat 16 Mar 2023".
|
|
35
35
|
this.dateLabel = "";
|
|
36
36
|
this.region = "eu";
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
|
|
37
|
+
// Upper bound on how many seats can be picked (the venue's per-order max). 0
|
|
38
|
+
// means no cap. It only limits the map; it does not require an exact count,
|
|
39
|
+
// so the shopper is free to pick fewer or more than the upfront selection.
|
|
40
|
+
this.maxSeats = 0;
|
|
41
|
+
// Set by the host while the reservation request is in flight, so the confirm
|
|
42
|
+
// button shows a spinner instead of looking inert for the few seconds the
|
|
43
|
+
// basket call takes.
|
|
44
|
+
this.reserving = false;
|
|
40
45
|
this.selectedSeats = [];
|
|
41
46
|
this.selectionValid = true;
|
|
42
47
|
this.violations = [];
|
|
@@ -44,6 +49,10 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
44
49
|
// it stops covering the basket that opens on top of it - until the shopper
|
|
45
50
|
// changes their selection, which reopens the bar for another go.
|
|
46
51
|
this.reserved = false;
|
|
52
|
+
// On small screens the summary bar acts as a bottom sheet: collapsed to a
|
|
53
|
+
// seat-count-and-total handle, expanded to the full breakdown on tap. Ignored
|
|
54
|
+
// on wider screens, where the breakdown always shows.
|
|
55
|
+
this.sheetExpanded = false;
|
|
47
56
|
this.fallbackFired = false;
|
|
48
57
|
this.seatsTask = new Task(this, {
|
|
49
58
|
task: async ([client, attractionId, instanceId, locale, distributorID, currency,]) => {
|
|
@@ -86,8 +95,14 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
86
95
|
fireInternalEvent(this, "seats-unavailable", {});
|
|
87
96
|
};
|
|
88
97
|
this.handleObjectSelected = (event) => {
|
|
89
|
-
this.reserved = false;
|
|
90
98
|
const { label } = event.detail;
|
|
99
|
+
// Ignore any seat the current availability data doesn't know about (e.g. one
|
|
100
|
+
// a stale seats.io session restored after it was already booked), otherwise
|
|
101
|
+
// it enters the selection priced at 0 and the reservation fails.
|
|
102
|
+
if (this.chartData && !(label in this.chartData.availableSeats)) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.reserved = false;
|
|
91
106
|
if (!this.selectedSeats.some((seat) => seat.id === label)) {
|
|
92
107
|
this.selectedSeats = [
|
|
93
108
|
...this.selectedSeats,
|
|
@@ -100,6 +115,9 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
100
115
|
const { label } = event.detail;
|
|
101
116
|
this.selectedSeats = this.selectedSeats.filter((seat) => seat.id !== label);
|
|
102
117
|
};
|
|
118
|
+
this.toggleSheet = () => {
|
|
119
|
+
this.sheetExpanded = !this.sheetExpanded;
|
|
120
|
+
};
|
|
103
121
|
this.handleSelectionValid = () => {
|
|
104
122
|
this.selectionValid = true;
|
|
105
123
|
this.violations = [];
|
|
@@ -143,7 +161,7 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
143
161
|
// Drop seats chosen for the previous one before the next chart renders so they
|
|
144
162
|
// never carry into the new chart or reservation.
|
|
145
163
|
willUpdate(changed) {
|
|
146
|
-
if (changed.has("instanceId") || changed.has("
|
|
164
|
+
if (changed.has("instanceId") || changed.has("maxSeats")) {
|
|
147
165
|
this.selectedSeats = [];
|
|
148
166
|
this.selectionValid = true;
|
|
149
167
|
this.violations = [];
|
|
@@ -171,13 +189,11 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
171
189
|
reservationCreated() {
|
|
172
190
|
this.reserved = true;
|
|
173
191
|
}
|
|
192
|
+
// Any valid, non-empty selection can be booked. The seat count is no longer
|
|
193
|
+
// tied to the upfront ticket count - the map's own cap (maxSeats) and orphan
|
|
194
|
+
// validator are the only constraints.
|
|
174
195
|
get isComplete() {
|
|
175
|
-
|
|
176
|
-
return false;
|
|
177
|
-
}
|
|
178
|
-
return this.ticketCount
|
|
179
|
-
? this.selectedSeats.length === this.ticketCount
|
|
180
|
-
: true;
|
|
196
|
+
return this.selectedSeats.length > 0 && this.selectionValid;
|
|
181
197
|
}
|
|
182
198
|
formatPrice(value) {
|
|
183
199
|
return convertToLocaleCurrency({
|
|
@@ -204,30 +220,62 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
204
220
|
if (!data || this.selectedSeats.length === 0 || this.reserved) {
|
|
205
221
|
return nothing;
|
|
206
222
|
}
|
|
207
|
-
const { groups, total } = buildSelectionSummary(this.selectedSeats, data.availableSeats, data.flatPriceBands, data.categories);
|
|
223
|
+
const { groups, fees, total } = buildSelectionSummary(this.selectedSeats, data.availableSeats, data.flatPriceBands, data.categories);
|
|
224
|
+
const seatCount = this.selectedSeats.length;
|
|
208
225
|
return html `
|
|
209
|
-
<div class="drawer" part="drawer">
|
|
210
|
-
<div class="drawer-
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
226
|
+
<div class="drawer" part="drawer" data-expanded=${this.sheetExpanded}>
|
|
227
|
+
<div class="drawer-inner">
|
|
228
|
+
<button
|
|
229
|
+
type="button"
|
|
230
|
+
class="sheet-handle"
|
|
231
|
+
aria-expanded=${this.sheetExpanded}
|
|
232
|
+
aria-controls="drawer-summary"
|
|
233
|
+
@click=${this.toggleSheet}
|
|
234
|
+
>
|
|
235
|
+
<span class="sheet-handle-label">
|
|
236
|
+
${msg(str `${seatCount} seats selected`)}
|
|
237
|
+
</span>
|
|
238
|
+
<span class="sheet-handle-total">${this.formatPrice(total)}</span>
|
|
239
|
+
<span class="sheet-chevron" aria-hidden="true"></span>
|
|
240
|
+
</button>
|
|
241
|
+
|
|
242
|
+
<div class="drawer-summary" id="drawer-summary">
|
|
243
|
+
${map(groups, (group) => {
|
|
244
|
+
const ticketLabel = `${group.count} ${group.label}`;
|
|
245
|
+
const seatList = group.seatLabels.join(", ");
|
|
246
|
+
const unitPrice = this.formatPrice(group.unitPrice);
|
|
247
|
+
return html `
|
|
248
|
+
<p class="drawer-group">
|
|
249
|
+
<span
|
|
250
|
+
class="drawer-dot"
|
|
251
|
+
style="background:${group.color}"
|
|
252
|
+
></span>
|
|
253
|
+
${msg(str `${ticketLabel} Tickets : ${seatList} (${unitPrice} each)`)}
|
|
254
|
+
</p>
|
|
255
|
+
`;
|
|
256
|
+
})}
|
|
257
|
+
${fees > 0
|
|
258
|
+
? html `
|
|
259
|
+
<p class="drawer-fee">
|
|
260
|
+
${msg(str `Booking fee ${this.formatPrice(fees)}`)}
|
|
261
|
+
</p>
|
|
262
|
+
`
|
|
263
|
+
: nothing}
|
|
264
|
+
<p class="drawer-total">
|
|
265
|
+
${msg("Total")} ${this.formatPrice(total)}
|
|
266
|
+
</p>
|
|
267
|
+
</div>
|
|
222
268
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
269
|
+
<coras-button
|
|
270
|
+
variant="primary"
|
|
271
|
+
height="sm"
|
|
272
|
+
?loading=${this.reserving}
|
|
273
|
+
?disabled=${!this.isComplete || this.reserving}
|
|
274
|
+
@click=${this.handleConfirm}
|
|
275
|
+
>
|
|
276
|
+
${msg("Add to basket")}
|
|
277
|
+
</coras-button>
|
|
278
|
+
</div>
|
|
231
279
|
</div>
|
|
232
280
|
`;
|
|
233
281
|
}
|
|
@@ -254,7 +302,7 @@ let CorasSeatedSelector = class CorasSeatedSelector extends LitElement {
|
|
|
254
302
|
language=${this.locale.split("-")[0] || "en"}
|
|
255
303
|
currency=${this.currency}
|
|
256
304
|
currency-locale=${this.locale}
|
|
257
|
-
max-selected-objects=${this.
|
|
305
|
+
max-selected-objects=${this.maxSeats}
|
|
258
306
|
.chartData=${chartData}
|
|
259
307
|
.selectedObjects=${this.selectedLabels}
|
|
260
308
|
@seats-io-object-selected=${this.handleObjectSelected}
|
|
@@ -301,8 +349,11 @@ __decorate([
|
|
|
301
349
|
property({ type: String })
|
|
302
350
|
], CorasSeatedSelector.prototype, "region", void 0);
|
|
303
351
|
__decorate([
|
|
304
|
-
property({ type: Number, attribute: "
|
|
305
|
-
], CorasSeatedSelector.prototype, "
|
|
352
|
+
property({ type: Number, attribute: "max-seats" })
|
|
353
|
+
], CorasSeatedSelector.prototype, "maxSeats", void 0);
|
|
354
|
+
__decorate([
|
|
355
|
+
property({ type: Boolean, reflect: true })
|
|
356
|
+
], CorasSeatedSelector.prototype, "reserving", void 0);
|
|
306
357
|
__decorate([
|
|
307
358
|
state()
|
|
308
359
|
], CorasSeatedSelector.prototype, "selectedSeats", void 0);
|
|
@@ -315,6 +366,9 @@ __decorate([
|
|
|
315
366
|
__decorate([
|
|
316
367
|
state()
|
|
317
368
|
], CorasSeatedSelector.prototype, "reserved", void 0);
|
|
369
|
+
__decorate([
|
|
370
|
+
state()
|
|
371
|
+
], CorasSeatedSelector.prototype, "sheetExpanded", void 0);
|
|
318
372
|
CorasSeatedSelector = __decorate([
|
|
319
373
|
localized()
|
|
320
374
|
], CorasSeatedSelector);
|
|
@@ -4,9 +4,12 @@ export default css `
|
|
|
4
4
|
${component}
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
|
+
--coras-seated-max-width: 720px;
|
|
8
|
+
|
|
7
9
|
display: flex;
|
|
8
10
|
flex-direction: column;
|
|
9
|
-
gap:
|
|
11
|
+
gap: 1rem;
|
|
12
|
+
max-width: var(--coras-seated-max-width);
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
.heading {
|
|
@@ -32,15 +35,22 @@ export default css `
|
|
|
32
35
|
inset-inline: 0;
|
|
33
36
|
bottom: 0;
|
|
34
37
|
z-index: 20;
|
|
38
|
+
display: flex;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
padding: 24px clamp(16px, 4vw, 48px);
|
|
42
|
+
background: var(--coras-color-background);
|
|
43
|
+
border-top: 1px solid var(--coras-color-divider);
|
|
44
|
+
box-shadow: var(--coras-shadow-top);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.drawer-inner {
|
|
35
48
|
display: flex;
|
|
36
49
|
align-items: center;
|
|
37
50
|
justify-content: space-between;
|
|
38
51
|
gap: 24px;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
background: var(--coras-color-background, #fcfcff);
|
|
42
|
-
border-top: 1px solid var(--coras-color-neutral-200, #e6e6e6);
|
|
43
|
-
box-shadow: 1px -4px 8px 4px rgba(0, 0, 0, 0.03);
|
|
52
|
+
width: 100%;
|
|
53
|
+
max-width: var(--coras-seated-max-width);
|
|
44
54
|
}
|
|
45
55
|
|
|
46
56
|
.drawer-summary {
|
|
@@ -50,13 +60,6 @@ export default css `
|
|
|
50
60
|
min-width: 0;
|
|
51
61
|
}
|
|
52
62
|
|
|
53
|
-
.drawer-total {
|
|
54
|
-
margin: 0;
|
|
55
|
-
color: var(--coras-color-text);
|
|
56
|
-
font-size: var(--coras-font-size-base);
|
|
57
|
-
font-weight: var(--coras-font-weight-medium);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
63
|
.drawer-group {
|
|
61
64
|
display: flex;
|
|
62
65
|
align-items: center;
|
|
@@ -73,12 +76,84 @@ export default css `
|
|
|
73
76
|
border-radius: 50%;
|
|
74
77
|
}
|
|
75
78
|
|
|
79
|
+
.drawer-fee {
|
|
80
|
+
margin: 0;
|
|
81
|
+
color: var(--coras-color-text-muted);
|
|
82
|
+
font-size: var(--coras-font-size-sm);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.drawer-total {
|
|
86
|
+
margin: 4px 0 0;
|
|
87
|
+
padding-top: 8px;
|
|
88
|
+
border-top: 1px solid var(--coras-color-divider);
|
|
89
|
+
color: var(--coras-color-text);
|
|
90
|
+
font-size: var(--coras-font-size-base);
|
|
91
|
+
font-weight: var(--coras-font-weight-medium);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sheet-handle {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
76
98
|
@media (max-width: 600px) {
|
|
77
99
|
.drawer {
|
|
100
|
+
padding: 16px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.drawer-inner {
|
|
78
104
|
flex-direction: column;
|
|
79
105
|
align-items: stretch;
|
|
80
106
|
gap: 12px;
|
|
81
|
-
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.sheet-handle {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 8px;
|
|
113
|
+
width: 100%;
|
|
114
|
+
padding: 0;
|
|
115
|
+
background: none;
|
|
116
|
+
border: none;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
color: var(--coras-color-text);
|
|
119
|
+
font: inherit;
|
|
120
|
+
text-align: start;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.sheet-handle-label {
|
|
124
|
+
font-size: var(--coras-font-size-sm);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.sheet-handle-total {
|
|
128
|
+
margin-inline-start: auto;
|
|
129
|
+
font-size: var(--coras-font-size-base);
|
|
130
|
+
font-weight: var(--coras-font-weight-medium);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.sheet-chevron {
|
|
134
|
+
flex-shrink: 0;
|
|
135
|
+
width: 8px;
|
|
136
|
+
height: 8px;
|
|
137
|
+
border-right: 2px solid currentColor;
|
|
138
|
+
border-bottom: 2px solid currentColor;
|
|
139
|
+
transform: rotate(-135deg);
|
|
140
|
+
transition: transform 0.15s ease;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.drawer[data-expanded="true"] .sheet-chevron {
|
|
144
|
+
transform: rotate(45deg);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.drawer-summary {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.drawer[data-expanded="true"] .drawer-summary {
|
|
152
|
+
display: flex;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.drawer-total {
|
|
156
|
+
display: none;
|
|
82
157
|
}
|
|
83
158
|
}
|
|
84
159
|
`;
|
|
@@ -15,6 +15,8 @@ export declare class CorasSeatsIO extends LitElement {
|
|
|
15
15
|
maxSelectedObjects: number;
|
|
16
16
|
private container;
|
|
17
17
|
private seatsioInstance;
|
|
18
|
+
private readonly colorScheme;
|
|
19
|
+
private renderedScheme;
|
|
18
20
|
private eventsCallbacks;
|
|
19
21
|
private getConfig;
|
|
20
22
|
private loadSeatsio;
|
|
@@ -7,6 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, } from "lit";
|
|
8
8
|
import { property, query } from "lit/decorators.js";
|
|
9
9
|
import { fireInternalEvent } from "../../core/events.js";
|
|
10
|
+
import { ColorSchemeController } from "../../core/color-scheme.js";
|
|
11
|
+
import { convertToLocaleCurrency } from "../../core/currency/index.js";
|
|
10
12
|
import { SEATS_IO_DEFAULTS } from "./seats-io.constants.js";
|
|
11
13
|
import styles from "./seats-io.styles.js";
|
|
12
14
|
export class CorasSeatsIO extends LitElement {
|
|
@@ -24,6 +26,11 @@ export class CorasSeatsIO extends LitElement {
|
|
|
24
26
|
this.selectedObjects = [];
|
|
25
27
|
this.maxSelectedObjects = 0;
|
|
26
28
|
this.seatsioInstance = null;
|
|
29
|
+
// The chart's dark/light styling is baked in at render time, so track the
|
|
30
|
+
// effective scheme and rebuild when it flips (the controller requests an
|
|
31
|
+
// update on both an SDK colour-scheme change and an OS preference change).
|
|
32
|
+
this.colorScheme = new ColorSchemeController(this);
|
|
33
|
+
this.renderedScheme = null;
|
|
27
34
|
this.eventsCallbacks = {
|
|
28
35
|
onObjectSelected: (object) => fireInternalEvent(this, "seats-io-object-selected", object),
|
|
29
36
|
onObjectDeselected: (object) => fireInternalEvent(this, "seats-io-object-deselected", object),
|
|
@@ -49,6 +56,18 @@ export class CorasSeatsIO extends LitElement {
|
|
|
49
56
|
workspaceKey: this.workspaceKey,
|
|
50
57
|
event: this.event,
|
|
51
58
|
language: this.language,
|
|
59
|
+
// The map inherits the embed's effective colour scheme so its background
|
|
60
|
+
// matches a dark theme instead of staying white.
|
|
61
|
+
colorScheme: this.colorScheme.scheme,
|
|
62
|
+
// Prices reach seats.io as raw minor units (e.g. 3500). Format them to the
|
|
63
|
+
// shopper's currency and locale so tooltips and the legend read "£35.00",
|
|
64
|
+
// not "3500". A presentation-layer callback, so unlike the renderer-engine
|
|
65
|
+
// callbacks it may close over the element's currency/locale.
|
|
66
|
+
priceFormatter: (price) => convertToLocaleCurrency({
|
|
67
|
+
value: price,
|
|
68
|
+
locale: this.currencyLocale,
|
|
69
|
+
currency: this.currency,
|
|
70
|
+
}),
|
|
52
71
|
};
|
|
53
72
|
if (!this.chartData) {
|
|
54
73
|
return base;
|
|
@@ -70,7 +89,11 @@ export class CorasSeatsIO extends LitElement {
|
|
|
70
89
|
? { maxSelectedObjects: this.maxSelectedObjects }
|
|
71
90
|
: {}),
|
|
72
91
|
selectionValidators: [{ type: "noOrphanSeats" }],
|
|
73
|
-
session
|
|
92
|
+
// Start a fresh hold session on every mount. "continue" restores the
|
|
93
|
+
// previous browser session, so reopening the map after a reservation
|
|
94
|
+
// re-selected seats that are no longer available - selecting them at
|
|
95
|
+
// price 0 and breaking "Add to basket".
|
|
96
|
+
session: "start",
|
|
74
97
|
};
|
|
75
98
|
return config;
|
|
76
99
|
}
|
|
@@ -103,11 +126,21 @@ export class CorasSeatsIO extends LitElement {
|
|
|
103
126
|
}
|
|
104
127
|
async updated(changed) {
|
|
105
128
|
super.updated(changed);
|
|
129
|
+
// Everything below is baked into the chart at construction, so a change to
|
|
130
|
+
// any of it needs a rebuild, not a prop update the running chart ignores.
|
|
131
|
+
// The scheme is not a Lit property (the controller drives it), so compare it
|
|
132
|
+
// against the scheme the current chart was built with.
|
|
133
|
+
const schemeChanged = this.colorScheme.scheme !== this.renderedScheme;
|
|
106
134
|
if (changed.has("event") ||
|
|
107
135
|
changed.has("workspaceKey") ||
|
|
108
136
|
changed.has("region") ||
|
|
109
137
|
changed.has("language") ||
|
|
110
|
-
changed.has("chartData")
|
|
138
|
+
changed.has("chartData") ||
|
|
139
|
+
changed.has("currency") ||
|
|
140
|
+
changed.has("currencyLocale") ||
|
|
141
|
+
changed.has("maxSelectedObjects") ||
|
|
142
|
+
schemeChanged) {
|
|
143
|
+
this.renderedScheme = this.colorScheme.scheme;
|
|
111
144
|
try {
|
|
112
145
|
await this.getSeatsio();
|
|
113
146
|
this.seatsioInstance?.destroy();
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
export declare const SEATS_IO_DEFAULTS: {
|
|
2
2
|
showRowLabels: boolean;
|
|
3
3
|
showRowLines: boolean;
|
|
4
|
+
fitTo: "widthAndHeight";
|
|
5
|
+
showFullScreenButton: boolean;
|
|
4
6
|
legend: {
|
|
5
7
|
hideNonSelectableCategories: boolean;
|
|
6
8
|
};
|
|
9
|
+
objectPopover: {
|
|
10
|
+
showUnavailableNotice: boolean;
|
|
11
|
+
};
|
|
7
12
|
loading: string;
|
|
8
13
|
showActiveSectionTooltipOnMobile: boolean;
|
|
9
14
|
};
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
export const SEATS_IO_DEFAULTS = {
|
|
2
2
|
showRowLabels: true,
|
|
3
3
|
showRowLines: true,
|
|
4
|
+
// Fill the container in both dimensions so the chart doesn't float in a wide
|
|
5
|
+
// margin (with the seats.io controls stranded far from the seats) on large
|
|
6
|
+
// screens. Paired with the capped map width on the seated selector.
|
|
7
|
+
fitTo: "widthAndHeight",
|
|
8
|
+
// Let shoppers pop the map out to full screen; the enlarge affordance sits
|
|
9
|
+
// next to seats.io's own zoom controls.
|
|
10
|
+
showFullScreenButton: true,
|
|
4
11
|
legend: {
|
|
5
12
|
hideNonSelectableCategories: true,
|
|
6
13
|
},
|
|
14
|
+
// Show an "unavailable" note when hovering a seat that can't be picked.
|
|
15
|
+
// `objectPopover` is the current key; `objectTooltip` is deprecated.
|
|
16
|
+
objectPopover: {
|
|
17
|
+
showUnavailableNotice: true,
|
|
18
|
+
},
|
|
7
19
|
loading: " ",
|
|
8
20
|
showActiveSectionTooltipOnMobile: false,
|
|
9
21
|
};
|