diff --git a/apps/OpenSign/package-lock.json b/apps/OpenSign/package-lock.json index 94de8ab4c..e5fb4cc1e 100644 --- a/apps/OpenSign/package-lock.json +++ b/apps/OpenSign/package-lock.json @@ -43,6 +43,7 @@ "react-scrollbars-custom": "^4.1.1", "react-select": "^5.8.0", "react-signature-canvas": "^1.0.6", + "react-tooltip": "^5.26.3", "reactour": "^1.19.2", "redux": "^4.2.1", "redux-thunk": "^2.4.2", @@ -20145,6 +20146,19 @@ } } }, + "node_modules/react-tooltip": { + "version": "5.26.3", + "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-5.26.3.tgz", + "integrity": "sha512-MpYAws8CEHUd/RC4GaDCdoceph/T4KHM5vS5Dbk8FOmLMvvIht2ymP2htWdrke7K6lqPO8rz8+bnwWUIXeDlzg==", + "dependencies": { + "@floating-ui/dom": "^1.6.1", + "classnames": "^2.3.0" + }, + "peerDependencies": { + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + } + }, "node_modules/react-transition-group": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", diff --git a/apps/OpenSign/package.json b/apps/OpenSign/package.json index b77c268de..b1c11a070 100644 --- a/apps/OpenSign/package.json +++ b/apps/OpenSign/package.json @@ -38,6 +38,7 @@ "react-scrollbars-custom": "^4.1.1", "react-select": "^5.8.0", "react-signature-canvas": "^1.0.6", + "react-tooltip": "^5.26.3", "reactour": "^1.19.2", "redux": "^4.2.1", "redux-thunk": "^2.4.2", @@ -48,7 +49,7 @@ }, "scripts": { "start": "serve -s build", - "start-dev" :"react-scripts start", + "start-dev": "react-scripts start", "version": "curl -s https://api.github.com/repos/opensignlabs/opensign/releases/latest | grep '\"tag_name\":' | awk -F '\"' '{print $4}' > ./public/version.txt", "version-win": "powershell -Command \"Invoke-RestMethod -Uri 'https://api.github.com/repos/opensignlabs/opensign/releases/latest' | Select-Object -ExpandProperty tag_name | Out-File -FilePath ./public/version.txt\"", "build": "npm run version && react-scripts build", diff --git a/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js b/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js index 19d616dc9..b4d3b1dd6 100644 --- a/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js +++ b/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js @@ -1,6 +1,7 @@ import React, { useEffect, useState } from "react"; import { themeColor } from "../../constant/const"; import ModalUi from "../../primitives/ModalUi"; +import { radioButtonWidget } from "../../constant/Utils"; function DropdownWidgetOption(props) { const [dropdownOptionList, setDropdownOptionList] = useState([ "option-1", @@ -10,6 +11,7 @@ function DropdownWidgetOption(props) { const [maxCount, setMaxCount] = useState(0); const [dropdownName, setDropdownName] = useState(props.type); const [isReadOnly, setIsReadOnly] = useState(false); + const [isHideLabel, setIsHideLabel] = useState(false); const [status, setStatus] = useState("required"); const [defaultValue, setDefaultValue] = useState(""); const statusArr = ["required", "optional"]; @@ -19,6 +21,7 @@ function DropdownWidgetOption(props) { setDropdownOptionList(["option-1", "option-2"]); setDropdownName(props.type); setIsReadOnly(false); + setIsHideLabel(false); setMinCount(0); setMaxCount(0); setDefaultCheckbox([]); @@ -39,6 +42,7 @@ function DropdownWidgetOption(props) { props.currWidgetsDetails?.options?.validation?.maxRequiredCount ); setIsReadOnly(props.currWidgetsDetails?.options?.isReadOnly); + setIsHideLabel(props.currWidgetsDetails?.options?.isHideLabel); setStatus(props.currWidgetsDetails?.options?.status || "required"); setDefaultValue(props.currWidgetsDetails?.options?.defaultValue || ""); setDefaultCheckbox(props.currWidgetsDetails?.options?.defaultValue || []); @@ -106,13 +110,15 @@ function DropdownWidgetOption(props) { null, null, status, - defaultData + defaultData, + isHideLabel ); // props.setShowDropdown(false); setDropdownOptionList(["option-1", "option-2"]); setDropdownName(props.type); // props.setCurrWidgetsDetails({}); setIsReadOnly(false); + setIsHideLabel(false); setMinCount(0); setMaxCount(0); setDefaultCheckbox([]); @@ -143,7 +149,7 @@ function DropdownWidgetOption(props) { // styleClass={"dropdownModal"} isOpen={props.showDropdown} title={props.title} - closeOff={true} + showClose={false} >
- {["checkbox", "radio"].includes(props.type) && - !props.isSignYourself && ( -
- { - setIsReadOnly(e.target.checked); - }} - /> - - -
- )} @@ -178,36 +170,6 @@ function DropdownWidgetOption(props) { className="drodown-input" /> - {props.type === "checkbox" && !props.isSignYourself && ( - <> - - { - const count = handleSetMinMax(e); - setMinCount(count); - }} - className="drodown-input" - /> - - { - const count = handleSetMinMax(e); - setMaxCount(count); - }} - className="drodown-input" - /> - - )}
))} - + {props.type === "checkbox" && !props.isSignYourself && ( + <> + + { + const count = handleSetMinMax(e); + setMinCount(count); + }} + className="drodown-input" + /> + + { + const count = handleSetMinMax(e); + setMaxCount(count); + }} + className="drodown-input" + /> + + )}
- {["dropdown", "radio"].includes(props.type) && ( + {["dropdown", radioButtonWidget].includes(props.type) && ( <>