@ticketlayer/elements 0.2.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/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/cjs/index-DfzcrE9-.js +3598 -0
- package/dist/cjs/index.cjs.js +16 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/order-summary-ZMkJ5bez.js +116 -0
- package/dist/cjs/sdk-connector-ClDF3013.js +108 -0
- package/dist/cjs/ticketlayer-elements.cjs.js +24 -0
- package/dist/cjs/tl-buy-modal.cjs.entry.js +127 -0
- package/dist/cjs/tl-buy-tickets-button.cjs.entry.js +131 -0
- package/dist/cjs/tl-buy-tickets-wrapper.cjs.entry.js +58 -0
- package/dist/cjs/tl-cart-badge.cjs.entry.js +109 -0
- package/dist/cjs/tl-cart-drawer.cjs.entry.js +67 -0
- package/dist/cjs/tl-cart.cjs.entry.js +148 -0
- package/dist/cjs/tl-checkout-wrapper.cjs.entry.js +57 -0
- package/dist/cjs/tl-event-card.cjs.entry.js +140 -0
- package/dist/cjs/tl-event-list.cjs.entry.js +80 -0
- package/dist/cjs/tl-login.cjs.entry.js +184 -0
- package/dist/cjs/tl-my-orders.cjs.entry.js +123 -0
- package/dist/cjs/tl-occurrence-selector_2.cjs.entry.js +754 -0
- package/dist/cjs/tl-order-confirmation.cjs.entry.js +146 -0
- package/dist/cjs/tl-order-tickets_2.cjs.entry.js +3198 -0
- package/dist/cjs/tl-promo-code.cjs.entry.js +75 -0
- package/dist/cjs/tl-seat-map.cjs.entry.js +147 -0
- package/dist/collection/collection-manifest.json +29 -0
- package/dist/collection/components/tl-buy-modal/tl-buy-modal.css +264 -0
- package/dist/collection/components/tl-buy-modal/tl-buy-modal.js +249 -0
- package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.css +120 -0
- package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.js +412 -0
- package/dist/collection/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.css +23 -0
- package/dist/collection/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.js +192 -0
- package/dist/collection/components/tl-cart/tl-cart.css +251 -0
- package/dist/collection/components/tl-cart/tl-cart.js +314 -0
- package/dist/collection/components/tl-cart-badge/tl-cart-badge.css +138 -0
- package/dist/collection/components/tl-cart-badge/tl-cart-badge.js +217 -0
- package/dist/collection/components/tl-cart-drawer/tl-cart-drawer.css +98 -0
- package/dist/collection/components/tl-cart-drawer/tl-cart-drawer.js +185 -0
- package/dist/collection/components/tl-checkout-wrapper/tl-checkout-wrapper.css +23 -0
- package/dist/collection/components/tl-checkout-wrapper/tl-checkout-wrapper.js +148 -0
- package/dist/collection/components/tl-event-card/event-card-adapter.js +23 -0
- package/dist/collection/components/tl-event-card/tl-event-card.css +175 -0
- package/dist/collection/components/tl-event-card/tl-event-card.js +205 -0
- package/dist/collection/components/tl-event-list/tl-event-list.css +134 -0
- package/dist/collection/components/tl-event-list/tl-event-list.js +171 -0
- package/dist/collection/components/tl-login/tl-login.css +133 -0
- package/dist/collection/components/tl-login/tl-login.js +309 -0
- package/dist/collection/components/tl-my-orders/tl-my-orders.css +204 -0
- package/dist/collection/components/tl-my-orders/tl-my-orders.js +221 -0
- package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.css +658 -0
- package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.js +707 -0
- package/dist/collection/components/tl-order-confirmation/tl-order-confirmation.css +176 -0
- package/dist/collection/components/tl-order-confirmation/tl-order-confirmation.js +298 -0
- package/dist/collection/components/tl-order-tickets/tl-order-tickets.css +30 -0
- package/dist/collection/components/tl-order-tickets/tl-order-tickets.js +122 -0
- package/dist/collection/components/tl-promo-code/tl-promo-code.css +106 -0
- package/dist/collection/components/tl-promo-code/tl-promo-code.js +181 -0
- package/dist/collection/components/tl-seat-map/tl-seat-map.css +85 -0
- package/dist/collection/components/tl-seat-map/tl-seat-map.js +366 -0
- package/dist/collection/components/tl-ticket/tl-ticket.css +90 -0
- package/dist/collection/components/tl-ticket/tl-ticket.js +129 -0
- package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.css +205 -0
- package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.js +332 -0
- package/dist/collection/index.js +10 -0
- package/dist/collection/utils/order-summary.js +101 -0
- package/dist/collection/utils/sdk-connector.js +100 -0
- package/dist/collection/utils/testing/mock-sdk.js +95 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/order-summary.js +1 -0
- package/dist/components/sdk-connector.js +1 -0
- package/dist/components/tl-buy-modal.d.ts +11 -0
- package/dist/components/tl-buy-modal.js +1 -0
- package/dist/components/tl-buy-tickets-button.d.ts +11 -0
- package/dist/components/tl-buy-tickets-button.js +1 -0
- package/dist/components/tl-buy-tickets-wrapper.d.ts +11 -0
- package/dist/components/tl-buy-tickets-wrapper.js +1 -0
- package/dist/components/tl-buy-tickets-wrapper2.js +1 -0
- package/dist/components/tl-cart-badge.d.ts +11 -0
- package/dist/components/tl-cart-badge.js +1 -0
- package/dist/components/tl-cart-drawer.d.ts +11 -0
- package/dist/components/tl-cart-drawer.js +1 -0
- package/dist/components/tl-cart.d.ts +11 -0
- package/dist/components/tl-cart.js +1 -0
- package/dist/components/tl-cart2.js +1 -0
- package/dist/components/tl-checkout-wrapper.d.ts +11 -0
- package/dist/components/tl-checkout-wrapper.js +1 -0
- package/dist/components/tl-checkout-wrapper2.js +1 -0
- package/dist/components/tl-event-card.d.ts +11 -0
- package/dist/components/tl-event-card.js +1 -0
- package/dist/components/tl-event-card2.js +1 -0
- package/dist/components/tl-event-list.d.ts +11 -0
- package/dist/components/tl-event-list.js +1 -0
- package/dist/components/tl-login.d.ts +11 -0
- package/dist/components/tl-login.js +1 -0
- package/dist/components/tl-login2.js +1 -0
- package/dist/components/tl-my-orders.d.ts +11 -0
- package/dist/components/tl-my-orders.js +1 -0
- package/dist/components/tl-occurrence-selector.d.ts +11 -0
- package/dist/components/tl-occurrence-selector.js +1 -0
- package/dist/components/tl-occurrence-selector2.js +1 -0
- package/dist/components/tl-order-confirmation.d.ts +11 -0
- package/dist/components/tl-order-confirmation.js +1 -0
- package/dist/components/tl-order-tickets.d.ts +11 -0
- package/dist/components/tl-order-tickets.js +1 -0
- package/dist/components/tl-order-tickets2.js +1 -0
- package/dist/components/tl-promo-code.d.ts +11 -0
- package/dist/components/tl-promo-code.js +1 -0
- package/dist/components/tl-seat-map.d.ts +11 -0
- package/dist/components/tl-seat-map.js +1 -0
- package/dist/components/tl-ticket-selector.d.ts +11 -0
- package/dist/components/tl-ticket-selector.js +1 -0
- package/dist/components/tl-ticket-selector2.js +1 -0
- package/dist/components/tl-ticket.d.ts +11 -0
- package/dist/components/tl-ticket.js +1 -0
- package/dist/components/tl-ticket2.js +1 -0
- package/dist/elements.docs.d.ts +454 -0
- package/dist/elements.docs.json +3008 -0
- package/dist/esm/index-Ba-RZTFI.js +3588 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/order-summary-BGekdjN9.js +103 -0
- package/dist/esm/sdk-connector-CqhvfyKV.js +102 -0
- package/dist/esm/ticketlayer-elements.js +20 -0
- package/dist/esm/tl-buy-modal.entry.js +125 -0
- package/dist/esm/tl-buy-tickets-button.entry.js +129 -0
- package/dist/esm/tl-buy-tickets-wrapper.entry.js +56 -0
- package/dist/esm/tl-cart-badge.entry.js +107 -0
- package/dist/esm/tl-cart-drawer.entry.js +65 -0
- package/dist/esm/tl-cart.entry.js +146 -0
- package/dist/esm/tl-checkout-wrapper.entry.js +55 -0
- package/dist/esm/tl-event-card.entry.js +138 -0
- package/dist/esm/tl-event-list.entry.js +78 -0
- package/dist/esm/tl-login.entry.js +182 -0
- package/dist/esm/tl-my-orders.entry.js +121 -0
- package/dist/esm/tl-occurrence-selector_2.entry.js +751 -0
- package/dist/esm/tl-order-confirmation.entry.js +144 -0
- package/dist/esm/tl-order-tickets_2.entry.js +3195 -0
- package/dist/esm/tl-promo-code.entry.js +73 -0
- package/dist/esm/tl-seat-map.entry.js +145 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/ticketlayer-elements/index.esm.js +1 -0
- package/dist/ticketlayer-elements/p-0291df4c.entry.js +1 -0
- package/dist/ticketlayer-elements/p-10f01a1f.entry.js +1 -0
- package/dist/ticketlayer-elements/p-11273f8f.entry.js +1 -0
- package/dist/ticketlayer-elements/p-340ab4f5.entry.js +1 -0
- package/dist/ticketlayer-elements/p-41d22d7c.entry.js +1 -0
- package/dist/ticketlayer-elements/p-82752e3b.entry.js +1 -0
- package/dist/ticketlayer-elements/p-976770f3.entry.js +1 -0
- package/dist/ticketlayer-elements/p-9a903ff6.entry.js +1 -0
- package/dist/ticketlayer-elements/p-9c9072c8.entry.js +1 -0
- package/dist/ticketlayer-elements/p-9d8163d6.entry.js +1 -0
- package/dist/ticketlayer-elements/p-BGekdjN9.js +1 -0
- package/dist/ticketlayer-elements/p-Ba-RZTFI.js +2 -0
- package/dist/ticketlayer-elements/p-CqhvfyKV.js +1 -0
- package/dist/ticketlayer-elements/p-a5c90b68.entry.js +1 -0
- package/dist/ticketlayer-elements/p-b6d479ad.entry.js +1 -0
- package/dist/ticketlayer-elements/p-dd43f015.entry.js +1 -0
- package/dist/ticketlayer-elements/p-eb640760.entry.js +1 -0
- package/dist/ticketlayer-elements/p-ee3aa227.entry.js +1 -0
- package/dist/ticketlayer-elements/p-fb9444c4.entry.js +1 -0
- package/dist/ticketlayer-elements/ticketlayer-elements.css +1 -0
- package/dist/ticketlayer-elements/ticketlayer-elements.esm.js +1 -0
- package/dist/types/components/tl-buy-modal/tl-buy-modal.d.ts +54 -0
- package/dist/types/components/tl-buy-tickets-button/tl-buy-tickets-button.d.ts +61 -0
- package/dist/types/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.d.ts +52 -0
- package/dist/types/components/tl-cart/tl-cart.d.ts +80 -0
- package/dist/types/components/tl-cart-badge/tl-cart-badge.d.ts +36 -0
- package/dist/types/components/tl-cart-drawer/tl-cart-drawer.d.ts +35 -0
- package/dist/types/components/tl-checkout-wrapper/tl-checkout-wrapper.d.ts +39 -0
- package/dist/types/components/tl-event-card/event-card-adapter.d.ts +23 -0
- package/dist/types/components/tl-event-card/tl-event-card.d.ts +55 -0
- package/dist/types/components/tl-event-list/tl-event-list.d.ts +30 -0
- package/dist/types/components/tl-login/tl-login.d.ts +59 -0
- package/dist/types/components/tl-my-orders/tl-my-orders.d.ts +39 -0
- package/dist/types/components/tl-occurrence-selector/tl-occurrence-selector.d.ts +208 -0
- package/dist/types/components/tl-order-confirmation/tl-order-confirmation.d.ts +54 -0
- package/dist/types/components/tl-order-tickets/tl-order-tickets.d.ts +21 -0
- package/dist/types/components/tl-promo-code/tl-promo-code.d.ts +39 -0
- package/dist/types/components/tl-seat-map/tl-seat-map.d.ts +68 -0
- package/dist/types/components/tl-ticket/tl-ticket.d.ts +28 -0
- package/dist/types/components/tl-ticket-selector/tl-ticket-selector.d.ts +78 -0
- package/dist/types/components.d.ts +1629 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/stencil-public-runtime.d.ts +1839 -0
- package/dist/types/utils/order-summary.d.ts +67 -0
- package/dist/types/utils/sdk-connector.d.ts +113 -0
- package/dist/types/utils/testing/mock-sdk.d.ts +36 -0
- package/elements.catalogue.json +968 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +101 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapts the sales event detail (events manager get) to the shape
|
|
3
|
+
* tl-event-card renders. Kept outside the component module because Stencil
|
|
4
|
+
* allows only the component class as a value export there.
|
|
5
|
+
*/
|
|
6
|
+
import type { TlEventCardEvent } from './tl-event-card';
|
|
7
|
+
export interface EventDetailLike {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
status?: string;
|
|
11
|
+
shortDescription?: string | null;
|
|
12
|
+
imageUrl?: string | null;
|
|
13
|
+
venueId?: string | null;
|
|
14
|
+
venueName?: string | null;
|
|
15
|
+
venueCity?: string | null;
|
|
16
|
+
occurrences?: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
startsAt?: string | null;
|
|
19
|
+
status?: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
/** Adapt an event detail to the card shape (the list adapter lives in the SDK connector). */
|
|
23
|
+
export declare function toEventCardEvent(detail: EventDetailLike): TlEventCardEvent;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface TlEventCardEvent {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
slug?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
shortDescription?: string;
|
|
8
|
+
imageUrl?: string;
|
|
9
|
+
thumbnailUrl?: string;
|
|
10
|
+
category?: string;
|
|
11
|
+
venue?: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
city: string;
|
|
15
|
+
};
|
|
16
|
+
nextOccurrence?: {
|
|
17
|
+
startsAt: string;
|
|
18
|
+
};
|
|
19
|
+
availabilityStatus: 'available' | 'limited' | 'sold_out';
|
|
20
|
+
}
|
|
21
|
+
export declare class TlEventCard {
|
|
22
|
+
/**
|
|
23
|
+
* Event data to display (tl-event-list passes this)
|
|
24
|
+
*/
|
|
25
|
+
event?: TlEventCardEvent;
|
|
26
|
+
/**
|
|
27
|
+
* Load the event from the SDK by id when no `event` is given, so a single
|
|
28
|
+
* card works standalone (e.g. on a Webflow page).
|
|
29
|
+
*/
|
|
30
|
+
eventId?: string;
|
|
31
|
+
loadedEvent: TlEventCardEvent | null;
|
|
32
|
+
loading: boolean;
|
|
33
|
+
error: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Emitted when the card is clicked
|
|
36
|
+
*/
|
|
37
|
+
tlClick: EventEmitter<{
|
|
38
|
+
eventId: string;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Emitted when the event could not be loaded by id
|
|
42
|
+
*/
|
|
43
|
+
tlError: EventEmitter<{
|
|
44
|
+
message: string;
|
|
45
|
+
}>;
|
|
46
|
+
watchEventId(): void;
|
|
47
|
+
componentWillLoad(): Promise<void>;
|
|
48
|
+
private loadEvent;
|
|
49
|
+
private get current();
|
|
50
|
+
private handleClick;
|
|
51
|
+
private formatDate;
|
|
52
|
+
private getStatusBadgeClass;
|
|
53
|
+
private getStatusLabel;
|
|
54
|
+
render(): any;
|
|
55
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import type { TlEventCardEvent } from '../tl-event-card/tl-event-card';
|
|
3
|
+
export declare class TlEventList {
|
|
4
|
+
/**
|
|
5
|
+
* Maximum number of events to display
|
|
6
|
+
*/
|
|
7
|
+
limit: number;
|
|
8
|
+
/**
|
|
9
|
+
* Category filter
|
|
10
|
+
*/
|
|
11
|
+
category?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Columns for grid layout (1, 2, 3, or 4)
|
|
14
|
+
*/
|
|
15
|
+
columns: number;
|
|
16
|
+
events: TlEventCardEvent[];
|
|
17
|
+
loading: boolean;
|
|
18
|
+
error: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Emitted when an event card is clicked
|
|
21
|
+
*/
|
|
22
|
+
tlEventClick: EventEmitter<{
|
|
23
|
+
eventId: string;
|
|
24
|
+
}>;
|
|
25
|
+
watchFiltersChange(): void;
|
|
26
|
+
componentWillLoad(): Promise<void>;
|
|
27
|
+
private loadEvents;
|
|
28
|
+
private handleEventClick;
|
|
29
|
+
render(): any;
|
|
30
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { type SDKCustomer } from '../../utils/sdk-connector';
|
|
3
|
+
export type TlLoginPhase = 'email' | 'sent' | 'code' | 'verifying' | 'signed-in';
|
|
4
|
+
export interface TlAuthChanged {
|
|
5
|
+
customer: SDKCustomer | null;
|
|
6
|
+
authenticated: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* tl-login - magic-link sign-in. The customer enters an email, we ask the SDK
|
|
10
|
+
* to send a link (POST /sales/customer-auth/magic-link), then either the link
|
|
11
|
+
* lands back on this page with `?code=` or the customer types the code from
|
|
12
|
+
* the email; both exchange through the SDK (POST /sales/customer-tokens). No
|
|
13
|
+
* password is ever handled here.
|
|
14
|
+
*
|
|
15
|
+
* States: enter email -> check your inbox (resend, enter code) -> signed in
|
|
16
|
+
* (email + sign out).
|
|
17
|
+
*
|
|
18
|
+
* Usage: <tl-login></tl-login>
|
|
19
|
+
*
|
|
20
|
+
* @event tlAuthChanged - signed in or out ({ customer, authenticated })
|
|
21
|
+
* @event tlMagicLinkSent - a link was requested for an email
|
|
22
|
+
* @event tlError - request or code exchange failed
|
|
23
|
+
*/
|
|
24
|
+
export declare class TlLogin {
|
|
25
|
+
/** Heading for the email step. */
|
|
26
|
+
heading: string;
|
|
27
|
+
/** Offer a "enter the code" path alongside the emailed link (default true). */
|
|
28
|
+
allowCodeEntry: boolean;
|
|
29
|
+
phase: TlLoginPhase;
|
|
30
|
+
email: string;
|
|
31
|
+
code: string;
|
|
32
|
+
busy: boolean;
|
|
33
|
+
error: string | null;
|
|
34
|
+
notice: string | null;
|
|
35
|
+
customer: SDKCustomer | null;
|
|
36
|
+
tlAuthChanged: EventEmitter<TlAuthChanged>;
|
|
37
|
+
tlMagicLinkSent: EventEmitter<{
|
|
38
|
+
email: string;
|
|
39
|
+
}>;
|
|
40
|
+
tlError: EventEmitter<{
|
|
41
|
+
message: string;
|
|
42
|
+
}>;
|
|
43
|
+
private auth;
|
|
44
|
+
private unsubscribes;
|
|
45
|
+
private urlCodeUsed;
|
|
46
|
+
componentWillLoad(): Promise<void>;
|
|
47
|
+
disconnectedCallback(): void;
|
|
48
|
+
private codeFromUrl;
|
|
49
|
+
private syncFromSDK;
|
|
50
|
+
private handleEmailInput;
|
|
51
|
+
private handleCodeInput;
|
|
52
|
+
private handleEmailSubmit;
|
|
53
|
+
private handleCodeSubmit;
|
|
54
|
+
private requestLink;
|
|
55
|
+
private exchange;
|
|
56
|
+
private signOut;
|
|
57
|
+
private renderError;
|
|
58
|
+
render(): any;
|
|
59
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { type TlOrderData } from '../../utils/order-summary';
|
|
3
|
+
/**
|
|
4
|
+
* tl-my-orders - the signed-in customer's orders (GET /sales/my-orders through
|
|
5
|
+
* the SDK): event, date, ticket count, total and status per row. Clicking a
|
|
6
|
+
* row expands it to show the order's tickets (tl-order-tickets). Shows
|
|
7
|
+
* tl-login inline when nobody is signed in.
|
|
8
|
+
*
|
|
9
|
+
* Usage: <tl-my-orders></tl-my-orders>
|
|
10
|
+
*
|
|
11
|
+
* @event tlOrderSelect - a row was expanded ({ orderId })
|
|
12
|
+
* @event tlError - the orders could not be loaded
|
|
13
|
+
*/
|
|
14
|
+
export declare class TlMyOrders {
|
|
15
|
+
/** Copy for the empty state. */
|
|
16
|
+
emptyMessage: string;
|
|
17
|
+
/** Columns for the expanded ticket grid. */
|
|
18
|
+
columns: number;
|
|
19
|
+
orders: TlOrderData[];
|
|
20
|
+
authenticated: boolean;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
error: string | null;
|
|
23
|
+
expandedId: string | null;
|
|
24
|
+
tlOrderSelect: EventEmitter<{
|
|
25
|
+
orderId: string;
|
|
26
|
+
}>;
|
|
27
|
+
tlError: EventEmitter<{
|
|
28
|
+
message: string;
|
|
29
|
+
}>;
|
|
30
|
+
private sdk;
|
|
31
|
+
private unsubscribes;
|
|
32
|
+
componentWillLoad(): Promise<void>;
|
|
33
|
+
disconnectedCallback(): void;
|
|
34
|
+
private syncAuth;
|
|
35
|
+
private load;
|
|
36
|
+
private toggle;
|
|
37
|
+
private renderRow;
|
|
38
|
+
render(): any;
|
|
39
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* Occurrence data structure
|
|
4
|
+
*/
|
|
5
|
+
export interface TlOccurrence {
|
|
6
|
+
id: string;
|
|
7
|
+
startsAt: string;
|
|
8
|
+
endsAt?: string;
|
|
9
|
+
status?: string;
|
|
10
|
+
availableCapacity?: number;
|
|
11
|
+
soldOut?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Theme configuration for styling
|
|
15
|
+
*/
|
|
16
|
+
export interface TlOccurrenceSelectorTheme {
|
|
17
|
+
primaryColor?: string;
|
|
18
|
+
primaryForeground?: string;
|
|
19
|
+
backgroundColor?: string;
|
|
20
|
+
foregroundColor?: string;
|
|
21
|
+
mutedColor?: string;
|
|
22
|
+
mutedForeground?: string;
|
|
23
|
+
borderColor?: string;
|
|
24
|
+
borderRadius?: string;
|
|
25
|
+
fontFamily?: string;
|
|
26
|
+
}
|
|
27
|
+
type DisplayMode = 'list' | 'slots' | 'calendar';
|
|
28
|
+
type Orientation = 'horizontal' | 'vertical' | 'auto';
|
|
29
|
+
export declare class TlOccurrenceSelector {
|
|
30
|
+
/**
|
|
31
|
+
* Event ID to fetch occurrences for
|
|
32
|
+
*/
|
|
33
|
+
eventId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Force a specific display mode (auto-detected if not set)
|
|
36
|
+
*/
|
|
37
|
+
displayMode?: DisplayMode;
|
|
38
|
+
/**
|
|
39
|
+
* Layout orientation (auto = horizontal on desktop, vertical on mobile)
|
|
40
|
+
*/
|
|
41
|
+
orientation: Orientation;
|
|
42
|
+
/**
|
|
43
|
+
* Theme configuration
|
|
44
|
+
*/
|
|
45
|
+
theme?: TlOccurrenceSelectorTheme;
|
|
46
|
+
/**
|
|
47
|
+
* Emitted when an occurrence is selected
|
|
48
|
+
*/
|
|
49
|
+
tlSelect: EventEmitter<{
|
|
50
|
+
occurrence: TlOccurrence;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Loading state
|
|
54
|
+
*/
|
|
55
|
+
loading: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Error message
|
|
58
|
+
*/
|
|
59
|
+
error: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Fetched occurrences
|
|
62
|
+
*/
|
|
63
|
+
occurrences: TlOccurrence[];
|
|
64
|
+
/**
|
|
65
|
+
* Current month being displayed in calendar view
|
|
66
|
+
*/
|
|
67
|
+
currentMonth: Date;
|
|
68
|
+
/**
|
|
69
|
+
* Currently selected date in calendar view
|
|
70
|
+
*/
|
|
71
|
+
selectedDate: Date | null;
|
|
72
|
+
/**
|
|
73
|
+
* Computed display mode based on occurrences
|
|
74
|
+
*/
|
|
75
|
+
computedDisplayMode: DisplayMode;
|
|
76
|
+
/**
|
|
77
|
+
* Container width for responsive layout
|
|
78
|
+
*/
|
|
79
|
+
containerWidth: number;
|
|
80
|
+
private containerRef?;
|
|
81
|
+
private resizeObserver?;
|
|
82
|
+
componentWillLoad(): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Wait for SDK to be ready, then fetch occurrences
|
|
85
|
+
*/
|
|
86
|
+
private waitForSDKAndFetch;
|
|
87
|
+
componentDidLoad(): void;
|
|
88
|
+
disconnectedCallback(): void;
|
|
89
|
+
onEventIdChange(): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Fetch occurrences from the SDK
|
|
92
|
+
*/
|
|
93
|
+
private fetchOccurrences;
|
|
94
|
+
/**
|
|
95
|
+
* Compute the display mode based on occurrence count and date distribution
|
|
96
|
+
*/
|
|
97
|
+
private computeDisplayMode;
|
|
98
|
+
/**
|
|
99
|
+
* Compute the initial date selection for calendar/slots views
|
|
100
|
+
*/
|
|
101
|
+
private computeInitialSelection;
|
|
102
|
+
/**
|
|
103
|
+
* Get a map of dates to occurrences
|
|
104
|
+
*/
|
|
105
|
+
private getDatesWithOccurrences;
|
|
106
|
+
/**
|
|
107
|
+
* Get the first and last occurrence dates
|
|
108
|
+
*/
|
|
109
|
+
private getDateRange;
|
|
110
|
+
/**
|
|
111
|
+
* Check if all occurrences fit in one week (Monday-Sunday)
|
|
112
|
+
*/
|
|
113
|
+
private isSingleWeek;
|
|
114
|
+
/**
|
|
115
|
+
* Check if all occurrences are in the same month
|
|
116
|
+
*/
|
|
117
|
+
private isSingleMonth;
|
|
118
|
+
/**
|
|
119
|
+
* Check if we should use horizontal layout
|
|
120
|
+
*/
|
|
121
|
+
private isHorizontalLayout;
|
|
122
|
+
/**
|
|
123
|
+
* Format a date for display
|
|
124
|
+
*/
|
|
125
|
+
private formatDate;
|
|
126
|
+
/**
|
|
127
|
+
* Format a time for display
|
|
128
|
+
*/
|
|
129
|
+
private formatTime;
|
|
130
|
+
/**
|
|
131
|
+
* Format a full date and time for list view
|
|
132
|
+
*/
|
|
133
|
+
private formatDateTime;
|
|
134
|
+
/**
|
|
135
|
+
* Handle occurrence selection
|
|
136
|
+
*/
|
|
137
|
+
private handleSelect;
|
|
138
|
+
/**
|
|
139
|
+
* Handle date selection in calendar view
|
|
140
|
+
*/
|
|
141
|
+
private handleDateSelect;
|
|
142
|
+
/**
|
|
143
|
+
* Navigate to previous month
|
|
144
|
+
*/
|
|
145
|
+
private handlePrevMonth;
|
|
146
|
+
/**
|
|
147
|
+
* Navigate to next month
|
|
148
|
+
*/
|
|
149
|
+
private handleNextMonth;
|
|
150
|
+
/**
|
|
151
|
+
* Check if prev month button should be disabled
|
|
152
|
+
*/
|
|
153
|
+
private isPrevMonthDisabled;
|
|
154
|
+
/**
|
|
155
|
+
* Check if next month button should be disabled
|
|
156
|
+
*/
|
|
157
|
+
private isNextMonthDisabled;
|
|
158
|
+
/**
|
|
159
|
+
* Get calendar grid days for the current month
|
|
160
|
+
*/
|
|
161
|
+
private getCalendarDays;
|
|
162
|
+
/**
|
|
163
|
+
* Check if a date has occurrences
|
|
164
|
+
*/
|
|
165
|
+
private hasOccurrencesOnDate;
|
|
166
|
+
/**
|
|
167
|
+
* Check if all occurrences on a date are sold out
|
|
168
|
+
*/
|
|
169
|
+
private isDateSoldOut;
|
|
170
|
+
/**
|
|
171
|
+
* Get occurrences for the selected date
|
|
172
|
+
*/
|
|
173
|
+
private getSelectedDateOccurrences;
|
|
174
|
+
/**
|
|
175
|
+
* Get CSS custom properties from theme
|
|
176
|
+
*/
|
|
177
|
+
private getThemeStyles;
|
|
178
|
+
/**
|
|
179
|
+
* Render the list view (≤5 occurrences)
|
|
180
|
+
*/
|
|
181
|
+
private renderListView;
|
|
182
|
+
/**
|
|
183
|
+
* Render the time slots view (>5 occurrences, same day)
|
|
184
|
+
*/
|
|
185
|
+
private renderSlotsView;
|
|
186
|
+
/**
|
|
187
|
+
* Render the calendar header
|
|
188
|
+
*/
|
|
189
|
+
private renderCalendarHeader;
|
|
190
|
+
/**
|
|
191
|
+
* Render the calendar grid
|
|
192
|
+
*/
|
|
193
|
+
private renderCalendarGrid;
|
|
194
|
+
/**
|
|
195
|
+
* Render the selected date's time slots
|
|
196
|
+
*/
|
|
197
|
+
private renderSelectedDateSlots;
|
|
198
|
+
/**
|
|
199
|
+
* Render the calendar view with slots panel
|
|
200
|
+
*/
|
|
201
|
+
private renderCalendarView;
|
|
202
|
+
/**
|
|
203
|
+
* Render skeleton loading state
|
|
204
|
+
*/
|
|
205
|
+
private renderSkeleton;
|
|
206
|
+
render(): any;
|
|
207
|
+
}
|
|
208
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { type TlOrderData, type TlResolvedOccurrence } from '../../utils/order-summary';
|
|
3
|
+
/**
|
|
4
|
+
* tl-order-confirmation - the "thank you" page block: order reference,
|
|
5
|
+
* customer email, event and date, ticket lines, totals, then the tickets
|
|
6
|
+
* themselves (tl-order-tickets, each with a Download PDF link).
|
|
7
|
+
*
|
|
8
|
+
* Finds its order three ways, in priority order:
|
|
9
|
+
* 1. the `order-id` prop
|
|
10
|
+
* 2. the URL (`?orderId=`), the contract the hosted box office confirmation
|
|
11
|
+
* page uses; `?redirect_status=` from a Stripe return is honoured too
|
|
12
|
+
* 3. the SDK's `checkout:completed` event, for a page that mounts this before
|
|
13
|
+
* the customer pays
|
|
14
|
+
*
|
|
15
|
+
* Usage: <tl-order-confirmation order-id="ord_xxx"></tl-order-confirmation>
|
|
16
|
+
*
|
|
17
|
+
* @event tlOrderLoaded - the order was loaded
|
|
18
|
+
* @event tlError - the order could not be loaded
|
|
19
|
+
*/
|
|
20
|
+
export declare class TlOrderConfirmation {
|
|
21
|
+
/** The order to show. Falls back to `?orderId=` in the page URL. */
|
|
22
|
+
orderId?: string;
|
|
23
|
+
/** Email to show when the order view carries none (a host that collected it at checkout). */
|
|
24
|
+
customerEmail?: string;
|
|
25
|
+
/** Mount tl-order-tickets under the summary (default true). */
|
|
26
|
+
showTickets: boolean;
|
|
27
|
+
/** Columns for the ticket grid. */
|
|
28
|
+
columns: number;
|
|
29
|
+
order: TlOrderData | null;
|
|
30
|
+
resolvedOrderId: string | null;
|
|
31
|
+
loading: boolean;
|
|
32
|
+
error: string | null;
|
|
33
|
+
paymentFailed: boolean;
|
|
34
|
+
occurrence: TlResolvedOccurrence | null;
|
|
35
|
+
signedInCustomer: unknown | null;
|
|
36
|
+
tlOrderLoaded: EventEmitter<{
|
|
37
|
+
order: TlOrderData;
|
|
38
|
+
}>;
|
|
39
|
+
tlError: EventEmitter<{
|
|
40
|
+
message: string;
|
|
41
|
+
}>;
|
|
42
|
+
private unsubscribe?;
|
|
43
|
+
watchOrderId(next?: string): void;
|
|
44
|
+
componentWillLoad(): Promise<void>;
|
|
45
|
+
componentDidLoad(): void;
|
|
46
|
+
disconnectedCallback(): void;
|
|
47
|
+
private urlParams;
|
|
48
|
+
private orderIdFromUrl;
|
|
49
|
+
private load;
|
|
50
|
+
private resolveEvent;
|
|
51
|
+
private renderRows;
|
|
52
|
+
private renderTotals;
|
|
53
|
+
render(): any;
|
|
54
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TlTicketData } from '../tl-ticket/tl-ticket';
|
|
2
|
+
/**
|
|
3
|
+
* tl-order-tickets - renders all the tickets for an order as scannable QR
|
|
4
|
+
* cards with PDF download. Fetches the order through the SDK (order-access
|
|
5
|
+
* gated by the session), so it works on a confirmation page or in an account.
|
|
6
|
+
*
|
|
7
|
+
* Usage: <tl-order-tickets order-id="ord_xxx"></tl-order-tickets>
|
|
8
|
+
*/
|
|
9
|
+
export declare class TlOrderTickets {
|
|
10
|
+
/** The order whose tickets to show. */
|
|
11
|
+
orderId: string;
|
|
12
|
+
/** Columns in the grid (default 2). */
|
|
13
|
+
columns: number;
|
|
14
|
+
tickets: TlTicketData[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
error: string | null;
|
|
17
|
+
watchOrder(): void;
|
|
18
|
+
componentWillLoad(): Promise<void>;
|
|
19
|
+
private load;
|
|
20
|
+
render(): any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { type PresaleRedemption } from '../../utils/sdk-connector';
|
|
3
|
+
export interface TlPromoApplied extends PresaleRedemption {
|
|
4
|
+
code: string;
|
|
5
|
+
cart: unknown | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* tl-promo-code - an input plus Apply button that redeems a presale or promo
|
|
9
|
+
* code for the current cart (POST /sales/presale-codes/redeem through the
|
|
10
|
+
* SDK). Redemption unlocks gated pricing on the customer; the SDK re-reads the
|
|
11
|
+
* cart and publishes cart:updated, so tl-cart and badges re-render on their own.
|
|
12
|
+
*
|
|
13
|
+
* The API has no un-redeem, so the applied state offers only "use a different
|
|
14
|
+
* code", which clears the input for another redemption.
|
|
15
|
+
*
|
|
16
|
+
* Usage: <tl-promo-code></tl-promo-code>
|
|
17
|
+
*
|
|
18
|
+
* @event tlPromoApplied - a code was redeemed ({ code, benefit, alreadyHeld, cart })
|
|
19
|
+
* @event tlError - the code was rejected
|
|
20
|
+
*/
|
|
21
|
+
export declare class TlPromoCode {
|
|
22
|
+
/** Input placeholder. */
|
|
23
|
+
placeholder: string;
|
|
24
|
+
/** Apply button label. */
|
|
25
|
+
buttonLabel: string;
|
|
26
|
+
code: string;
|
|
27
|
+
applying: boolean;
|
|
28
|
+
applied: TlPromoApplied | null;
|
|
29
|
+
error: string | null;
|
|
30
|
+
tlPromoApplied: EventEmitter<TlPromoApplied>;
|
|
31
|
+
tlError: EventEmitter<{
|
|
32
|
+
message: string;
|
|
33
|
+
}>;
|
|
34
|
+
private handleInput;
|
|
35
|
+
private handleSubmit;
|
|
36
|
+
private apply;
|
|
37
|
+
private reset;
|
|
38
|
+
render(): any;
|
|
39
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TlSeatMap Stencil Component
|
|
3
|
+
*
|
|
4
|
+
* An iframe wrapper for embedding the Ticketlayer seat map.
|
|
5
|
+
* The actual seat map is rendered by HBO at /embed/seats and this component
|
|
6
|
+
* handles communication via postMessage.
|
|
7
|
+
*
|
|
8
|
+
* @element tl-seat-map
|
|
9
|
+
* @slot - No slots
|
|
10
|
+
*
|
|
11
|
+
* @fires tlReady - Fired when the seat map iframe is ready
|
|
12
|
+
* @fires tlLoad - Fired when the seat map has loaded, includes seatMapId
|
|
13
|
+
* @fires tlError - Fired when an error occurs
|
|
14
|
+
* @fires tlSeatAdded - Fired when a seat is added to cart
|
|
15
|
+
* @fires tlSeatRemoved - Fired when a seat is removed from cart
|
|
16
|
+
* @fires tlCartChange - Fired when cart seats change
|
|
17
|
+
*/
|
|
18
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
19
|
+
export declare class TlSeatMap {
|
|
20
|
+
el: HTMLElement;
|
|
21
|
+
private iframeRef?;
|
|
22
|
+
/** Occurrence ID to show seat map for */
|
|
23
|
+
occurrenceId: string;
|
|
24
|
+
/** Base URL for the hosted seat map (HBO URL) */
|
|
25
|
+
hboUrl: string;
|
|
26
|
+
/** API URL for the seat map data */
|
|
27
|
+
apiUrl: string;
|
|
28
|
+
/** Height of the seat map */
|
|
29
|
+
height: string;
|
|
30
|
+
/** Width of the seat map */
|
|
31
|
+
width: string;
|
|
32
|
+
isReady: boolean;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
error: string | null;
|
|
35
|
+
seatsInCart: string[];
|
|
36
|
+
/** Emitted when seat map is ready */
|
|
37
|
+
tlReady: EventEmitter<void>;
|
|
38
|
+
/** Emitted when seat map is loaded */
|
|
39
|
+
tlLoad: EventEmitter<{
|
|
40
|
+
seatMapId: string;
|
|
41
|
+
}>;
|
|
42
|
+
/** Emitted when an error occurs */
|
|
43
|
+
tlError: EventEmitter<{
|
|
44
|
+
error: string;
|
|
45
|
+
}>;
|
|
46
|
+
/** Emitted when a seat is added to cart */
|
|
47
|
+
tlSeatAdded: EventEmitter<{
|
|
48
|
+
seatId: string;
|
|
49
|
+
ticketTypeId: string;
|
|
50
|
+
}>;
|
|
51
|
+
/** Emitted when a seat is removed from cart */
|
|
52
|
+
tlSeatRemoved: EventEmitter<{
|
|
53
|
+
seatId: string;
|
|
54
|
+
}>;
|
|
55
|
+
/** Emitted when cart seats change */
|
|
56
|
+
tlCartChange: EventEmitter<{
|
|
57
|
+
seatIds: string[];
|
|
58
|
+
}>;
|
|
59
|
+
componentWillLoad(): void;
|
|
60
|
+
disconnectedCallback(): void;
|
|
61
|
+
watchOccurrenceId(): void;
|
|
62
|
+
private postToIframe;
|
|
63
|
+
private handleMessage;
|
|
64
|
+
private handleAddSeat;
|
|
65
|
+
private handleRemoveSeat;
|
|
66
|
+
private getIframeSrc;
|
|
67
|
+
render(): any;
|
|
68
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface TlTicketData {
|
|
2
|
+
id: string;
|
|
3
|
+
barcode: string;
|
|
4
|
+
type: string;
|
|
5
|
+
status: string;
|
|
6
|
+
holderName: string | null;
|
|
7
|
+
name: string;
|
|
8
|
+
admissionStatus: string;
|
|
9
|
+
eventOccurrenceId: string | null;
|
|
10
|
+
seatLabel: string | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* tl-ticket - a single event ticket: a scannable QR (the redemption token),
|
|
14
|
+
* ticket name / seat / holder, and a PDF download. Greys out + stamps
|
|
15
|
+
* Used/Void when redeemed or cancelled.
|
|
16
|
+
*/
|
|
17
|
+
export declare class TlTicket {
|
|
18
|
+
/** The ticket to render. */
|
|
19
|
+
ticket: TlTicketData;
|
|
20
|
+
/** Order id this ticket belongs to (for the PDF download). */
|
|
21
|
+
orderId: string;
|
|
22
|
+
qrSvg: string;
|
|
23
|
+
downloading: boolean;
|
|
24
|
+
generateQr(): Promise<void>;
|
|
25
|
+
componentWillLoad(): Promise<void>;
|
|
26
|
+
private download;
|
|
27
|
+
render(): any;
|
|
28
|
+
}
|