@billgangcom/theme-lib 1.111.7 → 1.112.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.
- package/dist/{builder-iDTY-5V6.cjs → builder-BJi41gLj.cjs} +2 -2
- package/dist/{builder-CVkU9IhV.js → builder-BPcwschw.js} +5 -5
- package/dist/{builder-components-Bgp-Ty-V.cjs → builder-components-DiSJ943W.cjs} +1 -1
- package/dist/{builder-components-C5ikkE9d.js → builder-components-Dzh-02cy.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +22 -22
- package/dist/{charge-DpDinsX8.js → charge-BXhHGVZ9.js} +1654 -1624
- package/dist/{charge-u_nBOUZM.cjs → charge-Ud-AcF5N.cjs} +21 -21
- package/dist/{checkout-DOWk8tpf.cjs → checkout-C6Krps7T.cjs} +1 -1
- package/dist/{checkout-CB2oKUQS.js → checkout-CJf-hrQS.js} +5 -5
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-C0o5qJiP.cjs → index-BJRGrwnd.cjs} +1 -1
- package/dist/{index-BQpvc-IY.js → index-BOlJB8PY.js} +5 -5
- package/dist/{index-CDzE4F39.js → index-BubR1-4r.js} +1 -1
- package/dist/{index-CDvIVBhf.js → index-C1RZaf85.js} +5 -5
- package/dist/{index-BFRcuDVu.cjs → index-C79AL-SX.cjs} +1 -1
- package/dist/{index-CQ-gkekH.js → index-CTAMb5Ws.js} +5 -5
- package/dist/{index-BD7IfwmI.cjs → index-Cm1WxtE8.cjs} +1 -1
- package/dist/{index-BWZ2h_7x.cjs → index-DZA2Qg7A.cjs} +1 -1
- package/dist/{index-BQQCnV_m.cjs → index-DnOKr-Mo.cjs} +1 -1
- package/dist/{index-_d_pN1E3.js → index-HqoVN9QS.js} +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/order-BAgqXjj2.cjs +1 -0
- package/dist/order-BRLSB3Nu.js +318 -0
- package/dist/src/storefront/components/RefundNotificationModal/index.d.ts +9 -0
- package/dist/src/storefront/models/order.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/{subscription-6XMGDbBf.js → subscription-CX2OMarS.js} +5 -5
- package/dist/{subscription-CPAjLrRF.cjs → subscription-ytzGgkBp.cjs} +1 -1
- package/dist/{ticket-DnsQQIx0.js → ticket-Bw4zmgVj.js} +142 -142
- package/dist/{ticket-CF6cbjcW.cjs → ticket-Cf9H1nLd.cjs} +4 -4
- package/dist/{top-up-CYG44xXH.cjs → top-up-B6LSLdw1.cjs} +1 -1
- package/dist/{top-up-CwepC-U_.js → top-up-CLwqsSvK.js} +5 -5
- package/dist/{ui-components-y9HAFfSv.cjs → ui-components-BM4zwk9v.cjs} +1 -1
- package/dist/{ui-components-BnzhZmPH.js → ui-components-DvdK_Pju.js} +4 -4
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-C18qAKPo.cjs → validation-B_VyjaOh.cjs} +1 -1
- package/dist/{validation-Dc9nm0Et.js → validation-DBN8rMc3.js} +5 -5
- package/package.json +1 -1
- package/dist/order-DZ1zWuuY.js +0 -228
- package/dist/order-VojuN1Fs.cjs +0 -1
|
@@ -3,10 +3,10 @@ var an = (c, t, s) => t in c ? sn(c, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Tt = (c, t, s) => an(c, typeof t != "symbol" ? t + "" : t, s);
|
|
4
4
|
import { jsx as e, jsxs as u, Fragment as G } from "react/jsx-runtime";
|
|
5
5
|
import b, { createElement as gt, PureComponent as on } from "react";
|
|
6
|
-
import { f as q, ac as it, j as jt, r as Ht, m as pt, V as Ve, ad as Vt, J as be, v as le, ae as kt, af as Ct, b as We, l as cn, e as je, p as mt, _ as me, a4 as rn, M as ln, ag as dn, ah as Wt, k as un } from "./builder-
|
|
7
|
-
import { U as hn, u as ze, G as pn } from "./charge-
|
|
8
|
-
import { u as Ge, d as Xe, D as Ye, e as Ke, v as Qe, f as Je, g as Ze, C as et, F as Gt } from "./builder-components-
|
|
9
|
-
import { s as Oe, g as mn, u as fn } from "./ticket-
|
|
6
|
+
import { f as q, ac as it, j as jt, r as Ht, m as pt, V as Ve, ad as Vt, J as be, v as le, ae as kt, af as Ct, b as We, l as cn, e as je, p as mt, _ as me, a4 as rn, M as ln, ag as dn, ah as Wt, k as un } from "./builder-BPcwschw.js";
|
|
7
|
+
import { U as hn, u as ze, G as pn } from "./charge-BXhHGVZ9.js";
|
|
8
|
+
import { u as Ge, d as Xe, D as Ye, e as Ke, v as Qe, f as Je, g as Ze, C as et, F as Gt } from "./builder-components-Dzh-02cy.js";
|
|
9
|
+
import { s as Oe, g as mn, u as fn } from "./ticket-Bw4zmgVj.js";
|
|
10
10
|
import gn from "react-dom";
|
|
11
11
|
const _n = "_wrapper_5w9s8_1", vn = {
|
|
12
12
|
wrapper: _n
|
package/dist/ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ui-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ui-components-BM4zwk9v.cjs");exports.Accordion=t.Accordion;exports.AlignText=t.AlignText;exports.BurgerMenuButton=t.BurgerMenuButton;exports.Button=t.Button;exports.ButtonSettings=t.ButtonSettings;exports.ButtonTypeSettings=t.ButtonTypeSettings;exports.ButtonsSettings=t.ButtonsSettings;exports.CategorySettings=t.CategorySettings;exports.ChargeTypes=t.ChargeTypes;exports.Checkbox=t.Checkbox;exports.CheckboxSettings=t.CheckboxSettings;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.ConfirmationModal=t.ConfirmationModal;exports.EmptyCart=t.EmptyCart;exports.ErrorableBlock=t.ErrorableBlock;exports.FormSettings=t.FormSettings;exports.GroupCardModal=t.GroupCardModal;exports.HeaderButtons=t.HeaderButtons;exports.Icon=t.Icon;exports.InputSettings=t.InputSettings;exports.InputUI=t.Input;exports.ItemsSettings=t.ItemsSettings;exports.LayoutSettings=t.LayoutSettings;exports.Link=t.Link;exports.ListingSelector=t.ListingSelector;exports.Loader=t.Loader;exports.LoaderBuilder=t.LoaderBuilder;exports.MetaInfoPost=t.MetaInfoPost;exports.Modal=t.Modal;exports.NotificationBuilder=t.NotificationBuilder;exports.PagesMobileMenu=t.PagesMobileMenu;exports.PagesMobileModal=t.PagesMobileModal;exports.PagesSettings=t.PagesSettings;exports.ProductCardButtons=t.ProductCardButtons;exports.ProductCardModal=t.ProductCardModal;exports.ProductOptions=t.ProductOptions;exports.RadioUI=t.Radio;exports.RangeSelector=t.RangeSelector;exports.Select=t.Select;exports.SelectInfiniteList=t.SelectInfiniteList;exports.SelectTypeText=t.SelectTypeText;exports.SelectUI=t.Select;exports.ShareLink=t.ShareLink;exports.ShoppingButton=t.ShoppingButton;exports.ShoppingModalCart=t.ShoppingModalCart;exports.Switch=t.Switch;exports.TextSettings=t.TextSettings;exports.TextareaSettings=t.TextareaSettings;exports.TextareaUI=t.Textarea;exports.Tip=t.Tip;exports.TypesText=t.TypesText;exports.UserInfo=t.UserInfo;exports.Wrapper=t.Wrapper;
|
package/dist/ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t, A as e, Y as o, g as n, B as i, y as r, w as g, v as S, G as d, i as l, k as u, a5 as c, b as p, C as I, Q as B, E as C, F as M, a3 as T, J as h, I as x, c as y, f as L, t as P, q as f, $ as m, D as b, e as k, L as U, a1 as A, M as E, N as R, X as w, V as F, P as G, a0 as H, a2 as N, H as O, R as W, z as j, S as q, a6 as v, a4 as z, S as D, Z as J, K, O as Q, d as V, s as X, T as Y, j as Z, h as _, x as $, U as aa, W as sa } from "./ui-components-
|
|
1
|
+
import { _ as t, A as e, Y as o, g as n, B as i, y as r, w as g, v as S, G as d, i as l, k as u, a5 as c, b as p, C as I, Q as B, E as C, F as M, a3 as T, J as h, I as x, c as y, f as L, t as P, q as f, $ as m, D as b, e as k, L as U, a1 as A, M as E, N as R, X as w, V as F, P as G, a0 as H, a2 as N, H as O, R as W, z as j, S as q, a6 as v, a4 as z, S as D, Z as J, K, O as Q, d as V, s as X, T as Y, j as Z, h as _, x as $, U as aa, W as sa } from "./ui-components-DvdK_Pju.js";
|
|
2
2
|
export {
|
|
3
3
|
t as Accordion,
|
|
4
4
|
e as AlignText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),g=require("./charge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),g=require("./charge-Ud-AcF5N.cjs"),d=require("./builder-BJi41gLj.cjs"),u=require("./ui-components-BM4zwk9v.cjs");require("./builder-components-DiSJ943W.cjs");require("./ticket-Cf9H1nLd.cjs");require("react-dom");const j="_lock_1mxa7_1",b="_wrapper_1mxa7_12",I="_content_1mxa7_22",y="_info_1mxa7_31",N="_buttons_1mxa7_38",q="_button_1mxa7_38",k="_input_1mxa7_50",L="_error_1mxa7_57",s={lock:j,wrapper:b,content:I,info:y,buttons:N,button:q,input:k,error:L},V=()=>{const[f,n]=r.useState(!1),[h,w]=r.useState(!1),[c,P]=r.useState(""),{general:o,setGeneral:_}=d.useGeneralStore(),{setShopPassword:p}=d.useStorefrontStore(),i=d.useLocation(),m=d.useNavigate();r.useEffect(()=>{if(o&&(!o.info.passwordProtected||o.isPasswordValid)){const t=i.state.from==="/validation"?"/":i.state.from;m(t)}},[o]),r.useEffect(()=>{o||(async()=>{var x;n(!0);const l=localStorage.getItem("shopPassword")||"",a=await g.fetchGeneral(l);if(a.isPasswordValid){const S=((x=i.state)==null?void 0:x.from)||"/";m(S)}a.info.passwordProtected||(localStorage.removeItem("shopPassword"),p("")),_(a),n(!1)})()},[o]);async function v(){var l;n(!0);const t=await g.fetchGeneral(c);if(!t.isPasswordValid)w(!0);else{localStorage.setItem("shopPassword",c),p(c);const a=((l=i.state)==null?void 0:l.from)||"/";m(a),t.info.passwordProtected||(localStorage.removeItem("shopPassword"),p("")),_(t)}n(!1)}return e.jsxs("div",{className:s.wrapper,children:[!f&&e.jsxs("div",{className:s.content,children:[e.jsx("div",{className:s.lock,children:e.jsx(u.Icon,{name:"Lock",fill:"var(--text-secondary)",width:64,height:64})}),e.jsxs("div",{className:s.info,children:[e.jsx("h2",{id:"h2",className:s.title,children:"The store is password protected"}),e.jsx("p",{id:"p",className:s.description,children:"If you do not have a password, we recommend you to contact the technical support of the store or write to the mail"})]}),e.jsxs("div",{className:s.input,children:[e.jsx(u.Input,{type:"password",onChange:t=>{w(!1),P(t)},value:c,placeholder:"Password",required:!0}),e.jsx("span",{className:s.error,children:h&&"Incorrect password"})]}),e.jsx("div",{className:s.buttons,children:e.jsx(u.Button,{type:"Primary",className:s.button,disabled:h,onClick:v,children:"Submit"})})]}),f&&e.jsx(u.Loader,{})]})};exports.ValidationPage=V;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import { V as g } from "./charge-
|
|
4
|
-
import { V as I, M as b, ab as x, p as N } from "./builder-
|
|
5
|
-
import { I as y, f as k, g as V, e as L } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import "./ticket-
|
|
3
|
+
import { V as g } from "./charge-BXhHGVZ9.js";
|
|
4
|
+
import { V as I, M as b, ab as x, p as N } from "./builder-BPcwschw.js";
|
|
5
|
+
import { I as y, f as k, g as V, e as L } from "./ui-components-DvdK_Pju.js";
|
|
6
|
+
import "./builder-components-Dzh-02cy.js";
|
|
7
|
+
import "./ticket-Bw4zmgVj.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const E = "_lock_1mxa7_1", G = "_wrapper_1mxa7_12", j = "_content_1mxa7_22", C = "_info_1mxa7_31", q = "_buttons_1mxa7_38", B = "_button_1mxa7_38", M = "_input_1mxa7_50", R = "_error_1mxa7_57", t = {
|
|
10
10
|
lock: E,
|
package/package.json
CHANGED
package/dist/order-DZ1zWuuY.js
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { jsx as s, Fragment as R, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import r, { useState as B } from "react";
|
|
3
|
-
import { X as I, a7 as $, p as L, V as M } from "./builder-CVkU9IhV.js";
|
|
4
|
-
import { f as F, N as x, P as W, O as E, g as V, b as j, c as q, d as G, e as U, L as z, T as H, h as T, i as J, j as X, k as K, l as Q, m as Y, n as Z } from "./charge-DpDinsX8.js";
|
|
5
|
-
import { e as ee, g as te, I as ae } from "./ui-components-BnzhZmPH.js";
|
|
6
|
-
import "./builder-components-C5ikkE9d.js";
|
|
7
|
-
import "./ticket-DnsQQIx0.js";
|
|
8
|
-
import "react-dom";
|
|
9
|
-
const se = async (a = 1) => await F({ PageNumber: a }), Ie = () => {
|
|
10
|
-
const [a, l] = r.useState(null), [u, e] = B(null), [k, N] = r.useState(0), { page: g } = I(), [v, c] = r.useState(!0);
|
|
11
|
-
async function S() {
|
|
12
|
-
c(!0);
|
|
13
|
-
const { list: h, totalCount: m } = await se(g);
|
|
14
|
-
l(h), N(m), e(null), c(!1);
|
|
15
|
-
}
|
|
16
|
-
async function w() {
|
|
17
|
-
const h = (a == null ? void 0 : a.map((f) => f.gatewayName)) || [], m = await V(h);
|
|
18
|
-
e(m);
|
|
19
|
-
}
|
|
20
|
-
return r.useEffect(() => {
|
|
21
|
-
!u && a && w();
|
|
22
|
-
}, [a, u]), r.useEffect(() => {
|
|
23
|
-
S();
|
|
24
|
-
}, [g]), /* @__PURE__ */ s(R, { children: a != null && a.length && a.length === 0 ? /* @__PURE__ */ s(
|
|
25
|
-
x,
|
|
26
|
-
{
|
|
27
|
-
title: "No Orders",
|
|
28
|
-
description: "When you purchase products from our website, you'll see a history of orders here."
|
|
29
|
-
}
|
|
30
|
-
) : /* @__PURE__ */ i(R, { children: [
|
|
31
|
-
/* @__PURE__ */ s(W, { title: "Orders" }),
|
|
32
|
-
/* @__PURE__ */ s(
|
|
33
|
-
E,
|
|
34
|
-
{
|
|
35
|
-
orders: a,
|
|
36
|
-
gatewaysDetail: u,
|
|
37
|
-
totalCount: k,
|
|
38
|
-
isLoading: v
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
] }) });
|
|
42
|
-
}, oe = "_orderPage_gc87l_1", ce = "_leftSection_gc87l_15", ne = "_content_gc87l_35", ie = "_main_gc87l_42", re = "_mainAntistock_gc87l_56", le = "_orderMainDataAntistock_gc87l_69", de = "_timelineBlockAntistock_gc87l_81", ue = "_footerAntistock_gc87l_92", me = "_statusBlock_gc87l_104", ge = "_timelineBlock_gc87l_81", he = "_footer_gc87l_92", _e = "_rightSection_gc87l_121", pe = "_header_gc87l_142", fe = "_productList_gc87l_150", ye = "_mobileFooter_gc87l_157", ke = "_loaderContainer_gc87l_166", Ne = "_orderMainData_gc87l_69", ve = "_prices_gc87l_181", Se = "_headerTitle_gc87l_185", we = "_headerDescription_gc87l_189", o = {
|
|
43
|
-
orderPage: oe,
|
|
44
|
-
leftSection: ce,
|
|
45
|
-
content: ne,
|
|
46
|
-
main: ie,
|
|
47
|
-
mainAntistock: re,
|
|
48
|
-
orderMainDataAntistock: le,
|
|
49
|
-
timelineBlockAntistock: de,
|
|
50
|
-
footerAntistock: ue,
|
|
51
|
-
statusBlock: me,
|
|
52
|
-
timelineBlock: ge,
|
|
53
|
-
footer: he,
|
|
54
|
-
rightSection: _e,
|
|
55
|
-
header: pe,
|
|
56
|
-
productList: fe,
|
|
57
|
-
mobileFooter: ye,
|
|
58
|
-
loaderContainer: ke,
|
|
59
|
-
orderMainData: Ne,
|
|
60
|
-
prices: ve,
|
|
61
|
-
headerTitle: Se,
|
|
62
|
-
headerDescription: we
|
|
63
|
-
}, Oe = () => {
|
|
64
|
-
var f, O, A, C, D, P;
|
|
65
|
-
const { id: a, accessToken: l } = $(), u = L(), [e, k] = r.useState(), [N, g] = r.useState(!1), v = j(), { isAntistock: c } = M(), S = ((f = e == null ? void 0 : e.rawPrice) == null ? void 0 : f.currency) || "USD", w = new Intl.NumberFormat("en-US", {
|
|
66
|
-
style: "currency",
|
|
67
|
-
currency: S
|
|
68
|
-
}), h = r.useMemo(() => (e == null ? void 0 : e.partOrders.map((t) => {
|
|
69
|
-
var _, y;
|
|
70
|
-
return {
|
|
71
|
-
id: (t == null ? void 0 : t.id) || 0,
|
|
72
|
-
image: t.productWithVariant.image,
|
|
73
|
-
name: (() => {
|
|
74
|
-
var p, b;
|
|
75
|
-
const n = ((p = t.productWithVariant) == null ? void 0 : p.name) || "", d = ((b = t.productWithVariant) == null ? void 0 : b.variantName) || "";
|
|
76
|
-
return !n && !d ? "" : !d || n === d ? n : n ? `${n} (${d})` : d;
|
|
77
|
-
})(),
|
|
78
|
-
description: "",
|
|
79
|
-
price: {
|
|
80
|
-
quantity: t.quantity,
|
|
81
|
-
amount: ((_ = t.productWithVariant) == null ? void 0 : _.price.amount) || 0,
|
|
82
|
-
currency: (y = t.productWithVariant) == null ? void 0 : y.price.currency
|
|
83
|
-
},
|
|
84
|
-
deliveryCategories: "deliveryCategories" in t ? t.deliveryCategories : void 0,
|
|
85
|
-
customerNote: t.customerNote,
|
|
86
|
-
chargeType: t.chargeType || "ONE_TIME",
|
|
87
|
-
replacementRequests: "replacementRequests" in t ? t.replacementRequests : void 0,
|
|
88
|
-
allowedReplacementReasons: "allowedReplacementReasons" in t ? t.allowedReplacementReasons : void 0
|
|
89
|
-
};
|
|
90
|
-
})) || [], [e]), m = async (t, _, y = !1) => {
|
|
91
|
-
var d, p;
|
|
92
|
-
y || g(!0);
|
|
93
|
-
const { data: n } = await (_ ? K(`${t}/${_}`) : Q(t));
|
|
94
|
-
g(!1), n.status !== Y.Completed && ((d = n.charge) == null ? void 0 : d.status) === Z.NotPaid && u(`/charges/${(p = n.charge) == null ? void 0 : p.id}`, {
|
|
95
|
-
replace: !0
|
|
96
|
-
}), k(n);
|
|
97
|
-
};
|
|
98
|
-
return r.useLayoutEffect(() => {
|
|
99
|
-
if (a && !l) {
|
|
100
|
-
const t = JSON.parse(localStorage.getItem("orders") || "{}");
|
|
101
|
-
t[a] && u(`/orders/${a}/${t[a].fullAccessToken}`);
|
|
102
|
-
}
|
|
103
|
-
}, [a]), r.useEffect(() => {
|
|
104
|
-
a && m(a, l, !0);
|
|
105
|
-
const t = setInterval(() => {
|
|
106
|
-
a && m(a, l, !0);
|
|
107
|
-
}, 5e3);
|
|
108
|
-
return () => {
|
|
109
|
-
clearInterval(t);
|
|
110
|
-
};
|
|
111
|
-
}, [a, l]), N ? /* @__PURE__ */ s("div", { className: o.loaderContainer, children: /* @__PURE__ */ s(ee, {}) }) : /* @__PURE__ */ i("div", { className: o.orderPage, children: [
|
|
112
|
-
/* @__PURE__ */ s("div", { className: o.leftSection, children: /* @__PURE__ */ i("div", { className: o.content, children: [
|
|
113
|
-
/* @__PURE__ */ s(q, {}),
|
|
114
|
-
e && /* @__PURE__ */ i("div", { className: `${o.main} ${c ? o.mainAntistock : ""}`, children: [
|
|
115
|
-
/* @__PURE__ */ s(
|
|
116
|
-
G,
|
|
117
|
-
{
|
|
118
|
-
className: o.statusBlock,
|
|
119
|
-
orderStatus: e.status
|
|
120
|
-
}
|
|
121
|
-
),
|
|
122
|
-
/* @__PURE__ */ i(
|
|
123
|
-
"div",
|
|
124
|
-
{
|
|
125
|
-
className: `${o.orderMainData} ${c ? o.orderMainDataAntistock : ""}`,
|
|
126
|
-
children: [
|
|
127
|
-
/* @__PURE__ */ s(
|
|
128
|
-
U,
|
|
129
|
-
{
|
|
130
|
-
lastUpdate: e.createdAt,
|
|
131
|
-
paymentType: (O = e.charge) == null ? void 0 : O.gateway,
|
|
132
|
-
email: e.customer ? e.customer.email : ((A = e.charge) == null ? void 0 : A.customerForCharge.email) || "",
|
|
133
|
-
orderId: e.id
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
"accessToken" in e.review && !c && /* @__PURE__ */ s(
|
|
137
|
-
z,
|
|
138
|
-
{
|
|
139
|
-
orderId: e.id,
|
|
140
|
-
review: e.review
|
|
141
|
-
}
|
|
142
|
-
)
|
|
143
|
-
]
|
|
144
|
-
}
|
|
145
|
-
),
|
|
146
|
-
e.charge && e.charge.timeline && /* @__PURE__ */ s(
|
|
147
|
-
H,
|
|
148
|
-
{
|
|
149
|
-
className: `${o.timelineBlock} ${c ? o.timelineBlockAntistock : ""}`,
|
|
150
|
-
timeline: e.charge.timeline
|
|
151
|
-
}
|
|
152
|
-
),
|
|
153
|
-
/* @__PURE__ */ s(
|
|
154
|
-
T,
|
|
155
|
-
{
|
|
156
|
-
className: `${o.footer} ${c ? o.footerAntistock : ""}`
|
|
157
|
-
}
|
|
158
|
-
)
|
|
159
|
-
] })
|
|
160
|
-
] }) }),
|
|
161
|
-
/* @__PURE__ */ s(
|
|
162
|
-
"div",
|
|
163
|
-
{
|
|
164
|
-
className: o.rightSection,
|
|
165
|
-
style: c ? { borderLeft: "1px solid var(--border-secondary)" } : void 0,
|
|
166
|
-
children: /* @__PURE__ */ i("div", { className: o.content, children: [
|
|
167
|
-
((C = e == null ? void 0 : e.charge) == null ? void 0 : C.name) && /* @__PURE__ */ i("header", { className: o.header, children: [
|
|
168
|
-
/* @__PURE__ */ i("div", { children: [
|
|
169
|
-
/* @__PURE__ */ s("h1", { className: o.headerTitle, children: e.charge.name }),
|
|
170
|
-
e.charge.description && /* @__PURE__ */ s("p", { className: o.headerDescription, children: e.charge.description })
|
|
171
|
-
] }),
|
|
172
|
-
c ? null : /* @__PURE__ */ i(
|
|
173
|
-
te,
|
|
174
|
-
{
|
|
175
|
-
type: "Secondary",
|
|
176
|
-
onClick: () => v((e == null ? void 0 : e.id) || ""),
|
|
177
|
-
style: {
|
|
178
|
-
whiteSpace: "nowrap",
|
|
179
|
-
display: "flex",
|
|
180
|
-
alignItems: "center",
|
|
181
|
-
gap: "4px"
|
|
182
|
-
},
|
|
183
|
-
children: [
|
|
184
|
-
/* @__PURE__ */ s(ae, { name: "Copy" }),
|
|
185
|
-
/* @__PURE__ */ s("span", { children: "Copy ID" })
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
)
|
|
189
|
-
] }),
|
|
190
|
-
/* @__PURE__ */ i("div", { children: [
|
|
191
|
-
/* @__PURE__ */ s("div", { className: o.productList, children: h.map((t) => /* @__PURE__ */ s(
|
|
192
|
-
J,
|
|
193
|
-
{
|
|
194
|
-
product: t,
|
|
195
|
-
isOrder: !0,
|
|
196
|
-
isApplicableForReplacement: e == null ? void 0 : e.isApplicableForReplacement,
|
|
197
|
-
orderId: a,
|
|
198
|
-
accessToken: l,
|
|
199
|
-
allowedReplacementReasons: e == null ? void 0 : e.allowedReplacementReasons
|
|
200
|
-
},
|
|
201
|
-
t.id
|
|
202
|
-
)) }),
|
|
203
|
-
c ? null : /* @__PURE__ */ s(
|
|
204
|
-
X,
|
|
205
|
-
{
|
|
206
|
-
formatter: w,
|
|
207
|
-
coupon: null,
|
|
208
|
-
total: ((D = e == null ? void 0 : e.endPrice) == null ? void 0 : D.amount) || 0,
|
|
209
|
-
discount: 0,
|
|
210
|
-
totalWithDiscount: ((P = e == null ? void 0 : e.endPrice) == null ? void 0 : P.amount) || 0,
|
|
211
|
-
className: o.prices,
|
|
212
|
-
isShowSubtotal: !1
|
|
213
|
-
}
|
|
214
|
-
),
|
|
215
|
-
/* @__PURE__ */ s(T, { className: o.mobileFooter })
|
|
216
|
-
] })
|
|
217
|
-
] })
|
|
218
|
-
}
|
|
219
|
-
)
|
|
220
|
-
] });
|
|
221
|
-
}, $e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
222
|
-
__proto__: null,
|
|
223
|
-
OrderPage: Oe
|
|
224
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
225
|
-
export {
|
|
226
|
-
Ie as O,
|
|
227
|
-
$e as i
|
|
228
|
-
};
|
package/dist/order-VojuN1Fs.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),r=require("react"),k=require("./builder-iDTY-5V6.cjs"),n=require("./charge-u_nBOUZM.cjs"),w=require("./ui-components-y9HAFfSv.cjs");require("./builder-components-Bgp-Ty-V.cjs");require("./ticket-CF6cbjcW.cjs");require("react-dom");const b=async(a=1)=>await n.fetchOrders({PageNumber:a}),B=()=>{const[a,l]=r.useState(null),[u,e]=r.useState(null),[x,j]=r.useState(0),{page:g}=k.usePaginationPagesStore(),[v,o]=r.useState(!0);async function N(){o(!0);const{list:h,totalCount:m}=await b(g);l(h),j(m),e(null),o(!1)}async function S(){const h=(a==null?void 0:a.map(f=>f.gatewayName))||[],m=await n.getGatewaysDetail(h);e(m)}return r.useEffect(()=>{!u&&a&&S()},[a,u]),r.useEffect(()=>{N()},[g]),t.jsx(t.Fragment,{children:a!=null&&a.length&&a.length===0?t.jsx(n.NoItemsBlock,{title:"No Orders",description:"When you purchase products from our website, you'll see a history of orders here."}):t.jsxs(t.Fragment,{children:[t.jsx(n.PageTitle,{title:"Orders"}),t.jsx(n.OrdersTable,{orders:a,gatewaysDetail:u,totalCount:x,isLoading:v})]})})},T="_orderPage_gc87l_1",$="_leftSection_gc87l_15",I="_content_gc87l_35",q="_main_gc87l_42",F="_mainAntistock_gc87l_56",L="_orderMainDataAntistock_gc87l_69",M="_timelineBlockAntistock_gc87l_81",W="_footerAntistock_gc87l_92",E="_statusBlock_gc87l_104",V="_timelineBlock_gc87l_81",G="_footer_gc87l_92",U="_rightSection_gc87l_121",z="_header_gc87l_142",H="_productList_gc87l_150",J="_mobileFooter_gc87l_157",K="_loaderContainer_gc87l_166",Q="_orderMainData_gc87l_69",X="_prices_gc87l_181",Y="_headerTitle_gc87l_185",Z="_headerDescription_gc87l_189",c={orderPage:T,leftSection:$,content:I,main:q,mainAntistock:F,orderMainDataAntistock:L,timelineBlockAntistock:M,footerAntistock:W,statusBlock:E,timelineBlock:V,footer:G,rightSection:U,header:z,productList:H,mobileFooter:J,loaderContainer:K,orderMainData:Q,prices:X,headerTitle:Y,headerDescription:Z},ee=()=>{var f,C,O,A,D,P;const{id:a,accessToken:l}=k.useParams(),u=k.useNavigate(),[e,x]=r.useState(),[j,g]=r.useState(!1),v=n.useCopy(),{isAntistock:o}=k.useGeneralStore(),N=((f=e==null?void 0:e.rawPrice)==null?void 0:f.currency)||"USD",S=new Intl.NumberFormat("en-US",{style:"currency",currency:N}),h=r.useMemo(()=>(e==null?void 0:e.partOrders.map(s=>{var _,y;return{id:(s==null?void 0:s.id)||0,image:s.productWithVariant.image,name:(()=>{var p,R;const i=((p=s.productWithVariant)==null?void 0:p.name)||"",d=((R=s.productWithVariant)==null?void 0:R.variantName)||"";return!i&&!d?"":!d||i===d?i:i?`${i} (${d})`:d})(),description:"",price:{quantity:s.quantity,amount:((_=s.productWithVariant)==null?void 0:_.price.amount)||0,currency:(y=s.productWithVariant)==null?void 0:y.price.currency},deliveryCategories:"deliveryCategories"in s?s.deliveryCategories:void 0,customerNote:s.customerNote,chargeType:s.chargeType||"ONE_TIME",replacementRequests:"replacementRequests"in s?s.replacementRequests:void 0,allowedReplacementReasons:"allowedReplacementReasons"in s?s.allowedReplacementReasons:void 0}}))||[],[e]),m=async(s,_,y=!1)=>{var d,p;y||g(!0);const{data:i}=await(_?n.fetchAuthorizedOrder(`${s}/${_}`):n.fetchOrder(s));g(!1),i.status!==n.OrderStatus.Completed&&((d=i.charge)==null?void 0:d.status)===n.ChargeStatus.NotPaid&&u(`/charges/${(p=i.charge)==null?void 0:p.id}`,{replace:!0}),x(i)};return r.useLayoutEffect(()=>{if(a&&!l){const s=JSON.parse(localStorage.getItem("orders")||"{}");s[a]&&u(`/orders/${a}/${s[a].fullAccessToken}`)}},[a]),r.useEffect(()=>{a&&m(a,l,!0);const s=setInterval(()=>{a&&m(a,l,!0)},5e3);return()=>{clearInterval(s)}},[a,l]),j?t.jsx("div",{className:c.loaderContainer,children:t.jsx(w.Loader,{})}):t.jsxs("div",{className:c.orderPage,children:[t.jsx("div",{className:c.leftSection,children:t.jsxs("div",{className:c.content,children:[t.jsx(n.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${c.main} ${o?c.mainAntistock:""}`,children:[t.jsx(n.OrderStatusBlock,{className:c.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${c.orderMainData} ${o?c.orderMainDataAntistock:""}`,children:[t.jsx(n.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(C=e.charge)==null?void 0:C.gateway,email:e.customer?e.customer.email:((O=e.charge)==null?void 0:O.customerForCharge.email)||"",orderId:e.id}),"accessToken"in e.review&&!o&&t.jsx(n.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(n.TrackPayment,{className:`${c.timelineBlock} ${o?c.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(n.CheckoutFooter,{className:`${c.footer} ${o?c.footerAntistock:""}`})]})]})}),t.jsx("div",{className:c.rightSection,style:o?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:c.content,children:[((A=e==null?void 0:e.charge)==null?void 0:A.name)&&t.jsxs("header",{className:c.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:c.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:c.headerDescription,children:e.charge.description})]}),o?null:t.jsxs(w.Button,{type:"Secondary",onClick:()=>v((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(w.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:c.productList,children:h.map(s=>t.jsx(n.CheckoutProduct,{product:s,isOrder:!0,isApplicableForReplacement:e==null?void 0:e.isApplicableForReplacement,orderId:a,accessToken:l,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},s.id))}),o?null:t.jsx(n.CheckoutPrices,{formatter:S,coupon:null,total:((D=e==null?void 0:e.endPrice)==null?void 0:D.amount)||0,discount:0,totalWithDiscount:((P=e==null?void 0:e.endPrice)==null?void 0:P.amount)||0,className:c.prices,isShowSubtotal:!1}),t.jsx(n.CheckoutFooter,{className:c.mobileFooter})]})]})})]})},te=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:ee},Symbol.toStringTag,{value:"Module"}));exports.Orders=B;exports.index=te;
|