@instockng/storefront-ui 1.0.72 → 1.0.73

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 (208) hide show
  1. package/dist/index.mjs +64 -62
  2. package/dist/index103.mjs +2 -2
  3. package/dist/index104.mjs +2 -28
  4. package/dist/index105.mjs +26 -16
  5. package/dist/index106.mjs +13 -210
  6. package/dist/index107.mjs +194 -159
  7. package/dist/index108.mjs +175 -17
  8. package/dist/index109.mjs +14 -15
  9. package/dist/index110.mjs +15 -25
  10. package/dist/index111.mjs +27 -150
  11. package/dist/index112.mjs +151 -15
  12. package/dist/index113.mjs +13 -24
  13. package/dist/index114.mjs +22 -75
  14. package/dist/index115.mjs +76 -30
  15. package/dist/index116.mjs +32 -139
  16. package/dist/index117.mjs +135 -45
  17. package/dist/index118.mjs +51 -19
  18. package/dist/index119.mjs +15 -19
  19. package/dist/index120.mjs +21 -17
  20. package/dist/index121.mjs +16 -18
  21. package/dist/index122.mjs +17 -13
  22. package/dist/index123.mjs +13 -14
  23. package/dist/index124.mjs +13 -12
  24. package/dist/index125.mjs +14 -58
  25. package/dist/index126.mjs +57 -10
  26. package/dist/index127.mjs +11 -32
  27. package/dist/index128.mjs +32 -17
  28. package/dist/index129.mjs +17 -27
  29. package/dist/index130.mjs +26 -19
  30. package/dist/index131.mjs +20 -12
  31. package/dist/index132.mjs +12 -14
  32. package/dist/index133.mjs +14 -40
  33. package/dist/index134.mjs +40 -16
  34. package/dist/index135.mjs +15 -260
  35. package/dist/index136.mjs +262 -64
  36. package/dist/index137.mjs +69 -7
  37. package/dist/index138.mjs +8 -2
  38. package/dist/index139.mjs +2 -2
  39. package/dist/index140.mjs +2 -33
  40. package/dist/index141.mjs +33 -2
  41. package/dist/index142.mjs +2 -2
  42. package/dist/index143.mjs +1 -1
  43. package/dist/index145.mjs +1 -1
  44. package/dist/index146.mjs +2 -2
  45. package/dist/index15.mjs +26 -31
  46. package/dist/index150.mjs +2 -2
  47. package/dist/index153.mjs +4 -4
  48. package/dist/index154.mjs +5 -5
  49. package/dist/index155.mjs +2 -2
  50. package/dist/index157.mjs +2 -2
  51. package/dist/index158.mjs +2 -18
  52. package/dist/index159.mjs +11 -25
  53. package/dist/index160.mjs +26 -32
  54. package/dist/index161.mjs +32 -12
  55. package/dist/index162.mjs +9 -9
  56. package/dist/index163.mjs +18 -2
  57. package/dist/index164.mjs +2 -20
  58. package/dist/index165.mjs +13 -39
  59. package/dist/index166.mjs +46 -2
  60. package/dist/index167.mjs +2 -30
  61. package/dist/index168.mjs +24 -12
  62. package/dist/index169.mjs +18 -2
  63. package/dist/index170.mjs +2 -2
  64. package/dist/index171.mjs +2 -2
  65. package/dist/index172.mjs +2 -2
  66. package/dist/index173.mjs +2 -72
  67. package/dist/index174.mjs +72 -2
  68. package/dist/index175.mjs +2 -53
  69. package/dist/index176.mjs +53 -2
  70. package/dist/index177.mjs +2 -36
  71. package/dist/index178.mjs +30 -146
  72. package/dist/index179.mjs +152 -2
  73. package/dist/index180.mjs +2 -2
  74. package/dist/index181.mjs +2 -19
  75. package/dist/index182.mjs +19 -2
  76. package/dist/index183.mjs +2 -2
  77. package/dist/index184.mjs +2 -26
  78. package/dist/index185.mjs +26 -2
  79. package/dist/index186.mjs +2 -2
  80. package/dist/index187.mjs +2 -24
  81. package/dist/index188.mjs +17 -16
  82. package/dist/index189.mjs +23 -2
  83. package/dist/index191.mjs +2 -2
  84. package/dist/index192.mjs +2 -23
  85. package/dist/index193.mjs +23 -2
  86. package/dist/index194.mjs +2 -23
  87. package/dist/index195.mjs +23 -2
  88. package/dist/index196.mjs +2 -2
  89. package/dist/index198.mjs +2 -23
  90. package/dist/index199.mjs +23 -2
  91. package/dist/index200.mjs +2 -23
  92. package/dist/index201.mjs +23 -2
  93. package/dist/index202.mjs +2 -2
  94. package/dist/index203.mjs +2 -2
  95. package/dist/index205.mjs +2 -2
  96. package/dist/index206.mjs +2 -2
  97. package/dist/index207.mjs +2 -2
  98. package/dist/index208.mjs +2 -2
  99. package/dist/index209.mjs +2 -127
  100. package/dist/index210.mjs +127 -2
  101. package/dist/index211.mjs +2 -74
  102. package/dist/index212.mjs +59 -59
  103. package/dist/index213.mjs +74 -2
  104. package/dist/index214.mjs +31 -2
  105. package/dist/index215.mjs +11 -2
  106. package/dist/index216.mjs +4 -2
  107. package/dist/index217.mjs +4 -2
  108. package/dist/index218.mjs +13 -2
  109. package/dist/index219.mjs +7 -2
  110. package/dist/index220.mjs +12 -2
  111. package/dist/index221.mjs +4 -107
  112. package/dist/index222.mjs +33 -2
  113. package/dist/index223.mjs +31 -2
  114. package/dist/index224.mjs +27 -36
  115. package/dist/index225.mjs +61 -2
  116. package/dist/index226.mjs +2 -2
  117. package/dist/index227.mjs +97 -233
  118. package/dist/index228.mjs +2 -2
  119. package/dist/index229.mjs +2 -33
  120. package/dist/index230.mjs +2 -65
  121. package/dist/index231.mjs +2 -25
  122. package/dist/index232.mjs +2 -2
  123. package/dist/index233.mjs +2 -2
  124. package/dist/index234.mjs +2 -2
  125. package/dist/index236.mjs +2 -2
  126. package/dist/index238.mjs +37 -2
  127. package/dist/index240.mjs +243 -30
  128. package/dist/index241.mjs +2 -11
  129. package/dist/index242.mjs +32 -3
  130. package/dist/index243.mjs +64 -3
  131. package/dist/index244.mjs +25 -13
  132. package/dist/index245.mjs +2 -7
  133. package/dist/index246.mjs +2 -12
  134. package/dist/index247.mjs +2 -5
  135. package/dist/index248.mjs +2 -33
  136. package/dist/index249.mjs +2 -31
  137. package/dist/index250.mjs +2 -28
  138. package/dist/index251.mjs +2 -61
  139. package/dist/index252.mjs +2 -2
  140. package/dist/index253.mjs +2 -4
  141. package/dist/index254.mjs +4 -2
  142. package/dist/index255.mjs +2 -2
  143. package/dist/index257.mjs +3 -2
  144. package/dist/index258.mjs +2 -18
  145. package/dist/index259.mjs +2 -47
  146. package/dist/index26.mjs +2 -1
  147. package/dist/index260.mjs +2 -2
  148. package/dist/index261.mjs +17 -2
  149. package/dist/index262.mjs +13 -2
  150. package/dist/index263.mjs +6 -2
  151. package/dist/index264.mjs +30 -91
  152. package/dist/index265.mjs +2 -2
  153. package/dist/index266.mjs +18 -3
  154. package/dist/index267.mjs +47 -2
  155. package/dist/index268.mjs +2 -2
  156. package/dist/index269.mjs +2 -17
  157. package/dist/index27.mjs +20 -10
  158. package/dist/index270.mjs +2 -13
  159. package/dist/index271.mjs +2 -6
  160. package/dist/index272.mjs +91 -30
  161. package/dist/index273.mjs +2 -2
  162. package/dist/index275.mjs +2 -2
  163. package/dist/index276.mjs +5 -0
  164. package/dist/index32.mjs +8 -1
  165. package/dist/index33.mjs +17 -16
  166. package/dist/index34.mjs +44 -35
  167. package/dist/index35.mjs +1 -1
  168. package/dist/index36.mjs +1 -1
  169. package/dist/index37.mjs +25 -17
  170. package/dist/index38.mjs +1 -1
  171. package/dist/index39.mjs +1 -1
  172. package/dist/index40.mjs +2 -2
  173. package/dist/index42.mjs +2 -2
  174. package/dist/index45.mjs +3 -3
  175. package/dist/index49.mjs +1 -1
  176. package/dist/index55.mjs +2 -2
  177. package/dist/index56.mjs +1 -1
  178. package/dist/index57.mjs +1 -1
  179. package/dist/index58.mjs +1 -1
  180. package/dist/index59.mjs +1 -1
  181. package/dist/index60.mjs +1 -1
  182. package/dist/index61.mjs +1 -1
  183. package/dist/index62.mjs +1 -1
  184. package/dist/index63.mjs +1 -1
  185. package/dist/index64.mjs +54 -54
  186. package/dist/index65.mjs +1 -1
  187. package/dist/index66.mjs +1 -1
  188. package/dist/index67.mjs +1 -1
  189. package/dist/index68.mjs +133 -22
  190. package/dist/index69.mjs +4 -152
  191. package/dist/index70.mjs +23 -2
  192. package/dist/index71.mjs +21 -20
  193. package/dist/index72.mjs +2 -75
  194. package/dist/index73.mjs +153 -15
  195. package/dist/index74.mjs +68 -56
  196. package/dist/index75.mjs +15 -5
  197. package/dist/index76.mjs +63 -2
  198. package/dist/index77.mjs +34 -6
  199. package/dist/index78.mjs +42 -1133
  200. package/dist/index79.mjs +2 -20
  201. package/dist/index80.mjs +5 -54
  202. package/dist/index81.mjs +1126 -25
  203. package/dist/index82.mjs +20 -2
  204. package/dist/index83.mjs +55 -2
  205. package/dist/index84.mjs +33 -34
  206. package/dist/index85.mjs +2 -43
  207. package/package.json +2 -2
  208. package/src/components/Checkout.tsx +2 -2
package/dist/index82.mjs CHANGED
@@ -1,5 +1,23 @@
1
1
  'use client';
2
- var e = {};
2
+ import { __exports as e } from "./index139.mjs";
3
+ import "./index80.mjs";
4
+ import u from "react";
5
+ import { __exports as n } from "./index85.mjs";
6
+ var o;
7
+ function d() {
8
+ return o ? e : (o = 1, function(t) {
9
+ Object.defineProperty(t, "__esModule", {
10
+ value: !0
11
+ }), Object.defineProperty(t, "RouterContext", {
12
+ enumerable: !0,
13
+ get: function() {
14
+ return r;
15
+ }
16
+ });
17
+ const r = (/* @__PURE__ */ n._(u)).default.createContext(null);
18
+ process.env.NODE_ENV !== "production" && (r.displayName = "RouterContext");
19
+ }(e), e);
20
+ }
3
21
  export {
4
- e as __exports
22
+ d as __require
5
23
  };
package/dist/index83.mjs CHANGED
@@ -1,5 +1,58 @@
1
1
  'use client';
2
- var o = { exports: {} };
2
+ import { __exports as o } from "./index140.mjs";
3
+ import { __require as p } from "./index141.mjs";
4
+ var u;
5
+ function m() {
6
+ return u ? o : (u = 1, function(i) {
7
+ Object.defineProperty(i, "__esModule", {
8
+ value: !0
9
+ });
10
+ function f(e, r) {
11
+ for (var t in r) Object.defineProperty(e, t, {
12
+ enumerable: !0,
13
+ get: r[t]
14
+ });
15
+ }
16
+ f(i, {
17
+ /**
18
+ * Checks whether the given value is a NextError.
19
+ * This can be used to print a more detailed error message with properties like `code` & `digest`.
20
+ */
21
+ default: function() {
22
+ return s;
23
+ },
24
+ getProperError: function() {
25
+ return a;
26
+ }
27
+ });
28
+ const c = p();
29
+ function s(e) {
30
+ return typeof e == "object" && e !== null && "name" in e && "message" in e;
31
+ }
32
+ function d(e) {
33
+ const r = /* @__PURE__ */ new WeakSet();
34
+ return JSON.stringify(e, (t, n) => {
35
+ if (typeof n == "object" && n !== null) {
36
+ if (r.has(n))
37
+ return "[Circular]";
38
+ r.add(n);
39
+ }
40
+ return n;
41
+ });
42
+ }
43
+ function a(e) {
44
+ if (s(e))
45
+ return e;
46
+ if (process.env.NODE_ENV === "development") {
47
+ if (typeof e > "u")
48
+ return new Error("An undefined error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined");
49
+ if (e === null)
50
+ return new Error("A null error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined");
51
+ }
52
+ return new Error((0, c.isPlainObject)(e) ? d(e) : e + "");
53
+ }
54
+ }(o), o);
55
+ }
3
56
  export {
4
- o as __module
57
+ m as __require
5
58
  };
package/dist/index84.mjs CHANGED
@@ -1,37 +1,36 @@
1
1
  'use client';
2
- var a = (i, t, e = {}) => {
3
- let r = `${i}=${t}`;
4
- if (i.startsWith("__Secure-") && !e.secure)
5
- throw new Error("__Secure- Cookie must have Secure attributes");
6
- if (i.startsWith("__Host-")) {
7
- if (!e.secure)
8
- throw new Error("__Host- Cookie must have Secure attributes");
9
- if (e.path !== "/")
10
- throw new Error('__Host- Cookie must have Path attributes with "/"');
11
- if (e.domain)
12
- throw new Error("__Host- Cookie must not have Domain attributes");
13
- }
14
- if (e && typeof e.maxAge == "number" && e.maxAge >= 0) {
15
- if (e.maxAge > 3456e4)
16
- throw new Error(
17
- "Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration."
18
- );
19
- r += `; Max-Age=${e.maxAge | 0}`;
20
- }
21
- if (e.domain && e.prefix !== "host" && (r += `; Domain=${e.domain}`), e.path && (r += `; Path=${e.path}`), e.expires) {
22
- if (e.expires.getTime() - Date.now() > 3456e7)
23
- throw new Error(
24
- "Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future."
25
- );
26
- r += `; Expires=${e.expires.toUTCString()}`;
27
- }
28
- if (e.httpOnly && (r += "; HttpOnly"), e.secure && (r += "; Secure"), e.sameSite && (r += `; SameSite=${e.sameSite.charAt(0).toUpperCase() + e.sameSite.slice(1)}`), e.priority && (r += `; Priority=${e.priority.charAt(0).toUpperCase() + e.priority.slice(1)}`), e.partitioned) {
29
- if (!e.secure)
30
- throw new Error("Partitioned Cookie must have Secure attributes");
31
- r += "; Partitioned";
32
- }
33
- return r;
34
- }, s = (i, t, e) => (t = encodeURIComponent(t), a(i, t, e));
2
+ import { __module as u } from "./index142.mjs";
3
+ import d from "react/jsx-runtime";
4
+ import "react";
5
+ import { __require as c } from "./index73.mjs";
6
+ var n;
7
+ function y() {
8
+ return n ? u.exports : (n = 1, function(a, e) {
9
+ Object.defineProperty(e, "__esModule", {
10
+ value: !0
11
+ }), Object.defineProperty(e, "default", {
12
+ enumerable: !0,
13
+ get: function() {
14
+ return l;
15
+ }
16
+ });
17
+ const f = d, o = c();
18
+ function l(t) {
19
+ function r(i) {
20
+ return /* @__PURE__ */ (0, f.jsx)(t, {
21
+ router: (0, o.useRouter)(),
22
+ ...i
23
+ });
24
+ }
25
+ if (r.getInitialProps = t.getInitialProps, r.origGetInitialProps = t.origGetInitialProps, process.env.NODE_ENV !== "production") {
26
+ const i = t.displayName || t.name || "Unknown";
27
+ r.displayName = "withRouter(" + i + ")";
28
+ }
29
+ return r;
30
+ }
31
+ (typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), a.exports = e.default);
32
+ }(u, u.exports), u.exports);
33
+ }
35
34
  export {
36
- s as serialize
35
+ y as __require
37
36
  };
package/dist/index85.mjs CHANGED
@@ -1,46 +1,5 @@
1
1
  'use client';
2
- var s = (e, r) => (e = e.replace(/\/+$/, ""), e = e + "/", r = r.replace(/^\/+/, ""), e + r), p = (e, r) => {
3
- for (const [n, t] of Object.entries(r)) {
4
- const c = new RegExp("/:" + n + "(?:{[^/]+})?\\??");
5
- e = e.replace(c, t ? `/${t}` : "");
6
- }
7
- return e;
8
- }, f = (e) => {
9
- const r = new URLSearchParams();
10
- for (const [n, t] of Object.entries(e))
11
- if (t !== void 0)
12
- if (Array.isArray(t))
13
- for (const c of t)
14
- r.append(n, c);
15
- else
16
- r.set(n, t);
17
- return r;
18
- }, i = (e, r) => {
19
- switch (r) {
20
- case "ws":
21
- return e.replace(/^http/, "ws");
22
- case "http":
23
- return e.replace(/^ws/, "http");
24
- }
25
- }, l = (e) => /^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e) ? e.replace(/\/index(?=\?|$)/, "/") : e.replace(/\/index(?=\?|$)/, "");
26
- function a(e) {
27
- return typeof e == "object" && e !== null && !Array.isArray(e);
28
- }
29
- function o(e, r) {
30
- if (!a(e) && !a(r))
31
- return r;
32
- const n = { ...e };
33
- for (const t in r) {
34
- const c = r[t];
35
- a(n[t]) && a(c) ? n[t] = o(n[t], c) : n[t] = c;
36
- }
37
- return n;
38
- }
2
+ var e = {};
39
3
  export {
40
- f as buildSearchParams,
41
- o as deepMerge,
42
- s as mergePath,
43
- l as removeIndexString,
44
- p as replaceUrlParam,
45
- i as replaceUrlProtocol
4
+ e as __exports
46
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instockng/storefront-ui",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
4
4
  "description": "Pre-built UI components for OMS e-commerce sites",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -45,7 +45,7 @@
45
45
  "author": "Ola Wale",
46
46
  "license": "MIT",
47
47
  "dependencies": {
48
- "@instockng/api-client": "^1.0.27",
48
+ "@instockng/api-client": "^1.0.35",
49
49
  "class-variance-authority": "^0.7.1",
50
50
  "clsx": "^2.1.0",
51
51
  "react-facebook-pixel": "^1.0.4",
@@ -752,7 +752,7 @@ export function Checkout({
752
752
  className="flex items-center justify-center gap-2 p-3 bg-green-500 hover:bg-green-600 rounded-lg transition-colors"
753
753
  >
754
754
  <img
755
- src="https://toyland.ng/cdn-cgi/image/width=64/icon-whatsapp.svg"
755
+ src="https://toyland.ng/icon-whatsapp.svg"
756
756
  alt="WhatsApp"
757
757
  className="h-5 w-5"
758
758
  />
@@ -896,7 +896,7 @@ export function Checkout({
896
896
  <option disabled value="">{selectedState ? 'Select Delivery Zone' : 'Select State First'}</option>
897
897
  {selectedState?.zones.map((zone) => (
898
898
  <option key={zone.id} value={zone.id}>
899
- {zone.name} ({formatCurrency(zone.deliveryCost)})
899
+ {zone.name}
900
900
  </option>
901
901
  ))}
902
902
  </FormSelect>