@kachingappz/bundles-js 1.1.2 → 1.1.4
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/bundles-js.iife.js +27 -18
- package/dist/index.d.ts +73 -10
- package/dist/index.js +611 -929
- package/dist/kaching-bundle-component/index.d.ts +73 -10
- package/dist/kaching-bundle-component/index.js +1118 -1357
- package/dist/react/index.cjs +26 -17
- package/dist/react/index.d.ts +73 -10
- package/dist/react/index.js +1086 -1432
- package/package.json +6 -11
|
@@ -64,6 +64,7 @@ declare interface BaseDealBar {
|
|
|
64
64
|
freeGiftsSummary?: FreeGiftsSummary | null;
|
|
65
65
|
multipleGiftsSelectors?: MultipleGiftsSelector[];
|
|
66
66
|
upsells: Upsell[];
|
|
67
|
+
sectionsOrder?: DealBarSection[];
|
|
67
68
|
productPersonalisation: ProductPersonalisation | null;
|
|
68
69
|
highlights?: Highlights | null;
|
|
69
70
|
sellingPlanEnabled?: boolean;
|
|
@@ -96,7 +97,7 @@ declare type BrandColorKey = (typeof BRAND_COLOR_KEYS)[number];
|
|
|
96
97
|
|
|
97
98
|
declare type BrandColors = Record<BrandColorKey, string>;
|
|
98
99
|
|
|
99
|
-
declare interface BundleDealBar extends BaseDealBar, ShowAsSoldOutFeature
|
|
100
|
+
declare interface BundleDealBar extends BaseDealBar, ShowAsSoldOutFeature {
|
|
100
101
|
dealBarType: DealBarType.Bundle;
|
|
101
102
|
layout?: "horizontal" | "vertical";
|
|
102
103
|
quantitySelector: boolean;
|
|
@@ -117,7 +118,7 @@ declare interface BundleProduct {
|
|
|
117
118
|
hidePrice?: boolean;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
declare interface BxgyDealBar extends BaseDealBar, ShowAsSoldOutFeature
|
|
121
|
+
declare interface BxgyDealBar extends BaseDealBar, ShowAsSoldOutFeature {
|
|
121
122
|
dealBarType: DealBarType.Bxgy;
|
|
122
123
|
buyQuantity: number;
|
|
123
124
|
buyDiscountType?: DiscountType;
|
|
@@ -258,6 +259,8 @@ declare type DealBarProgressiveGiftStyle = {
|
|
|
258
259
|
lockedMediaImageGID: string | null;
|
|
259
260
|
};
|
|
260
261
|
|
|
262
|
+
declare type DealBarSection = (typeof DEFAULT_DEAL_BAR_SECTIONS_ORDER)[number];
|
|
263
|
+
|
|
261
264
|
declare enum DealBarType {
|
|
262
265
|
QuantityBreak = "quantity-break",
|
|
263
266
|
Bxgy = "bxgy",
|
|
@@ -295,6 +298,7 @@ declare type DealBlock = {
|
|
|
295
298
|
startTimestamp: number;
|
|
296
299
|
endTimestamp: number | null;
|
|
297
300
|
differentVariantsEnabled: boolean;
|
|
301
|
+
requireVariantSelectionEnabled?: boolean;
|
|
298
302
|
hideVariantPicker: boolean;
|
|
299
303
|
disableVariantOptionSync?: boolean;
|
|
300
304
|
hideUnavailableOptions?: boolean;
|
|
@@ -402,6 +406,8 @@ declare type DealBlock = {
|
|
|
402
406
|
lowStockAlert: LowStockAlert | null;
|
|
403
407
|
};
|
|
404
408
|
|
|
409
|
+
declare const DEFAULT_DEAL_BAR_SECTIONS_ORDER: readonly ["upsells", "freeGifts", "multipleGiftsSelectors"];
|
|
410
|
+
|
|
405
411
|
declare type DefaultSortOption = "relevance" | "newest-first" | "price-low-to-high" | "price-high-to-low";
|
|
406
412
|
|
|
407
413
|
declare type DiscountType = "default" | "percentage" | "amount" | "specific";
|
|
@@ -429,6 +435,7 @@ declare type FreeGift = {
|
|
|
429
435
|
text: string;
|
|
430
436
|
imageSize: number;
|
|
431
437
|
quantity: number;
|
|
438
|
+
matchQuantityWithDealBar?: boolean;
|
|
432
439
|
showPrice: boolean;
|
|
433
440
|
includeInCompareAt?: boolean;
|
|
434
441
|
applyOnlyForSubscriptions: boolean;
|
|
@@ -462,6 +469,7 @@ declare interface GlobalConfig {
|
|
|
462
469
|
ignoreUnitPrice: boolean;
|
|
463
470
|
requireCustomerLogin: boolean;
|
|
464
471
|
abTestsRunning: boolean;
|
|
472
|
+
cartKachingSessionId?: string | null;
|
|
465
473
|
webPixel: boolean;
|
|
466
474
|
b2bCustomer: boolean;
|
|
467
475
|
isLoggedIn: boolean;
|
|
@@ -555,6 +563,7 @@ declare interface GlobalConfig {
|
|
|
555
563
|
"system.deal_page_line_quantity"?: string;
|
|
556
564
|
"system.deal_page_view_box"?: string;
|
|
557
565
|
"system.deal_page_close"?: string;
|
|
566
|
+
"system.deal_page_view_full_details"?: string;
|
|
558
567
|
"system.deal_page_back_to_products"?: string;
|
|
559
568
|
"system.deal_page_items_still_to_add_one"?: string;
|
|
560
569
|
"system.deal_page_items_still_to_add_other"?: string;
|
|
@@ -571,6 +580,53 @@ declare interface GlobalConfig {
|
|
|
571
580
|
"system.deal_page_items_range"?: string;
|
|
572
581
|
"system.deal_page_tip_box_size"?: string;
|
|
573
582
|
"system.deal_page_about_this_price"?: string;
|
|
583
|
+
"system.deal_page_rating"?: string;
|
|
584
|
+
"system.deal_page_rating_count_one"?: string;
|
|
585
|
+
"system.deal_page_rating_count_other"?: string;
|
|
586
|
+
"system.deal_page_rating_count_few"?: string;
|
|
587
|
+
"system.deal_page_rating_count_many"?: string;
|
|
588
|
+
"system.deal_page_gift_badge_shipping"?: string;
|
|
589
|
+
"system.deal_page_gift_badge_one"?: string;
|
|
590
|
+
"system.deal_page_gift_badge_other"?: string;
|
|
591
|
+
"system.deal_page_gift_badge_few"?: string;
|
|
592
|
+
"system.deal_page_gift_badge_many"?: string;
|
|
593
|
+
"system.deal_page_gifts_title"?: string;
|
|
594
|
+
"system.deal_page_your_gifts_title"?: string;
|
|
595
|
+
"system.deal_page_free_shipping"?: string;
|
|
596
|
+
"system.deal_page_gift_unlocks_at_one"?: string;
|
|
597
|
+
"system.deal_page_gift_unlocks_at_other"?: string;
|
|
598
|
+
"system.deal_page_gift_unlocks_at_few"?: string;
|
|
599
|
+
"system.deal_page_gift_unlocks_at_many"?: string;
|
|
600
|
+
"system.deal_page_choose_option"?: string;
|
|
601
|
+
"system.deal_page_change"?: string;
|
|
602
|
+
"system.deal_page_choose_gift_option"?: string;
|
|
603
|
+
"system.deal_page_your_gifts_row_one"?: string;
|
|
604
|
+
"system.deal_page_your_gifts_row_other"?: string;
|
|
605
|
+
"system.deal_page_your_gifts_row_few"?: string;
|
|
606
|
+
"system.deal_page_your_gifts_row_many"?: string;
|
|
607
|
+
"system.deal_page_free"?: string;
|
|
608
|
+
"system.deal_page_gift_count_one"?: string;
|
|
609
|
+
"system.deal_page_gift_count_other"?: string;
|
|
610
|
+
"system.deal_page_gift_count_few"?: string;
|
|
611
|
+
"system.deal_page_gift_count_many"?: string;
|
|
612
|
+
"system.deal_page_percentage_gifts_unlocked"?: string;
|
|
613
|
+
"system.deal_page_box_of_gifts"?: string;
|
|
614
|
+
"system.deal_page_gifts_unlocked"?: string;
|
|
615
|
+
"system.deal_page_gift_phrase_shipping"?: string;
|
|
616
|
+
"system.deal_page_gift_phrase_one"?: string;
|
|
617
|
+
"system.deal_page_gift_phrase_other"?: string;
|
|
618
|
+
"system.deal_page_gift_phrase_few"?: string;
|
|
619
|
+
"system.deal_page_gift_phrase_many"?: string;
|
|
620
|
+
"system.deal_page_nudge_start_offer_one"?: string;
|
|
621
|
+
"system.deal_page_nudge_start_offer_other"?: string;
|
|
622
|
+
"system.deal_page_nudge_start_offer_few"?: string;
|
|
623
|
+
"system.deal_page_nudge_start_offer_many"?: string;
|
|
624
|
+
"system.deal_page_nudge_more_offer_one"?: string;
|
|
625
|
+
"system.deal_page_nudge_more_offer_other"?: string;
|
|
626
|
+
"system.deal_page_nudge_more_offer_few"?: string;
|
|
627
|
+
"system.deal_page_nudge_more_offer_many"?: string;
|
|
628
|
+
"system.deal_page_offer_with_gifts"?: string;
|
|
629
|
+
"system.deal_page_promotion_percentage"?: string;
|
|
574
630
|
};
|
|
575
631
|
customSelectors: {
|
|
576
632
|
quantity: string | null;
|
|
@@ -581,16 +637,16 @@ declare interface GlobalConfig {
|
|
|
581
637
|
label?: string | null;
|
|
582
638
|
};
|
|
583
639
|
featureFlags: {
|
|
584
|
-
accelerated_checkout_additional_items?: boolean;
|
|
585
640
|
atc_total_price?: boolean;
|
|
586
641
|
cart_change_response_rewrite?: boolean;
|
|
587
642
|
cart_interceptor_dedupe_disabled?: boolean;
|
|
588
643
|
debug_cart_add?: boolean;
|
|
589
644
|
disable_nested_cart_lines?: boolean;
|
|
590
|
-
|
|
645
|
+
early_xhr_wrapper?: boolean;
|
|
591
646
|
hide_missing_variants?: boolean;
|
|
592
647
|
initialize_with_form_variant?: boolean;
|
|
593
648
|
intercept_cart_request?: boolean;
|
|
649
|
+
klaviyo_integration?: boolean;
|
|
594
650
|
legacy_saved_percentage?: boolean;
|
|
595
651
|
low_priority_scripts?: boolean;
|
|
596
652
|
native_swatches_disabled?: boolean;
|
|
@@ -610,6 +666,7 @@ declare interface GlobalConfig {
|
|
|
610
666
|
storefront_metaobjects?: boolean;
|
|
611
667
|
pos_extension?: boolean;
|
|
612
668
|
variant_images?: boolean;
|
|
669
|
+
widget_scroll_guard?: boolean;
|
|
613
670
|
};
|
|
614
671
|
shopCustomStyles: string;
|
|
615
672
|
brandColors?: BrandColors | null;
|
|
@@ -687,7 +744,7 @@ declare interface MixAndMatchChooseProductModal {
|
|
|
687
744
|
buttonText: string;
|
|
688
745
|
}
|
|
689
746
|
|
|
690
|
-
declare interface MixAndMatchDealBar extends BaseDealBar, ShowAsSoldOutFeature
|
|
747
|
+
declare interface MixAndMatchDealBar extends BaseDealBar, ShowAsSoldOutFeature {
|
|
691
748
|
dealBarType: DealBarType.MixAndMatch;
|
|
692
749
|
discountType: DiscountType;
|
|
693
750
|
discountValue: string | number;
|
|
@@ -753,6 +810,8 @@ declare interface Product {
|
|
|
753
810
|
text3: string | null;
|
|
754
811
|
text4: string | null;
|
|
755
812
|
};
|
|
813
|
+
rating?: ProductRating | null;
|
|
814
|
+
subtitle?: string | null;
|
|
756
815
|
}
|
|
757
816
|
|
|
758
817
|
declare interface ProductOption {
|
|
@@ -785,6 +844,11 @@ declare type ProductPersonalisation = {
|
|
|
785
844
|
required: boolean;
|
|
786
845
|
};
|
|
787
846
|
|
|
847
|
+
declare interface ProductRating {
|
|
848
|
+
value: number;
|
|
849
|
+
count: number | null;
|
|
850
|
+
}
|
|
851
|
+
|
|
788
852
|
declare type ProgressiveGift = {
|
|
789
853
|
id: string;
|
|
790
854
|
giftType: "product" | "shipping";
|
|
@@ -793,6 +857,8 @@ declare type ProgressiveGift = {
|
|
|
793
857
|
mediaImageGID: string | null;
|
|
794
858
|
unlockAtBar: number;
|
|
795
859
|
unlockAtBarOnly?: boolean;
|
|
860
|
+
unlockAtScope?: "and-higher" | "only" | "custom";
|
|
861
|
+
unlockDealBarIds?: string[];
|
|
796
862
|
label: string;
|
|
797
863
|
labelCrossedOut: string;
|
|
798
864
|
title: string;
|
|
@@ -844,7 +910,7 @@ declare type ProgressiveGiftsStyle = {
|
|
|
844
910
|
lockedMediaImageGID: string | null;
|
|
845
911
|
};
|
|
846
912
|
|
|
847
|
-
declare interface QuantityBreakDealBar extends BaseDealBar, ShowAsSoldOutFeature
|
|
913
|
+
declare interface QuantityBreakDealBar extends BaseDealBar, ShowAsSoldOutFeature {
|
|
848
914
|
dealBarType?: DealBarType.QuantityBreak;
|
|
849
915
|
quantity: number | string;
|
|
850
916
|
discountType: DiscountType;
|
|
@@ -863,10 +929,6 @@ declare type RequireItemSelectionAlert = {
|
|
|
863
929
|
backgroundColor: Color;
|
|
864
930
|
};
|
|
865
931
|
|
|
866
|
-
declare interface RequireVariantSelectionFeature {
|
|
867
|
-
requireVariantSelectionEnabled?: boolean;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
932
|
declare type SavingsSummary = {
|
|
871
933
|
title: string;
|
|
872
934
|
backgroundColor: Color;
|
|
@@ -1039,6 +1101,7 @@ declare type Upsell = {
|
|
|
1039
1101
|
quantity: number;
|
|
1040
1102
|
preselected: boolean;
|
|
1041
1103
|
visibleOnlyWhenDealBarSelected: boolean;
|
|
1104
|
+
matchQuantityWithDealBar?: boolean;
|
|
1042
1105
|
subscriptionEnabled?: boolean;
|
|
1043
1106
|
subscriptionType?: "deal" | "always";
|
|
1044
1107
|
};
|