@jmruthers/pace-core 0.5.164 → 0.5.166
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/{DataTable-HAATGNJY.js → DataTable-Z6IYTME3.js} +3 -3
- package/dist/{chunk-DDB2M4XO.js → chunk-5PH366QI.js} +2 -2
- package/dist/{chunk-GFSYFEVZ.js → chunk-BPIFVNEO.js} +24 -24
- package/dist/chunk-BPIFVNEO.js.map +1 -0
- package/dist/{chunk-G3EZSUTR.js → chunk-JIRBF5HR.js} +6 -23
- package/dist/chunk-JIRBF5HR.js.map +1 -0
- package/dist/{chunk-23YYDN24.js → chunk-SVMR7EVX.js} +2 -2
- package/dist/components.js +3 -3
- package/dist/index.js +4 -4
- package/dist/rbac/index.d.ts +10 -3
- package/dist/rbac/index.js +2 -2
- package/dist/utils.js +1 -1
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CalendarProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/ResourcePermissions.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/TabsContentProps.md +1 -1
- package/docs/api/interfaces/TabsListProps.md +1 -1
- package/docs/api/interfaces/TabsProps.md +1 -1
- package/docs/api/interfaces/TabsTriggerProps.md +1 -1
- package/docs/api/interfaces/TextareaProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +19 -12
- package/package.json +2 -2
- package/src/__tests__/hooks/usePermissions.test.ts +12 -9
- package/src/components/NavigationMenu/NavigationMenu.tsx +4 -26
- package/src/hooks/__tests__/ServiceHooks.test.tsx +2 -2
- package/src/rbac/hooks/__tests__/usePermissions.integration.test.ts +32 -34
- package/src/rbac/hooks/usePermissions.test.ts +34 -32
- package/src/rbac/hooks/usePermissions.ts +41 -28
- package/dist/chunk-G3EZSUTR.js.map +0 -1
- package/dist/chunk-GFSYFEVZ.js.map +0 -1
- /package/dist/{DataTable-HAATGNJY.js.map → DataTable-Z6IYTME3.js.map} +0 -0
- /package/dist/{chunk-DDB2M4XO.js.map → chunk-5PH366QI.js.map} +0 -0
- /package/dist/{chunk-23YYDN24.js.map → chunk-SVMR7EVX.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCan,
|
|
3
3
|
useResolvedScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BPIFVNEO.js";
|
|
5
5
|
import {
|
|
6
6
|
toast,
|
|
7
7
|
useDataTablePerformance
|
|
@@ -12726,4 +12726,4 @@ lodash/lodash.js:
|
|
|
12726
12726
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
12727
12727
|
*)
|
|
12728
12728
|
*/
|
|
12729
|
-
//# sourceMappingURL=chunk-
|
|
12729
|
+
//# sourceMappingURL=chunk-SVMR7EVX.js.map
|
package/dist/components.js
CHANGED
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
useFileReferenceForRecord,
|
|
58
58
|
useFilesByCategory,
|
|
59
59
|
usePublicPageContext as usePublicPageContext2
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-JIRBF5HR.js";
|
|
61
61
|
import {
|
|
62
62
|
Alert,
|
|
63
63
|
AlertDescription,
|
|
@@ -98,8 +98,8 @@ import {
|
|
|
98
98
|
TooltipProvider,
|
|
99
99
|
TooltipRoot,
|
|
100
100
|
TooltipTrigger
|
|
101
|
-
} from "./chunk-
|
|
102
|
-
import "./chunk-
|
|
101
|
+
} from "./chunk-SVMR7EVX.js";
|
|
102
|
+
import "./chunk-BPIFVNEO.js";
|
|
103
103
|
import "./chunk-BVYWGZVV.js";
|
|
104
104
|
import "./chunk-SBVILCCA.js";
|
|
105
105
|
import {
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
withAccessLevelGuard,
|
|
31
31
|
withPermissionGuard,
|
|
32
32
|
withRoleGuard
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-5PH366QI.js";
|
|
34
34
|
import {
|
|
35
35
|
init_useInactivityTracker,
|
|
36
36
|
useInactivityTracker
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
useFileReferenceForRecord,
|
|
97
97
|
useFilesByCategory,
|
|
98
98
|
usePublicPageContext as usePublicPageContext2
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-JIRBF5HR.js";
|
|
100
100
|
import {
|
|
101
101
|
Alert,
|
|
102
102
|
AlertDescription,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
max,
|
|
147
147
|
min,
|
|
148
148
|
sum
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-SVMR7EVX.js";
|
|
150
150
|
import {
|
|
151
151
|
useAccessLevel,
|
|
152
152
|
useCachedPermissions,
|
|
@@ -159,7 +159,7 @@ import {
|
|
|
159
159
|
useResolvedScope,
|
|
160
160
|
useResourcePermissions,
|
|
161
161
|
useRoleManagement
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-BPIFVNEO.js";
|
|
163
163
|
import {
|
|
164
164
|
CACHE_PATTERNS,
|
|
165
165
|
RBACCache,
|
package/dist/rbac/index.d.ts
CHANGED
|
@@ -1286,13 +1286,20 @@ declare function useResourcePermissions(resource: string, options?: UseResourceP
|
|
|
1286
1286
|
* Hook to get user's permissions in a scope
|
|
1287
1287
|
*
|
|
1288
1288
|
* @param userId - User ID
|
|
1289
|
-
* @param
|
|
1289
|
+
* @param organisationId - Organisation ID
|
|
1290
|
+
* @param eventId - Event ID (optional)
|
|
1291
|
+
* @param appId - Application ID (optional)
|
|
1290
1292
|
* @returns Permission state and methods
|
|
1291
1293
|
*
|
|
1292
1294
|
* @example
|
|
1293
1295
|
* ```tsx
|
|
1294
1296
|
* function MyComponent() {
|
|
1295
|
-
* const { permissions, isLoading, error } = usePermissions(
|
|
1297
|
+
* const { permissions, isLoading, error } = usePermissions(
|
|
1298
|
+
* userId,
|
|
1299
|
+
* organisationId,
|
|
1300
|
+
* eventId,
|
|
1301
|
+
* appId
|
|
1302
|
+
* );
|
|
1296
1303
|
*
|
|
1297
1304
|
* if (isLoading) return <div>Loading...</div>;
|
|
1298
1305
|
* if (error) return <div>Error: {error.message}</div>;
|
|
@@ -1306,7 +1313,7 @@ declare function useResourcePermissions(resource: string, options?: UseResourceP
|
|
|
1306
1313
|
* }
|
|
1307
1314
|
* ```
|
|
1308
1315
|
*/
|
|
1309
|
-
declare function usePermissions(userId: UUID,
|
|
1316
|
+
declare function usePermissions(userId: UUID, organisationId: string | undefined, eventId: string | undefined, appId: string | undefined): {
|
|
1310
1317
|
permissions: PermissionMap;
|
|
1311
1318
|
isLoading: boolean;
|
|
1312
1319
|
error: Error | null;
|
package/dist/rbac/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
withAccessLevelGuard,
|
|
31
31
|
withPermissionGuard,
|
|
32
32
|
withRoleGuard
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-5PH366QI.js";
|
|
34
34
|
import {
|
|
35
35
|
useAccessLevel,
|
|
36
36
|
useCachedPermissions,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
useResolvedScope,
|
|
44
44
|
useResourcePermissions,
|
|
45
45
|
useRoleManagement
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-BPIFVNEO.js";
|
|
47
47
|
import {
|
|
48
48
|
CACHE_PATTERNS,
|
|
49
49
|
RBACCache,
|
package/dist/utils.js
CHANGED
|
@@ -614,7 +614,7 @@ function createLazyComponent(importFn, componentName, options = {}) {
|
|
|
614
614
|
return WrappedComponent;
|
|
615
615
|
}
|
|
616
616
|
var LazyDataTable = createLazyComponent(
|
|
617
|
-
() => import("./DataTable-
|
|
617
|
+
() => import("./DataTable-Z6IYTME3.js").then((module) => ({ default: module.DataTable })),
|
|
618
618
|
"DataTable"
|
|
619
619
|
);
|
|
620
620
|
|