fansunited-management-components 1.59.0-RC3 → 1.59.0-RC4
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/index.es.js +1 -1
- package/index.umd.js +1 -1
- package/package.json +1 -1
package/index.es.js
CHANGED
|
@@ -36297,7 +36297,7 @@ const Ny = Ge(/* @__PURE__ */ s.jsx("path", {
|
|
|
36297
36297
|
country: "Country",
|
|
36298
36298
|
phoneCountryCode: "Phone country code",
|
|
36299
36299
|
phoneNumber: "Phone number"
|
|
36300
|
-
}, an = ({ title: ie }) => /* @__PURE__ */ s.jsx(we, { title: ie, sx: { maxWidth: 300 }, children: /* @__PURE__ */ s.jsx(cn, { color: "primary" }) }), Tt = () => e
|
|
36300
|
+
}, an = ({ title: ie }) => /* @__PURE__ */ s.jsx(we, { title: ie, sx: { maxWidth: 300 }, children: /* @__PURE__ */ s.jsx(cn, { color: "primary" }) }), Tt = () => e === "either-or" ? /* @__PURE__ */ s.jsx(s.Fragment, {}) : /* @__PURE__ */ s.jsxs(re, { mb: 1.5, children: [
|
|
36301
36301
|
/* @__PURE__ */ s.jsxs(je, { sx: { mb: 1.5 }, children: [
|
|
36302
36302
|
/* @__PURE__ */ s.jsx($e, { color: "primary", children: r.layoutTemplate }),
|
|
36303
36303
|
/* @__PURE__ */ s.jsxs(at, { value: O, size: "md", name: "layout_template", onChange: he, children: [
|
package/index.umd.js
CHANGED
|
@@ -2496,7 +2496,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2496
2496
|
data-additional-cta-url="${k}"`:"",pr=f&&W?`
|
|
2497
2497
|
data-additional-cta-target="${W}"`:"",gr=`<div
|
|
2498
2498
|
data-component="fu-widget"${ge}${xe}${kn}${Ei}${dn}${Mr}${$o}${Fo}${Ne}${ke}${Ye}${Oe}${Pe}${St}${It}${Mt}${_t}${Nt}${hr}${Lr}${ki}${pr}
|
|
2499
|
-
></div>`,Wt={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},en=({title:ie})=>s.jsx(h.Tooltip,{title:ie,sx:{maxWidth:300},children:s.jsx(Jt,{color:"primary"})}),bt=()=>e
|
|
2499
|
+
></div>`,Wt={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},en=({title:ie})=>s.jsx(h.Tooltip,{title:ie,sx:{maxWidth:300},children:s.jsx(Jt,{color:"primary"})}),bt=()=>e==="either-or"?s.jsx(s.Fragment,{}):s.jsxs(h.Box,{mb:1.5,children:[s.jsxs(h.FormControl,{sx:{mb:1.5},children:[s.jsx(h.FormLabel,{color:"primary",children:r.layoutTemplate}),s.jsxs(h.Select,{value:L,size:"md",name:"layout_template",onChange:fe,children:[s.jsx(h.Option,{value:"STANDARD",children:"Standard"}),s.jsx(h.Option,{value:"SPLIT",children:"Split"}),s.jsx(h.Option,{value:"OVERLAY",children:"Overlay"})]}),s.jsx(h.FormHelperText,{children:r.layoutTemplateDescription})]}),s.jsxs(h.FormControl,{sx:{mb:1.5},children:[s.jsx(h.FormLabel,{color:"primary",children:r.imagePosition}),s.jsxs(h.Select,{value:G,size:"md",name:"image_position",disabled:L!=="STANDARD",onChange:(ie,Ae)=>oe(Ae),children:[s.jsx(h.Option,{value:"left",children:"Left"}),s.jsx(h.Option,{value:"right",children:"Right"})]}),s.jsx(h.FormHelperText,{children:r.imagePositionDescription})]})]}),P=()=>e==="classic-quiz"||e==="personality-quiz"?s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:ce,label:r.showAnswerExplanations,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{se(ie)}}),s.jsx(h.Tooltip,{title:r.showAnswerExplanationsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}):e==="match-quiz"||e==="event-game"?s.jsxs(s.Fragment,{children:[s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:Z,label:r.showPredictionDetails||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{te(ie)}}),s.jsx(h.Tooltip,{title:r.showPredictionDetailsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:ne,label:r.showCountdown||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{de(ie)}}),s.jsx(h.Tooltip,{title:r.showCountdownTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:st,label:r.showPoints||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{Je(ie)}}),s.jsx(h.Tooltip,{title:r.showPointsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),e==="match-quiz"&&s.jsxs(h.Box,{display:"flex",alignItems:"center",mb:1.5,children:[s.jsx(pn,{defaultValue:ve,label:r.showTeamLabels||"",labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{Fe(ie)}}),s.jsx(h.Tooltip,{title:r.showTeamLabelsTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]})]}):s.jsx(s.Fragment,{}),z=()=>e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Box,{display:"flex",mb:1.5,alignItems:"center",children:[s.jsx(pn,{defaultValue:a,label:r.configureLeads,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="LEAD",onChange:ie=>{ie===!1&&(N([]),j("before")),l(ie)}}),n!=="LEAD"&&s.jsx(h.Tooltip,{title:r.configureLeadsDisabledMessage,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),q=()=>!a||e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Or,{label:"",values:T,allValues:Object.keys(Wt),valuesMap:Wt,onChange:ie=>N(ie)}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.FormLabel,{color:"primary",children:r.leadPosition}),s.jsxs(h.Select,{value:H,size:"md",name:"lead_position",onChange:(ie,Ae)=>j(Ae==="before"?"before":"after"),children:[s.jsx(h.Option,{value:"before",children:"Before"}),s.jsx(h.Option,{value:"after",children:"After"})]})]}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.Checkbox,{label:r.syncWithProfile,checked:vt,onChange:ie=>he(ie.target.checked)}),s.jsx(h.FormHelperText,{children:r.syncWithProfileDescription})]})]}),ee=()=>e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Box,{display:"flex",mb:1.5,alignItems:"center",children:[s.jsx(pn,{defaultValue:c,label:r.configureSignIn,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="REGISTERED",onChange:ie=>{ie===!1&&(g(""),m("")),u(ie)}}),n!=="REGISTERED"&&s.jsx(h.Tooltip,{title:r.configureSignInDisabledMessage,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),ae=()=>!c||e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Ot,{label:r.signInLabel,placeholder:"",defaultValue:"",value:p,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.signInLabelInfoMessage}),onChange:ie=>g(ie.target.value)}),s.jsx(Ot,{label:r.authenticationHandler,placeholder:"",defaultValue:v,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.authenticationHandlerInfoMessage}),onChange:ie=>m(ie.target.value)}),s.jsx(Ot,{label:r.signInUrl,placeholder:"",defaultValue:b,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.signInUrlInfoMessage}),onChange:ie=>C(ie.target.value)}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.FormLabel,{color:"primary",children:r.signInTarget}),s.jsxs(h.Select,Q(B({action:i,value:w,size:"md",name:"signin_cta_target",onChange:(ie,Ae)=>x(Ae),sx:{flex:1}},w&&{endDecorator:s.jsx(h.IconButton,{variant:"plain",color:"neutral",onMouseDown:ie=>{ie.stopPropagation()},onClick:()=>{var ie;x(null),(ie=i.current)==null||ie.focusVisible()},sx:{width:"18px",height:"18px"},children:s.jsx(As,{})}),indicator:null}),{children:[s.jsx(h.Option,{value:"_blank",children:"Opens URL in a new tab"}),s.jsx(h.Option,{value:"_self",children:"Opens URL in the same tab"})]}))]})]}),ue=()=>e==="event-game"?s.jsx(s.Fragment,{}):s.jsx(pn,{sx:{label:{mb:1.5}},defaultValue:$,label:r.addCampaignInfo,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{ie===!1&&(Y(""),D("")),M(ie)}}),Ce=()=>!$||e==="event-game"?s.jsx(s.Fragment,{}):s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Ot,{label:r.id,placeholder:"",defaultValue:V,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.campaignIdInfoMessage}),onChange:ie=>Y(ie.target.value)}),s.jsx(Ot,{label:r.name,placeholder:"",defaultValue:X,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.campaignNameInfoMessage}),onChange:ie=>D(ie.target.value)})]}),fe=(ie,Ae)=>{U(Ae),oe(Ae!=="STANDARD"?null:"left")},Se=()=>s.jsxs(h.Box,{display:"flex",mb:1.5,alignItems:"center",children:[s.jsx(pn,{defaultValue:f,label:r.configureAdditionalCta,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:ie=>{ie===!1&&(S(""),E("")),d(ie)}}),s.jsx(h.Tooltip,{title:r.configureAdditionalCtaTooltip,sx:{ml:1,maxWidth:300},children:s.jsx(Jt,{color:"primary",fontSize:"small"})})]}),pe=()=>f?s.jsxs(h.Card,{sx:{mb:1.5},children:[s.jsx(Ot,{label:r.additionalCtaLabel,placeholder:"",defaultValue:"",value:I,required:!1,size:"md",endDecorator:s.jsx(en,{title:r.additionalCtaLabelInfoMessage}),onChange:ie=>S(ie.target.value)}),s.jsx(Ot,{label:r.additionalCtaHandler,placeholder:"",defaultValue:A,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.additionalCtaHandlerInfoMessage}),onChange:ie=>E(ie.target.value)}),s.jsx(Ot,{label:r.additionalCtaUrl,placeholder:"",defaultValue:k,value:"",required:!1,size:"md",endDecorator:s.jsx(en,{title:r.additionalCtaUrlInfoMessage}),onChange:ie=>F(ie.target.value)}),s.jsxs(h.FormControl,{sx:{mb:2},children:[s.jsx(h.FormLabel,{color:"primary",children:r.additionalCtaTarget}),s.jsxs(h.Select,Q(B({action:o,value:W,size:"md",name:"additional_cta_target",onChange:(ie,Ae)=>O(Ae),sx:{flex:1}},W&&{endDecorator:s.jsx(h.IconButton,{variant:"plain",color:"neutral",onMouseDown:ie=>{ie.stopPropagation()},onClick:()=>{var ie;O(null),(ie=o.current)==null||ie.focusVisible()},sx:{width:"18px",height:"18px"},children:s.jsx(As,{})}),indicator:null}),{children:[s.jsx(h.Option,{value:"_blank",children:"Opens the provided URL in a new tab"}),s.jsx(h.Option,{value:"_self",children:"Opens the provided URL in the same tab"})]}))]})]}):s.jsx(s.Fragment,{});return s.jsxs(h.Box,{mt:1,children:[bt(),P(),z(),q(),ee(),ae(),ue(),Ce(),Se(),pe(),s.jsxs(h.Box,{position:"relative",mb:1.5,children:[s.jsx(h.Textarea,{value:gr,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:ie=>ie.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),s.jsx(h.Tooltip,{title:r.copyToClipboard,children:s.jsx(h.Button,{onClick:()=>{navigator.clipboard.writeText(gr)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:s.jsx(_e.ContentCopy,{})})})]}),s.jsx(h.Alert,{variant:"outlined",color:"primary",startDecorator:s.jsx(Jt,{}),sx:{mb:1.5,width:"fit-content"},children:s.jsxs(h.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[r.divElementTextInfo,s.jsx(h.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},BN=["load-more","limited"],$N={"load-more":"Load more",limited:"Limited"},FN=({entityId:e,labels:t})=>{const[n,r]=y.useState(!1),[i,o]=y.useState(""),[a,l]=y.useState(""),[c,u]=y.useState(""),[f,d]=y.useState(10),[p,g]=y.useState(2),[v,m]=y.useState("load-more"),b=`
|
|
2500
2500
|
data-content-id="${e}"`,C=i?`
|
|
2501
2501
|
data-classic-quiz-url="${i}"`:"",w=a?`
|
|
2502
2502
|
data-either-or-url="${a}"`:"",x=c?`
|