@billgangcom/theme-lib 1.116.2 → 1.116.4
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-C7KDCjPK.cjs → builder-BbDQDQrb.cjs} +2 -2
- package/dist/{builder-q7_i-usP.js → builder-BxbzpE8L.js} +5 -5
- package/dist/{builder-components-DTCH52Zj.cjs → builder-components-D210UQ3i.cjs} +1 -1
- package/dist/{builder-components-C8GR-K0b.js → builder-components-D7GdWNk9.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +22 -22
- package/dist/{charge-D5cvaKFj.js → charge-DUg5z8eK.js} +98 -87
- package/dist/{charge-CjJu8ZCC.cjs → charge-qTFpN1-9.cjs} +2 -2
- package/dist/{checkout-Dbu7YMSx.cjs → checkout-CY_mJip8.cjs} +1 -1
- package/dist/{checkout-CsTsjmHG.js → checkout-DE1hYKE4.js} +5 -5
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-BLeoCjpE.js → index-7rCRUMf-.js} +5 -5
- package/dist/{index-B1UP_MbR.cjs → index-BVnWKrze.cjs} +1 -1
- package/dist/{index-DU5z0tPJ.js → index-BZRtiGGG.js} +5 -5
- package/dist/{index-B-z0PneZ.cjs → index-ByxtRAc0.cjs} +1 -1
- package/dist/{index-DXroLqaD.cjs → index-C-CUeFbE.cjs} +1 -1
- package/dist/{index-C9TT9z5B.js → index-CHyxn7qG.js} +5 -5
- package/dist/{index-BbZMD5la.js → index-CVt4F5cd.js} +5 -5
- package/dist/{index-2oIkoScp.cjs → index-DG3V4uj_.cjs} +1 -1
- package/dist/{index-r9HLobSy.cjs → index-DKcDTB5C.cjs} +1 -1
- package/dist/{index-d8l00Hpw.js → index-xU7khwA8.js} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/order-DI9sn7mR.cjs +1 -0
- package/dist/{order-Cveqw4gC.js → order-SRQ_7LpS.js} +17 -16
- package/dist/src/abstractions/PageContext.d.ts +9 -1
- package/dist/src/storefront/models/checkout.d.ts +1 -0
- package/dist/{subscription-BvsNAnoC.cjs → subscription-D4myRIdo.cjs} +1 -1
- package/dist/{subscription-Bz6FRE3J.js → subscription-DtKONUxk.js} +5 -5
- package/dist/{ticket-DU1t1M0h.js → ticket-CagcFJkx.js} +5 -5
- package/dist/{ticket-B90nYD05.cjs → ticket-Dj3SlggC.cjs} +1 -1
- package/dist/{top-up-CFc0wZAg.cjs → top-up-B1JOfumd.cjs} +1 -1
- package/dist/{top-up-2OMBI611.js → top-up-C01sQrCu.js} +5 -5
- package/dist/{ui-components-B79-9qoP.cjs → ui-components-DIzybKgf.cjs} +1 -1
- package/dist/{ui-components-BxH-lR8m.js → ui-components-yWvpA_6p.js} +4 -4
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-Crn-70HH.cjs → validation-BJICmiG6.cjs} +1 -1
- package/dist/{validation-DpREFoxz.js → validation-bJbqIOfB.js} +5 -5
- package/package.json +1 -1
- package/dist/order-d9OX_gLP.cjs +0 -1
|
@@ -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-qTFpN1-9.cjs"),u=require("./builder-BbDQDQrb.cjs"),l=require("react"),_=require("./ui-components-DIzybKgf.cjs");require("./builder-components-D210UQ3i.cjs");require("./ticket-Dj3SlggC.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;
|
|
@@ -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-DUg5z8eK.js";
|
|
3
|
+
import { V as A, p as G } from "./builder-BxbzpE8L.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-yWvpA_6p.js";
|
|
6
|
+
import "./builder-components-D7GdWNk9.js";
|
|
7
|
+
import "./ticket-CagcFJkx.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const S = "_checkoutContainer_thje1_1", b = "_loaderContainer_thje1_20", s = {
|
|
10
10
|
checkoutContainer: S,
|
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-BbDQDQrb.cjs");require("./ui-components-DIzybKgf.cjs");require("./builder-components-D210UQ3i.cjs");const t=require("./charge-qTFpN1-9.cjs"),e=require("./ticket-Dj3SlggC.cjs"),r=require("./checkout-CY_mJip8.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,11 +1,11 @@
|
|
|
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, I as l, u as d, H as x, J as C, G as R } from "./charge-
|
|
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 J } from "./checkout-
|
|
3
|
+
import { Y as p, Z as u, _ as c } from "./builder-BxbzpE8L.js";
|
|
4
|
+
import "./ui-components-yWvpA_6p.js";
|
|
5
|
+
import "./builder-components-D7GdWNk9.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-DUg5z8eK.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-CagcFJkx.js";
|
|
8
|
+
import { Checkout as J } from "./checkout-DE1hYKE4.js";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
export {
|
|
11
11
|
p as AntistockRoutes,
|
|
@@ -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-yWvpA_6p.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-BxbzpE8L.js";
|
|
5
|
+
import "./builder-components-D7GdWNk9.js";
|
|
6
|
+
import "./charge-DUg5z8eK.js";
|
|
7
|
+
import "./ticket-CagcFJkx.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 +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-DIzybKgf.cjs");require("react");const s=require("./builder-BbDQDQrb.cjs");require("./builder-components-D210UQ3i.cjs");require("./charge-qTFpN1-9.cjs");require("./ticket-Dj3SlggC.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-yWvpA_6p.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-BxbzpE8L.js";
|
|
5
|
+
import "./builder-components-D7GdWNk9.js";
|
|
6
|
+
import "./charge-DUg5z8eK.js";
|
|
7
|
+
import "./ticket-CagcFJkx.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 +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-DIzybKgf.cjs");require("react");const n=require("./builder-BbDQDQrb.cjs");require("./builder-components-D210UQ3i.cjs");require("./charge-qTFpN1-9.cjs");require("./ticket-Dj3SlggC.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 +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-qTFpN1-9.cjs"),t=require("./builder-BbDQDQrb.cjs"),J=require("./ticket-Dj3SlggC.cjs"),g=require("./ui-components-DIzybKgf.cjs");require("./builder-components-D210UQ3i.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;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "./builder-
|
|
2
|
+
import "./builder-BxbzpE8L.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-yWvpA_6p.js";
|
|
5
|
+
import "./builder-components-D7GdWNk9.js";
|
|
6
|
+
import "./charge-DUg5z8eK.js";
|
|
7
|
+
import "./ticket-CagcFJkx.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const f = () => (e.useEffect(() => {
|
|
10
10
|
setTimeout(() => {
|
|
@@ -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 { X as z, $ as U } from "./charge-
|
|
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-
|
|
5
|
-
import { g as Q } from "./ticket-
|
|
6
|
-
import { e as Z, N as ee, p as te } from "./ui-components-
|
|
7
|
-
import "./builder-components-
|
|
3
|
+
import { X as z, $ as U } from "./charge-DUg5z8eK.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-BxbzpE8L.js";
|
|
5
|
+
import { g as Q } from "./ticket-CagcFJkx.js";
|
|
6
|
+
import { e as Z, N as ee, p as te } from "./ui-components-yWvpA_6p.js";
|
|
7
|
+
import "./builder-components-D7GdWNk9.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const se = "_notifications_1ntnm_1", ae = "_wrapper_1ntnm_12", x = {
|
|
10
10
|
notifications: se,
|
|
@@ -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-BbDQDQrb.cjs");const r=require("react"),t=require("./ui-components-DIzybKgf.cjs");require("./builder-components-D210UQ3i.cjs");require("./charge-qTFpN1-9.cjs");require("./ticket-Dj3SlggC.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-BbDQDQrb.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,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-BxbzpE8L.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();
|
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-BbDQDQrb.cjs");require("react/jsx-runtime");const c=require("react"),t=require("./ui-components-DIzybKgf.cjs");require("./builder-components-D210UQ3i.cjs");const r=require("./charge-qTFpN1-9.cjs"),e=require("./ticket-Dj3SlggC.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-BxbzpE8L.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, I as E, u as M, H as N, J as O, G as P } from "./charge-
|
|
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-
|
|
5
|
+
import { r as t } from "./ui-components-yWvpA_6p.js";
|
|
6
|
+
import { I as C, l as b, n as k, m as T } from "./ui-components-yWvpA_6p.js";
|
|
7
|
+
import "./builder-components-D7GdWNk9.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-DUg5z8eK.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-CagcFJkx.js";
|
|
10
10
|
import "react-dom";
|
|
11
11
|
function f(e) {
|
|
12
12
|
o(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),i=require("react"),k=require("./builder-BbDQDQrb.cjs"),o=require("./charge-qTFpN1-9.cjs"),_=require("./ui-components-DIzybKgf.cjs");require("./builder-components-D210UQ3i.cjs");require("./ticket-Dj3SlggC.cjs");require("react-dom");const J=async(n=1)=>await o.fetchOrders({PageNumber:n}),Y=()=>{const[n,r]=i.useState(null),[d,e]=i.useState(null),[g,v]=i.useState(0),{page:y}=k.usePaginationPagesStore(),[C,l]=i.useState(!0);async function j(){l(!0);const{list:S,totalCount:w}=await J(y);r(S),v(w),e(null),l(!1)}async function m(){const S=(n==null?void 0:n.map(N=>N.gatewayName))||[],w=await o.getGatewaysDetail(S);e(w)}return i.useEffect(()=>{!d&&n&&m()},[n,d]),i.useEffect(()=>{j()},[y]),t.jsx(t.Fragment,{children:n!=null&&n.length&&n.length===0?t.jsx(o.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(o.PageTitle,{title:"Orders"}),t.jsx(o.OrdersTable,{orders:n,gatewaysDetail:d,totalCount:g,isLoading:C})]})})},K="_orderPage_gc87l_1",Q="_leftSection_gc87l_15",X="_content_gc87l_35",Z="_main_gc87l_42",ee="_mainAntistock_gc87l_56",te="_orderMainDataAntistock_gc87l_69",se="_timelineBlockAntistock_gc87l_81",ne="_footerAntistock_gc87l_92",oe="_statusBlock_gc87l_104",ae="_timelineBlock_gc87l_81",ce="_footer_gc87l_92",ie="_rightSection_gc87l_121",re="_header_gc87l_142",le="_productList_gc87l_150",ue="_mobileFooter_gc87l_157",de="_loaderContainer_gc87l_166",me="_orderMainData_gc87l_69",he="_prices_gc87l_181",pe="_headerTitle_gc87l_185",fe="_headerDescription_gc87l_189",a={orderPage:K,leftSection:Q,content:X,main:Z,mainAntistock:ee,orderMainDataAntistock:te,timelineBlockAntistock:se,footerAntistock:ne,statusBlock:oe,timelineBlock:ae,footer:ce,rightSection:ie,header:re,productList:le,mobileFooter:ue,loaderContainer:de,orderMainData:me,prices:he,headerTitle:pe,headerDescription:fe},_e="_modalContent_1a05n_1",ge="_iconContainer_1a05n_16",ye="_warningIcon_1a05n_20",Se="_title_1a05n_25",we="_description_1a05n_33",xe="_buttonContainer_1a05n_40",ke="_button_1a05n_40",h={modalContent:_e,iconContainer:ge,warningIcon:ye,title:Se,description:we,buttonContainer:xe,button:ke},Ce=({isOpen:n,onClose:r,refundedAmount:d,currency:e})=>{var O,D;const g=k.useNavigate(),{token:v,shopDomain:y}=k.useStorefrontStore(),{isAntistock:C,general:l}=k.useGeneralStore(),j=!!((O=l==null?void 0:l.info)!=null&&O.disableSupport),m=(D=l==null?void 0:l.info)==null?void 0:D.thirdPartySupportUrl,S=!(j&&!m),w=new Intl.NumberFormat("en-US",{style:"currency",currency:e}),N=()=>{g(C?"/account":"/customer-dash")},u=async()=>{if(j&&m){window.open(m);return}C?window.open(`https://${y}/support`):g("/contact")},c=()=>{r()};return n?t.jsx(_.Modal,{close:r,children:t.jsxs("div",{className:h.modalContent,onClick:P=>P.stopPropagation(),children:[t.jsx("div",{className:h.iconContainer,children:t.jsx(_.Icon,{name:"WarningDiamond",fill:"var(--text-warning)",className:h.warningIcon})}),t.jsx("h2",{className:h.title,children:"Partial Delivery Failure Refund"}),t.jsxs("p",{className:h.description,children:["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"," ",w.format(d),", to your account balance."]}),t.jsxs("div",{className:h.buttonContainer,children:[!v&&t.jsx(_.Button,{type:"Secondary",onClick:N,className:h.button,children:"Login"}),S&&t.jsx(_.Button,{type:"Secondary",onClick:u,className:h.button,children:"Contact Support"}),t.jsx(_.Button,{type:"Primary",onClick:c,className:h.button,children:"Continue"})]})]})}):null},je=()=>{var I,B,F,V,$,T,q,L,E;const{id:n,accessToken:r}=k.useParams(),d=k.useNavigate(),[e,g]=i.useState(),[v,y]=i.useState(!1),[C,l]=i.useState(!1),[j,m]=i.useState(!1),[S,w]=i.useState(!1),N=o.useCopy(),{isAntistock:u,general:c}=k.useGeneralStore(),O=((I=e==null?void 0:e.rawPrice)==null?void 0:I.currency)||"USD",D=new Intl.NumberFormat("en-US",{style:"currency",currency:O}),P=i.useMemo(()=>(e==null?void 0:e.partOrders.map(s=>{var b,R,x;return{id:Number((b=s.productWithVariant)==null?void 0:b.id)||0,partOrderId:Number(s==null?void 0:s.id)||0,image:s.productWithVariant.image,name:(()=>{var W,U;const p=((W=s.productWithVariant)==null?void 0:W.name)||"",f=((U=s.productWithVariant)==null?void 0:U.variantName)||"";return!p&&!f?"":!f||p===f?p:p?`${p} (${f})`:f})(),description:"",price:{quantity:s.quantity,amount:((R=s.productWithVariant)==null?void 0:R.price.amount)||0,currency:(x=s.productWithVariant)==null?void 0:x.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]);i.useEffect(()=>{e&&(e.status===o.OrderStatus.FullDeliveryFailure||e.status===o.OrderStatus.PartiallyDelivered)&&e.refundedPrice&&e.refundedPrice.amount>0&&l(!0)},[e==null?void 0:e.status]);const A=i.useCallback(async(s,b,R=!1)=>{var p,f;R||y(!0);const{data:x}=await(b?o.fetchAuthorizedOrder(`${s}/${b}`):o.fetchOrder(s));y(!1),x.status!==o.OrderStatus.Completed&&((p=x.charge)==null?void 0:p.status)===o.ChargeStatus.NotPaid&&d(`/charges/${(f=x.charge)==null?void 0:f.id}`,{replace:!0}),g(x)},[d]);i.useLayoutEffect(()=>{if(n&&!r){const s=JSON.parse(localStorage.getItem("orders")||"{}");s[n]&&d(`/orders/${n}/${s[n].fullAccessToken}`)}},[n,r,d]),i.useEffect(()=>{n&&A(n,r,!0);const s=setInterval(()=>{n&&A(n,r,!0)},5e3);return()=>{clearInterval(s)}},[n,r,A]);const G=i.useMemo(()=>!!(e!=null&&e.isApplicableForReplacement&&(e.status===o.OrderStatus.Completed||e.status===o.OrderStatus.PartiallyDelivered||e.status===o.OrderStatus.FullDeliveryFailure)),[e]),M=i.useMemo(()=>{var s;return!!((s=c==null?void 0:c.info)!=null&&s.isVouchesEnabled&&r)},[(B=c==null?void 0:c.info)==null?void 0:B.isVouchesEnabled,r]),z=i.useMemo(()=>{var s;return!!(!((s=c==null?void 0:c.info)!=null&&s.isVouchesEnabled)&&(e!=null&&e.review)&&"accessToken"in e.review&&!u)},[(F=c==null?void 0:c.info)==null?void 0:F.isVouchesEnabled,e==null?void 0:e.review,u]),H=i.useMemo(()=>{var s;return((s=c==null?void 0:c.info)==null?void 0:s.domain)||window.location.hostname},[(V=c==null?void 0:c.info)==null?void 0:V.domain]);return v?t.jsx("div",{className:a.loaderContainer,children:t.jsx(_.Loader,{})}):t.jsxs("div",{className:a.orderPage,children:[t.jsx("div",{className:a.leftSection,children:t.jsxs("div",{className:a.content,children:[t.jsx(o.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${a.main} ${u?a.mainAntistock:""}`,children:[t.jsx(o.OrderStatusBlock,{className:a.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${a.orderMainData} ${u?a.orderMainDataAntistock:""}`,children:[M&&t.jsx(o.VouchCard,{onAddMessage:()=>m(!0),isSubmitted:S}),t.jsx(o.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:($=e.charge)==null?void 0:$.gateway,email:e.customer?e.customer.email:((T=e.charge)==null?void 0:T.customerForCharge.email)||"",orderId:e.id}),z&&e.review&&t.jsx(o.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(o.TrackPayment,{className:`${a.timelineBlock} ${u?a.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(o.CheckoutFooter,{className:`${a.footer} ${u?a.footerAntistock:""}`})]})]})}),t.jsx("div",{className:a.rightSection,style:u?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:a.content,children:[((q=e==null?void 0:e.charge)==null?void 0:q.name)&&t.jsxs("header",{className:a.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:a.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:a.headerDescription,children:e.charge.description})]}),u?null:t.jsxs(_.Button,{type:"Secondary",onClick:()=>N((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(_.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:a.productList,children:P.map(s=>t.jsx(o.CheckoutProduct,{product:s,isOrder:!0,isApplicableForReplacement:G,orderId:n,accessToken:r,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},s.id))}),u?null:t.jsx(o.CheckoutPrices,{formatter:D,coupon:null,total:((L=e==null?void 0:e.endPrice)==null?void 0:L.amount)||0,discount:0,totalWithDiscount:((E=e==null?void 0:e.endPrice)==null?void 0:E.amount)||0,className:a.prices,isShowSubtotal:!1}),t.jsx(o.CheckoutFooter,{className:a.mobileFooter})]})]})}),(e==null?void 0:e.refundedPrice)&&t.jsx(Ce,{isOpen:C,onClose:()=>l(!1),refundedAmount:e.refundedPrice.amount,currency:e.refundedPrice.currency}),M&&t.jsx(o.VouchModal,{isOpen:j,onClose:()=>m(!1),products:P,orderId:n,accessToken:r,shopDomain:H,onSuccess:()=>{w(!0),m(!1),n&&A(n,r,!0)}})]})},ve=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:je},Symbol.toStringTag,{value:"Module"}));exports.Orders=Y;exports.index=ve;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, Fragment as z, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import i, { useState as ee, useMemo as
|
|
3
|
-
import { X as te, p as J, M as oe, V as X, a7 as ne } from "./builder-
|
|
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-
|
|
5
|
-
import { M as ve, I as Y, g as V, e as Ce } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import "./ticket-
|
|
2
|
+
import i, { useState as ee, useMemo as M } from "react";
|
|
3
|
+
import { X as te, p as J, M as oe, V as X, a7 as ne } from "./builder-BxbzpE8L.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-DUg5z8eK.js";
|
|
5
|
+
import { M as ve, I as Y, g as V, e as Ce } from "./ui-components-yWvpA_6p.js";
|
|
6
|
+
import "./builder-components-D7GdWNk9.js";
|
|
7
|
+
import "./ticket-CagcFJkx.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const Ne = async (n = 1) => await ae({ PageNumber: n }), rt = () => {
|
|
10
10
|
const [n, c] = i.useState(null), [d, e] = ee(null), [_, N] = i.useState(0), { page: g } = te(), [k, l] = i.useState(!0);
|
|
@@ -39,15 +39,15 @@ const Ne = async (n = 1) => await ae({ PageNumber: n }), rt = () => {
|
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
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",
|
|
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", Ie = "_timelineBlockAntistock_gc87l_81", Me = "_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
43
|
orderPage: be,
|
|
44
44
|
leftSection: Pe,
|
|
45
45
|
content: De,
|
|
46
46
|
main: Oe,
|
|
47
47
|
mainAntistock: Ae,
|
|
48
48
|
orderMainDataAntistock: Re,
|
|
49
|
-
timelineBlockAntistock:
|
|
50
|
-
footerAntistock:
|
|
49
|
+
timelineBlockAntistock: Ie,
|
|
50
|
+
footerAntistock: Me,
|
|
51
51
|
statusBlock: Ve,
|
|
52
52
|
timelineBlock: Be,
|
|
53
53
|
footer: $e,
|
|
@@ -148,9 +148,10 @@ const Ne = async (n = 1) => await ae({ PageNumber: n }), rt = () => {
|
|
|
148
148
|
style: "currency",
|
|
149
149
|
currency: D
|
|
150
150
|
}), A = i.useMemo(() => (e == null ? void 0 : e.partOrders.map((t) => {
|
|
151
|
-
var P,
|
|
151
|
+
var P, I, S;
|
|
152
152
|
return {
|
|
153
153
|
id: Number((P = t.productWithVariant) == null ? void 0 : P.id) || 0,
|
|
154
|
+
partOrderId: Number(t == null ? void 0 : t.id) || 0,
|
|
154
155
|
image: t.productWithVariant.image,
|
|
155
156
|
name: (() => {
|
|
156
157
|
var j, G;
|
|
@@ -160,7 +161,7 @@ const Ne = async (n = 1) => await ae({ PageNumber: n }), rt = () => {
|
|
|
160
161
|
description: "",
|
|
161
162
|
price: {
|
|
162
163
|
quantity: t.quantity,
|
|
163
|
-
amount: ((
|
|
164
|
+
amount: ((I = t.productWithVariant) == null ? void 0 : I.price.amount) || 0,
|
|
164
165
|
currency: (S = t.productWithVariant) == null ? void 0 : S.price.currency
|
|
165
166
|
},
|
|
166
167
|
deliveryCategories: "deliveryCategories" in t ? t.deliveryCategories : void 0,
|
|
@@ -173,9 +174,9 @@ const Ne = async (n = 1) => await ae({ PageNumber: n }), rt = () => {
|
|
|
173
174
|
i.useEffect(() => {
|
|
174
175
|
e && (e.status === C.FullDeliveryFailure || e.status === C.PartiallyDelivered) && e.refundedPrice && e.refundedPrice.amount > 0 && l(!0);
|
|
175
176
|
}, [e == null ? void 0 : e.status]);
|
|
176
|
-
const R = i.useCallback(async (t, P,
|
|
177
|
+
const R = i.useCallback(async (t, P, I = !1) => {
|
|
177
178
|
var p, f;
|
|
178
|
-
|
|
179
|
+
I || g(!0);
|
|
179
180
|
const { data: S } = await (P ? ue(`${t}/${P}`) : de(t));
|
|
180
181
|
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
182
|
replace: !0
|
|
@@ -195,13 +196,13 @@ const Ne = async (n = 1) => await ae({ PageNumber: n }), rt = () => {
|
|
|
195
196
|
clearInterval(t);
|
|
196
197
|
};
|
|
197
198
|
}, [n, c, R]);
|
|
198
|
-
const K =
|
|
199
|
+
const K = M(() => !!(e != null && e.isApplicableForReplacement && (e.status === C.Completed || e.status === C.PartiallyDelivered || e.status === C.FullDeliveryFailure)), [e]), B = M(() => {
|
|
199
200
|
var t;
|
|
200
201
|
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 =
|
|
202
|
+
}, [(F = s == null ? void 0 : s.info) == null ? void 0 : F.isVouchesEnabled, c]), Q = M(() => {
|
|
202
203
|
var t;
|
|
203
204
|
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 =
|
|
205
|
+
}, [(T = s == null ? void 0 : s.info) == null ? void 0 : T.isVouchesEnabled, e == null ? void 0 : e.review, u]), Z = M(() => {
|
|
205
206
|
var t;
|
|
206
207
|
return ((t = s == null ? void 0 : s.info) == null ? void 0 : t.domain) || window.location.hostname;
|
|
207
208
|
}, [(L = s == null ? void 0 : s.info) == null ? void 0 : L.domain]);
|
|
@@ -108,10 +108,18 @@ export interface Category {
|
|
|
108
108
|
listingIdList: number[];
|
|
109
109
|
}
|
|
110
110
|
export interface Vouch {
|
|
111
|
-
id:
|
|
111
|
+
id: string;
|
|
112
112
|
message: string;
|
|
113
113
|
imageUrl: string;
|
|
114
114
|
productNames: string[];
|
|
115
|
+
products: Array<{
|
|
116
|
+
name: string;
|
|
117
|
+
images: Array<{
|
|
118
|
+
id: number;
|
|
119
|
+
cfId: string;
|
|
120
|
+
position: number;
|
|
121
|
+
}>;
|
|
122
|
+
}>;
|
|
115
123
|
}
|
|
116
124
|
export interface PageContext {
|
|
117
125
|
listings: Listing[] | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),c=require("react"),u=require("./builder-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),u=require("./builder-BbDQDQrb.cjs"),s=require("./charge-qTFpN1-9.cjs"),m=require("./ui-components-DIzybKgf.cjs");require("./builder-components-D210UQ3i.cjs");require("./ticket-Dj3SlggC.cjs");require("react-dom");const x=async(n=1)=>await s.fetchSubscriptions({PageNumber:n}),f=()=>{const[n,o]=c.useState(null),[e,S]=c.useState(0),{page:l,setPage:b}=u.usePaginationPagesStore(),{gatewaysDetail:d,setGatewaysDetail:g,balanceSettings:i}=u.useCustomerDashboardStore();return c.useEffect(()=>{const h=async()=>{const{list:r,totalCount:p}=await x(l);o(r),S(p)},j=async()=>{const r=await s.getGatewaysDetail(i!=null&&i.isEnabled?(i==null?void 0:i.topUpSettings.gateways)||[]:[]);g(r)};h(),d||j()},[l]),t.jsx(t.Fragment,{children:n&&n.length===0?t.jsx(s.NoItemsBlock,{title:"Subscriptions History",description:"When you subscribe to a product on our website, you'll see a history of your subscriptions here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Subscriptions"}),t.jsx(s.SubscriptionsTable,{subscriptions:n,gatewaysDetail:d,totalCount:e,page:l,setPage:b})]})})},C="_subscriptionContainer_1j6ol_1",_="_leftSection_1j6ol_15",y="_content_1j6ol_26",v="_mainContent_1j6ol_33",P="_detailsSection_1j6ol_37",w="_buttonGroup_1j6ol_50",D="_detailsContent_1j6ol_57",a={subscriptionContainer:C,leftSection:_,content:y,mainContent:v,detailsSection:P,buttonGroup:w,detailsContent:D},N=()=>{const{id:n,accessToken:o}=u.useParams(),{subscription:e,setSubscription:S}=u.useSubscriptionStore(),{setIsOpen:l}=u.useModalStore(),[b,d]=c.useState(!1),[g,i]=c.useState(!1);c.useLayoutEffect(()=>{S(null)},[n,o]);const{balanceSettings:h,setBalanceSettings:j}=u.useCustomerDashboardStore();return c.useEffect(()=>{n&&o&&(async()=>{if(!n||!o)return;i(!0);const{data:p}=await s.fetchSubscription(n,o);S({...p}),i(!1)})()},[n,o]),c.useEffect(()=>{h||(async()=>{const p=await s.getBalanceSettings();j(p)})()},[h]),g?t.jsx(m.Loader,{}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:a.subscriptionContainer,children:[t.jsx("div",{className:a.leftSection,children:t.jsxs("div",{className:a.content,children:[t.jsx(s.CheckoutHeader,{}),t.jsxs("div",{className:a.mainContent,children:[e&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{id:"h3",children:"Your Subscription"}),t.jsx(s.SubscriptionProduct,{subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),t.jsx("div",{className:a.buttonGroup,children:e.pricingPlanExists&&t.jsx(m.Button,{onClick:r=>{r.stopPropagation(),l(!0),d(!0)},style:{maxWidth:"500px",width:"100%"},children:"Change Plan"})})]}),t.jsx(s.CheckoutFooter,{})]})]})}),t.jsx("div",{className:a.detailsSection,children:t.jsxs("div",{className:a.detailsContent,children:[t.jsx("h3",{id:"h3",children:"Details"}),(e==null?void 0:e.coupon)&&t.jsx(s.SubscriptionCoupon,{coupon:e.coupon,currency:e.price.currency||"USD"}),e&&t.jsx(s.ActiveSubscriptionProduct,{id:n||"",accessToken:o||"",subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),e&&t.jsxs(t.Fragment,{children:[t.jsx(s.ActivePaymentMethod,{}),e.activeTo&&t.jsx(s.SubscriptionExpirationDate,{})]}),t.jsx(s.CheckoutFooter,{className:"flex md:hidden"})]})})]}),t.jsx(s.ChangeSubscriptionPlan,{isOpen:b,setIsOpen:d,subscription:e})]})},I=Object.freeze(Object.defineProperty({__proto__:null,Subscription:N},Symbol.toStringTag,{value:"Module"}));exports.Subscriptions=f;exports.index=I;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e, Fragment as d, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import a from "react";
|
|
3
|
-
import { X as C, N as _, a7 as y, a8 as v, J as P } from "./builder-
|
|
4
|
-
import { p as w, N, P as j, S as D, g as I, i as x, q as E, l as f, r as G, A as T, s as k, t as B, v as A, w as O, x as L } from "./charge-
|
|
5
|
-
import { e as M, g as F } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import "./ticket-
|
|
3
|
+
import { X as C, N as _, a7 as y, a8 as v, J as P } from "./builder-BxbzpE8L.js";
|
|
4
|
+
import { p as w, N, P as j, S as D, g as I, i as x, q as E, l as f, r as G, A as T, s as k, t as B, v as A, w as O, x as L } from "./charge-DUg5z8eK.js";
|
|
5
|
+
import { e as M, g as F } from "./ui-components-yWvpA_6p.js";
|
|
6
|
+
import "./builder-components-D7GdWNk9.js";
|
|
7
|
+
import "./ticket-CagcFJkx.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const H = async (s = 1) => await w({ PageNumber: s }), nt = () => {
|
|
10
10
|
const [s, i] = a.useState(null), [t, S] = a.useState(0), { page: u, setPage: h } = C(), { gatewaysDetail: l, setGatewaysDetail: b, balanceSettings: n } = _();
|
|
@@ -3,12 +3,12 @@ var oe = (n, r, e) => r in n ? ee(n, r, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var D = (n, r, e) => oe(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jsx as i, jsxs as m, Fragment as ne } from "react/jsx-runtime";
|
|
5
5
|
import p from "react";
|
|
6
|
-
import { j as q, K as z, r as j, aa as re, e as E, v as N, N as te, X as ce, p as U, V as x, c as X, a as V, b as O, f as B, ab as ae, u as ie, U as K } from "./builder-
|
|
7
|
-
import { y as le, z as se, N as Ie, P as ue, B as de, D as R, E as pe, F as ge, u as he, G as Se, K as me, Q as Ce } from "./charge-
|
|
8
|
-
import { e as F, g as _, E as G, I as we } from "./ui-components-
|
|
9
|
-
import { R as J, a as Y, b as Q, c as fe } from "./builder-components-
|
|
6
|
+
import { j as q, K as z, r as j, aa as re, e as E, v as N, N as te, X as ce, p as U, V as x, c as X, a as V, b as O, f as B, ab as ae, u as ie, U as K } from "./builder-BxbzpE8L.js";
|
|
7
|
+
import { y as le, z as se, N as Ie, P as ue, B as de, D as R, E as pe, F as ge, u as he, G as Se, K as me, Q as Ce } from "./charge-DUg5z8eK.js";
|
|
8
|
+
import { e as F, g as _, E as G, I as we } from "./ui-components-yWvpA_6p.js";
|
|
9
|
+
import { R as J, a as Y, b as Q, c as fe } from "./builder-components-D7GdWNk9.js";
|
|
10
10
|
import "react-dom";
|
|
11
|
-
import "./checkout-
|
|
11
|
+
import "./checkout-DE1hYKE4.js";
|
|
12
12
|
const ye = "_wrapper_1vt13_1", be = "_bg_1vt13_10", Le = "_main_1vt13_32", ke = "_noAnimation_1vt13_37", Te = "_loading_1vt13_51", Ae = "_loadingContent_1vt13_61", Pe = "_loader_1vt13_66", T = {
|
|
13
13
|
wrapper: ye,
|
|
14
14
|
bg: be,
|