@billgangcom/theme-lib 1.124.1 → 1.124.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{builder-Ddop-8xf.js → builder-B_dkm02v.js} +5 -5
  2. package/dist/{builder-CN6EcOo5.cjs → builder-Dk_MBUqd.cjs} +2 -2
  3. package/dist/builder-components-CHl1cc7Z.cjs +5 -0
  4. package/dist/{builder-components-Co8dAOpQ.js → builder-components-l43cXoO5.js} +39 -16
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +23 -23
  7. package/dist/{charge-DKR9uXCa.js → charge-BU-Az7UN.js} +6 -6
  8. package/dist/{charge-C1avZix7.cjs → charge-CcS0C6Hj.cjs} +1 -1
  9. package/dist/{checkout-DMJ9Uz7K.cjs → checkout-BLgmgd9k.cjs} +1 -1
  10. package/dist/{checkout-CCi0lVqr.js → checkout-ngWZwoPX.js} +5 -5
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-Dotf7I4I.cjs → index-0PqQaCZ4.cjs} +1 -1
  14. package/dist/{index-B2X6m84l.js → index-B9Rq5d0u.js} +5 -5
  15. package/dist/{index-D60dcgnT.js → index-BlWsjWZ3.js} +5 -5
  16. package/dist/{index-DdqsQwCA.cjs → index-Bn9YCw-R.cjs} +1 -1
  17. package/dist/{index-DJWZ286h.cjs → index-ByBe0n_t.cjs} +1 -1
  18. package/dist/{index-Cg9SH7GR.cjs → index-CPnT643z.cjs} +1 -1
  19. package/dist/{index-C8V0h3ez.cjs → index-Cg7DJNHO.cjs} +1 -1
  20. package/dist/{index-CgO4TZoW.js → index-D78O6F0T.js} +5 -5
  21. package/dist/{index-BlUHhZz9.js → index-D82GsMsp.js} +1 -1
  22. package/dist/{index-_9ANbEVO.cjs → index-DCYg5lir.cjs} +1 -1
  23. package/dist/{index-jN8q1wgB.js → index-Doa1gQPZ.js} +2 -2
  24. package/dist/{index-DJkbapPF.js → index-gEVhujlj.js} +5 -5
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.es.js +6 -6
  27. package/dist/{order-DnPLP5zk.cjs → order-BgjNH9DK.cjs} +1 -1
  28. package/dist/{order-Dos_LDKQ.js → order-CSPUNQL8.js} +5 -5
  29. package/dist/src/ui/ItemsSettings/popup.d.ts +11 -1
  30. package/dist/style.css +1 -1
  31. package/dist/{subscription-DmySCcmA.js → subscription-Cv67YuMc.js} +5 -5
  32. package/dist/{subscription-B5WUsxPh.cjs → subscription-DkAqKLzt.cjs} +1 -1
  33. package/dist/{ticket-B2EMN-4l.js → ticket-BMS8VibT.js} +5 -5
  34. package/dist/{ticket-CXF_4RQh.cjs → ticket-DNKLLT6h.cjs} +1 -1
  35. package/dist/{top-up-CsP9Vx2_.js → top-up-CTo-WorN.js} +5 -5
  36. package/dist/{top-up-VidGg46i.cjs → top-up-DzH6R08c.cjs} +1 -1
  37. package/dist/{ui-components-C1gbeJtH.js → ui-components-BHKWyvO1.js} +2032 -1992
  38. package/dist/ui-components-CQk_SRR5.cjs +1 -0
  39. package/dist/ui.cjs.js +1 -1
  40. package/dist/ui.es.js +1 -1
  41. package/dist/{validation-C6sHStJp.cjs → validation-B7tkrQWi.cjs} +1 -1
  42. package/dist/{validation-BKjF1gno.js → validation-DTFAUmYS.js} +5 -5
  43. package/package.json +1 -1
  44. package/dist/builder-components-CSl62_15.cjs +0 -5
  45. package/dist/ui-components-Dd9qd1PE.cjs +0 -1
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-Ddop-8xf.js";
2
+ import { Y as v, Z as w, _ as b } from "./builder-B_dkm02v.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-C1gbeJtH.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-C1gbeJtH.js";
7
- import "./builder-components-Co8dAOpQ.js";
8
- import { M as y, G as B, J as D, u as G, I as J, K as q, H } from "./charge-DKR9uXCa.js";
5
+ import { r as o, I as n } from "./ui-components-BHKWyvO1.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-BHKWyvO1.js";
7
+ import "./builder-components-l43cXoO5.js";
8
+ import { M as y, G as B, J as D, u as G, I as J, K as q, H } from "./charge-BU-Az7UN.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-B2EMN-4l.js";
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-BMS8VibT.js";
11
11
  function m(e) {
12
12
  i(() => {
13
13
  Object.entries(e).forEach(([s, t]) => {
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),r=require("react"),O=require("./builder-CN6EcOo5.cjs"),s=require("./charge-C1avZix7.cjs"),C=require("./ui-components-Dd9qd1PE.cjs");require("./builder-components-CSl62_15.cjs");require("react-dom");require("./ticket-CXF_4RQh.cjs");const K=async(n=1)=>await s.fetchOrders({PageNumber:n}),Q=()=>{const[n,l]=r.useState(null),[d,e]=r.useState(null),[p,g]=r.useState(0),{page:m}=O.usePaginationPagesStore(),[f,_]=r.useState(!0);async function j(){_(!0);const{list:S,totalCount:u}=await K(m);l(S),g(u),e(null),_(!1)}async function y(){const S=(n==null?void 0:n.map(c=>c.gatewayName))||[],u=await s.getGatewaysDetail(S);e(u)}return r.useEffect(()=>{!d&&n&&y()},[n,d]),r.useEffect(()=>{j()},[m]),t.jsx(t.Fragment,{children:n!=null&&n.length&&n.length===0?t.jsx(s.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(s.PageTitle,{title:"Orders"}),t.jsx(s.OrdersTable,{orders:n,gatewaysDetail:d,totalCount:p,isLoading:f})]})})},X="_orderPage_gc87l_1",Y="_leftSection_gc87l_15",Z="_content_gc87l_35",ee="_main_gc87l_42",te="_mainAntistock_gc87l_56",se="_orderMainDataAntistock_gc87l_69",ne="_timelineBlockAntistock_gc87l_81",ae="_footerAntistock_gc87l_92",oe="_statusBlock_gc87l_104",ie="_timelineBlock_gc87l_81",ce="_footer_gc87l_92",re="_rightSection_gc87l_121",le="_header_gc87l_142",ue="_productList_gc87l_150",de="_mobileFooter_gc87l_157",me="_loaderContainer_gc87l_166",he="_orderMainData_gc87l_69",ge="_prices_gc87l_181",fe="_headerTitle_gc87l_185",pe="_headerDescription_gc87l_189",i={orderPage:X,leftSection:Y,content:Z,main:ee,mainAntistock:te,orderMainDataAntistock:se,timelineBlockAntistock:ne,footerAntistock:ae,statusBlock:oe,timelineBlock:ie,footer:ce,rightSection:re,header:le,productList:ue,mobileFooter:de,loaderContainer:me,orderMainData:he,prices:ge,headerTitle:fe,headerDescription:pe},_e=n=>{if(!n)return null;const l=n.split(":");if(l.length!==3)return null;const[d,e,p]=l,g=Number(d),m=Number(e),f=Number(p);return Number.isNaN(g)||Number.isNaN(m)||Number.isNaN(f)?null:((g*60+m)*60+f)*1e3},ye=()=>{var A,R,M,T,F,E,I,V,B;const{id:n,accessToken:l}=O.useParams(),d=O.useNavigate(),[e,p]=r.useState(),[g,m]=r.useState(!1),[f,_]=r.useState(!1),[j,y]=r.useState(!1),S=s.useCopy(),{isAntistock:u,general:c}=O.useGeneralStore(),G=((A=e==null?void 0:e.rawPrice)==null?void 0:A.currency)||"USD",U=new Intl.NumberFormat("en-US",{style:"currency",currency:G}),D=r.useMemo(()=>{var h;const a=_e((e==null?void 0:e.estimatedProcessingTime)??null),N=(h=e==null?void 0:e.timeline)==null?void 0:h[s.OrderStatus.Processing],P=(e==null?void 0:e.status)===s.OrderStatus.Processing&&N&&a?{processingStartTime:new Date(N),expectedProcessingMs:a,processingExpiresAt:e!=null&&e.processingExpiresAt?new Date(e.processingExpiresAt):void 0}:null;return(e==null?void 0:e.partOrders.map(o=>{var x,$,q;return{id:Number((x=o.productWithVariant)==null?void 0:x.id)||0,partOrderId:Number(o==null?void 0:o.id)||0,image:o.productWithVariant.image,name:(()=>{var L,W;const v=((L=o.productWithVariant)==null?void 0:L.name)||"",k=((W=o.productWithVariant)==null?void 0:W.variantName)||"";return!v&&!k?"":!k||v===k?v:v?`${v} (${k})`:k})(),description:"",price:{quantity:o.quantity,amount:(($=o.productWithVariant)==null?void 0:$.price.amount)||0,currency:(q=o.productWithVariant)==null?void 0:q.price.currency},deliveryCategories:"deliveryCategories"in o?o.deliveryCategories:void 0,customerNote:o.customerNote,chargeType:o.chargeType||"ONE_TIME",replacementRequests:"replacementRequests"in o?o.replacementRequests:void 0,allowedReplacementReasons:"allowedReplacementReasons"in o?o.allowedReplacementReasons:void 0,processingInfo:P}}))||[]},[e]);r.useEffect(()=>{e&&(e.status===s.OrderStatus.FullDeliveryFailure||e.status===s.OrderStatus.PartiallyDelivered)&&e.refundedPrice&&e.refundedPrice.amount>0&&_(!0)},[e==null?void 0:e.status]);const w=r.useCallback(async(a,N,P=!1)=>{var o,x;P||m(!0);const{data:h}=await(N?s.fetchAuthorizedOrder(`${a}/${N}`):s.fetchOrder(a));m(!1),h.status!==s.OrderStatus.Completed&&((o=h.charge)==null?void 0:o.status)===s.ChargeStatus.NotPaid&&d(`/charges/${(x=h.charge)==null?void 0:x.id}`,{replace:!0}),p(h)},[d]);r.useLayoutEffect(()=>{if(n&&!l){const a=JSON.parse(localStorage.getItem("orders")||"{}");a[n]&&d(`/orders/${n}/${a[n].fullAccessToken}`)}},[n,l,d]),r.useEffect(()=>{n&&w(n,l,!0);const a=setInterval(()=>{n&&w(n,l,!0)},5e3);return()=>{clearInterval(a)}},[n,l,w]);const z=r.useMemo(()=>!!(e!=null&&e.isApplicableForReplacement&&(e.status===s.OrderStatus.Completed||e.status===s.OrderStatus.PartiallyDelivered||e.status===s.OrderStatus.FullDeliveryFailure)),[e]),b=r.useMemo(()=>{var a;return!!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled&&l&&((e==null?void 0:e.status)===s.OrderStatus.Completed||(e==null?void 0:e.status)===s.OrderStatus.FullDeliveryFailure||(e==null?void 0:e.status)===s.OrderStatus.PartiallyDelivered))},[(R=c==null?void 0:c.info)==null?void 0:R.isVouchesEnabled,l]),H=r.useMemo(()=>{var a;return!!(!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled)&&(e!=null&&e.review)&&"accessToken"in e.review&&!u)},[(M=c==null?void 0:c.info)==null?void 0:M.isVouchesEnabled,e==null?void 0:e.review,u]),J=r.useMemo(()=>{var a;return((a=c==null?void 0:c.info)==null?void 0:a.domain)||window.location.hostname},[(T=c==null?void 0:c.info)==null?void 0:T.domain]);return g?t.jsx("div",{className:i.loaderContainer,children:t.jsx(C.Loader,{})}):(console.log("ORDER PAGE"),console.log(e),t.jsxs("div",{className:i.orderPage,children:[t.jsx("div",{className:i.leftSection,children:t.jsxs("div",{className:i.content,children:[t.jsx(s.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${i.main} ${u?i.mainAntistock:""}`,children:[t.jsx(s.OrderStatusBlock,{className:i.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${i.orderMainData} ${u?i.orderMainDataAntistock:""}`,children:[b&&t.jsx(s.VouchCard,{onAddMessage:()=>y(!0),isVouchLeft:e.isVouchLeft}),t.jsx(s.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(F=e.charge)==null?void 0:F.gateway,email:e.customer?e.customer.email:((E=e.charge)==null?void 0:E.customerForCharge.email)||"",orderId:e.id}),H&&e.review&&t.jsx(s.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(s.TrackPayment,{className:`${i.timelineBlock} ${u?i.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(s.CheckoutFooter,{className:`${i.footer} ${u?i.footerAntistock:""}`})]})]})}),t.jsx("div",{className:i.rightSection,style:u?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:i.content,children:[((I=e==null?void 0:e.charge)==null?void 0:I.name)&&t.jsxs("header",{className:i.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:i.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:i.headerDescription,children:e.charge.description})]}),u?null:t.jsxs(C.Button,{type:"Secondary",onClick:()=>S((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(C.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:i.productList,children:D.map(a=>t.jsx(s.CheckoutProduct,{product:a,isOrder:!0,isApplicableForReplacement:z,orderId:n,accessToken:l,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},a.id))}),u?null:t.jsx(s.CheckoutPrices,{formatter:U,coupon:null,total:((V=e==null?void 0:e.endPrice)==null?void 0:V.amount)||0,discount:0,totalWithDiscount:((B=e==null?void 0:e.endPrice)==null?void 0:B.amount)||0,className:i.prices,isShowSubtotal:!1}),t.jsx(s.CheckoutFooter,{className:i.mobileFooter})]})]})}),(e==null?void 0:e.refundedPrice)&&t.jsx(s.RefundNotificationModal,{isOpen:f,onClose:()=>_(!1),refundedAmount:e.refundedPrice.amount,currency:e.refundedPrice.currency}),b&&t.jsx(s.VouchModal,{isOpen:j,onClose:()=>y(!1),products:D,orderId:n,accessToken:l,shopDomain:J,onSuccess:()=>{y(!1),n&&w(n,l,!0)}})]}))},Se=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:ye},Symbol.toStringTag,{value:"Module"}));exports.Orders=Q;exports.index=Se;
1
+ "use strict";const t=require("react/jsx-runtime"),r=require("react"),O=require("./builder-Dk_MBUqd.cjs"),s=require("./charge-CcS0C6Hj.cjs"),C=require("./ui-components-CQk_SRR5.cjs");require("./builder-components-CHl1cc7Z.cjs");require("react-dom");require("./ticket-DNKLLT6h.cjs");const K=async(n=1)=>await s.fetchOrders({PageNumber:n}),Q=()=>{const[n,l]=r.useState(null),[d,e]=r.useState(null),[p,g]=r.useState(0),{page:m}=O.usePaginationPagesStore(),[f,_]=r.useState(!0);async function j(){_(!0);const{list:S,totalCount:u}=await K(m);l(S),g(u),e(null),_(!1)}async function y(){const S=(n==null?void 0:n.map(c=>c.gatewayName))||[],u=await s.getGatewaysDetail(S);e(u)}return r.useEffect(()=>{!d&&n&&y()},[n,d]),r.useEffect(()=>{j()},[m]),t.jsx(t.Fragment,{children:n!=null&&n.length&&n.length===0?t.jsx(s.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(s.PageTitle,{title:"Orders"}),t.jsx(s.OrdersTable,{orders:n,gatewaysDetail:d,totalCount:p,isLoading:f})]})})},X="_orderPage_gc87l_1",Y="_leftSection_gc87l_15",Z="_content_gc87l_35",ee="_main_gc87l_42",te="_mainAntistock_gc87l_56",se="_orderMainDataAntistock_gc87l_69",ne="_timelineBlockAntistock_gc87l_81",ae="_footerAntistock_gc87l_92",oe="_statusBlock_gc87l_104",ie="_timelineBlock_gc87l_81",ce="_footer_gc87l_92",re="_rightSection_gc87l_121",le="_header_gc87l_142",ue="_productList_gc87l_150",de="_mobileFooter_gc87l_157",me="_loaderContainer_gc87l_166",he="_orderMainData_gc87l_69",ge="_prices_gc87l_181",fe="_headerTitle_gc87l_185",pe="_headerDescription_gc87l_189",i={orderPage:X,leftSection:Y,content:Z,main:ee,mainAntistock:te,orderMainDataAntistock:se,timelineBlockAntistock:ne,footerAntistock:ae,statusBlock:oe,timelineBlock:ie,footer:ce,rightSection:re,header:le,productList:ue,mobileFooter:de,loaderContainer:me,orderMainData:he,prices:ge,headerTitle:fe,headerDescription:pe},_e=n=>{if(!n)return null;const l=n.split(":");if(l.length!==3)return null;const[d,e,p]=l,g=Number(d),m=Number(e),f=Number(p);return Number.isNaN(g)||Number.isNaN(m)||Number.isNaN(f)?null:((g*60+m)*60+f)*1e3},ye=()=>{var A,R,M,T,F,E,I,V,B;const{id:n,accessToken:l}=O.useParams(),d=O.useNavigate(),[e,p]=r.useState(),[g,m]=r.useState(!1),[f,_]=r.useState(!1),[j,y]=r.useState(!1),S=s.useCopy(),{isAntistock:u,general:c}=O.useGeneralStore(),G=((A=e==null?void 0:e.rawPrice)==null?void 0:A.currency)||"USD",U=new Intl.NumberFormat("en-US",{style:"currency",currency:G}),D=r.useMemo(()=>{var h;const a=_e((e==null?void 0:e.estimatedProcessingTime)??null),N=(h=e==null?void 0:e.timeline)==null?void 0:h[s.OrderStatus.Processing],P=(e==null?void 0:e.status)===s.OrderStatus.Processing&&N&&a?{processingStartTime:new Date(N),expectedProcessingMs:a,processingExpiresAt:e!=null&&e.processingExpiresAt?new Date(e.processingExpiresAt):void 0}:null;return(e==null?void 0:e.partOrders.map(o=>{var x,$,q;return{id:Number((x=o.productWithVariant)==null?void 0:x.id)||0,partOrderId:Number(o==null?void 0:o.id)||0,image:o.productWithVariant.image,name:(()=>{var L,W;const v=((L=o.productWithVariant)==null?void 0:L.name)||"",k=((W=o.productWithVariant)==null?void 0:W.variantName)||"";return!v&&!k?"":!k||v===k?v:v?`${v} (${k})`:k})(),description:"",price:{quantity:o.quantity,amount:(($=o.productWithVariant)==null?void 0:$.price.amount)||0,currency:(q=o.productWithVariant)==null?void 0:q.price.currency},deliveryCategories:"deliveryCategories"in o?o.deliveryCategories:void 0,customerNote:o.customerNote,chargeType:o.chargeType||"ONE_TIME",replacementRequests:"replacementRequests"in o?o.replacementRequests:void 0,allowedReplacementReasons:"allowedReplacementReasons"in o?o.allowedReplacementReasons:void 0,processingInfo:P}}))||[]},[e]);r.useEffect(()=>{e&&(e.status===s.OrderStatus.FullDeliveryFailure||e.status===s.OrderStatus.PartiallyDelivered)&&e.refundedPrice&&e.refundedPrice.amount>0&&_(!0)},[e==null?void 0:e.status]);const w=r.useCallback(async(a,N,P=!1)=>{var o,x;P||m(!0);const{data:h}=await(N?s.fetchAuthorizedOrder(`${a}/${N}`):s.fetchOrder(a));m(!1),h.status!==s.OrderStatus.Completed&&((o=h.charge)==null?void 0:o.status)===s.ChargeStatus.NotPaid&&d(`/charges/${(x=h.charge)==null?void 0:x.id}`,{replace:!0}),p(h)},[d]);r.useLayoutEffect(()=>{if(n&&!l){const a=JSON.parse(localStorage.getItem("orders")||"{}");a[n]&&d(`/orders/${n}/${a[n].fullAccessToken}`)}},[n,l,d]),r.useEffect(()=>{n&&w(n,l,!0);const a=setInterval(()=>{n&&w(n,l,!0)},5e3);return()=>{clearInterval(a)}},[n,l,w]);const z=r.useMemo(()=>!!(e!=null&&e.isApplicableForReplacement&&(e.status===s.OrderStatus.Completed||e.status===s.OrderStatus.PartiallyDelivered||e.status===s.OrderStatus.FullDeliveryFailure)),[e]),b=r.useMemo(()=>{var a;return!!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled&&l&&((e==null?void 0:e.status)===s.OrderStatus.Completed||(e==null?void 0:e.status)===s.OrderStatus.FullDeliveryFailure||(e==null?void 0:e.status)===s.OrderStatus.PartiallyDelivered))},[(R=c==null?void 0:c.info)==null?void 0:R.isVouchesEnabled,l]),H=r.useMemo(()=>{var a;return!!(!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled)&&(e!=null&&e.review)&&"accessToken"in e.review&&!u)},[(M=c==null?void 0:c.info)==null?void 0:M.isVouchesEnabled,e==null?void 0:e.review,u]),J=r.useMemo(()=>{var a;return((a=c==null?void 0:c.info)==null?void 0:a.domain)||window.location.hostname},[(T=c==null?void 0:c.info)==null?void 0:T.domain]);return g?t.jsx("div",{className:i.loaderContainer,children:t.jsx(C.Loader,{})}):(console.log("ORDER PAGE"),console.log(e),t.jsxs("div",{className:i.orderPage,children:[t.jsx("div",{className:i.leftSection,children:t.jsxs("div",{className:i.content,children:[t.jsx(s.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${i.main} ${u?i.mainAntistock:""}`,children:[t.jsx(s.OrderStatusBlock,{className:i.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${i.orderMainData} ${u?i.orderMainDataAntistock:""}`,children:[b&&t.jsx(s.VouchCard,{onAddMessage:()=>y(!0),isVouchLeft:e.isVouchLeft}),t.jsx(s.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(F=e.charge)==null?void 0:F.gateway,email:e.customer?e.customer.email:((E=e.charge)==null?void 0:E.customerForCharge.email)||"",orderId:e.id}),H&&e.review&&t.jsx(s.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(s.TrackPayment,{className:`${i.timelineBlock} ${u?i.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(s.CheckoutFooter,{className:`${i.footer} ${u?i.footerAntistock:""}`})]})]})}),t.jsx("div",{className:i.rightSection,style:u?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:i.content,children:[((I=e==null?void 0:e.charge)==null?void 0:I.name)&&t.jsxs("header",{className:i.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:i.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:i.headerDescription,children:e.charge.description})]}),u?null:t.jsxs(C.Button,{type:"Secondary",onClick:()=>S((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(C.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:i.productList,children:D.map(a=>t.jsx(s.CheckoutProduct,{product:a,isOrder:!0,isApplicableForReplacement:z,orderId:n,accessToken:l,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},a.id))}),u?null:t.jsx(s.CheckoutPrices,{formatter:U,coupon:null,total:((V=e==null?void 0:e.endPrice)==null?void 0:V.amount)||0,discount:0,totalWithDiscount:((B=e==null?void 0:e.endPrice)==null?void 0:B.amount)||0,className:i.prices,isShowSubtotal:!1}),t.jsx(s.CheckoutFooter,{className:i.mobileFooter})]})]})}),(e==null?void 0:e.refundedPrice)&&t.jsx(s.RefundNotificationModal,{isOpen:f,onClose:()=>_(!1),refundedAmount:e.refundedPrice.amount,currency:e.refundedPrice.currency}),b&&t.jsx(s.VouchModal,{isOpen:j,onClose:()=>y(!1),products:D,orderId:n,accessToken:l,shopDomain:J,onSuccess:()=>{y(!1),n&&w(n,l,!0)}})]}))},Se=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:ye},Symbol.toStringTag,{value:"Module"}));exports.Orders=Q;exports.index=Se;
@@ -1,11 +1,11 @@
1
1
  import { jsx as s, Fragment as G, jsxs as m } from "react/jsx-runtime";
2
2
  import r, { useState as Q, useMemo as b } from "react";
3
- import { X as Y, a8 as Z, p as ee, z as te } from "./builder-Ddop-8xf.js";
4
- import { f as se, N as ae, P as oe, O as ne, g as ie, b as ce, c as u, d as re, e as le, h as ue, i as de, j as me, V as he, k as fe, L as pe, T as ge, l as z, m as _e, n as ye, R as Ne, o as ve } from "./charge-DKR9uXCa.js";
5
- import { e as ke, g as Se, I as we } from "./ui-components-C1gbeJtH.js";
6
- import "./builder-components-Co8dAOpQ.js";
3
+ import { X as Y, a8 as Z, p as ee, z as te } from "./builder-B_dkm02v.js";
4
+ import { f as se, N as ae, P as oe, O as ne, g as ie, b as ce, c as u, d as re, e as le, h as ue, i as de, j as me, V as he, k as fe, L as pe, T as ge, l as z, m as _e, n as ye, R as Ne, o as ve } from "./charge-BU-Az7UN.js";
5
+ import { e as ke, g as Se, I as we } from "./ui-components-BHKWyvO1.js";
6
+ import "./builder-components-l43cXoO5.js";
7
7
  import "react-dom";
8
- import "./ticket-B2EMN-4l.js";
8
+ import "./ticket-BMS8VibT.js";
9
9
  const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
10
10
  const [t, c] = r.useState(null), [d, e] = Q(null), [_, p] = r.useState(0), { page: h } = Y(), [g, y] = r.useState(!0);
11
11
  async function O() {
@@ -47,6 +47,16 @@ interface ListOption<T> {
47
47
  addableOptions?: Record<string, any>;
48
48
  modalOptions?: ModalOption<any>[];
49
49
  }
50
+ interface ListInputsOption<T> {
51
+ type: 'listInputs';
52
+ label?: string;
53
+ field: keyof T;
54
+ draggable?: boolean;
55
+ deletable?: boolean;
56
+ editable?: boolean;
57
+ addableOptions?: Record<string, any>;
58
+ modalOptions?: ModalOption<any>[];
59
+ }
50
60
  interface SelectOption<T> {
51
61
  type: 'select';
52
62
  label?: string;
@@ -81,7 +91,7 @@ interface CustomOption<T> {
81
91
  customRef?: MutableRefObject<any>;
82
92
  }>;
83
93
  }
84
- export type ModalOption<T> = ImageOption<T> | TextOption<T> | InputOption<T> | SwitchOption<T> | InputSwitchOption<T> | ListOption<T> | SelectOption<T> | SelectInfiniteListOption<T> | SelectTypeFontOption<T> | CustomOption<T>;
94
+ export type ModalOption<T> = ImageOption<T> | TextOption<T> | InputOption<T> | SwitchOption<T> | InputSwitchOption<T> | ListOption<T> | ListInputsOption<T> | SelectOption<T> | SelectInfiniteListOption<T> | SelectTypeFontOption<T> | CustomOption<T>;
85
95
  interface Props<T extends ItemBase> {
86
96
  activeItem: T;
87
97
  setActiveItem: (value: T | null) => void;