@billgangcom/theme-lib 1.115.0 → 1.116.1
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-CVbCKY8a.js → builder-DUFJOYbB.js} +5 -5
- package/dist/{builder-Iu70o8Zi.cjs → builder-DqDtctC5.cjs} +2 -2
- package/dist/{builder-components-3ULrMVTv.cjs → builder-components-D3Bb10J8.cjs} +1 -1
- package/dist/{builder-components-BuaB_nik.js → builder-components-DzvQc6D4.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +34 -34
- package/dist/{charge-pzp63q8N.cjs → charge-I1l9O9oW.cjs} +41 -41
- package/dist/{charge-CqeINukp.js → charge-JAW-QeMZ.js} +8233 -7844
- package/dist/{checkout-YVutPZ7f.js → checkout-BvcF30gE.js} +5 -5
- package/dist/{checkout-B98fqO6J.cjs → checkout-CwhyZ4zD.cjs} +1 -1
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +7 -7
- package/dist/{index-CiY9zOlN.js → index-BGpMbUmG.js} +1 -1
- package/dist/{index-BV4ZiotJ.cjs → index-Bfh9GkFs.cjs} +1 -1
- package/dist/{index-D50xf07C.cjs → index-BsM2kPyQ.cjs} +1 -1
- package/dist/{index-D0izKDtJ.cjs → index-Cdm3FwGu.cjs} +1 -1
- package/dist/{index-C32vke_m.js → index-CyaRCiT9.js} +5 -5
- package/dist/{index-BUlydTOo.js → index-DcWpxbHI.js} +5 -5
- package/dist/{index-Ck3jvxGA.cjs → index-DjnhbFh9.cjs} +1 -1
- package/dist/{index-dHSb9Tg9.js → index-EjVO3qce.js} +5 -5
- package/dist/{index-B3WK0Wpu.js → index-bsPNagUY.js} +8 -8
- package/dist/{index-Lf_IZiQr.cjs → index-dp4B_uob.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +14 -14
- package/dist/order-BLPHbRzn.js +355 -0
- package/dist/order-DN9oIA9o.cjs +1 -0
- package/dist/src/storefront/api/index.d.ts +1 -0
- package/dist/src/storefront/api/vouches.d.ts +7 -0
- package/dist/src/storefront/components/VouchCard/index.d.ts +7 -0
- package/dist/src/storefront/components/VouchModal/index.d.ts +12 -0
- package/dist/src/storefront/components/index.d.ts +2 -0
- package/dist/src/storefront/models/shop.d.ts +1 -0
- package/dist/src/ui/Checkbox/index.d.ts +1 -0
- package/dist/src/ui/Textarea/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{subscription-D9tguRYG.js → subscription-D0TYbXFf.js} +5 -5
- package/dist/{subscription-4CHOOBkd.cjs → subscription-r7qA65EX.cjs} +1 -1
- package/dist/{ticket-BODLy8iD.js → ticket--uOANXoZ.js} +5 -5
- package/dist/{ticket-BKgdPBSh.cjs → ticket-BivnxhDp.cjs} +1 -1
- package/dist/{top-up-DR4KDupr.cjs → top-up-C13wralR.cjs} +1 -1
- package/dist/{top-up-BxIXamXN.js → top-up-u1oUf64a.js} +8 -8
- package/dist/ui-components-CC9DRvrZ.cjs +1 -0
- package/dist/{ui-components-B2XdfTmJ.js → ui-components-CqwUR9GH.js} +978 -968
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-B_jzusSg.cjs → validation-BtrRWzoi.cjs} +1 -1
- package/dist/{validation-BusGxggf.js → validation-ekksqWOd.js} +9 -9
- package/package.json +1 -1
- package/dist/order-C0KsOrOK.cjs +0 -1
- package/dist/order-D4daxyzU.js +0 -325
- package/dist/ui-components-DnGzB9kA.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e, jsxs as j } from "react/jsx-runtime";
|
|
2
|
-
import { u as D, C as N, a as x } from "./charge-
|
|
3
|
-
import { V as A, p as G } from "./builder-
|
|
2
|
+
import { u as D, C as N, a as x } from "./charge-JAW-QeMZ.js";
|
|
3
|
+
import { V as A, p as G } from "./builder-DUFJOYbB.js";
|
|
4
4
|
import c from "react";
|
|
5
|
-
import { e as P } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import "./ticket
|
|
5
|
+
import { e as P } from "./ui-components-CqwUR9GH.js";
|
|
6
|
+
import "./builder-components-DzvQc6D4.js";
|
|
7
|
+
import "./ticket--uOANXoZ.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const S = "_checkoutContainer_thje1_1", b = "_loaderContainer_thje1_20", s = {
|
|
10
10
|
checkoutContainer: S,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-I1l9O9oW.cjs"),u=require("./builder-DqDtctC5.cjs"),l=require("react"),_=require("./ui-components-CC9DRvrZ.cjs");require("./builder-components-D3Bb10J8.cjs");require("./ticket-BivnxhDp.cjs");require("react-dom");const b="_checkoutContainer_thje1_1",S="_loaderContainer_thje1_20",s={checkoutContainer:b,loaderContainer:S},D=()=>{const{isAntistock:r}=u.useGeneralStore(),{cart:t,products:c,pending:d,getTotalAndDiscount:C,getPossibleGateways:h,submitCart:p,setGateway:m,applyCoupon:g,setDiscordSocialConnectId:j,setCustomFields:k,applyCouponPending:y,coupon:i,removeCoupon:q,getDiscordSettings:v,setPaymentMethod:x,reset:f}=n.useCart(),a=l.useMemo(()=>C(),[i,t]),o=u.useNavigate();return l.useEffect(()=>{if(t.parts.length===0){if(r){o("/");return}try{o(-1)}catch{o("/")}}},[t.parts]),d?e.jsx("div",{className:s.checkoutContainer,children:e.jsx("div",{className:s.loaderContainer,children:e.jsx(_.Loader,{})})}):e.jsxs("div",{className:s.checkoutContainer,children:[e.jsx(n.CheckoutItems,{cart:t,products:c,applyCoupon:g,applyCouponPending:y,coupon:i,removeCoupon:q,totalAndDiscount:a}),e.jsx(n.CheckoutOperational,{cart:t,getPossibleGateways:h,setGateway:m,getDiscordSettings:v,products:c,submitCart:p,totalAndDiscount:a,setCustomFieldsToCart:k,setDiscordSocialConnectId:j,setPaymentMethod:x,reset:f,isAntistock:r})]})};exports.Checkout=D;
|
package/dist/exports.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-DqDtctC5.cjs");require("./ui-components-CC9DRvrZ.cjs");require("./builder-components-D3Bb10J8.cjs");const t=require("./charge-I1l9O9oW.cjs"),e=require("./ticket-BivnxhDp.cjs"),r=require("./checkout-CwhyZ4zD.cjs");require("react-dom");exports.AntistockRoutes=o.AntistockRoutes;exports.Routes=o.Routes;exports.formatPrice=o.formatPrice;exports.MarkdownText=t.MarkdownText;exports.ReCaptchaProvider=t.ReCaptchaProvider;exports.parseDraftJsText=t.parseDraftJsText;exports.useCart=t.useCart;exports.useGeneralInfo=t.useGeneralInfo;exports.useMarkdownIt=t.useMarkdownIt;exports.useReCaptcha=t.useReCaptcha;exports.ColorVariables=e.ColorVariables;exports.aspectRatioOptions=e.aspectRatioOptions;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.splitTextIntoSpans=e.splitTextIntoSpans;exports.useAdaptiveStyles=e.useAdaptiveStyles;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.Checkout=r.Checkout;
|
package/dist/exports.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Y as p, Z as u, _ as c } from "./builder-
|
|
4
|
-
import "./ui-components-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import { M as n, R as f,
|
|
7
|
-
import { C as k, c as I, h as T, i as v, r as w, d as M, s as N, u as P, e as b, b as A, a as B } from "./ticket
|
|
8
|
-
import { Checkout as
|
|
3
|
+
import { Y as p, Z as u, _ as c } from "./builder-DUFJOYbB.js";
|
|
4
|
+
import "./ui-components-CqwUR9GH.js";
|
|
5
|
+
import "./builder-components-DzvQc6D4.js";
|
|
6
|
+
import { M as n, R as f, I as l, u as d, H as x, J as C, G as R } from "./charge-JAW-QeMZ.js";
|
|
7
|
+
import { C as k, c as I, h as T, i as v, r as w, d as M, s as N, u as P, e as b, b as A, a as B } from "./ticket--uOANXoZ.js";
|
|
8
|
+
import { Checkout as J } from "./checkout-BvcF30gE.js";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
export {
|
|
11
11
|
p as AntistockRoutes,
|
|
12
|
-
|
|
12
|
+
J as Checkout,
|
|
13
13
|
k as ColorVariables,
|
|
14
14
|
n as MarkdownText,
|
|
15
15
|
f as ReCaptchaProvider,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import { ab as d, o as l, m as b, i as u, q as t, z as s } from "./builder-
|
|
2
|
+
import { ab as d, o as l, m as b, i as u, q as t, z as s } from "./builder-DUFJOYbB.js";
|
|
3
3
|
import k from "react";
|
|
4
4
|
const B = (i) => {
|
|
5
5
|
const { children: c } = i, { pathname: r } = d(), { setActiveBlock: e } = l(), { setActiveBlock: a } = b(), { setActiveBlock: o } = u();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-DqDtctC5.cjs");const r=require("react"),t=require("./ui-components-CC9DRvrZ.cjs");require("./builder-components-D3Bb10J8.cjs");require("./charge-I1l9O9oW.cjs");require("./ticket-BivnxhDp.cjs");require("react-dom");const i=()=>(r.useEffect(()=>{setTimeout(()=>{window.location.reload()},500)},[]),e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(t.Loader,{})}));exports.RouterErrorPage=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-DqDtctC5.cjs"),o=require("react"),l=r=>{const{children:i}=r,{pathname:a}=e.useLocation(),{setActiveBlock:t}=e.useNavbarStore(),{setActiveBlock:s}=e.useThemeSettingsStore(),{setActiveBlock:n}=e.usePreviewStore();return o.useEffect(()=>{switch(n({id:null,neededScroll:!1}),a){case"/admin/builder":t(e.navbarBlocks[0]);break;case"/admin/builder/add":t(e.navbarBlocks[1]);break;case"/admin/builder/theme":t(e.navbarBlocks[2]);break;case"/admin/builder/settings":t(e.navbarBlocks[3]);break;case"/admin/builder/theme/colors":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[0]);break;case"/admin/builder/theme/fonts":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[1]);break;case"/admin/builder/theme/borders":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[2]);break;case"/admin/builder/theme/buttons":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[3]);break;case"/admin/builder/theme/inputs":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[4]);break}},[a]),c.jsx(c.Fragment,{children:i})};exports.ActivePage=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-CC9DRvrZ.cjs");require("react");const n=require("./builder-DqDtctC5.cjs");require("./builder-components-D3Bb10J8.cjs");require("./charge-I1l9O9oW.cjs");require("./ticket-BivnxhDp.cjs");require("react-dom");const s="_wrapper_ej209_1",c="_content_ej209_12",a="_title_ej209_22",r={wrapper:s,content:c,title:a},l=()=>{const o=n.useNavigate(),t=n.useRouteError();return console.error("ROUTE ERROR: ",t),alert(t),e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Something Went Wrong"}),e.jsx(i.Button,{type:"Primary",onClick:()=>{o("/")},children:"Go Home"})]})})};exports.DynamicErrorPage=l;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { B as m, a as w, C as _ } from "./ui-components-
|
|
2
|
+
import { B as m, a as w, C as _ } from "./ui-components-CqwUR9GH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { j as I, r as b, s as j, b as v, J as P, k as T, u as k } from "./builder-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import "./charge-
|
|
7
|
-
import "./ticket
|
|
4
|
+
import { j as I, r as b, s as j, b as v, J as P, k as T, u as k } from "./builder-DUFJOYbB.js";
|
|
5
|
+
import "./builder-components-DzvQc6D4.js";
|
|
6
|
+
import "./charge-JAW-QeMZ.js";
|
|
7
|
+
import "./ticket--uOANXoZ.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const C = "_wrapper_1yd2j_1", A = "_error_1yd2j_11", N = "_title_1yd2j_21", B = "_buttons_1yd2j_29", i = {
|
|
10
10
|
wrapper: C,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "./builder-
|
|
2
|
+
import "./builder-DUFJOYbB.js";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { e as r } from "./ui-components-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import "./charge-
|
|
7
|
-
import "./ticket
|
|
4
|
+
import { e as r } from "./ui-components-CqwUR9GH.js";
|
|
5
|
+
import "./builder-components-DzvQc6D4.js";
|
|
6
|
+
import "./charge-JAW-QeMZ.js";
|
|
7
|
+
import "./ticket--uOANXoZ.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const f = () => (e.useEffect(() => {
|
|
10
10
|
setTimeout(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-CC9DRvrZ.cjs");require("react");const s=require("./builder-DqDtctC5.cjs");require("./builder-components-D3Bb10J8.cjs");require("./charge-I1l9O9oW.cjs");require("./ticket-BivnxhDp.cjs");require("react-dom");const j="_wrapper_1yd2j_1",w="_error_1yd2j_11",_="_title_1yd2j_21",b="_buttons_1yd2j_29",i={wrapper:j,error:w,title:_,buttons:b},S=async e=>{const o=localStorage.getItem("shopId")||void 0,r=localStorage.getItem("draftId"),d=`${s.useApiStore.getState().apiUrls.api}/v2/builder/shops/${o}/drafts/${r}/reset`;return await s.request({url:d,withToken:!0,method:"post",body:e})},x=()=>{const{error:e,setError:o}=s.useErrorStore(),{pages:r}=s.usePagesStore(),{setIsOpen:c}=s.useModalStore(),{title:d,description:m,setOnConfirm:u,setTitle:g,setDescription:p}=s.useConfirmationModalStore(),{setBlocks:h}=s.useLayersStore();async function y(){await S({resetSettings:(e==null?void 0:e.failedSettings)??!1,resetThemeSettings:(e==null?void 0:e.failedThemeSettings)??!1,resetPageIds:(e==null?void 0:e.failedPageIds)??[]}),o(null),h({}),window.location.reload()}async function f(){const a=[];r&&Object.keys(r).map(n=>r[n].id).filter(n=>n!==void 0).map(n=>a.push(n)),await S({resetSettings:!0,resetThemeSettings:!0,resetPageIds:a}),o(null)}return t.jsxs("div",{className:i.wrapper,children:[t.jsxs("div",{className:i.error,children:[t.jsxs("div",{children:[t.jsx("div",{className:i.title,children:"Oops! Something went wrong"}),t.jsx("span",{className:i.message,children:(e==null?void 0:e.message)||""})]}),t.jsxs("div",{className:i.buttons,children:[t.jsx(l.ButtonSettings,{type:"Primary",onClick:y,children:"Reset Settings"}),t.jsx(l.ButtonSettings,{type:"Secondary",onClick:a=>{a.stopPropagation(),g("Reset All Settings"),p("Are you sure you want to reset all settings? This is irreversible."),u(async()=>{await f()})},children:"Reset All Settings"})]})]}),d&&m&&t.jsx(l.BuilderModal,{close:()=>{c(!1),setTimeout(()=>{g(null),p(null),u(null),c(!0)},300)},children:t.jsx(l.ConfirmationModal,{})})]})};exports.ErrorPage=x;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { g as i } from "./ui-components-
|
|
2
|
+
import { g as i } from "./ui-components-CqwUR9GH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { p as s, am as a } from "./builder-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import "./charge-
|
|
7
|
-
import "./ticket
|
|
4
|
+
import { p as s, am as a } from "./builder-DUFJOYbB.js";
|
|
5
|
+
import "./builder-components-DzvQc6D4.js";
|
|
6
|
+
import "./charge-JAW-QeMZ.js";
|
|
7
|
+
import "./ticket--uOANXoZ.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const c = "_wrapper_ej209_1", m = "_content_ej209_12", p = "_title_ej209_22", r = {
|
|
10
10
|
wrapper: c,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as N, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { M as f, N as T, ab as
|
|
5
|
-
import { g as Q } from "./ticket
|
|
6
|
-
import { e as
|
|
7
|
-
import "./builder-components-
|
|
3
|
+
import { X as z, $ as U } from "./charge-JAW-QeMZ.js";
|
|
4
|
+
import { M as f, N as T, ab as F, p as G, a6 as R, e as V, O as H, m as M, a as X, u as q, V as B, b as Y, al as $, ag as K } from "./builder-DUFJOYbB.js";
|
|
5
|
+
import { g as Q } from "./ticket--uOANXoZ.js";
|
|
6
|
+
import { e as Z, N as ee, p as te } from "./ui-components-CqwUR9GH.js";
|
|
7
|
+
import "./builder-components-DzvQc6D4.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const se = "_notifications_1ntnm_1", ae = "_wrapper_1ntnm_12", x = {
|
|
10
10
|
notifications: se,
|
|
@@ -68,8 +68,8 @@ function ne() {
|
|
|
68
68
|
a && (i.delete("customerAccessToken"), localStorage.setItem("token", a), l(a), d(null));
|
|
69
69
|
}
|
|
70
70
|
const pe = ({ children: i }) => {
|
|
71
|
-
const a =
|
|
72
|
-
|
|
71
|
+
const a = F(), { token: l, setToken: d } = f(), { dashInfo: S, setDashInfo: y } = T(), { shopPassword: u } = f(), v = G(), [c, b] = R(), { notifications: w } = V(), [I, p] = r.useState(!0), { setCustomerEmail: D } = H(), { setThemeSettings: k, themeSettings: A } = M(), { settings: C, setSettings: P } = X(), { setHeader: _, setFooter: E, setAnnouncement: L } = q(), { general: t, setGeneral: O, isAntistock: h } = B(), { pageContext: J, setPageContext: W } = Y();
|
|
72
|
+
$(
|
|
73
73
|
(t == null ? void 0 : t.info.id) || localStorage.getItem("shopId") || null,
|
|
74
74
|
"production",
|
|
75
75
|
h
|
|
@@ -130,7 +130,7 @@ const pe = ({ children: i }) => {
|
|
|
130
130
|
s ? (s.settings && P(s.settings), s.header && _(JSON.parse(JSON.stringify(s.header))), s.footer && E(JSON.parse(JSON.stringify(s.footer))), s.announcement && L(JSON.parse(JSON.stringify(s.announcement)))) : P(C), k(m || A), p(!1);
|
|
131
131
|
};
|
|
132
132
|
a.pathname.startsWith("/validation") || e(), n();
|
|
133
|
-
}, []), h && (t != null && t.info.onHold) ? /* @__PURE__ */ o(oe, {}) : a.pathname.startsWith("/admin/builder") ? /* @__PURE__ */ o(g, { children: i }) : /* @__PURE__ */ o(g, { children: I ? /* @__PURE__ */ o("div", { className: x.wrapper, children: /* @__PURE__ */ o(
|
|
133
|
+
}, []), h && (t != null && t.info.onHold) ? /* @__PURE__ */ o(oe, {}) : a.pathname.startsWith("/admin/builder") ? /* @__PURE__ */ o(g, { children: i }) : /* @__PURE__ */ o(g, { children: I ? /* @__PURE__ */ o("div", { className: x.wrapper, children: /* @__PURE__ */ o(Z, {}) }) : /* @__PURE__ */ N(g, { children: [
|
|
134
134
|
i,
|
|
135
135
|
w.length > 0 && /* @__PURE__ */ o("div", { className: x.notifications, children: w.map((e) => /* @__PURE__ */ o(
|
|
136
136
|
ee,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-I1l9O9oW.cjs"),t=require("./builder-DqDtctC5.cjs"),J=require("./ticket-BivnxhDp.cjs"),g=require("./ui-components-CC9DRvrZ.cjs");require("./builder-components-D3Bb10J8.cjs");require("react-dom");const _="_notifications_1ntnm_1",F="_wrapper_1ntnm_12",j={notifications:_,wrapper:F},z=()=>(i.useEffect(()=>{document.title="Temporarily Unavailable"},[]),s.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",overflowY:"scroll",overflowX:"hidden",background:"var(--surface-primary)",color:"var(--text-primary)"},children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1",justifyContent:"center",alignItems:"center",gap:"24px"},children:[s.jsx("h2",{style:{color:"var(--text-primary)",fontSize:"var(--font-heading-h2-size)"},children:"Temporarily Unavailable"}),s.jsx("span",{style:{color:"var(--text-secondary)",fontSize:"var(--font-heading-h3-size)",width:"85%",textAlign:"center"},children:"We're making some quick updates to improve your shopping experience. During this time, browsing and checkout are temporarily unavailable."})]})}));function R(){const c=new URLSearchParams(document.location.search),n=c.get("customerAccessToken"),{setToken:d}=t.useStorefrontStore.getState(),{setDashInfo:u}=t.useCustomerDashboardStore.getState();n&&(c.delete("customerAccessToken"),localStorage.setItem("token",n),d(n),u(null))}const U=({children:c})=>{const n=t.useLocation(),{token:d,setToken:u}=t.useStorefrontStore(),{dashInfo:S,setDashInfo:y}=t.useCustomerDashboardStore(),{shopPassword:f}=t.useStorefrontStore(),v=t.useNavigate(),[l,b]=t.useSearchParams(),{notifications:x}=t.useNotificationStore(),[T,h]=i.useState(!0),{setCustomerEmail:I}=t.useCartStore(),{setThemeSettings:w,themeSettings:N}=t.useThemeSettingsStore(),{settings:C,setSettings:k}=t.useSettingsStore(),{setHeader:D,setFooter:q,setAnnouncement:A}=t.useLayersStore(),{general:o,setGeneral:E,isAntistock:p}=t.useGeneralStore(),{pageContext:L,setPageContext:O}=t.usePagesStore();t.useTrackingAnalytics((o==null?void 0:o.info.id)||localStorage.getItem("shopId")||null,"production",p);const W=async()=>{const e=await J.getDynamicPage(encodeURIComponent("/products"),o==null?void 0:o.info.passwordProtected);if(e){const{data:a}=e;O({...L,listings:a.listings})}};return i.useEffect(()=>{R()},[]),i.useEffect(()=>{const e=localStorage.getItem("token");if(e&&(!d||!S))try{const a=t.jwtDecode(e);y(a),u(e),I(a.email)}catch(a){console.error("Failed to decode token:",a),localStorage.removeItem("token"),u(""),y(null)}},[d,S]),i.useEffect(()=>{const e=l.get("r");e&&(localStorage.setItem("referralCode",e),l.delete("r"),b(l),v({pathname:n.pathname,search:l.toString()},{replace:!0}))},[l,n]),i.useEffect(()=>{!n.pathname.startsWith("/products")&&!n.pathname.startsWith("/admin/builder")&&o&&(o.info.passwordProtected&&f||o.isPasswordValid)&&W()},[o,f]),i.useLayoutEffect(()=>{const e=async()=>{if(h(!0),!o){const r=await P.fetchGeneral(f);if(!r.isPasswordValid&&!n.pathname.includes("/admin/builder")){v("/validation",{state:{from:n.pathname}});return}if(!r.info.passwordProtected){localStorage.removeItem("shopPassword");const{setShopPassword:m}=t.useStorefrontStore.getState();m("")}E(r)}},a=async()=>{h(!0);const{settings:r,theme:m}=(await P.fetchThemeAndSettings()).data;r?(r.settings&&k(r.settings),r.header&&D(JSON.parse(JSON.stringify(r.header))),r.footer&&q(JSON.parse(JSON.stringify(r.footer))),r.announcement&&A(JSON.parse(JSON.stringify(r.announcement)))):k(C),w(m||N),h(!1)};n.pathname.startsWith("/validation")||e(),a()},[]),p&&(o!=null&&o.info.onHold)?s.jsx(z,{}):n.pathname.startsWith("/admin/builder")?s.jsx(s.Fragment,{children:c}):s.jsx(s.Fragment,{children:T?s.jsx("div",{className:j.wrapper,children:s.jsx(g.Loader,{})}):s.jsxs(s.Fragment,{children:[c,x.length>0&&s.jsx("div",{className:j.notifications,children:x.map(e=>s.jsx(g.NotificationBuilder,{type:e.status,message:e.message,timer:e.timer||10,id:e.id,element:p?g.NotificationAntistock:e.component,label:e.label},e.id))})]})})};exports.WrapperPage=U;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./builder.cjs.js"),a=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./builder.cjs.js"),a=require("./builder-DqDtctC5.cjs");require("react/jsx-runtime");const c=require("react"),t=require("./ui-components-CC9DRvrZ.cjs");require("./builder-components-D3Bb10J8.cjs");const r=require("./charge-I1l9O9oW.cjs"),e=require("./ticket-BivnxhDp.cjs");require("react-dom");function u(o){c.useEffect(()=>{Object.entries(o).forEach(([s,i])=>{t.registerIcon(s,i)})},[o])}function g(o){Object.entries(o).forEach(([s,i])=>{t.registerIcon(s,i)})}exports.App=n.App;exports.AntistockRoutes=a.AntistockRoutes;exports.Routes=a.Routes;exports.formatPrice=a.formatPrice;exports.Icon=t.Icon;exports.getRegisteredIcon=t.getRegisteredIcon;exports.getRegisteredIcons=t.getRegisteredIcons;exports.isIconRegistered=t.isIconRegistered;exports.registerIcon=t.registerIcon;exports.MarkdownText=r.MarkdownText;exports.ReCaptchaProvider=r.ReCaptchaProvider;exports.parseDraftJsText=r.parseDraftJsText;exports.useCart=r.useCart;exports.useGeneralInfo=r.useGeneralInfo;exports.useMarkdownIt=r.useMarkdownIt;exports.useReCaptcha=r.useReCaptcha;exports.ColorVariables=e.ColorVariables;exports.aspectRatioOptions=e.aspectRatioOptions;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.splitTextIntoSpans=e.splitTextIntoSpans;exports.useAdaptiveStyles=e.useAdaptiveStyles;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.registerIcons=g;exports.useIconRegistration=u;
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { App as R } from "./builder.es.js";
|
|
2
|
-
import { Y as g, Z as l, _ as x } from "./builder-
|
|
2
|
+
import { Y as g, Z as l, _ as x } from "./builder-DUFJOYbB.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import { useEffect as o } from "react";
|
|
5
|
-
import { r as t } from "./ui-components-
|
|
6
|
-
import { I as C, l as b, n as k, m as T } from "./ui-components-
|
|
7
|
-
import "./builder-components-
|
|
8
|
-
import { M as w, R as A,
|
|
9
|
-
import { C as B, c as G, h as
|
|
5
|
+
import { r as t } from "./ui-components-CqwUR9GH.js";
|
|
6
|
+
import { I as C, l as b, n as k, m as T } from "./ui-components-CqwUR9GH.js";
|
|
7
|
+
import "./builder-components-DzvQc6D4.js";
|
|
8
|
+
import { M as w, R as A, I as E, u as M, H as N, J as O, G as P } from "./charge-JAW-QeMZ.js";
|
|
9
|
+
import { C as B, c as G, h as J, i as S, r as y, d as D, s as H, u as V, e as Y, b as Z, a as _ } from "./ticket--uOANXoZ.js";
|
|
10
10
|
import "react-dom";
|
|
11
11
|
function f(e) {
|
|
12
12
|
o(() => {
|
|
@@ -32,20 +32,20 @@ export {
|
|
|
32
32
|
x as formatPrice,
|
|
33
33
|
b as getRegisteredIcon,
|
|
34
34
|
k as getRegisteredIcons,
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
J as hotReload,
|
|
36
|
+
S as iconNames,
|
|
37
37
|
T as isIconRegistered,
|
|
38
38
|
E as parseDraftJsText,
|
|
39
39
|
t as registerIcon,
|
|
40
40
|
u as registerIcons,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
y as removeNotification,
|
|
42
|
+
D as showNotification,
|
|
43
43
|
H as splitTextIntoSpans,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
V as useAdaptiveStyles,
|
|
45
|
+
Y as useBalance,
|
|
46
|
+
Z as useBuilderPages,
|
|
47
47
|
M as useCart,
|
|
48
|
-
|
|
48
|
+
_ as useCreateTicket,
|
|
49
49
|
N as useGeneralInfo,
|
|
50
50
|
f as useIconRegistration,
|
|
51
51
|
O as useMarkdownIt,
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { jsx as o, Fragment as z, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import i, { useState as ee, useMemo as I } from "react";
|
|
3
|
+
import { X as te, p as J, M as oe, V as X, a7 as ne } from "./builder-DUFJOYbB.js";
|
|
4
|
+
import { f as ae, N as se, P as ce, O as ie, g as re, b as le, c as C, d as ue, e as de, h as me, i as he, j as pe, V as fe, k as _e, L as ge, T as ye, l as H, m as we, n as Se, o as ke } from "./charge-JAW-QeMZ.js";
|
|
5
|
+
import { M as ve, I as Y, g as V, e as Ce } from "./ui-components-CqwUR9GH.js";
|
|
6
|
+
import "./builder-components-DzvQc6D4.js";
|
|
7
|
+
import "./ticket--uOANXoZ.js";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
const Ne = async (n = 1) => await ae({ PageNumber: n }), rt = () => {
|
|
10
|
+
const [n, c] = i.useState(null), [d, e] = ee(null), [_, N] = i.useState(0), { page: g } = te(), [k, l] = i.useState(!0);
|
|
11
|
+
async function v() {
|
|
12
|
+
l(!0);
|
|
13
|
+
const { list: y, totalCount: w } = await Ne(g);
|
|
14
|
+
c(y), N(w), e(null), l(!1);
|
|
15
|
+
}
|
|
16
|
+
async function m() {
|
|
17
|
+
const y = (n == null ? void 0 : n.map((b) => b.gatewayName)) || [], w = await re(y);
|
|
18
|
+
e(w);
|
|
19
|
+
}
|
|
20
|
+
return i.useEffect(() => {
|
|
21
|
+
!d && n && m();
|
|
22
|
+
}, [n, d]), i.useEffect(() => {
|
|
23
|
+
v();
|
|
24
|
+
}, [g]), /* @__PURE__ */ o(z, { children: n != null && n.length && n.length === 0 ? /* @__PURE__ */ o(
|
|
25
|
+
se,
|
|
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__ */ r(z, { children: [
|
|
31
|
+
/* @__PURE__ */ o(ce, { title: "Orders" }),
|
|
32
|
+
/* @__PURE__ */ o(
|
|
33
|
+
ie,
|
|
34
|
+
{
|
|
35
|
+
orders: n,
|
|
36
|
+
gatewaysDetail: d,
|
|
37
|
+
totalCount: _,
|
|
38
|
+
isLoading: k
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] }) });
|
|
42
|
+
}, be = "_orderPage_gc87l_1", Pe = "_leftSection_gc87l_15", De = "_content_gc87l_35", Oe = "_main_gc87l_42", Ae = "_mainAntistock_gc87l_56", Re = "_orderMainDataAntistock_gc87l_69", Me = "_timelineBlockAntistock_gc87l_81", Ie = "_footerAntistock_gc87l_92", Ve = "_statusBlock_gc87l_104", Be = "_timelineBlock_gc87l_81", $e = "_footer_gc87l_92", Fe = "_rightSection_gc87l_121", Te = "_header_gc87l_142", Le = "_productList_gc87l_150", Ee = "_mobileFooter_gc87l_157", We = "_loaderContainer_gc87l_166", xe = "_orderMainData_gc87l_69", qe = "_prices_gc87l_181", Ue = "_headerTitle_gc87l_185", je = "_headerDescription_gc87l_189", a = {
|
|
43
|
+
orderPage: be,
|
|
44
|
+
leftSection: Pe,
|
|
45
|
+
content: De,
|
|
46
|
+
main: Oe,
|
|
47
|
+
mainAntistock: Ae,
|
|
48
|
+
orderMainDataAntistock: Re,
|
|
49
|
+
timelineBlockAntistock: Me,
|
|
50
|
+
footerAntistock: Ie,
|
|
51
|
+
statusBlock: Ve,
|
|
52
|
+
timelineBlock: Be,
|
|
53
|
+
footer: $e,
|
|
54
|
+
rightSection: Fe,
|
|
55
|
+
header: Te,
|
|
56
|
+
productList: Le,
|
|
57
|
+
mobileFooter: Ee,
|
|
58
|
+
loaderContainer: We,
|
|
59
|
+
orderMainData: xe,
|
|
60
|
+
prices: qe,
|
|
61
|
+
headerTitle: Ue,
|
|
62
|
+
headerDescription: je
|
|
63
|
+
}, Ge = "_modalContent_1a05n_1", ze = "_iconContainer_1a05n_16", He = "_warningIcon_1a05n_20", Je = "_title_1a05n_25", Xe = "_description_1a05n_33", Ye = "_buttonContainer_1a05n_40", Ke = "_button_1a05n_40", h = {
|
|
64
|
+
modalContent: Ge,
|
|
65
|
+
iconContainer: ze,
|
|
66
|
+
warningIcon: He,
|
|
67
|
+
title: Je,
|
|
68
|
+
description: Xe,
|
|
69
|
+
buttonContainer: Ye,
|
|
70
|
+
button: Ke
|
|
71
|
+
}, Qe = ({
|
|
72
|
+
isOpen: n,
|
|
73
|
+
onClose: c,
|
|
74
|
+
refundedAmount: d,
|
|
75
|
+
currency: e
|
|
76
|
+
}) => {
|
|
77
|
+
var D, O;
|
|
78
|
+
const _ = J(), { token: N, shopDomain: g } = oe(), { isAntistock: k, general: l } = X(), v = !!((D = l == null ? void 0 : l.info) != null && D.disableSupport), m = (O = l == null ? void 0 : l.info) == null ? void 0 : O.thirdPartySupportUrl, y = !(v && !m), w = new Intl.NumberFormat("en-US", {
|
|
79
|
+
style: "currency",
|
|
80
|
+
currency: e
|
|
81
|
+
}), b = () => {
|
|
82
|
+
_(k ? "/account" : "/customer-dash");
|
|
83
|
+
}, u = async () => {
|
|
84
|
+
if (v && m) {
|
|
85
|
+
window.open(m);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
k ? window.open(`https://${g}/support`) : _("/contact");
|
|
89
|
+
}, s = () => {
|
|
90
|
+
c();
|
|
91
|
+
};
|
|
92
|
+
return n ? /* @__PURE__ */ o(ve, { close: c, children: /* @__PURE__ */ r(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: h.modalContent,
|
|
96
|
+
onClick: (A) => A.stopPropagation(),
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ o("div", { className: h.iconContainer, children: /* @__PURE__ */ o(
|
|
99
|
+
Y,
|
|
100
|
+
{
|
|
101
|
+
name: "WarningDiamond",
|
|
102
|
+
fill: "var(--text-warning)",
|
|
103
|
+
className: h.warningIcon
|
|
104
|
+
}
|
|
105
|
+
) }),
|
|
106
|
+
/* @__PURE__ */ o("h2", { className: h.title, children: "Partial Delivery Failure Refund" }),
|
|
107
|
+
/* @__PURE__ */ r("p", { className: h.description, children: [
|
|
108
|
+
"Your payment was successful but a few products were out of stock. We've automatically refunded the products that were out of stock, with a total of",
|
|
109
|
+
" ",
|
|
110
|
+
w.format(d),
|
|
111
|
+
", to your account balance."
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ r("div", { className: h.buttonContainer, children: [
|
|
114
|
+
!N && /* @__PURE__ */ o(
|
|
115
|
+
V,
|
|
116
|
+
{
|
|
117
|
+
type: "Secondary",
|
|
118
|
+
onClick: b,
|
|
119
|
+
className: h.button,
|
|
120
|
+
children: "Login"
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
y && /* @__PURE__ */ o(
|
|
124
|
+
V,
|
|
125
|
+
{
|
|
126
|
+
type: "Secondary",
|
|
127
|
+
onClick: u,
|
|
128
|
+
className: h.button,
|
|
129
|
+
children: "Contact Support"
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ o(
|
|
133
|
+
V,
|
|
134
|
+
{
|
|
135
|
+
type: "Primary",
|
|
136
|
+
onClick: s,
|
|
137
|
+
className: h.button,
|
|
138
|
+
children: "Continue"
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
] })
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
) }) : null;
|
|
145
|
+
}, Ze = () => {
|
|
146
|
+
var $, F, T, L, E, W, x, q, U;
|
|
147
|
+
const { id: n, accessToken: c } = ne(), d = J(), [e, _] = i.useState(), [N, g] = i.useState(!1), [k, l] = i.useState(!1), [v, m] = i.useState(!1), [y, w] = i.useState(!1), b = le(), { isAntistock: u, general: s } = X(), D = (($ = e == null ? void 0 : e.rawPrice) == null ? void 0 : $.currency) || "USD", O = new Intl.NumberFormat("en-US", {
|
|
148
|
+
style: "currency",
|
|
149
|
+
currency: D
|
|
150
|
+
}), A = i.useMemo(() => (e == null ? void 0 : e.partOrders.map((t) => {
|
|
151
|
+
var P, M, S;
|
|
152
|
+
return {
|
|
153
|
+
id: Number((P = t.productWithVariant) == null ? void 0 : P.id) || 0,
|
|
154
|
+
image: t.productWithVariant.image,
|
|
155
|
+
name: (() => {
|
|
156
|
+
var j, G;
|
|
157
|
+
const p = ((j = t.productWithVariant) == null ? void 0 : j.name) || "", f = ((G = t.productWithVariant) == null ? void 0 : G.variantName) || "";
|
|
158
|
+
return !p && !f ? "" : !f || p === f ? p : p ? `${p} (${f})` : f;
|
|
159
|
+
})(),
|
|
160
|
+
description: "",
|
|
161
|
+
price: {
|
|
162
|
+
quantity: t.quantity,
|
|
163
|
+
amount: ((M = t.productWithVariant) == null ? void 0 : M.price.amount) || 0,
|
|
164
|
+
currency: (S = t.productWithVariant) == null ? void 0 : S.price.currency
|
|
165
|
+
},
|
|
166
|
+
deliveryCategories: "deliveryCategories" in t ? t.deliveryCategories : void 0,
|
|
167
|
+
customerNote: t.customerNote,
|
|
168
|
+
chargeType: t.chargeType || "ONE_TIME",
|
|
169
|
+
replacementRequests: "replacementRequests" in t ? t.replacementRequests : void 0,
|
|
170
|
+
allowedReplacementReasons: "allowedReplacementReasons" in t ? t.allowedReplacementReasons : void 0
|
|
171
|
+
};
|
|
172
|
+
})) || [], [e]);
|
|
173
|
+
i.useEffect(() => {
|
|
174
|
+
e && (e.status === C.FullDeliveryFailure || e.status === C.PartiallyDelivered) && e.refundedPrice && e.refundedPrice.amount > 0 && l(!0);
|
|
175
|
+
}, [e == null ? void 0 : e.status]);
|
|
176
|
+
const R = i.useCallback(async (t, P, M = !1) => {
|
|
177
|
+
var p, f;
|
|
178
|
+
M || g(!0);
|
|
179
|
+
const { data: S } = await (P ? ue(`${t}/${P}`) : de(t));
|
|
180
|
+
g(!1), S.status !== C.Completed && ((p = S.charge) == null ? void 0 : p.status) === me.NotPaid && d(`/charges/${(f = S.charge) == null ? void 0 : f.id}`, {
|
|
181
|
+
replace: !0
|
|
182
|
+
}), _(S);
|
|
183
|
+
}, [d]);
|
|
184
|
+
i.useLayoutEffect(() => {
|
|
185
|
+
if (n && !c) {
|
|
186
|
+
const t = JSON.parse(localStorage.getItem("orders") || "{}");
|
|
187
|
+
t[n] && d(`/orders/${n}/${t[n].fullAccessToken}`);
|
|
188
|
+
}
|
|
189
|
+
}, [n, c, d]), i.useEffect(() => {
|
|
190
|
+
n && R(n, c, !0);
|
|
191
|
+
const t = setInterval(() => {
|
|
192
|
+
n && R(n, c, !0);
|
|
193
|
+
}, 5e3);
|
|
194
|
+
return () => {
|
|
195
|
+
clearInterval(t);
|
|
196
|
+
};
|
|
197
|
+
}, [n, c, R]);
|
|
198
|
+
const K = I(() => !!(e != null && e.isApplicableForReplacement && (e.status === C.Completed || e.status === C.PartiallyDelivered || e.status === C.FullDeliveryFailure)), [e]), B = I(() => {
|
|
199
|
+
var t;
|
|
200
|
+
return !!((t = s == null ? void 0 : s.info) != null && t.isVouchesEnabled && c);
|
|
201
|
+
}, [(F = s == null ? void 0 : s.info) == null ? void 0 : F.isVouchesEnabled, c]), Q = I(() => {
|
|
202
|
+
var t;
|
|
203
|
+
return !!(!((t = s == null ? void 0 : s.info) != null && t.isVouchesEnabled) && (e != null && e.review) && "accessToken" in e.review && !u);
|
|
204
|
+
}, [(T = s == null ? void 0 : s.info) == null ? void 0 : T.isVouchesEnabled, e == null ? void 0 : e.review, u]), Z = I(() => {
|
|
205
|
+
var t;
|
|
206
|
+
return ((t = s == null ? void 0 : s.info) == null ? void 0 : t.domain) || window.location.hostname;
|
|
207
|
+
}, [(L = s == null ? void 0 : s.info) == null ? void 0 : L.domain]);
|
|
208
|
+
return N ? /* @__PURE__ */ o("div", { className: a.loaderContainer, children: /* @__PURE__ */ o(Ce, {}) }) : /* @__PURE__ */ r("div", { className: a.orderPage, children: [
|
|
209
|
+
/* @__PURE__ */ o("div", { className: a.leftSection, children: /* @__PURE__ */ r("div", { className: a.content, children: [
|
|
210
|
+
/* @__PURE__ */ o(he, {}),
|
|
211
|
+
e && /* @__PURE__ */ r("div", { className: `${a.main} ${u ? a.mainAntistock : ""}`, children: [
|
|
212
|
+
/* @__PURE__ */ o(
|
|
213
|
+
pe,
|
|
214
|
+
{
|
|
215
|
+
className: a.statusBlock,
|
|
216
|
+
orderStatus: e.status
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ r(
|
|
220
|
+
"div",
|
|
221
|
+
{
|
|
222
|
+
className: `${a.orderMainData} ${u ? a.orderMainDataAntistock : ""}`,
|
|
223
|
+
children: [
|
|
224
|
+
B && /* @__PURE__ */ o(
|
|
225
|
+
fe,
|
|
226
|
+
{
|
|
227
|
+
onAddMessage: () => m(!0),
|
|
228
|
+
isSubmitted: y
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
/* @__PURE__ */ o(
|
|
232
|
+
_e,
|
|
233
|
+
{
|
|
234
|
+
lastUpdate: e.createdAt,
|
|
235
|
+
paymentType: (E = e.charge) == null ? void 0 : E.gateway,
|
|
236
|
+
email: e.customer ? e.customer.email : ((W = e.charge) == null ? void 0 : W.customerForCharge.email) || "",
|
|
237
|
+
orderId: e.id
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
Q && e.review && /* @__PURE__ */ o(
|
|
241
|
+
ge,
|
|
242
|
+
{
|
|
243
|
+
orderId: e.id,
|
|
244
|
+
review: e.review
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
e.charge && e.charge.timeline && /* @__PURE__ */ o(
|
|
251
|
+
ye,
|
|
252
|
+
{
|
|
253
|
+
className: `${a.timelineBlock} ${u ? a.timelineBlockAntistock : ""}`,
|
|
254
|
+
timeline: e.charge.timeline
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
/* @__PURE__ */ o(
|
|
258
|
+
H,
|
|
259
|
+
{
|
|
260
|
+
className: `${a.footer} ${u ? a.footerAntistock : ""}`
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
] })
|
|
264
|
+
] }) }),
|
|
265
|
+
/* @__PURE__ */ o(
|
|
266
|
+
"div",
|
|
267
|
+
{
|
|
268
|
+
className: a.rightSection,
|
|
269
|
+
style: u ? { borderLeft: "1px solid var(--border-secondary)" } : void 0,
|
|
270
|
+
children: /* @__PURE__ */ r("div", { className: a.content, children: [
|
|
271
|
+
((x = e == null ? void 0 : e.charge) == null ? void 0 : x.name) && /* @__PURE__ */ r("header", { className: a.header, children: [
|
|
272
|
+
/* @__PURE__ */ r("div", { children: [
|
|
273
|
+
/* @__PURE__ */ o("h1", { className: a.headerTitle, children: e.charge.name }),
|
|
274
|
+
e.charge.description && /* @__PURE__ */ o("p", { className: a.headerDescription, children: e.charge.description })
|
|
275
|
+
] }),
|
|
276
|
+
u ? null : /* @__PURE__ */ r(
|
|
277
|
+
V,
|
|
278
|
+
{
|
|
279
|
+
type: "Secondary",
|
|
280
|
+
onClick: () => b((e == null ? void 0 : e.id) || ""),
|
|
281
|
+
style: {
|
|
282
|
+
whiteSpace: "nowrap",
|
|
283
|
+
display: "flex",
|
|
284
|
+
alignItems: "center",
|
|
285
|
+
gap: "4px"
|
|
286
|
+
},
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ o(Y, { name: "Copy" }),
|
|
289
|
+
/* @__PURE__ */ o("span", { children: "Copy ID" })
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
] }),
|
|
294
|
+
/* @__PURE__ */ r("div", { children: [
|
|
295
|
+
/* @__PURE__ */ o("div", { className: a.productList, children: A.map((t) => /* @__PURE__ */ o(
|
|
296
|
+
we,
|
|
297
|
+
{
|
|
298
|
+
product: t,
|
|
299
|
+
isOrder: !0,
|
|
300
|
+
isApplicableForReplacement: K,
|
|
301
|
+
orderId: n,
|
|
302
|
+
accessToken: c,
|
|
303
|
+
allowedReplacementReasons: e == null ? void 0 : e.allowedReplacementReasons
|
|
304
|
+
},
|
|
305
|
+
t.id
|
|
306
|
+
)) }),
|
|
307
|
+
u ? null : /* @__PURE__ */ o(
|
|
308
|
+
Se,
|
|
309
|
+
{
|
|
310
|
+
formatter: O,
|
|
311
|
+
coupon: null,
|
|
312
|
+
total: ((q = e == null ? void 0 : e.endPrice) == null ? void 0 : q.amount) || 0,
|
|
313
|
+
discount: 0,
|
|
314
|
+
totalWithDiscount: ((U = e == null ? void 0 : e.endPrice) == null ? void 0 : U.amount) || 0,
|
|
315
|
+
className: a.prices,
|
|
316
|
+
isShowSubtotal: !1
|
|
317
|
+
}
|
|
318
|
+
),
|
|
319
|
+
/* @__PURE__ */ o(H, { className: a.mobileFooter })
|
|
320
|
+
] })
|
|
321
|
+
] })
|
|
322
|
+
}
|
|
323
|
+
),
|
|
324
|
+
(e == null ? void 0 : e.refundedPrice) && /* @__PURE__ */ o(
|
|
325
|
+
Qe,
|
|
326
|
+
{
|
|
327
|
+
isOpen: k,
|
|
328
|
+
onClose: () => l(!1),
|
|
329
|
+
refundedAmount: e.refundedPrice.amount,
|
|
330
|
+
currency: e.refundedPrice.currency
|
|
331
|
+
}
|
|
332
|
+
),
|
|
333
|
+
B && /* @__PURE__ */ o(
|
|
334
|
+
ke,
|
|
335
|
+
{
|
|
336
|
+
isOpen: v,
|
|
337
|
+
onClose: () => m(!1),
|
|
338
|
+
products: A,
|
|
339
|
+
orderId: n,
|
|
340
|
+
accessToken: c,
|
|
341
|
+
shopDomain: Z,
|
|
342
|
+
onSuccess: () => {
|
|
343
|
+
w(!0), m(!1), n && R(n, c, !0);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
)
|
|
347
|
+
] });
|
|
348
|
+
}, lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
349
|
+
__proto__: null,
|
|
350
|
+
OrderPage: Ze
|
|
351
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
352
|
+
export {
|
|
353
|
+
rt as O,
|
|
354
|
+
lt as i
|
|
355
|
+
};
|