@nok-integration/storefront-react 0.13.0 → 0.14.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/dist/index.d.ts +79 -0
- package/dist/index.mjs +867 -477
- package/dist/standalone/storefront.mjs +867 -477
- package/dist/standalone/styles.css +349 -0
- package/dist/styles.css +349 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2039,6 +2039,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2039
2039
|
headline: string;
|
|
2040
2040
|
item_count: number;
|
|
2041
2041
|
image?: string | undefined;
|
|
2042
|
+
images?: string[] | undefined;
|
|
2042
2043
|
}[];
|
|
2043
2044
|
}>;
|
|
2044
2045
|
get: (orderRef: string) => Promise<{
|
|
@@ -2524,6 +2525,27 @@ export declare type Navigate = (to: ShopRoute) => void;
|
|
|
2524
2525
|
*/
|
|
2525
2526
|
export declare type OnEvent = (event: ShopEvent) => void;
|
|
2526
2527
|
|
|
2528
|
+
/**
|
|
2529
|
+
* The fan's orders (Figma `mobile/order/list`, ADR-0015).
|
|
2530
|
+
*
|
|
2531
|
+
* Read-only, like the detail screen it links to. Cancellation and returns are DAZN's under
|
|
2532
|
+
* ADR-0008, so the design's return states have no data behind them — see
|
|
2533
|
+
* {@link OrderStatusBadge}.
|
|
2534
|
+
*
|
|
2535
|
+
* Scoped to the session at the engine: `GET /v1/orders` takes no customer parameter, so
|
|
2536
|
+
* there is no identifier a caller could supply to read somebody else's history.
|
|
2537
|
+
*/
|
|
2538
|
+
export declare function OrderListView(props: OrderListViewProps): JSX.Element;
|
|
2539
|
+
|
|
2540
|
+
export declare interface OrderListViewProps {
|
|
2541
|
+
/** Opens one order. Without it the rows render as static cards rather than dead links. */
|
|
2542
|
+
onOpenOrder?: (orderRef: string) => void;
|
|
2543
|
+
/** The empty state's call to action — the design's "Find my fit" button. */
|
|
2544
|
+
onStartShopping?: () => void;
|
|
2545
|
+
/** Overrides the provider's locale for dates. */
|
|
2546
|
+
locale?: string;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2527
2549
|
/**
|
|
2528
2550
|
* One row of the timeline.
|
|
2529
2551
|
*
|
|
@@ -2554,6 +2576,21 @@ declare const OrderProgressEntry: z.ZodObject<{
|
|
|
2554
2576
|
|
|
2555
2577
|
declare type OrderProgressEntry = z.infer<typeof OrderProgressEntry>;
|
|
2556
2578
|
|
|
2579
|
+
/**
|
|
2580
|
+
* A step in the fan-facing progress timeline.
|
|
2581
|
+
*
|
|
2582
|
+
* Deliberately NOT the warehouse status enum. That has eight values a picker acts on
|
|
2583
|
+
* (`received`, `allocated`, `picking`, `packed`, …) and a fan neither sees nor benefits
|
|
2584
|
+
* from the difference between them. The engine collapses them; this is the collapsed form.
|
|
2585
|
+
*
|
|
2586
|
+
* The set is open-ended on purpose — `out_for_delivery` exists only when a carrier tells us
|
|
2587
|
+
* so, and a market with collection would add a step. A consumer must render the steps it is
|
|
2588
|
+
* given, in order, and must not assume a fixed count.
|
|
2589
|
+
*/
|
|
2590
|
+
declare const OrderProgressStep: z.ZodEnum<["packing", "on_its_way", "out_for_delivery", "delivered", "cancelled"]>;
|
|
2591
|
+
|
|
2592
|
+
declare type OrderProgressStep = z.infer<typeof OrderProgressStep>;
|
|
2593
|
+
|
|
2557
2594
|
/**
|
|
2558
2595
|
* Fulfilment order status. Lives here (not in a synchronous order contract) because the
|
|
2559
2596
|
* engine no longer owns orders (ADR-0008) — order/fulfilment status reaches us only as
|
|
@@ -2563,6 +2600,12 @@ declare const OrderStatus: z.ZodEnum<["confirmed", "packed", "shipped", "deliver
|
|
|
2563
2600
|
|
|
2564
2601
|
declare type OrderStatus = z.infer<typeof OrderStatus>;
|
|
2565
2602
|
|
|
2603
|
+
export declare function OrderStatusBadge({ status }: OrderStatusBadgeProps): JSX.Element;
|
|
2604
|
+
|
|
2605
|
+
export declare interface OrderStatusBadgeProps {
|
|
2606
|
+
status: OrderProgressStep;
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2566
2609
|
/**
|
|
2567
2610
|
* The pricing breakdown. DISPLAY ONLY — every value is server-authoritative; the UI
|
|
2568
2611
|
* never sums or computes anything here.
|
|
@@ -3423,6 +3466,42 @@ export declare interface ShopLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnc
|
|
|
3423
3466
|
children: ReactNode;
|
|
3424
3467
|
}
|
|
3425
3468
|
|
|
3469
|
+
/**
|
|
3470
|
+
* The header's overflow menu (Figma `Settings`, 636:51006).
|
|
3471
|
+
*
|
|
3472
|
+
* A light card anchored under the bar, over a scrim, with a close control and three rows.
|
|
3473
|
+
*
|
|
3474
|
+
* **A row with no handler renders and does nothing.** That is a deliberate exception to
|
|
3475
|
+
* the rule this package follows everywhere else — `ShopHeader` omits its own menu button
|
|
3476
|
+
* unless a host supplies `onMenu`, precisely because a control that opens nothing is worse
|
|
3477
|
+
* than none. It is made here on instruction, so the menu matches the design in full while
|
|
3478
|
+
* two of its three destinations do not yet exist on either side: code redemption has no
|
|
3479
|
+
* mechanism in the commerce API at all, and help belongs to DAZN. An inert row is still
|
|
3480
|
+
* marked `aria-disabled`, so a screen reader is told what a sighted fan discovers by
|
|
3481
|
+
* tapping, rather than announcing a link to nowhere as though it worked.
|
|
3482
|
+
*/
|
|
3483
|
+
export declare function ShopMenuSheet({ open, onClose, onManageOrders, onRedeemCode, onHelp, closeLabel, label, }: ShopMenuSheetProps): JSX.Element | null;
|
|
3484
|
+
|
|
3485
|
+
export declare interface ShopMenuSheetProps {
|
|
3486
|
+
open: boolean;
|
|
3487
|
+
onClose: () => void;
|
|
3488
|
+
/**
|
|
3489
|
+
* The fan's orders. Ours since [ADR-0015]; wire it to wherever the host renders
|
|
3490
|
+
* `OrderListView`.
|
|
3491
|
+
*/
|
|
3492
|
+
onManageOrders?: () => void;
|
|
3493
|
+
/**
|
|
3494
|
+
* Code redemption. **Nothing in the commerce API can redeem a code** — promotions are
|
|
3495
|
+
* DAZN's, and the row is inert until they give us somewhere to send it.
|
|
3496
|
+
*/
|
|
3497
|
+
onRedeemCode?: () => void;
|
|
3498
|
+
/** Help. DAZN's own surface, so a host that has one passes it here. */
|
|
3499
|
+
onHelp?: () => void;
|
|
3500
|
+
closeLabel?: string;
|
|
3501
|
+
/** Accessible name for the dialog itself; it has no visible title in the design. */
|
|
3502
|
+
label?: string;
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3426
3505
|
/**
|
|
3427
3506
|
* The public surface DAZN programs against. Everything here is a **contract**, not an
|
|
3428
3507
|
* implementation detail — see the versioning policy in the component SDK specification.
|