2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
import{j as u,a9 as c,T as t,p as l,b as C,am as y,ak as $,ar as s,aJ as N,b1 as O,B as n}from"./mui-vendor-CkIVaoQP.js";import{G as a,S as v,A as z,fD as G,O as j}from"./index-N50kY0pn.js";import{B as H}from"./BackButton-jnQBD0Yv.js";import{T as D}from"./Timer-CiMxtmM_.js";import{L as g}from"./LineWithText-BpnpjRWf.js";import{C as d}from"./CustomCard-B-6dDbAN.js";import{C as U}from"./Captcha-CBxUIUNI.js";import{D as q}from"./DialogAlert-CXpCXybP.js";import{S as V}from"./SimpleTable-CB4BAAR3.js";import{R as J}from"./ResponsiveTable-C_snJsEO.js";import{C as X,a as K}from"./ChartLenear-WgLA0J0V.js";import{r as b}from"./react-vendor-CmFgShSM.js";import{C as k,M as Y,B,I as Z}from"./chart-vendor-sE2SUVPW.js";import"./auto-gcBAg08D.js";import{d as u0}from"./Add-CXfAQ_ni.js";import{d as T}from"./Search-DJS_LN_I.js";import{d as t0}from"./Delete-CiVJBR3T.js";import{d as e0}from"./Edit-D7uewMTe.js";import{d as C0}from"./Save-BYcN751T.js";import{d as a0}from"./Settings-C1kAmh58.js";import{d as o0}from"./Person-Dzm9gTl-.js";import{u as n0}from"./redux-vendor-B7uoacJt.js";import"./index-Cyn2oTqg.js";import"./Close-Cnq7tLoz.js";import"./FilterAlt-CF131fPn.js";import"./styled-components.browser.esm-gS9mh05b.js";const r=({Icon:o,onClick:m,title:F})=>u.jsx(a,{container:!0,sx:{cursor:"pointer",width:{xs:"100%",sm:"auto"}},onClick:m,children:u.jsx(c,{elevation:3,sx:{flexGrow:1,justifyContent:"center",alignItems:"center",display:"flex"},children:u.jsxs(a,{container:!0,p:v.SMALL,gap:v.SMALL,children:[u.jsx(o,{color:"primary"}),u.jsx(t,{variant:"body1",color:"primary",children:F})]})})});r.propTypes={Icon:l.PropTypes.any,onClick:l.PropTypes.func,title:l.PropTypes.string};B.font.family="iranyekan";const R=({chartData:o})=>(console.log(k),u.jsx(Y,{data:o}));R.propTypes={chartData:l.PropTypes.any};B.font.family="iranyekan";const S=({chartData:o})=>(console.log(k),u.jsx(Z,{data:o}));S.propTypes={chartData:l.PropTypes.any};const I0=()=>{const[o,m]=b.useState(""),[F,w]=b.useState(!1),[p]=b.useContext(z),h=n0(),I={labels:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور"],datasets:[{label:"فروش",backgroundColor:["rgba(33, 72, 214, 0.7)"],data:[65,59,80,81,56,55],borderRadius:5},{label:"خرید",backgroundColor:["rgba(100, 130, 160, 0.7)"],data:[45,49,60,71,46,35],borderRadius:5}]},f={labels:["فعال","غیرفعال","در حال بررسی","رد شده"],datasets:[{label:"تعداد",data:[300,50,100,40],backgroundColor:["rgba(75, 192, 192, 0.7)","rgba(255, 99, 132, 0.7)","rgba(255, 205, 86, 0.7)","rgba(201, 203, 207, 0.7)"]}]},P={labels:["هفته 1","هفته 2","هفته 3","هفته 4"],datasets:[{label:"روند رشد",fill:!1,borderColor:"rgb(75, 192, 192)",tension:.1,data:[12,19,13,25]}]},L=["ردیف","نام","نام خانوادگی","شهر","وضعیت"],W=[[1,"احمد","محمدی","تهران","فعال"],[2,"فاطمه","رضایی","اصفهان","فعال"],[3,"حسین","کریمی","مشهد","غیرفعال"],[4,"مریم","احمدی","شیراز","فعال"],[5,"علی","حسینی","تبریز","در حال بررسی"]],M=["ردیف","کد درخواست","نام متقاضی","تاریخ ثبت","مقدار (کیلوگرم)","قیمت کل (ریال)","وضعیت"],Q=[[1,"REQ-1001","احمد محمدی","1402/09/15","1,250","62,500,000","تایید شده"],[2,"REQ-1002","فاطمه رضایی","1402/09/16","2,100","105,000,000","در انتظار"],[3,"REQ-1003","حسین کریمی","1402/09/17","850","42,500,000","رد شده"],[4,"REQ-1004","مریم احمدی","1402/09/18","3,200","160,000,000","تایید شده"],[5,"REQ-1005","علی حسینی","1402/09/19","1,750","87,500,000","در انتظار"],[6,"REQ-1006","زهرا کاظمی","1402/09/20","950","47,500,000","تایید شده"],[7,"REQ-1007","محمد تقیزاده","1402/09/21","2,450","122,500,000","تایید شده"],[8,"REQ-1008","سارا موسوی","1402/09/22","1,100","55,000,000","در انتظار"],[9,"REQ-1009","رضا نوری","1402/09/23","3,800","190,000,000","تایید شده"],[10,"REQ-1010","نرگس احمدی","1402/09/24","1,450","72,500,000","رد شده"],[11,"REQ-1011","امیر حسینی","1402/09/25","2,650","132,500,000","تایید شده"],[12,"REQ-1012","لیلا کریمی","1402/09/26","890","44,500,000","در انتظار"]],x=[{category:"🧭 Navigation",items:[{name:"BackButton",description:"دکمه بازگشت با آیکون",path:"components/back-button/BackButton.js",component:u.jsx(H,{})}]},{category:"🔘 Buttons & Actions",items:[{name:"ButtonWithIcon",description:"دکمه با آیکون - انواع مختلف",path:"components/button-with-icon/ButtonWithIcon.js",component:u.jsxs(a,{container:!0,gap:2,flexWrap:"wrap",children:[u.jsx(r,{Icon:G,title:"صفحه اصلی",onClick:()=>alert("کلیک روی صفحه اصلی")}),u.jsx(r,{Icon:u0,title:"افزودن",onClick:()=>alert("کلیک روی افزودن")}),u.jsx(r,{Icon:T,title:"جستجو",onClick:()=>alert("کلیک روی جستجو")}),u.jsx(r,{Icon:t0,title:"حذف",onClick:()=>alert("کلیک روی حذف")}),u.jsx(r,{Icon:e0,title:"ویرایش",onClick:()=>alert("کلیک روی ویرایش")}),u.jsx(r,{Icon:C0,title:"ذخیره",onClick:()=>alert("کلیک روی ذخیره")}),u.jsx(r,{Icon:a0,title:"تنظیمات",onClick:()=>alert("کلیک روی تنظیمات")}),u.jsx(r,{Icon:o0,title:"پروفایل",onClick:()=>alert("کلیک روی پروفایل")})]})}]},{category:"🎴 Cards & Display",items:[{name:"CustomCard",description:"کارت سفارشی با گرادیانت و تصویر پسزمینه",path:"components/custom-card/CustomCard.js",component:u.jsxs(a,{container:!0,gap:2,flexWrap:"wrap",children:[u.jsx(d,{title:"آمار کل درخواستها",value:"۱,۲۳۴"}),u.jsx(d,{title:"کاربران فعال",value:"۵۶۷"}),u.jsx(d,{title:"پروندههای باز",value:"۸۹"}),u.jsx(d,{title:"تراکنشهای امروز",value:"۱۲۳"})]})}]},{category:"📐 Layout & Structure",items:[{name:"LineWithText",description:"خط تقسیم کننده با متن و گرادیانت رنگی",path:"components/line-with-text/LineWithText.js",component:u.jsxs(C,{children:[u.jsx(g,{text:"بخش اطلاعات کاربری"}),u.jsx(t,{variant:"body2",mb:2,children:"محتوای بخش اول"}),u.jsx(g,{text:"بخش تنظیمات"}),u.jsx(t,{variant:"body2",mb:2,children:"محتوای بخش دوم"}),u.jsx(g,{text:"بخش گزارشها"})]})}]},{category:"⏱️ Time & Counters",items:[{name:"Timer",description:"تایمر شمارش معکوس با فرمتهای مختلف",path:"components/timer/Timer.js",component:u.jsxs(a,{container:!0,gap:3,direction:"column",children:[u.jsxs(C,{children:[u.jsx(t,{variant:"subtitle2",mb:1,children:"تایمر ساعتی (HH:MM:SS):"}),u.jsx(c,{sx:{p:2,display:"inline-block"},children:u.jsx(D,{seconds:3665})})]}),u.jsxs(C,{children:[u.jsx(t,{variant:"subtitle2",mb:1,children:"تایمر روزانه (DD:HH:MM:SS):"}),u.jsx(c,{sx:{p:2,display:"inline-block"},children:u.jsx(D,{seconds:186400,isFilePaymentTime:!0})})]})]})}]},{category:"📝 Forms & Inputs",items:[{name:"Captcha",description:"کد امنیتی (کپچا) با قابلیت تولید مجدد و پخش صوتی",path:"components/captcha/Captcha.js",component:u.jsxs(C,{children:[u.jsx(U,{onChange:e=>w(e)}),u.jsxs(t,{variant:"caption",color:"text.secondary",mt:1,children:["وضعیت: ",F?"✅ معتبر":"❌ نامعتبر"]})]})}]},{category:"🔔 Modals & Dialogs",items:[{name:"Modal (Global)",description:"سیستم مودال سراسری با Redux",path:"components/modal/Modal.js",component:u.jsxs(C,{children:[u.jsxs(a,{container:!0,gap:2,direction:"column",children:[u.jsx(n,{variant:"contained",onClick:()=>h(j({title:"عنوان مودال",content:u.jsx(C,{p:2,children:u.jsx(t,{children:"این یک مودال سراسری است که از Redux استفاده میکند"})})})),children:"باز کردن مودال معمولی"}),u.jsx(n,{variant:"contained",color:"success",onClick:()=>h(j({title:"success",content:null})),children:"مودال موفقیت"}),u.jsx(n,{variant:"contained",color:"error",onClick:()=>h(j({title:"error",content:null})),children:"مودال خطا"})]}),u.jsx(t,{variant:"caption",color:"text.secondary",mt:2,children:"این کامپوننت از Redux (appSlice) استفاده میکند"})]})},{name:"DialogAlert",description:"دیالوگ با دکمه تریگر داخلی",path:"components/dialog-alert/DialogAlert.js",component:u.jsxs(C,{children:[u.jsx(q,{btnTitle:"مشاهده قوانین و مقررات",title:"قوانین و مقررات سیستم",content:"لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.",isAccepted:!1,actions:[u.jsx(n,{variant:"contained",color:"primary",children:"پذیرفتم"},"accept"),u.jsx(n,{variant:"outlined",children:"نمیپذیرم"},"reject")]}),u.jsx(t,{variant:"caption",color:"text.secondary",mt:2,children:"این کامپوننت دکمه تریگر خود را دارد (چکباکس + متن)"})]})}]},{category:"📢 Notifications",items:[{name:"Notif (Global)",description:"سیستم نوتیفیکیشن سراسری",path:"components/notif/Notif.js",component:u.jsxs(a,{container:!0,gap:2,direction:"column",children:[u.jsx(n,{variant:"contained",color:"success",onClick:()=>p({vertical:"top",horizontal:"center",msg:"عملیات با موفقیت انجام شد!",severity:"success"}),children:"نوتیفیکیشن موفقیت"}),u.jsx(n,{variant:"contained",color:"error",onClick:()=>p({vertical:"top",horizontal:"center",msg:"خطایی رخ داده است!",severity:"error"}),children:"نوتیفیکیشن خطا"}),u.jsx(n,{variant:"contained",color:"warning",onClick:()=>p({vertical:"top",horizontal:"center",msg:"توجه: این یک هشدار است",severity:"warning"}),children:"نوتیفیکیشن هشدار"}),u.jsx(n,{variant:"contained",color:"info",onClick:()=>p({vertical:"top",horizontal:"center",msg:"این یک پیام اطلاعاتی است",severity:"info"}),children:"نوتیفیکیشن اطلاعات"}),u.jsx(t,{variant:"caption",color:"text.secondary",children:"این کامپوننت از AppContext استفاده میکند"})]})}]},{category:"📊 Charts",items:[{name:"ChartBar",description:"نمودار میلهای با دادههای واقعی",path:"components/chart-bar/ChartBar.js",component:u.jsx(C,{sx:{height:300,width:"100%"},children:u.jsx(X,{chartData:I,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top"},title:{display:!0,text:"نمودار فروش و خرید ماهانه"}}}})})},{name:"ChartPie",description:"نمودار دایرهای",path:"components/chart-pie/ChartPie.js",component:u.jsx(C,{sx:{height:300,width:"100%"},children:u.jsx(R,{chartData:f,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top"},title:{display:!0,text:"توزیع وضعیت درخواستها"}}}})})},{name:"ChartLinear",description:"نمودار خطی",path:"components/chart-linear/ChartLinear.js",component:u.jsx(C,{sx:{height:300,width:"100%"},children:u.jsx(K,{chartData:P,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top"},title:{display:!0,text:"روند رشد هفتگی"}}}})})},{name:"ChartDoughnut",description:"نمودار دونات",path:"components/chart-doughnut/ChartDoughnut.js",component:u.jsx(C,{sx:{height:300,width:"100%"},children:u.jsx(S,{chartData:f,options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top"},title:{display:!0,text:"نمودار دونات وضعیتها"}}}})})},{name:"Other Charts",description:"سایر نمودارهای موجود",path:"components/chart-*/",component:u.jsxs(C,{children:[u.jsx(t,{variant:"body2",mb:2,children:"نمودارهای دیگر موجود:"}),u.jsx(a,{container:!0,gap:1,flexWrap:"wrap",children:["ChartRadar","ChartPolarArea","ChartBubble","ChartScatter","AdvancedChart"].map(e=>u.jsx(s,{label:e,variant:"outlined",color:"primary"},e))})]})}]},{category:"📋 Tables",items:[{name:"SimpleTable",description:"جدول ساده با دادههای واقعی",path:"components/simple-table/SimpleTable.js",component:u.jsx(C,{sx:{width:"100%"},children:u.jsx(V,{name:"لیست کاربران",columns:L,data:W})})},{name:"ResponsiveTable",description:"جدول پیشرفته با فیلتر، مرتبسازی و صفحهبندی",path:"components/responsive-table/ResponsiveTable.js",component:u.jsxs(C,{sx:{width:"100%",overflowX:"auto"},children:[u.jsx(J,{title:"لیست درخواستهای خرید",columns:M,data:Q,paginated:!0,customColors:[{name:"ردیف",color:"#e8f4f8"},{name:"کد درخواست",color:"#e1f5e1"},{name:"وضعیت",color:"#fff4e6"},{rest:!0,color:"#f5f5f5"}]}),u.jsx(t,{variant:"caption",color:"text.secondary",mt:2,children:"قابلیتها: مرتبسازی کلیک روی هدر، فیلتر ستونها، جستجو، صفحهبندی، و محاسبه مجموع"})]})},{name:"Other Tables",description:"سایر جداول موجود در سیستم",path:"components/table-*/",component:u.jsxs(C,{children:[u.jsx(t,{variant:"body2",mb:2,children:"کامپوننتهای جدول موجود:"}),u.jsx(a,{container:!0,gap:1,flexWrap:"wrap",children:["ModernTable","AdvancedTable","ResponsiveTable","MuiTable","MyTable","FlexTable","PageTable","PageTableApi","AdvancedTablePage"].map(e=>u.jsx(s,{label:e,variant:"outlined",color:"secondary"},e))}),u.jsx(t,{variant:"caption",color:"text.secondary",mt:2,children:"این کامپوننتها نیاز به دادههای جدولی دارند"})]})}]},{category:"📤 File Upload (Documentation Only)",items:[{name:"Upload Components",description:"کامپوننتهای آپلود فایل",path:"components/file-uploader/",component:u.jsxs(C,{children:[u.jsx(t,{variant:"body2",mb:2,children:"کامپوننتهای آپلود موجود:"}),u.jsx(a,{container:!0,gap:1,flexWrap:"wrap",children:["FileUploader","ImageUpload","ImgUploader","ExcelUploadButton"].map(e=>u.jsx(s,{label:e,variant:"outlined",color:"info"},e))}),u.jsx(t,{variant:"caption",color:"text.secondary",mt:2,children:"این کامپوننتها برای آپلود فایلهای مختلف استفاده میشوند"})]})}]},{category:"🎯 Specialized (Documentation Only)",items:[{name:"Other Components",description:"سایر کامپوننتهای تخصصی سیستم",path:"components/",component:u.jsxs(C,{children:[u.jsx(t,{variant:"body2",mb:2,children:"کامپوننتهای تخصصی:"}),u.jsx(a,{container:!0,gap:1,flexWrap:"wrap",children:["StateStepper","ChatSystem","TicketSummary","Dashboard","Map","ShowImage","ExcelLink","CheckClearanceCode","BoxList","LinkItem","BankCard","CarPelak","DatePicker","SelectCheck","AutocompleteSelect","TextInput","NumberFormatCustom","RequestsAwaitingPayment","RequestsAwaitingInspections","Drawer","Backdrop","ErrorFallback","TimeToLogout"].map(e=>u.jsx(s,{label:e,variant:"outlined",size:"small"},e))}),u.jsx(t,{variant:"caption",color:"text.secondary",mt:2,children:"این کامپوننتها برای موارد خاص سیستم طراحی شدهاند"})]})}]}],E=x.map(e=>({...e,items:e.items.filter(i=>i.name.toLowerCase().includes(o.toLowerCase())||i.description.includes(o))})).filter(e=>e.items.length>0);return u.jsx(C,{sx:{minHeight:"100vh",backgroundColor:"#f5f5f5",py:4},children:u.jsx(a,{container:!0,justifyContent:"center",children:u.jsxs(a,{xs:11,md:10,lg:9,children:[u.jsxs(c,{elevation:3,sx:{p:3,mb:3},children:[u.jsx(t,{variant:"h4",gutterBottom:!0,sx:{fontWeight:700,color:"primary.main"},children:"📚 کاتالوگ کامپوننتهای سیستم رصدیار"}),u.jsx(t,{variant:"body1",color:"text.secondary",gutterBottom:!0,children:"نمایش زنده و تعاملی تمامی کامپوننتهای قابل استفاده در پروژه"}),u.jsx(y,{sx:{my:2}}),u.jsx($,{fullWidth:!0,placeholder:"جستجوی کامپوننت...",value:o,onChange:e=>m(e.target.value),InputProps:{startAdornment:u.jsx(T,{sx:{mr:1,color:"text.secondary"}})}}),u.jsxs(a,{container:!0,gap:2,mt:2,children:[u.jsx(s,{label:`تعداد کل: ${x.reduce((e,i)=>e+i.items.length,0)} کامپوننت`,color:"primary",variant:"outlined"}),u.jsx(s,{label:`${x.length} دستهبندی`,color:"secondary",variant:"outlined"})]})]}),E.map((e,i)=>u.jsxs(c,{elevation:2,sx:{p:3,mb:3},children:[u.jsx(t,{variant:"h5",gutterBottom:!0,sx:{fontWeight:600,color:"secondary.main",mb:3},children:e.category}),e.items.map((A,_)=>u.jsx(N,{sx:{mb:3,border:"1px solid #e0e0e0"},children:u.jsx(O,{children:u.jsxs(a,{container:!0,spacing:2,children:[u.jsxs(a,{xs:12,children:[u.jsx(t,{variant:"h6",sx:{fontWeight:600,color:"primary.main"},children:A.name}),u.jsx(t,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:A.description}),u.jsxs(t,{variant:"caption",sx:{color:"text.disabled",fontFamily:"monospace"},children:["📁 ",A.path]})]}),u.jsxs(a,{xs:12,children:[u.jsx(y,{sx:{my:2}}),u.jsx(t,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"🎨 نمایش زنده:"}),u.jsx(C,{sx:{p:3,backgroundColor:"#ffffff",borderRadius:2,border:"2px dashed #1976d2",minHeight:"80px",display:"flex",alignItems:"center",justifyContent:"center"},children:A.component})]})]})})},_))]},i)),E.length===0&&u.jsx(c,{elevation:2,sx:{p:5,textAlign:"center"},children:u.jsx(t,{variant:"h6",color:"text.secondary",children:"کامپوننتی با این عبارت جستجو پیدا نشد"})})]})})})};export{I0 as default};
|