@alepha/ui 0.13.3 → 0.13.4
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/admin/{AdminFiles-BjofP3OC.js → AdminFiles-8CC9mVsc.js} +3 -3
- package/dist/admin/{AdminFiles-BjofP3OC.js.map → AdminFiles-8CC9mVsc.js.map} +1 -1
- package/dist/admin/AdminFiles-BRLMP_7y.js +3 -0
- package/dist/admin/{AdminLayout-JakF7ESb.js → AdminLayout-Cm-Y4YTQ.js} +33 -25
- package/dist/admin/AdminLayout-Cm-Y4YTQ.js.map +1 -0
- package/dist/admin/AdminLayout-D5M9kSiV.js +3 -0
- package/dist/admin/AdminNotifications-DxBKi2RO.js +3 -0
- package/dist/admin/{AdminNotifications-BPrxALdS.js → AdminNotifications-d-gw5Uie.js} +2 -2
- package/dist/admin/{AdminNotifications-BPrxALdS.js.map → AdminNotifications-d-gw5Uie.js.map} +1 -1
- package/dist/admin/{AdminSessions-CMmBtbSw.js → AdminSessions-CpVusqmd.js} +3 -3
- package/dist/admin/{AdminSessions-CMmBtbSw.js.map → AdminSessions-CpVusqmd.js.map} +1 -1
- package/dist/admin/AdminSessions-DA285-5Q.js +3 -0
- package/dist/admin/{AdminUserCreate-DjiCcAk0.js → AdminUserCreate-CQIrSslj.js} +1 -1
- package/dist/admin/{AdminUserCreate-Coa_yi6m.js → AdminUserCreate-DH7u_yJj.js} +2 -2
- package/dist/admin/{AdminUserCreate-Coa_yi6m.js.map → AdminUserCreate-DH7u_yJj.js.map} +1 -1
- package/dist/admin/{AdminUserDetails-BCFwOm9w.js → AdminUserDetails-DVmFCDsU.js} +4 -4
- package/dist/admin/{AdminUserDetails-BCFwOm9w.js.map → AdminUserDetails-DVmFCDsU.js.map} +1 -1
- package/dist/admin/{AdminUserDetails-C5yeJNa3.js → AdminUserDetails-T3nkXSdz.js} +1 -1
- package/dist/admin/{AdminUserLayout-B8ga5QvP.js → AdminUserLayout-DdtZGX8n.js} +1 -1
- package/dist/admin/{AdminUserLayout-CR2OqV9Z.js → AdminUserLayout-gpOyn0Y7.js} +2 -2
- package/dist/admin/{AdminUserLayout-CR2OqV9Z.js.map → AdminUserLayout-gpOyn0Y7.js.map} +1 -1
- package/dist/admin/AdminUserSessions-CWYzjB3D.js +3 -0
- package/dist/admin/{AdminUserSessions-Bcf6-rjG.js → AdminUserSessions-CdVwoM-h.js} +3 -3
- package/dist/admin/{AdminUserSessions-Bcf6-rjG.js.map → AdminUserSessions-CdVwoM-h.js.map} +1 -1
- package/dist/admin/{AdminUserSettings-DRYVdW6S.js → AdminUserSettings-S7gZvvjO.js} +2 -2
- package/dist/admin/{AdminUserSettings-DRYVdW6S.js.map → AdminUserSettings-S7gZvvjO.js.map} +1 -1
- package/dist/admin/AdminUserSettings-jCzVYw_2.js +3 -0
- package/dist/admin/{AdminUsers-IN_2yHKt.js → AdminUsers-9qEzxqAL.js} +2 -2
- package/dist/admin/{AdminUsers-IN_2yHKt.js.map → AdminUsers-9qEzxqAL.js.map} +1 -1
- package/dist/admin/AdminUsers-BcSUxV01.js +3 -0
- package/dist/admin/index.d.ts +1013 -1007
- package/dist/admin/index.js +25 -23
- package/dist/admin/index.js.map +1 -1
- package/dist/auth/{Login-kBfaRgKG.js → Login-AlVPPqQp.js} +2 -2
- package/dist/auth/{Login-kBfaRgKG.js.map → Login-AlVPPqQp.js.map} +1 -1
- package/dist/auth/Login-otdWVvVU.js +4 -0
- package/dist/auth/index.d.ts +413 -413
- package/dist/auth/index.js +3 -2
- package/dist/auth/index.js.map +1 -1
- package/dist/core/index.d.ts +100 -100
- package/dist/core/index.js +8 -16
- package/dist/core/index.js.map +1 -1
- package/package.json +5 -4
- package/src/admin/AdminSidebar.ts +31 -0
- package/src/admin/components/AdminLayout.tsx +5 -26
- package/src/admin/index.ts +4 -1
- package/src/auth/components/Login.tsx +1 -1
- package/src/auth/components/buttons/UserButton.tsx +7 -1
- package/src/core/components/buttons/ActionButton.tsx +1 -0
- package/src/core/components/layout/Sidebar.tsx +0 -2
- package/src/core/hooks/useTheme.ts +2 -2
- package/src/core/providers/ThemeProvider.ts +11 -8
- package/src/core/themes/midnight.ts +1 -7
- package/styles.css +84 -0
- package/dist/admin/AdminFiles-DldZB7oo.js +0 -3
- package/dist/admin/AdminLayout-JakF7ESb.js.map +0 -1
- package/dist/admin/AdminLayout-qNsIyl30.js +0 -3
- package/dist/admin/AdminNotifications-DV-35Fi3.js +0 -3
- package/dist/admin/AdminSessions-Df2VYzlE.js +0 -3
- package/dist/admin/AdminUserSessions-A_5KkqTY.js +0 -3
- package/dist/admin/AdminUserSettings-DAsAhFjX.js +0 -3
- package/dist/admin/AdminUsers-Dd9a5UqO.js +0 -3
- package/dist/auth/Login-DDsyCNAA.js +0 -4
package/dist/auth/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./IconGoogle-v_58os2T.js";
|
|
2
|
-
import { t as Login_default } from "./Login-
|
|
2
|
+
import { t as Login_default } from "./Login-AlVPPqQp.js";
|
|
3
3
|
import { t as Register_default } from "./Register-BxJmOqpF.js";
|
|
4
4
|
import { t as ResetPassword_default } from "./ResetPassword-BhyZ9ek4.js";
|
|
5
5
|
import { t as VerifyEmail_default } from "./VerifyEmail-DeLct3oQ.js";
|
|
@@ -153,7 +153,7 @@ var AuthRouter = class {
|
|
|
153
153
|
path: "/login",
|
|
154
154
|
schema: { query: t.object({ r: t.optional(t.string()) }) },
|
|
155
155
|
can: () => !this.auth.user,
|
|
156
|
-
lazy: () => import("./Login-
|
|
156
|
+
lazy: () => import("./Login-otdWVvVU.js"),
|
|
157
157
|
resolve: async () => {
|
|
158
158
|
return { realmConfig: await this.loadRealmConfig() };
|
|
159
159
|
}
|
|
@@ -222,6 +222,7 @@ const UserButton = (props) => {
|
|
|
222
222
|
const auth = useAuth();
|
|
223
223
|
const authRouter = useRouter();
|
|
224
224
|
if (!auth.user) return /* @__PURE__ */ jsx(ActionButton, {
|
|
225
|
+
...buttonProps,
|
|
225
226
|
icon: IconLogin2,
|
|
226
227
|
href: authRouter.path("login")
|
|
227
228
|
});
|
package/dist/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["items: ActionMenuItem[]"],"sources":["../../src/auth/AuthI18n.ts","../../src/auth/AuthRouter.ts","../../src/auth/components/buttons/UserButton.tsx","../../src/auth/index.ts"],"sourcesContent":["import { $dictionary } from \"@alepha/react/i18n\";\n\nexport class AuthI18n {\n en = $dictionary({\n name: \"alepha.ui.auth.en\",\n lazy: () => ({\n default: {\n loginSignIn: \"Sign in\",\n loginContinueWith: \"Continue with $1\",\n loginOr: \"OR\",\n loginCancel: \"Cancel\",\n loginForgotPassword: \"Forgot password?\",\n loginNoAccount: \"Don't have an account?\",\n loginSignUp: \"Sign up\",\n loginUsername: \"Username\",\n loginEmail: \"Email\",\n loginPhone: \"Phone number\",\n loginPassword: \"Password\",\n registerCreateAccount: \"Create account\",\n registerContinueWith: \"Continue with $1\",\n registerOr: \"OR\",\n registerCancel: \"Cancel\",\n registerHaveAccount: \"Already have an account?\",\n registerSignIn: \"Sign in\",\n registerUsername: \"Username\",\n registerEmail: \"Email\",\n registerPhone: \"Phone number\",\n registerPassword: \"Password\",\n registerConfirmPassword: \"Confirm password\",\n registerDisabled:\n \"Registration is not available. Please contact your administrator.\",\n registerBackToSignIn: \"Back to sign in\",\n registerVerifyTitle: \"Verify your account\",\n registerVerifyDescription:\n \"Please enter the verification code(s) sent to you.\",\n registerEmailCode: \"Email verification code\",\n registerPhoneCode: \"Phone verification code\",\n registerVerifySubmit: \"Complete Registration\",\n registerVerifyBack: \"Back to registration\",\n resetPasswordTitle: \"Reset password\",\n resetPasswordEmail: \"Email\",\n resetPasswordEnterEmail:\n \"Enter your email address to reset your password\",\n resetPasswordSendCode: \"Send verification code\",\n resetPasswordCodeSent: \"We've sent a verification code to your email.\",\n resetPasswordEnterCode: \"Enter the 6-digit code\",\n resetPasswordResendCode: \"Resend code\",\n resetPasswordEnterNewPassword: \"Create your new password\",\n resetPasswordNewPassword: \"New password\",\n resetPasswordConfirmPassword: \"Confirm password\",\n resetPasswordSetNewPassword: \"Set new password\",\n resetPasswordSuccess: \"Your password has been reset successfully.\",\n resetPasswordBackToSignIn: \"Back to sign in\",\n resetPasswordCancel: \"Cancel\",\n resetPasswordDisabled:\n \"Password reset is not available. Please contact your administrator.\",\n verifyEmailTitle: \"Email Verification\",\n verifyEmailVerifying: \"Verifying your email...\",\n verifyEmailPleaseWait:\n \"Please wait while we verify your email address.\",\n verifyEmailSuccess: \"Your email has been verified successfully.\",\n verifyEmailFailed:\n \"Failed to verify your email. The link may have expired or is invalid.\",\n verifyEmailMissingParams:\n \"Invalid verification link. Email and token are required.\",\n verifyEmailSignIn: \"Sign in to your account\",\n verifyEmailBackToSignIn: \"Back to sign in\",\n },\n }),\n });\n\n fr = $dictionary({\n lazy: () => ({\n default: {\n loginSignIn: \"Se connecter\",\n loginContinueWith: \"Continuer avec $1\",\n loginOr: \"OU\",\n loginCancel: \"Annuler\",\n loginForgotPassword: \"Mot de passe oublié ?\",\n loginNoAccount: \"Vous n'avez pas de compte ?\",\n loginSignUp: \"S'inscrire\",\n loginUsername: \"Nom d'utilisateur\",\n loginEmail: \"E-mail\",\n loginPhone: \"Numéro de téléphone\",\n loginPassword: \"Mot de passe\",\n registerCreateAccount: \"Créer un compte\",\n registerContinueWith: \"Continuer avec $1\",\n registerOr: \"OU\",\n registerCancel: \"Annuler\",\n registerHaveAccount: \"Vous avez déjà un compte ?\",\n registerSignIn: \"Se connecter\",\n registerUsername: \"Nom d'utilisateur\",\n registerEmail: \"E-mail\",\n registerPhone: \"Numéro de téléphone\",\n registerPassword: \"Mot de passe\",\n registerConfirmPassword: \"Confirmer le mot de passe\",\n registerDisabled:\n \"L'inscription n'est pas disponible. Veuillez contacter votre administrateur.\",\n registerBackToSignIn: \"Retour à la connexion\",\n registerVerifyTitle: \"Vérifiez votre compte\",\n registerVerifyDescription:\n \"Veuillez entrer le(s) code(s) de vérification qui vous ont été envoyés.\",\n registerEmailCode: \"Code de vérification par e-mail\",\n registerPhoneCode: \"Code de vérification par téléphone\",\n registerVerifySubmit: \"Terminer l'inscription\",\n registerVerifyBack: \"Retour à l'inscription\",\n resetPasswordTitle: \"Réinitialiser le mot de passe\",\n resetPasswordEmail: \"E-mail\",\n resetPasswordEnterEmail:\n \"Entrez votre adresse e-mail pour réinitialiser votre mot de passe\",\n resetPasswordSendCode: \"Envoyer le code de vérification\",\n resetPasswordCodeSent:\n \"Nous avons envoyé un code de vérification à votre e-mail.\",\n resetPasswordEnterCode: \"Entrez le code à 6 chiffres\",\n resetPasswordResendCode: \"Renvoyer le code\",\n resetPasswordEnterNewPassword: \"Créez votre nouveau mot de passe\",\n resetPasswordNewPassword: \"Nouveau mot de passe\",\n resetPasswordConfirmPassword: \"Confirmer le mot de passe\",\n resetPasswordSetNewPassword: \"Définir le nouveau mot de passe\",\n resetPasswordSuccess:\n \"Votre mot de passe a été réinitialisé avec succès.\",\n resetPasswordBackToSignIn: \"Retour à la connexion\",\n resetPasswordCancel: \"Annuler\",\n resetPasswordDisabled:\n \"La réinitialisation du mot de passe n'est pas disponible. Veuillez contacter votre administrateur.\",\n verifyEmailTitle: \"Vérification de l'e-mail\",\n verifyEmailVerifying: \"Vérification de votre e-mail...\",\n verifyEmailPleaseWait:\n \"Veuillez patienter pendant que nous vérifions votre adresse e-mail.\",\n verifyEmailSuccess: \"Votre e-mail a été vérifié avec succès.\",\n verifyEmailFailed:\n \"Échec de la vérification de votre e-mail. Le lien a peut-être expiré ou est invalide.\",\n verifyEmailMissingParams:\n \"Lien de vérification invalide. L'e-mail et le jeton sont requis.\",\n verifyEmailSignIn: \"Se connecter à votre compte\",\n verifyEmailBackToSignIn: \"Retour à la connexion\",\n },\n }),\n });\n}\n","import { $page } from \"@alepha/react\";\nimport { ReactAuth } from \"@alepha/react/auth\";\nimport {\n IconLogin2,\n IconLogout2,\n IconMailCheck,\n IconPasswordUser,\n IconUserPlus,\n} from \"@tabler/icons-react\";\nimport { $inject, AlephaError, t } from \"alepha\";\nimport type { UserRealmController } from \"alepha/api/users\";\nimport { $client } from \"alepha/server/links\";\n\nexport class AuthRouter {\n protected readonly userRealmClient = $client<UserRealmController>();\n protected readonly auth = $inject(ReactAuth);\n\n layout = $page({\n name: \"AuthLayout\",\n path: \"/auth\",\n lazy: () => import(\"./components/AuthLayout.tsx\"),\n children: () => [\n this.login,\n this.register,\n this.resetPassword,\n this.verifyEmail,\n ],\n });\n\n login = $page({\n icon: IconLogin2,\n label: \"Sign In\",\n description: \"Sign in to your account\",\n path: \"/login\",\n schema: {\n query: t.object({\n r: t.optional(t.string()),\n }),\n },\n can: () => !this.auth.user,\n lazy: () => import(\"./components/Login.tsx\"),\n resolve: async () => {\n return {\n realmConfig: await this.loadRealmConfig(),\n };\n },\n });\n\n register = $page({\n icon: IconUserPlus,\n label: \"Register\",\n description: \"Create a new account\",\n path: \"/register\",\n schema: {\n query: t.object({\n r: t.optional(t.string()),\n }),\n },\n can: () => !this.auth.user,\n lazy: () => import(\"./components/Register.tsx\"),\n resolve: async () => {\n return {\n realmConfig: await this.loadRealmConfig(),\n };\n },\n });\n\n resetPassword = $page({\n icon: IconPasswordUser,\n label: \"Reset Password\",\n description: \"Reset your account password\",\n path: \"/reset-password\",\n schema: {\n query: t.object({\n r: t.optional(t.string()),\n }),\n },\n can: () => !this.auth.user,\n lazy: () => import(\"./components/ResetPassword.tsx\"),\n resolve: async () => {\n return {\n realmConfig: await this.loadRealmConfig(),\n };\n },\n });\n\n verifyEmail = $page({\n icon: IconMailCheck,\n label: \"Verify Email\",\n description: \"Verify your email address\",\n path: \"/verify-email\",\n schema: {\n query: t.object({\n email: t.optional(t.string()),\n token: t.optional(t.string()),\n }),\n },\n lazy: () => import(\"./components/VerifyEmail.tsx\"),\n });\n\n logout = $page({\n icon: IconLogout2,\n label: \"Sign Out\",\n description: \"Sign out of your account\",\n can: () => !!this.auth.user,\n path: \"/logout\",\n component: () => null,\n resolve: () => {\n this.auth.logout();\n return {};\n },\n });\n\n protected async loadRealmConfig() {\n try {\n return await this.userRealmClient.getRealmConfig();\n } catch (e) {\n if (e instanceof AlephaError) {\n throw new AlephaError(\n \"Missing User-Realm Configuration - Did you forget to add '$userRealm()' to your application?\",\n e,\n );\n }\n throw e;\n }\n }\n}\n","import { useRouter } from \"@alepha/react\";\nimport { useAuth } from \"@alepha/react/auth\";\nimport {\n ActionButton,\n type ActionMenuConfig,\n type ActionMenuItem,\n type ActionProps,\n ui,\n} from \"@alepha/ui\";\nimport { Avatar } from \"@mantine/core\";\nimport { IconLogin2, IconLogout, IconUser } from \"@tabler/icons-react\";\nimport type { ReactNode } from \"react\";\nimport type { AuthRouter } from \"../../AuthRouter.ts\";\n\nexport interface UserButtonProps\n extends Omit<ActionProps, \"menu\" | \"icon\" | \"onClick\"> {\n /**\n * Additional menu items to display before the logout option\n */\n menuItems?: ActionMenuItem[];\n\n /**\n * Custom logout label (default: \"Sign out\")\n */\n logoutLabel?: string;\n\n /**\n * Menu configuration overrides\n */\n menuConfig?: Partial<Omit<ActionMenuConfig, \"items\">>;\n\n /**\n * Whether to show a divider before logout (default: true when menuItems provided)\n */\n showLogoutDivider?: boolean;\n\n /**\n * Custom icon to use instead of user avatar (default: IconUser)\n */\n icon?: ReactNode;\n}\n\nconst UserButton = (props: UserButtonProps) => {\n const {\n menuItems = [],\n logoutLabel = \"Sign out\",\n menuConfig,\n showLogoutDivider = menuItems.length > 0,\n icon,\n children,\n ...buttonProps\n } = props;\n\n const auth = useAuth<{\n username?: string;\n email?: string;\n picture?: string;\n }>();\n\n const authRouter = useRouter<AuthRouter>();\n\n if (!auth.user) {\n return <ActionButton icon={IconLogin2} href={authRouter.path(\"login\")} />;\n }\n\n const userLabel = auth.user.username || auth.user.email;\n\n const items: ActionMenuItem[] = [];\n\n // Add user info label if available\n if (auth.user.email && auth.user.username) {\n items.push({\n type: \"label\",\n label: auth.user.email,\n });\n }\n\n // Add custom menu items\n items.push(...menuItems);\n\n // Add divider before logout if needed\n if (showLogoutDivider && items.length > 0) {\n items.push({ type: \"divider\" });\n }\n\n // Add logout item\n items.push({\n label: logoutLabel,\n icon: <IconLogout size={ui.sizes.icon.md} />,\n color: \"red\",\n onClick: () => auth.logout(),\n });\n\n // Use leftSection for Avatar (JSX element), icon prop for component types\n const hasAvatar = !icon && auth.user.picture;\n\n return (\n <ActionButton\n {...buttonProps}\n icon={hasAvatar ? undefined : (icon ?? IconUser)}\n leftSection={\n hasAvatar ? (\n <Avatar\n src={`/api/files/${auth.user.picture}`}\n size={24}\n radius=\"xl\"\n />\n ) : undefined\n }\n menu={{\n position: \"bottom-end\",\n width: 200,\n ...menuConfig,\n items,\n }}\n >\n {children ?? userLabel}\n </ActionButton>\n );\n};\n\nexport default UserButton;\n","import { AlephaReactAuth } from \"@alepha/react/auth\";\nimport { AlephaReactI18n } from \"@alepha/react/i18n\";\nimport { AlephaUI } from \"@alepha/ui\";\nimport { $module } from \"alepha\";\nimport { AuthI18n } from \"./AuthI18n.ts\";\nimport { AuthRouter } from \"./AuthRouter.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./AuthRouter.ts\";\nexport type { UserButtonProps } from \"./components/buttons/UserButton.tsx\";\nexport { default as UserButton } from \"./components/buttons/UserButton.tsx\";\nexport { default as Login } from \"./components/Login.tsx\";\nexport { default as Register } from \"./components/Register.tsx\";\nexport { default as ResetPassword } from \"./components/ResetPassword.tsx\";\nexport { default as VerifyEmail } from \"./components/VerifyEmail.tsx\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Login UI Module\n *\n * @module alepha.ui.auth\n */\nexport const AlephaUIAuth = $module({\n name: \"alepha.ui.auth\",\n services: [AlephaUI, AlephaReactAuth, AlephaReactI18n, AuthRouter, AuthI18n],\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAa,WAAb,MAAsB;CACpB,KAAK,YAAY;EACf,MAAM;E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C,OAAM,KAAK,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAM,KAAK;EACT,OAAO;EACP,MAAM,oBAAC,cAAW,MAAM,GAAG,MAAM,KAAK,KAAM;EAC5C,OAAO;EACP,eAAe,KAAK,QAAQ;EAC7B,CAAC;CAGF,MAAM,YAAY,CAAC,QAAQ,KAAK,KAAK;AAErC,QACE,oBAAC;EACC,GAAI;EACJ,MAAM,YAAY,SAAa,QAAQ;EACvC,aACE,YACE,oBAAC;GACC,KAAK,cAAc,KAAK,KAAK;GAC7B,MAAM;GACN,QAAO;IACP,GACA;EAEN,MAAM;GACJ,UAAU;GACV,OAAO;GACP,GAAG;GACH;GACD;YAEA,YAAY;GACA;;AAInB,yBAAe;;;;;;;;;ACjGf,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,UAAU;EAAC;EAAU;EAAiB;EAAiB;EAAY;EAAS;CAC7E,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["items: ActionMenuItem[]"],"sources":["../../src/auth/AuthI18n.ts","../../src/auth/AuthRouter.ts","../../src/auth/components/buttons/UserButton.tsx","../../src/auth/index.ts"],"sourcesContent":["import { $dictionary } from \"@alepha/react/i18n\";\n\nexport class AuthI18n {\n en = $dictionary({\n name: \"alepha.ui.auth.en\",\n lazy: () => ({\n default: {\n loginSignIn: \"Sign in\",\n loginContinueWith: \"Continue with $1\",\n loginOr: \"OR\",\n loginCancel: \"Cancel\",\n loginForgotPassword: \"Forgot password?\",\n loginNoAccount: \"Don't have an account?\",\n loginSignUp: \"Sign up\",\n loginUsername: \"Username\",\n loginEmail: \"Email\",\n loginPhone: \"Phone number\",\n loginPassword: \"Password\",\n registerCreateAccount: \"Create account\",\n registerContinueWith: \"Continue with $1\",\n registerOr: \"OR\",\n registerCancel: \"Cancel\",\n registerHaveAccount: \"Already have an account?\",\n registerSignIn: \"Sign in\",\n registerUsername: \"Username\",\n registerEmail: \"Email\",\n registerPhone: \"Phone number\",\n registerPassword: \"Password\",\n registerConfirmPassword: \"Confirm password\",\n registerDisabled:\n \"Registration is not available. Please contact your administrator.\",\n registerBackToSignIn: \"Back to sign in\",\n registerVerifyTitle: \"Verify your account\",\n registerVerifyDescription:\n \"Please enter the verification code(s) sent to you.\",\n registerEmailCode: \"Email verification code\",\n registerPhoneCode: \"Phone verification code\",\n registerVerifySubmit: \"Complete Registration\",\n registerVerifyBack: \"Back to registration\",\n resetPasswordTitle: \"Reset password\",\n resetPasswordEmail: \"Email\",\n resetPasswordEnterEmail:\n \"Enter your email address to reset your password\",\n resetPasswordSendCode: \"Send verification code\",\n resetPasswordCodeSent: \"We've sent a verification code to your email.\",\n resetPasswordEnterCode: \"Enter the 6-digit code\",\n resetPasswordResendCode: \"Resend code\",\n resetPasswordEnterNewPassword: \"Create your new password\",\n resetPasswordNewPassword: \"New password\",\n resetPasswordConfirmPassword: \"Confirm password\",\n resetPasswordSetNewPassword: \"Set new password\",\n resetPasswordSuccess: \"Your password has been reset successfully.\",\n resetPasswordBackToSignIn: \"Back to sign in\",\n resetPasswordCancel: \"Cancel\",\n resetPasswordDisabled:\n \"Password reset is not available. Please contact your administrator.\",\n verifyEmailTitle: \"Email Verification\",\n verifyEmailVerifying: \"Verifying your email...\",\n verifyEmailPleaseWait:\n \"Please wait while we verify your email address.\",\n verifyEmailSuccess: \"Your email has been verified successfully.\",\n verifyEmailFailed:\n \"Failed to verify your email. The link may have expired or is invalid.\",\n verifyEmailMissingParams:\n \"Invalid verification link. Email and token are required.\",\n verifyEmailSignIn: \"Sign in to your account\",\n verifyEmailBackToSignIn: \"Back to sign in\",\n },\n }),\n });\n\n fr = $dictionary({\n lazy: () => ({\n default: {\n loginSignIn: \"Se connecter\",\n loginContinueWith: \"Continuer avec $1\",\n loginOr: \"OU\",\n loginCancel: \"Annuler\",\n loginForgotPassword: \"Mot de passe oublié ?\",\n loginNoAccount: \"Vous n'avez pas de compte ?\",\n loginSignUp: \"S'inscrire\",\n loginUsername: \"Nom d'utilisateur\",\n loginEmail: \"E-mail\",\n loginPhone: \"Numéro de téléphone\",\n loginPassword: \"Mot de passe\",\n registerCreateAccount: \"Créer un compte\",\n registerContinueWith: \"Continuer avec $1\",\n registerOr: \"OU\",\n registerCancel: \"Annuler\",\n registerHaveAccount: \"Vous avez déjà un compte ?\",\n registerSignIn: \"Se connecter\",\n registerUsername: \"Nom d'utilisateur\",\n registerEmail: \"E-mail\",\n registerPhone: \"Numéro de téléphone\",\n registerPassword: \"Mot de passe\",\n registerConfirmPassword: \"Confirmer le mot de passe\",\n registerDisabled:\n \"L'inscription n'est pas disponible. Veuillez contacter votre administrateur.\",\n registerBackToSignIn: \"Retour à la connexion\",\n registerVerifyTitle: \"Vérifiez votre compte\",\n registerVerifyDescription:\n \"Veuillez entrer le(s) code(s) de vérification qui vous ont été envoyés.\",\n registerEmailCode: \"Code de vérification par e-mail\",\n registerPhoneCode: \"Code de vérification par téléphone\",\n registerVerifySubmit: \"Terminer l'inscription\",\n registerVerifyBack: \"Retour à l'inscription\",\n resetPasswordTitle: \"Réinitialiser le mot de passe\",\n resetPasswordEmail: \"E-mail\",\n resetPasswordEnterEmail:\n \"Entrez votre adresse e-mail pour réinitialiser votre mot de passe\",\n resetPasswordSendCode: \"Envoyer le code de vérification\",\n resetPasswordCodeSent:\n \"Nous avons envoyé un code de vérification à votre e-mail.\",\n resetPasswordEnterCode: \"Entrez le code à 6 chiffres\",\n resetPasswordResendCode: \"Renvoyer le code\",\n resetPasswordEnterNewPassword: \"Créez votre nouveau mot de passe\",\n resetPasswordNewPassword: \"Nouveau mot de passe\",\n resetPasswordConfirmPassword: \"Confirmer le mot de passe\",\n resetPasswordSetNewPassword: \"Définir le nouveau mot de passe\",\n resetPasswordSuccess:\n \"Votre mot de passe a été réinitialisé avec succès.\",\n resetPasswordBackToSignIn: \"Retour à la connexion\",\n resetPasswordCancel: \"Annuler\",\n resetPasswordDisabled:\n \"La réinitialisation du mot de passe n'est pas disponible. Veuillez contacter votre administrateur.\",\n verifyEmailTitle: \"Vérification de l'e-mail\",\n verifyEmailVerifying: \"Vérification de votre e-mail...\",\n verifyEmailPleaseWait:\n \"Veuillez patienter pendant que nous vérifions votre adresse e-mail.\",\n verifyEmailSuccess: \"Votre e-mail a été vérifié avec succès.\",\n verifyEmailFailed:\n \"Échec de la vérification de votre e-mail. Le lien a peut-être expiré ou est invalide.\",\n verifyEmailMissingParams:\n \"Lien de vérification invalide. L'e-mail et le jeton sont requis.\",\n verifyEmailSignIn: \"Se connecter à votre compte\",\n verifyEmailBackToSignIn: \"Retour à la connexion\",\n },\n }),\n });\n}\n","import { $page } from \"@alepha/react\";\nimport { ReactAuth } from \"@alepha/react/auth\";\nimport {\n IconLogin2,\n IconLogout2,\n IconMailCheck,\n IconPasswordUser,\n IconUserPlus,\n} from \"@tabler/icons-react\";\nimport { $inject, AlephaError, t } from \"alepha\";\nimport type { UserRealmController } from \"alepha/api/users\";\nimport { $client } from \"alepha/server/links\";\n\nexport class AuthRouter {\n protected readonly userRealmClient = $client<UserRealmController>();\n protected readonly auth = $inject(ReactAuth);\n\n layout = $page({\n name: \"AuthLayout\",\n path: \"/auth\",\n lazy: () => import(\"./components/AuthLayout.tsx\"),\n children: () => [\n this.login,\n this.register,\n this.resetPassword,\n this.verifyEmail,\n ],\n });\n\n login = $page({\n icon: IconLogin2,\n label: \"Sign In\",\n description: \"Sign in to your account\",\n path: \"/login\",\n schema: {\n query: t.object({\n r: t.optional(t.string()),\n }),\n },\n can: () => !this.auth.user,\n lazy: () => import(\"./components/Login.tsx\"),\n resolve: async () => {\n return {\n realmConfig: await this.loadRealmConfig(),\n };\n },\n });\n\n register = $page({\n icon: IconUserPlus,\n label: \"Register\",\n description: \"Create a new account\",\n path: \"/register\",\n schema: {\n query: t.object({\n r: t.optional(t.string()),\n }),\n },\n can: () => !this.auth.user,\n lazy: () => import(\"./components/Register.tsx\"),\n resolve: async () => {\n return {\n realmConfig: await this.loadRealmConfig(),\n };\n },\n });\n\n resetPassword = $page({\n icon: IconPasswordUser,\n label: \"Reset Password\",\n description: \"Reset your account password\",\n path: \"/reset-password\",\n schema: {\n query: t.object({\n r: t.optional(t.string()),\n }),\n },\n can: () => !this.auth.user,\n lazy: () => import(\"./components/ResetPassword.tsx\"),\n resolve: async () => {\n return {\n realmConfig: await this.loadRealmConfig(),\n };\n },\n });\n\n verifyEmail = $page({\n icon: IconMailCheck,\n label: \"Verify Email\",\n description: \"Verify your email address\",\n path: \"/verify-email\",\n schema: {\n query: t.object({\n email: t.optional(t.string()),\n token: t.optional(t.string()),\n }),\n },\n lazy: () => import(\"./components/VerifyEmail.tsx\"),\n });\n\n logout = $page({\n icon: IconLogout2,\n label: \"Sign Out\",\n description: \"Sign out of your account\",\n can: () => !!this.auth.user,\n path: \"/logout\",\n component: () => null,\n resolve: () => {\n this.auth.logout();\n return {};\n },\n });\n\n protected async loadRealmConfig() {\n try {\n return await this.userRealmClient.getRealmConfig();\n } catch (e) {\n if (e instanceof AlephaError) {\n throw new AlephaError(\n \"Missing User-Realm Configuration - Did you forget to add '$userRealm()' to your application?\",\n e,\n );\n }\n throw e;\n }\n }\n}\n","import { useRouter } from \"@alepha/react\";\nimport { useAuth } from \"@alepha/react/auth\";\nimport {\n ActionButton,\n type ActionMenuConfig,\n type ActionMenuItem,\n type ActionProps,\n ui,\n} from \"@alepha/ui\";\nimport { Avatar } from \"@mantine/core\";\nimport { IconLogin2, IconLogout, IconUser } from \"@tabler/icons-react\";\nimport type { ReactNode } from \"react\";\nimport type { AuthRouter } from \"../../AuthRouter.ts\";\n\nexport interface UserButtonProps\n extends Omit<ActionProps, \"menu\" | \"icon\" | \"onClick\"> {\n /**\n * Additional menu items to display before the logout option\n */\n menuItems?: ActionMenuItem[];\n\n /**\n * Custom logout label (default: \"Sign out\")\n */\n logoutLabel?: string;\n\n /**\n * Menu configuration overrides\n */\n menuConfig?: Partial<Omit<ActionMenuConfig, \"items\">>;\n\n /**\n * Whether to show a divider before logout (default: true when menuItems provided)\n */\n showLogoutDivider?: boolean;\n\n /**\n * Custom icon to use instead of user avatar (default: IconUser)\n */\n icon?: ReactNode;\n}\n\nconst UserButton = (props: UserButtonProps) => {\n const {\n menuItems = [],\n logoutLabel = \"Sign out\",\n menuConfig,\n showLogoutDivider = menuItems.length > 0,\n icon,\n children,\n ...buttonProps\n } = props;\n\n const auth = useAuth<{\n username?: string;\n email?: string;\n picture?: string;\n }>();\n\n const authRouter = useRouter<AuthRouter>();\n\n if (!auth.user) {\n return (\n <ActionButton\n {...buttonProps}\n icon={IconLogin2}\n href={authRouter.path(\"login\")}\n />\n );\n }\n\n const userLabel = auth.user.username || auth.user.email;\n\n const items: ActionMenuItem[] = [];\n\n // Add user info label if available\n if (auth.user.email && auth.user.username) {\n items.push({\n type: \"label\",\n label: auth.user.email,\n });\n }\n\n // Add custom menu items\n items.push(...menuItems);\n\n // Add divider before logout if needed\n if (showLogoutDivider && items.length > 0) {\n items.push({ type: \"divider\" });\n }\n\n // Add logout item\n items.push({\n label: logoutLabel,\n icon: <IconLogout size={ui.sizes.icon.md} />,\n color: \"red\",\n onClick: () => auth.logout(),\n });\n\n // Use leftSection for Avatar (JSX element), icon prop for component types\n const hasAvatar = !icon && auth.user.picture;\n\n return (\n <ActionButton\n {...buttonProps}\n icon={hasAvatar ? undefined : (icon ?? IconUser)}\n leftSection={\n hasAvatar ? (\n <Avatar\n src={`/api/files/${auth.user.picture}`}\n size={24}\n radius=\"xl\"\n />\n ) : undefined\n }\n menu={{\n position: \"bottom-end\",\n width: 200,\n ...menuConfig,\n items,\n }}\n >\n {children ?? userLabel}\n </ActionButton>\n );\n};\n\nexport default UserButton;\n","import { AlephaReactAuth } from \"@alepha/react/auth\";\nimport { AlephaReactI18n } from \"@alepha/react/i18n\";\nimport { AlephaUI } from \"@alepha/ui\";\nimport { $module } from \"alepha\";\nimport { AuthI18n } from \"./AuthI18n.ts\";\nimport { AuthRouter } from \"./AuthRouter.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./AuthRouter.ts\";\nexport type { UserButtonProps } from \"./components/buttons/UserButton.tsx\";\nexport { default as UserButton } from \"./components/buttons/UserButton.tsx\";\nexport { default as Login } from \"./components/Login.tsx\";\nexport { default as Register } from \"./components/Register.tsx\";\nexport { default as ResetPassword } from \"./components/ResetPassword.tsx\";\nexport { default as VerifyEmail } from \"./components/VerifyEmail.tsx\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Login UI Module\n *\n * @module alepha.ui.auth\n */\nexport const AlephaUIAuth = $module({\n name: \"alepha.ui.auth\",\n services: [AlephaUI, AlephaReactAuth, AlephaReactI18n, AuthRouter, AuthI18n],\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAa,WAAb,MAAsB;CACpB,KAAK,YAAY;EACf,MAAM;EACN,aAAa,EACX,SAAS;GACP,aAAa;GACb,mBAAmB;GACnB,SAAS;GACT,aAAa;GACb,qBAAqB;GACrB,gBAAgB;GAChB,aAAa;GACb,eAAe;GACf,YAAY;GACZ,YAAY;GACZ,eAAe;GACf,uBAAuB;GACvB,sBAAsB;GACtB,YAAY;GACZ,gBAAgB;GAChB,qBAAqB;GACrB,gBAAgB;GAChB,kBAAkB;GAClB,eAAe;GACf,eAAe;GACf,kBAAkB;GAClB,yBAAyB;GACzB,kBACE;GACF,sBAAsB;GACtB,qBAAqB;GACrB,2BACE;GACF,mBAAmB;GACnB,mBAAmB;GACnB,sBAAsB;GACtB,oBAAoB;GACpB,oBAAoB;GACpB,oBAAoB;GACpB,yBACE;GACF,uBAAuB;GACvB,uBAAuB;GACvB,wBAAwB;GACxB,yBAAyB;GACzB,+BAA+B;GAC/B,0BAA0B;GAC1B,8BAA8B;GAC9B,6BAA6B;GAC7B,sBAAsB;GACtB,2BAA2B;GAC3B,qBAAqB;GACrB,uBACE;GACF,kBAAkB;GAClB,sBAAsB;GACtB,uBACE;GACF,oBAAoB;GACpB,mBACE;GACF,0BACE;GACF,mBAAmB;GACnB,yBAAyB;GAC1B,EACF;EACF,CAAC;CAEF,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Y,EAAE,EACd,cAAc,YACd,YACA,oBAAoB,UAAU,SAAS,GACvC,MACA,UACA,GAAG,gBACD;CAEJ,MAAM,OAAO,SAIT;CAEJ,MAAM,aAAa,WAAuB;AAE1C,KAAI,CAAC,KAAK,KACR,QACE,oBAAC;EACC,GAAI;EACJ,MAAM;EACN,MAAM,WAAW,KAAK,QAAQ;GAC9B;CAIN,MAAM,YAAY,KAAK,KAAK,YAAY,KAAK,KAAK;CAElD,MAAMA,QAA0B,EAAE;AAGlC,KAAI,KAAK,KAAK,SAAS,KAAK,KAAK,SAC/B,OAAM,KAAK;EACT,MAAM;EACN,OAAO,KAAK,KAAK;EAClB,CAAC;AAIJ,OAAM,KAAK,GAAG,UAAU;AAGxB,KAAI,qBAAqB,MAAM,SAAS,EACtC,OAAM,KAAK,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAM,KAAK;EACT,OAAO;EACP,MAAM,oBAAC,cAAW,MAAM,GAAG,MAAM,KAAK,KAAM;EAC5C,OAAO;EACP,eAAe,KAAK,QAAQ;EAC7B,CAAC;CAGF,MAAM,YAAY,CAAC,QAAQ,KAAK,KAAK;AAErC,QACE,oBAAC;EACC,GAAI;EACJ,MAAM,YAAY,SAAa,QAAQ;EACvC,aACE,YACE,oBAAC;GACC,KAAK,cAAc,KAAK,KAAK;GAC7B,MAAM;GACN,QAAO;IACP,GACA;EAEN,MAAM;GACJ,UAAU;GACV,OAAO;GACP,GAAG;GACH;GACD;YAEA,YAAY;GACA;;AAInB,yBAAe;;;;;;;;;ACvGf,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,UAAU;EAAC;EAAU;EAAiB;EAAiB;EAAY;EAAS;CAC7E,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as alepha99 from "alepha";
|
|
2
2
|
import { Alepha, AlephaError, Async, FileLike, InstantiableClass, LogLevel, LoggerInterface, Page, PageMetadata, Primitive, Static, StreamLike, TArray, TFile, TObject, TProperties, TRecord, TSchema, TStream, TString, TVoid, TypeBoxError } from "alepha";
|
|
3
3
|
import { AnchorProps, AppShellFooterProps, AppShellHeaderProps, AppShellMainProps, AppShellNavbarProps, AppShellProps, AutocompleteProps, BurgerProps, ButtonProps, ColorInputProps, ColorSchemeScriptProps, FileInputProps, Flex, FlexProps, MantineBreakpoint, MantineProviderProps, MantineSize, MantineThemeOverride, MenuProps, MenuTargetProps, ModalProps, MultiSelectProps, NumberInputProps, PasswordInputProps, SegmentedControlProps, SelectProps, SliderProps, SwitchProps, TableProps, TableTrProps, TagsInputProps, Text, TextInputProps, TextareaProps, ThemeIconProps, TooltipProps } from "@mantine/core";
|
|
4
4
|
import { ModalsProviderProps } from "@mantine/modals";
|
|
5
5
|
import * as _mantine_notifications0 from "@mantine/notifications";
|
|
6
6
|
import { NotificationData, NotificationsProps } from "@mantine/notifications";
|
|
7
7
|
import { NavigationProgressProps } from "@mantine/nprogress";
|
|
8
|
-
import * as
|
|
8
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
9
9
|
import { ComponentType, FC, InputHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
10
10
|
import { DateInputProps, DateTimePickerProps, TimeInputProps } from "@mantine/dates";
|
|
11
11
|
import "dayjs/plugin/relativeTime.js";
|
|
@@ -21,15 +21,15 @@ import { Readable } from "node:stream";
|
|
|
21
21
|
import { ReadableStream } from "node:stream/web";
|
|
22
22
|
|
|
23
23
|
//#region ../alepha/src/logger/schemas/logEntrySchema.d.ts
|
|
24
|
-
declare const logEntrySchema:
|
|
25
|
-
level:
|
|
26
|
-
message:
|
|
27
|
-
service:
|
|
28
|
-
module:
|
|
29
|
-
context:
|
|
30
|
-
app:
|
|
31
|
-
data:
|
|
32
|
-
timestamp:
|
|
24
|
+
declare const logEntrySchema: alepha99.TObject<{
|
|
25
|
+
level: alepha99.TUnsafe<"SILENT" | "TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR">;
|
|
26
|
+
message: alepha99.TString;
|
|
27
|
+
service: alepha99.TString;
|
|
28
|
+
module: alepha99.TString;
|
|
29
|
+
context: alepha99.TOptional<alepha99.TString>;
|
|
30
|
+
app: alepha99.TOptional<alepha99.TString>;
|
|
31
|
+
data: alepha99.TOptional<alepha99.TAny>;
|
|
32
|
+
timestamp: alepha99.TNumber;
|
|
33
33
|
}>;
|
|
34
34
|
type LogEntry = Static<typeof logEntrySchema>;
|
|
35
35
|
//#endregion
|
|
@@ -44,8 +44,8 @@ declare class DateTimeProvider {
|
|
|
44
44
|
protected readonly timeouts: Timeout[];
|
|
45
45
|
protected readonly intervals: Interval[];
|
|
46
46
|
constructor();
|
|
47
|
-
protected readonly onStart:
|
|
48
|
-
protected readonly onStop:
|
|
47
|
+
protected readonly onStart: alepha99.HookPrimitive<"start">;
|
|
48
|
+
protected readonly onStop: alepha99.HookPrimitive<"stop">;
|
|
49
49
|
setLocale(locale: string): void;
|
|
50
50
|
isDateTime(value: unknown): value is DateTime;
|
|
51
51
|
/**
|
|
@@ -177,7 +177,7 @@ declare class Logger implements LoggerInterface {
|
|
|
177
177
|
}
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region ../alepha/src/logger/index.d.ts
|
|
180
|
-
declare const envSchema$6:
|
|
180
|
+
declare const envSchema$6: alepha99.TObject<{
|
|
181
181
|
/**
|
|
182
182
|
* Default log level for the application.
|
|
183
183
|
*
|
|
@@ -194,14 +194,14 @@ declare const envSchema$6: alepha72.TObject<{
|
|
|
194
194
|
* LOG_LEVEL=my.module.name:debug,info # Set debug level for my.module.name and info for all other modules
|
|
195
195
|
* LOG_LEVEL=alepha:trace, info # Set trace level for all alepha modules and info for all other modules
|
|
196
196
|
*/
|
|
197
|
-
LOG_LEVEL:
|
|
197
|
+
LOG_LEVEL: alepha99.TOptional<alepha99.TString>;
|
|
198
198
|
/**
|
|
199
199
|
* Built-in log formats.
|
|
200
200
|
* - "json" - JSON format, useful for structured logging and log aggregation. {@link JsonFormatterProvider}
|
|
201
201
|
* - "pretty" - Simple text format, human-readable, with colors. {@link SimpleFormatterProvider}
|
|
202
202
|
* - "raw" - Raw format, no formatting, just the message. {@link RawFormatterProvider}
|
|
203
203
|
*/
|
|
204
|
-
LOG_FORMAT:
|
|
204
|
+
LOG_FORMAT: alepha99.TOptional<alepha99.TUnsafe<"json" | "pretty" | "raw">>;
|
|
205
205
|
}>;
|
|
206
206
|
declare module "alepha" {
|
|
207
207
|
interface Env extends Partial<Static<typeof envSchema$6>> {}
|
|
@@ -412,7 +412,7 @@ interface ControlSelectProps extends GenericControlProps {
|
|
|
412
412
|
*
|
|
413
413
|
* Automatically detects enum values and array types from schema.
|
|
414
414
|
*/
|
|
415
|
-
declare const ControlSelect: (props: ControlSelectProps) =>
|
|
415
|
+
declare const ControlSelect: (props: ControlSelectProps) => react_jsx_runtime13.JSX.Element | null;
|
|
416
416
|
//#endregion
|
|
417
417
|
//#region src/core/components/form/Control.d.ts
|
|
418
418
|
interface ControlProps extends GenericControlProps {
|
|
@@ -452,22 +452,22 @@ interface ControlProps extends GenericControlProps {
|
|
|
452
452
|
*
|
|
453
453
|
* Automatically handles labels, descriptions, error messages, required state, and default icons.
|
|
454
454
|
*/
|
|
455
|
-
declare const Control: (_props: ControlProps) =>
|
|
455
|
+
declare const Control: (_props: ControlProps) => react_jsx_runtime13.JSX.Element | null;
|
|
456
456
|
type CustomControlProps = {
|
|
457
457
|
defaultValue: any;
|
|
458
458
|
onChange: (value: any) => void;
|
|
459
459
|
};
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region ../alepha/src/server/schemas/errorSchema.d.ts
|
|
462
|
-
declare const errorSchema:
|
|
463
|
-
error:
|
|
464
|
-
status:
|
|
465
|
-
message:
|
|
466
|
-
details:
|
|
467
|
-
requestId:
|
|
468
|
-
cause:
|
|
469
|
-
name:
|
|
470
|
-
message:
|
|
462
|
+
declare const errorSchema: alepha99.TObject<{
|
|
463
|
+
error: alepha99.TString;
|
|
464
|
+
status: alepha99.TInteger;
|
|
465
|
+
message: alepha99.TString;
|
|
466
|
+
details: alepha99.TOptional<alepha99.TString>;
|
|
467
|
+
requestId: alepha99.TOptional<alepha99.TString>;
|
|
468
|
+
cause: alepha99.TOptional<alepha99.TObject<{
|
|
469
|
+
name: alepha99.TString;
|
|
470
|
+
message: alepha99.TString;
|
|
471
471
|
}>>;
|
|
472
472
|
}>;
|
|
473
473
|
type ErrorSchema = Static<typeof errorSchema>;
|
|
@@ -724,8 +724,8 @@ declare class ServerTimingProvider {
|
|
|
724
724
|
prefix: string;
|
|
725
725
|
disabled: boolean;
|
|
726
726
|
};
|
|
727
|
-
readonly onRequest:
|
|
728
|
-
readonly onResponse:
|
|
727
|
+
readonly onRequest: alepha99.HookPrimitive<"server:onRequest">;
|
|
728
|
+
readonly onResponse: alepha99.HookPrimitive<"server:onResponse">;
|
|
729
729
|
protected get handlerName(): string;
|
|
730
730
|
beginTiming(name: string): void;
|
|
731
731
|
endTiming(name: string): void;
|
|
@@ -789,11 +789,11 @@ declare class ServerProvider {
|
|
|
789
789
|
/**
|
|
790
790
|
* When a Node.js HTTP request is received from outside. (Vercel, AWS Lambda, etc.)
|
|
791
791
|
*/
|
|
792
|
-
protected readonly onNodeRequest:
|
|
792
|
+
protected readonly onNodeRequest: alepha99.HookPrimitive<"node:request">;
|
|
793
793
|
/**
|
|
794
794
|
* When a Web (Fetch API) request is received from outside. (Netlify, Cloudflare Workers, etc.)
|
|
795
795
|
*/
|
|
796
|
-
protected readonly onWebRequest:
|
|
796
|
+
protected readonly onWebRequest: alepha99.HookPrimitive<"web:request">;
|
|
797
797
|
/**
|
|
798
798
|
* Handle Node.js HTTP request event.
|
|
799
799
|
*
|
|
@@ -1128,18 +1128,18 @@ type ServerActionHandler<TConfig extends RequestConfigSchema = RequestConfigSche
|
|
|
1128
1128
|
interface ServerActionRequest<TConfig extends RequestConfigSchema> extends ServerRequest<TConfig> {}
|
|
1129
1129
|
//#endregion
|
|
1130
1130
|
//#region ../alepha/src/server/providers/BunHttpServerProvider.d.ts
|
|
1131
|
-
declare const envSchema$5:
|
|
1132
|
-
SERVER_PORT:
|
|
1133
|
-
SERVER_HOST:
|
|
1131
|
+
declare const envSchema$5: alepha99.TObject<{
|
|
1132
|
+
SERVER_PORT: alepha99.TInteger;
|
|
1133
|
+
SERVER_HOST: alepha99.TString;
|
|
1134
1134
|
}>;
|
|
1135
1135
|
declare module "alepha" {
|
|
1136
1136
|
interface Env extends Partial<Static<typeof envSchema$5>> {}
|
|
1137
1137
|
}
|
|
1138
1138
|
//#endregion
|
|
1139
1139
|
//#region ../alepha/src/server/providers/NodeHttpServerProvider.d.ts
|
|
1140
|
-
declare const envSchema$4:
|
|
1141
|
-
SERVER_PORT:
|
|
1142
|
-
SERVER_HOST:
|
|
1140
|
+
declare const envSchema$4: alepha99.TObject<{
|
|
1141
|
+
SERVER_PORT: alepha99.TInteger;
|
|
1142
|
+
SERVER_HOST: alepha99.TString;
|
|
1143
1143
|
}>;
|
|
1144
1144
|
declare module "alepha" {
|
|
1145
1145
|
interface Env extends Partial<Static<typeof envSchema$4>> {}
|
|
@@ -1316,8 +1316,8 @@ declare class Redirection extends Error {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
//#endregion
|
|
1318
1318
|
//#region ../react/src/core/providers/ReactPageProvider.d.ts
|
|
1319
|
-
declare const envSchema$3:
|
|
1320
|
-
REACT_STRICT_MODE:
|
|
1319
|
+
declare const envSchema$3: alepha99.TObject<{
|
|
1320
|
+
REACT_STRICT_MODE: alepha99.TBoolean;
|
|
1321
1321
|
}>;
|
|
1322
1322
|
declare module "alepha" {
|
|
1323
1323
|
interface Env extends Partial<Static<typeof envSchema$3>> {}
|
|
@@ -1618,15 +1618,15 @@ type CssAnimation = {
|
|
|
1618
1618
|
};
|
|
1619
1619
|
//#endregion
|
|
1620
1620
|
//#region ../alepha/src/security/schemas/userAccountInfoSchema.d.ts
|
|
1621
|
-
declare const userAccountInfoSchema:
|
|
1622
|
-
id:
|
|
1623
|
-
name:
|
|
1624
|
-
email:
|
|
1625
|
-
username:
|
|
1626
|
-
picture:
|
|
1627
|
-
sessionId:
|
|
1628
|
-
organizations:
|
|
1629
|
-
roles:
|
|
1621
|
+
declare const userAccountInfoSchema: alepha99.TObject<{
|
|
1622
|
+
id: alepha99.TString;
|
|
1623
|
+
name: alepha99.TOptional<alepha99.TString>;
|
|
1624
|
+
email: alepha99.TOptional<alepha99.TString>;
|
|
1625
|
+
username: alepha99.TOptional<alepha99.TString>;
|
|
1626
|
+
picture: alepha99.TOptional<alepha99.TString>;
|
|
1627
|
+
sessionId: alepha99.TOptional<alepha99.TString>;
|
|
1628
|
+
organizations: alepha99.TOptional<alepha99.TArray<alepha99.TString>>;
|
|
1629
|
+
roles: alepha99.TOptional<alepha99.TArray<alepha99.TString>>;
|
|
1630
1630
|
}>;
|
|
1631
1631
|
type UserAccount = Static<typeof userAccountInfoSchema>;
|
|
1632
1632
|
//#endregion
|
|
@@ -1652,8 +1652,8 @@ interface UserAccountToken extends UserAccount {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
//#endregion
|
|
1654
1654
|
//#region ../alepha/src/security/providers/SecurityProvider.d.ts
|
|
1655
|
-
declare const envSchema$2:
|
|
1656
|
-
APP_SECRET:
|
|
1655
|
+
declare const envSchema$2: alepha99.TObject<{
|
|
1656
|
+
APP_SECRET: alepha99.TString;
|
|
1657
1657
|
}>;
|
|
1658
1658
|
declare module "alepha" {
|
|
1659
1659
|
interface Env extends Partial<Static<typeof envSchema$2>> {}
|
|
@@ -1746,15 +1746,15 @@ declare module "alepha/server" {
|
|
|
1746
1746
|
*/
|
|
1747
1747
|
//#endregion
|
|
1748
1748
|
//#region ../alepha/src/server-links/schemas/apiLinksResponseSchema.d.ts
|
|
1749
|
-
declare const apiLinksResponseSchema:
|
|
1750
|
-
prefix:
|
|
1751
|
-
links:
|
|
1752
|
-
name:
|
|
1753
|
-
group:
|
|
1754
|
-
path:
|
|
1755
|
-
method:
|
|
1756
|
-
requestBodyType:
|
|
1757
|
-
service:
|
|
1749
|
+
declare const apiLinksResponseSchema: alepha99.TObject<{
|
|
1750
|
+
prefix: alepha99.TOptional<alepha99.TString>;
|
|
1751
|
+
links: alepha99.TArray<alepha99.TObject<{
|
|
1752
|
+
name: alepha99.TString;
|
|
1753
|
+
group: alepha99.TOptional<alepha99.TString>;
|
|
1754
|
+
path: alepha99.TString;
|
|
1755
|
+
method: alepha99.TOptional<alepha99.TString>;
|
|
1756
|
+
requestBodyType: alepha99.TOptional<alepha99.TString>;
|
|
1757
|
+
service: alepha99.TOptional<alepha99.TString>;
|
|
1758
1758
|
}>>;
|
|
1759
1759
|
}>;
|
|
1760
1760
|
type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
|
|
@@ -1784,8 +1784,8 @@ declare module "alepha" {
|
|
|
1784
1784
|
*/
|
|
1785
1785
|
//#endregion
|
|
1786
1786
|
//#region ../react/src/core/providers/ReactBrowserProvider.d.ts
|
|
1787
|
-
declare const envSchema$1:
|
|
1788
|
-
REACT_ROOT_ID:
|
|
1787
|
+
declare const envSchema$1: alepha99.TObject<{
|
|
1788
|
+
REACT_ROOT_ID: alepha99.TString;
|
|
1789
1789
|
}>;
|
|
1790
1790
|
declare module "alepha" {
|
|
1791
1791
|
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
@@ -1793,8 +1793,8 @@ declare module "alepha" {
|
|
|
1793
1793
|
/**
|
|
1794
1794
|
* React browser renderer configuration atom
|
|
1795
1795
|
*/
|
|
1796
|
-
declare const reactBrowserOptions:
|
|
1797
|
-
scrollRestoration:
|
|
1796
|
+
declare const reactBrowserOptions: alepha99.Atom<alepha99.TObject<{
|
|
1797
|
+
scrollRestoration: alepha99.TUnsafe<"top" | "manual">;
|
|
1798
1798
|
}>, "alepha.react.browser.options">;
|
|
1799
1799
|
type ReactBrowserRendererOptions = Static<typeof reactBrowserOptions.schema>;
|
|
1800
1800
|
declare module "alepha" {
|
|
@@ -1936,10 +1936,10 @@ declare module "@alepha/react" {
|
|
|
1936
1936
|
*/
|
|
1937
1937
|
//#endregion
|
|
1938
1938
|
//#region ../react/src/core/providers/ReactServerProvider.d.ts
|
|
1939
|
-
declare const envSchema:
|
|
1940
|
-
REACT_SSR_ENABLED:
|
|
1941
|
-
REACT_ROOT_ID:
|
|
1942
|
-
REACT_SERVER_TEMPLATE:
|
|
1939
|
+
declare const envSchema: alepha99.TObject<{
|
|
1940
|
+
REACT_SSR_ENABLED: alepha99.TOptional<alepha99.TBoolean>;
|
|
1941
|
+
REACT_ROOT_ID: alepha99.TString;
|
|
1942
|
+
REACT_SERVER_TEMPLATE: alepha99.TOptional<alepha99.TString>;
|
|
1943
1943
|
}>;
|
|
1944
1944
|
declare module "alepha" {
|
|
1945
1945
|
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
@@ -1950,11 +1950,11 @@ declare module "alepha" {
|
|
|
1950
1950
|
/**
|
|
1951
1951
|
* React server provider configuration atom
|
|
1952
1952
|
*/
|
|
1953
|
-
declare const reactServerOptions:
|
|
1954
|
-
publicDir:
|
|
1955
|
-
staticServer:
|
|
1956
|
-
disabled:
|
|
1957
|
-
path:
|
|
1953
|
+
declare const reactServerOptions: alepha99.Atom<alepha99.TObject<{
|
|
1954
|
+
publicDir: alepha99.TString;
|
|
1955
|
+
staticServer: alepha99.TObject<{
|
|
1956
|
+
disabled: alepha99.TBoolean;
|
|
1957
|
+
path: alepha99.TString;
|
|
1958
1958
|
}>;
|
|
1959
1959
|
}>, "alepha.react.server.options">;
|
|
1960
1960
|
type ReactServerProviderOptions = Static<typeof reactServerOptions.schema>;
|
|
@@ -2160,7 +2160,7 @@ interface ActionCommonProps extends ButtonProps {
|
|
|
2160
2160
|
intent?: "primary" | "success" | "danger" | "warning" | "info";
|
|
2161
2161
|
}
|
|
2162
2162
|
type ActionProps = ActionCommonProps & (ActionNavigationButtonProps | ActionClickButtonProps | ActionSubmitButtonProps | ActionHookButtonProps | {});
|
|
2163
|
-
declare const ActionButton: (_props: ActionProps) =>
|
|
2163
|
+
declare const ActionButton: (_props: ActionProps) => react_jsx_runtime13.JSX.Element;
|
|
2164
2164
|
interface ActionSubmitButtonProps extends ButtonProps {
|
|
2165
2165
|
form: FormModel<any>;
|
|
2166
2166
|
type?: "submit" | "reset";
|
|
@@ -2183,7 +2183,7 @@ interface ActionNavigationButtonProps extends ButtonProps {
|
|
|
2183
2183
|
//#endregion
|
|
2184
2184
|
//#region src/core/components/buttons/BurgerButton.d.ts
|
|
2185
2185
|
interface BurgerButtonProps extends BurgerProps {}
|
|
2186
|
-
declare const BurgerButton: (props: BurgerButtonProps) =>
|
|
2186
|
+
declare const BurgerButton: (props: BurgerButtonProps) => react_jsx_runtime13.JSX.Element;
|
|
2187
2187
|
//#endregion
|
|
2188
2188
|
//#region src/core/components/buttons/ClipboardButton.d.ts
|
|
2189
2189
|
interface ClipboardButtonProps extends Omit<ActionCommonProps, "onClick" | "icon"> {
|
|
@@ -2204,7 +2204,7 @@ interface ClipboardButtonProps extends Omit<ActionCommonProps, "onClick" | "icon
|
|
|
2204
2204
|
*/
|
|
2205
2205
|
copiedLabel?: string;
|
|
2206
2206
|
}
|
|
2207
|
-
declare const ClipboardButton: (props: ClipboardButtonProps) =>
|
|
2207
|
+
declare const ClipboardButton: (props: ClipboardButtonProps) => react_jsx_runtime13.JSX.Element;
|
|
2208
2208
|
//#endregion
|
|
2209
2209
|
//#region src/core/components/buttons/DarkModeButton.d.ts
|
|
2210
2210
|
interface DarkModeButtonProps {
|
|
@@ -2215,27 +2215,27 @@ interface DarkModeButtonProps {
|
|
|
2215
2215
|
segmentedProps?: Partial<SegmentedControlProps>;
|
|
2216
2216
|
actionProps?: Partial<ActionProps>;
|
|
2217
2217
|
}
|
|
2218
|
-
declare const DarkModeButton: (props: DarkModeButtonProps) =>
|
|
2218
|
+
declare const DarkModeButton: (props: DarkModeButtonProps) => react_jsx_runtime13.JSX.Element;
|
|
2219
2219
|
//#endregion
|
|
2220
2220
|
//#region src/core/components/buttons/LanguageButton.d.ts
|
|
2221
2221
|
interface LanguageButtonProps {
|
|
2222
2222
|
languages?: string[];
|
|
2223
2223
|
actionProps?: ActionProps;
|
|
2224
2224
|
}
|
|
2225
|
-
declare const LanguageButton: (props: LanguageButtonProps) =>
|
|
2225
|
+
declare const LanguageButton: (props: LanguageButtonProps) => react_jsx_runtime13.JSX.Element;
|
|
2226
2226
|
//#endregion
|
|
2227
2227
|
//#region src/core/components/buttons/OmnibarButton.d.ts
|
|
2228
2228
|
interface OmnibarButtonProps {
|
|
2229
2229
|
actionProps?: ActionProps;
|
|
2230
2230
|
collapsed?: boolean;
|
|
2231
2231
|
}
|
|
2232
|
-
declare const OmnibarButton: (props: OmnibarButtonProps) =>
|
|
2232
|
+
declare const OmnibarButton: (props: OmnibarButtonProps) => react_jsx_runtime13.JSX.Element;
|
|
2233
2233
|
//#endregion
|
|
2234
2234
|
//#region src/core/components/buttons/ThemeButton.d.ts
|
|
2235
2235
|
interface ThemeButtonProps {
|
|
2236
2236
|
actionProps?: Partial<ActionProps>;
|
|
2237
2237
|
}
|
|
2238
|
-
declare const ThemeButton: (props: ThemeButtonProps) =>
|
|
2238
|
+
declare const ThemeButton: (props: ThemeButtonProps) => react_jsx_runtime13.JSX.Element;
|
|
2239
2239
|
//#endregion
|
|
2240
2240
|
//#region src/core/components/data/JsonViewer.d.ts
|
|
2241
2241
|
interface JsonViewerProps {
|
|
@@ -2251,7 +2251,7 @@ declare const JsonViewer: ({
|
|
|
2251
2251
|
maxDepth,
|
|
2252
2252
|
copyable,
|
|
2253
2253
|
size
|
|
2254
|
-
}: JsonViewerProps) =>
|
|
2254
|
+
}: JsonViewerProps) => react_jsx_runtime13.JSX.Element;
|
|
2255
2255
|
//#endregion
|
|
2256
2256
|
//#region src/core/services/DialogService.d.ts
|
|
2257
2257
|
interface BaseDialogOptions extends Partial<ModalProps> {
|
|
@@ -2336,19 +2336,19 @@ declare class DialogService {
|
|
|
2336
2336
|
declare const AlertDialog: ({
|
|
2337
2337
|
options,
|
|
2338
2338
|
onClose
|
|
2339
|
-
}: AlertDialogProps) =>
|
|
2339
|
+
}: AlertDialogProps) => react_jsx_runtime13.JSX.Element;
|
|
2340
2340
|
//#endregion
|
|
2341
2341
|
//#region src/core/components/dialogs/ConfirmDialog.d.ts
|
|
2342
2342
|
declare const ConfirmDialog: ({
|
|
2343
2343
|
options,
|
|
2344
2344
|
onConfirm
|
|
2345
|
-
}: ConfirmDialogProps) =>
|
|
2345
|
+
}: ConfirmDialogProps) => react_jsx_runtime13.JSX.Element;
|
|
2346
2346
|
//#endregion
|
|
2347
2347
|
//#region src/core/components/dialogs/PromptDialog.d.ts
|
|
2348
2348
|
declare const PromptDialog: ({
|
|
2349
2349
|
options,
|
|
2350
2350
|
onSubmit
|
|
2351
|
-
}: PromptDialogProps) =>
|
|
2351
|
+
}: PromptDialogProps) => react_jsx_runtime13.JSX.Element;
|
|
2352
2352
|
//#endregion
|
|
2353
2353
|
//#region src/core/components/form/ControlDate.d.ts
|
|
2354
2354
|
interface ControlDateProps extends GenericControlProps {
|
|
@@ -2366,7 +2366,7 @@ interface ControlDateProps extends GenericControlProps {
|
|
|
2366
2366
|
*
|
|
2367
2367
|
* Automatically detects date formats from schema and renders appropriate picker.
|
|
2368
2368
|
*/
|
|
2369
|
-
declare const ControlDate: (props: ControlDateProps) =>
|
|
2369
|
+
declare const ControlDate: (props: ControlDateProps) => react_jsx_runtime13.JSX.Element | null;
|
|
2370
2370
|
//#endregion
|
|
2371
2371
|
//#region src/core/components/form/ControlQueryBuilder.d.ts
|
|
2372
2372
|
interface ControlQueryBuilderProps extends Omit<TextInputProps, "value" | "onChange"> {
|
|
@@ -2385,7 +2385,7 @@ declare const ControlQueryBuilder: ({
|
|
|
2385
2385
|
onChange,
|
|
2386
2386
|
placeholder,
|
|
2387
2387
|
...textInputProps
|
|
2388
|
-
}: ControlQueryBuilderProps) =>
|
|
2388
|
+
}: ControlQueryBuilderProps) => react_jsx_runtime13.JSX.Element;
|
|
2389
2389
|
//#endregion
|
|
2390
2390
|
//#region src/core/components/form/TypeForm.d.ts
|
|
2391
2391
|
interface TypeFormProps<T$1 extends TObject> {
|
|
@@ -2431,7 +2431,7 @@ interface TypeFormProps<T$1 extends TObject> {
|
|
|
2431
2431
|
* return <TypeForm form={form} columns={2} />;
|
|
2432
2432
|
* ```
|
|
2433
2433
|
*/
|
|
2434
|
-
declare const TypeForm: <T$1 extends TObject>(props: TypeFormProps<T$1>) =>
|
|
2434
|
+
declare const TypeForm: <T$1 extends TObject>(props: TypeFormProps<T$1>) => react_jsx_runtime13.JSX.Element | null;
|
|
2435
2435
|
//#endregion
|
|
2436
2436
|
//#region src/core/components/layout/AppBar.d.ts
|
|
2437
2437
|
type AppBarItem = AppBarElement | AppBarBurger | AppBarDark | AppBarSearch | AppBarLang | AppBarSpacer | AppBarDivider;
|
|
@@ -2470,7 +2470,7 @@ interface AppBarProps {
|
|
|
2470
2470
|
flexProps?: FlexProps;
|
|
2471
2471
|
items?: AppBarItem[];
|
|
2472
2472
|
}
|
|
2473
|
-
declare const AppBar: (props: AppBarProps) =>
|
|
2473
|
+
declare const AppBar: (props: AppBarProps) => react_jsx_runtime13.JSX.Element;
|
|
2474
2474
|
//#endregion
|
|
2475
2475
|
//#region src/core/components/layout/Sidebar.d.ts
|
|
2476
2476
|
interface SidebarProps {
|
|
@@ -2487,7 +2487,7 @@ interface SidebarProps {
|
|
|
2487
2487
|
paths?: string[];
|
|
2488
2488
|
};
|
|
2489
2489
|
}
|
|
2490
|
-
declare const Sidebar: (props: SidebarProps) =>
|
|
2490
|
+
declare const Sidebar: (props: SidebarProps) => react_jsx_runtime13.JSX.Element;
|
|
2491
2491
|
interface SidebarItemProps {
|
|
2492
2492
|
item: SidebarMenuItem;
|
|
2493
2493
|
level: number;
|
|
@@ -2575,7 +2575,7 @@ declare module "alepha" {
|
|
|
2575
2575
|
"alepha.ui.sidebar.collapsed"?: boolean;
|
|
2576
2576
|
}
|
|
2577
2577
|
}
|
|
2578
|
-
declare const AdminShell: (props: AdminShellProps) =>
|
|
2578
|
+
declare const AdminShell: (props: AdminShellProps) => react_jsx_runtime13.JSX.Element;
|
|
2579
2579
|
//#endregion
|
|
2580
2580
|
//#region src/core/components/layout/Omnibar.d.ts
|
|
2581
2581
|
interface OmnibarProps {
|
|
@@ -2583,7 +2583,7 @@ interface OmnibarProps {
|
|
|
2583
2583
|
searchPlaceholder?: string;
|
|
2584
2584
|
nothingFound?: ReactNode;
|
|
2585
2585
|
}
|
|
2586
|
-
declare const Omnibar: (props: OmnibarProps) =>
|
|
2586
|
+
declare const Omnibar: (props: OmnibarProps) => react_jsx_runtime13.JSX.Element;
|
|
2587
2587
|
//#endregion
|
|
2588
2588
|
//#region src/core/components/layout/AlephaMantineProvider.d.ts
|
|
2589
2589
|
interface AlephaMantineProviderProps {
|
|
@@ -2595,7 +2595,7 @@ interface AlephaMantineProviderProps {
|
|
|
2595
2595
|
modals?: ModalsProviderProps;
|
|
2596
2596
|
omnibar?: OmnibarProps;
|
|
2597
2597
|
}
|
|
2598
|
-
declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) =>
|
|
2598
|
+
declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) => react_jsx_runtime13.JSX.Element;
|
|
2599
2599
|
//#endregion
|
|
2600
2600
|
//#region src/core/components/table/DataTable.d.ts
|
|
2601
2601
|
interface DataTableColumnContext<Filters extends TObject> {
|
|
@@ -2657,7 +2657,7 @@ interface DataTableProps<T$1 extends object, Filters extends TObject> {
|
|
|
2657
2657
|
*/
|
|
2658
2658
|
tableTrProps?: (item: T$1) => TableTrProps;
|
|
2659
2659
|
}
|
|
2660
|
-
declare const DataTable: <T$1 extends object, Filters extends TObject>(props: DataTableProps<T$1, Filters>) =>
|
|
2660
|
+
declare const DataTable: <T$1 extends object, Filters extends TObject>(props: DataTableProps<T$1, Filters>) => react_jsx_runtime13.JSX.Element;
|
|
2661
2661
|
//#endregion
|
|
2662
2662
|
//#region src/core/constants/ui.d.ts
|
|
2663
2663
|
declare const ui: {
|
|
@@ -2798,13 +2798,13 @@ declare module "alepha/server" {
|
|
|
2798
2798
|
*/
|
|
2799
2799
|
//#endregion
|
|
2800
2800
|
//#region src/core/providers/ThemeProvider.d.ts
|
|
2801
|
-
declare const
|
|
2802
|
-
id:
|
|
2801
|
+
declare const mantineThemeAtom: alepha99.Atom<alepha99.TObject<{
|
|
2802
|
+
id: alepha99.TString;
|
|
2803
2803
|
}>, "alepha.ui.theme">;
|
|
2804
|
-
type Theme = Static<typeof
|
|
2804
|
+
type Theme = Static<typeof mantineThemeAtom.schema>;
|
|
2805
2805
|
declare module "alepha" {
|
|
2806
2806
|
interface State {
|
|
2807
|
-
[
|
|
2807
|
+
[mantineThemeAtom.key]?: Theme;
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
2810
|
type AlephaTheme = MantineThemeOverride & {
|
|
@@ -2814,8 +2814,8 @@ type AlephaTheme = MantineThemeOverride & {
|
|
|
2814
2814
|
};
|
|
2815
2815
|
declare class ThemeProvider {
|
|
2816
2816
|
protected readonly alepha: Alepha;
|
|
2817
|
-
protected themeCookie: AbstractCookiePrimitive<
|
|
2818
|
-
id:
|
|
2817
|
+
protected themeCookie: AbstractCookiePrimitive<alepha99.TObject<{
|
|
2818
|
+
id: alepha99.TString;
|
|
2819
2819
|
}>>;
|
|
2820
2820
|
themes: AlephaTheme[];
|
|
2821
2821
|
protected themeHead: HeadPrimitive;
|
|
@@ -2922,7 +2922,7 @@ declare module "@alepha/react" {
|
|
|
2922
2922
|
*
|
|
2923
2923
|
* @module alepha.ui
|
|
2924
2924
|
*/
|
|
2925
|
-
declare const AlephaUI:
|
|
2925
|
+
declare const AlephaUI: alepha99.Service<alepha99.Module>;
|
|
2926
2926
|
//#endregion
|
|
2927
|
-
export { ActionButton, type ActionClickButtonProps, type ActionCommonProps, type ActionMenuConfig, type ActionMenuItem, type ActionNavigationButtonProps, type ActionProps, type ActionSubmitButtonProps, AdminShell, type AdminShellProps, AlephaMantineProvider, AlephaTheme, AlephaUI, AlertDialog, type AlertDialogOptions, type AlertDialogProps, AppBar, type AppBarBurger, type AppBarDark, type AppBarDivider, type AppBarElement, type AppBarItem, type AppBarLang, type AppBarProps, type AppBarSearch, type AppBarSpacer, type BaseDialogOptions, BurgerButton, ClipboardButton, type ClipboardButtonProps, ConfirmDialog, type ConfirmDialogOptions, type ConfirmDialogProps, Control, ControlDate, ControlQueryBuilder, ControlSelect, DarkModeButton, DataTable, type DataTableColumn, type DataTableProps, DialogService, Flex, IconSize, JsonViewer, LanguageButton, OPERATOR_INFO, Omnibar, OmnibarButton, PromptDialog, type PromptDialogOptions, type PromptDialogProps, RootRouter, SchemaField, Sidebar, type SidebarAbstractItem, type SidebarButtonTheme, type SidebarDivider, type SidebarElement, type SidebarItemProps, type SidebarMenuItem, type SidebarNode, type SidebarProps, type SidebarSearch, type SidebarSection, type SidebarSpacer, type SidebarTheme, Text, Theme, ThemeButton, type ThemeButtonProps, ThemeProvider, ToastService, TypeForm, capitalize, extractSchemaFields, getDefaultIcon, getOperatorsForField,
|
|
2927
|
+
export { ActionButton, type ActionClickButtonProps, type ActionCommonProps, type ActionMenuConfig, type ActionMenuItem, type ActionNavigationButtonProps, type ActionProps, type ActionSubmitButtonProps, AdminShell, type AdminShellProps, AlephaMantineProvider, AlephaTheme, AlephaUI, AlertDialog, type AlertDialogOptions, type AlertDialogProps, AppBar, type AppBarBurger, type AppBarDark, type AppBarDivider, type AppBarElement, type AppBarItem, type AppBarLang, type AppBarProps, type AppBarSearch, type AppBarSpacer, type BaseDialogOptions, BurgerButton, ClipboardButton, type ClipboardButtonProps, ConfirmDialog, type ConfirmDialogOptions, type ConfirmDialogProps, Control, ControlDate, ControlQueryBuilder, ControlSelect, DarkModeButton, DataTable, type DataTableColumn, type DataTableProps, DialogService, Flex, IconSize, JsonViewer, LanguageButton, OPERATOR_INFO, Omnibar, OmnibarButton, PromptDialog, type PromptDialogOptions, type PromptDialogProps, RootRouter, SchemaField, Sidebar, type SidebarAbstractItem, type SidebarButtonTheme, type SidebarDivider, type SidebarElement, type SidebarItemProps, type SidebarMenuItem, type SidebarNode, type SidebarProps, type SidebarSearch, type SidebarSection, type SidebarSpacer, type SidebarTheme, Text, Theme, ThemeButton, type ThemeButtonProps, ThemeProvider, ToastService, TypeForm, capitalize, extractSchemaFields, getDefaultIcon, getOperatorsForField, mantineThemeAtom, prettyName, ui, useDialog, useToast };
|
|
2928
2928
|
//# sourceMappingURL=index.d.ts.map
|