@emintech/core 0.8.6 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2RDTNW5J.js +1 -0
- package/dist/{chunk-WD7FUMEI.js → chunk-3E62GAJ5.js} +1 -1
- package/dist/{chunk-HZVHIJJY.js → chunk-3ZSQL2FG.js} +1 -1
- package/dist/{chunk-JN47FIUF.js → chunk-4BF2G3HA.js} +1 -1
- package/dist/chunk-5OOSKZ2A.js +1 -0
- package/dist/chunk-5SCOJRW6.js +1 -0
- package/dist/chunk-6NZQLO4H.js +2 -0
- package/dist/chunk-6Q54CGSV.js +1 -0
- package/dist/{chunk-FATDDXFE.js → chunk-7OPUQ2NO.js} +1 -1
- package/dist/{chunk-YU4IH7J6.js → chunk-AAYQMXGF.js} +1 -1
- package/dist/chunk-AEPKG2NX.js +3 -0
- package/dist/chunk-AG4EHKB7.js +1 -0
- package/dist/chunk-BCQVYKF6.js +1 -0
- package/dist/{chunk-KTO3FKGZ.js → chunk-C7BLCBBU.js} +1 -1
- package/dist/chunk-D5ORVBB6.js +1 -0
- package/dist/{chunk-KYNCXEGC.js → chunk-GJ3Z7ZV5.js} +1 -1
- package/dist/chunk-GYMXN7BF.js +1 -0
- package/dist/chunk-HGOBNKGK.js +1 -0
- package/dist/chunk-IDXLUHHA.js +1 -0
- package/dist/chunk-MQQ7W7QI.js +1 -0
- package/dist/chunk-OS5YYRGY.js +1 -0
- package/dist/chunk-PVEMGAU6.js +1 -0
- package/dist/{chunk-3MGLNOJ3.js → chunk-PWQOU5TI.js} +1 -1
- package/dist/chunk-QKP3C5FM.js +1 -0
- package/dist/{chunk-B4FQFQOO.js → chunk-RAUR55QN.js} +1 -1
- package/dist/{chunk-L4TSYLY2.js → chunk-RJQGKBW5.js} +1 -1
- package/dist/chunk-SC5FEULM.js +1 -0
- package/dist/chunk-SNPTKUE5.js +2 -0
- package/dist/{chunk-H46XE7EE.js → chunk-VDWGKLE7.js} +1 -1
- package/dist/{chunk-R7O5BURF.js → chunk-WUFYLSW5.js} +1 -1
- package/dist/chunk-X5PHT6XR.js +1 -0
- package/dist/chunk-XHQB4Q52.js +1 -0
- package/dist/{chunk-EM2YQHLL.js → chunk-XOU4MLVF.js} +1 -1
- package/dist/chunk-Y7U6EVDQ.js +1 -0
- package/dist/{chunk-G4NK34VB.js → chunk-YGU7VNF7.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/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.d.ts +1 -1
- package/dist/features/marketplace/context/MarketplaceContext.js +1 -1
- package/dist/features/marketplace/index.js +1 -1
- package/dist/features/marketplace/lib/marketplace-utils.d.ts +2 -2
- package/dist/features/marketplace/lib/marketplace-utils.js +1 -1
- package/dist/features/marketplace/pages/IndexMarketplacePage.js +1 -1
- package/dist/features/marketplace/types/marketplace.types.d.ts +14 -22
- package/dist/features/notifications/components/EminNotification.d.ts +2 -1
- package/dist/features/notifications/components/EminNotification.js +1 -1
- package/dist/features/notifications/context/NotificationsContext.d.ts +4 -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.d.ts +8 -0
- package/dist/features/package-manager/shared/hooks/use-package-version-selector.js +1 -0
- package/dist/features/package-manager/shared/index.d.ts +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/shared/types/package-manager.types.d.ts +9 -0
- package/dist/features/package-manager/shared/types/package-manager.types.js +1 -0
- package/dist/features/package-manager/updater/api/updater.api.d.ts +7 -7
- package/dist/features/package-manager/updater/api/updater.api.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/package-manager/updater/lib/updater-service.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/packages/types/packages.types.d.ts +6 -2
- package/dist/features/platform/components/PlatformComponents.d.ts +0 -1
- package/dist/features/platform/components/PlatformComponents.js +1 -1
- package/dist/features/platform/components/PlatformPageComponents.d.ts +2 -2
- package/dist/features/platform/components/PlatformPageComponents.js +1 -1
- package/dist/features/platform/index.js +1 -1
- package/dist/features/platform/lib/platform-formatter.d.ts +0 -3
- package/dist/features/platform/lib/platform-formatter.js +1 -1
- package/dist/features/platform/pages/IndexPlatformPage.js +1 -1
- package/dist/features/platform/types/platform.types.d.ts +2 -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.d.ts +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/api/users.api.d.ts +1 -0
- package/dist/features/users/api/users.api.js +1 -0
- package/dist/features/users/components/UserModal.js +1 -1
- package/dist/features/users/components/UsersPage.d.ts +3 -2
- 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/context/UsersContext.d.ts +5 -2
- package/dist/features/users/context/UsersContext.js +1 -1
- package/dist/features/users/index.d.ts +1 -0
- package/dist/features/users/index.js +1 -1
- package/dist/features/users/lib/users-formatter.d.ts +4 -3
- 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.d.ts +3 -2
- 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.js +1 -1
- package/dist/shared/components/composite/EminFormButton.js +1 -1
- package/dist/shared/components/composite/EminInput.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/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/QuickMenu/quick-menu-utils.js +1 -1
- package/dist/shared/components/composite/RoleBadge.d.ts +2 -10
- 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.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/sidebar.js +1 -1
- package/dist/shared/components/ui/slider.js +1 -1
- package/dist/shared/components/ui/team-switcher.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/dist/shared/types/index.d.ts +11 -0
- package/dist/shared/types/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2GVRXCFU.js +0 -1
- package/dist/chunk-37TRFDA4.js +0 -1
- package/dist/chunk-6POIVEDA.js +0 -1
- package/dist/chunk-7UAWAQIK.js +0 -1
- package/dist/chunk-7VMEGPPO.js +0 -1
- package/dist/chunk-AGX2N7HI.js +0 -1
- package/dist/chunk-B22UA2KA.js +0 -1
- package/dist/chunk-DWAU5VTB.js +0 -1
- package/dist/chunk-E5TMX3GR.js +0 -1
- package/dist/chunk-EABDMJDG.js +0 -1
- package/dist/chunk-FAHSY2DO.js +0 -1
- package/dist/chunk-JW53YYMS.js +0 -1
- package/dist/chunk-MFPLHKIJ.js +0 -1
- package/dist/chunk-QEQYOW5R.js +0 -1
- package/dist/chunk-RCUM5ZGQ.js +0 -1
- package/dist/chunk-RY6OUBHE.js +0 -1
- package/dist/chunk-UUF3H3EU.js +0 -1
- package/dist/chunk-WQ53I46F.js +0 -1
- package/dist/chunk-YHEAFMGX.js +0 -1
- package/dist/features/package-manager/shared/api/package-manager.api.d.ts +0 -1
- package/dist/features/package-manager/shared/api/package-manager.api.js +0 -1
- package/dist/features/platform/api/platform.api.js +0 -0
- /package/dist/{features/platform/api/platform.api.d.ts → chunk-BRXJM2GG.js} +0 -0
package/dist/chunk-UUF3H3EU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as he}from"./chunk-FAHSY2DO.js";import{a as xe}from"./chunk-YHEAFMGX.js";import{a as K}from"./chunk-Z6APYDZ7.js";import{a as Pe}from"./chunk-KND3PUAR.js";import{a as fe}from"./chunk-R7O5BURF.js";import{a as ve}from"./chunk-EABDMJDG.js";import{a as ke}from"./chunk-L37X7O6L.js";import{Ca as ge,Ea as ue,b as $,g as me}from"./chunk-7VMEGPPO.js";import{a as de}from"./chunk-7NKFSFMC.js";import{a as q,f as W,g as J,h as pe,i as T,j as E}from"./chunk-QFUZ6MVT.js";import{a as ae}from"./chunk-M5QT5SFN.js";import{b as x}from"./chunk-TVCWAJFT.js";import{a as Z}from"./chunk-G22OJQWL.js";import{a as L,c as U,d as R}from"./chunk-PRCYNFKC.js";import{a as i}from"./chunk-G4EEZUTC.js";import{a as ee}from"./chunk-GND5KQRZ.js";import{router as ka}from"@inertiajs/react";import{Fragment as Je,jsx as I,jsxs as te}from"react/jsx-runtime";var Ne=()=>{let{isModalOpen:e,setIsModalOpen:a,isLoading:o,process:s,step:n,isCustom:d,setStep:t,setValidationError:l}=f(),c=d()?"custom":"market",g=o?"loading":`${c}-${s}-${n}`,u=be(g);return I(q,{open:e,onOpenChange:a,children:te(W,{className:"max-h-[90vh] overflow-auto break-all min-w-[50vh] max-w-[75vh] w-auto",children:[I(J,{children:!o&&(u.title||u.description)&&te(Je,{children:[I(T,{className:"text-base text-lg",children:u.title}),I(E,{className:"text-sm",children:u.description}),I("hr",{})]})}),u.content,I(pe,{children:n>1&&!o&&I("div",{className:"grid mx-auto",children:te(x,{variant:"link",size:"sm",className:"flex items-center gap-1",onClick:()=>{t(n-1),l("")},children:[I(i,{iconName:"IconArrowLeft",className:"h-4 w-4"}),"Back"]})})})]})})};import{createContext as Ke,useContext as Ye,useEffect as oe,useState as y}from"react";import{jsx as Ge,jsxs as Qe}from"react/jsx-runtime";var ye=Ke({}),Ce=({children:e,packages:a,process:o="install",step:s=1,isValid:n=!1,is_custom:d=!1})=>{let t={title:"Loading",description:"Please wait while we process your request."},[l,c]=y(a),[g,u]=y(o),[k,M]=y(!1),[v,B]=y(s),[S,V]=y(null),[w,b]=y(null),[_,H]=y(n),[Ze,ie]=y(""),[$e,ce]=y(!1),[qe,X]=y(t),j=ve();oe(()=>{k||setTimeout(()=>{B(1),u(o),V(null),b(null),H(!1),ce(!1),ie(""),X(t)},250)},[k]),oe(()=>{!w||!j||Object.values(j).forEach(O=>{O?.jobCode===`${w.code}_${g}`&&X({title:O.title,description:O.description,progress:O.progress,error:O.status==="failed"})})},[j]),oe(()=>{c(a)},[a]);let le=()=>w?.is_custom===!1,We={packages:l,setPackages:c,process:g,setProcess:u,isModalOpen:k,setIsModalOpen:M,step:v,setStep:B,selectedFile:S,setSelectedFile:V,packageManifest:w,setPackageManifest:b,isValid:_,setIsValid:H,validationError:Ze,setValidationError:ie,isLoading:$e,setIsLoading:ce,loadingContent:qe,setLoadingContent:X,isOfficial:le,isCustom:()=>!le()};return Qe(ye.Provider,{value:We,children:[e,Ge(Ne,{})]})},f=()=>{let e=Ye(ye);if(!e)throw new Error("PackageManagerContext must be used within a PackageManagerProvider");return e};import{Fragment as Me,jsx as h,jsxs as Y}from"react/jsx-runtime";var be=e=>{let{loadingContent:a,validationError:o}=f(),s={title:a.title,description:a.description,content:Y(Me,{children:[h("div",{className:"animate-spin rounded-full h-15 w-15 border-b-2 border-primary mx-auto"}),Y("div",{className:"text-center",children:[h(T,{className:"text-base text-lg",children:a.title}),h(E,{className:"text-sm",children:a.description}),a.progress&&Y(Me,{children:[h(ke,{value:a.progress,className:"my-2"}),"%",a.progress]}),a.error&&h(E,{className:"text-red-500 text-sm",children:a.error})]})]})},n={title:null,description:null,content:Y("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500",children:[h(i,{iconName:"IconExclamationCircleFilled",className:"text-red-500 h-15 w-15 mx-auto"}),h("span",{className:"text-2xl font-bold",children:"Error"}),h("span",{className:"text-sm text-muted-foreground",children:o})]})};if(o)return n;if(e=="loading")return s;let d=Ie(),t=De(),[l,c,g]=e.split("-"),u=l,k=c,M=Number(g);return{custom:{install:{1:d.selectInstallationMethod,2:d.uploadPackageZipFile,3:d.customInstallSummary()},update:{1:d.uploadPackageZipFile,2:t.updateSummary()}},market:{update:{1:t.updateSummary()}}}[u]?.[k]?.[M]??d.selectInstallationMethod},we=e=>[{key:"code",value:h("span",{className:"",children:e.code??"\u2014"})},{key:"version",value:h("span",{children:e?.version??"\u2014"})},{key:"author",value:h("span",{children:e?.author??"\u2014"})},{key:"source",value:h("span",{className:"text-orange-400",children:"Custom"})}];import{unzip as Xe}from"fflate";import{toast as je}from"sonner";var ea=e=>new Promise((a,o)=>{Xe(e,(s,n)=>{if(s)return o(new Error("ZIP file is corrupted"));a(n)})}),Ee=async e=>{let{process:a,selectedFile:o,setIsLoading:s,step:n,setStep:d,setPackageManifest:t,setValidationError:l,setIsValid:c,packages:g,setLoadingContent:u}=e;try{if(!o)throw new Error("Please select a file.");if(s(!0),u({title:"Package Verifying",description:"Please wait while we verify the package."}),o.size>100*1024*1024)throw new Error("File should be less than 100MB");let k=new Uint8Array(await o.arrayBuffer()),M=await ea(k);if(!M["emincore.json"])throw new Error("Manifest (emincore.json) has not been found in the ZIP file.");let v=JSON.parse(new TextDecoder().decode(M["emincore.json"]));t(v);let S=["code","name","version","description","author","core_constraint"].filter(b=>v[b]==null||v[b]==="");if(S.length)throw new Error("Manifest is missing required fields: "+S.join(", "));let V=v.composer_package&&v.composer_package_version,w=v.npm_package&&v.npm_package_version;if(!V&&!w)throw new Error("Package must has at least one of composer package or npm package.");if(a=="update"){let b=he(g.find(_=>_.code==v?.code),v);if(typeof b=="string")throw new Error(b)}c(!0)}catch(k){throw je.error(String(k)),l(String(k)),c(!1),k}finally{d(n+1),s(!1)}};import{router as ga,useForm as ua}from"@inertiajs/react";import{useState as aa,useEffect as ta}from"react";import{Fragment as se,jsx as m,jsxs as D}from"react/jsx-runtime";var ne=({pkg:e,showBadge:a=!0,showBadgeTitle:o=!0,className:s})=>D("div",{className:ee("flex items-center gap-1",s),children:[m("span",{className:"font-medium",children:e?.name||e?.code}),a&&m(oa,{pkg:e,showBadgeTitle:o})]}),oa=({pkg:e,showBadgeTitle:a=!0,className:o,size:s=18})=>m("div",{className:ee("flex items-center gap-1",o),children:e?.is_custom===!1?e.code.slice(0,8)==="emintech"?D(se,{children:[m(i,{iconName:"IconCertificate",className:"text-cyan-600 dark:text-cyan-400",size:s}),a&&m("span",{className:"font-medium text-cyan-600 dark:text-cyan-400",children:"Official"})]}):D(se,{children:[m(i,{iconName:"IconRosetteDiscountCheckFilled",className:"text-emerald-600 dark:text-emerald-400",size:s}),a&&m("span",{className:"font-medium text-emerald-600 dark:text-emerald-400",children:"Verified"})]}):D(se,{children:[m(i,{iconName:"IconInfoCircleFilled",className:"text-slate-500 dark:text-slate-400",size:s}),a&&m("span",{className:"font-medium text-slate-500 dark:text-slate-400",children:"Unverified"})]})}),rt=({statistics:e})=>{let[a,o]=aa(e);ta(()=>{o(e)},[e]);let s=[{title:"Total Packages",subtext:"Total packages counts",value:String(a.total_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Enabled Packages",subtext:"Enabled packages counts",value:String(a.enabled_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Disabled Packages",subtext:"Disabled packages counts",value:String(a.disabled_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})},{title:"Need Update",subtext:"Packages need update counts",value:String(a?.need_update_packages),icon:m(i,{iconName:"IconFilter",className:"h-4 w-4 text-muted-foreground"})}];return m("div",{className:"grid grid-cols-1 md:grid-cols-4 lg:grid-cols-4 gap-6 mb-8",children:s.map(n=>m(ge,{...n},n.title?.toString()))})},F=({pkg:e,details:a})=>{let o=a??Ve(e);return D("div",{className:"space-y-4",children:[D("div",{className:e?.image?"grid gap-3":"flex items-center gap-3",children:[e?.image?m("div",{className:"w-full h-auto rounded-lg aspect-[16/9] shadow-sm",style:{backgroundImage:`url(${e.image})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}):m(i,{iconName:"IconPackage",className:"h-7 w-7 text-muted-foreground shrink-0"}),D(J,{children:[m(T,{className:"text-base",children:e?.name?m(ne,{pkg:e}):e.code}),m(E,{className:"text-xs",children:e?.description??"No description"})]})]}),m("hr",{}),m("div",{className:"space-y-3 text-sm",children:o.map(s=>D("div",{className:"flex justify-between",children:[m("span",{className:"text-muted-foreground capitalize",children:s.key}),s.value]},s.key))})]})},Se=({isModalOpen:e,setIsModalOpen:a,package:o,details:s})=>m(q,{open:e,onOpenChange:a,children:m(W,{className:"sm:max-w-md",children:m(F,{pkg:o,details:s})})});import{Fragment as sa,jsx as G,jsxs as _e}from"react/jsx-runtime";var Te=()=>{let{packages:e,selectedPackage:a,isDetailsModalOpen:o,setIsDetailsModalOpen:s}=Q(),{setIsModalOpen:n,setProcess:d,setStep:t}=f(),l=Ae(),c=Fe();return _e(sa,{children:[_e(x,{size:"sm",variant:"outline",className:"mb-4 flex items-center gap-2",onClick:()=>{n(!0),d("install"),t(1)},children:[G(i,{iconName:"IconUpload"}),G("span",{children:"Install Package"})]}),G(ue,{columns:c,data:e,bulkActions:l}),a&&G(Se,{isModalOpen:o,setIsModalOpen:s,package:a})]})};import{router as na,useHttp as ra}from"@inertiajs/react";import{useEffect as ia,useState as ca}from"react";import{toast as Be}from"sonner";import{Fragment as Oe,jsx as r,jsxs as C}from"react/jsx-runtime";var Fe=()=>{let[e,a]=ca(!0);ia(()=>{a(!1);let t=setTimeout(()=>a(!0),50);return()=>clearTimeout(t)},[]);let{setSelectedPackage:o,setIsDetailsModalOpen:s}=Q(),n=f(),d=ra({process:"check-update",packageCode:n.packageManifest?.code||""});return[{id:"select",header:({table:t})=>r(ae,{checked:t.getIsAllPageRowsSelected()||t.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:l=>t.toggleAllPageRowsSelected(!!l),"aria-label":"T\xFCm\xFCn\xFC se\xE7"}),cell:({row:t})=>r(ae,{id:`select-row-${t.id}`,checked:t.getIsSelected(),onCheckedChange:l=>{t.toggleSelected(!!l)},"aria-label":"Sat\u0131r se\xE7"}),enableSorting:!1,enableHiding:!1},{accessorKey:"package",header:"Package",cell:({row:t})=>C("div",{className:"flex items-center gap-5 cursor-pointer",onClick:()=>{o(t.original),s(!0)},children:[r(Z,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),C("span",{style:{display:e?"flex":"none"},className:"items-center gap-3",children:[r(i,{iconName:"IconPackage",className:"h-7 my-2 cursor-pointer"}),C("div",{className:"flex flex-col",children:[r("div",{className:"flex items-center gap-1",children:r(ne,{pkg:t.original})}),r("span",{className:"text-muted-foreground text-xs",children:t.original.description?t.original.description.length>61?t.original?.description?.slice(0,60)+"...":t.original?.description:"No description"}),r("span",{className:"text-muted-foreground text-xs",children:t.original?.version})]})]})]})},{accessorKey:"is_active",header:()=>C(L,{trigger:"hover",children:[r(U,{children:"Status"}),r(R,{className:"w-auto",children:"Is the package enabled?"})]}),cell:({row:t})=>C(Oe,{children:[r(Z,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),r("div",{style:{display:e?"block":"none"},children:r(de,{checked:t.original.is_active,onCheckedChange:l=>{K([t.original.id],{is_active:l})}})})]})},{accessorKey:"actions",header:()=>C(L,{trigger:"hover",children:[r(U,{children:"Actions"}),r(R,{className:"w-auto",children:"Actions of the package"})]}),cell:({row:t})=>C(Oe,{children:[r(Z,{className:"my-2 h-5 w-10",style:{display:e?"none":"block"}}),C("div",{style:{display:e?"flex":"none"},className:"gap-2",children:[C(L,{trigger:"hover",children:[r(U,{children:r($,{title:"Uninstall Package",content:"Are you sure to uninstall this package?",onConfirm:()=>{na.post(route("dashboard.packages.manager"),{process:"uninstall",packageCode:t.original.code})},children:r(x,{variant:"outline",size:"sm",className:"flex items-center",disabled:t.original.is_active,children:r(i,{iconName:"IconTrash",className:"h-4 w-4"})})})}),r(R,{children:t.original.is_active?"Disable Package First":"Uninstall Package"})]}),C(L,{trigger:"hover",children:[r(U,{children:r(x,{variant:"outline",size:"sm",className:"flex items-center",onClick:()=>{let l=t.original;n.setPackageManifest(l),n.setProcess("update"),n.setIsModalOpen(!0),l.is_custom||(n.setIsLoading(!0),d.setData({process:"check-update",packageCode:l.code}),xe(n,d).then(c=>{if(typeof c=="boolean"&&c===!0)n.setLoadingContent({title:`${l.name} is up to date`,description:"No updates available"});else{let g=c;n.setPackageManifest({...g,is_custom:!1}),n.setStep(1),n.setIsLoading(!1)}}))},children:r(i,{iconName:"IconRefresh",className:"h-4 w-4"})})}),r(R,{children:t.original.is_custom?"Update Package":"Check Updates"})]})]})]})}]},Ae=()=>[{label:"Enable",icon:r(i,{iconName:"IconCheck",className:"h-4 w-4 mr-1"}),variant:"outline",confirm:!0,confirmTitle:"Enable Packages",confirmContent:"Are you sure to enable these packages?",confirmIcon:r(i,{iconName:"IconCheck",size:30}),cancel:()=>{Be.info("Process cancelled")},action:(e,a)=>{let o=e.map(s=>s.original.id);K(o,{is_active:!0},s=>s&&a&&a())}},{label:"Disable",icon:r(i,{iconName:"IconCreativeCommonsNd",className:"h-4 w-4 mr-1"}),variant:"destructive",confirm:!0,confirmTitle:"Disable Packages",confirmContent:"Are you sure to disable these packages?",confirmIcon:r(i,{iconName:"IconCreativeCommonsNd",size:30}),cancel:()=>{Be.info("Process cancelled")},action:(e,a)=>{let o=e.map(s=>s.original.id);K(o,{is_active:!1},s=>{s&&a&&a()})}}],Ve=e=>[{key:"code",value:r("span",{className:"",children:e.code??"\u2014"})},{key:"version",value:r("span",{children:e?.version??"\u2014"})},{key:"author",value:r("span",{children:e?.author??"\u2014"})},{key:"source",value:r("span",{className:e?.is_custom!==!1?"text-orange-400":"text-green-600",children:e?.is_custom!==!1?"Custom":"Marketplace"})},{key:"status",value:r("span",{className:e?.is_active?"text-green-600":"text-destructive",children:e?.is_active?"Enabled":"Disabled"})},{key:"installed at",value:r("span",{children:e?.created_at?new Date(e.created_at).toLocaleDateString():"\u2014"})},{key:"last updated at",value:r("span",{children:e?.updated_at?new Date(e.updated_at).toLocaleDateString():"\u2014"})}];import{createContext as la,useContext as da,useEffect as ma,useState as re}from"react";import{jsx as Le}from"react/jsx-runtime";var Ue=la({}),Re=({packages:e,children:a})=>{let[o,s]=re(e),[n,d]=re(null),[t,l]=re(!1);ma(()=>{s(e)},[e]);let c={packages:o,setPackages:s,selectedPackage:n,setSelectedPackage:d,isDetailsModalOpen:t,setIsDetailsModalOpen:l};return Le(Ce,{packages:o,children:Le(Ue.Provider,{value:c,children:a})})},Q=()=>{let e=da(Ue);if(!e)throw new Error("usePackagesContext must be used within a PackagesProvider");return e};import{Head as pa}from"@inertiajs/react";import{jsx as z,jsxs as ze}from"react/jsx-runtime";var zt=({packages:e})=>{let a=[{title:"WM Dashboard",href:route("dashboard")},{title:"Packages",href:"#"}];return ze(fe,{breadcrumbs:a,children:[z(pa,{title:"Packages"}),ze("div",{className:"container mx-auto",children:[z(Pe,{title:"Packages",description:"Here you can see and manage all the system packages.",icon:z(i,{iconName:"IconLink",className:"h-10 w-10 my-2 opacity-75"})}),z(Re,{packages:e,children:z(Te,{})})]})]})};import{Fragment as He,jsx as p,jsxs as P}from"react/jsx-runtime";var Ie=()=>{let{process:e,setStep:a,selectedFile:o,setSelectedFile:s,isValid:n,packageManifest:d,validationError:t}=f(),l=f();return{selectInstallationMethod:{title:"Select Installation Method",description:"Choose whether to install the package from a file or a URL.",content:P("div",{className:"grid grid-cols-2 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>a(2),children:[p(i,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Manual Upload"}),p("p",{className:"text-sm",children:"Upload your custom package file"})]}),P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer hover:border-gray-400 transition-colors",onClick:()=>ga.get(route("dashboard.packages.marketplace")),children:[p(i,{iconName:"IconShoppingBag",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Marketplace"}),p("p",{className:"text-sm",children:"Browse and install from marketplace"})]})]})},uploadPackageZipFile:{title:o?"Verify Package File":"Upload Package File",description:o?"Verify the package file to ensure it is valid.":"Upload your custom package file (.zip)",content:P("div",{className:"grid grid-cols-1 gap-2",children:[P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer border-dashed "+(o?"border-gray-400 text-primary":"text-muted-foreground hover:border-gray-400 hover:text-primary transition-colors"),onDrop:c=>{c.preventDefault();let g=c.dataTransfer.files;if(g.length>0){s(g[0]);return}},onClick:()=>document.querySelector('input[type="file"]')?.click(),onDragOver:c=>c.preventDefault(),children:[o?P("div",{children:[p(i,{iconName:"IconFileTypeZip",className:"h-12 w-12 mx-auto mb-3"}),p("div",{className:"flex items-center justify-center gap-2",children:p("span",{className:"text-sm",children:o.name})})]}):P(He,{children:[p(i,{iconName:"IconUpload",className:"h-12 w-12 mx-auto mb-3"}),p("h3",{className:"font-semibold mb-1",children:"Upload Package"}),P("p",{className:"text-sm",children:["Drag and drop or ",p("span",{className:"text-primary cursor-pointer",children:"choose file"})," to upload"]})]}),p("input",{type:"file",className:"hidden",onChange:c=>{c?.target?.files&&c.target.files.length>0&&(s(c.target.files[0]),c.target.files=null)}})]}),o&&P(He,{children:[P(x,{variant:"link",size:"sm",className:"w-full flex items-center",onClick:()=>s(null),children:[p(i,{iconName:"IconTrash",className:"h-4 w-4 text-muted-foreground cursor-pointer"}),"Delete"]}),p(x,{className:"w-full",variant:"outline",onClick:()=>Ee(l),children:"Verify Package"})]})]})},customInstallSummary:()=>{let{packages:c,setIsLoading:g}=f(),u=c.find(b=>b.code==d?.code)??!1,k=u!==!1,M=n?"Package Verified":"Package Not Verified",v=n?"Your package documents are valid. You can install it now.":"Your package is not verified. Please contact the package author for more information.",{post:B,recentlySuccessful:S,processing:V}=ua({process:e,packageCode:d?.code,version:d?.version,packageZip:o??null}),w=()=>{g(!0);let b=new Promise(_=>B(route("dashboard.packages.manager"),{onSuccess:()=>_(!0),onError:H=>_(H)}))};return{title:M,description:v,content:n&&d?P("div",{className:"border-2 rounded-lg p-6 text-center cursor-pointer text-muted-foreground text-primary transition-colors",children:[p(F,{pkg:d,details:we(d)}),P("div",{className:"mt-4",children:[p($,{title:e=="install"?"Confirm Installation":"Confirm Update",content:p("div",{className:"!text-center",children:"This package has passed basic manifest validation only. This does not guarantee safety or full compatibility. Only proceed if you are absolutely certain of its origin and trust the source."}),confirmText:e=="install"?"Confirm and Install":"Confirm and Update",onConfirm:w,children:k?p(x,{className:"w-full",variant:"outline",disabled:!0,children:"Installed"}):P(me,{recentlySuccessful:S,processing:V,children:[p(i,{iconName:e=="install"?"IconDownload":"IconRefresh"}),p("span",{children:e=="install"?"Install Package":"Update Package"})]})}),k&&P("div",{className:"text-red-500 my-3",children:[u.code," - ",u.version," already exists."]})]})]}):p("div",{children:t??"An error occurred while verifying the package. Please contact the package author for more information."})}}}};import{Fragment as fa,jsx as N,jsxs as A}from"react/jsx-runtime";var De=()=>{let{packages:e,packageManifest:a,validationError:o,isCustom:s}=f();return{updateSummary:()=>{let n="Package Updates",d="Here are the latest updates for this package.",t=e.find(g=>g.code===a?.code),l=a,c=l?.version!=t?.version;return!c&&t?.is_custom===!1&&(n=d=null),{title:n,description:d,content:N(fa,{children:!c&&t?.is_custom===!1?A("div",{className:"grid gap-2 justify-center text-center animate-in fade-in duration-500 !border-none",children:[N(i,{iconName:"IconCircleCheckFilled",className:"text-green-500 h-15 w-15 mx-auto"}),A("span",{className:"text-2xl font-bold",children:[t.name," is up to date!"]}),N("span",{className:"text-sm text-muted-foreground",children:"There are no updates available for this package."})]}):A("div",{className:"grid grid-cols-1 gap-3",children:[A("div",{className:"grid grid-cols-[4fr_40px_4fr] gap-2",children:[A("div",{className:"!opacity-70",children:[N("span",{className:"font-bold mb-2 block text-center",children:"Old Version"}),N("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:t&&N(F,{pkg:t})})]}),N("div",{className:"flex items-center justify-center",children:N(i,{iconName:"IconArrowBarRight",className:"h-10 w-10"})}),A("div",{children:[N("span",{className:"font-bold mb-2 block text-center",children:"New Version"}),N("div",{className:"border-2 rounded-lg p-6 text-center text-muted-foreground text-primary transition-colors",children:l&&N(F,{pkg:{...l,is_active:!1,is_custom:s(),id:0}})})]})]}),N(x,{className:"w-full mt-2",variant:"outline",disabled:!!o,children:"Update Package"})]})})}}}};var Mo=()=>{let{process:e,packageManifest:a,selectedFile:o,setIsLoading:s}=f();a&&(s(!0),ka.post(route("dashboard.packages.manager"),{process:e,packageCode:a.code,version:a.version,packageZip:o??null}))};export{Mo as a,Ne as b,Ce as c,f as d,be as e,we as f,Ee as g,ne as h,oa as i,rt as j,F as k,Se as l,Te as m,Fe as n,Ae as o,Ve as p,Re as q,Q as r,zt as s,Ie as t,De as u};
|
package/dist/chunk-WQ53I46F.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as c,useContext as f,useState as s}from"react";import{jsx as M}from"react/jsx-runtime";var t=c({users:[],setUsers:()=>{},selectedUser:void 0,setSelectedUser:()=>{},showUserModal:!1,setShowUserModal:()=>{},meta:void 0,setMeta:()=>{}}),m=({children:e,users:r,meta:o})=>{let[d,n]=s(),[a,U]=s(!1),[u,i]=s(o||void 0),l={users:r,setUsers:()=>{},selectedUser:d,setSelectedUser:n,showUserModal:a,setShowUserModal:U,meta:u,setMeta:i};return M(t.Provider,{value:l,children:e})},w=()=>{let e=f(t);if(!e)throw new Error("useUsersProvider must be used within a UsersProvider");return e};export{m as a,w as b};
|
package/dist/chunk-YHEAFMGX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{toast as p}from"sonner";var k=(t,a)=>{let{setLoadingContent:o,setIsLoading:r}=t;return o({title:"Fetching Package Updates",description:"Please wait while we fetch the latest updates for this package."}),r(!0),new Promise((s,n)=>{a.post(route("dashboard.packages.check-update"),{onSuccess:e=>s(e),onError:e=>{p.error("Failed to fetch package updates: "+e),n(e)}})})};export{k as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sendForm: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../../../../chunk-UUF3H3EU.js";import"../../../../chunk-FAHSY2DO.js";import"../../../../chunk-YHEAFMGX.js";import"../../../../chunk-VQZPPWOL.js";import"../../../../chunk-Z6APYDZ7.js";import"../../../../chunk-KND3PUAR.js";import"../../../../chunk-R7O5BURF.js";import"../../../../chunk-FATDDXFE.js";import"../../../../chunk-2GVRXCFU.js";import"../../../../chunk-EABDMJDG.js";import"../../../../chunk-E5TMX3GR.js";import"../../../../chunk-L37X7O6L.js";import"../../../../chunk-6I7XLZ75.js";import"../../../../chunk-7VMEGPPO.js";import"../../../../chunk-LMJAV6MI.js";import"../../../../chunk-V2NMVGDZ.js";import"../../../../chunk-X6F7ORWR.js";import"../../../../chunk-FLR2KO5I.js";import"../../../../chunk-UB5QQGPD.js";import"../../../../chunk-PBMI4EWD.js";import"../../../../chunk-ZYAM2VUN.js";import"../../../../chunk-6POIVEDA.js";import"../../../../chunk-PZEX7JNQ.js";import"../../../../chunk-PECG6BFW.js";import"../../../../chunk-E2ZUBHVJ.js";import"../../../../chunk-GVFPSY2S.js";import"../../../../chunk-EFYOI7XD.js";import"../../../../chunk-U7CCM2TG.js";import"../../../../chunk-X2FAUFZV.js";import"../../../../chunk-OFK4F5KR.js";import"../../../../chunk-TGINGSSX.js";import"../../../../chunk-3MGLNOJ3.js";import"../../../../chunk-2UOSQSPQ.js";import"../../../../chunk-AW6EOFKV.js";import"../../../../chunk-EEYT23VU.js";import"../../../../chunk-7NKFSFMC.js";import"../../../../chunk-A6BBNBOV.js";import"../../../../chunk-XEBYLJU7.js";import"../../../../chunk-OTSYJWIO.js";import"../../../../chunk-OTBFBEQW.js";import"../../../../chunk-WNFQKV4B.js";import"../../../../chunk-CZM7FKLS.js";import"../../../../chunk-GBXDCZP6.js";import"../../../../chunk-QFUZ6MVT.js";import"../../../../chunk-AYYFGDAO.js";import"../../../../chunk-566X7DTI.js";import"../../../../chunk-DSY4KVMF.js";import"../../../../chunk-QKGQOXDM.js";import"../../../../chunk-3H6NZAII.js";import"../../../../chunk-3DBYUBWW.js";import"../../../../chunk-M5QT5SFN.js";import"../../../../chunk-EV4GZ2HL.js";import"../../../../chunk-65LRDGYI.js";import"../../../../chunk-S46ZLDUA.js";import"../../../../chunk-TVCWAJFT.js";import"../../../../chunk-YLI3WTOQ.js";import"../../../../chunk-SO7A4MJT.js";import"../../../../chunk-GZ7BAEJJ.js";import"../../../../chunk-G22OJQWL.js";import"../../../../chunk-PRCYNFKC.js";import"../../../../chunk-SEWU654V.js";import"../../../../chunk-G4EEZUTC.js";import"../../../../chunk-LF6AUOCX.js";import"../../../../chunk-JXWSQ5CZ.js";import"../../../../chunk-ZYEQMWUG.js";import"../../../../chunk-GND5KQRZ.js";import"../../../../chunk-DWAU5VTB.js";import"../../../../chunk-7ZTD2OS6.js";import"../../../../chunk-P5HBVZKY.js";import"../../../../chunk-QVUL22EY.js";import"../../../../chunk-UAIWQHYT.js";import"../../../../chunk-FNFP5GZS.js";import"../../../../chunk-SLZ26UCQ.js";import"../../../../chunk-5RKCSYZG.js";import"../../../../chunk-QL2STABI.js";export{a as sendForm};
|
|
File without changes
|
|
File without changes
|