@abpjs/theme-shared 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.
@@ -42,5 +42,5 @@ export interface LoaderBarProps {
42
42
  * />
43
43
  * ```
44
44
  */
45
- export declare function LoaderBar({ containerClass, progressClass, filter, intervalPeriod, stopDelay, }: LoaderBarProps): import("react/jsx-runtime").JSX.Element | null;
45
+ export declare function LoaderBar({ containerClass, progressClass, filter: _filter, intervalPeriod, stopDelay, }: LoaderBarProps): import("react/jsx-runtime").JSX.Element | null;
46
46
  export default LoaderBar;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Enums barrel export
3
+ * @since 3.0.0
4
+ */
5
+ export * from './route-names';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Theme Shared Route Names
3
+ * Translated from @abp/ng.theme.shared/lib/enums/route-names.ts v3.0.0
4
+ *
5
+ * @since 3.0.0
6
+ */
7
+ /**
8
+ * Enum for theme shared route names.
9
+ * These are used for navigation and route registration.
10
+ *
11
+ * @since 3.0.0
12
+ */
13
+ export declare enum eThemeSharedRouteNames {
14
+ Administration = "AbpUiNavigation::Menu:Administration"
15
+ }
@@ -1,4 +1,4 @@
1
- import { Toaster } from '../models';
1
+ import { Confirmation } from '../models';
2
2
  import { ErrorComponentProps } from '../components/errors/ErrorComponent';
3
3
  type NavigateFunction = (to: string) => void;
4
4
  /**
@@ -28,12 +28,13 @@ export interface ErrorComponentInstance {
28
28
  }
29
29
  /**
30
30
  * Error handler interface.
31
+ * @since 3.0.0 - showError now returns Confirmation.Status instead of Toaster.Status
31
32
  */
32
33
  export interface ErrorHandler {
33
34
  /** Handle an HTTP error response */
34
35
  handleError: (error: HttpErrorResponse) => Promise<void>;
35
36
  /** Show an error message in a confirmation dialog */
36
- showError: (message: string, title?: string) => Promise<Toaster.Status>;
37
+ showError: (message: string, title?: string) => Promise<Confirmation.Status>;
37
38
  /** Navigate to the login page */
38
39
  navigateToLogin: () => void;
39
40
  /** Create error component props for full-page error display */
@@ -1,3 +1,4 @@
1
1
  export { useToaster, useToasts, useToasterContext } from '../contexts/toaster.context';
2
2
  export { useConfirmation, useConfirmationState, useConfirmationContext } from '../contexts/confirmation.context';
3
3
  export { useErrorHandler } from '../handlers/error.handler';
4
+ export { useNavItems } from './use-nav-items';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * useNavItems Hook
3
+ * @since 3.0.0
4
+ *
5
+ * React hook for subscribing to NavItemsService changes.
6
+ */
7
+ import { NavItem } from '../models/nav-item';
8
+ import { NavItemsService } from '../services/nav-items.service';
9
+ /**
10
+ * Hook to subscribe to nav items from NavItemsService.
11
+ * Returns the current sorted array of nav items.
12
+ *
13
+ * @param service - Optional NavItemsService instance (defaults to singleton)
14
+ * @returns Array of NavItem objects, sorted by order
15
+ *
16
+ * @since 3.0.0
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * function MyNavComponent() {
21
+ * const navItems = useNavItems();
22
+ *
23
+ * return (
24
+ * <ul>
25
+ * {navItems.map((item) => (
26
+ * <li key={item.id}>{item.id}</li>
27
+ * ))}
28
+ * </ul>
29
+ * );
30
+ * }
31
+ * ```
32
+ */
33
+ export declare function useNavItems(service?: NavItemsService): NavItem[];
package/dist/index.d.ts CHANGED
@@ -2,11 +2,24 @@
2
2
  * @abpjs/theme-shared
3
3
  *
4
4
  * ABP Framework Theme Shared components for React.
5
- * Translated from @abp/ng.theme.shared v2.9.0
5
+ * Translated from @abp/ng.theme.shared v3.0.0
6
6
  *
7
7
  * This package provides shared UI components, services, and utilities
8
8
  * for theme/modal management in ABP Framework React applications.
9
9
  *
10
+ * Changes in v3.0.0:
11
+ * - Added NavItemsService (replaces nav-items utility functions)
12
+ * - Added NavItem.id property (required unique identifier)
13
+ * - Changed NavItem.permission to NavItem.requiredPolicy
14
+ * - Added eThemeSharedRouteNames enum for route names
15
+ * - Added THEME_SHARED_ROUTE_PROVIDERS and configureRoutes
16
+ * - Added initializeThemeSharedRoutes for easy route setup
17
+ * - Removed Toaster.Status enum (use Confirmation.Status instead)
18
+ * - Removed Confirmation.Options.closable (use dismissible instead)
19
+ * - Removed setting-management model (use @abpjs/core SettingTabsService)
20
+ * - Removed nav-items utils (use NavItemsService)
21
+ * - Dependency updates to @abp/ng.core v3.0.0
22
+ *
10
23
  * Changes in v2.9.0:
11
24
  * - Added LocaleDirection type for RTL/LTR support
12
25
  * - Added LazyStyleHandler for RTL/LTR style switching
@@ -78,3 +91,5 @@ export * from './providers';
78
91
  export * from './handlers';
79
92
  export * from './utils';
80
93
  export * from './theme';
94
+ export * from './enums';
95
+ export * from './services';