@vicaniddouglas/js_aide 1.15.4 → 1.16.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/README.md +82 -63
- package/declarations.d.ts +3 -1
- package/dist/js_aide.cjs.js +6 -5
- package/dist/js_aide.cjs.js.map +2 -2
- package/dist/js_aide.esm.js +6 -5
- package/dist/js_aide.esm.js.map +2 -2
- package/dist/js_aide.min.js +6 -5
- package/dist/js_aide.min.js.map +2 -2
- package/package.json +1 -1
package/dist/js_aide.min.js
CHANGED
|
@@ -956,22 +956,23 @@ var JsAide=(()=>{var PA=Object.defineProperty;var D2=Object.getOwnPropertyDescri
|
|
|
956
956
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
|
957
957
|
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 7l5 5l-5 5m8 0h6" />
|
|
958
958
|
</svg>
|
|
959
|
-
`,X={historyIcon:M3,replayIcon:L3,forwardIcon:G3,forwardIcon2:T3,shareIcon2:W3,shareIcon3:Y3,sendIcon:S3,sendIcon2:t3,galleryIcon:K3,galleryIcon2:B3,galleryIcon3:R3,phoneLockIcon:kI,phoneSMSicon:bI,phoneSMSicon2:_I,checkMarkIcon:I3,checkMarkIcon1:O3,checkMarkIcon3:N3,bulbIcon:A3,infoIcon:X5,privacyIcon:j5,privacyIcon2:Q5,walletIcon:O5,walletIcon2:N5,crashIcon:z5,networkErrorIcon:$5,smsIcon:b5,smsIcon2:_5,smsIcon3:k5,logsIcon:q5,institutionIcon:F5,medicalLabIcon:x5,firstAidIcon:y5,shieldIcon:d5,libraryIcon:g5,chatBubbleIcon:m5,exclamationIcon:p5,bellIcon:Z5,computerIcon:u5,savingsPotIcon:W5,CalendarIcon:V5,collectionIcon:v5,userGroupIcon:w5,folderIcon:f5,pencilEditIcon:H5,identificationIcon:C5,usersIcon:o5,trendingUpIcon:J5,clockIcon:h5,eyeIcon:l5,inboxInIcon:c5,lightBulbIcon:P5,newsPaperIcon:a5,addUserIcon:D5,squarePlusIcon:s5,circlePlusIcon:r5,wrenchIcon:i5,pencilIcon:n5,reportDirectoryIcon:e5,shareIcon:t5,trashIcon:S5,accountSettingsIcon:K5,calculatorIcon:E5,unitedIcon:U5,complianceIcon:Y5,savingsIcon:B5,auditTrailIcon:T5,filledAddIcon:G5,backIcon:L5,schemeIcon:M5,sharesIcon:R5,cupCakeIcon:I5,swimmingIcon:XO,runningcon:A5,meditationIcon:bO,writeIcon:qO,codeIcon:zO,codeIcon2:$O,movieIcon:jO,movieIcon2:QO,plantIcon:_O,wheelbarrelIcon:kO,whistleIcon:VO,artPalleteIcon:yO,shoppingTrollyIcon:xO,danceIcon:FO,bookIcon3:vO,trainIcon:CO,suitCaseIcon:aO,strongArmIcon:JO,fitnessIcon:uO,dumbellIcon:dO,cheffIcon:hO,cookingIcon:PO,cookingIcon2:cO,planeIcon:HO,transportation:lO,gamingIcon:gO,gamingIcon2:fO,gamingIcon3:wO,musicIcon:ZO,musicIcon2:pO,musicIcon3:mO,christianIcon:nO,islamIcon:oO,loveChatIcon:sO,chatIcon:rO,chatIcon2:iO,heartBrokenIcon:eO,ringsIcon:DO,cupIcon:YO,cupIcon2:SO,cupIcon3:tO,heartsIcon:LO,heartsIcon2:GO,heartsIcon3:TO,inLoveIcon:WO,tickIcon:MO,addIcon2:BI,uploadIcon2:YI,downloadIcon2:TI,pauseIcon:h2,pauseIcon2:J2,cameraIcon:l2,cameraIcon2:c2,heartIcon:P2,viewIcon:BO,hideIcon:RO,successCheckIcon:U3,errorCircleIcon:E3,lockIcon:IO,lockIcon2:OO,leftArrowIcon:d2,toggleOffIcon:KO,toggleOnIcon:EO,messagesIcon:UI,messagesIcon2:EI,menuIcon:x2,locationIcon:NO,locationIcon2:UO,emailIcon:zI,outgoingEmailIcon:$I,incomingEmailIcon:jI,unsentMailIcon:QI,attachIcon:XI,attachIcon2:AO,phoneIcon:vI,phoneIcon2:VI,telephoneIcon:yI,telephoneIcon2:xI,failedCallsIcon:FI,contactIcon:qI,branchIcon:fI,branchIcon2:wI,brightnessIcon:mI,brightnessIcon2:gI,certificateIcon:rI,certificateIcon2:HI,closeIcon:v2,closeIcon2:V2,closeIcon3:y2,csvIcon:JI,csvIcon2:dI,csvIcon3:uI,deleteIcon:MI,downloadIcon:GI,dashboardIcon:AI,dashboardIcon2:II,editIcon:RI,excelIcon:PI,excelIcon2:cI,graduateIcon:SI,homeIcon:Q2,homeIcon2:X2,languageIcon:nI,logoutIcon:z2,logoutIcon2:$2,logoutIcon3:j2,notificationsIcon:NI,pdfIcon:lI,pdfIcon2:hI,profileIcon:OI,refreshIcon:ZI,refreshIcon2:pI,saveIcon:LI,schoolIcon:DI,uploadIcon:WI,userIcon:b2,userIcon2:_2,workIcon:tI,workIcon2:eI,bookIcon:sI,bookIcon2:aI,skillsIcon:iI,addIcon:KI,awardIcon:oI,awardIcon2:CI,settingsIcon:k2,settingsIcon2:q2,searchIcon:F2,rightArrowIcon:p2,rightArrowIcon2:m2,rightArrowIcon3:g2,leftArrowIcon2:u2,leftArrowIcon3:Z2,playIcon:f2,playIcon2:w2,promptIcon:e3};var l1={success:{color:"#22c55e",duration:2500,getIcon:()=>X.successCheckIcon()},error:{color:"#ef4444",duration:4e3,getIcon:()=>X.errorCircleIcon()},info:{color:"#7c3aed",duration:3e3,getIcon:()=>X.notificationsIcon()},confirm:{color:"#64748b",duration:0,getIcon:()=>X.notificationsIcon()},prompt:{color:"#64748b",duration:0,getIcon:()=>X.promptIcon()}},KA=null;function YA(N,A,I={}){KA&&KA.close();let O=l1[N]||l1.info,U={duration:I.duration||O.duration,icon:I.icon||O.getIcon(),color:I.color||O.color,closable:I.closable!==!1,persistent:I.persistent===!0};return(N==="confirm"||N==="prompt")&&(U.closable=!1),new Promise(E=>{let B=null,R=document.createElement("div");R.className="custom-popup-overlay",R.setAttribute("role","presentation"),Object.assign(R.style,{position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(4px)",zIndex:"20000",display:"flex",alignItems:"center",justifyContent:"center",animation:"popupFadeIn 0.3s ease-out",opacity:"1",transition:"opacity 0.3s ease-out"});let K=document.createElement("div");K.setAttribute("role","alertdialog"),K.setAttribute("aria-modal","true"),K.setAttribute("tabindex","-1"),Object.assign(K.style,{backgroundColor:
|
|
959
|
+
`,X={historyIcon:M3,replayIcon:L3,forwardIcon:G3,forwardIcon2:T3,shareIcon2:W3,shareIcon3:Y3,sendIcon:S3,sendIcon2:t3,galleryIcon:K3,galleryIcon2:B3,galleryIcon3:R3,phoneLockIcon:kI,phoneSMSicon:bI,phoneSMSicon2:_I,checkMarkIcon:I3,checkMarkIcon1:O3,checkMarkIcon3:N3,bulbIcon:A3,infoIcon:X5,privacyIcon:j5,privacyIcon2:Q5,walletIcon:O5,walletIcon2:N5,crashIcon:z5,networkErrorIcon:$5,smsIcon:b5,smsIcon2:_5,smsIcon3:k5,logsIcon:q5,institutionIcon:F5,medicalLabIcon:x5,firstAidIcon:y5,shieldIcon:d5,libraryIcon:g5,chatBubbleIcon:m5,exclamationIcon:p5,bellIcon:Z5,computerIcon:u5,savingsPotIcon:W5,CalendarIcon:V5,collectionIcon:v5,userGroupIcon:w5,folderIcon:f5,pencilEditIcon:H5,identificationIcon:C5,usersIcon:o5,trendingUpIcon:J5,clockIcon:h5,eyeIcon:l5,inboxInIcon:c5,lightBulbIcon:P5,newsPaperIcon:a5,addUserIcon:D5,squarePlusIcon:s5,circlePlusIcon:r5,wrenchIcon:i5,pencilIcon:n5,reportDirectoryIcon:e5,shareIcon:t5,trashIcon:S5,accountSettingsIcon:K5,calculatorIcon:E5,unitedIcon:U5,complianceIcon:Y5,savingsIcon:B5,auditTrailIcon:T5,filledAddIcon:G5,backIcon:L5,schemeIcon:M5,sharesIcon:R5,cupCakeIcon:I5,swimmingIcon:XO,runningcon:A5,meditationIcon:bO,writeIcon:qO,codeIcon:zO,codeIcon2:$O,movieIcon:jO,movieIcon2:QO,plantIcon:_O,wheelbarrelIcon:kO,whistleIcon:VO,artPalleteIcon:yO,shoppingTrollyIcon:xO,danceIcon:FO,bookIcon3:vO,trainIcon:CO,suitCaseIcon:aO,strongArmIcon:JO,fitnessIcon:uO,dumbellIcon:dO,cheffIcon:hO,cookingIcon:PO,cookingIcon2:cO,planeIcon:HO,transportation:lO,gamingIcon:gO,gamingIcon2:fO,gamingIcon3:wO,musicIcon:ZO,musicIcon2:pO,musicIcon3:mO,christianIcon:nO,islamIcon:oO,loveChatIcon:sO,chatIcon:rO,chatIcon2:iO,heartBrokenIcon:eO,ringsIcon:DO,cupIcon:YO,cupIcon2:SO,cupIcon3:tO,heartsIcon:LO,heartsIcon2:GO,heartsIcon3:TO,inLoveIcon:WO,tickIcon:MO,addIcon2:BI,uploadIcon2:YI,downloadIcon2:TI,pauseIcon:h2,pauseIcon2:J2,cameraIcon:l2,cameraIcon2:c2,heartIcon:P2,viewIcon:BO,hideIcon:RO,successCheckIcon:U3,errorCircleIcon:E3,lockIcon:IO,lockIcon2:OO,leftArrowIcon:d2,toggleOffIcon:KO,toggleOnIcon:EO,messagesIcon:UI,messagesIcon2:EI,menuIcon:x2,locationIcon:NO,locationIcon2:UO,emailIcon:zI,outgoingEmailIcon:$I,incomingEmailIcon:jI,unsentMailIcon:QI,attachIcon:XI,attachIcon2:AO,phoneIcon:vI,phoneIcon2:VI,telephoneIcon:yI,telephoneIcon2:xI,failedCallsIcon:FI,contactIcon:qI,branchIcon:fI,branchIcon2:wI,brightnessIcon:mI,brightnessIcon2:gI,certificateIcon:rI,certificateIcon2:HI,closeIcon:v2,closeIcon2:V2,closeIcon3:y2,csvIcon:JI,csvIcon2:dI,csvIcon3:uI,deleteIcon:MI,downloadIcon:GI,dashboardIcon:AI,dashboardIcon2:II,editIcon:RI,excelIcon:PI,excelIcon2:cI,graduateIcon:SI,homeIcon:Q2,homeIcon2:X2,languageIcon:nI,logoutIcon:z2,logoutIcon2:$2,logoutIcon3:j2,notificationsIcon:NI,pdfIcon:lI,pdfIcon2:hI,profileIcon:OI,refreshIcon:ZI,refreshIcon2:pI,saveIcon:LI,schoolIcon:DI,uploadIcon:WI,userIcon:b2,userIcon2:_2,workIcon:tI,workIcon2:eI,bookIcon:sI,bookIcon2:aI,skillsIcon:iI,addIcon:KI,awardIcon:oI,awardIcon2:CI,settingsIcon:k2,settingsIcon2:q2,searchIcon:F2,rightArrowIcon:p2,rightArrowIcon2:m2,rightArrowIcon3:g2,leftArrowIcon2:u2,leftArrowIcon3:Z2,playIcon:f2,playIcon2:w2,promptIcon:e3};var l1={success:{color:"#22c55e",duration:2500,getIcon:()=>X.successCheckIcon()},error:{color:"#ef4444",duration:4e3,getIcon:()=>X.errorCircleIcon()},info:{color:"#7c3aed",duration:3e3,getIcon:()=>X.notificationsIcon()},confirm:{color:"#64748b",duration:0,getIcon:()=>X.notificationsIcon()},prompt:{color:"#64748b",duration:0,getIcon:()=>X.promptIcon()}},KA=null;function YA(N,A,I={}){KA&&KA.close();let O=l1[N]||l1.info,U={duration:I.duration||O.duration,icon:I.icon||O.getIcon(),showIcon:I.showIcon!==!1,color:I.color||O.color,backgroundColor:I.backgroundColor||"#fff",width:I.width||"90%",maxWidth:I.maxWidth||"340px",textColor:I.textColor||"#1e293b",iconColor:I.iconColor||I.color||O.color,iconBgColor:I.iconBgColor||(I.color||O.color)+"15",confirmBgColor:I.confirmBgColor||I.color||O.color,confirmTextColor:I.confirmTextColor||"white",cancelBgColor:I.cancelBgColor||"#f1f5f9",cancelTextColor:I.cancelTextColor||"#475569",closable:I.closable!==!1,persistent:I.persistent===!0};return(N==="confirm"||N==="prompt")&&(U.closable=!1),new Promise(E=>{let B=null,R=document.createElement("div");R.className="custom-popup-overlay",R.setAttribute("role","presentation"),Object.assign(R.style,{position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(4px)",zIndex:"20000",display:"flex",alignItems:"center",justifyContent:"center",animation:"popupFadeIn 0.3s ease-out",opacity:"1",transition:"opacity 0.3s ease-out"});let K=document.createElement("div");K.setAttribute("role","alertdialog"),K.setAttribute("aria-modal","true"),K.setAttribute("tabindex","-1"),Object.assign(K.style,{backgroundColor:U.backgroundColor,width:U.width,maxWidth:U.maxWidth,borderRadius:"15px",padding:"36px 24px 32px 24px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",textAlign:"center",position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px",transform:"scale(1)",transition:"transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275)"});let M=N==="confirm"||N==="prompt";if(K.innerHTML=`
|
|
960
960
|
${U.closable?`
|
|
961
961
|
<button id="modal-close-btn" aria-label="Close modal" style="position:absolute;top:12px;right:12px;background:none;border:none;color:#94a3b8;cursor:pointer;padding:4px;">
|
|
962
962
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
963
963
|
</button>`:""}
|
|
964
964
|
|
|
965
|
-
|
|
965
|
+
${U.showIcon?`
|
|
966
|
+
<div class="popup-icon-container" style="color:${U.iconColor}; background-color:${U.iconBgColor}; padding:${M?"16px":"24px"}; border-radius:50%; display:flex; align-items:center; justify-content:center; margin-bottom:${M?"0":"4px"};">
|
|
966
967
|
<div style="width:${M?"28px":"40px"}; height:${M?"28px":"40px"}; display:flex; align-items:center; justify-content:center;">
|
|
967
968
|
${U.icon}
|
|
968
969
|
</div>
|
|
969
|
-
</div
|
|
970
|
+
</div>`:""}
|
|
970
971
|
|
|
971
|
-
<div style="font-family:'Inter', system-ui, -apple-system, sans-serif; font-size:16px; line-height:1.5; color
|
|
972
|
+
<div style="font-family:'Inter', system-ui, -apple-system, sans-serif; font-size:16px; line-height:1.5; color:${U.textColor}; font-weight:${M?"500":"600"};">
|
|
972
973
|
${A}
|
|
973
974
|
</div>
|
|
974
|
-
`,N==="prompt"){B=document.createElement("input");let S=I.inputType||"text";B.type=S==="password"?"password":"text",B.placeholder=I.placeholder||"Enter value...",B.value=I.defaultValue||"",Object.assign(B.style,{width:"100%",padding:"12px 16px",borderRadius:"8px",border:"2px solid #e2e8f0",fontSize:"15px",fontFamily:"inherit",outline:"none",transition:"border-color 0.2s",textAlign:S==="currency"?"right":"left"}),B.onfocus=()=>{B.style.borderColor=U.color},B.onblur=()=>{B.style.borderColor="#e2e8f0"},(S==="currency"||S==="number")&&B.addEventListener("input",Y=>{let e=Y.target.value.replace(/[^0-9.]/g,"");if(S==="currency"){let t=e.split(".");t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),Y.target.value=t.join(".")}else Y.target.value=e.split(".")[0]}),K.appendChild(B)}if(R.appendChild(K),document.body.appendChild(R),B?setTimeout(()=>B.focus(),50):K.focus(),N==="confirm"||N==="prompt"){let S=document.createElement("div");Object.assign(S.style,{display:"flex",gap:"12px",marginTop:"8px",width:"100%"});let Y=document.createElement("button");Y.textContent=(N==="prompt"?I.submitText:I.confirmText)||(N==="prompt"?"Submit":"Confirm"),Object.assign(Y.style,{flex:"1",padding:"12px",backgroundColor:U.
|
|
975
|
+
`,N==="prompt"){B=document.createElement("input");let S=I.inputType||"text";B.type=S==="password"?"password":"text",B.placeholder=I.placeholder||"Enter value...",B.value=I.defaultValue||"",Object.assign(B.style,{width:"100%",padding:"12px 16px",borderRadius:"8px",border:"2px solid #e2e8f0",fontSize:"15px",fontFamily:"inherit",outline:"none",transition:"border-color 0.2s",textAlign:S==="currency"?"right":"left"}),B.onfocus=()=>{B.style.borderColor=U.color},B.onblur=()=>{B.style.borderColor="#e2e8f0"},(S==="currency"||S==="number")&&B.addEventListener("input",Y=>{let e=Y.target.value.replace(/[^0-9.]/g,"");if(S==="currency"){let t=e.split(".");t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),Y.target.value=t.join(".")}else Y.target.value=e.split(".")[0]}),K.appendChild(B)}if(R.appendChild(K),document.body.appendChild(R),B?setTimeout(()=>B.focus(),50):K.focus(),N==="confirm"||N==="prompt"){let S=document.createElement("div");Object.assign(S.style,{display:"flex",gap:"12px",marginTop:"8px",width:"100%"});let Y=document.createElement("button");Y.textContent=(N==="prompt"?I.submitText:I.confirmText)||(N==="prompt"?"Submit":"Confirm"),Object.assign(Y.style,{flex:"1",padding:"12px",backgroundColor:U.confirmBgColor,color:U.confirmTextColor,border:"none",borderRadius:"8px",cursor:"pointer",fontWeight:"600",fontSize:"14px"});let e=document.createElement("button");e.textContent=I.cancelText||"Cancel",Object.assign(e.style,{flex:"1",padding:"12px",backgroundColor:U.cancelBgColor,color:U.cancelTextColor,border:"none",borderRadius:"8px",cursor:"pointer",fontWeight:"600",fontSize:"14px"}),Y.onclick=()=>{let t=B?B.value:!0;W(),E(t)},e.onclick=()=>{W(),E(null)},B&&(B.onkeydown=t=>{t.key==="Enter"&&Y.click()}),S.appendChild(e),S.appendChild(Y),K.appendChild(S)}let L=!1,G=null,T=S=>{S.key==="Escape"&&U.closable&&(W(),(N==="confirm"||N==="prompt")&&E(N==="confirm"?!1:null))},W=()=>{L||(L=!0,G&&clearTimeout(G),window.removeEventListener("keydown",T),KA=null,R.style.opacity="0",K.style.transform="scale(0.9)",setTimeout(()=>{R.remove(),N!=="confirm"&&N!=="prompt"&&E()},300))};if(KA={close:W},U.closable){window.addEventListener("keydown",T);let S=K.querySelector("#modal-close-btn");S&&(S.onclick=()=>{W(),(N==="confirm"||N==="prompt")&&E(N==="confirm"?!1:null)}),R.onclick=Y=>{Y.target===R&&(W(),(N==="confirm"||N==="prompt")&&E(N==="confirm"?!1:null))}}!U.persistent&&N!=="confirm"&&N!=="prompt"&&(G=setTimeout(W,U.duration))})}if(!document.getElementById("custom-modal-styles")){let N=document.createElement("style");N.id="custom-modal-styles",N.innerHTML=`
|
|
975
976
|
@keyframes popupFadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
976
977
|
#modal-close-btn:hover { color: #475569 !important; }
|
|
977
978
|
.custom-popup-overlay:focus-within { outline: none; }
|