@billgangcom/theme-lib 1.119.3 → 1.120.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-D7HVGoHJ.js → builder-COOwVmYf.js} +5 -5
- package/dist/{builder-B0_nSCE7.cjs → builder-D2Z888EH.cjs} +2 -2
- package/dist/{builder-components-DMlEyBtW.cjs → builder-components-CeV8vAD9.cjs} +1 -1
- package/dist/{builder-components-BU9TRGOm.js → builder-components-DIW3F4oN.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +204 -201
- package/dist/{charge-BziuEiXF.cjs → charge-D3lrI4Ud.cjs} +39 -39
- package/dist/{charge-BHPFDh4Y.js → charge-GM7BICIx.js} +6494 -6485
- package/dist/{checkout-C7j9Xkgo.js → checkout-7Tq3dWUe.js} +5 -5
- package/dist/{checkout-upoChrmF.cjs → checkout-CjlGQSvn.cjs} +1 -1
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-Bjzt_0qo.cjs → index-9pUVSOhu.cjs} +1 -1
- package/dist/{index-dAXIVeT9.cjs → index-BDiRhZO4.cjs} +1 -1
- package/dist/{index-H3iDzrby.cjs → index-BNbbZxAR.cjs} +1 -1
- package/dist/{index-xZabZ6aj.js → index-BSEVf9MF.js} +5 -5
- package/dist/{index-Bnl5FU7T.cjs → index-C6t0KlJ9.cjs} +1 -1
- package/dist/{index-Blc3pQyP.js → index-CCCarAz0.js} +5 -5
- package/dist/{index-BVCggNJC.cjs → index-CjkknAhD.cjs} +1 -1
- package/dist/{index-BNuke_Z3.js → index-Cnz2WUHM.js} +5 -5
- package/dist/{index-mcOpPEIh.js → index-Cr_7GBLp.js} +1 -1
- package/dist/{index-BnCHgTLo.js → index-DqP6nS6V.js} +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/{order-Bs5YLWx2.cjs → order-Bww_-NyP.cjs} +1 -1
- package/dist/{order-IKJVvkIJ.js → order-D6A71mPV.js} +5 -5
- package/dist/src/storefront/components/PaymentMethods/index.d.ts +1 -0
- package/dist/src/storefront/models/shop.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{subscription-OG7SPP6m.cjs → subscription-B2CA6LXD.cjs} +1 -1
- package/dist/{subscription-DxK5pjdt.js → subscription-D4heazS1.js} +5 -5
- package/dist/{ticket-CS1Uaktn.cjs → ticket-9tbnrHX0.cjs} +1 -1
- package/dist/{ticket-3kkm5S_s.js → ticket-FbE64Ih2.js} +5 -5
- package/dist/{top-up-CujJ0lQv.js → top-up-BDG04hQY.js} +5 -5
- package/dist/{top-up-Coejy8FE.cjs → top-up-D45914YA.cjs} +1 -1
- package/dist/{ui-components-CIIldk3l.js → ui-components-B6WYf8_6.js} +4 -4
- package/dist/{ui-components-CcqIAiGT.cjs → ui-components-CUItRi8R.cjs} +1 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-DNqiMxjs.cjs → validation-BAXOBuUN.cjs} +1 -1
- package/dist/{validation-BzgPq06p.js → validation-C4E-87ir.js} +5 -5
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
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 { K as A, p as G } from "./builder-
|
|
2
|
+
import { u as D, C as N, a as x } from "./charge-GM7BICIx.js";
|
|
3
|
+
import { K as A, p as G } from "./builder-COOwVmYf.js";
|
|
4
4
|
import c from "react";
|
|
5
|
-
import { e as P } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
5
|
+
import { e as P } from "./ui-components-B6WYf8_6.js";
|
|
6
|
+
import "./builder-components-DIW3F4oN.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import "./ticket-
|
|
8
|
+
import "./ticket-FbE64Ih2.js";
|
|
9
9
|
const S = "_checkoutContainer_thje1_1", b = "_loaderContainer_thje1_20", s = {
|
|
10
10
|
checkoutContainer: S,
|
|
11
11
|
loaderContainer: b
|
|
@@ -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-D3lrI4Ud.cjs"),u=require("./builder-D2Z888EH.cjs"),l=require("react"),_=require("./ui-components-CUItRi8R.cjs");require("./builder-components-CeV8vAD9.cjs");require("react-dom");require("./ticket-9tbnrHX0.cjs");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-D2Z888EH.cjs"),a=require("./ui-components-CUItRi8R.cjs");require("./builder-components-CeV8vAD9.cjs");const t=require("./charge-D3lrI4Ud.cjs"),e=require("./ticket-9tbnrHX0.cjs"),r=require("./checkout-CjlGQSvn.cjs");require("react-dom");exports.AntistockRoutes=o.AntistockRoutes;exports.Routes=o.Routes;exports.formatPrice=o.formatPrice;exports.ImagesLoader=a.ImagesLoader;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 i, Z as p, _ as u } from "./builder-
|
|
4
|
-
import { k as c } from "./ui-components-
|
|
5
|
-
import "./builder-components-
|
|
6
|
-
import { M as f, G as d, J as l, u as x, I as C, K as h, H as k } from "./charge-
|
|
7
|
-
import { C as I, c as T, h as v, i as w, r as M, d as N, s as P, u as b, e as g, b as A, a as B } from "./ticket-
|
|
8
|
-
import { Checkout as J } from "./checkout-
|
|
3
|
+
import { Y as i, Z as p, _ as u } from "./builder-COOwVmYf.js";
|
|
4
|
+
import { k as c } from "./ui-components-B6WYf8_6.js";
|
|
5
|
+
import "./builder-components-DIW3F4oN.js";
|
|
6
|
+
import { M as f, G as d, J as l, u as x, I as C, K as h, H as k } from "./charge-GM7BICIx.js";
|
|
7
|
+
import { C as I, c as T, h as v, i as w, r as M, d as N, s as P, u as b, e as g, b as A, a as B } from "./ticket-FbE64Ih2.js";
|
|
8
|
+
import { Checkout as J } from "./checkout-7Tq3dWUe.js";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
export {
|
|
11
11
|
i as AntistockRoutes,
|
|
@@ -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-D3lrI4Ud.cjs"),t=require("./builder-D2Z888EH.cjs"),J=require("./ticket-9tbnrHX0.cjs"),g=require("./ui-components-CUItRi8R.cjs");require("./builder-components-CeV8vAD9.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 +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-D2Z888EH.cjs");const r=require("react"),t=require("./ui-components-CUItRi8R.cjs");require("./builder-components-CeV8vAD9.cjs");require("react-dom");require("./charge-D3lrI4Ud.cjs");require("./ticket-9tbnrHX0.cjs");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-D2Z888EH.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,11 +1,11 @@
|
|
|
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-B6WYf8_6.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { p as s, am as a } from "./builder-
|
|
5
|
-
import "./builder-components-
|
|
4
|
+
import { p as s, am as a } from "./builder-COOwVmYf.js";
|
|
5
|
+
import "./builder-components-DIW3F4oN.js";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
import "./charge-
|
|
8
|
-
import "./ticket-
|
|
7
|
+
import "./charge-GM7BICIx.js";
|
|
8
|
+
import "./ticket-FbE64Ih2.js";
|
|
9
9
|
const c = "_wrapper_ej209_1", m = "_content_ej209_12", p = "_title_ej209_22", r = {
|
|
10
10
|
wrapper: c,
|
|
11
11
|
content: m,
|
|
@@ -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-CUItRi8R.cjs");require("react");const s=require("./builder-D2Z888EH.cjs");require("./builder-components-CeV8vAD9.cjs");require("react-dom");require("./charge-D3lrI4Ud.cjs");require("./ticket-9tbnrHX0.cjs");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,11 +1,11 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "./builder-
|
|
2
|
+
import "./builder-COOwVmYf.js";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { e as r } from "./ui-components-
|
|
5
|
-
import "./builder-components-
|
|
4
|
+
import { e as r } from "./ui-components-B6WYf8_6.js";
|
|
5
|
+
import "./builder-components-DIW3F4oN.js";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
import "./charge-
|
|
8
|
-
import "./ticket-
|
|
7
|
+
import "./charge-GM7BICIx.js";
|
|
8
|
+
import "./ticket-FbE64Ih2.js";
|
|
9
9
|
const f = () => (e.useEffect(() => {
|
|
10
10
|
setTimeout(() => {
|
|
11
11
|
window.location.reload();
|
|
@@ -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-CUItRi8R.cjs");require("react");const n=require("./builder-D2Z888EH.cjs");require("./builder-components-CeV8vAD9.cjs");require("react-dom");require("./charge-D3lrI4Ud.cjs");require("./ticket-9tbnrHX0.cjs");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,11 +1,11 @@
|
|
|
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-B6WYf8_6.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-
|
|
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-COOwVmYf.js";
|
|
5
|
+
import "./builder-components-DIW3F4oN.js";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
import "./charge-
|
|
8
|
-
import "./ticket-
|
|
7
|
+
import "./charge-GM7BICIx.js";
|
|
8
|
+
import "./ticket-FbE64Ih2.js";
|
|
9
9
|
const C = "_wrapper_1yd2j_1", A = "_error_1yd2j_11", N = "_title_1yd2j_21", B = "_buttons_1yd2j_29", i = {
|
|
10
10
|
wrapper: C,
|
|
11
11
|
error: A,
|
|
@@ -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-COOwVmYf.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,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 { Z as z, a1 as U } from "./charge-
|
|
4
|
-
import { N as f, O as T, ab as F, p as G, a6 as R, e as H, Q as V, m as q, a as B, u as K, K as M, b as Q, al as X, ag as Y } from "./builder-
|
|
5
|
-
import { g as Z } from "./ticket-
|
|
6
|
-
import { e as $, N as ee, x as te } from "./ui-components-
|
|
7
|
-
import "./builder-components-
|
|
3
|
+
import { Z as z, a1 as U } from "./charge-GM7BICIx.js";
|
|
4
|
+
import { N as f, O as T, ab as F, p as G, a6 as R, e as H, Q as V, m as q, a as B, u as K, K as M, b as Q, al as X, ag as Y } from "./builder-COOwVmYf.js";
|
|
5
|
+
import { g as Z } from "./ticket-FbE64Ih2.js";
|
|
6
|
+
import { e as $, N as ee, x as te } from "./ui-components-B6WYf8_6.js";
|
|
7
|
+
import "./builder-components-DIW3F4oN.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const se = "_notifications_1ntnm_1", ae = "_wrapper_1ntnm_12", P = {
|
|
10
10
|
notifications: se,
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./builder.cjs.js"),c=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./builder.cjs.js"),c=require("./builder-D2Z888EH.cjs"),u=require("react/jsx-runtime"),d=require("react"),e=require("./ui-components-CUItRi8R.cjs");require("./builder-components-CeV8vAD9.cjs");const r=require("./charge-D3lrI4Ud.cjs");require("react-dom");const t=require("./ticket-9tbnrHX0.cjs");function I(o){d.useEffect(()=>{Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})},[o])}function f(o){Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})}function l(o){return o.endsWith("Icon")?o.slice(0,-4):o}function g(o,s=20,i=!0){return o.map(n=>({value:i?l(n):n,addon:u.jsx(e.Icon,{name:n,width:s,height:s,showPlaceholder:!0})}))}exports.App=a.App;exports.AntistockRoutes=c.AntistockRoutes;exports.Routes=c.Routes;exports.formatPrice=c.formatPrice;exports.Icon=e.Icon;exports.addIconSuffix=e.addIconSuffix;exports.getRegisteredIcon=e.getRegisteredIcon;exports.getRegisteredIcons=e.getRegisteredIcons;exports.isIconRegistered=e.isIconRegistered;exports.loadIcon=e.loadIcon;exports.registerIcon=e.registerIcon;exports.stripIconSuffix=e.stripIconSuffix;exports.useDynamicIconRegistration=e.useDynamicIconRegistration;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=t.ColorVariables;exports.aspectRatioOptions=t.aspectRatioOptions;exports.hotReload=t.hotReload;exports.iconNames=t.iconNames;exports.removeNotification=t.removeNotification;exports.showNotification=t.showNotification;exports.splitTextIntoSpans=t.splitTextIntoSpans;exports.useAdaptiveStyles=t.useAdaptiveStyles;exports.useBalance=t.useBalance;exports.useBuilderPages=t.useBuilderPages;exports.useCreateTicket=t.useCreateTicket;exports.createIconLeftAddons=g;exports.registerIcons=f;exports.useIconRegistration=I;
|
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { App as R } from "./builder.es.js";
|
|
2
|
-
import { Y as v, Z as w, _ as b } from "./builder-
|
|
2
|
+
import { Y as v, Z as w, _ as b } from "./builder-COOwVmYf.js";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect as i } from "react";
|
|
5
|
-
import { r as o, I as n } from "./ui-components-
|
|
6
|
-
import { v as A, o as P, q as S, p as T, s as j, t as E, n as M } from "./ui-components-
|
|
7
|
-
import "./builder-components-
|
|
8
|
-
import { M as y, G as B, J as D, u as G, I as J, K as q, H } from "./charge-
|
|
5
|
+
import { r as o, I as n } from "./ui-components-B6WYf8_6.js";
|
|
6
|
+
import { v as A, o as P, q as S, p as T, s as j, t as E, n as M } from "./ui-components-B6WYf8_6.js";
|
|
7
|
+
import "./builder-components-DIW3F4oN.js";
|
|
8
|
+
import { M as y, G as B, J as D, u as G, I as J, K as q, H } from "./charge-GM7BICIx.js";
|
|
9
9
|
import "react-dom";
|
|
10
|
-
import { C as L, c as V, h as W, i as Y, r as Z, d as _, s as F, u as Q, e as U, b as X, a as $ } from "./ticket-
|
|
10
|
+
import { C as L, c as V, h as W, i as Y, r as Z, d as _, s as F, u as Q, e as U, b as X, a as $ } from "./ticket-FbE64Ih2.js";
|
|
11
11
|
function m(e) {
|
|
12
12
|
i(() => {
|
|
13
13
|
Object.entries(e).forEach(([s, t]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),i=require("react"),x=require("./builder-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),i=require("react"),x=require("./builder-D2Z888EH.cjs"),a=require("./charge-D3lrI4Ud.cjs"),O=require("./ui-components-CUItRi8R.cjs");require("./builder-components-CeV8vAD9.cjs");require("react-dom");require("./ticket-9tbnrHX0.cjs");const U=async(o=1)=>await a.fetchOrders({PageNumber:o}),z=()=>{const[o,r]=i.useState(null),[u,e]=i.useState(null),[v,w]=i.useState(0),{page:f}=x.usePaginationPagesStore(),[j,g]=i.useState(!0);async function N(){g(!0);const{list:p,totalCount:l}=await U(f);r(p),w(l),e(null),g(!1)}async function _(){const p=(o==null?void 0:o.map(n=>n.gatewayName))||[],l=await a.getGatewaysDetail(p);e(l)}return i.useEffect(()=>{!u&&o&&_()},[o,u]),i.useEffect(()=>{N()},[f]),s.jsx(s.Fragment,{children:o!=null&&o.length&&o.length===0?s.jsx(a.NoItemsBlock,{title:"No Orders",description:"When you purchase products from our website, you'll see a history of orders here."}):s.jsxs(s.Fragment,{children:[s.jsx(a.PageTitle,{title:"Orders"}),s.jsx(a.OrdersTable,{orders:o,gatewaysDetail:u,totalCount:v,isLoading:j})]})})},H="_orderPage_gc87l_1",J="_leftSection_gc87l_15",K="_content_gc87l_35",Q="_main_gc87l_42",X="_mainAntistock_gc87l_56",Y="_orderMainDataAntistock_gc87l_69",Z="_timelineBlockAntistock_gc87l_81",ee="_footerAntistock_gc87l_92",te="_statusBlock_gc87l_104",se="_timelineBlock_gc87l_81",oe="_footer_gc87l_92",ae="_rightSection_gc87l_121",ce="_header_gc87l_142",ne="_productList_gc87l_150",ie="_mobileFooter_gc87l_157",re="_loaderContainer_gc87l_166",le="_orderMainData_gc87l_69",ue="_prices_gc87l_181",de="_headerTitle_gc87l_185",me="_headerDescription_gc87l_189",c={orderPage:H,leftSection:J,content:K,main:Q,mainAntistock:X,orderMainDataAntistock:Y,timelineBlockAntistock:Z,footerAntistock:ee,statusBlock:te,timelineBlock:se,footer:oe,rightSection:ae,header:ce,productList:ne,mobileFooter:ie,loaderContainer:re,orderMainData:le,prices:ue,headerTitle:de,headerDescription:me},he=()=>{var A,P,b,R,M,V,B,F,I;const{id:o,accessToken:r}=x.useParams(),u=x.useNavigate(),[e,v]=i.useState(),[w,f]=i.useState(!1),[j,g]=i.useState(!1),[N,_]=i.useState(!1),p=a.useCopy(),{isAntistock:l,general:n}=x.useGeneralStore(),q=((A=e==null?void 0:e.rawPrice)==null?void 0:A.currency)||"USD",L=new Intl.NumberFormat("en-US",{style:"currency",currency:q}),C=i.useMemo(()=>(e==null?void 0:e.partOrders.map(t=>{var y,S,h;return{id:Number((y=t.productWithVariant)==null?void 0:y.id)||0,partOrderId:Number(t==null?void 0:t.id)||0,image:t.productWithVariant.image,name:(()=>{var T,$;const d=((T=t.productWithVariant)==null?void 0:T.name)||"",m=(($=t.productWithVariant)==null?void 0:$.variantName)||"";return!d&&!m?"":!m||d===m?d:d?`${d} (${m})`:m})(),description:"",price:{quantity:t.quantity,amount:((S=t.productWithVariant)==null?void 0:S.price.amount)||0,currency:(h=t.productWithVariant)==null?void 0:h.price.currency},deliveryCategories:"deliveryCategories"in t?t.deliveryCategories:void 0,customerNote:t.customerNote,chargeType:t.chargeType||"ONE_TIME",replacementRequests:"replacementRequests"in t?t.replacementRequests:void 0,allowedReplacementReasons:"allowedReplacementReasons"in t?t.allowedReplacementReasons:void 0}}))||[],[e]);i.useEffect(()=>{e&&(e.status===a.OrderStatus.FullDeliveryFailure||e.status===a.OrderStatus.PartiallyDelivered)&&e.refundedPrice&&e.refundedPrice.amount>0&&g(!0)},[e==null?void 0:e.status]);const k=i.useCallback(async(t,y,S=!1)=>{var d,m;S||f(!0);const{data:h}=await(y?a.fetchAuthorizedOrder(`${t}/${y}`):a.fetchOrder(t));f(!1),h.status!==a.OrderStatus.Completed&&((d=h.charge)==null?void 0:d.status)===a.ChargeStatus.NotPaid&&u(`/charges/${(m=h.charge)==null?void 0:m.id}`,{replace:!0}),v(h)},[u]);i.useLayoutEffect(()=>{if(o&&!r){const t=JSON.parse(localStorage.getItem("orders")||"{}");t[o]&&u(`/orders/${o}/${t[o].fullAccessToken}`)}},[o,r,u]),i.useEffect(()=>{o&&k(o,r,!0);const t=setInterval(()=>{o&&k(o,r,!0)},5e3);return()=>{clearInterval(t)}},[o,r,k]);const E=i.useMemo(()=>!!(e!=null&&e.isApplicableForReplacement&&(e.status===a.OrderStatus.Completed||e.status===a.OrderStatus.PartiallyDelivered||e.status===a.OrderStatus.FullDeliveryFailure)),[e]),D=i.useMemo(()=>{var t;return!!((t=n==null?void 0:n.info)!=null&&t.isVouchesEnabled&&r)},[(P=n==null?void 0:n.info)==null?void 0:P.isVouchesEnabled,r]),W=i.useMemo(()=>{var t;return!!(!((t=n==null?void 0:n.info)!=null&&t.isVouchesEnabled)&&(e!=null&&e.review)&&"accessToken"in e.review&&!l)},[(b=n==null?void 0:n.info)==null?void 0:b.isVouchesEnabled,e==null?void 0:e.review,l]),G=i.useMemo(()=>{var t;return((t=n==null?void 0:n.info)==null?void 0:t.domain)||window.location.hostname},[(R=n==null?void 0:n.info)==null?void 0:R.domain]);return w?s.jsx("div",{className:c.loaderContainer,children:s.jsx(O.Loader,{})}):s.jsxs("div",{className:c.orderPage,children:[s.jsx("div",{className:c.leftSection,children:s.jsxs("div",{className:c.content,children:[s.jsx(a.CheckoutHeader,{}),e&&s.jsxs("div",{className:`${c.main} ${l?c.mainAntistock:""}`,children:[s.jsx(a.OrderStatusBlock,{className:c.statusBlock,orderStatus:e.status}),s.jsxs("div",{className:`${c.orderMainData} ${l?c.orderMainDataAntistock:""}`,children:[D&&s.jsx(a.VouchCard,{onAddMessage:()=>_(!0),isVouchLeft:e.isVouchLeft}),s.jsx(a.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(M=e.charge)==null?void 0:M.gateway,email:e.customer?e.customer.email:((V=e.charge)==null?void 0:V.customerForCharge.email)||"",orderId:e.id}),W&&e.review&&s.jsx(a.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&s.jsx(a.TrackPayment,{className:`${c.timelineBlock} ${l?c.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),s.jsx(a.CheckoutFooter,{className:`${c.footer} ${l?c.footerAntistock:""}`})]})]})}),s.jsx("div",{className:c.rightSection,style:l?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:s.jsxs("div",{className:c.content,children:[((B=e==null?void 0:e.charge)==null?void 0:B.name)&&s.jsxs("header",{className:c.header,children:[s.jsxs("div",{children:[s.jsx("h1",{className:c.headerTitle,children:e.charge.name}),e.charge.description&&s.jsx("p",{className:c.headerDescription,children:e.charge.description})]}),l?null:s.jsxs(O.Button,{type:"Secondary",onClick:()=>p((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[s.jsx(O.Icon,{name:"Copy"}),s.jsx("span",{children:"Copy ID"})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:c.productList,children:C.map(t=>s.jsx(a.CheckoutProduct,{product:t,isOrder:!0,isApplicableForReplacement:E,orderId:o,accessToken:r,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},t.id))}),l?null:s.jsx(a.CheckoutPrices,{formatter:L,coupon:null,total:((F=e==null?void 0:e.endPrice)==null?void 0:F.amount)||0,discount:0,totalWithDiscount:((I=e==null?void 0:e.endPrice)==null?void 0:I.amount)||0,className:c.prices,isShowSubtotal:!1}),s.jsx(a.CheckoutFooter,{className:c.mobileFooter})]})]})}),(e==null?void 0:e.refundedPrice)&&s.jsx(a.RefundNotificationModal,{isOpen:j,onClose:()=>g(!1),refundedAmount:e.refundedPrice.amount,currency:e.refundedPrice.currency}),D&&s.jsx(a.VouchModal,{isOpen:N,onClose:()=>_(!1),products:C,orderId:o,accessToken:r,shopDomain:G,onSuccess:()=>{_(!1),o&&k(o,r,!0)}})]})},fe=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:he},Symbol.toStringTag,{value:"Module"}));exports.Orders=z;exports.index=fe;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s, Fragment as W, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import i, { useState as H, useMemo as S } from "react";
|
|
3
|
-
import { X as J, a7 as K, p as X, K as Q } from "./builder-
|
|
4
|
-
import { f as Y, N as Z, P as ee, O as te, g as ae, b as se, c as f, d as oe, e as ce, h as ie, i as ne, j as re, V as le, k as de, L as ue, T as me, l as x, m as he, n as fe, R as pe, o as ge } from "./charge-
|
|
5
|
-
import { e as _e, g as ye, I as ke } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
3
|
+
import { X as J, a7 as K, p as X, K as Q } from "./builder-COOwVmYf.js";
|
|
4
|
+
import { f as Y, N as Z, P as ee, O as te, g as ae, b as se, c as f, d as oe, e as ce, h as ie, i as ne, j as re, V as le, k as de, L as ue, T as me, l as x, m as he, n as fe, R as pe, o as ge } from "./charge-GM7BICIx.js";
|
|
5
|
+
import { e as _e, g as ye, I as ke } from "./ui-components-B6WYf8_6.js";
|
|
6
|
+
import "./builder-components-DIW3F4oN.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import "./ticket-
|
|
8
|
+
import "./ticket-FbE64Ih2.js";
|
|
9
9
|
const ve = async (a = 1) => await Y({ PageNumber: a }), Xe = () => {
|
|
10
10
|
const [a, n] = i.useState(null), [d, e] = H(null), [N, O] = i.useState(0), { page: p } = J(), [C, g] = i.useState(!0);
|
|
11
11
|
async function D() {
|