@jmruthers/pace-core 0.5.181 → 0.5.183
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/CHANGELOG.md +1 -1
- package/README.md +16 -2
- package/dist/{AuthService-DYuQPJj6.d.ts → AuthService-B-cd2MA4.d.ts} +9 -11
- package/dist/{DataTable-CWAZZcXC.d.ts → DataTable-Bz8ffqyA.d.ts} +1 -1
- package/dist/{DataTable-UA6CL4JI.js → DataTable-QAB34V6K.js} +14 -15
- package/dist/UnifiedAuthProvider-7F6T4B6K.js +13 -0
- package/dist/{UnifiedAuthProvider-DJxGTftH.d.ts → UnifiedAuthProvider-F86d7dSi.d.ts} +5 -6
- package/dist/{api-45XYYO2A.js → api-ROMBCNKU.js} +5 -5
- package/dist/{audit-64X3VJXB.js → audit-WRS3KJKI.js} +4 -4
- package/dist/auth-BZOJqrdd.d.ts +49 -0
- package/dist/{chunk-CX5M4ZAG.js → chunk-5DRSZLL2.js} +1 -1
- package/dist/chunk-5DRSZLL2.js.map +1 -0
- package/dist/{chunk-BESYRHQM.js → chunk-6C4YBBJM.js} +10 -7
- package/dist/chunk-6C4YBBJM.js.map +1 -0
- package/dist/{chunk-PLDDJCW6.js → chunk-7D4SUZUM.js} +2 -13
- package/dist/{chunk-HRO5HWN2.js → chunk-CSOFYHAG.js} +55 -162
- package/dist/chunk-CSOFYHAG.js.map +1 -0
- package/dist/{chunk-ANBQRTPX.js → chunk-E66EQZE6.js} +3 -5
- package/dist/{chunk-ANBQRTPX.js.map → chunk-E66EQZE6.js.map} +1 -1
- package/dist/{chunk-Q5QRDWKI.js → chunk-F2IMUDXZ.js} +4 -6
- package/dist/chunk-F2IMUDXZ.js.map +1 -0
- package/dist/{chunk-SBVILCCA.js → chunk-FSFQFJCU.js} +28 -6
- package/dist/chunk-FSFQFJCU.js.map +1 -0
- package/dist/chunk-FUEYYMX5.js +2296 -0
- package/dist/chunk-FUEYYMX5.js.map +1 -0
- package/dist/{chunk-FFKNH6U5.js → chunk-HKIT6O7W.js} +3 -5
- package/dist/{chunk-FFKNH6U5.js.map → chunk-HKIT6O7W.js.map} +1 -1
- package/dist/chunk-KQCRWDSA.js +1 -0
- package/dist/{chunk-S5OFRT4M.js → chunk-KUEN3HFB.js} +6 -6
- package/dist/chunk-KUEN3HFB.js.map +1 -0
- package/dist/chunk-LMC26NLJ.js +84 -0
- package/dist/chunk-LMC26NLJ.js.map +1 -0
- package/dist/{chunk-BVYWGZVV.js → chunk-M7W4CP3M.js} +52 -19
- package/dist/chunk-M7W4CP3M.js.map +1 -0
- package/dist/{chunk-HZLDFOE4.js → chunk-MI7HBHN3.js} +164 -243
- package/dist/chunk-MI7HBHN3.js.map +1 -0
- package/dist/{chunk-PPMP5J6T.js → chunk-PWAHJW4G.js} +180 -29
- package/dist/chunk-PWAHJW4G.js.map +1 -0
- package/dist/chunk-PWLANIRT.js +127 -0
- package/dist/{chunk-XDNLUEXI.js.map → chunk-PWLANIRT.js.map} +1 -1
- package/dist/chunk-QCDXODCA.js +75 -0
- package/dist/chunk-QCDXODCA.js.map +1 -0
- package/dist/{chunk-D7LCGMVS.js → chunk-QETLRQI6.js} +526 -887
- package/dist/chunk-QETLRQI6.js.map +1 -0
- package/dist/{chunk-5MT24GKJ.js → chunk-QUVSNGIP.js} +264 -262
- package/dist/chunk-QUVSNGIP.js.map +1 -0
- package/dist/chunk-QXHPKYJV.js +113 -0
- package/dist/chunk-QXHPKYJV.js.map +1 -0
- package/dist/{chunk-OWAG3GSU.js → chunk-R77UEZ4E.js} +11 -1
- package/dist/chunk-R77UEZ4E.js.map +1 -0
- package/dist/{chunk-ZYTYSTO5.js → chunk-RA3JUFMW.js} +314 -161
- package/dist/chunk-RA3JUFMW.js.map +1 -0
- package/dist/{chunk-ERISIBYU.js → chunk-SQGMNID3.js} +3 -8
- package/dist/chunk-SQGMNID3.js.map +1 -0
- package/dist/{chunk-XJ2HZOBU.js → chunk-UHNYIBXL.js} +1 -1
- package/dist/chunk-UHNYIBXL.js.map +1 -0
- package/{src/utils/secureStorage.ts → dist/chunk-VBXEHIUJ.js} +113 -88
- package/dist/{chunk-7QCC6MCP.js.map → chunk-VBXEHIUJ.js.map} +1 -1
- package/dist/{chunk-VZ4VDGTB.js → chunk-W22JP75J.js} +5 -13
- package/dist/{chunk-VZ4VDGTB.js.map → chunk-W22JP75J.js.map} +1 -1
- package/dist/components.d.ts +12 -93
- package/dist/components.js +23 -106
- package/dist/components.js.map +1 -1
- package/dist/core-CUElvH_C.d.ts +164 -0
- package/dist/database.generated-CBmg2950.d.ts +8284 -0
- package/dist/event-CW5YB_2p.d.ts +239 -0
- package/dist/{file-reference-C6Gkn77H.d.ts → file-reference-D06mEEWW.d.ts} +7 -5
- package/dist/functions-D_kgHktt.d.ts +208 -0
- package/dist/hooks.d.ts +54 -7
- package/dist/hooks.js +204 -17
- package/dist/hooks.js.map +1 -1
- package/dist/{EventLogo-B3V3otev.d.ts → index-Bl--n7-T.d.ts} +387 -397
- package/dist/index.d.ts +94 -261
- package/dist/index.js +314 -126
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +7 -8
- package/dist/providers.js +6 -13
- package/dist/rbac/index.d.ts +171 -101
- package/dist/rbac/index.js +23 -17
- package/dist/styles/index.d.ts +1 -3
- package/dist/styles/index.js +2 -17
- package/dist/theming/runtime.js +3 -3
- package/dist/types-UU913iLA.d.ts +102 -0
- package/dist/{types-Dfz9dmVH.d.ts → types-_x1f4QBF.d.ts} +6 -6
- package/dist/types.d.ts +88 -227
- package/dist/types.js +64 -112
- package/dist/types.js.map +1 -1
- package/dist/{usePublicRouteParams-B7PabvuH.d.ts → usePublicRouteParams-JJczomYq.d.ts} +203 -6
- package/dist/utils.d.ts +299 -13
- package/dist/utils.js +481 -55
- package/dist/utils.js.map +1 -1
- package/dist/validation-643vUDZW.d.ts +177 -0
- package/docs/DOCUMENTATION_REVIEW_TRACKER.md +511 -0
- package/docs/README.md +9 -8
- package/docs/api/README.md +16 -2
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +4 -4
- package/docs/api/classes/MissingUserContextError.md +4 -4
- package/docs/api/classes/OrganisationContextRequiredError.md +4 -4
- package/docs/api/classes/PermissionDeniedError.md +4 -4
- package/docs/api/classes/RBACAuditManager.md +14 -14
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +2 -2
- package/docs/api/classes/RBACError.md +4 -4
- package/docs/api/classes/RBACNotInitializedError.md +4 -4
- package/docs/api/classes/SecureSupabaseClient.md +29 -9
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +17 -17
- package/docs/api/enums/RBACErrorCode.md +228 -0
- package/docs/api/enums/RPCFunction.md +118 -0
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +2 -2
- package/docs/api/interfaces/CalendarProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +29 -3
- 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 +2 -2
- package/docs/api/interfaces/DataTableColumn.md +6 -6
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +2 -2
- 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/ExportColumn.md +5 -5
- package/docs/api/interfaces/ExportOptions.md +4 -4
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +13 -13
- package/docs/api/interfaces/FileReference.md +12 -12
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +10 -10
- package/docs/api/interfaces/FileUploadProps.md +19 -19
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/FormFieldProps.md +166 -0
- package/docs/api/interfaces/FormProps.md +113 -0
- package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +8 -8
- package/docs/api/interfaces/InputProps.md +2 -2
- package/docs/api/interfaces/LabelProps.md +8 -8
- 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 +17 -73
- package/docs/api/interfaces/NavigationMenuProps.md +38 -53
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +13 -13
- package/docs/api/interfaces/OrganisationContextType.md +21 -21
- package/docs/api/interfaces/OrganisationMembership.md +15 -15
- package/docs/api/interfaces/OrganisationProviderProps.md +59 -2
- package/docs/api/interfaces/OrganisationSecurityError.md +5 -5
- package/docs/api/interfaces/PaceAppLayoutProps.md +26 -39
- 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/ProgressProps.md +50 -0
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +9 -9
- package/docs/api/interfaces/PublicPageHeaderProps.md +10 -10
- package/docs/api/interfaces/PublicPageLayoutProps.md +15 -15
- package/docs/api/interfaces/RBACAccessValidateParams.md +52 -0
- package/docs/api/interfaces/RBACAccessValidateResult.md +41 -0
- package/docs/api/interfaces/RBACAuditLogParams.md +85 -0
- package/docs/api/interfaces/RBACAuditLogResult.md +52 -0
- package/docs/api/interfaces/RBACConfig.md +2 -2
- package/docs/api/interfaces/RBACContext.md +52 -0
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +74 -0
- package/docs/api/interfaces/RBACPermissionCheckParams.md +74 -0
- package/docs/api/interfaces/RBACPermissionCheckResult.md +52 -0
- package/docs/api/interfaces/RBACPermissionsGetParams.md +63 -0
- package/docs/api/interfaces/RBACPermissionsGetResult.md +63 -0
- package/docs/api/interfaces/RBACResult.md +58 -0
- package/docs/api/interfaces/RBACRoleGrantParams.md +63 -0
- package/docs/api/interfaces/RBACRoleGrantResult.md +52 -0
- package/docs/api/interfaces/RBACRoleRevokeParams.md +63 -0
- package/docs/api/interfaces/RBACRoleRevokeResult.md +52 -0
- package/docs/api/interfaces/RBACRoleValidateParams.md +52 -0
- package/docs/api/interfaces/RBACRoleValidateResult.md +63 -0
- package/docs/api/interfaces/RBACRolesListParams.md +52 -0
- package/docs/api/interfaces/RBACRolesListResult.md +74 -0
- package/docs/api/interfaces/RBACSessionTrackParams.md +74 -0
- package/docs/api/interfaces/RBACSessionTrackResult.md +52 -0
- package/docs/api/interfaces/ResourcePermissions.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 +15 -2
- 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/TabsContentProps.md +1 -1
- package/docs/api/interfaces/TabsListProps.md +1 -1
- package/docs/api/interfaces/TabsProps.md +1 -1
- package/docs/api/interfaces/TabsTriggerProps.md +43 -2
- package/docs/api/interfaces/TextareaProps.md +2 -2
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +61 -61
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +87 -0
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +81 -0
- package/docs/api/interfaces/UsePublicEventOptions.md +3 -3
- package/docs/api/interfaces/UsePublicEventReturn.md +5 -5
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +2 -2
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +2 -2
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +4 -4
- package/docs/api/interfaces/UserProfile.md +7 -7
- package/docs/api/modules.md +484 -462
- package/docs/api-reference/components.md +186 -15
- package/docs/api-reference/deprecated.md +376 -0
- package/docs/api-reference/hooks.md +149 -19
- package/docs/api-reference/providers.md +61 -6
- package/docs/api-reference/rpc-functions.md +397 -0
- package/docs/api-reference/types.md +135 -78
- package/docs/api-reference/utilities.md +51 -380
- package/docs/architecture/README.md +49 -3
- package/docs/architecture/database-schema-requirements.md +40 -3
- package/docs/architecture/rbac-security-architecture.md +41 -4
- package/docs/architecture/services.md +127 -42
- package/docs/best-practices/README.md +51 -5
- package/docs/best-practices/accessibility.md +32 -3
- package/docs/best-practices/common-patterns.md +50 -3
- package/docs/best-practices/deployment.md +50 -4
- package/docs/best-practices/performance.md +50 -3
- package/docs/best-practices/security.md +94 -41
- package/docs/best-practices/testing.md +33 -4
- package/docs/core-concepts/authentication.md +5 -5
- package/docs/core-concepts/events.md +3 -3
- package/docs/core-concepts/organisations.md +3 -3
- package/docs/core-concepts/permissions.md +3 -3
- package/docs/core-concepts/rbac-system.md +5 -5
- package/docs/documentation-index.md +30 -8
- package/docs/getting-started/documentation-index.md +1 -1
- package/docs/getting-started/examples/README.md +7 -5
- package/docs/getting-started/examples/basic-auth-app.md +3 -0
- package/docs/getting-started/examples/full-featured-app.md +5 -3
- package/docs/getting-started/faq.md +6 -6
- package/docs/getting-started/installation-guide.md +192 -13
- package/docs/getting-started/local-development.md +303 -0
- package/docs/getting-started/quick-reference.md +3 -3
- package/docs/getting-started/quick-start.md +517 -0
- package/docs/implementation-guides/app-layout.md +45 -3
- package/docs/implementation-guides/authentication.md +66 -7
- package/docs/implementation-guides/component-styling.md +53 -3
- package/docs/implementation-guides/data-tables.md +76 -7
- package/docs/implementation-guides/datatable-filtering.md +1 -2
- package/docs/implementation-guides/datatable-rbac-usage.md +0 -1
- package/docs/implementation-guides/dynamic-colors.md +155 -4
- package/docs/implementation-guides/file-reference-system.md +72 -3
- package/docs/implementation-guides/file-upload-storage.md +72 -3
- package/docs/implementation-guides/forms.md +53 -3
- package/docs/implementation-guides/inactivity-tracking.md +53 -3
- package/docs/implementation-guides/large-datasets.md +1 -1
- package/docs/implementation-guides/navigation.md +55 -5
- package/docs/implementation-guides/organisation-security.md +72 -3
- package/docs/implementation-guides/performance.md +57 -1
- package/docs/implementation-guides/permission-enforcement.md +81 -8
- package/docs/implementation-guides/public-pages.md +560 -14
- package/docs/migration/MIGRATION_GUIDE.md +409 -50
- package/docs/migration/README.md +37 -3
- package/docs/migration/organisation-context-timing-fix.md +39 -4
- package/docs/migration/quick-migration-guide.md +41 -5
- package/docs/migration/rbac-migration.md +59 -3
- package/docs/migration/service-architecture.md +77 -14
- package/docs/rbac/README.md +79 -3
- package/docs/rbac/advanced-patterns.md +47 -3
- package/docs/rbac/api-reference.md +77 -8
- package/docs/rbac/event-based-apps.md +50 -5
- package/docs/rbac/examples/rbac-rls-integration-example.md +3 -3
- package/docs/rbac/examples.md +39 -3
- package/docs/rbac/getting-started.md +63 -4
- package/docs/rbac/quick-start.md +57 -5
- package/docs/rbac/rbac-rls-integration.md +68 -6
- package/docs/rbac/super-admin-guide.md +47 -3
- package/docs/rbac/troubleshooting.md +3 -3
- package/docs/security/README.md +68 -3
- package/docs/security/checklist.md +50 -3
- package/docs/standards/01-architecture-standard.md +39 -0
- package/docs/standards/02-api-and-rpc-standard.md +39 -0
- package/docs/standards/03-component-standard.md +32 -0
- package/docs/standards/04-code-style-standard.md +32 -0
- package/docs/standards/05-security-standard.md +30 -0
- package/docs/standards/06-testing-and-docs-standard.md +29 -0
- package/docs/standards/README.md +35 -0
- package/docs/styles/README.md +89 -8
- package/docs/testing/README.md +175 -24
- package/docs/troubleshooting/README.md +50 -3
- package/docs/troubleshooting/common-issues.md +271 -5
- package/docs/troubleshooting/debugging.md +54 -1
- package/docs/troubleshooting/migration.md +54 -1
- package/docs/troubleshooting/organisation-context-setup.md +29 -3
- package/docs/troubleshooting/styling-issues.md +246 -4
- package/{src/components/DataTable/examples → examples/DataTable}/GroupingAggregationExample.tsx +1 -1
- package/examples/{components 2/DataTable/HierarchicalActionsExample.tsx → DataTable/HierarchicalActionsExample.tsx} +7 -6
- package/{src/components/DataTable/examples → examples/DataTable}/HierarchicalExample.tsx +8 -6
- package/examples/{components 2/DataTable/PerformanceExample.tsx → DataTable/PerformanceExample.tsx} +2 -2
- package/examples/{components 2/DataTable/index.ts → DataTable/index.ts} +1 -0
- package/{src/components/Dialog/examples → examples/Dialog}/HtmlDialogExample.tsx +3 -3
- package/examples/{components 2/Dialog/ScrollableDialogExample.tsx → Dialog/ScrollableDialogExample.tsx} +1 -1
- package/{src/components/Dialog/examples → examples/Dialog}/SmartDialogExample.tsx +1 -1
- package/examples/{components 2/Dialog/index.ts → Dialog/index.ts} +0 -3
- package/examples/{features/public-pages → PublicPages}/CorrectPublicPageImplementation.tsx +52 -17
- package/examples/{features/public-pages → PublicPages}/PublicEventPage.tsx +65 -35
- package/examples/{features/public-pages → PublicPages}/PublicPageApp.tsx +52 -18
- package/examples/{features/public-pages → PublicPages}/PublicPageUsageExample.tsx +28 -15
- package/examples/README.md +81 -33
- package/examples/index.ts +14 -12
- package/examples/{RBAC → rbac}/CompleteRBACExample.tsx +1 -1
- package/examples/{features/rbac → rbac}/EventBasedApp.tsx +4 -4
- package/examples/{features/rbac → rbac}/PermissionExample.tsx +5 -3
- package/package.json +21 -27
- package/src/__tests__/helpers/test-utils.tsx +29 -3
- package/src/__tests__/rbac/PagePermissionGuard.test.tsx +7 -5
- package/src/components/Alert/Alert.test.tsx +2 -2
- package/src/components/Alert/Alert.tsx +4 -4
- package/src/components/Avatar/Avatar.test.tsx +17 -6
- package/src/components/Badge/Badge.test.tsx +1 -1
- package/src/components/Badge/Badge.tsx +2 -2
- package/src/components/Button/Button.test.tsx +2 -2
- package/src/components/Button/Button.tsx +11 -7
- package/src/components/Calendar/Calendar.test.tsx +41 -8
- package/src/components/Calendar/Calendar.tsx +39 -36
- package/src/components/Card/Card.tsx +51 -13
- package/src/components/Checkbox/Checkbox.test.tsx +36 -12
- package/src/components/DataTable/DataTable.test.tsx +1 -1
- package/src/components/DataTable/__tests__/DataTable.comprehensive.test.tsx +13 -7
- package/src/components/DataTable/__tests__/DataTable.default-state.test.tsx +14 -42
- package/src/components/DataTable/__tests__/DataTable.export.test.tsx +13 -10
- package/src/components/DataTable/__tests__/DataTable.grouping-aggregation.test.tsx +14 -11
- package/src/components/DataTable/__tests__/DataTable.hooks.test.tsx +4 -2
- package/src/components/DataTable/__tests__/DataTable.test.tsx +13 -7
- package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +13 -10
- package/src/components/DataTable/__tests__/DataTableCore.test.tsx +15 -11
- package/src/components/DataTable/__tests__/a11y.basic.test.tsx +12 -6
- package/src/components/DataTable/__tests__/keyboard.test.tsx +12 -6
- package/src/components/DataTable/__tests__/pagination.modes.test.tsx +10 -6
- package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +1 -1
- package/src/components/DataTable/components/DataTableBody.tsx +10 -25
- package/src/components/DataTable/components/DataTableCore.tsx +1 -1
- package/src/components/DataTable/components/FilterRow.tsx +3 -1
- package/src/components/DataTable/components/ImportModal.tsx +1 -1
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +9 -9
- package/src/components/DataTable/core/ColumnFactory.ts +6 -6
- package/src/components/DataTable/core/DataTableContext.tsx +14 -10
- package/src/components/DataTable/core/LocalDataAdapter.ts +2 -1
- package/src/components/DataTable/core/PluginRegistry.ts +3 -3
- package/src/components/DataTable/core/StateManager.ts +12 -11
- package/src/components/DataTable/core/__tests__/ActionManager.test.ts +104 -0
- package/src/components/DataTable/core/__tests__/DataManager.test.ts +101 -0
- package/src/components/DataTable/core/__tests__/LocalDataAdapter.test.ts +84 -0
- package/src/components/DataTable/core/__tests__/PluginRegistry.test.ts +102 -0
- package/src/components/DataTable/core/__tests__/StateManager.test.ts +104 -0
- package/src/components/DataTable/core/interfaces.ts +17 -17
- package/src/components/DataTable/hooks/__tests__/useDataTableConfiguration.test.ts +124 -0
- package/src/components/DataTable/hooks/__tests__/useDataTableDataPipeline.test.ts +117 -0
- package/src/components/DataTable/hooks/__tests__/useDataTablePermissions.test.ts +102 -0
- package/src/components/DataTable/hooks/__tests__/useEffectiveColumnOrder.test.ts +53 -0
- package/src/components/DataTable/hooks/useColumnOrderPersistence.ts +0 -2
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +9 -8
- package/src/components/DataTable/types.ts +5 -5
- package/src/components/DataTable/utils/aggregationUtils.ts +4 -4
- package/src/components/DataTable/utils/columnUtils.ts +3 -2
- package/src/components/DataTable/utils/debugTools.ts +1 -1
- package/src/components/DataTable/utils/exportUtils.ts +6 -6
- package/src/components/DataTable/utils/hierarchicalSorting.ts +6 -6
- package/src/components/DataTable/utils/hierarchicalUtils.ts +0 -8
- package/src/components/DataTable/utils/index.ts +0 -1
- package/src/components/DataTable/utils/performanceUtils.ts +9 -4
- package/src/components/Dialog/Dialog.test.tsx +49 -27
- package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +13 -8
- package/src/components/EventSelector/EventSelector.test.tsx +60 -12
- package/src/components/EventSelector/EventSelector.tsx +38 -15
- package/src/components/EventSelector/index.ts +2 -2
- package/src/components/FileDisplay/FileDisplay.test.tsx +143 -85
- package/src/components/FileDisplay/FileDisplay.tsx +1 -0
- package/src/components/FileUpload/FileUpload.test.tsx +532 -152
- package/src/components/FileUpload/FileUpload.tsx +43 -8
- package/src/components/Footer/Footer.test.tsx +19 -14
- package/src/components/Form/Form.test.tsx +96 -14
- package/src/components/Form/Form.tsx +210 -1
- package/src/components/Form/index.ts +3 -7
- package/src/components/Header/Header.test.tsx +24 -17
- package/src/components/Header/Header.tsx +3 -1
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +2 -4
- package/src/components/Input/Input.test.tsx +61 -36
- package/src/components/Label/{__tests__/Label.test.tsx → Label.test.tsx} +2 -2
- package/src/components/Label/Label.tsx +2 -3
- package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +6 -5
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +6 -2
- package/src/components/LoginForm/LoginForm.test.tsx +14 -13
- package/src/components/LoginForm/LoginForm.tsx +1 -1
- package/src/components/LoginForm/index.ts +7 -0
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +233 -20
- package/src/components/NavigationMenu/NavigationMenu.tsx +191 -55
- package/src/components/NavigationMenu/index.ts +1 -1
- package/src/components/OrganisationSelector/OrganisationSelector.test.tsx +20 -11
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +1 -1
- package/src/components/PaceAppLayout/{__tests__/PaceAppLayout.integration.test.tsx → PaceAppLayout.integration.test.tsx} +272 -79
- package/src/components/PaceAppLayout/{__tests__/PaceAppLayout.performance.test.tsx → PaceAppLayout.performance.test.tsx} +155 -32
- package/src/components/PaceAppLayout/{__tests__/PaceAppLayout.security.test.tsx → PaceAppLayout.security.test.tsx} +211 -65
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +498 -210
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +63 -64
- package/src/components/PaceAppLayout/test-setup.tsx +192 -0
- package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +193 -39
- package/src/components/{PasswordReset → PasswordChange}/PasswordChangeForm.test.tsx +2 -2
- package/src/components/{PasswordReset → PasswordChange}/PasswordChangeForm.tsx +10 -4
- package/src/components/PasswordChange/index.ts +2 -0
- package/src/components/Progress/Progress.test.tsx +11 -0
- package/src/components/Progress/Progress.tsx +1 -1
- package/src/components/Progress/index.ts +10 -0
- package/src/components/ProtectedRoute/ProtectedRoute.test.tsx +2 -1
- package/src/components/PublicLayout/PublicLayout.test.tsx +1210 -0
- package/src/components/PublicLayout/PublicPageLayout.tsx +190 -36
- package/src/components/PublicLayout/PublicPageProvider.tsx +8 -7
- package/src/components/PublicLayout/index.ts +10 -28
- package/src/components/Select/Select.test.tsx +7 -7
- package/src/components/Select/Select.tsx +277 -11
- package/src/components/Select/index.ts +1 -2
- package/src/components/SessionRestorationLoader/SessionRestorationLoader.test.tsx +232 -0
- package/src/components/SessionRestorationLoader/SessionRestorationLoader.tsx +40 -19
- package/src/components/Table/{__tests__/Table.test.tsx → Table.test.tsx} +94 -41
- package/src/components/Tabs/Tabs.test.tsx +10 -9
- package/src/components/Tabs/Tabs.tsx +61 -33
- package/src/components/Textarea/Textarea.test.tsx +31 -18
- package/src/components/Toast/Toast.tsx +2 -2
- package/src/components/Tooltip/Tooltip.test.tsx +1 -1
- package/src/components/UserMenu/UserMenu.test.tsx +7 -6
- package/src/components/UserMenu/UserMenu.tsx +2 -2
- package/src/components/index.ts +5 -4
- package/src/constants/performance.ts +19 -8
- package/src/hooks/__tests__/useAppConfig.unit.test.ts +21 -22
- package/src/hooks/__tests__/useEvents.unit.test.ts +5 -4
- package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +2 -2
- package/src/hooks/__tests__/usePermissionCache.simple.test.ts +17 -0
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +16 -11
- package/src/hooks/__tests__/usePublicEvent.simple.test.ts +1 -3
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +1 -3
- package/src/hooks/__tests__/useRBAC.unit.test.ts +24 -2
- package/src/hooks/index.ts +4 -0
- package/src/hooks/public/index.ts +2 -0
- package/src/hooks/public/usePublicEvent.ts +4 -6
- package/src/hooks/public/usePublicEventLogo.test.ts +147 -0
- package/src/hooks/public/usePublicRouteParams.ts +1 -1
- package/src/hooks/services/useAuth.ts +2 -4
- package/src/hooks/services/useCurrentEvent.ts +1 -1
- package/src/hooks/useAppConfig.ts +1 -1
- package/src/hooks/useDataTablePerformance.ts +2 -2
- package/src/hooks/useEventTheme.ts +1 -1
- package/src/hooks/useEvents.ts +51 -10
- package/src/hooks/useOrganisationPermissions.test.ts +3 -3
- package/src/hooks/useOrganisationPermissions.ts +1 -1
- package/src/hooks/useOrganisationSecurity.ts +2 -2
- package/src/hooks/usePermissionCache.test.ts +9 -9
- package/src/hooks/usePermissionCache.ts +2 -2
- package/src/index.ts +19 -12
- package/src/providers/OrganisationProvider.tsx +73 -9
- package/src/providers/UnifiedAuthProvider.smoke.test.tsx +113 -13
- package/src/providers/__tests__/AuthProvider.test.tsx +2 -1
- package/src/providers/__tests__/EventProvider.test.tsx +24 -15
- package/src/providers/__tests__/OrganisationProvider.test.tsx +87 -36
- package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +80 -24
- package/src/providers/index.ts +0 -3
- package/src/providers/services/AuthServiceProvider.tsx +2 -17
- package/src/providers/services/EventServiceProvider.tsx +11 -16
- package/src/providers/services/InactivityServiceProvider.tsx +9 -12
- package/src/providers/services/OrganisationServiceProvider.tsx +9 -12
- package/src/providers/services/UnifiedAuthProvider.tsx +85 -18
- package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +11 -4
- package/src/rbac/__tests__/scenarios.user-role.test.tsx +105 -21
- package/src/rbac/adapters.tsx +1 -1
- package/src/rbac/api.ts +20 -4
- package/src/rbac/audit-enhanced.ts +47 -2
- package/src/rbac/audit.ts +47 -2
- package/src/rbac/components/NavigationGuard.tsx +1 -1
- package/src/rbac/components/NavigationProvider.test.tsx +7 -6
- package/src/rbac/components/NavigationProvider.tsx +1 -1
- package/src/rbac/components/PagePermissionGuard.tsx +1 -1
- package/src/rbac/components/PagePermissionProvider.test.tsx +7 -6
- package/src/rbac/components/PagePermissionProvider.tsx +1 -1
- package/src/rbac/components/PermissionEnforcer.tsx +1 -1
- package/src/rbac/components/RoleBasedRouter.tsx +1 -1
- package/src/rbac/components/SecureDataProvider.test.tsx +7 -6
- package/src/rbac/components/SecureDataProvider.tsx +1 -1
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +6 -6
- package/src/rbac/components/__tests__/NavigationGuard.test.tsx +11 -10
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +10 -11
- package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +19 -15
- package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +13 -12
- package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +19 -15
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +18 -18
- package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +11 -10
- package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +8 -7
- package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +10 -11
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +48 -19
- package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +476 -0
- package/src/rbac/hooks/index.ts +3 -0
- package/src/rbac/hooks/usePermissions.ts +31 -85
- package/src/rbac/hooks/useRBAC.test.ts +13 -1
- package/src/rbac/hooks/useRBAC.ts +13 -67
- package/src/rbac/hooks/useResolvedScope.ts +11 -0
- package/src/rbac/hooks/useSecureSupabase.ts +308 -0
- package/src/rbac/index.ts +3 -0
- package/src/rbac/secureClient.ts +53 -6
- package/src/rbac/security.ts +37 -1
- package/src/{types/rbac-functions.ts → rbac/types/functions.ts} +30 -30
- package/src/rbac/types.ts +3 -2
- package/src/services/AuthService.ts +33 -25
- package/src/services/EventService.ts +56 -44
- package/src/services/InactivityService.ts +33 -53
- package/src/services/OrganisationService.ts +36 -40
- package/src/services/__tests__/AuthService.restoreSession.test.ts +6 -2
- package/src/services/__tests__/EventService.test.ts +67 -33
- package/src/services/interfaces/IEventService.ts +1 -1
- package/src/styles/core.css +2 -2
- package/src/styles/index.test.ts +21 -0
- package/src/styles/index.ts +1 -5
- package/src/types/__tests__/guards.test.ts +1 -1
- package/src/types/__tests__/organisation.roles.test.ts +55 -0
- package/src/types/__tests__/type-validation.test.ts +0 -1
- package/src/types/auth.ts +42 -2
- package/src/types/core.ts +251 -0
- package/src/types/database.ts +11 -496
- package/src/types/event.ts +102 -0
- package/src/types/file-reference.ts +6 -4
- package/src/types/guards.ts +2 -1
- package/src/types/index.ts +48 -14
- package/src/types/lodash.debounce.d.ts +15 -0
- package/src/types/organisation.ts +14 -10
- package/src/types/supabase.ts +15 -17
- package/src/utils/__tests__/secureErrors.unit.test.ts +1 -1
- package/src/utils/__tests__/validationUtils.unit.test.ts +0 -29
- package/src/utils/app/appNameResolver.ts +1 -1
- package/src/utils/audit/audit.test.ts +65 -0
- package/src/utils/device/deviceFingerprint.test.ts +171 -0
- package/src/utils/dynamic/dynamicUtils.ts +3 -2
- package/src/utils/file-reference/index.ts +25 -6
- package/src/utils/security/secureErrors.ts +1 -1
- package/src/utils/validation/__tests__/validationUtils.test.ts +72 -0
- package/src/utils/validation/index.ts +6 -12
- package/src/utils/validation/validationUtils.ts +0 -13
- package/dist/UnifiedAuthProvider-B37ATQHE.js +0 -16
- package/dist/auth-DReDSLq9.d.ts +0 -16
- package/dist/chunk-3JI76CYK.js +0 -2444
- package/dist/chunk-3JI76CYK.js.map +0 -1
- package/dist/chunk-56XJ3TU6.js +0 -11
- package/dist/chunk-56XJ3TU6.js.map +0 -1
- package/dist/chunk-5MT24GKJ.js.map +0 -1
- package/dist/chunk-7QCC6MCP.js +0 -288
- package/dist/chunk-BESYRHQM.js.map +0 -1
- package/dist/chunk-BJPBT3CU.js +0 -21
- package/dist/chunk-BJPBT3CU.js.map +0 -1
- package/dist/chunk-BVYWGZVV.js.map +0 -1
- package/dist/chunk-CX5M4ZAG.js.map +0 -1
- package/dist/chunk-D7LCGMVS.js.map +0 -1
- package/dist/chunk-EGI6MUL6.js +0 -27
- package/dist/chunk-EGI6MUL6.js.map +0 -1
- package/dist/chunk-ERISIBYU.js.map +0 -1
- package/dist/chunk-HRO5HWN2.js.map +0 -1
- package/dist/chunk-HZLDFOE4.js.map +0 -1
- package/dist/chunk-JISYG63F.js +0 -70
- package/dist/chunk-JISYG63F.js.map +0 -1
- package/dist/chunk-LIMSTKYD.js +0 -61
- package/dist/chunk-LIMSTKYD.js.map +0 -1
- package/dist/chunk-OWAG3GSU.js.map +0 -1
- package/dist/chunk-PPMP5J6T.js.map +0 -1
- package/dist/chunk-Q5QRDWKI.js.map +0 -1
- package/dist/chunk-S5OFRT4M.js.map +0 -1
- package/dist/chunk-SBVILCCA.js.map +0 -1
- package/dist/chunk-TUMEWN34.js +0 -15
- package/dist/chunk-TUMEWN34.js.map +0 -1
- package/dist/chunk-XDNLUEXI.js +0 -138
- package/dist/chunk-XJ2HZOBU.js.map +0 -1
- package/dist/chunk-ZYTYSTO5.js.map +0 -1
- package/dist/chunk-ZZ2SS7NI.js +0 -237
- package/dist/chunk-ZZ2SS7NI.js.map +0 -1
- package/dist/database-C6jy7EOu.d.ts +0 -500
- package/dist/organisation-D6qRDtbF.d.ts +0 -93
- package/dist/schema-DTDZQe2u.d.ts +0 -28
- package/dist/unified-DQ4VcT7H.d.ts +0 -198
- package/dist/useInactivityTracker-TO6ZOF35.js +0 -11
- package/dist/validation.d.ts +0 -47
- package/dist/validation.js +0 -24
- package/dist/validation.js.map +0 -1
- package/docs/DOCUMENTATION_AUDIT.md +0 -172
- package/docs/DOCUMENTATION_STANDARD.md +0 -137
- package/docs/api/classes/PublicErrorBoundary.md +0 -132
- package/docs/api/interfaces/EventLogoProps.md +0 -152
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +0 -94
- package/docs/api/interfaces/PublicErrorBoundaryState.md +0 -68
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +0 -86
- package/docs/architecture/rpc-function-standards.md +0 -1106
- package/docs/getting-started/consuming-app-vite-config.md +0 -239
- package/docs/implementation-guides/event-theming-summary.md +0 -226
- package/docs/implementation-guides/public-pages-advanced.md +0 -1038
- package/docs/migration/v0.4.15-tailwind-scanning.md +0 -278
- package/docs/migration/v0.4.16-css-first-approach.md +0 -312
- package/docs/migration/v0.4.17-source-path-fix.md +0 -235
- package/docs/rbac/RBAC_EVENT_CONTEXT_LOADING.md +0 -222
- package/docs/rbac/RBAC_LOGIN_SAFETY_FIX.md +0 -95
- package/docs/rbac/RBAC_V0.5.147_FIX.md +0 -117
- package/docs/rbac/README-rbac-rls-integration.md +0 -374
- package/docs/styles/usage.md +0 -227
- package/docs/testing/visual-testing.md +0 -120
- package/docs/troubleshooting/DEBUG_NETWORK_ERROR.md +0 -152
- package/docs/troubleshooting/FIX_SUPABASE_CORS.md +0 -184
- package/docs/troubleshooting/cake-page-permission-guard-issue-summary.md +0 -193
- package/docs/troubleshooting/database-view-compatibility.md +0 -125
- package/docs/troubleshooting/react-hooks-issue-analysis.md +0 -172
- package/docs/troubleshooting/tailwind-content-scanning.md +0 -219
- package/examples/RBAC/EventBasedApp.tsx +0 -239
- package/examples/RBAC/PermissionExample.tsx +0 -151
- package/examples/STRUCTURE.md +0 -125
- package/examples/components 2/DataTable/HierarchicalExample.tsx +0 -475
- package/examples/components 2/Dialog/BasicHtmlTest.tsx +0 -55
- package/examples/components 2/Dialog/DebugHtmlExample.tsx +0 -68
- package/examples/components 2/Dialog/HtmlDialogExample.tsx +0 -202
- package/examples/components 2/Dialog/SimpleHtmlTest.tsx +0 -61
- package/examples/components 2/Dialog/SmartDialogExample.tsx +0 -322
- package/examples/components 2/index.ts +0 -11
- package/examples/features/index.ts +0 -12
- package/examples/features/rbac/CompleteRBACExample.tsx +0 -324
- package/examples/features/rbac/index.ts +0 -13
- package/examples/public-pages/CorrectPublicPageImplementation.tsx +0 -301
- package/examples/public-pages/PublicEventPage.tsx +0 -274
- package/examples/public-pages/PublicPageApp.tsx +0 -308
- package/examples/public-pages/PublicPageUsageExample.tsx +0 -216
- package/examples/public-pages/index.ts +0 -14
- package/src/__tests__/TEST_STANDARD.md +0 -1008
- package/src/components/Checkbox/__mocks__/Checkbox.tsx +0 -2
- package/src/components/DataTable/examples/HierarchicalActionsExample.tsx +0 -421
- package/src/components/DataTable/examples/InitialPageSizeExample.tsx +0 -177
- package/src/components/DataTable/examples/PerformanceExample.tsx +0 -506
- package/src/components/DataTable/examples/__tests__/HierarchicalActionsExample.test.tsx +0 -316
- package/src/components/DataTable/examples/__tests__/HierarchicalExample.test.tsx +0 -45
- package/src/components/DataTable/examples/__tests__/InitialPageSizeExample.test.tsx +0 -211
- package/src/components/DataTable/examples/__tests__/PerformanceExample.test.tsx +0 -126
- package/src/components/Dialog/README.md +0 -804
- package/src/components/Dialog/examples/BasicHtmlTest.tsx +0 -55
- package/src/components/Dialog/examples/DebugHtmlExample.tsx +0 -68
- package/src/components/Dialog/examples/ScrollableDialogExample.tsx +0 -290
- package/src/components/Dialog/examples/SimpleHtmlTest.tsx +0 -61
- package/src/components/Dialog/examples/__tests__/HtmlDialogExample.test.tsx +0 -71
- package/src/components/Dialog/examples/__tests__/SimpleHtmlTest.test.tsx +0 -122
- package/src/components/Dialog/examples/__tests__/SmartDialogExample.unit.test.tsx +0 -147
- package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +0 -611
- package/src/components/Dialog/utils/safeHtml.ts +0 -185
- package/src/components/EventSelector/types.ts +0 -79
- package/src/components/Form/FormErrorSummary.tsx +0 -113
- package/src/components/Form/FormField.tsx +0 -249
- package/src/components/Form/FormFieldset.tsx +0 -127
- package/src/components/Form/FormLiveRegion.tsx +0 -198
- package/src/components/Input/__mocks__/Input.tsx +0 -2
- package/src/components/NavigationMenu/types.ts +0 -85
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.accessibility.test.tsx +0 -326
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.unit.test.tsx +0 -1078
- package/src/components/PasswordReset/PasswordResetForm.test.tsx +0 -597
- package/src/components/PasswordReset/PasswordResetForm.tsx +0 -201
- package/src/components/PasswordReset/index.ts +0 -2
- package/src/components/ProtectedRoute/README.md +0 -164
- package/src/components/PublicLayout/EventLogo.tsx +0 -175
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +0 -282
- package/src/components/PublicLayout/PublicLoadingSpinner.tsx +0 -216
- package/src/components/PublicLayout/PublicPageContextChecker.tsx +0 -131
- package/src/components/PublicLayout/PublicPageDebugger.tsx +0 -104
- package/src/components/PublicLayout/PublicPageDiagnostic.tsx +0 -162
- package/src/components/PublicLayout/PublicPageFooter.tsx +0 -124
- package/src/components/PublicLayout/PublicPageHeader.tsx +0 -209
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +0 -449
- package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +0 -393
- package/src/components/PublicLayout/__tests__/PublicPageContextChecker.test.tsx +0 -192
- package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +0 -351
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +0 -402
- package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +0 -460
- package/src/components/PublicLayout/__tests__/PublicPageProvider.test.tsx +0 -313
- package/src/components/Select/hooks.ts +0 -289
- package/src/hooks/useCounter.test.ts +0 -131
- package/src/hooks/useDebounce.test.ts +0 -375
- package/src/providers/AuthProvider.tsx +0 -15
- package/src/providers/EventProvider.tsx +0 -16
- package/src/providers/InactivityProvider.tsx +0 -15
- package/src/providers/OrganisationProvider.context.test.tsx +0 -169
- package/src/providers/UnifiedAuthProvider.tsx +0 -15
- package/src/types/theme.ts +0 -6
- package/src/types/unified.ts +0 -265
- package/src/utils/appConfig.ts +0 -47
- package/src/utils/appIdResolver.test.ts +0 -499
- package/src/utils/appIdResolver.ts +0 -130
- package/src/utils/appNameResolver.simple.test.ts +0 -212
- package/src/utils/appNameResolver.test.ts +0 -121
- package/src/utils/appNameResolver.ts +0 -191
- package/src/utils/audit.ts +0 -127
- package/src/utils/auth-utils.ts +0 -96
- package/src/utils/bundleAnalysis.ts +0 -129
- package/src/utils/debugLogger.ts +0 -67
- package/src/utils/deviceFingerprint.ts +0 -215
- package/src/utils/dynamicUtils.ts +0 -105
- package/src/utils/file-reference.test.ts +0 -788
- package/src/utils/file-reference.ts +0 -519
- package/src/utils/formatDate.test.ts +0 -237
- package/src/utils/formatting.ts +0 -170
- package/src/utils/lazyLoad.tsx +0 -44
- package/src/utils/logger.ts +0 -179
- package/src/utils/organisationContext.test.ts +0 -322
- package/src/utils/organisationContext.ts +0 -153
- package/src/utils/performanceBenchmark.ts +0 -64
- package/src/utils/performanceBudgets.ts +0 -110
- package/src/utils/permissionTypes.ts +0 -37
- package/src/utils/permissionUtils.test.ts +0 -393
- package/src/utils/permissionUtils.ts +0 -34
- package/src/utils/sanitization.ts +0 -264
- package/src/utils/schemaUtils.ts +0 -37
- package/src/utils/secureDataAccess.test.ts +0 -711
- package/src/utils/secureDataAccess.ts +0 -377
- package/src/utils/secureErrors.ts +0 -79
- package/src/utils/security.ts +0 -156
- package/src/utils/securityMonitor.ts +0 -45
- package/src/utils/sessionTracking.ts +0 -126
- package/src/utils/validation.ts +0 -111
- package/src/utils/validationUtils.ts +0 -120
- package/src/validation/index.ts +0 -12
- /package/dist/{DataTable-UA6CL4JI.js.map → DataTable-QAB34V6K.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-B37ATQHE.js.map → UnifiedAuthProvider-7F6T4B6K.js.map} +0 -0
- /package/dist/{api-45XYYO2A.js.map → api-ROMBCNKU.js.map} +0 -0
- /package/dist/{audit-64X3VJXB.js.map → audit-WRS3KJKI.js.map} +0 -0
- /package/dist/{chunk-PLDDJCW6.js.map → chunk-7D4SUZUM.js.map} +0 -0
- /package/dist/{useInactivityTracker-TO6ZOF35.js.map → chunk-KQCRWDSA.js.map} +0 -0
- /package/examples/{components 2/DataTable → DataTable}/InitialPageSizeExample.tsx +0 -0
- /package/examples/{features/public-pages → PublicPages}/index.ts +0 -0
- /package/examples/{RBAC → rbac}/index.ts +0 -0
|
@@ -1,31 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCan,
|
|
3
3
|
useResolvedScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RA3JUFMW.js";
|
|
5
5
|
import {
|
|
6
6
|
toast,
|
|
7
7
|
useDataTablePerformance
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
init_UnifiedAuthProvider
|
|
11
|
-
} from "./chunk-EGI6MUL6.js";
|
|
8
|
+
} from "./chunk-6C4YBBJM.js";
|
|
12
9
|
import {
|
|
13
10
|
useUnifiedAuth
|
|
14
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-FUEYYMX5.js";
|
|
15
12
|
import {
|
|
13
|
+
cn,
|
|
16
14
|
renderSafeHtml
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
cn
|
|
20
|
-
} from "./chunk-56XJ3TU6.js";
|
|
15
|
+
} from "./chunk-R77UEZ4E.js";
|
|
21
16
|
import {
|
|
22
|
-
createLogger
|
|
23
|
-
|
|
24
|
-
} from "./chunk-XDNLUEXI.js";
|
|
17
|
+
createLogger
|
|
18
|
+
} from "./chunk-PWLANIRT.js";
|
|
25
19
|
import {
|
|
26
20
|
__commonJS,
|
|
27
21
|
__toESM
|
|
28
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7D4SUZUM.js";
|
|
29
23
|
|
|
30
24
|
// ../../node_modules/lodash/lodash.js
|
|
31
25
|
var require_lodash = __commonJS({
|
|
@@ -5509,10 +5503,10 @@ var require_lodash = __commonJS({
|
|
|
5509
5503
|
});
|
|
5510
5504
|
|
|
5511
5505
|
// src/components/DataTable/DataTable.tsx
|
|
5512
|
-
import
|
|
5506
|
+
import React21 from "react";
|
|
5513
5507
|
|
|
5514
5508
|
// src/components/DataTable/components/DataTableCore.tsx
|
|
5515
|
-
import
|
|
5509
|
+
import React20, { useMemo as useMemo14, useCallback as useCallback10, useEffect as useEffect11, useRef as useRef6 } from "react";
|
|
5516
5510
|
import { useReactTable } from "@tanstack/react-table";
|
|
5517
5511
|
import { Edit, Trash, ChevronUp as ChevronUp2, ChevronDown as ChevronDown3, ChevronsUpDown } from "lucide-react";
|
|
5518
5512
|
|
|
@@ -5734,11 +5728,9 @@ InputGroup.displayName = "InputGroup";
|
|
|
5734
5728
|
import { Plus, Upload, Download, Filter, Trash2 } from "lucide-react";
|
|
5735
5729
|
|
|
5736
5730
|
// src/components/Select/Select.tsx
|
|
5737
|
-
import * as React5 from "react";
|
|
5738
|
-
import { Search, X, ChevronDown, Check } from "lucide-react";
|
|
5739
|
-
|
|
5740
|
-
// src/components/Select/hooks.ts
|
|
5741
5731
|
import * as React4 from "react";
|
|
5732
|
+
import { Search, X, ChevronDown, Check } from "lucide-react";
|
|
5733
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
5742
5734
|
var useSelectState = ({
|
|
5743
5735
|
value: controlledValue,
|
|
5744
5736
|
defaultValue = "",
|
|
@@ -5911,26 +5903,23 @@ var useSelectSearch = ({
|
|
|
5911
5903
|
searchInputRef
|
|
5912
5904
|
};
|
|
5913
5905
|
};
|
|
5914
|
-
|
|
5915
|
-
// src/components/Select/Select.tsx
|
|
5916
|
-
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
5917
|
-
var SelectContext = React5.createContext(null);
|
|
5906
|
+
var SelectContext = React4.createContext(null);
|
|
5918
5907
|
var useSelectContext = () => {
|
|
5919
|
-
const context =
|
|
5908
|
+
const context = React4.useContext(SelectContext);
|
|
5920
5909
|
if (!context) {
|
|
5921
5910
|
throw new Error("Select components must be used within a Select");
|
|
5922
5911
|
}
|
|
5923
5912
|
return context;
|
|
5924
5913
|
};
|
|
5925
|
-
var Select =
|
|
5914
|
+
var Select = React4.forwardRef(
|
|
5926
5915
|
({
|
|
5927
5916
|
children,
|
|
5928
5917
|
className,
|
|
5929
5918
|
direction = "down",
|
|
5930
5919
|
...selectProps
|
|
5931
5920
|
}, ref) => {
|
|
5932
|
-
const internalRef =
|
|
5933
|
-
const selectRef =
|
|
5921
|
+
const internalRef = React4.useRef(null);
|
|
5922
|
+
const selectRef = React4.useMemo(() => {
|
|
5934
5923
|
if (ref && typeof ref === "object" && "current" in ref) {
|
|
5935
5924
|
return ref;
|
|
5936
5925
|
}
|
|
@@ -5938,12 +5927,12 @@ var Select = React5.forwardRef(
|
|
|
5938
5927
|
}, [ref]);
|
|
5939
5928
|
const { state, actions } = useSelectState(selectProps);
|
|
5940
5929
|
const { isSelecting } = useSelectEvents({ state, actions, selectRef });
|
|
5941
|
-
const itemsMapRef =
|
|
5942
|
-
const currentValueRef =
|
|
5943
|
-
|
|
5930
|
+
const itemsMapRef = React4.useRef(/* @__PURE__ */ new Map());
|
|
5931
|
+
const currentValueRef = React4.useRef(state.value);
|
|
5932
|
+
React4.useEffect(() => {
|
|
5944
5933
|
currentValueRef.current = state.value;
|
|
5945
5934
|
}, [state.value]);
|
|
5946
|
-
const updateSelectedTextIfNeeded =
|
|
5935
|
+
const updateSelectedTextIfNeeded = React4.useCallback((value) => {
|
|
5947
5936
|
if (value && value === currentValueRef.current) {
|
|
5948
5937
|
const registeredText = itemsMapRef.current.get(value);
|
|
5949
5938
|
if (registeredText) {
|
|
@@ -5953,14 +5942,14 @@ var Select = React5.forwardRef(
|
|
|
5953
5942
|
}
|
|
5954
5943
|
return false;
|
|
5955
5944
|
}, [actions.setSelectedText]);
|
|
5956
|
-
const registerItem =
|
|
5945
|
+
const registerItem = React4.useCallback((value, text) => {
|
|
5957
5946
|
itemsMapRef.current.set(value, text);
|
|
5958
5947
|
updateSelectedTextIfNeeded(value);
|
|
5959
5948
|
}, [updateSelectedTextIfNeeded]);
|
|
5960
|
-
const unregisterItem =
|
|
5949
|
+
const unregisterItem = React4.useCallback((value) => {
|
|
5961
5950
|
itemsMapRef.current.delete(value);
|
|
5962
5951
|
}, []);
|
|
5963
|
-
const findAndSetSelectedText =
|
|
5952
|
+
const findAndSetSelectedText = React4.useCallback(() => {
|
|
5964
5953
|
if (!state.value) {
|
|
5965
5954
|
actions.setSelectedText("");
|
|
5966
5955
|
return;
|
|
@@ -5994,10 +5983,10 @@ var Select = React5.forwardRef(
|
|
|
5994
5983
|
actions.setSelectedText("");
|
|
5995
5984
|
}
|
|
5996
5985
|
}, [state.value, actions.setSelectedText, selectRef]);
|
|
5997
|
-
|
|
5986
|
+
React4.useLayoutEffect(() => {
|
|
5998
5987
|
findAndSetSelectedText();
|
|
5999
5988
|
}, [findAndSetSelectedText]);
|
|
6000
|
-
|
|
5989
|
+
React4.useEffect(() => {
|
|
6001
5990
|
if (state.value && !state.selectedText) {
|
|
6002
5991
|
const timeoutId = setTimeout(() => {
|
|
6003
5992
|
findAndSetSelectedText();
|
|
@@ -6005,7 +5994,7 @@ var Select = React5.forwardRef(
|
|
|
6005
5994
|
return () => clearTimeout(timeoutId);
|
|
6006
5995
|
}
|
|
6007
5996
|
}, [state.value, state.selectedText, findAndSetSelectedText]);
|
|
6008
|
-
|
|
5997
|
+
React4.useEffect(() => {
|
|
6009
5998
|
if (!state.value || state.selectedText) return;
|
|
6010
5999
|
const selectElement = selectRef.current;
|
|
6011
6000
|
if (!selectElement) return;
|
|
@@ -6021,7 +6010,7 @@ var Select = React5.forwardRef(
|
|
|
6021
6010
|
});
|
|
6022
6011
|
return () => observer.disconnect();
|
|
6023
6012
|
}, [state.value, state.selectedText, findAndSetSelectedText, selectRef]);
|
|
6024
|
-
const contextValue =
|
|
6013
|
+
const contextValue = React4.useMemo(() => ({
|
|
6025
6014
|
...state,
|
|
6026
6015
|
actions,
|
|
6027
6016
|
registerItem,
|
|
@@ -6041,7 +6030,7 @@ var Select = React5.forwardRef(
|
|
|
6041
6030
|
}
|
|
6042
6031
|
);
|
|
6043
6032
|
Select.displayName = "Select";
|
|
6044
|
-
var SelectTrigger =
|
|
6033
|
+
var SelectTrigger = React4.forwardRef(
|
|
6045
6034
|
({ children, className, variant = "outline", size = "default", asChild = false, ...props }, ref) => {
|
|
6046
6035
|
const { open, disabled, value, actions, direction = "down" } = useSelectContext();
|
|
6047
6036
|
const opensUpward = direction === "up";
|
|
@@ -6093,16 +6082,16 @@ var SelectTrigger = React5.forwardRef(
|
|
|
6093
6082
|
...props
|
|
6094
6083
|
};
|
|
6095
6084
|
if (asChild) {
|
|
6096
|
-
const childChildren =
|
|
6085
|
+
const childChildren = React4.Children.toArray(children.props.children);
|
|
6097
6086
|
const hasChevron = childChildren.some(
|
|
6098
|
-
(child) =>
|
|
6087
|
+
(child) => React4.isValidElement(child) && (child.type === ChevronDown || child.type === "svg" && child.props["data-testid"] === "chevron-down" || typeof child === "object" && "type" in child && typeof child.type === "function" && child.type.name === "ChevronDown")
|
|
6099
6088
|
);
|
|
6100
6089
|
const childClassName = children.props.className;
|
|
6101
6090
|
const mergedClassName = cn(
|
|
6102
6091
|
triggerProps.className,
|
|
6103
6092
|
childClassName
|
|
6104
6093
|
);
|
|
6105
|
-
return
|
|
6094
|
+
return React4.cloneElement(children, {
|
|
6106
6095
|
...triggerProps,
|
|
6107
6096
|
className: mergedClassName,
|
|
6108
6097
|
children: hasChevron ? childChildren : [
|
|
@@ -6166,14 +6155,14 @@ var SelectTrigger = React5.forwardRef(
|
|
|
6166
6155
|
}
|
|
6167
6156
|
);
|
|
6168
6157
|
SelectTrigger.displayName = "SelectTrigger";
|
|
6169
|
-
var SelectValue =
|
|
6158
|
+
var SelectValue = React4.forwardRef(
|
|
6170
6159
|
({ placeholder = "Select an option...", children }, ref) => {
|
|
6171
6160
|
const { selectedText } = useSelectContext();
|
|
6172
6161
|
return /* @__PURE__ */ jsx4("span", { ref, "data-testid": "select-value", children: children || (selectedText ? selectedText : placeholder) });
|
|
6173
6162
|
}
|
|
6174
6163
|
);
|
|
6175
6164
|
SelectValue.displayName = "SelectValue";
|
|
6176
|
-
var SelectContent =
|
|
6165
|
+
var SelectContent = React4.forwardRef(
|
|
6177
6166
|
({
|
|
6178
6167
|
children,
|
|
6179
6168
|
className,
|
|
@@ -6187,7 +6176,7 @@ var SelectContent = React5.forwardRef(
|
|
|
6187
6176
|
children,
|
|
6188
6177
|
searchable
|
|
6189
6178
|
});
|
|
6190
|
-
|
|
6179
|
+
React4.useEffect(() => {
|
|
6191
6180
|
if (open && searchable && searchInputRef.current) {
|
|
6192
6181
|
searchInputRef.current.focus();
|
|
6193
6182
|
}
|
|
@@ -6267,14 +6256,14 @@ var SelectContent = React5.forwardRef(
|
|
|
6267
6256
|
}
|
|
6268
6257
|
);
|
|
6269
6258
|
SelectContent.displayName = "SelectContent";
|
|
6270
|
-
var SelectItem =
|
|
6259
|
+
var SelectItem = React4.forwardRef(
|
|
6271
6260
|
({ value, children, disabled = false, className, onClick }, ref) => {
|
|
6272
6261
|
const { value: selectedValue, actions, registerItem, unregisterItem } = useSelectContext();
|
|
6273
6262
|
const isSelected = selectedValue === value;
|
|
6274
6263
|
const getTextContent = (children2) => {
|
|
6275
6264
|
if (typeof children2 === "string") return children2;
|
|
6276
6265
|
if (typeof children2 === "number") return children2.toString();
|
|
6277
|
-
if (
|
|
6266
|
+
if (React4.isValidElement(children2) && children2.props.children) {
|
|
6278
6267
|
return getTextContent(children2.props.children);
|
|
6279
6268
|
}
|
|
6280
6269
|
if (Array.isArray(children2)) {
|
|
@@ -6283,7 +6272,7 @@ var SelectItem = React5.forwardRef(
|
|
|
6283
6272
|
return "";
|
|
6284
6273
|
};
|
|
6285
6274
|
const itemText = getTextContent(children);
|
|
6286
|
-
|
|
6275
|
+
React4.useLayoutEffect(() => {
|
|
6287
6276
|
if (registerItem && itemText) {
|
|
6288
6277
|
registerItem(value, itemText);
|
|
6289
6278
|
}
|
|
@@ -6314,7 +6303,13 @@ var SelectItem = React5.forwardRef(
|
|
|
6314
6303
|
case " ":
|
|
6315
6304
|
e.preventDefault();
|
|
6316
6305
|
if (onClick) {
|
|
6317
|
-
|
|
6306
|
+
const syntheticEvent = {
|
|
6307
|
+
...e,
|
|
6308
|
+
type: "click",
|
|
6309
|
+
currentTarget: e.currentTarget,
|
|
6310
|
+
target: e.target
|
|
6311
|
+
};
|
|
6312
|
+
onClick(syntheticEvent);
|
|
6318
6313
|
}
|
|
6319
6314
|
actions.setValue(value, itemText);
|
|
6320
6315
|
break;
|
|
@@ -6350,19 +6345,19 @@ var SelectItem = React5.forwardRef(
|
|
|
6350
6345
|
}
|
|
6351
6346
|
);
|
|
6352
6347
|
SelectItem.displayName = "SelectItem";
|
|
6353
|
-
var SelectGroup =
|
|
6348
|
+
var SelectGroup = React4.forwardRef(
|
|
6354
6349
|
({ children, className }, ref) => {
|
|
6355
6350
|
return /* @__PURE__ */ jsx4("div", { ref, className: cn("p-1", className), "data-testid": "select-group", children });
|
|
6356
6351
|
}
|
|
6357
6352
|
);
|
|
6358
6353
|
SelectGroup.displayName = "SelectGroup";
|
|
6359
|
-
var SelectLabel =
|
|
6354
|
+
var SelectLabel = React4.forwardRef(
|
|
6360
6355
|
({ children, className }, ref) => {
|
|
6361
6356
|
return /* @__PURE__ */ jsx4("div", { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), "data-testid": "select-label", children });
|
|
6362
6357
|
}
|
|
6363
6358
|
);
|
|
6364
6359
|
SelectLabel.displayName = "SelectLabel";
|
|
6365
|
-
var SelectSeparator =
|
|
6360
|
+
var SelectSeparator = React4.forwardRef(
|
|
6366
6361
|
({ className }, ref) => {
|
|
6367
6362
|
return /* @__PURE__ */ jsx4(
|
|
6368
6363
|
"div",
|
|
@@ -6453,11 +6448,11 @@ function GroupingDropdown({
|
|
|
6453
6448
|
}
|
|
6454
6449
|
|
|
6455
6450
|
// src/components/Checkbox/Checkbox.tsx
|
|
6456
|
-
import * as
|
|
6451
|
+
import * as React5 from "react";
|
|
6457
6452
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
6458
6453
|
import { Check as Check2 } from "lucide-react";
|
|
6459
6454
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
6460
|
-
var Checkbox =
|
|
6455
|
+
var Checkbox = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
6461
6456
|
CheckboxPrimitive.Root,
|
|
6462
6457
|
{
|
|
6463
6458
|
ref,
|
|
@@ -6682,7 +6677,7 @@ function DataTableToolbar({
|
|
|
6682
6677
|
}
|
|
6683
6678
|
|
|
6684
6679
|
// src/components/DataTable/components/UnifiedTableBody.tsx
|
|
6685
|
-
import
|
|
6680
|
+
import React10, { useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
6686
6681
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
6687
6682
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
6688
6683
|
import { ChevronDown as ChevronDown2, ChevronRight } from "lucide-react";
|
|
@@ -6734,13 +6729,13 @@ function EmptyState({
|
|
|
6734
6729
|
}
|
|
6735
6730
|
|
|
6736
6731
|
// src/components/DataTable/components/FilterRow.tsx
|
|
6737
|
-
import
|
|
6732
|
+
import React7 from "react";
|
|
6738
6733
|
|
|
6739
6734
|
// src/components/DataTable/components/ColumnFilter.tsx
|
|
6740
6735
|
import { X as X2 } from "lucide-react";
|
|
6741
6736
|
|
|
6742
6737
|
// src/components/DataTable/utils/columnUtils.ts
|
|
6743
|
-
import
|
|
6738
|
+
import React6 from "react";
|
|
6744
6739
|
function getColumnHeaderText(column) {
|
|
6745
6740
|
const header = column.columnDef.header;
|
|
6746
6741
|
if (typeof header === "string") {
|
|
@@ -6753,7 +6748,7 @@ function getColumnHeaderText(column) {
|
|
|
6753
6748
|
if (typeof header === "function") {
|
|
6754
6749
|
return getAccessorKey() || column.id;
|
|
6755
6750
|
}
|
|
6756
|
-
if (
|
|
6751
|
+
if (React6.isValidElement(header)) {
|
|
6757
6752
|
return getAccessorKey() || column.id;
|
|
6758
6753
|
}
|
|
6759
6754
|
return getAccessorKey() || column.id;
|
|
@@ -6854,7 +6849,7 @@ import { jsx as jsx11 } from "react/jsx-runtime";
|
|
|
6854
6849
|
function FilterRow({ table, visibleColumns }) {
|
|
6855
6850
|
const { getState } = table;
|
|
6856
6851
|
const { columnFilters } = getState();
|
|
6857
|
-
const getColumnOptions =
|
|
6852
|
+
const getColumnOptions = React7.useCallback((columnId) => {
|
|
6858
6853
|
const column = table.getColumn(columnId);
|
|
6859
6854
|
if (!column) return [];
|
|
6860
6855
|
const columnDef = column.columnDef;
|
|
@@ -6873,7 +6868,7 @@ function FilterRow({ table, visibleColumns }) {
|
|
|
6873
6868
|
});
|
|
6874
6869
|
return Array.from(uniqueValues).sort().map((value) => ({ value, label: value }));
|
|
6875
6870
|
}, [table]);
|
|
6876
|
-
const getFilterType =
|
|
6871
|
+
const getFilterType = React7.useCallback((columnId) => {
|
|
6877
6872
|
const column = table.getColumn(columnId);
|
|
6878
6873
|
if (!column) return "text";
|
|
6879
6874
|
const columnDef = column.columnDef;
|
|
@@ -6922,7 +6917,7 @@ function FilterRow({ table, visibleColumns }) {
|
|
|
6922
6917
|
}
|
|
6923
6918
|
|
|
6924
6919
|
// src/components/DataTable/components/ActionButtons.tsx
|
|
6925
|
-
import
|
|
6920
|
+
import React8, { useMemo as useMemo2 } from "react";
|
|
6926
6921
|
import { MoreHorizontal } from "lucide-react";
|
|
6927
6922
|
import { Fragment, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
6928
6923
|
var evaluateCondition = (condition, row, defaultValue) => {
|
|
@@ -7039,13 +7034,12 @@ function ActionButtonsComponent({
|
|
|
7039
7034
|
}) })
|
|
7040
7035
|
] });
|
|
7041
7036
|
}
|
|
7042
|
-
var ActionButtons =
|
|
7037
|
+
var ActionButtons = React8.memo(ActionButtonsComponent);
|
|
7043
7038
|
|
|
7044
7039
|
// src/components/DataTable/components/EditableRow.tsx
|
|
7045
|
-
import
|
|
7040
|
+
import React9 from "react";
|
|
7046
7041
|
import { flexRender } from "@tanstack/react-table";
|
|
7047
7042
|
import { X as X3, Check as Check3 } from "lucide-react";
|
|
7048
|
-
init_logger();
|
|
7049
7043
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
7050
7044
|
function SelectEditField({
|
|
7051
7045
|
columnDef,
|
|
@@ -7055,14 +7049,14 @@ function SelectEditField({
|
|
|
7055
7049
|
onChange,
|
|
7056
7050
|
className
|
|
7057
7051
|
}) {
|
|
7058
|
-
const logger =
|
|
7052
|
+
const logger = React9.useMemo(() => createLogger("SelectEditField"), []);
|
|
7059
7053
|
const isSearchable = columnDef.selectSearchable !== false;
|
|
7060
7054
|
const isCreatable = columnDef.creatable === true;
|
|
7061
|
-
const selectRef =
|
|
7062
|
-
const [searchTerm, setSearchTerm] =
|
|
7063
|
-
const [isOpen, setIsOpen] =
|
|
7064
|
-
const [showCreateOption, setShowCreateOption] =
|
|
7065
|
-
|
|
7055
|
+
const selectRef = React9.useRef(null);
|
|
7056
|
+
const [searchTerm, setSearchTerm] = React9.useState("");
|
|
7057
|
+
const [isOpen, setIsOpen] = React9.useState(false);
|
|
7058
|
+
const [showCreateOption, setShowCreateOption] = React9.useState(false);
|
|
7059
|
+
React9.useEffect(() => {
|
|
7066
7060
|
if (!isOpen || !isSearchable || !isCreatable) return;
|
|
7067
7061
|
const findAndAttachSearchInput = () => {
|
|
7068
7062
|
let searchInput = null;
|
|
@@ -7140,7 +7134,7 @@ function SelectEditField({
|
|
|
7140
7134
|
}
|
|
7141
7135
|
return cleanup;
|
|
7142
7136
|
}, [isOpen, isSearchable, isCreatable, columnDef.fieldOptions]);
|
|
7143
|
-
const handleCreateNew =
|
|
7137
|
+
const handleCreateNew = React9.useCallback(async () => {
|
|
7144
7138
|
if (!isCreatable || !columnDef.onCreateNew || !searchTerm.trim()) return;
|
|
7145
7139
|
try {
|
|
7146
7140
|
const newValue = await columnDef.onCreateNew(searchTerm.trim());
|
|
@@ -7286,9 +7280,9 @@ function EditableRow({
|
|
|
7286
7280
|
hierarchical = false
|
|
7287
7281
|
}) {
|
|
7288
7282
|
const rowId = getRowId ? getRowId(row.original, row.index) : String(row.id);
|
|
7289
|
-
const firstInputRef =
|
|
7290
|
-
const hasAssignedRef =
|
|
7291
|
-
|
|
7283
|
+
const firstInputRef = React9.useRef(null);
|
|
7284
|
+
const hasAssignedRef = React9.useRef(false);
|
|
7285
|
+
React9.useEffect(() => {
|
|
7292
7286
|
if (firstInputRef.current) {
|
|
7293
7287
|
firstInputRef.current.focus();
|
|
7294
7288
|
firstInputRef.current.select();
|
|
@@ -7354,9 +7348,6 @@ function EditableRow({
|
|
|
7354
7348
|
);
|
|
7355
7349
|
}
|
|
7356
7350
|
|
|
7357
|
-
// src/components/DataTable/components/UnifiedTableBody.tsx
|
|
7358
|
-
init_logger();
|
|
7359
|
-
|
|
7360
7351
|
// src/components/DataTable/utils/hierarchicalUtils.ts
|
|
7361
7352
|
function validateHierarchicalData(data) {
|
|
7362
7353
|
const errors = [];
|
|
@@ -7567,14 +7558,14 @@ function SelectEditField2({
|
|
|
7567
7558
|
placeholder,
|
|
7568
7559
|
onChange
|
|
7569
7560
|
}) {
|
|
7570
|
-
const logger =
|
|
7561
|
+
const logger = React10.useMemo(() => createLogger("SelectEditField"), []);
|
|
7571
7562
|
const isSearchable = columnDef.selectSearchable !== false;
|
|
7572
7563
|
const isCreatable = columnDef.creatable === true;
|
|
7573
|
-
const selectRef =
|
|
7574
|
-
const [searchTerm, setSearchTerm] =
|
|
7575
|
-
const [isOpen, setIsOpen] =
|
|
7576
|
-
const [showCreateOption, setShowCreateOption] =
|
|
7577
|
-
|
|
7564
|
+
const selectRef = React10.useRef(null);
|
|
7565
|
+
const [searchTerm, setSearchTerm] = React10.useState("");
|
|
7566
|
+
const [isOpen, setIsOpen] = React10.useState(false);
|
|
7567
|
+
const [showCreateOption, setShowCreateOption] = React10.useState(false);
|
|
7568
|
+
React10.useEffect(() => {
|
|
7578
7569
|
if (!isOpen || !isSearchable || !isCreatable || !columnDef.onCreateNew) {
|
|
7579
7570
|
if (!isOpen || !isCreatable || !columnDef.onCreateNew) {
|
|
7580
7571
|
setShowCreateOption(false);
|
|
@@ -7659,7 +7650,7 @@ function SelectEditField2({
|
|
|
7659
7650
|
}
|
|
7660
7651
|
return cleanup;
|
|
7661
7652
|
}, [isOpen, isSearchable, isCreatable, columnDef.fieldOptions, columnDef.onCreateNew]);
|
|
7662
|
-
const handleCreateNew =
|
|
7653
|
+
const handleCreateNew = React10.useCallback(async () => {
|
|
7663
7654
|
if (!isCreatable || !columnDef.onCreateNew || !searchTerm.trim()) return;
|
|
7664
7655
|
try {
|
|
7665
7656
|
const newValue = await columnDef.onCreateNew(searchTerm.trim());
|
|
@@ -7790,7 +7781,7 @@ var renderEditField2 = (column, value, onChange, editingData = {}, placeholder)
|
|
|
7790
7781
|
}
|
|
7791
7782
|
);
|
|
7792
7783
|
};
|
|
7793
|
-
var RowComponent =
|
|
7784
|
+
var RowComponent = React10.memo(({
|
|
7794
7785
|
row,
|
|
7795
7786
|
style,
|
|
7796
7787
|
isEditing,
|
|
@@ -7806,21 +7797,21 @@ var RowComponent = React11.memo(({
|
|
|
7806
7797
|
rbac,
|
|
7807
7798
|
permissions
|
|
7808
7799
|
}) => {
|
|
7809
|
-
const rowRef =
|
|
7810
|
-
const firstInputRef =
|
|
7811
|
-
const logger =
|
|
7800
|
+
const rowRef = useRef2(null);
|
|
7801
|
+
const firstInputRef = useRef2(null);
|
|
7802
|
+
const logger = React10.useMemo(() => createLogger("RowComponent"), []);
|
|
7812
7803
|
const rowId = getRowIdSafe(row.original, row.index, getRowId);
|
|
7813
7804
|
const hierarchicalRow = row.original;
|
|
7814
7805
|
const isHierarchical = hierarchical?.enabled && hierarchicalRow?.isParent !== void 0;
|
|
7815
7806
|
const isParent = isHierarchical && hierarchicalRow.isParent;
|
|
7816
7807
|
const isChild = isHierarchical && !hierarchicalRow.isParent;
|
|
7817
|
-
|
|
7808
|
+
useEffect2(() => {
|
|
7818
7809
|
if (isEditing && firstInputRef.current) {
|
|
7819
7810
|
firstInputRef.current.focus();
|
|
7820
7811
|
firstInputRef.current.select();
|
|
7821
7812
|
}
|
|
7822
7813
|
}, [isEditing]);
|
|
7823
|
-
|
|
7814
|
+
useEffect2(() => {
|
|
7824
7815
|
if (!isEditing) return;
|
|
7825
7816
|
const handleKeyDown = (event) => {
|
|
7826
7817
|
const target = event.target;
|
|
@@ -8058,10 +8049,10 @@ function UnifiedTableBody({
|
|
|
8058
8049
|
rbac,
|
|
8059
8050
|
permissions
|
|
8060
8051
|
}) {
|
|
8061
|
-
const logger =
|
|
8062
|
-
const headerRef =
|
|
8063
|
-
const bodyRef =
|
|
8064
|
-
const parentRef =
|
|
8052
|
+
const logger = React10.useMemo(() => createLogger("UnifiedTableBody"), []);
|
|
8053
|
+
const headerRef = useRef2(null);
|
|
8054
|
+
const bodyRef = useRef2(null);
|
|
8055
|
+
const parentRef = useRef2(null);
|
|
8065
8056
|
const shouldVirtualize = forceVirtualization || dataLength > VIRTUALIZATION_THRESHOLD;
|
|
8066
8057
|
const rows = table.getRowModel().rows;
|
|
8067
8058
|
const headerGroups = table.getHeaderGroups();
|
|
@@ -8075,7 +8066,7 @@ function UnifiedTableBody({
|
|
|
8075
8066
|
});
|
|
8076
8067
|
const virtualRows = effectiveShouldVirtualize ? virtualizer.getVirtualItems() : [];
|
|
8077
8068
|
const totalSize = effectiveShouldVirtualize ? virtualizer.getTotalSize() : 0;
|
|
8078
|
-
|
|
8069
|
+
useEffect2(() => {
|
|
8079
8070
|
if (shouldVirtualize && !hasScrollContainer) {
|
|
8080
8071
|
logger.warn("Virtualization enabled but no scroll container found. Falling back to standard rendering.", {
|
|
8081
8072
|
rowsLength: rows.length,
|
|
@@ -8260,7 +8251,7 @@ function UnifiedTableBody({
|
|
|
8260
8251
|
}
|
|
8261
8252
|
|
|
8262
8253
|
// src/components/DataTable/components/PaginationControls.tsx
|
|
8263
|
-
import
|
|
8254
|
+
import React11 from "react";
|
|
8264
8255
|
import {
|
|
8265
8256
|
ChevronLeft,
|
|
8266
8257
|
ChevronRight as ChevronRight2,
|
|
@@ -8272,7 +8263,6 @@ import {
|
|
|
8272
8263
|
} from "lucide-react";
|
|
8273
8264
|
|
|
8274
8265
|
// src/components/DataTable/utils/paginationUtils.ts
|
|
8275
|
-
init_logger();
|
|
8276
8266
|
function getPaginationBinding(config) {
|
|
8277
8267
|
const { mode, table, serverData, totalCount, onPageChange, onPageSizeChange } = config;
|
|
8278
8268
|
const state = calculatePaginationState(config);
|
|
@@ -8585,7 +8575,7 @@ function EnhancedPaginationControls({
|
|
|
8585
8575
|
showJumpToPage = false,
|
|
8586
8576
|
...props
|
|
8587
8577
|
}) {
|
|
8588
|
-
const [jumpToPage, setJumpToPage] =
|
|
8578
|
+
const [jumpToPage, setJumpToPage] = React11.useState("");
|
|
8589
8579
|
const { table, paginationMode = "client", serverData, onPageChange, totalCount } = props;
|
|
8590
8580
|
const pagination = getPaginationBinding({
|
|
8591
8581
|
mode: paginationMode,
|
|
@@ -8636,17 +8626,17 @@ function LoadingState() {
|
|
|
8636
8626
|
}
|
|
8637
8627
|
|
|
8638
8628
|
// src/components/DataTable/components/DataTableModals.tsx
|
|
8639
|
-
import
|
|
8629
|
+
import React15, { useEffect as useEffect5 } from "react";
|
|
8640
8630
|
|
|
8641
8631
|
// src/components/DataTable/components/ImportModal.tsx
|
|
8642
|
-
import { useState as useState4, useRef as
|
|
8632
|
+
import { useState as useState4, useRef as useRef3, useEffect as useEffect4 } from "react";
|
|
8643
8633
|
|
|
8644
8634
|
// src/components/Dialog/Dialog.tsx
|
|
8645
|
-
import * as
|
|
8635
|
+
import * as React12 from "react";
|
|
8646
8636
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
8647
8637
|
import { X as X4 } from "lucide-react";
|
|
8648
8638
|
var import_lodash = __toESM(require_lodash(), 1);
|
|
8649
|
-
import { useState as useState3, useEffect as
|
|
8639
|
+
import { useState as useState3, useEffect as useEffect3 } from "react";
|
|
8650
8640
|
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8651
8641
|
var sizeClasses = {
|
|
8652
8642
|
sm: "max-w-sm",
|
|
@@ -8660,7 +8650,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
8660
8650
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
8661
8651
|
var DialogPortal = DialogPrimitive.Portal;
|
|
8662
8652
|
var DialogClose = DialogPrimitive.Close;
|
|
8663
|
-
var DialogOverlay =
|
|
8653
|
+
var DialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
8664
8654
|
DialogPrimitive.Overlay,
|
|
8665
8655
|
{
|
|
8666
8656
|
ref,
|
|
@@ -8682,7 +8672,7 @@ var useSmartDimensions = ({
|
|
|
8682
8672
|
enableScrolling = false
|
|
8683
8673
|
}) => {
|
|
8684
8674
|
const [dimensions, setDimensions] = useState3({});
|
|
8685
|
-
|
|
8675
|
+
useEffect3(() => {
|
|
8686
8676
|
if (!maxHeightPercent && !maxWidthPercent && !maxHeight && !maxWidth && !minHeight && !minWidth) {
|
|
8687
8677
|
return;
|
|
8688
8678
|
}
|
|
@@ -8737,7 +8727,7 @@ var useSmartDimensions = ({
|
|
|
8737
8727
|
}
|
|
8738
8728
|
return result;
|
|
8739
8729
|
};
|
|
8740
|
-
var DialogContent =
|
|
8730
|
+
var DialogContent = React12.forwardRef(({
|
|
8741
8731
|
className,
|
|
8742
8732
|
children,
|
|
8743
8733
|
size = "md",
|
|
@@ -8764,17 +8754,17 @@ var DialogContent = React13.forwardRef(({
|
|
|
8764
8754
|
minWidth,
|
|
8765
8755
|
enableScrolling
|
|
8766
8756
|
});
|
|
8767
|
-
const handleEscapeKeyDown =
|
|
8757
|
+
const handleEscapeKeyDown = React12.useCallback((event) => {
|
|
8768
8758
|
if (preventCloseOnEscape) {
|
|
8769
8759
|
event.preventDefault();
|
|
8770
8760
|
}
|
|
8771
8761
|
}, [preventCloseOnEscape]);
|
|
8772
|
-
const handlePointerDownOutside =
|
|
8762
|
+
const handlePointerDownOutside = React12.useCallback((event) => {
|
|
8773
8763
|
if (preventCloseOnOutsideClick) {
|
|
8774
8764
|
event.preventDefault();
|
|
8775
8765
|
}
|
|
8776
8766
|
}, [preventCloseOnOutsideClick]);
|
|
8777
|
-
const mergedStyle =
|
|
8767
|
+
const mergedStyle = React12.useMemo(() => {
|
|
8778
8768
|
if (Object.keys(smartDimensions).length === 0) {
|
|
8779
8769
|
return style;
|
|
8780
8770
|
}
|
|
@@ -8852,13 +8842,13 @@ var DialogBody = ({
|
|
|
8852
8842
|
children,
|
|
8853
8843
|
...props
|
|
8854
8844
|
}) => {
|
|
8855
|
-
const mergedStyle =
|
|
8845
|
+
const mergedStyle = React12.useMemo(() => {
|
|
8856
8846
|
return {
|
|
8857
8847
|
...maxHeight && { maxHeight },
|
|
8858
8848
|
...style
|
|
8859
8849
|
};
|
|
8860
8850
|
}, [maxHeight, style]);
|
|
8861
|
-
const processedHtmlContent =
|
|
8851
|
+
const processedHtmlContent = React12.useMemo(() => {
|
|
8862
8852
|
if (!htmlContent || !allowHtml) {
|
|
8863
8853
|
return null;
|
|
8864
8854
|
}
|
|
@@ -8911,8 +8901,8 @@ var DialogFooter = ({
|
|
|
8911
8901
|
}
|
|
8912
8902
|
);
|
|
8913
8903
|
DialogFooter.displayName = "DialogFooter";
|
|
8914
|
-
var DialogTitle =
|
|
8915
|
-
const processedHtmlContent =
|
|
8904
|
+
var DialogTitle = React12.forwardRef(({ className, htmlContent, allowHtml = true, children, ...props }, ref) => {
|
|
8905
|
+
const processedHtmlContent = React12.useMemo(() => {
|
|
8916
8906
|
if (!htmlContent || !allowHtml) {
|
|
8917
8907
|
return null;
|
|
8918
8908
|
}
|
|
@@ -8935,8 +8925,8 @@ var DialogTitle = React13.forwardRef(({ className, htmlContent, allowHtml = true
|
|
|
8935
8925
|
);
|
|
8936
8926
|
});
|
|
8937
8927
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
8938
|
-
var DialogDescription =
|
|
8939
|
-
const processedHtmlContent =
|
|
8928
|
+
var DialogDescription = React12.forwardRef(({ className, htmlContent, allowHtml = true, children, ...props }, ref) => {
|
|
8929
|
+
const processedHtmlContent = React12.useMemo(() => {
|
|
8940
8930
|
if (!htmlContent || !allowHtml) {
|
|
8941
8931
|
return null;
|
|
8942
8932
|
}
|
|
@@ -8959,10 +8949,10 @@ var DialogDescription = React13.forwardRef(({ className, htmlContent, allowHtml
|
|
|
8959
8949
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
8960
8950
|
|
|
8961
8951
|
// src/components/Progress/Progress.tsx
|
|
8962
|
-
import * as
|
|
8952
|
+
import * as React13 from "react";
|
|
8963
8953
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
8964
8954
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
8965
|
-
var Progress =
|
|
8955
|
+
var Progress = React13.forwardRef(({ className, value, max: max2 = 100, ...props }, ref) => /* @__PURE__ */ jsx18(
|
|
8966
8956
|
ProgressPrimitive.Root,
|
|
8967
8957
|
{
|
|
8968
8958
|
ref,
|
|
@@ -8980,7 +8970,7 @@ var Progress = React14.forwardRef(({ className, value, max: max2 = 100, ...props
|
|
|
8980
8970
|
ProgressPrimitive.Indicator,
|
|
8981
8971
|
{
|
|
8982
8972
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
8983
|
-
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
8973
|
+
style: { transform: `translateX(-${100 - (value || 0) / max2 * 100}%)` }
|
|
8984
8974
|
}
|
|
8985
8975
|
)
|
|
8986
8976
|
}
|
|
@@ -8988,7 +8978,6 @@ var Progress = React14.forwardRef(({ className, value, max: max2 = 100, ...props
|
|
|
8988
8978
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
8989
8979
|
|
|
8990
8980
|
// src/components/DataTable/components/ImportModal.tsx
|
|
8991
|
-
init_logger();
|
|
8992
8981
|
import { Upload as Upload2, FileText, AlertCircle } from "lucide-react";
|
|
8993
8982
|
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
8994
8983
|
function ImportModal({ isOpen, onClose, onImport, config = {} }) {
|
|
@@ -9000,14 +8989,14 @@ function ImportModal({ isOpen, onClose, onImport, config = {} }) {
|
|
|
9000
8989
|
const [totalCount, setTotalCount] = useState4(0);
|
|
9001
8990
|
const [validationErrors, setValidationErrors] = useState4([]);
|
|
9002
8991
|
const [importProgress, setImportProgress] = useState4(null);
|
|
9003
|
-
const fileInputRef =
|
|
9004
|
-
const isMountedRef =
|
|
9005
|
-
|
|
8992
|
+
const fileInputRef = useRef3(null);
|
|
8993
|
+
const isMountedRef = useRef3(true);
|
|
8994
|
+
useEffect4(() => {
|
|
9006
8995
|
return () => {
|
|
9007
8996
|
isMountedRef.current = false;
|
|
9008
8997
|
};
|
|
9009
8998
|
}, []);
|
|
9010
|
-
|
|
8999
|
+
useEffect4(() => {
|
|
9011
9000
|
if (!isOpen) {
|
|
9012
9001
|
setFile(null);
|
|
9013
9002
|
setPreviewData(null);
|
|
@@ -9299,7 +9288,6 @@ function ImportModal({ isOpen, onClose, onImport, config = {} }) {
|
|
|
9299
9288
|
}
|
|
9300
9289
|
|
|
9301
9290
|
// src/components/DataTable/components/DataTableModals.tsx
|
|
9302
|
-
init_logger();
|
|
9303
9291
|
import { Fragment as Fragment4, jsx as jsx20 } from "react/jsx-runtime";
|
|
9304
9292
|
function mapCSVToTableColumns(csvData, columns) {
|
|
9305
9293
|
const logger = createLogger("mapCSVToTableColumns");
|
|
@@ -9364,8 +9352,8 @@ function DataTableModals({
|
|
|
9364
9352
|
onStoreFocus,
|
|
9365
9353
|
onRestoreFocus
|
|
9366
9354
|
}) {
|
|
9367
|
-
const logger =
|
|
9368
|
-
|
|
9355
|
+
const logger = React15.useMemo(() => createLogger("DataTableModals"), []);
|
|
9356
|
+
useEffect5(() => {
|
|
9369
9357
|
if (showImportModal) {
|
|
9370
9358
|
onStoreFocus?.();
|
|
9371
9359
|
} else {
|
|
@@ -9408,12 +9396,12 @@ function DataTableModals({
|
|
|
9408
9396
|
}
|
|
9409
9397
|
|
|
9410
9398
|
// src/components/DataTable/components/DataTableErrorBoundary.tsx
|
|
9411
|
-
import
|
|
9399
|
+
import React17, { Component } from "react";
|
|
9412
9400
|
|
|
9413
9401
|
// src/components/Alert/Alert.tsx
|
|
9414
|
-
import * as
|
|
9402
|
+
import * as React16 from "react";
|
|
9415
9403
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
9416
|
-
var AlertContext =
|
|
9404
|
+
var AlertContext = React16.createContext({ variant: "default" });
|
|
9417
9405
|
var getAlertClasses = (variant = "default") => {
|
|
9418
9406
|
const baseClasses = "relative w-full rounded-lg border p-4";
|
|
9419
9407
|
const variantClasses = {
|
|
@@ -9424,10 +9412,10 @@ var getAlertClasses = (variant = "default") => {
|
|
|
9424
9412
|
};
|
|
9425
9413
|
return `${baseClasses} ${variantClasses[variant]}`;
|
|
9426
9414
|
};
|
|
9427
|
-
var Alert =
|
|
9428
|
-
const contextValue =
|
|
9415
|
+
var Alert = React16.forwardRef(({ className, variant = "default", ...props }, ref) => {
|
|
9416
|
+
const contextValue = React16.useMemo(() => ({ variant }), [variant]);
|
|
9429
9417
|
if (variant === "inline") {
|
|
9430
|
-
return /* @__PURE__ */ jsx21(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx21(
|
|
9418
|
+
return /* @__PURE__ */ jsx21(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx21(React16.Fragment, { ...props }) });
|
|
9431
9419
|
}
|
|
9432
9420
|
return /* @__PURE__ */ jsx21(AlertContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx21(
|
|
9433
9421
|
"div",
|
|
@@ -9440,8 +9428,8 @@ var Alert = React17.forwardRef(({ className, variant = "default", ...props }, re
|
|
|
9440
9428
|
) });
|
|
9441
9429
|
});
|
|
9442
9430
|
Alert.displayName = "Alert";
|
|
9443
|
-
var AlertTitle =
|
|
9444
|
-
const { variant } =
|
|
9431
|
+
var AlertTitle = React16.forwardRef(({ className, ...props }, ref) => {
|
|
9432
|
+
const { variant } = React16.useContext(AlertContext);
|
|
9445
9433
|
if (variant === "inline") {
|
|
9446
9434
|
return /* @__PURE__ */ jsx21("strong", { ...props });
|
|
9447
9435
|
}
|
|
@@ -9449,14 +9437,14 @@ var AlertTitle = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
9449
9437
|
"h5",
|
|
9450
9438
|
{
|
|
9451
9439
|
ref,
|
|
9452
|
-
className: cn(
|
|
9440
|
+
className: cn(className),
|
|
9453
9441
|
...props
|
|
9454
9442
|
}
|
|
9455
9443
|
);
|
|
9456
9444
|
});
|
|
9457
9445
|
AlertTitle.displayName = "AlertTitle";
|
|
9458
|
-
var AlertDescription =
|
|
9459
|
-
const { variant } =
|
|
9446
|
+
var AlertDescription = React16.forwardRef(({ className, ...props }, ref) => {
|
|
9447
|
+
const { variant } = React16.useContext(AlertContext);
|
|
9460
9448
|
if (variant === "inline") {
|
|
9461
9449
|
return /* @__PURE__ */ jsx21("span", { ...props });
|
|
9462
9450
|
}
|
|
@@ -9464,7 +9452,7 @@ var AlertDescription = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
9464
9452
|
"p",
|
|
9465
9453
|
{
|
|
9466
9454
|
ref,
|
|
9467
|
-
className: cn(
|
|
9455
|
+
className: cn(className),
|
|
9468
9456
|
...props
|
|
9469
9457
|
}
|
|
9470
9458
|
);
|
|
@@ -9472,7 +9460,6 @@ var AlertDescription = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
9472
9460
|
AlertDescription.displayName = "AlertDescription";
|
|
9473
9461
|
|
|
9474
9462
|
// src/components/DataTable/components/DataTableErrorBoundary.tsx
|
|
9475
|
-
init_logger();
|
|
9476
9463
|
import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
9477
9464
|
var DataTableErrorBoundary = class extends Component {
|
|
9478
9465
|
constructor(props) {
|
|
@@ -9592,8 +9579,7 @@ var DataTableErrorBoundary = class extends Component {
|
|
|
9592
9579
|
};
|
|
9593
9580
|
|
|
9594
9581
|
// src/components/DataTable/hooks/useColumnOrderPersistence.ts
|
|
9595
|
-
|
|
9596
|
-
import { useState as useState5, useEffect as useEffect7, useCallback as useCallback4 } from "react";
|
|
9582
|
+
import { useState as useState5, useEffect as useEffect6, useCallback as useCallback3 } from "react";
|
|
9597
9583
|
function useColumnOrderPersistence({
|
|
9598
9584
|
tableId,
|
|
9599
9585
|
defaultOrder = [],
|
|
@@ -9604,7 +9590,7 @@ function useColumnOrderPersistence({
|
|
|
9604
9590
|
const [columnOrder, setColumnOrder] = useState5(defaultOrder);
|
|
9605
9591
|
const [isLoaded, setIsLoaded] = useState5(false);
|
|
9606
9592
|
const finalStorageKey = storageKey ? `${storageKey}-column-order` : tableId ? `datatable-column-order-${tableId}` : "datatable-column-order";
|
|
9607
|
-
|
|
9593
|
+
useEffect6(() => {
|
|
9608
9594
|
if (!enablePersistence || typeof window === "undefined") {
|
|
9609
9595
|
setIsLoaded(true);
|
|
9610
9596
|
return;
|
|
@@ -9627,7 +9613,7 @@ function useColumnOrderPersistence({
|
|
|
9627
9613
|
setIsLoaded(true);
|
|
9628
9614
|
}
|
|
9629
9615
|
}, [enablePersistence, finalStorageKey, storageKey, tableId]);
|
|
9630
|
-
const saveColumnOrder =
|
|
9616
|
+
const saveColumnOrder = useCallback3((newOrder) => {
|
|
9631
9617
|
if (!enablePersistence || typeof window === "undefined") return;
|
|
9632
9618
|
if (!storageKey && !tableId) return;
|
|
9633
9619
|
try {
|
|
@@ -9636,11 +9622,11 @@ function useColumnOrderPersistence({
|
|
|
9636
9622
|
logger.warn("Failed to save column order to localStorage:", error);
|
|
9637
9623
|
}
|
|
9638
9624
|
}, [enablePersistence, finalStorageKey, storageKey, tableId]);
|
|
9639
|
-
const updateColumnOrder =
|
|
9625
|
+
const updateColumnOrder = useCallback3((newOrder) => {
|
|
9640
9626
|
setColumnOrder(newOrder);
|
|
9641
9627
|
saveColumnOrder(newOrder);
|
|
9642
9628
|
}, [saveColumnOrder]);
|
|
9643
|
-
const resetColumnOrder =
|
|
9629
|
+
const resetColumnOrder = useCallback3(() => {
|
|
9644
9630
|
setColumnOrder(defaultOrder);
|
|
9645
9631
|
if (enablePersistence && (storageKey || tableId) && typeof window !== "undefined") {
|
|
9646
9632
|
try {
|
|
@@ -9650,7 +9636,7 @@ function useColumnOrderPersistence({
|
|
|
9650
9636
|
}
|
|
9651
9637
|
}
|
|
9652
9638
|
}, [defaultOrder, enablePersistence, finalStorageKey, storageKey, tableId]);
|
|
9653
|
-
const clearAllPreferences =
|
|
9639
|
+
const clearAllPreferences = useCallback3(() => {
|
|
9654
9640
|
if (!enablePersistence || typeof window === "undefined") return;
|
|
9655
9641
|
try {
|
|
9656
9642
|
const keys = Object.keys(localStorage);
|
|
@@ -9673,8 +9659,7 @@ function useColumnOrderPersistence({
|
|
|
9673
9659
|
}
|
|
9674
9660
|
|
|
9675
9661
|
// src/components/DataTable/hooks/useColumnVisibilityPersistence.ts
|
|
9676
|
-
|
|
9677
|
-
import { useState as useState6, useEffect as useEffect8, useCallback as useCallback5 } from "react";
|
|
9662
|
+
import { useState as useState6, useEffect as useEffect7, useCallback as useCallback4 } from "react";
|
|
9678
9663
|
function useColumnVisibilityPersistence({
|
|
9679
9664
|
tableId,
|
|
9680
9665
|
defaultVisibility = {},
|
|
@@ -9685,7 +9670,7 @@ function useColumnVisibilityPersistence({
|
|
|
9685
9670
|
const [columnVisibility, setColumnVisibility] = useState6(defaultVisibility);
|
|
9686
9671
|
const [isLoaded, setIsLoaded] = useState6(false);
|
|
9687
9672
|
const finalStorageKey = storageKey ? `${storageKey}-column-visibility` : tableId ? `datatable-column-visibility-${tableId}` : "datatable-column-visibility";
|
|
9688
|
-
|
|
9673
|
+
useEffect7(() => {
|
|
9689
9674
|
if (!enablePersistence || typeof window === "undefined") {
|
|
9690
9675
|
setIsLoaded(true);
|
|
9691
9676
|
return;
|
|
@@ -9704,7 +9689,7 @@ function useColumnVisibilityPersistence({
|
|
|
9704
9689
|
setIsLoaded(true);
|
|
9705
9690
|
}
|
|
9706
9691
|
}, [enablePersistence, finalStorageKey]);
|
|
9707
|
-
const saveColumnVisibility =
|
|
9692
|
+
const saveColumnVisibility = useCallback4((newVisibility) => {
|
|
9708
9693
|
if (!enablePersistence || typeof window === "undefined") return;
|
|
9709
9694
|
try {
|
|
9710
9695
|
localStorage.setItem(finalStorageKey, JSON.stringify(newVisibility));
|
|
@@ -9712,11 +9697,11 @@ function useColumnVisibilityPersistence({
|
|
|
9712
9697
|
logger.warn("Failed to save column visibility to localStorage:", error);
|
|
9713
9698
|
}
|
|
9714
9699
|
}, [enablePersistence, finalStorageKey]);
|
|
9715
|
-
const updateColumnVisibility =
|
|
9700
|
+
const updateColumnVisibility = useCallback4((newVisibility) => {
|
|
9716
9701
|
setColumnVisibility(newVisibility);
|
|
9717
9702
|
saveColumnVisibility(newVisibility);
|
|
9718
9703
|
}, [saveColumnVisibility]);
|
|
9719
|
-
const resetColumnVisibility =
|
|
9704
|
+
const resetColumnVisibility = useCallback4(() => {
|
|
9720
9705
|
setColumnVisibility(defaultVisibility);
|
|
9721
9706
|
if (enablePersistence && typeof window !== "undefined") {
|
|
9722
9707
|
try {
|
|
@@ -9726,7 +9711,7 @@ function useColumnVisibilityPersistence({
|
|
|
9726
9711
|
}
|
|
9727
9712
|
}
|
|
9728
9713
|
}, [defaultVisibility, enablePersistence, finalStorageKey]);
|
|
9729
|
-
const clearAllPreferences =
|
|
9714
|
+
const clearAllPreferences = useCallback4(() => {
|
|
9730
9715
|
if (!enablePersistence || typeof window === "undefined") return;
|
|
9731
9716
|
try {
|
|
9732
9717
|
const keys = Object.keys(localStorage);
|
|
@@ -9749,7 +9734,7 @@ function useColumnVisibilityPersistence({
|
|
|
9749
9734
|
}
|
|
9750
9735
|
|
|
9751
9736
|
// src/components/DataTable/hooks/useDataTableState.ts
|
|
9752
|
-
import { useReducer, useCallback as
|
|
9737
|
+
import { useReducer, useCallback as useCallback5, useMemo as useMemo6 } from "react";
|
|
9753
9738
|
function dataTableReducer(state, action) {
|
|
9754
9739
|
switch (action.type) {
|
|
9755
9740
|
case "SET_SORTING":
|
|
@@ -9885,7 +9870,7 @@ function useDataTableState({
|
|
|
9885
9870
|
hasFilters: state.columnFilters.length > 0 || state.searchQuery !== "",
|
|
9886
9871
|
canClearFilters: state.columnFilters.length > 0 || state.searchQuery !== ""
|
|
9887
9872
|
}), [state]);
|
|
9888
|
-
const clearFilters =
|
|
9873
|
+
const clearFilters = useCallback5(() => {
|
|
9889
9874
|
dispatch({ type: "SET_COLUMN_FILTERS", payload: [] });
|
|
9890
9875
|
dispatch({ type: "SET_SEARCH_QUERY", payload: "" });
|
|
9891
9876
|
}, []);
|
|
@@ -9901,7 +9886,7 @@ function useDataTableState({
|
|
|
9901
9886
|
import { useMemo as useMemo8 } from "react";
|
|
9902
9887
|
|
|
9903
9888
|
// src/components/DataTable/hooks/useHierarchicalState.ts
|
|
9904
|
-
import { useState as useState7, useCallback as
|
|
9889
|
+
import { useState as useState7, useCallback as useCallback6, useMemo as useMemo7, useEffect as useEffect8 } from "react";
|
|
9905
9890
|
function useHierarchicalState(data, config) {
|
|
9906
9891
|
const initialExpandedState = useMemo7(() => {
|
|
9907
9892
|
if (!config?.defaultExpanded) {
|
|
@@ -9918,7 +9903,7 @@ function useHierarchicalState(data, config) {
|
|
|
9918
9903
|
const [expandedRows, setExpandedRows] = useState7(initialExpandedState);
|
|
9919
9904
|
const [prevDataLength, setPrevDataLength] = useState7(data.length);
|
|
9920
9905
|
const [prevDefaultExpanded, setPrevDefaultExpanded] = useState7(config?.defaultExpanded);
|
|
9921
|
-
|
|
9906
|
+
useEffect8(() => {
|
|
9922
9907
|
const dataLengthChanged = data.length !== prevDataLength;
|
|
9923
9908
|
const configChanged = config?.defaultExpanded !== prevDefaultExpanded;
|
|
9924
9909
|
if (configChanged || dataLengthChanged) {
|
|
@@ -9963,7 +9948,7 @@ function useHierarchicalState(data, config) {
|
|
|
9963
9948
|
}
|
|
9964
9949
|
return visible;
|
|
9965
9950
|
}, [data, expandedRows, parentChildMap]);
|
|
9966
|
-
const toggleRow =
|
|
9951
|
+
const toggleRow = useCallback6((rowId) => {
|
|
9967
9952
|
setExpandedRows((prev) => {
|
|
9968
9953
|
const newSet = new Set(prev);
|
|
9969
9954
|
if (newSet.has(rowId)) {
|
|
@@ -9977,32 +9962,32 @@ function useHierarchicalState(data, config) {
|
|
|
9977
9962
|
return newSet;
|
|
9978
9963
|
});
|
|
9979
9964
|
}, [config]);
|
|
9980
|
-
const expandAll =
|
|
9965
|
+
const expandAll = useCallback6(() => {
|
|
9981
9966
|
const parentIds = data.filter((row) => row.isParent).map((row) => row.id);
|
|
9982
9967
|
setExpandedRows(new Set(parentIds));
|
|
9983
9968
|
if (config?.onExpandedChange) {
|
|
9984
9969
|
config.onExpandedChange(parentIds);
|
|
9985
9970
|
}
|
|
9986
9971
|
}, [data, config]);
|
|
9987
|
-
const collapseAll =
|
|
9972
|
+
const collapseAll = useCallback6(() => {
|
|
9988
9973
|
setExpandedRows(/* @__PURE__ */ new Set());
|
|
9989
9974
|
if (config?.onExpandedChange) {
|
|
9990
9975
|
config.onExpandedChange([]);
|
|
9991
9976
|
}
|
|
9992
9977
|
}, [config]);
|
|
9993
|
-
const isExpanded =
|
|
9978
|
+
const isExpanded = useCallback6((rowId) => {
|
|
9994
9979
|
return expandedRows.has(rowId);
|
|
9995
9980
|
}, [expandedRows]);
|
|
9996
|
-
const hasChildren =
|
|
9981
|
+
const hasChildren = useCallback6((rowId) => {
|
|
9997
9982
|
return parentChildMap.has(rowId) && (parentChildMap.get(rowId)?.length || 0) > 0;
|
|
9998
9983
|
}, [parentChildMap]);
|
|
9999
|
-
const getChildrenCount =
|
|
9984
|
+
const getChildrenCount = useCallback6((rowId) => {
|
|
10000
9985
|
return parentChildMap.get(rowId)?.length || 0;
|
|
10001
9986
|
}, [parentChildMap]);
|
|
10002
|
-
const getExpandedIds =
|
|
9987
|
+
const getExpandedIds = useCallback6(() => {
|
|
10003
9988
|
return Array.from(expandedRows);
|
|
10004
9989
|
}, [expandedRows]);
|
|
10005
|
-
const setExpandedIds =
|
|
9990
|
+
const setExpandedIds = useCallback6((ids) => {
|
|
10006
9991
|
setExpandedRows(new Set(ids));
|
|
10007
9992
|
}, []);
|
|
10008
9993
|
return {
|
|
@@ -10183,7 +10168,7 @@ function useDataTableDataPipeline({
|
|
|
10183
10168
|
}
|
|
10184
10169
|
|
|
10185
10170
|
// src/components/DataTable/hooks/useServerSideDataEffect.ts
|
|
10186
|
-
import { useCallback as
|
|
10171
|
+
import { useCallback as useCallback7, useEffect as useEffect9 } from "react";
|
|
10187
10172
|
function useServerSideDataEffect({
|
|
10188
10173
|
finalPaginationMode,
|
|
10189
10174
|
serverSide,
|
|
@@ -10196,7 +10181,7 @@ function useServerSideDataEffect({
|
|
|
10196
10181
|
fetchServerData,
|
|
10197
10182
|
cleanup
|
|
10198
10183
|
}) {
|
|
10199
|
-
const handleServerSideChange =
|
|
10184
|
+
const handleServerSideChange = useCallback7(async () => {
|
|
10200
10185
|
if (finalPaginationMode !== "server" || !serverSide) {
|
|
10201
10186
|
return;
|
|
10202
10187
|
}
|
|
@@ -10220,7 +10205,7 @@ function useServerSideDataEffect({
|
|
|
10220
10205
|
grouping,
|
|
10221
10206
|
fetchServerData
|
|
10222
10207
|
]);
|
|
10223
|
-
|
|
10208
|
+
useEffect9(() => {
|
|
10224
10209
|
if (finalPaginationMode !== "server" || !serverSide) {
|
|
10225
10210
|
return;
|
|
10226
10211
|
}
|
|
@@ -10234,7 +10219,7 @@ function useServerSideDataEffect({
|
|
|
10234
10219
|
tableDataLength,
|
|
10235
10220
|
handleServerSideChange
|
|
10236
10221
|
]);
|
|
10237
|
-
|
|
10222
|
+
useEffect9(() => () => {
|
|
10238
10223
|
cleanup?.();
|
|
10239
10224
|
}, [cleanup]);
|
|
10240
10225
|
return handleServerSideChange;
|
|
@@ -10263,7 +10248,7 @@ function useEffectiveColumnOrder({
|
|
|
10263
10248
|
}
|
|
10264
10249
|
|
|
10265
10250
|
// src/components/DataTable/hooks/useTableHandlers.ts
|
|
10266
|
-
import { useCallback as
|
|
10251
|
+
import { useCallback as useCallback8, useMemo as useMemo10 } from "react";
|
|
10267
10252
|
function useTableHandlers({
|
|
10268
10253
|
state,
|
|
10269
10254
|
stateSnapshot,
|
|
@@ -10277,15 +10262,15 @@ function useTableHandlers({
|
|
|
10277
10262
|
updateColumnOrder,
|
|
10278
10263
|
onLayoutChange
|
|
10279
10264
|
}) {
|
|
10280
|
-
const handleSortingChange =
|
|
10265
|
+
const handleSortingChange = useCallback8((updaterOrValue) => {
|
|
10281
10266
|
const nextValue = typeof updaterOrValue === "function" ? updaterOrValue(stateSnapshot.sorting) : updaterOrValue;
|
|
10282
10267
|
actions.setSorting(nextValue);
|
|
10283
10268
|
}, [actions, stateSnapshot.sorting]);
|
|
10284
|
-
const handleColumnFiltersChange =
|
|
10269
|
+
const handleColumnFiltersChange = useCallback8((updaterOrValue) => {
|
|
10285
10270
|
const nextValue = typeof updaterOrValue === "function" ? updaterOrValue(stateSnapshot.columnFilters) : updaterOrValue;
|
|
10286
10271
|
actions.setColumnFilters(nextValue);
|
|
10287
10272
|
}, [actions, stateSnapshot.columnFilters]);
|
|
10288
|
-
const handleColumnVisibilityChange =
|
|
10273
|
+
const handleColumnVisibilityChange = useCallback8((updaterOrValue) => {
|
|
10289
10274
|
const nextValue = typeof updaterOrValue === "function" ? updaterOrValue(stateSnapshot.columnVisibility) : updaterOrValue;
|
|
10290
10275
|
actions.setColumnVisibility(nextValue);
|
|
10291
10276
|
if (canPersistVisibility) {
|
|
@@ -10296,7 +10281,7 @@ function useTableHandlers({
|
|
|
10296
10281
|
columnVisibility: nextValue
|
|
10297
10282
|
});
|
|
10298
10283
|
}, [actions, stateSnapshot.columnVisibility, canPersistVisibility, updateSavedColumnVisibility, onLayoutChange, effectiveColumnOrder]);
|
|
10299
|
-
const handleRowSelectionChange =
|
|
10284
|
+
const handleRowSelectionChange = useCallback8((updaterOrValue) => {
|
|
10300
10285
|
const currentSelection = selection ?? state.rowSelection;
|
|
10301
10286
|
const nextSelection = typeof updaterOrValue === "function" ? updaterOrValue(currentSelection) : updaterOrValue;
|
|
10302
10287
|
if (selection === void 0) {
|
|
@@ -10306,19 +10291,19 @@ function useTableHandlers({
|
|
|
10306
10291
|
}
|
|
10307
10292
|
onRowSelectionChange?.(nextSelection);
|
|
10308
10293
|
}, [actions, selection, state.rowSelection, onRowSelectionChange]);
|
|
10309
|
-
const handleGroupingChange =
|
|
10294
|
+
const handleGroupingChange = useCallback8((updaterOrValue) => {
|
|
10310
10295
|
const nextValue = typeof updaterOrValue === "function" ? updaterOrValue(stateSnapshot.grouping) : updaterOrValue;
|
|
10311
10296
|
actions.setGrouping(nextValue);
|
|
10312
10297
|
}, [actions, stateSnapshot.grouping]);
|
|
10313
|
-
const handleExpandedChange =
|
|
10298
|
+
const handleExpandedChange = useCallback8((updaterOrValue) => {
|
|
10314
10299
|
const nextValue = typeof updaterOrValue === "function" ? updaterOrValue(stateSnapshot.expanded) : updaterOrValue;
|
|
10315
10300
|
actions.setExpanded(nextValue);
|
|
10316
10301
|
}, [actions, stateSnapshot.expanded]);
|
|
10317
|
-
const handlePaginationChange =
|
|
10302
|
+
const handlePaginationChange = useCallback8((updaterOrValue) => {
|
|
10318
10303
|
const nextValue = typeof updaterOrValue === "function" ? updaterOrValue(stateSnapshot.pagination) : updaterOrValue;
|
|
10319
10304
|
actions.setPagination(nextValue);
|
|
10320
10305
|
}, [actions, stateSnapshot.pagination]);
|
|
10321
|
-
const handleColumnOrderChange =
|
|
10306
|
+
const handleColumnOrderChange = useCallback8((updaterOrValue) => {
|
|
10322
10307
|
const nextValue = typeof updaterOrValue === "function" ? updaterOrValue(stateSnapshot.columnOrder) : updaterOrValue;
|
|
10323
10308
|
const normalizedOrder = nextValue.includes("select") ? ["select", ...nextValue.filter((id) => id !== "select")] : nextValue;
|
|
10324
10309
|
actions.setColumnOrder(normalizedOrder);
|
|
@@ -10434,7 +10419,8 @@ function useDataTableConfiguration({
|
|
|
10434
10419
|
}
|
|
10435
10420
|
|
|
10436
10421
|
// src/components/Card/Card.tsx
|
|
10437
|
-
import * as
|
|
10422
|
+
import * as React18 from "react";
|
|
10423
|
+
import { useNavigate } from "react-router-dom";
|
|
10438
10424
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
10439
10425
|
function getCardClasses(variant = "default", size = "default") {
|
|
10440
10426
|
const baseClasses = "rounded-lg border bg-card text-card-foreground shadow-sm";
|
|
@@ -10450,20 +10436,44 @@ function getCardClasses(variant = "default", size = "default") {
|
|
|
10450
10436
|
};
|
|
10451
10437
|
return `${baseClasses} ${variantClasses[variant]} ${sizeClasses2[size]}`;
|
|
10452
10438
|
}
|
|
10453
|
-
var Card =
|
|
10454
|
-
|
|
10455
|
-
{
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
"
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10439
|
+
var Card = React18.forwardRef(({ className, variant, size, isLink, link, onClick, ...props }, ref) => {
|
|
10440
|
+
const navigate = useNavigate();
|
|
10441
|
+
const handleClick = (e) => {
|
|
10442
|
+
onClick?.(e);
|
|
10443
|
+
if (link && !e.defaultPrevented) {
|
|
10444
|
+
if (link.startsWith("http://") || link.startsWith("https://")) {
|
|
10445
|
+
window.location.href = link;
|
|
10446
|
+
} else {
|
|
10447
|
+
navigate(link);
|
|
10448
|
+
}
|
|
10449
|
+
}
|
|
10450
|
+
};
|
|
10451
|
+
const shouldShowLinkStyles = isLink || !!link;
|
|
10452
|
+
return /* @__PURE__ */ jsx23(
|
|
10453
|
+
"article",
|
|
10454
|
+
{
|
|
10455
|
+
ref,
|
|
10456
|
+
className: cn(
|
|
10457
|
+
"grid grid-rows-[auto_1fr_auto] min-w-0 overflow-visible",
|
|
10458
|
+
getCardClasses(variant, size),
|
|
10459
|
+
shouldShowLinkStyles && "cursor-pointer hover:bg-acc-200 hover:shadow-xl/30",
|
|
10460
|
+
className
|
|
10461
|
+
),
|
|
10462
|
+
onClick: link ? handleClick : onClick,
|
|
10463
|
+
role: link ? "link" : void 0,
|
|
10464
|
+
tabIndex: link ? 0 : void 0,
|
|
10465
|
+
onKeyDown: link ? (e) => {
|
|
10466
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
10467
|
+
e.preventDefault();
|
|
10468
|
+
handleClick(e);
|
|
10469
|
+
}
|
|
10470
|
+
} : void 0,
|
|
10471
|
+
...props
|
|
10472
|
+
}
|
|
10473
|
+
);
|
|
10474
|
+
});
|
|
10465
10475
|
Card.displayName = "Card";
|
|
10466
|
-
var CardHeader =
|
|
10476
|
+
var CardHeader = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10467
10477
|
"header",
|
|
10468
10478
|
{
|
|
10469
10479
|
ref,
|
|
@@ -10472,7 +10482,7 @@ var CardHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
10472
10482
|
}
|
|
10473
10483
|
));
|
|
10474
10484
|
CardHeader.displayName = "CardHeader";
|
|
10475
|
-
var CardTitle =
|
|
10485
|
+
var CardTitle = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10476
10486
|
"h3",
|
|
10477
10487
|
{
|
|
10478
10488
|
ref,
|
|
@@ -10484,7 +10494,7 @@ var CardTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
10484
10494
|
}
|
|
10485
10495
|
));
|
|
10486
10496
|
CardTitle.displayName = "CardTitle";
|
|
10487
|
-
var CardDescription =
|
|
10497
|
+
var CardDescription = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10488
10498
|
"p",
|
|
10489
10499
|
{
|
|
10490
10500
|
ref,
|
|
@@ -10493,7 +10503,7 @@ var CardDescription = React19.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
10493
10503
|
}
|
|
10494
10504
|
));
|
|
10495
10505
|
CardDescription.displayName = "CardDescription";
|
|
10496
|
-
var CardContent =
|
|
10506
|
+
var CardContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10497
10507
|
"main",
|
|
10498
10508
|
{
|
|
10499
10509
|
ref,
|
|
@@ -10502,7 +10512,7 @@ var CardContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
10502
10512
|
}
|
|
10503
10513
|
));
|
|
10504
10514
|
CardContent.displayName = "CardContent";
|
|
10505
|
-
var CardFooter =
|
|
10515
|
+
var CardFooter = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10506
10516
|
"footer",
|
|
10507
10517
|
{
|
|
10508
10518
|
ref,
|
|
@@ -10511,7 +10521,7 @@ var CardFooter = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
10511
10521
|
}
|
|
10512
10522
|
));
|
|
10513
10523
|
CardFooter.displayName = "CardFooter";
|
|
10514
|
-
var CardActions =
|
|
10524
|
+
var CardActions = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10515
10525
|
"nav",
|
|
10516
10526
|
{
|
|
10517
10527
|
ref,
|
|
@@ -10522,7 +10532,7 @@ var CardActions = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
10522
10532
|
}
|
|
10523
10533
|
));
|
|
10524
10534
|
CardActions.displayName = "CardActions";
|
|
10525
|
-
var HoverCard =
|
|
10535
|
+
var HoverCard = React18.forwardRef(({ children, className, ...props }, ref) => {
|
|
10526
10536
|
return /* @__PURE__ */ jsx23(
|
|
10527
10537
|
"section",
|
|
10528
10538
|
{
|
|
@@ -10534,7 +10544,7 @@ var HoverCard = React19.forwardRef(({ children, className, ...props }, ref) => {
|
|
|
10534
10544
|
);
|
|
10535
10545
|
});
|
|
10536
10546
|
HoverCard.displayName = "HoverCard";
|
|
10537
|
-
var HoverCardTrigger =
|
|
10547
|
+
var HoverCardTrigger = React18.forwardRef(({ className, asChild, children, ...props }, ref) => {
|
|
10538
10548
|
if (asChild) {
|
|
10539
10549
|
return /* @__PURE__ */ jsx23("span", { className: cn("cursor-pointer", className), children });
|
|
10540
10550
|
}
|
|
@@ -10553,7 +10563,7 @@ var HoverCardTrigger = React19.forwardRef(({ className, asChild, children, ...pr
|
|
|
10553
10563
|
);
|
|
10554
10564
|
});
|
|
10555
10565
|
HoverCardTrigger.displayName = "HoverCardTrigger";
|
|
10556
|
-
var HoverCardContent =
|
|
10566
|
+
var HoverCardContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
10557
10567
|
"aside",
|
|
10558
10568
|
{
|
|
10559
10569
|
ref,
|
|
@@ -10641,7 +10651,6 @@ function AccessDeniedPage({
|
|
|
10641
10651
|
}
|
|
10642
10652
|
|
|
10643
10653
|
// src/components/DataTable/utils/exportUtils.ts
|
|
10644
|
-
init_logger();
|
|
10645
10654
|
function escapeCSVValue(value, sanitizeForSecurity = true) {
|
|
10646
10655
|
if (value === null || value === void 0) {
|
|
10647
10656
|
return sanitizeForSecurity ? '""' : "";
|
|
@@ -10815,13 +10824,8 @@ function exportToCSV(data, columns, filename = "download.csv", options = {}) {
|
|
|
10815
10824
|
});
|
|
10816
10825
|
}
|
|
10817
10826
|
|
|
10818
|
-
// src/components/DataTable/components/DataTableCore.tsx
|
|
10819
|
-
init_UnifiedAuthProvider();
|
|
10820
|
-
|
|
10821
10827
|
// src/components/DataTable/hooks/useDataTablePermissions.ts
|
|
10822
|
-
|
|
10823
|
-
import { useMemo as useMemo12, useRef as useRef5 } from "react";
|
|
10824
|
-
init_logger();
|
|
10828
|
+
import { useMemo as useMemo12, useRef as useRef4 } from "react";
|
|
10825
10829
|
|
|
10826
10830
|
// src/components/DataTable/types.ts
|
|
10827
10831
|
var defaultDataTableFeatures = {
|
|
@@ -10865,9 +10869,9 @@ function useDataTablePermissions(rbac, features = {}) {
|
|
|
10865
10869
|
selectedOrganisationId: selectedOrganisation?.id || null,
|
|
10866
10870
|
selectedEventId: selectedEvent?.event_id || null
|
|
10867
10871
|
});
|
|
10868
|
-
const stableScopeRef =
|
|
10869
|
-
organisationId:
|
|
10870
|
-
appId:
|
|
10872
|
+
const stableScopeRef = useRef4({
|
|
10873
|
+
organisationId: void 0,
|
|
10874
|
+
appId: void 0,
|
|
10871
10875
|
eventId: void 0
|
|
10872
10876
|
});
|
|
10873
10877
|
if (rawResolvedScope && rawResolvedScope.organisationId) {
|
|
@@ -10879,12 +10883,12 @@ function useDataTablePermissions(rbac, features = {}) {
|
|
|
10879
10883
|
if (stableScopeRef.current.organisationId !== newScope.organisationId || stableScopeRef.current.eventId !== newScope.eventId || stableScopeRef.current.appId !== newScope.appId) {
|
|
10880
10884
|
stableScopeRef.current = {
|
|
10881
10885
|
organisationId: newScope.organisationId,
|
|
10882
|
-
appId: newScope.appId
|
|
10886
|
+
appId: newScope.appId,
|
|
10883
10887
|
eventId: newScope.eventId
|
|
10884
10888
|
};
|
|
10885
10889
|
}
|
|
10886
10890
|
} else if (!rawResolvedScope) {
|
|
10887
|
-
stableScopeRef.current = { organisationId:
|
|
10891
|
+
stableScopeRef.current = { organisationId: void 0, appId: void 0, eventId: void 0 };
|
|
10888
10892
|
}
|
|
10889
10893
|
const stableScope = stableScopeRef.current;
|
|
10890
10894
|
const effectiveScope = !scopeLoading && stableScope.organisationId ? stableScope : null;
|
|
@@ -10893,7 +10897,7 @@ function useDataTablePermissions(rbac, features = {}) {
|
|
|
10893
10897
|
const createPermission = `create:page.${effectivePageId}`;
|
|
10894
10898
|
const updatePermission = `update:page.${effectivePageId}`;
|
|
10895
10899
|
const deletePermission = `delete:page.${effectivePageId}`;
|
|
10896
|
-
const consistentScope = effectiveScope || { organisationId:
|
|
10900
|
+
const consistentScope = effectiveScope || { organisationId: void 0, eventId: void 0, appId: void 0 };
|
|
10897
10901
|
const permissions = {
|
|
10898
10902
|
canRead: useCan(userId, consistentScope, readPermission, effectivePageId, true),
|
|
10899
10903
|
canCreate: useCan(userId, consistentScope, createPermission, effectivePageId, true),
|
|
@@ -10925,7 +10929,7 @@ function useDataTablePermissions(rbac, features = {}) {
|
|
|
10925
10929
|
}
|
|
10926
10930
|
|
|
10927
10931
|
// src/components/DataTable/hooks/useTableColumns.ts
|
|
10928
|
-
import
|
|
10932
|
+
import React19, { useMemo as useMemo13 } from "react";
|
|
10929
10933
|
|
|
10930
10934
|
// src/components/DataTable/core/ColumnFactory.ts
|
|
10931
10935
|
var ColumnFactory = class {
|
|
@@ -10992,7 +10996,7 @@ var ColumnFactory = class {
|
|
|
10992
10996
|
cell: ({ getValue }) => {
|
|
10993
10997
|
const value = getValue();
|
|
10994
10998
|
if (!value) return "";
|
|
10995
|
-
const date = new Date(value);
|
|
10999
|
+
const date = new Date(String(value));
|
|
10996
11000
|
if (isNaN(date.getTime())) return String(value);
|
|
10997
11001
|
if (options.format) {
|
|
10998
11002
|
return options.format(date);
|
|
@@ -11131,14 +11135,14 @@ function useTableColumns({
|
|
|
11131
11135
|
header: ({ table }) => {
|
|
11132
11136
|
const isAllSelected = table.getIsAllPageRowsSelected();
|
|
11133
11137
|
const isSomeSelected = table.getIsSomePageRowsSelected();
|
|
11134
|
-
return
|
|
11138
|
+
return React19.createElement(Checkbox, {
|
|
11135
11139
|
checked: isAllSelected ? true : isSomeSelected ? "indeterminate" : false,
|
|
11136
11140
|
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value),
|
|
11137
11141
|
"aria-label": "Select all"
|
|
11138
11142
|
});
|
|
11139
11143
|
},
|
|
11140
11144
|
cell: ({ row }) => {
|
|
11141
|
-
return
|
|
11145
|
+
return React19.createElement(Checkbox, {
|
|
11142
11146
|
checked: row.getIsSelected(),
|
|
11143
11147
|
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
11144
11148
|
"aria-label": "Select row"
|
|
@@ -11327,7 +11331,7 @@ function getRowDescription(rowIndex, totalRows, isSelected = false, isEditing =
|
|
|
11327
11331
|
}
|
|
11328
11332
|
|
|
11329
11333
|
// src/components/DataTable/hooks/useKeyboardNavigation.ts
|
|
11330
|
-
import { useCallback as
|
|
11334
|
+
import { useCallback as useCallback9, useEffect as useEffect10, useRef as useRef5, useState as useState8 } from "react";
|
|
11331
11335
|
function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
11332
11336
|
const {
|
|
11333
11337
|
enabled = true,
|
|
@@ -11342,11 +11346,11 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11342
11346
|
focusedColumnIndex: 0,
|
|
11343
11347
|
isNavigating: false
|
|
11344
11348
|
});
|
|
11345
|
-
const internalTableRef =
|
|
11349
|
+
const internalTableRef = useRef5(null);
|
|
11346
11350
|
const tableRef = externalTableRef || internalTableRef;
|
|
11347
|
-
const storedFocusRef =
|
|
11348
|
-
const navigationTimeoutRef =
|
|
11349
|
-
const getCellElement =
|
|
11351
|
+
const storedFocusRef = useRef5(null);
|
|
11352
|
+
const navigationTimeoutRef = useRef5();
|
|
11353
|
+
const getCellElement = useCallback9((rowIndex, columnIndex) => {
|
|
11350
11354
|
if (!tableRef.current) return null;
|
|
11351
11355
|
const tbody = tableRef.current.querySelector("tbody");
|
|
11352
11356
|
if (!tbody) return null;
|
|
@@ -11356,7 +11360,7 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11356
11360
|
const cells = row.querySelectorAll('td[role="cell"], th[role="columnheader"]');
|
|
11357
11361
|
return cells[columnIndex] || null;
|
|
11358
11362
|
}, []);
|
|
11359
|
-
const getHeaderElement =
|
|
11363
|
+
const getHeaderElement = useCallback9((columnIndex) => {
|
|
11360
11364
|
if (!tableRef.current) return null;
|
|
11361
11365
|
const thead = tableRef.current.querySelector("thead");
|
|
11362
11366
|
if (!thead) return null;
|
|
@@ -11365,7 +11369,7 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11365
11369
|
const headers = headerRow.querySelectorAll('th[role="columnheader"]');
|
|
11366
11370
|
return headers[columnIndex] || null;
|
|
11367
11371
|
}, []);
|
|
11368
|
-
const focusCell =
|
|
11372
|
+
const focusCell = useCallback9((rowIndex, columnIndex) => {
|
|
11369
11373
|
if (!enabled) return;
|
|
11370
11374
|
const clampedRowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));
|
|
11371
11375
|
const clampedColumnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));
|
|
@@ -11384,7 +11388,7 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11384
11388
|
announce(`Row ${clampedRowIndex + 1}, Column ${clampedColumnIndex + 1}`);
|
|
11385
11389
|
}
|
|
11386
11390
|
}, [enabled, rowCount, columnCount, getCellElement, onFocusChange, announceNavigation]);
|
|
11387
|
-
const focusNext =
|
|
11391
|
+
const focusNext = useCallback9(() => {
|
|
11388
11392
|
const { focusedRowIndex, focusedColumnIndex } = state;
|
|
11389
11393
|
if (focusedColumnIndex < columnCount - 1) {
|
|
11390
11394
|
focusCell(focusedRowIndex, focusedColumnIndex + 1);
|
|
@@ -11392,7 +11396,7 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11392
11396
|
focusCell(focusedRowIndex + 1, 0);
|
|
11393
11397
|
}
|
|
11394
11398
|
}, [state, columnCount, rowCount, focusCell]);
|
|
11395
|
-
const focusPrevious =
|
|
11399
|
+
const focusPrevious = useCallback9(() => {
|
|
11396
11400
|
const { focusedRowIndex, focusedColumnIndex } = state;
|
|
11397
11401
|
if (focusedColumnIndex > 0) {
|
|
11398
11402
|
focusCell(focusedRowIndex, focusedColumnIndex - 1);
|
|
@@ -11400,37 +11404,37 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11400
11404
|
focusCell(focusedRowIndex - 1, columnCount - 1);
|
|
11401
11405
|
}
|
|
11402
11406
|
}, [state, columnCount, focusCell]);
|
|
11403
|
-
const focusUp =
|
|
11407
|
+
const focusUp = useCallback9(() => {
|
|
11404
11408
|
const { focusedRowIndex, focusedColumnIndex } = state;
|
|
11405
11409
|
if (focusedRowIndex > 0) {
|
|
11406
11410
|
focusCell(focusedRowIndex - 1, focusedColumnIndex);
|
|
11407
11411
|
}
|
|
11408
11412
|
}, [state, focusCell]);
|
|
11409
|
-
const focusDown =
|
|
11413
|
+
const focusDown = useCallback9(() => {
|
|
11410
11414
|
const { focusedRowIndex, focusedColumnIndex } = state;
|
|
11411
11415
|
if (focusedRowIndex < rowCount - 1) {
|
|
11412
11416
|
focusCell(focusedRowIndex + 1, focusedColumnIndex);
|
|
11413
11417
|
}
|
|
11414
11418
|
}, [state, rowCount, focusCell]);
|
|
11415
|
-
const focusRowStart =
|
|
11419
|
+
const focusRowStart = useCallback9(() => {
|
|
11416
11420
|
const { focusedRowIndex } = state;
|
|
11417
11421
|
focusCell(focusedRowIndex, 0);
|
|
11418
11422
|
}, [state, focusCell]);
|
|
11419
|
-
const focusRowEnd =
|
|
11423
|
+
const focusRowEnd = useCallback9(() => {
|
|
11420
11424
|
const { focusedRowIndex } = state;
|
|
11421
11425
|
focusCell(focusedRowIndex, columnCount - 1);
|
|
11422
11426
|
}, [state, columnCount, focusCell]);
|
|
11423
|
-
const focusTableStart =
|
|
11427
|
+
const focusTableStart = useCallback9(() => {
|
|
11424
11428
|
focusCell(0, 0);
|
|
11425
11429
|
}, [focusCell]);
|
|
11426
|
-
const focusTableEnd =
|
|
11430
|
+
const focusTableEnd = useCallback9(() => {
|
|
11427
11431
|
focusCell(rowCount - 1, columnCount - 1);
|
|
11428
11432
|
}, [rowCount, columnCount, focusCell]);
|
|
11429
|
-
const getCellTabIndex =
|
|
11433
|
+
const getCellTabIndex = useCallback9((rowIndex, columnIndex) => {
|
|
11430
11434
|
if (!enabled) return -1;
|
|
11431
11435
|
return state.focusedRowIndex === rowIndex && state.focusedColumnIndex === columnIndex ? 0 : -1;
|
|
11432
11436
|
}, [enabled, state.focusedRowIndex, state.focusedColumnIndex]);
|
|
11433
|
-
const getCellKeyboardHandlers =
|
|
11437
|
+
const getCellKeyboardHandlers = useCallback9((rowIndex, columnIndex) => {
|
|
11434
11438
|
const onKeyDown = (event) => {
|
|
11435
11439
|
if (!enabled) return;
|
|
11436
11440
|
switch (event.key) {
|
|
@@ -11510,7 +11514,7 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11510
11514
|
};
|
|
11511
11515
|
return { onKeyDown, onFocus, onBlur };
|
|
11512
11516
|
}, [enabled, focusNext, focusPrevious, focusUp, focusDown, focusRowStart, focusRowEnd, focusTableStart, focusTableEnd, onFocusChange]);
|
|
11513
|
-
const getHeaderKeyboardHandlers =
|
|
11517
|
+
const getHeaderKeyboardHandlers = useCallback9((columnIndex, onSort) => {
|
|
11514
11518
|
const onKeyDown = (event) => {
|
|
11515
11519
|
if (!enabled) return;
|
|
11516
11520
|
switch (event.key) {
|
|
@@ -11568,27 +11572,27 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11568
11572
|
};
|
|
11569
11573
|
return { onKeyDown, onFocus };
|
|
11570
11574
|
}, [enabled, getHeaderElement, columnCount, supportsColumnReorder, supportsColumnResize]);
|
|
11571
|
-
const resetFocus =
|
|
11575
|
+
const resetFocus = useCallback9(() => {
|
|
11572
11576
|
setState({
|
|
11573
11577
|
focusedRowIndex: 0,
|
|
11574
11578
|
focusedColumnIndex: 0,
|
|
11575
11579
|
isNavigating: false
|
|
11576
11580
|
});
|
|
11577
11581
|
}, []);
|
|
11578
|
-
const storeFocus =
|
|
11582
|
+
const storeFocus = useCallback9(() => {
|
|
11579
11583
|
storedFocusRef.current = {
|
|
11580
11584
|
rowIndex: state.focusedRowIndex,
|
|
11581
11585
|
columnIndex: state.focusedColumnIndex
|
|
11582
11586
|
};
|
|
11583
11587
|
}, [state.focusedRowIndex, state.focusedColumnIndex]);
|
|
11584
|
-
const restoreFocus =
|
|
11588
|
+
const restoreFocus = useCallback9(() => {
|
|
11585
11589
|
if (storedFocusRef.current) {
|
|
11586
11590
|
const { rowIndex, columnIndex } = storedFocusRef.current;
|
|
11587
11591
|
focusCell(rowIndex, columnIndex);
|
|
11588
11592
|
storedFocusRef.current = null;
|
|
11589
11593
|
}
|
|
11590
11594
|
}, [focusCell]);
|
|
11591
|
-
|
|
11595
|
+
useEffect10(() => {
|
|
11592
11596
|
return () => {
|
|
11593
11597
|
if (navigationTimeoutRef.current) {
|
|
11594
11598
|
clearTimeout(navigationTimeoutRef.current);
|
|
@@ -11616,7 +11620,6 @@ function useKeyboardNavigation(rowCount, columnCount, options = {}) {
|
|
|
11616
11620
|
}
|
|
11617
11621
|
|
|
11618
11622
|
// src/components/DataTable/components/DataTableCore.tsx
|
|
11619
|
-
init_logger();
|
|
11620
11623
|
import { Fragment as Fragment8, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
11621
11624
|
var isCellValue = (value) => {
|
|
11622
11625
|
if (value === null || value === void 0) {
|
|
@@ -11685,7 +11688,7 @@ function DataTableInternal(props) {
|
|
|
11685
11688
|
storageKey,
|
|
11686
11689
|
onLayoutChange
|
|
11687
11690
|
} = props;
|
|
11688
|
-
const logger =
|
|
11691
|
+
const logger = React20.useMemo(() => createLogger("DataTableCore"), []);
|
|
11689
11692
|
const authResult = useUnifiedAuth();
|
|
11690
11693
|
const user = authResult.user;
|
|
11691
11694
|
const requestedFeatures = useMemo14(
|
|
@@ -11722,21 +11725,21 @@ function DataTableInternal(props) {
|
|
|
11722
11725
|
defaultSorting: defaultSorting || [],
|
|
11723
11726
|
defaultGrouping: defaultGrouping || []
|
|
11724
11727
|
});
|
|
11725
|
-
|
|
11728
|
+
useEffect11(() => {
|
|
11726
11729
|
if (secureFeatures.columnVisibility && isColumnVisibilityLoaded && Object.keys(initialColumnVisibility).length > 0) {
|
|
11727
11730
|
stateActions.setColumnVisibility(initialColumnVisibility);
|
|
11728
11731
|
}
|
|
11729
11732
|
}, [secureFeatures.columnVisibility, isColumnVisibilityLoaded, initialColumnVisibility, stateActions]);
|
|
11730
|
-
|
|
11733
|
+
useEffect11(() => {
|
|
11731
11734
|
initializeLiveRegion();
|
|
11732
11735
|
}, []);
|
|
11733
11736
|
const rowSelection = selection !== void 0 ? selection : state.rowSelection;
|
|
11734
|
-
const resolvedGetRowId =
|
|
11737
|
+
const resolvedGetRowId = useCallback10(
|
|
11735
11738
|
(row, index) => getRowIdSafe(row, index, getRowId),
|
|
11736
11739
|
[getRowId]
|
|
11737
11740
|
);
|
|
11738
|
-
const hasInitializedExpansion =
|
|
11739
|
-
|
|
11741
|
+
const hasInitializedExpansion = useRef6(false);
|
|
11742
|
+
useEffect11(() => {
|
|
11740
11743
|
if (!hasInitializedExpansion.current && defaultGrouping && defaultGrouping.length > 0) {
|
|
11741
11744
|
stateActions.setExpanded(true);
|
|
11742
11745
|
hasInitializedExpansion.current = true;
|
|
@@ -11787,9 +11790,9 @@ function DataTableInternal(props) {
|
|
|
11787
11790
|
// Column resizing is not currently supported
|
|
11788
11791
|
}
|
|
11789
11792
|
);
|
|
11790
|
-
const lastFocusedElementRef =
|
|
11791
|
-
const wasImportModalOpenRef =
|
|
11792
|
-
|
|
11793
|
+
const lastFocusedElementRef = useRef6(null);
|
|
11794
|
+
const wasImportModalOpenRef = useRef6(false);
|
|
11795
|
+
useEffect11(() => {
|
|
11793
11796
|
if (state.showImportModal) {
|
|
11794
11797
|
wasImportModalOpenRef.current = true;
|
|
11795
11798
|
keyboardNavigation.storeFocus();
|
|
@@ -11798,7 +11801,7 @@ function DataTableInternal(props) {
|
|
|
11798
11801
|
}
|
|
11799
11802
|
}
|
|
11800
11803
|
}, [state.showImportModal, keyboardNavigation]);
|
|
11801
|
-
|
|
11804
|
+
useEffect11(() => {
|
|
11802
11805
|
if (!state.showImportModal) {
|
|
11803
11806
|
if (!wasImportModalOpenRef.current) {
|
|
11804
11807
|
return;
|
|
@@ -11829,7 +11832,7 @@ function DataTableInternal(props) {
|
|
|
11829
11832
|
finalPaginationMode,
|
|
11830
11833
|
serverData
|
|
11831
11834
|
});
|
|
11832
|
-
|
|
11835
|
+
useEffect11(() => {
|
|
11833
11836
|
if (!hierarchicalValidation.isValid) {
|
|
11834
11837
|
logger.error("Hierarchical data validation failed:", hierarchicalValidation.errors);
|
|
11835
11838
|
}
|
|
@@ -11844,13 +11847,13 @@ function DataTableInternal(props) {
|
|
|
11844
11847
|
enablePersistence: secureFeatures.columnReordering,
|
|
11845
11848
|
storageKey
|
|
11846
11849
|
});
|
|
11847
|
-
|
|
11850
|
+
useEffect11(() => {
|
|
11848
11851
|
if (secureFeatures.columnReordering && isColumnOrderLoaded && savedColumnOrder && savedColumnOrder.length > 0) {
|
|
11849
11852
|
const normalizedOrder = secureFeatures.selection && savedColumnOrder.includes("select") ? ["select", ...savedColumnOrder.filter((id) => id !== "select")] : savedColumnOrder;
|
|
11850
11853
|
stateActions.setColumnOrder(normalizedOrder);
|
|
11851
11854
|
}
|
|
11852
11855
|
}, [secureFeatures.columnReordering, secureFeatures.selection, isColumnOrderLoaded, savedColumnOrder, stateActions]);
|
|
11853
|
-
|
|
11856
|
+
useEffect11(() => {
|
|
11854
11857
|
if (secureFeatures.selection && state.columnOrder.includes("select") && state.columnOrder[0] !== "select") {
|
|
11855
11858
|
const normalizedOrder = ["select", ...state.columnOrder.filter((id) => id !== "select")];
|
|
11856
11859
|
stateActions.setColumnOrder(normalizedOrder);
|
|
@@ -11885,7 +11888,7 @@ function DataTableInternal(props) {
|
|
|
11885
11888
|
}
|
|
11886
11889
|
return state.pagination.pageSize;
|
|
11887
11890
|
}, [state.pagination.pageSize, validatedInitialPageSize, secureFeatures.pagination, finalPageSizeOptions]);
|
|
11888
|
-
|
|
11891
|
+
useEffect11(() => {
|
|
11889
11892
|
if (secureFeatures.pagination && finalPageSizeOptions.length > 0) {
|
|
11890
11893
|
const needsFix = !finalPageSizeOptions.includes(state.pagination.pageSize);
|
|
11891
11894
|
const currentPageSize = effectivePageSize || validatedInitialPageSize;
|
|
@@ -11910,7 +11913,7 @@ function DataTableInternal(props) {
|
|
|
11910
11913
|
finalDataCount
|
|
11911
11914
|
]);
|
|
11912
11915
|
const isLoading = externalIsLoading || performanceLoading;
|
|
11913
|
-
const handleSearch =
|
|
11916
|
+
const handleSearch = useCallback10((value) => {
|
|
11914
11917
|
stateActions.setSearchQuery(value);
|
|
11915
11918
|
setSearchQuery(value);
|
|
11916
11919
|
if (secureFeatures.pagination) {
|
|
@@ -12349,7 +12352,7 @@ function DataTableInternal(props) {
|
|
|
12349
12352
|
grouping: state.grouping,
|
|
12350
12353
|
aggregates,
|
|
12351
12354
|
getRowId: resolvedGetRowId,
|
|
12352
|
-
emptyState:
|
|
12355
|
+
emptyState: React20.isValidElement(emptyState) ? void 0 : emptyState,
|
|
12353
12356
|
isFiltered: searchQuery !== "" || state.columnFilters.length > 0,
|
|
12354
12357
|
onClearFilters: () => {
|
|
12355
12358
|
stateActions.setSearchQuery("");
|
|
@@ -12440,23 +12443,22 @@ function DataTableCore(props) {
|
|
|
12440
12443
|
}
|
|
12441
12444
|
|
|
12442
12445
|
// src/components/DataTable/DataTable.tsx
|
|
12443
|
-
init_logger();
|
|
12444
12446
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
12445
12447
|
function DataTable(props) {
|
|
12446
|
-
const logger =
|
|
12448
|
+
const logger = React21.useMemo(() => createLogger("DataTable"), []);
|
|
12447
12449
|
const { features, ...rest } = props;
|
|
12448
|
-
const normalizedFeatures =
|
|
12450
|
+
const normalizedFeatures = React21.useMemo(
|
|
12449
12451
|
() => normalizeDataTableFeatures(features),
|
|
12450
12452
|
[features]
|
|
12451
12453
|
);
|
|
12452
|
-
|
|
12454
|
+
React21.useEffect(() => {
|
|
12453
12455
|
if (normalizedFeatures.deleteSelected && !normalizedFeatures.deletion) {
|
|
12454
12456
|
logger.warn("deleteSelected requires deletion to be enabled");
|
|
12455
12457
|
}
|
|
12456
12458
|
}, [normalizedFeatures.deleteSelected, normalizedFeatures.deletion, logger]);
|
|
12457
12459
|
return /* @__PURE__ */ jsx26(DataTableCore, { ...rest, features: normalizedFeatures });
|
|
12458
12460
|
}
|
|
12459
|
-
var DataTableComponent =
|
|
12461
|
+
var DataTableComponent = React21.memo(DataTable);
|
|
12460
12462
|
|
|
12461
12463
|
// src/components/DataTable/components/BulkOperationsDropdown.tsx
|
|
12462
12464
|
import {
|
|
@@ -12726,4 +12728,4 @@ lodash/lodash.js:
|
|
|
12726
12728
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
12727
12729
|
*)
|
|
12728
12730
|
*/
|
|
12729
|
-
//# sourceMappingURL=chunk-
|
|
12731
|
+
//# sourceMappingURL=chunk-QUVSNGIP.js.map
|