🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
Merge branch 'feat_dasyui' of https://github.com/OpenSignLabs/OpenSign into resolve_stage
prafull-opensignlabsac05942e5837
diff --cc apps/OpenSign/package-lock.jsonindex 04c9c5cb9,8eb1f20df..a60813823--- a/apps/OpenSign/package-lock.json+++ b/apps/OpenSign/package-lock.json@@@ -55,9 -55,10 +55,10 @@@"web-vitals": "^4.0.1"},"devDependencies": {- "@babel/runtime-corejs2": "^7.24.6",+ "@babel/runtime-corejs2": "^7.24.7","autoprefixer": "^10.4.19","commitizen": "^4.3.0",+ "daisyui": "^4.12.2","eslint": "^8.57.0","eslint-plugin-prettier": "^4.2.1","eslint-plugin-react": "^7.34.1",diff --cc apps/OpenSign/package.jsonindex 247198c26,914f6c52e..6fa83b501--- a/apps/OpenSign/package.json+++ b/apps/OpenSign/package.json@@@ -85,9 -85,10 +85,10 @@@}},"devDependencies": {- "@babel/runtime-corejs2": "^7.24.6",+ "@babel/runtime-corejs2": "^7.24.7","autoprefixer": "^10.4.19","commitizen": "^4.3.0",+ "daisyui": "^4.12.2","eslint": "^8.57.0","eslint-plugin-prettier": "^4.2.1","eslint-plugin-react": "^7.34.1",diff --cc apps/OpenSign/src/pages/UserProfile.jsindex a7599666e,2527c248d..6bf4869de--- a/apps/OpenSign/src/pages/UserProfile.js+++ b/apps/OpenSign/src/pages/UserProfile.js@@@ -293,9 -289,10 +293,10 @@@ function UserProfile()SetName(localStorage.getItem("username"));SetPhone(UserProfile && UserProfile.phone);setImage(localStorage.getItem("profileImg"));- setPublicUserName(extendUser && extendUser?.[0]?.UserName);+ // setPublicUserName(extendUser && extendUser?.[0]?.UserName);setCompany(extendUser && extendUser?.[0]?.Company);setJobTitle(extendUser?.[0]?.JobTitle);+ setIsDisableDocId(extendUser?.[0]?.HeaderDocId);};return (<React.Fragment>@@@ -319,14 -303,14 +307,14 @@@</div>) : (<div className="flex justify-center items-center w-full relative">- {userNameError && (+ {/* {userNameError && (<div- className={`z-[1000] fixed top-[50%] transform border-[1px] text-sm border-[#f0a8a8] bg-[#f4bebe] text-[#c42121] rounded py-[.75rem] px-[1.25rem]`}+ className={`z-[1000] fixed top-[50%] transform border-[1px] text-sm border-[#f0a8a8] bg-[#f4bebe] text-[#c42121] rounded py-[.75rem] px-[1.25rem]`}>{userNameError}</div>- )}+ )} */}- <div className="bg-white flex flex-col justify-center shadow rounded w-[450px]">+ <div className="bg-base-100 text-base-content flex flex-col justify-center shadow rounded-xl w-[450px]"><div className="flex flex-col justify-center items-center my-4"><div className="w-[200px] h-[200px] overflow-hidden rounded-full"><imgdiff --cc apps/OpenSign/src/primitives/GetReportDisplay.jsindex 8d599aaac,1cc073943..73bbecd64--- a/apps/OpenSign/src/primitives/GetReportDisplay.js+++ b/apps/OpenSign/src/primitives/GetReportDisplay.js@@@ -4,11 -4,7 +4,7 @@@ import { useNavigate } from "react-routimport axios from "axios";import ModalUi from "./ModalUi";import AddSigner from "../components/AddSigner";- import {- modalSubmitBtnColor,- modalCancelBtnColor- // isEnableSubscription- } from "../constant/const";-import { isEnableSubscription } from "../constant/const";++// import { isEnableSubscription } from "../constant/const";import Alert from "./Alert";import Tooltip from "./Tooltip";import { RWebShare } from "react-web-share";@@@ -324,16 -368,18 +372,18 @@@ const ReportTable = (props) =>setActLoader({});}};- const handleClose = (item) => {+ const handleClose = () => {setIsRevoke({});setIsDeleteModal({});- setIsMakePublic({});- setSelectedPublicRole("");- setIsPublicProfile({});- if (item?.objectId) {- setIsPublic((prevStates) => ({- ...prevStates,- [item.objectId]: !prevStates[item.objectId]- }));- }+ // setIsMakePublic({});+ // setSelectedPublicRole("");- // setIsPublic((prevStates) => ({- // ...prevStates,- // [item.objectId]: !prevStates[item.objectId]- // }));+ // setIsPublicProfile({});++ // if (item?.objectId) {++ // setIsPublic((prevStates) => ({++ // ...prevStates,++ // [item.objectId]: !prevStates[item.objectId]++ // }));++ // }};const handleShare = (item) => {@@@ -861,19 -882,16 +911,16 @@@return (<div className="relative">{Object.keys(actLoader)?.length > 0 && (- <div className="absolute w-full h-full rounded-md flex justify-center items-center bg-black bg-opacity-30 z-30">- <div- style={{ fontSize: "45px", color: "#3dd3e0" }}- className="loader-37"- ></div>+ <div className="absolute w-full h-full text-[45px] text-[#3dd3e0] rounded-md flex justify-center items-center bg-black bg-opacity-30 z-30">+ <div className="loader-37"></div></div>)}- <div className="p-2 overflow-x-scroll w-full bg-white rounded-md">+ <div className="p-2 overflow-x-scroll w-full bg-base-100 text-base-content rounded-xl">- {isCelebration && (- <div style={{ position: "relative", zIndex: "1000" }}>+ {/* {isCelebration && (- <div style={{ position: "relative", zIndex: "1000" }}>++ <div className="relative z-[1000]"><Confetti width={window.innerWidth} height={window.innerHeight} /></div>- )}+ )} */}{isAlert && <Alert type={alertMsg.type}>{alertMsg.message}</Alert>}{props.tourData && props.ReportName === "Templates" && (<Tour@@@ -914,14 -932,14 +961,14 @@@<tr className="border-y-[1px]">{props.heading?.map((item, index) => (<React.Fragment key={index}>- <th className="px-4 py-2 font-thin">{item}</th>+ <th className="px-4 py-2">{item}</th></React.Fragment>))}- {props.actions?.length > 0 && (- <th className="px-4 py-2 font-thin">Action</th>- )}- {props.ReportName === "Templates" && isEnableSubscription && (+ {/* {props.ReportName === "Templates" && isEnableSubscription && (- <th className="px-4 py-2 font-thin">Public</th>+ <th className="px-4 py-2">Public</th>- )}++ )} */}+ {/* {props.actions?.length > 0 && (+ <th className="px-4 py-2">Action</th>)} */}</tr></thead>@@@ -1032,58 -1039,214 +1068,214 @@@"-")}</td>- <td className="px-2 py-2 text-white flex flex-row gap-x-2 gap-y-1 justify-center items-center">- {props.actions?.length > 0 &&- props.actions.map((act, index) => (- <button- data-tut={act?.selector}- key={index}- onClick={() => handleActionBtn(act, item)}- className={`${- act.action === "option" ? "" : "rounded shadow"- } ${- act.btnLabel ? "py-[3px] px-1.5" : "py-1.5 px-2"- } relative text-center flex items-center justify-center focus:outline-none`}- title={act.hoverLabel}- style={{- backgroundColor: act.btnColor- ? act.btnColor- : "#3ac9d6",- color: act?.textColor ? act?.textColor : "white"- }}- >- <i className={act.btnIcon}></i>- {act.btnLabel && (- <span className="ml-[4px] uppercase font-medium">- {act.btnLabel}- </span>- )}- {isOption[item.objectId] &&- act.action === "option" && (- <div className="absolute -right-2 top-5 p-1.5 bg-white text-nowrap rounded shadow-md z-[20] overflow-hidden">- {act.subaction?.map((subact) => (- <div- key={subact.btnId}- className="hover:bg-gray-300 rounded cursor-pointer px-2 py-1.5 flex justify-start items-center text-black"- onClick={() =>- handleActionBtn(subact, item)- }- title={subact.hoverLabel}- >- <i- className={`${subact.btnIcon} mr-1.5`}- ></i>- {subact.btnLabel && (- <span className="ml-[4px] text-[13px] capitalize font-medium">- {subact.btnLabel}- </span>- {props.ReportName === "Templates" &&++ {/* {props.ReportName === "Templates" &&+ isEnableSubscription && (+ <td className=" pl-[20px] py-2">+ {props.ReportName === "Templates" && (- <div className="flex flex-row-">++ <div className="flex flex-row">+ <label+ className={+ "cursor-pointer relative inline-flex items-center mb-0"+ }+ >+ <input+ checked={isPublic?.[item.objectId]}+ onChange={(e) =>+ handlePublicChange(e, item)+ }+ type="checkbox"+ value=""+ className="sr-only peer"+ />+ <div className="w-9 h-5 bg-gray-200 peer-focus:outline-none peer-focus:ring-1 peer-focus:ring-black rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all dark:border-black peer-checked:bg-blue-600"></div>+ </label>+ </div>+ )}+ {isMakePublic[item.objectId] && (+ <ModalUi+ isOpen+ title={+ isPublic[item.objectId]+ ? "Make template public"+ : "Make template private"+ }+ handleClose={() => {+ setIsMakePublic({});+ setSelectedPublicRole("");+ setIsPublic((prevStates) => ({+ ...prevStates,+ [item.objectId]: !prevStates[item.objectId]+ }));+ }}+ >+ <div className="m-[20px]">+ <div className="font-normal text-black">+ <p className="text-lg">+ {isPublic[item.objectId]+ ? `Are you sure you want to make this template public ?`+ : `Are you sure you want to make this template private ? This will remove it from your public profile ?`}+ </p>+ {isPublic[item.objectId] && (+ <div className="flex mt-2 gap-2 md:items-center">+ <p className="text-[15px]">+ Public role :{" "}+ </p>+ {item?.Placeholders?.length > 1 ? (+ <select+ className="w-[60%] md:w-[70%] border-[1px] border-gray-200 rounded-sm p-[2px]"+ name="textvalidate"+ value={selectedPublicRole}+ onChange={(e) =>+ setSelectedPublicRole(+ e.target.value+ )+ }+ >+ <option+ disabled+ style={{ fontSize: "13px" }}+ value=""+ >+ Select...+ </option>+ {item?.Placeholders.map(+ (data, ind) => {+ return (+ <option+ style={{ fontSize: "13px" }}+ key={ind}+ value={data?.Role}+ >+ {data?.Role}+ </option>+ );+ }+ )}+ </select>+ ) : (+ <div className="w-[60%] md:w-[70%] border-[1px] border-gray-200 rounded-sm p-[2px]">+ {item?.Placeholders[0]?.Role}+ </div>)}</div>- ))}+ )}+ </div>+ <hr className="bg-[#ccc] mt-2 " />+ <div className="flex items-center mt-3 gap-2 text-white">+ <button+ onClick={() => handlePublicTemplate(item)}+ className="op-btn op-btn-primary"+ >+ Submit+ </button>+ <button+ onClick={() => handleClose(item)}+ className="op-btn op-btn-secondary"+ >+ No+ </button></div>+ </div>+ </ModalUi>+ )}+ {isPublicProfile[item.objectId] && (+ <ModalUi+ isOpen+ title={"Public URL"}+ handleClose={() => {+ setIsPublicProfile({});+ }}+ reduceWidth={+ "md:min-w-[440px] md:max-w-[400px]"+ }+ >+ <div className="m-[20px]">+ {publicUserName ? (+ <div className="font-normal text-black">+ <p>+ Here’s your public URL. Copy or share it+ with the signer, and you will be able to+ see all your publicly set templates.+ </p>+ <div className=" flex items-center gap-5 mt-2 p-[2px] w-[75%]">+ <span className="font-bold">+ Public URL :{" "}+ </span>+ <span+ onClick={() => copytoProfileLink()}+ className="underline underline-offset-2 cursor-pointer"+ >{`https://opensign.me/${publicUserName}`}</span>+ </div>+ </div>+ ) : (+ <div className="font-normal text-black">+ <p>+ Please add your public URL, and you will+ be able to make a public template.+ </p>+ <button+ className="mt-3 op-btn op-btn-primary"+ onClick={() => navigate("/profile")}+ >+ Add+ </button>+ </div>+ )}+ </div>+ </ModalUi>+ )}+ </td>- )}++ )} */}+ <td className="px-2 py-2">+ <div className="text-white flex flex-row gap-x-2 gap-y-1 justify-start items-center">+ {props.actions?.length > 0 &&+ props.actions.map((act, index) => (+ <button+ data-tut={act?.selector}+ key={index}+ onClick={() => handleActionBtn(act, item)}+ title={act.hoverLabel}+ className={+ act.action !== "option"+ ? `${+ act?.btnColor ? act.btnColor : ""+ } op-btn op-btn-sm`- : "text-base-content text-lg mr-2 relative"++ : "text-base-content focus:outline-none text-lg mr-2 relative"+ }+ >+ <i className={act.btnIcon}></i>+ {act.btnLabel && (+ <span className="uppercase font-medium">+ {act.btnLabel}+ </span>)}- </button>- ))}+ {isOption[item.objectId] &&+ act.action === "option" && (+ <div className="absolute -right-2 top-5 p-1.5 bg-white text-nowrap rounded shadow-md z-[20] overflow-hidden">+ {act.subaction?.map((subact) => (+ <div+ key={subact.btnId}+ className="hover:bg-gray-300 rounded cursor-pointer px-2 py-1.5 flex justify-start items-center text-black"+ onClick={() =>+ handleActionBtn(subact, item)+ }+ title={subact.hoverLabel}+ >+ <i+ className={`${subact.btnIcon} mr-1.5`}+ ></i>+ {subact.btnLabel && (+ <span className="ml-[4px] text-[13px] capitalize font-medium">+ {subact.btnLabel}+ </span>+ )}+ </div>+ ))}+ </div>+ )}+ </button>+ ))}+ </div>{isViewShare[item.objectId] && (<div className="fixed z-[999] inset-0 w-full h-full bg-black bg-opacity-[75%]"><div className="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-sm bg-white rounded shadow-md max-h-90 min-w-[90%] md:min-w-[400px] overflow-y-auto max-h-[340px] md:max-h-[400px] hide-scrollbar">@@@ -1269,22 -1417,15 +1446,15 @@@}}><div className=" overflow-y-auto max-h-[340px] md:max-h-[400px]">- {item?.Signers.map((user) => (- <React.Fragment key={user.objectId}>- {isNextStep[user.objectId] && (+ {item?.Placeholders?.map((user) => (+ <React.Fragment key={user.Id}>+ {isNextStep[user.Id] && (<div className="relative ">- {actLoader[user.objectId] && (+ {actLoader[user.Id] && (- <div className="absolute w-full h-full flex justify-center items-center bg-black bg-opacity-30 z-30">- <div- style={{- fontSize: "45px",- color: "#3dd3e0"- }}- className="loader-37"- ></div>+ <div className="absolute text-[45px] text-[#3dd3e0] w-full h-full flex justify-center items-center bg-black bg-opacity-30 z-30">+ <div className="loader-37"></div></div>)}-<formonSubmit={(e) =>handleResendMail(e, item, user)