@mertcankocak/core-project 1.4.0 → 1.5.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/dist/components/FormikMultiSelect/FormikMultiSelect.d.ts +53 -0
- package/dist/components/FormikMultiSelect/FormikMultiSelect.d.ts.map +1 -0
- package/dist/components/FormikMultiSelect/index.d.ts +3 -0
- package/dist/components/FormikMultiSelect/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/core-project.es.js +889 -716
- package/dist/core-project.umd.js +10 -10
- package/package.json +1 -1
package/dist/core-project.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(c,me){typeof exports=="object"&&typeof module<"u"?me(exports,require("yup"),require("file-type"),require("react"),require("formik"),require("@mui/material"),require("@mui/icons-material"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","yup","file-type","react","formik","@mui/material","@mui/icons-material","lodash"],me):(c=typeof globalThis<"u"?globalThis:c||self,me(c.CoreProject={},c.Yup,c.FileType,c.React,c.Formik,c.MaterialUI,c.MaterialUIIcons,c._))})(this,function(c,me,Fe,S,$e,M,Ne,pr){"use strict";function vr(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,u.get?u:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const N=vr(me),De=/^[0-9]{11}$/;function Be(t){if(!De.test(t))return!1;const n=t.split("").map(Number);return!(n[0]===0||n.slice(0,9).reduce((l,i)=>l+i,0)%10!==n[9]||n.slice(0,10).reduce((l,i)=>l+i,0)%10!==n[10])}function yr(t){const{required:n=!1,message:r="Geçerli bir T.C. kimlik numarası giriniz",requiredMessage:u="T.C. kimlik numarası zorunludur",name:l="tcKimlikNo"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.matches(De,"T.C. kimlik numarası 11 haneli olmalıdır"),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Be(a)}}),i}const Le=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;function Ve(t){return Le.test(t)}function br(t){const{required:n=!1,message:r="Geçerli bir email adresi giriniz",requiredMessage:u="Email zorunludur",name:l="email"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.email(r).test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ve(a)}}),i}const Ge=/^(\+90\s?)?(0?5\d{2})\s?(\d{3})\s?(\d{2})\s?(\d{2})$/;function qe(t){const n=t.replace(/\s+/g,"").replace(/[-\+()]/g,"");return n.length!==10&&n.length!==11||!n.match(/^(0?5\d{9})$/)?!1:Ge.test(t)||/^0?5\d{9}$/.test(n)}function Er(t){const{required:n=!1,message:r="Geçerli bir telefon numarası giriniz (05XX XXX XX XX)",requiredMessage:u="Telefon numarası zorunludur",name:l="phone"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:qe(a)}}),i}function _r(t,n){const{minLength:r=8,requireUppercase:u=!0,requireLowercase:l=!0,requireNumber:i=!0,requireSpecialChar:a=!0}=n||{},f=[];return t.length<r&&f.push(`Şifre en az ${r} karakter olmalıdır`),u&&!/[A-Z]/.test(t)&&f.push("Şifre en az bir büyük harf içermelidir"),l&&!/[a-z]/.test(t)&&f.push("Şifre en az bir küçük harf içermelidir"),i&&!/\d/.test(t)&&f.push("Şifre en az bir rakam içermelidir"),a&&!/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(t)&&f.push("Şifre en az bir özel karakter içermelidir"),{isValid:f.length===0,errors:f}}function Rr(t){const{required:n=!1,requiredMessage:r="Şifre zorunludur",minLength:u=8,requireUppercase:l=!0,requireLowercase:i=!0,requireNumber:a=!0,requireSpecialChar:f=!0,minLengthMessage:h=`Şifre en az ${u} karakter olmalıdır`,uppercaseMessage:P="Şifre en az bir büyük harf içermelidir",lowercaseMessage:T="Şifre en az bir küçük harf içermelidir",numberMessage:k="Şifre en az bir rakam içermelidir",specialCharMessage:R="Şifre en az bir özel karakter içermelidir"}=t||{};let v=N.string();return n&&(v=v.required(r)),v=v.min(u,h),l&&(v=v.matches(/[A-Z]/,P)),i&&(v=v.matches(/[a-z]/,T)),a&&(v=v.matches(/\d/,k)),f&&(v=v.matches(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,R)),v}function Tr(t,n){const{required:r=!1,message:u="Şifreler eşleşmiyor",requiredMessage:l="Şifre tekrarı zorunludur"}=n||{};let i=N.string();return r&&(i=i.required(l)),i=i.oneOf([N.ref(t)],u),i}const Ce=/^[a-zA-ZçğıöşüÇĞIİÖŞÜ\s]+$/;function Ue(t){return!t||t.trim().length===0||t.trim().length<2?!1:Ce.test(t)}function kr(t){const{required:n=!1,message:r="İsim sadece harf içermelidir",requiredMessage:u="İsim zorunludur",name:l="name"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.min(2,"İsim en az 2 karakter olmalıdır").matches(Ce,r).test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ue(a)}}),i}const Xe=/^TR\d{2}[0-9A-Z]{4}\d{1}[0-9A-Z]{15,30}$/i;function Ke(t){const n=t.replace(/\s+/g,"").toUpperCase();if(!Xe.test(n))return!1;const u=(n.slice(4)+n.slice(0,4)).split("").map(i=>{const a=i.charCodeAt(0);return a>=65&&a<=90?a-55:i}).join("");return BigInt(u)%BigInt(97)===BigInt(1)}function Sr(t){const{required:n=!1,message:r="Geçerli bir IBAN numarası giriniz",requiredMessage:u="IBAN zorunludur",name:l="iban"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ke(a)}}),i}const Ye=/^\d{13,19}$/;function We(t){const n=t.replace(/\s+/g,"").replace(/-/g,"");if(!Ye.test(n))return!1;let r=0,u=!1;for(let l=n.length-1;l>=0;l--){let i=parseInt(n[l],10);u&&(i*=2,i>9&&(i-=9)),r+=i,u=!u}return r%10===0}function Dr(t){const{required:n=!1,message:r="Geçerli bir kredi kartı numarası giriniz",requiredMessage:u="Kredi kartı numarası zorunludur",name:l="creditCard"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:We(a)}}),i}const Ze=/^\d{10}$/;function He(t){if(!Ze.test(t))return!1;const n=t.split("").map(Number);return n.slice(0,9).reduce((l,i,a)=>{const f=(a+1)%9||9;return l+i*f},0)%11%10===n[9]}function Cr(t){const{required:n=!1,message:r="Geçerli bir VKN (Vergi Kimlik Numarası) giriniz",requiredMessage:u="VKN zorunludur",name:l="vkn"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:He(a)}}),i}const we=/^(\d{2})\s?([A-ZÇĞIİÖŞÜ]{1,3})\s?(\d{2,4})$/i;function Je(t){const n=t.replace(/\s+/g," ").trim().toUpperCase();if(!we.test(n))return!1;const r=n.match(we);if(!r)return!1;const[,u,l,i]=r,a=parseInt(u,10);return!(a<1||a>81||l.length<1||l.length>3||i.length<2||i.length>4)}function wr(t){const{required:n=!1,message:r="Geçerli bir araç plakası giriniz (örn: 34 ABC 123)",requiredMessage:u="Araç plakası zorunludur",name:l="plate"}=t||{};let i=N.string();return n&&(i=i.required(u)),i=i.test({name:l,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Je(a)}}),i}function he(t){const n=t.split(".");return n.length>1?n[n.length-1].toLowerCase():""}async function Pr(t,n){const{maxSize:r,minSize:u,allowedExtensions:l=[],allowedMimeTypes:i=[]}=n||{},a=[];if(r&&t.size>r){const f=(r/1048576).toFixed(2);a.push(`Dosya boyutu en fazla ${f} MB olmalıdır`)}if(u&&t.size<u){const f=(u/1048576).toFixed(2);a.push(`Dosya boyutu en az ${f} MB olmalıdır`)}if(l.length>0&&i.length===0&&console.warn("⚠️ UYARI: Sadece dosya uzantısı kontrolü yapılıyor. Güvenlik için 'allowedMimeTypes' parametresini kullanarak magic bytes kontrolü yapmanız önerilir."),l.length>0&&t instanceof File){const f=he(t.name);l.includes(f)||a.push(`İzin verilen dosya uzantıları: ${l.join(", ")}`)}if(i.length>0)try{const f=await t.arrayBuffer(),h=new Uint8Array(f),P=await Fe.fileTypeFromBuffer(h);P?i.includes(P.mime)||a.push(`Dosya tipi uyumsuz. Beklenen: ${i.join(", ")}, Tespit edilen: ${P.mime}. (Dosya uzantısı: ${t instanceof File?he(t.name):"bilinmiyor"})`):a.push("Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir.")}catch{a.push("Dosya tipi kontrol edilemedi. Dosya okunamadı.")}return{isValid:a.length===0,errors:a}}function jr(t){const{required:n=!1,message:r="Geçerli bir dosya seçiniz",requiredMessage:u="Dosya zorunludur",name:l="file",maxSize:i,minSize:a,allowedExtensions:f=[],allowedMimeTypes:h=[],sizeMessage:P,extensionMessage:T}=t||{};let k=N.mixed();return n&&(k=k.required(u)),k=k.test({name:l,message:r||"Geçerli bir dosya seçiniz",async test(R){if(!n&&!R)return!0;if(n&&!R||!(R instanceof File))return!1;if(i&&R.size>i){const v=(i/1048576).toFixed(2);return this.createError({message:P||`Dosya boyutu en fazla ${v} MB olmalıdır`})}if(a&&R.size<a){const v=(a/1048576).toFixed(2);return this.createError({message:P||`Dosya boyutu en az ${v} MB olmalıdır`})}if(f.length>0){const v=he(R.name);if(!f.includes(v))return this.createError({message:T||`İzin verilen dosya uzantıları: ${f.join(", ")}`})}if(h.length>0)try{const v=await R.arrayBuffer(),K=new Uint8Array(v),z=await Fe.fileTypeFromBuffer(K);if(!z)return this.createError({message:"Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir."});if(!h.includes(z.mime)){const ee=he(R.name);return this.createError({message:`Dosya tipi uyumsuz. Beklenen: ${h.join(", ")}, Tespit edilen: ${z.mime}. (Dosya uzantısı: ${ee})`})}}catch{return this.createError({message:"Dosya tipi kontrol edilemedi. Dosya okunamadı."})}return!0}}),k}function Or(t,n){const{minDate:r,maxDate:u}=n||{},l=typeof t=="string"?new Date(t):t;if(isNaN(l.getTime()))return{isValid:!1,error:"Geçersiz tarih formatı"};if(r){const i=typeof r=="string"?new Date(r):r;if(l<i)return{isValid:!1,error:`Tarih ${i.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`}}if(u){const i=typeof u=="string"?new Date(u):u;if(l>i)return{isValid:!1,error:`Tarih ${i.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`}}return{isValid:!0}}function Pe(t){const{required:n=!1,requiredMessage:r="Tarih zorunludur",minDate:u,maxDate:l,minDateMessage:i,maxDateMessage:a}=t||{};let f=N.date();if(n&&(f=f.required(r)),u){const h=typeof u=="string"?new Date(u):u;f=f.min(h,i||`Tarih ${h.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`)}if(l){const h=typeof l=="string"?new Date(l):l;f=f.max(h,a||`Tarih ${h.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`)}return f}function Ar(t){return Pe({...t,maxDate:new Date,maxDateMessage:(t==null?void 0:t.message)||"Tarih geçmiş bir tarih olmalıdır"})}function zr(t){return Pe({...t,minDate:new Date,minDateMessage:(t==null?void 0:t.message)||"Tarih gelecek bir tarih olmalıdır"})}var je={exports:{}},ge={};/**
|
|
1
|
+
(function(c,me){typeof exports=="object"&&typeof module<"u"?me(exports,require("yup"),require("file-type"),require("react"),require("formik"),require("@mui/material"),require("@mui/icons-material"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","yup","file-type","react","formik","@mui/material","@mui/icons-material","lodash"],me):(c=typeof globalThis<"u"?globalThis:c||self,me(c.CoreProject={},c.Yup,c.FileType,c.React,c.Formik,c.MaterialUI,c.MaterialUIIcons,c._))})(this,function(c,me,Be,R,Ce,S,Ne,vr){"use strict";function yr(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,l.get?l:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const K=yr(me),we=/^[0-9]{11}$/;function $e(t){if(!we.test(t))return!1;const n=t.split("").map(Number);return!(n[0]===0||n.slice(0,9).reduce((o,i)=>o+i,0)%10!==n[9]||n.slice(0,10).reduce((o,i)=>o+i,0)%10!==n[10])}function br(t){const{required:n=!1,message:r="Geçerli bir T.C. kimlik numarası giriniz",requiredMessage:l="T.C. kimlik numarası zorunludur",name:o="tcKimlikNo"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.matches(we,"T.C. kimlik numarası 11 haneli olmalıdır"),i=i.test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:$e(a)}}),i}const Le=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;function Ve(t){return Le.test(t)}function Er(t){const{required:n=!1,message:r="Geçerli bir email adresi giriniz",requiredMessage:l="Email zorunludur",name:o="email"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.email(r).test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ve(a)}}),i}const Ge=/^(\+90\s?)?(0?5\d{2})\s?(\d{3})\s?(\d{2})\s?(\d{2})$/;function Ue(t){const n=t.replace(/\s+/g,"").replace(/[-\+()]/g,"");return n.length!==10&&n.length!==11||!n.match(/^(0?5\d{9})$/)?!1:Ge.test(t)||/^0?5\d{9}$/.test(n)}function _r(t){const{required:n=!1,message:r="Geçerli bir telefon numarası giriniz (05XX XXX XX XX)",requiredMessage:l="Telefon numarası zorunludur",name:o="phone"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ue(a)}}),i}function Rr(t,n){const{minLength:r=8,requireUppercase:l=!0,requireLowercase:o=!0,requireNumber:i=!0,requireSpecialChar:a=!0}=n||{},f=[];return t.length<r&&f.push(`Şifre en az ${r} karakter olmalıdır`),l&&!/[A-Z]/.test(t)&&f.push("Şifre en az bir büyük harf içermelidir"),o&&!/[a-z]/.test(t)&&f.push("Şifre en az bir küçük harf içermelidir"),i&&!/\d/.test(t)&&f.push("Şifre en az bir rakam içermelidir"),a&&!/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(t)&&f.push("Şifre en az bir özel karakter içermelidir"),{isValid:f.length===0,errors:f}}function Tr(t){const{required:n=!1,requiredMessage:r="Şifre zorunludur",minLength:l=8,requireUppercase:o=!0,requireLowercase:i=!0,requireNumber:a=!0,requireSpecialChar:f=!0,minLengthMessage:h=`Şifre en az ${l} karakter olmalıdır`,uppercaseMessage:x="Şifre en az bir büyük harf içermelidir",lowercaseMessage:C="Şifre en az bir küçük harf içermelidir",numberMessage:D="Şifre en az bir rakam içermelidir",specialCharMessage:w="Şifre en az bir özel karakter içermelidir"}=t||{};let p=K.string();return n&&(p=p.required(r)),p=p.min(l,h),o&&(p=p.matches(/[A-Z]/,x)),i&&(p=p.matches(/[a-z]/,C)),a&&(p=p.matches(/\d/,D)),f&&(p=p.matches(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,w)),p}function kr(t,n){const{required:r=!1,message:l="Şifreler eşleşmiyor",requiredMessage:o="Şifre tekrarı zorunludur"}=n||{};let i=K.string();return r&&(i=i.required(o)),i=i.oneOf([K.ref(t)],l),i}const De=/^[a-zA-ZçğıöşüÇĞIİÖŞÜ\s]+$/;function Xe(t){return!t||t.trim().length===0||t.trim().length<2?!1:De.test(t)}function Sr(t){const{required:n=!1,message:r="İsim sadece harf içermelidir",requiredMessage:l="İsim zorunludur",name:o="name"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.min(2,"İsim en az 2 karakter olmalıdır").matches(De,r).test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Xe(a)}}),i}const Ke=/^TR\d{2}[0-9A-Z]{4}\d{1}[0-9A-Z]{15,30}$/i;function Ye(t){const n=t.replace(/\s+/g,"").toUpperCase();if(!Ke.test(n))return!1;const l=(n.slice(4)+n.slice(0,4)).split("").map(i=>{const a=i.charCodeAt(0);return a>=65&&a<=90?a-55:i}).join("");return BigInt(l)%BigInt(97)===BigInt(1)}function Cr(t){const{required:n=!1,message:r="Geçerli bir IBAN numarası giriniz",requiredMessage:l="IBAN zorunludur",name:o="iban"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ye(a)}}),i}const qe=/^\d{13,19}$/;function We(t){const n=t.replace(/\s+/g,"").replace(/-/g,"");if(!qe.test(n))return!1;let r=0,l=!1;for(let o=n.length-1;o>=0;o--){let i=parseInt(n[o],10);l&&(i*=2,i>9&&(i-=9)),r+=i,l=!l}return r%10===0}function wr(t){const{required:n=!1,message:r="Geçerli bir kredi kartı numarası giriniz",requiredMessage:l="Kredi kartı numarası zorunludur",name:o="creditCard"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:We(a)}}),i}const He=/^\d{10}$/;function Ze(t){if(!He.test(t))return!1;const n=t.split("").map(Number);return n.slice(0,9).reduce((o,i,a)=>{const f=(a+1)%9||9;return o+i*f},0)%11%10===n[9]}function Dr(t){const{required:n=!1,message:r="Geçerli bir VKN (Vergi Kimlik Numarası) giriniz",requiredMessage:l="VKN zorunludur",name:o="vkn"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Ze(a)}}),i}const je=/^(\d{2})\s?([A-ZÇĞIİÖŞÜ]{1,3})\s?(\d{2,4})$/i;function Je(t){const n=t.replace(/\s+/g," ").trim().toUpperCase();if(!je.test(n))return!1;const r=n.match(je);if(!r)return!1;const[,l,o,i]=r,a=parseInt(l,10);return!(a<1||a>81||o.length<1||o.length>3||i.length<2||i.length>4)}function jr(t){const{required:n=!1,message:r="Geçerli bir araç plakası giriniz (örn: 34 ABC 123)",requiredMessage:l="Araç plakası zorunludur",name:o="plate"}=t||{};let i=K.string();return n&&(i=i.required(l)),i=i.test({name:o,message:r,test(a){return!n&&(!a||a.trim()==="")?!0:n&&!a||!a||typeof a!="string"?!1:Je(a)}}),i}function he(t){const n=t.split(".");return n.length>1?n[n.length-1].toLowerCase():""}async function Or(t,n){const{maxSize:r,minSize:l,allowedExtensions:o=[],allowedMimeTypes:i=[]}=n||{},a=[];if(r&&t.size>r){const f=(r/1048576).toFixed(2);a.push(`Dosya boyutu en fazla ${f} MB olmalıdır`)}if(l&&t.size<l){const f=(l/1048576).toFixed(2);a.push(`Dosya boyutu en az ${f} MB olmalıdır`)}if(o.length>0&&i.length===0&&console.warn("⚠️ UYARI: Sadece dosya uzantısı kontrolü yapılıyor. Güvenlik için 'allowedMimeTypes' parametresini kullanarak magic bytes kontrolü yapmanız önerilir."),o.length>0&&t instanceof File){const f=he(t.name);o.includes(f)||a.push(`İzin verilen dosya uzantıları: ${o.join(", ")}`)}if(i.length>0)try{const f=await t.arrayBuffer(),h=new Uint8Array(f),x=await Be.fileTypeFromBuffer(h);x?i.includes(x.mime)||a.push(`Dosya tipi uyumsuz. Beklenen: ${i.join(", ")}, Tespit edilen: ${x.mime}. (Dosya uzantısı: ${t instanceof File?he(t.name):"bilinmiyor"})`):a.push("Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir.")}catch{a.push("Dosya tipi kontrol edilemedi. Dosya okunamadı.")}return{isValid:a.length===0,errors:a}}function Pr(t){const{required:n=!1,message:r="Geçerli bir dosya seçiniz",requiredMessage:l="Dosya zorunludur",name:o="file",maxSize:i,minSize:a,allowedExtensions:f=[],allowedMimeTypes:h=[],sizeMessage:x,extensionMessage:C}=t||{};let D=K.mixed();return n&&(D=D.required(l)),D=D.test({name:o,message:r||"Geçerli bir dosya seçiniz",async test(w){if(!n&&!w)return!0;if(n&&!w||!(w instanceof File))return!1;if(i&&w.size>i){const p=(i/1048576).toFixed(2);return this.createError({message:x||`Dosya boyutu en fazla ${p} MB olmalıdır`})}if(a&&w.size<a){const p=(a/1048576).toFixed(2);return this.createError({message:x||`Dosya boyutu en az ${p} MB olmalıdır`})}if(f.length>0){const p=he(w.name);if(!f.includes(p))return this.createError({message:C||`İzin verilen dosya uzantıları: ${f.join(", ")}`})}if(h.length>0)try{const p=await w.arrayBuffer(),Z=new Uint8Array(p),B=await Be.fileTypeFromBuffer(Z);if(!B)return this.createError({message:"Dosya tipi belirlenemedi. Dosya bozuk olabilir veya desteklenmeyen bir formatta olabilir."});if(!h.includes(B.mime)){const re=he(w.name);return this.createError({message:`Dosya tipi uyumsuz. Beklenen: ${h.join(", ")}, Tespit edilen: ${B.mime}. (Dosya uzantısı: ${re})`})}}catch{return this.createError({message:"Dosya tipi kontrol edilemedi. Dosya okunamadı."})}return!0}}),D}function xr(t,n){const{minDate:r,maxDate:l}=n||{},o=typeof t=="string"?new Date(t):t;if(isNaN(o.getTime()))return{isValid:!1,error:"Geçersiz tarih formatı"};if(r){const i=typeof r=="string"?new Date(r):r;if(o<i)return{isValid:!1,error:`Tarih ${i.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`}}if(l){const i=typeof l=="string"?new Date(l):l;if(o>i)return{isValid:!1,error:`Tarih ${i.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`}}return{isValid:!0}}function Oe(t){const{required:n=!1,requiredMessage:r="Tarih zorunludur",minDate:l,maxDate:o,minDateMessage:i,maxDateMessage:a}=t||{};let f=K.date();if(n&&(f=f.required(r)),l){const h=typeof l=="string"?new Date(l):l;f=f.min(h,i||`Tarih ${h.toLocaleDateString("tr-TR")} tarihinden sonra olmalıdır`)}if(o){const h=typeof o=="string"?new Date(o):o;f=f.max(h,a||`Tarih ${h.toLocaleDateString("tr-TR")} tarihinden önce olmalıdır`)}return f}function Ar(t){return Oe({...t,maxDate:new Date,maxDateMessage:(t==null?void 0:t.message)||"Tarih geçmiş bir tarih olmalıdır"})}function Ir(t){return Oe({...t,minDate:new Date,minDateMessage:(t==null?void 0:t.message)||"Tarih gelecek bir tarih olmalıdır"})}var Pe={exports:{}},ge={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Qe;function
|
|
9
|
+
*/var Qe;function zr(){if(Qe)return ge;Qe=1;var t=R,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(f,h,x){var C,D={},w=null,p=null;x!==void 0&&(w=""+x),h.key!==void 0&&(w=""+h.key),h.ref!==void 0&&(p=h.ref);for(C in h)l.call(h,C)&&!i.hasOwnProperty(C)&&(D[C]=h[C]);if(f&&f.defaultProps)for(C in h=f.defaultProps,h)D[C]===void 0&&(D[C]=h[C]);return{$$typeof:n,type:f,key:w,ref:p,props:D,_owner:o.current}}return ge.Fragment=r,ge.jsx=a,ge.jsxs=a,ge}var pe={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var er;function
|
|
18
|
-
`+be+e}}var
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var er;function Fr(){return er||(er=1,process.env.NODE_ENV!=="production"&&function(){var t=R,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),Z=Symbol.iterator,B="@@iterator";function re(e){if(e===null||typeof e!="object")return null;var s=Z&&e[Z]||e[B];return typeof s=="function"?s:null}var $=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(e){{for(var s=arguments.length,u=new Array(s>1?s-1:0),d=1;d<s;d++)u[d-1]=arguments[d];q("error",e,u)}}function q(e,s,u){{var d=$.ReactDebugCurrentFrame,k=d.getStackAddendum();k!==""&&(s+="%s",u=u.concat([k]));var j=u.map(function(E){return String(E)});j.unshift("Warning: "+s),Function.prototype.apply.call(console[e],console,j)}}var U=!1,te=!1,W=!1,A=!1,O=!1,L;L=Symbol.for("react.module.reference");function V(e){return!!(typeof e=="string"||typeof e=="function"||e===l||e===i||O||e===o||e===x||e===C||A||e===p||U||te||W||typeof e=="object"&&e!==null&&(e.$$typeof===w||e.$$typeof===D||e.$$typeof===a||e.$$typeof===f||e.$$typeof===h||e.$$typeof===L||e.getModuleId!==void 0))}function J(e,s,u){var d=e.displayName;if(d)return d;var k=s.displayName||s.name||"";return k!==""?u+"("+k+")":u}function ee(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case l:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case x:return"Suspense";case C:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var s=e;return ee(s)+".Consumer";case a:var u=e;return ee(u._context)+".Provider";case h:return J(e,e.render,"ForwardRef");case D:var d=e.displayName||null;return d!==null?d:N(e.type)||"Memo";case w:{var k=e,j=k._payload,E=k._init;try{return N(E(j))}catch{return null}}}return null}var g=Object.assign,v=0,m,T,P,Y,_e,le,ve;function ye(){}ye.__reactDisabledLog=!0;function xe(){{if(v===0){m=console.log,T=console.info,P=console.warn,Y=console.error,_e=console.group,le=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}v++}}function Re(){{if(v--,v===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},e,{value:m}),info:g({},e,{value:T}),warn:g({},e,{value:P}),error:g({},e,{value:Y}),group:g({},e,{value:_e}),groupCollapsed:g({},e,{value:le}),groupEnd:g({},e,{value:ve})})}v<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=$.ReactCurrentDispatcher,be;function Q(e,s,u){{if(be===void 0)try{throw Error()}catch(k){var d=k.stack.trim().match(/\n( *(at )?)/);be=d&&d[1]||""}return`
|
|
18
|
+
`+be+e}}var ie=!1,ue;{var Ee=typeof WeakMap=="function"?WeakMap:Map;ue=new Ee}function ae(e,s){if(!e||ie)return"";{var u=ue.get(e);if(u!==void 0)return u}var d;ie=!0;var k=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j;j=ne.current,ne.current=null,xe();try{if(s){var E=function(){throw Error()};if(Object.defineProperty(E.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(E,[])}catch(X){d=X}Reflect.construct(e,[],E)}else{try{E.call()}catch(X){d=X}e.call(E.prototype)}}else{try{throw Error()}catch(X){d=X}e()}}catch(X){if(X&&d&&typeof X.stack=="string"){for(var y=X.stack.split(`
|
|
19
|
+
`),G=d.stack.split(`
|
|
20
|
+
`),F=y.length-1,M=G.length-1;F>=1&&M>=0&&y[F]!==G[M];)M--;for(;F>=1&&M>=0;F--,M--)if(y[F]!==G[M]){if(F!==1||M!==1)do if(F--,M--,M<0||y[F]!==G[M]){var H=`
|
|
21
|
+
`+y[F].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),typeof e=="function"&&ue.set(e,H),H}while(F>=1&&M>=0);break}}}finally{ie=!1,ne.current=j,Re(),Error.prepareStackTrace=k}var de=e?e.displayName||e.name:"",se=de?Q(de):"";return typeof e=="function"&&ue.set(e,se),se}function Te(e,s,u){return ae(e,!1)}function oe(e){var s=e.prototype;return!!(s&&s.isReactComponent)}function ce(e,s,u){if(e==null)return"";if(typeof e=="function")return ae(e,oe(e));if(typeof e=="string")return Q(e);switch(e){case x:return Q("Suspense");case C:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case h:return Te(e.render);case D:return ce(e.type,s,u);case w:{var d=e,k=d._payload,j=d._init;try{return ce(j(k),s,u)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,z={},ke=$.ReactDebugCurrentFrame;function Se(e){if(e){var s=e._owner,u=ce(e.type,e._source,s?s.type:null);ke.setExtraStackFrame(u)}else ke.setExtraStackFrame(null)}function qr(e,s,u,d,k){{var j=Function.call.bind(I);for(var E in e)if(j(e,E)){var y=void 0;try{if(typeof e[E]!="function"){var G=Error((d||"React class")+": "+u+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw G.name="Invariant Violation",G}y=e[E](s,E,d,u,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(F){y=F}y&&!(y instanceof Error)&&(Se(k),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",d||"React class",u,E,typeof y),Se(null)),y instanceof Error&&!(y.message in z)&&(z[y.message]=!0,Se(k),_("Failed %s type: %s",u,y.message),Se(null))}}}var Wr=Array.isArray;function Ae(e){return Wr(e)}function Hr(e){{var s=typeof Symbol=="function"&&Symbol.toStringTag,u=s&&e[Symbol.toStringTag]||e.constructor.name||"Object";return u}}function Zr(e){try{return ar(e),!1}catch{return!0}}function ar(e){return""+e}function sr(e){if(Zr(e))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Hr(e)),ar(e)}var lr=$.ReactCurrentOwner,Jr={key:!0,ref:!0,__self:!0,__source:!0},ur,or;function Qr(e){if(I.call(e,"ref")){var s=Object.getOwnPropertyDescriptor(e,"ref").get;if(s&&s.isReactWarning)return!1}return e.ref!==void 0}function et(e){if(I.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return!1}return e.key!==void 0}function rt(e,s){typeof e.ref=="string"&&lr.current}function tt(e,s){{var u=function(){ur||(ur=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};u.isReactWarning=!0,Object.defineProperty(e,"key",{get:u,configurable:!0})}}function nt(e,s){{var u=function(){or||(or=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",s))};u.isReactWarning=!0,Object.defineProperty(e,"ref",{get:u,configurable:!0})}}var it=function(e,s,u,d,k,j,E){var y={$$typeof:n,type:e,key:s,ref:u,props:E,_owner:j};return y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(y,"_self",{configurable:!1,enumerable:!1,writable:!1,value:d}),Object.defineProperty(y,"_source",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y};function at(e,s,u,d,k){{var j,E={},y=null,G=null;u!==void 0&&(sr(u),y=""+u),et(s)&&(sr(s.key),y=""+s.key),Qr(s)&&(G=s.ref,rt(s,k));for(j in s)I.call(s,j)&&!Jr.hasOwnProperty(j)&&(E[j]=s[j]);if(e&&e.defaultProps){var F=e.defaultProps;for(j in F)E[j]===void 0&&(E[j]=F[j])}if(y||G){var M=typeof e=="function"?e.displayName||e.name||"Unknown":e;y&&tt(E,M),G&&nt(E,M)}return it(e,y,G,k,d,lr.current,E)}}var Ie=$.ReactCurrentOwner,cr=$.ReactDebugCurrentFrame;function fe(e){if(e){var s=e._owner,u=ce(e.type,e._source,s?s.type:null);cr.setExtraStackFrame(u)}else cr.setExtraStackFrame(null)}var ze;ze=!1;function Fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function fr(){{if(Ie.current){var e=N(Ie.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function st(e){return""}var dr={};function lt(e){{var s=fr();if(!s){var u=typeof e=="string"?e:e.displayName||e.name;u&&(s=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+u+">.")}return s}}function mr(e,s){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var u=lt(s);if(dr[u])return;dr[u]=!0;var d="";e&&e._owner&&e._owner!==Ie.current&&(d=" It was passed a child from "+N(e._owner.type)+"."),fe(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',u,d),fe(null)}}function hr(e,s){{if(typeof e!="object")return;if(Ae(e))for(var u=0;u<e.length;u++){var d=e[u];Fe(d)&&mr(d,s)}else if(Fe(e))e._store&&(e._store.validated=!0);else if(e){var k=re(e);if(typeof k=="function"&&k!==e.entries)for(var j=k.call(e),E;!(E=j.next()).done;)Fe(E.value)&&mr(E.value,s)}}}function ut(e){{var s=e.type;if(s==null||typeof s=="string")return;var u;if(typeof s=="function")u=s.propTypes;else if(typeof s=="object"&&(s.$$typeof===h||s.$$typeof===D))u=s.propTypes;else return;if(u){var d=N(s);qr(u,e.props,"prop",d,e)}else if(s.PropTypes!==void 0&&!ze){ze=!0;var k=N(s);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",k||"Unknown")}typeof s.getDefaultProps=="function"&&!s.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ot(e){{for(var s=Object.keys(e.props),u=0;u<s.length;u++){var d=s[u];if(d!=="children"&&d!=="key"){fe(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",d),fe(null);break}}e.ref!==null&&(fe(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),fe(null))}}var gr={};function pr(e,s,u,d,k,j){{var E=V(e);if(!E){var y="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(y+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var G=st();G?y+=G:y+=fr();var F;e===null?F="null":Ae(e)?F="array":e!==void 0&&e.$$typeof===n?(F="<"+(N(e.type)||"Unknown")+" />",y=" Did you accidentally export a JSX literal instead of a component?"):F=typeof e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",F,y)}var M=at(e,s,u,k,j);if(M==null)return M;if(E){var H=s.children;if(H!==void 0)if(d)if(Ae(H)){for(var de=0;de<H.length;de++)hr(H[de],e);Object.freeze&&Object.freeze(H)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else hr(H,e)}if(I.call(s,"key")){var se=N(e),X=Object.keys(s).filter(function(gt){return gt!=="key"}),Me=X.length>0?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}";if(!gr[se+Me]){var ht=X.length>0?"{"+X.join(": ..., ")+": ...}":"{}";_(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,xe,ae,mt,ae),hr[ae+xe]=!0}}return e===u?ut(A):ot(A),A}}function lt(e,s,o){return gr(e,s,o,!0)}function ct(e,s,o){return gr(e,s,o,!1)}var ft=ct,dt=lt;pe.Fragment=u,pe.jsx=ft,pe.jsxs=dt}()),pe}process.env.NODE_ENV==="production"?je.exports=Ir():je.exports=Mr();var C=je.exports;function rr(t){return t.replace(/ı/g,"I").replace(/i/g,"İ").replace(/ğ/g,"Ğ").replace(/ü/g,"Ü").replace(/ş/g,"Ş").replace(/ö/g,"Ö").replace(/ç/g,"Ç").toUpperCase().replace(/I/g,"ı").replace(/İ/g,"İ").replace(/Ğ/g,"ğ").replace(/Ü/g,"ü").replace(/Ş/g,"ş").replace(/Ö/g,"ö").replace(/Ç/g,"ç")}const xr=300,Fr=1,$r=["password","email","number","tel","url"],Nr=["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"];function Br(t,n,r){return r||$r.includes(n)||!t?t:rr(t)}function Lr(t){return/[0-9.]/.test(t)||Nr.includes(t)}function Vr(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:r.length<=8?`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8)}`}function Gr(t){const r=t.replace(/\D/g,"").slice(0,8);return r.length===0?"":r.length<=2?r:r.length<=4?`${r.slice(0,2)}/${r.slice(2)}`:`${r.slice(0,2)}/${r.slice(2,4)}/${r.slice(4)}`}function qr(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`}function Ur(t){const r=t.replace(/[^A-Za-z0-9]/g,"").toUpperCase().slice(0,26);return r.length===0?"":r.length<=4?r:r.length<=8?`${r.slice(0,4)} ${r.slice(4)}`:r.length<=12?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8)}`:r.length<=16?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12)}`:r.length<=20?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16)}`:r.length<=24?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20)}`:`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20,24)} ${r.slice(24)}`}function Xr(t,n){if(!n)return t;if(typeof n=="function")return n(t);switch(n){case"phone":return Vr(t);case"date":return Gr(t);case"tcKimlikNo":return qr(t);case"iban":return Ur(t);default:return t}}const tr=S.forwardRef(({name:t,label:n,type:r="text",placeholder:u,className:l,fieldToSearch:i,onSuggestionSearch:a,disabled:f=!1,step:h,min:P,max:T,startAdornment:k,endAdornment:R,disableUppercase:v=!1,required:K=!1,fullWidth:z,debounceDelay:ee=xr,minSearchLength:U=Fr,helperText:E,autoFocus:Y,multiline:se,rows:re,maxLength:W,errorMessageFormatter:O,"aria-label":X,"aria-describedby":V,sx:Z,inputSx:te,inputElementSx:H,mask:I,showPasswordToggle:g=!1,...y},B)=>{const[G,x,ne]=$e.useField(t),[_e,oe]=S.useState([]),[ve,ye]=S.useState(!1),[Oe,Re]=S.useState(!1),[J,be]=S.useState(!1),q=S.useRef(i&&a?pr.debounce(async D=>{if(D.length>=U){ye(!0);try{const w=await a(i,D);oe(w)}catch(w){console.error("Search error:",w),oe([])}ye(!1)}else oe([])},ee):null).current;S.useEffect(()=>{q&&G.value&&q(G.value)},[G.value,q]),S.useEffect(()=>()=>{q&&q.cancel()},[q]);const Q=S.useCallback(D=>{let w=Br(D,r,v);return I&&r!=="password"&&(w=Xr(w,I)),w},[r,v,I]),ue=S.useCallback(()=>{be(D=>!D)},[]),Ee=S.useMemo(()=>r==="password"&&J?"text":r,[r,J]),ie=S.useMemo(()=>{if(!(!x.touched||!x.error))return O?O(x.error):x.error},[x.touched,x.error,O]),Te=S.useMemo(()=>ie||E,[ie,E]),le=S.useMemo(()=>{var D;return{name:t,label:n,type:Ee,placeholder:u,required:K,disabled:f,error:x.touched&&!!x.error,helperText:Te,className:l,fullWidth:z!==void 0?z:!!n,autoFocus:Y,multiline:se,rows:re,sx:H?[Z,{"& .MuiInputBase-input":H}].filter(Boolean):Z,inputProps:{maxLength:W,step:h,min:P,max:T,...r==="number"&&{onKeyDown:w=>{Lr(w.key)||w.preventDefault()}},...y.inputProps},InputProps:{startAdornment:k?C.jsx(M.InputAdornment,{position:"start",children:k}):void 0,endAdornment:C.jsxs(C.Fragment,{children:[r==="password"&&g&&C.jsx(M.InputAdornment,{position:"end",children:C.jsx(M.IconButton,{"aria-label":"Şifreyi göster/gizle",onClick:ue,edge:"end",children:J?C.jsx(Ne.VisibilityOff,{}):C.jsx(Ne.Visibility,{})})}),R?C.jsx(M.InputAdornment,{position:"end",children:R}):void 0,(D=y.InputProps)==null?void 0:D.endAdornment]}),...te&&{sx:te},...y.InputProps},"aria-label":X,"aria-describedby":V||(ie?`${t}-error`:void 0),"aria-invalid":x.touched&&x.error?!0:void 0,ref:B,...y}},[t,n,Ee,u,K,f,x.touched,x.error,Te,l,z,Y,se,re,W,h,P,T,k,R,X,V,Z,te,H,I,g,J,Ee,y]);if(i&&a)return C.jsx(M.Autocomplete,{freeSolo:!0,open:Oe,onOpen:()=>Re(!0),onClose:()=>Re(!1),options:_e,loading:ve,disabled:f,value:G.value||"",onChange:(D,w)=>{const ke=w||"";ne.setValue(Q(ke))},onInputChange:(D,w)=>{ne.setValue(Q(w))},renderInput:D=>{var w;return C.jsx(M.TextField,{...D,...le,InputProps:{...D.InputProps,...le.InputProps,endAdornment:C.jsxs(C.Fragment,{children:[ve?C.jsx(M.CircularProgress,{color:"inherit",size:20}):null,(w=le.InputProps)==null?void 0:w.endAdornment,D.InputProps.endAdornment]})},ref:B})}});const ce=S.useCallback(D=>{const w=D.target.value;ne.setValue(Q(w))},[ne,Q]);return C.jsx(M.TextField,{...le,value:G.value||"",onChange:ce,onBlur:G.onBlur})});tr.displayName="FormikTextField";const nr=S.forwardRef(({name:t,options:n=[],label:r,placeholder:u,className:l,disabled:i=!1,required:a=!1,fullWidth:f=!0,helperText:h,autoFocus:P,errorMessageFormatter:T,"aria-label":k,"aria-describedby":R,sx:v,formControlSx:K,multiple:z=!1,searchable:ee=!1,searchPlaceholder:U,onChange:E,renderOption:Y,...se},re)=>{const[W,O,X]=$e.useField(t),V=S.useMemo(()=>{if(!(!O.touched||!O.error))return T?T(O.error):O.error},[O.touched,O.error,T]),Z=S.useMemo(()=>V||h,[V,h]),te=S.useCallback(g=>{const y=g.target.value;X.setValue(y),E&&E(y)},[X,E]),H=S.useCallback((g,y)=>{if(z){const B=Array.isArray(y)?y.map(G=>G.value):[];X.setValue(B),E&&E(B)}else{const B=y&&!Array.isArray(y)?y.value:"";X.setValue(B),E&&E(B)}},[X,E,z]),I=`${t}-select`;return ee?C.jsx(M.Autocomplete,{ref:re,options:n,getOptionLabel:g=>g.label,value:z?n.filter(g=>{var y;return(y=W.value)==null?void 0:y.includes(g.value)}):n.find(g=>g.value===W.value)||null,onChange:H,multiple:z,disabled:i,fullWidth:f,renderInput:g=>C.jsx(M.TextField,{...g,name:t,label:r,placeholder:U||u,required:a,error:O.touched&&!!O.error,helperText:Z,className:l,autoFocus:P,inputProps:{...g.inputProps,"aria-label":k,"aria-describedby":R||(V?`${t}-error`:void 0),"aria-invalid":O.touched&&O.error?!0:void 0},sx:v}),renderOption:(g,y)=>S.createElement("li",{...g,key:y.value},Y?Y(y,n.indexOf(y)):y.label),getOptionDisabled:g=>{if(typeof g=="object")return g.disabled||!1;const y=n.find(B=>B.value===g);return(y==null?void 0:y.disabled)||!1}}):C.jsxs(M.FormControl,{ref:re,fullWidth:f,error:O.touched&&!!O.error,className:l,disabled:i,required:a,sx:K,children:[r&&C.jsx(M.InputLabel,{id:`${I}-label`,required:a,children:r}),C.jsxs(M.Select,{labelId:r?`${I}-label`:void 0,id:I,name:t,value:W.value??(z?[]:""),onChange:te,onBlur:W.onBlur,label:r,displayEmpty:!!u,multiple:z,autoFocus:P,inputProps:{"aria-label":k,"aria-describedby":R||(V?`${t}-error`:void 0),"aria-invalid":O.touched&&O.error?!0:void 0},sx:v,...se,children:[u&&C.jsx(M.MenuItem,{value:z?[]:"",disabled:!0,children:u}),n.map(g=>C.jsx(M.MenuItem,{value:g.value,disabled:g.disabled,children:Y?Y(g,n.indexOf(g)):g.label},g.value))]}),Z&&C.jsx(M.FormHelperText,{children:Z})]})});nr.displayName="FormikDropdown",c.CREDIT_CARD_REGEX=Ye,c.EMAIL_REGEX=Le,c.FormikDropdown=nr,c.FormikTextField=tr,c.IBAN_REGEX=Xe,c.NAME_REGEX=Ce,c.PHONE_REGEX=Ge,c.PLATE_REGEX=we,c.TC_KIMLIK_NO_REGEX=De,c.VKN_REGEX=Ze,c.creditCardSchema=Dr,c.dateSchema=Pe,c.emailSchema=br,c.fileSchema=jr,c.futureDateSchema=zr,c.getFileExtension=he,c.ibanSchema=Sr,c.nameSchema=kr,c.passwordMatchSchema=Tr,c.passwordSchema=Rr,c.pastDateSchema=Ar,c.phoneSchema=Er,c.plateSchema=wr,c.tcKimlikNoSchema=yr,c.toTurkishUpperCase=rr,c.validateCreditCard=We,c.validateDate=Or,c.validateEmail=Ve,c.validateFile=Pr,c.validateIBAN=Ke,c.validateName=Ue,c.validatePassword=_r,c.validatePhone=qe,c.validatePlate=Je,c.validateTCKimlikNo=Be,c.validateVKN=He,c.vknSchema=Cr,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
30
|
+
<%s key={someKey} {...props} />`,Me,se,ht,se),gr[se+Me]=!0}}return e===l?ot(M):ut(M),M}}function ct(e,s,u){return pr(e,s,u,!0)}function ft(e,s,u){return pr(e,s,u,!1)}var dt=ft,mt=ct;pe.Fragment=l,pe.jsx=dt,pe.jsxs=mt}()),pe}process.env.NODE_ENV==="production"?Pe.exports=zr():Pe.exports=Fr();var b=Pe.exports;function rr(t){return t.replace(/ı/g,"I").replace(/i/g,"İ").replace(/ğ/g,"Ğ").replace(/ü/g,"Ü").replace(/ş/g,"Ş").replace(/ö/g,"Ö").replace(/ç/g,"Ç").toUpperCase().replace(/I/g,"ı").replace(/İ/g,"İ").replace(/Ğ/g,"ğ").replace(/Ü/g,"ü").replace(/Ş/g,"ş").replace(/Ö/g,"ö").replace(/Ç/g,"ç")}const Mr=300,Br=1,Nr=["password","email","number","tel","url"],$r=["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"];function Lr(t,n,r){return r||Nr.includes(n)||!t?t:rr(t)}function Vr(t){return/[0-9.]/.test(t)||$r.includes(t)}function Gr(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:r.length<=8?`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8)}`}function Ur(t){const r=t.replace(/\D/g,"").slice(0,8);return r.length===0?"":r.length<=2?r:r.length<=4?`${r.slice(0,2)}/${r.slice(2)}`:`${r.slice(0,2)}/${r.slice(2,4)}/${r.slice(4)}`}function Xr(t){const r=t.replace(/\D/g,"").slice(0,11);return r.length===0?"":r.length<=3?r:r.length<=6?`${r.slice(0,3)} ${r.slice(3)}`:`${r.slice(0,3)} ${r.slice(3,6)} ${r.slice(6)}`}function Kr(t){const r=t.replace(/[^A-Za-z0-9]/g,"").toUpperCase().slice(0,26);return r.length===0?"":r.length<=4?r:r.length<=8?`${r.slice(0,4)} ${r.slice(4)}`:r.length<=12?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8)}`:r.length<=16?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12)}`:r.length<=20?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16)}`:r.length<=24?`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20)}`:`${r.slice(0,4)} ${r.slice(4,8)} ${r.slice(8,12)} ${r.slice(12,16)} ${r.slice(16,20)} ${r.slice(20,24)} ${r.slice(24)}`}function Yr(t,n){if(!n)return t;if(typeof n=="function")return n(t);switch(n){case"phone":return Gr(t);case"date":return Ur(t);case"tcKimlikNo":return Xr(t);case"iban":return Kr(t);default:return t}}const tr=R.forwardRef(({name:t,label:n,type:r="text",placeholder:l,className:o,fieldToSearch:i,onSuggestionSearch:a,disabled:f=!1,step:h,min:x,max:C,startAdornment:D,endAdornment:w,disableUppercase:p=!1,required:Z=!1,fullWidth:B,debounceDelay:re=Mr,minSearchLength:$=Br,helperText:_,autoFocus:q,multiline:U,rows:te,maxLength:W,errorMessageFormatter:A,"aria-label":O,"aria-describedby":L,sx:V,inputSx:J,inputElementSx:ee,mask:N,showPasswordToggle:g=!1,...v},m)=>{const[T,P,Y]=Ce.useField(t),[_e,le]=R.useState([]),[ve,ye]=R.useState(!1),[xe,Re]=R.useState(!1),[ne,be]=R.useState(!1),Q=R.useRef(i&&a?vr.debounce(async I=>{if(I.length>=$){ye(!0);try{const z=await a(i,I);le(z)}catch(z){console.error("Search error:",z),le([])}ye(!1)}else le([])},re):null).current;R.useEffect(()=>{Q&&T.value&&Q(T.value)},[T.value,Q]),R.useEffect(()=>()=>{Q&&Q.cancel()},[Q]);const ie=R.useCallback(I=>{let z=Lr(I,r,p);return N&&r!=="password"&&(z=Yr(z,N)),z},[r,p,N]),ue=R.useCallback(()=>{be(I=>!I)},[]),Ee=R.useMemo(()=>r==="password"&&ne?"text":r,[r,ne]),ae=R.useMemo(()=>{if(!(!P.touched||!P.error))return A?A(P.error):P.error},[P.touched,P.error,A]),Te=R.useMemo(()=>ae||_,[ae,_]),oe=R.useMemo(()=>{var I;return{name:t,label:n,type:Ee,placeholder:l,required:Z,disabled:f,error:P.touched&&!!P.error,helperText:Te,className:o,fullWidth:B!==void 0?B:!!n,autoFocus:q,multiline:U,rows:te,sx:ee?[V,{"& .MuiInputBase-input":ee}].filter(Boolean):V,inputProps:{maxLength:W,step:h,min:x,max:C,...r==="number"&&{onKeyDown:z=>{Vr(z.key)||z.preventDefault()}},...v.inputProps},InputProps:{startAdornment:D?b.jsx(S.InputAdornment,{position:"start",children:D}):void 0,endAdornment:b.jsxs(b.Fragment,{children:[r==="password"&&g&&b.jsx(S.InputAdornment,{position:"end",children:b.jsx(S.IconButton,{"aria-label":"Şifreyi göster/gizle",onClick:ue,edge:"end",children:ne?b.jsx(Ne.VisibilityOff,{}):b.jsx(Ne.Visibility,{})})}),w?b.jsx(S.InputAdornment,{position:"end",children:w}):void 0,(I=v.InputProps)==null?void 0:I.endAdornment]}),...J&&{sx:J},...v.InputProps},"aria-label":O,"aria-describedby":L||(ae?`${t}-error`:void 0),"aria-invalid":P.touched&&P.error?!0:void 0,ref:m,...v}},[t,n,Ee,l,Z,f,P.touched,P.error,Te,o,B,q,U,te,W,h,x,C,D,w,O,L,V,J,ee,N,g,ne,Ee,v]);if(i&&a)return b.jsx(S.Autocomplete,{freeSolo:!0,open:xe,onOpen:()=>Re(!0),onClose:()=>Re(!1),options:_e,loading:ve,disabled:f,value:T.value||"",onChange:(I,z)=>{const ke=z||"";Y.setValue(ie(ke))},onInputChange:(I,z)=>{Y.setValue(ie(z))},renderInput:I=>{var z;return b.jsx(S.TextField,{...I,...oe,InputProps:{...I.InputProps,...oe.InputProps,endAdornment:b.jsxs(b.Fragment,{children:[ve?b.jsx(S.CircularProgress,{color:"inherit",size:20}):null,(z=oe.InputProps)==null?void 0:z.endAdornment,I.InputProps.endAdornment]})},ref:m})}});const ce=R.useCallback(I=>{const z=I.target.value;Y.setValue(ie(z))},[Y,ie]);return b.jsx(S.TextField,{...oe,value:T.value||"",onChange:ce,onBlur:T.onBlur})});tr.displayName="FormikTextField";const nr=R.forwardRef(({name:t,options:n=[],label:r,placeholder:l,className:o,disabled:i=!1,required:a=!1,fullWidth:f=!0,helperText:h,autoFocus:x,errorMessageFormatter:C,"aria-label":D,"aria-describedby":w,sx:p,formControlSx:Z,multiple:B=!1,searchable:re=!1,searchPlaceholder:$,onChange:_,renderOption:q,...U},te)=>{const[W,A,O]=Ce.useField(t),L=R.useMemo(()=>{if(!(!A.touched||!A.error))return C?C(A.error):A.error},[A.touched,A.error,C]),V=R.useMemo(()=>L||h,[L,h]),J=R.useCallback(g=>{const v=g.target.value;O.setValue(v),_&&_(v)},[O,_]),ee=R.useCallback((g,v)=>{if(B){const m=Array.isArray(v)?v.map(T=>T.value):[];O.setValue(m),_&&_(m)}else{const m=v&&!Array.isArray(v)?v.value:"";O.setValue(m),_&&_(m)}},[O,_,B]),N=`${t}-select`;return re?b.jsx(S.Autocomplete,{ref:te,options:n,getOptionLabel:g=>g.label,value:B?n.filter(g=>{var v;return(v=W.value)==null?void 0:v.includes(g.value)}):n.find(g=>g.value===W.value)||null,onChange:ee,multiple:B,disabled:i,fullWidth:f,renderInput:g=>b.jsx(S.TextField,{...g,name:t,label:r,placeholder:$||l,required:a,error:A.touched&&!!A.error,helperText:V,className:o,autoFocus:x,inputProps:{...g.inputProps,"aria-label":D,"aria-describedby":w||(L?`${t}-error`:void 0),"aria-invalid":A.touched&&A.error?!0:void 0},sx:p}),renderOption:(g,v)=>R.createElement("li",{...g,key:v.value},q?q(v,n.indexOf(v)):v.label),getOptionDisabled:g=>{if(typeof g=="object")return g.disabled||!1;const v=n.find(m=>m.value===g);return(v==null?void 0:v.disabled)||!1}}):b.jsxs(S.FormControl,{ref:te,fullWidth:f,error:A.touched&&!!A.error,className:o,disabled:i,required:a,sx:Z,children:[r&&b.jsx(S.InputLabel,{id:`${N}-label`,required:a,children:r}),b.jsxs(S.Select,{labelId:r?`${N}-label`:void 0,id:N,name:t,value:W.value??(B?[]:""),onChange:J,onBlur:W.onBlur,label:r,displayEmpty:!!l,multiple:B,autoFocus:x,inputProps:{"aria-label":D,"aria-describedby":w||(L?`${t}-error`:void 0),"aria-invalid":A.touched&&A.error?!0:void 0},sx:p,...U,children:[l&&b.jsx(S.MenuItem,{value:B?[]:"",disabled:!0,children:l}),n.map(g=>b.jsx(S.MenuItem,{value:g.value,disabled:g.disabled,children:q?q(g,n.indexOf(g)):g.label},g.value))]}),V&&b.jsx(S.FormHelperText,{children:V})]})});nr.displayName="FormikDropdown";const ir=R.forwardRef(({name:t,options:n=[],label:r,placeholder:l,className:o,disabled:i=!1,required:a=!1,fullWidth:f=!0,helperText:h,autoFocus:x,errorMessageFormatter:C,"aria-label":D,"aria-describedby":w,sx:p,formControlSx:Z,searchable:B=!1,searchPlaceholder:re,onChange:$,renderOption:_,renderValue:q,chipMaxWidth:U,...te},W)=>{const[A,O,L]=Ce.useField(t),V=R.useMemo(()=>{if(!(!O.touched||!O.error))return C?C(O.error):O.error},[O.touched,O.error,C]),J=R.useMemo(()=>V||h,[V,h]),ee=R.useCallback(m=>{const T=m.target.value;L.setValue(T),$&&$(T)},[L,$]),N=R.useCallback((m,T)=>{const P=T.map(Y=>Y.value);L.setValue(P),$&&$(P)},[L,$]),g=R.useCallback(m=>m.length===0?l||"":b.jsx(S.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:m.map(T=>{const P=n.find(Y=>Y.value===T);return b.jsx(S.Chip,{label:(P==null?void 0:P.label)||String(T),size:"small",sx:{maxWidth:U,"& .MuiChip-label":{overflow:U?"hidden":"visible",textOverflow:U?"ellipsis":"clip"}}},T)})}),[n,l,U]),v=`${t}-multiselect`;return B?b.jsx(S.Autocomplete,{ref:W,multiple:!0,options:n,getOptionLabel:m=>m.label,value:n.filter(m=>(A.value||[]).includes(m.value)),onChange:N,disabled:i,fullWidth:f,renderInput:m=>b.jsx(S.TextField,{...m,name:t,label:r,placeholder:re||l,required:a,error:O.touched&&!!O.error,helperText:J,className:o,autoFocus:x,inputProps:{...m.inputProps,"aria-label":D,"aria-describedby":w||(V?`${t}-error`:void 0),"aria-invalid":O.touched&&O.error?!0:void 0},sx:p}),renderOption:(m,T)=>R.createElement("li",{...m,key:T.value},_?_(T,n.indexOf(T)):T.label),renderTags:(m,T)=>b.jsx(S.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:m.map((P,Y)=>R.createElement(S.Chip,{...T({index:Y}),key:P.value,label:P.label,size:"small",sx:{maxWidth:U,"& .MuiChip-label":{overflow:U?"hidden":"visible",textOverflow:U?"ellipsis":"clip"}}}))}),getOptionDisabled:m=>m.disabled||!1}):b.jsxs(S.FormControl,{ref:W,fullWidth:f,error:O.touched&&!!O.error,className:o,disabled:i,required:a,sx:Z,children:[r&&b.jsx(S.InputLabel,{id:`${v}-label`,required:a,children:r}),b.jsxs(S.Select,{labelId:r?`${v}-label`:void 0,id:v,name:t,multiple:!0,value:A.value||[],onChange:ee,onBlur:A.onBlur,label:r,displayEmpty:!!l,autoFocus:x,input:b.jsx(S.OutlinedInput,{label:r}),renderValue:m=>{const T=m;return q?q(T):g(T)},inputProps:{"aria-label":D,"aria-describedby":w||(V?`${t}-error`:void 0),"aria-invalid":O.touched&&O.error?!0:void 0},sx:p,...te,children:[l&&b.jsx(S.MenuItem,{value:"",disabled:!0,children:l}),n.map(m=>b.jsx(S.MenuItem,{value:m.value,disabled:m.disabled,children:_?_(m,n.indexOf(m)):m.label},m.value))]}),J&&b.jsx(S.FormHelperText,{children:J})]})});ir.displayName="FormikMultiSelect",c.CREDIT_CARD_REGEX=qe,c.EMAIL_REGEX=Le,c.FormikDropdown=nr,c.FormikMultiSelect=ir,c.FormikTextField=tr,c.IBAN_REGEX=Ke,c.NAME_REGEX=De,c.PHONE_REGEX=Ge,c.PLATE_REGEX=je,c.TC_KIMLIK_NO_REGEX=we,c.VKN_REGEX=He,c.creditCardSchema=wr,c.dateSchema=Oe,c.emailSchema=Er,c.fileSchema=Pr,c.futureDateSchema=Ir,c.getFileExtension=he,c.ibanSchema=Cr,c.nameSchema=Sr,c.passwordMatchSchema=kr,c.passwordSchema=Tr,c.pastDateSchema=Ar,c.phoneSchema=_r,c.plateSchema=jr,c.tcKimlikNoSchema=br,c.toTurkishUpperCase=rr,c.validateCreditCard=We,c.validateDate=xr,c.validateEmail=Ve,c.validateFile=Or,c.validateIBAN=Ye,c.validateName=Xe,c.validatePassword=Rr,c.validatePhone=Ue,c.validatePlate=Je,c.validateTCKimlikNo=$e,c.validateVKN=Ze,c.vknSchema=Dr,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|