@abpjs/theme-basic 2.9.0 → 3.0.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,53 @@
1
+ /**
2
+ * CurrentUserComponent
3
+ * Translated from @abp/ng.theme.basic/lib/components/nav-items/current-user.component.ts v3.0.0
4
+ *
5
+ * Public API component for displaying the current user nav item.
6
+ * Can be replaced using the component replacement system with eThemeBasicComponents.CurrentUser.
7
+ *
8
+ * @since 3.0.0
9
+ */
10
+ import React from 'react';
11
+ import { type SystemStyleObject } from '@chakra-ui/react';
12
+ /**
13
+ * Props for the CurrentUserComponent.
14
+ * @since 3.0.0
15
+ */
16
+ export interface CurrentUserComponentProps {
17
+ /** Whether to display in small screen (mobile) mode */
18
+ smallScreen?: boolean;
19
+ /** URL to redirect to for login (default: /account/login) */
20
+ loginUrl?: string;
21
+ /** URL to redirect to for profile (default: /account/manage) */
22
+ profileUrl?: string;
23
+ /** URL to redirect to for change password (default: /account/manage) */
24
+ changePasswordUrl?: string;
25
+ /** Custom styles for the container */
26
+ containerStyle?: SystemStyleObject;
27
+ /** Z-index for the dropdown menu */
28
+ menuZIndex?: number;
29
+ }
30
+ /**
31
+ * Public API component for the current user nav item.
32
+ * Displays user avatar, name, and dropdown menu with profile options.
33
+ *
34
+ * This component is part of the theme-basic public API and can be
35
+ * replaced using the component replacement system with eThemeBasicComponents.CurrentUser.
36
+ *
37
+ * @since 3.0.0
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * // Basic usage
42
+ * <CurrentUserComponent />
43
+ *
44
+ * // With custom URLs
45
+ * <CurrentUserComponent
46
+ * loginUrl="/login"
47
+ * profileUrl="/profile"
48
+ * changePasswordUrl="/change-password"
49
+ * />
50
+ * ```
51
+ */
52
+ export declare function CurrentUserComponent({ smallScreen: _smallScreen, loginUrl, profileUrl, changePasswordUrl, containerStyle, menuZIndex, }: CurrentUserComponentProps): React.ReactElement;
53
+ export default CurrentUserComponent;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * LanguagesComponent
3
+ * Translated from @abp/ng.theme.basic/lib/components/nav-items/languages.component.ts v3.0.0
4
+ *
5
+ * Public API component for displaying the language selector nav item.
6
+ * Can be replaced using the component replacement system with eThemeBasicComponents.Languages.
7
+ *
8
+ * @since 3.0.0
9
+ */
10
+ import React from 'react';
11
+ import { type SystemStyleObject } from '@chakra-ui/react';
12
+ /**
13
+ * Props for the LanguagesComponent.
14
+ * @since 3.0.0
15
+ */
16
+ export interface LanguagesComponentProps {
17
+ /** Whether to display in small screen (mobile) mode */
18
+ smallScreen?: boolean;
19
+ /** Whether to show in compact mode (icon only) */
20
+ compact?: boolean;
21
+ /** Custom styles for the container */
22
+ containerStyle?: SystemStyleObject;
23
+ /** Z-index for the dropdown menu */
24
+ menuZIndex?: number;
25
+ }
26
+ /**
27
+ * Public API component for the language selector nav item.
28
+ * Displays a dropdown menu to change the application language.
29
+ *
30
+ * This component is part of the theme-basic public API and can be
31
+ * replaced using the component replacement system with eThemeBasicComponents.Languages.
32
+ *
33
+ * @since 3.0.0
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * // Basic usage
38
+ * <LanguagesComponent />
39
+ *
40
+ * // Compact mode (icon only)
41
+ * <LanguagesComponent compact />
42
+ *
43
+ * // For small screens
44
+ * <LanguagesComponent smallScreen />
45
+ * ```
46
+ */
47
+ export declare function LanguagesComponent({ smallScreen: _smallScreen, compact, containerStyle, menuZIndex, }: LanguagesComponentProps): React.ReactElement | null;
48
+ export default LanguagesComponent;
@@ -1,39 +1,31 @@
1
1
  import React from 'react';
2
- import { UserProfileProps } from '../blocks/sidebars/sidebar-with-collapsible/user-profile';
3
2
  /**
4
3
  * Props for the NavItemsComponent.
5
4
  * @since 2.7.0
5
+ * @updated 3.0.0 - Simplified to use NavItemsService from @abpjs/theme-shared
6
6
  */
7
7
  export interface NavItemsComponentProps {
8
8
  /** Whether the screen is small (mobile) */
9
9
  smallScreen?: boolean;
10
- /** User profile action handlers */
11
- userProfileProps?: UserProfileProps;
12
- /** Whether to show language selector */
13
- showLanguageSelector?: boolean;
14
- /** Whether to show current user */
15
- showCurrentUser?: boolean;
16
10
  }
17
11
  /**
18
- * Public API component for navigation items (language selector, user menu, custom elements).
19
- * Handles the registration of built-in navigation elements and renders custom elements.
12
+ * Public API component for navigation items.
13
+ * Uses NavItemsService from @abpjs/theme-shared to manage nav items.
20
14
  *
21
15
  * This component is part of the theme-basic public API and can be
22
16
  * replaced using the component replacement system with eThemeBasicComponents.NavItems.
23
17
  *
24
18
  * @since 2.7.0 - Added as public API component
19
+ * @updated 3.0.0 - Now uses NavItemsService from @abpjs/theme-shared
25
20
  *
26
21
  * @example
27
22
  * ```tsx
28
- * <NavItemsComponent
29
- * showLanguageSelector={true}
30
- * showCurrentUser={true}
31
- * userProfileProps={{
32
- * onLogout: () => logout(),
33
- * onChangePassword: () => openChangePassword(),
34
- * }}
35
- * />
23
+ * // Basic usage - nav items are configured via NavItemsService
24
+ * <NavItemsComponent />
25
+ *
26
+ * // For small screens
27
+ * <NavItemsComponent smallScreen />
36
28
  * ```
37
29
  */
38
- export declare function NavItemsComponent({ smallScreen, userProfileProps, showLanguageSelector, showCurrentUser, }: NavItemsComponentProps): React.ReactElement;
30
+ export declare function NavItemsComponent({ smallScreen, }: NavItemsComponentProps): React.ReactElement;
39
31
  export default NavItemsComponent;
@@ -1,2 +1,4 @@
1
1
  export { NavItemsComponent, type NavItemsComponentProps } from './NavItemsComponent';
2
2
  export { NavItemsComponent as default } from './NavItemsComponent';
3
+ export { CurrentUserComponent, type CurrentUserComponentProps } from './CurrentUserComponent';
4
+ export { LanguagesComponent, type LanguagesComponentProps } from './LanguagesComponent';
@@ -35,5 +35,5 @@ export interface RoutesComponentProps {
35
35
  * <RoutesComponent routes={customRoutes} />
36
36
  * ```
37
37
  */
38
- export declare function RoutesComponent({ smallScreen, defaultIcon, routes: customRoutes, }: RoutesComponentProps): React.ReactElement;
38
+ export declare function RoutesComponent({ smallScreen: _smallScreen, defaultIcon, routes: customRoutes, }: RoutesComponentProps): React.ReactElement;
39
39
  export default RoutesComponent;
@@ -3,6 +3,7 @@
3
3
  * Used for component replacement/customization in the theme system.
4
4
  *
5
5
  * @since 2.7.0
6
+ * @updated 3.0.0 - Added CurrentUser and Languages component keys
6
7
  */
7
8
  export declare const eThemeBasicComponents: {
8
9
  readonly ApplicationLayout: "Theme.ApplicationLayoutComponent";
@@ -11,6 +12,16 @@ export declare const eThemeBasicComponents: {
11
12
  readonly Logo: "Theme.LogoComponent";
12
13
  readonly Routes: "Theme.RoutesComponent";
13
14
  readonly NavItems: "Theme.NavItemsComponent";
15
+ /**
16
+ * Component key for the current user nav item.
17
+ * @since 3.0.0
18
+ */
19
+ readonly CurrentUser: "Theme.CurrentUserComponent";
20
+ /**
21
+ * Component key for the languages nav item.
22
+ * @since 3.0.0
23
+ */
24
+ readonly Languages: "Theme.LanguagesComponent";
14
25
  };
15
26
  /**
16
27
  * Type for eThemeBasicComponents values
@@ -1,2 +1,7 @@
1
1
  export * from './components';
2
+ /**
3
+ * @deprecated eNavigationElementNames was removed in v3.0.0.
4
+ * Nav items are now managed via NavItemsService from @abpjs/theme-shared.
5
+ * This export is kept for backwards compatibility and will be removed in a future version.
6
+ */
2
7
  export * from './navigation-element-names';
@@ -3,6 +3,10 @@
3
3
  * Used for identifying built-in navigation elements in the layout.
4
4
  *
5
5
  * @since 2.7.0
6
+ * @deprecated This enum was removed in Angular v3.0.0. Nav items are now
7
+ * managed via NavItemsService from @abpjs/theme-shared. This export is kept
8
+ * for backwards compatibility and will be removed in a future version.
9
+ * Use NavItemsService instead.
6
10
  */
7
11
  export declare const eNavigationElementNames: {
8
12
  readonly Language: "LanguageRef";
package/dist/index.d.ts CHANGED
@@ -2,10 +2,21 @@
2
2
  * @abpjs/theme-basic
3
3
  *
4
4
  * ABP Framework Theme Basic components for React.
5
- * Translated from @abp/ng.theme.basic v2.9.0
5
+ * Translated from @abp/ng.theme.basic v3.0.0
6
6
  *
7
7
  * This package provides the basic theme layout components for ABP React applications.
8
8
  *
9
+ * Changes in v3.0.0:
10
+ * - Added CurrentUserComponent and LanguagesComponent as public API components
11
+ * - Added nav-item.provider and styles.provider for initialization
12
+ * - Added BASIC_THEME_NAV_ITEM_PROVIDERS and BASIC_THEME_STYLES_PROVIDERS
13
+ * - Added eThemeBasicComponents.CurrentUser and eThemeBasicComponents.Languages
14
+ * - NavItemsComponent now uses NavItemsService from @abpjs/theme-shared
15
+ * - Deprecated eNavigationElementNames (use NavItemsService instead)
16
+ * - Deprecated LayoutStateService (use NavItemsService instead)
17
+ * - Added bordered .datatable-body-row styles
18
+ * - Dependency update to @abp/ng.theme.shared v3.0.0
19
+ *
9
20
  * Changes in v2.9.0:
10
21
  * - Removed isDropdownChildDynamic from ApplicationLayoutComponent
11
22
  * - Removed isDropdownChildDynamic and openChange from RoutesComponent
@@ -34,7 +45,7 @@
34
45
  * - Dependency update to @abp/ng.theme.shared v2.2.0
35
46
  * - No functional code changes
36
47
  *
37
- * @version 2.9.0
48
+ * @version 3.0.0
38
49
  * @since 2.0.0 - Removed legacy .abp-confirm styles (no impact on React - we use Chakra UI)
39
50
  * @since 2.1.0 - Angular: OAuthService replaced with AuthService (already using useAuth in React)
40
51
  * - Angular: Added styles for loading, modal-backdrop, confirmation (handled by Chakra UI)