@dropins/storefront-cart 0.3.0 → 0.4.0-alpha128
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/api/getEstimatedTotals/getEstimatedTotals.d.ts +0 -1
- package/api/index.d.ts +1 -0
- package/api/initializeCart/initializeCart.d.ts +2 -0
- package/api/refreshCart/index.d.ts +2 -0
- package/api/refreshCart/refreshCart.d.ts +4 -0
- package/api.js +5 -5
- package/chunks/CartFragment.js +235 -0
- package/chunks/CartSummaryList.js +1 -0
- package/chunks/MiniCart.js +1 -1
- package/chunks/OrderSummary.js +1 -0
- package/chunks/getEstimateShipping.js +48 -0
- package/chunks/getEstimatedTotals.js +3 -50
- package/chunks/getStoreConfig.js +4 -4
- package/chunks/resetCart.js +1 -230
- package/chunks/state.js +1 -0
- package/chunks/updateProductsFromCart.js +3 -3
- package/components/Cart/Cart.d.ts +3 -3
- package/components/CartSummaryList/CartSummaryList.d.ts +12 -0
- package/components/CartSummaryList/index.d.ts +3 -0
- package/components/EstimateShipping/EstimateShipping.d.ts +20 -0
- package/components/EstimateShipping/index.d.ts +2 -0
- package/components/MiniCart/MiniCart.d.ts +0 -2
- package/components/OrderSummary/OrderSummary.d.ts +37 -0
- package/components/OrderSummary/index.d.ts +3 -0
- package/components/index.d.ts +4 -1
- package/containers/Cart/Cart.d.ts +6 -7
- package/containers/Cart.js +1 -1
- package/containers/CartSummaryList/CartSummaryList.d.ts +20 -0
- package/containers/CartSummaryList/index.d.ts +3 -0
- package/containers/CartSummaryList.d.ts +3 -0
- package/containers/CartSummaryList.js +1 -0
- package/containers/EstimateShipping/EstimateShipping.d.ts +7 -0
- package/containers/EstimateShipping/index.d.ts +3 -0
- package/containers/EstimateShipping.d.ts +3 -0
- package/containers/EstimateShipping.js +1 -0
- package/containers/MiniCart/MiniCart.d.ts +4 -1
- package/containers/MiniCart.js +1 -1
- package/containers/OrderSummary/OrderSummary.d.ts +16 -0
- package/containers/OrderSummary/index.d.ts +3 -0
- package/containers/OrderSummary.d.ts +3 -0
- package/containers/OrderSummary.js +1 -0
- package/containers/index.d.ts +3 -0
- package/data/models/cart-model.d.ts +9 -1
- package/data/models/index.d.ts +1 -0
- package/data/models/shipping-models.d.ts +16 -0
- package/data/transforms/__fixtures__/cartModel.d.ts +1 -0
- package/data/transforms/__fixtures__/productTypesData.d.ts +223 -5
- package/data/transforms/__fixtures__/storeConfig.d.ts +4 -0
- package/data/transforms/transform-shipping.d.ts +5 -0
- package/hooks/useEstimatedTotals.d.ts +2 -0
- package/i18n/en_US.json.d.ts +57 -2
- package/lib/state.d.ts +1 -0
- package/package.json +1 -1
- package/render.js +2 -2
|
@@ -27,6 +27,8 @@ export interface CartModel {
|
|
|
27
27
|
}[];
|
|
28
28
|
};
|
|
29
29
|
isGuestCart?: boolean;
|
|
30
|
+
hasOutOfStockItems?: boolean;
|
|
31
|
+
hasFullyOutOfStockItems?: boolean;
|
|
30
32
|
}
|
|
31
33
|
interface TotalPriceModifier {
|
|
32
34
|
amount: Price;
|
|
@@ -64,6 +66,12 @@ export interface Item {
|
|
|
64
66
|
recipientEmail?: string;
|
|
65
67
|
sender?: string;
|
|
66
68
|
senderEmail?: string;
|
|
69
|
+
lowInventory?: boolean;
|
|
70
|
+
insufficientQuantity?: boolean;
|
|
71
|
+
onlyXLeftInStock?: number | null;
|
|
72
|
+
outOfStock?: boolean;
|
|
73
|
+
notAvailableMessage?: string;
|
|
74
|
+
stockLevel?: String;
|
|
67
75
|
}
|
|
68
76
|
interface ItemError {
|
|
69
77
|
id: string;
|
|
@@ -73,7 +81,7 @@ interface ItemImage {
|
|
|
73
81
|
src: string;
|
|
74
82
|
alt: string;
|
|
75
83
|
}
|
|
76
|
-
interface Price {
|
|
84
|
+
export interface Price {
|
|
77
85
|
value: number;
|
|
78
86
|
currency: string;
|
|
79
87
|
}
|
package/data/models/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Price } from './cart-model';
|
|
2
|
+
|
|
3
|
+
export interface PartialAddress {
|
|
4
|
+
countryCode: string;
|
|
5
|
+
postCode?: string;
|
|
6
|
+
region?: string;
|
|
7
|
+
regionCode?: string;
|
|
8
|
+
regionId?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ShippingMethod {
|
|
11
|
+
carrierCode: string;
|
|
12
|
+
methodCode: string;
|
|
13
|
+
amountExclTax?: Price;
|
|
14
|
+
amountInclTax?: Price;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=shipping-models.d.ts.map
|
|
@@ -323,7 +323,7 @@ declare const simple: {
|
|
|
323
323
|
};
|
|
324
324
|
declare const simpleCustomizable: {
|
|
325
325
|
__typename: string;
|
|
326
|
-
customizable_options: {
|
|
326
|
+
customizable_options: ({
|
|
327
327
|
type: string;
|
|
328
328
|
customizable_option_uid: string;
|
|
329
329
|
label: string;
|
|
@@ -332,7 +332,15 @@ declare const simpleCustomizable: {
|
|
|
332
332
|
label: string;
|
|
333
333
|
value: string;
|
|
334
334
|
}[];
|
|
335
|
-
}
|
|
335
|
+
} | {
|
|
336
|
+
type: string;
|
|
337
|
+
customizable_option_uid: string;
|
|
338
|
+
label: string;
|
|
339
|
+
values: {
|
|
340
|
+
label: string;
|
|
341
|
+
value: string;
|
|
342
|
+
}[];
|
|
343
|
+
})[];
|
|
336
344
|
uid: string;
|
|
337
345
|
quantity: number;
|
|
338
346
|
errors: null;
|
|
@@ -482,7 +490,7 @@ declare const configurable: {
|
|
|
482
490
|
};
|
|
483
491
|
};
|
|
484
492
|
declare const configurableCustomizable: {
|
|
485
|
-
customizable_options: {
|
|
493
|
+
customizable_options: ({
|
|
486
494
|
type: string;
|
|
487
495
|
customizable_option_uid: string;
|
|
488
496
|
label: string;
|
|
@@ -491,7 +499,15 @@ declare const configurableCustomizable: {
|
|
|
491
499
|
label: string;
|
|
492
500
|
value: string;
|
|
493
501
|
}[];
|
|
494
|
-
}
|
|
502
|
+
} | {
|
|
503
|
+
type: string;
|
|
504
|
+
customizable_option_uid: string;
|
|
505
|
+
label: string;
|
|
506
|
+
values: {
|
|
507
|
+
label: string;
|
|
508
|
+
value: string;
|
|
509
|
+
}[];
|
|
510
|
+
})[];
|
|
495
511
|
__typename: string;
|
|
496
512
|
configurable_options: {
|
|
497
513
|
configurable_product_option_uid: string;
|
|
@@ -706,5 +722,207 @@ declare const downloadbleWithMultipleLinks: {
|
|
|
706
722
|
};
|
|
707
723
|
};
|
|
708
724
|
};
|
|
709
|
-
|
|
725
|
+
declare const simpleLowInventory: {
|
|
726
|
+
__typename: string;
|
|
727
|
+
is_available: boolean;
|
|
728
|
+
customizable_options: never[];
|
|
729
|
+
product: {
|
|
730
|
+
only_x_left_in_stock: number;
|
|
731
|
+
name: string;
|
|
732
|
+
sku: string;
|
|
733
|
+
thumbnail: {
|
|
734
|
+
url: string;
|
|
735
|
+
label: string;
|
|
736
|
+
};
|
|
737
|
+
url_key: string;
|
|
738
|
+
url_suffix: string;
|
|
739
|
+
categories: {
|
|
740
|
+
url_path: string;
|
|
741
|
+
url_key: string;
|
|
742
|
+
}[];
|
|
743
|
+
price_range: {
|
|
744
|
+
maximum_price: {
|
|
745
|
+
regular_price: {
|
|
746
|
+
value: number;
|
|
747
|
+
currency: string;
|
|
748
|
+
};
|
|
749
|
+
final_price: {
|
|
750
|
+
value: number;
|
|
751
|
+
currency: string;
|
|
752
|
+
};
|
|
753
|
+
discount: {
|
|
754
|
+
amount_off: number;
|
|
755
|
+
percent_off: number;
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
};
|
|
759
|
+
};
|
|
760
|
+
uid: string;
|
|
761
|
+
quantity: number;
|
|
762
|
+
errors: null;
|
|
763
|
+
prices: {
|
|
764
|
+
price: {
|
|
765
|
+
value: number;
|
|
766
|
+
currency: string;
|
|
767
|
+
};
|
|
768
|
+
total_item_discount: {
|
|
769
|
+
value: number;
|
|
770
|
+
currency: string;
|
|
771
|
+
};
|
|
772
|
+
row_total: {
|
|
773
|
+
value: number;
|
|
774
|
+
currency: string;
|
|
775
|
+
};
|
|
776
|
+
price_including_tax: {
|
|
777
|
+
value: number;
|
|
778
|
+
currency: string;
|
|
779
|
+
};
|
|
780
|
+
row_total_including_tax: {
|
|
781
|
+
value: number;
|
|
782
|
+
};
|
|
783
|
+
original_row_total: {
|
|
784
|
+
value: number;
|
|
785
|
+
currency: string;
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
declare const complexInsufficientQuantity: {
|
|
790
|
+
is_available: boolean;
|
|
791
|
+
not_available_message: string;
|
|
792
|
+
product: {
|
|
793
|
+
only_x_left_in_stock: number;
|
|
794
|
+
stock_status: string;
|
|
795
|
+
name: string;
|
|
796
|
+
sku: string;
|
|
797
|
+
thumbnail: {
|
|
798
|
+
url: string;
|
|
799
|
+
label: string;
|
|
800
|
+
};
|
|
801
|
+
url_key: string;
|
|
802
|
+
url_suffix: string;
|
|
803
|
+
categories: {
|
|
804
|
+
url_path: string;
|
|
805
|
+
url_key: string;
|
|
806
|
+
}[];
|
|
807
|
+
price_range: {
|
|
808
|
+
maximum_price: {
|
|
809
|
+
regular_price: {
|
|
810
|
+
value: number;
|
|
811
|
+
currency: string;
|
|
812
|
+
};
|
|
813
|
+
final_price: {
|
|
814
|
+
value: number;
|
|
815
|
+
currency: string;
|
|
816
|
+
};
|
|
817
|
+
discount: {
|
|
818
|
+
amount_off: number;
|
|
819
|
+
percent_off: number;
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
__typename: string;
|
|
825
|
+
links: {
|
|
826
|
+
title: string;
|
|
827
|
+
url: string;
|
|
828
|
+
}[];
|
|
829
|
+
uid: string;
|
|
830
|
+
quantity: number;
|
|
831
|
+
errors: null;
|
|
832
|
+
prices: {
|
|
833
|
+
price: {
|
|
834
|
+
value: number;
|
|
835
|
+
currency: string;
|
|
836
|
+
};
|
|
837
|
+
total_item_discount: {
|
|
838
|
+
value: number;
|
|
839
|
+
currency: string;
|
|
840
|
+
};
|
|
841
|
+
row_total: {
|
|
842
|
+
value: number;
|
|
843
|
+
currency: string;
|
|
844
|
+
};
|
|
845
|
+
price_including_tax: {
|
|
846
|
+
value: number;
|
|
847
|
+
currency: string;
|
|
848
|
+
};
|
|
849
|
+
row_total_including_tax: {
|
|
850
|
+
value: number;
|
|
851
|
+
};
|
|
852
|
+
original_row_total: {
|
|
853
|
+
value: number;
|
|
854
|
+
currency: string;
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
declare const complexInsufficientQuantityGeneralMessage: {
|
|
859
|
+
is_available: boolean;
|
|
860
|
+
not_available_message: string;
|
|
861
|
+
product: {
|
|
862
|
+
only_x_left_in_stock: number;
|
|
863
|
+
stock_status: string;
|
|
864
|
+
name: string;
|
|
865
|
+
sku: string;
|
|
866
|
+
thumbnail: {
|
|
867
|
+
url: string;
|
|
868
|
+
label: string;
|
|
869
|
+
};
|
|
870
|
+
url_key: string;
|
|
871
|
+
url_suffix: string;
|
|
872
|
+
categories: {
|
|
873
|
+
url_path: string;
|
|
874
|
+
url_key: string;
|
|
875
|
+
}[];
|
|
876
|
+
price_range: {
|
|
877
|
+
maximum_price: {
|
|
878
|
+
regular_price: {
|
|
879
|
+
value: number;
|
|
880
|
+
currency: string;
|
|
881
|
+
};
|
|
882
|
+
final_price: {
|
|
883
|
+
value: number;
|
|
884
|
+
currency: string;
|
|
885
|
+
};
|
|
886
|
+
discount: {
|
|
887
|
+
amount_off: number;
|
|
888
|
+
percent_off: number;
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
__typename: string;
|
|
894
|
+
links: {
|
|
895
|
+
title: string;
|
|
896
|
+
url: string;
|
|
897
|
+
}[];
|
|
898
|
+
uid: string;
|
|
899
|
+
quantity: number;
|
|
900
|
+
errors: null;
|
|
901
|
+
prices: {
|
|
902
|
+
price: {
|
|
903
|
+
value: number;
|
|
904
|
+
currency: string;
|
|
905
|
+
};
|
|
906
|
+
total_item_discount: {
|
|
907
|
+
value: number;
|
|
908
|
+
currency: string;
|
|
909
|
+
};
|
|
910
|
+
row_total: {
|
|
911
|
+
value: number;
|
|
912
|
+
currency: string;
|
|
913
|
+
};
|
|
914
|
+
price_including_tax: {
|
|
915
|
+
value: number;
|
|
916
|
+
currency: string;
|
|
917
|
+
};
|
|
918
|
+
row_total_including_tax: {
|
|
919
|
+
value: number;
|
|
920
|
+
};
|
|
921
|
+
original_row_total: {
|
|
922
|
+
value: number;
|
|
923
|
+
currency: string;
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
};
|
|
927
|
+
export { bundleOptions, bundleOptionsEmpty, giftCardPhysical, giftCardVirtual, simple, simpleCustomizable, configurable, configurableCustomizable, giftCard, downloadbleWithMultipleLinks, simpleLowInventory, complexInsufficientQuantity, complexInsufficientQuantityGeneralMessage, };
|
|
710
928
|
//# sourceMappingURL=productTypesData.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PartialAddress, ShippingMethod } from '../models';
|
|
2
|
+
|
|
3
|
+
export declare const transformPartialAddress: (data: any) => PartialAddress;
|
|
4
|
+
export declare const transformShippingMethod: (data: any) => ShippingMethod | null;
|
|
5
|
+
//# sourceMappingURL=transform-shipping.d.ts.map
|
|
@@ -2,12 +2,14 @@ export declare const useEstimatedTotals: () => {
|
|
|
2
2
|
handleEstimateTotals: (formValues: {
|
|
3
3
|
shippingCountry: string;
|
|
4
4
|
shippingState?: string;
|
|
5
|
+
shippingStateId?: number;
|
|
5
6
|
shippingZip?: string;
|
|
6
7
|
}, shippingMethods?: {
|
|
7
8
|
carrier_code: string;
|
|
8
9
|
method_code: string;
|
|
9
10
|
}) => void;
|
|
10
11
|
estimatedTotals: any;
|
|
12
|
+
setEstimatedTotals: import('preact/hooks').Dispatch<any>;
|
|
11
13
|
loading: boolean;
|
|
12
14
|
};
|
|
13
15
|
//# sourceMappingURL=useEstimatedTotals.d.ts.map
|
package/i18n/en_US.json.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"Cart": {
|
|
3
3
|
"Cart": {
|
|
4
|
-
"heading": "Shopping Cart"
|
|
4
|
+
"heading": "Shopping Cart ({count})"
|
|
5
5
|
},
|
|
6
6
|
"MiniCart": {
|
|
7
7
|
"heading": "Shopping Cart ({count})",
|
|
@@ -18,6 +18,38 @@ declare const _default: {
|
|
|
18
18
|
"taxToBeDetermined": "TBD",
|
|
19
19
|
"checkout": "Checkout",
|
|
20
20
|
"orderSummary": "Order Summary",
|
|
21
|
+
"subTotal": {
|
|
22
|
+
"label": "Subtotal",
|
|
23
|
+
"withTaxes": "Including taxes",
|
|
24
|
+
"withoutTaxes": "excluding taxes"
|
|
25
|
+
},
|
|
26
|
+
"shipping": {
|
|
27
|
+
"label": "Shipping",
|
|
28
|
+
"editZipAction": "Apply",
|
|
29
|
+
"estimated": "Estimated Shipping",
|
|
30
|
+
"estimatedDestination": "Estimated Shipping to ",
|
|
31
|
+
"destinationLinkAriaLabel": "Change destination",
|
|
32
|
+
"zipPlaceholder": "Zip Code",
|
|
33
|
+
"withTaxes": "Including taxes",
|
|
34
|
+
"withoutTaxes": "excluding taxes",
|
|
35
|
+
"alternateField": {
|
|
36
|
+
"zip": "Estimate using country/zip",
|
|
37
|
+
"state": "Estimate using country/state"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"taxes": {
|
|
41
|
+
"total": "Tax Total",
|
|
42
|
+
"totalOnly": "Tax",
|
|
43
|
+
"breakdown": "Taxes",
|
|
44
|
+
"showBreakdown": "Show Tax Breakdown",
|
|
45
|
+
"hideBreakdown": "Hide Tax Breakdown",
|
|
46
|
+
"estimated": "Estimated Tax"
|
|
47
|
+
},
|
|
48
|
+
"total": {
|
|
49
|
+
"estimated": "Estimated Total",
|
|
50
|
+
"label": "Total",
|
|
51
|
+
"withoutTax": "Total excluding taxes"
|
|
52
|
+
},
|
|
21
53
|
"estimatedShippingForm": {
|
|
22
54
|
"country": {
|
|
23
55
|
"placeholder": "Country"
|
|
@@ -42,7 +74,30 @@ declare const _default: {
|
|
|
42
74
|
"regularPrice": "Regular Price",
|
|
43
75
|
"sender": "From",
|
|
44
76
|
"file": "{count} file",
|
|
45
|
-
"files": "{count} files"
|
|
77
|
+
"files": "{count} files",
|
|
78
|
+
"lowInventory": "Only {count} left!",
|
|
79
|
+
"insufficientQuantity": "Only {inventory} of {count} in stock",
|
|
80
|
+
"insufficientQuantityGeneral": "Not enough items for sale"
|
|
81
|
+
},
|
|
82
|
+
"EstimateShipping": {
|
|
83
|
+
"label": "Shipping",
|
|
84
|
+
"editZipAction": "Apply",
|
|
85
|
+
"estimated": "Estimated Shipping",
|
|
86
|
+
"estimatedDestination": "Estimated Shipping to ",
|
|
87
|
+
"destinationLinkAriaLabel": "Change destination",
|
|
88
|
+
"zipPlaceholder": "Zip Code",
|
|
89
|
+
"withTaxes": "Including taxes",
|
|
90
|
+
"withoutTaxes": "excluding taxes",
|
|
91
|
+
"alternateField": {
|
|
92
|
+
"zip": "Estimate using country/zip",
|
|
93
|
+
"state": "Estimate using country/state"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"OutOfStockMessage": {
|
|
97
|
+
"heading": "Your cart contains items with limited stock",
|
|
98
|
+
"message": "Please adjust quantities to continue",
|
|
99
|
+
"alert": "Out of stock",
|
|
100
|
+
"action": "Remove all out of stock items from cart"
|
|
46
101
|
}
|
|
47
102
|
}
|
|
48
103
|
}
|
package/lib/state.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-cart", "version": "0.
|
|
1
|
+
{"name": "@dropins/storefront-cart", "version": "0.4.0-alpha128", "@dropins/tools": "~0.27.0"}
|
package/render.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(i,r){try{if(typeof document<"u"){const a=document.createElement("style"),n=r.styleId;for(const t in r.attributes)a.setAttribute(t,r.attributes[t]);a.setAttribute("data-dropin",n),a.appendChild(document.createTextNode(i));const e=document.querySelector('style[data-dropin="sdk"]');if(e)e.after(a);else{const t=document.querySelector('link[rel="stylesheet"], style');t?t.before(a):document.head.append(a)}}}catch(a){console.error("dropin-styles (injectCodeFunction)",a)}})(".cart-
|
|
2
|
-
import{deepmerge as
|
|
1
|
+
(function(i,r){try{if(typeof document<"u"){const a=document.createElement("style"),n=r.styleId;for(const t in r.attributes)a.setAttribute(t,r.attributes[t]);a.setAttribute("data-dropin",n),a.appendChild(document.createTextNode(i));const e=document.querySelector('style[data-dropin="sdk"]');if(e)e.after(a);else{const t=document.querySelector('link[rel="stylesheet"], style');t?t.before(a):document.head.append(a)}}}catch(a){console.error("dropin-styles (injectCodeFunction)",a)}})(".cart-cart{container-type:inline-size;container-name:cart}.cart-cart__wrapper{display:grid;grid-template-rows:auto 1fr}.cart-cart__heading{display:grid;row-gap:var(--spacing-small);padding:var(--spacing-medium);padding-bottom:0;font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.cart-cart__heading-divider{width:100%;margin:0}.cart-cart__content{display:grid;grid-template-columns:1fr;padding:0 var(--spacing-medium)}.cart-cart__empty-cart{justify-self:center;align-self:center;width:100%;max-width:800px}.dropin-price-summary__shipping--zip,.dropin-price-summary__shipping--state{background-color:var(--color-neutral-50)}@container cart (width >= 1024px){.cart-cart__wrapper{grid-template-columns:repeat(var(--grid-3-columns),1fr);grid-column-gap:var(--grid-3-gutters);margin:0 var(--grid-3-margins)}.cart-cart__heading{padding:var(--spacing-small) 0 0 0}.cart-cart__content{padding:var(--spacing-medium) 0}.cart-cart__heading,.cart-cart__content{grid-column:1 / span 8}.cart-cart__order-summary{grid-row:1 / span 3;grid-column:9 / span 4;height:min-content}.cart-cart__heading--full-width,.cart-cart__content--empty,.cart-cart__content--full-width{grid-column:1 / span 12}}.cart-empty-cart{container-type:inline-size;container-name:cart}.cart-empty-cart__wrapper .dropin-card--secondary{display:grid;grid-auto-rows:min-content;justify-content:center;text-align:center}@container cart (width < 737px){.cart-empty-cart__wrapper .dropin-card{border:unset;border-style:hidden}}.cart-estimate-shipping{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-xsmall);align-items:flex-end;color:var(--color-neutral-800)}.cart-estimate-shipping__label,.cart-estimate-shipping__price{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.cart-estimate-shipping__label--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-700)}.cart-estimate-shipping__price--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.cart-estimate-shipping__price{text-align:right}a.cart-estimate-shippingLink{text-decoration:underline}.cart-estimate-shipping__label--bold,.cart-estimate-shipping__price--bold{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing)}.cart-estimate-shipping__caption{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);grid-column:span 2;color:var(--color-neutral-700)}.cart-estimate-shipping--zip,.cart-estimate-shipping--state{background-color:var(--color-neutral-50)}.cart-estimate-shipping--edit{display:grid;grid-column:1 / span 2;gap:var(--spacing-small);padding-top:var(--spacing-small)}a.cart-estimate-shipping__link{text-decoration:underline}.cart-estimate-shipping--hide{display:none!important}.cart-estimate-shipping--edit button{width:var(--spacing-huge);justify-self:end}.cart-estimate-shipping--loading{opacity:.4;pointer-events:none}.cart-mini-cart{display:flex;flex-direction:column;height:100%;padding:var(--spacing-small) var(--spacing-small) var(--spacing-medium);box-sizing:border-box}.cart-mini-cart__empty-cart{width:100%;max-width:800px;height:100%;display:flex;flex-direction:column;justify-content:center;align-self:center}.cart-mini-cart__heading{display:grid;row-gap:var(--spacing-xsmall);font:var(--type-headline-2-default-font);letter-spacing:var(--type-headline-2-default-letter-spacing)}.cart-mini-cart__heading-divider{width:100%;margin:var(--spacing-xxsmall) 0 0 0}.cart-mini-cart__products{flex:1;overflow-y:auto;max-height:100%;padding-bottom:var(--spacing-medium)}.cart-mini-cart__products .dropin-cart-item__configurations li{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cart-mini-cart__footer{display:grid;grid-auto-flow:row;gap:var(--spacing-small);padding-top:var(--spacing-small);row-gap:var(--spacing-xsmall)}.cart-mini-cart__footer__estimated-total{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing);display:grid;grid-template:max-content / 1fr auto;gap:var(--spacing-xsmall)}.cart-mini-cart__footer__estimated-total-excluding-taxes{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);display:grid;grid-template:max-content / 1fr auto;gap:var(--spacing-xsmall);color:var(--color-neutral-700)}.cart-mini-cart__footer__ctas{display:grid;grid-auto-flow:row;gap:var(--spacing-xsmall);padding-top:var(--spacing-small)}.cart-cart-summary-list{container-type:inline-size;container-name:cart-summary-list}.cart-cart-summary-list__heading{display:grid;row-gap:var(--spacing-xsmall);padding:0;font:var(--type-headline-1-font);letter-spacing:var(--type-headline-1-letter-spacing);color:var(--color-neutral-800)}.cart-cart-summary-list__heading--full-width{width:100%}.cart-cart-summary-list__heading-divider{width:100%;margin:var(--spacing-xxsmall) 0 var(--spacing-medium) 0}.cart-cart-summary-list__content{display:grid;grid-template-columns:1fr;padding:0}.cart-cart-summary-list__empty-cart{justify-self:center;align-self:center;width:100%;max-width:800px}@container cart-summary-list (width >= 1024px){.cart-cart-summary-list__content,.cart-cart-summary-list__heading{grid-column:1 / span 8}.cart-cart-summary-list__heading--full-width,.cart-cart-summary-list__content--empty{grid-column:1 / span 12}.cart-cart-summary-list__content{padding:0}.cart-cart-summary-list__heading{padding:var(--spacing-medium) 0 var(--spacing-medium) 0}}.cart-order-summary{display:grid;position:relative;grid-auto-flow:row;padding:var(--spacing-medium)}.cart-order-summary__primary{background-color:var(--color-neutral-200)}.cart-order-summary__secondary{background-color:var(--color-neutral-50)}.cart-order-summary__content{display:grid;gap:var(--spacing-xsmall);margin-top:var(--spacing-small)}.cart-order-summary__heading{display:grid;font:var(--type-headline-2-strong-font);letter-spacing:var(--type-headline-2-strong-letter-spacing);color:var(--color-neutral-800);gap:var(--spacing-small)}.cart-order-summary__label,.cart-order-summary__price{font:var(--type-body-1-default-font);letter-spacing:var(--type-body-1-default-letter-spacing)}.cart-order-summary__label--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing);color:var(--color-neutral-700)}.cart-order-summary__price--muted{font:var(--type-body-2-default-font);letter-spacing:var(--type-body-2-default-letter-spacing)}.cart-order-summary__price{text-align:right}.cart-order-summary__taxes .dropin-divider:last-child{margin-bottom:0}.cart-order-summary__total{margin-top:var(--spacing-medium)}.cart-order-summary__label--bold,.cart-order-summary__price--bold{font:var(--type-body-1-emphasized-font);letter-spacing:var(--type-body-1-emphasized-letter-spacing)}.cart-order-summary__divider-primary,.cart-order-summary__divider-secondary{width:100%;margin:0}.cart-order-summary__divider-secondary{margin:0}.cart-order-summary__taxEntry.cart-order-summary__entry{margin-top:0}.cart-order-summary__entry,.cart-order-summary__taxEntry{display:grid;grid-template-columns:1fr 1fr;gap:var(--spacing-xxsmall);align-items:center;color:var(--color-neutral-800)}.cart-order-summary__caption{font:var(--type-details-caption-2-font);letter-spacing:var(--type-details-caption-2-letter-spacing);grid-column:span 2;color:var(--color-neutral-700)}.cart-order-summary__primaryAction{margin-top:var(--spacing-small);grid-template-columns:1fr}.cart-order-summary__shipping--edit{display:grid;grid-column:1 / span 2;gap:var(--spacing-small);padding-top:var(--spacing-small);padding-left:var(--spacing-small)}a.cart-order-summary__shippingLink{text-decoration:underline}.cart-order-summary__shipping--hide{display:none!important}.cart-order-summary__shipping--edit button{width:var(--spacing-huge);justify-self:end}.cart-order-summary__shipping--zip,.cart-order-summary__shipping--state{background-color:var(--color-neutral-50)}.cart-order-summary__taxes .dropin-accordion-section__content-container{gap:var(--spacing-small);margin:var(--spacing-small) 0}.cart-order-summary--loading{opacity:.4;pointer-events:none}.cart-order-summary__spinner{margin:0 auto;position:absolute;z-index:999;left:0;right:0;top:calc(50% - (var(--size) / 2));bottom:0}",{styleId:"Cart"});
|
|
2
|
+
import{jsx as n}from"@dropins/tools/preact-jsx-runtime.js";import{deepmerge as c,Render as d}from"@dropins/tools/lib.js";import{useState as u,useEffect as p}from"@dropins/tools/preact-hooks.js";import{UIProvider as m}from"@dropins/tools/components.js";import{events as g}from"@dropins/tools/event-bus.js";import"./chunks/state.js";import{c as h}from"./chunks/getStoreConfig.js";import"./chunks/CartFragment.js";import"./chunks/resetCart.js";import"@dropins/tools/fetch-graphql.js";const f={Cart:{heading:"Shopping Cart ({count})"},MiniCart:{heading:"Shopping Cart ({count})",subtotal:"Subtotal",subtotalExcludingTaxes:"Subtotal excluding taxes",cartLink:"View Cart",checkoutLink:"Checkout"},EmptyCart:{heading:"Your cart is empty",cta:"Start shopping"},PriceSummary:{taxToBeDetermined:"TBD",checkout:"Checkout",orderSummary:"Order Summary",subTotal:{label:"Subtotal",withTaxes:"Including taxes",withoutTaxes:"excluding taxes"},shipping:{label:"Shipping",editZipAction:"Apply",estimated:"Estimated Shipping",estimatedDestination:"Estimated Shipping to ",destinationLinkAriaLabel:"Change destination",zipPlaceholder:"Zip Code",withTaxes:"Including taxes",withoutTaxes:"excluding taxes",alternateField:{zip:"Estimate using country/zip",state:"Estimate using country/state"}},taxes:{total:"Tax Total",totalOnly:"Tax",breakdown:"Taxes",showBreakdown:"Show Tax Breakdown",hideBreakdown:"Hide Tax Breakdown",estimated:"Estimated Tax"},total:{estimated:"Estimated Total",label:"Total",withoutTax:"Total excluding taxes"},estimatedShippingForm:{country:{placeholder:"Country"},state:{placeholder:"State"},zip:{placeholder:"Zip Code"},apply:{label:"Apply"}},freeShipping:"Free"},CartItem:{discountedPrice:"Discounted Price",download:"file",message:"Note",recipient:"To",regularPrice:"Regular Price",sender:"From",file:"{count} file",files:"{count} files",lowInventory:"Only {count} left!",insufficientQuantity:"Only {inventory} of {count} in stock",insufficientQuantityGeneral:"Not enough items for sale"},EstimateShipping:{label:"Shipping",editZipAction:"Apply",estimated:"Estimated Shipping",estimatedDestination:"Estimated Shipping to ",destinationLinkAriaLabel:"Change destination",zipPlaceholder:"Zip Code",withTaxes:"Including taxes",withoutTaxes:"excluding taxes",alternateField:{zip:"Estimate using country/zip",state:"Estimate using country/state"}},OutOfStockMessage:{heading:"Your cart contains items with limited stock",message:"Please adjust quantities to continue",alert:"Out of stock",action:"Remove all out of stock items from cart"}},x={Cart:f},S={default:x},T=({children:o})=>{var i;const[t,s]=u(),r=(i=h.getConfig())==null?void 0:i.langDefinitions;p(()=>{const e=g.on("locale",a=>{a!==t&&s(a)},{eager:!0});return()=>{e==null||e.off()}},[t]);const l=c(S,r??{});return n(m,{lang:t,langDefinitions:l,children:o})},A=new d(n(T,{}));export{A as render};
|