PageSourceSearch

https://www.squaresigns.com/scripts/components-profile-my-designs.711685d.js

js squaresigns.com collected 2026-10-02 08:00:39 UTC 11,406 bytes, 130 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="1effbfc6-a04a-5c8f-ab1a-405626ea04fa")}catch(e){}}();"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3808],{42765:((se,Q,t)=>{t.r(Q),t.d(Q,{default:()=>te});var e=t(74848),v=t(96540),r=t(61225),l=t(44491),_=t(9474),G=t(20913),F=t(59905),z=t(85516),tt=t(57879),X=t(70229),S=t(27243),et=t(14492),W=t(79264),Z=t(65979),nt=t(8566),st=t(9535),at=t(72513),ot=t(28866),A=t(43373),c=t(54167);const it=c.I4.div`
2  position: relative;
3  display: flex;
4  align-items: center;
5  gap: 16px;
6  margin-bottom: 16px;
7  border: 1px solid var(--border-secondary-main-500);
8  border-radius: 10px;
9  padding: 16px 20px 16px;
10  font-size: clamp(12px, 2vw, 14px);
11  line-height: clamp(14px, 2vw, 16px);
12  font-weight: 300;
13  color: #707070;
14
15  i {
16    height: 30px;
17    color: var(--text-secondary-main-500);
18  }
19  .info {
20    color: #262626;
21  }
22
23  @media (max-width: 768px) {
24    padding: 10px;
25
26    i {
27      display: none;
28    }
29  }
30`;function dt({noteKey:n}){return(0,e.jsxs)(it,{children:[(0,e.jsx)(F.A,{size:z.g.Medium,name:"folder-history"}),(0,e.jsx)("p",{className:"info",children:(0,e.jsx)(Z.A,{translationKey:n})})]})}const rt=dt;var lt=t(18477),ct=t(88138),mt=t(64109),B=t(96348),$=t(22325);const gt="userDesigns",P=n=>n[gt],ht=(0,$.Mz)(P,n=>n.get("userDesignsList")),ae=(0,$.Mz)(P,n=>n.get("userDesignsCount")),pt=(0,$.Mz)(P,n=>n.get("userDesignsListLoading")),vt=(0,$.Mz)(P,n=>n.get("userDesignDeleteLoading"));var ut=t(78511),J=t(87621),xt=t(98775),E=t(3113),o=t(71160),O=t(67622),ft=t(79412),Dt=t(93329),yt=t(97561),At=t(23183),jt=t(92701),St=t(44829),Ct=t(34454),It=t(2634),Tt=t(84324),Lt=t(36107),I=t(73087),Mt=t(65567);const Nt=c.I4.section`
31  margin-top: ${I.B.s_24};
32  border-radius: ${Lt.F.r_8};
33  overflow: hidden;
34  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1607843137);
35`,zt=c.I4.div`
36  width: 100%;
37  display: flex;
38  justify-content: start;
39  align-items: center;
40  padding: ${I.B.s_24};
41  flex-wrap: wrap;
42  & > div {
43    & > div:nth-child(2) {
44      width: 324px;
45    }
46  }
47`,Bt=c.I4.div`
48  display: flex;
49  justify-content: flex-end;
50  width: 100%;
51  margin-top: auto;
52
53  @media screen and (max-width: ${Mt.r.MD}) {
54    margin-top: ${I.B.s_16};
55    > span > button {
56      width: 100%;
57    }
58  }
59`,$t="tw:text-black tw:font-bold tw:hover:button-primary-main-500 tw:pt-0 tw:h-[32px]";function Pt({design:n,editDesign:i,removeDesign:u,setSelectedDesign:y,handleSuccess:d,handleFail:x,index:p,loading:s}){const m=(0,r.d4)(B.V),g=n.updatedDate!==n.createdDate,f=(0,r.d4)(It.R),D=(0,G.useNavigate)(),h=(0,r.d4)(Tt.uq),[H,T]=(0,v.useState)(""),[L,M]=(0,v.useState)(!1),{convertUTCToLocalTimeZone:K}=(0,ft.A)(),Y=K(g?n.updatedDate:n.createdDate).format("YYYY-MM-DD HH:mm"),V=(0,l.A)(m,g?"designUpdatedDate":"designCreatedDate"),N=(0,r.wA)(),C=()=>{T(""),M(!1),x(n.id)},a=()=>{T(n.id),M(!0),N((0,A._m)({designId:n.id,onSuccess:()=>{d(n.id),M(!1)},onFail:C}))},j=q=>{N((0,J.Is)(q)),q||T("")},ee=()=>{j(!1),f[W.Q.shoppingCart]&&D(`${f[W.Q.shoppingCart]}`)},ne=()=>{j(!1)};return(0,e.jsxs)(Nt,{"data-testid":`my-designs-item-${p}`,children:[(0,e.jsx)(jt.A,{date:`${V}: ${Y}`,onEdit:i,onRemove:u,loading:s}),(0,e.jsxs)(zt,{children:[(0,e.jsx)(Dt.A,{designImage:{designId:n.imageId,backSideDesignId:n.backSideImageId||void 0,width:n.width,height:n.height,shapeType:n.shapeType,shapeImagePath:n.shapeImagePath,backgroundImagePath:n.backgroundImagePath,isAccessory:n.product.productId===Number(At.N.ACCESSORY_ID),isReversSide:(0,St.u)(n.accessories)},optionsList:[{title:"Product",description:n.product.name},{title:"Size",description:`${(0,O.lp)(n.measurementUnit===E.g.inch?n.width:(0,O.Wg)(n.width))} x ${(0,O.lp)(n.measurementUnit===E.g.inch?n.height:(0,O.Wg)(n.height))} ${(0,l.A)(m,`${E.g[n.measurementUnit]}`)}`},{title:"Quantity",description:`${n.quantity}`},...(0,yt.P)(n?.accessories)],orderInfo:[{title:"File name",descriptionComponent:(0,e.jsxs)(o.$n,{disabled:s,variant:o.hd.ghost,onClick:y,"data-testid":"button-edit-design",size:o.Mp.default,skin:o.a2.primary,className:$t,children:[(0,e.jsx)("span",{className:"tw:truncate tw:inline-block tw:w-full tw:max-w-[150px]",children:n.name}),(0,e.jsx)(F.A,{name:"edit",color:"var(--button-tertiary-main-500)",size:z.g.Small})]})}]}),(0,e.jsx)(Bt,{children:(0,e.jsx)(Ct.A,{open:h&&H===n.id&&!s&&!L,onOpenChange:j,handleRightButtonClicked:ne,handleLeftButtonClicked:ee,children:(0,e.jsx)(o.$n,{"data-testid":"button-add-to-cart",type:"button",disabled:s,variant:o.hd.filled,onClick:a,size:o.Mp.lg,skin:o.a2.primary,children:(0,l.A)(m,"shoppingCartAddToCart")})})})]})]})}const Ot=Pt;
59var Ft=t(99645),Wt=t(5983),b=t(96435),R=t(49785),Et=t(37086),Rt=t(4548),Ut=t(71741),U=t(12664);const Ht=U.Ik().shape({name:U.Yj().required(Ut.A.required).max(450,"saveDesignNameValidation"),description:U.Yj().max(450,"saveDesignDescriptionValidation")});var w=t(28857),Kt=t(97116),Yt=t(77242),k=t(26047);const Vt=c.I4.form`
60  display: flex;
61  flex-direction: column;
62`,Qt=c.I4.div`
63  display: flex;
64  align-items: center;
65  justify-content: space-between;
66  gap: ${I.B.s_8};
67  width: 100%;
68`,oe=(0,c.I4)(k.A)`
69  width: 100%;
70`,ie=(0,c.I4)(k.A)`
71  border: 1px solid ${w.T.blue_2};
72  color: ${w.T.blue_2};
73  width: 100%;
74`,Gt=(0,c.I4)(Kt.A)`
75  width: 100%;
76`,Xt=(0,c.I4)(Yt.A)`
77  overflow: hidden;
78  line-height: inherit;
79  &:focus {
80    overflow: visible;
81    line-height: normal;
82  }
83  &::-webkit-input-placeholder {
84    opacity: 1;
85    line-height: 30px;
86    font-size: 14px;
87  }
88  &::-moz-placeholder {
89    opacity: 1;
90    line-height: 30px;
91    font-size: 14px;
92  }
93  &:-ms-input-placeholder {
94    opacity: 1;
95    line-height: 30px;
96    font-size: 14px;
97  }
98  &::-ms-input-placeholder {
99    opacity: 1;
100    line-height: 30px;
101    font-size: 14px;
102  }
103  &::placeholder {
104    opacity: 1;
105    line-height: 30px;
106    font-size: 14px;
107  }
108  &:focus::-webkit-input-placeholder {
109    opacity: 0;
110  }
111  &:focus::-moz-placeholder {
112    opacity: 0;
113  }
114  &:focus:-ms-input-placeholder {
115    opacity: 0;
116  }
117  &:focus::-ms-input-placeholder {
118    opacity: 0;
119  }
120  &:focus::placeholder {
121    opacity: 0;
122  }
123`;function Zt({onSave:n,selectedName:i,selectedDescription:u,onCancel:y}){const d=(0,r.d4)(B.V),x=(0,R.mN)({defaultValues:{name:"",description:""},mode:"onBlur",resolver:(0,Et.t)(Ht)}),{reset:p,handleSubmit:s,formState:{errors:m}}=x;(0,v.useEffect)(()=>{p({...i&&{name:i},...u&&{description:u}})},[i,u]);const g=({name:f,description:D})=>{n({name:f,description:D||""})};return(0,e.jsx)(R.Op,{...x,children:(0,e.jsxs)(Vt,{onSubmit:s(g),"data-testid":"renameMyDesign",id:"save-design-form",children:[(0,e.jsx)(Rt.A,{name:"name",testId:"input-name",formFieldProps:{label:(0,l.A)(d,"designName"),variant:b.c.primary,htmlFor:"name",translations:d},id:"name",placeholder:(0,l.A)(d,"designNamePlaceHolder")}),(0,e.jsx)(R.xI,{render:({field:f,fieldState:D})=>{var h;return(0,e.jsx)(Gt,{label:(0,l.A)(d,"designDescription"),errorMessage:(h=D.error)===null||h===void 0?void 0:h.message,variant:b.c.primary,translations:d,children:(0,e.jsx)(Xt,{placeholder:(0,l.A)(d,"designDescriptionPlaceHolder"),...f})})},name:"description"}),(0,e.jsxs)(Qt,{"data-test-id":"save-design-name-edit-actions",children:[(0,e.jsx)(o.$n,{onClick:y,variant:o.hd.outline,"data-testid":"cancel-save-design-name",size:o.Mp.full,skin:o.a2.primary,children:(0,l.A)(d,"cancel")}),(0,e.jsx)(o.$n,{type:"submit",disabled:!!(m.description||m.name),variant:o.hd.filled,"data-testid":"edit-save-design-name",size:o.Mp.full,skin:o.a2.primary,children:(0,l.A)(d,"save")})]})]})})}const Jt=Zt,bt=c.I4.div`
124  width: 400px;
125  max-width: 100%;
126`,wt=(0,c.I4)(X.A)`
127  margin-bottom: ${I.B.s_16};
128`;function kt({isOpen:n,onCloseModal:i,name:u,description:y,id:d}){const x=(0,r.wA)(),p=(0,r.d4)(B.V),s=({name:m,description:g})=>{d&&(x((0,A.QQ)({name:m,description:g,id:d})),i())};return(0,v.useEffect)(()=>()=>{x((0,A.MG)())},[]),(0,e.jsx)(Ft.A,{onClose:i,open:n,componentName:"edit My design",dataTestIdModal:"editMyDesignModal",dataTestIdCloseButton:"closeEditMyDesignModal",className:Wt.T,children:(0,e.jsxs)(bt,{children:[(0,e.jsx)(wt,{text:(0,l.A)(p,"renameDesign"),tag:S.YD.h2,fontWeight:S.BO.Bold,fontSize:S.s.Large}),(0,e.jsx)(Jt,{onSave:s,onCancel:i,selectedName:u,selectedDescription:y})]})})}const qt=kt;function _t(){const[n]=(0,v.useState)({member:"updatedDate",direction:1}),[i,u]=(0,v.useState)(null),[y,d]=(0,v.useState)(""),x=(0,G.useNavigate)(),p=(0,r.wA)(),s=(0,r.d4)(ht),m=(0,r.d4)(pt),g=(0,r.d4)(mt.vX),[f,D]=(0,v.useState)(""),h=(0,r.d4)(B.V),H=(0,r.d4)(vt),[T,L]=(0,v.useState)(!1),M=(a,j)=>{p((0,A.hN)({sort:n,page:{number:a-1,size:j},navigate:x})),window.scrollTo({top:0,left:0})},K=a=>{p((0,A.pb)(a)),D("")},Y=a=>{window.location.href=`${W.hU}?dId=${a.id}`},V=()=>{C(""),L(!1),p((0,J.Is)(!0))},N=a=>{L(!0),p((0,A.xX)({designId:a,onSuccess:V,onFail:()=>{C(""),L(!1)}}))},C=a=>{d(a)};return(0,v.useEffect)(()=>{g&&g.auth!==void 0&&p((0,A.kx)())},[g]),(0,e.jsxs)(e.Fragment,{children:[i&&(0,e.jsx)(qt,{description:i.description,id:i.id,isOpen:!!i,name:i.name,onCloseModal:()=>u(null)}),(0,e.jsxs)("div",{className:(0,_.A)("account-content account-design",s&&s.count===0?"text-center":"mt-3 mt-lg-5"),children:[!m&&s&&s.count>0&&(0,e.jsxs)("div",{className:"alertWrapper",children:[!g.auth&&(0,e.jsx)(rt,{noteKey:"myDesignsTemporary"}),(0,e.jsx)(ct.A,{testId:"my-design-free-shipping",backgroundProps:{borderRadius:"Small",border:1,borderType:lt.x.Solid,borderColor:"var(--accent-secondary-main-500)"},titleProps:{text:(0,l.A)(h,"freeShippingTitle"),fontWeight:S.BO.Bold,fontSize:S.s.ExtraLarge,color:"var(--accent-secondary-main-500)"},iconProps:{name:"truck",color:"var(--accent-secondary-main-500)",size:z.g.Medium},text:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(tt.A,{value:h?.freeShipping||""}),(0,e.jsx)(X.A,{text:(0,l.A)(h,"freeShippingLimits"),fontSize:S.s.Small})]}),gap:20})]}),!m&&s&&s.count===0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ot.A,{icon:(0,e.jsx)(F.A,{size:z.g.Medium,name:"design-empty",color:"var(--text-primary-main-200)",customSize:110}),translationKey:"youHaveNotSavedDesignYet"}),(0,e.jsx)("p",{className:"gotToDesignToolPara mt-2 mb-3",children:(0,e.jsx)(Z.A,{translationKey:g.auth?"goToDesignerToolToCreateANewDesign":"goToDesignerToolToCreateANewDesignOrSignIn"})}),(0,e.jsx)(st.A,{translationKey:"startDesigningNow"})]}
128),m?(0,e.jsx)("div",{className:ut.A.userDesignListLoading,children:(0,e.jsx)(xt.A,{className:"static"})}):(0,e.jsx)("div",{className:"design-blocks-wrap",children:s&&s.data.map((a,j)=>(0,e.jsx)(Ot,{index:j,design:a,editDesign:()=>Y(a),removeDesign:()=>D(a.id),setSelectedDesign:()=>u(a),handleSuccess:N,handleFail:C,loading:H||T},a.id))})]}),(0,e.jsx)("div",{className:"myDesignPagination",children:(0,e.jsx)(at.A,{count:s?.count||0,dispatchCallBack:M,offset:3})}),(0,e.jsx)(nt.A,{deleteAction:()=>K(f),headerKey:"myDesignRemovalWarning",isOpen:!!f,subHeaderKey:"deletedDesignMsg",onClose:()=>D("")}),(0,e.jsx)(et.A,{isOpen:!!y,closeAction:()=>C(""),confirmAction:()=>N(y),closeText:"cancel",confirmText:"shoppingCartAddToCart",warningText:"addChangedOptionsToCart",translations:h})]})}const te=_t})}]);
129
130//# chunkId=1effbfc6-a04a-5c8f-ab1a-405626ea04fa

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.