@jmruthers/pace-core 0.5.121 → 0.5.124
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/{AuthService-D4646R4b.d.ts → AuthService-DYuQPJj6.d.ts} +0 -9
- package/dist/{DataTable-DGZDJUYM.js → DataTable-OKDYRW2S.js} +7 -8
- package/dist/{PublicLoadingSpinner-DgDWTFqn.d.ts → PublicLoadingSpinner-CaoRbHvJ.d.ts} +30 -4
- package/dist/{UnifiedAuthProvider-UACKFATV.js → UnifiedAuthProvider-6C47WIML.js} +3 -4
- package/dist/{chunk-D6BOFXYR.js → chunk-35ZDPMBM.js} +3 -3
- package/dist/{chunk-CGURJ27Z.js → chunk-4MXVZVNS.js} +2 -2
- package/dist/{chunk-ZYJ6O5CA.js → chunk-C43QIDN3.js} +2 -2
- package/dist/{chunk-VKOCWWVY.js → chunk-CX5M4ZAG.js} +1 -6
- package/dist/{chunk-VKOCWWVY.js 3.map → chunk-CX5M4ZAG.js.map} +1 -1
- package/dist/{chunk-RIEJGKD3.js → chunk-ESJTIADP.js} +15 -6
- package/dist/{chunk-RIEJGKD3.js.map → chunk-ESJTIADP.js.map} +1 -1
- package/dist/{chunk-HFBOFZ3Z.js → chunk-GBGYYMC6.js} +317 -251
- package/dist/chunk-GBGYYMC6.js.map +1 -0
- package/dist/{chunk-SMJZMKYN.js → chunk-GEVIB2UB.js} +43 -10
- package/dist/chunk-GEVIB2UB.js.map +1 -0
- package/dist/{chunk-TDNI6ZWL.js → chunk-IJOZZOGT.js} +7 -7
- package/dist/chunk-IJOZZOGT.js.map +1 -0
- package/dist/{chunk-GZRXOUBE.js → chunk-M6DDYFUD.js} +2 -2
- package/dist/chunk-M6DDYFUD.js.map +1 -0
- package/dist/{chunk-B4GZ2BXO.js → chunk-NZGLXZGP.js} +3 -3
- package/dist/{chunk-NZ32EONV.js → chunk-QWNJCQXZ.js} +2 -2
- package/dist/{chunk-QPI2CCBA.js → chunk-VPUCTHTY.js} +149 -96
- package/dist/chunk-VPUCTHTY.js.map +1 -0
- package/dist/{chunk-FKFHZUGF.js → chunk-XN6GWKMV.js} +43 -56
- package/dist/chunk-XN6GWKMV.js.map +1 -0
- package/dist/{chunk-BHWIUEYH.js → chunk-ZBLK676C.js} +1 -61
- package/dist/chunk-ZBLK676C.js.map +1 -0
- package/dist/components.d.ts +1 -1
- package/dist/components.js +11 -11
- package/dist/{formatting-B1jSqgl-.d.ts → formatting-DFcCxUEk.d.ts} +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +9 -8
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +2 -3
- package/dist/rbac/index.js +7 -8
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +5 -3
- package/dist/theming/runtime.d.ts +73 -1
- package/dist/theming/runtime.js +5 -5
- package/dist/{usePublicRouteParams-BdF8bZgs.d.ts → usePublicRouteParams-Dyt1tzI9.d.ts} +60 -8
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +5 -5
- 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 +6 -6
- 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 +6 -6
- 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 +7 -7
- package/docs/api/interfaces/PublicErrorBoundaryState.md +5 -5
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +7 -7
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +51 -12
- package/docs/api/interfaces/PublicPageLayoutProps.md +72 -12
- 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 +140 -30
- package/docs/best-practices/README.md +1 -1
- package/docs/implementation-guides/datatable-filtering.md +313 -0
- package/docs/implementation-guides/datatable-rbac-usage.md +317 -0
- package/docs/implementation-guides/hierarchical-datatable.md +850 -0
- package/docs/implementation-guides/large-datasets.md +281 -0
- package/docs/implementation-guides/performance.md +403 -0
- package/docs/implementation-guides/public-pages.md +4 -4
- package/docs/migration/quick-migration-guide.md +320 -0
- package/docs/rbac/quick-start.md +16 -16
- package/docs/troubleshooting/README.md +4 -4
- package/docs/troubleshooting/cake-page-permission-guard-issue-summary.md +1 -1
- package/docs/troubleshooting/debugging.md +1117 -0
- package/docs/troubleshooting/migration.md +918 -0
- package/examples/public-pages/CorrectPublicPageImplementation.tsx +30 -30
- package/examples/public-pages/PublicEventPage.tsx +41 -41
- package/examples/public-pages/PublicPageApp.tsx +33 -33
- package/examples/public-pages/PublicPageUsageExample.tsx +30 -30
- package/package.json +4 -4
- package/src/__tests__/hooks/usePermissions.test.ts +265 -0
- package/src/components/DataTable/DataTable.test.tsx +9 -38
- package/src/components/DataTable/DataTable.tsx +0 -7
- package/src/components/DataTable/components/DataTableCore.tsx +125 -144
- package/src/components/DataTable/components/DataTableModals.tsx +25 -22
- package/src/components/DataTable/components/DataTableToolbar.tsx +14 -1
- package/src/components/DataTable/components/EditableRow.tsx +118 -42
- package/src/components/DataTable/components/UnifiedTableBody.tsx +129 -76
- package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +33 -14
- package/src/components/DataTable/utils/__tests__/exportUtils.test.ts +17 -5
- package/src/components/DataTable/utils/exportUtils.ts +3 -2
- package/src/components/Dialog/Dialog.tsx +1 -1
- package/src/components/Dialog/README.md +24 -24
- package/src/components/Dialog/examples/BasicHtmlTest.tsx +2 -2
- package/src/components/Dialog/examples/DebugHtmlExample.tsx +6 -6
- package/src/components/Dialog/examples/HtmlDialogExample.tsx +2 -2
- package/src/components/Dialog/examples/SimpleHtmlTest.tsx +3 -3
- package/src/components/Dialog/examples/__tests__/SimpleHtmlTest.test.tsx +4 -4
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +12 -1
- package/src/components/PublicLayout/EventLogo.tsx +175 -0
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +22 -18
- package/src/components/PublicLayout/PublicLoadingSpinner.tsx +22 -14
- package/src/components/PublicLayout/PublicPageHeader.tsx +133 -40
- package/src/components/PublicLayout/PublicPageLayout.tsx +75 -72
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +1 -1
- package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +8 -8
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +23 -16
- package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +86 -14
- package/src/examples/CorrectPublicPageImplementation.tsx +30 -30
- package/src/examples/PublicEventPage.tsx +41 -41
- package/src/examples/PublicPageApp.tsx +33 -33
- package/src/examples/PublicPageUsageExample.tsx +30 -30
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +583 -0
- package/src/hooks/__tests__/usePublicRouteParams.unit.test.ts +10 -3
- package/src/hooks/index.ts +1 -1
- package/src/hooks/public/usePublicEventLogo.ts +285 -0
- package/src/hooks/public/usePublicRouteParams.ts +21 -4
- package/src/hooks/useEventTheme.test.ts +119 -43
- package/src/hooks/useEventTheme.ts +84 -55
- package/src/index.ts +3 -1
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +630 -0
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +667 -0
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +647 -0
- package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +496 -0
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +496 -0
- package/src/rbac/secureClient.ts +4 -2
- package/src/services/EventService.ts +0 -66
- package/src/services/__tests__/EventService.eventColours.test.ts +44 -40
- package/src/styles/index.ts +1 -1
- package/src/theming/__tests__/parseEventColours.test.ts +209 -0
- package/src/theming/parseEventColours.ts +123 -0
- package/src/theming/runtime.ts +3 -0
- package/src/types/__tests__/file-reference.test.ts +447 -0
- package/src/utils/formatDate.test.ts +11 -11
- package/src/utils/formatting.ts +3 -2
- package/dist/chunk-BDZUMRBD.js 3.map +0 -1
- package/dist/chunk-BHWIUEYH.js.map +0 -1
- package/dist/chunk-CGURJ27Z.js.map +0 -1
- package/dist/chunk-FKFHZUGF.js.map +0 -1
- package/dist/chunk-GKHF54DI 2.js +0 -619
- package/dist/chunk-GKHF54DI.js 2.map +0 -1
- package/dist/chunk-GZRXOUBE.js.map +0 -1
- package/dist/chunk-HFBOFZ3Z.js.map +0 -1
- package/dist/chunk-NZ32EONV.js.map +0 -1
- package/dist/chunk-O3NWNXDY 2.js +0 -76
- package/dist/chunk-QPI2CCBA.js.map +0 -1
- package/dist/chunk-SMJZMKYN.js.map +0 -1
- package/dist/chunk-TDNI6ZWL.js 2.map +0 -1
- package/dist/chunk-TDNI6ZWL.js.map +0 -1
- package/dist/chunk-VKOCWWVY.js.map +0 -1
- package/dist/chunk-WP5I5GLN 2.js +0 -1564
- package/dist/index 3.js +0 -856
- package/dist/providers 3.js +0 -38
- package/dist/providers.js 3.map +0 -1
- package/dist/types 3.js +0 -128
- package/dist/types.js 3.map +0 -1
- package/dist/useInactivityTracker-MRUU55XI.js 3.map +0 -1
- package/dist/utils.js 3.map +0 -1
- package/dist/validation 3.js +0 -479
- package/src/styles/semantic.css +0 -24
- /package/dist/{DataTable-DGZDJUYM.js.map → DataTable-OKDYRW2S.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-UACKFATV.js.map → UnifiedAuthProvider-6C47WIML.js.map} +0 -0
- /package/dist/{chunk-D6BOFXYR.js.map → chunk-35ZDPMBM.js.map} +0 -0
- /package/dist/{chunk-CGURJ27Z.js 2.map → chunk-4MXVZVNS.js.map} +0 -0
- /package/dist/{chunk-ZYJ6O5CA.js.map → chunk-C43QIDN3.js.map} +0 -0
- /package/dist/{chunk-B4GZ2BXO.js.map → chunk-NZGLXZGP.js.map} +0 -0
- /package/dist/{chunk-NZ32EONV.js 2.map → chunk-QWNJCQXZ.js.map} +0 -0
package/dist/styles/index.js
CHANGED
|
@@ -2,14 +2,15 @@ import {
|
|
|
2
2
|
getAllStylePaths,
|
|
3
3
|
getStylePath,
|
|
4
4
|
styleConfig
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-CX5M4ZAG.js";
|
|
6
6
|
import {
|
|
7
7
|
applyPalette,
|
|
8
8
|
clearPalette,
|
|
9
9
|
generateSSRThemeCSS,
|
|
10
10
|
getCurrentThemeData,
|
|
11
|
-
isDynamicThemingActive
|
|
12
|
-
|
|
11
|
+
isDynamicThemingActive,
|
|
12
|
+
parseAndNormalizeEventColours
|
|
13
|
+
} from "../chunk-GEVIB2UB.js";
|
|
13
14
|
import "../chunk-PLDDJCW6.js";
|
|
14
15
|
export {
|
|
15
16
|
applyPalette,
|
|
@@ -19,6 +20,7 @@ export {
|
|
|
19
20
|
getCurrentThemeData,
|
|
20
21
|
getStylePath,
|
|
21
22
|
isDynamicThemingActive,
|
|
23
|
+
parseAndNormalizeEventColours,
|
|
22
24
|
styleConfig
|
|
23
25
|
};
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Event Colours Parser
|
|
3
|
+
* @package @jmruthers/pace-core
|
|
4
|
+
* @module Theming/ParseEventColours
|
|
5
|
+
* @since 2.0.0
|
|
6
|
+
*
|
|
7
|
+
* Shared utility for parsing and normalizing event_colours from database.
|
|
8
|
+
* Handles multiple input formats and ensures consistent palette structure.
|
|
9
|
+
*
|
|
10
|
+
* Supports:
|
|
11
|
+
* - Object format: { main: {...}, sec: {...}, acc: {...} }
|
|
12
|
+
* - String format: JSON string that will be parsed
|
|
13
|
+
* - Legacy format: { "ev-main": {...}, "ev-sec": {...}, "ev-acc": {...} }
|
|
14
|
+
*
|
|
15
|
+
* The function only includes explicitly defined color values, ensuring
|
|
16
|
+
* that undefined shades are not included in the palette.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { parseAndNormalizeEventColours } from '@jmruthers/pace-core/theming/parseEventColours';
|
|
21
|
+
*
|
|
22
|
+
* const palette = parseAndNormalizeEventColours(event.event_colours);
|
|
23
|
+
* if (palette) {
|
|
24
|
+
* applyPalette(palette);
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Parse and normalize event_colours to PaletteData
|
|
30
|
+
*
|
|
31
|
+
* Supports multiple input formats:
|
|
32
|
+
* - Object with 'main', 'sec', 'acc' keys
|
|
33
|
+
* - Object with 'ev-main', 'ev-sec', 'ev-acc' keys (legacy)
|
|
34
|
+
* - JSON string that will be parsed
|
|
35
|
+
*
|
|
36
|
+
* Only includes explicitly defined color values. Does not fill
|
|
37
|
+
* missing shades - only shades that are present in the input will
|
|
38
|
+
* be included in the output.
|
|
39
|
+
*
|
|
40
|
+
* @param input - Event colours from database (JSONB field)
|
|
41
|
+
* @returns Normalized palette data with main, sec, acc palettes, or null if invalid
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* // Standard format
|
|
46
|
+
* const colours = {
|
|
47
|
+
* main: { 500: { L: 0.5, C: 0.2, H: 0 }, raw: { L: 0.5, C: 0.2, H: 0 } },
|
|
48
|
+
* sec: { 500: { L: 0.5, C: 0.2, H: 120 } },
|
|
49
|
+
* acc: { 500: { L: 0.5, C: 0.2, H: 240 } }
|
|
50
|
+
* };
|
|
51
|
+
* const palette = parseAndNormalizeEventColours(colours);
|
|
52
|
+
* // Returns: { main: { 500: {...}, raw: {...} }, sec: { 500: {...} }, acc: { 500: {...} } }
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* // Legacy format with ev-* keys
|
|
58
|
+
* const colours = {
|
|
59
|
+
* "ev-main": { 500: { L: 0.5, C: 0.2, H: 0 } },
|
|
60
|
+
* "ev-sec": { 500: { L: 0.5, C: 0.2, H: 120 } },
|
|
61
|
+
* "ev-acc": { 500: { L: 0.5, C: 0.2, H: 240 } }
|
|
62
|
+
* };
|
|
63
|
+
* const palette = parseAndNormalizeEventColours(colours);
|
|
64
|
+
* // Returns normalized palette with only defined shades included
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare function parseAndNormalizeEventColours(input: unknown): {
|
|
68
|
+
main: any;
|
|
69
|
+
sec: any;
|
|
70
|
+
acc: any;
|
|
71
|
+
} | null;
|
|
72
|
+
|
|
1
73
|
/**
|
|
2
74
|
* @file PACE Core Theming Runtime
|
|
3
75
|
* @package @jmruthers/pace-core
|
|
@@ -71,4 +143,4 @@ declare function isDynamicThemingActive(): boolean;
|
|
|
71
143
|
*/
|
|
72
144
|
declare function getCurrentThemeData(): PaletteData | null;
|
|
73
145
|
|
|
74
|
-
export { type ColorPalette, type ColorShade, type PaletteData, applyPalette, clearPalette, generateSSRThemeCSS, getCurrentThemeData, isDynamicThemingActive };
|
|
146
|
+
export { type ColorPalette, type ColorShade, type PaletteData, applyPalette, clearPalette, generateSSRThemeCSS, getCurrentThemeData, isDynamicThemingActive, parseAndNormalizeEventColours };
|
package/dist/theming/runtime.js
CHANGED
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
clearPalette,
|
|
4
4
|
generateSSRThemeCSS,
|
|
5
5
|
getCurrentThemeData,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../chunk-
|
|
6
|
+
isDynamicThemingActive,
|
|
7
|
+
parseAndNormalizeEventColours
|
|
8
|
+
} from "../chunk-GEVIB2UB.js";
|
|
9
9
|
import "../chunk-PLDDJCW6.js";
|
|
10
|
-
init_runtime();
|
|
11
10
|
export {
|
|
12
11
|
applyPalette,
|
|
13
12
|
clearPalette,
|
|
14
13
|
generateSSRThemeCSS,
|
|
15
14
|
getCurrentThemeData,
|
|
16
|
-
isDynamicThemingActive
|
|
15
|
+
isDynamicThemingActive,
|
|
16
|
+
parseAndNormalizeEventColours
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -159,31 +159,82 @@ declare function useAppConfig(): UseAppConfigReturn;
|
|
|
159
159
|
* Hook that automatically applies event-specific theming when an event is selected.
|
|
160
160
|
* This ensures consistent UX across all apps in the pace suite.
|
|
161
161
|
*
|
|
162
|
+
* Works in two modes:
|
|
163
|
+
* 1. Authenticated mode: Uses EventProvider context via useEvents() hook
|
|
164
|
+
* 2. Public page mode: Accepts event prop directly (no EventProvider required)
|
|
165
|
+
*
|
|
162
166
|
* @example
|
|
163
167
|
* ```tsx
|
|
168
|
+
* // Authenticated pages (with EventProvider)
|
|
164
169
|
* import { useEventTheme } from '@jmruthers/pace-core/hooks';
|
|
165
170
|
*
|
|
166
171
|
* function MyApp() {
|
|
167
|
-
* // Automatically applies event colors when event is selected
|
|
172
|
+
* // Automatically applies event colors when event is selected via EventProvider
|
|
168
173
|
* useEventTheme();
|
|
169
174
|
*
|
|
170
175
|
* return <div>Your app content</div>;
|
|
171
176
|
* }
|
|
172
177
|
* ```
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```tsx
|
|
181
|
+
* // Public pages (without EventProvider)
|
|
182
|
+
* import { useEventTheme } from '@jmruthers/pace-core/hooks';
|
|
183
|
+
*
|
|
184
|
+
* function PublicPageLayout({ event }) {
|
|
185
|
+
* // Applies event colors directly from event prop
|
|
186
|
+
* useEventTheme(event);
|
|
187
|
+
*
|
|
188
|
+
* return <div>Public page content</div>;
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
173
191
|
*/
|
|
192
|
+
|
|
174
193
|
/**
|
|
175
194
|
* Hook that automatically applies event-specific theming
|
|
176
195
|
*
|
|
177
|
-
* This hook
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* -
|
|
181
|
-
* -
|
|
182
|
-
* -
|
|
196
|
+
* This hook applies event colors using the theming system. It works in two modes:
|
|
197
|
+
*
|
|
198
|
+
* **Authenticated Mode (default):**
|
|
199
|
+
* - Uses EventProvider context via useEvents() hook
|
|
200
|
+
* - Automatically watches selectedEvent changes
|
|
201
|
+
* - Used in authenticated pages with EventProvider
|
|
202
|
+
*
|
|
203
|
+
* **Public Page Mode:**
|
|
204
|
+
* - Accepts event prop directly
|
|
205
|
+
* - No EventProvider required
|
|
206
|
+
* - Used in public pages without authentication context
|
|
207
|
+
*
|
|
208
|
+
* Behavior:
|
|
209
|
+
* - Applies event colors when an event with `event_colours` is provided
|
|
210
|
+
* - Clears theming when no event is provided
|
|
211
|
+
* - Skips theme application when on the login route to prevent login screen styling
|
|
212
|
+
* - Handles cleanup and error cases gracefully
|
|
213
|
+
*
|
|
214
|
+
* @param event - Optional event object. If provided, uses this event directly (public page mode).
|
|
215
|
+
* If not provided, uses EventProvider context via useEvents() (authenticated mode).
|
|
183
216
|
*
|
|
184
217
|
* @returns void - This is an effect hook with no return value
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```tsx
|
|
221
|
+
* // Authenticated mode - uses EventProvider
|
|
222
|
+
* function MyApp() {
|
|
223
|
+
* useEventTheme(); // Watches selectedEvent from EventProvider
|
|
224
|
+
* return <div>App content</div>;
|
|
225
|
+
* }
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```tsx
|
|
230
|
+
* // Public page mode - uses event prop
|
|
231
|
+
* function PublicPageLayout({ event }) {
|
|
232
|
+
* useEventTheme(event); // Uses event prop directly
|
|
233
|
+
* return <div>Public content</div>;
|
|
234
|
+
* }
|
|
235
|
+
* ```
|
|
185
236
|
*/
|
|
186
|
-
declare function useEventTheme(): void;
|
|
237
|
+
declare function useEventTheme(event?: Event | null): void;
|
|
187
238
|
|
|
188
239
|
/**
|
|
189
240
|
* @file Public Event Hook
|
|
@@ -482,6 +533,7 @@ declare function usePublicEventCode(eventCodeParam?: string): {
|
|
|
482
533
|
declare function generatePublicRoutePath(eventCode: string, pageName?: string): string;
|
|
483
534
|
/**
|
|
484
535
|
* Utility function to extract event code from a public route path
|
|
536
|
+
* Supports 2-50 character event codes
|
|
485
537
|
*/
|
|
486
538
|
declare function extractEventCodeFromPath(path: string): string | null;
|
|
487
539
|
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AppConfig, S as SecureDataAccess, a as cn, j as formatCompactNumber, e as formatCurrency, f as formatDate, k as formatFileSize, h as formatNumber, i as formatPercent, g as getAppConfig, d as getCurrentAppId, b as getCurrentAppName, s as setAppConfig, u as useSessionTracking } from './formatting-
|
|
1
|
+
export { A as AppConfig, S as SecureDataAccess, a as cn, j as formatCompactNumber, e as formatCurrency, f as formatDate, k as formatFileSize, h as formatNumber, i as formatPercent, g as getAppConfig, d as getCurrentAppId, b as getCurrentAppName, s as setAppConfig, u as useSessionTracking } from './formatting-DFcCxUEk.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export { u as useComponentPerformance } from './useComponentPerformance-DE9l5RkL.js';
|
|
4
4
|
import * as date_fns from 'date-fns';
|
package/dist/utils.js
CHANGED
|
@@ -10,13 +10,10 @@ import {
|
|
|
10
10
|
getCurrentAppName,
|
|
11
11
|
setAppConfig,
|
|
12
12
|
useSessionTracking
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-M6DDYFUD.js";
|
|
14
14
|
import {
|
|
15
15
|
LoadingSpinner
|
|
16
16
|
} from "./chunk-CDQ3PX7L.js";
|
|
17
|
-
import {
|
|
18
|
-
cn
|
|
19
|
-
} from "./chunk-PYUXFQJ3.js";
|
|
20
17
|
import {
|
|
21
18
|
getAppNameFromBuildTime,
|
|
22
19
|
getAppNameFromEnvironment,
|
|
@@ -32,6 +29,9 @@ import {
|
|
|
32
29
|
PERFORMANCE_BUDGETS,
|
|
33
30
|
performanceBudgetMonitor
|
|
34
31
|
} from "./chunk-O3NWNXDY.js";
|
|
32
|
+
import {
|
|
33
|
+
cn
|
|
34
|
+
} from "./chunk-PYUXFQJ3.js";
|
|
35
35
|
import {
|
|
36
36
|
clearOrganisationContext,
|
|
37
37
|
getOrganisationContext,
|
|
@@ -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-OKDYRW2S.js").then((module) => ({ default: module.DataTable })),
|
|
600
600
|
"DataTable"
|
|
601
601
|
);
|
|
602
602
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.124](../README.md) / [Exports](../modules.md) / PublicErrorBoundary
|
|
2
2
|
|
|
3
3
|
# Class: PublicErrorBoundary
|
|
4
4
|
|
|
@@ -52,7 +52,7 @@ Component\<PublicErrorBoundaryProps, PublicErrorBoundaryState\>.constructo
|
|
|
52
52
|
|
|
53
53
|
#### Defined in
|
|
54
54
|
|
|
55
|
-
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:
|
|
55
|
+
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:81](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx#L81)
|
|
56
56
|
|
|
57
57
|
## Methods
|
|
58
58
|
|
|
@@ -72,7 +72,7 @@ Component\<PublicErrorBoundaryProps, PublicErrorBoundaryState\>.constructo
|
|
|
72
72
|
|
|
73
73
|
#### Defined in
|
|
74
74
|
|
|
75
|
-
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:
|
|
75
|
+
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:91](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx#L91)
|
|
76
76
|
|
|
77
77
|
___
|
|
78
78
|
|
|
@@ -97,7 +97,7 @@ Component.componentDidCatch
|
|
|
97
97
|
|
|
98
98
|
#### Defined in
|
|
99
99
|
|
|
100
|
-
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:
|
|
100
|
+
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:99](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx#L99)
|
|
101
101
|
|
|
102
102
|
___
|
|
103
103
|
|
|
@@ -111,7 +111,7 @@ ___
|
|
|
111
111
|
|
|
112
112
|
#### Defined in
|
|
113
113
|
|
|
114
|
-
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:
|
|
114
|
+
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:115](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx#L115)
|
|
115
115
|
|
|
116
116
|
___
|
|
117
117
|
|
|
@@ -129,4 +129,4 @@ Component.render
|
|
|
129
129
|
|
|
130
130
|
#### Defined in
|
|
131
131
|
|
|
132
|
-
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:
|
|
132
|
+
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:123](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx#L123)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.124](../README.md) / [Exports](../modules.md) / SecureSupabaseClient
|
|
2
2
|
|
|
3
3
|
# Class: SecureSupabaseClient
|
|
4
4
|
|
|
@@ -59,7 +59,7 @@ Get the current organisation ID
|
|
|
59
59
|
|
|
60
60
|
#### Defined in
|
|
61
61
|
|
|
62
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
62
|
+
[packages/core/src/rbac/secureClient.ts:153](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L153)
|
|
63
63
|
|
|
64
64
|
___
|
|
65
65
|
|
|
@@ -75,7 +75,7 @@ Get the current event ID
|
|
|
75
75
|
|
|
76
76
|
#### Defined in
|
|
77
77
|
|
|
78
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
78
|
+
[packages/core/src/rbac/secureClient.ts:160](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L160)
|
|
79
79
|
|
|
80
80
|
___
|
|
81
81
|
|
|
@@ -91,7 +91,7 @@ Get the current app ID
|
|
|
91
91
|
|
|
92
92
|
#### Defined in
|
|
93
93
|
|
|
94
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
94
|
+
[packages/core/src/rbac/secureClient.ts:167](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L167)
|
|
95
95
|
|
|
96
96
|
___
|
|
97
97
|
|
|
@@ -116,7 +116,7 @@ Create a new client with updated context
|
|
|
116
116
|
|
|
117
117
|
#### Defined in
|
|
118
118
|
|
|
119
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
119
|
+
[packages/core/src/rbac/secureClient.ts:174](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L174)
|
|
120
120
|
|
|
121
121
|
___
|
|
122
122
|
|
|
@@ -132,4 +132,4 @@ Get the underlying Supabase client (for internal use only)
|
|
|
132
132
|
|
|
133
133
|
#### Defined in
|
|
134
134
|
|
|
135
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
135
|
+
[packages/core/src/rbac/secureClient.ts:192](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L192)
|