@emintech/core 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SNPTKUE5.js → chunk-2IH2TPAG.js} +1 -1
- package/dist/{chunk-WUFYLSW5.js → chunk-3IGI4YCZ.js} +1 -1
- package/dist/{chunk-AAYQMXGF.js → chunk-4MUMD45S.js} +1 -1
- package/dist/{chunk-6Q54CGSV.js → chunk-52RQB6LX.js} +1 -1
- package/dist/{chunk-3E62GAJ5.js → chunk-5G426RD5.js} +1 -1
- package/dist/{chunk-4BF2G3HA.js → chunk-6RKLDLSC.js} +1 -1
- package/dist/{chunk-5OOSKZ2A.js → chunk-73CHDK3X.js} +1 -1
- package/dist/chunk-ARU7FSI6.js +0 -0
- package/dist/{chunk-IDXLUHHA.js → chunk-CNTR7Q6L.js} +1 -1
- package/dist/chunk-CVRMJUDO.js +1 -0
- package/dist/{chunk-OS5YYRGY.js → chunk-G54HADDZ.js} +1 -1
- package/dist/chunk-GL653BPU.js +0 -0
- package/dist/{chunk-BCQVYKF6.js → chunk-JHSE5LFF.js} +1 -1
- package/dist/{chunk-VDWGKLE7.js → chunk-KB7HH24O.js} +1 -1
- package/dist/{chunk-XOU4MLVF.js → chunk-LQAGAWQQ.js} +1 -1
- package/dist/{chunk-PVEMGAU6.js → chunk-LUP2QMP6.js} +1 -1
- package/dist/{chunk-7OPUQ2NO.js → chunk-N3MF3ZWP.js} +1 -1
- package/dist/{chunk-6NZQLO4H.js → chunk-NT6DGMKA.js} +1 -1
- package/dist/chunk-OFQZZZJO.js +1 -0
- package/dist/chunk-U5MR4K3S.js +1 -0
- package/dist/{chunk-AEPKG2NX.js → chunk-XFR4DFQ4.js} +1 -1
- package/dist/{chunk-RJQGKBW5.js → chunk-XHCRX2OP.js} +1 -1
- package/dist/emincore.register.js +1 -1
- package/dist/features/account/change-password/components/PasswordForm.js +1 -1
- package/dist/features/account/change-password/index.js +1 -1
- package/dist/features/account/change-password/pages/index.js +1 -1
- package/dist/features/account/delete-account/components/DeleteAccountForm.js +1 -1
- package/dist/features/account/delete-account/index.js +1 -1
- package/dist/features/account/delete-account/pages/index.js +1 -1
- package/dist/features/account/index.js +1 -1
- package/dist/features/account/preferences/pages/index.js +1 -1
- package/dist/features/account/profile/components/Profile.js +1 -1
- package/dist/features/account/profile/components/ProfileForm.js +1 -1
- package/dist/features/account/profile/index.js +1 -1
- package/dist/features/account/profile/pages/EditProfilePage.js +1 -1
- package/dist/features/account/profile/pages/IndexProfilePage.js +1 -1
- package/dist/features/account/shared/components/MyAccountHeader.js +1 -1
- package/dist/features/account/shared/components/UserLabel.js +1 -1
- package/dist/features/account/shared/components/UserMenu.js +1 -1
- package/dist/features/account/shared/components/index.js +1 -1
- package/dist/features/account/shared/index.js +1 -1
- package/dist/features/account/shared/layouts/MyAccountLayout.js +1 -1
- package/dist/features/api-key/index.d.ts +1 -0
- package/dist/features/api-key/index.js +1 -0
- package/dist/features/api-key/types/api-key.types.d.ts +14 -0
- package/dist/features/api-key/types/api-key.types.js +1 -0
- package/dist/features/app/components/AppHeader.js +1 -1
- package/dist/features/app/components/AppLogo.js +1 -1
- package/dist/features/app/index.js +1 -1
- package/dist/features/app/layout/AppLayout.js +1 -1
- package/dist/features/appearance/components/AppearanceButton.js +1 -1
- package/dist/features/appearance/components/AppearanceDropdown.js +1 -1
- package/dist/features/appearance/components/AppearanceToggle.js +1 -1
- package/dist/features/appearance/hooks/use-appearance.js +1 -1
- package/dist/features/appearance/index.js +1 -1
- package/dist/features/appearance/lib/appearance-service.js +1 -1
- package/dist/features/auth/index.js +1 -1
- package/dist/features/auth/login/components/Login.js +1 -1
- package/dist/features/auth/login/hooks/use-login-form.js +1 -1
- package/dist/features/auth/login/index.js +1 -1
- package/dist/features/auth/password/confirmation/components/PasswordConfirmation.js +1 -1
- package/dist/features/auth/password/confirmation/index.js +1 -1
- package/dist/features/auth/password/forgot/components/PasswordForgot.js +1 -1
- package/dist/features/auth/password/forgot/index.js +1 -1
- package/dist/features/auth/password/index.js +1 -1
- package/dist/features/auth/password/reset/components/PasswordReset.js +1 -1
- package/dist/features/auth/password/reset/index.js +1 -1
- package/dist/features/auth/register/components/Register.js +1 -1
- package/dist/features/auth/register/index.js +1 -1
- package/dist/features/auth/shared/components/PasswordInput.js +1 -1
- package/dist/features/auth/shared/index.js +1 -1
- package/dist/features/auth/shared/layouts/AuthLayout.js +1 -1
- package/dist/features/auth/verify/email/components/EmailVerify.js +1 -1
- package/dist/features/auth/verify/email/index.js +1 -1
- package/dist/features/auth/verify/index.js +1 -1
- package/dist/features/dashboard/components/DashboardSidebar.js +1 -1
- package/dist/features/dashboard/components/DashboardTopbar.js +1 -1
- package/dist/features/dashboard/index.js +1 -1
- package/dist/features/dashboard/layouts/DashboardLayout.js +1 -1
- package/dist/features/emin-jobs/components/EminJobsComponents.js +1 -1
- package/dist/features/emin-jobs/hooks/use-emin-jobs.js +1 -1
- package/dist/features/emin-jobs/index.js +1 -1
- package/dist/features/marketplace/components/MarketplaceComponents.js +1 -1
- package/dist/features/marketplace/context/MarketplaceContext.js +1 -1
- package/dist/features/marketplace/index.js +1 -1
- package/dist/features/marketplace/pages/IndexMarketplacePage.js +1 -1
- package/dist/features/mobile-token/index.d.ts +1 -0
- package/dist/features/mobile-token/index.js +1 -0
- package/dist/features/mobile-token/types/mobile-token.types.d.ts +16 -0
- package/dist/features/mobile-token/types/mobile-token.types.js +1 -0
- package/dist/features/notifications/components/EminNotification.js +1 -1
- package/dist/features/notifications/context/NotificationsContext.js +1 -1
- package/dist/features/notifications/index.js +1 -1
- package/dist/features/notifications/pages/UserNotificationsPage.js +1 -1
- package/dist/features/package-manager/index.js +1 -1
- package/dist/features/package-manager/installer/index.js +1 -1
- package/dist/features/package-manager/installer/lib/installer-formatter.js +1 -1
- package/dist/features/package-manager/shared/components/PackageManagerModal.js +1 -1
- package/dist/features/package-manager/shared/context/PackageManagerContext.js +1 -1
- package/dist/features/package-manager/shared/hooks/use-package-version-selector.js +1 -1
- package/dist/features/package-manager/shared/index.js +1 -1
- package/dist/features/package-manager/shared/lib/package-manager-formatter.js +1 -1
- package/dist/features/package-manager/shared/lib/package-manager-services.js +1 -1
- package/dist/features/package-manager/updater/index.js +1 -1
- package/dist/features/package-manager/updater/lib/updater-formatter.js +1 -1
- package/dist/features/packages/components/Packages.js +1 -1
- package/dist/features/packages/components/PackagesTable.js +1 -1
- package/dist/features/packages/context/PackagesContext.js +1 -1
- package/dist/features/packages/index.js +1 -1
- package/dist/features/packages/lib/packages-formatter.js +1 -1
- package/dist/features/packages/pages/IndexPackagesPage.js +1 -1
- package/dist/features/platform/components/PlatformComponents.js +1 -1
- package/dist/features/platform/components/PlatformPageComponents.js +1 -1
- package/dist/features/platform/index.js +1 -1
- package/dist/features/platform/lib/platform-formatter.js +1 -1
- package/dist/features/platform/pages/IndexPlatformPage.js +1 -1
- package/dist/features/settings/api/settings.api.js +1 -1
- package/dist/features/settings/context/SettingsContext.js +1 -1
- package/dist/features/settings/index.js +1 -1
- package/dist/features/settings/layouts/SettingsLayout.js +1 -1
- package/dist/features/settings/lib/settings-formatter.js +1 -1
- package/dist/features/settings/pages/DesignSettingsPage.js +1 -1
- package/dist/features/settings/pages/GeneralSettingsPage.js +1 -1
- package/dist/features/settings/pages/MailSettingsPage.js +1 -1
- package/dist/features/settings/pages/NavPage.js +1 -1
- package/dist/features/slugs/components/slugs.js +1 -1
- package/dist/features/slugs/context/SlugsContext.js +1 -1
- package/dist/features/slugs/index.js +1 -1
- package/dist/features/users/components/UserModal.js +1 -1
- package/dist/features/users/components/UsersPage.js +1 -1
- package/dist/features/users/components/UsersStatistics.js +1 -1
- package/dist/features/users/components/UsersTable.js +1 -1
- package/dist/features/users/index.js +1 -1
- package/dist/features/users/lib/users-formatter.js +1 -1
- package/dist/features/users/widgets/UserStatisticsWidget.js +1 -1
- package/dist/features/widgets/components/WidgetMenu.js +1 -1
- package/dist/features/widgets/components/WidgetProfileMenu.js +1 -1
- package/dist/features/widgets/components/WidgetsComponents.js +1 -1
- package/dist/features/widgets/components/WidgetsScreen.js +1 -1
- package/dist/features/widgets/index.js +1 -1
- package/dist/integrations/emincore/page.registry.js +1 -1
- package/dist/integrations/emincore/provider.registry.js +1 -1
- package/dist/integrations/emincore/widget.registry.js +1 -1
- package/dist/pages/auth/login.js +1 -1
- package/dist/pages/auth/password-confirm.js +1 -1
- package/dist/pages/auth/password-forgot.js +1 -1
- package/dist/pages/auth/password-reset.js +1 -1
- package/dist/pages/auth/register.js +1 -1
- package/dist/pages/auth/verify-email.js +1 -1
- package/dist/pages/dashboard/index.js +1 -1
- package/dist/pages/dashboard/marketplace/index.js +1 -1
- package/dist/pages/dashboard/packages/index.js +1 -1
- package/dist/pages/dashboard/platform/index.js +1 -1
- package/dist/pages/dashboard/settings/index.js +1 -1
- package/dist/pages/dashboard/settings/slugs/index.js +1 -1
- package/dist/pages/dashboard/users/index.js +1 -1
- package/dist/pages/my-account/notifications/index.js +1 -1
- package/dist/pages/my-account/profile/edit-password.js +1 -1
- package/dist/pages/my-account/profile/edit.js +1 -1
- package/dist/pages/my-account/profile/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/shared/components/composite/AlertModal.js +1 -1
- package/dist/shared/components/composite/EminEditable.d.ts +3 -2
- package/dist/shared/components/composite/EminEditable.js +1 -1
- package/dist/shared/components/composite/EminFormButton.js +1 -1
- package/dist/shared/components/composite/EminInput.d.ts +3 -3
- package/dist/shared/components/composite/EminInput.js +1 -1
- package/dist/shared/components/composite/EminPopover.d.ts +2 -1
- package/dist/shared/components/composite/EminPopover.js +1 -1
- package/dist/shared/components/composite/EminPreference.js +1 -1
- package/dist/shared/components/composite/EminPreloader.js +1 -1
- package/dist/shared/components/composite/EminRichTextEditor/EminRichTextEditor.d.ts +17 -0
- package/dist/shared/components/composite/EminRichTextEditor/EminRichTextEditor.js +1 -0
- package/dist/shared/components/composite/EminRichTextEditor/EminRichTextToolbar.d.ts +6 -0
- package/dist/shared/components/composite/EminRichTextEditor/EminRichTextToolbar.js +1 -0
- package/dist/shared/components/composite/EminRichTextEditor/index.d.ts +1 -0
- package/dist/shared/components/composite/EminRichTextEditor/index.js +1 -0
- package/dist/shared/components/composite/Menu/EminMenu.js +1 -1
- package/dist/shared/components/composite/Menu/EminSidebarMenu.js +1 -1
- package/dist/shared/components/composite/Menu/index.js +1 -1
- package/dist/shared/components/composite/QuickMenu/QuickMenu.js +1 -1
- package/dist/shared/components/composite/QuickMenu/index.js +1 -1
- package/dist/shared/components/composite/RoleBadge.js +1 -1
- package/dist/shared/components/composite/SectionCard.js +1 -1
- package/dist/shared/components/composite/StatisticCards.js +1 -1
- package/dist/shared/components/composite/index.d.ts +1 -0
- package/dist/shared/components/composite/index.js +1 -1
- package/dist/shared/components/index.js +1 -1
- package/dist/shared/components/ui/avatar.js +1 -1
- package/dist/shared/components/ui/breadcrumbs.js +1 -1
- package/dist/shared/components/ui/chart.js +1 -1
- package/dist/shared/components/ui/slider.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTable.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTableContent.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTablePagination.js +1 -1
- package/dist/shared/modules/emin-table/components/EminTableToolbar.js +1 -1
- package/dist/shared/modules/emin-table/context/EminTableContext.js +1 -1
- package/dist/shared/modules/emin-table/index.js +1 -1
- package/dist/shared/modules/index.js +1 -1
- package/dist/shared/modules/world-map/components/WorldMap2D.js +1 -1
- package/dist/shared/modules/world-map/context/WorldMapContext.js +1 -1
- package/dist/shared/modules/world-map/index.js +1 -1
- package/package.json +11 -5
- package/dist/chunk-4DHRTWA7.js +0 -1
- package/dist/chunk-HGOBNKGK.js +0 -1
- package/dist/chunk-PRCYNFKC.js +0 -1
- /package/dist/{chunk-C7BLCBBU.js → chunk-5FVKVAPS.js} +0 -0
- /package/dist/{chunk-YGU7VNF7.js → chunk-ICVWICWV.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as D}from"./chunk-
|
|
1
|
+
import{c as D}from"./chunk-XFR4DFQ4.js";import{a as E}from"./chunk-52RQB6LX.js";import{a as B}from"./chunk-SC5FEULM.js";import{g as y}from"./chunk-OFQZZZJO.js";import{a as C,b as S,c as w,d as T,f as b}from"./chunk-3DBYUBWW.js";import{a as M}from"./chunk-65LRDGYI.js";import{b as g}from"./chunk-TVCWAJFT.js";import{a as c}from"./chunk-G4EEZUTC.js";import{a as h}from"./chunk-GND5KQRZ.js";import{a as N}from"./chunk-QKP3C5FM.js";import{Link as G,useForm as $,useHttp as Q}from"@inertiajs/react";import{useEffect as W,useState as f}from"react";import{toast as F}from"sonner";import{IconAlertCircleFilled as X,IconArrowUpRight as Y,IconCircleCheckFilled as Z,IconRefresh as L}from"@tabler/icons-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var he=({account:r})=>e(M,{title:"My Platform Account",icon:"IconUserCircle",description:"Manage your platform account settings.",className:"col-span-full",buttons:r?e(g,{variant:"outline",size:"sm",children:t("a",{href:"https://emincore.io/login",target:"_blank",className:"flex items-center gap-2",children:[e(c,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:r.email})]})}):e(G,{href:route("dashboard.marketplace"),className:"flex items-center gap-2",children:t(g,{variant:"default",size:"sm",children:[e(c,{iconName:"IconUserCircle",className:"h-4 w-4"}),e("span",{children:"Connect to Platform"})]})})}),fe=({eminCore:r})=>t(C,{className:"col-span-2",children:[t(S,{children:[t(w,{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(g,{variant:"outline",size:"sm",className:"gap-2",children:[e(c,{iconName:"IconCode",className:"h-4 w-4"}),t("span",{className:"text-xs font-bold",children:["v",r.version]})]}),t(g,{variant:"outline",size:"sm",className:"gap-2",children:[e(c,{iconName:"IconBuilding",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Emin Tech"})]}),t(g,{variant:"outline",size:"sm",className:"gap-2",children:[e(c,{iconName:"IconBook",className:"h-4 w-4"}),e("span",{className:"text-xs font-bold",children:"Docs"})]})]})]}),e(T,{children:e("p",{children:"A modular application platform that orchestrates Composer and npm ecosystems through a unified package architecture, marketplace, and runtime."})})]}),e(b,{className:"grid gap-6",children:e(ee,{})})]}),xe=({requirements:r})=>{let o=({requirement:n})=>{let m=Math.random()*500+800,[k,s]=f(!0);return f(()=>{let v=setTimeout(()=>s(!1),m);return()=>clearTimeout(v)}),k?e(c,{iconName:"IconLoader2",className:"animate-spin mx-auto h-4 w-4 my-0.5"}):e("span",{className:h("font-mono font-bold text-sm",n.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:n.value??"-"})};return t(C,{className:"col-span-2",children:[e(S,{children:t(w,{className:"flex items-center gap-2",children:[e(c,{iconName:"IconServer",className:"h-5 w-5 text-primary"}),e("h3",{className:"font-semibold",children:"System Status"})]})}),e(b,{children:e("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-7 gap-3",children:r?.map(n=>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(c,{iconName:n.icon,className:"h-4 w-4 text-primary mx-auto"}),n.title]}),e(o,{requirement:n}),n.requirements&&e("span",{className:"font-mono font-bold text-xs text-muted-foreground",children:n.requirements})]}))})})]})},Ne=()=>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"})]}),ee=()=>{let r=localStorage?.getItem("last_core_update_checked"),[o,n]=f(localStorage?.getItem("is_core_up_to_date")==="true"),[m,k]=f(r?new Date(r):null),[s,v]=f(JSON.parse(localStorage?.getItem("last_core_versions")??"null")),d=Q();W(()=>{localStorage.setItem("is_core_up_to_date",o?"true":"false"),localStorage.setItem("last_core_versions",JSON.stringify(s)),localStorage.setItem("last_core_update_checked",m?m.toISOString():"")},[o,s,m]);let R=D(),{packages:I,isLoading:P,setIsLoading:V,setLoadingContent:O,setIsModalOpen:z,setPackageManifest:_,setProcess:U,setValidationError:A}=R,{selectVersion:j,SelectionModal:q}=E(),H=()=>d.processing?e(L,{className:"h-6 w-6 text-primary animate-spin shrink-0"}):o?e(Z,{className:"h-6 w-6 text-green-600 dark:text-green-400 shrink-0"}):e(X,{className:"h-6 w-6 text-blue-600 dark:text-blue-500 shrink-0"}),J=()=>t("div",{className:"grid",children:[e("span",{className:h("text-sm font-medium",d.processing?"text-primary":o?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-500"),children:d.processing?"Checking updates...":o?"System is up to date!":"New version available!"}),e("span",{className:"text-xs text-primary/70",children:o===!0?"Last checked: "+(m?.toLocaleString()??"never"):"Keep your system up to date with the latest features, performance improvements, and security updates."})]});return t("div",{className:"grid md:flex md:items-center gap-2",children:[e(()=>t("div",{className:"flex items-center gap-2",children:[e(H,{}),e(J,{})]}),{}),t("div",{className:"grid md:flex md:items-center gap-3 md:ml-auto",children:[e(()=>{let i=$(),x=(a,l)=>({process:"update",manifest:{code:N,version:a==="update"?l.latest_compatible.version:l.latest.version,core_constraint:"latest"}}),p=()=>{P||i.processing||!s||u().then(()=>{U("update"),V(!0),O({title:"Updating System",description:"Please wait while we update your system to the latest version."}),_({...I.find(a=>a.code==N),version:"latest"}),z(!0),i.post(route("dashboard.packages.manager"),{onError:a=>A(Object.values(a).join(`
|
|
2
2
|
`))})})},u=async()=>{if(!s)return;if(s.latest.version!==s.latest_compatible.version)await j(s).then(l=>{if(l!==null){let K=l.version===s.latest.version?"upgrade":"update";i.setData(x(K,s))}else return Promise.reject("User cancelled selection.")});else return i.setData(x("update",s)),Promise.resolve()};return!o&&!P&&t(y,{processing:i.processing,recentlySuccessful:i.recentlySuccessful,processingText:"Updating System...",successText:"System updated successfully!",size:"sm",variant:"ghost",className:h("gap-2"),onClick:()=>p(),children:[e(Y,{className:h("h-4 w-4")}),"Update Now"]})},{}),e(()=>{let i=()=>{let p=new Date().getTime()-(m?.getTime()??0),u=60*1e3-p;if(u>0)return F.warning(`Please wait ${Math.ceil(u/1e3)} seconds before checking again.`),!1;let a=new Date().toISOString();return k(new Date(a)),localStorage.setItem("last_core_update_checked",a),!0},x=()=>{if(d.processing||!i())return;let p=I.find(a=>a.code==N);U("update"),_(p);let u=a=>{let l=a.latest.version===p.version;n(l),l||v(a)};B(d,p.id).then(a=>u(a)).catch(()=>F.error("Failed to check updates for Emin Core."))};return t(y,{processing:d.processing,recentlySuccessful:d.recentlySuccessful,processingText:"Checking updates...",successText:o?"System is up to date!":"New version available!",size:"sm",variant:"outline",onClick:()=>x(),children:[e(L,{className:"h-4 w-4"}),"Check Updates"]})},{})]}),e(q,{})]})};export{he as a,fe as b,xe as c,Ne as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a
|
|
1
|
+
import{a}from"./chunk-N3MF3ZWP.js";import{a as e}from"./chunk-CNTR7Q6L.js";import{va as i,wa as t}from"./chunk-OFQZZZJO.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 +1 @@
|
|
|
1
|
-
import{b as se,c as x}from"./chunk-QXMEPU4D.js";import{a as ne}from"./chunk-BI4PD4EL.js";import{a as re,c as Z,d as de,e as le,f as j,h as ce}from"./chunk-3QPHFHMI.js";import{a as ae}from"./chunk-4DHRTWA7.js";import{b as X,c as $,g as A}from"./chunk-HGOBNKGK.js";import{b as T,c as B,d as G,e as H,f as R,h as O}from"./chunk-GBXDCZP6.js";import{a as J,b as q,f as K,g as V,h as ee,i as te,j as oe}from"./chunk-QFUZ6MVT.js";import{b as k}from"./chunk-TVCWAJFT.js";import{a as ie}from"./chunk-65LRDGYI.js";import{a as y}from"./chunk-G4EEZUTC.js";import{a as h}from"./chunk-GND5KQRZ.js";import{a as U}from"./chunk-QL2STABI.js";import{useEffect as be,useState as we}from"react";import{useForm as Ie}from"@inertiajs/react";import{IconPlus as Ne,IconTrash as Ce}from"@tabler/icons-react";import{Fragment as Le,jsx as m,jsxs as b}from"react/jsx-runtime";var me=()=>{let[e,o]=we(!1);return b(Le,{children:[b(k,{variant:"outline",className:"flex items-center gap-2",onClick:()=>o(!e),children:[m(y,{iconName:"IconLayoutGrid"}),"Widgets"]}),m(We,{isOpen:e,setIsOpen:o})]})},We=({isOpen:e,setIsOpen:o})=>{let{widgets:t}=x(),n=ne(t);return b(T,{open:e,onOpenChange:o,title:"Widgets",description:"Select a widget to add to your dashboard.",children:[m(B,{placeholder:"Search widgets..."}),b(G,{className:"max-h-[420px]",children:[m(H,{children:"No widget found."}),n.map(({packageCode:a,widgets:r})=>r.length>0&&m(R,{className:"p-5",heading:m(De,{packageCode:a,totalWidgets:r.length}),children:r.map(s=>m(O,{value:s.id,keywords:[s.title,s?.description??""],className:"!bg-background",children:m(Pe,{widget:s})},s.id))}))]})]})},De=({packageCode:e,totalWidgets:o})=>b("div",{className:"flex items-center gap-2",children:[m(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"]})]}),Pe=({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:[m(y,{iconName:e?.icon??"IconPackage",className:"h-7 w-7 shrink-0"}),b("div",{className:"grid gap-2",children:[m("div",{className:"text-sm font-bold",children:e.title}),e.description&&m("div",{className:"text-xs text-center",children:e.description??""})]}),m(ke,{widget:e})]})},ke=({widget:e})=>{let{profile:o,breakPoints:t}=x(),a=re(e,o)?"delete":"post",r=()=>a==="delete"?{id:o.items?.find(D=>D.widget_id===e.id)?.id}:{widget_profile_id:o.id,widget_id:e.id,is_expanded:!0,layouts:le(e,t)},s=Ie(r());be(()=>s.setData(r()),[o]);let g=a==="delete"?route("widgets.profiles.items.destroy"):route("widgets.profiles.items.store"),d=()=>s[a](g),C=a==="delete"?s.recentlySuccessful?"outline":"destructive":s.recentlySuccessful?"destructive":"outline",W=a==="delete"?s.recentlySuccessful?"Widget Added!":"":s.recentlySuccessful?"Widget Removed!":"",I=a==="delete"?"Widget Removing...":"Widget Adding...";return b(A,{variant:C,size:"sm",className:"text-primary ml-auto",recentlySuccessful:s.recentlySuccessful,processing:s.processing,successText:W,processingText:I,onClick:()=>d(),children:[a==="delete"?m(Ce,{}):m(Ne,{}),m("span",{children:a==="delete"?"Remove":"Add"})]})};import{useState as ue}from"react";import{router as pe,useForm as Y}from"@inertiajs/react";import{Fragment as fe,jsx as i,jsxs as p}from"react/jsx-runtime";var ge=()=>{let{profile:e}=x(),[o,t]=ue(!1);return p(fe,{children:[p(k,{variant:"outline",className:"flex items-center gap-2",onClick:()=>t(!o),children:[i(y,{iconName:"IconLayout"}),e?.title||"Layouts"]}),i(Ee,{open:o,onOpenChange:t})]})},Ee=({open:e,onOpenChange:o})=>{let{profiles:t,profile:n}=x();return p(T,{open:e,onOpenChange:o,title:"Layouts",description:"See your current layout, default layout, and create a new one.",children:[i(B,{placeholder:"Search layouts..."}),p(G,{className:"max-h-[420px]",children:[i(H,{children:"No layout found."}),i(R,{className:"p-5",children:t.map(a=>i(O,{value:`${a.title} ${a.is_default?"default":"normal"} ${a.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(Se,{profile:a})},a.id))})]}),p("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(_e,{})]})]})},Se=({profile:e})=>{let{profile:o,indexRouteName:t}=x(),n={label:"Layout Name",key:"title",value:e.title,type:"text",editable:!0},a=g=>new Promise((d,C)=>{pe.put(route("widgets.profiles.update"),{id:e.id,title:g},{onSuccess:()=>d(!0),onError:()=>C(!1)})}),r=e.id===o?.id,s=route(t,{widget_profile_id:e.id});return p(fe,{children:[i("div",{className:"flex items-center w-2 h-2",children:i("span",{className:h("h-2 w-2 rounded-full",r?"bg-green-500":"bg-muted")})}),p("div",{className:"grid gap-1 text-left",children:[p("div",{className:"flex flex-wrap items-center gap-2",children:[i("div",{className:"group flex items-center gap-1",children:i($,{item:n,onChange:(g,d)=>a(d),children:p("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(Me,{updatedAt:e.updated_at}),i(ze,{profile:e})]}),i("div",{className:"flex items-center gap-2 ml-auto shrink-0 self-center cursor-pointer",onClick:()=>!r&&pe.visit(s,{preserveUrl:!0}),children:i("div",{className:h("h-4 w-4 rounded-full border-2 flex items-center justify-center",r?"border-primary":"border-muted hover:border-primary"),children:r&&i("div",{className:"h-2 w-2 rounded-full bg-primary"})})})]})},ze=({profile:e})=>p("div",{className:"flex items-center gap-2",children:[i(Ae,{profile:e,className:"!p-0 h-4"}),i(Te,{profile:e,className:"!p-0 h-4"})]}),Me=({updatedAt:e})=>p("span",{className:"text-xs text-primary/70",children:["Updated At: ",e?new Date(e).toLocaleString():"Never"]}),_e=()=>{let[e,o]=ue(!1),t=Y({title:""}),n=()=>t.post(route("widgets.profiles.store"),{onSuccess:()=>t.reset()});return p(J,{open:e,onOpenChange:o,children:[i(q,{children:p(k,{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"})]})}),p(K,{className:"grid gap-3",children:[p(V,{children:[i(te,{children:"Create new layout"}),i(oe,{children:"Create a new layout to use. You can switch between layouts at any time."})]}),i("div",{children:i(ae,{label:"Layout Name",icon:"IconLayout",type:"text",placeholder:"Give a name to your new layout",error:t.errors.title,value:t.data.title,onChange:a=>t.setData({title:a.target.value})})}),i(ee,{children:p(A,{recentlySuccessful:t.recentlySuccessful,processing:t.processing,successText:"Layout Created!",processingText:"Layout creating...",variant:"default",onClick:()=>n(),children:[i(y,{iconName:"IconPlus"}),"Create Now"]})})]})]})},Ae=({profile:e,className:o})=>{let t=Y(),n=()=>{t.setData({id:e.id}),t.delete(route("widgets.profiles.destroy"))};return i(X,{title:"Are you sure to delete this layout?",content:"This action is permanent and cannot be undone.",onConfirm:()=>n(),children:i(k,{className:h(!t.processing||!t.recentlySuccessful?"text-red-500":"text-primary",o),type:"button",variant:"link",size:"sm",disabled:t.processing,onClick:a=>a.stopPropagation(),children:t.processing?"Deleting...":"Delete"})})},Te=({profile:e,className:o})=>{let t=Y(),n=()=>{t.setData({id:e.id,is_default:!e.is_default}),t.put(route("widgets.profiles.update"))};return!e.is_default&&i(k,{className:h("",o),type:"button",variant:"link",size:"sm",disabled:t.processing,onClick:a=>{a.preventDefault(),a.stopPropagation(),n()},children:t.processing?"Saving...":"Set as default"})};import{Fragment as Be,jsx as S,jsxs as ye}from"react/jsx-runtime";var Ct=({profile:e,profiles:o,widgets:t,indexRouteName:n})=>S(se,{profile:e,profiles:o,widgets:t,indexRouteName:n,children:ye("div",{className:"grid grid-cols-1 gap-7 overflow-visible",children:[S(ie,{title:"Dashboard",description:"Overview of your application",icon:"IconDeviceDesktop",buttons:ye(Be,{children:[S(me,{}),S(ge,{})]})}),S(xe,{})]})});import{useHttp as he}from"@inertiajs/react";import{IconLoader2 as Ge,IconMinus as He,IconPlus as Re,IconX as Oe}from"@tabler/icons-react";import{lazy as Fe,Suspense as Ze,useCallback as Q,useMemo as F}from"react";import{useContainerWidth as je,Responsive as Ye}from"react-grid-layout";import"react-grid-layout/css/styles.css";import{jsx as l,jsxs as z}from"react/jsx-runtime";var ve=new Map,Qe=(e,o)=>{let t=ve.get(e);if(t)return t;let n=Fe(o);return ve.set(e,n),n},xe=()=>{let{width:e,containerRef:o,mounted:t}=je(),{breakPoints:n,profile:a,setProfile:r}=x(),s=a?.items,g=F(()=>Object.keys(Z),[]),d=he({items:s??[]}),C=F(()=>s?.map(u=>u.widget)??[],[s]),W=F(()=>{let u={};return g.forEach(v=>{u[v]=s?.map(c=>c.layouts?.[v]??j(c.widget,!c.is_expanded,v))??[]}),u},[g,s]),I=Q((u,v)=>{r(c=>c&&{...c,items:u}),d.setData({items:u}),d.put(route("widgets.profiles.items.update"),{onError:()=>r(c=>c&&{...c,items:v})})},[d,r]),D=Q((u,v)=>{let c=v;if(ce(W,c,g))return;let w=s??[],M=w.map(_=>({..._,layouts:g.reduce((E,L)=>{let P=(c[L]??[]).find(f=>f.i===String(_.widget.id));return P&&(E[L]=P),E},{})}));I(M,w)},[I,g,W,s]),N=Q(u=>{let v=s??[],c=v.map(w=>{if(w.id!==u)return w;let M=!w.is_expanded,_=g.reduce((E,L)=>{let P=w.layouts?.[L],f=j(w.widget,!M,L);return E[L]={...P??f,i:f.i,x:P?.x??f.x,y:P?.y??f.y,w:P?.w??f.w,h:f.h,minH:f.minH,maxH:f.maxH,minW:f.minW,maxW:f.maxW},E},{});return{...w,is_expanded:M,layouts:_}});I(c,v)},[I,g,s]);return t&&l("div",{ref:o,children:l(Ye,{width:e,layouts:W,breakpoints:n,cols:Z,rowHeight:de,margin:[12,12],containerPadding:[0,0],dragConfig:{enabled:!0,handle:".widget-drag-handle"},resizeConfig:{enabled:!0},onLayoutChange:D,children:C.map(u=>l("div",{className:" overflow-visible",children:l(Ue,{widget:u,onToggleExpand:N})},String(u.id)))})})},Ue=({widget:e,onToggleExpand:o})=>{let{profile:t,setProfile:n}=x(),a=U.get(e.code),r=a?.loader,s=typeof r=="function",g=F(()=>s?Qe(e.code,r):()=>null,[e.code,r,s]),d=t.items.find(D=>D.widget_id===e.id),C=()=>o(d.id),W=he({id:d.id}),I=()=>{let D=t.items??[];n(N=>({...N,items:N?.items?.filter(u=>u.id!==d.id)})),W.delete(route("widgets.profiles.items.destroy"),{onError:()=>n(N=>N&&{...N,items:D})})};return s&&d&&z("div",{className:h(d?.is_expanded?"flex h-full w-full min-h-0 flex-col overflow-hidden rounded-lg border bg-background shadow-sm":""),children:[z("div",{className:h("flex items-center gap-2 widget-drag-handle shrink-0 px-3 py-3 bg-muted/30",d?.is_expanded?"border-b cursor-move select-none":"rounded-lg border shadow-sm"),children:[l(y,{iconName:a?.icon??"IconTag",className:"w-5 h-5 shrink-0"}),l("span",{className:"text-sm font-medium",children:e.title}),z("div",{className:"flex items-center gap-5 ml-auto",children:[l("span",{className:"text-sm text-muted-foreground",children:e.package_code}),z("div",{className:"flex items-center gap-2",children:[l("div",{onClick:()=>C(),children:d?.is_expanded?l(He,{className:"h-5 w-5 cursor-pointer"}):l(Re,{className:"h-5 w-5 cursor-pointer"})}),l("div",{onClick:()=>I(),children:l(Oe,{className:"h-5 w-5 cursor-pointer"})})]})]})]}),d?.is_expanded&&l("div",{className:"flex-1 min-h-0 overflow-auto p-3",children:l(Ze,{fallback:l("div",{className:"flex items-center justify-center w-full h-full",children:z("div",{className:"grid gap-2",children:[l("span",{className:"font-bold",children:e.title}),l(Ge,{className:"animate-spin h-7 w-7 mx-auto"})]})}),children:l(g,{props:e.props})})})]})};export{xe as a,Ue as b,me as c,ge as d,Ct as e};
|
|
1
|
+
import{b as se,c as x}from"./chunk-QXMEPU4D.js";import{a as ne}from"./chunk-BI4PD4EL.js";import{a as re,c as Z,d as de,e as le,f as j,h as ce}from"./chunk-3QPHFHMI.js";import{a as ae}from"./chunk-U5MR4K3S.js";import{b as X,c as $,g as A}from"./chunk-OFQZZZJO.js";import{b as T,c as B,d as G,e as H,f as R,h as O}from"./chunk-GBXDCZP6.js";import{a as J,b as q,f as K,g as V,h as ee,i as te,j as oe}from"./chunk-QFUZ6MVT.js";import{a as ie}from"./chunk-65LRDGYI.js";import{b as k}from"./chunk-TVCWAJFT.js";import{a as y}from"./chunk-G4EEZUTC.js";import{a as h}from"./chunk-GND5KQRZ.js";import{a as U}from"./chunk-QL2STABI.js";import{useEffect as be,useState as we}from"react";import{useForm as Ie}from"@inertiajs/react";import{IconPlus as Ne,IconTrash as Ce}from"@tabler/icons-react";import{Fragment as Le,jsx as m,jsxs as b}from"react/jsx-runtime";var me=()=>{let[e,o]=we(!1);return b(Le,{children:[b(k,{variant:"outline",className:"flex items-center gap-2",onClick:()=>o(!e),children:[m(y,{iconName:"IconLayoutGrid"}),"Widgets"]}),m(We,{isOpen:e,setIsOpen:o})]})},We=({isOpen:e,setIsOpen:o})=>{let{widgets:t}=x(),n=ne(t);return b(T,{open:e,onOpenChange:o,title:"Widgets",description:"Select a widget to add to your dashboard.",children:[m(B,{placeholder:"Search widgets..."}),b(G,{className:"max-h-[420px]",children:[m(H,{children:"No widget found."}),n.map(({packageCode:a,widgets:r})=>r.length>0&&m(R,{className:"p-5",heading:m(De,{packageCode:a,totalWidgets:r.length}),children:r.map(s=>m(O,{value:s.id,keywords:[s.title,s?.description??""],className:"!bg-background",children:m(Pe,{widget:s})},s.id))}))]})]})},De=({packageCode:e,totalWidgets:o})=>b("div",{className:"flex items-center gap-2",children:[m(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"]})]}),Pe=({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:[m(y,{iconName:e?.icon??"IconPackage",className:"h-7 w-7 shrink-0"}),b("div",{className:"grid gap-2",children:[m("div",{className:"text-sm font-bold",children:e.title}),e.description&&m("div",{className:"text-xs text-center",children:e.description??""})]}),m(ke,{widget:e})]})},ke=({widget:e})=>{let{profile:o,breakPoints:t}=x(),a=re(e,o)?"delete":"post",r=()=>a==="delete"?{id:o.items?.find(D=>D.widget_id===e.id)?.id}:{widget_profile_id:o.id,widget_id:e.id,is_expanded:!0,layouts:le(e,t)},s=Ie(r());be(()=>s.setData(r()),[o]);let g=a==="delete"?route("widgets.profiles.items.destroy"):route("widgets.profiles.items.store"),d=()=>s[a](g),C=a==="delete"?s.recentlySuccessful?"outline":"destructive":s.recentlySuccessful?"destructive":"outline",W=a==="delete"?s.recentlySuccessful?"Widget Added!":"":s.recentlySuccessful?"Widget Removed!":"",I=a==="delete"?"Widget Removing...":"Widget Adding...";return b(A,{variant:C,size:"sm",className:"text-primary ml-auto",recentlySuccessful:s.recentlySuccessful,processing:s.processing,successText:W,processingText:I,onClick:()=>d(),children:[a==="delete"?m(Ce,{}):m(Ne,{}),m("span",{children:a==="delete"?"Remove":"Add"})]})};import{useState as ue}from"react";import{router as pe,useForm as Y}from"@inertiajs/react";import{Fragment as fe,jsx as i,jsxs as p}from"react/jsx-runtime";var ge=()=>{let{profile:e}=x(),[o,t]=ue(!1);return p(fe,{children:[p(k,{variant:"outline",className:"flex items-center gap-2",onClick:()=>t(!o),children:[i(y,{iconName:"IconLayout"}),e?.title||"Layouts"]}),i(Ee,{open:o,onOpenChange:t})]})},Ee=({open:e,onOpenChange:o})=>{let{profiles:t,profile:n}=x();return p(T,{open:e,onOpenChange:o,title:"Layouts",description:"See your current layout, default layout, and create a new one.",children:[i(B,{placeholder:"Search layouts..."}),p(G,{className:"max-h-[420px]",children:[i(H,{children:"No layout found."}),i(R,{className:"p-5",children:t.map(a=>i(O,{value:`${a.title} ${a.is_default?"default":"normal"} ${a.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(Se,{profile:a})},a.id))})]}),p("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(_e,{})]})]})},Se=({profile:e})=>{let{profile:o,indexRouteName:t}=x(),n={label:"Layout Name",key:"title",value:e.title,type:"text",editable:!0},a=g=>new Promise((d,C)=>{pe.put(route("widgets.profiles.update"),{id:e.id,title:g},{onSuccess:()=>d(!0),onError:()=>C(!1)})}),r=e.id===o?.id,s=route(t,{widget_profile_id:e.id});return p(fe,{children:[i("div",{className:"flex items-center w-2 h-2",children:i("span",{className:h("h-2 w-2 rounded-full",r?"bg-green-500":"bg-muted")})}),p("div",{className:"grid gap-1 text-left",children:[p("div",{className:"flex flex-wrap items-center gap-2",children:[i("div",{className:"group flex items-center gap-1",children:i($,{item:n,onChange:(g,d)=>a(d),children:p("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(Me,{updatedAt:e.updated_at}),i(ze,{profile:e})]}),i("div",{className:"flex items-center gap-2 ml-auto shrink-0 self-center cursor-pointer",onClick:()=>!r&&pe.visit(s,{preserveUrl:!0}),children:i("div",{className:h("h-4 w-4 rounded-full border-2 flex items-center justify-center",r?"border-primary":"border-muted hover:border-primary"),children:r&&i("div",{className:"h-2 w-2 rounded-full bg-primary"})})})]})},ze=({profile:e})=>p("div",{className:"flex items-center gap-2",children:[i(Ae,{profile:e,className:"!p-0 h-4"}),i(Te,{profile:e,className:"!p-0 h-4"})]}),Me=({updatedAt:e})=>p("span",{className:"text-xs text-primary/70",children:["Updated At: ",e?new Date(e).toLocaleString():"Never"]}),_e=()=>{let[e,o]=ue(!1),t=Y({title:""}),n=()=>t.post(route("widgets.profiles.store"),{onSuccess:()=>t.reset()});return p(J,{open:e,onOpenChange:o,children:[i(q,{children:p(k,{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"})]})}),p(K,{className:"grid gap-3",children:[p(V,{children:[i(te,{children:"Create new layout"}),i(oe,{children:"Create a new layout to use. You can switch between layouts at any time."})]}),i("div",{children:i(ae,{label:"Layout Name",icon:"IconLayout",type:"text",placeholder:"Give a name to your new layout",error:t.errors.title,value:t.data.title,onChange:a=>t.setData({title:a.target.value})})}),i(ee,{children:p(A,{recentlySuccessful:t.recentlySuccessful,processing:t.processing,successText:"Layout Created!",processingText:"Layout creating...",variant:"default",onClick:()=>n(),children:[i(y,{iconName:"IconPlus"}),"Create Now"]})})]})]})},Ae=({profile:e,className:o})=>{let t=Y(),n=()=>{t.setData({id:e.id}),t.delete(route("widgets.profiles.destroy"))};return i(X,{title:"Are you sure to delete this layout?",content:"This action is permanent and cannot be undone.",onConfirm:()=>n(),children:i(k,{className:h(!t.processing||!t.recentlySuccessful?"text-red-500":"text-primary",o),type:"button",variant:"link",size:"sm",disabled:t.processing,onClick:a=>a.stopPropagation(),children:t.processing?"Deleting...":"Delete"})})},Te=({profile:e,className:o})=>{let t=Y(),n=()=>{t.setData({id:e.id,is_default:!e.is_default}),t.put(route("widgets.profiles.update"))};return!e.is_default&&i(k,{className:h("",o),type:"button",variant:"link",size:"sm",disabled:t.processing,onClick:a=>{a.preventDefault(),a.stopPropagation(),n()},children:t.processing?"Saving...":"Set as default"})};import{Fragment as Be,jsx as S,jsxs as ye}from"react/jsx-runtime";var Ct=({profile:e,profiles:o,widgets:t,indexRouteName:n})=>S(se,{profile:e,profiles:o,widgets:t,indexRouteName:n,children:ye("div",{className:"grid grid-cols-1 gap-7 overflow-visible",children:[S(ie,{title:"Dashboard",description:"Overview of your application",icon:"IconDeviceDesktop",buttons:ye(Be,{children:[S(me,{}),S(ge,{})]})}),S(xe,{})]})});import{useHttp as he}from"@inertiajs/react";import{IconLoader2 as Ge,IconMinus as He,IconPlus as Re,IconX as Oe}from"@tabler/icons-react";import{lazy as Fe,Suspense as Ze,useCallback as Q,useMemo as F}from"react";import{useContainerWidth as je,Responsive as Ye}from"react-grid-layout";import"react-grid-layout/css/styles.css";import{jsx as l,jsxs as z}from"react/jsx-runtime";var ve=new Map,Qe=(e,o)=>{let t=ve.get(e);if(t)return t;let n=Fe(o);return ve.set(e,n),n},xe=()=>{let{width:e,containerRef:o,mounted:t}=je(),{breakPoints:n,profile:a,setProfile:r}=x(),s=a?.items,g=F(()=>Object.keys(Z),[]),d=he({items:s??[]}),C=F(()=>s?.map(u=>u.widget)??[],[s]),W=F(()=>{let u={};return g.forEach(v=>{u[v]=s?.map(c=>c.layouts?.[v]??j(c.widget,!c.is_expanded,v))??[]}),u},[g,s]),I=Q((u,v)=>{r(c=>c&&{...c,items:u}),d.setData({items:u}),d.put(route("widgets.profiles.items.update"),{onError:()=>r(c=>c&&{...c,items:v})})},[d,r]),D=Q((u,v)=>{let c=v;if(ce(W,c,g))return;let w=s??[],M=w.map(_=>({..._,layouts:g.reduce((E,L)=>{let P=(c[L]??[]).find(f=>f.i===String(_.widget.id));return P&&(E[L]=P),E},{})}));I(M,w)},[I,g,W,s]),N=Q(u=>{let v=s??[],c=v.map(w=>{if(w.id!==u)return w;let M=!w.is_expanded,_=g.reduce((E,L)=>{let P=w.layouts?.[L],f=j(w.widget,!M,L);return E[L]={...P??f,i:f.i,x:P?.x??f.x,y:P?.y??f.y,w:P?.w??f.w,h:f.h,minH:f.minH,maxH:f.maxH,minW:f.minW,maxW:f.maxW},E},{});return{...w,is_expanded:M,layouts:_}});I(c,v)},[I,g,s]);return t&&l("div",{ref:o,children:l(Ye,{width:e,layouts:W,breakpoints:n,cols:Z,rowHeight:de,margin:[12,12],containerPadding:[0,0],dragConfig:{enabled:!0,handle:".widget-drag-handle"},resizeConfig:{enabled:!0},onLayoutChange:D,children:C.map(u=>l("div",{className:" overflow-visible",children:l(Ue,{widget:u,onToggleExpand:N})},String(u.id)))})})},Ue=({widget:e,onToggleExpand:o})=>{let{profile:t,setProfile:n}=x(),a=U.get(e.code),r=a?.loader,s=typeof r=="function",g=F(()=>s?Qe(e.code,r):()=>null,[e.code,r,s]),d=t.items.find(D=>D.widget_id===e.id),C=()=>o(d.id),W=he({id:d.id}),I=()=>{let D=t.items??[];n(N=>({...N,items:N?.items?.filter(u=>u.id!==d.id)})),W.delete(route("widgets.profiles.items.destroy"),{onError:()=>n(N=>N&&{...N,items:D})})};return s&&d&&z("div",{className:h(d?.is_expanded?"flex h-full w-full min-h-0 flex-col overflow-hidden rounded-lg border bg-background shadow-sm":""),children:[z("div",{className:h("flex items-center gap-2 widget-drag-handle shrink-0 px-3 py-3 bg-muted/30",d?.is_expanded?"border-b cursor-move select-none":"rounded-lg border shadow-sm"),children:[l(y,{iconName:a?.icon??"IconTag",className:"w-5 h-5 shrink-0"}),l("span",{className:"text-sm font-medium",children:e.title}),z("div",{className:"flex items-center gap-5 ml-auto",children:[l("span",{className:"text-sm text-muted-foreground",children:e.package_code}),z("div",{className:"flex items-center gap-2",children:[l("div",{onClick:()=>C(),children:d?.is_expanded?l(He,{className:"h-5 w-5 cursor-pointer"}):l(Re,{className:"h-5 w-5 cursor-pointer"})}),l("div",{onClick:()=>I(),children:l(Oe,{className:"h-5 w-5 cursor-pointer"})})]})]})]}),d?.is_expanded&&l("div",{className:"flex-1 min-h-0 overflow-auto p-3",children:l(Ze,{fallback:l("div",{className:"flex items-center justify-center w-full h-full",children:z("div",{className:"grid gap-2",children:[l("span",{className:"font-bold",children:e.title}),l(Ge,{className:"animate-spin h-7 w-7 mx-auto"})]})}),children:l(g,{props:e.props})})})]})};export{xe as a,Ue as b,me as c,ge as d,Ct as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as i}from"./chunk-
|
|
1
|
+
import{b as i}from"./chunk-OFQZZZJO.js";import{a as u,f as g,g as p,i as f,j as v}from"./chunk-QFUZ6MVT.js";import{a as c}from"./chunk-G4EEZUTC.js";import{useEffect as y,useRef as N,useState as h}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var R=()=>{let[s,m]=h(),[t,l]=h(!1),r=N(null);y(()=>{t||(r.current?.(null),r.current=null,m(void 0))},[t]);let k=()=>{if(!s||!t)return null;let{latest:o,latest_compatible:n}=s;return e(u,{open:t,onOpenChange:l,children:a(g,{children:[a(p,{children:[e(f,{children:"Select a version to install"}),e(v,{children:"This version is a major update, it may break your application."})]}),a("div",{className:"grid grid-cols-2 gap-2",children:[e(i,{title:"Install latest compatible version",content:"Are you sure you want to install the latest compatible version?",onConfirm:()=>d(n),children:a("div",{className:"grid gap-2 border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",children:[e(c,{iconName:"IconRefresh",className:"h-12 w-12 mx-auto mb-3"}),e("p",{className:"text-sm",children:"Latest compatible version"}),e("h3",{className:"font-bold",children:n.version}),e("p",{className:"text-sm text-muted-foreground",children:"No breaking changes"})]})}),e(i,{title:"Upgrade to latest version",content:"Are you sure you want to upgrade to the latest version? It may contain breaking changes!",onConfirm:()=>d(o),children:a("div",{className:"grid gap-2 border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",children:[e(c,{iconName:"IconRefreshAlert",className:"h-12 w-12 mx-auto mb-3"}),e("p",{className:"text-sm",children:"Latest version"}),e("h3",{className:"font-bold",children:o.version}),e("p",{className:"text-sm text-muted-foreground text-orange-500",children:"May contain breaking changes"})]})})]})]})})},b=o=>t?Promise.resolve(null):(m(o),l(!0),new Promise(n=>r.current=n)),d=o=>{r.current?.(o),l(!1)};return{SelectionModal:()=>s&&t?e(k,{}):null,selectVersion:b}};export{R as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-KND3PUAR.js";import{a as s}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-KND3PUAR.js";import{a as s}from"./chunk-3IGI4YCZ.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 +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-
|
|
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-3IGI4YCZ.js";import{a as C}from"./chunk-QKGQOXDM.js";import{b as G}from"./chunk-TVCWAJFT.js";import{a as D}from"./chunk-G22OJQWL.js";import{a as o}from"./chunk-G4EEZUTC.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{a as w,b as A,c as R,d as F}from"./chunk-
|
|
1
|
+
import{a as w,b as A,c as R,d as F}from"./chunk-2IH2TPAG.js";import{b as k}from"./chunk-XFR4DFQ4.js";import{a as _}from"./chunk-U5MR4K3S.js";import{a as S}from"./chunk-KND3PUAR.js";import{a as E}from"./chunk-3IGI4YCZ.js";import{g as x}from"./chunk-OFQZZZJO.js";import{a as N,b as C,f as v,g as h,i as D,j as b}from"./chunk-QFUZ6MVT.js";import{b as P}from"./chunk-TVCWAJFT.js";import{a}from"./chunk-G4EEZUTC.js";import{a as I}from"./chunk-QKP3C5FM.js";import{useState as G}from"react";import{useForm as q,usePage as W}from"@inertiajs/react";import{IconAlertCircle as L}from"@tabler/icons-react";import{Fragment as g,jsx as n,jsxs as M}from"react/jsx-runtime";var B=t=>[{step:M(g,{children:["Log in to ",n("strong",{children:"emincore.io"})]})},{step:M(g,{children:["Select the application for ",n("strong",{children:t.app.url})]})},{step:n(g,{children:"Generate or regenerate an API Secret key and fill it in the form below."})},{step:n(g,{children:"Submit and complete the connection process."})}],U=t=>{switch(t){case"invalid_api_secret":return{icon:n(L,{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:n(f,{})};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:n(f,{})};case"403":return{icon:"IconBan",title:"403 Forbidden",message:"You do not have permission to access this resource."};default:return null}};import{Head as K}from"@inertiajs/react";import{Fragment as z,jsx as r,jsxs as y}from"react/jsx-runtime";var ne=({packages:t,requirements:s,account:i,error:l})=>{let m=[{title:"WM Dashboard",href:route("dashboard")},{title:"Platform"}],d=t.find(u=>u.code==I);return y(z,{children:[r(K,{title:"Platform"}),r(E,{breadcrumbs:m,children:r(k,{packages:t,children:y("div",{className:"container mx-auto",children:[r(S,{title:"Platform",description:"Platform overview",icon:r(a,{iconName:"IconCloudCog"})}),y("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[r(w,{account:i}),r(A,{eminCore:d}),r(R,{requirements:s}),r(F,{})]})]})})})]})};import{toast as Y}from"sonner";import{jsx as e,jsxs as o}from"react/jsx-runtime";var be=({icon:t,title:s,message:i,content:l,className:m})=>o("div",{className:`grid gap-4 mt-15 mb-25 ${m}`,children:[t&&(typeof t=="string"?e(a,{iconName:t,className:"mx-auto h-15 w-15"}):t),o("div",{className:"grid gap-2 text-center",children:[e("h2",{className:"text-2xl font-bold",children:s}),e("span",{className:"text-sm text-muted-foreground",children:i}),l]})]}),f=()=>{let[t,s]=G(!1),i=W().props,{data:l,setData:m,post:d,processing:u,recentlySuccessful:T,errors:O}=q({api_secret_key:""});return o(N,{open:t,onOpenChange:s,children:[e(C,{children:o(P,{variant:"default",size:"sm",className:"mt-2",children:[e(a,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})}),o(v,{children:[o(h,{children:[o(D,{className:"grid text-center mx-auto gap-2",children:[e(a,{iconName:"IconPlug",className:"mx-auto h-10 w-10"}),e("span",{children:"Connect to EminCore Platform"})]}),e(b,{className:"text-center",children:"Please follow the steps below to get an API Secret key and connect your application to the EminCore platform."})]}),e("div",{className:"grid gap-3",children:o("form",{onSubmit:c=>{c.preventDefault();let p=new Promise(H=>d(route("dashboard.settings.platform.connect"),{onFinish:H}));Y.promise(p,{loading:"Connecting to EminCore Platform..."})},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:B(i).map((c,p)=>o("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:p+1}),e("span",{className:"text-sm text-muted-foreground",children:c.step})]},p))}),o("div",{className:"grid gap-4 text-center",children:[e(_,{placeholder:"Enter your API secret key",icon:"IconKey",value:l.api_secret_key,onChange:c=>m({api_secret_key:c.target.value}),error:O.api_secret_key}),o(x,{recentlySuccessful:T,processing:u,variant:"default",size:"sm",className:"mt-2",children:[e(a,{iconName:"IconPlug"}),e("span",{children:"Connect"})]})]})]})})]})]})};export{be as a,f as b,B as c,U as d,ne as e};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as t,ia as n,
|
|
1
|
+
import{i as t,ia as n,za as m}from"./chunk-OFQZZZJO.js";import{a as i}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 y=({breadcrumbs:p=[]})=>{let d=a().props,{dashboard:l}=a().props?.emin_core_menus,{url:h}=a(),{user:u,notifications:f,unread_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(n,{notifications:f??[],unreadNotifications:b??0}),e(m,{placeholder:"Type a command or search...",menu:i(l,h)}),e(t,{className:"w-8 h-8"})]})]})})};export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d,b as m,c as h}from"./chunk-SEWU654V.js";import{a as c}from"./chunk-GND5KQRZ.js";import{useState as f,useRef as E,useEffect as C,useContext as P,createContext as N}from"react";import{jsx as t}from"react/jsx-runtime";var v=N(void 0),w=({children:e,trigger:o="hover",isActive:n=!0,...i})=>{let[r,s]=f(!1),[u,p]=f(!1),a=E(null);C(()=>{p("ontouchstart"in window||navigator.maxTouchPoints>0)},[]);let l=u?"click":o,g={isPopoverOpen:r,setIsPopoverOpen:s,isTouchDevice:u,setIsTouchDevice:p,timeoutRef:a,handleMouseEnter:()=>{l==="hover"&&(a.current&&clearTimeout(a.current),s(!0))},handleMouseLeave:()=>{l==="hover"&&(a.current=setTimeout(()=>{s(!1)},200))},handleClick:()=>{l==="click"&&s(!r)}};return t(v.Provider,{value:g,children:t(d,{open:n?r:!1,onOpenChange:s,children:e})})},A=({children:e,className:o})=>t("div",{className:c("",o),children:typeof e=="string"?t("span",{className:"font-bold",children:e}):e}),I=({children:e,className:o})=>{let{handleMouseEnter:n,handleMouseLeave:i,handleClick:r}=P(v)||{};return t(m,{className:c("",o),onMouseEnter:n,onMouseLeave:i,onClick:r,children:e})},y=({children:e,className:o})=>{let{handleMouseEnter:n,handleMouseLeave:i}=P(v)||{};return t(h,{className:c("my-2 mx-3 p-4 text-sm break-all max-w-[300px] w-auto grid gap-2",o),onMouseEnter:n,onMouseLeave:i,children:e})};export{w as a,A as b,I as c,y as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,d as s}from"./chunk-
|
|
1
|
+
import{a as n,d as s}from"./chunk-73CHDK3X.js";import{b as c}from"./chunk-XFR4DFQ4.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:a=null,children:m})=>{let[g,p]=o(!1),[u,d]=o({}),[M,C]=o(i??[]),[f,x]=o(k||{}),v={isDetailModalOpen:g,setIsDetailModalOpen:p,selectedPackage:u,setSelectedPackage:d,marketPackages:M,setMarketPackages:C,meta:f,setMeta:x,account:P,error:a};if(a){let t=s(a)??{icon:r(h,{className:"text-red-500 mx-auto h-15 w-15"}),title:"An Error Occured",message:a||"An internal server error occurred while processing your request.",content:null};return r(n,{icon:t.icon,title:t.title,message:t.message,content:t.content})}return r(c,{packages:e,children:r(l.Provider,{value:v,children:m})})},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};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as U,b as g}from"./chunk-GJ3Z7ZV5.js";import{a as W,b as q,c as k,d as h}from"./chunk-3ZSQL2FG.js";import{b as R}from"./chunk-RAUR55QN.js";import{a as G}from"./chunk-U5MR4K3S.js";import{a as d}from"./chunk-KND3PUAR.js";import{a as F}from"./chunk-3IGI4YCZ.js";import{f as m,g as w}from"./chunk-OFQZZZJO.js";import{a as M}from"./chunk-DSY4KVMF.js";import{a as I,b as B,c as E,d as H,f as N}from"./chunk-3DBYUBWW.js";import{a as x}from"./chunk-65LRDGYI.js";import{b}from"./chunk-TVCWAJFT.js";import{a as o}from"./chunk-G4EEZUTC.js";import{a as f,d as P}from"./chunk-GND5KQRZ.js";import{Head as ae}from"@inertiajs/react";import{jsx as S,jsxs as Z}from"react/jsx-runtime";var ge=({settings:e})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"General Settings"}];return Z(p,{settings:e,title:"General",breadcrumbs:i,children:[S(d,{title:"General Settings",description:"Manage general system settings",icon:S(o,{iconName:"IconSettings2"})}),S("div",{className:"container mx-auto",children:S(Y,{})})]})},Y=()=>{let{settings:e,handleChange:i}=g();return W(e,i).map(s=>S(m,{section:s}))};import{useEffect as j,useState as z}from"react";import{jsx as t,jsxs as c}from"react/jsx-runtime";var Ne=({settings:e})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Design Settings"}];return c(p,{settings:e,title:"Design",breadcrumbs:i,children:[t(d,{title:"Design Settings",description:"Manage design system settings",icon:t(o,{iconName:"IconSettings2"})}),c("div",{className:"container mx-auto grid grid-cols-1 gap-5",children:[t(ee,{}),t(te,{}),t(re,{})]})]})},ee=()=>{let{settings:e,handleChange:i}=g(),[s,l]=z(k(e));return j(()=>{l(k(e))},[e]),c("div",{className:"grid grid-cols-1 gap-5",children:[t(x,{icon:t(o,{iconName:"IconPalette"}),title:"System Logos",description:"Manage system logo appereances",className:"col-span-2"}),t("div",{className:"grid grid-cols-1 w-[75%] sm:w-full sm:grid-cols-[1fr_2fr_2fr] gap-3",children:s.map(r=>c(I,{className:f("!w-full",r.key.slice(0,4)=="dark"?"bg-black/90 text-white dark:bg-background":r.key.slice(0,5)=="light"&&"dark:bg-white/90 bg-background text-black"),children:[c(N,{children:[t("div",{className:f("aspect-[16/9] h-25 w-full flex items-center object-fit cursor-pointer",r.value?"":"border-[1.5px] border-dashed rounded-lg"),onClick:()=>document.querySelector(`#${r.key}`)?.click(),children:r.value?t("img",{src:P(r.value),alt:r.title,className:"h-full w-auto"}):t(o,{iconName:"IconUpload"})}),t("input",{id:r.key,hidden:!0,type:"file",accept:"image/*",onChange:u=>{i(r.key,u.target.files?.[0])}})]}),c(B,{children:[t(E,{children:r.title}),t(H,{children:r.description})]})]}))})]})},te=()=>{let{settings:e,handleChange:i}=g();return q(e,i).map(s=>t(m,{section:s}))},re=()=>{let{settings:e,handleChange:i}=g(),[s,l]=z(e?.main_color);return t(I,{children:c(N,{className:"flex items-center gap-5",children:[t(x,{title:"Color",description:"Define the primary color of the system",icon:t(o,{iconName:"IconPalette"})}),t("input",{type:"color",className:"ml-auto aspect-square w-12 h-12 cursor-pointer",value:s,onChange:r=>l(r.target.value)}),t(b,{size:"sm",variant:"ghost",onClick:()=>i("main_color",s),children:t(o,{iconName:"IconDeviceFloppy"})})]})})};import{useEffect as $,useState as v}from"react";import{useForm as se}from"@inertiajs/react";import{Fragment as ie,jsx as n,jsxs as y}from"react/jsx-runtime";var Fe=({settings:e})=>{let i=[{title:"WM Dashboard",href:route("dashboard")},{title:"Settings",href:route("dashboard.settings")},{title:"Mail Settings"}],[s,l]=v(e?.mail_mailer),[r,u]=v(h(e)),[T,_]=v(!1),[A,J]=v(!1),{recentlySuccessful:L,processing:K,errors:O,hasErrors:Q,post:V}=se();return $(()=>{l(e?.mail_mailer)},[e?.mail_mailer]),$(()=>{u(h({...e,mail_mailer:s}))},[e,s]),n(p,{settings:e,title:"Mail",breadcrumbs:i,children:y("div",{className:"grid gap-5 mx-auto px-5",children:[n(d,{title:"Mail Settings",description:"Manage mail system settings",icon:n(o,{iconName:"IconMail"})}),n(m,{section:{icon:"IconMail",title:"Mailer Driver",description:"The mailer driver to use for sending emails.",key:"mail_mailer",value:s,options:[{icon:"IconMail",title:"SMTP",description:"Use SMTP to send emails with your own email server.",value:"smtp"},{icon:"IconLogs",title:"Log",description:"It will log the emails to the system log. Dont send mails.",value:"log"}],onSave:a=>(l(a.value),u(h(e))),type:"radio"}}),y("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[r.map(a=>a.key!=="mail_mailer"&&n(G,{label:a.title,value:a.value,onChange:X=>u(r.map(C=>C.key===a?.key?{...C,value:X.target.value}:C)),placeholder:a.placeholder,icon:a.icon,type:a.type})),y("div",{className:"col-span-full",children:[y(b,{className:f("w-full items-center gap-2",T&&"animate-pulse"),variant:"outline",disabled:T,onClick:()=>{_(!0),R(r.map(a=>({key:a.key,value:a.value}))).catch(a=>J(a)).finally(()=>_(!1))},children:[n(o,{iconName:"IconDeviceFloppy"}),n("span",{children:"Save"})]}),s!=="log"&&s!=="array"&&y(ie,{children:[n(w,{className:"w-full",variant:"link",onClick:()=>V(route("dashboard.settings.mail.test")),processing:K,recentlySuccessful:L,processingText:"Testing...",successText:"Test mail sent!",children:"Send Test Mail"}),L&&!O&&n("span",{className:"text-success",children:"Test mail sent to your email address"})]}),n(M,{className:"text-center",message:A?"Failed to save mail settings":""}),n(M,{className:"text-center",message:Q?"Failed to send test mail":""})]})]})]})})};import{Fragment as oe,jsx as D,jsxs as ne}from"react/jsx-runtime";var p=({settings:e,title:i,breadcrumbs:s,children:l})=>ne(oe,{children:[D(ae,{title:i}),D(F,{breadcrumbs:s??[],children:D(U,{settings:e,children:l})})]});export{p as a,ge as b,Ne as c,Fe as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ea as r}from"./chunk-OFQZZZJO.js";import{useEffect as n,useState as a}from"react";import{jsx as i}from"react/jsx-runtime";var g=({statistics:t})=>{let[s,c]=a(t);n(()=>{c(t)},[t]);let o=[{title:"Total Users",value:String(s.total_users),icon:"IconUsers"},{title:"Active Users",value:String(s.active_users),icon:"IconUserCheck"},{title:"Pending Users",value:String(s.pending_users),icon:"IconUserSearch"},{title:"Inactive Users",value:String(s.inactive_users),icon:"IconUserX"},{title:"Blocked Users",value:String(s.blocked_users),icon:"IconUserCancel"}];return i("div",{className:"grid grid-cols-1 md:grid-cols-5 lg:grid-cols-5 gap-5",children:o.map(e=>i(r,{...e},e.title?.toString()))})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as d,da as m,ha as l,k as n}from"./chunk-
|
|
1
|
+
import{B as d,da as m,ha as l,k as n}from"./chunk-OFQZZZJO.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{a as
|
|
1
|
+
import{a as W,b as d}from"./chunk-5SCOJRW6.js";import{a as g}from"./chunk-XHQB4Q52.js";import{a as K}from"./chunk-KB7HH24O.js";import{a as q}from"./chunk-KND3PUAR.js";import{a as H}from"./chunk-3IGI4YCZ.js";import{Ca as L,Ga as z,c as D,t as U,u as A,v as w}from"./chunk-OFQZZZJO.js";import{a as R,f as _,g as M,i as B}from"./chunk-QFUZ6MVT.js";import{a as k}from"./chunk-M5QT5SFN.js";import{b as T}from"./chunk-TVCWAJFT.js";import{a as u}from"./chunk-G22OJQWL.js";import{a as f,b as y,c as h,d as b}from"./chunk-CVRMJUDO.js";import{a as l}from"./chunk-G4EEZUTC.js";import{a as C}from"./chunk-GND5KQRZ.js";import{b as i}from"./chunk-QKP3C5FM.js";import{router as $}from"@inertiajs/react";import{jsx as J}from"react/jsx-runtime";var x=()=>{let a=d(),{users:o,meta:r}=a,t=O(),m=V();return J(z,{data:o,columns:t,meta:r,handleRequest:s=>G(s,a),bulkActions:m})},G=(a,o)=>{$.get(route("dashboard.users"),{...a},{preserveState:!0,preserveScroll:!0,preserveUrl:!0,only:["users","meta"],onSuccess:r=>{o.setUsers(r.props.users),o.setMeta(r.props.meta)}})};import{Head as Q}from"@inertiajs/react";import{jsx as p,jsxs as I}from"react/jsx-runtime";var X=({users:a,roles:o,meta:r,statistics:t})=>{let m=[{title:"WM Dashboard",href:route("dashboard")},{title:"Users"}];return I(H,{breadcrumbs:m,children:[p(Q,{title:"Users"}),p(q,{title:"Users",description:"Here you can see and manage all the system users.",icon:p(l,{iconName:"IconUsers",className:"h-10 w-10 my-2"})}),I(W,{users:a,roles:o,meta:r,children:[I("div",{className:"grid gap-4",children:[p(K,{statistics:t}),p("div",{children:p(x,{})})]}),p(E,{})]})]})};import{useEffect as Y,useState as j}from"react";import{toast as S}from"sonner";import{Fragment as ee,jsx as e,jsxs as n}from"react/jsx-runtime";var F=(a,o)=>[{key:"name",label:"Name",value:a.name,type:"text",editable:!1},{key:"surname",label:"surname",value:a.surname,type:"text",editable:!1},{key:"email",label:"Email",value:a.email,editable:!1},{key:"role_code",label:"Role",value:a.role_code,type:"select",options:o.map(r=>({label:r.title,value:r.code}))},{key:"status",label:"Status",value:Number(a.status),type:"select",options:Object.entries(i).map(([r,t])=>({label:r,value:Number(t)}))},{key:"last_seen_at",label:"Last Seen At",value:a.last_seen_at?new Date(a.last_seen_at).toLocaleString():"Never",editable:!1},{key:"registered_at",label:"Registered At",value:new Date(a.created_at).toLocaleString(),editable:!1},{key:"updated_at",label:"Updated At",value:new Date(a.updated_at).toLocaleString(),editable:!1}],O=()=>{let{setSelectedUser:a,setShowUserModal:o,roles:r}=d(),[t,m]=j(!0);return Y(()=>{m(!1);let s=setTimeout(()=>m(!0),50);return()=>clearTimeout(s)},[]),[{id:"select",header:({table:s})=>e(k,{checked:s.getIsAllPageRowsSelected()||s.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:v=>s.toggleAllPageRowsSelected(!!v),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:s,table:v})=>e(k,{id:`select-row-${s.id}`,checked:s.getIsSelected(),onCheckedChange:P=>{s.toggleSelected(!!P)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"id",header:"ID",cell:({row:s})=>n("div",{className:"flex",children:[e(u,{className:"my-2 h-5 w-10",style:{display:t?"none":"block"}}),n("span",{style:{display:t?"block":"none"},children:["#",s.original.id]})]})},{accessorKey:"user",header:"User",cell:({row:s})=>n("div",{className:"flex",children:[e(u,{className:"my-2 h-5 w-10",style:{display:t?"none":"block"}}),n("div",{style:{display:t?"flex":"none"},className:"cursor-pointer",onClick:()=>{a(s.original),o(!0)},children:[e("div",{className:"flex sm:hidden",children:e(w,{user:s.original??null,settings:{showEmail:!0}})}),n("div",{className:"hidden sm:flex items-center gap-2",children:[e(U,{user:s.original,type:"square"}),e(A,{user:s.original,settings:{showId:!1}})]})]})]})},{accessorKey:"status",header:()=>n(f,{trigger:"hover",children:[e(h,{children:"Status"}),n(b,{children:[e(y,{children:"Status"}),e("span",{children:"The status of user"})]})]}),cell:({row:s})=>n(f,{trigger:"hover",children:[n(h,{children:[e(u,{className:"my-2 h-5 w-10",style:{display:t?"none":"block"}}),e("div",{style:{display:t?"block":"none"},children:s.original.status==0?e(l,{iconName:"IconPlayerPause",className:"h-4 w-4 text-primary"}):s.original.status==1?e(l,{iconName:"IconCircleCheckFilled",className:"h-4 w-4 text-green-400"}):s.original.status==2?e(l,{iconName:"IconZoom",className:"h-4 w-4 text-yellow-400"}):s.original.status==3&&e(l,{iconName:"IconBan",className:"h-4 w-4 text-red-400"})})]}),n(b,{children:[e(y,{children:"User Status"}),e("span",{children:s.original?.status==i.Inactive?"Inactive":s.original?.status==i.Active?"Active":s.original?.status==i.Pending?"Pending":"Suspended"})]})]})},{id:"role",accessorKey:"role",header:()=>n(f,{trigger:"hover",children:[e(h,{children:"Role"}),n(b,{children:[e(y,{children:"Role"}),e("span",{children:"The role of user"})]})]}),cell:({row:s})=>{let v=r.find(P=>P.code==s.original.role_code);return n(f,{trigger:"hover",isActive:s.original.role!==void 0,children:[n(h,{children:[e(u,{className:"my-2 h-5 w-10",style:{display:t?"none":"block"}}),e("div",{style:{display:t?"block":"none"},children:v?e(L,{...v}):e("span",{className:"capitalize",children:s.original.role_code})})]}),n(b,{children:[e(y,{children:"Role"}),e("span",{children:s.original.role_code})]})]})}},{id:"actions",header:()=>"Actions",cell:({row:s})=>n(ee,{children:[e(u,{className:"my-2 h-5 w-10",style:{display:t?"none":"block"}}),e("div",{style:{display:t?"flex":"none"},className:"gap-1",children:e(T,{variant:"ghost",size:"sm",onClick:()=>{console.log("test"),a(s.original),o(!0)},children:e(l,{iconName:"IconEye"})})})]})}]},V=()=>[{label:"Suspend",icon:e(l,{iconName:"IconBan",className:"h-4 w-4 mr-1"}),variant:"destructive",confirm:!0,confirmTitle:"Suspend Users",confirmContent:"Are you sure to suspend these users?",confirmIcon:e(l,{iconName:"IconCheck",size:30}),cancel:()=>S.info("Process cancelled"),action:(a,o)=>{let r=a.map(t=>t.original.id.toString());g(r,{status:i.Suspended}).then(()=>o&&o())}},{label:"Confirm",icon:e(l,{iconName:"IconCheck",className:"h-4 w-4 mr-1"}),variant:"outline",confirm:!0,confirmTitle:"Confirm Users",confirmContent:"Are you sure to confirm these users?",confirmIcon:e(l,{iconName:"IconCheck",size:30}),cancel:()=>S.info("Process cancelled"),action:(a,o)=>{let r=a.map(t=>t.original.id.toString());g(r,{status:i.Active}).then(()=>o&&o())}},{label:"Disable",icon:e(l,{iconName:"IconPlayerPause",className:"h-4 w-4 mr-1"}),variant:"outline",confirm:!0,confirmTitle:"Make Users Inactive",confirmContent:"Are you sure to make these users inactive?",confirmIcon:e(l,{iconName:"IconCheck",size:30}),cancel:()=>S.info("Process cancelled"),action:(a,o)=>{let r=a.map(t=>t.original.id.toString());g(r,{status:i.Inactive}).then(()=>o&&o())}}];import{jsx as c,jsxs as N}from"react/jsx-runtime";var E=()=>{let{selectedUser:a,showUserModal:o,setShowUserModal:r}=d();return c(R,{open:o,onOpenChange:r,children:N(_,{className:"max-h-[90vh] sm:max-w-[50vw] grid !gap-4 overflow-auto",children:[c(M,{className:"pb-4 border-b shrink-0",children:N(B,{children:["Details of ",a?.name]})}),c(Z,{})]})})},Z=()=>{let{selectedUser:a,roles:o}=d();if(!a)return;let r=F(a,o);return N("div",{className:"grid md:grid-cols-[200px_auto] gap-5",children:[c("div",{className:"flex items-center gap-4",children:c(U,{user:a,type:"square",className:"h-full w-full"})}),c("div",{className:"grid grid-cols-2 gap-y-3",children:r.map(t=>N("div",{className:C("flex flex-col items-start justify-start",t.value?.toString()?.length>30?"col-span-2":""),children:[c("p",{className:"text-sm text-muted-foreground capitalize",children:t?.label}),c(D,{item:t,onChange:(m,s)=>g([a.id.toString()],{[m]:s}),children:t.key==="status"?t.value==i.Inactive?c("span",{className:"text-sm text-primary",children:"Inactive"}):t.value==i.Active?c("span",{className:"text-sm text-green-400",children:"Active"}):t.value==i.Pending?c("span",{className:"text-sm text-yellow-400",children:"Pending"}):t.value==i.Suspended&&c("span",{className:"text-sm text-red-400",children:"Suspended"}):c("span",{className:"text-sm",children:t?.value??"-"})},t.key)]},t.key))})]})};export{E as a,Z as b,x as c,X as d,F as e,O as f,V as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l,ua as v,y as h}from"./chunk-
|
|
1
|
+
import{a as l,ua as v,y as h}from"./chunk-OFQZZZJO.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,2 +1,2 @@
|
|
|
1
|
-
import{a as A,b as p}from"./chunk-
|
|
1
|
+
import{a as A,b as p}from"./chunk-G54HADDZ.js";import{a as O,b as f,c as y,d as V,e as R,f as U}from"./chunk-X5PHT6XR.js";import{c as x,h as I}from"./chunk-XFR4DFQ4.js";import{a as F}from"./chunk-3IGI4YCZ.js";import{g as k}from"./chunk-OFQZZZJO.js";import{a as E}from"./chunk-QKGQOXDM.js";import{a as B,f as L,j as _}from"./chunk-QFUZ6MVT.js";import{a as z}from"./chunk-3DBYUBWW.js";import{a as b}from"./chunk-65LRDGYI.js";import{b as d}from"./chunk-TVCWAJFT.js";import{a as m}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 M,IconUsersGroup as ne,IconX as ie}from"@tabler/icons-react";import{Fragment as ce,jsx as n,jsxs as N}from"react/jsx-runtime";var fe=({packages:a,marketPackages:t,meta:c,account:r,error:i})=>n(F,{breadcrumbs:[{icon:"IconBuildingStore",title:"Marketplace"}],children:n(A,{packages:a,marketPackages:t,account:r??null,meta:c,error:i,children:N("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 N(ce,{children:[t&&t?.length>0&&N("div",{className:"grid gap-7",children:[n(b,{title:"Official Packages",description:"Explore the Emin Tech's official packages.",icon:"IconStar",buttons:n(d,{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(C,{pkg:r}))})]}),c&&c.length>0&&N("div",{className:"grid gap-7",children:[n(b,{title:"Community Packages",description:"These community packages have been quality-checked and are fully compatible.",icon:"IconUsers",buttons:n(d,{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(C,{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(m,{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"})]})},C=({pkg:a,className:t})=>{let{setSelectedPackage:c,setIsDetailModalOpen:r}=p(),{packages:i}=x(),g=i.find(h=>h.code===a.code)??null;return s(z,{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(I,{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:[g?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(J,{pkg:a})})]})},$=()=>{let{isDetailModalOpen:a,setIsDetailModalOpen:t,selectedPackage:c}=p(),{packages:r}=x();if(!a||!c)return;let i=r.find(g=>g.code===c.code)??null;return e(B,{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(_,{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(I,{pkg:{...c,is_custom:!1},className:"text-sm flex items-center gap-2",size:20}),e(de,{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(J,{pkg:c}),y(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(m,{iconName:"IconPackage",className:"shrink-0 w-full"}),e("span",{className:"font-bold truncate",children:a.name})]}),Ue=({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: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(M,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(M,{className:"h-[18px] w-[18px] shrink-0 text-yellow-500"}),e(M,{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(m,{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(m,{iconName:"IconCalendar",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",new Date(a.updated_at??"").toLocaleDateString()??"-"]})]}),de=({pkg:a,text:t="Core Requirement:",className:c})=>s("div",{className:o("flex items-center gap-2",c),children:[e(m,{iconName:"IconInfoCircle",className:"shrink-0 w-5 h-5"}),s("span",{children:[t,"\xA0",f(a)?.core_constraint??"-"]})]}),J=({pkg:a,className:t})=>{let{packages:c,setProcess:r,setPackageManifest:i,setIsLoading:g,setIsModalOpen:h,setValidationError:Q}=x(),Z=c.find(l=>l.code===a.code)??null,D=f(a),u=y(a,Z),{post:ee,setData:ae,recentlySuccessful:v,processing:P}=le(),se=()=>(g(!0),h(!0),new Promise(l=>ee(route("dashboard.packages.manager"),{onSuccess:()=>l(!0),onError:S=>{l(S),Q(Object.values(S).join(`
|
|
2
2
|
`))}}))),w=l=>{r(l),i(V(a,f(a).version)),ae({process:l,manifest:{code:a.code,version:D.version,core_constraint:D.core_constraint}}),se()};return u==="buy"?e("a",{href:R(a),target:"_blank",rel:"noopener noreferrer",children:s(d,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),children:[e(m,{iconName:a.price?"IconCreditCardPay":"IconMoodHappy",className:"shrink-0 w-5 h-5"}),e("span",{children:a.price?a.price+"$":"Get It Free"})]})}):u==="install"?s(k,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>w("install"),recentlySuccessful:v,processing:P,children:[e(re,{className:"shrink-0 w-5 h-5"}),e("span",{children:"Install"})]}):u=="uninstall"?s(k,{size:"sm",variant:"destructive",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>w("uninstall"),recentlySuccessful:v,processing:P,children:[e(ie,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Uninstall"})]}):u=="update"?s(k,{size:"sm",variant:"outline",className:o("col-span-full w-full flex items-center gap-2",t),onClick:()=>w("update"),recentlySuccessful:v,processing:P,children:[e(oe,{className:"w-5 h-5 shrink-0"}),e("span",{children:"Update"})]}):s(d,{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,C as b,$ as c,X as d,Ue as e,K as f,Y as g,j as h,me as i,de as j,J as k,fe as l,te as m};
|