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