@billgangcom/theme-lib 1.110.7 → 1.111.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.
Files changed (63) hide show
  1. package/dist/{builder-D_zv5ue0.js → builder-B31b5UQu.js} +231 -227
  2. package/dist/{builder-B7hjBRYI.cjs → builder-BAYgntut.cjs} +9 -9
  3. package/dist/{builder-components-DN-mNdj8.js → builder-components-BrUaSzmu.js} +4 -4
  4. package/dist/{builder-components-BjoFBErH.cjs → builder-components-CitLV0Xf.cjs} +1 -1
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +109 -107
  7. package/dist/{charge-BQUHzEju.js → charge-DDPKMr1X.js} +10739 -9802
  8. package/dist/charge-Dj2R60Yu.cjs +109 -0
  9. package/dist/{checkout-uzxtu1pZ.js → checkout-CYXV8Y-_.js} +5 -5
  10. package/dist/{checkout-CUct7uCm.cjs → checkout-DBK6_t-t.cjs} +1 -1
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-CEMbDy4G.cjs → index-BCuCOhBc.cjs} +1 -1
  14. package/dist/{index-BBMTjm8A.cjs → index-BoPfKksa.cjs} +1 -1
  15. package/dist/{index-R_FZBtaZ.cjs → index-Bv1mSFy_.cjs} +1 -1
  16. package/dist/{index-Cbqz9kIG.cjs → index-CSe8H52Z.cjs} +1 -1
  17. package/dist/{index-hCDY-ip7.js → index-CWq55eW7.js} +10 -9
  18. package/dist/{index-CzkkQ8sH.js → index-C_XwNA_j.js} +5 -5
  19. package/dist/{index-CMECtXvH.js → index-CcF01H3S.js} +5 -5
  20. package/dist/{index-BXhAWCRX.cjs → index-CvjUdJSD.cjs} +1 -1
  21. package/dist/{index-BJMeFohP.js → index-CwFkr47f.js} +1 -1
  22. package/dist/{index-CX1FV9wS.js → index-XroJ5pVT.js} +5 -5
  23. package/dist/index.cjs.js +1 -1
  24. package/dist/index.es.js +8 -8
  25. package/dist/order-BEbWtrZ2.cjs +1 -0
  26. package/dist/order-CCJq_uKK.js +228 -0
  27. package/dist/src/constants/notification.d.ts +2 -0
  28. package/dist/src/storefront/api/checkout.d.ts +1 -0
  29. package/dist/src/storefront/api/index.d.ts +1 -0
  30. package/dist/src/storefront/api/order.d.ts +8 -0
  31. package/dist/src/storefront/components/CheckoutPrices/index.d.ts +2 -0
  32. package/dist/src/storefront/components/CheckoutProduct/index.d.ts +4 -0
  33. package/dist/src/storefront/components/ProtectYourCheckout/index.d.ts +12 -0
  34. package/dist/src/storefront/components/ReplacementModal/index.d.ts +16 -0
  35. package/dist/src/storefront/components/ReplacementRequestItem/index.d.ts +10 -0
  36. package/dist/src/storefront/components/index.d.ts +1 -0
  37. package/dist/src/storefront/models/checkout.d.ts +17 -1
  38. package/dist/src/storefront/models/order.d.ts +27 -0
  39. package/dist/src/storefront/store/useCartStore.d.ts +3 -0
  40. package/dist/src/ui/CheckboxSettings/index.d.ts +7 -0
  41. package/dist/src/ui/NotificationAntistock/index.d.ts +1 -0
  42. package/dist/src/ui/NotificationBuilder/index.d.ts +1 -0
  43. package/dist/src/ui/Select/index.d.ts +1 -0
  44. package/dist/src/ui/Tip/index.d.ts +2 -1
  45. package/dist/src/ui/index.d.ts +1 -0
  46. package/dist/style.css +1 -1
  47. package/dist/{subscription-DIDUTEI3.js → subscription-CZuEUgCg.js} +5 -5
  48. package/dist/{subscription-iNnLGi0T.cjs → subscription-CoDJAA04.cjs} +1 -1
  49. package/dist/{ticket-B0VGIvyK.js → ticket-BsDG_oGJ.js} +5 -5
  50. package/dist/{ticket-DXz_-29l.cjs → ticket-BxlDrXfl.cjs} +1 -1
  51. package/dist/{top-up-BhB8jhP6.js → top-up-BAPxprNh.js} +5 -5
  52. package/dist/{top-up-B7E7FUjn.cjs → top-up-u-FuienE.cjs} +1 -1
  53. package/dist/ui-components-BByJn6K_.cjs +1 -0
  54. package/dist/{ui-components-BTotDG_w.js → ui-components-Bl4srrr1.js} +1856 -1787
  55. package/dist/ui.cjs.js +1 -1
  56. package/dist/ui.es.js +43 -42
  57. package/dist/{validation-BVAD1q1L.cjs → validation-DJUVonVy.cjs} +1 -1
  58. package/dist/{validation-jCwzu5MC.js → validation-DRQEnxuG.js} +5 -5
  59. package/package.json +1 -1
  60. package/dist/charge-BAP3iPAM.cjs +0 -107
  61. package/dist/order-BOaO9a-C.cjs +0 -1
  62. package/dist/order-CdPcB1OE.js +0 -222
  63. package/dist/ui-components-CWLDlDmG.cjs +0 -1
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ReplacementRequest } from '@storefront/models';
3
+ interface ReplacementRequestItemProps {
4
+ item: ReplacementRequest;
5
+ orderId?: string;
6
+ accessToken?: string;
7
+ onCancel?: () => void;
8
+ }
9
+ export declare const ReplacementRequestItem: FC<ReplacementRequestItemProps>;
10
+ export {};
@@ -51,3 +51,4 @@ export * from './SubmitReview';
51
51
  export * from './SubscriptionExpiration';
52
52
  export * from './ProcessingPayment';
53
53
  export * from './CancelSubscription';
54
+ export * from './ProtectYourCheckout';
@@ -1,4 +1,4 @@
1
- import { DeliveryConfiguration, Image, Price } from '@storefront/models';
1
+ import { DeliveryConfiguration, Image, Price, ReplacementRequest } from '@storefront/models';
2
2
  export interface CheckoutProductT {
3
3
  id: number;
4
4
  name: string;
@@ -18,4 +18,20 @@ export interface CheckoutProductT {
18
18
  name: string;
19
19
  overrodePrice?: Price;
20
20
  }[];
21
+ replacementRequests?: ReplacementRequest[];
22
+ }
23
+ export interface ReplacementOption {
24
+ enabled: boolean;
25
+ name: string;
26
+ fixedFee: number;
27
+ feePercentage: number;
28
+ description: string;
29
+ }
30
+ export interface ReplacementConfig {
31
+ priorityReplacement: ReplacementOption;
32
+ standardReplacement: ReplacementOption;
33
+ }
34
+ export interface CheckoutDetailResponse {
35
+ gateways: any[];
36
+ replacement: ReplacementConfig;
21
37
  }
@@ -17,6 +17,7 @@ export type OrderRequest = {
17
17
  discordSocialConnectId?: string | null;
18
18
  referralCode?: string | null;
19
19
  tsId: string | null;
20
+ usePriorityReplacement?: boolean;
20
21
  };
21
22
  export declare enum OrderStatus {
22
23
  New = "NEW",
@@ -73,6 +74,8 @@ type BaseOrder = {
73
74
  expiresAt: Date;
74
75
  charge: GetChargeApiData | null;
75
76
  timeline: Partial<Record<OrderStatus, Date>>;
77
+ isApplicableForReplacement: boolean;
78
+ allowedReplacementReasons?: string[];
76
79
  customer: {
77
80
  id: number;
78
81
  email: string;
@@ -98,6 +101,7 @@ export type AuthenticatedOrder = BaseOrder & {
98
101
  };
99
102
  export type AuthenticatedOrderPart = PublicOrderPart & {
100
103
  deliveryCategories: DeliveryConfiguration[];
104
+ replacementRequests: ReplacementRequest[];
101
105
  };
102
106
  type BaseDeliveryConfiguration = {
103
107
  id: number;
@@ -115,6 +119,29 @@ export type InternalDeliveryConfiguration = BaseDeliveryConfiguration & ({
115
119
  deliveryItems: SerialDeliveryItem[];
116
120
  });
117
121
  export type DeliveryConfiguration = ExternalDeliveryConfiguration | InternalDeliveryConfiguration;
122
+ export declare enum ReplacementRequestStatus {
123
+ PENDING = "PENDING",
124
+ APPROVED = "APPROVED",
125
+ DECLINED = "DECLINED",
126
+ AUTO_APPROVED = "AUTO_APPROVED",
127
+ CANCELLED = "CANCELLED",
128
+ EXPIRED = "EXPIRED",
129
+ PROCESSING = "PROCESSING",
130
+ COMPLETED = "COMPLETED"
131
+ }
132
+ export type ReplacementRequestItem = {
133
+ originalSerialKey: string;
134
+ replacementSerialKey: string;
135
+ replacedAt: Date;
136
+ };
137
+ export type ReplacementRequest = {
138
+ id: string;
139
+ createdAt: Date;
140
+ reviewedAt: Date;
141
+ status: ReplacementRequestStatus;
142
+ reviewNotes: string;
143
+ replacementItems: ReplacementRequestItem[];
144
+ };
118
145
  export declare const enum DeliveryConfigurationType {
119
146
  Text = "TEXT",
120
147
  Serial = "SERIALS",
@@ -26,6 +26,7 @@ interface Options {
26
26
  isDiscount: boolean;
27
27
  percentage: number;
28
28
  } | null;
29
+ replacementConfig: import('../models/checkout').ReplacementConfig | null;
29
30
  setCart: (updater: Cart | ((prev: Cart) => Cart)) => void;
30
31
  setProducts: (updater: Product[] | ((prev: Product[]) => Product[])) => void;
31
32
  setCoupon: (coupon: ValidateCouponApiData | null) => void;
@@ -43,6 +44,8 @@ interface Options {
43
44
  isDiscount: boolean;
44
45
  percentage: number;
45
46
  } | null) => void;
47
+ setReplacementConfig: (value: import('../models/checkout').ReplacementConfig | null) => void;
48
+ setUsePriorityReplacement: (value: boolean | undefined) => void;
46
49
  }
47
50
  export declare const useCartStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
48
51
  export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ value: boolean;
4
+ onChange: (value: boolean) => void;
5
+ }
6
+ export declare const CheckboxSettings: React.FC<Props>;
7
+ export {};
@@ -6,6 +6,7 @@ type NotificationComponentProps = {
6
6
  padding?: number;
7
7
  timer: number;
8
8
  id: string;
9
+ label?: string;
9
10
  };
10
11
  export declare const NotificationAntistock: React.FC<NotificationComponentProps>;
11
12
  export {};
@@ -8,6 +8,7 @@ interface Props {
8
8
  timer: number;
9
9
  id: string;
10
10
  element?: React.FC<NotificationComponentProps>;
11
+ label?: string;
11
12
  }
12
13
  export declare const NotificationBuilder: React.FC<Props>;
13
14
  export {};
@@ -15,6 +15,7 @@ interface Props {
15
15
  value: string;
16
16
  addon: React.ReactNode;
17
17
  }[];
18
+ isMaxLength?: boolean;
18
19
  }
19
20
  export declare const Select: React.FC<Props>;
20
21
  export {};
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
- type: 'warning' | 'error' | 'success';
3
+ type: 'warning' | 'error' | 'success' | 'info';
4
4
  message: string;
5
5
  style?: React.CSSProperties;
6
6
  padding?: number;
7
7
  id?: string;
8
+ showCloseButton?: boolean;
8
9
  }
9
10
  export declare const Tip: React.FC<Props>;
10
11
  export {};
@@ -28,6 +28,7 @@ export * from './Select';
28
28
  export * from './Switch';
29
29
  export * from './ChooseImage';
30
30
  export * from './SelectInfiniteList';
31
+ export * from './CheckboxSettings';
31
32
  export * from './Checkbox';
32
33
  export * from './Tip';
33
34
  export * from './ConfirmationModal';