@jmruthers/pace-core 0.5.136 → 0.5.137
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-CYOHOX3O.js → DataTable-6M4L6BI2.js} +10 -9
- package/dist/{EventLogo-801uofbR.d.ts → EventLogo-rFL_kRjk.d.ts} +73 -1
- package/dist/{UnifiedAuthProvider-5E5TUNMS.js → UnifiedAuthProvider-XIQQ7LVU.js} +4 -5
- package/dist/{chunk-YLKIDTUK.js → chunk-22WKWKRX.js} +4 -4
- package/dist/{chunk-TVYPTYOY.js → chunk-4C7EXCAR.js} +60 -24
- package/dist/chunk-4C7EXCAR.js.map +1 -0
- package/dist/{chunk-2TWNJ46Y.js → chunk-6LAAY47Q.js} +2 -2
- package/dist/{chunk-444EZN6N.js → chunk-7QCC6MCP.js} +88 -1
- package/dist/chunk-7QCC6MCP.js.map +1 -0
- package/dist/{chunk-FHWWBIHA.js → chunk-BCIBECNB.js} +5 -5
- package/dist/chunk-BJPBT3CU.js +21 -0
- package/dist/chunk-BJPBT3CU.js.map +1 -0
- package/dist/{chunk-L6PGMCMD.js → chunk-BLCXZEYF.js} +3 -3
- package/dist/{chunk-HJGGOMQ6.js → chunk-HAWZXGR2.js} +147 -103
- package/dist/chunk-HAWZXGR2.js.map +1 -0
- package/dist/{chunk-XARJS7CD.js → chunk-INQLMHPF.js} +2 -2
- package/dist/chunk-JISYG63F.js +70 -0
- package/dist/chunk-JISYG63F.js.map +1 -0
- package/dist/{chunk-NOHEVYVX.js → chunk-KYRHUBIU.js} +417 -319
- package/dist/chunk-KYRHUBIU.js.map +1 -0
- package/dist/{chunk-SL2YQDR6.js → chunk-MA6EPSGZ.js} +2 -2
- package/dist/{chunk-5DPZ5EAT.js → chunk-OWAG3GSU.js} +1 -3
- package/dist/{chunk-LTV3XIJJ.js → chunk-T6JN6LH6.js} +4 -4
- package/dist/{chunk-4MT5BGGL.js → chunk-YCWDTTUK.js} +4 -6
- package/dist/{chunk-4MT5BGGL.js.map → chunk-YCWDTTUK.js.map} +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +12 -11
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +8 -9
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/dist/providers.js +3 -4
- package/dist/rbac/index.js +8 -9
- package/dist/schema-DTDZQe2u.d.ts +28 -0
- package/dist/types.d.ts +152 -3
- package/dist/types.js +51 -16
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +89 -4
- package/dist/utils.js +214 -96
- package/dist/utils.js.map +1 -1
- package/dist/validation.d.ts +1 -343
- package/dist/validation.js +3 -100
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/BadgeProps.md +27 -0
- 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/EventLogoProps.md +1 -1
- package/docs/api/interfaces/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/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 +79 -10
- package/docs/architecture/README.md +0 -1
- package/docs/styles/README.md +0 -2
- package/examples/RBAC/CompleteRBACExample.tsx +324 -0
- package/examples/RBAC/EventBasedApp.tsx +239 -0
- package/examples/RBAC/PermissionExample.tsx +151 -0
- package/examples/RBAC/index.ts +13 -0
- package/examples/public-pages/CorrectPublicPageImplementation.tsx +301 -0
- package/examples/public-pages/PublicEventPage.tsx +274 -0
- package/examples/public-pages/PublicPageApp.tsx +308 -0
- package/examples/public-pages/PublicPageUsageExample.tsx +216 -0
- package/examples/public-pages/index.ts +14 -0
- package/package.json +1 -10
- package/src/__tests__/TEST_STANDARD.md +92 -0
- package/src/components/Badge/Badge.test.tsx +314 -0
- package/src/components/Badge/Badge.tsx +304 -0
- package/src/components/Badge/index.ts +3 -0
- package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +217 -0
- package/src/components/DataTable/__tests__/styles.test.ts +1 -1
- package/src/components/DataTable/components/ColumnFilter.tsx +8 -4
- package/src/components/DataTable/components/DataTableBody.tsx +461 -0
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +144 -0
- package/src/components/DataTable/components/FilterRow.tsx +9 -3
- package/src/components/DataTable/components/PaginationControls.tsx +1 -0
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +513 -0
- package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +14 -68
- package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +62 -0
- package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +43 -0
- package/src/components/DataTable/core/ActionManager.ts +235 -0
- package/src/components/DataTable/core/ColumnManager.ts +205 -0
- package/src/components/DataTable/core/DataManager.ts +188 -0
- package/src/components/DataTable/core/DataTableContext.tsx +181 -0
- package/src/components/DataTable/core/LocalDataAdapter.ts +273 -0
- package/src/components/DataTable/core/PluginRegistry.ts +229 -0
- package/src/components/DataTable/core/StateManager.ts +311 -0
- package/src/components/DataTable/core/interfaces.ts +338 -0
- package/src/components/DataTable/styles.ts +27 -6
- package/src/components/DataTable/utils/__tests__/columnUtils.test.ts +94 -0
- package/src/components/DataTable/utils/columnUtils.ts +40 -0
- package/src/components/DataTable/utils/debugTools.ts +609 -0
- package/src/components/DataTable/utils/index.ts +1 -0
- package/src/components/Dialog/README.md +804 -0
- package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +611 -0
- package/src/components/Dialog/utils/safeHtml.ts +185 -0
- package/src/components/Footer/Footer.test.tsx +1 -1
- package/src/components/Form/Form.test.tsx +1 -1
- package/src/components/Form/FormErrorSummary.tsx +113 -0
- package/src/components/Form/FormFieldset.tsx +127 -0
- package/src/components/Form/FormLiveRegion.tsx +198 -0
- package/src/components/LoginForm/LoginForm.test.tsx +1 -1
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +76 -10
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -1
- package/src/components/PasswordReset/PasswordResetForm.test.tsx +597 -0
- package/src/components/PasswordReset/PasswordResetForm.tsx +201 -0
- package/src/components/PublicLayout/PublicPageDebugger.tsx +104 -0
- package/src/components/PublicLayout/PublicPageDiagnostic.tsx +162 -0
- package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +1 -1
- package/src/components/Select/Select.test.tsx +1 -1
- package/src/components/Select/Select.tsx +20 -8
- package/src/components/Table/__tests__/Table.test.tsx +1 -1
- package/src/components/index.ts +3 -0
- package/src/hooks/__tests__/useFileUrl.unit.test.ts +83 -85
- package/src/index.ts +4 -0
- package/src/styles/core.css +3 -0
- package/src/utils/appConfig.ts +47 -0
- package/src/utils/appIdResolver.test.ts +499 -0
- package/src/utils/appIdResolver.ts +130 -0
- package/src/utils/appNameResolver.simple.test.ts +212 -0
- package/src/utils/appNameResolver.test.ts +121 -0
- package/src/utils/appNameResolver.ts +191 -0
- package/src/utils/audit.ts +127 -0
- package/src/utils/auth-utils.ts +96 -0
- package/src/utils/bundleAnalysis.ts +129 -0
- package/src/utils/cn.ts +7 -0
- package/src/utils/debugLogger.ts +67 -0
- package/src/utils/deviceFingerprint.ts +215 -0
- package/src/utils/dynamicUtils.ts +105 -0
- package/src/utils/file-reference.test.ts +788 -0
- package/src/utils/file-reference.ts +519 -0
- package/src/utils/formatDate.test.ts +237 -0
- package/src/utils/formatting.ts +133 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/lazyLoad.tsx +44 -0
- package/src/utils/logger.ts +179 -0
- package/src/utils/organisationContext.test.ts +322 -0
- package/src/utils/organisationContext.ts +153 -0
- package/src/utils/performanceBenchmark.ts +64 -0
- package/src/utils/performanceBudgets.ts +110 -0
- package/src/utils/permissionTypes.ts +37 -0
- package/src/utils/permissionUtils.test.ts +393 -0
- package/src/utils/permissionUtils.ts +34 -0
- package/src/utils/sanitization.ts +264 -0
- package/src/utils/schemaUtils.ts +37 -0
- package/src/utils/secureDataAccess.test.ts +711 -0
- package/src/utils/secureDataAccess.ts +377 -0
- package/src/utils/secureErrors.ts +79 -0
- package/src/utils/secureStorage.ts +244 -0
- package/src/utils/security.ts +156 -0
- package/src/utils/securityMonitor.ts +45 -0
- package/src/utils/sessionTracking.ts +126 -0
- package/src/utils/validation.ts +111 -0
- package/src/utils/validationUtils.ts +120 -0
- package/src/validation/index.ts +2 -2
- package/dist/chunk-444EZN6N.js.map +0 -1
- package/dist/chunk-APIBCTL2.js +0 -670
- package/dist/chunk-APIBCTL2.js.map +0 -1
- package/dist/chunk-HJGGOMQ6.js.map +0 -1
- package/dist/chunk-K2WWTH7O.js +0 -94
- package/dist/chunk-K2WWTH7O.js.map +0 -1
- package/dist/chunk-LMC26NLJ.js +0 -84
- package/dist/chunk-LMC26NLJ.js.map +0 -1
- package/dist/chunk-NOHEVYVX.js.map +0 -1
- package/dist/chunk-TVYPTYOY.js.map +0 -1
- package/dist/validation-8npbysjg.d.ts +0 -177
- /package/dist/{DataTable-CYOHOX3O.js.map → DataTable-6M4L6BI2.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-5E5TUNMS.js.map → UnifiedAuthProvider-XIQQ7LVU.js.map} +0 -0
- /package/dist/{chunk-YLKIDTUK.js.map → chunk-22WKWKRX.js.map} +0 -0
- /package/dist/{chunk-2TWNJ46Y.js.map → chunk-6LAAY47Q.js.map} +0 -0
- /package/dist/{chunk-FHWWBIHA.js.map → chunk-BCIBECNB.js.map} +0 -0
- /package/dist/{chunk-L6PGMCMD.js.map → chunk-BLCXZEYF.js.map} +0 -0
- /package/dist/{chunk-XARJS7CD.js.map → chunk-INQLMHPF.js.map} +0 -0
- /package/dist/{chunk-SL2YQDR6.js.map → chunk-MA6EPSGZ.js.map} +0 -0
- /package/dist/{chunk-5DPZ5EAT.js.map → chunk-OWAG3GSU.js.map} +0 -0
- /package/dist/{chunk-LTV3XIJJ.js.map → chunk-T6JN6LH6.js.map} +0 -0
- /package/examples/{components → components 2}/DataTable/HierarchicalActionsExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/HierarchicalExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/InitialPageSizeExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/PerformanceExample.tsx +0 -0
- /package/examples/{components → components 2}/DataTable/index.ts +0 -0
- /package/examples/{components → components 2}/Dialog/BasicHtmlTest.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/DebugHtmlExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/HtmlDialogExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/ScrollableDialogExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/SimpleHtmlTest.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/SmartDialogExample.tsx +0 -0
- /package/examples/{components → components 2}/Dialog/index.ts +0 -0
- /package/examples/{components → components 2}/index.ts +0 -0
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
generateCSVContent,
|
|
40
40
|
getAriaSortValue,
|
|
41
41
|
getCellRenderer,
|
|
42
|
+
getColumnHeaderText,
|
|
42
43
|
getHierarchicalSortConfig,
|
|
43
44
|
getPageSizeOptions,
|
|
44
45
|
getPaginationBinding,
|
|
@@ -59,8 +60,8 @@ import {
|
|
|
59
60
|
sum,
|
|
60
61
|
validateHierarchicalData,
|
|
61
62
|
validatePaginationConfig
|
|
62
|
-
} from "./chunk-
|
|
63
|
-
import "./chunk-
|
|
63
|
+
} from "./chunk-HAWZXGR2.js";
|
|
64
|
+
import "./chunk-BLCXZEYF.js";
|
|
64
65
|
import "./chunk-BVYWGZVV.js";
|
|
65
66
|
import "./chunk-SBVILCCA.js";
|
|
66
67
|
import {
|
|
@@ -81,14 +82,13 @@ import {
|
|
|
81
82
|
throttle,
|
|
82
83
|
useDataTablePerformance
|
|
83
84
|
} from "./chunk-BESYRHQM.js";
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-
|
|
86
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-MA6EPSGZ.js";
|
|
86
|
+
import "./chunk-6LAAY47Q.js";
|
|
87
|
+
import "./chunk-YCWDTTUK.js";
|
|
88
|
+
import "./chunk-OWAG3GSU.js";
|
|
87
89
|
import "./chunk-Q5QRDWKI.js";
|
|
88
|
-
import "./chunk-5DPZ5EAT.js";
|
|
89
90
|
import "./chunk-56XJ3TU6.js";
|
|
90
|
-
import "./chunk-
|
|
91
|
-
import "./chunk-444EZN6N.js";
|
|
91
|
+
import "./chunk-7QCC6MCP.js";
|
|
92
92
|
import "./chunk-XDNLUEXI.js";
|
|
93
93
|
import "./chunk-PLDDJCW6.js";
|
|
94
94
|
export {
|
|
@@ -144,6 +144,7 @@ export {
|
|
|
144
144
|
generateCSVContent,
|
|
145
145
|
getAriaSortValue,
|
|
146
146
|
getCellRenderer,
|
|
147
|
+
getColumnHeaderText,
|
|
147
148
|
getHierarchicalSortConfig,
|
|
148
149
|
getOptimalPageSizeOptions,
|
|
149
150
|
getPageSizeOptions,
|
|
@@ -169,4 +170,4 @@ export {
|
|
|
169
170
|
validateHierarchicalData,
|
|
170
171
|
validatePaginationConfig
|
|
171
172
|
};
|
|
172
|
-
//# sourceMappingURL=DataTable-
|
|
173
|
+
//# sourceMappingURL=DataTable-6M4L6BI2.js.map
|
|
@@ -421,6 +421,77 @@ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.Avata
|
|
|
421
421
|
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
422
422
|
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
423
423
|
|
|
424
|
+
/**
|
|
425
|
+
* @file Badge Component
|
|
426
|
+
* @package @jmruthers/pace-core
|
|
427
|
+
* @module Components
|
|
428
|
+
* @since 0.1.0
|
|
429
|
+
*
|
|
430
|
+
* A small, non-interactive visual label component for displaying concise information
|
|
431
|
+
* such as status indicators, tags, or labels. Acts as a visual alternative to buttons
|
|
432
|
+
* for non-interactive content.
|
|
433
|
+
*
|
|
434
|
+
* Features:
|
|
435
|
+
* - 27 combined variants (3 styles × 3 colors × 3 shades)
|
|
436
|
+
* - Non-interactive by default (renders as <span>)
|
|
437
|
+
* - Supports all pace-core color palettes (main, sec, acc)
|
|
438
|
+
* - Customizable styling via className prop
|
|
439
|
+
* - Accessible and screen reader friendly
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* ```tsx
|
|
443
|
+
* // Basic badge with default variant
|
|
444
|
+
* <Badge>New</Badge>
|
|
445
|
+
*
|
|
446
|
+
* // Badge with specific variant
|
|
447
|
+
* <Badge variant="solid-main-normal">Active</Badge>
|
|
448
|
+
*
|
|
449
|
+
* // Outline variant
|
|
450
|
+
* <Badge variant="outline-sec-muted">Pending</Badge>
|
|
451
|
+
*
|
|
452
|
+
* // Soft variant with accent color
|
|
453
|
+
* <Badge variant="soft-acc-strong">Featured</Badge>
|
|
454
|
+
*
|
|
455
|
+
* // Custom styling
|
|
456
|
+
* <Badge variant="solid-main-normal" className="px-4">
|
|
457
|
+
* Custom Badge
|
|
458
|
+
* </Badge>
|
|
459
|
+
* ```
|
|
460
|
+
*
|
|
461
|
+
* @accessibility
|
|
462
|
+
* - Renders as semantic <span> element
|
|
463
|
+
* - No focus styles (non-interactive by default)
|
|
464
|
+
* - Screen reader friendly through semantic HTML
|
|
465
|
+
* - Can be wrapped in interactive elements if needed
|
|
466
|
+
*/
|
|
467
|
+
|
|
468
|
+
type BadgeVariant = 'solid-main-muted' | 'solid-main-normal' | 'solid-main-strong' | 'solid-sec-muted' | 'solid-sec-normal' | 'solid-sec-strong' | 'solid-acc-muted' | 'solid-acc-normal' | 'solid-acc-strong' | 'outline-main-muted' | 'outline-main-normal' | 'outline-main-strong' | 'outline-sec-muted' | 'outline-sec-normal' | 'outline-sec-strong' | 'outline-acc-muted' | 'outline-acc-normal' | 'outline-acc-strong' | 'soft-main-muted' | 'soft-main-normal' | 'soft-main-strong' | 'soft-sec-muted' | 'soft-sec-normal' | 'soft-sec-strong' | 'soft-acc-muted' | 'soft-acc-normal' | 'soft-acc-strong';
|
|
469
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
470
|
+
/** Visual variant of the badge (style-color-shade) */
|
|
471
|
+
variant?: BadgeVariant;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Badge Component
|
|
475
|
+
* A small, non-interactive visual label for displaying concise information.
|
|
476
|
+
*
|
|
477
|
+
* @component
|
|
478
|
+
* @example
|
|
479
|
+
* ```tsx
|
|
480
|
+
* // Default variant
|
|
481
|
+
* <Badge>New</Badge>
|
|
482
|
+
*
|
|
483
|
+
* // Specific variant
|
|
484
|
+
* <Badge variant="solid-main-normal">Active</Badge>
|
|
485
|
+
*
|
|
486
|
+
* // Outline variant
|
|
487
|
+
* <Badge variant="outline-sec-muted">Pending</Badge>
|
|
488
|
+
*
|
|
489
|
+
* // Soft variant
|
|
490
|
+
* <Badge variant="soft-acc-strong">Featured</Badge>
|
|
491
|
+
* ```
|
|
492
|
+
*/
|
|
493
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
494
|
+
|
|
424
495
|
/**
|
|
425
496
|
* @file Checkbox Component
|
|
426
497
|
* @package @jmruthers/pace-core
|
|
@@ -895,6 +966,7 @@ interface UseSelectStateProps {
|
|
|
895
966
|
interface SelectProps extends Omit<React.HTMLAttributes<HTMLFormElement>, 'onChange' | 'onKeyDown' | 'onFocus' | 'onBlur'> {
|
|
896
967
|
children: React.ReactNode;
|
|
897
968
|
className?: string;
|
|
969
|
+
direction?: 'up' | 'down';
|
|
898
970
|
}
|
|
899
971
|
interface SelectTriggerProps extends Omit<ButtonProps, 'onClick' | 'onKeyDown'> {
|
|
900
972
|
children: React.ReactNode;
|
|
@@ -3516,4 +3588,4 @@ declare function EventLogoCompact(props: EventLogoProps): react_jsx_runtime.JSX.
|
|
|
3516
3588
|
*/
|
|
3517
3589
|
declare function EventLogoLarge(props: EventLogoProps): react_jsx_runtime.JSX.Element;
|
|
3518
3590
|
|
|
3519
|
-
export {
|
|
3591
|
+
export { type DialogTitleProps as $, Alert as A, Button as B, Card as C, TableHead as D, TableRow as E, Dialog as F, DialogPortal as G, DialogOverlay as H, Input as I, DialogTrigger as J, DialogClose as K, Label as L, DialogContent as M, DialogHeader as N, DialogBody as O, Progress as P, DialogFooter as Q, DialogTitle as R, Switch as S, Table as T, DialogDescription as U, type DialogProps as V, type DialogTriggerProps as W, type DialogContentProps as X, type DialogOverlayProps as Y, type DialogHeaderProps as Z, type DialogFooterProps as _, type ButtonProps as a, useIsPublicPage as a$, type DialogDescriptionProps as a0, type DialogSize as a1, Select as a2, SelectGroup as a3, SelectValue as a4, SelectTrigger as a5, SelectContent as a6, SelectLabel as a7, SelectItem as a8, SelectSeparator as a9, type NavigationItem as aA, OrganisationSelector as aB, type OrganisationSelectorProps as aC, UserMenu as aD, ErrorBoundary as aE, type ErrorBoundaryProps as aF, type ErrorBoundaryState as aG, LoadingSpinner as aH, SessionRestorationLoader as aI, type SessionRestorationLoaderProps as aJ, EventSelector as aK, FileUpload as aL, type FileUploadProps as aM, FileDisplay as aN, type FileDisplayProps as aO, useFileReference as aP, useFileReferenceForRecord as aQ, useFileReferenceById as aR, useFilesByCategory as aS, type UseFileReferenceOptions as aT, type UseFileReferenceReturn as aU, type UseFileReferenceForRecordReturn as aV, PublicPageLayout as aW, usePublicPageContext$1 as aX, PublicPageHeader as aY, PublicPageProvider as aZ, usePublicPageContext as a_, Toast as aa, Toaster as ab, ToastAction as ac, ToastProvider as ad, ToastViewport as ae, ToastTitle as af, ToastDescription as ag, ToastClose as ah, type ToastActionElement as ai, type ToastProps as aj, Tooltip as ak, TooltipTrigger as al, TooltipContent as am, TooltipProvider as an, TooltipRoot as ao, Form as ap, type FormProps as aq, LoginForm as ar, type LoginFormProps as as, Header as at, Footer as au, type FooterProps as av, ProtectedRoute as aw, type ProtectedRouteProps as ax, NavigationMenu as ay, type NavigationMenuProps as az, CardHeader as b, PublicPageFooter as b0, PublicPageContextChecker as b1, PublicErrorBoundary as b2, useErrorBoundary as b3, DefaultPublicErrorFallback as b4, PublicLoadingSpinner as b5, PublicLoadingSpinnerFullPage as b6, PublicLoadingSkeleton as b7, EventLogo as b8, EventLogoCompact as b9, EventLogoLarge as ba, type EventLogoProps as bb, type PublicPageLayoutProps as bc, type PublicPageHeaderProps as bd, type PublicPageFooterProps as be, type PublicErrorBoundaryProps as bf, type PublicErrorBoundaryState as bg, type PublicLoadingSpinnerProps as bh, type PaceAppLayoutProps as bi, PaceAppLayout as bj, type PaceLoginPageProps as bk, PaceLoginPage as bl, type UserMenuProps as bm, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type CardActionsProps as i, type InputProps as j, type LabelProps as k, AlertTitle as l, AlertDescription as m, Avatar as n, AvatarImage as o, AvatarFallback as p, Badge as q, type BadgeProps as r, type BadgeVariant as s, Checkbox as t, type SwitchProps as u, TableHeader as v, TableBody as w, TableCaption as x, TableCell as y, TableFooter as z };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_UnifiedAuthProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6LAAY47Q.js";
|
|
4
4
|
import {
|
|
5
5
|
UnifiedAuthProvider,
|
|
6
6
|
useUnifiedAuth
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-444EZN6N.js";
|
|
7
|
+
} from "./chunk-YCWDTTUK.js";
|
|
8
|
+
import "./chunk-7QCC6MCP.js";
|
|
10
9
|
import "./chunk-XDNLUEXI.js";
|
|
11
10
|
import "./chunk-PLDDJCW6.js";
|
|
12
11
|
init_UnifiedAuthProvider();
|
|
@@ -14,4 +13,4 @@ export {
|
|
|
14
13
|
UnifiedAuthProvider,
|
|
15
14
|
useUnifiedAuth
|
|
16
15
|
};
|
|
17
|
-
//# sourceMappingURL=UnifiedAuthProvider-
|
|
16
|
+
//# sourceMappingURL=UnifiedAuthProvider-XIQQ7LVU.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_OrganisationProvider,
|
|
3
3
|
usePublicPageContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4C7EXCAR.js";
|
|
5
5
|
import {
|
|
6
6
|
init_useOrganisations,
|
|
7
7
|
useOrganisations
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MA6EPSGZ.js";
|
|
9
9
|
import {
|
|
10
10
|
useUnifiedAuth
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YCWDTTUK.js";
|
|
12
12
|
import {
|
|
13
13
|
init_logger,
|
|
14
14
|
logger
|
|
@@ -662,4 +662,4 @@ export {
|
|
|
662
662
|
generatePublicRoutePath,
|
|
663
663
|
extractEventCodeFromPath
|
|
664
664
|
};
|
|
665
|
-
//# sourceMappingURL=chunk-
|
|
665
|
+
//# sourceMappingURL=chunk-22WKWKRX.js.map
|
|
@@ -2,24 +2,20 @@ import {
|
|
|
2
2
|
init_useOrganisations,
|
|
3
3
|
useEvents,
|
|
4
4
|
useOrganisations
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MA6EPSGZ.js";
|
|
6
6
|
import {
|
|
7
7
|
init_UnifiedAuthProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6LAAY47Q.js";
|
|
9
9
|
import {
|
|
10
10
|
OrganisationServiceContext,
|
|
11
11
|
OrganisationServiceProvider,
|
|
12
12
|
init_OrganisationServiceProvider,
|
|
13
13
|
useOrganisationService,
|
|
14
14
|
useUnifiedAuth
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YCWDTTUK.js";
|
|
16
16
|
import {
|
|
17
17
|
cn
|
|
18
18
|
} from "./chunk-56XJ3TU6.js";
|
|
19
|
-
import {
|
|
20
|
-
init_organisationContext,
|
|
21
|
-
setOrganisationContext
|
|
22
|
-
} from "./chunk-K2WWTH7O.js";
|
|
23
19
|
import {
|
|
24
20
|
applyPalette,
|
|
25
21
|
clearPalette,
|
|
@@ -728,10 +724,30 @@ async function archiveFile(supabase, path, options) {
|
|
|
728
724
|
// src/hooks/useFileDisplay.ts
|
|
729
725
|
import { useState, useEffect as useEffect2, useCallback } from "react";
|
|
730
726
|
|
|
731
|
-
// src/utils/
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
727
|
+
// src/utils/organisationContext.ts
|
|
728
|
+
async function setOrganisationContext(supabase, organisationId) {
|
|
729
|
+
if (!supabase || !organisationId) {
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
try {
|
|
733
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
734
|
+
setTimeout(() => reject(new Error("RPC timeout after 3 seconds")), 3e3);
|
|
735
|
+
});
|
|
736
|
+
const rpcPromise = supabase.rpc("set_organisation_context", {
|
|
737
|
+
org_id: organisationId
|
|
738
|
+
});
|
|
739
|
+
const { error } = await Promise.race([rpcPromise, timeoutPromise]);
|
|
740
|
+
if (error) {
|
|
741
|
+
console.log("[organisationContext] RPC function not available or failed, continuing without database context");
|
|
742
|
+
} else {
|
|
743
|
+
console.log("[organisationContext] Organisation context set in database successfully");
|
|
744
|
+
}
|
|
745
|
+
} catch (error) {
|
|
746
|
+
console.log("[organisationContext] Failed to set database context, continuing without it:", error);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// src/utils/file-reference.ts
|
|
735
751
|
var FileReferenceServiceImpl = class {
|
|
736
752
|
constructor(supabase) {
|
|
737
753
|
this.supabase = supabase;
|
|
@@ -814,7 +830,7 @@ var FileReferenceServiceImpl = class {
|
|
|
814
830
|
);
|
|
815
831
|
return fileRef;
|
|
816
832
|
} catch (error) {
|
|
817
|
-
|
|
833
|
+
console.error("Error creating file reference:", error);
|
|
818
834
|
throw error;
|
|
819
835
|
}
|
|
820
836
|
}
|
|
@@ -829,7 +845,7 @@ var FileReferenceServiceImpl = class {
|
|
|
829
845
|
}
|
|
830
846
|
return data;
|
|
831
847
|
} catch (error) {
|
|
832
|
-
|
|
848
|
+
console.error("Error getting file reference:", error);
|
|
833
849
|
throw error;
|
|
834
850
|
}
|
|
835
851
|
}
|
|
@@ -853,7 +869,7 @@ var FileReferenceServiceImpl = class {
|
|
|
853
869
|
return await this.getSignedUrl(table_name, record_id, organisation_id);
|
|
854
870
|
}
|
|
855
871
|
} catch (error) {
|
|
856
|
-
|
|
872
|
+
console.error("Error getting file URL:", error);
|
|
857
873
|
throw error;
|
|
858
874
|
}
|
|
859
875
|
}
|
|
@@ -878,7 +894,7 @@ var FileReferenceServiceImpl = class {
|
|
|
878
894
|
});
|
|
879
895
|
return signedUrlResult?.url || null;
|
|
880
896
|
} catch (error) {
|
|
881
|
-
|
|
897
|
+
console.error("Error getting signed URL:", error);
|
|
882
898
|
throw error;
|
|
883
899
|
}
|
|
884
900
|
}
|
|
@@ -890,7 +906,7 @@ var FileReferenceServiceImpl = class {
|
|
|
890
906
|
}
|
|
891
907
|
return data;
|
|
892
908
|
} catch (error) {
|
|
893
|
-
|
|
909
|
+
console.error("Error updating file reference:", error);
|
|
894
910
|
throw error;
|
|
895
911
|
}
|
|
896
912
|
}
|
|
@@ -911,7 +927,7 @@ var FileReferenceServiceImpl = class {
|
|
|
911
927
|
}
|
|
912
928
|
return true;
|
|
913
929
|
} catch (error) {
|
|
914
|
-
|
|
930
|
+
console.error("Error deleting file reference:", error);
|
|
915
931
|
throw error;
|
|
916
932
|
}
|
|
917
933
|
}
|
|
@@ -935,7 +951,7 @@ var FileReferenceServiceImpl = class {
|
|
|
935
951
|
}
|
|
936
952
|
return fullData || [];
|
|
937
953
|
} catch (error) {
|
|
938
|
-
|
|
954
|
+
console.error("Error listing file references:", error);
|
|
939
955
|
throw error;
|
|
940
956
|
}
|
|
941
957
|
}
|
|
@@ -951,7 +967,7 @@ var FileReferenceServiceImpl = class {
|
|
|
951
967
|
}
|
|
952
968
|
return data || 0;
|
|
953
969
|
} catch (error) {
|
|
954
|
-
|
|
970
|
+
console.error("Error getting file count:", error);
|
|
955
971
|
throw error;
|
|
956
972
|
}
|
|
957
973
|
}
|
|
@@ -969,12 +985,18 @@ var FileReferenceServiceImpl = class {
|
|
|
969
985
|
}
|
|
970
986
|
return data[0];
|
|
971
987
|
} catch (error) {
|
|
972
|
-
|
|
988
|
+
console.error("Error getting file reference by ID:", error);
|
|
973
989
|
throw error;
|
|
974
990
|
}
|
|
975
991
|
}
|
|
976
992
|
async getFilesByCategory(table_name, record_id, category, organisation_id) {
|
|
977
993
|
try {
|
|
994
|
+
console.log("[FileReferenceService.getFilesByCategory] Calling RPC function:", {
|
|
995
|
+
table_name,
|
|
996
|
+
record_id,
|
|
997
|
+
category,
|
|
998
|
+
organisation_id
|
|
999
|
+
});
|
|
978
1000
|
const { data, error } = await this.supabase.rpc("data_file_reference_by_category_list", {
|
|
979
1001
|
p_table_name: table_name,
|
|
980
1002
|
p_record_id: record_id,
|
|
@@ -982,7 +1004,7 @@ var FileReferenceServiceImpl = class {
|
|
|
982
1004
|
p_organisation_id: organisation_id
|
|
983
1005
|
});
|
|
984
1006
|
if (error) {
|
|
985
|
-
|
|
1007
|
+
console.error("[FileReferenceService.getFilesByCategory] RPC ERROR:", {
|
|
986
1008
|
error,
|
|
987
1009
|
errorCode: error.code,
|
|
988
1010
|
errorMessage: error.message,
|
|
@@ -995,14 +1017,21 @@ var FileReferenceServiceImpl = class {
|
|
|
995
1017
|
});
|
|
996
1018
|
throw new Error(`Failed to get files by category: ${error.message}. Category filtering uses file_metadata JSONB field, not a direct column. RPC function required.`);
|
|
997
1019
|
}
|
|
1020
|
+
console.log("[FileReferenceService.getFilesByCategory] RPC response received:", {
|
|
1021
|
+
dataLength: data?.length || 0,
|
|
1022
|
+
data: data ? data.slice(0, 2) : null,
|
|
1023
|
+
// Log first 2 items for debugging
|
|
1024
|
+
fullDataAvailable: data?.every((item) => item.id && item.file_path && item.file_metadata)
|
|
1025
|
+
});
|
|
998
1026
|
if (!data || data.length === 0) {
|
|
1027
|
+
console.log("[FileReferenceService.getFilesByCategory] No data from RPC, returning empty array");
|
|
999
1028
|
return [];
|
|
1000
1029
|
}
|
|
1001
1030
|
const fileReferences = data.filter((item) => {
|
|
1002
1031
|
const fileCategory = item.file_metadata?.category;
|
|
1003
1032
|
const matches = fileCategory === category;
|
|
1004
1033
|
if (!matches) {
|
|
1005
|
-
|
|
1034
|
+
console.warn("[FileReferenceService.getFilesByCategory] File category mismatch in RPC response:", {
|
|
1006
1035
|
fileId: item.id,
|
|
1007
1036
|
expectedCategory: category,
|
|
1008
1037
|
actualCategory: fileCategory
|
|
@@ -1026,9 +1055,16 @@ var FileReferenceServiceImpl = class {
|
|
|
1026
1055
|
};
|
|
1027
1056
|
return fileRef;
|
|
1028
1057
|
});
|
|
1058
|
+
console.log("[FileReferenceService.getFilesByCategory] Constructed file references from RPC response:", {
|
|
1059
|
+
count: fileReferences.length,
|
|
1060
|
+
firstFileId: fileReferences[0]?.id,
|
|
1061
|
+
firstFilePath: fileReferences[0]?.file_path,
|
|
1062
|
+
firstFileIsPublic: fileReferences[0]?.is_public,
|
|
1063
|
+
firstFileHasAllRequiredFields: !!(fileReferences[0]?.id && fileReferences[0]?.file_path && fileReferences[0]?.file_metadata && fileReferences[0]?.table_name && fileReferences[0]?.record_id && fileReferences[0]?.organisation_id)
|
|
1064
|
+
});
|
|
1029
1065
|
return fileReferences;
|
|
1030
1066
|
} catch (error) {
|
|
1031
|
-
|
|
1067
|
+
console.error("Error getting files by category:", error);
|
|
1032
1068
|
throw error;
|
|
1033
1069
|
}
|
|
1034
1070
|
}
|
|
@@ -1654,4 +1690,4 @@ export {
|
|
|
1654
1690
|
clearPublicFileDisplayCache,
|
|
1655
1691
|
getPublicFileDisplayCacheStats
|
|
1656
1692
|
};
|
|
1657
|
-
//# sourceMappingURL=chunk-
|
|
1693
|
+
//# sourceMappingURL=chunk-4C7EXCAR.js.map
|