cft-builder 0.2.312 → 0.2.313

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.
@@ -1,4 +1,4 @@
1
- import { E as s, D as o, F as a, G as d, R as i, T as u, C as m, A as B, z as k, B as l } from "./main-Bm6KEtyk.js";
1
+ import { E as s, D as o, F as a, G as d, R as i, T as u, C as m, A as B, z as k, B as l } from "./main-C6vCpGOY.js";
2
2
  export {
3
3
  s as BuilderItems,
4
4
  o as BuilderItemsRender,
@@ -4164,7 +4164,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4164
4164
  justify-content: center;
4165
4165
 
4166
4166
  margin-top: 20px;
4167
- `,j6e=t=>{const{onSetValue:e,row:n,items:r,setItems:i,isLoading:a,setIsLoading:s}=t,{processPending:l}=mh();k.useEffect(()=>{const d=Gt.addListener("clearRepeatableFields",f=>{f===(n==null?void 0:n.uuid)&&i([])});return()=>{d.remove()}});const c=d=>{const f=[...r,...d.items];i(f)};y5e(d=>c(d));const u=async()=>{s(!0),l()};return o.jsxs($6e,{children:[r.map(d=>o.jsx(U6e,{item:d,onSetValue:e,setIsLoading:s},d.id)),r.length?o.jsx(Ft,{text:!0,label:"Upload",className:"p-button-info",onClick:u,disabled:a,loading:a}):null]})},z6e=(t,e)=>{var q,ee,oe,he,De,Ne,ve;const{field:n,fieldIndex:r,row:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c,isDisabled:u}=t,{isAdmin:d,isBuilderMode:f,fileUploadParams:h}=Ht(),{userSelectedLanguage:g,fieldSettingUpdate:v}=sn(),{taskRegisterData:m,userTaskSubmitFormData:A,task_status:w,TASK_PUBLISHED:C,updateUserFormDataSubmit:S,updateTaskRegisterData:T,updateTaskProgressValue:x}=Ar(),[E,_]=k.useState(!1),[M,O]=k.useState([]),[F,P]=k.useState(!1),[H,N]=k.useState(0),[z,U]=k.useState([]),[ce,X]=k.useState(!1),[R,ue]=k.useState(!1),Y=()=>{ue(!0)},ie=()=>{ue(!1)};console.log("fileUploadParams",h);const re=Se=>{const Be=[...M];if((A==null?void 0:A.length)>0){const Te=[...A],$=_t.cloneDeep(m);Be.push(Se);for(const pe of Te)pe.fieldId===t.field.uuid&&(pe.postData=Be);if((Be==null?void 0:Be.length)>0?($[n==null?void 0:n.uuid]=Be,n.isValid=1):(delete $[n==null?void 0:n.uuid],n.isValid=0),!(i!=null&&i.rowIsRepeatable)){T($);const pe=Object.keys($).length;x(pe)}}O([...Be])},Z=()=>{var Se;if(!(i!=null&&i.rowIsRepeatable)){const Be=A;if((Be==null?void 0:Be.length)>0){for(const Te of Be)if(Te.fieldId===n.uuid&&((Se=Te==null?void 0:Te.postData)!=null&&Se.length)){O(Te==null?void 0:Te.postData),P(!0);break}}}};k.useEffect(()=>{F||Z();const Se=Gt.addListener("clearRepeatableFields",$=>{$===(i==null?void 0:i.uuid)&&(O([]),N(0),n.isValid=0,v(a,s,l,c,r,n))}),Be=Gt.addListener("onSubmitUserForm",$=>{var pe;(pe=n==null?void 0:n.attributes)!=null&&pe.required?(M==null?void 0:M.length)>0?n.isValid=1:n.isValid=0:n.isValid=1}),Te=Gt.addListener("OnInvalidFieldCatch",$=>{n.uuid===($==null?void 0:$.fieldId)?N(1):N(0)});return()=>{Be.remove(),Te.remove(),Se.remove()}});const K=Se=>{_(Se)},W=()=>{_(!1)},ge=OV(k.forwardRef((Se,Be)=>o.jsx(Ft,{text:!0,...Se,ref:Be,disabled:f||ce||u,children:"Select files"}))),ye=Se=>{var Be;if(!(i!=null&&i.rowIsRepeatable)){const Te=_t.cloneDeep(m);delete Te[n==null?void 0:n.uuid],T(Te);const $=Object.keys(Te).length;x($);const pe=A;if(pe!=null&&pe.length){for(const me of pe)if(me.fieldId===t.field.uuid&&((Be=me==null?void 0:me.postData)!=null&&Be.length)){let ae=me==null?void 0:me.postData;ae=ae.filter((be,Ie)=>Ie!==Se),me.postData=ae,(ae==null?void 0:ae.length)>0?n.isValid=1:n.isValid=0;const le=z.filter((be,Ie)=>Ie!==Se);U(le),O(ae),P(!0);break}}else{const me=M.filter((le,be)=>be!==Se),ae=z.filter((le,be)=>be!==Se);U(ae),O(me)}}},Ee=Se=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>ye(Se==null?void 0:Se.rowIndex),icon:"pi pi-trash",size:"small"})}),Ae=Se=>{var Te;const Be=[...M,{fileName:"image",fileSize:"20",fileType:"Mem"}];if((A==null?void 0:A.length)>0){const $=[...A],pe=_t.findIndex($,function(le){return le.rowId===(i==null?void 0:i.uuid)});let me=(Te=A[pe])==null?void 0:Te.repeatableFields,ae="<ol class='card '>";Be==null||Be.map(le=>{const be=le;ae=ae+`<li>${be==null?void 0:be.fileName}</li>`}),ae=ae+"</ol>",me={...me,[n==null?void 0:n.uuid]:ae},$[pe]={...$[pe],repeatableFields:me},S($)}(Be==null?void 0:Be.length)>0?(O(Be),n.isValid=1):n.isValid=0},fe=Se=>{i!=null&&i.rowIsRepeatable?Ae():re(Se),O([...M,Se])},ne=o.jsxs("div",{onMouseOver:Y,onMouseOut:ie,children:[f&&R&&o.jsx(Wr,{handleFieldSettingsSidebar:K,...t}),o.jsx("div",{className:`field ${f&&" py-3 px-4 builder-element-wrapper "}${(n==null?void 0:n.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:f?"col-12 field-form-builder":"col-12",children:[(n==null?void 0:n.showHeaderText)&&o.jsx("h6",{children:(q=n==null?void 0:n.headerText)==null?void 0:q[g==null?void 0:g.type]}),(n==null?void 0:n.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ee=n==null?void 0:n.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(oe=n==null?void 0:n.label)==null?void 0:oe[g==null?void 0:g.type]}),o.jsx("span",{className:"ml-3",children:(n==null?void 0:n.showToolTip)&&o.jsx(zi,{message:(he=n==null?void 0:n.toolTip)==null?void 0:he[g==null?void 0:g.type],position:"right"})})]}),o.jsx("div",{children:(n==null?void 0:n.showHelperText)&&o.jsx("small",{children:(De=n==null?void 0:n.helperText)==null?void 0:De[g==null?void 0:g.type]})}),o.jsxs("div",{className:"mt-3",children:[w!==C&&!d&&o.jsx(o.Fragment,{children:o.jsxs(r9e,{debug:!1,retries:10,chunkSize:35e3,multiple:!1,autoUpload:!1,destination:h,children:[o.jsx(ge,{}),o.jsx(j6e,{items:z,setItems:U,isLoading:ce,setIsLoading:X,row:i,inputValue:M,onSetValue:fe})]})}),((Ne=n==null?void 0:n.attributes)==null?void 0:Ne.required)&&o.jsx("small",{className:"error",children:H===1&&(M==null?void 0:M.length)===0?(ve=n==null?void 0:n.validationMesssage)==null?void 0:ve[g==null?void 0:g.type]:""}),o.jsx("div",{className:"mt-3",children:o.jsxs(ro,{value:M,emptyMessage:"No Files have been uploaded",children:[o.jsx(xr,{field:"fileName",header:"Filename"}),o.jsx(xr,{field:"fileSize",header:"Size"}),o.jsx(xr,{field:"fileType",header:"type"}),w!==C&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"center",overflow:"visible"},body:Se=>Ee(Se)})]})})]})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Qi,{visibilty:E,closeSettingFieldSidebar:W,...t}),o.jsx(xi,{...t,fieldWrap:ne})]})},H6e=t=>{const{isBuilderMode:e}=Ht(),{field:n}=t,[r,i]=k.useState(!1),a=()=>{i(!0)},s=()=>{i(!1)},[l,c]=k.useState(!1),u=f=>{c(f)},d=()=>{c(!1)};return o.jsxs("div",{onMouseOver:a,onMouseOut:s,children:[e&&l===!0&&o.jsx(sB,{visibilty:l,closeSettingFieldSidebar:d,...t}),o.jsxs("div",{dir:"ltr",className:e?"field-form-builder":"",children:[e&&r&&o.jsx(Wr,{handleFieldSettingsSidebar:u,...t}),o.jsx("div",{className:`field-${(n==null?void 0:n.isFluid)===!0?" p-fluid":" "}`,children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:e?"col-12 p-fluid":"col-12 ",children:[o.jsx("label",{className:"flex font-bold mb-3 text-gray-900 text-xl",children:"Document"}),o.jsx("ol",{children:n==null?void 0:n.documents.map(f=>o.jsx("li",{children:f==null?void 0:f.url},f==null?void 0:f.uuid))})]})})})]})]})};function vw(){return vw=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},vw.apply(null,arguments)}var Oq=b.memo(b.forwardRef(function(t,e){var n=ri.getPTI(t);return b.createElement("svg",vw({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),b.createElement("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"}),b.createElement("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"}),b.createElement("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"}))}));Oq.displayName="ExclamationTriangleIcon";function bw(){return bw=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},bw.apply(null,arguments)}var Fq=b.memo(b.forwardRef(function(t,e){var n=ri.getPTI(t);return b.createElement("svg",bw({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),b.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"}))}));Fq.displayName="InfoCircleIcon";function yw(){return yw=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},yw.apply(null,arguments)}function Aw(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 Y6e(t){if(Array.isArray(t))return Aw(t)}function K6e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function kq(t,e){if(t){if(typeof t=="string")return Aw(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)?Aw(t,e):void 0}}function X6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4167
+ `,j6e=t=>{const{onSetValue:e,row:n,items:r,setItems:i,isLoading:a,setIsLoading:s}=t,{processPending:l}=mh();k.useEffect(()=>{const d=Gt.addListener("clearRepeatableFields",f=>{f===(n==null?void 0:n.uuid)&&i([])});return()=>{d.remove()}});const c=d=>{const f=[...r,...d.items];i(f)};y5e(d=>c(d));const u=async()=>{s(!0),l()};return o.jsxs($6e,{children:[r.map(d=>o.jsx(U6e,{item:d,onSetValue:e,setIsLoading:s},d.id)),r.length?o.jsx(Ft,{type:"button",label:"Upload",className:"p-button-info",onClick:u,disabled:a,loading:a}):null]})},z6e=(t,e)=>{var q,ee,oe,he,De,Ne,ve;const{field:n,fieldIndex:r,row:i,pageIndex:a,sectionIndex:s,rowIndex:l,columnIndex:c,isDisabled:u}=t,{isAdmin:d,isBuilderMode:f,fileUploadParams:h}=Ht(),{userSelectedLanguage:g,fieldSettingUpdate:v}=sn(),{taskRegisterData:m,userTaskSubmitFormData:A,task_status:w,TASK_PUBLISHED:C,updateUserFormDataSubmit:S,updateTaskRegisterData:T,updateTaskProgressValue:x}=Ar(),[E,_]=k.useState(!1),[M,O]=k.useState([]),[F,P]=k.useState(!1),[H,N]=k.useState(0),[z,U]=k.useState([]),[ce,X]=k.useState(!1),[R,ue]=k.useState(!1),Y=()=>{ue(!0)},ie=()=>{ue(!1)};console.log("fileUploadParams",h);const re=Se=>{const Be=[...M];if((A==null?void 0:A.length)>0){const Te=[...A],$=_t.cloneDeep(m);Be.push(Se);for(const pe of Te)pe.fieldId===t.field.uuid&&(pe.postData=Be);if((Be==null?void 0:Be.length)>0?($[n==null?void 0:n.uuid]=Be,n.isValid=1):(delete $[n==null?void 0:n.uuid],n.isValid=0),!(i!=null&&i.rowIsRepeatable)){T($);const pe=Object.keys($).length;x(pe)}}O([...Be])},Z=()=>{var Se;if(!(i!=null&&i.rowIsRepeatable)){const Be=A;if((Be==null?void 0:Be.length)>0){for(const Te of Be)if(Te.fieldId===n.uuid&&((Se=Te==null?void 0:Te.postData)!=null&&Se.length)){O(Te==null?void 0:Te.postData),P(!0);break}}}};k.useEffect(()=>{F||Z();const Se=Gt.addListener("clearRepeatableFields",$=>{$===(i==null?void 0:i.uuid)&&(O([]),N(0),n.isValid=0,v(a,s,l,c,r,n))}),Be=Gt.addListener("onSubmitUserForm",$=>{var pe;(pe=n==null?void 0:n.attributes)!=null&&pe.required?(M==null?void 0:M.length)>0?n.isValid=1:n.isValid=0:n.isValid=1}),Te=Gt.addListener("OnInvalidFieldCatch",$=>{n.uuid===($==null?void 0:$.fieldId)?N(1):N(0)});return()=>{Be.remove(),Te.remove(),Se.remove()}});const K=Se=>{_(Se)},W=()=>{_(!1)},ge=OV(k.forwardRef((Se,Be)=>o.jsx(Ft,{size:"small",type:"button",...Se,ref:Be,disabled:f||ce||u,children:"Select files"}))),ye=Se=>{var Be;if(!(i!=null&&i.rowIsRepeatable)){const Te=_t.cloneDeep(m);delete Te[n==null?void 0:n.uuid],T(Te);const $=Object.keys(Te).length;x($);const pe=A;if(pe!=null&&pe.length){for(const me of pe)if(me.fieldId===t.field.uuid&&((Be=me==null?void 0:me.postData)!=null&&Be.length)){let ae=me==null?void 0:me.postData;ae=ae.filter((be,Ie)=>Ie!==Se),me.postData=ae,(ae==null?void 0:ae.length)>0?n.isValid=1:n.isValid=0;const le=z.filter((be,Ie)=>Ie!==Se);U(le),O(ae),P(!0);break}}else{const me=M.filter((le,be)=>be!==Se),ae=z.filter((le,be)=>be!==Se);U(ae),O(me)}}},Ee=Se=>o.jsx(o.Fragment,{children:o.jsx(Ft,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>ye(Se==null?void 0:Se.rowIndex),icon:"pi pi-trash",size:"small"})}),Ae=Se=>{var Te;const Be=[...M,{fileName:"image",fileSize:"20",fileType:"Mem"}];if((A==null?void 0:A.length)>0){const $=[...A],pe=_t.findIndex($,function(le){return le.rowId===(i==null?void 0:i.uuid)});let me=(Te=A[pe])==null?void 0:Te.repeatableFields,ae="<ol class='card '>";Be==null||Be.map(le=>{const be=le;ae=ae+`<li>${be==null?void 0:be.fileName}</li>`}),ae=ae+"</ol>",me={...me,[n==null?void 0:n.uuid]:ae},$[pe]={...$[pe],repeatableFields:me},S($)}(Be==null?void 0:Be.length)>0?(O(Be),n.isValid=1):n.isValid=0},fe=Se=>{i!=null&&i.rowIsRepeatable?Ae():re(Se),O([...M,Se])},ne=o.jsxs("div",{onMouseOver:Y,onMouseOut:ie,children:[f&&R&&o.jsx(Wr,{handleFieldSettingsSidebar:K,...t}),o.jsx("div",{className:`field ${f&&" py-3 px-4 builder-element-wrapper "}${(n==null?void 0:n.isFluid)===!0&&" p-fluid"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:f?"col-12 field-form-builder":"col-12",children:[(n==null?void 0:n.showHeaderText)&&o.jsx("h6",{children:(q=n==null?void 0:n.headerText)==null?void 0:q[g==null?void 0:g.type]}),(n==null?void 0:n.showLabel)&&o.jsxs("label",{htmlFor:r,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(ca,{...t}),((ee=n==null?void 0:n.attributes)==null?void 0:ee.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(aa,{...t}):o.jsx(o.Fragment,{children:(oe=n==null?void 0:n.label)==null?void 0:oe[g==null?void 0:g.type]}),o.jsx("span",{className:"ml-3",children:(n==null?void 0:n.showToolTip)&&o.jsx(zi,{message:(he=n==null?void 0:n.toolTip)==null?void 0:he[g==null?void 0:g.type],position:"right"})})]}),o.jsx("div",{children:(n==null?void 0:n.showHelperText)&&o.jsx("small",{children:(De=n==null?void 0:n.helperText)==null?void 0:De[g==null?void 0:g.type]})}),o.jsxs("div",{className:"mt-3",children:[w!==C&&!d&&o.jsx(o.Fragment,{children:o.jsxs(r9e,{debug:!1,retries:10,chunkSize:35e3,multiple:!1,autoUpload:!1,destination:h,children:[o.jsx(ge,{}),o.jsx(j6e,{items:z,setItems:U,isLoading:ce,setIsLoading:X,row:i,inputValue:M,onSetValue:fe})]})}),((Ne=n==null?void 0:n.attributes)==null?void 0:Ne.required)&&o.jsx("small",{className:"error",children:H===1&&(M==null?void 0:M.length)===0?(ve=n==null?void 0:n.validationMesssage)==null?void 0:ve[g==null?void 0:g.type]:""}),o.jsx("div",{className:"mt-3",children:o.jsxs(ro,{value:M,emptyMessage:"No Files have been uploaded",children:[o.jsx(xr,{field:"fileName",header:"Filename"}),o.jsx(xr,{field:"fileSize",header:"Size"}),o.jsx(xr,{field:"fileType",header:"type"}),w!==C&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"center",overflow:"visible"},body:Se=>Ee(Se)})]})})]})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(ki,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[E===!0&&o.jsx(Qi,{visibilty:E,closeSettingFieldSidebar:W,...t}),o.jsx(xi,{...t,fieldWrap:ne})]})},H6e=t=>{const{isBuilderMode:e}=Ht(),{field:n}=t,[r,i]=k.useState(!1),a=()=>{i(!0)},s=()=>{i(!1)},[l,c]=k.useState(!1),u=f=>{c(f)},d=()=>{c(!1)};return o.jsxs("div",{onMouseOver:a,onMouseOut:s,children:[e&&l===!0&&o.jsx(sB,{visibilty:l,closeSettingFieldSidebar:d,...t}),o.jsxs("div",{dir:"ltr",className:e?"field-form-builder":"",children:[e&&r&&o.jsx(Wr,{handleFieldSettingsSidebar:u,...t}),o.jsx("div",{className:`field-${(n==null?void 0:n.isFluid)===!0?" p-fluid":" "}`,children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:e?"col-12 p-fluid":"col-12 ",children:[o.jsx("label",{className:"flex font-bold mb-3 text-gray-900 text-xl",children:"Document"}),o.jsx("ol",{children:n==null?void 0:n.documents.map(f=>o.jsx("li",{children:f==null?void 0:f.url},f==null?void 0:f.uuid))})]})})})]})]})};function vw(){return vw=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},vw.apply(null,arguments)}var Oq=b.memo(b.forwardRef(function(t,e){var n=ri.getPTI(t);return b.createElement("svg",vw({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),b.createElement("path",{d:"M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z",fill:"currentColor"}),b.createElement("path",{d:"M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z",fill:"currentColor"}),b.createElement("path",{d:"M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z",fill:"currentColor"}))}));Oq.displayName="ExclamationTriangleIcon";function bw(){return bw=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},bw.apply(null,arguments)}var Fq=b.memo(b.forwardRef(function(t,e){var n=ri.getPTI(t);return b.createElement("svg",bw({ref:e,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n),b.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z",fill:"currentColor"}))}));Fq.displayName="InfoCircleIcon";function yw(){return yw=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},yw.apply(null,arguments)}function Aw(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 Y6e(t){if(Array.isArray(t))return Aw(t)}function K6e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function kq(t,e){if(t){if(typeof t=="string")return Aw(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)?Aw(t,e):void 0}}function X6e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4168
4168
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ww(t){return Y6e(t)||K6e(t)||kq(t)||X6e()}function R6e(t){if(Array.isArray(t))return t}function G6e(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){if(Object(n)!==n)return;c=!1}else 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 W6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4169
4169
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sw(t,e){return R6e(t)||G6e(t,e)||kq(t,e)||W6e()}function pg(t){"@babel/helpers - typeof";return pg=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},pg(t)}function Q6e(t,e){if(pg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(pg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function J6e(t){var e=Q6e(t,"string");return pg(e)=="symbol"?e:e+""}function Pq(t,e,n){return(e=J6e(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Z6e=`
4170
4170
  @layer primereact {
@@ -60053,7 +60053,7 @@ var m0e = function() {
60053
60053
  theme: i.theme,
60054
60054
  formats: i.formats
60055
60055
  };
60056
- m0e ? w(new Quill(d.current, P)) : import("./quill-DNtDfqd0.js").then(function(z) {
60056
+ m0e ? w(new Quill(d.current, P)) : import("./quill-3zhI8m0e.js").then(function(z) {
60057
60057
  if (z && Se.isExist(d.current)) {
60058
60058
  var F;
60059
60059
  z.default ? F = new z.default(d.current, P) : F = new z(d.current, P), w(F);
@@ -109814,7 +109814,7 @@ const G8e = q2(NB)`
109814
109814
  r.length ? /* @__PURE__ */ c(
109815
109815
  Ft,
109816
109816
  {
109817
- text: !0,
109817
+ type: "button",
109818
109818
  label: "Upload",
109819
109819
  className: "p-button-info",
109820
109820
  onClick: u,
@@ -109910,7 +109910,7 @@ const G8e = q2(NB)`
109910
109910
  }, J = () => {
109911
109911
  D(!1);
109912
109912
  }, pe = sB(
109913
- X1((xe, Le) => /* @__PURE__ */ c(Ft, { text: !0, ...xe, ref: Le, disabled: f || le || u, children: "Select files" }))
109913
+ X1((xe, Le) => /* @__PURE__ */ c(Ft, { size: "small", type: "button", ...xe, ref: Le, disabled: f || le || u, children: "Select files" }))
109914
109914
  ), be = (xe) => {
109915
109915
  var Le;
109916
109916
  if (!(i != null && i.rowIsRepeatable)) {
@@ -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-Bm6KEtyk.js";
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-C6vCpGOY.js";
5
5
  function Ki(n) {
6
6
  return n;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cft-builder",
3
- "version": "0.2.312",
3
+ "version": "0.2.313",
4
4
  "type": "module",
5
5
  "types": "dist/types/index",
6
6
  "files": [