@emintech/core 0.8.4 → 0.8.5

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.
Files changed (217) hide show
  1. package/dist/{chunk-37DD6CZ3.js → chunk-2QTWMGKG.js} +1 -1
  2. package/dist/chunk-4O4DCA5C.js +1 -0
  3. package/dist/{chunk-ODBHABPT.js → chunk-4RDKXBJX.js} +1 -1
  4. package/dist/{chunk-EV7437AD.js → chunk-7IMZZ3VV.js} +1 -1
  5. package/dist/chunk-BI4PD4EL.js +1 -0
  6. package/dist/{chunk-V2XCJSMU.js → chunk-CG3NYMP4.js} +1 -1
  7. package/dist/{chunk-OUY5WI7B.js → chunk-GMW5FHFT.js} +1 -1
  8. package/dist/{chunk-SZMMAWHS.js → chunk-GSKQ3AUZ.js} +1 -1
  9. package/dist/{chunk-K2HJSOHF.js → chunk-HO7QF2B5.js} +1 -1
  10. package/dist/{chunk-N4QSSBS5.js → chunk-HRYICBPV.js} +1 -1
  11. package/dist/{chunk-EQ63HJST.js → chunk-LI5U5EXU.js} +1 -1
  12. package/dist/{chunk-ENDTK427.js → chunk-MIYCPZAM.js} +1 -1
  13. package/dist/chunk-O7HG7UWR.js +1 -0
  14. package/dist/chunk-P53KMAZ4.js +1 -0
  15. package/dist/{chunk-7V3WNVSI.js → chunk-PZIHWOWA.js} +1 -1
  16. package/dist/chunk-QXMEPU4D.js +1 -0
  17. package/dist/chunk-REOTH2BZ.js +1 -0
  18. package/dist/chunk-T2W4R2CY.js +1 -0
  19. package/dist/{chunk-OU6RJUP2.js → chunk-TPYDXV4B.js} +1 -1
  20. package/dist/{chunk-4LFQT3HG.js → chunk-YMWCFYSC.js} +1 -1
  21. package/dist/{chunk-MDY5P6AG.js → chunk-Z6APYDZ7.js} +1 -1
  22. package/dist/emincore.register.js +1 -1
  23. package/dist/features/account/change-password/components/PasswordForm.js +1 -1
  24. package/dist/features/account/change-password/index.js +1 -1
  25. package/dist/features/account/change-password/pages/index.js +1 -1
  26. package/dist/features/account/delete-account/components/DeleteAccountForm.js +1 -1
  27. package/dist/features/account/delete-account/index.js +1 -1
  28. package/dist/features/account/delete-account/pages/index.js +1 -1
  29. package/dist/features/account/index.js +1 -1
  30. package/dist/features/account/preferences/pages/index.js +1 -1
  31. package/dist/features/account/profile/components/Profile.js +1 -1
  32. package/dist/features/account/profile/components/ProfileForm.js +1 -1
  33. package/dist/features/account/profile/index.js +1 -1
  34. package/dist/features/account/profile/pages/EditProfilePage.js +1 -1
  35. package/dist/features/account/profile/pages/IndexProfilePage.js +1 -1
  36. package/dist/features/account/shared/components/MyAccountHeader.js +1 -1
  37. package/dist/features/account/shared/components/UserLabel.js +1 -1
  38. package/dist/features/account/shared/components/UserMenu.js +1 -1
  39. package/dist/features/account/shared/components/index.js +1 -1
  40. package/dist/features/account/shared/index.js +1 -1
  41. package/dist/features/account/shared/layouts/MyAccountLayout.js +1 -1
  42. package/dist/features/app/components/AppHeader.js +1 -1
  43. package/dist/features/app/components/AppLogo.js +1 -1
  44. package/dist/features/app/index.js +1 -1
  45. package/dist/features/app/layout/AppLayout.js +1 -1
  46. package/dist/features/appearance/components/AppearanceButton.js +1 -1
  47. package/dist/features/appearance/components/AppearanceDropdown.js +1 -1
  48. package/dist/features/appearance/components/AppearanceToggle.js +1 -1
  49. package/dist/features/appearance/hooks/use-appearance.js +1 -1
  50. package/dist/features/appearance/index.js +1 -1
  51. package/dist/features/appearance/lib/appearance-service.js +1 -1
  52. package/dist/features/auth/index.js +1 -1
  53. package/dist/features/auth/login/components/Login.js +1 -1
  54. package/dist/features/auth/login/hooks/use-login-form.js +1 -1
  55. package/dist/features/auth/login/index.js +1 -1
  56. package/dist/features/auth/password/confirmation/components/PasswordConfirmation.js +1 -1
  57. package/dist/features/auth/password/confirmation/index.js +1 -1
  58. package/dist/features/auth/password/forgot/components/PasswordForgot.js +1 -1
  59. package/dist/features/auth/password/forgot/index.js +1 -1
  60. package/dist/features/auth/password/index.js +1 -1
  61. package/dist/features/auth/password/reset/components/PasswordReset.js +1 -1
  62. package/dist/features/auth/password/reset/index.js +1 -1
  63. package/dist/features/auth/register/components/Register.js +1 -1
  64. package/dist/features/auth/register/index.js +1 -1
  65. package/dist/features/auth/shared/components/PasswordInput.js +1 -1
  66. package/dist/features/auth/shared/index.js +1 -1
  67. package/dist/features/auth/shared/layouts/AuthLayout.js +1 -1
  68. package/dist/features/auth/verify/email/components/EmailVerify.js +1 -1
  69. package/dist/features/auth/verify/email/index.js +1 -1
  70. package/dist/features/auth/verify/index.js +1 -1
  71. package/dist/features/dashboard/components/DashboardSidebar.js +1 -1
  72. package/dist/features/dashboard/components/DashboardTopbar.js +1 -1
  73. package/dist/features/dashboard/index.js +1 -1
  74. package/dist/features/dashboard/layouts/DashboardLayout.js +1 -1
  75. package/dist/features/emin-jobs/components/EminJobsComponents.js +1 -1
  76. package/dist/features/emin-jobs/hooks/use-emin-jobs.js +1 -1
  77. package/dist/features/emin-jobs/index.js +1 -1
  78. package/dist/features/marketplace/components/MarketplaceComponents.js +1 -1
  79. package/dist/features/marketplace/context/MarketplaceContext.js +1 -1
  80. package/dist/features/marketplace/index.d.ts +0 -1
  81. package/dist/features/marketplace/index.js +1 -1
  82. package/dist/features/marketplace/pages/IndexMarketplacePage.js +1 -1
  83. package/dist/features/notifications/components/EminNotification.js +1 -1
  84. package/dist/features/notifications/context/NotificationsContext.js +1 -1
  85. package/dist/features/notifications/index.js +1 -1
  86. package/dist/features/notifications/pages/UserNotificationsPage.js +1 -1
  87. package/dist/features/package-manager/index.js +1 -1
  88. package/dist/features/package-manager/installer/index.js +1 -1
  89. package/dist/features/package-manager/installer/lib/installer-formatter.js +1 -1
  90. package/dist/features/package-manager/shared/api/package-manager.api.js +1 -1
  91. package/dist/features/package-manager/shared/components/PackageManagerModal.js +1 -1
  92. package/dist/features/package-manager/shared/context/PackageManagerContext.js +1 -1
  93. package/dist/features/package-manager/shared/index.js +1 -1
  94. package/dist/features/package-manager/shared/lib/package-manager-formatter.js +1 -1
  95. package/dist/features/package-manager/shared/lib/package-manager-services.js +1 -1
  96. package/dist/features/package-manager/updater/index.js +1 -1
  97. package/dist/features/package-manager/updater/lib/updater-formatter.js +1 -1
  98. package/dist/features/packages/api/packages.api.js +1 -1
  99. package/dist/features/packages/components/Packages.js +1 -1
  100. package/dist/features/packages/components/PackagesTable.js +1 -1
  101. package/dist/features/packages/context/PackagesContext.js +1 -1
  102. package/dist/features/packages/index.js +1 -1
  103. package/dist/features/packages/lib/packages-formatter.js +1 -1
  104. package/dist/features/packages/pages/IndexPackagesPage.js +1 -1
  105. package/dist/features/platform/components/PlatformComponents.js +1 -1
  106. package/dist/features/platform/components/PlatformPageComponents.js +1 -1
  107. package/dist/features/platform/index.js +1 -1
  108. package/dist/features/platform/lib/platform-formatter.js +1 -1
  109. package/dist/features/platform/pages/IndexPlatformPage.js +1 -1
  110. package/dist/features/settings/api/settings.api.js +1 -1
  111. package/dist/features/settings/context/SettingsContext.js +1 -1
  112. package/dist/features/settings/index.js +1 -1
  113. package/dist/features/settings/layouts/SettingsLayout.js +1 -1
  114. package/dist/features/settings/lib/settings-formatter.js +1 -1
  115. package/dist/features/settings/pages/DesignSettingsPage.js +1 -1
  116. package/dist/features/settings/pages/GeneralSettingsPage.js +1 -1
  117. package/dist/features/settings/pages/MailSettingsPage.js +1 -1
  118. package/dist/features/settings/pages/NavPage.js +1 -1
  119. package/dist/features/slugs/components/slugs.js +1 -1
  120. package/dist/features/slugs/context/SlugsContext.js +1 -1
  121. package/dist/features/slugs/index.js +1 -1
  122. package/dist/features/users/components/UserModal.js +1 -1
  123. package/dist/features/users/components/UsersPage.js +1 -1
  124. package/dist/features/users/components/UsersStatistics.js +1 -1
  125. package/dist/features/users/components/UsersTable.js +1 -1
  126. package/dist/features/users/index.js +1 -1
  127. package/dist/features/users/lib/users-formatter.js +1 -1
  128. package/dist/features/users/widgets/UserStatisticsWidget.d.ts +4 -1
  129. package/dist/features/users/widgets/UserStatisticsWidget.js +1 -1
  130. package/dist/features/widgets/components/WidgetMenu.d.ts +1 -0
  131. package/dist/features/widgets/components/WidgetMenu.js +1 -0
  132. package/dist/features/widgets/components/WidgetProfileMenu.d.ts +1 -0
  133. package/dist/features/widgets/components/WidgetProfileMenu.js +1 -0
  134. package/dist/features/widgets/components/WidgetsComponents.d.ts +0 -8
  135. package/dist/features/widgets/components/WidgetsComponents.js +1 -1
  136. package/dist/features/widgets/components/WidgetsScreen.d.ts +2 -0
  137. package/dist/features/widgets/components/WidgetsScreen.js +1 -0
  138. package/dist/features/widgets/context/WidgetsContext.d.ts +16 -19
  139. package/dist/features/widgets/context/WidgetsContext.js +1 -1
  140. package/dist/features/widgets/index.d.ts +3 -1
  141. package/dist/features/widgets/index.js +1 -1
  142. package/dist/features/widgets/lib/widgets-services.d.ts +2 -15
  143. package/dist/features/widgets/lib/widgets-services.js +1 -1
  144. package/dist/features/widgets/lib/widgets-utils.d.ts +5 -4
  145. package/dist/features/widgets/lib/widgets-utils.js +1 -1
  146. package/dist/features/widgets/types/widgets.types.d.ts +38 -9
  147. package/dist/features/widgets/types/widgets.types.js +1 -1
  148. package/dist/integrations/emincore/page.registry.js +1 -1
  149. package/dist/integrations/emincore/provider.registry.js +1 -1
  150. package/dist/integrations/emincore/widget.registry.js +1 -1
  151. package/dist/pages/auth/login.js +1 -1
  152. package/dist/pages/auth/password-confirm.js +1 -1
  153. package/dist/pages/auth/password-forgot.js +1 -1
  154. package/dist/pages/auth/password-reset.js +1 -1
  155. package/dist/pages/auth/register.js +1 -1
  156. package/dist/pages/auth/verify-email.js +1 -1
  157. package/dist/pages/dashboard/index.d.ts +2 -4
  158. package/dist/pages/dashboard/index.js +1 -1
  159. package/dist/pages/dashboard/marketplace/index.js +1 -1
  160. package/dist/pages/dashboard/packages/index.js +1 -1
  161. package/dist/pages/dashboard/platform/index.js +1 -1
  162. package/dist/pages/dashboard/settings/index.js +1 -1
  163. package/dist/pages/dashboard/settings/slugs/index.js +1 -1
  164. package/dist/pages/dashboard/users/index.js +1 -1
  165. package/dist/pages/my-account/notifications/index.js +1 -1
  166. package/dist/pages/my-account/profile/edit-password.js +1 -1
  167. package/dist/pages/my-account/profile/edit.js +1 -1
  168. package/dist/pages/my-account/profile/index.js +1 -1
  169. package/dist/provider.js +1 -1
  170. package/dist/shared/components/composite/AlertModal.js +1 -1
  171. package/dist/shared/components/composite/EminEditable.js +1 -1
  172. package/dist/shared/components/composite/EminFormButton.js +1 -1
  173. package/dist/shared/components/composite/EminInput.js +1 -1
  174. package/dist/shared/components/composite/EminPreference.js +1 -1
  175. package/dist/shared/components/composite/EminPreloader.js +1 -1
  176. package/dist/shared/components/composite/Menu/EminMenu.js +1 -1
  177. package/dist/shared/components/composite/Menu/EminSidebarMenu.js +1 -1
  178. package/dist/shared/components/composite/Menu/index.js +1 -1
  179. package/dist/shared/components/composite/QuickMenu/QuickMenu.js +1 -1
  180. package/dist/shared/components/composite/QuickMenu/index.js +1 -1
  181. package/dist/shared/components/composite/RoleBadge.js +1 -1
  182. package/dist/shared/components/composite/SectionCard.js +1 -1
  183. package/dist/shared/components/composite/StatisticCards.js +1 -1
  184. package/dist/shared/components/composite/index.js +1 -1
  185. package/dist/shared/components/index.js +1 -1
  186. package/dist/shared/components/ui/avatar.js +1 -1
  187. package/dist/shared/components/ui/breadcrumbs.js +1 -1
  188. package/dist/shared/components/ui/chart.js +1 -1
  189. package/dist/shared/components/ui/slider.js +1 -1
  190. package/dist/shared/index.js +1 -1
  191. package/dist/shared/modules/emin-table/components/EminTable.js +1 -1
  192. package/dist/shared/modules/emin-table/components/EminTableContent.js +1 -1
  193. package/dist/shared/modules/emin-table/components/EminTablePagination.js +1 -1
  194. package/dist/shared/modules/emin-table/components/EminTableToolbar.js +1 -1
  195. package/dist/shared/modules/emin-table/context/EminTableContext.js +1 -1
  196. package/dist/shared/modules/emin-table/index.js +1 -1
  197. package/dist/shared/modules/index.js +1 -1
  198. package/dist/shared/modules/world-map/components/WorldMap2D.js +1 -1
  199. package/dist/shared/modules/world-map/context/WorldMapContext.js +1 -1
  200. package/dist/shared/modules/world-map/index.js +1 -1
  201. package/package.json +1 -1
  202. package/dist/chunk-AIXJLLPM.js +0 -1
  203. package/dist/chunk-BQDDRNR2.js +0 -1
  204. package/dist/chunk-GCOVXY2V.js +0 -74
  205. package/dist/chunk-QEAWHBYJ.js +0 -1
  206. package/dist/chunk-SXTCRBVY.js +0 -1
  207. package/dist/chunk-VAO6EAL3.js +0 -1
  208. package/dist/features/marketplace/lib/marketplace-services.d.ts +0 -2
  209. package/dist/features/marketplace/lib/marketplace-services.js +0 -1
  210. package/dist/features/widgets/pages/IndexWidgetsPage.d.ts +0 -4
  211. package/dist/features/widgets/pages/IndexWidgetsPage.js +0 -1
  212. /package/dist/{chunk-NO3PP6RN.js → chunk-6CHLCSIV.js} +0 -0
  213. /package/dist/{chunk-ADWGFX4T.js → chunk-6T573CFK.js} +0 -0
  214. /package/dist/{chunk-FDGMMHBL.js → chunk-SRQYVMHH.js} +0 -0
  215. /package/dist/features/widgets/{context/WidgetsContext.css → components/WidgetMenu.css} +0 -0
  216. /package/dist/features/widgets/{lib/widgets-services.css → components/WidgetProfileMenu.css} +0 -0
  217. /package/dist/features/widgets/{pages/IndexWidgetsPage.css → components/WidgetsScreen.css} +0 -0
@@ -1 +1 @@
1
- import{a}from"./chunk-SZMMAWHS.js";import{a as e}from"./chunk-EQ63HJST.js";import{Z as i,_ as t}from"./chunk-AIXJLLPM.js";import{b as o,f as d}from"./chunk-PWQOU5TI.js";import{jsx as r,jsxs as s}from"react/jsx-runtime";var c=({children:b,type:p="sidebar",breadcrumbs:m})=>{if(typeof window>"u")return r(t,{});if(p==="sidebar")return r(i,{children:s(o,{style:{"--sidebar-width":"calc(var(--spacing) * 72)","--header-height":"calc(var(--spacing) * 12)"},children:[r(a,{variant:"inset"}),s(d,{children:[r(e,{breadcrumbs:m}),r("div",{className:"@container/main p-7",children:b})]})]})})};export{c as a};
1
+ import{a}from"./chunk-GSKQ3AUZ.js";import{a as e}from"./chunk-LI5U5EXU.js";import{Z as i,_ as t}from"./chunk-REOTH2BZ.js";import{b as o,f as d}from"./chunk-PWQOU5TI.js";import{jsx as r,jsxs as s}from"react/jsx-runtime";var c=({children:b,type:p="sidebar",breadcrumbs:m})=>{if(typeof window>"u")return r(t,{});if(p==="sidebar")return r(i,{children:s(o,{style:{"--sidebar-width":"calc(var(--spacing) * 72)","--header-height":"calc(var(--spacing) * 12)"},children:[r(a,{variant:"inset"}),s(d,{children:[r(e,{breadcrumbs:m}),r("div",{className:"@container/main p-7",children:b})]})]})})};export{c as a};
@@ -0,0 +1 @@
1
+ import{b as te,c as x}from"./chunk-QXMEPU4D.js";import{a as oe}from"./chunk-BI4PD4EL.js";import{a as ie,c as se,d as ae,f as re}from"./chunk-T2W4R2CY.js";import{a as ee}from"./chunk-4DHRTWA7.js";import{b as j,c as Y,g as P}from"./chunk-REOTH2BZ.js";import{b as k,c as L,d as S,e as z,f as E,h as M}from"./chunk-GBXDCZP6.js";import{a as Q,b as U,f as X,g as $,h as J,i as q,j as K}from"./chunk-QFUZ6MVT.js";import{b as C}from"./chunk-TVCWAJFT.js";import{a as V}from"./chunk-65LRDGYI.js";import{a as y}from"./chunk-G4EEZUTC.js";import{a as h}from"./chunk-GND5KQRZ.js";import{a as Z}from"./chunk-FFWOZWIY.js";import{useEffect as xe,useState as ve}from"react";import{useForm as he}from"@inertiajs/react";import{IconPlus as be,IconTrash as Ne}from"@tabler/icons-react";import{Fragment as De,jsx as c,jsxs as b}from"react/jsx-runtime";var ne=()=>{let[e,o]=ve(!1);return b(De,{children:[b(C,{variant:"outline",className:"flex items-center gap-2",onClick:()=>o(!e),children:[c(y,{iconName:"IconLayoutGrid"}),"Widgets"]}),c(we,{isOpen:e,setIsOpen:o})]})},we=({isOpen:e,setIsOpen:o})=>{let{widgets:t}=x(),n=oe(t);return b(k,{open:e,onOpenChange:o,title:"Widgets",description:"Select a widget to add to your dashboard.",children:[c(L,{placeholder:"Search widgets..."}),b(S,{className:"max-h-[420px]",children:[c(z,{children:"No widget found."}),n.map(({packageCode:s,widgets:a})=>a.length>0&&c(E,{className:"p-5",heading:c(Ie,{packageCode:s,totalWidgets:a.length}),children:a.map(r=>c(M,{value:r.id,keywords:[r.title,r?.description??""],className:"!bg-background",children:c(Ce,{widget:r})},r.id))}))]})]})},Ie=({packageCode:e,totalWidgets:o})=>b("div",{className:"flex items-center gap-2",children:[c(y,{iconName:"IconLayoutGrid",className:"w-5 h-5 text-primary"}),b("span",{className:"font-bold text-base capitalize text-primary",children:[e.replace("_"," ")," widgets"]}),b("span",{className:"text-xs text-muted-foreground ml-auto",children:[o," ",o===1?"widget":"widgets"," provided"]})]}),Ce=({widget:e})=>{let{profile:o}=x(),t=o.items?.find(n=>n.widget_id===e.id);return b("div",{className:h("flex items-center gap-3 justify-center h-full w-full min-h-[50px] rounded-lg border p-4",t?.is_expanded?"text-muted-foreground":""),children:[c(y,{iconName:e?.icon??"IconPackage",className:"h-7 w-7 shrink-0"}),b("div",{className:"grid gap-2",children:[c("div",{className:"text-sm font-bold",children:e.title}),e.description&&c("div",{className:"text-xs text-center",children:e.description??""})]}),c(We,{widget:e})]})},We=({widget:e})=>{let{profile:o,breakPoints:t}=x(),s=ie(e,o)?"delete":"post",a=()=>s==="delete"?{id:o.items?.find(p=>p.widget_id===e.id)?.id}:{widget_profile_id:o.id,widget_id:e.id,is_expanded:!0,layouts:se(e,t)},r=he(a());xe(()=>r.setData(a()),[o]);let u=s==="delete"?route("widgets.profiles.items.destroy"):route("widgets.profiles.items.store"),g=()=>r[s](u),I=s==="delete"?r.recentlySuccessful?"outline":"destructive":r.recentlySuccessful?"destructive":"outline",f=s==="delete"?r.recentlySuccessful?"Widget Added!":"":r.recentlySuccessful?"Widget Removed!":"",d=s==="delete"?"Widget Removing...":"Widget Adding...";return b(P,{variant:I,size:"sm",className:"text-primary ml-auto",recentlySuccessful:r.recentlySuccessful,processing:r.processing,successText:f,processingText:d,onClick:()=>g(),children:[s==="delete"?c(Ne,{}):c(be,{}),c("span",{children:s==="delete"?"Remove":"Add"})]})};import{useState as le}from"react";import{router as de,useForm as _}from"@inertiajs/react";import{Fragment as me,jsx as i,jsxs as m}from"react/jsx-runtime";var ce=()=>{let{profile:e}=x(),[o,t]=le(!1);return m(me,{children:[m(C,{variant:"outline",className:"flex items-center gap-2",onClick:()=>t(!o),children:[i(y,{iconName:"IconLayout"}),e?.title||"Layouts"]}),i(Pe,{open:o,onOpenChange:t})]})},Pe=({open:e,onOpenChange:o})=>{let{profiles:t,profile:n}=x();return m(k,{open:e,onOpenChange:o,title:"Layouts",description:"See your current layout, default layout, and create a new one.",children:[i(L,{placeholder:"Search layouts..."}),m(S,{className:"max-h-[420px]",children:[i(z,{children:"No layout found."}),i(E,{className:"p-5",children:t.map(s=>i(M,{value:`${s.title} ${s.is_default?"default":"normal"} ${s.id===n?.id?"current active":""}`,className:"mb-2 flex items-center gap-3 rounded-lg border bg-background hover:bg-background/70 !py-5 !px-5 data-[selected=true]:bg-background data-[selected=true]:text-foreground last:mb-0",children:i(ke,{profile:s})},s.id))})]}),m("div",{className:"px-3 pt-3 pb-7 grid gap-2",children:[i("div",{className:"text-sm text-muted-foreground text-center",children:"Create a new layout from here."}),i(ze,{})]})]})},ke=({profile:e})=>{let{profile:o,indexRouteName:t}=x(),n={label:"Layout Name",key:"title",value:e.title,type:"text",editable:!0},s=u=>new Promise((g,I)=>{de.put(route("widgets.profiles.update"),{id:e.id,title:u},{onSuccess:()=>g(!0),onError:()=>I(!1)})}),a=e.id===o?.id,r=route(t,{widget_profile_id:e.id});return m(me,{children:[i("div",{className:"flex items-center w-2 h-2",children:i("span",{className:h("h-2 w-2 rounded-full",a?"bg-green-500":"bg-muted")})}),m("div",{className:"grid gap-1 text-left",children:[m("div",{className:"flex flex-wrap items-center gap-2",children:[i("div",{className:"group flex items-center gap-1",children:i(Y,{item:n,onChange:(u,g)=>s(g),children:m("div",{className:"flex items-center gap-2 !cursor-text",children:[i("span",{className:"font-semibold text-base",children:e.title}),i(y,{iconName:"IconPencil",className:"h-3 w-3 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100"})]})})}),e.is_default&&i("span",{className:"rounded-md border px-2 py-0.5 text-xs font-medium",children:"Default"})]}),i(Se,{updatedAt:e.updated_at}),i(Le,{profile:e})]}),i("div",{className:"flex items-center gap-2 ml-auto shrink-0 self-center cursor-pointer",onClick:()=>!a&&de.visit(r,{preserveUrl:!0}),children:i("div",{className:h("h-4 w-4 rounded-full border-2 flex items-center justify-center",a?"border-primary":"border-muted hover:border-primary"),children:a&&i("div",{className:"h-2 w-2 rounded-full bg-primary"})})})]})},Le=({profile:e})=>m("div",{className:"flex items-center gap-2",children:[i(Ee,{profile:e,className:"!p-0 h-4"}),i(Me,{profile:e,className:"!p-0 h-4"})]}),Se=({updatedAt:e})=>m("span",{className:"text-xs text-primary/70",children:["Updated At: ",e?new Date(e).toLocaleString():"Never"]}),ze=()=>{let[e,o]=le(!1),t=_({title:""}),n=()=>t.post(route("widgets.profiles.store"),{onSuccess:()=>t.reset()});return m(Q,{open:e,onOpenChange:o,children:[i(U,{children:m(C,{variant:"outline",className:"flex items-center justify-center mx-auto gap-2",onClick:()=>o(!0),children:[i(y,{iconName:"IconPlus"}),i("span",{children:"Create new layout"})]})}),m(X,{className:"grid gap-3",children:[m($,{children:[i(q,{children:"Create new layout"}),i(K,{children:"Create a new layout to use. You can switch between layouts at any time."})]}),i("div",{children:i(ee,{label:"Layout Name",icon:"IconLayout",type:"text",placeholder:"Give a name to your new layout",error:t.errors.title,value:t.data.title,onChange:s=>t.setData({title:s.target.value})})}),i(J,{children:m(P,{recentlySuccessful:t.recentlySuccessful,processing:t.processing,successText:"Layout Created!",processingText:"Layout creating...",variant:"default",onClick:()=>n(),children:[i(y,{iconName:"IconPlus"}),"Create Now"]})})]})]})},Ee=({profile:e,className:o})=>{let t=_(),n=()=>{t.setData({id:e.id}),t.delete(route("widgets.profiles.destroy"))};return i(j,{title:"Are you sure to delete this layout?",content:"This action is permanent and cannot be undone.",onConfirm:()=>n(),children:i(C,{className:h(!t.processing||!t.recentlySuccessful?"text-red-500":"text-primary",o),type:"button",variant:"link",size:"sm",disabled:t.processing,onClick:s=>s.stopPropagation(),children:t.processing?"Deleting...":"Delete"})})},Me=({profile:e,className:o})=>{let t=_(),n=()=>{t.setData({id:e.id,is_default:!e.is_default}),t.put(route("widgets.profiles.update"))};return!e.is_default&&i(C,{className:h("",o),type:"button",variant:"link",size:"sm",disabled:t.processing,onClick:s=>{s.preventDefault(),s.stopPropagation(),n()},children:t.processing?"Saving...":"Set as default"})};import{Fragment as Ae,jsx as W,jsxs as pe}from"react/jsx-runtime";var wt=({profile:e,profiles:o,widgets:t,indexRouteName:n})=>W(te,{profile:e,profiles:o,widgets:t,indexRouteName:n,children:pe("div",{className:"grid grid-cols-1 gap-7 overflow-visible",children:[W(V,{title:"Dashboard",description:"Overview of your application",icon:"IconDeviceDesktop",buttons:pe(Ae,{children:[W(ne,{}),W(ce,{})]})}),W(ue,{})]})});import{useHttp as T}from"@inertiajs/react";import{IconLoader2 as _e,IconMinus as Be,IconPlus as Te,IconX as Oe}from"@tabler/icons-react";import{lazy as Ge,Suspense as He,useCallback as Re,useMemo as A}from"react";import{useContainerWidth as Fe,Responsive as Ze}from"react-grid-layout";import"react-grid-layout/css/styles.css";import{jsx as l,jsxs as D}from"react/jsx-runtime";var B={lg:12,md:6,sm:2,xs:1},ge=10,fe=new Map,je=(e,o)=>{let t=fe.get(e);if(t)return t;let n=Ge(o);return fe.set(e,n),n},ue=()=>{let{width:e,containerRef:o,mounted:t}=Fe(),{breakPoints:n,profile:s,setProfile:a}=x(),r=s?.items,u=A(()=>Object.keys(B),[]),g=T({items:r??[]}),I=A(()=>r?.map(p=>p.widget)??[],[r]),f=A(()=>{let p={};return u.forEach(N=>{p[N]=r?.map(w=>w.layouts?.[N]??ae(w.widget,!w.is_expanded,N,ge,B))??[]}),p},[u,r]),d=Re((p,N)=>{let w=N;if(re(f,w,u))return;let O=r??[],G=O.map(v=>({...v,layouts:u.reduce((H,R)=>{let F=(w[R]??[]).find(ye=>ye.i===v.widget.path);return F&&(H[R]=F),H},{})}));a(v=>v&&{...v,items:G}),g.setData({items:G}),g.put(route("widgets.profiles.items.update"),{onError:()=>a(v=>v&&{...v,items:O})})},[g,u,f,r,a]);return t&&l("div",{ref:o,children:l(Ze,{width:e,layouts:f,breakpoints:n,cols:B,rowHeight:ge,margin:[12,12],containerPadding:[0,0],dragConfig:{enabled:!0,handle:".widget-drag-handle"},resizeConfig:{enabled:!0},onLayoutChange:d,children:I.map(p=>l("div",{className:" overflow-visible",children:l(Ye,{widget:p})},p.path))})})},Ye=({widget:e})=>{let o=x(),t=Z.get(e.path),n=typeof t=="function",s=A(()=>n?je(e.path,t):()=>null,[e.path,t,n]),a=o.profile.items.find(f=>f.widget_id===e.id),r=T({items:[{id:a.id,is_expanded:!a?.is_expanded,layouts:a?.layouts}]}),u=()=>{let f=o.profile.items??[];o.setProfile(d=>{let p=d?.items??[],N=d?.items?.find(w=>w.id===a.id);return N&&(N.is_expanded=!N.is_expanded),{...d,items:p}}),r.put(route("widgets.profiles.items.update"),{onError:()=>o.setProfile(d=>d&&{...d,items:f})})},g=T({id:a.id}),I=()=>{let f=o.profile.items??[];o.setProfile(d=>({...d,items:d?.items?.filter(p=>p.id!==a.id)})),g.delete(route("widgets.profiles.items.destroy"),{onError:()=>o.setProfile(d=>d&&{...d,items:f})})};return n&&a&&D("div",{className:h(a?.is_expanded?"flex h-full w-full min-h-0 flex-col overflow-hidden rounded-lg border bg-background shadow-sm":""),children:[D("div",{className:h("flex items-center gap-2 widget-drag-handle shrink-0 px-3 py-3 bg-muted/30",a?.is_expanded?"border-b cursor-move select-none":"rounded-lg border shadow-sm"),children:[l(y,{iconName:e.icon??"IconTag",className:"w-5 h-5 shrink-0"}),l("span",{className:"text-sm font-medium",children:e.title}),D("div",{className:"flex items-center gap-5 ml-auto",children:[l("span",{className:"text-sm text-muted-foreground",children:e.package_code}),D("div",{className:"flex items-center gap-2",children:[l("div",{onClick:()=>u(),children:a?.is_expanded?l(Be,{className:"h-5 w-5 cursor-pointer"}):l(Te,{className:"h-5 w-5 cursor-pointer"})}),l("div",{onClick:()=>I(),children:l(Oe,{className:"h-5 w-5 cursor-pointer"})})]})]})]}),a?.is_expanded&&l("div",{className:"flex-1 min-h-0 overflow-auto p-3",children:l(He,{fallback:l("div",{className:"flex items-center justify-center w-full h-full",children:D("div",{className:"grid gap-2",children:[l("span",{className:"font-bold",children:e.title}),l(_e,{className:"animate-spin h-7 w-7 mx-auto"})]})}),children:l(s,{props:e.props})})})]})};export{ue as a,Ye as b,ne as c,ce as d,wt as e};
@@ -1 +1 @@
1
- import{a as A,b as p}from"./chunk-VAO6EAL3.js";import{a as O,b as u,c as C,d as R,e as U,f as V}from"./chunk-RCUM5ZGQ.js";import{d as N,i as y}from"./chunk-QEAWHBYJ.js";import{a as _}from"./chunk-37DD6CZ3.js";import{g as f}from"./chunk-AIXJLLPM.js";import{a as E}from"./chunk-QKGQOXDM.js";import{a as F,f as L,j as z}from"./chunk-QFUZ6MVT.js";import{a as B}from"./chunk-3DBYUBWW.js";import{a as I}from"./chunk-65LRDGYI.js";import{b as m}from"./chunk-TVCWAJFT.js";import{a as l}from"./chunk-G4EEZUTC.js";import{a as o}from"./chunk-GND5KQRZ.js";import{IconCircleCheckFilled as H,IconCircleX as W,IconDownload as re,IconRefresh as oe,IconStar as q,IconStarFilled as D,IconUsersGroup as ne,IconX as ie}from"@tabler/icons-react";import{Fragment as ce,jsx as n,jsxs as h}from"react/jsx-runtime";var Ne=({packages:a,marketPackages:t,meta:c,account:r,error:i})=>n(_,{breadcrumbs:[{icon:"IconBuildingStore",title:"Marketplace"}],children:n(A,{packages:a,marketPackages:t,account:r??null,meta:c,error:i,children:h("div",{className:"grid gap-10",children:[n(T,{className:"mt-15 mb-25"}),n(te,{}),n($,{})]})})}),te=()=>{let{marketPackages:a}=p(),t=a?.filter(r=>r.code.startsWith("emintech")),c=a?.filter(r=>!r.code.startsWith("emintech"));return h(ce,{children:[t&&t?.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Official Packages",description:"Explore the Emin Tech's official packages.",icon:"IconStar",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:t.map(r=>n(M,{pkg:r}))})]}),c&&c.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Community Packages",description:"These community packages have been quality-checked and are fully compatible.",icon:"IconUsers",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:c.map(r=>n(M,{pkg:r}))})]})]})};import{useForm as le}from"@inertiajs/react";import{Fragment as G,jsx as e,jsxs as s}from"react/jsx-runtime";var T=({className:a})=>{let{meta:t}=p();return s("div",{className:o("grid gap-4",a),children:[e(l,{iconName:"IconPackages",className:"mx-auto h-15 w-15"}),s("div",{className:"grid text-center",children:[e("h2",{className:"text-2xl font-bold",children:"Search what do you need?"}),e("span",{className:"text-sm text-muted-foreground",children:"Search for packages by name or category."})]}),e(E,{placeholder:"Search package name, author, or category...",value:t?.search,className:"bg-accent/10"})]})},M=({pkg:a,className:t})=>{let{setSelectedPackage:c,setIsDetailModalOpen:r}=p(),{packages:i}=N(),d=i.find(k=>k.code===a.code)??null;return s(B,{className:o("p-2 bg-accent/10 w-full shadow-md hover:scale-105 duration-300",t),children:[s("div",{className:"grid gap-4 cursor-pointer",onClick:()=>{c(a),r(!0)},children:[e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm",style:{backgroundImage:`url(${a.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}),s("div",{className:"grid px-2 gap-2",children:[s("div",{className:"flex items-center gap-1",children:[e(X,{pkg:a}),e(y,{pkg:{...a,is_custom:!1},className:"ml-auto text-sm",size:18})]}),e("hr",{}),s("span",{className:"text-sm text-muted-foreground truncate",children:[a.description," "]}),s("div",{className:"flex items-center",children:[d?s("div",{className:"flex items-center gap-2",children:[e(H,{className:"w-5 h-5 text-green-500 shrink-0"}),e("span",{className:"text-xs text-green-500",children:"Installed"})]}):e(K,{pkg:a,className:"text-xs"}),e(Y,{pkg:a,className:"text-xs ml-auto text-muted-foreground"})]})]})]}),e("div",{className:"px-2 mb-1",children:e(Q,{pkg:a})})]})},$=()=>{let{isDetailModalOpen:a,setIsDetailModalOpen:t,selectedPackage:c}=p(),{packages:r}=N();if(!a||!c)return;let i=r.find(d=>d.code===c.code)??null;return e(F,{open:a,onOpenChange:t,children:s(L,{className:"min-h-[25vh] max-h-[80vh] min-w-[90vw] sm:min-w-[70vw] xl:min-w-[60vw] 2xl:min-w-[50vw] grid gap-5 overflow-y-auto",children:[e("div",{className:"",children:e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm lg:aspect-[16/5]",style:{backgroundImage:`url(${c.cover??c.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}})}),s("div",{className:"grid grid-cols-1 lg:grid-cols-[4fr_2fr] gap-5",children:[s("div",{className:"grid grid-cols-1 gap-2",children:[e(X,{pkg:c}),e(z,{children:c.description}),e(K,{pkg:c,className:"text-xs"})]}),s("div",{className:"grid gap-3",children:[e(J,{pkg:c,className:"text-sm text-muted-foreground hover:text-primary cursor-pointer"}),e(y,{pkg:{...c,is_custom:!1},className:"text-sm flex items-center gap-2",size:20}),e(pe,{pkg:c,className:"text-sm text-muted-foreground"}),e(me,{pkg:c,className:"text-sm text-muted-foreground"}),s("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e(ne,{className:"w-5 h-5 shrink-0"}),e(Y,{pkg:c,className:"text-sm"})]})]}),s("div",{className:"col-span-full grid gap-2",children:[e(Q,{pkg:c}),C(u(c),i)==="uninstall"&&e("div",{className:"col-span-full w-full grid gap-2",children:s("span",{className:"text-xs text-center text-muted-foreground",children:["You installed that at ",i?.created_at?new Date(i.created_at).toLocaleString():"N/A"]})})]})]})]})})},X=({pkg:a,className:t})=>s("div",{className:o("grid grid-cols-[25px_auto] gap-2",t),children:[e(l,{iconName:"IconPackage",className:"shrink-0 w-full"}),e("span",{className:"font-bold truncate",children:a.name})]}),$e=({pkg:a,className:t})=>e("div",{className:o("grid gap-2",t),children:e(J,{pkg:a})}),K=({pkg:a,className:t})=>e("div",{className:o("flex items-center gap-2",t),children:V(u(a))?s(G,{children:[e(H,{className:"w-5 h-5 shrink-0 text-green-400"}),e("div",{className:"grid",children:e("span",{className:"text-green-400 truncate",children:"Compatible with your app"})})]}):s(G,{children:[e(W,{className:"w-5 h-5 shrink-0 text-red-400"}),e("div",{className:"grid",children:e("span",{className:"text-red-400 truncate",children:"Not compatible with your app"})})]})}),Y=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2 shrink-0",t),children:[s("span",{className:"shrink-0",children:[Math.floor(Math.random()*1e3).toFixed(0)," Reviews"]}),s("div",{className:"flex items-center gap-0 shrink-0",children:[e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(q,{className:"h-[18px] w-[18px] shrink-0"}),e(q,{className:"h-[18px] w-[18px] shrink-0"})]})]}),J=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2",t),children:[e(l,{iconName:"IconUserCircle",className:"shrink-0 w-5 h-5"}),e("a",{href:O(a.author),className:"capitalize",children:a.author??"yok"})]}),me=({pkg:a,text:t="Last Update:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconCalendar",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",new Date(a.updated_at??"").toLocaleDateString()??"-"]})]}),pe=({pkg:a,text:t="Core Requirement:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconInfoCircle",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",u(a)?.core_constraint??"-"]})]}),Q=({pkg:a,className:t})=>{let{packages:c,setProcess:r,setPackageManifest:i,setIsLoading:d,setIsModalOpen:k}=N(),Z=c.find(g=>g.code===a.code)??null,v=u(a),x=C(v,Z),{post:j,setData:ee,recentlySuccessful:P,processing:w}=le(),ae=()=>(d(!0),k(!0),new Promise(S=>j(route("dashboard.packages.manager"),{onSuccess:()=>S(!0),onError:se=>S(se)}))),b=g=>{r(g),i(R(a,v.version)),ee({process:g,packageCode:a.code,version:v.version}),ae().then(()=>k(!1))};return x==="buy"?e("a",{href:U(a),target:"_blank",rel:"noopener noreferrer",children:s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),children:[e(l,{iconName:a.price?"IconCreditCardPay":"IconMoodHappy",className:"shrink-0 w-5 h-5"}),e("span",{children:a.price?a.price+"$":"Get It Free"})]})}):x==="install"?s(f,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("install"),recentlySuccessful:P,processing:w,children:[e(re,{className:"shrink-0 w-5 h-5"}),e("span",{children:"Install"})]}):x=="uninstall"?s(f,{size:"sm",variant:"destructive",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("uninstall"),recentlySuccessful:P,processing:w,children:[e(ie,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Uninstall"})]}):x=="update"?s(f,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("update"),recentlySuccessful:P,processing:w,children:[e(oe,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Update"})]}):s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),disabled:!0,children:[e(W,{className:"w-5 h-5 shrink-0 text-red-400"}),e("span",{children:"Not Compatible with your core version"})]})};export{T as a,M as b,$ as c,X as d,$e as e,K as f,Y as g,J as h,me as i,pe as j,Q as k,Ne as l,te as m};
1
+ import{a as A,b as p}from"./chunk-P53KMAZ4.js";import{a as O,b as u,c as C,d as R,e as U,f as V}from"./chunk-RCUM5ZGQ.js";import{d as N,i as y}from"./chunk-O7HG7UWR.js";import{a as _}from"./chunk-2QTWMGKG.js";import{g as f}from"./chunk-REOTH2BZ.js";import{a as E}from"./chunk-QKGQOXDM.js";import{a as L,f as z,j as F}from"./chunk-QFUZ6MVT.js";import{b as m}from"./chunk-TVCWAJFT.js";import{a as B}from"./chunk-3DBYUBWW.js";import{a as I}from"./chunk-65LRDGYI.js";import{a as l}from"./chunk-G4EEZUTC.js";import{a as o}from"./chunk-GND5KQRZ.js";import{IconCircleCheckFilled as H,IconCircleX as W,IconDownload as re,IconRefresh as oe,IconStar as q,IconStarFilled as D,IconUsersGroup as ne,IconX as ie}from"@tabler/icons-react";import{Fragment as ce,jsx as n,jsxs as h}from"react/jsx-runtime";var fe=({packages:a,marketPackages:t,meta:c,account:r,error:i})=>n(_,{breadcrumbs:[{icon:"IconBuildingStore",title:"Marketplace"}],children:n(A,{packages:a,marketPackages:t,account:r??null,meta:c,error:i,children:h("div",{className:"grid gap-10",children:[n(T,{className:"mt-15 mb-25"}),n(te,{}),n($,{})]})})}),te=()=>{let{marketPackages:a}=p(),t=a?.filter(r=>r.code.startsWith("emintech")),c=a?.filter(r=>!r.code.startsWith("emintech"));return h(ce,{children:[t&&t?.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Official Packages",description:"Explore the Emin Tech's official packages.",icon:"IconStar",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:t.map(r=>n(M,{pkg:r}))})]}),c&&c.length>0&&h("div",{className:"grid gap-7",children:[n(I,{title:"Community Packages",description:"These community packages have been quality-checked and are fully compatible.",icon:"IconUsers",buttons:n(m,{variant:"link",children:"View All"})}),n("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-5",children:c.map(r=>n(M,{pkg:r}))})]})]})};import{useForm as le}from"@inertiajs/react";import{Fragment as G,jsx as e,jsxs as s}from"react/jsx-runtime";var T=({className:a})=>{let{meta:t}=p();return s("div",{className:o("grid gap-4",a),children:[e(l,{iconName:"IconPackages",className:"mx-auto h-15 w-15"}),s("div",{className:"grid text-center",children:[e("h2",{className:"text-2xl font-bold",children:"Search what do you need?"}),e("span",{className:"text-sm text-muted-foreground",children:"Search for packages by name or category."})]}),e(E,{placeholder:"Search package name, author, or category...",value:t?.search,className:"bg-accent/10"})]})},M=({pkg:a,className:t})=>{let{setSelectedPackage:c,setIsDetailModalOpen:r}=p(),{packages:i}=N(),d=i.find(k=>k.code===a.code)??null;return s(B,{className:o("p-2 bg-accent/10 w-full shadow-md hover:scale-105 duration-300",t),children:[s("div",{className:"grid gap-4 cursor-pointer",onClick:()=>{c(a),r(!0)},children:[e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm",style:{backgroundImage:`url(${a.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}),s("div",{className:"grid px-2 gap-2",children:[s("div",{className:"flex items-center gap-1",children:[e(X,{pkg:a}),e(y,{pkg:{...a,is_custom:!1},className:"ml-auto text-sm",size:18})]}),e("hr",{}),s("span",{className:"text-sm text-muted-foreground truncate",children:[a.description," "]}),s("div",{className:"flex items-center",children:[d?s("div",{className:"flex items-center gap-2",children:[e(H,{className:"w-5 h-5 text-green-500 shrink-0"}),e("span",{className:"text-xs text-green-500",children:"Installed"})]}):e(K,{pkg:a,className:"text-xs"}),e(Y,{pkg:a,className:"text-xs ml-auto text-muted-foreground"})]})]})]}),e("div",{className:"px-2 mb-1",children:e(Q,{pkg:a})})]})},$=()=>{let{isDetailModalOpen:a,setIsDetailModalOpen:t,selectedPackage:c}=p(),{packages:r}=N();if(!a||!c)return;let i=r.find(d=>d.code===c.code)??null;return e(L,{open:a,onOpenChange:t,children:s(z,{className:"min-h-[25vh] max-h-[80vh] min-w-[90vw] sm:min-w-[70vw] xl:min-w-[60vw] 2xl:min-w-[50vw] grid gap-5 overflow-y-auto",children:[e("div",{className:"",children:e("div",{className:"w-full h-auto rounded-lg aspect-[4/3] shadow-sm lg:aspect-[16/5]",style:{backgroundImage:`url(${c.cover??c.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}})}),s("div",{className:"grid grid-cols-1 lg:grid-cols-[4fr_2fr] gap-5",children:[s("div",{className:"grid grid-cols-1 gap-2",children:[e(X,{pkg:c}),e(F,{children:c.description}),e(K,{pkg:c,className:"text-xs"})]}),s("div",{className:"grid gap-3",children:[e(J,{pkg:c,className:"text-sm text-muted-foreground hover:text-primary cursor-pointer"}),e(y,{pkg:{...c,is_custom:!1},className:"text-sm flex items-center gap-2",size:20}),e(pe,{pkg:c,className:"text-sm text-muted-foreground"}),e(me,{pkg:c,className:"text-sm text-muted-foreground"}),s("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e(ne,{className:"w-5 h-5 shrink-0"}),e(Y,{pkg:c,className:"text-sm"})]})]}),s("div",{className:"col-span-full grid gap-2",children:[e(Q,{pkg:c}),C(u(c),i)==="uninstall"&&e("div",{className:"col-span-full w-full grid gap-2",children:s("span",{className:"text-xs text-center text-muted-foreground",children:["You installed that at ",i?.created_at?new Date(i.created_at).toLocaleString():"N/A"]})})]})]})]})})},X=({pkg:a,className:t})=>s("div",{className:o("grid grid-cols-[25px_auto] gap-2",t),children:[e(l,{iconName:"IconPackage",className:"shrink-0 w-full"}),e("span",{className:"font-bold truncate",children:a.name})]}),Ve=({pkg:a,className:t})=>e("div",{className:o("grid gap-2",t),children:e(J,{pkg:a})}),K=({pkg:a,className:t})=>e("div",{className:o("flex items-center gap-2",t),children:V(u(a))?s(G,{children:[e(H,{className:"w-5 h-5 shrink-0 text-green-400"}),e("div",{className:"grid",children:e("span",{className:"text-green-400 truncate",children:"Compatible with your app"})})]}):s(G,{children:[e(W,{className:"w-5 h-5 shrink-0 text-red-400"}),e("div",{className:"grid",children:e("span",{className:"text-red-400 truncate",children:"Not compatible with your app"})})]})}),Y=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2 shrink-0",t),children:[s("span",{className:"shrink-0",children:[Math.floor(Math.random()*1e3).toFixed(0)," Reviews"]}),s("div",{className:"flex items-center gap-0 shrink-0",children:[e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(D,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(q,{className:"h-[18px] w-[18px] shrink-0"}),e(q,{className:"h-[18px] w-[18px] shrink-0"})]})]}),J=({pkg:a,className:t})=>s("div",{className:o("flex items-center gap-2",t),children:[e(l,{iconName:"IconUserCircle",className:"shrink-0 w-5 h-5"}),e("a",{href:O(a.author),className:"capitalize",children:a.author??"yok"})]}),me=({pkg:a,text:t="Last Update:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconCalendar",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",new Date(a.updated_at??"").toLocaleDateString()??"-"]})]}),pe=({pkg:a,text:t="Core Requirement:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(l,{iconName:"IconInfoCircle",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",u(a)?.core_constraint??"-"]})]}),Q=({pkg:a,className:t})=>{let{packages:c,setProcess:r,setPackageManifest:i,setIsLoading:d,setIsModalOpen:k}=N(),Z=c.find(g=>g.code===a.code)??null,v=u(a),x=C(v,Z),{post:j,setData:ee,recentlySuccessful:P,processing:w}=le(),ae=()=>(d(!0),k(!0),new Promise(S=>j(route("dashboard.packages.manager"),{onSuccess:()=>S(!0),onError:se=>S(se)}))),b=g=>{r(g),i(R(a,v.version)),ee({process:g,packageCode:a.code,version:v.version}),ae().then(()=>k(!1))};return x==="buy"?e("a",{href:U(a),target:"_blank",rel:"noopener noreferrer",children:s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),children:[e(l,{iconName:a.price?"IconCreditCardPay":"IconMoodHappy",className:"shrink-0 w-5 h-5"}),e("span",{children:a.price?a.price+"$":"Get It Free"})]})}):x==="install"?s(f,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("install"),recentlySuccessful:P,processing:w,children:[e(re,{className:"shrink-0 w-5 h-5"}),e("span",{children:"Install"})]}):x=="uninstall"?s(f,{size:"sm",variant:"destructive",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("uninstall"),recentlySuccessful:P,processing:w,children:[e(ie,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Uninstall"})]}):x=="update"?s(f,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>b("update"),recentlySuccessful:P,processing:w,children:[e(oe,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Update"})]}):s(m,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),disabled:!0,children:[e(W,{className:"w-5 h-5 shrink-0 text-red-400"}),e("span",{children:"Not Compatible with your core version"})]})};export{T as a,M as b,$ as c,X as d,Ve as e,K as f,Y as g,J as h,me as i,pe as j,Q as k,fe as l,te as m};
@@ -1 +1 @@
1
- import{a as T,d as B}from"./chunk-QEAWHBYJ.js";import{a as D}from"./chunk-YHEAFMGX.js";import{a as x,b as N,c as k,d as b,f as C}from"./chunk-3DBYUBWW.js";import{a as U}from"./chunk-65LRDGYI.js";import{b as c}from"./chunk-TVCWAJFT.js";import{a as r}from"./chunk-G4EEZUTC.js";import{a as d}from"./chunk-GND5KQRZ.js";import{a as u}from"./chunk-DWAU5VTB.js";import{Link as R,useHttp as O}from"@inertiajs/react";import{useEffect as V,useState as p}from"react";import{toast as q}from"sonner";import{IconAlertCircleFilled as F,IconArrowUpRight as H,IconCircleCheckFilled as G,IconRefresh as L}from"@tabler/icons-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var se=({account:n})=>e(U,{title:"My Platform Account",icon:"IconUserCircle",description:"Manage your platform account settings.",className:"col-span-full",buttons:n?e(c,{variant:"outline",size:"sm",children:t("a",{href:"https://emincore.io/login",target:"_blank",className:"flex items-center gap-2",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:n})]})}):e(R,{href:route("dashboard.marketplace"),className:"flex items-center gap-2",children:t(c,{variant:"default",size:"sm",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:"Connect to Platform"})]})})}),oe=({eminCore:n})=>t(x,{className:"col-span-2",children:[t(N,{children:[t(k,{className:"flex gap-1",children:[t("div",{className:"grid gap-2",children:[e("img",{src:"https://emin.llc/wp-content/uploads/2022/11/siyah-logo-arkasiz.svg",className:"h-8"}),e("span",{className:"text-xl font-bold text-primary",children:"EminCore - The Cross-Ecosystem Orchestrator"})]}),t("div",{className:"ml-auto flex max-w-[400px] flex-wrap gap-1",children:[t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconCode",className:"h-4 w-4"}),t("span",{className:"text-xs font-bold",children:["v",n.version]})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBuilding",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Emin Tech"})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBook",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Docs"})]})]})]}),e(b,{children:e("p",{children:"A modular application platform that orchestrates Composer and npm ecosystems through a unified package architecture, marketplace, and runtime."})})]}),e(C,{className:"grid gap-6",children:e(K,{})})]}),ne=({requirements:n})=>{let s=({requirement:o})=>{let i=Math.random()*500+800,[g,l]=p(!0);return p(()=>{let h=setTimeout(()=>l(!1),i);return()=>clearTimeout(h)}),g?e(r,{iconName:"IconLoader2",className:"animate-spin mx-auto h-4 w-4 my-0.5"}):e("span",{className:d("font-mono font-bold text-sm",o.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:o.value??"-"})};return t(x,{className:"col-span-2",children:[e(N,{children:t(k,{className:"flex items-center gap-2",children:[e(r,{iconName:"IconServer",className:"h-5 w-5 text-primary"}),e("h3",{className:"font-semibold",children:"System Status"})]})}),e(C,{children:e("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3",children:n?.map(o=>t("div",{className:"rounded-md border p-3 text-center grid gap-[1px]",children:[t("span",{className:"text-xs text-muted-foreground mx-auto flex items-center gap-1",children:[e(r,{iconName:o.icon,className:"h-4 w-4 text-primary mx-auto"}),o.title]}),e(s,{requirement:o}),o.requirements&&e("span",{className:"font-mono font-bold text-xs text-muted-foreground",children:o.requirements})]}))})})]})},re=()=>t("div",{className:"col-span-2 text-center grid gap-3",children:[t("p",{className:"text-sm text-muted-foreground px-5 mx-auto",children:["A two-year R&D effort carried out by a single-person team resulted in the completion of this platform and ecosystem. It provides users with a unique infrastructure built on the most modern and powerful technology stacks. This infrastructure enables you to prepare your project in the shortest possible time while achieving maximum performance, user engagement, and rich functionality.",e("br",{}),"Thank you for choosing us."]}),e("img",{src:"https://eminilhan.com/wp-content/uploads/2023/04/beyaz-logo-1.png",className:"h-10 mx-auto"})]}),K=()=>{let n=localStorage?.getItem("last_core_update_checked"),[s,o]=p(localStorage?.getItem("is_core_up_to_date")==="true"),[i,g]=p(n?new Date(n):null),[l,h]=p(localStorage?.getItem("last_core_update_version")??"");V(()=>{localStorage.setItem("is_core_up_to_date",s?"true":"false"),localStorage.setItem("last_core_update_version",typeof l=="string"?l:""),localStorage.setItem("last_core_update_checked",i?i.toISOString():"")},[s,l,i]);let v=B(),{packages:y,isLoading:a,setIsLoading:M,setIsModalOpen:P,setPackageManifest:w,setProcess:I}=v,E=()=>a?e(L,{className:"h-6 w-6 text-primary animate-spin shrink-0"}):s?e(G,{className:"h-6 w-6 text-green-600 dark:text-green-400 shrink-0"}):e(F,{className:"h-6 w-6 text-blue-600 dark:text-blue-500 shrink-0"}),z=()=>t("div",{className:"grid",children:[e("span",{className:d("text-sm font-medium",a?"text-primary":s?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-500"),children:a?"Checking updates...":s?"System is up to date!":"New version available!"}),t("span",{className:"text-xs text-primary/70",children:[s?"Last checked: "+(i?.toLocaleString()??"never"):"You should update your system to the latest version!",!s&&l&&" (Latest version: "+l+")"]})]});return t("div",{className:"grid md:flex md:items-center gap-2",children:[e(()=>t("div",{className:"flex items-center gap-2",children:[e(E,{}),e(z,{})]}),{}),t("div",{className:"grid md:flex md:items-center gap-3 md:ml-auto",children:[e(()=>!s&&!a&&t(c,{size:"sm",variant:"ghost",className:d("gap-2"),onClick:()=>{a||(I("update"),M(!0),w({...y.find(f=>f.code==u),version:"latest"}),P(!0),T())},"aria-readonly":a,children:[e(H,{className:d("h-4 w-4")}),"Update Now"]}),{}),e(()=>{let f=O({process:"check-update",packageCode:u}),A=()=>{if(!i)return!0;let m=new Date().getTime()-i.getTime(),S=60*1e3-m;if(S>0)return q.warning(`Please wait ${Math.ceil(S/1e3)} seconds before checking again.`),!1;let _=new Date().toISOString();return g(new Date(_)),localStorage.setItem("last_core_update_checked",_),!0};return t(c,{size:"sm",variant:"outline",className:d("gap-2",a&&"animate-pulse"),onClick:()=>{a||!A()||(I("update"),w(y.find(m=>m.code==u)),D(v,f).then(m=>{o(m===!0),typeof m!="boolean"&&h(m.version)}).catch())},"aria-readonly":a,children:[e(L,{className:d("h-4 w-4",a&&"animate-spin")}),a?"Checking updates...":"Check Updates"]})},{})]})]})};export{se as a,oe as b,ne as c,re as d};
1
+ import{a as T,d as B}from"./chunk-O7HG7UWR.js";import{a as D}from"./chunk-YHEAFMGX.js";import{b as c}from"./chunk-TVCWAJFT.js";import{a as x,b as N,c as k,d as b,f as C}from"./chunk-3DBYUBWW.js";import{a as U}from"./chunk-65LRDGYI.js";import{a as r}from"./chunk-G4EEZUTC.js";import{a as d}from"./chunk-GND5KQRZ.js";import{a as u}from"./chunk-DWAU5VTB.js";import{Link as R,useHttp as O}from"@inertiajs/react";import{useEffect as V,useState as p}from"react";import{toast as q}from"sonner";import{IconAlertCircleFilled as F,IconArrowUpRight as H,IconCircleCheckFilled as G,IconRefresh as L}from"@tabler/icons-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var se=({account:n})=>e(U,{title:"My Platform Account",icon:"IconUserCircle",description:"Manage your platform account settings.",className:"col-span-full",buttons:n?e(c,{variant:"outline",size:"sm",children:t("a",{href:"https://emincore.io/login",target:"_blank",className:"flex items-center gap-2",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:n})]})}):e(R,{href:route("dashboard.marketplace"),className:"flex items-center gap-2",children:t(c,{variant:"default",size:"sm",children:[e(r,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:"Connect to Platform"})]})})}),oe=({eminCore:n})=>t(x,{className:"col-span-2",children:[t(N,{children:[t(k,{className:"flex gap-1",children:[t("div",{className:"grid gap-2",children:[e("img",{src:"https://emin.llc/wp-content/uploads/2022/11/siyah-logo-arkasiz.svg",className:"h-8"}),e("span",{className:"text-xl font-bold text-primary",children:"EminCore - The Cross-Ecosystem Orchestrator"})]}),t("div",{className:"ml-auto flex max-w-[400px] flex-wrap gap-1",children:[t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconCode",className:"h-4 w-4"}),t("span",{className:"text-xs font-bold",children:["v",n.version]})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBuilding",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Emin Tech"})]}),t(c,{variant:"outline",size:"sm",className:"gap-2",children:[e(r,{iconName:"IconBook",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Docs"})]})]})]}),e(b,{children:e("p",{children:"A modular application platform that orchestrates Composer and npm ecosystems through a unified package architecture, marketplace, and runtime."})})]}),e(C,{className:"grid gap-6",children:e(K,{})})]}),ne=({requirements:n})=>{let s=({requirement:o})=>{let i=Math.random()*500+800,[g,l]=p(!0);return p(()=>{let h=setTimeout(()=>l(!1),i);return()=>clearTimeout(h)}),g?e(r,{iconName:"IconLoader2",className:"animate-spin mx-auto h-4 w-4 my-0.5"}):e("span",{className:d("font-mono font-bold text-sm",o.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:o.value??"-"})};return t(x,{className:"col-span-2",children:[e(N,{children:t(k,{className:"flex items-center gap-2",children:[e(r,{iconName:"IconServer",className:"h-5 w-5 text-primary"}),e("h3",{className:"font-semibold",children:"System Status"})]})}),e(C,{children:e("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3",children:n?.map(o=>t("div",{className:"rounded-md border p-3 text-center grid gap-[1px]",children:[t("span",{className:"text-xs text-muted-foreground mx-auto flex items-center gap-1",children:[e(r,{iconName:o.icon,className:"h-4 w-4 text-primary mx-auto"}),o.title]}),e(s,{requirement:o}),o.requirements&&e("span",{className:"font-mono font-bold text-xs text-muted-foreground",children:o.requirements})]}))})})]})},re=()=>t("div",{className:"col-span-2 text-center grid gap-3",children:[t("p",{className:"text-sm text-muted-foreground px-5 mx-auto",children:["A two-year R&D effort carried out by a single-person team resulted in the completion of this platform and ecosystem. It provides users with a unique infrastructure built on the most modern and powerful technology stacks. This infrastructure enables you to prepare your project in the shortest possible time while achieving maximum performance, user engagement, and rich functionality.",e("br",{}),"Thank you for choosing us."]}),e("img",{src:"https://eminilhan.com/wp-content/uploads/2023/04/beyaz-logo-1.png",className:"h-10 mx-auto"})]}),K=()=>{let n=localStorage?.getItem("last_core_update_checked"),[s,o]=p(localStorage?.getItem("is_core_up_to_date")==="true"),[i,g]=p(n?new Date(n):null),[l,h]=p(localStorage?.getItem("last_core_update_version")??"");V(()=>{localStorage.setItem("is_core_up_to_date",s?"true":"false"),localStorage.setItem("last_core_update_version",typeof l=="string"?l:""),localStorage.setItem("last_core_update_checked",i?i.toISOString():"")},[s,l,i]);let v=B(),{packages:y,isLoading:a,setIsLoading:M,setIsModalOpen:P,setPackageManifest:w,setProcess:I}=v,E=()=>a?e(L,{className:"h-6 w-6 text-primary animate-spin shrink-0"}):s?e(G,{className:"h-6 w-6 text-green-600 dark:text-green-400 shrink-0"}):e(F,{className:"h-6 w-6 text-blue-600 dark:text-blue-500 shrink-0"}),z=()=>t("div",{className:"grid",children:[e("span",{className:d("text-sm font-medium",a?"text-primary":s?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-500"),children:a?"Checking updates...":s?"System is up to date!":"New version available!"}),t("span",{className:"text-xs text-primary/70",children:[s?"Last checked: "+(i?.toLocaleString()??"never"):"You should update your system to the latest version!",!s&&l&&" (Latest version: "+l+")"]})]});return t("div",{className:"grid md:flex md:items-center gap-2",children:[e(()=>t("div",{className:"flex items-center gap-2",children:[e(E,{}),e(z,{})]}),{}),t("div",{className:"grid md:flex md:items-center gap-3 md:ml-auto",children:[e(()=>!s&&!a&&t(c,{size:"sm",variant:"ghost",className:d("gap-2"),onClick:()=>{a||(I("update"),M(!0),w({...y.find(f=>f.code==u),version:"latest"}),P(!0),T())},"aria-readonly":a,children:[e(H,{className:d("h-4 w-4")}),"Update Now"]}),{}),e(()=>{let f=O({process:"check-update",packageCode:u}),A=()=>{if(!i)return!0;let m=new Date().getTime()-i.getTime(),S=60*1e3-m;if(S>0)return q.warning(`Please wait ${Math.ceil(S/1e3)} seconds before checking again.`),!1;let _=new Date().toISOString();return g(new Date(_)),localStorage.setItem("last_core_update_checked",_),!0};return t(c,{size:"sm",variant:"outline",className:d("gap-2",a&&"animate-pulse"),onClick:()=>{a||!A()||(I("update"),w(y.find(m=>m.code==u)),D(v,f).then(m=>{o(m===!0),typeof m!="boolean"&&h(m.version)}).catch())},"aria-readonly":a,children:[e(L,{className:d("h-4 w-4",a&&"animate-spin")}),a?"Checking updates...":"Check Updates"]})},{})]})]})};export{se as a,oe as b,ne as c,re as d};
@@ -0,0 +1 @@
1
+ var r=g=>{let t={};return g.forEach(o=>{let e=o.package_code;t[e]||(t[e]=[]),t[e].push(o)}),Object.entries(t).map(([o,e])=>({packageCode:o,widgets:e}))};export{r as a};
@@ -1 +1 @@
1
- import{a as A}from"./chunk-4LFQT3HG.js";import{a as L,b as m}from"./chunk-WQ53I46F.js";import{a as R}from"./chunk-KND3PUAR.js";import{a as _}from"./chunk-37DD6CZ3.js";import{c as E,ga as M,t as k,u as S,v as T}from"./chunk-AIXJLLPM.js";import{a as y}from"./chunk-M5QT5SFN.js";import{a as D,f as C,g as I,i as w}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as c}from"./chunk-G22OJQWL.js";import{a as p,b as u,c as g,d as v}from"./chunk-PRCYNFKC.js";import{a as x,d as P}from"./chunk-GND5KQRZ.js";import{router as F}from"@inertiajs/react";import{jsx as $}from"react/jsx-runtime";var f=()=>{let t=m(),{users:l,meta:s}=t,i=B();return $(M,{data:l,columns:i,meta:s,handleRequest:e=>V(e,t)})},V=(t,l)=>{F.get(route("dashboard.users"),{...t},{preserveState:!0,preserveScroll:!0,preserveUrl:!0,only:["users","meta"],onSuccess:s=>{l.setUsers(s.props.users),l.setMeta(s.props.meta)}})};import{Head as O}from"@inertiajs/react";import{jsx as d,jsxs as H}from"react/jsx-runtime";var W=({users:t,meta:l,statistics:s})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Users"}];return H(_,{breadcrumbs:i,children:[d(O,{title:"Users"}),d(R,{title:"Users",description:"Here you can see and manage all the system users.",icon:d(n,{iconName:"IconUsers",className:"h-10 w-10 my-2"})}),H(L,{users:t,meta:l,children:[d(A,{statistics:s}),d(f,{}),d(U,{})]})]})};import{useEffect as Z,useState as G}from"react";import{Fragment as J,jsx as a,jsxs as r}from"react/jsx-runtime";var q=t=>[{key:"name",label:"Name",value:t.name,type:"text"},{key:"surname",label:"surname",value:t.surname,type:"text"},{key:"email",label:"Email",value:t.email,editable:!1},{key:"role",label:"Role",value:t.role_code,type:"select",options:[{label:"Root",value:"root"},{label:"User",value:"user"}]},{key:"status",label:"Status",value:Number(t.status),type:"select",options:[{label:"Inactive",value:0},{label:"Active",value:1},{label:"Pending",value:2},{label:"Suspended",value:3}]},{key:"last_seen_at",label:"Last Seen At",value:t.last_seen_at?new Date(t.last_seen_at).toLocaleString():"Never",editable:!1},{key:"registered_at",label:"Registered At",value:new Date(t.created_at).toLocaleString(),editable:!1},{key:"updated_at",label:"Updated At",value:new Date(t.updated_at).toLocaleString(),editable:!1}],B=()=>{let{setSelectedUser:t,setShowUserModal:l}=m(),[s,i]=G(!0);return Z(()=>{i(!1);let e=setTimeout(()=>i(!0),50);return()=>clearTimeout(e)},[]),[{id:"select",header:({table:e})=>a(y,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:h=>e.toggleAllPageRowsSelected(!!h),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:e,table:h})=>a(y,{id:`select-row-${e.id}`,checked:e.getIsSelected(),onCheckedChange:z=>{e.toggleSelected(!!z)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"id",header:"ID",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("span",{style:{display:s?"block":"none"},children:["#",e.original.id]})]})},{accessorKey:"user",header:"User",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("div",{style:{display:s?"flex":"none"},className:"cursor-pointer",onClick:()=>{t(e.original),l(!0)},children:[a("div",{className:"flex sm:hidden",children:a(T,{user:e.original??null,settings:{showEmail:!0}})}),r("div",{className:"hidden sm:flex items-center gap-2",children:[a(k,{user:e.original,type:"square"}),a(S,{user:e.original,settings:{showId:!1}})]})]})]})},{accessorKey:"status",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Status"}),r(v,{children:[a(u,{children:"Status"}),a("span",{children:"The status of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"},children:e.original.status==0?a(n,{iconName:"IconPlayerPauseFilled",className:"h-4 w-4 text-primary"}):e.original.status==1?a(n,{iconName:"IconCircleCheckFilled",className:"h-4 w-4 text-green-400"}):e.original.status==2?a(n,{iconName:"IconZoom",className:"h-4 w-4 text-yellow-400"}):e.original.status==3&&a(n,{iconName:"IconBan",className:"h-4 w-4 text-red-400"})})]}),r(v,{children:[a(u,{children:"User Status"}),a("span",{children:e.original?.status==0?"Inactive":e.original?.status==1?"Active":e.original?.status==2?"Pending":"Suspended"})]})]})},{id:"role",accessorKey:"role",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Role"}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:"The role of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",isActive:e.original.role!==void 0,children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"}})]}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:e?.original?.role?.title??e.original.role_code})]})]})},{id:"actions",header:()=>"Actions",cell:({row:e})=>r(J,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"flex":"none"},className:"gap-1",children:a(N,{variant:"ghost",size:"sm",onClick:()=>{console.log("test"),t(e.original),l(!0)},children:a(n,{iconName:"IconEye"})})})]})}]};import{jsx as o,jsxs as b}from"react/jsx-runtime";var U=()=>{let{selectedUser:t,setSelectedUser:l,showUserModal:s,setShowUserModal:i}=m();return o(D,{open:s,onOpenChange:i,children:b(C,{className:"max-h-[90vh] sm:max-w-[50vw] grid !gap-4 overflow-auto",children:[o(I,{className:"pb-4 border-b shrink-0",children:b(w,{children:["Details of ",t?.name]})}),o(K,{})]})})},K=()=>{let{selectedUser:t}=m();if(!t)return;let l=q(t);return b("div",{className:"grid md:grid-cols-[200px_auto] gap-5",children:[o("div",{className:"flex items-center gap-4",children:o("div",{style:{backgroundImage:`url(${P(t?.avatar??"")})`,backgroundSize:"cover"},className:"aspect-square h-auto w-full border rounded-sm object-cover"})}),o("div",{className:"grid grid-cols-2 gap-y-3",children:l.map(s=>b("div",{className:x("flex flex-col items-start justify-start",s.value?.toString()?.length>30?"col-span-2":""),children:[o("p",{className:"text-sm text-muted-foreground capitalize",children:s?.label}),o(E,{item:s,children:s.key==="status"?s.value==0?o("span",{className:"text-sm text-primary",children:"Inactive"}):s.value==1?o("span",{className:"text-sm text-green-400",children:"Active"}):s.value==2?o("span",{className:"text-sm text-yellow-400",children:"Pending"}):s.value==3&&o("span",{className:"text-sm text-red-400",children:"Suspended"}):o("span",{className:"text-sm",children:s?.value??"-"})},s.key)]},s.key))})]})};export{U as a,K as b,f as c,W as d,q as e,B as f};
1
+ import{a as A}from"./chunk-YMWCFYSC.js";import{a as L,b as m}from"./chunk-WQ53I46F.js";import{a as R}from"./chunk-KND3PUAR.js";import{a as _}from"./chunk-2QTWMGKG.js";import{c as E,ga as M,t as k,u as S,v as T}from"./chunk-REOTH2BZ.js";import{a as y}from"./chunk-M5QT5SFN.js";import{a as D,f as C,g as I,i as w}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as p,b as u,c as g,d as v}from"./chunk-PRCYNFKC.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as c}from"./chunk-G22OJQWL.js";import{a as x,d as P}from"./chunk-GND5KQRZ.js";import{router as F}from"@inertiajs/react";import{jsx as $}from"react/jsx-runtime";var f=()=>{let t=m(),{users:l,meta:s}=t,i=B();return $(M,{data:l,columns:i,meta:s,handleRequest:e=>V(e,t)})},V=(t,l)=>{F.get(route("dashboard.users"),{...t},{preserveState:!0,preserveScroll:!0,preserveUrl:!0,only:["users","meta"],onSuccess:s=>{l.setUsers(s.props.users),l.setMeta(s.props.meta)}})};import{Head as O}from"@inertiajs/react";import{jsx as d,jsxs as H}from"react/jsx-runtime";var W=({users:t,meta:l,statistics:s})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Users"}];return H(_,{breadcrumbs:i,children:[d(O,{title:"Users"}),d(R,{title:"Users",description:"Here you can see and manage all the system users.",icon:d(n,{iconName:"IconUsers",className:"h-10 w-10 my-2"})}),H(L,{users:t,meta:l,children:[d(A,{statistics:s}),d(f,{}),d(U,{})]})]})};import{useEffect as Z,useState as G}from"react";import{Fragment as J,jsx as a,jsxs as r}from"react/jsx-runtime";var q=t=>[{key:"name",label:"Name",value:t.name,type:"text"},{key:"surname",label:"surname",value:t.surname,type:"text"},{key:"email",label:"Email",value:t.email,editable:!1},{key:"role",label:"Role",value:t.role_code,type:"select",options:[{label:"Root",value:"root"},{label:"User",value:"user"}]},{key:"status",label:"Status",value:Number(t.status),type:"select",options:[{label:"Inactive",value:0},{label:"Active",value:1},{label:"Pending",value:2},{label:"Suspended",value:3}]},{key:"last_seen_at",label:"Last Seen At",value:t.last_seen_at?new Date(t.last_seen_at).toLocaleString():"Never",editable:!1},{key:"registered_at",label:"Registered At",value:new Date(t.created_at).toLocaleString(),editable:!1},{key:"updated_at",label:"Updated At",value:new Date(t.updated_at).toLocaleString(),editable:!1}],B=()=>{let{setSelectedUser:t,setShowUserModal:l}=m(),[s,i]=G(!0);return Z(()=>{i(!1);let e=setTimeout(()=>i(!0),50);return()=>clearTimeout(e)},[]),[{id:"select",header:({table:e})=>a(y,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:h=>e.toggleAllPageRowsSelected(!!h),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:e,table:h})=>a(y,{id:`select-row-${e.id}`,checked:e.getIsSelected(),onCheckedChange:z=>{e.toggleSelected(!!z)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"id",header:"ID",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("span",{style:{display:s?"block":"none"},children:["#",e.original.id]})]})},{accessorKey:"user",header:"User",cell:({row:e})=>r("div",{className:"flex",children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),r("div",{style:{display:s?"flex":"none"},className:"cursor-pointer",onClick:()=>{t(e.original),l(!0)},children:[a("div",{className:"flex sm:hidden",children:a(T,{user:e.original??null,settings:{showEmail:!0}})}),r("div",{className:"hidden sm:flex items-center gap-2",children:[a(k,{user:e.original,type:"square"}),a(S,{user:e.original,settings:{showId:!1}})]})]})]})},{accessorKey:"status",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Status"}),r(v,{children:[a(u,{children:"Status"}),a("span",{children:"The status of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"},children:e.original.status==0?a(n,{iconName:"IconPlayerPauseFilled",className:"h-4 w-4 text-primary"}):e.original.status==1?a(n,{iconName:"IconCircleCheckFilled",className:"h-4 w-4 text-green-400"}):e.original.status==2?a(n,{iconName:"IconZoom",className:"h-4 w-4 text-yellow-400"}):e.original.status==3&&a(n,{iconName:"IconBan",className:"h-4 w-4 text-red-400"})})]}),r(v,{children:[a(u,{children:"User Status"}),a("span",{children:e.original?.status==0?"Inactive":e.original?.status==1?"Active":e.original?.status==2?"Pending":"Suspended"})]})]})},{id:"role",accessorKey:"role",header:()=>r(p,{trigger:"hover",children:[a(g,{children:"Role"}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:"The role of user"})]})]}),cell:({row:e})=>r(p,{trigger:"hover",isActive:e.original.role!==void 0,children:[r(g,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"block":"none"}})]}),r(v,{children:[a(u,{children:"Role"}),a("span",{children:e?.original?.role?.title??e.original.role_code})]})]})},{id:"actions",header:()=>"Actions",cell:({row:e})=>r(J,{children:[a(c,{className:"my-2 h-5 w-10",style:{display:s?"none":"block"}}),a("div",{style:{display:s?"flex":"none"},className:"gap-1",children:a(N,{variant:"ghost",size:"sm",onClick:()=>{console.log("test"),t(e.original),l(!0)},children:a(n,{iconName:"IconEye"})})})]})}]};import{jsx as o,jsxs as b}from"react/jsx-runtime";var U=()=>{let{selectedUser:t,setSelectedUser:l,showUserModal:s,setShowUserModal:i}=m();return o(D,{open:s,onOpenChange:i,children:b(C,{className:"max-h-[90vh] sm:max-w-[50vw] grid !gap-4 overflow-auto",children:[o(I,{className:"pb-4 border-b shrink-0",children:b(w,{children:["Details of ",t?.name]})}),o(K,{})]})})},K=()=>{let{selectedUser:t}=m();if(!t)return;let l=q(t);return b("div",{className:"grid md:grid-cols-[200px_auto] gap-5",children:[o("div",{className:"flex items-center gap-4",children:o("div",{style:{backgroundImage:`url(${P(t?.avatar??"")})`,backgroundSize:"cover"},className:"aspect-square h-auto w-full border rounded-sm object-cover"})}),o("div",{className:"grid grid-cols-2 gap-y-3",children:l.map(s=>b("div",{className:x("flex flex-col items-start justify-start",s.value?.toString()?.length>30?"col-span-2":""),children:[o("p",{className:"text-sm text-muted-foreground capitalize",children:s?.label}),o(E,{item:s,children:s.key==="status"?s.value==0?o("span",{className:"text-sm text-primary",children:"Inactive"}):s.value==1?o("span",{className:"text-sm text-green-400",children:"Active"}):s.value==2?o("span",{className:"text-sm text-yellow-400",children:"Pending"}):s.value==3&&o("span",{className:"text-sm text-red-400",children:"Suspended"}):o("span",{className:"text-sm",children:s?.value??"-"})},s.key)]},s.key))})]})};export{U as a,K as b,f as c,W as d,q as e,B as f};
@@ -1 +1 @@
1
- import{B as d,H as m,L as l,k as n}from"./chunk-AIXJLLPM.js";import{a as o,b as c,f as t}from"./chunk-3DBYUBWW.js";import{a as i}from"./chunk-65LRDGYI.js";import{a}from"./chunk-G4EEZUTC.js";import{Head as p}from"@inertiajs/react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var A=({mustVerifyEmail:s,status:f})=>r(d,{breadcrumbs:[{title:"Edit Profile",href:route("user.profile.edit"),icon:"IconEdit"}],children:[e(p,{title:"Account Settings"}),r("div",{className:"grid md:grid-cols-[2fr_4fr] gap-12",children:[e(m,{}),r(o,{children:[e(c,{children:e(i,{icon:e(a,{iconName:"IconUser"}),title:"Profile Information",description:"Update your name and email address"})}),e(t,{children:e(l,{mustVerifyEmail:s,status:f})})]}),e(o,{className:"col-span-full",children:r(t,{className:"grid gap-8 md:flex md:items-center",children:[e(i,{icon:e(a,{iconName:"IconPalette"}),title:"Appearance",description:"Change your account appearance"}),e(n,{className:"md:ml-auto"})]})})]})]});export{A as a};
1
+ import{B as d,H as m,L as l,k as n}from"./chunk-REOTH2BZ.js";import{a as o,b as c,f as t}from"./chunk-3DBYUBWW.js";import{a as i}from"./chunk-65LRDGYI.js";import{a}from"./chunk-G4EEZUTC.js";import{Head as p}from"@inertiajs/react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var A=({mustVerifyEmail:s,status:f})=>r(d,{breadcrumbs:[{title:"Edit Profile",href:route("user.profile.edit"),icon:"IconEdit"}],children:[e(p,{title:"Account Settings"}),r("div",{className:"grid md:grid-cols-[2fr_4fr] gap-12",children:[e(m,{}),r(o,{children:[e(c,{children:e(i,{icon:e(a,{iconName:"IconUser"}),title:"Profile Information",description:"Update your name and email address"})}),e(t,{children:e(l,{mustVerifyEmail:s,status:f})})]}),e(o,{className:"col-span-full",children:r(t,{className:"grid gap-8 md:flex md:items-center",children:[e(i,{icon:e(a,{iconName:"IconPalette"}),title:"Appearance",description:"Change your account appearance"}),e(n,{className:"md:ml-auto"})]})})]})]});export{A as a};
@@ -1 +1 @@
1
- import{Y as v,a as l,y as h}from"./chunk-AIXJLLPM.js";import{a as u}from"./chunk-E2ZUBHVJ.js";import{a as n,c as s,e as d,h as p,i as c,k as m}from"./chunk-PWQOU5TI.js";import{b as t}from"./chunk-TVCWAJFT.js";import{a as b}from"./chunk-G4EEZUTC.js";import{d as i}from"./chunk-GND5KQRZ.js";import{usePage as S}from"@inertiajs/react";import{Transition as f}from"@headlessui/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var E=({...y})=>{let{url:T}=S(),a=S().props,{dashboard:g}=a?.emin_core_menus,x=a?.app?.logos??[],{state:r}=n(),F=u(g,T);return o(s,{collapsible:"icon",...y,children:[o(p,{children:[o("div",{className:"relative items-center !h-[50px]",children:[e(f,{show:r=="collapsed",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("img",{className:"absolute !max-w-[35px] !max-h-[35px]",src:i(x?.favicon)})}),e(f,{show:r=="expanded",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{children:e(v,{link:route("dashboard")})})})]}),e("hr",{className:"w-full"}),e(h,{})]}),e("hr",{}),e(m,{children:e(l,{sidebarMenu:F})}),e(c,{children:o(t,{variant:"outline",className:"flex items-center",children:[e(b,{iconName:"IconHelp"}),e("span",{className:"group-data-[collapsible=icon]:hidden",children:"Get Help"})]})}),e(d,{})]})};export{E as a};
1
+ import{Y as v,a as l,y as h}from"./chunk-REOTH2BZ.js";import{a as u}from"./chunk-E2ZUBHVJ.js";import{a as n,c as s,e as d,h as p,i as c,k as m}from"./chunk-PWQOU5TI.js";import{b as t}from"./chunk-TVCWAJFT.js";import{a as b}from"./chunk-G4EEZUTC.js";import{d as i}from"./chunk-GND5KQRZ.js";import{usePage as S}from"@inertiajs/react";import{Transition as f}from"@headlessui/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var E=({...y})=>{let{url:T}=S(),a=S().props,{dashboard:g}=a?.emin_core_menus,x=a?.app?.logos??[],{state:r}=n(),F=u(g,T);return o(s,{collapsible:"icon",...y,children:[o(p,{children:[o("div",{className:"relative items-center !h-[50px]",children:[e(f,{show:r=="collapsed",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("img",{className:"absolute !max-w-[35px] !max-h-[35px]",src:i(x?.favicon)})}),e(f,{show:r=="expanded",enter:"duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e("div",{children:e(v,{link:route("dashboard")})})})]}),e("hr",{className:"w-full"}),e(h,{})]}),e("hr",{}),e(m,{children:e(l,{sidebarMenu:F})}),e(c,{children:o(t,{variant:"outline",className:"flex items-center",children:[e(b,{iconName:"IconHelp"}),e("span",{className:"group-data-[collapsible=icon]:hidden",children:"Get Help"})]})}),e(d,{})]})};export{E as a};
@@ -1 +1 @@
1
- import{a as R,b as B,c as H,d as O}from"./chunk-EV7437AD.js";import{c as M}from"./chunk-QEAWHBYJ.js";import{a as E}from"./chunk-4DHRTWA7.js";import{a as V}from"./chunk-KND3PUAR.js";import{a as F}from"./chunk-37DD6CZ3.js";import{g as C}from"./chunk-AIXJLLPM.js";import{a as w}from"./chunk-DSY4KVMF.js";import{a as h,b as P,f as D,g as b,i as I,j as k}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as A}from"./chunk-DWAU5VTB.js";import{useState as z}from"react";import{useForm as G,usePage as j}from"@inertiajs/react";import{IconAlertCircle as Y}from"@tabler/icons-react";import{Fragment as c,jsx as r,jsxs as u}from"react/jsx-runtime";var K=o=>[{step:u(c,{children:["Sign up at ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Create an application for ",r("strong",{children:o.app.url})]})},{step:u(c,{children:["Copy your ",r("strong",{children:"verification key"})]})},{step:r(c,{children:"Submit and verify your application"})}],L=o=>[{step:u(c,{children:["Log in to ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Select the application for ",r("strong",{children:o.app.url})]})},{step:r(c,{children:"Generate or regenerate an API Secret key and fill it in the form below."})},{step:r(c,{children:"Submit and complete the connection process."})}],X=o=>{switch(o){case"invalid_api_secret":return{icon:r(Y,{className:"text-red-500 mx-auto h-15 w-15"}),title:"Invalid API Secret Key",message:"Please check your API Secret key to access all ecosystem features.",content:r(S,{})};case"get_api_secret":return{icon:"IconPackages",title:"Connect to EminCore Platform",message:"Connect your application to the EminCore platform with your API Secret key to access all ecosystem features.",content:r(S,{})};case"verify_app":return{icon:"IconProgressCheck",title:"Verify your application",message:"Verify your application on the EminCore platform to access marketplace.",content:r(T,{})};case"403":return{icon:"IconBan",title:"403 Forbidden",message:"You do not have permission to access this resource."};default:return null}};import{Head as $}from"@inertiajs/react";import{Fragment as J,jsx as s,jsxs as _}from"react/jsx-runtime";var ce=({packages:o,requirements:m,account:l,error:g})=>{let p=[{title:"WM Dashboard",href:route("dashboard")},{title:"Platform"}],d=o.find(f=>f.code==A);return _(J,{children:[s($,{title:"Platform"}),s(F,{breadcrumbs:p,children:s(M,{packages:o,children:_("div",{className:"container mx-auto",children:[s(V,{title:"Platform",description:"Platform overview",icon:s(n,{iconName:"IconCloudCog"})}),_("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s(R,{account:l}),s(B,{eminCore:d}),s(H,{requirements:m}),s(O,{})]})]})})})]})};import{toast as q}from"sonner";import{jsx as e,jsxs as t}from"react/jsx-runtime";var _e=({icon:o,title:m,message:l,content:g,className:p})=>t("div",{className:`grid gap-4 mt-15 mb-25 ${p}`,children:[o&&(typeof o=="string"?e(n,{iconName:o,className:"mx-auto h-15 w-15"}):o),t("div",{className:"grid gap-2 text-center",children:[e("h2",{className:"text-2xl font-bold",children:m}),e("span",{className:"text-sm text-muted-foreground",children:l}),g]})]}),S=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({api_secret_key:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconPlug",className:"mx-auto h-10 w-10"}),e("span",{children:"Connect to EminCore Platform"})]}),e(k,{className:"text-center",children:"Please provide valid API Secret Key to connect your application to the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.connect"),{onFinish:x}));q.promise(i,{loading:"Connecting to EminCore Platform..."})},children:[t("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:[e("strong",{className:"text-center text-sm",children:"How to get API & Verification key"}),L(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))]}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your API secret key",icon:"IconKey",value:g.api_secret_key,onChange:a=>p({api_secret_key:a.target.value}),error:y.api_secret_key}),t(C,{recentlySuccessful:v,processing:f,variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})]})]})})]})]})},T=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({verification_code:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconProgressCheck",className:"mx-auto h-10 w-10"}),e("span",{children:"Verify your application on EminCore Platform"})]}),e(k,{className:"text-center",children:"Please follow the steps below to verify your application on the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.verify"),{onFinish:x}));q.promise(i,{loading:"Verifying your application..."})},children:[e("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:K(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your verification code",icon:"IconKey",value:g.verification_code,onChange:a=>p({verification_code:a.target.value}),error:y.verification_code}),t(C,{processing:f,recentlySuccessful:v,className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]}),e(w,{message:y?.verification_code})]})]})})]})]})};export{_e as a,S as b,T as c,K as d,L as e,X as f,ce as g};
1
+ import{a as R,b as B,c as H,d as O}from"./chunk-7IMZZ3VV.js";import{c as M}from"./chunk-O7HG7UWR.js";import{a as V}from"./chunk-KND3PUAR.js";import{a as E}from"./chunk-4DHRTWA7.js";import{a as F}from"./chunk-2QTWMGKG.js";import{g as C}from"./chunk-REOTH2BZ.js";import{a as w}from"./chunk-DSY4KVMF.js";import{a as h,b as P,f as D,g as b,i as I,j as k}from"./chunk-QFUZ6MVT.js";import{b as N}from"./chunk-TVCWAJFT.js";import{a as n}from"./chunk-G4EEZUTC.js";import{a as A}from"./chunk-DWAU5VTB.js";import{useState as z}from"react";import{useForm as G,usePage as j}from"@inertiajs/react";import{IconAlertCircle as Y}from"@tabler/icons-react";import{Fragment as c,jsx as r,jsxs as u}from"react/jsx-runtime";var K=o=>[{step:u(c,{children:["Sign up at ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Create an application for ",r("strong",{children:o.app.url})]})},{step:u(c,{children:["Copy your ",r("strong",{children:"verification key"})]})},{step:r(c,{children:"Submit and verify your application"})}],L=o=>[{step:u(c,{children:["Log in to ",r("strong",{children:"emincore.io"})]})},{step:u(c,{children:["Select the application for ",r("strong",{children:o.app.url})]})},{step:r(c,{children:"Generate or regenerate an API Secret key and fill it in the form below."})},{step:r(c,{children:"Submit and complete the connection process."})}],X=o=>{switch(o){case"invalid_api_secret":return{icon:r(Y,{className:"text-red-500 mx-auto h-15 w-15"}),title:"Invalid API Secret Key",message:"Please check your API Secret key to access all ecosystem features.",content:r(S,{})};case"get_api_secret":return{icon:"IconPackages",title:"Connect to EminCore Platform",message:"Connect your application to the EminCore platform with your API Secret key to access all ecosystem features.",content:r(S,{})};case"verify_app":return{icon:"IconProgressCheck",title:"Verify your application",message:"Verify your application on the EminCore platform to access marketplace.",content:r(T,{})};case"403":return{icon:"IconBan",title:"403 Forbidden",message:"You do not have permission to access this resource."};default:return null}};import{Head as $}from"@inertiajs/react";import{Fragment as J,jsx as s,jsxs as _}from"react/jsx-runtime";var ce=({packages:o,requirements:m,account:l,error:g})=>{let p=[{title:"WM Dashboard",href:route("dashboard")},{title:"Platform"}],d=o.find(f=>f.code==A);return _(J,{children:[s($,{title:"Platform"}),s(F,{breadcrumbs:p,children:s(M,{packages:o,children:_("div",{className:"container mx-auto",children:[s(V,{title:"Platform",description:"Platform overview",icon:s(n,{iconName:"IconCloudCog"})}),_("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s(R,{account:l}),s(B,{eminCore:d}),s(H,{requirements:m}),s(O,{})]})]})})})]})};import{toast as q}from"sonner";import{jsx as e,jsxs as t}from"react/jsx-runtime";var _e=({icon:o,title:m,message:l,content:g,className:p})=>t("div",{className:`grid gap-4 mt-15 mb-25 ${p}`,children:[o&&(typeof o=="string"?e(n,{iconName:o,className:"mx-auto h-15 w-15"}):o),t("div",{className:"grid gap-2 text-center",children:[e("h2",{className:"text-2xl font-bold",children:m}),e("span",{className:"text-sm text-muted-foreground",children:l}),g]})]}),S=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({api_secret_key:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconPlug",className:"mx-auto h-10 w-10"}),e("span",{children:"Connect to EminCore Platform"})]}),e(k,{className:"text-center",children:"Please provide valid API Secret Key to connect your application to the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.connect"),{onFinish:x}));q.promise(i,{loading:"Connecting to EminCore Platform..."})},children:[t("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:[e("strong",{className:"text-center text-sm",children:"How to get API & Verification key"}),L(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))]}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your API secret key",icon:"IconKey",value:g.api_secret_key,onChange:a=>p({api_secret_key:a.target.value}),error:y.api_secret_key}),t(C,{recentlySuccessful:v,processing:f,variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})]})]})})]})]})},T=()=>{let[o,m]=z(!1),l=j().props,{data:g,setData:p,post:d,processing:f,recentlySuccessful:v,errors:y}=G({verification_code:""});return t(h,{open:o,onOpenChange:m,children:[e(P,{children:t(N,{variant:"default",size:"sm",className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]})}),t(D,{children:[t(b,{children:[t(I,{className:"grid text-center mx-auto gap-2",children:[e(n,{iconName:"IconProgressCheck",className:"mx-auto h-10 w-10"}),e("span",{children:"Verify your application on EminCore Platform"})]}),e(k,{className:"text-center",children:"Please follow the steps below to verify your application on the EminCore platform."})]}),e("div",{className:"grid gap-3",children:t("form",{onSubmit:a=>{a.preventDefault();let i=new Promise(x=>d(route("dashboard.settings.platform.verify"),{onFinish:x}));q.promise(i,{loading:"Verifying your application..."})},children:[e("div",{className:"grid gap-4 text-left max-w-md mx-auto text-center justify-center border-y py-4 my-4",children:K(l).map((a,i)=>t("div",{className:"grid text-center gap-3",children:[e("span",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold mx-auto",children:i+1}),e("span",{className:"text-sm text-muted-foreground",children:a.step})]},i))}),t("div",{className:"grid gap-4 text-center",children:[e(E,{placeholder:"Enter your verification code",icon:"IconKey",value:g.verification_code,onChange:a=>p({verification_code:a.target.value}),error:y.verification_code}),t(C,{processing:f,recentlySuccessful:v,className:"mt-2",children:[e(n,{iconName:"IconCheck"}),e("span",{children:"Verify"})]}),e(w,{message:y?.verification_code})]})]})})]})]})};export{_e as a,S as b,T as c,K as d,L as e,X as f,ce as g};
@@ -1 +1 @@
1
- import{a as b,b as R,c as z,d as B,e as V,g as H}from"./chunk-NFOQ4KW2.js";import{a as T}from"./chunk-HDYNFDEV.js";import{a as P}from"./chunk-KND3PUAR.js";import{a as L}from"./chunk-37DD6CZ3.js";import{a as C}from"./chunk-QKGQOXDM.js";import{b as G}from"./chunk-TVCWAJFT.js";import{a as o}from"./chunk-G4EEZUTC.js";import{a as D}from"./chunk-G22OJQWL.js";import{useEffect as F}from"react";import{Head as U,usePage as W}from"@inertiajs/react";import{createContext as J,useContext as K,useState as p}from"react";import{jsx as O}from"react/jsx-runtime";var _=J({}),E=({children:t,slugGroups:a,onChange:u})=>{let[l,i]=p(a),[d,c]=p(""),[n,m]=p(new Set),[N,r]=p(new Set),[f,v]=p(new Set),[x,y]=p({}),[k,A]=p({}),j={onChange:u,slugGroups:l,setSlugGroups:i,searchTerm:d,setSearchTerm:c,expandedGroups:n,setExpandedGroups:m,expandedSlugs:N,setExpandedSlugs:r,invalidSlugs:f,setInvalidSlugs:v,slugInputTemps:x,setSlugInputTemps:y,slugInput:k,setSlugInput:A,toggleSlug:g=>{r(S=>{let w=new Set(S);return w.has(g)?w.delete(g):w.add(g),w})},setAllExpanded:g=>{g?(m(new Set(B(l))),r(new Set(V(l)))):(m(new Set),r(new Set))},toggleGroup:g=>{let S=new Set(n);S.has(g)?S.delete(g):S.add(g),m(S)}};return O(_.Provider,{value:j,children:t})},h=()=>{let t=K(_);if(!t)throw new Error("useSlugs sadece SlugsProvider i\xE7inde kullan\u0131labilir!");return t};import{jsx as e,jsxs as s}from"react/jsx-runtime";var $=()=>{let{slugGroups:t,searchTerm:a,setSearchTerm:u,setExpandedGroups:l,setSlugInputTemps:i,setSlugInput:d,setAllExpanded:c}=h();return F(()=>{let n=R(t);i(n),d(n)},[t]),F(()=>{if(a){let n=new Set;H(t,n,a),l(n)}},[a]),s("div",{className:"p-4",children:[e("div",{className:"mb-4",children:s("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:e(o,{iconName:"IconSearch",className:"h-5 w-5 text-gray-400"})}),e(C,{type:"text",className:"pr-10 focus-visible:ring-0"+(a?"border-gray-400":""),placeholder:"Searchs...",value:a,onChange:n=>u(n.target.value)})]})}),s("div",{className:"mb-4 grid grid-cols-1 lg:flex gap-2",children:[s(G,{size:"sm",variant:"outline",onClick:()=>c(!1),className:"flex items-center gap-2",children:[e(o,{iconName:"IconMinimize"}),"Collapse All"]}),s(G,{size:"sm",variant:"outline",onClick:()=>c(!0),className:"flex items-center gap-2",children:[e(o,{iconName:"IconArrowsMaximize"}),"Expand All"]})]}),e("div",{className:"space-y-2",children:t.length>0?z(t,a).map(n=>e(q,{group:n,depth:0},n.id)):s("div",{className:"text-center py-8 text-muted-foreground",children:[e(o,{iconName:"IconSearch",className:"mx-auto mb-2",size:24}),e("p",{children:"Arama kriterlerinize uygun sonu\xE7 bulunamad\u0131."})]})})]})},X=({slug:t})=>{let{expandedSlugs:a,searchTerm:u,setSlugInputTemps:l,slugInputTemps:i,setSlugInput:d,slugInput:c,setInvalidSlugs:n,invalidSlugs:m,onChange:N,toggleSlug:r}=h(),{title:f,description:v}=t?.slug_data??{title:"N/A",description:"N/A"},x=a.has(t.id),y=b(f,u),k=b(v,u);return e("div",{className:"ml-6 p-2 pr-0 border-l-2 border-accent",children:s("div",{className:`dark:bg-[#101010] bg-accent rounded-lg p-3 grid grid-cols-1 items-center shadow-sm ${y||k?"bg-accent/50":""}`,children:[s("button",{onClick:()=>r(t.id),className:"flex items-center gap-2 w-full text-left",children:[x?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),s("div",{className:"flex items-center gap-1 w-full",children:[e(o,{iconName:t.icon??"IconLink"}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:y?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:t.slug_data.title}):f}),e("p",{className:"text-sm",children:k?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:v}):v})]})]})]}),s("div",{className:`${x?"grid":"hidden"}`,children:[e("hr",{className:"mb-5 mt-2"}),e("div",{children:e("div",{className:"flex gap-2",children:e("div",{className:"w-full",children:e("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-2",children:s("div",{className:"group relative",children:[e(C,{id:t.id.toString(),type:"text",required:!0,defaultValue:i[t.id],onBlur:I=>{l({...i,[t.id]:I.target.value})},placeholder:"slug",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off","aria-invalid":m.has(t.id)}),e("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:e(o,{iconName:t.icon??"IconLink",size:16})}),e("div",{className:"absolute inset-y-0 end-0 flex items-center justify-center gap-1",children:s(G,{variant:"ghost",disabled:i[t.id]===c[t.id],onClick:()=>{let I={...t,slug:i[t.id]};N(I,M=>{M?d({...c,[t.id]:i[t.id]}):n(new Set(m).add(t.id))})},children:[e(o,{iconName:t.icon??"IconDeviceFloppy",size:16}),e("span",{className:"text-xs",children:"Save"})]})})]})},t.code)})})})]})]})},t.code)},q=({group:t,depth:a=0})=>{let{expandedGroups:u,toggleGroup:l}=h(),{title:i,description:d}=t?.group_data??{title:"N/A",description:"N/A"},c=u.has(t.id),n=b(i),m=b(d);return s("div",{children:[s("button",{onClick:()=>l(t.id),className:`w-full flex items-center p-3 rounded-lg dark:bg-[#101010] bg-accent hover:bg-accent/20 transition-colors ${n||m?"bg-accent/50":"bg-accent"}`,children:[c?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),e(o,{iconName:t.icon??"IconLink",className:"ml-2",fallback:e(D,{className:"w-5 h-5"})}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:n?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:i}):i}),e("p",{className:"text-sm",children:m?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:d}):d})]})]}),c&&s("div",{className:"mt-2",children:[e("div",{className:"mb-2",style:{marginLeft:a*16},children:t.slugs?.map(r=>e(X,{slug:r},r.id))}),Array.isArray(t.childrens)&&t.childrens.length>0&&e("div",{className:"mt-2",style:{marginLeft:(a<1?1:a)*16},children:t.childrens.map(r=>e("div",{className:"mb-2",style:{marginLeft:a*16},children:e(q,{group:r,depth:a+1},r.id)}))}),Number(t.slugs?.length)<1&&Number(t.childrens?.length)<1&&e("div",{className:"text-sm text-muted-foreground mt-2 ml-4",children:"There is no slugs or child groups found."})]})]},t.code)},Q=({slugGroups:t})=>{let a=[{title:"Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Slugs",href:route("dashboard.settings.slugs")}],{eminLang:u}=W().props;return s(L,{breadcrumbs:a,children:[e(U,{title:"Slugs"}),s("div",{className:"container mx-auto",children:[e(P,{title:"Slugs",description:"Here you can see and manage all the system slugs.",icon:e(o,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),u?.multiLanguage&&s("div",{className:"flex items-center gap-4",children:[e(o,{iconName:"IconAlertTriangle",className:"h-10 w-10 my-2 text-red-500"}),s("div",{children:[e("h3",{className:"font-bold text-lg",children:"Dikkat!"}),e("span",{className:"text-muted-foreground",children:"Sisteminizde \xE7oklu dil eklentisi aktiftir. Bu sebeple buradaki link yap\u0131lar\u0131 \xE7oklu dil eklentisi aktif oldu\u011Fu s\xFCre boyunca \xE7al\u0131\u015Fmayacakt\u0131r."})]})]}),e(E,{slugGroups:t,onChange:(l,i)=>{T(l,d=>{d?(l.slug=l.slug,i?.(!0)):i?.(!1)})},children:e($,{})})]})]})};export{$ as a,X as b,q as c,Q as d,E as e,h as f};
1
+ import{a as b,b as R,c as z,d as B,e as V,g as H}from"./chunk-NFOQ4KW2.js";import{a as T}from"./chunk-HDYNFDEV.js";import{a as P}from"./chunk-KND3PUAR.js";import{a as L}from"./chunk-2QTWMGKG.js";import{a as C}from"./chunk-QKGQOXDM.js";import{b as G}from"./chunk-TVCWAJFT.js";import{a as o}from"./chunk-G4EEZUTC.js";import{a as D}from"./chunk-G22OJQWL.js";import{useEffect as F}from"react";import{Head as U,usePage as W}from"@inertiajs/react";import{createContext as J,useContext as K,useState as p}from"react";import{jsx as O}from"react/jsx-runtime";var _=J({}),E=({children:t,slugGroups:a,onChange:u})=>{let[l,i]=p(a),[d,c]=p(""),[n,m]=p(new Set),[N,r]=p(new Set),[f,v]=p(new Set),[x,y]=p({}),[k,A]=p({}),j={onChange:u,slugGroups:l,setSlugGroups:i,searchTerm:d,setSearchTerm:c,expandedGroups:n,setExpandedGroups:m,expandedSlugs:N,setExpandedSlugs:r,invalidSlugs:f,setInvalidSlugs:v,slugInputTemps:x,setSlugInputTemps:y,slugInput:k,setSlugInput:A,toggleSlug:g=>{r(S=>{let w=new Set(S);return w.has(g)?w.delete(g):w.add(g),w})},setAllExpanded:g=>{g?(m(new Set(B(l))),r(new Set(V(l)))):(m(new Set),r(new Set))},toggleGroup:g=>{let S=new Set(n);S.has(g)?S.delete(g):S.add(g),m(S)}};return O(_.Provider,{value:j,children:t})},h=()=>{let t=K(_);if(!t)throw new Error("useSlugs sadece SlugsProvider i\xE7inde kullan\u0131labilir!");return t};import{jsx as e,jsxs as s}from"react/jsx-runtime";var $=()=>{let{slugGroups:t,searchTerm:a,setSearchTerm:u,setExpandedGroups:l,setSlugInputTemps:i,setSlugInput:d,setAllExpanded:c}=h();return F(()=>{let n=R(t);i(n),d(n)},[t]),F(()=>{if(a){let n=new Set;H(t,n,a),l(n)}},[a]),s("div",{className:"p-4",children:[e("div",{className:"mb-4",children:s("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:e(o,{iconName:"IconSearch",className:"h-5 w-5 text-gray-400"})}),e(C,{type:"text",className:"pr-10 focus-visible:ring-0"+(a?"border-gray-400":""),placeholder:"Searchs...",value:a,onChange:n=>u(n.target.value)})]})}),s("div",{className:"mb-4 grid grid-cols-1 lg:flex gap-2",children:[s(G,{size:"sm",variant:"outline",onClick:()=>c(!1),className:"flex items-center gap-2",children:[e(o,{iconName:"IconMinimize"}),"Collapse All"]}),s(G,{size:"sm",variant:"outline",onClick:()=>c(!0),className:"flex items-center gap-2",children:[e(o,{iconName:"IconArrowsMaximize"}),"Expand All"]})]}),e("div",{className:"space-y-2",children:t.length>0?z(t,a).map(n=>e(q,{group:n,depth:0},n.id)):s("div",{className:"text-center py-8 text-muted-foreground",children:[e(o,{iconName:"IconSearch",className:"mx-auto mb-2",size:24}),e("p",{children:"Arama kriterlerinize uygun sonu\xE7 bulunamad\u0131."})]})})]})},X=({slug:t})=>{let{expandedSlugs:a,searchTerm:u,setSlugInputTemps:l,slugInputTemps:i,setSlugInput:d,slugInput:c,setInvalidSlugs:n,invalidSlugs:m,onChange:N,toggleSlug:r}=h(),{title:f,description:v}=t?.slug_data??{title:"N/A",description:"N/A"},x=a.has(t.id),y=b(f,u),k=b(v,u);return e("div",{className:"ml-6 p-2 pr-0 border-l-2 border-accent",children:s("div",{className:`dark:bg-[#101010] bg-accent rounded-lg p-3 grid grid-cols-1 items-center shadow-sm ${y||k?"bg-accent/50":""}`,children:[s("button",{onClick:()=>r(t.id),className:"flex items-center gap-2 w-full text-left",children:[x?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),s("div",{className:"flex items-center gap-1 w-full",children:[e(o,{iconName:t.icon??"IconLink"}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:y?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:t.slug_data.title}):f}),e("p",{className:"text-sm",children:k?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:v}):v})]})]})]}),s("div",{className:`${x?"grid":"hidden"}`,children:[e("hr",{className:"mb-5 mt-2"}),e("div",{children:e("div",{className:"flex gap-2",children:e("div",{className:"w-full",children:e("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-2",children:s("div",{className:"group relative",children:[e(C,{id:t.id.toString(),type:"text",required:!0,defaultValue:i[t.id],onBlur:I=>{l({...i,[t.id]:I.target.value})},placeholder:"slug",className:"border-0 bg-muted/50 focus-visible:ring-1 px-10 bg-background border-1",autoComplete:"off","aria-invalid":m.has(t.id)}),e("div",{className:"text-muted-foreground/80 absolute inset-y-0 start-0 flex items-center justify-center ps-3",children:e(o,{iconName:t.icon??"IconLink",size:16})}),e("div",{className:"absolute inset-y-0 end-0 flex items-center justify-center gap-1",children:s(G,{variant:"ghost",disabled:i[t.id]===c[t.id],onClick:()=>{let I={...t,slug:i[t.id]};N(I,M=>{M?d({...c,[t.id]:i[t.id]}):n(new Set(m).add(t.id))})},children:[e(o,{iconName:t.icon??"IconDeviceFloppy",size:16}),e("span",{className:"text-xs",children:"Save"})]})})]})},t.code)})})})]})]})},t.code)},q=({group:t,depth:a=0})=>{let{expandedGroups:u,toggleGroup:l}=h(),{title:i,description:d}=t?.group_data??{title:"N/A",description:"N/A"},c=u.has(t.id),n=b(i),m=b(d);return s("div",{children:[s("button",{onClick:()=>l(t.id),className:`w-full flex items-center p-3 rounded-lg dark:bg-[#101010] bg-accent hover:bg-accent/20 transition-colors ${n||m?"bg-accent/50":"bg-accent"}`,children:[c?e(o,{iconName:"IconChevronDown",className:"h-5 w-5"}):e(o,{iconName:"IconChevronRight",className:"h-5 w-5"}),e(o,{iconName:t.icon??"IconLink",className:"ml-2",fallback:e(D,{className:"w-5 h-5"})}),s("div",{className:"ml-2 text-left",children:[e("h4",{className:"font-semibold",children:n?e("span",{className:"dark:bg-gray-800 dark:text-white bg-gray-300",children:i}):i}),e("p",{className:"text-sm",children:m?e("span",{className:"dark:bg-gray-800 bg-gray-300 font-medium",children:d}):d})]})]}),c&&s("div",{className:"mt-2",children:[e("div",{className:"mb-2",style:{marginLeft:a*16},children:t.slugs?.map(r=>e(X,{slug:r},r.id))}),Array.isArray(t.childrens)&&t.childrens.length>0&&e("div",{className:"mt-2",style:{marginLeft:(a<1?1:a)*16},children:t.childrens.map(r=>e("div",{className:"mb-2",style:{marginLeft:a*16},children:e(q,{group:r,depth:a+1},r.id)}))}),Number(t.slugs?.length)<1&&Number(t.childrens?.length)<1&&e("div",{className:"text-sm text-muted-foreground mt-2 ml-4",children:"There is no slugs or child groups found."})]})]},t.code)},Q=({slugGroups:t})=>{let a=[{title:"Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Slugs",href:route("dashboard.settings.slugs")}],{eminLang:u}=W().props;return s(L,{breadcrumbs:a,children:[e(U,{title:"Slugs"}),s("div",{className:"container mx-auto",children:[e(P,{title:"Slugs",description:"Here you can see and manage all the system slugs.",icon:e(o,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),u?.multiLanguage&&s("div",{className:"flex items-center gap-4",children:[e(o,{iconName:"IconAlertTriangle",className:"h-10 w-10 my-2 text-red-500"}),s("div",{children:[e("h3",{className:"font-bold text-lg",children:"Dikkat!"}),e("span",{className:"text-muted-foreground",children:"Sisteminizde \xE7oklu dil eklentisi aktiftir. Bu sebeple buradaki link yap\u0131lar\u0131 \xE7oklu dil eklentisi aktif oldu\u011Fu s\xFCre boyunca \xE7al\u0131\u015Fmayacakt\u0131r."})]})]}),e(E,{slugGroups:t,onChange:(l,i)=>{T(l,d=>{d?(l.slug=l.slug,i?.(!0)):i?.(!1)})},children:e($,{})})]})]})};export{$ as a,X as b,q as c,Q as d,E as e,h as f};
@@ -1 +1 @@
1
- import{$ as n,M as m,i}from"./chunk-AIXJLLPM.js";import{a as t}from"./chunk-E2ZUBHVJ.js";import{d as o}from"./chunk-PWQOU5TI.js";import{a as r}from"./chunk-CZM7FKLS.js";import{a as s}from"./chunk-3H6NZAII.js";import{usePage as a}from"@inertiajs/react";import{jsx as e,jsxs as c}from"react/jsx-runtime";var k=({breadcrumbs:p=[]})=>{let d=a().props,{dashboard:l}=a().props?.emin_core_menus,{url:h}=a(),{user:u,notifications:b}=d.auth;return e("header",{className:"flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",children:c("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[e(o,{className:"-ml-1"}),e(r,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),e(s,{breadcrumbs:p,className:"hidden md:flex"}),c("div",{className:"ml-auto flex items-center gap-2",children:[u&&e(m,{notifications:b??[]}),e(n,{placeholder:"Type a command or search...",menu:t(l,h)}),e(i,{className:"w-8 h-8"})]})]})})};export{k as a};
1
+ import{$ as n,M as m,i}from"./chunk-REOTH2BZ.js";import{a as t}from"./chunk-E2ZUBHVJ.js";import{d as o}from"./chunk-PWQOU5TI.js";import{a as r}from"./chunk-CZM7FKLS.js";import{a as s}from"./chunk-3H6NZAII.js";import{usePage as a}from"@inertiajs/react";import{jsx as e,jsxs as c}from"react/jsx-runtime";var k=({breadcrumbs:p=[]})=>{let d=a().props,{dashboard:l}=a().props?.emin_core_menus,{url:h}=a(),{user:u,notifications:b}=d.auth;return e("header",{className:"flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",children:c("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[e(o,{className:"-ml-1"}),e(r,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),e(s,{breadcrumbs:p,className:"hidden md:flex"}),c("div",{className:"ml-auto flex items-center gap-2",children:[u&&e(m,{notifications:b??[]}),e(n,{placeholder:"Type a command or search...",menu:t(l,h)}),e(i,{className:"w-8 h-8"})]})]})})};export{k as a};
@@ -1 +1 @@
1
- import{B as o,K as t}from"./chunk-AIXJLLPM.js";import{Head as e}from"@inertiajs/react";import{jsx as c,jsxs as i}from"react/jsx-runtime";var f=()=>i(o,{children:[c(e,{title:"Account Settings"}),c(t,{})]});export{f as a};
1
+ import{B as o,K as t}from"./chunk-REOTH2BZ.js";import{Head as e}from"@inertiajs/react";import{jsx as c,jsxs as i}from"react/jsx-runtime";var f=()=>i(o,{children:[c(e,{title:"Account Settings"}),c(t,{})]});export{f as a};
@@ -0,0 +1 @@
1
+ import{a as xe}from"./chunk-YHEAFMGX.js";import{a as he}from"./chunk-FAHSY2DO.js";import{a as K}from"./chunk-Z6APYDZ7.js";import{a as Pe}from"./chunk-KND3PUAR.js";import{a as fe}from"./chunk-2QTWMGKG.js";import{a as ve}from"./chunk-EABDMJDG.js";import{a as ke}from"./chunk-L37X7O6L.js";import{b as $,ea as ge,g as me,ga as ue}from"./chunk-REOTH2BZ.js";import{a as de}from"./chunk-7NKFSFMC.js";import{a as ae}from"./chunk-M5QT5SFN.js";import{a as q,f as W,g as J,h as pe,i as T,j as E}from"./chunk-QFUZ6MVT.js";import{b as x}from"./chunk-TVCWAJFT.js";import{a as L,c as U,d as R}from"./chunk-PRCYNFKC.js";import{a as i}from"./chunk-G4EEZUTC.js";import{a as Z}from"./chunk-G22OJQWL.js";import{a as ee}from"./chunk-GND5KQRZ.js";import{router as ka}from"@inertiajs/react";import{Fragment as Je,jsx as I,jsxs as te}from"react/jsx-runtime";var Ne=()=>{let{isModalOpen:e,setIsModalOpen:a,isLoading:o,process:s,step:n,isCustom:d,setStep:t,setValidationError:l}=f(),c=d()?"custom":"market",g=o?"loading":`${c}-${s}-${n}`,u=be(g);return I(q,{open:e,onOpenChange:a,children:te(W,{className:"max-h-[90vh] overflow-auto break-all min-w-[50vh] max-w-[75vh] w-auto",children:[I(J,{children:!o&&(u.title||u.description)&&te(Je,{children:[I(T,{className:"text-base text-lg",children:u.title}),I(E,{className:"text-sm",children:u.description}),I("hr",{})]})}),u.content,I(pe,{children:n>1&&!o&&I("div",{className:"grid mx-auto",children:te(x,{variant:"link",size:"sm",className:"flex items-center gap-1",onClick:()=>{t(n-1),l("")},children:[I(i,{iconName:"IconArrowLeft",className:"h-4 w-4"}),"Back"]})})})]})})};import{createContext as Ke,useContext as Ye,useEffect as oe,useState as y}from"react";import{jsx as Ge,jsxs as Qe}from"react/jsx-runtime";var ye=Ke({}),Ce=({children:e,packages:a,process:o="install",step:s=1,isValid:n=!1,is_custom:d=!1})=>{let t={title:"Loading",description:"Please wait while we process your request."},[l,c]=y(a),[g,u]=y(o),[k,M]=y(!1),[v,B]=y(s),[S,V]=y(null),[w,b]=y(null),[_,H]=y(n),[Ze,ie]=y(""),[$e,ce]=y(!1),[qe,X]=y(t),j=ve();oe(()=>{k||setTimeout(()=>{B(1),u(o),V(null),b(null),H(!1),ce(!1),ie(""),X(t)},250)},[k]),oe(()=>{!w||!j||Object.values(j).forEach(O=>{O?.jobCode===`${w.code}_${g}`&&X({title:O.title,description:O.description,progress:O.progress,error:O.status==="failed"})})},[j]),oe(()=>{c(a)},[a]);let le=()=>w?.is_custom===!1,We={packages:l,setPackages:c,process:g,setProcess:u,isModalOpen:k,setIsModalOpen:M,step:v,setStep:B,selectedFile:S,setSelectedFile:V,packageManifest:w,setPackageManifest:b,isValid:_,setIsValid:H,validationError:Ze,setValidationError:ie,isLoading:$e,setIsLoading:ce,loadingContent:qe,setLoadingContent:X,isOfficial:le,isCustom:()=>!le()};return Qe(ye.Provider,{value:We,children:[e,Ge(Ne,{})]})},f=()=>{let e=Ye(ye);if(!e)throw new Error("PackageManagerContext must be used within a PackageManagerProvider");return e};import{Fragment as Me,jsx as h,jsxs as Y}from"react/jsx-runtime";var be=e=>{let{loadingContent:a,validationError:o}=f(),s={title:a.title,description:a.description,content:Y(Me,{children:[h("div",{className:"animate-spin rounded-full h-15 w-15 border-b-2 border-primary mx-auto"}),Y("div",{className:"text-center",children:[h(T,{className:"text-base text-lg",children:a.title}),h(E,{className:"text-sm",children:a.description}),a.progress&&Y(Me,{children:[h(ke,{value:a.progress,className:"my-2"}),"%",a.progress]}),a.error&&h(E,{className:"text-red-500 text-sm",children:a.error})]})]})},n={title:null,description:null,content:Y("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500",children:[h(i,{iconName:"IconExclamationCircleFilled",className:"text-red-500 h-15 w-15 mx-auto"}),h("span",{className:"text-2xl font-bold",children:"Error"}),h("span",{className:"text-sm text-muted-foreground",children:o})]})};if(o)return n;if(e=="loading")return s;let d=Ie(),t=De(),[l,c,g]=e.split("-"),u=l,k=c,M=Number(g);return{custom:{install:{1:d.selectInstallationMethod,2:d.uploadPackageZipFile,3:d.customInstallSummary()},update:{1:d.uploadPackageZipFile,2:t.updateSummary()}},market:{update:{1:t.updateSummary()}}}[u]?.[k]?.[M]??d.selectInstallationMethod},we=e=>[{key:"code",value:h("span",{className:"",children:e.code??"\u2014"})},{key:"version",value:h("span",{children:e?.version??"\u2014"})},{key:"author",value:h("span",{children:e?.author??"\u2014"})},{key:"source",value:h("span",{className:"text-orange-400",children:"Custom"})}];import{unzip as Xe}from"fflate";import{toast as je}from"sonner";var ea=e=>new Promise((a,o)=>{Xe(e,(s,n)=>{if(s)return o(new Error("ZIP file is corrupted"));a(n)})}),Ee=async e=>{let{process:a,selectedFile:o,setIsLoading:s,step:n,setStep:d,setPackageManifest:t,setValidationError:l,setIsValid:c,packages:g,setLoadingContent:u}=e;try{if(!o)throw new Error("Please select a file.");if(s(!0),u({title:"Package Verifying",description:"Please wait while we verify the package."}),o.size>100*1024*1024)throw new Error("File should be less than 100MB");let k=new Uint8Array(await o.arrayBuffer()),M=await ea(k);if(!M["emincore.json"])throw new Error("Manifest (emincore.json) has not been found in the ZIP file.");let v=JSON.parse(new TextDecoder().decode(M["emincore.json"]));t(v);let S=["code","name","version","description","author","core_constraint"].filter(b=>v[b]==null||v[b]==="");if(S.length)throw new Error("Manifest is missing required fields: "+S.join(", "));let V=v.composer_package&&v.composer_package_version,w=v.npm_package&&v.npm_package_version;if(!V&&!w)throw new Error("Package must has at least one of composer package or npm package.");if(a=="update"){let b=he(g.find(_=>_.code==v?.code),v);if(typeof b=="string")throw new Error(b)}c(!0)}catch(k){throw je.error(String(k)),l(String(k)),c(!1),k}finally{d(n+1),s(!1)}};import{router as ga,useForm as ua}from"@inertiajs/react";import{useState as aa,useEffect as ta}from"react";import{Fragment as se,jsx as m,jsxs as D}from"react/jsx-runtime";var ne=({pkg:e,showBadge:a=!0,showBadgeTitle:o=!0,className:s})=>D("div",{className:ee("flex items-center gap-1",s),children:[m("span",{className:"font-medium",children:e?.name||e?.code}),a&&m(oa,{pkg:e,showBadgeTitle:o})]}),oa=({pkg:e,showBadgeTitle:a=!0,className:o,size:s=18})=>m("div",{className:ee("flex items-center gap-1",o),children:e?.is_custom===!1?e.code.slice(0,8)==="emintech"?D(se,{children:[m(i,{iconName:"IconCertificate",className:"text-cyan-600 dark:text-cyan-400",size:s}),a&&m("span",{className:"font-medium text-cyan-600 dark:text-cyan-400",children:"Official"})]}):D(se,{children:[m(i,{iconName:"IconRosetteDiscountCheckFilled",className:"text-emerald-600 dark:text-emerald-400",size:s}),a&&m("span",{className:"font-medium text-emerald-600 dark:text-emerald-400",children:"Verified"})]}):D(se,{children:[m(i,{iconName:"IconInfoCircleFilled",className:"text-slate-500 dark:text-slate-400",size:s}),a&&m("span",{className:"font-medium text-slate-500 dark:text-slate-400",children:"Unverified"})]})}),rt=({statistics:e})=>{let[a,o]=aa(e);ta(()=>{o(e)},[e]);let s=[{title:"Total Packages",subtext:"Total packages counts",value:String(a.total_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Enabled Packages",subtext:"Enabled packages counts",value:String(a.enabled_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Disabled Packages",subtext:"Disabled packages counts",value:String(a.disabled_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Need Update",subtext:"Packages need update counts",value:String(a?.need_update_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})}];return m("div",{className:"grid grid-cols-1 md:grid-cols-4 lg:grid-cols-4 gap-6 mb-8",children:s.map(n=>m(ge,{...n},n.title?.toString()))})},F=({pkg:e,details:a})=>{let o=a??Ve(e);return D("div",{className:"space-y-4",children:[D("div",{className:e?.image?"grid gap-3":"flex items-center gap-3",children:[e?.image?m("div",{className:"w-full h-auto rounded-lg aspect-[16/9] shadow-sm",style:{backgroundImage:`url(${e.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}):m(i,{iconName:"IconPackage",className:"h-7 w-7 text-muted-foreground shrink-0"}),D(J,{children:[m(T,{className:"text-base",children:e?.name?m(ne,{pkg:e}):e.code}),m(E,{className:"text-xs",children:e?.description??"No description"})]})]}),m("hr",{}),m("div",{className:"space-y-3 text-sm",children:o.map(s=>D("div",{className:"flex justify-between",children:[m("span",{className:"text-muted-foreground capitalize",children:s.key}),s.value]},s.key))})]})},Se=({isModalOpen:e,setIsModalOpen:a,package:o,details:s})=>m(q,{open:e,onOpenChange:a,children:m(W,{className:"sm:max-w-md",children:m(F,{pkg:o,details:s})})});import{Fragment as sa,jsx as G,jsxs as _e}from"react/jsx-runtime";var Te=()=>{let{packages:e,selectedPackage:a,isDetailsModalOpen:o,setIsDetailsModalOpen:s}=Q(),{setIsModalOpen:n,setProcess:d,setStep:t}=f(),l=Ae(),c=Fe();return _e(sa,{children:[_e(x,{size:"sm",variant:"outline",className:"mb-4 flex items-center gap-2",onClick:()=>{n(!0),d("install"),t(1)},children:[G(i,{iconName:"IconUpload"}),G("span",{children:"Install Package"})]}),G(ue,{columns:c,data:e,bulkActions:l}),a&&G(Se,{isModalOpen:o,setIsModalOpen:s,package:a})]})};import{router as na,useHttp as ra}from"@inertiajs/react";import{useEffect as ia,useState as ca}from"react";import{toast as Be}from"sonner";import{Fragment as Oe,jsx as r,jsxs as C}from"react/jsx-runtime";var Fe=()=>{let[e,a]=ca(!0);ia(()=>{a(!1);let t=setTimeout(()=>a(!0),50);return()=>clearTimeout(t)},[]);let{setSelectedPackage:o,setIsDetailsModalOpen:s}=Q(),n=f(),d=ra({process:"check-update",packageCode:n.packageManifest?.code||""});return[{id:"select",header:({table:t})=>r(ae,{checked:t.getIsAllPageRowsSelected()||t.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:l=>t.toggleAllPageRowsSelected(!!l),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:t})=>r(ae,{id:`select-row-${t.id}`,checked:t.getIsSelected(),onCheckedChange:l=>{t.toggleSelected(!!l)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"package",header:"Package",cell:({row:t})=>C("div",{className:"flex items-center gap-5 cursor-pointer",onClick:()=>{o(t.original),s(!0)},children:[r(Z,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),C("span",{style:{display:e?"flex":"none"},className:"items-center gap-3",children:[r(i,{iconName:"IconPackage",className:"h-7 my-2 cursor-pointer"}),C("div",{className:"flex flex-col",children:[r("div",{className:"flex items-center gap-1",children:r(ne,{pkg:t.original})}),r("span",{className:"text-muted-foreground text-xs",children:t.original.description?t.original.description.length>61?t.original?.description?.slice(0,60)+"...":t.original?.description:"No description"}),r("span",{className:"text-muted-foreground text-xs",children:t.original?.version})]})]})]})},{accessorKey:"is_active",header:()=>C(L,{trigger:"hover",children:[r(U,{children:"Status"}),r(R,{className:"w-auto",children:"Is the package enabled?"})]}),cell:({row:t})=>C(Oe,{children:[r(Z,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),r("div",{style:{display:e?"block":"none"},children:r(de,{checked:t.original.is_active,onCheckedChange:l=>{K([t.original.id],{is_active:l})}})})]})},{accessorKey:"actions",header:()=>C(L,{trigger:"hover",children:[r(U,{children:"Actions"}),r(R,{className:"w-auto",children:"Actions of the package"})]}),cell:({row:t})=>C(Oe,{children:[r(Z,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),C("div",{style:{display:e?"flex":"none"},className:"gap-2",children:[C(L,{trigger:"hover",children:[r(U,{children:r($,{title:"Uninstall Package",content:"Are you sure to uninstall this package?",onConfirm:()=>{na.post(route("dashboard.packages.manager"),{process:"uninstall",packageCode:t.original.code})},children:r(x,{variant:"outline",size:"sm",className:"flex items-center",disabled:t.original.is_active,children:r(i,{iconName:"IconTrash",className:"h-4 w-4"})})})}),r(R,{children:t.original.is_active?"Disable Package First":"Uninstall Package"})]}),C(L,{trigger:"hover",children:[r(U,{children:r(x,{variant:"outline",size:"sm",className:"flex items-center",onClick:()=>{let l=t.original;n.setPackageManifest(l),n.setProcess("update"),n.setIsModalOpen(!0),l.is_custom||(n.setIsLoading(!0),d.setData({process:"check-update",packageCode:l.code}),xe(n,d).then(c=>{if(typeof c=="boolean"&&c===!0)n.setLoadingContent({title:`${l.name} is up to date`,description:"No updates available"});else{let g=c;n.setPackageManifest({...g,is_custom:!1}),n.setStep(1),n.setIsLoading(!1)}}))},children:r(i,{iconName:"IconRefresh",className:"h-4 w-4"})})}),r(R,{children:t.original.is_custom?"Update Package":"Check Updates"})]})]})]})}]},Ae=()=>[{label:"Enable",icon:r(i,{iconName:"IconCheck",className:"h-4 w-4 mr-1"}),variant:"outline",confirm:!0,confirmTitle:"Enable Packages",confirmContent:"Are you sure to enable these packages?",confirmIcon:r(i,{iconName:"IconCheck",size:30}),cancel:()=>{Be.info("Process cancelled")},action:(e,a)=>{let o=e.map(s=>s.original.id);K(o,{is_active:!0},s=>s&&a&&a())}},{label:"Disable",icon:r(i,{iconName:"IconCreativeCommonsNd",className:"h-4 w-4 mr-1"}),variant:"destructive",confirm:!0,confirmTitle:"Disable Packages",confirmContent:"Are you sure to disable these packages?",confirmIcon:r(i,{iconName:"IconCreativeCommonsNd",size:30}),cancel:()=>{Be.info("Process cancelled")},action:(e,a)=>{let o=e.map(s=>s.original.id);K(o,{is_active:!1},s=>{s&&a&&a()})}}],Ve=e=>[{key:"code",value:r("span",{className:"",children:e.code??"\u2014"})},{key:"version",value:r("span",{children:e?.version??"\u2014"})},{key:"author",value:r("span",{children:e?.author??"\u2014"})},{key:"source",value:r("span",{className:e?.is_custom!==!1?"text-orange-400":"text-green-600",children:e?.is_custom!==!1?"Custom":"Marketplace"})},{key:"status",value:r("span",{className:e?.is_active?"text-green-600":"text-destructive",children:e?.is_active?"Enabled":"Disabled"})},{key:"installed at",value:r("span",{children:e?.created_at?new Date(e.created_at).toLocaleDateString():"\u2014"})},{key:"last updated at",value:r("span",{children:e?.updated_at?new Date(e.updated_at).toLocaleDateString():"\u2014"})}];import{createContext as la,useContext as da,useEffect as ma,useState as re}from"react";import{jsx as Le}from"react/jsx-runtime";var Ue=la({}),Re=({packages:e,children:a})=>{let[o,s]=re(e),[n,d]=re(null),[t,l]=re(!1);ma(()=>{s(e)},[e]);let c={packages:o,setPackages:s,selectedPackage:n,setSelectedPackage:d,isDetailsModalOpen:t,setIsDetailsModalOpen:l};return Le(Ce,{packages:o,children:Le(Ue.Provider,{value:c,children:a})})},Q=()=>{let e=da(Ue);if(!e)throw new Error("usePackagesContext must be used within a PackagesProvider");return e};import{Head as pa}from"@inertiajs/react";import{jsx as z,jsxs as ze}from"react/jsx-runtime";var zt=({packages:e})=>{let a=[{title:"WM Dashboard",href:route("dashboard")},{title:"Packages",href:"#"}];return ze(fe,{breadcrumbs:a,children:[z(pa,{title:"Packages"}),ze("div",{className:"container mx-auto",children:[z(Pe,{title:"Packages",description:"Here you can see and manage all the system packages.",icon:z(i,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),z(Re,{packages:e,children:z(Te,{})})]})]})};import{Fragment as He,jsx as p,jsxs as P}from"react/jsx-runtime";var Ie=()=>{let{process:e,setStep:a,selectedFile:o,setSelectedFile:s,isValid:n,packageManifest:d,validationError:t}=f(),l=f();return{selectInstallationMethod:{title:"Select Installation Method",description:"Choose whether to install the package from a file or a URL.",content:P("div",{className:"grid grid-cols-2 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>a(2),children:[p(i,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Manual Upload"}),p("p",{className:"text-sm",children:"Upload your custom package file"})]}),P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>ga.get(route("dashboard.packages.marketplace")),children:[p(i,{iconName:"IconShoppingBag",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Marketplace"}),p("p",{className:"text-sm",children:"Browse and install from marketplace"})]})]})},uploadPackageZipFile:{title:o?"Verify Package File":"Upload Package File",description:o?"Verify the package file to ensure it is valid.":"Upload your custom package file (.zip)",content:P("div",{className:"grid grid-cols-1 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer border-dashed "+(o?"border-gray-400 text-primary":"text-muted-foreground hover:border-gray-400 hover:text-primary transition-colors"),onDrop:c=>{c.preventDefault();let g=c.dataTransfer.files;if(g.length>0){s(g[0]);return}},onClick:()=>document.querySelector('input[type="file"]')?.click(),onDragOver:c=>c.preventDefault(),children:[o?P("div",{children:[p(i,{iconName:"IconFileTypeZip",className:"h-12 w-12 mx-auto mb-3"}),p("div",{className:"flex items-center justify-center gap-2",children:p("span",{className:"text-sm",children:o.name})})]}):P(He,{children:[p(i,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Upload Package"}),P("p",{className:"text-sm",children:["Drag and drop or ",p("span",{className:"text-primary cursor-pointer",children:"choose file"})," to upload"]})]}),p("input",{type:"file",className:"hidden",onChange:c=>{c?.target?.files&&c.target.files.length>0&&(s(c.target.files[0]),c.target.files=null)}})]}),o&&P(He,{children:[P(x,{variant:"link",size:"sm",className:"w-full flex items-center",onClick:()=>s(null),children:[p(i,{iconName:"IconTrash",className:"h-4 w-4 text-muted-foreground cursor-pointer"}),"Delete"]}),p(x,{className:"w-full",variant:"outline",onClick:()=>Ee(l),children:"Verify Package"})]})]})},customInstallSummary:()=>{let{packages:c,setIsLoading:g}=f(),u=c.find(b=>b.code==d?.code)??!1,k=u!==!1,M=n?"Package Verified":"Package Not Verified",v=n?"Your package documents are valid. You can install it now.":"Your package is not verified. Please contact the package author for more information.",{post:B,recentlySuccessful:S,processing:V}=ua({process:e,packageCode:d?.code,version:d?.version,packageZip:o??null}),w=()=>{g(!0);let b=new Promise(_=>B(route("dashboard.packages.manager"),{onSuccess:()=>_(!0),onError:H=>_(H)}))};return{title:M,description:v,content:n&&d?P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer text-muted-foreground text-primary transition-colors",children:[p(F,{pkg:d,details:we(d)}),P("div",{className:"mt-4",children:[p($,{title:e=="install"?"Confirm Installation":"Confirm Update",content:p("div",{className:"!text-center",children:"This package has passed basic manifest validation only. This does not guarantee safety or full compatibility. Only proceed if you are absolutely certain of its origin and trust the source."}),confirmText:e=="install"?"Confirm and Install":"Confirm and Update",onConfirm:w,children:k?p(x,{className:"w-full",variant:"outline",disabled:!0,children:"Installed"}):P(me,{recentlySuccessful:S,processing:V,children:[p(i,{iconName:e=="install"?"IconDownload":"IconRefresh"}),p("span",{children:e=="install"?"Install Package":"Update Package"})]})}),k&&P("div",{className:"text-red-500 my-3",children:[u.code," - ",u.version," already exists."]})]})]}):p("div",{children:t??"An error occurred while verifying the package. Please contact the package author for more information."})}}}};import{Fragment as fa,jsx as N,jsxs as A}from"react/jsx-runtime";var De=()=>{let{packages:e,packageManifest:a,validationError:o,isCustom:s}=f();return{updateSummary:()=>{let n="Package Updates",d="Here are the latest updates for this package.",t=e.find(g=>g.code===a?.code),l=a,c=l?.version!=t?.version;return!c&&t?.is_custom===!1&&(n=d=null),{title:n,description:d,content:N(fa,{children:!c&&t?.is_custom===!1?A("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500 !border-none",children:[N(i,{iconName:"IconCircleCheckFilled",className:"text-green-500 h-15 w-15 mx-auto"}),A("span",{className:"text-2xl font-bold",children:[t.name," is up to date!"]}),N("span",{className:"text-sm text-muted-foreground",children:"There are no updates available for this package."})]}):A("div",{className:"grid grid-cols-1 gap-3",children:[A("div",{className:"grid grid-cols-[4fr_40px_4fr] gap-2",children:[A("div",{className:"!opacity-70",children:[N("span",{className:"font-bold mb-2 block text-center",children:"Old Version"}),N("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:t&&N(F,{pkg:t})})]}),N("div",{className:"flex items-center justify-center",children:N(i,{iconName:"IconArrowBarRight",className:"h-10 w-10"})}),A("div",{children:[N("span",{className:"font-bold mb-2 block text-center",children:"New Version"}),N("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:l&&N(F,{pkg:{...l,is_active:!1,is_custom:s(),id:0}})})]})]}),N(x,{className:"w-full mt-2",variant:"outline",disabled:!!o,children:"Update Package"})]})})}}}};var Mo=()=>{let{process:e,packageManifest:a,selectedFile:o,setIsLoading:s}=f();a&&(s(!0),ka.post(route("dashboard.packages.manager"),{process:e,packageCode:a.code,version:a.version,packageZip:o??null}))};export{Mo as a,Ne as b,Ce as c,f as d,be as e,we as f,Ee as g,ne as h,oa as i,rt as j,F as k,Se as l,Te as m,Fe as n,Ae as o,Ve as p,Re as q,Q as r,zt as s,Ie as t,De as u};
@@ -0,0 +1 @@
1
+ import{a as n,f as s}from"./chunk-HO7QF2B5.js";import{c}from"./chunk-O7HG7UWR.js";import{createContext as E,useContext as O,useState as o}from"react";import{IconAlertCircle as h}from"@tabler/icons-react";import{jsx as r}from"react/jsx-runtime";var l=E({}),N=({packages:e,marketPackages:i,meta:k,account:P,error:t=null,children:g})=>{let[m,u]=o(!1),[p,d]=o({}),[M,C]=o(i??[]),[f,x]=o(k||{}),v={isDetailModalOpen:m,setIsDetailModalOpen:u,selectedPackage:p,setSelectedPackage:d,marketPackages:M,setMarketPackages:C,meta:f,setMeta:x,account:P,error:t};if(t){let a=s(t)??{icon:r(h,{className:"text-red-500 mx-auto h-15 w-15"}),title:"An Error Occured",message:t||"An internal server error occurred while processing your request.",content:null};return r(n,{icon:a.icon,title:a.title,message:a.message,content:a.content})}return r(c,{packages:e,children:r(l.Provider,{value:v,children:g})})},S=()=>{let e=O(l);if(!e)throw new Error("MarketplaceContext must be used within a MarketplaceProvider");return e};export{N as a,S as b};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-KND3PUAR.js";import{a as s}from"./chunk-37DD6CZ3.js";import{a as i,b as n,c as r}from"./chunk-3DBYUBWW.js";import{a as t}from"./chunk-G4EEZUTC.js";import{Head as m,Link as g}from"@inertiajs/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var N=()=>{let d=[{title:"General Settings",description:"Manage general system settings",href:route("dashboard.settings",{tab:"general"}),icon:e(t,{iconName:"IconSettings"}),colSpan:1},{title:"Manage Slugs",description:"Configure URL slugs and permalinks",href:route("dashboard.settings.slugs"),icon:e(t,{iconName:"IconLink"}),colSpan:1},{title:"Design Settings",description:"Manage appereance, branding and design settings for the system",href:route("dashboard.settings",{tab:"design"}),icon:e(t,{iconName:"IconPalette"}),colSpan:1},{title:"Mail Settings",description:"Manage email settings for the system",href:route("dashboard.settings",{tab:"mail"}),icon:e(t,{iconName:"IconMail"}),colSpan:1},{title:"Platform Status",description:"View system health and service status",href:route("dashboard.settings.platform"),icon:e(t,{iconName:"IconCloudCog"}),colSpan:2}],l=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings"}];return o(s,{breadcrumbs:l,children:[e(m,{title:"All Settings"}),o("div",{className:"container mx-auto grid grid-cols-2 gap-4",children:[e(c,{title:"All Settings",description:"Which settings do you want to manage?",icon:e(t,{iconName:"IconSettings2"})}),d.map((a,p)=>e(g,{href:a.href,className:`col-span-${a.colSpan}`,children:e(i,{className:"cursor-pointer hover:shadow-lg transition-shadow",children:o(n,{children:[o(r,{className:"flex items-center gap-2 mx-auto",children:[a.icon,a.title]}),e("p",{className:"text-sm text-muted-foreground text-center",children:a.description})]})})}))]})]})};export{N as a};
1
+ import{a as c}from"./chunk-KND3PUAR.js";import{a as s}from"./chunk-2QTWMGKG.js";import{a as i,b as n,c as r}from"./chunk-3DBYUBWW.js";import{a as t}from"./chunk-G4EEZUTC.js";import{Head as m,Link as g}from"@inertiajs/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var N=()=>{let d=[{title:"General Settings",description:"Manage general system settings",href:route("dashboard.settings",{tab:"general"}),icon:e(t,{iconName:"IconSettings"}),colSpan:1},{title:"Manage Slugs",description:"Configure URL slugs and permalinks",href:route("dashboard.settings.slugs"),icon:e(t,{iconName:"IconLink"}),colSpan:1},{title:"Design Settings",description:"Manage appereance, branding and design settings for the system",href:route("dashboard.settings",{tab:"design"}),icon:e(t,{iconName:"IconPalette"}),colSpan:1},{title:"Mail Settings",description:"Manage email settings for the system",href:route("dashboard.settings",{tab:"mail"}),icon:e(t,{iconName:"IconMail"}),colSpan:1},{title:"Platform Status",description:"View system health and service status",href:route("dashboard.settings.platform"),icon:e(t,{iconName:"IconCloudCog"}),colSpan:2}],l=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings"}];return o(s,{breadcrumbs:l,children:[e(m,{title:"All Settings"}),o("div",{className:"container mx-auto grid grid-cols-2 gap-4",children:[e(c,{title:"All Settings",description:"Which settings do you want to manage?",icon:e(t,{iconName:"IconSettings2"})}),d.map((a,p)=>e(g,{href:a.href,className:`col-span-${a.colSpan}`,children:e(i,{className:"cursor-pointer hover:shadow-lg transition-shadow",children:o(n,{children:[o(r,{className:"flex items-center gap-2 mx-auto",children:[a.icon,a.title]}),e("p",{className:"text-sm text-muted-foreground text-center",children:a.description})]})})}))]})]})};export{N as a};
@@ -0,0 +1 @@
1
+ import{createContext as f,useContext as a,useEffect as u,useState as r}from"react";import{jsx as x}from"react/jsx-runtime";var v={lg:1200,md:996,sm:640,xs:0},n=f({}),h=({profile:e,profiles:t,widgets:o,indexRouteName:p,children:g})=>{let[P,s]=r(e||null),[l,i]=r(t||null),[W,d]=r(o||null);u(()=>{s(e||null),i(t||null),d(o||null)},[e,t,o]);let c={profile:P,setProfile:s,profiles:l,setProfiles:i,widgets:W,setWidgets:d,indexRouteName:p,breakPoints:v};return x(n.Provider,{value:c,children:g})},b=()=>{let e=a(n);if(!e)throw new Error("useWidgets must be used within a WidgetsProvider");return e};export{n as a,h as b,b as c};