@inntechcorp/it-design 2.2.24 → 2.2.25
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/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -5332,4 +5332,4 @@ function(b,z){M.exports?M.exports=z(Eo()):z(b.moment)}(Fo,(function(M){void 0===
|
|
|
5332
5332
|
gap : ${z};
|
|
5333
5333
|
`}}}
|
|
5334
5334
|
|
|
5335
|
-
`,_i=({gap:M,justify:b,align:p,vertical:o,wrap:c,stretch:O,style:e,className:t,children:n})=>z.jsx(Ti,{$gap:M,$justify:b,$align:p,$vertical:o,$wrap:c,$stretch:O,style:e,className:t,children:n}),Si={tr:{itd:W,calendar:f},en:{itd:u,calendar:h}};M.use(b.initReactI18next).init({resources:Si,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}}),exports.ALink=cr,exports.Accordion=uA,exports.AddDefaultThemeStyle=function(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Uo,exports.AddZero=function(M){var b=Number(M),z=M.toString().split(".");return(-1===M.toString().indexOf(".")||z[1].length<3||z[1].length>2)&&(M=(b=b.toFixed(2)).toString()),parseFloat(M).toFixed(2)},exports.Alert=Zr,exports.ArrowIcon=Mc,exports.BackToTop=zc,exports.BackTop=function(M){const{children:b=null}=M,[o,c]=p.useState(!1);p.useEffect((()=>(document.addEventListener("scroll",O),()=>{document.removeEventListener("scroll",O)})),[]);const O=()=>{c(document.body.scrollTop>window.innerHeight)},e=()=>{window.scrollTo({top:0,behavior:"smooth"})};return z.jsx(ai,{className:"itd-back-to-top",children:z.jsx(ri,{onClick:e,$show:o,children:b||z.jsx(zc,{width:30,height:30})})})},exports.Base64Decode=function(M){return decodeURIComponent(atob(M).split("").map((function(M){return"%"+("00"+M.charCodeAt(0).toString(16)).slice(-2)})).join(""))},exports.Base64Encode=function(M){return btoa(encodeURIComponent(M).replace(/%([0-9A-F]{2})/g,(function(M,b){return String.fromCharCode(Number("0x"+b))})))},exports.Button=tM,exports.Calendar=TA,exports.Card=({title:M,titleSeparator:b,extra:o,tabs:c,onTabChange:O,minWidth:e,minHeight:t,children:n,activeTabKey:A="",updating:a=!1,contentPadding:r="30px"})=>{p.useEffect((()=>{}));const i=()=>{if(o)return z.jsx(Bi,{className:"itd-card-extra",children:o})},d=()=>{if(c)return z.jsx(hi,{tabs:c,activeTabKey:A,onTabChange:M=>O&&O(M)})},q=()=>{if(M)return z.jsx(gi,{className:"itd-card-title",children:z.jsx(Qo,{children:M})})},s=()=>!!(M||o||c);return z.jsx(Ri,{className:"itd-card",children:z.jsx(I,{updating:a,className:"itd-card-spin",children:z.jsxs(Li,{className:"itd-card-body",$minWidth:e,$minHeight:t,$hasHeader:s(),children:[(()=>{if(s())return z.jsxs(mi,{$showSeparator:b,className:"itd-card-header",children:[q(),d(),i()]})})(),(()=>{if(n)return z.jsx(Ni,{className:"itd-card-body",$padding:r,children:n})})()]})})})},exports.CheckFileURL=Bo,exports.Checkbox=fc,exports.Checkmark=pc,exports.ChunkArray=function(M,b){let z=0,p=[];for(z=0;z<M.length;z+=b){const o=M.slice(z,z+b);"object"!=typeof o&&p.push(o)}return p},exports.Collapse=dr,exports.ConsoleLog=w,exports.ConvertCurrency=function(M,b){return M||(M=0),go(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=kA,exports.DetermineNewHeight=function(M,b,z){return M/b*z},exports.DetermineNewWidth=function(M,b,z){return b/M*z},exports.FileChecker=function(M="config",b="resource"){let z=void 0!==performance.getEntries().filter((M=>M.entryType===b)).filter((b=>b.name.indexOf(M)>-1))[0];return z?console.log("script already loaded"):console.log("script was not loaded"),z},exports.FindSelector=function(M){let b=!1;return document.querySelectorAll("head > style").forEach((z=>{Array(z.sheet.rules).forEach((z=>{for(var p=0;p<z.length;p++)z[p].cssText.search(M)>-1&&(b=!0)}))})),b},exports.Flex=_i,exports.Form=AA,exports.FormatBytes=vo,exports.FormatDate=function(M,b="tr",z="D MMMM YYYY dddd"){return Do(new Date(M)).locale(b).format(z)},exports.FormatDateTime=function(M,b="tr",z="D MMMM YYYY dddd - HH:mm"){return Do(new Date(M)).locale(b).format(z)},exports.FormatSimpleDate=function(M,b="tr",z="D MMMM YYYY"){return Do(new Date(M)).locale(b).format(z)},exports.FormatSimpleDateTime=function(M,b="tr",z="MM/DD/YYYY - HH:mm"){return Do(new Date(M)).locale(b).format(z)},exports.FormatTime=function(M,b="tr",z="HH:mm"){return Do(M).locale(b).format(z)},exports.GetByCurrency=function(M,b=!0,z="",p=2){if(""===z)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");isNaN(M)&&(M=0);let o=mo(z);return b?new Intl.NumberFormat(o,{style:"currency",currency:z,minimumFractionDigits:p,maximumFractionDigits:p}).format(M):new Intl.NumberFormat(o,{minimumFractionDigits:p,maximumFractionDigits:p}).format(M)},exports.GetCountryCodeByCurrencyCode=mo,exports.GetCountryCodeByLanguage=function(M){return"tr"===M?"tur":"en"===M?"usa":"language_not_found"},exports.GetCurrencyFormat=function(M,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===M?"":M=`${No(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=No,exports.GetDecimalByCurrency=function(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?",":"EUR"===M||"USD"===M?".":","},exports.GetTypeByFileType=xo,exports.H1=({children:M})=>z.jsx(Vo,{children:z.jsx("span",{children:M})}),exports.H2=Qo,exports.H3=({children:M})=>z.jsx(Yo,{children:z.jsx("span",{children:M})}),exports.H4=Jo,exports.ITDContext=Lo,exports.ITDProvider=b=>{const[o,c]=p.useState(b.theme?b.theme:"dark"),[O,e]=p.useState(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[t,n]=p.useState(b.language?b.language:"en"),[A,a]=p.useState("en-US"),[r,i]=p.useState("");p.useEffect((()=>{b.theme&&d(b.theme),b.language&&s(b.language),b.dateFormat&&q(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const d=M=>{c(M)},q=M=>{e(M)},s=b=>{n(b),M.changeLanguage(b)},l={theme:o,brokenImage:r,dateFormat:O,language:t,locale:A,changeTheme:d,changeBrokenImage:M=>{i(M)},changeDateFormat:q,changeLanguage:s,changeLocale:M=>{a(M)}};return z.jsx(Ro,{className:"itd-provider","data-theme":o,"data-lang":t,children:z.jsx(Lo.Provider,{value:l,children:z.jsx(fo,{children:z.jsx(IM,{children:b.children})})})})},exports.Image=kc,exports.InlineSelect=Vr,exports.InlineSelectArrow=oc,exports.Input=Sa,exports.IsValidJSON=function(M){M="string"!=typeof M?JSON.stringify(M):M;try{M=JSON.parse(String(M))}catch(M){return!1}return"object"==typeof M&&null!==M},exports.LockIcon=Zo,exports.ModalManager=$M,exports.NoData=tc,exports.Notification=ho,exports.Picture=ec,exports.Progress=function({status:M,percent:b=0,alwaysShowPercent:p=!1,showInfo:o=!0,className:c=""}){const O=()=>{let z="itd-progress";return z+=" itd-progress-"+M,z+=" itd-progress-percent-"+b,""!==c&&null!==c&&(z+=" "+c),z},e=z.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),t=z.jsx("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),n=()=>M||(b<100?"normal":"success"),A=()=>{if(o)return z.jsx("span",{className:"itd-progress-status",children:a()})},a=()=>{const M=n();return"active"===M||"normal"===M||p?z.jsx("span",{className:"itd-progress-status-text",children:b+"%"}):"success"===M?e:"exception"===M?t:void 0};return z.jsx(li,{$status:n(),$percent:b,className:O(),children:z.jsxs("div",{className:"itd-progress-outer",children:[z.jsx("div",{className:"itd-progress-inner",children:z.jsx("div",{className:"itd-progress-bg"})}),A()]})})},exports.Radio=vr,exports.RemoveUnits=function(M){return M?(M=M.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(M)):0},exports.Result=Ai,exports.SVGLoader=(M,b,p)=>z.jsx(wo,{$width:b,$height:p,children:z.jsx(O.ReactSVG,{src:M})}),exports.Select=En,exports.Spin=I,exports.Status=function({variant:M="gray-1",size:b="default",stretch:p=!1,bold:o=!0,children:c="",className:O=""}){const e=()=>{let z="itd-status";return z+=" itd-status-"+M,z+=" itd-status-"+bM(b),p&&(z+=" itd-status-stretch"),o&&(z+=" itd-status-bold"),""!==O&&null!==O&&(z+=" "+O),z};return z.jsx(qi,{$status:M,$bold:o,className:e(),children:z.jsx("span",{children:c})})},exports.Switch=$a,exports.Table=wi,exports.Tabs=hi,exports.TextArea=Da,exports.TinyScrollbar=Bn,exports.Trash=cc,exports.UniUpperCase=function(M="",b="tr"){var z={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(M=M.replace(/(([iışğüçö]))/g,(M=>z[M]))),M.toUpperCase()},exports.UpdateThemeStyle=function(M){var b="",z=document.styleSheets[0];Object.keys(M).forEach((z=>{b+=`${z}:${M[z]};`})),z.hasOwnProperty("cssRules")&&(z.cssRules[0].style.cssText=b)},exports.Upload=pr,exports.UploadIcon=bc,exports.Wait=Xo,exports.ZoomIn=Oc,exports.ZoomOut=({className:M="",height:b=24,width:p=24})=>z.jsx("svg",{className:M,height:b,width:p,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:z.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[z.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),z.jsx("path",{d:"M14.2928932,16.7071068 C13.9023689,16.3165825 13.9023689,15.6834175 14.2928932,15.2928932 C14.6834175,14.9023689 15.3165825,14.9023689 15.7071068,15.2928932 L19.7071068,19.2928932 C20.0976311,19.6834175 20.0976311,20.3165825 19.7071068,20.7071068 C19.3165825,21.0976311 18.6834175,21.0976311 18.2928932,20.7071068 L14.2928932,16.7071068 Z",fill:"#000000",fillRule:"nonzero",opacity:"0.3"}),z.jsx("path",{d:"M11,16 C13.7614237,16 16,13.7614237 16,11 C16,8.23857625 13.7614237,6 11,6 C8.23857625,6 6,8.23857625 6,11 C6,13.7614237 8.23857625,16 11,16 Z M11,18 C7.13400675,18 4,14.8659932 4,11 C4,7.13400675 7.13400675,4 11,4 C14.8659932,4 18,7.13400675 18,11 C18,14.8659932 14.8659932,18 11,18 Z",fill:"#000000",fillRule:"nonzero"}),z.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=Si,exports.toKebabCase=function(M,b=!1,z=!1){const p=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],o={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return M=M.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,(M=>o[M]||M)),b&&(M=M.split(" ").filter((M=>!p.includes(M.toLowerCase()))).join(" ")),z&&(M=M.replace(/\d+/g,"")),(M=(M=M.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(M,b=!1)=>{p.useEffect((()=>{var p=!1,o=document.head,c=z();return document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&(p=!0)})),p||o.appendChild(c),()=>{b&&document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&document.head.removeChild(b)}))}}),[M]);const z=()=>{var b=document.createElement("link");return b.type="text/css",b.rel="stylesheet",b.href=M,b}},exports.useComponentSize=M=>{const[b,z]=p.useState({width:0,height:0});return p.useEffect((()=>{if(!M.current)return;const b=new ResizeObserver((M=>{M.forEach((({target:M})=>{z({width:M.clientWidth,height:M.clientHeight})}))}));return b.observe(M.current),()=>b.disconnect()}),[M]),[b]},exports.useConnectionStatus=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("online",b),()=>{window.removeEventListener("online",b)}}),[M])},exports.useConstructor=(M=()=>{})=>{const[b,z]=p.useState(!1);b||(M(),z(!0))},exports.useContextBridge=(...M)=>{if(0===M.length)return({children:M})=>z.jsx(z.Fragment,{children:M});const b=M.map(p.useContext),o=p.useRef(b);return o.current=b,p.useMemo((()=>({children:b})=>M.reduceRight(((M,b,p)=>z.jsx(b.Provider,{value:o.current[p],children:M})),b)),[])},exports.useCoreFetch=E,exports.useKeyboardShortcut=({key:M,onKeyPressed:b})=>{p.useEffect((()=>{function z(z){z.key===M&&(z.preventDefault(),b())}return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}}),[M,b])},exports.useMultiQuery=k,exports.useOnClickOutside=T,exports.useOnESCKeyDown=_,exports.useOnResize=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}}),[M])},exports.useOrientation=()=>{const[M,b]=p.useState("portrait-primary"===window.screen.orientation.type?"portrait":"landscape");return p.useEffect((()=>{const M=M=>{const z=M.currentTarget.type;"landscape-primary"===z?b("landscape"):"portrait-primary"===z&&b("portrait")};return screen.orientation.addEventListener("change",M),()=>{screen.orientation.removeEventListener("change",M)}}),[]),M},exports.useReCaptcha=M=>{let b;const[z,o]=p.useState("");p.useEffect((()=>()=>{document.body.removeChild(b)}),[]);return{loadReCaptcha:M=>{b=document.createElement("script"),b.src="https://www.google.com/recaptcha/api.js?render="+M,b.onload=function(){o(M)},document.body.appendChild(b)},executeReCaptcha:()=>{if(""===z)return w.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(M&&M(null));window.grecaptcha.ready((b=>{try{window.grecaptcha.execute(z,{action:"login"}).then((b=>{w.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),M&&M(b)}))}catch(M){w.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=S;
|
|
5335
|
+
`,_i=({gap:M,justify:b,align:p,vertical:o,wrap:c,stretch:O,style:e,className:t,children:n})=>z.jsx(Ti,{$gap:M,$justify:b,$align:p,$vertical:o,$wrap:c,$stretch:O,style:e,className:t,children:n}),Si={tr:{itd:W,calendar:f},en:{itd:u,calendar:h}};M.use(b.initReactI18next).init({resources:Si,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}}),exports.ALink=cr,exports.Accordion=uA,exports.AddDefaultThemeStyle=function(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Uo,exports.AddZero=function(M){var b=Number(M),z=M.toString().split(".");return(-1===M.toString().indexOf(".")||z[1].length<3||z[1].length>2)&&(M=(b=b.toFixed(2)).toString()),parseFloat(M).toFixed(2)},exports.Alert=Zr,exports.ArrowIcon=Mc,exports.BackToTop=zc,exports.BackTop=function(M){const{children:b=null}=M,[o,c]=p.useState(!1);p.useEffect((()=>(document.addEventListener("scroll",O),()=>{document.removeEventListener("scroll",O)})),[]);const O=()=>{c(document.body.scrollTop>window.innerHeight)},e=()=>{window.scrollTo({top:0,behavior:"smooth"})};return z.jsx(ai,{className:"itd-back-to-top",children:z.jsx(ri,{onClick:e,$show:o,children:b||z.jsx(zc,{width:30,height:30})})})},exports.Base64Decode=function(M){return decodeURIComponent(atob(M).split("").map((function(M){return"%"+("00"+M.charCodeAt(0).toString(16)).slice(-2)})).join(""))},exports.Base64Encode=function(M){return btoa(encodeURIComponent(M).replace(/%([0-9A-F]{2})/g,(function(M,b){return String.fromCharCode(Number("0x"+b))})))},exports.Button=tM,exports.Calendar=TA,exports.Card=({title:M,titleSeparator:b,extra:o,tabs:c,onTabChange:O,minWidth:e,minHeight:t,children:n,activeTabKey:A="",updating:a=!1,contentPadding:r="30px"})=>{p.useEffect((()=>{}));const i=()=>{if(o)return z.jsx(Bi,{className:"itd-card-extra",children:o})},d=()=>{if(c)return z.jsx(hi,{tabs:c,activeTabKey:A,onTabChange:M=>O&&O(M)})},q=()=>{if(M)return z.jsx(gi,{className:"itd-card-title",children:z.jsx(Qo,{children:M})})},s=()=>!!(M||o||c);return z.jsx(Ri,{className:"itd-card",children:z.jsx(I,{updating:a,className:"itd-card-spin",children:z.jsxs(Li,{className:"itd-card-body",$minWidth:e,$minHeight:t,$hasHeader:s(),children:[(()=>{if(s())return z.jsxs(mi,{$showSeparator:b,className:"itd-card-header",children:[q(),d(),i()]})})(),(()=>{if(n)return z.jsx(Ni,{className:"itd-card-body",$padding:r,children:n})})()]})})})},exports.CheckFileURL=Bo,exports.Checkbox=fc,exports.Checkmark=pc,exports.ChunkArray=function(M,b){let z=0,p=[];for(z=0;z<M.length;z+=b){const o=M.slice(z,z+b);"object"!=typeof o&&p.push(o)}return p},exports.Collapse=dr,exports.ConsoleLog=w,exports.ConvertCurrency=function(M,b){return M||(M=0),go(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=kA,exports.DetermineNewHeight=function(M,b,z){return M/b*z},exports.DetermineNewWidth=function(M,b,z){return b/M*z},exports.FileChecker=function(M="config",b="resource"){let z=void 0!==performance.getEntries().filter((M=>M.entryType===b)).filter((b=>b.name.indexOf(M)>-1))[0];return z?console.log("script already loaded"):console.log("script was not loaded"),z},exports.FindSelector=function(M){let b=!1;return document.querySelectorAll("head > style").forEach((z=>{Array(z.sheet.rules).forEach((z=>{for(var p=0;p<z.length;p++)z[p].cssText.search(M)>-1&&(b=!0)}))})),b},exports.Flex=_i,exports.Form=AA,exports.FormatBytes=vo,exports.FormatDate=function(M,b="tr",z="D MMMM YYYY dddd"){return Do(new Date(M)).locale(b).format(z)},exports.FormatDateTime=function(M,b="tr",z="D MMMM YYYY dddd - HH:mm"){return Do(new Date(M)).locale(b).format(z)},exports.FormatSimpleDate=function(M,b="tr",z="D MMMM YYYY"){return Do(new Date(M)).locale(b).format(z)},exports.FormatSimpleDateTime=function(M,b="tr",z="MM/DD/YYYY - HH:mm"){return Do(new Date(M)).locale(b).format(z)},exports.FormatTime=function(M,b="tr",z="HH:mm"){return Do(M).locale(b).format(z)},exports.GetByCurrency=function(M,b=!0,z="",p=2){if(""===z)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");isNaN(M)&&(M=0);let o=mo(z);return b?new Intl.NumberFormat(o,{style:"currency",currency:z,minimumFractionDigits:p,maximumFractionDigits:p}).format(M):new Intl.NumberFormat(o,{minimumFractionDigits:p,maximumFractionDigits:p}).format(M)},exports.GetCountryCodeByCurrencyCode=mo,exports.GetCountryCodeByLanguage=function(M){return"tr"===M?"tur":"en"===M?"usa":"language_not_found"},exports.GetCurrencyFormat=function(M,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===M?"":M=`${No(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=No,exports.GetDecimalByCurrency=function(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?",":"EUR"===M||"USD"===M?".":","},exports.GetTypeByFileType=xo,exports.H1=({children:M})=>z.jsx(Vo,{children:z.jsx("span",{children:M})}),exports.H2=Qo,exports.H3=({children:M})=>z.jsx(Yo,{children:z.jsx("span",{children:M})}),exports.H4=Jo,exports.ITDContext=Lo,exports.ITDProvider=b=>{const[o,c]=p.useState(b.theme?b.theme:"dark"),[O,e]=p.useState(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[t,n]=p.useState(b.language?b.language:"en"),[A,a]=p.useState("en-US"),[r,i]=p.useState("");p.useEffect((()=>{b.theme&&d(b.theme),b.language&&s(b.language),b.dateFormat&&q(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const d=M=>{c(M)},q=M=>{e(M)},s=b=>{n(b),M.changeLanguage(b)},l={theme:o,brokenImage:r,dateFormat:O,language:t,locale:A,changeTheme:d,changeBrokenImage:M=>{i(M)},changeDateFormat:q,changeLanguage:s,changeLocale:M=>{a(M)}};return z.jsx(Ro,{className:"itd-provider","data-theme":o,"data-lang":t,children:z.jsx(Lo.Provider,{value:l,children:z.jsx(fo,{children:z.jsx(IM,{children:b.children})})})})},exports.Image=kc,exports.InlineSelect=Vr,exports.InlineSelectArrow=oc,exports.Input=Sa,exports.IsValidJSON=function(M){M="string"!=typeof M?JSON.stringify(M):M;try{M=JSON.parse(String(M))}catch(M){return!1}return"object"==typeof M&&null!==M},exports.LockIcon=Zo,exports.ModalManager=$M,exports.NoData=tc,exports.Notification=ho,exports.Picture=ec,exports.Progress=function({status:M,percent:b=0,alwaysShowPercent:p=!1,showInfo:o=!0,className:c=""}){const O=()=>{let z="itd-progress";return z+=" itd-progress-"+M,z+=" itd-progress-percent-"+b,""!==c&&null!==c&&(z+=" "+c),z},e=z.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),t=z.jsx("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),n=()=>M||(b<100?"normal":"success"),A=()=>{if(o)return z.jsx("span",{className:"itd-progress-status",children:a()})},a=()=>{const M=n();return"active"===M||"normal"===M||p?z.jsx("span",{className:"itd-progress-status-text",children:b.toFixed(2)+"%"}):"success"===M?e:"exception"===M?t:void 0};return z.jsx(li,{$status:n(),$percent:b,className:O(),children:z.jsxs("div",{className:"itd-progress-outer",children:[z.jsx("div",{className:"itd-progress-inner",children:z.jsx("div",{className:"itd-progress-bg"})}),A()]})})},exports.Radio=vr,exports.RemoveUnits=function(M){return M?(M=M.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(M)):0},exports.Result=Ai,exports.SVGLoader=(M,b,p)=>z.jsx(wo,{$width:b,$height:p,children:z.jsx(O.ReactSVG,{src:M})}),exports.Select=En,exports.Spin=I,exports.Status=function({variant:M="gray-1",size:b="default",stretch:p=!1,bold:o=!0,children:c="",className:O=""}){const e=()=>{let z="itd-status";return z+=" itd-status-"+M,z+=" itd-status-"+bM(b),p&&(z+=" itd-status-stretch"),o&&(z+=" itd-status-bold"),""!==O&&null!==O&&(z+=" "+O),z};return z.jsx(qi,{$status:M,$bold:o,className:e(),children:z.jsx("span",{children:c})})},exports.Switch=$a,exports.Table=wi,exports.Tabs=hi,exports.TextArea=Da,exports.TinyScrollbar=Bn,exports.Trash=cc,exports.UniUpperCase=function(M="",b="tr"){var z={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(M=M.replace(/(([iışğüçö]))/g,(M=>z[M]))),M.toUpperCase()},exports.UpdateThemeStyle=function(M){var b="",z=document.styleSheets[0];Object.keys(M).forEach((z=>{b+=`${z}:${M[z]};`})),z.hasOwnProperty("cssRules")&&(z.cssRules[0].style.cssText=b)},exports.Upload=pr,exports.UploadIcon=bc,exports.Wait=Xo,exports.ZoomIn=Oc,exports.ZoomOut=({className:M="",height:b=24,width:p=24})=>z.jsx("svg",{className:M,height:b,width:p,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:z.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[z.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),z.jsx("path",{d:"M14.2928932,16.7071068 C13.9023689,16.3165825 13.9023689,15.6834175 14.2928932,15.2928932 C14.6834175,14.9023689 15.3165825,14.9023689 15.7071068,15.2928932 L19.7071068,19.2928932 C20.0976311,19.6834175 20.0976311,20.3165825 19.7071068,20.7071068 C19.3165825,21.0976311 18.6834175,21.0976311 18.2928932,20.7071068 L14.2928932,16.7071068 Z",fill:"#000000",fillRule:"nonzero",opacity:"0.3"}),z.jsx("path",{d:"M11,16 C13.7614237,16 16,13.7614237 16,11 C16,8.23857625 13.7614237,6 11,6 C8.23857625,6 6,8.23857625 6,11 C6,13.7614237 8.23857625,16 11,16 Z M11,18 C7.13400675,18 4,14.8659932 4,11 C4,7.13400675 7.13400675,4 11,4 C14.8659932,4 18,7.13400675 18,11 C18,14.8659932 14.8659932,18 11,18 Z",fill:"#000000",fillRule:"nonzero"}),z.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=Si,exports.toKebabCase=function(M,b=!1,z=!1){const p=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],o={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return M=M.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,(M=>o[M]||M)),b&&(M=M.split(" ").filter((M=>!p.includes(M.toLowerCase()))).join(" ")),z&&(M=M.replace(/\d+/g,"")),(M=(M=M.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(M,b=!1)=>{p.useEffect((()=>{var p=!1,o=document.head,c=z();return document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&(p=!0)})),p||o.appendChild(c),()=>{b&&document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&document.head.removeChild(b)}))}}),[M]);const z=()=>{var b=document.createElement("link");return b.type="text/css",b.rel="stylesheet",b.href=M,b}},exports.useComponentSize=M=>{const[b,z]=p.useState({width:0,height:0});return p.useEffect((()=>{if(!M.current)return;const b=new ResizeObserver((M=>{M.forEach((({target:M})=>{z({width:M.clientWidth,height:M.clientHeight})}))}));return b.observe(M.current),()=>b.disconnect()}),[M]),[b]},exports.useConnectionStatus=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("online",b),()=>{window.removeEventListener("online",b)}}),[M])},exports.useConstructor=(M=()=>{})=>{const[b,z]=p.useState(!1);b||(M(),z(!0))},exports.useContextBridge=(...M)=>{if(0===M.length)return({children:M})=>z.jsx(z.Fragment,{children:M});const b=M.map(p.useContext),o=p.useRef(b);return o.current=b,p.useMemo((()=>({children:b})=>M.reduceRight(((M,b,p)=>z.jsx(b.Provider,{value:o.current[p],children:M})),b)),[])},exports.useCoreFetch=E,exports.useKeyboardShortcut=({key:M,onKeyPressed:b})=>{p.useEffect((()=>{function z(z){z.key===M&&(z.preventDefault(),b())}return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}}),[M,b])},exports.useMultiQuery=k,exports.useOnClickOutside=T,exports.useOnESCKeyDown=_,exports.useOnResize=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}}),[M])},exports.useOrientation=()=>{const[M,b]=p.useState("portrait-primary"===window.screen.orientation.type?"portrait":"landscape");return p.useEffect((()=>{const M=M=>{const z=M.currentTarget.type;"landscape-primary"===z?b("landscape"):"portrait-primary"===z&&b("portrait")};return screen.orientation.addEventListener("change",M),()=>{screen.orientation.removeEventListener("change",M)}}),[]),M},exports.useReCaptcha=M=>{let b;const[z,o]=p.useState("");p.useEffect((()=>()=>{document.body.removeChild(b)}),[]);return{loadReCaptcha:M=>{b=document.createElement("script"),b.src="https://www.google.com/recaptcha/api.js?render="+M,b.onload=function(){o(M)},document.body.appendChild(b)},executeReCaptcha:()=>{if(""===z)return w.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(M&&M(null));window.grecaptcha.ready((b=>{try{window.grecaptcha.execute(z,{action:"login"}).then((b=>{w.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),M&&M(b)}))}catch(M){w.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=S;
|
package/dist/index.esm.js
CHANGED
|
@@ -4684,7 +4684,7 @@ function(b,z){M.exports?M.exports=z(SO()):z(b.moment)}(FO,(function(M){void 0===
|
|
|
4684
4684
|
}
|
|
4685
4685
|
`;var b}}
|
|
4686
4686
|
|
|
4687
|
-
`;function Xd({status:M,percent:b=0,alwaysShowPercent:z=!1,showInfo:o=!0,className:c=""}){const e=()=>{let z="itd-progress";return z+=" itd-progress-"+M,z+=" itd-progress-percent-"+b,""!==c&&null!==c&&(z+=" "+c),z},t=p("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:p("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),n=p("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:p("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),A=()=>M||(b<100?"normal":"success"),a=()=>{if(o)return p("span",{className:"itd-progress-status",children:i()})},i=()=>{const M=A();return"active"===M||"normal"===M||z?p("span",{className:"itd-progress-status-text",children:b+"%"}):"success"===M?t:"exception"===M?n:void 0};return p(vd,{$status:A(),$percent:b,className:e(),children:O("div",{className:"itd-progress-outer",children:[p("div",{className:"itd-progress-inner",children:p("div",{className:"itd-progress-bg"})}),a()]})})}const yd=k.div`
|
|
4687
|
+
`;function Xd({status:M,percent:b=0,alwaysShowPercent:z=!1,showInfo:o=!0,className:c=""}){const e=()=>{let z="itd-progress";return z+=" itd-progress-"+M,z+=" itd-progress-percent-"+b,""!==c&&null!==c&&(z+=" "+c),z},t=p("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:p("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),n=p("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:p("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),A=()=>M||(b<100?"normal":"success"),a=()=>{if(o)return p("span",{className:"itd-progress-status",children:i()})},i=()=>{const M=A();return"active"===M||"normal"===M||z?p("span",{className:"itd-progress-status-text",children:b.toFixed(2)+"%"}):"success"===M?t:"exception"===M?n:void 0};return p(vd,{$status:A(),$percent:b,className:e(),children:O("div",{className:"itd-progress-outer",children:[p("div",{className:"itd-progress-inner",children:p("div",{className:"itd-progress-bg"})}),a()]})})}const yd=k.div`
|
|
4688
4688
|
|
|
4689
4689
|
height: ${M=>M.$height?M.$height+"px":"75px"};
|
|
4690
4690
|
|