@getmicdrop/venue-calendar 4.3.56 → 4.3.58

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 (119) hide show
  1. package/dist/AddOnCard-TEUXB3Sd.js +340 -0
  2. package/dist/{ArrowLeftIcon-DjqiKzR8.js → ArrowLeftIcon-C0jreEw8.js} +1 -1
  3. package/dist/{BlockPlaceholder-CgZr2Euq.js → BlockPlaceholder-DdoOD0gZ.js} +1 -1
  4. package/dist/{Calendar-CS_RqyU_.js → Calendar-BWLg7fOl.js} +3 -3
  5. package/dist/{CalendarFoundryView-BLHPU4ry.js → CalendarFoundryView-apVO50Ap.js} +1602 -1535
  6. package/dist/{CalendarIcon-D9Z9YFz6.js → CalendarIcon-BOEpooZq.js} +1 -1
  7. package/dist/CartView-CTL1DQem.js +2293 -0
  8. package/dist/Checkout-B9OHWxzh.js +1933 -0
  9. package/dist/Checkout-D7Cgj12j.js +1076 -0
  10. package/dist/{CheckoutTimer-CyN-mQCP.js → CheckoutTimer-DPNmc1BX.js} +5 -5
  11. package/dist/{ChevronDownIcon-D9I-5bmz.js → ChevronDownIcon-Czxsi1W2.js} +1 -1
  12. package/dist/{CloseIcon-DPdjPdoi.js → CloseIcon-hLh5XXvh.js} +1 -1
  13. package/dist/{CollectionView-CkKwCXQj.js → CollectionView-LFCwHiPj.js} +13 -13
  14. package/dist/{Event-BfWRG4dm.js → Event-C63PLQhq.js} +431 -616
  15. package/dist/EventPage-CyDAwaQF.js +1200 -0
  16. package/dist/{Input-CDw-j5fQ.js → Input-dF1ZPavc.js} +1 -1
  17. package/dist/{MailIcon-C__hyCKr.js → MailIcon-T9SmOpQr.js} +1 -1
  18. package/dist/{PasswordInput-D3Pwparw.js → PasswordInput-B64o-TXR.js} +1 -1
  19. package/dist/{RecommendationsRail-DPxl9JCm.js → RecommendationsRail-Cb_c4ohM.js} +50 -50
  20. package/dist/ScarcityBadge-14VWzOL2.js +145 -0
  21. package/dist/{SeriesPage-B7z1yoAK.js → SeriesPage-DeALgf5s.js} +3 -3
  22. package/dist/Spinner-CW1KZMkc.js +19 -0
  23. package/dist/{Success-BzuOliUV.js → Success-Dcd9bWCn.js} +94 -95
  24. package/dist/{TagIcon-DwWcRiXS.js → TagIcon-C8DU69Jv.js} +1 -1
  25. package/dist/{ViewTicketsEmbed-BE8iTUF9.js → ViewTicketsEmbed-CWLSFG06.js} +14 -15
  26. package/dist/{WarningCircleIcon-C2fJjhKf.js → WarningCircleIcon-Cj8SHVfz.js} +26 -5
  27. package/dist/{WarningTriIcon-OqM9Rfwq.js → WarningTriIcon-CfCwvwsQ.js} +1 -1
  28. package/dist/__SKIP_NAVIGATION__-AOx8SI54.js +6 -0
  29. package/dist/api/api.cjs +1 -1
  30. package/dist/api/api.mjs +226 -178
  31. package/dist/api/cart-addons.d.ts +61 -0
  32. package/dist/api/index.d.ts +4 -2
  33. package/dist/api/orders.d.ts +48 -0
  34. package/dist/api/transformers/venue.d.ts +14 -1
  35. package/dist/{api-BsBSvoNj.js → api-Br260RVo.js} +206 -143
  36. package/dist/{constants-CJyMUKEX.js → constants-DWS8C09a.js} +4 -0
  37. package/dist/{copyToClipboard-CL9BmJA4.js → copyToClipboard-C_fcBdn4.js} +1 -1
  38. package/dist/{createErrorGate.svelte-DwTTmYou.js → createErrorGate.svelte-jZMaO7KA.js} +1 -1
  39. package/dist/{de-CFh1o4IO.js → de-BEfuIgIj.js} +4 -0
  40. package/dist/{defaultLabels-BaVkGLw4.js → defaultLabels-CqkC-rOG.js} +530 -427
  41. package/dist/{defaults-BHXY6s4i.js → defaults-BLhQWNFt.js} +2 -2
  42. package/dist/{es-By1tBWcL.js → es-Bd4g_HxR.js} +4 -0
  43. package/dist/{event-xgg-eiTq.js → event-DaWMe2IV.js} +1 -1
  44. package/dist/{event-transform-oLpmof1H.js → event-transform-WnvEyzV-.js} +19 -19
  45. package/dist/{eventStatusStream-BIxriEut.js → eventStatusStream-DgWemzCE.js} +5 -5
  46. package/dist/{fr-BF6a7cw7.js → fr-Blc79wvV.js} +4 -0
  47. package/dist/{href-DO3HKeJp.js → href-x-W1j8EY.js} +2 -2
  48. package/dist/{i18n-8EWq-WHv.js → i18n-DFWp9lQ_.js} +2 -2
  49. package/dist/{i18n-JpkI3lvS.js → i18n-DgjCm8g6.js} +93 -93
  50. package/dist/{id-Lo_q281j.js → id-DzzsiF4d.js} +4 -0
  51. package/dist/{it-CQcRIzL4.js → it-B4zXRsxu.js} +4 -0
  52. package/dist/{ja-DOzvvYpK.js → ja-eT4_QPKd.js} +4 -0
  53. package/dist/{ko-b-vWxFpt.js → ko-B8Fmrldj.js} +4 -0
  54. package/dist/locales/4.3.58/flow/de.js +1 -0
  55. package/dist/locales/4.3.58/flow/es.js +1 -0
  56. package/dist/locales/4.3.58/flow/fr.js +1 -0
  57. package/dist/locales/4.3.58/flow/id.js +1 -0
  58. package/dist/locales/4.3.58/flow/it.js +1 -0
  59. package/dist/locales/4.3.58/flow/ja.js +1 -0
  60. package/dist/locales/4.3.58/flow/ko.js +1 -0
  61. package/dist/locales/4.3.58/flow/nl.js +1 -0
  62. package/dist/locales/4.3.58/flow/pl.js +1 -0
  63. package/dist/locales/4.3.58/flow/pt-br.js +1 -0
  64. package/dist/locales/4.3.58/flow/tr.js +1 -0
  65. package/dist/locales/4.3.58/flow/zh.js +1 -0
  66. package/dist/{nl-Dazc9kaV.js → nl-Dnug8LYt.js} +4 -0
  67. package/dist/{orders--luy9Lyn.js → orders-DlyjunUM.js} +60 -44
  68. package/dist/{pixels-FefBmhJt.js → pixels-n1zu1IhF.js} +9 -9
  69. package/dist/{pl-tSyy-lx_.js → pl-C3XxoYWF.js} +4 -0
  70. package/dist/{pt-br-BxzrK97M.js → pt-br-Y40SBe4b.js} +4 -0
  71. package/dist/{scarcity-CR1Pa81F.js → scarcity-KJNxIMxj.js} +100 -100
  72. package/dist/{serverTotals-DeOPPRj6.js → serverTotals-Cb7pt5Z-.js} +8 -8
  73. package/dist/{showcase-state-options-BGmvUaQ_.js → showcase-state-options-Ce1_tYvH.js} +1 -1
  74. package/dist/{to-event-card-props-DLOxO2oP.js → to-event-card-props-KoNvp_D9.js} +15 -16
  75. package/dist/{tr-DhAMB3UQ.js → tr-2zIJ-vq2.js} +4 -0
  76. package/dist/types/index.d.ts +14 -0
  77. package/dist/{utils-BFaSYuNA.js → utils-VHFV7pBb.js} +69 -69
  78. package/dist/{venue-CBos8YTa.js → venue-BBoZBuhu.js} +1 -0
  79. package/dist/venue-calendar.css +1 -1
  80. package/dist/venue-calendar.es.js +223 -224
  81. package/dist/venue-calendar.iife.js +31 -31
  82. package/dist/venue-calendar.umd.js +49 -49
  83. package/dist/{zh-C2-VLP_R.js → zh-vNYvCXO7.js} +4 -0
  84. package/package.json +220 -220
  85. package/dist/Badge-BsWJrQII.js +0 -108
  86. package/dist/CartView-DTXoQTOC.js +0 -2294
  87. package/dist/Checkout-B8ZkBxF_.js +0 -1023
  88. package/dist/Checkout-QIxYrkeK.js +0 -1832
  89. package/dist/ClockIcon-C7nkbmvv.js +0 -25
  90. package/dist/EventPage-dCTHvk7P.js +0 -1201
  91. package/dist/ScarcityBadge-BXn6HM_K.js +0 -116
  92. package/dist/Spinner-6UtYyNcF.js +0 -16
  93. package/dist/liveAnnouncer-D3xVL7qA.js +0 -32
  94. package/dist/locales/4.3.56/flow/de.js +0 -1
  95. package/dist/locales/4.3.56/flow/es.js +0 -1
  96. package/dist/locales/4.3.56/flow/fr.js +0 -1
  97. package/dist/locales/4.3.56/flow/id.js +0 -1
  98. package/dist/locales/4.3.56/flow/it.js +0 -1
  99. package/dist/locales/4.3.56/flow/ja.js +0 -1
  100. package/dist/locales/4.3.56/flow/ko.js +0 -1
  101. package/dist/locales/4.3.56/flow/nl.js +0 -1
  102. package/dist/locales/4.3.56/flow/pl.js +0 -1
  103. package/dist/locales/4.3.56/flow/pt-br.js +0 -1
  104. package/dist/locales/4.3.56/flow/tr.js +0 -1
  105. package/dist/locales/4.3.56/flow/zh.js +0 -1
  106. package/dist/order-totals-5X0jD77w.js +0 -151
  107. package/dist/promo-BNwWtZjP.js +0 -37
  108. /package/dist/locales/{4.3.56 → 4.3.58}/main/de.js +0 -0
  109. /package/dist/locales/{4.3.56 → 4.3.58}/main/es.js +0 -0
  110. /package/dist/locales/{4.3.56 → 4.3.58}/main/fr.js +0 -0
  111. /package/dist/locales/{4.3.56 → 4.3.58}/main/id.js +0 -0
  112. /package/dist/locales/{4.3.56 → 4.3.58}/main/it.js +0 -0
  113. /package/dist/locales/{4.3.56 → 4.3.58}/main/ja.js +0 -0
  114. /package/dist/locales/{4.3.56 → 4.3.58}/main/ko.js +0 -0
  115. /package/dist/locales/{4.3.56 → 4.3.58}/main/nl.js +0 -0
  116. /package/dist/locales/{4.3.56 → 4.3.58}/main/pl.js +0 -0
  117. /package/dist/locales/{4.3.56 → 4.3.58}/main/pt-br.js +0 -0
  118. /package/dist/locales/{4.3.56 → 4.3.58}/main/tr.js +0 -0
  119. /package/dist/locales/{4.3.56 → 4.3.58}/main/zh.js +0 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * ADD-ONS ON A CART THAT IS ALREADY BEING PAID FOR (MIC-4326).
3
+ *
4
+ * Why this is not `updateCartQuantities`. The cart PUT carries only
5
+ * `quantities` / `donationAmounts` — there is no add-on field on it — and
6
+ * orders-service guards that route with `rejectIfPriced`, which refuses every
7
+ * mutation of a cart holding a PaymentIntent. `initializeStripePayment()` runs on
8
+ * checkout MOUNT, so on the checkout page the cart always has one. A PUT from
9
+ * here would 409 every time.
10
+ *
11
+ * `POST /cart/:uuid/add-ons` is the gift-card door instead: it reprices rather
12
+ * than refusing — cancelling the stale PaymentIntent so a secret priced without
13
+ * the t-shirt can never be confirmed — and tells us whether it did.
14
+ *
15
+ * NO BUYER-FACING COPY IN THIS FILE, deliberately: VC's l10n gates do not scan
16
+ * `api/*.ts`, so a hardcoded English sentence here would ship untranslated and
17
+ * unnoticed. Refusals are surfaced one of two ways — the SERVER's own message
18
+ * (which is already buyer-readable and localisation-free in the sense that it
19
+ * names the operator's own product: "Tour t-shirt just sold out"), or, when there
20
+ * is none, a `null` that the calling component renders from its own labels.
21
+ */
22
+ /** One add-on line as the cart now holds it. Money is CENTS, as everywhere add-ons are. */
23
+ export interface CartAddOnLine {
24
+ addOnId: number;
25
+ name: string;
26
+ quantity: number;
27
+ priceCents: number;
28
+ lineTotalCents: number;
29
+ }
30
+ export interface CartAddOnsResult {
31
+ success: boolean;
32
+ /**
33
+ * The server's refusal sentence, when it gave one. `null` means "no usable
34
+ * message" and the caller must fall back to its own labelled copy.
35
+ */
36
+ error: string | null;
37
+ lines: CartAddOnLine[];
38
+ addOnQuantity: number;
39
+ /**
40
+ * THE FIELD THE CALLER CANNOT SKIP. True means the cart's PaymentIntent was
41
+ * thrown away and a fresh one must be minted before the buyer can pay.
42
+ * Inferring this from "no error" would either strand the buyer against a dead
43
+ * secret or re-mint a perfectly good intent for nothing.
44
+ *
45
+ * False on an unchanged cart (an identical re-send short-circuits server-side)
46
+ * and false on failure, because nothing was repriced.
47
+ */
48
+ repriced: boolean;
49
+ }
50
+ /**
51
+ * Set the add-ons on an existing cart.
52
+ *
53
+ * ABSOLUTE, NOT A DELTA — the map is the desired end state ("2 tees"), matching
54
+ * `addOnQuantities` on cart-create. A delta cannot be retried safely: a dropped
55
+ * response leaves us unable to tell whether an increment landed, and re-sending
56
+ * buys a second shirt. The buyer's retry here is a finger on a `+` button, so
57
+ * idempotence is not theoretical.
58
+ *
59
+ * An EMPTY map removes every add-on; there is no separate delete call.
60
+ */
61
+ export declare function updateCartAddOns(cartId: string, quantities: Record<string | number, number>): Promise<CartAddOnsResult>;
@@ -30,14 +30,16 @@
30
30
  * ```
31
31
  */
32
32
  export { configureApi, getApiConfig, getPublicBaseUrl, getLegacyPublicUrl, getOrdersV2Url, getClientIP, apiGet, apiPost, apiPut, apiDelete, } from './client.js';
33
- export { createPaymentIntent, validatePaymentIntent, updateCartQuantities, getCartByUUID, createOrder, getOrder, completeReservation, cancelReservation, extendCheckoutSession, getSessionStatus, initiateOrder, trackUTMSource, } from './orders.js';
34
- export type { CartReservationView, CartView } from './orders.js';
33
+ export { createPaymentIntent, submitCheckoutAnswers, validatePaymentIntent, updateCartQuantities, getCartByUUID, createOrder, getOrder, completeReservation, cancelReservation, extendCheckoutSession, getSessionStatus, initiateOrder, trackUTMSource, } from './orders.js';
34
+ export type { CartReservationView, CartView, CheckoutAnswersResult, } from './orders.js';
35
35
  export { validatePromoCode, hasPromoCodes, applyPromoCode, removePromoCode, } from './promo.js';
36
36
  export { fetchEventDetails, fetchEventTickets, fetchEventPerformers, fetchAllVenues, fetchVenueEvents, getMonthEvents, getOrgMonthEvents, getSeriesOccurrences, fetchSeriesOccurrences, fetchPublicCollection, resolvePublicEntity, checkEventPassword, checkCollectionPassword, testNetworkConnection, fetchEventDetailsResult, fetchEventTicketsResult, fetchEventPerformersResult, fetchAllVenuesResult, fetchVenueEventsResult, getMonthEventsResult, getOrgMonthEventsResult, getSeriesOccurrencesResult, fetchSeriesOccurrencesResult, } from './events.js';
37
37
  export { ok, err, errNotFound, isOk, isErr, unwrapOr, type Result, } from './result.js';
38
38
  export { getVenue, getVenueFees, getVenueBySlug, hasPublishedSite, } from './venues.js';
39
39
  export { createGiftCardPurchase, applyGiftCard, removeGiftCard, completeGiftCardPayment, } from './gift-cards.js';
40
40
  export type { GiftCardPurchaseRequest, GiftCardPurchaseResponse, ApplyGiftCardResult, RemoveGiftCardResult, CompleteGiftCardPaymentInput, CompleteGiftCardPaymentResult, } from './gift-cards.js';
41
+ export { updateCartAddOns } from './cart-addons.js';
42
+ export type { CartAddOnLine, CartAddOnsResult } from './cart-addons.js';
41
43
  export { joinWaitlist, getWaitlistStatus, validateWaitlistToken, requeueWaitlistToFront, formatWaitlistWindow, } from './waitlist.js';
42
44
  export type { JoinWaitlistResult, WaitlistStatusResult, ValidateWaitlistTokenResult, RequeueWaitlistResult, } from './waitlist.js';
43
45
  export { computeCtaState } from './cta.js';
@@ -26,6 +26,54 @@ export interface FreeOrderBuyer {
26
26
  mailingList?: boolean;
27
27
  }
28
28
  export declare function createPaymentIntent(cartId: string, quantities: Record<string | number, number>, donationAmounts?: Record<string | number, number>, buyer?: FreeOrderBuyer, uiLocale?: string): Promise<PaymentIntentResponse | null>;
29
+ /** What the server said about a submission's checkout answers. */
30
+ export interface CheckoutAnswersResult {
31
+ /**
32
+ * The venue's refusal, worded by the SERVER, or null when there was none.
33
+ *
34
+ * It NAMES the missing field, which is why it is carried as the message
35
+ * itself rather than as a boolean the caller then has to write copy for: a
36
+ * house string would put the buyer in front of a checkout that refuses
37
+ * without saying what is wrong. Truthiness is the whole contract -- a caller
38
+ * that finds a string here must not charge.
39
+ */
40
+ refusal: string | null;
41
+ /**
42
+ * The PaymentIntent this cart is payable against, when nothing was refused.
43
+ * The caller compares it with the secret its Stripe element is mounted on.
44
+ */
45
+ clientSecret?: string;
46
+ }
47
+ /**
48
+ * Put the buyer's checkout answers in front of the server on the CARD path,
49
+ * before anything is charged.
50
+ *
51
+ * WHY THIS CALL EXISTS. The venue's `requiredPhoneAtCheckout` /
52
+ * `requiredCustomCheckout` flags are enforced in orders-service, and that guard
53
+ * fires on any payment-intent request that identifies the buyer. The card path
54
+ * never made such a request: the PaymentIntent is minted on checkout MOUNT,
55
+ * deliberately anonymous so no order is created before the buyer has typed
56
+ * anything, and nothing after it is refusable -- ValidatePaymentIntent runs
57
+ * against a PaymentIntent Stripe has already reported `succeeded`, so a refusal
58
+ * there would take the money and withhold the ticket. PaymentIntent creation is
59
+ * the last door, so the answers are sent to it, and the server's existing guard
60
+ * then covers the card path with no change on its side.
61
+ *
62
+ * SENT UNCONDITIONALLY, not gated on the widget's own reading of the flags. The
63
+ * point is that the SERVER decides; a client that only calls when it already
64
+ * believes a field is required is back to the form being the only gate.
65
+ *
66
+ * SAFE TO REPEAT. The Stripe idempotency key orders-service derives covers every
67
+ * charge-determining field (amount, fees, destination, promo, gift card, reprice
68
+ * generation) and no buyer field, so an unchanged cart resolves to the SAME
69
+ * PaymentIntent and the mounted Stripe element stays valid. `clientSecret` is
70
+ * handed back anyway so the caller can assert that rather than assume it.
71
+ *
72
+ * FAILS OPEN on anything that is not the explicit refusal -- a network blip must
73
+ * not block a checkout that would otherwise have gone through, the same way the
74
+ * server's own guard lets an unreadable venue pass.
75
+ */
76
+ export declare function submitCheckoutAnswers(cartId: string, quantities: Record<string | number, number>, donationAmounts: Record<string | number, number> | undefined, buyer: FreeOrderBuyer, uiLocale?: string): Promise<CheckoutAnswersResult>;
29
77
  /**
30
78
  * Fetch an existing cart by UUID (cross-device pre-fill — §1.3).
31
79
  *
@@ -40,7 +40,7 @@ declare function vcFormatVenueAddress(venue: Venue): string;
40
40
  /**
41
41
  * The venue's checkout settings, as the checkout form needs them.
42
42
  *
43
- * These four keys describe what the checkout asks a buyer for, so the ONLY
43
+ * These five keys describe what the checkout asks a buyer for, so the ONLY
44
44
  * consumer is CheckoutForm — every EventData shaper pulls them off whatever
45
45
  * venue block its payload carries and hands them down. Kept here, beside
46
46
  * extractVenueFees, because they are venue config read out of a raw venue
@@ -53,6 +53,18 @@ declare function vcFormatVenueAddress(venue: Venue): string;
53
53
  * anyway — the widget is pinned by version and runs against whatever API the
54
54
  * host site's embed reaches, so it must not depend on the payload being current.
55
55
  *
56
+ * BOTH require-flags are DEPENDENT fields and both are re-derived here, never
57
+ * passed through raw. The raw columns can contradict each other (a row written
58
+ * before the operator form grew its own guard, a CSV import, an operator who
59
+ * ticked "require" and then blanked the question), and the rule the server
60
+ * enforces in orders-service `CheckoutSettings()` is the one that matters:
61
+ * NEVER DEMAND AN ANSWER TO A FIELD THE STOREFRONT DOES NOT RENDER. So
62
+ * `requiredPhoneAtCheckout` dies with `ask`, and `requiredCustomCheckout` dies
63
+ * with the normalized `hasCustomCheckout` — which is itself already false
64
+ * unless there is a non-blank prompt to show. Read the raw flag instead and a
65
+ * stale require=true/prompt='' row gives the buyer an unsatisfiable form: an
66
+ * error about a question that is not on the page.
67
+ *
56
68
  * A MISSING key defaults to "ask for a phone, don't require it, ask nothing
57
69
  * else": the least surprising checkout, and the one a payload that predates
58
70
  * these keys should still produce.
@@ -61,6 +73,7 @@ declare function vcExtractVenueCheckoutSettings(raw: unknown): {
61
73
  askForPhoneAtCheckout: boolean;
62
74
  requiredPhoneAtCheckout: boolean;
63
75
  hasCustomCheckout: boolean;
76
+ requiredCustomCheckout: boolean;
64
77
  questionPrompt: string | undefined;
65
78
  };
66
79
  export { vcExtractVenueFees as extractVenueFees, vcExtractVenueCheckoutSettings as extractVenueCheckoutSettings, vcFormatVenueAddress as formatVenueAddress, };