cft-builder 0.2.132 → 0.2.133
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/dist/cft-builder.js +1 -1
- package/dist/cft-builder.umd.cjs +1 -1
- package/dist/{main-CXL3-wXM.js → main-BQFg1oFj.js} +2 -2
- package/dist/{quill-B2dZ5f9I.js → quill-CvBF-3lp.js} +1 -1
- package/dist/styles/likert.css +0 -0
- package/dist/styles/likertEmoji.css +0 -0
- package/dist/styles/pdf.css +0 -0
- package/dist/styles/style.scss +0 -0
- package/package.json +1 -1
package/dist/cft-builder.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as s, C as o, E as a, F as d, R as i, T as u, A as B, z as l, B as m } from "./main-
|
|
1
|
+
import { D as s, C as o, E as a, F as d, R as i, T as u, A as B, z as l, B as m } from "./main-BQFg1oFj.js";
|
|
2
2
|
export {
|
|
3
3
|
s as BuilderItems,
|
|
4
4
|
o as BuilderItemsRender,
|
package/dist/cft-builder.umd.cjs
CHANGED
|
@@ -4298,7 +4298,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4298
4298
|
*
|
|
4299
4299
|
* @license MIT
|
|
4300
4300
|
*/const Cxe=b.createContext(null);process.env.NODE_ENV!=="production"&&(Cxe.displayName="DataRouter");const xxe=b.createContext(null);process.env.NODE_ENV!=="production"&&(xxe.displayName="DataRouterState");const Txe=b.createContext(null);process.env.NODE_ENV!=="production"&&(Txe.displayName="Await");const Exe=b.createContext(null);process.env.NODE_ENV!=="production"&&(Exe.displayName="Navigation");const Ixe=b.createContext(null);process.env.NODE_ENV!=="production"&&(Ixe.displayName="Location");const Fj=b.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Fj.displayName="Route");const _xe=b.createContext(null);process.env.NODE_ENV!=="production"&&(_xe.displayName="RouteError");function kj(){let{matches:t}=b.useContext(Fj),e=t[t.length-1];return e?e.params:{}}new Promise(()=>{});const Dxe=t=>{var r;const{section:e}=t,{userSelectedLanguage:n}=on();return o.jsxs("div",{children:[" ",(r=e==null?void 0:e.heading)==null?void 0:r[n==null?void 0:n.type]," : "," ",o.jsx(ao,{placeholder:"enter weight",max:100,min:0}),o.jsx("br",{}),o.jsx("br",{})]})};function qS(){return qS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qS.apply(null,arguments)}function Nxe(t){if(Array.isArray(t))return t}function Oxe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,a,s,l=[],c=!0,u=!1;try{if(a=(n=n.call(t)).next,e!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return l}}function Pj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Fxe(t,e){if(t){if(typeof t=="string")return Pj(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pj(t,e):void 0}}function kxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4301
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mj(t,e){return Nxe(t)||Oxe(t,e)||Fxe(t,e)||kxe()}function $g(t){"@babel/helpers - typeof";return $g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$g(t)}function Pxe(t,e){if($g(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if($g(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mxe(t){var e=Pxe(t,"string");return $g(e)=="symbol"?e:e+""}function Lxe(t,e,n){return(e=Mxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bxe={root:"p-confirm-dialog",message:"p-confirm-dialog-message",icon:"p-confirm-dialog-icon",acceptButton:"p-confirm-dialog-accept",rejectButton:function(e){var n=e.getPropValue;return pt("p-confirm-dialog-reject",{"p-button-text":!n("rejectClassName")})}},J5=Un.extend({defaultProps:{__TYPE:"ConfirmDialog",accept:null,acceptClassName:null,acceptIcon:null,acceptLabel:null,appendTo:null,breakpoints:null,children:void 0,className:null,content:null,defaultFocus:"accept",footer:null,icon:null,message:null,onHide:null,reject:null,rejectClassName:null,rejectIcon:null,rejectLabel:null,tagKey:void 0,visible:void 0},css:{classes:Bxe}});function Lj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lj(Object(n),!0).forEach(function(r){Lxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Bj=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e=Kh(Kh({},e),{visible:e.visible===void 0?!0:e.visible}),e.visible&&Es.emit("confirm-dialog",e);var n=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Es.emit("confirm-dialog",Kh(Kh(Kh({},e),a),{visible:!0}))},r=function(){Es.emit("confirm-dialog",{visible:!1})};return{show:n,hide:r}},Vxe=b.memo(b.forwardRef(function(t,e){var n=Rn(),r=b.useContext(or),i=J5.getProps(t,r),a=b.useState(i.visible),s=Mj(a,2),l=s[0],c=s[1],u=b.useState(!1),d=Mj(u,2),f=d[0],h=d[1],g=b.useRef(null),v=b.useRef(!1),m=b.useRef(null),A=function(){var pe=i.group;return g.current&&(pe=g.current.group),Object.assign({},i,g.current,{group:pe})},S=function(pe){return A()[pe]},T=function(pe){for(var U=arguments.length,X=new Array(U>1?U-1:0),W=1;W<U;W++)X[W-1]=arguments[W];return Pe.getPropValue(S(pe),X)},C=S("acceptLabel")||ii("accept"),x=S("rejectLabel")||ii("reject"),w={props:i,state:{visible:l}},I=J5.setMetaData(w),_=I.ptm,O=I.cx,F=I.isUnstyled;ui(J5.css.styles,F,{name:"confirmdialog"});var P=function(){v.current||(v.current=!0,T("accept"),N("accept"))},M=function(){v.current||(v.current=!0,T("reject"),N("reject"))},j=function(){var pe=A();pe.group===i.group&&(c(!0),v.current=!1,m.current=document.activeElement)},N=function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"cancel";l&&(typeof pe!="string"&&(pe="cancel"),c(!1),T("onHide",pe),Ee.focus(m.current),m.current=null)},V=function(pe){if(pe.tagKey===i.tagKey){var U=l!==pe.visible,X=S("target")!==pe.target;X&&!i.target?(N(),g.current=pe,h(!0)):U&&(g.current=pe,pe.visible?j():N())}};b.useEffect(function(){i.visible?j():N()},[i.visible]),b.useEffect(function(){return!i.target&&!i.message&&Es.on("confirm-dialog",V),function(){Es.off("confirm-dialog",V)}},[i.target]),hr(function(){f&&j()},[f]),Ka(function(){Es.off("confirm-dialog",V)}),b.useImperativeHandle(e,function(){return{props:i,confirm:V}});var ee=function(){var pe=S("defaultFocus"),U=pt("p-confirm-dialog-accept",S("acceptClassName")),X=pt("p-confirm-dialog-reject",{"p-button-text":!S("rejectClassName")},S("rejectClassName")),W=n({label:x,autoFocus:pe==="reject",icon:S("rejectIcon"),className:pt(S("rejectClassName"),O("rejectButton",{getPropValue:S})),onClick:M,pt:_("rejectButton"),unstyled:i.unstyled,__parentMetadata:{parent:w}},_("rejectButton")),Q=n({label:C,autoFocus:pe===void 0||pe==="accept",icon:S("acceptIcon"),className:pt(S("acceptClassName"),O("acceptButton")),onClick:P,pt:_("acceptButton"),unstyled:i.unstyled,__parentMetadata:{parent:w}},_("acceptButton")),H=b.createElement(b.Fragment,null,b.createElement(Vt,W),b.createElement(Vt,Q));if(S("footer")){var Y={accept:P,reject:M,acceptClassName:U,rejectClassName:X,acceptLabel:C,rejectLabel:x,element:H,props:A()};return Pe.getJSXElement(S("footer"),Y)}return H},fe=function(){var pe=A(),U=Pe.getJSXElement(S("message"),pe),X=n({className:O("icon")},_("icon")),W=ir.getJSXIcon(S("icon"),Kh({},X),{props:pe}),Q=ee(),H=n({className:O("message")},_("message")),Y=n({visible:l,className:pt(S("className"),O("root")),footer:Q,onHide:N,breakpoints:S("breakpoints"),pt:pe.pt,unstyled:i.unstyled,appendTo:S("appendTo"),__parentMetadata:{parent:w}},J5.getOtherProps(pe));return b.createElement(Gs,qS({},Y,{content:t==null?void 0:t.content}),W,b.createElement("span",H,U))},te=fe();return b.createElement(Rl,{element:te,appendTo:S("appendTo")})}));Vxe.displayName="ConfirmDialog";const qxe=()=>{const[t]=k.useState([]);return k.useEffect(()=>()=>{},[]),o.jsx("div",{className:"card",children:(t==null?void 0:t.length)>0&&(t==null?void 0:t.map((e,n)=>o.jsxs("div",{children:[o.jsx("ul",{className:"list-none p-0 m-0",children:o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:(e==null?void 0:e.is_active)===1?o.jsx("i",{style:{color:"green"},className:"pi pi-check"}):o.jsx("i",{className:"pi pi-check"})}),o.jsxs("span",{className:" font-bold ml-2",children:[e==null?void 0:e.version_name,(e==null?void 0:e.is_active)===1?" - Active ":""]})]})}),o.jsx("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:o.jsx("div",{className:"text-right ml-3",children:o.jsx("span",{className:" font-bold",children:(e==null?void 0:e.is_active)===1?"":o.jsx(Vt,{text:!0,onClick:()=>{setTimeout(()=>{},3e3)},severity:"success",label:"Make this version active",icon:"pi pi-check",size:"small"})})})})]})}),o.jsx("hr",{})]},`version-item-${n}`)))})},Uxe=()=>{const{setLayout:t,formBuilderConfigurationType:e}=on(),n=k.useRef(null),r=s=>{var l;switch((l=s==null?void 0:s.formType)==null?void 0:l.key){case(e==null?void 0:e.key):t(s==null?void 0:s.layout);break}},i=async s=>{const l=s.target.files;if(l&&l.length>0){const c=await a(l[0]);r(c)}};async function a(s){return new Promise((l,c)=>{const u=new FileReader;u.onload=d=>{var f;return l(JSON.parse((f=d.target)==null?void 0:f.result))},u.onerror=d=>c(d),u.readAsText(s)})}return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:n,type:"file",style:{display:"none"},id:"schema",name:"schema",onChange:i}),o.jsx(Vt,{text:!0,size:"small",className:"p-button-primary ml-3 mr-3",onClick:()=>{var s;(s=n.current)==null||s.click()},label:"Import Template"})]})},$xe=()=>{const{builderTemplateName:t,formBuilderFormSchema:e}=on(),n=function(){const r=document.createElement("a");return function(i,a){const s=JSON.stringify(i),l=new Blob([s],{type:"octet/stream"}),c=window.URL.createObjectURL(l);r.href=c,r.download=a,r.click(),window.URL.revokeObjectURL(c)}}();return o.jsx(Vt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>{const r=e,i=t+".json";n(r,i)},label:"Export Template"})};function jg(){return jg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jg.apply(null,arguments)}function zg(t){"@babel/helpers - typeof";return zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zg(t)}function jxe(t,e){if(zg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(zg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zxe(t){var e=jxe(t,"string");return zg(e)=="symbol"?e:e+""}function Hxe(t,e,n){return(e=zxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yxe={root:function(e){var n=e.props,r=e.checked;return pt("p-inputswitch p-component",{"p-highlight":r,"p-disabled":n.disabled,"p-invalid":n.invalid})},input:"p-inputswitch-input",slider:"p-inputswitch-slider"},Z5=Un.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,invalid:!1,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},css:{classes:Yxe}});function Vj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kxe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vj(Object(n),!0).forEach(function(r){Hxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zs=b.memo(b.forwardRef(function(t,e){var n=Rn(),r=b.useContext(or),i=Z5.getProps(t,r),a=Z5.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;ui(Z5.css.styles,c,{name:"inputswitch"});var u=b.useRef(null),d=b.useRef(i.inputRef),f=i.checked===i.trueValue,h=function(I){if(i.onChange){var _=f?i.falseValue:i.trueValue;i.onChange({originalEvent:I,value:_,stopPropagation:function(){I==null||I.stopPropagation()},preventDefault:function(){I==null||I.preventDefault()},target:{name:i.name,id:i.id,value:_}})}},g=function(I){var _;i==null||(_=i.onFocus)===null||_===void 0||_.call(i,I)},v=function(I){var _;i==null||(_=i.onBlur)===null||_===void 0||_.call(i,I)};b.useImperativeHandle(e,function(){return{props:i,focus:function(){return Ee.focus(d.current)},getElement:function(){return u.current},getInput:function(){return d.current}}}),b.useEffect(function(){Pe.combinedRefs(d,i.inputRef)},[d,i.inputRef]),Bi(function(){i.autoFocus&&Ee.focus(d.current,i.autoFocus)});var m=Pe.isNotEmpty(i.tooltip),A=Z5.getOtherProps(i),S=Pe.reduceKeys(A,Ee.ARIA_PROPS),T=n({className:pt(i.className,l("root",{checked:f})),style:i.style,role:"checkbox","aria-checked":f,"data-p-highlight":f,"data-p-disabled":i.disabled},A,s("root")),C=n(Kxe({type:"checkbox",id:i.inputId,name:i.name,checked:f,onChange:h,onFocus:g,onBlur:v,disabled:i.disabled,role:"switch",tabIndex:i.tabIndex,"aria-checked":f,className:l("input")},S),s("input")),x=n({className:l("slider")},s("slider"));return b.createElement(b.Fragment,null,b.createElement("div",jg({id:i.id,ref:u},T),b.createElement("input",jg({ref:d},C)),b.createElement("span",x)),m&&b.createElement(dn,jg({target:u,content:i.tooltip,pt:s("tooltip")},i.tooltipOptions)))}));Zs.displayName="InputSwitch";const Rxe=()=>{var T,C,x,w,I;const{formBuilderFormSchema:t,selectFormBuilderLanguage:e,formBuilderSchemaLanguages:n,unselectFormBuilderLanguage:r,schemaBuilderUpdate:i,builderTemplateName:a,formBuilderLoading:s,formBuilderConfigurationType:l,saveFormTemplateNewVersion:c}=on(),[u,d]=k.useState(),f=kj(),h=f==null?void 0:f.form_template_id,g=G3({initialValues:{firstName:"",lastName:"",contact:"",email:""},validate:()=>{const _={};return g.values.application_url="",_},onSubmit:()=>{}}),v=l==null?void 0:l.key,m=(_,O)=>{_!=null&&_.value?e(O):r(O),d(!u)},A=_=>{for(const[,O]of t.layout.entries())for(const[,F]of O.children.entries())for(const[,P]of F.children.entries())for(const[,M]of P.children.entries())for(const[,j]of M.children.entries())j.isFluid=_.value},S=()=>{Bj({message:"Are you sure you want to a new version for this form?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{c(h,t)},reject:()=>{}})};return o.jsx(o.Fragment,{children:o.jsx("form",{onSubmit:g.handleSubmit,className:"p-fluid",children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{height:"15rem"})}):o.jsxs(di,{header:"General",children:[o.jsxs("h5",{children:["Form Title : ",a||""," "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"binary",onChange:_=>{i({showIntroTab:_.value})},checked:t==null?void 0:t.showIntroTab}),o.jsx("label",{htmlFor:"binary",children:"Show Intro Page"})," "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({enableAutoSave:_.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Task Render Form User Data"})]}),v===d7&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({surveyQuestionSlide:_.value})},checked:t==null?void 0:t.surveyQuestionSlide}),o.jsx("label",{htmlFor:"auto-save",children:"Survey Slide Per Question"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"showConditionalFields",onChange:_=>{i({showConditionalFields:_.value})},checked:t==null?void 0:t.showConditionalFields,disabled:t==null?void 0:t.surveyQuestionSlide}),o.jsxs("label",{htmlFor:"showConditionalFields",children:["Show Conditional Fields ",(t==null?void 0:t.surveyQuestionSlide)===!0&&o.jsx("small",{className:"error",children:"Cant use Survey Slide Per Question with Conditional Fields"})]})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"enableReviewTask",onChange:_=>{i({enableReviewTask:_.value})},checked:t==null?void 0:t.enableReviewTask}),o.jsx("label",{htmlFor:"enableReviewTask",children:"Enable Admin Review Task"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"enableFormFluid",onChange:_=>{i({enableFormFluid:_.value}),A(_)},checked:t==null?void 0:t.enableFormFluid}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Form Fluid"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"enableFieldEnumeration",onChange:_=>{i({enableFieldEnumeration:_.value}),A(_)},checked:t==null?void 0:t.enableFieldEnumeration}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Field Enumeration"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"isOnboardingForm",onChange:_=>{i({isOnboardingForm:_.value}),A(_)},checked:t==null?void 0:t.isOnboardingForm}),o.jsx("label",{htmlFor:"isOnboardingForm",children:"Is Onboarding Form"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"8rem"})}):o.jsxs(di,{className:"mt-3",header:"Auto Save Settings",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({enableAutoSave:_.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save User Data"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({enableAutoSaveBuilderSetting:_.value})},checked:t==null?void 0:t.enableAutoSaveBuilderSetting}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Form Builder Settings"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"16rem"})}):o.jsxs(di,{className:"mt-3",header:"Form Table Configuration",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"stripedRows",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,stripedRows:_.value}})},checked:(T=t==null?void 0:t.tableConfiguration)==null?void 0:T.stripedRows}),o.jsx("label",{htmlFor:"stripedRows",children:"Striped Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"gridLines",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,gridLines:_.value}})},checked:(C=t==null?void 0:t.tableConfiguration)==null?void 0:C.gridLines}),o.jsx("label",{htmlFor:"gridLines",children:"Grid Lines"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"flexScroll",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,flexScroll:_.value}})},checked:(x=t==null?void 0:t.tableConfiguration)==null?void 0:x.flexScroll}),o.jsx("label",{htmlFor:"flexScroll",children:"Flex Scroll "})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"isResponsive",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,isResponsive:_.value}})},checked:(w=t==null?void 0:t.tableConfiguration)==null?void 0:w.isResponsive}),o.jsx("label",{htmlFor:"isResponsive",children:"isResponsive Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"rowReorder",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,rowReorder:_.value}})},checked:(I=t==null?void 0:t.tableConfiguration)==null?void 0:I.rowReorder}),o.jsx("label",{htmlFor:"rowReorder",children:"Row Reorder"})]})]})]}),o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{height:"18rem"})}):o.jsx(di,{header:"Languages",children:IQ.map((_,O)=>{const F=n.filter(function(P){return(_==null?void 0:_.key)===(P==null?void 0:P.key)});return o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:O,name:"lagnuage",checked:F.length>0,onChange:P=>m(P,_)}),o.jsx("label",{htmlFor:O,children:_.language})]},O)})}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"16rem"})}):o.jsxs(di,{className:"mt-3",header:"Versioning",children:[o.jsx("h5",{children:"Change Form Version Title"}),o.jsx("div",{className:"field",children:o.jsx(wn,{value:(t==null?void 0:t.version_name)||"",minLength:2,placeholder:"Enter form version",maxLength:50,onChange:_=>{var O;i({version_name:(O=_==null?void 0:_.target)==null?void 0:O.value})}})}),o.jsx("h5",{children:"All Forms Version"}),o.jsx(qxe,{}),o.jsx(Vt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>S(),label:"Create New Version",loading:s})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"8rem"})}):o.jsx(di,{className:"mt-3",header:"Export/Import",children:o.jsxs("span",{className:"flex",children:[o.jsx($xe,{}),o.jsx(Uxe,{})]})})]}),o.jsx("div",{className:"col-6"})]})})})},Xxe=t=>{var v,m,A;const{fieldIndex:e,field:n,models:r,setfieldMappings:i,fieldMappings:a}=t,[s,l]=k.useState(null),[c,u]=k.useState(null),d=()=>{var C;const S=[...a],T=S.findIndex(x=>x.fieldId===(n==null?void 0:n.uuid));if(T!==-1){const x=[...r],w=x.findIndex(I=>{var _;return I.modelName===((_=S[T])==null?void 0:_.modelName)});u((C=S[T])==null?void 0:C.column_name),w!==-1&&l(x[w])}};k.useEffect(()=>(d(),()=>{}),[]);const[f,h]=k.useState(!1),g=S=>{const T=[...a],C=T.findIndex(w=>w.fieldId===S),x={fieldId:S,modelName:(s==null?void 0:s.modelName)||"",class:s==null?void 0:s.class,column_name:c||""};C!==-1?T[C]=x:T.push(x),i([...T])};return o.jsxs("div",{className:"grid",children:[o.jsxs(Gs,{header:`Map ${(v=n==null?void 0:n.label)==null?void 0:v.english} Field with Model`,visible:f,style:{width:"40vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,label:"Set Field","aria-label":"Submit",onClick:()=>{g((n==null?void 0:n.uuid)||""),h(!1)}})}),onHide:()=>h(!1),children:[o.jsxs("p",{children:["Map ",(m=n==null?void 0:n.label)==null?void 0:m.english," Field with Model"]}),o.jsxs("div",{className:"flex justify-content-between",children:[o.jsx(Va,{value:s,onChange:S=>l(S.value),options:r,optionLabel:"modelName",className:"w-full md:w-14rem",placeholder:"Select a model field",filter:!0,showClear:!0}),o.jsx(Va,{value:c,onChange:S=>u(S.value),options:(s==null?void 0:s.columns)||[],className:"w-full md:w-14rem",placeholder:"Select a column",filter:!0,showClear:!0})]})]}),o.jsx("div",{className:"col-6",children:o.jsxs("p",{children:[o.jsxs("strong",{children:[e+1," "]}),"Field ",n==null?void 0:n.componentType,": ",(A=n==null?void 0:n.label)==null?void 0:A.english," Is Mapped to"," ",o.jsx(vu,{className:"mr-2",severity:s!=null&&s.modelName?"success":"warning",value:(s==null?void 0:s.modelName)||"Nothing"}),"with column"," ",o.jsx(vu,{className:"mr-2",severity:c?"success":"danger",value:c||"Nothing"})]})}),o.jsx("div",{className:"col-6",children:o.jsx(Vt,{text:!0,label:"Set Model","aria-label":"Submit",onClick:()=>{h(!0)}})})]},e+"-table-field-item")},Gxe=t=>{const{fields:e}=t,[n]=k.useState([]),[r,i]=k.useState(!1),{formBuilderFormSchema:a,schemaBuilderUpdate:s}=on(),l=()=>{i(!0)},c=()=>{let d=[...(a==null?void 0:a.fieldMappings)||[]];d!=null&&d.length&&(d=d==null?void 0:d.filter(f=>e.some(h=>h.uuid===(f==null?void 0:f.fieldId)))),u(d)};k.useEffect(()=>(l(),c(),()=>{}),[]);const u=d=>{s({fieldMappings:d})};return o.jsx("div",{children:r===!0?o.jsxs(o.Fragment,{children:[o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"})]}):o.jsx(o.Fragment,{children:(e==null?void 0:e.length)>0&&(n==null?void 0:n.length)>0&&(e==null?void 0:e.map((d,f)=>o.jsx("div",{className:"card",children:o.jsx(Xxe,{fieldMappings:a!=null&&a.fieldMappings?a==null?void 0:a.fieldMappings:[],setfieldMappings:u,field:d,fieldIndex:f,models:n})},f+"-table-field-itemc-component")))})})},Wxe=0,Qxe=t=>{const{setShowPreview:e,activeIndex:n,userFormBuilderSettings:r}=t,{builderIsChangesSaved:i,builderTemplateName:a,formBuilderConfigurationType:s,formBuilderFormSchema:l,formBuilderLoading:c,formBuilderPublishedStatus:u,builderVersionName:d,saveFormProgress:f,schemaBuilderUpdate:h}=on(),g=k.useRef(null),v=()=>{f(l)},m=["Basic","Advanced"],[A,S]=k.useState((r==null?void 0:r.isAdvanceView)!==void 0&&r!=null&&r.isAdvanceView?"Advanced":"Basic"),T=w=>{S(w.value),h({isAdvanceView:w.value==="Advanced"})},C=o.jsx(k.Fragment,{children:o.jsxs("div",{className:"flex",children:[((s==null?void 0:s.key)===C3||(s==null?void 0:s.key)===d7||(s==null?void 0:s.key)===qte)&&o.jsx(Np,{className:"mr-3",value:A,onChange:w=>T(w),options:m,disabled:c}),o.jsx(Vt,{text:!0,icon:"pi pi-eye",size:"small",className:"mr-2",onClick:()=>e(!0),label:"Preview"}),!u&&o.jsx(o.Fragment,{children:(l==null?void 0:l.enableAutoSaveBuilderSetting)===!1&&o.jsx(Vt,{text:!0,disabled:i,size:"small",className:i?"p-button-secondary":"p-button-info",onClick:()=>v(),label:"Save progress",loading:c})})]})}),x=o.jsx(k.Fragment,{children:c===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{width:"25rem",height:"1.5rem"})}):o.jsxs("div",{className:"font-medium text-900",children:["Builder - ",s==null?void 0:s.name," - ",a," ","- Version : ",d]})});return o.jsxs(o.Fragment,{children:[o.jsx(A3,{ref:g}),o.jsxs("div",{className:"flex",children:[o.jsx("div",{className:"flex w-5 justify-content-left align-items-start",children:x}),o.jsx("div",{className:"flex w-7 justify-content-right align-items-end",children:n===Wxe&&C})]})]})};function Jxe(){const{formBuilderFormLayout:t,formBuilderFormSchema:e,clearBuilderSchema:n,schemaBuilderUpdate:r,saveFormProgress:i,userSelectedLanguage:a,builderIsChangesSaved:s,formBuilderPublishedStatus:l}=on(),c=kj(),u=c==null?void 0:c.form_template_id,[d]=k.useState(!0),[f]=k.useState(null),[h,g]=k.useState(!0),[v,m]=k.useState(!1),[A,S]=k.useState(0),[T,C]=k.useState(null),x=async()=>{},w=k.useCallback(()=>{x()},[t,e]),I=F=>{const P={...e,intro:F};r(P)},_=()=>{i(e)},O=()=>{s===!1?(console.log("formBuilderPublishedStatus",l),l===!1?Bj({message:"You have unsaved changes, would you like to to save them or discard them?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{_(),g(!1),setTimeout(()=>{n()},1e3)},rejectLabel:"Close and discard changes",acceptLabel:"Close and save changes",reject:()=>{g(!1),setTimeout(()=>{n()},1e3)}}):(g(!1),setTimeout(()=>{n()},1e3))):(g(!1),setTimeout(()=>{n()},1e3))};return o.jsx(Gs,{maximizable:!0,header:()=>o.jsx(Qxe,{setUserFormBuilderSettings:C,userFormBuilderSettings:T,formBuilderFormLayout:t,formTemplateId:u,showPreview:v,setShowPreview:m,activeIndex:A,emitSocketData:w}),visible:h,style:{width:"100vw",height:"100vh",maxHeight:"100%"},onHide:()=>O(),children:o.jsxs("div",{id:"form-builder",className:"grid",style:{overflow:"hidden",height:"100%"},children:[!d&&o.jsx(Vt,{text:!0,label:"Request Access",onClick:()=>{},className:"p-button-info"}),f&&o.jsxs("div",{children:[f==null?void 0:f.username," is editing so you have to wait to edits and leaves."]}),o.jsx("div",{className:"flex justify-content-end"}),o.jsx("div",{id:"users-arrow"}),o.jsx("div",{className:"col-12",style:{overflow:"hidden"},children:o.jsxs(as,{activeIndex:A,onTabChange:F=>S(F.index),children:[o.jsxs(Sr,{header:"Builder",children:[o.jsx(xf,{backend:Ef}),o.jsx(No,{style:{width:"75vw"},visible:v,onHide:()=>m(!1),position:"right",children:o.jsx(xf,{backend:Ef,children:o.jsx("div",{className:"scroll-height-200"})})})]}),o.jsx(Sr,{header:"Configuration",children:o.jsx("div",{className:"scroll-height-250",children:o.jsx(Rxe,{})})}),o.jsx(Sr,{header:"Intro",disabled:(e==null?void 0:e.showIntroTab)===!1,children:o.jsx(s4,{style:{height:"320px"},value:(e==null?void 0:e.intro)||"<p></p>",onTextChange:F=>{I(F==null?void 0:F.htmlValue)}})}),o.jsx(Sr,{header:"Data Model Binding",children:o.jsx(Gxe,{fields:e==null?void 0:e.tableFields})}),o.jsxs(Sr,{header:"Weighting",children:[o.jsx("h3",{children:"Weighting"}),(t==null?void 0:t.length)>0&&t.map((F,P)=>{var M,j,N;return o.jsxs("div",{children:[o.jsx("h5",{children:(M=F==null?void 0:F.title)==null?void 0:M[a==null?void 0:a.type]}),((j=F==null?void 0:F.children)==null?void 0:j.length)>0&&((N=F==null?void 0:F.children)==null?void 0:N.map((V,ee)=>o.jsx("div",{children:o.jsx(Dxe,{page:F,section:V})},`weighting-section-${ee}`)))]},`weighting-page-${P}`)}),o.jsx("hr",{}),"Total ",o.jsx(ao,{placeholder:"0",readOnly:!0})," %"]})]})})]})})}const Zxe=()=>o.jsx(Jxe,{}),eTe=t=>{const{className:e=""}=t,{builderIsChangesSaved:n,schemaBuilderUpdate:r,formBuilderFormLayout:i,formBuilderFormSchema:a,formatTableFieldsHook:s,formBuilderLoading:l,saveFormProgress:c}=on(),u=d=>{n===!1?(d.preventDefault(),d.returnValue=!1):window.location.reload()};return k.useEffect(()=>(window.addEventListener("beforeunload",u),()=>{window.removeEventListener("beforeunload",u)}),[n]),k.useEffect(()=>((a==null?void 0:a.enableAutoSaveBuilderSetting)===!0&&l===!1?c(!1):r({isChangesSaved:!1}),s(i),()=>{}),[i]),o.jsx("div",{className:e,children:o.jsx(Q5,{})})},tTe={padding:"1rem 0.5rem",cursor:"move",textAlign:"center"},kd=t=>{const{data:e,showIcon:n,tags:r}=t,[{opacity:i},a]=sa({type:nr,item:e,collect:l=>({opacity:l.isDragging()?0:1})});function s(l,c){return l.length<=c?l:l.slice(0,c)+"..."}return o.jsxs("div",{ref:a,className:`card builder-sidebar-item ${e==null?void 0:e.element}`,style:{...tTe,opacity:i},children:[i&&(e!=null&&e.toolTip)?e==null?void 0:e.toolTip(e):"",s(e==null?void 0:e.label,80),r&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"mt-2",children:(r==null?void 0:r.length)>0&&(r==null?void 0:r.map((l,c)=>o.jsx(vu,{severity:l==null?void 0:l.severity,className:"mr-2",value:l==null?void 0:l.label},`tagIndex-${c}`)))})})]})};var nTe={root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},rTe=`
|
|
4301
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mj(t,e){return Nxe(t)||Oxe(t,e)||Fxe(t,e)||kxe()}function $g(t){"@babel/helpers - typeof";return $g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$g(t)}function Pxe(t,e){if($g(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if($g(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mxe(t){var e=Pxe(t,"string");return $g(e)=="symbol"?e:e+""}function Lxe(t,e,n){return(e=Mxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bxe={root:"p-confirm-dialog",message:"p-confirm-dialog-message",icon:"p-confirm-dialog-icon",acceptButton:"p-confirm-dialog-accept",rejectButton:function(e){var n=e.getPropValue;return pt("p-confirm-dialog-reject",{"p-button-text":!n("rejectClassName")})}},J5=Un.extend({defaultProps:{__TYPE:"ConfirmDialog",accept:null,acceptClassName:null,acceptIcon:null,acceptLabel:null,appendTo:null,breakpoints:null,children:void 0,className:null,content:null,defaultFocus:"accept",footer:null,icon:null,message:null,onHide:null,reject:null,rejectClassName:null,rejectIcon:null,rejectLabel:null,tagKey:void 0,visible:void 0},css:{classes:Bxe}});function Lj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lj(Object(n),!0).forEach(function(r){Lxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Bj=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e=Kh(Kh({},e),{visible:e.visible===void 0?!0:e.visible}),e.visible&&Es.emit("confirm-dialog",e);var n=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Es.emit("confirm-dialog",Kh(Kh(Kh({},e),a),{visible:!0}))},r=function(){Es.emit("confirm-dialog",{visible:!1})};return{show:n,hide:r}},Vxe=b.memo(b.forwardRef(function(t,e){var n=Rn(),r=b.useContext(or),i=J5.getProps(t,r),a=b.useState(i.visible),s=Mj(a,2),l=s[0],c=s[1],u=b.useState(!1),d=Mj(u,2),f=d[0],h=d[1],g=b.useRef(null),v=b.useRef(!1),m=b.useRef(null),A=function(){var pe=i.group;return g.current&&(pe=g.current.group),Object.assign({},i,g.current,{group:pe})},S=function(pe){return A()[pe]},T=function(pe){for(var U=arguments.length,X=new Array(U>1?U-1:0),W=1;W<U;W++)X[W-1]=arguments[W];return Pe.getPropValue(S(pe),X)},C=S("acceptLabel")||ii("accept"),x=S("rejectLabel")||ii("reject"),w={props:i,state:{visible:l}},I=J5.setMetaData(w),_=I.ptm,O=I.cx,F=I.isUnstyled;ui(J5.css.styles,F,{name:"confirmdialog"});var P=function(){v.current||(v.current=!0,T("accept"),N("accept"))},M=function(){v.current||(v.current=!0,T("reject"),N("reject"))},j=function(){var pe=A();pe.group===i.group&&(c(!0),v.current=!1,m.current=document.activeElement)},N=function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"cancel";l&&(typeof pe!="string"&&(pe="cancel"),c(!1),T("onHide",pe),Ee.focus(m.current),m.current=null)},V=function(pe){if(pe.tagKey===i.tagKey){var U=l!==pe.visible,X=S("target")!==pe.target;X&&!i.target?(N(),g.current=pe,h(!0)):U&&(g.current=pe,pe.visible?j():N())}};b.useEffect(function(){i.visible?j():N()},[i.visible]),b.useEffect(function(){return!i.target&&!i.message&&Es.on("confirm-dialog",V),function(){Es.off("confirm-dialog",V)}},[i.target]),hr(function(){f&&j()},[f]),Ka(function(){Es.off("confirm-dialog",V)}),b.useImperativeHandle(e,function(){return{props:i,confirm:V}});var ee=function(){var pe=S("defaultFocus"),U=pt("p-confirm-dialog-accept",S("acceptClassName")),X=pt("p-confirm-dialog-reject",{"p-button-text":!S("rejectClassName")},S("rejectClassName")),W=n({label:x,autoFocus:pe==="reject",icon:S("rejectIcon"),className:pt(S("rejectClassName"),O("rejectButton",{getPropValue:S})),onClick:M,pt:_("rejectButton"),unstyled:i.unstyled,__parentMetadata:{parent:w}},_("rejectButton")),Q=n({label:C,autoFocus:pe===void 0||pe==="accept",icon:S("acceptIcon"),className:pt(S("acceptClassName"),O("acceptButton")),onClick:P,pt:_("acceptButton"),unstyled:i.unstyled,__parentMetadata:{parent:w}},_("acceptButton")),H=b.createElement(b.Fragment,null,b.createElement(Vt,W),b.createElement(Vt,Q));if(S("footer")){var Y={accept:P,reject:M,acceptClassName:U,rejectClassName:X,acceptLabel:C,rejectLabel:x,element:H,props:A()};return Pe.getJSXElement(S("footer"),Y)}return H},fe=function(){var pe=A(),U=Pe.getJSXElement(S("message"),pe),X=n({className:O("icon")},_("icon")),W=ir.getJSXIcon(S("icon"),Kh({},X),{props:pe}),Q=ee(),H=n({className:O("message")},_("message")),Y=n({visible:l,className:pt(S("className"),O("root")),footer:Q,onHide:N,breakpoints:S("breakpoints"),pt:pe.pt,unstyled:i.unstyled,appendTo:S("appendTo"),__parentMetadata:{parent:w}},J5.getOtherProps(pe));return b.createElement(Gs,qS({},Y,{content:t==null?void 0:t.content}),W,b.createElement("span",H,U))},te=fe();return b.createElement(Rl,{element:te,appendTo:S("appendTo")})}));Vxe.displayName="ConfirmDialog";const qxe=()=>{const[t]=k.useState([]);return k.useEffect(()=>()=>{},[]),o.jsx("div",{className:"card",children:(t==null?void 0:t.length)>0&&(t==null?void 0:t.map((e,n)=>o.jsxs("div",{children:[o.jsx("ul",{className:"list-none p-0 m-0",children:o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:(e==null?void 0:e.is_active)===1?o.jsx("i",{style:{color:"green"},className:"pi pi-check"}):o.jsx("i",{className:"pi pi-check"})}),o.jsxs("span",{className:" font-bold ml-2",children:[e==null?void 0:e.version_name,(e==null?void 0:e.is_active)===1?" - Active ":""]})]})}),o.jsx("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:o.jsx("div",{className:"text-right ml-3",children:o.jsx("span",{className:" font-bold",children:(e==null?void 0:e.is_active)===1?"":o.jsx(Vt,{text:!0,onClick:()=>{setTimeout(()=>{},3e3)},severity:"success",label:"Make this version active",icon:"pi pi-check",size:"small"})})})})]})}),o.jsx("hr",{})]},`version-item-${n}`)))})},Uxe=()=>{const{setLayout:t,formBuilderConfigurationType:e}=on(),n=k.useRef(null),r=s=>{var l;switch((l=s==null?void 0:s.formType)==null?void 0:l.key){case(e==null?void 0:e.key):t(s==null?void 0:s.layout);break}},i=async s=>{const l=s.target.files;if(l&&l.length>0){const c=await a(l[0]);r(c)}};async function a(s){return new Promise((l,c)=>{const u=new FileReader;u.onload=d=>{var f;return l(JSON.parse((f=d.target)==null?void 0:f.result))},u.onerror=d=>c(d),u.readAsText(s)})}return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:n,type:"file",style:{display:"none"},id:"schema",name:"schema",onChange:i}),o.jsx(Vt,{text:!0,size:"small",className:"p-button-primary ml-3 mr-3",onClick:()=>{var s;(s=n.current)==null||s.click()},label:"Import Template"})]})},$xe=()=>{const{builderTemplateName:t,formBuilderFormSchema:e}=on(),n=function(){const r=document.createElement("a");return function(i,a){const s=JSON.stringify(i),l=new Blob([s],{type:"octet/stream"}),c=window.URL.createObjectURL(l);r.href=c,r.download=a,r.click(),window.URL.revokeObjectURL(c)}}();return o.jsx(Vt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>{const r=e,i=t+".json";n(r,i)},label:"Export Template"})};function jg(){return jg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jg.apply(null,arguments)}function zg(t){"@babel/helpers - typeof";return zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zg(t)}function jxe(t,e){if(zg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(zg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zxe(t){var e=jxe(t,"string");return zg(e)=="symbol"?e:e+""}function Hxe(t,e,n){return(e=zxe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yxe={root:function(e){var n=e.props,r=e.checked;return pt("p-inputswitch p-component",{"p-highlight":r,"p-disabled":n.disabled,"p-invalid":n.invalid})},input:"p-inputswitch-input",slider:"p-inputswitch-slider"},Z5=Un.extend({defaultProps:{__TYPE:"InputSwitch",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,id:null,inputId:null,inputRef:null,invalid:!1,name:null,onBlur:null,onChange:null,onFocus:null,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,children:void 0},css:{classes:Yxe}});function Vj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kxe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vj(Object(n),!0).forEach(function(r){Hxe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zs=b.memo(b.forwardRef(function(t,e){var n=Rn(),r=b.useContext(or),i=Z5.getProps(t,r),a=Z5.setMetaData({props:i}),s=a.ptm,l=a.cx,c=a.isUnstyled;ui(Z5.css.styles,c,{name:"inputswitch"});var u=b.useRef(null),d=b.useRef(i.inputRef),f=i.checked===i.trueValue,h=function(I){if(i.onChange){var _=f?i.falseValue:i.trueValue;i.onChange({originalEvent:I,value:_,stopPropagation:function(){I==null||I.stopPropagation()},preventDefault:function(){I==null||I.preventDefault()},target:{name:i.name,id:i.id,value:_}})}},g=function(I){var _;i==null||(_=i.onFocus)===null||_===void 0||_.call(i,I)},v=function(I){var _;i==null||(_=i.onBlur)===null||_===void 0||_.call(i,I)};b.useImperativeHandle(e,function(){return{props:i,focus:function(){return Ee.focus(d.current)},getElement:function(){return u.current},getInput:function(){return d.current}}}),b.useEffect(function(){Pe.combinedRefs(d,i.inputRef)},[d,i.inputRef]),Bi(function(){i.autoFocus&&Ee.focus(d.current,i.autoFocus)});var m=Pe.isNotEmpty(i.tooltip),A=Z5.getOtherProps(i),S=Pe.reduceKeys(A,Ee.ARIA_PROPS),T=n({className:pt(i.className,l("root",{checked:f})),style:i.style,role:"checkbox","aria-checked":f,"data-p-highlight":f,"data-p-disabled":i.disabled},A,s("root")),C=n(Kxe({type:"checkbox",id:i.inputId,name:i.name,checked:f,onChange:h,onFocus:g,onBlur:v,disabled:i.disabled,role:"switch",tabIndex:i.tabIndex,"aria-checked":f,className:l("input")},S),s("input")),x=n({className:l("slider")},s("slider"));return b.createElement(b.Fragment,null,b.createElement("div",jg({id:i.id,ref:u},T),b.createElement("input",jg({ref:d},C)),b.createElement("span",x)),m&&b.createElement(dn,jg({target:u,content:i.tooltip,pt:s("tooltip")},i.tooltipOptions)))}));Zs.displayName="InputSwitch";const Rxe=()=>{var T,C,x,w,I;const{formBuilderFormSchema:t,selectFormBuilderLanguage:e,formBuilderSchemaLanguages:n,unselectFormBuilderLanguage:r,schemaBuilderUpdate:i,builderTemplateName:a,formBuilderLoading:s,formBuilderConfigurationType:l,saveFormTemplateNewVersion:c}=on(),[u,d]=k.useState(),f=kj(),h=f==null?void 0:f.form_template_id,g=G3({initialValues:{firstName:"",lastName:"",contact:"",email:""},validate:()=>{const _={};return g.values.application_url="",_},onSubmit:()=>{}}),v=l==null?void 0:l.key,m=(_,O)=>{_!=null&&_.value?e(O):r(O),d(!u)},A=_=>{for(const[,O]of t.layout.entries())for(const[,F]of O.children.entries())for(const[,P]of F.children.entries())for(const[,M]of P.children.entries())for(const[,j]of M.children.entries())j.isFluid=_.value},S=()=>{Bj({message:"Are you sure you want to a new version for this form?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{c(h,t)},reject:()=>{}})};return o.jsx(o.Fragment,{children:o.jsx("form",{onSubmit:g.handleSubmit,className:"p-fluid",children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{height:"15rem"})}):o.jsxs(di,{header:"General",children:[o.jsxs("h5",{children:["Form Title : ",a||""," "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"binary",onChange:_=>{i({showIntroTab:_.value})},checked:t==null?void 0:t.showIntroTab}),o.jsx("label",{htmlFor:"binary",children:"Show Intro Page"})," "]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({enableAutoSave:_.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Task Render Form User Data"})]}),v===d7&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({surveyQuestionSlide:_.value})},checked:t==null?void 0:t.surveyQuestionSlide}),o.jsx("label",{htmlFor:"auto-save",children:"Survey Slide Per Question"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"showConditionalFields",onChange:_=>{i({showConditionalFields:_.value})},checked:t==null?void 0:t.showConditionalFields,disabled:t==null?void 0:t.surveyQuestionSlide}),o.jsxs("label",{htmlFor:"showConditionalFields",children:["Show Conditional Fields ",(t==null?void 0:t.surveyQuestionSlide)===!0&&o.jsx("small",{className:"error",children:"Cant use Survey Slide Per Question with Conditional Fields"})]})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"enableReviewTask",onChange:_=>{i({enableReviewTask:_.value})},checked:t==null?void 0:t.enableReviewTask}),o.jsx("label",{htmlFor:"enableReviewTask",children:"Enable Admin Review Task"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"enableFormFluid",onChange:_=>{i({enableFormFluid:_.value}),A(_)},checked:t==null?void 0:t.enableFormFluid}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Form Fluid"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"enableFieldEnumeration",onChange:_=>{i({enableFieldEnumeration:_.value}),A(_)},checked:t==null?void 0:t.enableFieldEnumeration}),o.jsx("label",{htmlFor:"enableFormFluid",children:"Enable Field Enumeration"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"isOnboardingForm",onChange:_=>{i({isOnboardingForm:_.value}),A(_)},checked:t==null?void 0:t.isOnboardingForm}),o.jsx("label",{htmlFor:"isOnboardingForm",children:"Is Onboarding Form"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"8rem"})}):o.jsxs(di,{className:"mt-3",header:"Auto Save Settings",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({enableAutoSave:_.value})},checked:t==null?void 0:t.enableAutoSave}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save User Data"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"auto-save",onChange:_=>{i({enableAutoSaveBuilderSetting:_.value})},checked:t==null?void 0:t.enableAutoSaveBuilderSetting}),o.jsx("label",{htmlFor:"auto-save",children:"Auto Save Form Builder Settings"})]})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"16rem"})}):o.jsxs(di,{className:"mt-3",header:"Form Table Configuration",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"stripedRows",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,stripedRows:_.value}})},checked:(T=t==null?void 0:t.tableConfiguration)==null?void 0:T.stripedRows}),o.jsx("label",{htmlFor:"stripedRows",children:"Striped Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"gridLines",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,gridLines:_.value}})},checked:(C=t==null?void 0:t.tableConfiguration)==null?void 0:C.gridLines}),o.jsx("label",{htmlFor:"gridLines",children:"Grid Lines"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"flexScroll",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,flexScroll:_.value}})},checked:(x=t==null?void 0:t.tableConfiguration)==null?void 0:x.flexScroll}),o.jsx("label",{htmlFor:"flexScroll",children:"Flex Scroll "})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"isResponsive",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,isResponsive:_.value}})},checked:(w=t==null?void 0:t.tableConfiguration)==null?void 0:w.isResponsive}),o.jsx("label",{htmlFor:"isResponsive",children:"isResponsive Rows"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:"rowReorder",onChange:_=>{i({tableConfiguration:{...t==null?void 0:t.tableConfiguration,rowReorder:_.value}})},checked:(I=t==null?void 0:t.tableConfiguration)==null?void 0:I.rowReorder}),o.jsx("label",{htmlFor:"rowReorder",children:"Row Reorder"})]})]})]}),o.jsxs("div",{className:"col-6",children:[s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{height:"18rem"})}):o.jsx(di,{header:"Languages",children:IQ.map((_,O)=>{const F=n.filter(function(P){return(_==null?void 0:_.key)===(P==null?void 0:P.key)});return o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Zs,{inputId:O,name:"lagnuage",checked:F.length>0,onChange:P=>m(P,_)}),o.jsx("label",{htmlFor:O,children:_.language})]},O)})}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"16rem"})}):o.jsxs(di,{className:"mt-3",header:"Versioning",children:[o.jsx("h5",{children:"Change Form Version Title"}),o.jsx("div",{className:"field",children:o.jsx(wn,{value:(t==null?void 0:t.version_name)||"",minLength:2,placeholder:"Enter form version",maxLength:50,onChange:_=>{var O;i({version_name:(O=_==null?void 0:_.target)==null?void 0:O.value})}})}),o.jsx("h5",{children:"All Forms Version"}),o.jsx(qxe,{}),o.jsx(Vt,{text:!0,size:"small",className:"p-button-info ml-3",onClick:()=>S(),label:"Create New Version",loading:s})]}),s===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{className:"mt-3",height:"8rem"})}):o.jsx(di,{className:"mt-3",header:"Export/Import",children:o.jsxs("span",{className:"flex",children:[o.jsx($xe,{}),o.jsx(Uxe,{})]})})]}),o.jsx("div",{className:"col-6"})]})})})},Xxe=t=>{var v,m,A;const{fieldIndex:e,field:n,models:r,setfieldMappings:i,fieldMappings:a}=t,[s,l]=k.useState(null),[c,u]=k.useState(null),d=()=>{var C;const S=[...a],T=S.findIndex(x=>x.fieldId===(n==null?void 0:n.uuid));if(T!==-1){const x=[...r],w=x.findIndex(I=>{var _;return I.modelName===((_=S[T])==null?void 0:_.modelName)});u((C=S[T])==null?void 0:C.column_name),w!==-1&&l(x[w])}};k.useEffect(()=>(d(),()=>{}),[]);const[f,h]=k.useState(!1),g=S=>{const T=[...a],C=T.findIndex(w=>w.fieldId===S),x={fieldId:S,modelName:(s==null?void 0:s.modelName)||"",class:s==null?void 0:s.class,column_name:c||""};C!==-1?T[C]=x:T.push(x),i([...T])};return o.jsxs("div",{className:"grid",children:[o.jsxs(Gs,{header:`Map ${(v=n==null?void 0:n.label)==null?void 0:v.english} Field with Model`,visible:f,style:{width:"40vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,label:"Set Field","aria-label":"Submit",onClick:()=>{g((n==null?void 0:n.uuid)||""),h(!1)}})}),onHide:()=>h(!1),children:[o.jsxs("p",{children:["Map ",(m=n==null?void 0:n.label)==null?void 0:m.english," Field with Model"]}),o.jsxs("div",{className:"flex justify-content-between",children:[o.jsx(Va,{value:s,onChange:S=>l(S.value),options:r,optionLabel:"modelName",className:"w-full md:w-14rem",placeholder:"Select a model field",filter:!0,showClear:!0}),o.jsx(Va,{value:c,onChange:S=>u(S.value),options:(s==null?void 0:s.columns)||[],className:"w-full md:w-14rem",placeholder:"Select a column",filter:!0,showClear:!0})]})]}),o.jsx("div",{className:"col-6",children:o.jsxs("p",{children:[o.jsxs("strong",{children:[e+1," "]}),"Field ",n==null?void 0:n.componentType,": ",(A=n==null?void 0:n.label)==null?void 0:A.english," Is Mapped to"," ",o.jsx(vu,{className:"mr-2",severity:s!=null&&s.modelName?"success":"warning",value:(s==null?void 0:s.modelName)||"Nothing"}),"with column"," ",o.jsx(vu,{className:"mr-2",severity:c?"success":"danger",value:c||"Nothing"})]})}),o.jsx("div",{className:"col-6",children:o.jsx(Vt,{text:!0,label:"Set Model","aria-label":"Submit",onClick:()=>{h(!0)}})})]},e+"-table-field-item")},Gxe=t=>{const{fields:e}=t,[n]=k.useState([]),[r,i]=k.useState(!1),{formBuilderFormSchema:a,schemaBuilderUpdate:s}=on(),l=()=>{i(!0)},c=()=>{let d=[...(a==null?void 0:a.fieldMappings)||[]];d!=null&&d.length&&(d=d==null?void 0:d.filter(f=>e.some(h=>h.uuid===(f==null?void 0:f.fieldId)))),u(d)};k.useEffect(()=>(l(),c(),()=>{}),[]);const u=d=>{s({fieldMappings:d})};return o.jsx("div",{children:r===!0?o.jsxs(o.Fragment,{children:[o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"}),o.jsx(Aa,{className:"mt-3",height:"5rem"})]}):o.jsx(o.Fragment,{children:(e==null?void 0:e.length)>0&&(n==null?void 0:n.length)>0&&(e==null?void 0:e.map((d,f)=>o.jsx("div",{className:"card",children:o.jsx(Xxe,{fieldMappings:a!=null&&a.fieldMappings?a==null?void 0:a.fieldMappings:[],setfieldMappings:u,field:d,fieldIndex:f,models:n})},f+"-table-field-itemc-component")))})})},Wxe=0,Qxe=t=>{const{setShowPreview:e,activeIndex:n,userFormBuilderSettings:r}=t,{builderIsChangesSaved:i,builderTemplateName:a,formBuilderConfigurationType:s,formBuilderFormSchema:l,formBuilderLoading:c,formBuilderPublishedStatus:u,builderVersionName:d,saveFormProgress:f,schemaBuilderUpdate:h}=on(),g=k.useRef(null),v=()=>{f(l)},m=["Basic","Advanced"],[A,S]=k.useState((r==null?void 0:r.isAdvanceView)!==void 0&&r!=null&&r.isAdvanceView?"Advanced":"Basic"),T=w=>{S(w.value),h({isAdvanceView:w.value==="Advanced"})},C=o.jsx(k.Fragment,{children:o.jsxs("div",{className:"flex",children:[((s==null?void 0:s.key)===C3||(s==null?void 0:s.key)===d7||(s==null?void 0:s.key)===qte)&&o.jsx(Np,{className:"mr-3",value:A,onChange:w=>T(w),options:m,disabled:c}),o.jsx(Vt,{text:!0,icon:"pi pi-eye",size:"small",className:"mr-2",onClick:()=>e(!0),label:"Preview"}),!u&&o.jsx(o.Fragment,{children:(l==null?void 0:l.enableAutoSaveBuilderSetting)===!1&&o.jsx(Vt,{text:!0,disabled:i,size:"small",className:i?"p-button-secondary":"p-button-info",onClick:()=>v(),label:"Save progress",loading:c})})]})}),x=o.jsx(k.Fragment,{children:c===!0?o.jsx(o.Fragment,{children:o.jsx(Aa,{width:"25rem",height:"1.5rem"})}):o.jsxs("div",{className:"font-medium text-900",children:["Builder - ",s==null?void 0:s.name," - ",a," ","- Version : ",d]})});return o.jsxs(o.Fragment,{children:[o.jsx(A3,{ref:g}),o.jsxs("div",{className:"flex",children:[o.jsx("div",{className:"flex w-5 justify-content-left align-items-start",children:x}),o.jsx("div",{className:"flex w-7 justify-content-right align-items-end",children:n===Wxe&&C})]})]})};function Jxe(){const{formBuilderFormLayout:t,formBuilderFormSchema:e,clearBuilderSchema:n,schemaBuilderUpdate:r,saveFormProgress:i,userSelectedLanguage:a,builderIsChangesSaved:s,formBuilderPublishedStatus:l}=on(),c=kj(),u=c==null?void 0:c.form_template_id,[d]=k.useState(!0),[f]=k.useState(null),[h,g]=k.useState(!0),[v,m]=k.useState(!1),[A,S]=k.useState(0),[T,C]=k.useState(null),x=async()=>{},w=k.useCallback(()=>{x()},[t,e]),I=F=>{const P={...e,intro:F};r(P)},_=()=>{i(e)},O=()=>{s===!1?(console.log("formBuilderPublishedStatus",l),l===!1?Bj({message:"You have unsaved changes, would you like to to save them or discard them?",header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:()=>{_(),g(!1),setTimeout(()=>{n()},1e3)},rejectLabel:"Close and discard changes",acceptLabel:"Close and save changes",reject:()=>{g(!1),setTimeout(()=>{n()},1e3)}}):(g(!1),setTimeout(()=>{n()},1e3))):(g(!1),setTimeout(()=>{n()},1e3))};return o.jsx(Gs,{maximizable:!0,header:()=>o.jsx(Qxe,{setUserFormBuilderSettings:C,userFormBuilderSettings:T,formBuilderFormLayout:t,formTemplateId:u,showPreview:v,setShowPreview:m,activeIndex:A,emitSocketData:w}),visible:h,style:{width:"100vw",height:"100vh",maxHeight:"100%"},onHide:()=>O(),children:o.jsxs("div",{id:"form-builder",className:"grid",style:{overflow:"hidden",height:"100%"},children:[!d&&o.jsx(Vt,{text:!0,label:"Request Access",onClick:()=>{},className:"p-button-info"}),f&&o.jsxs("div",{children:[f==null?void 0:f.username," is editing so you have to wait to edits and leaves."]}),o.jsx("div",{className:"flex justify-content-end"}),o.jsx("div",{id:"users-arrow"}),o.jsx("div",{className:"col-12",style:{overflow:"hidden"},children:o.jsxs(as,{activeIndex:A,onTabChange:F=>S(F.index),children:[o.jsxs(Sr,{header:"Builder",children:[o.jsx(xf,{backend:Ef}),o.jsx(No,{style:{width:"75vw"},visible:v,onHide:()=>m(!1),position:"right",children:o.jsx(xf,{backend:Ef,children:o.jsx("div",{className:"scroll-height-200"})})})]}),o.jsx(Sr,{header:"Configuration",children:o.jsx("div",{className:"scroll-height-250",children:o.jsx(Rxe,{})})}),o.jsx(Sr,{header:"Intro",disabled:(e==null?void 0:e.showIntroTab)===!1,children:o.jsx(s4,{style:{height:"320px"},value:(e==null?void 0:e.intro)||"<p></p>",onTextChange:F=>{I(F==null?void 0:F.htmlValue)}})}),o.jsx(Sr,{header:"Data Model Binding",children:o.jsx(Gxe,{fields:e==null?void 0:e.tableFields})}),o.jsxs(Sr,{header:"Weighting",children:[o.jsx("h3",{children:"Weighting"}),(t==null?void 0:t.length)>0&&t.map((F,P)=>{var M,j,N;return o.jsxs("div",{children:[o.jsx("h5",{children:(M=F==null?void 0:F.title)==null?void 0:M[a==null?void 0:a.type]}),((j=F==null?void 0:F.children)==null?void 0:j.length)>0&&((N=F==null?void 0:F.children)==null?void 0:N.map((V,ee)=>o.jsx("div",{children:o.jsx(Dxe,{page:F,section:V})},`weighting-section-${ee}`)))]},`weighting-page-${P}`)}),o.jsx("hr",{}),"Total ",o.jsx(ao,{placeholder:"0",readOnly:!0})," %"]})]})})]})})}const Zxe=()=>o.jsx(Jxe,{}),eTe=t=>{const{className:e=""}=t,{builderIsChangesSaved:n,schemaBuilderUpdate:r,formBuilderFormLayout:i,formBuilderFormSchema:a,formatTableFieldsHook:s,formBuilderLoading:l,saveFormProgress:c}=on(),u=d=>{n===!1?(d.preventDefault(),d.returnValue=!1):window.location.reload()};return k.useEffect(()=>(window.addEventListener("beforeunload",u),()=>{window.removeEventListener("beforeunload",u)}),[n]),k.useEffect(()=>((a==null?void 0:a.enableAutoSaveBuilderSetting)===!0&&l===!1?c(!1):r({isChangesSaved:!1}),s(i),()=>{}),[i]),o.jsx("div",{className:e,children:o.jsx(Q5,{})})},tTe={padding:"1rem 0.5rem",cursor:"move",textAlign:"center"},kd=t=>{const{data:e,showIcon:n,tags:r}=t,[{opacity:i},a]=sa({type:nr,item:e,collect:l=>({opacity:l.isDragging()?0:1})});function s(l,c){return l.length<=c?l:l.slice(0,c)+"..."}return o.jsxs("div",{ref:a,className:`card builder-sidebar-item ${e==null?void 0:e.element}`,style:{...tTe,opacity:i},children:[o.jsx("div",{className:"builder-tooltip-container",children:i&&(e!=null&&e.toolTip)?e==null?void 0:e.toolTip(e):""}),s(e==null?void 0:e.label,80),r&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"mt-2",children:(r==null?void 0:r.length)>0&&(r==null?void 0:r.map((l,c)=>o.jsx(vu,{severity:l==null?void 0:l.severity,className:"mr-2",value:l==null?void 0:l.label},`tagIndex-${c}`)))})})]})};var nTe={root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},rTe=`
|
|
4302
4302
|
@layer primereact {
|
|
4303
4303
|
.p-progress-spinner {
|
|
4304
4304
|
position: relative;
|
|
@@ -58642,7 +58642,7 @@ var yde = function() {
|
|
|
58642
58642
|
theme: i.theme,
|
|
58643
58643
|
formats: i.formats
|
|
58644
58644
|
};
|
|
58645
|
-
yde ? A(new Quill(d.current, M)) : import("./quill-
|
|
58645
|
+
yde ? A(new Quill(d.current, M)) : import("./quill-CvBF-3lp.js").then(function(q) {
|
|
58646
58646
|
if (q && Ee.isExist(d.current)) {
|
|
58647
58647
|
var F;
|
|
58648
58648
|
q.default ? F = new q.default(d.current, M) : F = new q(d.current, M), A(F);
|
|
@@ -131027,7 +131027,7 @@ const _Ie = () => /* @__PURE__ */ c(vIe, {}), DIe = (t) => {
|
|
|
131027
131027
|
return o.length <= l ? o : o.slice(0, l) + "...";
|
|
131028
131028
|
}
|
|
131029
131029
|
return /* @__PURE__ */ E("div", { ref: a, className: `card builder-sidebar-item ${e == null ? void 0 : e.element}`, style: { ...bIe, opacity: i }, children: [
|
|
131030
|
-
i && (e != null && e.toolTip) ? e == null ? void 0 : e.toolTip(e) : "",
|
|
131030
|
+
/* @__PURE__ */ c("div", { className: "builder-tooltip-container", children: i && (e != null && e.toolTip) ? e == null ? void 0 : e.toolTip(e) : "" }),
|
|
131031
131031
|
s(e == null ? void 0 : e.label, 80),
|
|
131032
131032
|
r && /* @__PURE__ */ c(Te, { children: /* @__PURE__ */ c("div", { className: "mt-2", children: (r == null ? void 0 : r.length) > 0 && (r == null ? void 0 : r.map((o, l) => /* @__PURE__ */ c(
|
|
131033
131033
|
au,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Bl = Object.defineProperty;
|
|
2
2
|
var Ml = (n, t, e) => t in n ? Bl(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
3
|
var T = (n, t, e) => Ml(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-
|
|
4
|
+
import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-BQFg1oFj.js";
|
|
5
5
|
function Ki(n) {
|
|
6
6
|
return n;
|
|
7
7
|
}
|
package/dist/styles/likert.css
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/styles/pdf.css
CHANGED
|
File without changes
|
package/dist/styles/style.scss
CHANGED
|
File without changes
|