@instockng/storefront-ui 1.0.30 → 1.0.32
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/components/Checkout.d.ts.map +1 -1
- package/dist/hooks/usePaystackPayment.d.ts +2 -1
- package/dist/hooks/usePaystackPayment.d.ts.map +1 -1
- package/dist/index100.mjs +3 -3
- package/dist/index101.mjs +1 -1
- package/dist/index102.mjs +1 -1
- package/dist/index103.mjs +1 -1
- package/dist/index104.mjs +2 -2
- package/dist/index105.mjs +2 -2
- package/dist/index106.mjs +3 -3
- package/dist/index107.mjs +1 -1
- package/dist/index108.mjs +3 -3
- package/dist/index109.mjs +2 -2
- package/dist/index110.mjs +2 -2
- package/dist/index111.mjs +1 -1
- package/dist/index112.mjs +3 -3
- package/dist/index113.mjs +1 -1
- package/dist/index114.mjs +1 -1
- package/dist/index115.mjs +3 -3
- package/dist/index116.mjs +2 -2
- package/dist/index117.mjs +4 -4
- package/dist/index118.mjs +1 -1
- package/dist/index119.mjs +3 -3
- package/dist/index12.mjs +44 -43
- package/dist/index120.mjs +4 -4
- package/dist/index121.mjs +1 -1
- package/dist/index122.mjs +1 -1
- package/dist/index123.mjs +1 -1
- package/dist/index124.mjs +1 -1
- package/dist/index125.mjs +1 -1
- package/dist/index126.mjs +1 -1
- package/dist/index127.mjs +1 -1
- package/dist/index128.mjs +2 -2
- package/dist/index129.mjs +3 -3
- package/dist/index132.mjs +1 -1
- package/dist/index134.mjs +1 -1
- package/dist/index136.mjs +1 -1
- package/dist/index137.mjs +2 -2
- package/dist/index141.mjs +2 -2
- package/dist/index146.mjs +2 -2
- package/dist/index148.mjs +2 -2
- package/dist/index149.mjs +18 -2
- package/dist/index150.mjs +25 -11
- package/dist/index151.mjs +32 -26
- package/dist/index152.mjs +12 -32
- package/dist/index153.mjs +9 -9
- package/dist/index154.mjs +2 -18
- package/dist/index155.mjs +20 -2
- package/dist/index156.mjs +39 -13
- package/dist/index157.mjs +2 -46
- package/dist/index158.mjs +30 -2
- package/dist/index159.mjs +12 -24
- package/dist/index160.mjs +2 -18
- package/dist/index161.mjs +2 -2
- package/dist/index162.mjs +2 -2
- package/dist/index163.mjs +2 -2
- package/dist/index164.mjs +72 -2
- package/dist/index165.mjs +2 -72
- package/dist/index166.mjs +53 -2
- package/dist/index167.mjs +2 -53
- package/dist/index168.mjs +36 -2
- package/dist/index169.mjs +146 -30
- package/dist/index170.mjs +2 -152
- package/dist/index171.mjs +2 -2
- package/dist/index172.mjs +19 -2
- package/dist/index173.mjs +2 -19
- package/dist/index174.mjs +2 -2
- package/dist/index175.mjs +26 -2
- package/dist/index176.mjs +2 -26
- package/dist/index177.mjs +2 -2
- package/dist/index178.mjs +24 -2
- package/dist/index179.mjs +16 -17
- package/dist/index180.mjs +2 -23
- package/dist/index182.mjs +2 -2
- package/dist/index183.mjs +23 -2
- package/dist/index184.mjs +2 -23
- package/dist/index185.mjs +23 -2
- package/dist/index186.mjs +2 -23
- package/dist/index187.mjs +2 -2
- package/dist/index189.mjs +23 -2
- package/dist/index190.mjs +2 -23
- package/dist/index191.mjs +23 -2
- package/dist/index192.mjs +2 -23
- package/dist/index193.mjs +2 -2
- package/dist/index194.mjs +2 -2
- package/dist/index196.mjs +2 -2
- package/dist/index197.mjs +2 -2
- package/dist/index198.mjs +2 -2
- package/dist/index199.mjs +2 -2
- package/dist/index200.mjs +127 -2
- package/dist/index201.mjs +2 -127
- package/dist/index202.mjs +74 -2
- package/dist/index203.mjs +60 -60
- package/dist/index204.mjs +2 -74
- package/dist/index205.mjs +30 -12
- package/dist/index206.mjs +11 -7
- package/dist/index207.mjs +3 -30
- package/dist/index208.mjs +3 -10
- package/dist/index209.mjs +13 -4
- package/dist/index210.mjs +7 -4
- package/dist/index213.mjs +2 -2
- package/dist/index214.mjs +2 -2
- package/dist/index217.mjs +2 -2
- package/dist/index218.mjs +108 -2
- package/dist/index219.mjs +2 -2
- package/dist/index220.mjs +2 -2
- package/dist/index221.mjs +2 -2
- package/dist/index222.mjs +2 -2
- package/dist/index223.mjs +2 -108
- package/dist/index224.mjs +2 -2
- package/dist/index226.mjs +2 -37
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +37 -2
- package/dist/index229.mjs +2 -2
- package/dist/index232.mjs +1 -1
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +1 -1
- package/dist/index236.mjs +2 -2
- package/dist/index238.mjs +2 -2
- package/dist/index239.mjs +2 -2
- package/dist/index241.mjs +2 -2
- package/dist/index242.mjs +2 -2
- package/dist/index244.mjs +2 -2
- package/dist/index245.mjs +4 -2
- package/dist/index246.mjs +2 -2
- package/dist/index247.mjs +2 -4
- package/dist/index248.mjs +2 -3
- package/dist/index249.mjs +2 -2
- package/dist/index250.mjs +18 -2
- package/dist/index251.mjs +46 -16
- package/dist/index252.mjs +2 -13
- package/dist/index253.mjs +2 -6
- package/dist/index254.mjs +2 -30
- package/dist/index255.mjs +2 -2
- package/dist/index256.mjs +89 -16
- package/dist/index257.mjs +3 -47
- package/dist/index258.mjs +2 -2
- package/dist/index259.mjs +2 -2
- package/dist/index260.mjs +17 -2
- package/dist/index261.mjs +13 -2
- package/dist/index262.mjs +6 -2
- package/dist/index263.mjs +30 -91
- package/dist/index32.mjs +1 -1
- package/dist/index33.mjs +1 -1
- package/dist/index34.mjs +1 -1
- package/dist/index35.mjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index38.mjs +1 -1
- package/dist/index41.mjs +23 -20
- package/dist/index42.mjs +1 -1
- package/dist/index49.mjs +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.mjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.mjs +1 -1
- package/dist/index57.mjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index61.mjs +153 -2
- package/dist/index62.mjs +4 -152
- package/dist/index63.mjs +22 -4
- package/dist/index64.mjs +2 -23
- package/dist/index73.mjs +1 -1
- package/dist/index96.mjs +1 -1
- package/dist/index97.mjs +1 -1
- package/dist/index98.mjs +6 -6
- package/dist/index99.mjs +4 -4
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/Checkout.tsx +3 -2
- package/src/hooks/usePaystackPayment.ts +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkout.d.ts","sourceRoot":"","sources":["../../src/components/Checkout.tsx"],"names":[],"mappings":"AA6FA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wBAAwB;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACxC,sCAAsC;IACtC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,wBAAwB;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAA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,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,4BAA4B;IAC5B,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAID,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,OAAO,EACP,WAAW,EACX,SAAS,EACT,OAAO,EACP,gBAAgC,EAChC,YAAY,GACb,EAAE,aAAa,2CAy2Bf"}
|
|
@@ -33,11 +33,12 @@ export interface PaystackResponse {
|
|
|
33
33
|
message: string;
|
|
34
34
|
}
|
|
35
35
|
export interface UsePaystackPaymentOptions {
|
|
36
|
+
isOpen: boolean;
|
|
36
37
|
publicKey: string;
|
|
37
38
|
onSuccess?: (response: PaystackResponse) => void;
|
|
38
39
|
onClose?: () => void;
|
|
39
40
|
}
|
|
40
|
-
export declare function usePaystackPayment({ publicKey, onSuccess, onClose, }: UsePaystackPaymentOptions): {
|
|
41
|
+
export declare function usePaystackPayment({ isOpen, publicKey, onSuccess, onClose, }: UsePaystackPaymentOptions): {
|
|
41
42
|
isLoaded: boolean;
|
|
42
43
|
isLoading: boolean;
|
|
43
44
|
error: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePaystackPayment.d.ts","sourceRoot":"","sources":["../../src/hooks/usePaystackPayment.ts"],"names":[],"mappings":"AAYA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,WAAW,CAAC,EAAE;YACZ,KAAK,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK;gBACjC,UAAU,EAAE,MAAM,IAAI,CAAC;aACxB,CAAC;SACH,CAAC;KACH;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAA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AC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE;QACT,aAAa,CAAC,EAAE,KAAK,CAAC;YACpB,YAAY,EAAE,MAAM,CAAC;YACrB,aAAa,EAAE,MAAM,CAAC;YACtB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;SACxB,CAAC,CAAC;QACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,GACR,EAAE,yBAAyB;;;;gCA4Cf,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;EAsChE"}
|
package/dist/index100.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as r } from "./
|
|
3
|
-
import { __require as m } from "./
|
|
4
|
-
import { __require as l } from "./
|
|
2
|
+
import { __exports as r } from "./index157.mjs";
|
|
3
|
+
import { __require as m } from "./index158.mjs";
|
|
4
|
+
import { __require as l } from "./index159.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function p() {
|
|
7
7
|
return i ? r : (i = 1, function(t) {
|
package/dist/index101.mjs
CHANGED
package/dist/index102.mjs
CHANGED
package/dist/index103.mjs
CHANGED
package/dist/index104.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as t } from "./
|
|
3
|
-
import { __require as c } from "./
|
|
2
|
+
import { __exports as t } from "./index163.mjs";
|
|
3
|
+
import { __require as c } from "./index164.mjs";
|
|
4
4
|
var i;
|
|
5
5
|
function p() {
|
|
6
6
|
return i ? t : (i = 1, function(r) {
|
package/dist/index105.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as i } from "./
|
|
2
|
+
import { __exports as i } from "./index165.mjs";
|
|
3
3
|
import { __require as U } from "./index103.mjs";
|
|
4
|
-
import { __require as _ } from "./
|
|
4
|
+
import { __require as _ } from "./index166.mjs";
|
|
5
5
|
var s;
|
|
6
6
|
function q() {
|
|
7
7
|
return s ? i : (s = 1, function(n) {
|
package/dist/index106.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as f } from "./
|
|
3
|
-
import { __require as z } from "./
|
|
4
|
-
import { __require as A } from "./
|
|
2
|
+
import { __exports as f } from "./index167.mjs";
|
|
3
|
+
import { __require as z } from "./index168.mjs";
|
|
4
|
+
import { __require as A } from "./index169.mjs";
|
|
5
5
|
import { __require as F } from "./index97.mjs";
|
|
6
6
|
import { __require as O } from "./index101.mjs";
|
|
7
7
|
import { __require as U } from "./index114.mjs";
|
package/dist/index107.mjs
CHANGED
package/dist/index108.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as p } from "./
|
|
2
|
+
import { __exports as p } from "./index171.mjs";
|
|
3
3
|
import { __require as I } from "./index127.mjs";
|
|
4
|
-
import { __require as q } from "./
|
|
5
|
-
import { __require as v } from "./
|
|
4
|
+
import { __require as q } from "./index164.mjs";
|
|
5
|
+
import { __require as v } from "./index172.mjs";
|
|
6
6
|
import { __require as O } from "./index97.mjs";
|
|
7
7
|
var N;
|
|
8
8
|
function w() {
|
package/dist/index109.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as c } from "./
|
|
2
|
+
import { __exports as c } from "./index173.mjs";
|
|
3
3
|
import { __require as y } from "./index96.mjs";
|
|
4
|
-
import { __require as U } from "./
|
|
4
|
+
import { __require as U } from "./index166.mjs";
|
|
5
5
|
var l;
|
|
6
6
|
function x() {
|
|
7
7
|
return l ? c : (l = 1, function(h) {
|
package/dist/index110.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as u } from "./
|
|
3
|
-
import { __require as c } from "./
|
|
2
|
+
import { __module as u } from "./index174.mjs";
|
|
3
|
+
import { __require as c } from "./index175.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function d() {
|
|
6
6
|
return a ? u.exports : (a = 1, function(o, e) {
|
package/dist/index111.mjs
CHANGED
package/dist/index112.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as a } from "./
|
|
3
|
-
import { __require as f } from "./
|
|
4
|
-
import { __require as c } from "./
|
|
2
|
+
import { __module as a } from "./index177.mjs";
|
|
3
|
+
import { __require as f } from "./index178.mjs";
|
|
4
|
+
import { __require as c } from "./index179.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function g() {
|
|
7
7
|
return i ? a.exports : (i = 1, function(o, e) {
|
package/dist/index113.mjs
CHANGED
package/dist/index114.mjs
CHANGED
package/dist/index115.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as a } from "./
|
|
3
|
-
import { __require as _ } from "./
|
|
4
|
-
import { __require as l } from "./
|
|
2
|
+
import { __module as a } from "./index182.mjs";
|
|
3
|
+
import { __require as _ } from "./index183.mjs";
|
|
4
|
+
import { __require as l } from "./index178.mjs";
|
|
5
5
|
var t;
|
|
6
6
|
function h() {
|
|
7
7
|
return t ? a.exports : (t = 1, function(u, e) {
|
package/dist/index116.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as t } from "./
|
|
3
|
-
import { __require as s } from "./
|
|
2
|
+
import { __module as t } from "./index184.mjs";
|
|
3
|
+
import { __require as s } from "./index185.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function _() {
|
|
6
6
|
return a ? t.exports : (a = 1, function(u, e) {
|
package/dist/index117.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as n } from "./
|
|
3
|
-
import { __require as H } from "./
|
|
2
|
+
import { __module as n } from "./index186.mjs";
|
|
3
|
+
import { __require as H } from "./index166.mjs";
|
|
4
4
|
import { __require as L } from "./index109.mjs";
|
|
5
5
|
import { __require as j } from "./index124.mjs";
|
|
6
6
|
import { __require as O } from "./index103.mjs";
|
|
7
|
-
import { __require as S } from "./
|
|
7
|
+
import { __require as S } from "./index178.mjs";
|
|
8
8
|
import { __require as w } from "./index122.mjs";
|
|
9
|
-
import { __require as M } from "./
|
|
9
|
+
import { __require as M } from "./index158.mjs";
|
|
10
10
|
import { __require as A } from "./index125.mjs";
|
|
11
11
|
var p;
|
|
12
12
|
function $() {
|
package/dist/index118.mjs
CHANGED
package/dist/index119.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as l } from "./
|
|
2
|
+
import { __exports as l } from "./index188.mjs";
|
|
3
3
|
import { __require as _ } from "./index101.mjs";
|
|
4
|
-
import { __require as v } from "./
|
|
5
|
-
import { __require as q } from "./
|
|
4
|
+
import { __require as v } from "./index189.mjs";
|
|
5
|
+
import { __require as q } from "./index185.mjs";
|
|
6
6
|
var s;
|
|
7
7
|
function N() {
|
|
8
8
|
return s ? l : (s = 1, function(h) {
|
package/dist/index12.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs as a, jsx as e, Fragment as Ce } from "react/jsx-runtime";
|
|
3
|
-
import { useState as x, useEffect as I, useMemo as
|
|
3
|
+
import { useState as x, useEffect as I, useMemo as K, useCallback as Pe } from "react";
|
|
4
4
|
import { object as G, string as v, ValidationError as ke } from "./index39.mjs";
|
|
5
5
|
import "./index20.mjs";
|
|
6
6
|
import "@tanstack/react-query";
|
|
@@ -10,17 +10,17 @@ import { Modal as ie } from "./index16.mjs";
|
|
|
10
10
|
import { FormInput as k } from "./index17.mjs";
|
|
11
11
|
import { FormSelect as ce } from "./index18.mjs";
|
|
12
12
|
import { Button as T } from "./index13.mjs";
|
|
13
|
-
import { Loader2 as
|
|
13
|
+
import { Loader2 as O, ChevronLeft as Ie, ChevronRight as je, CheckCircle as Ze, Package as oe, Banknote as me, Mail as Se, Phone as ze, ChevronDown as Fe, Zap as Le } from "lucide-react";
|
|
14
14
|
import { formatCurrency as M, cn as C, getFbCookies as ue } from "./index19.mjs";
|
|
15
15
|
import Te from "./index40.mjs";
|
|
16
16
|
import { usePaystackPayment as Be } from "./index41.mjs";
|
|
17
|
-
const Ae = (
|
|
17
|
+
const Ae = (d) => d.replace(/\D/g, ""), _e = G({
|
|
18
18
|
firstName: v().required("First name is required").min(2, "First name must be at least 2 characters").max(50, "First name must be less than 50 characters"),
|
|
19
19
|
lastName: v().required("Last name is required").min(2, "Last name must be at least 2 characters").max(50, "Last name must be less than 50 characters"),
|
|
20
20
|
email: v().required("Email is required").email("Please enter a valid email address"),
|
|
21
|
-
phone: v().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (
|
|
22
|
-
if (!
|
|
23
|
-
const q = Ae(
|
|
21
|
+
phone: v().required("Phone number is required").test("nigerian-phone", "Please enter a valid Nigerian phone number (e.g. 0812 564 8668)", (d) => {
|
|
22
|
+
if (!d) return !1;
|
|
23
|
+
const q = Ae(d);
|
|
24
24
|
return [
|
|
25
25
|
/^0[789]\d{9}$/
|
|
26
26
|
// 0xxxxxxxxx (11 digits total)
|
|
@@ -29,13 +29,13 @@ const Ae = (i) => i.replace(/\D/g, ""), _e = G({
|
|
|
29
29
|
}), Re = G({
|
|
30
30
|
address: v().required("Street address is required").min(10, "Please provide a complete address"),
|
|
31
31
|
city: v().required("City is required").min(3, "City name must be at least 3 characters"),
|
|
32
|
-
state: v().required("State is required").test("not-empty", "State is required", (
|
|
33
|
-
deliveryZoneId: v().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (
|
|
32
|
+
state: v().required("State is required").test("not-empty", "State is required", (d) => !!d && d.trim() !== ""),
|
|
33
|
+
deliveryZoneId: v().required("Delivery zone is required").test("not-empty", "Delivery zone is required", (d) => !!d && d.trim() !== "")
|
|
34
34
|
}), $e = G({
|
|
35
35
|
paymentMethod: v().oneOf(["cod", "online"], "Please select a payment method").required("Payment method is required")
|
|
36
36
|
});
|
|
37
37
|
function rt({
|
|
38
|
-
isOpen:
|
|
38
|
+
isOpen: d,
|
|
39
39
|
onClose: q,
|
|
40
40
|
initialData: n,
|
|
41
41
|
onSuccess: N,
|
|
@@ -45,10 +45,11 @@ function rt({
|
|
|
45
45
|
}) {
|
|
46
46
|
var D, ee, te, ae, re, se, le, ne, de;
|
|
47
47
|
const [o, b] = x("customer"), [Z, ye] = x(void 0), [f, W] = x(void 0), [p, B] = x(null), { refetch: V, isLoading: Y, cart: s, updateCartMutation: A, checkoutMutation: fe, clearAndCreateNewCart: H } = qe(), U = (D = s == null ? void 0 : s.brand) == null ? void 0 : D.paystackPublicKey, J = Be({
|
|
48
|
+
isOpen: d,
|
|
48
49
|
publicKey: U || "",
|
|
49
50
|
onSuccess: async (t) => {
|
|
50
51
|
try {
|
|
51
|
-
const { fbc: l, fbp:
|
|
52
|
+
const { fbc: l, fbp: i } = ue(), m = await P.mutateAsync({
|
|
52
53
|
firstName: r.firstName,
|
|
53
54
|
lastName: r.lastName,
|
|
54
55
|
email: r.email,
|
|
@@ -59,7 +60,7 @@ function rt({
|
|
|
59
60
|
paymentMethod: r.paymentMethod,
|
|
60
61
|
paystackReference: t.reference,
|
|
61
62
|
fbc: l,
|
|
62
|
-
fbp:
|
|
63
|
+
fbp: i
|
|
63
64
|
});
|
|
64
65
|
if ("error" in m) {
|
|
65
66
|
const $ = m.error;
|
|
@@ -76,14 +77,14 @@ function rt({
|
|
|
76
77
|
}
|
|
77
78
|
});
|
|
78
79
|
I(() => {
|
|
79
|
-
|
|
80
|
-
}, [
|
|
80
|
+
d && V();
|
|
81
|
+
}, [d, V]);
|
|
81
82
|
const { data: w } = Me(((ee = s == null ? void 0 : s.brand) == null ? void 0 : ee.id) || "", {
|
|
82
83
|
enabled: !!((te = s == null ? void 0 : s.brand) != null && te.id)
|
|
83
|
-
}), u =
|
|
84
|
+
}), u = K(() => w == null ? void 0 : w.find((t) => t.id === Z), [w, Z]), y = K(() => u == null ? void 0 : u.zones.find((t) => t.id === f), [u, f]), P = fe;
|
|
84
85
|
I(() => {
|
|
85
|
-
|
|
86
|
-
}, [
|
|
86
|
+
d || (B(null), b("customer"), P.reset());
|
|
87
|
+
}, [d]);
|
|
87
88
|
const [r, _] = x({
|
|
88
89
|
firstName: (n == null ? void 0 : n.firstName) || "",
|
|
89
90
|
lastName: (n == null ? void 0 : n.lastName) || "",
|
|
@@ -96,11 +97,11 @@ function rt({
|
|
|
96
97
|
notes: (n == null ? void 0 : n.notes) || ""
|
|
97
98
|
});
|
|
98
99
|
I(() => {
|
|
99
|
-
|
|
100
|
-
}, [
|
|
100
|
+
d && b("customer");
|
|
101
|
+
}, [d]);
|
|
101
102
|
const [Q, X] = x(!1);
|
|
102
103
|
I(() => {
|
|
103
|
-
|
|
104
|
+
d && s && !n && !Q && (_((t) => {
|
|
104
105
|
var l;
|
|
105
106
|
return {
|
|
106
107
|
...t,
|
|
@@ -110,8 +111,8 @@ function rt({
|
|
|
110
111
|
phone: s.customerPhone || t.phone,
|
|
111
112
|
deliveryZoneId: ((l = s.deliveryZone) == null ? void 0 : l.id) || t.deliveryZoneId
|
|
112
113
|
};
|
|
113
|
-
}), X(!0)),
|
|
114
|
-
}, [
|
|
114
|
+
}), X(!0)), d || X(!1);
|
|
115
|
+
}, [d, s, n, Q]), I(() => {
|
|
115
116
|
if (f) {
|
|
116
117
|
const t = u == null ? void 0 : u.zones.find((l) => l.id === f);
|
|
117
118
|
t && _((l) => ({
|
|
@@ -121,14 +122,14 @@ function rt({
|
|
|
121
122
|
}
|
|
122
123
|
}, [f, u]);
|
|
123
124
|
const [h, S] = x({}), [R, pe] = x(!1), g = (t) => {
|
|
124
|
-
const { name: l, value:
|
|
125
|
-
_((m) => ({ ...m, [l]:
|
|
125
|
+
const { name: l, value: i } = t.target;
|
|
126
|
+
_((m) => ({ ...m, [l]: i })), h[l] && S((m) => ({ ...m, [l]: void 0 }));
|
|
126
127
|
}, z = Pe(
|
|
127
128
|
(t) => {
|
|
128
129
|
const l = r[t];
|
|
129
130
|
if (!l) return;
|
|
130
|
-
const
|
|
131
|
-
t === "firstName" ?
|
|
131
|
+
const i = {};
|
|
132
|
+
t === "firstName" ? i.customerFirstName = l : t === "lastName" ? i.customerLastName = l : t === "email" ? i.customerEmail = l : t === "phone" && (i.customerPhone = l), A.mutate(i);
|
|
132
133
|
},
|
|
133
134
|
[r, A]
|
|
134
135
|
), F = (t) => {
|
|
@@ -137,16 +138,16 @@ function rt({
|
|
|
137
138
|
if (t === "customer")
|
|
138
139
|
_e.validateSync(r, { abortEarly: !1 });
|
|
139
140
|
else if (t === "delivery") {
|
|
140
|
-
const
|
|
141
|
+
const i = {
|
|
141
142
|
address: r.address,
|
|
142
143
|
city: r.city,
|
|
143
144
|
state: Z || r.state || "",
|
|
144
145
|
deliveryZoneId: f || r.deliveryZoneId || ""
|
|
145
146
|
};
|
|
146
|
-
Re.validateSync(
|
|
147
|
+
Re.validateSync(i, { abortEarly: !1 });
|
|
147
148
|
} else t === "payment" && $e.validateSync(r, { abortEarly: !1 });
|
|
148
|
-
} catch (
|
|
149
|
-
|
|
149
|
+
} catch (i) {
|
|
150
|
+
i instanceof ke && i.inner.forEach((m) => {
|
|
150
151
|
m.path && (l[m.path] = m.message);
|
|
151
152
|
});
|
|
152
153
|
}
|
|
@@ -198,7 +199,7 @@ function rt({
|
|
|
198
199
|
return;
|
|
199
200
|
}
|
|
200
201
|
try {
|
|
201
|
-
const { fbc: t, fbp: l } = ue(),
|
|
202
|
+
const { fbc: t, fbp: l } = ue(), i = await P.mutateAsync({
|
|
202
203
|
firstName: r.firstName,
|
|
203
204
|
lastName: r.lastName,
|
|
204
205
|
email: r.email,
|
|
@@ -210,12 +211,12 @@ function rt({
|
|
|
210
211
|
fbc: t,
|
|
211
212
|
fbp: l
|
|
212
213
|
});
|
|
213
|
-
if ("error" in
|
|
214
|
-
const m =
|
|
214
|
+
if ("error" in i) {
|
|
215
|
+
const m = i.error;
|
|
215
216
|
c == null || c(new Error((m == null ? void 0 : m.message) || "Checkout failed"));
|
|
216
217
|
return;
|
|
217
218
|
}
|
|
218
|
-
B(
|
|
219
|
+
B(i), H(), N == null || N(i.id);
|
|
219
220
|
} catch (t) {
|
|
220
221
|
c == null || c(t);
|
|
221
222
|
}
|
|
@@ -224,9 +225,9 @@ function rt({
|
|
|
224
225
|
customer: "Customer Information",
|
|
225
226
|
delivery: "Delivery Address",
|
|
226
227
|
payment: "Payment Method"
|
|
227
|
-
}, xe =
|
|
228
|
+
}, xe = K(() => ge[o], [o]), we = /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
228
229
|
(o === "payment" || o === "delivery") && ((ae = s == null ? void 0 : s.pricing) == null ? void 0 : ae.total) && /* @__PURE__ */ a("div", { className: "text-sm text-black relative", children: [
|
|
229
|
-
Y && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(
|
|
230
|
+
Y && /* @__PURE__ */ e("div", { className: "absolute flex items-center justify-center inset-0 bg-white opacity-50", children: /* @__PURE__ */ e(O, { className: "animate-spin text-accent-500" }) }),
|
|
230
231
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between font-medium", children: [
|
|
231
232
|
/* @__PURE__ */ e("span", { children: "Subtotal" }),
|
|
232
233
|
/* @__PURE__ */ e("span", { children: M(((re = s == null ? void 0 : s.pricing) == null ? void 0 : re.subtotal) ?? 0) })
|
|
@@ -284,7 +285,7 @@ function rt({
|
|
|
284
285
|
className: "flex-1 bg-accent-500 text-white hover:bg-accent-600",
|
|
285
286
|
size: "lg",
|
|
286
287
|
children: P.isPending ? /* @__PURE__ */ a(Ce, { children: [
|
|
287
|
-
/* @__PURE__ */ e(
|
|
288
|
+
/* @__PURE__ */ e(O, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
288
289
|
"Processing..."
|
|
289
290
|
] }) : he
|
|
290
291
|
}
|
|
@@ -296,7 +297,7 @@ function rt({
|
|
|
296
297
|
return /* @__PURE__ */ e(
|
|
297
298
|
ie,
|
|
298
299
|
{
|
|
299
|
-
isOpen:
|
|
300
|
+
isOpen: d,
|
|
300
301
|
onClose: q,
|
|
301
302
|
title: "Order Placed Successfully!",
|
|
302
303
|
footer: /* @__PURE__ */ e(
|
|
@@ -363,19 +364,19 @@ function rt({
|
|
|
363
364
|
return /* @__PURE__ */ e(
|
|
364
365
|
ie,
|
|
365
366
|
{
|
|
366
|
-
isOpen:
|
|
367
|
+
isOpen: d,
|
|
367
368
|
onClose: q,
|
|
368
369
|
title: xe,
|
|
369
370
|
footer: we,
|
|
370
371
|
size: "lg",
|
|
371
372
|
contentClassName: "p-0",
|
|
372
|
-
children: Y ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(
|
|
373
|
+
children: Y ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center min-h-[300px]", children: /* @__PURE__ */ e(O, { className: "h-8 w-8 animate-spin text-gray-600" }) }) : /* @__PURE__ */ e("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ a("div", { className: "relative w-full", children: [
|
|
373
374
|
E && /* @__PURE__ */ a("div", { className: "space-y-3 p-4 pb-0", children: [
|
|
374
375
|
y.noteTitle && y.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
|
375
376
|
/* @__PURE__ */ e(oe, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
|
|
376
377
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
377
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900", children: y.noteTitle }),
|
|
378
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-amber-800", children: y.noteContent })
|
|
378
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children: y.noteTitle }),
|
|
379
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children: y.noteContent })
|
|
379
380
|
] })
|
|
380
381
|
] }) }),
|
|
381
382
|
!(y != null && y.allowCOD) && /* @__PURE__ */ e("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
|
@@ -496,7 +497,7 @@ function rt({
|
|
|
496
497
|
onChange: (t) => {
|
|
497
498
|
W("");
|
|
498
499
|
const l = t.target.value;
|
|
499
|
-
ye(l || void 0), h.state && S((
|
|
500
|
+
ye(l || void 0), h.state && S((i) => ({ ...i, state: void 0 }));
|
|
500
501
|
},
|
|
501
502
|
error: h.state,
|
|
502
503
|
required: !0,
|
|
@@ -513,7 +514,7 @@ function rt({
|
|
|
513
514
|
value: f || "",
|
|
514
515
|
onChange: (t) => {
|
|
515
516
|
const l = t.target.value;
|
|
516
|
-
W(l || void 0), h.deliveryZoneId && S((
|
|
517
|
+
W(l || void 0), h.deliveryZoneId && S((i) => ({ ...i, deliveryZoneId: void 0 })), l && A.mutate({ deliveryZoneId: l });
|
|
517
518
|
},
|
|
518
519
|
disabled: !u,
|
|
519
520
|
error: h.deliveryZoneId,
|
package/dist/index120.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as r } from "./
|
|
2
|
+
import { __exports as r } from "./index190.mjs";
|
|
3
3
|
import { __require as m } from "./index97.mjs";
|
|
4
|
-
import { __require as f } from "./
|
|
5
|
-
import { __require as h } from "./
|
|
6
|
-
import { __require as s } from "./
|
|
4
|
+
import { __require as f } from "./index183.mjs";
|
|
5
|
+
import { __require as h } from "./index191.mjs";
|
|
6
|
+
import { __require as s } from "./index179.mjs";
|
|
7
7
|
var n;
|
|
8
8
|
function q() {
|
|
9
9
|
return n ? r : (n = 1, function(t) {
|
package/dist/index121.mjs
CHANGED
package/dist/index122.mjs
CHANGED
package/dist/index123.mjs
CHANGED
package/dist/index124.mjs
CHANGED
package/dist/index125.mjs
CHANGED
package/dist/index126.mjs
CHANGED
package/dist/index127.mjs
CHANGED
package/dist/index128.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as n } from "./
|
|
3
|
-
import { __require as c } from "./
|
|
2
|
+
import { __exports as n } from "./index199.mjs";
|
|
3
|
+
import { __require as c } from "./index200.mjs";
|
|
4
4
|
var u;
|
|
5
5
|
function y() {
|
|
6
6
|
return u ? n : (u = 1, function(a) {
|
package/dist/index129.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as e } from "./
|
|
3
|
-
import { __require as o } from "./
|
|
4
|
-
import { __require as t } from "./
|
|
2
|
+
import { __module as e } from "./index201.mjs";
|
|
3
|
+
import { __require as o } from "./index202.mjs";
|
|
4
|
+
import { __require as t } from "./index203.mjs";
|
|
5
5
|
var r;
|
|
6
6
|
function p() {
|
|
7
7
|
return r ? e.exports : (r = 1, process.env.NODE_ENV === "production" ? e.exports = o() : e.exports = t(), e.exports);
|
package/dist/index132.mjs
CHANGED
package/dist/index134.mjs
CHANGED
package/dist/index136.mjs
CHANGED
package/dist/index137.mjs
CHANGED