@jmruthers/pace-core 0.5.70 → 0.5.72
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-OSELOGMA.js → DataTable-RCFGXSPQ.js} +5 -5
- package/dist/{api-A4SUYPPV.js → api-DDMUKIUD.js} +2 -2
- package/dist/{chunk-5NV76BYF.js → chunk-2PDTIGS4.js} +6 -6
- package/dist/{chunk-GCUIIBLB.js → chunk-4CET7YQI.js} +4 -3
- package/dist/chunk-4CET7YQI.js.map +1 -0
- package/dist/{chunk-FOT3WUV6.js → chunk-67FGPOHX.js} +3 -3
- package/dist/{chunk-V2TE7LOF.js → chunk-BUM2ZPYC.js} +12 -12
- package/dist/{chunk-BHBMXMLT.js → chunk-C353TCFY.js} +2 -2
- package/dist/{chunk-NHR52QAQ.js → chunk-FGMFQSHX.js} +8 -7
- package/dist/chunk-FGMFQSHX.js.map +1 -0
- package/dist/{chunk-KWQH4VO3.js → chunk-GDIBOLKV.js} +2 -2
- package/dist/{chunk-OTJUAYBG.js → chunk-MTI7X73I.js} +5 -5
- package/dist/{chunk-4YMVZ76F.js → chunk-WMYLD5WP.js} +71 -66
- package/dist/chunk-WMYLD5WP.js.map +1 -0
- package/dist/{chunk-5G7JA3L5.js → chunk-XC4ZCSO4.js} +2 -2
- package/dist/components.js +7 -7
- package/dist/hooks.js +4 -4
- package/dist/index.js +10 -10
- package/dist/providers.js +2 -2
- package/dist/rbac/index.d.ts +4 -0
- package/dist/rbac/index.js +5 -5
- 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 +2 -2
- 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/ButtonProps.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/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/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.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/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/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/RBACContextType.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACProviderProps.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.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/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/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/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.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 +3 -3
- package/docs/implementation-guides/data-tables.md +191 -0
- package/package.json +1 -1
- package/src/components/DataTable/components/DataTableBody.tsx +38 -27
- package/src/components/DataTable/components/UnifiedTableBody.tsx +72 -64
- package/src/rbac/__tests__/engine.comprehensive.test.ts +150 -78
- package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +52 -50
- package/src/rbac/__tests__/rbac-engine-simplified.test.ts +39 -19
- package/src/rbac/engine.test.ts +4 -0
- package/src/rbac/engine.ts +16 -7
- package/src/rbac/providers/RBACProvider.tsx +15 -4
- package/dist/chunk-4YMVZ76F.js.map +0 -1
- package/dist/chunk-GCUIIBLB.js.map +0 -1
- package/dist/chunk-NHR52QAQ.js.map +0 -1
- /package/dist/{DataTable-OSELOGMA.js.map → DataTable-RCFGXSPQ.js.map} +0 -0
- /package/dist/{api-A4SUYPPV.js.map → api-DDMUKIUD.js.map} +0 -0
- /package/dist/{chunk-5NV76BYF.js.map → chunk-2PDTIGS4.js.map} +0 -0
- /package/dist/{chunk-FOT3WUV6.js.map → chunk-67FGPOHX.js.map} +0 -0
- /package/dist/{chunk-V2TE7LOF.js.map → chunk-BUM2ZPYC.js.map} +0 -0
- /package/dist/{chunk-BHBMXMLT.js.map → chunk-C353TCFY.js.map} +0 -0
- /package/dist/{chunk-KWQH4VO3.js.map → chunk-GDIBOLKV.js.map} +0 -0
- /package/dist/{chunk-OTJUAYBG.js.map → chunk-MTI7X73I.js.map} +0 -0
- /package/dist/{chunk-5G7JA3L5.js.map → chunk-XC4ZCSO4.js.map} +0 -0
|
@@ -32,9 +32,9 @@ import {
|
|
|
32
32
|
useDataTableContext,
|
|
33
33
|
usePluginRegistry,
|
|
34
34
|
useStateManager
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-WMYLD5WP.js";
|
|
36
|
+
import "./chunk-67FGPOHX.js";
|
|
37
|
+
import "./chunk-FGMFQSHX.js";
|
|
38
38
|
import "./chunk-B2WTCLCV.js";
|
|
39
39
|
import {
|
|
40
40
|
DataChunkManager,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
throttle,
|
|
48
48
|
useDataTablePerformance
|
|
49
49
|
} from "./chunk-YNUBMSMV.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-4CET7YQI.js";
|
|
51
51
|
import "./chunk-ULBI5JGB.js";
|
|
52
52
|
import "./chunk-5BSLGBYI.js";
|
|
53
53
|
import "./chunk-6RBH67W7.js";
|
|
@@ -97,4 +97,4 @@ export {
|
|
|
97
97
|
usePluginRegistry,
|
|
98
98
|
useStateManager
|
|
99
99
|
};
|
|
100
|
-
//# sourceMappingURL=DataTable-
|
|
100
|
+
//# sourceMappingURL=DataTable-RCFGXSPQ.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isPermittedCached,
|
|
17
17
|
isSuperAdmin,
|
|
18
18
|
setupRBAC
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FGMFQSHX.js";
|
|
20
20
|
import "./chunk-B2WTCLCV.js";
|
|
21
21
|
import "./chunk-PLDDJCW6.js";
|
|
22
22
|
export {
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
isSuperAdmin,
|
|
39
39
|
setupRBAC
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=api-
|
|
41
|
+
//# sourceMappingURL=api-DDMUKIUD.js.map
|
|
@@ -15,17 +15,17 @@ import {
|
|
|
15
15
|
SelectSeparator,
|
|
16
16
|
SelectTrigger,
|
|
17
17
|
SelectValue
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WMYLD5WP.js";
|
|
19
19
|
import {
|
|
20
20
|
isPermitted
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FGMFQSHX.js";
|
|
22
22
|
import {
|
|
23
23
|
PublicErrorBoundary,
|
|
24
24
|
useAppConfig,
|
|
25
25
|
usePublicEventLogo,
|
|
26
26
|
usePublicPageContext,
|
|
27
27
|
useToast
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-C353TCFY.js";
|
|
29
29
|
import {
|
|
30
30
|
Button,
|
|
31
31
|
Dialog,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
useEvents,
|
|
45
45
|
useOrganisations,
|
|
46
46
|
useUnifiedAuth
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-4CET7YQI.js";
|
|
48
48
|
import {
|
|
49
49
|
LoadingSpinner
|
|
50
50
|
} from "./chunk-CDQ3PX7L.js";
|
|
@@ -1205,7 +1205,7 @@ function PaceAppLayout({
|
|
|
1205
1205
|
eventId: user.user_metadata?.eventId || user.app_metadata?.eventId,
|
|
1206
1206
|
appId: user.user_metadata?.appId || user.app_metadata?.appId
|
|
1207
1207
|
};
|
|
1208
|
-
const { isSuperAdmin } = await import("./api-
|
|
1208
|
+
const { isSuperAdmin } = await import("./api-DDMUKIUD.js");
|
|
1209
1209
|
const isSuper = await isSuperAdmin(user.id);
|
|
1210
1210
|
if (isSuper) {
|
|
1211
1211
|
return true;
|
|
@@ -3753,4 +3753,4 @@ export {
|
|
|
3753
3753
|
PublicPageDiagnostic,
|
|
3754
3754
|
PublicPageContextChecker
|
|
3755
3755
|
};
|
|
3756
|
-
//# sourceMappingURL=chunk-
|
|
3756
|
+
//# sourceMappingURL=chunk-2PDTIGS4.js.map
|
|
@@ -357,7 +357,8 @@ function RBACProvider({
|
|
|
357
357
|
setAccessLevel("viewer" /* VIEWER */);
|
|
358
358
|
return;
|
|
359
359
|
}
|
|
360
|
-
const
|
|
360
|
+
const { data: globalRoles } = await supabaseClient.from("rbac_global_roles").select("role").eq("user_id", user.id).eq("role", "super_admin").lte("valid_from", (/* @__PURE__ */ new Date()).toISOString()).or(`valid_to.is.null,valid_to.gte.${(/* @__PURE__ */ new Date()).toISOString()}`).limit(1);
|
|
361
|
+
const isSuperAdmin = globalRoles && globalRoles.length > 0;
|
|
361
362
|
if (isSuperAdmin) {
|
|
362
363
|
setPermissions({
|
|
363
364
|
"admin:create": true,
|
|
@@ -374,7 +375,7 @@ function RBACProvider({
|
|
|
374
375
|
"events:delete": true
|
|
375
376
|
});
|
|
376
377
|
setRoles(["super_admin"]);
|
|
377
|
-
setAccessLevel("
|
|
378
|
+
setAccessLevel("super" /* SUPER */);
|
|
378
379
|
return;
|
|
379
380
|
}
|
|
380
381
|
const shouldLoadDirectPermissions = !eventId && !appConfig.requires_event;
|
|
@@ -8268,4 +8269,4 @@ lodash/lodash.js:
|
|
|
8268
8269
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8269
8270
|
*)
|
|
8270
8271
|
*/
|
|
8271
|
-
//# sourceMappingURL=chunk-
|
|
8272
|
+
//# sourceMappingURL=chunk-4CET7YQI.js.map
|