Refactored `ReportViewer.razor` to improve maintainability and
ensure dynamic updates to the `DxReportViewer` component.
- Added `@key` attribute bound to `ViewerKey` to trigger re-renders.
- Introduced `CreateReportInstance` and `CreateSignedReportInstance`
helper methods to encapsulate report creation logic.
- Updated `OnInitializedAsync`, `ClearSignatureAsync`, and
`ApplySignatureAsync` to use the new helper methods.
- Incremented `ViewerKey` in relevant methods to ensure proper
re-rendering of the `DxReportViewer` component.
- Replaced `ApplySignatureToReport` with `CreateSignedReportInstance`.
These changes improve code modularity, readability, and ensure
the UI reflects the latest state of the report.
Introduced a signature input feature in `ReportViewer.razor` to allow users to draw a signature on a canvas and embed it into reports before exporting as a signed PDF.
- Added a canvas (`receiver-signature-pad`) and buttons for clearing, applying, and exporting signatures.
- Injected `IJSRuntime` for JavaScript interop and added methods for signature handling (`ClearSignatureAsync`, `ApplySignatureAsync`, `ExportSignedPdfAsync`).
- Embedded the signature as an image and label in the report's bottom margin.
- Added `receiver-signature.js` to manage the signature pad, including drawing, clearing, and exporting the signature as a Base64 image.
- Updated `index.html` to include the new JavaScript file.
- Displayed validation messages for missing or invalid signatures.
Introduced `InMemoryReportStorageWebExtension` to manage
reports in memory, enabling dynamic report storage and
retrieval. Updated `ReportViewer.razor` to conditionally
render the `DxReportViewer` component and initialize
reports asynchronously.
Configured dependency injection in `Program.cs` to register
`InMemoryReportStorageWebExtension` as a singleton and
integrated it with `CustomReportProvider`. Registered
`EnvelopeGenerator.ReceiverUI.PredefinedReports.Report` as
a trusted class for deserialization.
Enhanced `CustomReportProvider` to fetch reports from
memory or generate them dynamically using `ReportsFactory`.
Added necessary `using` directives and ensured proper
report lifecycle management.