@nok-integration/storefront-react 0.19.10 → 0.19.15
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 +92 -12
- package/dist/index.mjs +735 -630
- package/dist/standalone/storefront.mjs +735 -630
- package/dist/standalone/styles.css +216 -196
- package/dist/styles.css +216 -196
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2503,6 +2503,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2503
2503
|
cta: string;
|
|
2504
2504
|
image?: string | undefined;
|
|
2505
2505
|
target?: string | undefined;
|
|
2506
|
+
video?: string | undefined;
|
|
2506
2507
|
focal_y?: number | undefined;
|
|
2507
2508
|
}[];
|
|
2508
2509
|
}>;
|
|
@@ -2858,6 +2859,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2858
2859
|
amount: number;
|
|
2859
2860
|
currency: string;
|
|
2860
2861
|
} | undefined;
|
|
2862
|
+
returned_qty?: number | undefined;
|
|
2861
2863
|
}[];
|
|
2862
2864
|
totals: {
|
|
2863
2865
|
shipping: {
|
|
@@ -2951,6 +2953,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2951
2953
|
amount: number;
|
|
2952
2954
|
currency: string;
|
|
2953
2955
|
} | undefined;
|
|
2956
|
+
returned_qty?: number | undefined;
|
|
2954
2957
|
}[];
|
|
2955
2958
|
totals: {
|
|
2956
2959
|
shipping: {
|
|
@@ -3729,6 +3732,20 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
3729
3732
|
*/
|
|
3730
3733
|
cancelled_qty: z.ZodNumber;
|
|
3731
3734
|
refunded_qty: z.ZodNumber;
|
|
3735
|
+
/**
|
|
3736
|
+
* Units already reported as coming back.
|
|
3737
|
+
*
|
|
3738
|
+
* **The returns screen cannot compute what is left without it, and got it wrong.** The
|
|
3739
|
+
* engine refuses a return of more than `qty - cancelled_qty - refunded_qty - returned_qty`
|
|
3740
|
+
* (`returns.service`), and this was the only one of those four not on the wire — so a
|
|
3741
|
+
* line returned in full still offered its full quantity, and choosing it answered 400
|
|
3742
|
+
* `invalid_request` with "Only 0 of line_1 can be returned". Seen on UAT order 611887,
|
|
3743
|
+
* 28 Aug.
|
|
3744
|
+
*
|
|
3745
|
+
* Optional so an engine that predates it stays valid; absent means zero, which is what a
|
|
3746
|
+
* consumer already assumed.
|
|
3747
|
+
*/
|
|
3748
|
+
returned_qty: z.ZodOptional<z.ZodNumber>;
|
|
3732
3749
|
}, "strip", z.ZodTypeAny, {
|
|
3733
3750
|
sku: string;
|
|
3734
3751
|
qty: number;
|
|
@@ -3750,6 +3767,7 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
3750
3767
|
title?: string | undefined;
|
|
3751
3768
|
image?: string | undefined;
|
|
3752
3769
|
attributes?: Record<string, string> | undefined;
|
|
3770
|
+
returned_qty?: number | undefined;
|
|
3753
3771
|
}, {
|
|
3754
3772
|
sku: string;
|
|
3755
3773
|
qty: number;
|
|
@@ -3771,6 +3789,7 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
3771
3789
|
title?: string | undefined;
|
|
3772
3790
|
image?: string | undefined;
|
|
3773
3791
|
attributes?: Record<string, string> | undefined;
|
|
3792
|
+
returned_qty?: number | undefined;
|
|
3774
3793
|
}>, "many">;
|
|
3775
3794
|
ship_to: z.ZodObject<{
|
|
3776
3795
|
name: z.ZodString;
|
|
@@ -3951,6 +3970,7 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
3951
3970
|
title?: string | undefined;
|
|
3952
3971
|
image?: string | undefined;
|
|
3953
3972
|
attributes?: Record<string, string> | undefined;
|
|
3973
|
+
returned_qty?: number | undefined;
|
|
3954
3974
|
}[];
|
|
3955
3975
|
totals: {
|
|
3956
3976
|
shipping: {
|
|
@@ -4037,6 +4057,7 @@ declare const OrderDetail: z.ZodObject<{
|
|
|
4037
4057
|
title?: string | undefined;
|
|
4038
4058
|
image?: string | undefined;
|
|
4039
4059
|
attributes?: Record<string, string> | undefined;
|
|
4060
|
+
returned_qty?: number | undefined;
|
|
4040
4061
|
}[];
|
|
4041
4062
|
totals: {
|
|
4042
4063
|
shipping: {
|
|
@@ -4241,20 +4262,27 @@ export declare interface OrderTimelineProps {
|
|
|
4241
4262
|
}
|
|
4242
4263
|
|
|
4243
4264
|
/**
|
|
4244
|
-
* Order tracking (Figma `order stats`,
|
|
4265
|
+
* Order tracking (Figma `order stats`, 5993:30258).
|
|
4245
4266
|
*
|
|
4246
4267
|
* One screen with three states, and the engine's `progress` is what draws them: the widget
|
|
4247
4268
|
* says where the parcel is, and everything under it is the same for all three.
|
|
4248
4269
|
*
|
|
4249
4270
|
* The first state carries a "Cancel order" button and the last offers a return.
|
|
4250
|
-
* Cancelling happens in place, through the reason sheet; a return is three screens,
|
|
4251
|
-
*
|
|
4252
|
-
* hand it on, and nothing here computes or settles a refund.
|
|
4271
|
+
* Cancelling happens in place, through the reason sheet; a return is three screens, and
|
|
4272
|
+
* they open in place too unless the host has a route of its own. **Neither moves money** —
|
|
4273
|
+
* both record a request and hand it on, and nothing here computes or settles a refund.
|
|
4253
4274
|
*
|
|
4254
4275
|
* Both are drawn on the ENGINE's say-so — `can_cancel` is its dispatch cut-off,
|
|
4255
4276
|
* `can_return` its returns window. Neither is a status this screen can infer, and it does
|
|
4256
4277
|
* not try.
|
|
4257
4278
|
*
|
|
4279
|
+
* **The return is offered in ONE place, and it is the "Start a return" row.** `order stats`
|
|
4280
|
+
* draws no button under the timeline; the `Return flow` section's own entry frame
|
|
4281
|
+
* (`5304:76852`) draws that button and no help block at all. The two disagree, and this
|
|
4282
|
+
* screen belongs to `order stats` — the same rule that makes "Order placed" ignore the
|
|
4283
|
+
* "Estimated delivery 22-27 Aug" headline that `Cancel flow` gives it. A screen that
|
|
4284
|
+
* exists only inside a flow, like the cancelled state below, follows that flow's section.
|
|
4285
|
+
*
|
|
4258
4286
|
* "Contact support" is different again: the form behind it is DAZN's, but the row has
|
|
4259
4287
|
* somewhere to go without them wiring anything, because pressing it raises
|
|
4260
4288
|
* `support_requested`.
|
|
@@ -4270,15 +4298,14 @@ export declare interface OrderTrackingViewProps {
|
|
|
4270
4298
|
/** Overrides the provider's locale for dates. */
|
|
4271
4299
|
locale?: string;
|
|
4272
4300
|
/**
|
|
4273
|
-
* Open the return flow.
|
|
4301
|
+
* Open the return flow on a route of your own.
|
|
4274
4302
|
*
|
|
4275
|
-
* Optional.
|
|
4276
|
-
*
|
|
4277
|
-
*
|
|
4278
|
-
* there.
|
|
4303
|
+
* Optional. Pass it and you own the trip: point it at `<ReturnFlowView>` with this
|
|
4304
|
+
* order's reference. Omit it and the flow opens in place on this screen, the way
|
|
4305
|
+
* cancelling opens its reason sheet.
|
|
4279
4306
|
*
|
|
4280
|
-
*
|
|
4281
|
-
*
|
|
4307
|
+
* Either way the control is drawn whenever the engine sends `can_return`, so the frame's
|
|
4308
|
+
* "Start a return" row is there for a fan whether you route it or not.
|
|
4282
4309
|
*/
|
|
4283
4310
|
onStartReturn?: () => void;
|
|
4284
4311
|
/**
|
|
@@ -5763,6 +5790,51 @@ export declare interface ShopSurfaceProps extends Omit<ComponentPropsWithoutRef<
|
|
|
5763
5790
|
|
|
5764
5791
|
export declare type ShopTone = 'dark' | 'light';
|
|
5765
5792
|
|
|
5793
|
+
/**
|
|
5794
|
+
* Full-bleed background video: muted, looping, inline, and never showing a control.
|
|
5795
|
+
*
|
|
5796
|
+
* The four attributes below are not stylistic. `muted` and `playsInline` together are the
|
|
5797
|
+
* only combination iOS will start without a gesture — a video that is unmuted, or that is
|
|
5798
|
+
* allowed to go fullscreen, simply does not play, and the panel shows its poster forever.
|
|
5799
|
+
* `loop` is the brief. `controls` is absent because this is artwork behind copy, not a
|
|
5800
|
+
* player: a tap belongs to the CTA stretched over the panel, and a play button in the
|
|
5801
|
+
* middle of a category slide would sit directly on that hit area.
|
|
5802
|
+
*
|
|
5803
|
+
* **Playback follows visibility.** The shop entry is five full-screen panels, so a naive
|
|
5804
|
+
* page decodes five simultaneous streams for four panels nobody is looking at. Each clip
|
|
5805
|
+
* starts when its panel comes into view and pauses when it leaves, which keeps one video
|
|
5806
|
+
* decoding at a time. Fetching is deferred the same way: `preload="none"` until the
|
|
5807
|
+
* observer fires, so a fan who never scrolls past the hero pays for the hero alone.
|
|
5808
|
+
*
|
|
5809
|
+
* **Reduced motion is honoured by not playing at all.** Autoplaying background video is
|
|
5810
|
+
* exactly what the preference is about, and there is a good still to fall back to — the
|
|
5811
|
+
* poster is frame 0 of the clip, so the panel is the design's own opening frame rather
|
|
5812
|
+
* than an empty box. The preference is read live rather than once: a fan can change it
|
|
5813
|
+
* while the page is open, and on iOS it changes with the low-power setting.
|
|
5814
|
+
*/
|
|
5815
|
+
export declare function ShopVideo({ src, poster, fill, className, style, priority, }: ShopVideoProps): JSX.Element;
|
|
5816
|
+
|
|
5817
|
+
export declare interface ShopVideoProps {
|
|
5818
|
+
src: string;
|
|
5819
|
+
/**
|
|
5820
|
+
* Still shown until the first frame decodes, and the only thing shown when motion is
|
|
5821
|
+
* reduced. Cut from frame 0 of `src` so there is no jump when playback starts.
|
|
5822
|
+
*/
|
|
5823
|
+
poster?: string;
|
|
5824
|
+
/**
|
|
5825
|
+
* Fill the positioned ancestor, as `ShopImage`'s `fill` does. The parent must be
|
|
5826
|
+
* `position: relative` (or absolute/fixed) — same requirement, same reason.
|
|
5827
|
+
*/
|
|
5828
|
+
fill?: boolean;
|
|
5829
|
+
className?: string;
|
|
5830
|
+
style?: CSSProperties;
|
|
5831
|
+
/**
|
|
5832
|
+
* Above the fold. Fetches the file immediately instead of waiting for the panel to come
|
|
5833
|
+
* into view. One video per screen should carry this; the rest should not.
|
|
5834
|
+
*/
|
|
5835
|
+
priority?: boolean;
|
|
5836
|
+
}
|
|
5837
|
+
|
|
5766
5838
|
/**
|
|
5767
5839
|
* Sizing help, shown in the PDP "Size guide" overlay (Figma `size-guide`, 4882:58365).
|
|
5768
5840
|
*
|
|
@@ -5889,7 +5961,7 @@ export declare function sizeOptions(variants: ProductVariant[], colour?: string
|
|
|
5889
5961
|
* choice the parent flips `error` and the message + scroll target appear (buttons stay
|
|
5890
5962
|
* enabled per the design note). Chips are a real radiogroup for keyboard + SR support.
|
|
5891
5963
|
*/
|
|
5892
|
-
export declare function SizeSelector({ sizes, selected, onSelect, error, guide, }: SizeSelectorProps): JSX.Element;
|
|
5964
|
+
export declare function SizeSelector({ sizes, selected, onSelect, error, lowStock, guide, }: SizeSelectorProps): JSX.Element;
|
|
5893
5965
|
|
|
5894
5966
|
export declare interface SizeSelectorProps {
|
|
5895
5967
|
sizes: SizeOption[];
|
|
@@ -5898,6 +5970,14 @@ export declare interface SizeSelectorProps {
|
|
|
5898
5970
|
onSelect: (value: string) => void;
|
|
5899
5971
|
/** Show the "select a size" error (set after Add-to-cart is tapped with no selection). */
|
|
5900
5972
|
error?: boolean;
|
|
5973
|
+
/**
|
|
5974
|
+
* "Only 1 left in M size", when the selected size is nearly gone.
|
|
5975
|
+
*
|
|
5976
|
+
* Rendered here rather than by the caller because the frame's `low-stock` layer lives
|
|
5977
|
+
* INSIDE `mobile/pdp/size`, in the same slot as the error above it — the count is per
|
|
5978
|
+
* size, so it belongs under the squares it is about.
|
|
5979
|
+
*/
|
|
5980
|
+
lowStock?: string;
|
|
5901
5981
|
/**
|
|
5902
5982
|
* Category-wide sizing help. Absent = the control is not rendered at all, rather than
|
|
5903
5983
|
* opening an empty overlay — until DAZN supplies a measurement chart most categories
|