@jmruthers/pace-core 0.5.53 → 0.5.55
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/README.md +0 -4
- package/dist/{DataTable-7FMFXA7A.js → DataTable-4T627QFJ.js} +11 -11
- package/dist/{PublicLoadingSpinner-Bq_-BeK-.d.ts → PublicLoadingSpinner-SL8WaQN7.d.ts} +2 -21
- package/dist/{api-H5A3H4IR.js → api-LUNF5O6M.js} +3 -3
- package/dist/{appConfig-BVGyuvI7.d.ts → appConfig-DjpeG6P-.d.ts} +9 -1
- package/dist/{appNameResolver-7GHF5ED2.js → appNameResolver-UURKN7NF.js} +2 -2
- package/dist/{audit-BUW3LMJB.js → audit-6TOCAMKO.js} +2 -2
- package/dist/{chunk-MZBUOP4P.js → chunk-5BSLGBYI.js} +4 -3
- package/dist/chunk-5BSLGBYI.js.map +1 -0
- package/dist/{chunk-I5Z3QH5X.js → chunk-66C4BSAY.js} +2 -2
- package/dist/{chunk-I5Z3QH5X.js.map → chunk-66C4BSAY.js.map} +1 -1
- package/dist/{chunk-MYP2EGHX.js → chunk-AJ2KMES7.js} +21 -14
- package/dist/chunk-AJ2KMES7.js.map +1 -0
- package/dist/{chunk-EL2O4IUX.js → chunk-AQFRLC7K.js} +16 -24
- package/dist/{chunk-EL2O4IUX.js.map → chunk-AQFRLC7K.js.map} +1 -1
- package/dist/{chunk-7BNPOCLL.js → chunk-B2WTCLCV.js} +6 -2
- package/dist/chunk-B2WTCLCV.js.map +1 -0
- package/dist/{chunk-WJARTBCT.js → chunk-D7ARGIA3.js} +16 -7
- package/dist/chunk-D7ARGIA3.js.map +1 -0
- package/dist/{chunk-NRK4AIHQ.js → chunk-KBRACSJI.js} +3 -3
- package/dist/{chunk-NYUJ4FJR.js → chunk-KJDPSM64.js} +7 -7
- package/dist/chunk-KJDPSM64.js.map +1 -0
- package/dist/{chunk-GWSBHC4J.js → chunk-KLPVOPRI.js} +261 -38
- package/dist/chunk-KLPVOPRI.js.map +1 -0
- package/dist/{chunk-TRIZ7IB7.js → chunk-MPQDF75X.js} +148 -288
- package/dist/chunk-MPQDF75X.js.map +1 -0
- package/dist/{chunk-MSFACPQQ.js → chunk-PAEM3OWN.js} +11 -11
- package/dist/{chunk-MSFACPQQ.js.map → chunk-PAEM3OWN.js.map} +1 -1
- package/dist/{chunk-GIO7BFE7.js → chunk-RQD3D2CO.js} +66 -169
- package/dist/{chunk-GIO7BFE7.js.map → chunk-RQD3D2CO.js.map} +1 -1
- package/dist/{chunk-YDJW5XTN.js → chunk-STT7INZR.js} +25 -1
- package/dist/chunk-STT7INZR.js.map +1 -0
- package/dist/{chunk-6MTY77WU.js → chunk-TNMXZLDR.js} +3 -3
- package/dist/{chunk-BC3S53OZ.js → chunk-UQE2Y64H.js} +30 -14
- package/dist/chunk-UQE2Y64H.js.map +1 -0
- package/dist/{chunk-22KLBHPS.js → chunk-W66AZIOH.js} +2 -2
- package/dist/chunk-W66AZIOH.js.map +1 -0
- package/dist/{chunk-SS3E6QLB.js → chunk-YNUBMSMV.js} +2 -2
- package/dist/chunk-YNUBMSMV.js.map +1 -0
- package/dist/{chunk-NZ655MWE.js → chunk-ZOD2ZY6X.js} +5 -4
- package/dist/chunk-ZOD2ZY6X.js.map +1 -0
- package/dist/{chunk-74C6SNEC.js → chunk-ZPK5656W.js} +3 -3
- package/dist/{chunk-74C6SNEC.js.map → chunk-ZPK5656W.js.map} +1 -1
- package/dist/components.d.ts +22 -899
- package/dist/components.js +436 -3118
- package/dist/components.js.map +1 -1
- package/dist/file-reference-9xUOnwyt.d.ts +70 -0
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +10 -10
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +49 -9
- package/dist/index.js +190 -25
- package/dist/index.js.map +1 -1
- package/dist/{organisation-CO3Sh3_D.d.ts → organisation-t-vvQC3g.d.ts} +1 -8
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +5 -5
- package/dist/rbac/index.d.ts +65 -46
- package/dist/rbac/index.js +10 -12
- package/dist/styles/core.css +0 -125
- package/dist/types.d.ts +2 -1
- package/dist/types.js +3 -1
- package/dist/types.js.map +1 -1
- package/dist/{usePublicRouteParams-B2OcAsur.d.ts → usePublicRouteParams-CdoFxnJK.d.ts} +1 -1
- package/dist/utils.d.ts +3 -4
- package/dist/utils.js +44 -13
- package/dist/utils.js.map +1 -1
- package/docs/FILE_REFERENCE_SYSTEM.md +440 -0
- package/docs/INDEX.md +7 -5
- package/docs/README.md +0 -1
- package/docs/api/README.md +0 -4
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +2 -2
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +12 -12
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +6 -6
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +281 -0
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +2 -2
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +4 -4
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACContextType.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACProviderProps.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +2 -2
- package/docs/api/interfaces/RouteConfig.md +2 -2
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +204 -200
- package/docs/api-reference/components.md +141 -163
- package/docs/api-reference/hooks.md +347 -0
- package/docs/core-concepts/rbac-system.md +69 -16
- package/docs/getting-started/examples/basic-auth-app.md +0 -1
- package/docs/implementation-guides/datatable-rbac-usage.md +12 -11
- package/docs/implementation-guides/file-upload-storage.md +733 -0
- package/docs/implementation-guides/inactivity-tracking.md +779 -0
- package/docs/implementation-guides/organisation-security.md +748 -0
- package/docs/implementation-guides/public-pages-advanced.md +1022 -0
- package/docs/migration/MIGRATION_GUIDE.md +684 -0
- package/docs/migration/README.md +13 -2
- package/docs/migration/rbac-migration.md +73 -0
- package/docs/rbac/examples/rbac-rls-integration-example.md +11 -13
- package/docs/style-guide.md +269 -1
- package/package.json +1 -1
- package/src/__tests__/TESTING_GUIDELINES.md +331 -18
- package/src/__tests__/helpers/supabaseMock.ts +99 -0
- package/src/__tests__/rbac/PagePermissionGuard.test.tsx +10 -7
- package/src/__tests__/shared.ts +6 -0
- package/src/components/DataTable/components/ActionButtons.tsx +2 -2
- package/src/components/DataTable/components/DataTableCore.tsx +2 -2
- package/src/components/DataTable/components/UnifiedTableBody.tsx +1 -1
- package/src/components/DataTable/utils/debugTools.ts +2 -2
- package/src/components/Dialog/Dialog.test.tsx +12 -2
- package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +6 -6
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +2 -2
- package/src/components/FileDisplay.tsx +233 -0
- package/src/components/FileUpload.tsx +176 -0
- package/src/components/Footer/Footer.test.tsx +7 -7
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +13 -6
- package/src/components/OrganisationSelector/OrganisationSelector.test.tsx +30 -3
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +1 -1
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.rbac.test.tsx +558 -0
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +1 -1
- package/src/components/PublicLayout/PublicPageDebugger.tsx +2 -2
- package/src/components/PublicLayout/PublicPageDiagnostic.tsx +2 -2
- package/src/components/PublicLayout/PublicPageProvider.tsx +2 -2
- package/src/components/Select/Select.test.tsx +50 -15
- package/src/components/SuperAdminGuard.tsx +2 -2
- package/src/components/__tests__/SuperAdminGuard.test.tsx +559 -0
- package/src/components/index.ts +0 -183
- package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +2 -2
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +1 -1
- package/src/hooks/__tests__/useRBAC.unit.test.ts +191 -138
- package/src/hooks/public/usePublicEvent.ts +2 -2
- package/src/hooks/useAppConfig.ts +3 -3
- package/src/hooks/useComponentPerformance.ts +1 -1
- package/src/hooks/useDataTablePerformance.ts +1 -1
- package/src/hooks/useFileReference.ts +232 -0
- package/src/hooks/useOrganisationPermissions.test.ts +254 -344
- package/src/hooks/useOrganisationPermissions.ts +15 -7
- package/src/hooks/useOrganisationSecurity.test.ts +390 -402
- package/src/hooks/usePerformanceMonitor.ts +1 -1
- package/src/hooks/usePermissionCache.test.ts +264 -395
- package/src/hooks/usePermissionCache.ts +34 -4
- package/src/hooks/useSecureDataAccess.test.ts +486 -0
- package/src/hooks/useSecureDataAccess.ts +4 -1
- package/src/providers/InactivityProvider.tsx +2 -2
- package/src/providers/OrganisationProvider.test.simple.tsx +168 -0
- package/src/providers/OrganisationProvider.test.tsx +168 -0
- package/src/providers/OrganisationProvider.tsx +18 -31
- package/src/providers/UnifiedAuthProvider.test.simple.tsx +205 -0
- package/src/providers/UnifiedAuthProvider.test.tsx +128 -0
- package/src/providers/__tests__/InactivityProvider.test.tsx +3 -4
- package/src/providers/__tests__/OrganisationProvider.test.tsx +19 -14
- package/src/rbac/__tests__/integration.authflow.test.tsx +123 -0
- package/src/rbac/__tests__/integration.navigation.test.tsx +72 -0
- package/src/rbac/__tests__/integration.securedata.test.tsx +92 -0
- package/src/rbac/__tests__/integration.smoke.test.tsx +73 -0
- package/src/rbac/__tests__/rbac-core.test.tsx +26 -22
- package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +411 -0
- package/src/rbac/__tests__/rbac-engine-simplified.test.ts +285 -0
- package/src/rbac/__tests__/rbac-functions.test.ts +655 -0
- package/src/rbac/__tests__/rbac-integration.test.ts +532 -0
- package/src/rbac/__tests__/scenarios.user-role.test.tsx +196 -0
- package/src/rbac/api.test.ts +6 -6
- package/src/rbac/api.ts +2 -2
- package/src/rbac/audit.test.ts +485 -0
- package/src/rbac/audit.ts +7 -1
- package/src/rbac/cache-invalidation.ts +318 -0
- package/src/rbac/cache.test.ts +286 -0
- package/src/rbac/components/EnhancedNavigationMenu.test.tsx +559 -0
- package/src/rbac/components/EnhancedNavigationMenu.tsx +29 -23
- package/src/rbac/components/NavigationProvider.test.tsx +449 -0
- package/src/rbac/components/PagePermissionGuard.tsx +4 -4
- package/src/rbac/components/PagePermissionProvider.test.tsx +479 -0
- package/src/rbac/components/SecureDataProvider.test.tsx +511 -0
- package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +159 -430
- package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +4 -5
- package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +112 -118
- package/src/rbac/config.test.ts +410 -0
- package/src/rbac/engine.test.simple.ts +237 -0
- package/src/rbac/engine.test.ts +233 -0
- package/src/rbac/engine.ts +37 -41
- package/src/rbac/examples/CompleteRBACExample.tsx +3 -3
- package/src/rbac/examples/EventBasedApp.tsx +4 -4
- package/src/rbac/hooks/useRBAC.simple.test.ts +16 -0
- package/src/rbac/hooks/useRBAC.test.ts +207 -455
- package/src/rbac/hooks/useRBAC.ts +30 -22
- package/src/rbac/permissions.test.ts +128 -0
- package/src/rbac/permissions.ts +56 -141
- package/src/rbac/providers/RBACProvider.tsx +1 -1
- package/src/rbac/secureClient.test.ts +444 -0
- package/src/rbac/security.test.ts +390 -0
- package/src/rbac/security.ts +1 -1
- package/src/rbac/types.test.ts +382 -0
- package/src/rbac/types.ts +2 -2
- package/src/styles/base.css +208 -0
- package/src/styles/core.css +0 -125
- package/src/styles/semantic.css +24 -0
- package/src/types/file-reference.ts +77 -0
- package/src/types/rbac-functions.ts +290 -0
- package/src/types/supabase.ts +10 -28
- package/src/types/unified.ts +4 -1
- package/src/utils/__tests__/bundleAnalysis.unit.test.ts +81 -55
- package/src/utils/__tests__/lazyLoad.unit.test.tsx +21 -12
- package/src/utils/__tests__/organisationContext.unit.test.ts +13 -7
- package/src/utils/__tests__/performanceBudgets.unit.test.ts +3 -3
- package/src/utils/__tests__/sessionTracking.unit.test.ts +32 -12
- package/src/utils/appConfig.ts +1 -1
- package/src/utils/appIdResolver.test.ts +503 -0
- package/src/utils/appIdResolver.ts +1 -1
- package/src/utils/appNameResolver.test.ts +494 -0
- package/src/utils/appNameResolver.ts +3 -2
- package/src/utils/bundleAnalysis.ts +3 -3
- package/src/utils/debugLogger.ts +1 -1
- package/src/utils/file-reference.ts +263 -0
- package/src/utils/formatDate.test.ts +2 -2
- package/src/utils/organisationContext.test.ts +340 -0
- package/src/utils/organisationContext.ts +19 -6
- package/src/utils/performanceBudgets.ts +2 -2
- package/src/utils/permissionUtils.test.ts +393 -0
- package/src/utils/permissionUtils.ts +5 -2
- package/src/utils/secureDataAccess.test.ts +715 -0
- package/src/utils/secureDataAccess.ts +21 -5
- package/src/utils/sessionTracking.ts +34 -4
- package/src/utils/storage/__tests__/helpers.unit.test.ts +328 -0
- package/src/utils/storage/__tests__/index.unit.test.ts +16 -0
- package/src/utils/storage/helpers.ts +20 -25
- package/src/utils/storage/index.ts +29 -1
- package/src/vite-env.d.ts +17 -0
- package/dist/chunk-22KLBHPS.js.map +0 -1
- package/dist/chunk-7BNPOCLL.js.map +0 -1
- package/dist/chunk-BC3S53OZ.js.map +0 -1
- package/dist/chunk-GWSBHC4J.js.map +0 -1
- package/dist/chunk-MYP2EGHX.js.map +0 -1
- package/dist/chunk-MZBUOP4P.js.map +0 -1
- package/dist/chunk-NYUJ4FJR.js.map +0 -1
- package/dist/chunk-NZ655MWE.js.map +0 -1
- package/dist/chunk-SS3E6QLB.js.map +0 -1
- package/dist/chunk-TRIZ7IB7.js.map +0 -1
- package/dist/chunk-WJARTBCT.js.map +0 -1
- package/dist/chunk-YDJW5XTN.js.map +0 -1
- package/docs/print-components/README.md +0 -258
- package/docs/print-components/api-reference.md +0 -636
- package/docs/print-components/examples/README.md +0 -204
- package/docs/print-components/examples/basic-report.tsx +0 -92
- package/docs/print-components/examples/card-catalog.tsx +0 -149
- package/docs/print-components/examples/cover-page-report.tsx +0 -163
- package/docs/print-components/quick-start.md +0 -363
- package/src/components/PrintButton/PrintButton.tsx +0 -321
- package/src/components/PrintButton/PrintButtonGroup.tsx +0 -84
- package/src/components/PrintButton/PrintToolbar.tsx +0 -94
- package/src/components/PrintButton/__tests__/PrintButton.test.tsx +0 -271
- package/src/components/PrintButton/examples/PrintButtonShowcase.tsx +0 -438
- package/src/components/PrintButton/index.ts +0 -33
- package/src/components/PrintButton/types.ts +0 -173
- package/src/components/PrintCard/PrintCard.tsx +0 -154
- package/src/components/PrintCard/PrintCardContent.tsx +0 -57
- package/src/components/PrintCard/PrintCardFooter.tsx +0 -60
- package/src/components/PrintCard/PrintCardGrid.tsx +0 -91
- package/src/components/PrintCard/PrintCardHeader.tsx +0 -78
- package/src/components/PrintCard/PrintCardImage.tsx +0 -81
- package/src/components/PrintCard/examples/PrintCardShowcase.tsx +0 -239
- package/src/components/PrintCard/index.ts +0 -34
- package/src/components/PrintCard/types.ts +0 -171
- package/src/components/PrintDataTable/PrintDataTable.tsx +0 -215
- package/src/components/PrintDataTable/PrintTableGroup.tsx +0 -90
- package/src/components/PrintDataTable/PrintTableRow.tsx +0 -76
- package/src/components/PrintDataTable/index.ts +0 -25
- package/src/components/PrintDataTable/types.ts +0 -67
- package/src/components/PrintFooter/PrintFooter.tsx +0 -183
- package/src/components/PrintFooter/PrintFooterContent.tsx +0 -71
- package/src/components/PrintFooter/PrintFooterInfo.tsx +0 -86
- package/src/components/PrintFooter/PrintPageNumber.tsx +0 -90
- package/src/components/PrintFooter/examples/PrintFooterShowcase.tsx +0 -390
- package/src/components/PrintFooter/index.ts +0 -30
- package/src/components/PrintFooter/types.ts +0 -149
- package/src/components/PrintGrid/PrintGrid.tsx +0 -180
- package/src/components/PrintGrid/PrintGridBreakpoint.tsx +0 -109
- package/src/components/PrintGrid/PrintGridContainer.tsx +0 -128
- package/src/components/PrintGrid/PrintGridItem.tsx +0 -220
- package/src/components/PrintGrid/examples/PrintGridShowcase.tsx +0 -359
- package/src/components/PrintGrid/index.ts +0 -31
- package/src/components/PrintGrid/types.ts +0 -159
- package/src/components/PrintHeader/PrintCoverHeader.tsx +0 -230
- package/src/components/PrintHeader/PrintHeader.tsx +0 -150
- package/src/components/PrintHeader/index.ts +0 -17
- package/src/components/PrintHeader/types.ts +0 -42
- package/src/components/PrintLayout/PrintLayout.tsx +0 -122
- package/src/components/PrintLayout/PrintLayoutContext.tsx +0 -66
- package/src/components/PrintLayout/PrintPageBreak.tsx +0 -52
- package/src/components/PrintLayout/examples/PrintShowcase.tsx +0 -230
- package/src/components/PrintLayout/index.ts +0 -19
- package/src/components/PrintLayout/types.ts +0 -37
- package/src/components/PrintPageBreak/PrintPageBreak.tsx +0 -120
- package/src/components/PrintPageBreak/PrintPageBreakGroup.tsx +0 -90
- package/src/components/PrintPageBreak/PrintPageBreakIndicator.tsx +0 -112
- package/src/components/PrintPageBreak/examples/PrintPageBreakShowcase.tsx +0 -279
- package/src/components/PrintPageBreak/index.ts +0 -23
- package/src/components/PrintPageBreak/types.ts +0 -94
- package/src/components/PrintSection/PrintColumn.tsx +0 -104
- package/src/components/PrintSection/PrintDivider.tsx +0 -101
- package/src/components/PrintSection/PrintSection.tsx +0 -129
- package/src/components/PrintSection/PrintSectionContent.tsx +0 -75
- package/src/components/PrintSection/PrintSectionHeader.tsx +0 -97
- package/src/components/PrintSection/examples/PrintSectionShowcase.tsx +0 -258
- package/src/components/PrintSection/index.ts +0 -33
- package/src/components/PrintSection/types.ts +0 -155
- package/src/components/PrintText/PrintText.tsx +0 -116
- package/src/components/PrintText/index.ts +0 -16
- package/src/components/PrintText/types.ts +0 -24
- package/src/rbac/__tests__/integration.test.tsx +0 -218
- package/src/utils/print/PrintDataProcessor.ts +0 -390
- package/src/utils/print/examples/PrintUtilitiesShowcase.tsx +0 -397
- package/src/utils/print/index.ts +0 -29
- package/src/utils/print/types.ts +0 -196
- package/src/utils/print/usePrintOptimization.ts +0 -272
- /package/dist/{DataTable-7FMFXA7A.js.map → DataTable-4T627QFJ.js.map} +0 -0
- /package/dist/{api-H5A3H4IR.js.map → api-LUNF5O6M.js.map} +0 -0
- /package/dist/{appNameResolver-7GHF5ED2.js.map → appNameResolver-UURKN7NF.js.map} +0 -0
- /package/dist/{audit-BUW3LMJB.js.map → audit-6TOCAMKO.js.map} +0 -0
- /package/dist/{chunk-NRK4AIHQ.js.map → chunk-KBRACSJI.js.map} +0 -0
- /package/dist/{chunk-6MTY77WU.js.map → chunk-TNMXZLDR.js.map} +0 -0
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file PrintButton Showcase Example
|
|
3
|
-
* @package @jmruthers/pace-core
|
|
4
|
-
* @module PrintButtonShowcase
|
|
5
|
-
* @since 0.4.38
|
|
6
|
-
*
|
|
7
|
-
* Example showcasing PrintButton components usage.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import React, { useState } from 'react';
|
|
11
|
-
import {
|
|
12
|
-
PrintLayout,
|
|
13
|
-
PrintHeader,
|
|
14
|
-
PrintText,
|
|
15
|
-
PrintSection,
|
|
16
|
-
PrintButton,
|
|
17
|
-
PrintButtonGroup,
|
|
18
|
-
PrintToolbar
|
|
19
|
-
} from '../../index';
|
|
20
|
-
|
|
21
|
-
export function PrintButtonShowcase() {
|
|
22
|
-
const [printStatus, setPrintStatus] = useState<string>('');
|
|
23
|
-
|
|
24
|
-
const handlePrintSuccess = (success: boolean, error?: Error) => {
|
|
25
|
-
if (success) {
|
|
26
|
-
setPrintStatus('Print completed successfully!');
|
|
27
|
-
} else {
|
|
28
|
-
setPrintStatus(`Print failed: ${error?.message || 'Unknown error'}`);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const handlePrintStart = () => {
|
|
33
|
-
setPrintStatus('Starting print...');
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const handlePrintEnd = () => {
|
|
37
|
-
setTimeout(() => setPrintStatus(''), 3000);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<PrintLayout
|
|
42
|
-
orientation="portrait"
|
|
43
|
-
pageSize="A4"
|
|
44
|
-
firstPageHeader={
|
|
45
|
-
<PrintHeader
|
|
46
|
-
title="Print Button Components Showcase"
|
|
47
|
-
subtitle="Demonstrating print functionality and controls"
|
|
48
|
-
branding={{
|
|
49
|
-
logo: "/pace_logo_square.svg",
|
|
50
|
-
companyName: "Pace Core"
|
|
51
|
-
}}
|
|
52
|
-
metadata={[
|
|
53
|
-
{ label: 'Date', value: new Date().toLocaleDateString() },
|
|
54
|
-
{ label: 'Page', value: "1" }
|
|
55
|
-
]}
|
|
56
|
-
/>
|
|
57
|
-
}
|
|
58
|
-
>
|
|
59
|
-
<div className="space-y-8">
|
|
60
|
-
{/* Print Status */}
|
|
61
|
-
{printStatus && (
|
|
62
|
-
<div className="p-4 bg-blue-50 border border-blue-200 rounded-lg">
|
|
63
|
-
<PrintText variant="small" color="primary">
|
|
64
|
-
{printStatus}
|
|
65
|
-
</PrintText>
|
|
66
|
-
</div>
|
|
67
|
-
)}
|
|
68
|
-
|
|
69
|
-
{/* Basic Print Buttons */}
|
|
70
|
-
<PrintSection title="Basic Print Buttons" background="white" showBorder>
|
|
71
|
-
<PrintSection>
|
|
72
|
-
<PrintText>
|
|
73
|
-
These are basic print buttons with different variants and sizes.
|
|
74
|
-
</PrintText>
|
|
75
|
-
|
|
76
|
-
<PrintButtonGroup spacing="md" className="mt-4">
|
|
77
|
-
<PrintButton
|
|
78
|
-
variant="primary"
|
|
79
|
-
size="md"
|
|
80
|
-
printFunction="print"
|
|
81
|
-
onPrint={handlePrintSuccess}
|
|
82
|
-
onPrintStart={handlePrintStart}
|
|
83
|
-
onPrintEnd={handlePrintEnd}
|
|
84
|
-
>
|
|
85
|
-
Print Document
|
|
86
|
-
</PrintButton>
|
|
87
|
-
|
|
88
|
-
<PrintButton
|
|
89
|
-
variant="secondary"
|
|
90
|
-
size="md"
|
|
91
|
-
printFunction="printPage"
|
|
92
|
-
onPrint={handlePrintSuccess}
|
|
93
|
-
onPrintStart={handlePrintStart}
|
|
94
|
-
onPrintEnd={handlePrintEnd}
|
|
95
|
-
>
|
|
96
|
-
Print Page
|
|
97
|
-
</PrintButton>
|
|
98
|
-
</PrintButtonGroup>
|
|
99
|
-
</PrintSection>
|
|
100
|
-
</PrintSection>
|
|
101
|
-
|
|
102
|
-
{/* Print Button Variants */}
|
|
103
|
-
<PrintSection title="Print Button Variants" background="gray">
|
|
104
|
-
<PrintSection>
|
|
105
|
-
<PrintText>
|
|
106
|
-
Different button variants for various use cases.
|
|
107
|
-
</PrintText>
|
|
108
|
-
|
|
109
|
-
<PrintButtonGroup orientation="vertical" spacing="sm" className="mt-4">
|
|
110
|
-
<PrintButton
|
|
111
|
-
variant="primary"
|
|
112
|
-
printFunction="print"
|
|
113
|
-
onPrint={handlePrintSuccess}
|
|
114
|
-
>
|
|
115
|
-
Primary Print
|
|
116
|
-
</PrintButton>
|
|
117
|
-
|
|
118
|
-
<PrintButton
|
|
119
|
-
variant="secondary"
|
|
120
|
-
printFunction="print"
|
|
121
|
-
onPrint={handlePrintSuccess}
|
|
122
|
-
>
|
|
123
|
-
Secondary Print
|
|
124
|
-
</PrintButton>
|
|
125
|
-
|
|
126
|
-
<PrintButton
|
|
127
|
-
variant="outline"
|
|
128
|
-
printFunction="print"
|
|
129
|
-
onPrint={handlePrintSuccess}
|
|
130
|
-
>
|
|
131
|
-
Outline Print
|
|
132
|
-
</PrintButton>
|
|
133
|
-
|
|
134
|
-
<PrintButton
|
|
135
|
-
variant="ghost"
|
|
136
|
-
printFunction="print"
|
|
137
|
-
onPrint={handlePrintSuccess}
|
|
138
|
-
>
|
|
139
|
-
Ghost Print
|
|
140
|
-
</PrintButton>
|
|
141
|
-
|
|
142
|
-
<PrintButton
|
|
143
|
-
variant="destructive"
|
|
144
|
-
printFunction="print"
|
|
145
|
-
onPrint={handlePrintSuccess}
|
|
146
|
-
>
|
|
147
|
-
Destructive Print
|
|
148
|
-
</PrintButton>
|
|
149
|
-
</PrintButtonGroup>
|
|
150
|
-
</PrintSection>
|
|
151
|
-
</PrintSection>
|
|
152
|
-
|
|
153
|
-
{/* Print Button Sizes */}
|
|
154
|
-
<PrintSection title="Print Button Sizes" background="white" showBorder>
|
|
155
|
-
<PrintSection>
|
|
156
|
-
<PrintText>
|
|
157
|
-
Different button sizes for various contexts.
|
|
158
|
-
</PrintText>
|
|
159
|
-
|
|
160
|
-
<PrintButtonGroup spacing="sm" className="mt-4">
|
|
161
|
-
<PrintButton
|
|
162
|
-
size="sm"
|
|
163
|
-
printFunction="print"
|
|
164
|
-
onPrint={handlePrintSuccess}
|
|
165
|
-
>
|
|
166
|
-
Small
|
|
167
|
-
</PrintButton>
|
|
168
|
-
|
|
169
|
-
<PrintButton
|
|
170
|
-
size="md"
|
|
171
|
-
printFunction="print"
|
|
172
|
-
onPrint={handlePrintSuccess}
|
|
173
|
-
>
|
|
174
|
-
Medium
|
|
175
|
-
</PrintButton>
|
|
176
|
-
|
|
177
|
-
<PrintButton
|
|
178
|
-
size="lg"
|
|
179
|
-
printFunction="print"
|
|
180
|
-
onPrint={handlePrintSuccess}
|
|
181
|
-
>
|
|
182
|
-
Large
|
|
183
|
-
</PrintButton>
|
|
184
|
-
|
|
185
|
-
<PrintButton
|
|
186
|
-
size="xl"
|
|
187
|
-
printFunction="print"
|
|
188
|
-
onPrint={handlePrintSuccess}
|
|
189
|
-
>
|
|
190
|
-
Extra Large
|
|
191
|
-
</PrintButton>
|
|
192
|
-
</PrintButtonGroup>
|
|
193
|
-
</PrintSection>
|
|
194
|
-
</PrintSection>
|
|
195
|
-
|
|
196
|
-
{/* Print Button Shapes */}
|
|
197
|
-
<PrintSection title="Print Button Shapes" background="gray">
|
|
198
|
-
<PrintSection>
|
|
199
|
-
<PrintText>
|
|
200
|
-
Different button shapes for various design needs.
|
|
201
|
-
</PrintText>
|
|
202
|
-
|
|
203
|
-
<PrintButtonGroup spacing="sm" className="mt-4">
|
|
204
|
-
<PrintButton
|
|
205
|
-
shape="default"
|
|
206
|
-
printFunction="print"
|
|
207
|
-
onPrint={handlePrintSuccess}
|
|
208
|
-
>
|
|
209
|
-
Default
|
|
210
|
-
</PrintButton>
|
|
211
|
-
|
|
212
|
-
<PrintButton
|
|
213
|
-
shape="rounded"
|
|
214
|
-
printFunction="print"
|
|
215
|
-
onPrint={handlePrintSuccess}
|
|
216
|
-
>
|
|
217
|
-
Rounded
|
|
218
|
-
</PrintButton>
|
|
219
|
-
|
|
220
|
-
<PrintButton
|
|
221
|
-
shape="pill"
|
|
222
|
-
printFunction="print"
|
|
223
|
-
onPrint={handlePrintSuccess}
|
|
224
|
-
>
|
|
225
|
-
Pill
|
|
226
|
-
</PrintButton>
|
|
227
|
-
|
|
228
|
-
<PrintButton
|
|
229
|
-
shape="square"
|
|
230
|
-
printFunction="print"
|
|
231
|
-
onPrint={handlePrintSuccess}
|
|
232
|
-
>
|
|
233
|
-
Square
|
|
234
|
-
</PrintButton>
|
|
235
|
-
</PrintButtonGroup>
|
|
236
|
-
</PrintSection>
|
|
237
|
-
</PrintSection>
|
|
238
|
-
|
|
239
|
-
{/* Print Function Types */}
|
|
240
|
-
<PrintSection title="Print Function Types" background="white" showBorder>
|
|
241
|
-
<PrintSection>
|
|
242
|
-
<PrintText>
|
|
243
|
-
Different print functions for various scenarios.
|
|
244
|
-
</PrintText>
|
|
245
|
-
|
|
246
|
-
<PrintButtonGroup orientation="vertical" spacing="sm" className="mt-4">
|
|
247
|
-
<PrintButton
|
|
248
|
-
printFunction="print"
|
|
249
|
-
onPrint={handlePrintSuccess}
|
|
250
|
-
icon="🖨️"
|
|
251
|
-
>
|
|
252
|
-
Print Entire Document
|
|
253
|
-
</PrintButton>
|
|
254
|
-
|
|
255
|
-
<PrintButton
|
|
256
|
-
printFunction="printPage"
|
|
257
|
-
onPrint={handlePrintSuccess}
|
|
258
|
-
icon="📃"
|
|
259
|
-
>
|
|
260
|
-
Print Current Page
|
|
261
|
-
</PrintButton>
|
|
262
|
-
|
|
263
|
-
<PrintButton
|
|
264
|
-
printFunction="printSelection"
|
|
265
|
-
printSelector=".printable-content"
|
|
266
|
-
onPrint={handlePrintSuccess}
|
|
267
|
-
icon="📄"
|
|
268
|
-
>
|
|
269
|
-
Print Selected Content
|
|
270
|
-
</PrintButton>
|
|
271
|
-
|
|
272
|
-
<PrintButton
|
|
273
|
-
printFunction="printElement"
|
|
274
|
-
printSelector="#main-content"
|
|
275
|
-
onPrint={handlePrintSuccess}
|
|
276
|
-
icon="🎯"
|
|
277
|
-
>
|
|
278
|
-
Print Specific Element
|
|
279
|
-
</PrintButton>
|
|
280
|
-
</PrintButtonGroup>
|
|
281
|
-
</PrintSection>
|
|
282
|
-
</PrintSection>
|
|
283
|
-
|
|
284
|
-
{/* Print Button States */}
|
|
285
|
-
<PrintSection title="Print Button States" background="gray">
|
|
286
|
-
<PrintSection>
|
|
287
|
-
<PrintText>
|
|
288
|
-
Different button states for various interactions.
|
|
289
|
-
</PrintText>
|
|
290
|
-
|
|
291
|
-
<PrintButtonGroup spacing="sm" className="mt-4">
|
|
292
|
-
<PrintButton
|
|
293
|
-
state="default"
|
|
294
|
-
printFunction="print"
|
|
295
|
-
onPrint={handlePrintSuccess}
|
|
296
|
-
>
|
|
297
|
-
Default State
|
|
298
|
-
</PrintButton>
|
|
299
|
-
|
|
300
|
-
<PrintButton
|
|
301
|
-
state="loading"
|
|
302
|
-
printFunction="print"
|
|
303
|
-
onPrint={handlePrintSuccess}
|
|
304
|
-
>
|
|
305
|
-
Loading State
|
|
306
|
-
</PrintButton>
|
|
307
|
-
|
|
308
|
-
<PrintButton
|
|
309
|
-
state="disabled"
|
|
310
|
-
printFunction="print"
|
|
311
|
-
onPrint={handlePrintSuccess}
|
|
312
|
-
>
|
|
313
|
-
Disabled State
|
|
314
|
-
</PrintButton>
|
|
315
|
-
</PrintButtonGroup>
|
|
316
|
-
</PrintSection>
|
|
317
|
-
</PrintSection>
|
|
318
|
-
|
|
319
|
-
{/* Print Toolbar */}
|
|
320
|
-
<PrintSection title="Print Toolbar" background="white" showBorder>
|
|
321
|
-
<PrintSection>
|
|
322
|
-
<PrintText>
|
|
323
|
-
A toolbar component for organizing print controls.
|
|
324
|
-
</PrintText>
|
|
325
|
-
|
|
326
|
-
<PrintToolbar position="top" align="left" className="mt-4">
|
|
327
|
-
<PrintButton
|
|
328
|
-
variant="primary"
|
|
329
|
-
size="sm"
|
|
330
|
-
printFunction="print"
|
|
331
|
-
onPrint={handlePrintSuccess}
|
|
332
|
-
>
|
|
333
|
-
Print All
|
|
334
|
-
</PrintButton>
|
|
335
|
-
|
|
336
|
-
<PrintButton
|
|
337
|
-
variant="outline"
|
|
338
|
-
size="sm"
|
|
339
|
-
printFunction="printPage"
|
|
340
|
-
onPrint={handlePrintSuccess}
|
|
341
|
-
>
|
|
342
|
-
Print Page
|
|
343
|
-
</PrintButton>
|
|
344
|
-
|
|
345
|
-
<PrintButton
|
|
346
|
-
variant="ghost"
|
|
347
|
-
size="sm"
|
|
348
|
-
printFunction="printSelection"
|
|
349
|
-
printSelector=".printable-content"
|
|
350
|
-
onPrint={handlePrintSuccess}
|
|
351
|
-
>
|
|
352
|
-
Print Selection
|
|
353
|
-
</PrintButton>
|
|
354
|
-
</PrintToolbar>
|
|
355
|
-
</PrintSection>
|
|
356
|
-
</PrintSection>
|
|
357
|
-
|
|
358
|
-
{/* Print Options Example */}
|
|
359
|
-
<PrintSection title="Print Options Example" background="gray">
|
|
360
|
-
<PrintSection>
|
|
361
|
-
<PrintText>
|
|
362
|
-
Print buttons with custom print options for margins, orientation, and styling.
|
|
363
|
-
</PrintText>
|
|
364
|
-
|
|
365
|
-
<PrintButtonGroup spacing="sm" className="mt-4">
|
|
366
|
-
<PrintButton
|
|
367
|
-
variant="primary"
|
|
368
|
-
printFunction="print"
|
|
369
|
-
printOptions={{
|
|
370
|
-
title: "Custom Print Document",
|
|
371
|
-
orientation: "portrait",
|
|
372
|
-
margins: {
|
|
373
|
-
top: "1in",
|
|
374
|
-
right: "0.5in",
|
|
375
|
-
bottom: "1in",
|
|
376
|
-
left: "0.5in"
|
|
377
|
-
},
|
|
378
|
-
colorAdjust: "exact",
|
|
379
|
-
backgroundGraphics: true
|
|
380
|
-
}}
|
|
381
|
-
onPrint={handlePrintSuccess}
|
|
382
|
-
>
|
|
383
|
-
Print with Custom Options
|
|
384
|
-
</PrintButton>
|
|
385
|
-
|
|
386
|
-
<PrintButton
|
|
387
|
-
variant="secondary"
|
|
388
|
-
printFunction="print"
|
|
389
|
-
printOptions={{
|
|
390
|
-
title: "Landscape Print",
|
|
391
|
-
orientation: "landscape",
|
|
392
|
-
margins: {
|
|
393
|
-
top: "0.5in",
|
|
394
|
-
right: "0.5in",
|
|
395
|
-
bottom: "0.5in",
|
|
396
|
-
left: "0.5in"
|
|
397
|
-
}
|
|
398
|
-
}}
|
|
399
|
-
onPrint={handlePrintSuccess}
|
|
400
|
-
>
|
|
401
|
-
Print Landscape
|
|
402
|
-
</PrintButton>
|
|
403
|
-
</PrintButtonGroup>
|
|
404
|
-
</PrintSection>
|
|
405
|
-
</PrintSection>
|
|
406
|
-
|
|
407
|
-
{/* Full Width Buttons */}
|
|
408
|
-
<PrintSection title="Full Width Buttons" background="white" showBorder>
|
|
409
|
-
<PrintSection>
|
|
410
|
-
<PrintText>
|
|
411
|
-
Full width buttons for prominent print actions.
|
|
412
|
-
</PrintText>
|
|
413
|
-
|
|
414
|
-
<div className="space-y-2 mt-4">
|
|
415
|
-
<PrintButton
|
|
416
|
-
variant="primary"
|
|
417
|
-
fullWidth
|
|
418
|
-
printFunction="print"
|
|
419
|
-
onPrint={handlePrintSuccess}
|
|
420
|
-
>
|
|
421
|
-
Print Entire Document
|
|
422
|
-
</PrintButton>
|
|
423
|
-
|
|
424
|
-
<PrintButton
|
|
425
|
-
variant="outline"
|
|
426
|
-
fullWidth
|
|
427
|
-
printFunction="printPage"
|
|
428
|
-
onPrint={handlePrintSuccess}
|
|
429
|
-
>
|
|
430
|
-
Print Current Page Only
|
|
431
|
-
</PrintButton>
|
|
432
|
-
</div>
|
|
433
|
-
</PrintSection>
|
|
434
|
-
</PrintSection>
|
|
435
|
-
</div>
|
|
436
|
-
</PrintLayout>
|
|
437
|
-
);
|
|
438
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file PrintButton Exports
|
|
3
|
-
* @package @jmruthers/pace-core
|
|
4
|
-
* @module PrintButton
|
|
5
|
-
* @since 0.4.38
|
|
6
|
-
*
|
|
7
|
-
* Exports for PrintButton components.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export { PrintButton } from './PrintButton';
|
|
11
|
-
export { PrintButtonGroup } from './PrintButtonGroup';
|
|
12
|
-
export { PrintToolbar } from './PrintToolbar';
|
|
13
|
-
|
|
14
|
-
export type {
|
|
15
|
-
PrintButtonProps,
|
|
16
|
-
PrintOptions,
|
|
17
|
-
PrintButtonGroupProps,
|
|
18
|
-
PrintToolbarProps,
|
|
19
|
-
PrintButtonVariant,
|
|
20
|
-
PrintButtonSize,
|
|
21
|
-
PrintButtonShape,
|
|
22
|
-
PrintButtonState,
|
|
23
|
-
PrintFunction,
|
|
24
|
-
IconPosition,
|
|
25
|
-
PrintOrientation,
|
|
26
|
-
PrintDuplex,
|
|
27
|
-
PrintColorAdjust,
|
|
28
|
-
PrintButtonGroupOrientation,
|
|
29
|
-
PrintButtonGroupSpacing,
|
|
30
|
-
PrintButtonGroupAlign,
|
|
31
|
-
PrintToolbarPosition,
|
|
32
|
-
PrintToolbarAlign,
|
|
33
|
-
} from './types';
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file PrintButton Types
|
|
3
|
-
* @package @jmruthers/pace-core
|
|
4
|
-
* @module PrintButton
|
|
5
|
-
* @since 0.4.38
|
|
6
|
-
*
|
|
7
|
-
* Type definitions for PrintButton component.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { ReactNode } from 'react';
|
|
11
|
-
|
|
12
|
-
export interface PrintButtonProps {
|
|
13
|
-
/** Button content */
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
|
|
16
|
-
/** Button variant */
|
|
17
|
-
variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive';
|
|
18
|
-
|
|
19
|
-
/** Button size */
|
|
20
|
-
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
21
|
-
|
|
22
|
-
/** Button shape */
|
|
23
|
-
shape?: 'default' | 'rounded' | 'pill' | 'square';
|
|
24
|
-
|
|
25
|
-
/** Button state */
|
|
26
|
-
state?: 'default' | 'loading' | 'disabled';
|
|
27
|
-
|
|
28
|
-
/** Print functionality */
|
|
29
|
-
printFunction?: 'print' | 'printSelection' | 'printPage' | 'printElement';
|
|
30
|
-
|
|
31
|
-
/** Print selector (for printSelection and printElement) */
|
|
32
|
-
printSelector?: string;
|
|
33
|
-
|
|
34
|
-
/** Print options */
|
|
35
|
-
printOptions?: PrintOptions;
|
|
36
|
-
|
|
37
|
-
/** Click handler */
|
|
38
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
39
|
-
|
|
40
|
-
/** Print callback */
|
|
41
|
-
onPrint?: (success: boolean, error?: Error) => void;
|
|
42
|
-
|
|
43
|
-
/** Print start callback */
|
|
44
|
-
onPrintStart?: () => void;
|
|
45
|
-
|
|
46
|
-
/** Print end callback */
|
|
47
|
-
onPrintEnd?: () => void;
|
|
48
|
-
|
|
49
|
-
/** Show print icon */
|
|
50
|
-
showIcon?: boolean;
|
|
51
|
-
|
|
52
|
-
/** Custom icon */
|
|
53
|
-
icon?: ReactNode;
|
|
54
|
-
|
|
55
|
-
/** Icon position */
|
|
56
|
-
iconPosition?: 'left' | 'right';
|
|
57
|
-
|
|
58
|
-
/** Full width */
|
|
59
|
-
fullWidth?: boolean;
|
|
60
|
-
|
|
61
|
-
/** Print optimization */
|
|
62
|
-
printOptimized?: boolean;
|
|
63
|
-
|
|
64
|
-
/** Custom CSS classes */
|
|
65
|
-
className?: string;
|
|
66
|
-
|
|
67
|
-
/** Additional props */
|
|
68
|
-
[key: string]: any;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface PrintOptions {
|
|
72
|
-
/** Print media query */
|
|
73
|
-
mediaQuery?: string;
|
|
74
|
-
|
|
75
|
-
/** Print stylesheet URL */
|
|
76
|
-
stylesheetUrl?: string;
|
|
77
|
-
|
|
78
|
-
/** Print title */
|
|
79
|
-
title?: string;
|
|
80
|
-
|
|
81
|
-
/** Print margins */
|
|
82
|
-
margins?: {
|
|
83
|
-
top?: string;
|
|
84
|
-
right?: string;
|
|
85
|
-
bottom?: string;
|
|
86
|
-
left?: string;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/** Print orientation */
|
|
90
|
-
orientation?: 'portrait' | 'landscape';
|
|
91
|
-
|
|
92
|
-
/** Print scale */
|
|
93
|
-
scale?: number;
|
|
94
|
-
|
|
95
|
-
/** Print background graphics */
|
|
96
|
-
backgroundGraphics?: boolean;
|
|
97
|
-
|
|
98
|
-
/** Print color adjustment */
|
|
99
|
-
colorAdjust?: 'economy' | 'exact';
|
|
100
|
-
|
|
101
|
-
/** Print page ranges */
|
|
102
|
-
pageRanges?: string;
|
|
103
|
-
|
|
104
|
-
/** Print copies */
|
|
105
|
-
copies?: number;
|
|
106
|
-
|
|
107
|
-
/** Print collate */
|
|
108
|
-
collate?: boolean;
|
|
109
|
-
|
|
110
|
-
/** Print duplex */
|
|
111
|
-
duplex?: 'simplex' | 'duplex' | 'duplex-short-edge' | 'duplex-long-edge';
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface PrintButtonGroupProps {
|
|
115
|
-
/** Button group children */
|
|
116
|
-
children: ReactNode;
|
|
117
|
-
|
|
118
|
-
/** Button group orientation */
|
|
119
|
-
orientation?: 'horizontal' | 'vertical';
|
|
120
|
-
|
|
121
|
-
/** Button group spacing */
|
|
122
|
-
spacing?: 'none' | 'sm' | 'md' | 'lg';
|
|
123
|
-
|
|
124
|
-
/** Button group alignment */
|
|
125
|
-
align?: 'left' | 'center' | 'right' | 'stretch';
|
|
126
|
-
|
|
127
|
-
/** Print optimization */
|
|
128
|
-
printOptimized?: boolean;
|
|
129
|
-
|
|
130
|
-
/** Custom CSS classes */
|
|
131
|
-
className?: string;
|
|
132
|
-
|
|
133
|
-
/** Additional props */
|
|
134
|
-
[key: string]: any;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface PrintToolbarProps {
|
|
138
|
-
/** Toolbar children */
|
|
139
|
-
children: ReactNode;
|
|
140
|
-
|
|
141
|
-
/** Toolbar position */
|
|
142
|
-
position?: 'top' | 'bottom' | 'fixed';
|
|
143
|
-
|
|
144
|
-
/** Toolbar alignment */
|
|
145
|
-
align?: 'left' | 'center' | 'right';
|
|
146
|
-
|
|
147
|
-
/** Show toolbar on print */
|
|
148
|
-
showOnPrint?: boolean;
|
|
149
|
-
|
|
150
|
-
/** Print optimization */
|
|
151
|
-
printOptimized?: boolean;
|
|
152
|
-
|
|
153
|
-
/** Custom CSS classes */
|
|
154
|
-
className?: string;
|
|
155
|
-
|
|
156
|
-
/** Additional props */
|
|
157
|
-
[key: string]: any;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export type PrintButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive';
|
|
161
|
-
export type PrintButtonSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
162
|
-
export type PrintButtonShape = 'default' | 'rounded' | 'pill' | 'square';
|
|
163
|
-
export type PrintButtonState = 'default' | 'loading' | 'disabled';
|
|
164
|
-
export type PrintFunction = 'print' | 'printSelection' | 'printPage' | 'printElement';
|
|
165
|
-
export type IconPosition = 'left' | 'right';
|
|
166
|
-
export type PrintOrientation = 'portrait' | 'landscape';
|
|
167
|
-
export type PrintDuplex = 'simplex' | 'duplex' | 'duplex-short-edge' | 'duplex-long-edge';
|
|
168
|
-
export type PrintColorAdjust = 'economy' | 'exact';
|
|
169
|
-
export type PrintButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
170
|
-
export type PrintButtonGroupSpacing = 'none' | 'sm' | 'md' | 'lg';
|
|
171
|
-
export type PrintButtonGroupAlign = 'left' | 'center' | 'right' | 'stretch';
|
|
172
|
-
export type PrintToolbarPosition = 'top' | 'bottom' | 'fixed';
|
|
173
|
-
export type PrintToolbarAlign = 'left' | 'center' | 'right';
|