@qratilabs/qrati-connect 2.3.2 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +2 -2
- package/element/{AuthLayout-BQsxj8DA.js → AuthLayout-Cb29YL2A.js} +1 -1
- package/element/{ContentsPage-BswZWICC.js → ContentsPage-Dy9C3p31.js} +3 -3
- package/element/{CuratePage-l_53kq1u.js → CuratePage-BUmxwjzW.js} +1 -1
- package/element/{Dialog-xRPAHU1U.js → Dialog-Dv2w7GiN.js} +1 -1
- package/element/{DotLottiePlayer-DWbmlHl0.js → DotLottiePlayer-BM_SpbNm.js} +1 -1
- package/element/{EventHeaderAdminButtons-DpqqYPmp.js → EventHeaderAdminButtons-BjztFxCi.js} +1 -1
- package/element/{FolderBreadcrumb-DgOZR2JO.js → FolderBreadcrumb-D_vuN164.js} +1 -1
- package/element/{ForgotPasswordPage-CIz3_X-3.js → ForgotPasswordPage-CLTfCRSc.js} +1 -1
- package/element/{InputField-DybXE_Ab.js → InputField-Dpa6h5y6.js} +1 -1
- package/element/{LazyLoadImage-8X8b06AJ.js → LazyLoadImage-btDC6I6Y.js} +1 -1
- package/element/{LeaderboardPage-Bphjksy_.js → LeaderboardPage-C35B-9Gu.js} +1 -1
- package/element/LoginPage-r5G2G0oG.js +1 -0
- package/element/{NCMVHL6D-CBCgRwdZ.js → NCMVHL6D-2v69SxO0.js} +1 -1
- package/element/{PublicEvents-RN-_fsl2.js → PublicEvents-CKFcMhSD.js} +1 -1
- package/element/RegisterPage-DiL8319w.js +1 -0
- package/element/{SocialLoginButton-DpBl7dWg.js → SocialLoginButton-Cm1XFx8_.js} +1 -1
- package/element/{UploadPage-B7BieTEU.js → UploadPage-9jnk9Zmk.js} +1 -1
- package/element/{VideoPlayer-Bk8Hao3q.js → VideoPlayer-D9AI4cZc.js} +1 -1
- package/element/element.es.js +1 -1
- package/element/{heic2any-DLQd-wQs.js → heic2any-DQvpqzo3.js} +1 -1
- package/element/{index-DI8B7D73.js → index-BHVViZaJ.js} +1 -1
- package/element/{index-JyoNGo8S.js → index-BKOpkw1h.js} +9 -9
- package/element/{index.esm-CAQX5kI5.js → index.esm-Hfm1g5lN.js} +1 -1
- package/element/{photoswipe-Coj-X7bR.js → photoswipe-C58kAXHU.js} +1 -1
- package/element/styles.css +1 -1
- package/element/{tslib.es6-C9bR68b3.js → tslib.es6-khl_spk_.js} +1 -1
- package/element/{useOrgAccess-CnN4aiYB.js → useOrgAccess-D2Xgijq3.js} +1 -1
- package/element/web.es.js +1 -1
- package/package.json +12 -11
- package/react/{IbMHxVCj.js → 7c7bXPlP.js} +1 -1
- package/react/B0dDfEtH.js +1 -0
- package/react/{CZp0lmKh.js → B1r-QO-6.js} +1 -1
- package/react/{Y9TU3Znq.js → BDG18AiE.js} +1 -1
- package/react/{DBnzOELO.js → BE5TseI4.js} +3 -3
- package/react/{CXu6PHUW.js → BUZRB64M.js} +1 -1
- package/react/{Ply2G2qz.js → BUkcR85F.js} +1 -1
- package/react/{Pcjql-py.js → Bdifa0jH.js} +1 -1
- package/react/{BO8jvMXn.js → Brhsb0-T.js} +1 -1
- package/react/{B1neVlFZ.js → C5-YA8nT.js} +1 -1
- package/react/{Gbk2zO2l.js → C92qhyHF.js} +1 -1
- package/react/{D6nR1wv_.js → CJ6agILN.js} +1 -1
- package/react/{fuEo08KS.js → Ck1QkDXW.js} +1 -1
- package/react/{Dwry3hNI.js → CyVAYliQ.js} +1 -1
- package/react/{rZy1FKOQ.js → D7D-fe1-.js} +1 -1
- package/react/{CfZ5_7x-.js → DGkkW9h-.js} +1 -1
- package/react/{DyklTvwE.js → DT_P8FaG.js} +1 -1
- package/react/{jRrpvD0D.js → DW2r0IAI.js} +1 -1
- package/react/DzJMp-c4.js +1 -0
- package/react/{DrqnWQLs.js → IujfE24r.js} +1 -1
- package/react/{D_imcCpv.js → Lyg2aTtz.js} +3 -3
- package/react/{DvDETl8u.js → Z6p4C64a.js} +1 -1
- package/react/{DvOl03h5.js → gTevyE5I.js} +1 -1
- package/react/index.es.js +1 -2
- package/react/styles.css +1 -0
- package/umd/web.umd.js +107 -107
- package/element/LoginPage-CHzBIQEq.js +0 -1
- package/element/RegisterPage-7WLryyTX.js +0 -1
- package/react/BbIY3X7C.js +0 -1
- package/react/CN2vdtYT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,T as r,P as t,a,D as o,Q as s}from"./
|
|
1
|
+
import{c as e,T as r,P as t,a,D as o,Q as s}from"./Bdifa0jH.js";import{a5 as l,a6 as n,a7 as c}from"./BE5TseI4.js";var u=u=>{const[i,d]=e({prefix:"TanstackQueryDevtools"}),m=l(),v=n(()=>{const e=i.theme_preference||r;return"system"!==e?e:m()});return c(s.Provider,{value:u,get children(){return c(t,{localStore:i,setLocalStore:d,get children(){return c(a.Provider,{value:v,get children(){return c(o,{localStore:i,setLocalStore:d})}})}})}})};export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as e,j as s,I as r,g as a,T as o}from"./
|
|
1
|
+
import{P as e,j as s,I as r,g as a,T as o}from"./BE5TseI4.js";const l=(s,r)=>{const a=new Map;s?.forEach(e=>{a.set(e._id,e)});const o=[];let l=a.get(r);for(;l;)o.unshift({_id:l._id,name:l.name,href:e.FOLDER_EVENTS(l?._id),color:l.color}),l=a.get(l.parentFolderId);return o},c=({folder:e})=>s.jsxs("li",{className:"qc:flex qc:items-center",children:[s.jsx(r,{name:"material-symbols:arrow-forward-ios-rounded",size:"sm"}),s.jsxs(a,{to:e.href,className:"qc:flex qc:items-center qc:gap-2 qc:rounded qc:px-4 qc:py-1 qc:transition-colors qc:hover:bg-primary/10",children:[s.jsx(r,{name:"material-symbols:folder",size:"lg",style:{color:e.color}}),s.jsx(o,{variant:"h5",color:"secondary",className:"qc:whitespace-nowrap",children:e.name})]})]},e.name),n=({homeLink:e,data:o})=>s.jsxs("ol",{role:"list",className:"scrollbar-hide qc:flex qc:max-w-full qc:items-center qc:space-x-3 qc:overflow-y-scroll",children:[s.jsx("li",{children:s.jsxs(a,{to:e,className:"qc:text-foreground",children:[s.jsx(r,{name:"material-symbols:home-outline-rounded",size:"lg"}),s.jsx("span",{className:"qc:sr-only",children:"Home"})]})}),o?.map(e=>s.jsx(c,{folder:e},e._id))]});export{n as F,l as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,u as r,T as o,J as n,k as a,i as t,a4 as s,P as l}from"./
|
|
1
|
+
import{j as e,u as r,T as o,J as n,k as a,i as t,a4 as s,P as l}from"./BE5TseI4.js";import c,{useState as i}from"react";import{I as d}from"./B1r-QO-6.js";import{u,o as m,c as f,C as p,a as h,b as g}from"./-74yB4f5.js";const v=({count:r=1,currentStep:o=0,disabled:n,onStepClick:a})=>{const t=n||!a;return e.jsx("ol",{role:"list",className:"qc:flex qc:items-center qc:space-x-4 qc:pl-1.5",children:Array.from({length:r}).map((r,n)=>e.jsx("li",{children:n<o?e.jsx("button",{className:"qc:bg-primary qc:block qc:size-3 qc:rounded-full",disabled:t,onClick:()=>a&&a(n)}):n===o?e.jsxs("button",{className:"qc:relative qc:flex qc:items-center qc:justify-center","aria-current":"step",disabled:t,onClick:()=>a&&a(n),children:[e.jsx("span",{className:"qc:absolute qc:flex qc:size-6 qc:p-px","aria-hidden":"true",children:e.jsx("span",{className:"qc:bg-primary qc:size-full qc:rounded-full qc:bg-opacity-40"})}),e.jsx("span",{className:"qc:bg-primary qc:relative qc:block qc:size-3 qc:rounded-full","aria-hidden":"true"})]}):e.jsx("button",{className:"qc:block qc:size-3 qc:rounded-full qc:bg-text-secondary-light",disabled:t,onClick:()=>a&&a(n)})},`progress-dot-${n}`))})},q={email:""},w=f().shape({email:h().required("Please enter your email").email("Enter a valid email")}),x=({onCodeSent:s})=>{const[l,c]=i(!1),[f,h]=i(null),{props:{organizationId:g}}=r(),{control:v,handleSubmit:x,formState:{errors:y}}=u({mode:"onSubmit",defaultValues:q,resolver:m(w)});return e.jsxs("div",{className:"w-full space-y-6",children:[e.jsx(o,{variant:"h5",align:"center",children:"Reset password"}),e.jsxs("form",{noValidate:!0,autoComplete:"off",className:"qc:w-full qc:space-y-4 qc:lg:space-y-8",onSubmit:x(async e=>{h(null),c(!0);try{await a.post(t.SEND_PASSWORD_RESET_CODE,{json:{email:e.email?.toLowerCase()},headers:{"x-org-id":g}}),s(e.email.toLowerCase())}catch(e){console.error("Error sending verification code:",e),h(e.message||e||"An error occurred while sending the code. Please try again.")}c(!1)}),children:[e.jsx(p,{name:"email",control:v,render:({field:{value:r,onChange:o,onBlur:n}})=>e.jsx(d,{label:"Email",disabled:l,type:"email",value:r,onChange:o,onBlur:n,error:y.email?.message})}),e.jsx(n,{fullWidth:!0,type:"submit",loading:l,children:"Send verification code"})]}),f&&e.jsx(o,{variant:"h3",align:"center",color:"color",children:f})]})};var y=function(e){return"object"==typeof e&&null!==e},b=function(e){var r=e.value,o=void 0===r?"":r,n=e.numInputs,a=void 0===n?4:n,t=e.onChange,s=e.onPaste,l=e.renderInput,i=e.shouldAutoFocus,d=void 0!==i&&i,u=e.inputType,m=void 0===u?"text":u,f=e.renderSeparator,p=e.placeholder,h=e.containerStyle,g=e.inputStyle,v=e.skipDefaultStyles,q=void 0!==v&&v,w=c.useState(0),x=w[0],b=w[1],j=c.useRef([]),S=function(){return o?o.toString().split(""):[]},C="number"===m||"tel"===m;c.useEffect(function(){j.current=j.current.slice(0,a)},[a]),c.useEffect(function(){var e;d&&(null===(e=j.current[0])||void 0===e||e.focus())},[d]);var P=function(){if("string"==typeof p){if(p.length===a)return p;p.length>0&&console.error("Length of the placeholder should be equal to the number of inputs.")}},N=function(e){return(C?!isNaN(Number(e)):"string"==typeof e)&&1===e.trim().length},D=function(e){var r=e.target.value;N(r)&&(R(r),I(x+1))},E=function(e){var r=e.nativeEvent,o=e.target.value;if(!N(o)){if(o.length===a)o.split("").some(function(e){return!N(e)})||(O(o.split("")),I(a-1));null===r.data&&"deleteContentBackward"===r.inputType&&(e.preventDefault(),R(""),I(x-1)),e.target.value=""}},k=function(){b(x-1)},A=function(e){var r=S();[e.code,e.key].includes("Backspace")?(e.preventDefault(),R(""),I(x-1)):"Delete"===e.code?(e.preventDefault(),R("")):"ArrowLeft"===e.code?(e.preventDefault(),I(x-1)):"ArrowRight"===e.code||e.key===r[x]?(e.preventDefault(),I(x+1)):("Spacebar"===e.code||"Space"===e.code||"ArrowUp"===e.code||"ArrowDown"===e.code)&&e.preventDefault()},I=function(e){var r,o,n=Math.max(Math.min(a-1,e),0);j.current[n]&&(null===(r=j.current[n])||void 0===r||r.focus(),null===(o=j.current[n])||void 0===o||o.select(),b(n))},R=function(e){var r=S();r[x]=e[0],O(r)},O=function(e){var r=e.join("");t(r)},B=function(e){var r;e.preventDefault();var o=S(),n=x,t=e.clipboardData.getData("text/plain").slice(0,a-x).split("");if(!C||!t.some(function(e){return isNaN(Number(e))})){for(var s=0;s<a;++s)s>=x&&t.length>0&&(o[s]=null!==(r=t.shift())&&void 0!==r?r:"",n++);I(n),O(o)}};return c.createElement("div",{style:Object.assign({display:"flex",alignItems:"center"},y(h)&&h),className:"string"==typeof h?h:void 0,onPaste:s},Array.from({length:a},function(e,r){return r}).map(function(e){var r,o,n;return c.createElement(c.Fragment,{key:e},l({value:null!==(r=S()[e])&&void 0!==r?r:"",placeholder:null!==(n=null===(o=P())||void 0===o?void 0:o[e])&&void 0!==n?n:void 0,ref:function(r){return j.current[e]=r},onChange:D,onFocus:function(r){return function(e){return function(r){b(r),e.target.select()}}(r)(e)},onBlur:k,onKeyDown:A,onPaste:B,autoComplete:"off","aria-label":"Please enter OTP character ".concat(e+1),style:Object.assign(q?{}:{width:"1em",textAlign:"center"},y(g)?g:{}),className:"string"==typeof g?g:void 0,type:m,inputMode:C?"numeric":"text",onInput:E},e),e<a-1&&("function"==typeof f?f(e):f))}))};const j={code:""},S=f().shape({code:h().required("Please enter the code")}),C=({email:s,onCodeVerified:l})=>{const{props:{organizationId:c}}=r(),[d,f]=i(!1),[h,g]=i(null),{control:v,handleSubmit:q,watch:w}=u({mode:"onSubmit",defaultValues:j,resolver:m(S)});return e.jsxs("div",{className:"qc:space-y-4 qc:lg:space-y-8",children:[e.jsxs(o,{variant:"h5",align:"center",children:["Enter the code sent to ",e.jsx("span",{className:"qc:text-primary qc:font-medium",children:s})]}),e.jsxs("form",{noValidate:!0,autoComplete:"off",className:"qc:flex qc:w-full qc:flex-col qc:items-center qc:gap-4 qc:lg:gap-8",onSubmit:q(async e=>{g(null),f(!0);try{await a.post(t.VERIFY_PASSWORD_RESET_CODE,{json:{email:s,code:e.code},headers:{"x-org-id":c}}),l&&l()}catch(e){console.error(e.message),g("An error occurred while verifying the code. Please try again.")}f(!1)}),children:[e.jsx(p,{name:"code",control:v,render:({field:{value:r,onChange:o}})=>e.jsx(b,{value:r,onChange:o,numInputs:6,shouldAutoFocus:!0,inputType:"number",isInputNum:!0,containerStyle:"qc:flex qc:gap-4",inputStyle:"qc:rounded qc:border qc:focus:border-primary qc:text-foreground qc:bg-white qc:disabled:border-border qc:disabled:text-gray-400 otp-input qc:text-xl qc:focus:outline-none qc:focus:ring-0 qc:focus:boder-none",renderInput:r=>e.jsx("input",{...r})})}),e.jsx(n,{fullWidth:!0,type:"submit",disabled:w("code").length<6,loading:d,children:"Submit"})]}),h&&e.jsx(o,{variant:"h3",align:"center",color:"color",children:h})]})},P={password:"",confirmPassword:""},N=f().shape({password:h().required("Please enter your password").min(8,"Min password length is 8"),confirmPassword:h().required("Please confirm your password").min(8,"Min password length is 8").oneOf([g("password"),null],"Passwords do not match")}),D=({email:s,onPasswordReset:l})=>{const{props:{organizationId:c}}=r(),[f,h]=i({showPassword:!1,showConfirmPassword:!1}),[g,v]=i(!1),[q,w]=i(null),{control:x,handleSubmit:y,formState:{errors:b}}=u({defaultValues:P,mode:"onSubmit",resolver:m(N)});return e.jsxs("div",{className:"qc:w-full qc:space-y-4",children:[e.jsx(o,{variant:"h5",align:"center",children:"Set new password"}),e.jsxs("form",{noValidate:!0,autoComplete:"off",className:"qc:w-full qc:space-y-8",onSubmit:y(async e=>{w(null),v(!0);try{const r=await a.post(t.RESET_PASSWORD,{json:{email:s.toLowerCase(),password:e.password},headers:{"x-org-id":c}});r.error?w(r.error):l()}catch{w("An error occurred while resetting the password. Please try again.")}v(!1)}),children:[e.jsxs("div",{className:"qc:relative",children:[e.jsx(p,{name:"password",control:x,render:({field:{value:r,onChange:o,onBlur:n}})=>e.jsx(d,{label:"New password",disabled:g,type:f.showPassword?"text":"password",value:r,onChange:o,onBlur:n,error:b.password?.message})}),e.jsx(n,{variant:"ghost",color:"primary",className:"qc:absolute qc:-right-4 qc:top-7",icon:f.showPassword?"mdi:eye-outline":"mdi:eye-off-outline",onClick:()=>h({...f,showPassword:!f.showPassword})})]}),e.jsxs("div",{className:"qc:relative",children:[e.jsx(p,{name:"confirmPassword",control:x,render:({field:{value:r,onChange:o,onBlur:n}})=>e.jsx(d,{label:"Confirm new password",disabled:g,type:f.showConfirmPassword?"text":"password",value:r,onChange:o,onBlur:n,error:b.confirmPassword?.message})}),e.jsx(n,{variant:"ghost",color:"primary",className:"qc:absolute qc:-right-4 qc:top-7",icon:f.showConfirmPassword?"mdi:eye-outline":"mdi:eye-off-outline",onClick:()=>h({...f,showConfirmPassword:!f.showConfirmPassword})})]}),e.jsx(n,{fullWidth:!0,type:"submit",color:"primary",loading:g,children:"Reset password"})]}),q&&e.jsx(o,{variant:"h3",align:"center",color:"color",children:q})]})},E=()=>{const r=s(),[o,n]=i(null),[a,t]=i(0);return e.jsxs("div",{className:"qc:space-y-9 qc:bg-background",children:[(({index:a})=>{switch(a){case 0:return e.jsx(x,{onCodeSent:e=>{n(e),t(1)}});case 1:return e.jsx(C,{email:o,onCodeVerified:()=>t(2)});case 2:return e.jsx(D,{email:o,onPasswordReset:()=>{r(l.LOGIN)}})}})({index:a}),e.jsx("div",{className:"qc:mt-8 qc:flex qc:justify-center",children:e.jsx(v,{count:3,currentStep:a})})]})};export{E as default};
|