@jmruthers/pace-core 0.5.72 → 0.5.74
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-RCFGXSPQ.js → DataTable-2QR5TER5.js} +7 -5
- package/dist/UnifiedAuthProvider-K4NRGXL4.js +14 -0
- package/dist/UnifiedAuthProvider-K4NRGXL4.js.map +1 -0
- package/dist/chunk-3SP4P7NS.js +82 -0
- package/dist/chunk-3SP4P7NS.js.map +1 -0
- package/dist/chunk-B5LK25HV.js +953 -0
- package/dist/chunk-B5LK25HV.js.map +1 -0
- package/dist/{chunk-BUM2ZPYC.js → chunk-BKVGJVUR.js} +4 -4
- package/dist/{chunk-WMYLD5WP.js → chunk-C5Q5LRU5.js} +57 -36
- package/dist/chunk-C5Q5LRU5.js.map +1 -0
- package/dist/{chunk-6RBH67W7.js → chunk-CDDYJCYU.js} +2 -77
- package/dist/chunk-CDDYJCYU.js.map +1 -0
- package/dist/{chunk-GDIBOLKV.js → chunk-DG5Z55HH.js} +6 -4
- package/dist/{chunk-GDIBOLKV.js.map → chunk-DG5Z55HH.js.map} +1 -1
- package/dist/{chunk-2PDTIGS4.js → chunk-H2TNUICK.js} +98 -49
- package/dist/chunk-H2TNUICK.js.map +1 -0
- package/dist/{chunk-4CET7YQI.js → chunk-IHMMNKNA.js} +11 -947
- package/dist/chunk-IHMMNKNA.js.map +1 -0
- package/dist/{chunk-C353TCFY.js → chunk-LVQ26TCN.js} +2 -2
- package/dist/{chunk-MTI7X73I.js → chunk-ORSMVXO2.js} +7 -5
- package/dist/{chunk-MTI7X73I.js.map → chunk-ORSMVXO2.js.map} +1 -1
- package/dist/{chunk-67FGPOHX.js → chunk-UJMCGBLS.js} +6 -4
- package/dist/{chunk-67FGPOHX.js.map → chunk-UJMCGBLS.js.map} +1 -1
- package/dist/{chunk-XC4ZCSO4.js → chunk-V6BHACCH.js} +6 -4
- package/dist/{chunk-XC4ZCSO4.js.map → chunk-V6BHACCH.js.map} +1 -1
- package/dist/components.js +9 -7
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +7 -5
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +19 -16
- package/dist/index.js.map +1 -1
- package/dist/providers.js +10 -7
- package/dist/rbac/index.js +7 -5
- package/dist/utils.js +8 -6
- package/dist/utils.js.map +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/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 +2 -2
- package/docs/implementation-guides/data-tables.md +82 -1
- package/package.json +1 -1
- package/src/components/DataTable/components/DataTableCore.tsx +37 -3
- package/src/components/Dialog/Dialog.tsx +2 -2
- package/src/components/NavigationMenu/NavigationMenu.tsx +32 -2
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +81 -46
- package/src/components/Toast/Toast.test.tsx +1 -1
- package/src/components/Toast/Toast.tsx +1 -1
- package/dist/chunk-2PDTIGS4.js.map +0 -1
- package/dist/chunk-4CET7YQI.js.map +0 -1
- package/dist/chunk-6RBH67W7.js.map +0 -1
- package/dist/chunk-WMYLD5WP.js.map +0 -1
- /package/dist/{DataTable-RCFGXSPQ.js.map → DataTable-2QR5TER5.js.map} +0 -0
- /package/dist/{chunk-BUM2ZPYC.js.map → chunk-BKVGJVUR.js.map} +0 -0
- /package/dist/{chunk-C353TCFY.js.map → chunk-LVQ26TCN.js.map} +0 -0
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
useDataTableContext,
|
|
33
33
|
usePluginRegistry,
|
|
34
34
|
useStateManager
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-C5Q5LRU5.js";
|
|
36
|
+
import "./chunk-UJMCGBLS.js";
|
|
37
37
|
import "./chunk-FGMFQSHX.js";
|
|
38
38
|
import "./chunk-B2WTCLCV.js";
|
|
39
39
|
import {
|
|
@@ -47,10 +47,12 @@ import {
|
|
|
47
47
|
throttle,
|
|
48
48
|
useDataTablePerformance
|
|
49
49
|
} from "./chunk-YNUBMSMV.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-B5LK25HV.js";
|
|
51
|
+
import "./chunk-IHMMNKNA.js";
|
|
51
52
|
import "./chunk-ULBI5JGB.js";
|
|
52
53
|
import "./chunk-5BSLGBYI.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-3SP4P7NS.js";
|
|
55
|
+
import "./chunk-CDDYJCYU.js";
|
|
54
56
|
import "./chunk-SMJZMKYN.js";
|
|
55
57
|
import "./chunk-PLDDJCW6.js";
|
|
56
58
|
export {
|
|
@@ -97,4 +99,4 @@ export {
|
|
|
97
99
|
usePluginRegistry,
|
|
98
100
|
useStateManager
|
|
99
101
|
};
|
|
100
|
-
//# sourceMappingURL=DataTable-
|
|
102
|
+
//# sourceMappingURL=DataTable-2QR5TER5.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UnifiedAuthProvider,
|
|
3
|
+
init_UnifiedAuthProvider,
|
|
4
|
+
useUnifiedAuth
|
|
5
|
+
} from "./chunk-IHMMNKNA.js";
|
|
6
|
+
import "./chunk-ULBI5JGB.js";
|
|
7
|
+
import "./chunk-CDDYJCYU.js";
|
|
8
|
+
import "./chunk-PLDDJCW6.js";
|
|
9
|
+
init_UnifiedAuthProvider();
|
|
10
|
+
export {
|
|
11
|
+
UnifiedAuthProvider,
|
|
12
|
+
useUnifiedAuth
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=UnifiedAuthProvider-K4NRGXL4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__esm
|
|
3
|
+
} from "./chunk-PLDDJCW6.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/organisationContext.ts
|
|
6
|
+
async function setOrganisationContext(supabase, organisationId) {
|
|
7
|
+
if (!supabase || !organisationId) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const { error } = await supabase.rpc("rbac_audit_log", {
|
|
12
|
+
p_event_type: "organisation_switched",
|
|
13
|
+
p_organisation_id: organisationId,
|
|
14
|
+
p_metadata: { action: "set_context" }
|
|
15
|
+
});
|
|
16
|
+
if (error) {
|
|
17
|
+
} else {
|
|
18
|
+
}
|
|
19
|
+
} catch (error) {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function clearOrganisationContext(supabase) {
|
|
23
|
+
if (!supabase) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const { error } = await supabase.rpc("rbac_audit_log", {
|
|
28
|
+
p_event_type: "organisation_switched",
|
|
29
|
+
p_metadata: { action: "clear_context" }
|
|
30
|
+
});
|
|
31
|
+
if (error) {
|
|
32
|
+
} else {
|
|
33
|
+
}
|
|
34
|
+
} catch (error) {
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function getOrganisationContext(supabase) {
|
|
38
|
+
if (!supabase) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const data = null;
|
|
43
|
+
const error = null;
|
|
44
|
+
if (error) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
if (typeof data === "string") {
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
} catch (error) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async function isOrganisationContextAvailable(supabase) {
|
|
56
|
+
if (!supabase) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
const { error } = await supabase.rpc("get_organisation_context");
|
|
61
|
+
if (error) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return true;
|
|
65
|
+
} catch (error) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
var init_organisationContext = __esm({
|
|
70
|
+
"src/utils/organisationContext.ts"() {
|
|
71
|
+
"use strict";
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
setOrganisationContext,
|
|
77
|
+
clearOrganisationContext,
|
|
78
|
+
getOrganisationContext,
|
|
79
|
+
isOrganisationContextAvailable,
|
|
80
|
+
init_organisationContext
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=chunk-3SP4P7NS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/organisationContext.ts"],"sourcesContent":["/**\n * @file Organisation Context Utility\n * @package @jmruthers/pace-core\n * @module Utils/OrganisationContext\n * @since 0.4.0\n *\n * Utility functions for managing organisation context in database sessions.\n * Provides fallback mechanisms for when database functions are not available.\n */\n\nimport type { SupabaseClient } from '@supabase/supabase-js';\n\n/**\n * Set organisation context in the database session\n * \n * This function attempts to set the organisation context using a database function.\n * If the function is not available, it falls back gracefully without throwing errors.\n * \n * @param supabase - Supabase client instance\n * @param organisationId - The organisation ID to set as context\n * @returns Promise that resolves when context is set (or falls back gracefully)\n */\nexport async function setOrganisationContext(\n supabase: SupabaseClient,\n organisationId: string\n): Promise<void> {\n if (!supabase || !organisationId) {\n // TODO: Replace with proper logging service integration\n return;\n }\n\n try {\n // Try to call the database function to set organisation context\n const { error } = await supabase.rpc('rbac_audit_log', {\n p_event_type: 'organisation_switched',\n p_organisation_id: organisationId,\n p_metadata: { action: 'set_context' }\n });\n\n if (error) {\n // Function might not exist yet - this is expected during migration\n // Silent fail - will fall back to client-side filtering\n // TODO: Replace with proper logging service integration\n } else {\n // TODO: Replace with proper logging service integration\n }\n } catch (error) {\n // Handle any other errors gracefully\n // Silent fail - will fall back to client-side filtering\n // TODO: Replace with proper logging service integration\n }\n}\n\n/**\n * Clear organisation context from the database session\n * \n * @param supabase - Supabase client instance\n * @returns Promise that resolves when context is cleared\n */\nexport async function clearOrganisationContext(\n supabase: SupabaseClient\n): Promise<void> {\n if (!supabase) {\n // TODO: Replace with proper logging service integration\n return;\n }\n\n try {\n const { error } = await supabase.rpc('rbac_audit_log', {\n p_event_type: 'organisation_switched',\n p_metadata: { action: 'clear_context' }\n });\n \n if (error) {\n // Silent fail - function not available\n // TODO: Replace with proper logging service integration\n } else {\n // TODO: Replace with proper logging service integration\n }\n } catch (error) {\n // Silent fail - error occurred\n // TODO: Replace with proper logging service integration\n }\n}\n\n/**\n * Get current organisation context from the database session\n * \n * @param supabase - Supabase client instance\n * @returns Promise that resolves to the current organisation ID or null\n */\nexport async function getOrganisationContext(\n supabase: SupabaseClient\n): Promise<string | null> {\n if (!supabase) {\n // TODO: Replace with proper logging service integration\n return null;\n }\n\n try {\n // For now, return null since we're not using database context\n // This will be replaced with proper context management\n const data = null;\n const error = null;\n \n if (error) {\n // TODO: Replace with proper logging service integration\n return null;\n }\n \n // Validate that data is a string (allow empty strings)\n if (typeof data === 'string') {\n return data;\n }\n \n // Return null for invalid data formats\n return null;\n } catch (error) {\n // TODO: Replace with proper logging service integration\n return null;\n }\n}\n\n/**\n * Check if organisation context functions are available in the database\n * \n * @param supabase - Supabase client instance\n * @returns Promise that resolves to true if functions are available\n */\nexport async function isOrganisationContextAvailable(\n supabase: SupabaseClient\n): Promise<boolean> {\n if (!supabase) {\n return false;\n }\n\n try {\n const { error } = await supabase.rpc('get_organisation_context');\n \n if (error) {\n return false;\n }\n \n return true;\n } catch (error) {\n return false;\n }\n} "],"mappings":";;;;;AAsBA,eAAsB,uBACpB,UACA,gBACe;AACf,MAAI,CAAC,YAAY,CAAC,gBAAgB;AAEhC;AAAA,EACF;AAEA,MAAI;AAEF,UAAM,EAAE,MAAM,IAAI,MAAM,SAAS,IAAI,kBAAkB;AAAA,MACrD,cAAc;AAAA,MACd,mBAAmB;AAAA,MACnB,YAAY,EAAE,QAAQ,cAAc;AAAA,IACtC,CAAC;AAED,QAAI,OAAO;AAAA,IAIX,OAAO;AAAA,IAEP;AAAA,EACF,SAAS,OAAO;AAAA,EAIhB;AACF;AAQA,eAAsB,yBACpB,UACe;AACf,MAAI,CAAC,UAAU;AAEb;AAAA,EACF;AAEA,MAAI;AACF,UAAM,EAAE,MAAM,IAAI,MAAM,SAAS,IAAI,kBAAkB;AAAA,MACrD,cAAc;AAAA,MACd,YAAY,EAAE,QAAQ,gBAAgB;AAAA,IACxC,CAAC;AAED,QAAI,OAAO;AAAA,IAGX,OAAO;AAAA,IAEP;AAAA,EACF,SAAS,OAAO;AAAA,EAGhB;AACF;AAQA,eAAsB,uBACpB,UACwB;AACxB,MAAI,CAAC,UAAU;AAEb,WAAO;AAAA,EACT;AAEA,MAAI;AAGF,UAAM,OAAO;AACb,UAAM,QAAQ;AAEd,QAAI,OAAO;AAET,aAAO;AAAA,IACT;AAGA,QAAI,OAAO,SAAS,UAAU;AAC5B,aAAO;AAAA,IACT;AAGA,WAAO;AAAA,EACT,SAAS,OAAO;AAEd,WAAO;AAAA,EACT;AACF;AAQA,eAAsB,+BACpB,UACkB;AAClB,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AAEA,MAAI;AACF,UAAM,EAAE,MAAM,IAAI,MAAM,SAAS,IAAI,0BAA0B;AAE/D,QAAI,OAAO;AACT,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,WAAO;AAAA,EACT;AACF;AAnJA;AAAA;AAAA;AAAA;AAAA;","names":[]}
|