@jmruthers/pace-core 0.5.125 → 0.5.127
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-IHD4JP4W.js → DataTable-QZH6SEUM.js} +6 -6
- package/dist/{PublicLoadingSpinner-CaoRbHvJ.d.ts → PublicLoadingSpinner-qqvM-NUe.d.ts} +34 -21
- package/dist/{UnifiedAuthProvider-6C47WIML.js → UnifiedAuthProvider-CQDZRJIS.js} +3 -3
- package/dist/{chunk-ZBLK676C.js → chunk-3CG5L6RN.js} +1 -19
- package/dist/chunk-3CG5L6RN.js.map +1 -0
- package/dist/{chunk-35ZDPMBM.js → chunk-BYXRHAIF.js} +3 -3
- package/dist/{chunk-IJOZZOGT.js → chunk-CQZU6TFE.js} +5 -5
- package/dist/{chunk-C43QIDN3.js → chunk-CTJRBUX2.js} +2 -2
- package/dist/{chunk-ESJTIADP.js → chunk-F64FFPOZ.js} +5 -15
- package/dist/{chunk-ESJTIADP.js.map → chunk-F64FFPOZ.js.map} +1 -1
- package/dist/{chunk-JJVLYIEO.js → chunk-JDBO5NCG.js} +253 -135
- package/dist/chunk-JDBO5NCG.js.map +1 -0
- package/dist/{chunk-4MXVZVNS.js → chunk-TGIY2AR2.js} +2 -2
- package/dist/{chunk-HC7AOIC2.js → chunk-TMUNK34W.js} +428 -446
- package/dist/chunk-TMUNK34W.js.map +1 -0
- package/dist/{chunk-XN6GWKMV.js → chunk-VZ5OR6HD.js} +161 -14
- package/dist/chunk-VZ5OR6HD.js.map +1 -0
- package/dist/{chunk-QWNJCQXZ.js → chunk-ZV77RZMU.js} +2 -2
- package/dist/{chunk-NZGLXZGP.js → chunk-ZYZCRSBD.js} +3 -54
- package/dist/chunk-ZYZCRSBD.js.map +1 -0
- package/dist/components.d.ts +1 -1
- package/dist/components.js +9 -9
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -12
- package/dist/providers.js +2 -2
- package/dist/rbac/index.js +7 -7
- 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/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/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/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 +10 -62
- 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/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/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/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/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 +46 -28
- package/docs/architecture/rpc-function-standards.md +39 -5
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/DataTable/components/ImportModal.tsx +134 -2
- package/src/components/DataTable/components/UnifiedTableBody.tsx +6 -3
- package/src/components/Dialog/Dialog.tsx +0 -13
- package/src/components/FileDisplay/FileDisplay.tsx +76 -0
- package/src/components/Header/Header.tsx +5 -0
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +12 -39
- package/src/components/PublicLayout/PublicPageFooter.tsx +1 -1
- package/src/components/PublicLayout/PublicPageHeader.tsx +69 -128
- package/src/components/PublicLayout/PublicPageLayout.tsx +4 -4
- package/src/components/PublicLayout/PublicPageProvider.tsx +12 -3
- package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +1 -1
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +3 -18
- package/src/hooks/__tests__/useAppConfig.unit.test.ts +3 -1
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +11 -5
- package/src/hooks/__tests__/usePublicRouteParams.unit.test.ts +8 -7
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +41 -46
- package/src/hooks/public/usePublicFileDisplay.ts +176 -7
- package/src/hooks/public/usePublicRouteParams.ts +0 -12
- package/src/hooks/useAppConfig.ts +15 -6
- package/src/hooks/usePermissionCache.test.ts +12 -4
- package/src/hooks/usePermissionCache.ts +3 -19
- package/src/hooks/useSecureDataAccess.ts +0 -63
- package/src/services/EventService.ts +0 -19
- package/dist/chunk-HC7AOIC2.js.map +0 -1
- package/dist/chunk-JJVLYIEO.js.map +0 -1
- package/dist/chunk-NZGLXZGP.js.map +0 -1
- package/dist/chunk-XN6GWKMV.js.map +0 -1
- package/dist/chunk-ZBLK676C.js.map +0 -1
- /package/dist/{DataTable-IHD4JP4W.js.map → DataTable-QZH6SEUM.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-6C47WIML.js.map → UnifiedAuthProvider-CQDZRJIS.js.map} +0 -0
- /package/dist/{chunk-35ZDPMBM.js.map → chunk-BYXRHAIF.js.map} +0 -0
- /package/dist/{chunk-IJOZZOGT.js.map → chunk-CQZU6TFE.js.map} +0 -0
- /package/dist/{chunk-C43QIDN3.js.map → chunk-CTJRBUX2.js.map} +0 -0
- /package/dist/{chunk-4MXVZVNS.js.map → chunk-TGIY2AR2.js.map} +0 -0
- /package/dist/{chunk-QWNJCQXZ.js.map → chunk-ZV77RZMU.js.map} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_useOrganisations,
|
|
3
3
|
useOrganisations
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TGIY2AR2.js";
|
|
5
5
|
import {
|
|
6
6
|
EventServiceContext,
|
|
7
7
|
init_EventServiceProvider,
|
|
8
8
|
useUnifiedAuth
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3CG5L6RN.js";
|
|
10
10
|
import {
|
|
11
11
|
init_organisationContext,
|
|
12
12
|
setOrganisationContext
|
|
@@ -49,11 +49,6 @@ function useSecureDataAccess() {
|
|
|
49
49
|
const secureQuery = useCallback(async (table, columns, filters = {}, options = {}) => {
|
|
50
50
|
validateContext();
|
|
51
51
|
const organisationId = getCurrentOrganisationId();
|
|
52
|
-
console.log("[useSecureDataAccess] Executing secure query:", {
|
|
53
|
-
table,
|
|
54
|
-
organisationId,
|
|
55
|
-
filters
|
|
56
|
-
});
|
|
57
52
|
await setOrganisationContextInSession(organisationId);
|
|
58
53
|
let query = supabase.from(table).select(columns);
|
|
59
54
|
const tablesWithOrganisation = [
|
|
@@ -134,20 +129,12 @@ function useSecureDataAccess() {
|
|
|
134
129
|
recordDataAccess(table, "read", false, `SELECT ${columns} FROM ${table}`, filters);
|
|
135
130
|
throw error;
|
|
136
131
|
}
|
|
137
|
-
console.log("[useSecureDataAccess] Query successful:", {
|
|
138
|
-
table,
|
|
139
|
-
resultCount: data?.length || 0
|
|
140
|
-
});
|
|
141
132
|
recordDataAccess(table, "read", true, `SELECT ${columns} FROM ${table}`, filters);
|
|
142
133
|
return data || [];
|
|
143
134
|
}, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);
|
|
144
135
|
const secureInsert = useCallback(async (table, data) => {
|
|
145
136
|
validateContext();
|
|
146
137
|
const organisationId = getCurrentOrganisationId();
|
|
147
|
-
console.log("[useSecureDataAccess] Executing secure insert:", {
|
|
148
|
-
table,
|
|
149
|
-
organisationId
|
|
150
|
-
});
|
|
151
138
|
await setOrganisationContextInSession(organisationId);
|
|
152
139
|
const secureData = {
|
|
153
140
|
...data,
|
|
@@ -158,20 +145,11 @@ function useSecureDataAccess() {
|
|
|
158
145
|
console.error("[useSecureDataAccess] Insert failed:", error);
|
|
159
146
|
throw error;
|
|
160
147
|
}
|
|
161
|
-
console.log("[useSecureDataAccess] Insert successful:", {
|
|
162
|
-
table,
|
|
163
|
-
id: insertData?.id
|
|
164
|
-
});
|
|
165
148
|
return insertData;
|
|
166
149
|
}, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);
|
|
167
150
|
const secureUpdate = useCallback(async (table, data, filters) => {
|
|
168
151
|
validateContext();
|
|
169
152
|
const organisationId = getCurrentOrganisationId();
|
|
170
|
-
console.log("[useSecureDataAccess] Executing secure update:", {
|
|
171
|
-
table,
|
|
172
|
-
organisationId,
|
|
173
|
-
filters
|
|
174
|
-
});
|
|
175
153
|
await setOrganisationContextInSession(organisationId);
|
|
176
154
|
const { organisation_id, ...secureData } = data;
|
|
177
155
|
let query = supabase.from(table).update(secureData);
|
|
@@ -203,20 +181,11 @@ function useSecureDataAccess() {
|
|
|
203
181
|
console.error("[useSecureDataAccess] Update failed:", error);
|
|
204
182
|
throw error;
|
|
205
183
|
}
|
|
206
|
-
console.log("[useSecureDataAccess] Update successful:", {
|
|
207
|
-
table,
|
|
208
|
-
updatedCount: updateData?.length || 0
|
|
209
|
-
});
|
|
210
184
|
return updateData || [];
|
|
211
185
|
}, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);
|
|
212
186
|
const secureDelete = useCallback(async (table, filters) => {
|
|
213
187
|
validateContext();
|
|
214
188
|
const organisationId = getCurrentOrganisationId();
|
|
215
|
-
console.log("[useSecureDataAccess] Executing secure delete:", {
|
|
216
|
-
table,
|
|
217
|
-
organisationId,
|
|
218
|
-
filters
|
|
219
|
-
});
|
|
220
189
|
await setOrganisationContextInSession(organisationId);
|
|
221
190
|
let query = supabase.from(table).delete();
|
|
222
191
|
const tablesWithOrganisation = [
|
|
@@ -283,17 +252,10 @@ function useSecureDataAccess() {
|
|
|
283
252
|
console.error("[useSecureDataAccess] Delete failed:", error);
|
|
284
253
|
throw error;
|
|
285
254
|
}
|
|
286
|
-
console.log("[useSecureDataAccess] Delete successful:", {
|
|
287
|
-
table
|
|
288
|
-
});
|
|
289
255
|
}, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);
|
|
290
256
|
const secureRpc = useCallback(async (functionName, params = {}) => {
|
|
291
257
|
validateContext();
|
|
292
258
|
const organisationId = getCurrentOrganisationId();
|
|
293
|
-
console.log("[useSecureDataAccess] Executing secure RPC:", {
|
|
294
|
-
functionName,
|
|
295
|
-
organisationId
|
|
296
|
-
});
|
|
297
259
|
await setOrganisationContextInSession(organisationId);
|
|
298
260
|
const functionsWithPOrganisationId = [
|
|
299
261
|
"data_cake_diners_list",
|
|
@@ -344,24 +306,11 @@ function useSecureDataAccess() {
|
|
|
344
306
|
if (functionsNeedingEventId.includes(functionName) && selectedEvent?.event_id) {
|
|
345
307
|
secureParams.p_event_id = selectedEvent.event_id;
|
|
346
308
|
}
|
|
347
|
-
if (functionName === "data_cake_items_list") {
|
|
348
|
-
console.log("[useSecureDataAccess] Calling data_cake_items_list with params:", {
|
|
349
|
-
p_user_id: secureParams.p_user_id,
|
|
350
|
-
p_organisation_id: secureParams.organisation_id || secureParams.p_organisation_id,
|
|
351
|
-
p_event_id: secureParams.p_event_id,
|
|
352
|
-
hasEvent: !!selectedEvent?.event_id,
|
|
353
|
-
eventId: selectedEvent?.event_id,
|
|
354
|
-
allParams: secureParams
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
309
|
const { data, error } = await supabase.rpc(functionName, secureParams);
|
|
358
310
|
if (error) {
|
|
359
311
|
console.error("[useSecureDataAccess] RPC failed:", error);
|
|
360
312
|
throw error;
|
|
361
313
|
}
|
|
362
|
-
console.log("[useSecureDataAccess] RPC successful:", {
|
|
363
|
-
functionName
|
|
364
|
-
});
|
|
365
314
|
return data;
|
|
366
315
|
}, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase, selectedEvent?.event_id, user?.id]);
|
|
367
316
|
const [dataAccessHistory, setDataAccessHistory] = useState([]);
|
|
@@ -440,4 +389,4 @@ function useSecureDataAccess() {
|
|
|
440
389
|
export {
|
|
441
390
|
useSecureDataAccess
|
|
442
391
|
};
|
|
443
|
-
//# sourceMappingURL=chunk-
|
|
392
|
+
//# sourceMappingURL=chunk-ZYZCRSBD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useSecureDataAccess.ts"],"sourcesContent":["/**\n * @file useSecureDataAccess Hook\n * @package @jmruthers/pace-core\n * @module Hooks/useSecureDataAccess\n * @since 0.4.0\n *\n * Hook for secure database operations with mandatory organisation context.\n * Ensures all data access is properly scoped to the user's current organisation.\n *\n * @example\n * ```tsx\n * function DataComponent() {\n * const { secureQuery, secureInsert, secureUpdate, secureDelete } = useSecureDataAccess();\n * \n * const loadData = async () => {\n * try {\n * // Automatically includes organisation_id filter\n * const events = await secureQuery('event', '*', { is_visible: true });\n * console.log('Organisation events:', events);\n * } catch (error) {\n * console.error('Failed to load data:', error);\n * }\n * };\n * \n * const createEvent = async (eventData) => {\n * try {\n * // Automatically sets organisation_id\n * const newEvent = await secureInsert('event', eventData);\n * console.log('Created event:', newEvent);\n * } catch (error) {\n * console.error('Failed to create event:', error);\n * }\n * };\n * \n * return (\n * <div>\n * <button onClick={loadData}>Load Data</button>\n * <button onClick={() => createEvent({ event_name: 'New Event' })}>\n * Create Event\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * @security\n * - All queries automatically include organisation_id filter\n * - Validates organisation context before any operation\n * - Prevents data leaks between organisations\n * - Error handling for security violations\n * - Type-safe database operations\n */\n\nimport { useCallback, useState, useContext } from 'react';\nimport { useUnifiedAuth } from '../providers';\nimport { useOrganisations } from './useOrganisations';\nimport { EventServiceContext } from '../providers/services/EventServiceProvider';\nimport { setOrganisationContext } from '../utils/organisationContext';\nimport type { Permission } from '../rbac/types';\nimport type { OrganisationSecurityError } from '../types/organisation';\n\nexport interface SecureDataAccessReturn {\n /** Execute a secure query with organisation filtering */\n secureQuery: <T = any>(\n table: string,\n columns: string,\n filters?: Record<string, any>,\n options?: {\n orderBy?: string;\n ascending?: boolean;\n limit?: number;\n offset?: number;\n }\n ) => Promise<T[]>;\n \n /** Execute a secure insert with organisation context */\n secureInsert: <T = any>(\n table: string,\n data: Record<string, any>\n ) => Promise<T>;\n \n /** Execute a secure update with organisation filtering */\n secureUpdate: <T = any>(\n table: string,\n data: Record<string, any>,\n filters: Record<string, any>\n ) => Promise<T[]>;\n \n /** Execute a secure delete with organisation filtering */\n secureDelete: (\n table: string,\n filters: Record<string, any>\n ) => Promise<void>;\n \n /** Execute a secure RPC call with organisation context */\n secureRpc: <T = any>(\n functionName: string,\n params?: Record<string, any>\n ) => Promise<T>;\n \n /** Get current organisation ID */\n getCurrentOrganisationId: () => string;\n \n /** Validate organisation context */\n validateContext: () => void;\n \n // NEW: Phase 1 - Enhanced Security Features\n /** Check if data access is allowed for a table and operation */\n isDataAccessAllowed: (table: string, operation: string) => boolean;\n \n /** Get all data access permissions for current user */\n getDataAccessPermissions: () => Record<string, string[]>;\n \n /** Check if strict mode is enabled */\n isStrictMode: boolean;\n \n /** Check if audit logging is enabled */\n isAuditLogEnabled: boolean;\n \n /** Get data access history */\n getDataAccessHistory: () => DataAccessRecord[];\n \n /** Clear data access history */\n clearDataAccessHistory: () => void;\n \n /** Validate data access attempt */\n validateDataAccess: (table: string, operation: string) => boolean;\n}\n\nexport interface DataAccessRecord {\n table: string;\n operation: string;\n userId: string;\n organisationId: string;\n allowed: boolean;\n timestamp: string;\n query?: string;\n filters?: Record<string, any>;\n}\n\n/**\n * Hook for secure data access with automatic organisation filtering\n * \n * All database operations automatically include organisation context:\n * - Queries filter by organisation_id\n * - Inserts include organisation_id\n * - Updates/deletes are scoped to organisation\n * - RPC calls include organisation_id parameter\n */\nexport function useSecureDataAccess(): SecureDataAccessReturn {\n const { supabase, user, session } = useUnifiedAuth();\n const { ensureOrganisationContext } = useOrganisations();\n \n // Get selected event for event-scoped RPC calls\n // Use useContext directly to safely check if EventServiceProvider is available\n const eventServiceContext = useContext(EventServiceContext);\n const selectedEvent = eventServiceContext?.eventService?.getSelectedEvent() || null;\n\n const validateContext = useCallback((): void => {\n if (!supabase) {\n throw new Error('No Supabase client available') as OrganisationSecurityError;\n }\n if (!user || !session) {\n throw new Error('User must be authenticated with valid session') as OrganisationSecurityError;\n }\n \n try {\n ensureOrganisationContext();\n } catch (error) {\n throw new Error('Organisation context is required for data access') as OrganisationSecurityError;\n }\n }, [supabase, user, session, ensureOrganisationContext]);\n\n const getCurrentOrganisationId = useCallback((): string => {\n validateContext();\n const currentOrg = ensureOrganisationContext();\n return currentOrg.id;\n }, [validateContext, ensureOrganisationContext]);\n\n // Set organisation context in database session\n const setOrganisationContextInSession = useCallback(async (organisationId: string): Promise<void> => {\n if (!supabase) {\n throw new Error('No Supabase client available') as OrganisationSecurityError;\n }\n\n await setOrganisationContext(supabase, organisationId);\n }, [supabase]);\n\n const secureQuery = useCallback(async <T = any>(\n table: string,\n columns: string,\n filters: Record<string, any> = {},\n options: {\n orderBy?: string;\n ascending?: boolean;\n limit?: number;\n offset?: number;\n } = {}\n ): Promise<T[]> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Build query with organisation filter\n let query = supabase!\n .from(table)\n .select(columns);\n\n // Add organisation filter only if table has organisation_id column\n const tablesWithOrganisation = [\n 'event', 'organisation_settings',\n 'rbac_event_app_roles', 'rbac_organisation_roles',\n // SECURITY: Phase 2 additions - complete organisation table mapping\n 'organisation_audit_log', 'organisation_invitations', 'organisation_app_access',\n // SECURITY: Emergency additions for Phase 1 fixes\n 'cake_meal', 'cake_mealtype', 'pace_person', 'pace_member',\n // SECURITY: Phase 3A additions - medical and personal data\n 'medi_profile', 'medi_condition', 'medi_diet', 'medi_action_plan', 'medi_profile_versions',\n 'pace_consent', 'pace_contact', 'pace_id_documents', 'pace_qualifications',\n 'form_responses', 'form_response_values', 'forms',\n // SECURITY: Phase 3B additions - remaining critical tables\n 'invoice', 'line_item', 'credit_balance', 'payment_method',\n 'form_contexts', 'form_field_config', 'form_fields',\n 'cake_delivery', 'cake_diettype', 'cake_diner', 'cake_dish', 'cake_item', \n 'cake_logistics', 'cake_mealplan', 'cake_package', 'cake_recipe', 'cake_supplier', \n 'cake_supply', 'cake_unit', 'event_app_access', 'base_application', 'base_questions'\n ];\n \n if (tablesWithOrganisation.includes(table)) {\n query = query.eq('organisation_id', organisationId);\n }\n\n // Apply additional filters\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n // Handle qualified column names (e.g., 'users.role')\n const columnName = key.includes('.') ? key.split('.').pop()! : key;\n query = query.eq(columnName, value);\n }\n });\n\n // Apply options\n if (options.orderBy) {\n // Only use the column name, not a qualified name\n const orderByColumn = options.orderBy.split('.').pop();\n if (orderByColumn) {\n query = query.order(orderByColumn, { ascending: options.ascending ?? true });\n }\n }\n \n if (options.limit) {\n query = query.limit(options.limit);\n }\n \n if (options.offset) {\n query = query.range(options.offset, options.offset + (options.limit || 100) - 1);\n }\n\n const { data, error } = await query;\n \n if (error) {\n console.error('[useSecureDataAccess] Query failed:', error);\n // NEW: Phase 1 - Record failed data access attempt\n recordDataAccess(table, 'read', false, `SELECT ${columns} FROM ${table}`, filters);\n throw error;\n }\n\n // NEW: Phase 1 - Record successful data access attempt\n recordDataAccess(table, 'read', true, `SELECT ${columns} FROM ${table}`, filters);\n\n return (data as T[]) || [];\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureInsert = useCallback(async <T = any>(\n table: string,\n data: Record<string, any>\n ): Promise<T> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Ensure organisation_id is set\n const secureData = {\n ...data,\n organisation_id: organisationId\n };\n\n const { data: insertData, error } = await supabase!\n .from(table)\n .insert(secureData)\n .select()\n .single();\n\n if (error) {\n console.error('[useSecureDataAccess] Insert failed:', error);\n throw error;\n }\n\n return insertData as T;\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureUpdate = useCallback(async <T = any>(\n table: string,\n data: Record<string, any>,\n filters: Record<string, any>\n ): Promise<T[]> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Filter out organisation_id from data to prevent manipulation\n const { organisation_id, ...secureData } = data;\n \n // Build update query with organisation filter\n let query = supabase!\n .from(table)\n .update(secureData);\n\n // Add organisation filter only if table has organisation_id column\n const tablesWithOrganisation = [\n 'event', 'organisation_settings',\n 'rbac_event_app_roles', 'rbac_organisation_roles',\n // SECURITY: Phase 2 additions - complete organisation table mapping\n 'organisation_audit_log', 'organisation_invitations', 'organisation_app_access',\n // SECURITY: Emergency additions for Phase 1 fixes\n 'cake_meal', 'cake_mealtype', 'pace_person', 'pace_member'\n ];\n \n if (tablesWithOrganisation.includes(table)) {\n query = query.eq('organisation_id', organisationId);\n }\n\n // Apply filters\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n query = query.eq(key, value);\n }\n });\n\n const { data: updateData, error } = await query.select();\n\n if (error) {\n console.error('[useSecureDataAccess] Update failed:', error);\n throw error;\n }\n\n return (updateData as T[]) || [];\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureDelete = useCallback(async (\n table: string,\n filters: Record<string, any>\n ): Promise<void> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Build delete query with organisation filter\n let query = supabase!\n .from(table)\n .delete();\n\n // Add organisation filter only if table has organisation_id column\n const tablesWithOrganisation = [\n 'event', 'organisation_settings',\n 'rbac_event_app_roles', 'rbac_organisation_roles',\n // SECURITY: Phase 2 additions - complete organisation table mapping\n 'organisation_audit_log', 'organisation_invitations', 'organisation_app_access',\n // SECURITY: Emergency additions for Phase 1 fixes\n 'cake_meal', 'cake_mealtype', 'pace_person', 'pace_member',\n // SECURITY: Phase 3A additions - medical and personal data\n 'medi_profile', 'medi_condition', 'medi_diet', 'medi_action_plan', 'medi_profile_versions',\n 'pace_consent', 'pace_contact', 'pace_id_documents', 'pace_qualifications',\n 'form_responses', 'form_response_values', 'forms',\n // SECURITY: Phase 3B additions - remaining critical tables\n 'invoice', 'line_item', 'credit_balance', 'payment_method',\n 'form_contexts', 'form_field_config', 'form_fields',\n 'cake_delivery', 'cake_diettype', 'cake_diner', 'cake_dish', 'cake_item', \n 'cake_logistics', 'cake_mealplan', 'cake_package', 'cake_recipe', 'cake_supplier', \n 'cake_supply', 'cake_unit', 'event_app_access', 'base_application', 'base_questions'\n ];\n \n if (tablesWithOrganisation.includes(table)) {\n query = query.eq('organisation_id', organisationId);\n }\n\n // Apply filters\n Object.entries(filters).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n query = query.eq(key, value);\n }\n });\n\n const { error } = await query;\n\n if (error) {\n console.error('[useSecureDataAccess] Delete failed:', error);\n throw error;\n }\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase]);\n\n const secureRpc = useCallback(async <T = any>(\n functionName: string,\n params: Record<string, any> = {}\n ): Promise<T> => {\n validateContext();\n const organisationId = getCurrentOrganisationId();\n\n // Set organisation context in database session\n await setOrganisationContextInSession(organisationId);\n\n // Include organisation_id in RPC parameters\n // Some functions use p_organisation_id instead of organisation_id (to avoid conflicts with RETURNS TABLE columns)\n const functionsWithPOrganisationId = [\n 'data_cake_diners_list',\n 'data_cake_mealplans_list'\n ];\n \n const paramName = functionsWithPOrganisationId.includes(functionName) \n ? 'p_organisation_id' \n : 'organisation_id';\n \n // Functions that need p_event_id for event-app role permission checks\n // Note: Even org-scoped functions (like items, packages, suppliers) need event_id\n // for permission checks when users have event-app roles\n const functionsNeedingEventId = [\n 'data_cake_items_list',\n 'data_cake_packages_list',\n 'data_cake_suppliers_list',\n 'data_cake_diettypes_list',\n 'data_cake_mealtypes_list',\n 'data_cake_diners_list',\n 'data_cake_mealplans_list',\n 'data_cake_dishes_list',\n 'data_cake_recipes_list',\n 'data_cake_meals_list',\n 'data_cake_units_list',\n 'data_cake_orders_list',\n 'app_cake_item_create',\n 'app_cake_item_update',\n 'app_cake_package_create',\n 'app_cake_package_update',\n 'app_cake_supplier_create',\n 'app_cake_supplier_update',\n 'app_cake_supplier_delete',\n 'app_cake_meal_create',\n 'app_cake_meal_update',\n 'app_cake_meal_delete',\n 'app_cake_unit_create',\n 'app_cake_unit_update',\n 'app_cake_unit_delete',\n 'app_cake_delivery_upsert'\n ];\n \n // Build secureParams with correct parameter order\n // For functions that require p_event_id as first parameter, ensure it's first\n const secureParams: Record<string, any> = {};\n \n // Functions where p_event_id is the FIRST required parameter (no default)\n const functionsWithEventIdFirst = [\n 'data_cake_meals_list',\n 'data_cake_units_list'\n ];\n \n // Add p_user_id explicitly for functions that need it (even though it has a default)\n // This ensures parameter matching works correctly\n if (user?.id) {\n secureParams.p_user_id = user.id;\n }\n \n // Add organisation_id parameter\n secureParams[paramName] = organisationId;\n \n // Add p_event_id if function needs it and event is selected\n // CRITICAL: This must be added AFTER organisation_id but BEFORE caller params\n // to ensure it's not overwritten. For data_cake_items_list, p_event_id is the 3rd param.\n if (functionsNeedingEventId.includes(functionName) && selectedEvent?.event_id) {\n secureParams.p_event_id = selectedEvent.event_id;\n }\n \n // Add any other params passed by caller (limit, offset, etc.)\n // NOTE: This will NOT overwrite p_event_id if caller passes it, but we want to ensure\n // our value takes precedence if event is selected\n Object.assign(secureParams, params);\n \n // Ensure p_event_id is set if needed (after Object.assign, so it overrides caller params)\n if (functionsNeedingEventId.includes(functionName) && selectedEvent?.event_id) {\n secureParams.p_event_id = selectedEvent.event_id;\n }\n\n const { data, error } = await supabase!.rpc(functionName, secureParams);\n\n if (error) {\n console.error('[useSecureDataAccess] RPC failed:', error);\n throw error;\n }\n\n return data as T;\n }, [validateContext, getCurrentOrganisationId, setOrganisationContextInSession, supabase, selectedEvent?.event_id, user?.id]);\n\n // NEW: Phase 1 - Enhanced Security Features\n const [dataAccessHistory, setDataAccessHistory] = useState<DataAccessRecord[]>([]);\n const [isStrictMode] = useState(true); // Always enabled in Phase 1\n const [isAuditLogEnabled] = useState(true); // Always enabled in Phase 1\n\n // Check if data access is allowed for a table and operation\n const isDataAccessAllowed = useCallback((table: string, operation: string): boolean => {\n if (!user?.id) return false;\n \n // Use the existing RBAC system to check data access permissions\n // This is a synchronous check for the context - actual permission checking\n // happens in the secure data operations using the RBAC engine\n const permission = `${operation}:data.${table}` as Permission;\n \n // For now, we'll return true and let the secure data operations\n // handle the actual permission checking asynchronously\n // This context is mainly for tracking and audit purposes\n return true;\n }, [user?.id]);\n\n // Get all data access permissions for current user\n const getDataAccessPermissions = useCallback((): Record<string, string[]> => {\n if (!user?.id) return {};\n \n // For now, return empty object - this will be enhanced with actual permission checking\n // when we integrate with the existing RBAC system\n return {};\n }, [user?.id]);\n\n // Get data access history\n const getDataAccessHistory = useCallback((): DataAccessRecord[] => {\n return [...dataAccessHistory];\n }, [dataAccessHistory]);\n\n // Clear data access history\n const clearDataAccessHistory = useCallback(() => {\n setDataAccessHistory([]);\n }, []);\n\n // Validate data access attempt\n const validateDataAccess = useCallback((table: string, operation: string): boolean => {\n if (!user?.id) return false;\n \n // Validate organisation context\n try {\n validateContext();\n } catch (error) {\n console.error(`[useSecureDataAccess] Organisation context validation failed:`, error);\n return false;\n }\n \n return isDataAccessAllowed(table, operation);\n }, [user?.id, validateContext, isDataAccessAllowed]);\n\n // Record data access attempt\n const recordDataAccess = useCallback((\n table: string,\n operation: string,\n allowed: boolean,\n query?: string,\n filters?: Record<string, any>\n ) => {\n if (!isAuditLogEnabled || !user?.id) return;\n \n const record: DataAccessRecord = {\n table,\n operation,\n userId: user.id,\n organisationId: getCurrentOrganisationId(),\n allowed,\n timestamp: new Date().toISOString(),\n query,\n filters\n };\n \n setDataAccessHistory(prev => {\n const newHistory = [record, ...prev];\n return newHistory.slice(0, 1000); // Keep last 1000 records\n });\n \n if (isStrictMode && !allowed) {\n console.error(`[useSecureDataAccess] STRICT MODE VIOLATION: User attempted data access without permission`, {\n table,\n operation,\n userId: user.id,\n organisationId: getCurrentOrganisationId(),\n timestamp: new Date().toISOString()\n });\n }\n }, [isAuditLogEnabled, isStrictMode, user?.id, getCurrentOrganisationId]);\n\n return {\n secureQuery,\n secureInsert,\n secureUpdate,\n secureDelete,\n secureRpc,\n getCurrentOrganisationId,\n validateContext,\n // NEW: Phase 1 - Enhanced Security Features\n isDataAccessAllowed,\n getDataAccessPermissions,\n isStrictMode,\n isAuditLogEnabled,\n getDataAccessHistory,\n clearDataAccessHistory,\n validateDataAccess\n };\n} "],"mappings":";;;;;;;;;;;;;;;AAqDA,SAAS,aAAa,UAAU,kBAAkB;AAElD;AACA;AACA;AA4FO,SAAS,sBAA8C;AAC5D,QAAM,EAAE,UAAU,MAAM,QAAQ,IAAI,eAAe;AACnD,QAAM,EAAE,0BAA0B,IAAI,iBAAiB;AAIvD,QAAM,sBAAsB,WAAW,mBAAmB;AAC1D,QAAM,gBAAgB,qBAAqB,cAAc,iBAAiB,KAAK;AAE/E,QAAM,kBAAkB,YAAY,MAAY;AAC9C,QAAI,CAAC,UAAU;AACb,YAA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BAAI,KAAK,GAAE,YAAY;AAAA,MAClC;AAAA,MACA;AAAA,IACF;AAEA,yBAAqB,UAAQ;AAC3B,YAAM,aAAa,CAAC,QAAQ,GAAG,IAAI;AACnC,aAAO,WAAW,MAAM,GAAG,GAAI;AAAA,IACjC,CAAC;AAED,QAAI,gBAAgB,CAAC,SAAS;AAC5B,cAAQ,MAAM,8FAA8F;AAAA,QAC1G;AAAA,QACA;AAAA,QACA,QAAQ,KAAK;AAAA,QACb,gBAAgB,yBAAyB;AAAA,QACzC,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,MACpC,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,mBAAmB,cAAc,MAAM,IAAI,wBAAwB,CAAC;AAExE,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
package/dist/components.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { a as UnifiedAuthContextType, c as UnifiedAuthProvider, b as UnifiedAuthProviderProps, u as useUnifiedAuth } from './UnifiedAuthProvider-BVKmQd9u.js';
|
|
2
|
-
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, i as CardActionsProps, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, U as DialogContentProps, O as DialogDescription, Z as DialogDescriptionProps, M as DialogFooter, X as DialogFooterProps, J as DialogHeader, W as DialogHeaderProps, E as DialogOverlay, V as DialogOverlayProps, z as DialogPortal, Q as DialogProps, _ as DialogSize, N as DialogTitle, Y as DialogTitleProps, F as DialogTrigger, R as DialogTriggerProps, aB as ErrorBoundary, aC as ErrorBoundaryProps, aD as ErrorBoundaryState, aG as EventSelector, aK as FileDisplay, aL as FileDisplayProps, aI as FileUpload, aJ as FileUploadProps, ar as Footer, as as FooterProps, am as Form, an as FormProps, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aE as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, ax as NavigationItem, av as NavigationMenu, aw as NavigationMenuProps, ay as OrganisationSelector, az as OrganisationSelectorProps, be as PaceAppLayout, bd as PaceAppLayoutProps, bg as PaceLoginPage, bf as PaceLoginPageProps, aH as PasswordResetForm, P as Progress, at as ProtectedRoute, au as ProtectedRouteProps, b1 as PublicErrorBoundary, ba as PublicErrorBoundaryProps, bb as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bc as PublicLoadingSpinnerProps, b0 as PublicPageContextChecker, a_ as PublicPageDebugger, a$ as PublicPageDiagnostic, aZ as PublicPageFooter, b9 as PublicPageFooterProps, aV as PublicPageHeader, b8 as PublicPageHeaderProps, aT as PublicPageLayout, b7 as PublicPageLayoutProps, aW as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aF as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aS as UseFileReferenceForRecordReturn, aQ as UseFileReferenceOptions, aR as UseFileReferenceReturn, aA as UserMenu, b2 as useErrorBoundary, aM as useFileReference, aO as useFileReferenceById, aN as useFileReferenceForRecord, aP as useFilesByCategory, aY as useIsPublicPage, aU as usePublicPageContext, aX as usePublicPageProviderContext } from './PublicLoadingSpinner-
|
|
2
|
+
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, i as CardActionsProps, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, U as DialogContentProps, O as DialogDescription, Z as DialogDescriptionProps, M as DialogFooter, X as DialogFooterProps, J as DialogHeader, W as DialogHeaderProps, E as DialogOverlay, V as DialogOverlayProps, z as DialogPortal, Q as DialogProps, _ as DialogSize, N as DialogTitle, Y as DialogTitleProps, F as DialogTrigger, R as DialogTriggerProps, aB as ErrorBoundary, aC as ErrorBoundaryProps, aD as ErrorBoundaryState, aG as EventSelector, aK as FileDisplay, aL as FileDisplayProps, aI as FileUpload, aJ as FileUploadProps, ar as Footer, as as FooterProps, am as Form, an as FormProps, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aE as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, ax as NavigationItem, av as NavigationMenu, aw as NavigationMenuProps, ay as OrganisationSelector, az as OrganisationSelectorProps, be as PaceAppLayout, bd as PaceAppLayoutProps, bg as PaceLoginPage, bf as PaceLoginPageProps, aH as PasswordResetForm, P as Progress, at as ProtectedRoute, au as ProtectedRouteProps, b1 as PublicErrorBoundary, ba as PublicErrorBoundaryProps, bb as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bc as PublicLoadingSpinnerProps, b0 as PublicPageContextChecker, a_ as PublicPageDebugger, a$ as PublicPageDiagnostic, aZ as PublicPageFooter, b9 as PublicPageFooterProps, aV as PublicPageHeader, b8 as PublicPageHeaderProps, aT as PublicPageLayout, b7 as PublicPageLayoutProps, aW as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aF as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aS as UseFileReferenceForRecordReturn, aQ as UseFileReferenceOptions, aR as UseFileReferenceReturn, aA as UserMenu, b2 as useErrorBoundary, aM as useFileReference, aO as useFileReferenceById, aN as useFileReferenceForRecord, aP as useFilesByCategory, aY as useIsPublicPage, aU as usePublicPageContext, aX as usePublicPageProviderContext } from './PublicLoadingSpinner-qqvM-NUe.js';
|
|
3
3
|
export { u as useToast } from './useToast-C8gR5ir4.js';
|
|
4
4
|
export { D as DataTable, a as DataTableProps } from './DataTable-D5cBRca8.js';
|
|
5
5
|
export { A as AggregateConfig, D as DataRecord, f as DataTableAction, a as DataTableColumn, g as DataTableToolbarButton, E as EmptyStateConfig, G as GetRowId } from './types-D4TVpDa1.js';
|
package/dist/components.js
CHANGED
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
PaceAppLayout,
|
|
17
17
|
PaceLoginPage,
|
|
18
18
|
PasswordResetForm,
|
|
19
|
-
Progress,
|
|
20
19
|
ProtectedRoute,
|
|
21
20
|
PublicLoadingSkeleton,
|
|
22
21
|
PublicLoadingSpinner,
|
|
@@ -51,7 +50,7 @@ import {
|
|
|
51
50
|
useFileReferenceForRecord,
|
|
52
51
|
useFilesByCategory,
|
|
53
52
|
usePublicPageContext as usePublicPageContext2
|
|
54
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-TMUNK34W.js";
|
|
55
54
|
import {
|
|
56
55
|
Alert,
|
|
57
56
|
AlertDescription,
|
|
@@ -78,6 +77,7 @@ import {
|
|
|
78
77
|
DialogTitle,
|
|
79
78
|
DialogTrigger,
|
|
80
79
|
Input,
|
|
80
|
+
Progress,
|
|
81
81
|
Select,
|
|
82
82
|
SelectContent,
|
|
83
83
|
SelectGroup,
|
|
@@ -91,8 +91,8 @@ import {
|
|
|
91
91
|
TooltipProvider,
|
|
92
92
|
TooltipRoot,
|
|
93
93
|
TooltipTrigger
|
|
94
|
-
} from "./chunk-
|
|
95
|
-
import "./chunk-
|
|
94
|
+
} from "./chunk-JDBO5NCG.js";
|
|
95
|
+
import "./chunk-BYXRHAIF.js";
|
|
96
96
|
import "./chunk-WP5I5GLN.js";
|
|
97
97
|
import "./chunk-3DBFLLLU.js";
|
|
98
98
|
import {
|
|
@@ -102,19 +102,19 @@ import {
|
|
|
102
102
|
useErrorBoundary,
|
|
103
103
|
useIsPublicPage,
|
|
104
104
|
usePublicPageContext
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-VZ5OR6HD.js";
|
|
106
106
|
import {
|
|
107
107
|
useToast
|
|
108
108
|
} from "./chunk-GKHF54DI.js";
|
|
109
|
-
import "./chunk-
|
|
109
|
+
import "./chunk-TGIY2AR2.js";
|
|
110
110
|
import {
|
|
111
111
|
init_UnifiedAuthProvider
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import "./chunk-
|
|
112
|
+
} from "./chunk-CTJRBUX2.js";
|
|
113
|
+
import "./chunk-ZV77RZMU.js";
|
|
114
114
|
import {
|
|
115
115
|
UnifiedAuthProvider,
|
|
116
116
|
useUnifiedAuth
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-3CG5L6RN.js";
|
|
118
118
|
import {
|
|
119
119
|
FileCategory
|
|
120
120
|
} from "./chunk-XJ2HZOBU.js";
|
package/dist/hooks.js
CHANGED
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
usePublicEvent,
|
|
9
9
|
usePublicEventCode,
|
|
10
10
|
usePublicRouteParams
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-F64FFPOZ.js";
|
|
12
12
|
import {
|
|
13
13
|
useSecureDataAccess
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZYZCRSBD.js";
|
|
15
15
|
import {
|
|
16
16
|
clearFileDisplayCache,
|
|
17
17
|
clearPublicFileDisplayCache,
|
|
@@ -22,15 +22,15 @@ import {
|
|
|
22
22
|
useEventTheme,
|
|
23
23
|
useFileDisplay,
|
|
24
24
|
usePublicFileDisplay
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VZ5OR6HD.js";
|
|
26
26
|
import {
|
|
27
27
|
useDataTablePerformance,
|
|
28
28
|
useToast
|
|
29
29
|
} from "./chunk-GKHF54DI.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-TGIY2AR2.js";
|
|
31
|
+
import "./chunk-CTJRBUX2.js";
|
|
32
|
+
import "./chunk-ZV77RZMU.js";
|
|
33
|
+
import "./chunk-3CG5L6RN.js";
|
|
34
34
|
import {
|
|
35
35
|
useComponentPerformance
|
|
36
36
|
} from "./chunk-66C4BSAY.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { E as Event } from './unified-DQ4VcT7H.js';
|
|
|
8
8
|
import { S as SessionRestorationState } from './auth-DReDSLq9.js';
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
10
|
export { ALL_PERMISSIONS, AccessLevel, AccessLevelGuard, AllPermissions, CACHE_PATTERNS, DataAccessRecord, EVENT_APP_PERMISSIONS, EnhancedNavigationMenu, EnhancedNavigationMenuProps, EventAppRole, EventAppRoleData, GLOBAL_PERMISSIONS, GlobalRole, GrantEventAppRoleParams, InvalidScopeError, LogLevel, MissingUserContextError, NavigationAccessRecord, NavigationContextType, NavigationGuard, NavigationGuardProps, NavigationProvider, NavigationProviderProps, ORGANISATION_PERMISSIONS, Operation, OrganisationContextRequiredError, OrganisationRole, PAGE_PERMISSIONS, PageAccessRecord, PagePermissionContextType, PagePermissionGuard, PagePermissionGuardProps, PagePermissionProvider, PagePermissionProviderProps, Permission, PermissionCheck, PermissionDeniedError, PermissionEnforcer, PermissionEnforcerProps, PermissionGuard, PermissionMap, RBACAuditManager, RBACCache, RBACConfig, RBACEngine, RBACError, RBACLogger, RBACNotInitializedError, RevokeEventAppRoleParams, RoleBasedRouter, RoleBasedRouterContextType, RoleBasedRouterProps, RoleManagementResult, RouteAccessRecord, RouteConfig, Scope, SecureDataContextType, SecureDataProvider, SecureDataProviderProps, SecureSupabaseClient, UUID, UseResolvedScopeOptions, UseResolvedScopeReturn, createAuditManager, createRBACConfig, createRBACEngine, createRBACExpressMiddleware, createRBACMiddleware, createSecureClient, emitAuditEvent, fromSupabaseClient, getAccessLevel, getGlobalAuditManager, getPermissionMap, getPermissionsForRole, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, hasAnyPermissionCached, hasPermission, hasPermissionCached, isDebugMode, isDevelopmentMode, isPermitted, isPermittedCached, isValidPermission, rbacCache, resolveAppContext, setGlobalAuditManager, setupRBAC, useAccessLevel, useCachedPermissions, useCan, useHasAllPermissions, useHasAnyPermission, useMultiplePermissions, useNavigationPermissions, usePagePermissions, usePermissions, useRBAC, useResolvedScope, useRoleBasedRouter, useRoleManagement, useSecureData, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './rbac/index.js';
|
|
11
|
-
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, O as DialogDescription, M as DialogFooter, J as DialogHeader, E as DialogOverlay, z as DialogPortal, N as DialogTitle, F as DialogTrigger, aB as ErrorBoundary, aG as EventSelector, aK as FileDisplay, aL as FileDisplayProps, aI as FileUpload, aJ as FileUploadProps, ar as Footer, as as FooterProps, am as Form, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aE as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, ax as NavigationItem, av as NavigationMenu, aw as NavigationMenuProps, ay as OrganisationSelector, be as PaceAppLayout, bd as PaceAppLayoutProps, bg as PaceLoginPage, bf as PaceLoginPageProps, aH as PasswordResetForm, P as Progress, at as ProtectedRoute, au as ProtectedRouteProps, b1 as PublicErrorBoundary, ba as PublicErrorBoundaryProps, bb as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bc as PublicLoadingSpinnerProps, b0 as PublicPageContextChecker, a_ as PublicPageDebugger, a$ as PublicPageDiagnostic, aZ as PublicPageFooter, b9 as PublicPageFooterProps, aV as PublicPageHeader, b8 as PublicPageHeaderProps, aT as PublicPageLayout, b7 as PublicPageLayoutProps, aW as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aF as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aS as UseFileReferenceForRecordReturn, aQ as UseFileReferenceOptions, aR as UseFileReferenceReturn, aA as UserMenu, bh as UserMenuProps, b2 as useErrorBoundary, aM as useFileReference, aO as useFileReferenceById, aN as useFileReferenceForRecord, aP as useFilesByCategory, aY as useIsPublicPage, aU as usePublicPageContext, aX as usePublicPageProviderContext } from './PublicLoadingSpinner-
|
|
11
|
+
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, O as DialogDescription, M as DialogFooter, J as DialogHeader, E as DialogOverlay, z as DialogPortal, N as DialogTitle, F as DialogTrigger, aB as ErrorBoundary, aG as EventSelector, aK as FileDisplay, aL as FileDisplayProps, aI as FileUpload, aJ as FileUploadProps, ar as Footer, as as FooterProps, am as Form, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aE as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, ax as NavigationItem, av as NavigationMenu, aw as NavigationMenuProps, ay as OrganisationSelector, be as PaceAppLayout, bd as PaceAppLayoutProps, bg as PaceLoginPage, bf as PaceLoginPageProps, aH as PasswordResetForm, P as Progress, at as ProtectedRoute, au as ProtectedRouteProps, b1 as PublicErrorBoundary, ba as PublicErrorBoundaryProps, bb as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bc as PublicLoadingSpinnerProps, b0 as PublicPageContextChecker, a_ as PublicPageDebugger, a$ as PublicPageDiagnostic, aZ as PublicPageFooter, b9 as PublicPageFooterProps, aV as PublicPageHeader, b8 as PublicPageHeaderProps, aT as PublicPageLayout, b7 as PublicPageLayoutProps, aW as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aF as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aS as UseFileReferenceForRecordReturn, aQ as UseFileReferenceOptions, aR as UseFileReferenceReturn, aA as UserMenu, bh as UserMenuProps, b2 as useErrorBoundary, aM as useFileReference, aO as useFileReferenceById, aN as useFileReferenceForRecord, aP as useFilesByCategory, aY as useIsPublicPage, aU as usePublicPageContext, aX as usePublicPageProviderContext } from './PublicLoadingSpinner-qqvM-NUe.js';
|
|
12
12
|
export { u as useToast } from './useToast-C8gR5ir4.js';
|
|
13
13
|
export { D as DataTable, a as DataTableProps } from './DataTable-D5cBRca8.js';
|
|
14
14
|
import { D as DataRecord, f as DataTableAction } from './types-D4TVpDa1.js';
|
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-CQZU6TFE.js";
|
|
34
34
|
import {
|
|
35
35
|
init_useInactivityTracker,
|
|
36
36
|
useInactivityTracker
|
|
@@ -54,7 +54,6 @@ import {
|
|
|
54
54
|
PaceLoginPage,
|
|
55
55
|
PasswordChangeForm,
|
|
56
56
|
PasswordResetForm,
|
|
57
|
-
Progress,
|
|
58
57
|
ProtectedRoute,
|
|
59
58
|
PublicLoadingSkeleton,
|
|
60
59
|
PublicLoadingSpinner,
|
|
@@ -90,7 +89,7 @@ import {
|
|
|
90
89
|
useFileReferenceForRecord,
|
|
91
90
|
useFilesByCategory,
|
|
92
91
|
usePublicPageContext as usePublicPageContext2
|
|
93
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-TMUNK34W.js";
|
|
94
93
|
import {
|
|
95
94
|
Alert,
|
|
96
95
|
AlertDescription,
|
|
@@ -118,6 +117,7 @@ import {
|
|
|
118
117
|
DialogTitle,
|
|
119
118
|
DialogTrigger,
|
|
120
119
|
Input,
|
|
120
|
+
Progress,
|
|
121
121
|
Select,
|
|
122
122
|
SelectContent,
|
|
123
123
|
SelectGroup,
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
TooltipProvider,
|
|
132
132
|
TooltipRoot,
|
|
133
133
|
TooltipTrigger
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-JDBO5NCG.js";
|
|
135
135
|
import {
|
|
136
136
|
useAccessLevel,
|
|
137
137
|
useCachedPermissions,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
useRBAC,
|
|
144
144
|
useResolvedScope,
|
|
145
145
|
useRoleManagement
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-BYXRHAIF.js";
|
|
147
147
|
import {
|
|
148
148
|
CACHE_PATTERNS,
|
|
149
149
|
RBACCache,
|
|
@@ -183,8 +183,8 @@ import {
|
|
|
183
183
|
usePublicEvent,
|
|
184
184
|
usePublicEventCode,
|
|
185
185
|
usePublicRouteParams
|
|
186
|
-
} from "./chunk-
|
|
187
|
-
import "./chunk-
|
|
186
|
+
} from "./chunk-F64FFPOZ.js";
|
|
187
|
+
import "./chunk-ZYZCRSBD.js";
|
|
188
188
|
import {
|
|
189
189
|
APP_PATH_MAPPING,
|
|
190
190
|
DEFAULT_FILE_SIZE_LIMIT,
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
usePublicFileDisplay,
|
|
216
216
|
usePublicPageContext,
|
|
217
217
|
validateFileSize
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-VZ5OR6HD.js";
|
|
219
219
|
import {
|
|
220
220
|
useToast
|
|
221
221
|
} from "./chunk-GKHF54DI.js";
|
|
@@ -223,11 +223,11 @@ import {
|
|
|
223
223
|
init_useOrganisations,
|
|
224
224
|
useEvents,
|
|
225
225
|
useOrganisations
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-TGIY2AR2.js";
|
|
227
227
|
import {
|
|
228
228
|
init_UnifiedAuthProvider
|
|
229
|
-
} from "./chunk-
|
|
230
|
-
import "./chunk-
|
|
229
|
+
} from "./chunk-CTJRBUX2.js";
|
|
230
|
+
import "./chunk-ZV77RZMU.js";
|
|
231
231
|
import {
|
|
232
232
|
EventServiceProvider,
|
|
233
233
|
InactivityServiceProvider,
|
|
@@ -245,7 +245,7 @@ import {
|
|
|
245
245
|
useOrganisationService2 as useOrganisationService,
|
|
246
246
|
useSessionRestoration,
|
|
247
247
|
useUnifiedAuth
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-3CG5L6RN.js";
|
|
249
249
|
import {
|
|
250
250
|
FileCategory
|
|
251
251
|
} from "./chunk-XJ2HZOBU.js";
|
package/dist/providers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-ZV77RZMU.js";
|
|
2
2
|
import {
|
|
3
3
|
AuthServiceContext,
|
|
4
4
|
AuthServiceProvider,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useInactivityService,
|
|
15
15
|
useOrganisationService,
|
|
16
16
|
useUnifiedAuth
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3CG5L6RN.js";
|
|
18
18
|
import "./chunk-BDZUMRBD.js";
|
|
19
19
|
import "./chunk-UJI6WSMD.js";
|
|
20
20
|
import "./chunk-PLDDJCW6.js";
|
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-CQZU6TFE.js";
|
|
34
34
|
import {
|
|
35
35
|
useAccessLevel,
|
|
36
36
|
useCachedPermissions,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
useRBAC,
|
|
43
43
|
useResolvedScope,
|
|
44
44
|
useRoleManagement
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-BYXRHAIF.js";
|
|
46
46
|
import {
|
|
47
47
|
CACHE_PATTERNS,
|
|
48
48
|
RBACCache,
|
|
@@ -72,11 +72,11 @@ import {
|
|
|
72
72
|
getGlobalAuditManager,
|
|
73
73
|
setGlobalAuditManager
|
|
74
74
|
} from "../chunk-3DBFLLLU.js";
|
|
75
|
-
import "../chunk-
|
|
76
|
-
import "../chunk-
|
|
77
|
-
import "../chunk-
|
|
78
|
-
import "../chunk-
|
|
79
|
-
import "../chunk-
|
|
75
|
+
import "../chunk-ZYZCRSBD.js";
|
|
76
|
+
import "../chunk-TGIY2AR2.js";
|
|
77
|
+
import "../chunk-CTJRBUX2.js";
|
|
78
|
+
import "../chunk-ZV77RZMU.js";
|
|
79
|
+
import "../chunk-3CG5L6RN.js";
|
|
80
80
|
import "../chunk-JCQZ6LA7.js";
|
|
81
81
|
import "../chunk-BDZUMRBD.js";
|
|
82
82
|
import "../chunk-UJI6WSMD.js";
|
package/dist/utils.js
CHANGED
|
@@ -596,7 +596,7 @@ function createLazyComponent(importFn, componentName, options = {}) {
|
|
|
596
596
|
return WrappedComponent;
|
|
597
597
|
}
|
|
598
598
|
var LazyDataTable = createLazyComponent(
|
|
599
|
-
() => import("./DataTable-
|
|
599
|
+
() => import("./DataTable-QZH6SEUM.js").then((module) => ({ default: module.DataTable })),
|
|
600
600
|
"DataTable"
|
|
601
601
|
);
|
|
602
602
|
|