@abpjs/account 0.9.0 → 1.1.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.
@@ -0,0 +1,40 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Props for AuthWrapper component
4
+ */
5
+ export interface AuthWrapperProps {
6
+ /**
7
+ * Main content to be rendered in the wrapper
8
+ */
9
+ children?: ReactNode;
10
+ /**
11
+ * Main content template reference (for consistency with Angular API)
12
+ */
13
+ mainContent?: ReactNode;
14
+ /**
15
+ * Cancel/footer content template reference
16
+ */
17
+ cancelContent?: ReactNode;
18
+ }
19
+ /**
20
+ * AuthWrapper - Authentication wrapper component
21
+ *
22
+ * This is the React equivalent of Angular's AuthWrapperComponent.
23
+ * It provides a consistent wrapper layout for authentication-related forms
24
+ * like login, register, and password reset.
25
+ *
26
+ * In Angular, this used TemplateRef for content projection.
27
+ * In React, we use children and render props pattern.
28
+ *
29
+ * @since 1.1.0
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * <AuthWrapper
34
+ * mainContent={<LoginForm />}
35
+ * cancelContent={<Link to="/register">Create account</Link>}
36
+ * />
37
+ * ```
38
+ */
39
+ export declare function AuthWrapper({ children, mainContent, cancelContent, }: AuthWrapperProps): import("react/jsx-runtime").JSX.Element;
40
+ export default AuthWrapper;
@@ -0,0 +1 @@
1
+ export { AuthWrapper, type AuthWrapperProps } from './AuthWrapper';
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Props for ChangePasswordForm component
3
+ */
4
+ export interface ChangePasswordFormProps {
5
+ /**
6
+ * Callback fired on successful password change
7
+ */
8
+ onSuccess?: () => void;
9
+ /**
10
+ * Callback fired on password change error
11
+ */
12
+ onError?: (error: string) => void;
13
+ }
14
+ /**
15
+ * ChangePasswordForm - Password change form component
16
+ *
17
+ * This is the React equivalent of Angular's ChangePasswordComponent.
18
+ * It provides a form for authenticated users to change their password.
19
+ *
20
+ * @since 1.1.0
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <ChangePasswordForm
25
+ * onSuccess={() => console.log('Password changed!')}
26
+ * onError={(err) => console.error(err)}
27
+ * />
28
+ * ```
29
+ */
30
+ export declare function ChangePasswordForm({ onSuccess, onError }: ChangePasswordFormProps): import("react/jsx-runtime").JSX.Element;
31
+ export default ChangePasswordForm;
@@ -0,0 +1 @@
1
+ export { ChangePasswordForm, type ChangePasswordFormProps } from './ChangePasswordForm';
@@ -0,0 +1,46 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * Tab configuration for manage profile
4
+ */
5
+ interface ProfileTab {
6
+ id: string;
7
+ label: string;
8
+ content: ReactNode;
9
+ }
10
+ /**
11
+ * Props for ManageProfile component
12
+ */
13
+ export interface ManageProfileProps {
14
+ /**
15
+ * Initial tab index to display
16
+ * @default 0
17
+ */
18
+ defaultTabIndex?: number;
19
+ /**
20
+ * Callback fired when tab changes
21
+ */
22
+ onTabChange?: (index: number) => void;
23
+ /**
24
+ * Custom tabs to add/replace default tabs
25
+ */
26
+ customTabs?: ProfileTab[];
27
+ }
28
+ /**
29
+ * ManageProfile - User profile management component
30
+ *
31
+ * This is the React equivalent of Angular's ManageProfileComponent.
32
+ * It provides a tabbed interface for managing user profile settings,
33
+ * including personal information and password change.
34
+ *
35
+ * @since 1.1.0
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * <ManageProfile
40
+ * defaultTabIndex={0}
41
+ * onTabChange={(index) => console.log('Tab changed to', index)}
42
+ * />
43
+ * ```
44
+ */
45
+ export declare function ManageProfile({ defaultTabIndex, onTabChange, customTabs, }: ManageProfileProps): import("react/jsx-runtime").JSX.Element;
46
+ export default ManageProfile;
@@ -0,0 +1 @@
1
+ export { ManageProfile, type ManageProfileProps } from './ManageProfile';
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Props for PersonalSettingsForm component
3
+ */
4
+ export interface PersonalSettingsFormProps {
5
+ /**
6
+ * Callback fired on successful profile update
7
+ */
8
+ onSuccess?: () => void;
9
+ /**
10
+ * Callback fired on profile update error
11
+ */
12
+ onError?: (error: string) => void;
13
+ }
14
+ /**
15
+ * PersonalSettingsForm - User personal settings form component
16
+ *
17
+ * This is the React equivalent of Angular's PersonalSettingsComponent.
18
+ * It provides a form for authenticated users to update their personal information.
19
+ *
20
+ * @since 1.1.0
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <PersonalSettingsForm
25
+ * onSuccess={() => console.log('Profile updated!')}
26
+ * onError={(err) => console.error(err)}
27
+ * />
28
+ * ```
29
+ */
30
+ export declare function PersonalSettingsForm({ onSuccess, onError }: PersonalSettingsFormProps): import("react/jsx-runtime").JSX.Element | null;
31
+ export default PersonalSettingsForm;
@@ -0,0 +1 @@
1
+ export { PersonalSettingsForm, type PersonalSettingsFormProps } from './PersonalSettingsForm';
@@ -1,3 +1,7 @@
1
- export { TenantBox, type TenantBoxProps } from './TenantBox';
1
+ export { AuthWrapper, type AuthWrapperProps } from './AuthWrapper';
2
+ export { ChangePasswordForm, type ChangePasswordFormProps } from './ChangePasswordForm';
2
3
  export { LoginForm, type LoginFormProps } from './LoginForm';
4
+ export { ManageProfile, type ManageProfileProps } from './ManageProfile';
5
+ export { PersonalSettingsForm, type PersonalSettingsFormProps } from './PersonalSettingsForm';
3
6
  export { RegisterForm, type RegisterFormProps } from './RegisterForm';
7
+ export { TenantBox, type TenantBoxProps } from './TenantBox';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @abpjs/account
3
3
  * ABP Framework Account module for React
4
- * Translated from @abp/ng.account v0.9.0
4
+ * Translated from @abp/ng.account v1.1.0
5
5
  */
6
6
  export * from './models';
7
7
  export * from './services';