@archbase/security 3.0.4 → 3.0.5

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.
@@ -1,6 +1,11 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { ArchbaseSecurityManager } from './ArchbaseSecurityManager';
3
3
  import { UserDto } from './SecurityDomain';
4
+ /**
5
+ * Componente de loading padrão para o carregamento de permissões.
6
+ * Exibe um skeleton animado enquanto as permissões são carregadas.
7
+ */
8
+ export declare const DefaultSecurityLoading: React.FC;
4
9
  export interface ArchbaseSecurityContextType {
5
10
  user: UserDto | null;
6
11
  isLoading: boolean;
@@ -34,6 +39,8 @@ export interface ArchbaseViewSecurityProviderProps {
34
39
  resourceDescription: string;
35
40
  requiredPermissions?: string[];
36
41
  fallbackComponent?: ReactNode;
42
+ /** Componente customizado para exibir durante o carregamento de permissões */
43
+ loadingComponent?: ReactNode;
37
44
  onSecurityReady?: (manager: ArchbaseSecurityManager) => void;
38
45
  onError?: (error: string) => void;
39
46
  }
@@ -18,7 +18,7 @@ export * from './ArchbaseResetPassword';
18
18
  export * from './SecurityType';
19
19
  export * from './SecurityDomain';
20
20
  export * from './hooks';
21
- export { ArchbaseSecurityProvider, ArchbaseViewSecurityProvider } from './ArchbaseSecurityContext';
21
+ export { ArchbaseSecurityProvider, ArchbaseViewSecurityProvider, DefaultSecurityLoading } from './ArchbaseSecurityContext';
22
22
  export { useArchbaseSecurity, useArchbaseViewSecurity, useArchbaseSecureForm, useArchbasePermissionCheck } from './ArchbaseSecurityHooks';
23
23
  export { ArchbaseProtectedComponent, ArchbaseSecureActionButton, ArchbaseSecureFormField, withArchbaseSecurity } from './ArchbaseSecurityComponents';
24
24
  export type { ArchbaseSecurityContextType, ArchbaseViewSecurityContextType, ArchbaseSecurityProviderProps, ArchbaseViewSecurityProviderProps } from './ArchbaseSecurityContext';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbase/security",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Security and authentication components for Archbase React",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -25,10 +25,10 @@
25
25
  "author": "Edson Martins",
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@archbase/components": "3.0.4",
29
- "@archbase/core": "3.0.4",
30
- "@archbase/data": "3.0.4",
31
- "@archbase/layout": "3.0.4",
28
+ "@archbase/components": "3.0.5",
29
+ "@archbase/core": "3.0.5",
30
+ "@archbase/data": "3.0.5",
31
+ "@archbase/layout": "3.0.5",
32
32
  "crypto-js": "^4.1.1",
33
33
  "i18next": "^25.3.1",
34
34
  "inversify": "^6.0.1",