1: <?php
2:
3: namespace LaravelUi5\Core\Ui5\Contracts;
4:
5: use LaravelUi5\Core\Ui5\Capabilities\DataProviderInterface;
6:
7: /**
8: * A discoverable UI5 Report Artifact that includes selection, result, and optional actions.
9: *
10: * This interface defines the required contract for a report to be integrated into the
11: * UI5 Admin Panel and executed via the central ReportController.
12: *
13: * Each report artifact provides:
14: * - A JavaScript namespace (used in UI5 client)
15: * - A semantic version for cache busting
16: * - Title, description, and a unique urlKey
17: * - Access to the data provider logic
18: * - View templates for selection and report output
19: * - Optionally: follow-up actions
20: */
21: interface Ui5ReportInterface extends Ui5ArtifactInterface
22: {
23: /**
24: * Returns the class that handles data retrieval and export logic.
25: */
26: public function getProvider(): DataProviderInterface;
27:
28: /**
29: * Returns the path to the UI5 selection view Blade template.
30: */
31: public function getSelectionViewPath(): string;
32:
33: /**
34: * Returns the path to the UI5 report result view Blade template.
35: */
36: public function getSelectionControllerPath(): string;
37:
38: /**
39: * Returns the path to the Laravel Blade view used to render the final report output.
40: *
41: * This view receives the result from the DataProvider as `$data`,
42: * and can render tables, charts, summaries or any other layout.
43: */
44: public function getReportView(): string;
45:
46: /**
47: * Returns a list of available follow-up actions.
48: *
49: * @return array<string, Ui5ActionInterface> e.g. ['discard' => new Ui5AnnualCutOffCommitAction()]
50: */
51: public function getActions(): array;
52: }
53: