fansunited-management-components 1.55.0-RC5 → 1.55.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/index.es.js CHANGED
@@ -36020,9 +36020,9 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
36020
36020
  }
36021
36021
  }
36022
36022
  ),
36023
- /* @__PURE__ */ c.jsx(_e, { title: r.showAnswerExplanationsTooltip, sx: { ml: 2, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(cr, { color: "primary" }) })
36023
+ /* @__PURE__ */ c.jsx(_e, { title: r.showAnswerExplanationsTooltip, sx: { ml: 1, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(cr, { color: "primary", fontSize: "small" }) })
36024
36024
  ] }) : /* @__PURE__ */ c.jsx(c.Fragment, {}),
36025
- /* @__PURE__ */ c.jsxs(ie, { display: "flex", mb: 1.5, children: [
36025
+ /* @__PURE__ */ c.jsxs(ie, { display: "flex", mb: 1.5, alignItems: "center", children: [
36026
36026
  /* @__PURE__ */ c.jsx(
36027
36027
  ci,
36028
36028
  {
@@ -36037,10 +36037,10 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
36037
36037
  }
36038
36038
  }
36039
36039
  ),
36040
- n !== "LEAD" && /* @__PURE__ */ c.jsx(_e, { title: r.configureLeadsDisabledMessage, sx: { ml: 2, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(cr, { color: "primary", fontSize: "small" }) })
36040
+ n !== "LEAD" && /* @__PURE__ */ c.jsx(_e, { title: r.configureLeadsDisabledMessage, sx: { ml: 1, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(cr, { color: "primary", fontSize: "small" }) })
36041
36041
  ] }),
36042
36042
  i && se(),
36043
- /* @__PURE__ */ c.jsxs(ie, { display: "flex", mb: 1.5, children: [
36043
+ /* @__PURE__ */ c.jsxs(ie, { display: "flex", mb: 1.5, alignItems: "center", children: [
36044
36044
  /* @__PURE__ */ c.jsx(
36045
36045
  ci,
36046
36046
  {
@@ -36055,7 +36055,7 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
36055
36055
  }
36056
36056
  }
36057
36057
  ),
36058
- n !== "REGISTERED" && /* @__PURE__ */ c.jsx(_e, { title: r.configureSignInDisabledMessage, sx: { ml: 2, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(cr, { color: "primary", fontSize: "small" }) })
36058
+ n !== "REGISTERED" && /* @__PURE__ */ c.jsx(_e, { title: r.configureSignInDisabledMessage, sx: { ml: 1, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(cr, { color: "primary", fontSize: "small" }) })
36059
36059
  ] }),
36060
36060
  a && oe(),
36061
36061
  /* @__PURE__ */ c.jsx(
package/index.umd.js CHANGED
@@ -2485,7 +2485,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2485
2485
  data-image-position="${k}"`:"",L=`
2486
2486
  data-show-answer-explanations="${Y}"`,U=`<div
2487
2487
  data-component="fu-widget"${T}${N}${te}${R}${L}${V}${j}${$}${M}${H}${Q}
2488
- ></div>`,W={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},re=({title:Z})=>c.jsx(v.Tooltip,{title:Z,sx:{maxWidth:300},children:c.jsx(ir,{color:"primary"})}),se=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(Ar,{label:"",values:h,allValues:Object.keys(W),valuesMap:W,onChange:Z=>p(Z)}),c.jsxs(v.FormControl,{sx:{mb:2},children:[c.jsx(v.FormLabel,{color:"primary",children:r.leadPosition}),c.jsxs(v.Select,{value:m,size:"md",name:"lead_position",onChange:(Z,he)=>g(he==="before"?"before":"after"),children:[c.jsx(v.Option,{value:"before",children:"Before"}),c.jsx(v.Option,{value:"after",children:"After"})]})]})]}),ae=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(rn,{label:r.signInLabel,placeholder:"",defaultValue:"",value:l,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.signInLabelInfoMessage}),onChange:Z=>u(Z.target.value)}),c.jsx(rn,{label:r.authenticationHandler,placeholder:"",defaultValue:d,value:"",required:!1,size:"md",endDecorator:c.jsx(re,{title:r.authenticationHandlerInfoMessage}),onChange:Z=>f(Z.target.value)})]}),X=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(rn,{label:r.id,placeholder:"",defaultValue:S,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.campaignIdInfoMessage}),onChange:Z=>C(Z.target.value)}),c.jsx(rn,{label:r.name,placeholder:"",defaultValue:I,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.campaignNameInfoMessage}),onChange:Z=>y(Z.target.value)})]}),le=(Z,he)=>{E(he),F(he!=="STANDARD"?null:"left")};return c.jsxs(v.Box,{mt:1,children:[e==="classic-quiz"||e==="poll"?c.jsxs(v.Box,{mb:1.5,children:[c.jsxs(v.FormControl,{sx:{mb:1.5},children:[c.jsx(v.FormLabel,{color:"primary",children:r.layoutTemplate}),c.jsxs(v.Select,{value:A,size:"md",name:"layout_template",onChange:le,children:[c.jsx(v.Option,{value:"STANDARD",children:"Standard"}),c.jsx(v.Option,{value:"SPLIT",children:"Split"}),c.jsx(v.Option,{value:"OVERLAY",children:"Overlay"})]}),c.jsx(v.FormHelperText,{children:r.layoutTemplateDescription})]}),c.jsxs(v.FormControl,{sx:{mb:1.5},children:[c.jsx(v.FormLabel,{color:"primary",children:r.imagePosition}),c.jsxs(v.Select,{value:k,size:"md",name:"image_position",disabled:A!=="STANDARD",onChange:(Z,he)=>F(he),children:[c.jsx(v.Option,{value:"left",children:"Left"}),c.jsx(v.Option,{value:"right",children:"Right"})]}),c.jsx(v.FormHelperText,{children:r.imagePositionDescription})]})]}):c.jsx(c.Fragment,{}),e==="classic-quiz"?c.jsxs(v.Box,{display:"flex",alignItems:"center",mb:1.5,children:[c.jsx(ui,{defaultValue:Y,label:r.showAnswerExplanations,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:Z=>{O(Z)}}),c.jsx(v.Tooltip,{title:r.showAnswerExplanationsTooltip,sx:{ml:2,maxWidth:300},children:c.jsx(ir,{color:"primary"})})]}):c.jsx(c.Fragment,{}),c.jsxs(v.Box,{display:"flex",mb:1.5,children:[c.jsx(ui,{defaultValue:i,label:r.configureLeads,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="LEAD",onChange:Z=>{Z===!1&&(p([]),g("before")),o(Z)}}),n!=="LEAD"&&c.jsx(v.Tooltip,{title:r.configureLeadsDisabledMessage,sx:{ml:2,maxWidth:300},children:c.jsx(ir,{color:"primary",fontSize:"small"})})]}),i&&se(),c.jsxs(v.Box,{display:"flex",mb:1.5,children:[c.jsx(ui,{defaultValue:a,label:r.configureSignIn,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="REGISTERED",onChange:Z=>{Z===!1&&(u(""),f("")),s(Z)}}),n!=="REGISTERED"&&c.jsx(v.Tooltip,{title:r.configureSignInDisabledMessage,sx:{ml:2,maxWidth:300},children:c.jsx(ir,{color:"primary",fontSize:"small"})})]}),a&&ae(),c.jsx(ui,{sx:{label:{mb:1.5}},defaultValue:b,label:r.addCampaignInfo,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:Z=>{Z===!1&&(C(""),y("")),w(Z)}}),b&&X(),c.jsxs(v.Box,{position:"relative",mb:1.5,children:[c.jsx(v.Textarea,{value:U,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:Z=>Z.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),c.jsx(v.Tooltip,{title:r.copyToClipboard,children:c.jsx(v.Button,{onClick:()=>{navigator.clipboard.writeText(U)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})})]}),c.jsx(v.Alert,{variant:"outlined",color:"primary",startDecorator:c.jsx(ir,{}),sx:{mb:1.5,width:"fit-content"},children:c.jsxs(v.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[r.divElementTextInfo,c.jsx(v.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},pF=["load-more","limited"],gF={"load-more":"Load more",limited:"Limited"},mF=({entityId:e,labels:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(""),[a,s]=x.useState(""),[l,u]=x.useState(""),[d,f]=x.useState(10),[h,p]=x.useState(2),[m,g]=x.useState("load-more"),b=`
2488
+ ></div>`,W={fullName:"Full name",firstName:"First name",lastName:"Last name",email:"Email",gender:"Gender",country:"Country",phoneCountryCode:"Phone country code",phoneNumber:"Phone number"},re=({title:Z})=>c.jsx(v.Tooltip,{title:Z,sx:{maxWidth:300},children:c.jsx(ir,{color:"primary"})}),se=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(Ar,{label:"",values:h,allValues:Object.keys(W),valuesMap:W,onChange:Z=>p(Z)}),c.jsxs(v.FormControl,{sx:{mb:2},children:[c.jsx(v.FormLabel,{color:"primary",children:r.leadPosition}),c.jsxs(v.Select,{value:m,size:"md",name:"lead_position",onChange:(Z,he)=>g(he==="before"?"before":"after"),children:[c.jsx(v.Option,{value:"before",children:"Before"}),c.jsx(v.Option,{value:"after",children:"After"})]})]})]}),ae=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(rn,{label:r.signInLabel,placeholder:"",defaultValue:"",value:l,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.signInLabelInfoMessage}),onChange:Z=>u(Z.target.value)}),c.jsx(rn,{label:r.authenticationHandler,placeholder:"",defaultValue:d,value:"",required:!1,size:"md",endDecorator:c.jsx(re,{title:r.authenticationHandlerInfoMessage}),onChange:Z=>f(Z.target.value)})]}),X=()=>c.jsxs(v.Card,{sx:{mb:1.5},children:[c.jsx(rn,{label:r.id,placeholder:"",defaultValue:S,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.campaignIdInfoMessage}),onChange:Z=>C(Z.target.value)}),c.jsx(rn,{label:r.name,placeholder:"",defaultValue:I,required:!1,size:"md",endDecorator:c.jsx(re,{title:r.campaignNameInfoMessage}),onChange:Z=>y(Z.target.value)})]}),le=(Z,he)=>{E(he),F(he!=="STANDARD"?null:"left")};return c.jsxs(v.Box,{mt:1,children:[e==="classic-quiz"||e==="poll"?c.jsxs(v.Box,{mb:1.5,children:[c.jsxs(v.FormControl,{sx:{mb:1.5},children:[c.jsx(v.FormLabel,{color:"primary",children:r.layoutTemplate}),c.jsxs(v.Select,{value:A,size:"md",name:"layout_template",onChange:le,children:[c.jsx(v.Option,{value:"STANDARD",children:"Standard"}),c.jsx(v.Option,{value:"SPLIT",children:"Split"}),c.jsx(v.Option,{value:"OVERLAY",children:"Overlay"})]}),c.jsx(v.FormHelperText,{children:r.layoutTemplateDescription})]}),c.jsxs(v.FormControl,{sx:{mb:1.5},children:[c.jsx(v.FormLabel,{color:"primary",children:r.imagePosition}),c.jsxs(v.Select,{value:k,size:"md",name:"image_position",disabled:A!=="STANDARD",onChange:(Z,he)=>F(he),children:[c.jsx(v.Option,{value:"left",children:"Left"}),c.jsx(v.Option,{value:"right",children:"Right"})]}),c.jsx(v.FormHelperText,{children:r.imagePositionDescription})]})]}):c.jsx(c.Fragment,{}),e==="classic-quiz"?c.jsxs(v.Box,{display:"flex",alignItems:"center",mb:1.5,children:[c.jsx(ui,{defaultValue:Y,label:r.showAnswerExplanations,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:Z=>{O(Z)}}),c.jsx(v.Tooltip,{title:r.showAnswerExplanationsTooltip,sx:{ml:1,maxWidth:300},children:c.jsx(ir,{color:"primary",fontSize:"small"})})]}):c.jsx(c.Fragment,{}),c.jsxs(v.Box,{display:"flex",mb:1.5,alignItems:"center",children:[c.jsx(ui,{defaultValue:i,label:r.configureLeads,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="LEAD",onChange:Z=>{Z===!1&&(p([]),g("before")),o(Z)}}),n!=="LEAD"&&c.jsx(v.Tooltip,{title:r.configureLeadsDisabledMessage,sx:{ml:1,maxWidth:300},children:c.jsx(ir,{color:"primary",fontSize:"small"})})]}),i&&se(),c.jsxs(v.Box,{display:"flex",mb:1.5,alignItems:"center",children:[c.jsx(ui,{defaultValue:a,label:r.configureSignIn,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:n!=="REGISTERED",onChange:Z=>{Z===!1&&(u(""),f("")),s(Z)}}),n!=="REGISTERED"&&c.jsx(v.Tooltip,{title:r.configureSignInDisabledMessage,sx:{ml:1,maxWidth:300},children:c.jsx(ir,{color:"primary",fontSize:"small"})})]}),a&&ae(),c.jsx(ui,{sx:{label:{mb:1.5}},defaultValue:b,label:r.addCampaignInfo,labelPosition:"end",description:"",descriptionColor:"neutral",disabled:!1,onChange:Z=>{Z===!1&&(C(""),y("")),w(Z)}}),b&&X(),c.jsxs(v.Box,{position:"relative",mb:1.5,children:[c.jsx(v.Textarea,{value:U,minRows:"5",maxRows:"20",readOnly:!0,onMouseDown:Z=>Z.preventDefault(),sx:{cursor:"default","&:hover":{cursor:"default"},"& textarea":{cursor:"default"}}}),c.jsx(v.Tooltip,{title:r.copyToClipboard,children:c.jsx(v.Button,{onClick:()=>{navigator.clipboard.writeText(U)},sx:{position:"absolute",top:"10px",right:"10px",zIndex:1},variant:"soft",color:"neutral",children:c.jsx(De.ContentCopy,{})})})]}),c.jsx(v.Alert,{variant:"outlined",color:"primary",startDecorator:c.jsx(ir,{}),sx:{mb:1.5,width:"fit-content"},children:c.jsxs(v.Typography,{color:"primary",fontSize:14,fontWeight:500,children:[r.divElementTextInfo,c.jsx(v.Link,{href:"https://docs.fansunitedmedia.com/docs/user-centric-widgets#/",underline:"always",target:"_blank",rel:"noopener noreferrer",children:"User-centric widgets"})]})})]})},pF=["load-more","limited"],gF={"load-more":"Load more",limited:"Limited"},mF=({entityId:e,labels:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(""),[a,s]=x.useState(""),[l,u]=x.useState(""),[d,f]=x.useState(10),[h,p]=x.useState(2),[m,g]=x.useState("load-more"),b=`
2489
2489
  data-content-id="${e}"`,w=i?`
2490
2490
  data-classic-quiz-url="${i}"`:"",S=a?`
2491
2491
  data-either-or-url="${a}"`:"",C=l?`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fansunited-management-components",
3
- "version": "1.55.0-RC5",
3
+ "version": "1.55.0",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.es.d.ts",