fansunited-management-components 1.55.0-RC3 → 1.55.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 CHANGED
@@ -35904,7 +35904,7 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
35904
35904
  onChange: (X) => p(X)
35905
35905
  }
35906
35906
  ),
35907
- /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: 1 }, children: [
35907
+ /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: 2 }, children: [
35908
35908
  /* @__PURE__ */ c.jsx(ze, { color: "primary", children: r.leadPosition }),
35909
35909
  /* @__PURE__ */ c.jsxs(
35910
35910
  Ot,
@@ -35921,12 +35921,12 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
35921
35921
  )
35922
35922
  ] })
35923
35923
  ] }), oe = () => /* @__PURE__ */ c.jsxs(ln, { sx: { mb: 2 }, children: [
35924
- /* @__PURE__ */ c.jsxs(Fe, { children: [
35924
+ /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: 2 }, children: [
35925
35925
  /* @__PURE__ */ c.jsx(ze, { color: "primary", children: r.signInLabel }),
35926
35926
  /* @__PURE__ */ c.jsx(Ln, { variant: "outlined", color: "neutral", value: l, defaultValue: "", onChange: (X) => u(X.target.value) }),
35927
35927
  /* @__PURE__ */ c.jsx(On, { children: r.signInLabelDescription })
35928
35928
  ] }),
35929
- /* @__PURE__ */ c.jsxs(Fe, { children: [
35929
+ /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: 2 }, children: [
35930
35930
  /* @__PURE__ */ c.jsx(ze, { color: "primary", children: r.authenticationHandler }),
35931
35931
  /* @__PURE__ */ c.jsx(Ln, { variant: "outlined", color: "neutral", value: d, defaultValue: "", onChange: (X) => f(X.target.value) }),
35932
35932
  /* @__PURE__ */ c.jsx(On, { children: r.authenticationHandlerDescription })
@@ -35961,7 +35961,7 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
35961
35961
  };
35962
35962
  return /* @__PURE__ */ c.jsxs(ie, { mt: 1, children: [
35963
35963
  e === "classic-quiz" || e === "poll" ? /* @__PURE__ */ c.jsxs(ie, { mb: 2, children: [
35964
- /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: 1 }, children: [
35964
+ /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: 2 }, children: [
35965
35965
  /* @__PURE__ */ c.jsx(ze, { color: "primary", children: r.layoutTemplate }),
35966
35966
  /* @__PURE__ */ c.jsxs(Ot, { value: I, size: "md", name: "layout_template", onChange: le, children: [
35967
35967
  /* @__PURE__ */ c.jsx(et, { value: "STANDARD", children: "Standard" }),
@@ -35970,7 +35970,7 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
35970
35970
  ] }),
35971
35971
  /* @__PURE__ */ c.jsx(On, { children: r.layoutTemplateDescription })
35972
35972
  ] }),
35973
- /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: e === "classic-quiz" ? 1 : 0 }, children: [
35973
+ /* @__PURE__ */ c.jsxs(Fe, { sx: { mb: 2 }, children: [
35974
35974
  /* @__PURE__ */ c.jsx(ze, { color: "primary", children: r.imagePosition }),
35975
35975
  /* @__PURE__ */ c.jsxs(
35976
35976
  Ot,
@@ -35987,24 +35987,24 @@ const Iy = qe(/* @__PURE__ */ c.jsx("path", {
35987
35987
  }
35988
35988
  ),
35989
35989
  /* @__PURE__ */ c.jsx(On, { children: r.imagePositionDescription })
35990
- ] }),
35991
- e === "classic-quiz" ? /* @__PURE__ */ c.jsxs(ie, { display: "flex", alignItems: "center", children: [
35992
- /* @__PURE__ */ c.jsx(
35993
- ci,
35994
- {
35995
- defaultValue: W,
35996
- label: r.showAnswerExplanations,
35997
- labelPosition: "end",
35998
- description: "",
35999
- descriptionColor: "neutral",
36000
- disabled: !1,
36001
- onChange: (X) => {
36002
- P(X);
36003
- }
35990
+ ] })
35991
+ ] }) : /* @__PURE__ */ c.jsx(c.Fragment, {}),
35992
+ e === "classic-quiz" ? /* @__PURE__ */ c.jsxs(ie, { display: "flex", alignItems: "center", mb: 1, children: [
35993
+ /* @__PURE__ */ c.jsx(
35994
+ ci,
35995
+ {
35996
+ defaultValue: W,
35997
+ label: r.showAnswerExplanations,
35998
+ labelPosition: "end",
35999
+ description: "",
36000
+ descriptionColor: "neutral",
36001
+ disabled: !1,
36002
+ onChange: (X) => {
36003
+ P(X);
36004
36004
  }
36005
- ),
36006
- /* @__PURE__ */ c.jsx(_e, { title: r.showAnswerExplanationsTooltip, sx: { ml: 2, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(dr, { color: "primary" }) })
36007
- ] }) : /* @__PURE__ */ c.jsx(c.Fragment, {})
36005
+ }
36006
+ ),
36007
+ /* @__PURE__ */ c.jsx(_e, { title: r.showAnswerExplanationsTooltip, sx: { ml: 2, maxWidth: 300 }, children: /* @__PURE__ */ c.jsx(dr, { color: "primary" }) })
36008
36008
  ] }) : /* @__PURE__ */ c.jsx(c.Fragment, {}),
36009
36009
  /* @__PURE__ */ c.jsxs(ie, { display: "flex", mb: 1, children: [
36010
36010
  /* @__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:2},children:[c.jsx(Ar,{label:"",values:h,allValues:Object.keys(W),valuesMap:W,onChange:Z=>p(Z)}),c.jsxs(v.FormControl,{sx:{mb:1},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:2},children:[c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{color:"primary",children:r.signInLabel}),c.jsx(v.Input,{variant:"outlined",color:"neutral",value:l,defaultValue:"",onChange:Z=>u(Z.target.value)}),c.jsx(v.FormHelperText,{children:r.signInLabelDescription})]}),c.jsxs(v.FormControl,{children:[c.jsx(v.FormLabel,{color:"primary",children:r.authenticationHandler}),c.jsx(v.Input,{variant:"outlined",color:"neutral",value:d,defaultValue:"",onChange:Z=>f(Z.target.value)}),c.jsx(v.FormHelperText,{children:r.authenticationHandlerDescription})]})]}),X=()=>c.jsxs(v.Card,{sx:{mb:2},children:[c.jsx(xn,{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(xn,{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:2,children:[c.jsxs(v.FormControl,{sx:{mb:1},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:e==="classic-quiz"?1:0},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})]}),e==="classic-quiz"?c.jsxs(v.Box,{display:"flex",alignItems:"center",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.jsx(c.Fragment,{}),c.jsxs(v.Box,{display:"flex",mb:1,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"})})]}),i&&se(),c.jsxs(v.Box,{display:"flex",mb:1,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"})})]}),a&&ae(),c.jsx(ui,{sx:{label:{mb:1}},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:2,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:2,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:2},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:2},children:[c.jsxs(v.FormControl,{sx:{mb:2},children:[c.jsx(v.FormLabel,{color:"primary",children:r.signInLabel}),c.jsx(v.Input,{variant:"outlined",color:"neutral",value:l,defaultValue:"",onChange:Z=>u(Z.target.value)}),c.jsx(v.FormHelperText,{children:r.signInLabelDescription})]}),c.jsxs(v.FormControl,{sx:{mb:2},children:[c.jsx(v.FormLabel,{color:"primary",children:r.authenticationHandler}),c.jsx(v.Input,{variant:"outlined",color:"neutral",value:d,defaultValue:"",onChange:Z=>f(Z.target.value)}),c.jsx(v.FormHelperText,{children:r.authenticationHandlerDescription})]})]}),X=()=>c.jsxs(v.Card,{sx:{mb:2},children:[c.jsx(xn,{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(xn,{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:2,children:[c.jsxs(v.FormControl,{sx:{mb:2},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:2},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,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,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"})})]}),i&&se(),c.jsxs(v.Box,{display:"flex",mb:1,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"})})]}),a&&ae(),c.jsx(ui,{sx:{label:{mb:1}},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:2,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:2,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-RC3",
3
+ "version": "1.55.0-RC4",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.es.d.ts",