@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.
Files changed (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -0
  3. package/dist/cjs/index-DfzcrE9-.js +3598 -0
  4. package/dist/cjs/index.cjs.js +16 -0
  5. package/dist/cjs/loader.cjs.js +12 -0
  6. package/dist/cjs/order-summary-ZMkJ5bez.js +116 -0
  7. package/dist/cjs/sdk-connector-ClDF3013.js +108 -0
  8. package/dist/cjs/ticketlayer-elements.cjs.js +24 -0
  9. package/dist/cjs/tl-buy-modal.cjs.entry.js +127 -0
  10. package/dist/cjs/tl-buy-tickets-button.cjs.entry.js +131 -0
  11. package/dist/cjs/tl-buy-tickets-wrapper.cjs.entry.js +58 -0
  12. package/dist/cjs/tl-cart-badge.cjs.entry.js +109 -0
  13. package/dist/cjs/tl-cart-drawer.cjs.entry.js +67 -0
  14. package/dist/cjs/tl-cart.cjs.entry.js +148 -0
  15. package/dist/cjs/tl-checkout-wrapper.cjs.entry.js +57 -0
  16. package/dist/cjs/tl-event-card.cjs.entry.js +140 -0
  17. package/dist/cjs/tl-event-list.cjs.entry.js +80 -0
  18. package/dist/cjs/tl-login.cjs.entry.js +184 -0
  19. package/dist/cjs/tl-my-orders.cjs.entry.js +123 -0
  20. package/dist/cjs/tl-occurrence-selector_2.cjs.entry.js +754 -0
  21. package/dist/cjs/tl-order-confirmation.cjs.entry.js +146 -0
  22. package/dist/cjs/tl-order-tickets_2.cjs.entry.js +3198 -0
  23. package/dist/cjs/tl-promo-code.cjs.entry.js +75 -0
  24. package/dist/cjs/tl-seat-map.cjs.entry.js +147 -0
  25. package/dist/collection/collection-manifest.json +29 -0
  26. package/dist/collection/components/tl-buy-modal/tl-buy-modal.css +264 -0
  27. package/dist/collection/components/tl-buy-modal/tl-buy-modal.js +249 -0
  28. package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.css +120 -0
  29. package/dist/collection/components/tl-buy-tickets-button/tl-buy-tickets-button.js +412 -0
  30. package/dist/collection/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.css +23 -0
  31. package/dist/collection/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.js +192 -0
  32. package/dist/collection/components/tl-cart/tl-cart.css +251 -0
  33. package/dist/collection/components/tl-cart/tl-cart.js +314 -0
  34. package/dist/collection/components/tl-cart-badge/tl-cart-badge.css +138 -0
  35. package/dist/collection/components/tl-cart-badge/tl-cart-badge.js +217 -0
  36. package/dist/collection/components/tl-cart-drawer/tl-cart-drawer.css +98 -0
  37. package/dist/collection/components/tl-cart-drawer/tl-cart-drawer.js +185 -0
  38. package/dist/collection/components/tl-checkout-wrapper/tl-checkout-wrapper.css +23 -0
  39. package/dist/collection/components/tl-checkout-wrapper/tl-checkout-wrapper.js +148 -0
  40. package/dist/collection/components/tl-event-card/event-card-adapter.js +23 -0
  41. package/dist/collection/components/tl-event-card/tl-event-card.css +175 -0
  42. package/dist/collection/components/tl-event-card/tl-event-card.js +205 -0
  43. package/dist/collection/components/tl-event-list/tl-event-list.css +134 -0
  44. package/dist/collection/components/tl-event-list/tl-event-list.js +171 -0
  45. package/dist/collection/components/tl-login/tl-login.css +133 -0
  46. package/dist/collection/components/tl-login/tl-login.js +309 -0
  47. package/dist/collection/components/tl-my-orders/tl-my-orders.css +204 -0
  48. package/dist/collection/components/tl-my-orders/tl-my-orders.js +221 -0
  49. package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.css +658 -0
  50. package/dist/collection/components/tl-occurrence-selector/tl-occurrence-selector.js +707 -0
  51. package/dist/collection/components/tl-order-confirmation/tl-order-confirmation.css +176 -0
  52. package/dist/collection/components/tl-order-confirmation/tl-order-confirmation.js +298 -0
  53. package/dist/collection/components/tl-order-tickets/tl-order-tickets.css +30 -0
  54. package/dist/collection/components/tl-order-tickets/tl-order-tickets.js +122 -0
  55. package/dist/collection/components/tl-promo-code/tl-promo-code.css +106 -0
  56. package/dist/collection/components/tl-promo-code/tl-promo-code.js +181 -0
  57. package/dist/collection/components/tl-seat-map/tl-seat-map.css +85 -0
  58. package/dist/collection/components/tl-seat-map/tl-seat-map.js +366 -0
  59. package/dist/collection/components/tl-ticket/tl-ticket.css +90 -0
  60. package/dist/collection/components/tl-ticket/tl-ticket.js +129 -0
  61. package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.css +205 -0
  62. package/dist/collection/components/tl-ticket-selector/tl-ticket-selector.js +332 -0
  63. package/dist/collection/index.js +10 -0
  64. package/dist/collection/utils/order-summary.js +101 -0
  65. package/dist/collection/utils/sdk-connector.js +100 -0
  66. package/dist/collection/utils/testing/mock-sdk.js +95 -0
  67. package/dist/components/index.d.ts +35 -0
  68. package/dist/components/index.js +1 -0
  69. package/dist/components/order-summary.js +1 -0
  70. package/dist/components/sdk-connector.js +1 -0
  71. package/dist/components/tl-buy-modal.d.ts +11 -0
  72. package/dist/components/tl-buy-modal.js +1 -0
  73. package/dist/components/tl-buy-tickets-button.d.ts +11 -0
  74. package/dist/components/tl-buy-tickets-button.js +1 -0
  75. package/dist/components/tl-buy-tickets-wrapper.d.ts +11 -0
  76. package/dist/components/tl-buy-tickets-wrapper.js +1 -0
  77. package/dist/components/tl-buy-tickets-wrapper2.js +1 -0
  78. package/dist/components/tl-cart-badge.d.ts +11 -0
  79. package/dist/components/tl-cart-badge.js +1 -0
  80. package/dist/components/tl-cart-drawer.d.ts +11 -0
  81. package/dist/components/tl-cart-drawer.js +1 -0
  82. package/dist/components/tl-cart.d.ts +11 -0
  83. package/dist/components/tl-cart.js +1 -0
  84. package/dist/components/tl-cart2.js +1 -0
  85. package/dist/components/tl-checkout-wrapper.d.ts +11 -0
  86. package/dist/components/tl-checkout-wrapper.js +1 -0
  87. package/dist/components/tl-checkout-wrapper2.js +1 -0
  88. package/dist/components/tl-event-card.d.ts +11 -0
  89. package/dist/components/tl-event-card.js +1 -0
  90. package/dist/components/tl-event-card2.js +1 -0
  91. package/dist/components/tl-event-list.d.ts +11 -0
  92. package/dist/components/tl-event-list.js +1 -0
  93. package/dist/components/tl-login.d.ts +11 -0
  94. package/dist/components/tl-login.js +1 -0
  95. package/dist/components/tl-login2.js +1 -0
  96. package/dist/components/tl-my-orders.d.ts +11 -0
  97. package/dist/components/tl-my-orders.js +1 -0
  98. package/dist/components/tl-occurrence-selector.d.ts +11 -0
  99. package/dist/components/tl-occurrence-selector.js +1 -0
  100. package/dist/components/tl-occurrence-selector2.js +1 -0
  101. package/dist/components/tl-order-confirmation.d.ts +11 -0
  102. package/dist/components/tl-order-confirmation.js +1 -0
  103. package/dist/components/tl-order-tickets.d.ts +11 -0
  104. package/dist/components/tl-order-tickets.js +1 -0
  105. package/dist/components/tl-order-tickets2.js +1 -0
  106. package/dist/components/tl-promo-code.d.ts +11 -0
  107. package/dist/components/tl-promo-code.js +1 -0
  108. package/dist/components/tl-seat-map.d.ts +11 -0
  109. package/dist/components/tl-seat-map.js +1 -0
  110. package/dist/components/tl-ticket-selector.d.ts +11 -0
  111. package/dist/components/tl-ticket-selector.js +1 -0
  112. package/dist/components/tl-ticket-selector2.js +1 -0
  113. package/dist/components/tl-ticket.d.ts +11 -0
  114. package/dist/components/tl-ticket.js +1 -0
  115. package/dist/components/tl-ticket2.js +1 -0
  116. package/dist/elements.docs.d.ts +454 -0
  117. package/dist/elements.docs.json +3008 -0
  118. package/dist/esm/index-Ba-RZTFI.js +3588 -0
  119. package/dist/esm/index.js +4 -0
  120. package/dist/esm/loader.js +10 -0
  121. package/dist/esm/order-summary-BGekdjN9.js +103 -0
  122. package/dist/esm/sdk-connector-CqhvfyKV.js +102 -0
  123. package/dist/esm/ticketlayer-elements.js +20 -0
  124. package/dist/esm/tl-buy-modal.entry.js +125 -0
  125. package/dist/esm/tl-buy-tickets-button.entry.js +129 -0
  126. package/dist/esm/tl-buy-tickets-wrapper.entry.js +56 -0
  127. package/dist/esm/tl-cart-badge.entry.js +107 -0
  128. package/dist/esm/tl-cart-drawer.entry.js +65 -0
  129. package/dist/esm/tl-cart.entry.js +146 -0
  130. package/dist/esm/tl-checkout-wrapper.entry.js +55 -0
  131. package/dist/esm/tl-event-card.entry.js +138 -0
  132. package/dist/esm/tl-event-list.entry.js +78 -0
  133. package/dist/esm/tl-login.entry.js +182 -0
  134. package/dist/esm/tl-my-orders.entry.js +121 -0
  135. package/dist/esm/tl-occurrence-selector_2.entry.js +751 -0
  136. package/dist/esm/tl-order-confirmation.entry.js +144 -0
  137. package/dist/esm/tl-order-tickets_2.entry.js +3195 -0
  138. package/dist/esm/tl-promo-code.entry.js +73 -0
  139. package/dist/esm/tl-seat-map.entry.js +145 -0
  140. package/dist/index.cjs.js +1 -0
  141. package/dist/index.js +1 -0
  142. package/dist/ticketlayer-elements/index.esm.js +1 -0
  143. package/dist/ticketlayer-elements/p-0291df4c.entry.js +1 -0
  144. package/dist/ticketlayer-elements/p-10f01a1f.entry.js +1 -0
  145. package/dist/ticketlayer-elements/p-11273f8f.entry.js +1 -0
  146. package/dist/ticketlayer-elements/p-340ab4f5.entry.js +1 -0
  147. package/dist/ticketlayer-elements/p-41d22d7c.entry.js +1 -0
  148. package/dist/ticketlayer-elements/p-82752e3b.entry.js +1 -0
  149. package/dist/ticketlayer-elements/p-976770f3.entry.js +1 -0
  150. package/dist/ticketlayer-elements/p-9a903ff6.entry.js +1 -0
  151. package/dist/ticketlayer-elements/p-9c9072c8.entry.js +1 -0
  152. package/dist/ticketlayer-elements/p-9d8163d6.entry.js +1 -0
  153. package/dist/ticketlayer-elements/p-BGekdjN9.js +1 -0
  154. package/dist/ticketlayer-elements/p-Ba-RZTFI.js +2 -0
  155. package/dist/ticketlayer-elements/p-CqhvfyKV.js +1 -0
  156. package/dist/ticketlayer-elements/p-a5c90b68.entry.js +1 -0
  157. package/dist/ticketlayer-elements/p-b6d479ad.entry.js +1 -0
  158. package/dist/ticketlayer-elements/p-dd43f015.entry.js +1 -0
  159. package/dist/ticketlayer-elements/p-eb640760.entry.js +1 -0
  160. package/dist/ticketlayer-elements/p-ee3aa227.entry.js +1 -0
  161. package/dist/ticketlayer-elements/p-fb9444c4.entry.js +1 -0
  162. package/dist/ticketlayer-elements/ticketlayer-elements.css +1 -0
  163. package/dist/ticketlayer-elements/ticketlayer-elements.esm.js +1 -0
  164. package/dist/types/components/tl-buy-modal/tl-buy-modal.d.ts +54 -0
  165. package/dist/types/components/tl-buy-tickets-button/tl-buy-tickets-button.d.ts +61 -0
  166. package/dist/types/components/tl-buy-tickets-wrapper/tl-buy-tickets-wrapper.d.ts +52 -0
  167. package/dist/types/components/tl-cart/tl-cart.d.ts +80 -0
  168. package/dist/types/components/tl-cart-badge/tl-cart-badge.d.ts +36 -0
  169. package/dist/types/components/tl-cart-drawer/tl-cart-drawer.d.ts +35 -0
  170. package/dist/types/components/tl-checkout-wrapper/tl-checkout-wrapper.d.ts +39 -0
  171. package/dist/types/components/tl-event-card/event-card-adapter.d.ts +23 -0
  172. package/dist/types/components/tl-event-card/tl-event-card.d.ts +55 -0
  173. package/dist/types/components/tl-event-list/tl-event-list.d.ts +30 -0
  174. package/dist/types/components/tl-login/tl-login.d.ts +59 -0
  175. package/dist/types/components/tl-my-orders/tl-my-orders.d.ts +39 -0
  176. package/dist/types/components/tl-occurrence-selector/tl-occurrence-selector.d.ts +208 -0
  177. package/dist/types/components/tl-order-confirmation/tl-order-confirmation.d.ts +54 -0
  178. package/dist/types/components/tl-order-tickets/tl-order-tickets.d.ts +21 -0
  179. package/dist/types/components/tl-promo-code/tl-promo-code.d.ts +39 -0
  180. package/dist/types/components/tl-seat-map/tl-seat-map.d.ts +68 -0
  181. package/dist/types/components/tl-ticket/tl-ticket.d.ts +28 -0
  182. package/dist/types/components/tl-ticket-selector/tl-ticket-selector.d.ts +78 -0
  183. package/dist/types/components.d.ts +1629 -0
  184. package/dist/types/index.d.ts +14 -0
  185. package/dist/types/stencil-public-runtime.d.ts +1839 -0
  186. package/dist/types/utils/order-summary.d.ts +67 -0
  187. package/dist/types/utils/sdk-connector.d.ts +113 -0
  188. package/dist/types/utils/testing/mock-sdk.d.ts +36 -0
  189. package/elements.catalogue.json +968 -0
  190. package/loader/cdn.js +1 -0
  191. package/loader/index.cjs.js +1 -0
  192. package/loader/index.d.ts +24 -0
  193. package/loader/index.es2017.js +1 -0
  194. package/loader/index.js +2 -0
  195. 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
+ }