[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = space\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.md]\ntrim_trailing_whitespace = false\n\n[*.{yml,yaml}]\nindent_size = 2\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Path-based git attributes\n# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n\n# Ignore all test and documentation with \"export-ignore\".\n/.github            export-ignore\n/.gitattributes     export-ignore\n/.gitignore         export-ignore\n/phpunit.xml.dist   export-ignore\n/art                export-ignore\n/docs               export-ignore\n/tests              export-ignore\n/workbench          export-ignore\n/.editorconfig      export-ignore\n/.php_cs.dist.php   export-ignore\n/psalm.xml          export-ignore\n/psalm.xml.dist     export-ignore\n/testbench.yaml     export-ignore\n/UPGRADING.md       export-ignore\n/phpstan.neon.dist  export-ignore\n/phpstan-baseline.neon  export-ignore\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug.yml",
    "content": "name: Bug report\ndescription: Report a problem you're experiencing\nlabels: bug,unconfirmed\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Before opening a bug report, please search the existing issues (both open and closed).\n\n        ---\n\n        Thank you for taking the time to file a bug report. To address this bug as fast as possible, we need some information.\n  - type: input\n    id: package-version\n    attributes:\n      label: Package Version\n      description: Please provide the full version of the package you have installed.\n      placeholder: v1.0.0\n    validations:\n      required: true\n  - type: input\n    id: laravel-version\n    attributes:\n      label: Laravel Version\n      description: Please provide the full Laravel version of your project.\n      placeholder: v10.0.0\n    validations:\n      required: true\n  - type: input\n    id: php-version\n    attributes:\n      label: PHP Version\n      description: Please provide the full PHP version of your server.\n      placeholder: PHP 8.3.0\n    validations:\n      required: true\n  - type: textarea\n    id: description\n    attributes:\n      label: Problem description\n      description: What happened when you experienced the problem?\n    validations:\n      required: true\n  - type: textarea\n    id: expectation\n    attributes:\n      label: Expected behavior\n      description: What did you expect to happen instead?\n    validations:\n      required: true\n  - type: textarea\n    id: steps\n    attributes:\n      label: Steps to reproduce\n      description: Which steps do we need to take to reproduce the problem? Any code examples need to be **as short as possible**, remove any code that is unrelated to the bug.  **This issue will be automatically closed and not reviewed if detailed replication steps are missing.**\n    validations:\n      required: true\n  - type: input\n    id: reproduction\n    attributes:\n      label: Reproduction repository (issue will be closed if this is not valid)\n      description: The URL of a public GitHub repository which reproduces the problem. **Please do not link to your actual project**, what we need instead is a _minimal_ reproduction in a fresh project without any unnecessary code. This means it doesn\\'t matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. This allows us to fix the problem much quicker. **This issue will be automatically closed and not reviewed if this is missing. Please make sure to format the URL starting with `https://github.com` - only repositories hosted on GitHub are accepted.\n    validations:\n      required: true\n  - type: textarea\n    id: logs\n    attributes:\n      label: Relevant log output\n      description: If applicable, provide relevant log output. No need for backticks here.\n      render: shell\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Ask a question\n    url: https://github.com/Rmsramos/activitylog/discussions/new?category=q-a\n    about: Ask the community for help\n  - name: Request a feature\n    url: https://github.com/Rmsramos/activitylog/discussions/new?category=ideas\n    about: Share ideas for new features\n  - name: Report a security issue\n    url: https://github.com/Rmsramos/activitylog/security/policy\n    about: Learn how to notify us for sensitive bugs\n"
  },
  {
    "path": ".github/workflows/fix-php-code-style-issues.yml",
    "content": "name: Fix PHP code style issues\n\non:\n  push:\n    paths:\n      - '**.php'\n\npermissions:\n  contents: write\n\njobs:\n  php-code-styling:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v3\n        with:\n          ref: ${{ github.head_ref }}\n\n      - name: Fix PHP code style issues\n        uses: aglipanci/laravel-pint-action@2.3.0\n\n      - name: Commit changes\n        uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          commit_message: Fix styling\n"
  },
  {
    "path": ".gitignore",
    "content": ".idea\n.phpunit.cache\nbuild\ncomposer.lock\ncoverage\ndocs\nphpunit.xml\nphpstan.neon\ntestbench.yaml\nvendor\nnode_modules\n"
  },
  {
    "path": "LICENSE.md",
    "content": "The MIT License (MIT)\n\nCopyright (c) Rmsramos <rmsramos@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# ActivityLog\n\n### Spatie/Laravel-activitylog for Filament\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/rmsramos/activitylog.svg?style=flat-square)](https://packagist.org/packages/rmsramos/activitylog)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/rmsramos/activitylog/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/rmsramos/activitylog/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/rmsramos/activitylog.svg?style=flat-square)](https://packagist.org/packages/rmsramos/activitylog/stats)\n\n<div class=\"filament-hidden\">\n\n![Screenshot of Application Feature](https://raw.githubusercontent.com/rmsramos/activitylog/main/arts/cover.jpeg)\n\n</div>\n\nThis package provides a Filament resource that shows you all of the activity logs and detailed view of each log created using the `spatie/laravel-activitylog` package. It also provides a relationship manager for related models.\n\n## Requirements\n\n-   Laravel v12\n-   Filament v3\n-   Spatie/Laravel-activitylog v4\n\n## Languages Supported\n\nActivityLog Plugin is translated for :\n\n-   🇧🇷 Brazilian Portuguese\n-   🇺🇸 English\n-   🇩🇪 German\n-   🇪🇸 Spanish\n-   🇫🇷 French\n-   🇮🇷 Persian\n-   🇦🇪 Arabic\n-   🇵🇹 Portuguese\n-   🇮🇱 Hebrew\n-   🇳🇱 Dutch\n-   🇱🇻 Latvian\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require rmsramos/activitylog\n```\n\nAfter that run the install command:\n\n```bash\nphp artisan activitylog:install\n```\n\nThis will publish the config & migrations from `spatie/laravel-activitylog`\n\nAnd run migrates\n\n```bash\nphp artisan migrate\n```\n\nYou can manually publish the configuration file with:\n\n```bash\nphp artisan vendor:publish --tag=\"activitylog-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    'resources' => [\n       'label'                     => 'Activity Log',\n        'plural_label'              => 'Activity Logs',\n        'hide_restore_action'       => false,\n        'restore_action_label'      => 'Restore',\n        'hide_resource_action'      => false,\n        'hide_restore_model_action' => true,\n        'resource_action_label'     => 'View',\n        'navigation_item'           => true,\n        'navigation_group'          => null,\n        'navigation_icon'           => 'heroicon-o-shield-check',\n        'navigation_sort'           => null,\n        'default_sort_column'       => 'id',\n        'default_sort_direction'    => 'desc',\n        'navigation_count_badge'    => false,\n        'resource'                  => \\Rmsramos\\Activitylog\\Resources\\ActivitylogResource::class,\n    ],\n    'date_format'     => 'd/m/Y',\n    'datetime_format' => 'd/m/Y H:i:s',\n];\n```\n\nOptionally, you can publish the views using\n\n```bash\nphp artisan vendor:publish --tag=\"activitylog-views\"\n```\n\n## Usage\n\n### Basic Spatie ActivityLog usage\n\nIn you `Model` add `Spatie\\Activitylog\\Traits\\LogsActivity` trait, and configure `getActivitylogOption` function\n\nFor more configuration, Please review [Spatie Docs](https://spatie.be/docs/laravel-activitylog/v4)\n\n```php\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Spatie\\Activitylog\\Traits\\LogsActivity;\nuse Spatie\\Activitylog\\LogOptions;\n\nclass NewsItem extends Model\n{\n    use LogsActivity;\n\n    protected $fillable = ['name', 'text'];\n\n    public function getActivitylogOptions(): LogOptions\n    {\n        return LogOptions::defaults()\n        ->logOnly(['name', 'text']);\n    }\n}\n```\n\n## Plugin usage\n\n![Screenshot of Application Feature](https://raw.githubusercontent.com/rmsramos/activitylog/main/arts/resource.png)\n\nIn your Panel ServiceProvider `(App\\Providers\\Filament)` active the plugin\n\nAdd the `Rmsramos\\Activitylog\\ActivitylogPlugin` to your panel config\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make(),\n        ]);\n}\n```\n\n## Customising the ActivitylogResource\n\nYou can swap out the `ActivitylogResource` used by updating the `->resource()` value. Use this to create your own `CustomResource` class and extend the original at `\\Rmsramos\\Activitylog\\Resources\\ActivitylogResource::class`. This will allow you to customise everything such as the views, table, form and permissions.\n\n> [!NOTE]\n> If you wish to change the resource on List and View page be sure to replace the `getPages` method on the new resource and create your own version of the `ListPage` and `ViewPage` classes to reference the custom `CustomResource`.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->resource(\\Path\\For\\Your\\CustomResource::class),\n        ]);\n}\n```\n\n## Customising label Resource\n\nYou can swap out the `Resource label` used by updating the `->label()` and `->pluralLabel()` value.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->label('Log')\n                ->pluralLabel('Logs'),\n        ]);\n}\n```\n\n## Displaying the resource in the navigation\n\nYou can enable or disable the `Resource navigation item` by updating the `->navigationItem()` value.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->navigationItem(false), // by default is true\n        ]);\n}\n```\n\n## Grouping resource navigation items\n\nYou can add a `Resource navigation group` updating the `->navigationGroup()` value.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->navigationGroup('Activity Log'),\n        ]);\n}\n```\n\n## Customising a resource navigation icon\n\nYou can swap out the `Resource navigation icon` used by updating the `->navigationIcon()` value.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->navigationIcon('heroicon-o-shield-check'),\n        ]);\n}\n```\n\n## Active a count badge\n\nYou can active `Count Badge` updating the `->navigationCountBadge()` value.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->navigationCountBadge(true),\n        ]);\n}\n```\n\n## Set navigation sort\n\nYou can set the `Resource navigation sort` used by updating the `->navigationSort()` value.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->navigationSort(3),\n        ]);\n}\n```\n\n## Authorization\n\nIf you would like to prevent certain users from accessing the logs resource, you should add a authorize callback in the `ActivitylogPlugin` chain.\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->authorize(\n                    fn () => auth()->user()->id === 1\n                ),\n        ]);\n}\n```\n\n## Translate Resource Names\n\nTo translate resource names in the activity log, add a `translateSubject` callback within the `ActivitylogPlugin` chain\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->translateSubject(fn($label) => __(\"yourCustomLangFile.\".$label)),\n        ]);\n}\n```\n\n## Translate Activity log key Names\n\nTo translate the names of the keys in the activity log, add a `translateLogKey` callback within the `ActivitylogPlugin` chain\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->translateLogKey(fn($label) => __(\"yourCustomLangFile.\".$label)),\n        ]);\n}\n```\n\n## Customize Date Parsing\n\nTo customize how dates are parsed, depending on user preferences or settings:\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\nuse Morilog\\Jalali\\Jalalian;\nuse Carbon\\Carbon;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->dateParser(\n                    fn($date) => auth()->user()->isJalaliCalendar() ?\n                        Jalalian::fromDateTime($date) :\n                        Carbon::parse($date)\n                )\n        ]);\n}\n```\n\n## Customize Date and DateTime Formats\n\nTo customize the format of dates and datetime columns based on user settings:\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->dateFormat('Y-m-d')\n                ->datetimeFormat(fn() => auth()->user()->getFilamentDateTimeFormat())\n        ]);\n}\n\n```\n\n## Customize DateTime Columns\n\nTo conditionally customize datetime columns in the UI, depending on the user's calendar preference:\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->customizeDatetimeColumn(function ($column) {\n                    return $column->when(\n                        auth()->user()->isJalaliCalendar(),\n                        function ($column) {\n                            return $column->jalaliDateTime();\n                        }\n                    );\n                })\n        ]);\n}\n```\n\n## Customize Date Picker Fields\n\nTo customize date picker fields in forms, depending on user preferences:\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->customizeDatePicker(function ($field) {\n                    return $field->when(\n                        auth()->user()->isJalaliCalendar(),\n                        function ($field) {\n                            return $field->jalali();\n                        }\n                    );\n                })\n        ]);\n}\n```\n\n## Manipulate View Action Using Custom Activity Resource Trait\n\nImplement `getFilamentActualResourceModel` in the trait `HasCustomActivityResource` to determine the actual model related to the activity record for generating valid URLs.\n\n```php\nuse Rmsramos\\Activitylog\\Traits\\HasCustomActivityResource;\n\ntrait HasCustomActivityResource\n{\n    public function getFilamentActualResourceModel($record)\n    {\n        $record = $record->subject->translatable;\n        $model = null;\n\n        switch ($record::class) {\n            case FirstTranslatableModel::class:\n                $model = $record->firstModel;\n                break;\n\n            case SecondTranslatableModel::class:\n                $model = $record->secondModel;\n                break;\n\n            default:\n                throw new Exception(\"Error Translatable subject model not found. record = \".$record::class, 1);\n                break;\n        }\n\n        return $model;\n    }\n}\n```\n\n### Hide Restore / View Action\n\nTo hide the restore / view action globally for a resource within the `ActivitylogPlugin`, you can use the `isRestoreActionHidden` and `isResourceActionHidden` method. these are particularly useful in scenarios where you do not want users to have the ability to restore or view entries from the activity log. you can also customize the label of view action:\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->isRestoreActionHidden(true)\n                ->isResourceActionHidden(true)\n                ->resourceActionLabel(\"Sample Label\")\n        ]);\n}\n```\n\n### Show Restore (Soft Deletes)\n\nIn the `laravel-activitylog` configuration file `config/activitylog.php`:\n\n```php\nreturn [\n    'subject_returns_soft_deleted_models' => true,\n]\n```\n\nTo globally display the restore (soft delete) action of a resource within the `ActivitylogPlugin`, you can use the `isRestoreModelActionHidden` method. This is particularly useful in scenarios where you do not want users to have the ability to restore activity log entries:\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->isRestoreModelActionHidden(false)\n        ]);\n}\n```\n\n### Role Policy\n\nTo ensure ActivitylogResource access via RolePolicy you would need to add the following to your AppServiceProvider:\n\n```php\nuse App\\Policies\\ActivityPolicy;\nuse Illuminate\\Support\\Facades\\Gate;\nuse Spatie\\Activitylog\\Models\\Activity;\n\nclass AppServiceProvider extends ServiceProvider\n{\n    public function boot(): void\n    {\n        Gate::policy(Activity::class, ActivityPolicy::class);\n    }\n}\n```\n\n## Full configuration\n\n```php\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        ->plugins([\n            ActivitylogPlugin::make()\n                ->resource(\\Path\\For\\Your\\CustomResource::class)\n                ->label('Log')\n                ->pluralLabel('Logs')\n                ->navigationItem(true)\n                ->navigationGroup('Activity Log')\n                ->navigationIcon('heroicon-o-shield-check')\n                ->navigationCountBadge(true)\n                ->navigationSort(2)\n                ->authorize(\n                    fn () => auth()->user()->id === 1\n                )\n                ->translateSubject(fn($label) => __(\"yourCustomLangFile.\".$label)),\n                ->dateParser(\n                    fn($date) => auth()->user()->isJalaliCalendar() ?\n                        Jalalian::fromDateTime($date) :\n                        Carbon::parse($date)\n                )\n                ->dateFormat('Y-m-d')\n                ->datetimeFormat(fn() => auth()->user()->getFilamentDateTimeFormat())\n                ->customizeDatetimeColumn(function ($column) {\n                    return $column->when(\n                        auth()->user()->isJalaliCalendar(),\n                        function ($column) {\n                            return $column->jalaliDateTime();\n                        }\n                    );\n                })\n                ->customizeDatePicker(function ($field) {\n                    return $field->when(\n                        auth()->user()->isJalaliCalendar(),\n                        function ($field) {\n                            return $field->jalali();\n                        }\n                    );\n                })\n                ->isRestoreActionHidden(true)\n                ->isResourceActionHidden(true)\n                ->isRestoreModelActionHidden(false)\n                ->resourceActionLabel(\"Sample Label\"),\n        ]);\n}\n```\n\n## Relationship manager\n\nIf you have a model that uses the `Spatie\\Activitylog\\Traits\\LogsActivity` trait, you can add the `Rmsramos\\Activitylog\\RelationManagers\\ActivitylogRelationManager` relationship manager to your Filament resource to display all of the activity logs that are performed on your model.\n![Screenshot of Application Feature](https://raw.githubusercontent.com/rmsramos/activitylog/main/arts/relationManager.png)\n\n```php\nuse Rmsramos\\Activitylog\\RelationManagers\\ActivitylogRelationManager;\n\npublic static function getRelations(): array\n{\n    return [\n        ActivitylogRelationManager::class,\n    ];\n}\n```\n\n## Timeline Action\n\n![Screenshot of Application Feature](https://raw.githubusercontent.com/rmsramos/activitylog/main/arts/timeline.png)\n\nTo make viewing activity logs easier, you can use a custom action. In your UserResource in the table function, add the `ActivityLogTimelineTableAction`.\n\n```php\nuse Rmsramos\\Activitylog\\Actions\\ActivityLogTimelineTableAction;\n\npublic static function table(Table $table): Table\n{\n    return $table\n        ->actions([\n            ActivityLogTimelineTableAction::make('Activities'),\n        ]);\n}\n```\n\nyou can pass a matrix with the relationships, remember to configure your `Models`.\n\n```php\npublic static function table(Table $table): Table\n{\n    return $table\n        ->actions([\n            ActivityLogTimelineTableAction::make('Activities')\n                ->withRelations(['profile', 'address']), //opcional\n        ]);\n}\n```\n\nYou can configure the icons and colors, by default the `'heroicon-m-check'` icon and the `'primary'` color are used.\n\n```php\nuse Rmsramos\\Activitylog\\Actions\\ActivityLogTimelineTableAction;\n\npublic static function table(Table $table): Table\n{\n    return $table\n        ->actions([\n            ActivityLogTimelineTableAction::make('Activities')\n                ->timelineIcons([\n                    'created' => 'heroicon-m-check-badge',\n                    'updated' => 'heroicon-m-pencil-square',\n                ])\n                ->timelineIconColors([\n                    'created' => 'info',\n                    'updated' => 'warning',\n                ])\n        ]);\n}\n```\n\nYou can limit the number of results in the query by passing a limit, by default the last 10 records are returned.\n\n```php\nuse Rmsramos\\Activitylog\\Actions\\ActivityLogTimelineTableAction;\n\npublic static function table(Table $table): Table\n{\n    return $table\n        ->actions([\n            ActivityLogTimelineTableAction::make('Activities')\n                ->limit(30),\n        ]);\n}\n```\n\n## Full Timeline configuration\n\n```php\nuse Rmsramos\\Activitylog\\Actions\\ActivityLogTimelineTableAction;\n\npublic static function table(Table $table): Table\n{\n    return $table\n        ->actions([\n            ActivityLogTimelineTableAction::make('Activities')\n                ->withRelations(['profile', 'address'])\n                ->timelineIcons([\n                    'created' => 'heroicon-m-check-badge',\n                    'updated' => 'heroicon-m-pencil-square',\n                ])\n                ->timelineIconColors([\n                    'created' => 'info',\n                    'updated' => 'warning',\n                ])\n                ->limit(10),\n        ]);\n}\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Acknowledgements\n\nSpecial acknowledgment goes to these remarkable tools and people (developers), the Activity Log plugin only exists due to the inspiration and at some point the use of these people's codes.\n\n-   [Jay-Are Ocero](https://github.com/199ocero/activity-timeline)\n-   [Alex Justesen](https://github.com/alexjustesen)\n-   [z3d0x](https://github.com/z3d0x/filament-logger)\n-   [Filament](https://github.com/filamentphp/filament)\n-   [Spatie Activitylog Contributors](https://github.com/spatie/laravel-activitylog#credits)\n\n## Credits\n\n-   [Rômulo Ramos](https://github.com/rmsramos)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"rmsramos/activitylog\",\n    \"description\": \"This is my package activitylog\",\n    \"keywords\": [\n        \"Rmsramos\",\n        \"laravel\",\n        \"activitylog\"\n    ],\n    \"homepage\": \"https://github.com/rmsramos/activitylog\",\n    \"license\": \"MIT\",\n    \"authors\": [\n        {\n            \"name\": \"Rômulo Ramos\",\n            \"email\": \"rmsramos@gmail.com\",\n            \"role\": \"Developer\"\n        }\n    ],\n    \"require\": {\n        \"php\": \"^8.2\",\n        \"illuminate/contracts\": \"^11.0||^12.0\",\n        \"spatie/laravel-activitylog\": \"^4.8\",\n        \"spatie/laravel-package-tools\": \"^1.16\"\n    },\n    \"require-dev\": {\n        \"larastan/larastan\": \"^2.9\",\n        \"laravel/pint\": \"^1.16\",\n        \"nunomaduro/collision\": \"^8.1.1||^7.10.0\",\n        \"orchestra/testbench\": \"^9.0.0||^8.22.0\",\n        \"pestphp/pest\": \"^2.34\",\n        \"pestphp/pest-plugin-arch\": \"^2.7\",\n        \"pestphp/pest-plugin-laravel\": \"^2.3\",\n        \"phpstan/extension-installer\": \"^1.3\",\n        \"phpstan/phpstan-deprecation-rules\": \"^1.1\",\n        \"phpstan/phpstan-phpunit\": \"^1.3\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"Rmsramos\\\\Activitylog\\\\\": \"src/\",\n            \"Rmsramos\\\\Activitylog\\\\Database\\\\Factories\\\\\": \"database/factories/\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"Rmsramos\\\\Activitylog\\\\Tests\\\\\": \"tests/\",\n            \"Workbench\\\\App\\\\\": \"workbench/app/\"\n        }\n    },\n    \"scripts\": {\n        \"post-autoload-dump\": \"@composer run prepare\",\n        \"clear\": \"@php vendor/bin/testbench package:purge-activitylog --ansi\",\n        \"prepare\": \"@php vendor/bin/testbench package:discover --ansi\",\n        \"build\": [\n            \"@composer run prepare\",\n            \"@php vendor/bin/testbench workbench:build --ansi\"\n        ],\n        \"start\": [\n            \"Composer\\\\Config::disableProcessTimeout\",\n            \"@composer run build\",\n            \"@php vendor/bin/testbench serve\"\n        ],\n        \"analyse\": \"vendor/bin/phpstan analyse\",\n        \"test\": \"vendor/bin/pest\",\n        \"test-coverage\": \"vendor/bin/pest --coverage\",\n        \"format\": \"vendor/bin/pint\"\n    },\n    \"config\": {\n        \"sort-packages\": true,\n        \"allow-plugins\": {\n            \"pestphp/pest-plugin\": true,\n            \"phpstan/extension-installer\": true\n        }\n    },\n    \"extra\": {\n        \"laravel\": {\n            \"providers\": [\n                \"Rmsramos\\\\Activitylog\\\\ActivitylogServiceProvider\"\n            ],\n            \"aliases\": {\n                \"Activitylog\": \"Rmsramos\\\\Activitylog\\\\Facades\\\\Activitylog\"\n            }\n        }\n    },\n    \"minimum-stability\": \"dev\",\n    \"prefer-stable\": true\n}\n"
  },
  {
    "path": "config/filament-activitylog.php",
    "content": "<?php\n\nreturn [\n    'resources' => [\n        'label' => 'Activity Log',\n        'plural_label' => 'Activity Logs',\n        'hide_restore_action' => false,\n        'restore_action_label' => 'Restore',\n        'hide_resource_action' => false,\n        'hide_restore_model_action' => true,\n        'resource_action_label' => 'View',\n        'navigation_item' => true,\n        'navigation_group' => null,\n        'navigation_icon' => 'heroicon-o-shield-check',\n        'navigation_sort' => null,\n        'default_sort_column' => 'id',\n        'default_sort_direction' => 'desc',\n        'navigation_count_badge' => false,\n        'resource' => \\Rmsramos\\Activitylog\\Resources\\ActivitylogResource\\ActivitylogResource::class,\n    ],\n    'date_format' => 'd/m/Y',\n    'datetime_format' => 'd/m/Y H:i:s',\n];\n"
  },
  {
    "path": "package.json",
    "content": "{\n    \"private\": true,\n    \"type\": \"module\",\n    \"scripts\": {\n        \"dev:styles\": \"npx tailwindcss -i resources/css/plugin.css -o resources/dist/activitylog.css --postcss --watch\",\n        \"build:styles\": \"npx tailwindcss -i resources/css/plugin.css -o resources/dist/activitylog.css --postcss --minify && npm run purge\",\n        \"purge\": \"filament-purge -i resources/dist/activitylog.css -o resources/dist/activitylog.css -v 3.x\",\n        \"dev\": \"npm-run-all --parallel dev:*\",\n        \"build\": \"npm-run-all build:*\"\n    },\n    \"devDependencies\": {\n        \"@awcodes/filament-plugin-purge\": \"^1.1.0\",\n        \"@tailwindcss/forms\": \"^0.5.3\",\n        \"@tailwindcss/typography\": \"^0.5.9\",\n        \"alpinejs\": \"^3.10.5\",\n        \"autoprefixer\": \"^10.4.7\",\n        \"esbuild\": \"^0.17.0\",\n        \"npm-run-all\": \"^4.1.5\",\n        \"postcss\": \"^8.4.14\",\n        \"postcss-import\": \"^15.1.0\",\n        \"tailwindcss\": \"^3.1.6\"\n    }\n}\n"
  },
  {
    "path": "pint.json",
    "content": "{\n    \"preset\": \"laravel\",\n    \"rules\": {\n        \"method_chaining_indentation\": true,\n        \"group_import\": false,\n        \"single_import_per_statement\": false,\n        \"no_unused_imports\": true,\n        \"array_indentation\": true,\n        \"array_syntax\": {\n            \"syntax\": \"short\"\n        },\n        \"binary_operator_spaces\": {\n            \"default\": \"single_space\",\n            \"operators\": {\n                \"=\": \"align_single_space_minimal\",\n                \"=>\": \"align_single_space_minimal\"\n            }\n        },\n        \"blank_line_after_namespace\": true,\n        \"blank_line_after_opening_tag\": false,\n        \"class_attributes_separation\": {\n            \"elements\": {\n                \"property\": \"one\"\n            }\n        },\n        \"concat_space\": {\n            \"spacing\": \"one\"\n        },\n        \"declare_equal_normalize\": {\n            \"space\": \"single\"\n        },\n        \"elseif\": false,\n        \"encoding\": true,\n        \"indentation_type\": true,\n        \"no_useless_else\": false,\n        \"no_useless_return\": true,\n        \"ordered_imports\": true,\n        \"ternary_operator_spaces\": true,\n        \"no_extra_blank_lines\": true,\n        \"no_multiline_whitespace_around_double_arrow\": true,\n        \"multiline_whitespace_before_semicolons\": true,\n        \"no_singleline_whitespace_before_semicolons\": true,\n        \"no_spaces_around_offset\": true,\n        \"ternary_to_null_coalescing\": true,\n        \"whitespace_after_comma_in_array\": true,\n        \"trim_array_spaces\": true,\n        \"trailing_comma_in_multiline\": true,\n        \"unary_operator_spaces\": true,\n        \"blank_line_before_statement\": {\n            \"statements\": [\n                \"break\",\n                \"continue\",\n                \"declare\",\n                \"return\",\n                \"throw\",\n                \"try\",\n                \"continue\",\n                \"do\",\n                \"exit\",\n                \"for\",\n                \"foreach\",\n                \"if\",\n                \"include\",\n                \"include_once\",\n                \"require\",\n                \"require_once\"\n            ]\n        }\n    }\n}\n"
  },
  {
    "path": "postcss.config.js",
    "content": "export default {\n    plugins: {\n        tailwindcss: {},\n        autoprefixer: {},\n    },\n};\n"
  },
  {
    "path": "resources/css/plugin.css",
    "content": "@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "resources/dist/activitylog.css",
    "content": ".-start-3{inset-inline-start:-.75rem}.mr-1{margin-right:.25rem}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.bg-gray-500\\/10{background-color:#6b72801a}.ring-1,.ring-4{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}:is(.dark .dark\\:divide-gray-700)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}:is(.dark .dark\\:border-gray-700){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\\:bg-gray-700){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}:is(.dark .dark\\:bg-white\\/5){background-color:#ffffff0d}:is(.dark .dark\\:text-gray-200){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\\:text-gray-500){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}:is(.dark .dark\\:ring-gray-900){--tw-ring-opacity:1;--tw-ring-color:rgb(17 24 39/var(--tw-ring-opacity))}:is(.dark .dark\\:ring-white\\/10){--tw-ring-color:#ffffff1a}"
  },
  {
    "path": "resources/lang/ar/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'سجل نشاط المستخدم',\n        'description' => 'تتبع جميع أنشطة المستخدم',\n        'tooltip'     => 'أنشطة المستخدم',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/ar/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'النوع',\n        ],\n        'event' => [\n            'label' => 'الحدث',\n        ],\n        'subject_type' => [\n            'label' => 'الموضوع',\n        ],\n        'causer' => [\n            'label' => 'المستخدم',\n        ],\n        'description' => [\n            'label' => 'الوصف',\n        ],\n        'properties' => [\n            'label' => 'الخصائص',\n        ],\n        'created_at' => [\n            'label' => 'تاريخ التسجيل',\n        ],\n        'old' => [\n            'label' => 'القديم',\n        ],\n        'attributes' => [\n            'label' => 'الجديد',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/ar/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'النوع',\n        ],\n        'event' => [\n            'label' => 'الحدث',\n        ],\n        'subject_type' => [\n            'label' => 'الموضوع',\n        ],\n        'causer' => [\n            'label' => 'المستخدم',\n        ],\n        'properties' => [\n            'label' => 'الخصائص',\n        ],\n        'created_at' => [\n            'label' => 'تاريخ التسجيل',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'تاريخ التسجيل',\n            'created_from'  => 'تاريخ الإنشاء من',\n            'created_until' => 'تاريخ الإنشاء حتى',\n        ],\n        'event' => [\n            'label' => 'الحدث',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/ar/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'تم تعديل <strong>%s</strong> بواسطة <strong>%s</strong>. <br><small> تم التحديث في: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => 'تم تعديل الخصائص التالية بواسطة %s: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s من <strong>%s</strong> إلى <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/de/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'User Aktivitäten Log',\n        'description' => 'Tracke alle Aktivitäten, die von Benutzern in der Anwendung durchgeführt werden.',\n        'tooltip'     => 'User Aktivitäten',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/de/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Typ',\n        ],\n        'event' => [\n            'label' => 'Ereigniss',\n        ],\n        'subject_type' => [\n            'label' => 'Betreff',\n        ],\n        'causer' => [\n            'label' => 'Benutzer',\n        ],\n        'description' => [\n            'label' => 'Beschreibung',\n        ],\n        'properties' => [\n            'label' => 'Attribute',\n        ],\n        'created_at' => [\n            'label' => 'Logzeitpunkt',\n        ],\n        'old' => [\n            'label' => 'Alt',\n        ],\n        'attributes' => [\n            'label' => 'Neu',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/de/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Typ',\n        ],\n        'event' => [\n            'label' => 'Ereignis',\n        ],\n        'subject_type' => [\n            'label' => 'Betreff',\n        ],\n        'causer' => [\n            'label' => 'Benutzer',\n        ],\n        'properties' => [\n            'label' => 'Attribute',\n        ],\n        'created_at' => [\n            'label' => 'Logzeitpunkt',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Logzeitpunkt',\n            'created_from'  => 'Geloggt von ',\n            'created_until' => 'Geloggt bis',\n        ],\n        'event' => [\n            'label' => 'Ereignis',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/de/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => '<strong>%s</strong> wurde <strong>%s</strong> von <strong>%s</strong>. <br><small> Änderung am: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s das folgende: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s von <strong>%s</strong> auf <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/en/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'User Activity Log',\n        'description' => 'Track all user activities',\n        'tooltip'     => 'User Activities',\n    ],\n    'event' => [\n        'created'  => 'created',\n        'deleted'  => 'deleted',\n        'updated'  => 'updated',\n        'restored' => 'restored',\n    ],\n    'view'                => 'View',\n    'edit'                => 'Edit',\n    'restore'             => 'Restore',\n    'restore_soft_delete' => [\n        'label'             => 'Restore Model',\n        'modal_heading'     => 'Restore Deleted Model',\n        'modal_description' => 'This will restore the model that was deleted (soft delete).',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/en/forms.php",
    "content": "<?php\n\nreturn [\n    'changes' => 'Changes',\n    'fields'  => [\n        'log_name' => [\n            'label' => 'Type',\n        ],\n        'event' => [\n            'label' => 'Event',\n        ],\n        'subject_type' => [\n            'label' => 'Subject',\n        ],\n        'causer' => [\n            'label' => 'User',\n        ],\n        'description' => [\n            'label' => 'Description',\n        ],\n        'properties' => [\n            'label' => 'Properties',\n        ],\n        'created_at' => [\n            'label' => 'Logged at',\n        ],\n        'old' => [\n            'label' => 'Old',\n        ],\n        'attributes' => [\n            'label' => 'New',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/en/infolists.php",
    "content": "<?php\n\nreturn [\n    'components' => [\n        'created_by_at'             => 'The <strong>:subject</strong> was <strong>:event</strong> by <strong>:causer</strong>. <br><small> Updated at: <strong>:update_at</strong></small>',\n        'updater_updated'           => ':causer :event the following: <br>:changes',\n        'from_oldvalue_to_newvalue' => '- :key from <strong>:old_value</strong> to <strong>:new_value</strong>',\n        'to_newvalue'               => '- :key <strong>:new_value</strong>',\n        'unknown'                   => 'Unknown',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/en/notifications.php",
    "content": "<?php\n\nreturn [\n    'no_properties_to_restore'       => 'No properties to restore.',\n    'activity_restored'              => 'Activity restored.',\n    'activity_restored_successfully' => 'Activity restored successfully.',\n    'failed_to_restore_activity'     => 'Failed to restore activity : :error.',\n    'subject_not_found'              => 'Subject not found.',\n    'unable_to_restore_this_model'   => 'Unable to restore this model',\n    'model_successfully_restored'    => 'Model successfully restored',\n    'error_restoring_model'          => 'Erro ao restaurar modelo',\n];\n"
  },
  {
    "path": "resources/lang/en/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Type',\n        ],\n        'event' => [\n            'label' => 'Event',\n        ],\n        'subject_type' => [\n            'label'        => 'Subject',\n            'soft_deleted' => ' (Soft Deleted)',\n            'deleted'      => ' (Deleted)',\n        ],\n        'causer' => [\n            'label' => 'User',\n        ],\n        'properties' => [\n            'label' => 'Properties',\n        ],\n        'created_at' => [\n            'label' => 'Logged at',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'                   => 'Logged at',\n            'created_from'            => 'Created from ',\n            'created_from_indicator'  => 'Created from  : :created_from',\n            'created_until'           => 'Created until ',\n            'created_until_indicator' => 'Created until  : :created_until',\n        ],\n        'event' => [\n            'label' => 'Event',\n        ],\n        'log_name' => [\n            'label' => 'Log name',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/en/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/es/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Registro de actividad de usuario',\n        'description' => 'Realizar un seguimiento de todas las actividades de los usuarios',\n        'tooltip'     => 'Actividades de usuario',\n    ],\n    'event' => [\n        'created'  => 'creado',\n        'deleted'  => 'eliminado',\n        'updated'  => 'actualizado',\n        'restored' => 'restaurado',\n    ],\n    'view'                => 'Ver',\n    'edit'                => 'Editar',\n    'restore'             => 'Restaurar',\n    'restore_soft_delete' => [\n        'label'             => 'Restaurar modelo',\n        'modal_heading'     => 'Restaurar modelo eliminado',\n        'modal_description' => 'Esto restaurará el modelo que fue eliminado (borrado lógico).',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/es/forms.php",
    "content": "<?php\n\nreturn [\n    'changes' => 'Cambios',\n    'fields'  => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label' => 'Sujeto',\n        ],\n        'causer' => [\n            'label' => 'Usuario',\n        ],\n        'description' => [\n            'label' => 'Descripción',\n        ],\n        'properties' => [\n            'label' => 'Propiedades',\n        ],\n        'created_at' => [\n            'label' => 'Registrado en',\n        ],\n        'old' => [\n            'label' => 'Anterior',\n        ],\n        'attributes' => [\n            'label' => 'Nuevo',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/es/infolists.php",
    "content": "<?php\n\nreturn [\n    'components' => [\n        'created_by_at'             => 'El <strong>:subject</strong> fue <strong>:event</strong> por <strong>:causer</strong>. <br><small> Actualizado en: <strong>:update_at</strong></small>',\n        'updater_updated'           => ':causer :event lo siguiente: <br>:changes',\n        'from_oldvalue_to_newvalue' => '- :key de <strong>:old_value</strong> a <strong>:new_value</strong>',\n        'to_newvalue'               => '- :key <strong>:new_value</strong>',\n        'unknown'                   => 'Desconocido',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/es/notifications.php",
    "content": "<?php\n\nreturn [\n    'no_properties_to_restore'       => 'No hay propiedades para restaurar.',\n    'activity_restored'              => 'Actividad restaurada.',\n    'activity_restored_successfully' => 'Actividad restaurada con éxito.',\n    'failed_to_restore_activity'     => 'Error al restaurar la actividad: :error.',\n    'subject_not_found'              => 'Sujeto no encontrado.',\n    'unable_to_restore_this_model'   => 'No se puede restaurar este modelo.',\n    'model_successfully_restored'    => 'Modelo restaurado con éxito.',\n    'error_restoring_model'          => 'Error al restaurar modelo',\n];\n"
  },
  {
    "path": "resources/lang/es/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label'        => 'Sujeto',\n            'soft_deleted' => ' (borrado lógico)',\n            'deleted'      => ' (eliminado)',\n        ],\n        'causer' => [\n            'label' => 'Usuario',\n        ],\n        'properties' => [\n            'label' => 'Propiedades',\n        ],\n        'created_at' => [\n            'label' => 'Registrado en',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'                   => 'Registrado en',\n            'created_from'            => 'Creado desde ',\n            'created_from_indicator'  => 'Creado desde: :created_from',\n            'created_until'           => 'Creado hasta ',\n            'created_until_indicator' => 'Creado hasta: :created_until',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/es/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'El <strong>%s</strong> fue <strong>%s</strong> por <strong>%s</strong>. <br><small> Actualizado en: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s lo siguiente: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s de <strong>%s</strong> a <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fa/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'سیاهه‌فعالیت‌کاربر',\n        'description' => 'ردیابی تمام فعالیت های کاربر',\n        'tooltip'     => 'فعالیت های کاربر',\n    ],\n    'event' => [\n        'created'  => 'ایجاد شد',\n        'deleted'  => 'حذف شد',\n        'updated'  => 'بروزرسانی شد',\n        'restored' => 'بازیابی شد',\n    ],\n    'view'    => 'نمایش',\n    'edit'    => 'ویرایش',\n    'restore' => 'بازیابی',\n];\n"
  },
  {
    "path": "resources/lang/fa/forms.php",
    "content": "<?php\n\nreturn [\n    'changes' => 'تغییرات',\n    'fields'  => [\n        'log_name' => [\n            'label' => 'نوع',\n        ],\n        'event' => [\n            'label' => 'رویداد',\n        ],\n        'subject_type' => [\n            'label' => 'موضوع مورد سیاهه',\n        ],\n        'causer' => [\n            'label' => 'کاربر',\n        ],\n        'description' => [\n            'label' => 'توضیحات',\n        ],\n        'properties' => [\n            'label' => 'تغییرات',\n        ],\n        'created_at' => [\n            'label' => 'ورود به سیستم در',\n        ],\n        'old' => [\n            'label' => 'قدیمی',\n        ],\n        'attributes' => [\n            'label' => 'جدید',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fa/infolists.php",
    "content": "<?php\n\nreturn [\n    'components' => [\n        'created_by_at'             => '<strong>:subject</strong> توسط <strong>:causer</strong> در تاریخ <strong>:update_at</strong> <strong>:event</strong>.',\n        'updater_updated'           => 'ویژگی های زیر توسط <strong>:causer</strong> :event :<br> :changes ',\n        'from_oldvalue_to_newvalue' => 'مقدار ویژگی :key از <strong>:old_value</strong> به <strong>:new_value</strong> تغییر کرد.',\n        'to_newvalue'               => 'ویژگی :key به <strong>:new_value</strong> مقدار دهی شد.',\n        'unknown'                   => 'ناشناس',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fa/notifications.php",
    "content": "<?php\n\nreturn [\n    'no_properties_to_restore'       => 'مقادیری برای بازگردانی وجود ندارد.',\n    'activity_restored'              => 'فعالیت بازگردانی شد.',\n    'activity_restored_successfully' => 'فعالیت با موفقیت بازگردانی شد.',\n    'failed_to_restore_activity'     => 'بازگردانی فعالیت ناموفق بود. خطا : :error',\n];\n"
  },
  {
    "path": "resources/lang/fa/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'نوع',\n        ],\n        'event' => [\n            'label' => 'رویداد',\n        ],\n        'subject_type' => [\n            'label' => 'مفعول',\n        ],\n        'causer' => [\n            'label' => 'کاربر',\n        ],\n        'properties' => [\n            'label' => 'تغییرات',\n        ],\n        'created_at' => [\n            'label' => 'ورود به سیستم در',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'                   => 'ورود به سیستم در',\n            'created_from'            => 'ایجاد شده از ',\n            'created_from_indicator'  => 'ایجاد شده از تاریخ : :created_from',\n            'created_until'           => 'ایجاد شده تا ',\n            'created_until_indicator' => 'ایجاد شده تا تاریخ : :created_until',\n        ],\n        'event' => [\n            'label' => 'رویداد',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fa/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fr/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Journal d\\'activité des utilisateurs',\n        'description' => 'Suivre toutes les activités des utilisateurs',\n        'tooltip'     => 'Activités des utilisateurs',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fr/forms.php",
    "content": "<?php\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Type',\n        ],\n        'event' => [\n            'label' => 'Événement',\n        ],\n        'subject_type' => [\n            'label' => 'Sujet',\n        ],\n        'causer' => [\n            'label' => 'Utilisateur',\n        ],\n        'description' => [\n            'label' => 'Description',\n        ],\n        'properties' => [\n            'label' => 'Propriétés',\n        ],\n        'created_at' => [\n            'label' => 'Enregistré à',\n        ],\n        'old' => [\n            'label' => 'Ancien',\n        ],\n        'attributes' => [\n            'label' => 'Nouveau',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fr/tables.php",
    "content": "<?php\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Type',\n        ],\n        'event' => [\n            'label' => 'Événement',\n        ],\n        'subject_type' => [\n            'label' => 'Sujet',\n        ],\n        'causer' => [\n            'label' => 'Utilisateur',\n        ],\n        'properties' => [\n            'label' => 'Propriétés',\n        ],\n        'created_at' => [\n            'label' => 'Enregistré à',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Enregistré à',\n            'created_from'  => 'Créé à partir de ',\n            'created_until' => 'Créé jusqu\\'à ',\n        ],\n        'event' => [\n            'label' => 'Événement',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/fr/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/he/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'יומן פעילות משתמש',\n        'description' => 'הצגת כל פעילויות המשתמש',\n        'tooltip'     => 'פעילויות משתמש',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/he/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'סוג',\n        ],\n        'event' => [\n            'label' => 'אירוע',\n        ],\n        'subject_type' => [\n            'label' => 'נושא',\n        ],\n        'causer' => [\n            'label' => 'משתמש',\n        ],\n        'description' => [\n            'label' => 'תיאור',\n        ],\n        'properties' => [\n            'label' => 'מאפיינים',\n        ],\n        'created_at' => [\n            'label' => 'נוצר',\n        ],\n        'old' => [\n            'label' => 'ישן',\n        ],\n        'attributes' => [\n            'label' => 'חדש',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/he/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'סוג',\n        ],\n        'event' => [\n            'label' => 'אירוע',\n        ],\n        'subject_type' => [\n            'label' => 'נושא',\n        ],\n        'causer' => [\n            'label' => 'משתמש',\n        ],\n        'properties' => [\n            'label' => 'מאפיינים',\n        ],\n        'created_at' => [\n            'label' => 'נוצר',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'נוצר',\n            'created_from'  => 'נוצר מ',\n            'created_until' => 'נוצר עד',\n        ],\n        'event' => [\n            'label' => 'אירוע',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/he/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/id/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Log Aktivitas Pengguna',\n        'description' => 'Lacak semua aktivitas pengguna',\n        'tooltip'     => 'Aktivitas Pengguna',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/id/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Jenis',\n        ],\n        'event' => [\n            'label' => 'Peristiwa',\n        ],\n        'subject_type' => [\n            'label' => 'Subjek',\n        ],\n        'causer' => [\n            'label' => 'Pengguna',\n        ],\n        'description' => [\n            'label' => 'Keterangan',\n        ],\n        'properties' => [\n            'label' => 'Properti',\n        ],\n        'created_at' => [\n            'label' => 'Masuk di',\n        ],\n        'old' => [\n            'label' => 'Tua',\n        ],\n        'attributes' => [\n            'label' => 'Baru',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/id/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Jenis',\n        ],\n        'event' => [\n            'label' => 'Peristiwa',\n        ],\n        'subject_type' => [\n            'label' => 'Subjek',\n        ],\n        'causer' => [\n            'label' => 'Pengguna',\n        ],\n        'properties' => [\n            'label' => 'Properti',\n        ],\n        'created_at' => [\n            'label' => 'Masuk di',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Masuk di',\n            'created_from'  => 'Dibuat dari',\n            'created_until' => 'Dibuat sampai',\n        ],\n        'event' => [\n            'label' => 'Peristiwa',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/id/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/it/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Log Attività Utente',\n        'description' => 'Traccia tutte le attività dell\\'utente',\n        'tooltip'     => 'Attività dell\\'utente',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/it/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label' => 'Soggetto',\n        ],\n        'causer' => [\n            'label' => 'Utente',\n        ],\n        'description' => [\n            'label' => 'Descrizione',\n        ],\n        'properties' => [\n            'label' => 'Proprietà',\n        ],\n        'created_at' => [\n            'label' => 'Loggato il',\n        ],\n        'old' => [\n            'label' => 'Vecchio',\n        ],\n        'attributes' => [\n            'label' => 'Nuovo',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/it/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label' => 'Soggetto',\n        ],\n        'causer' => [\n            'label' => 'Utente',\n        ],\n        'properties' => [\n            'label' => 'Proprietà',\n        ],\n        'created_at' => [\n            'label' => 'Loggato il',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Loggato il',\n            'created_from'  => 'Creato da ',\n            'created_until' => 'Creato fino al ',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/it/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/lv/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Lietotāju darbību žurnāls',\n        'description' => 'Sekojiet līdzi visām lietotāju darbībām',\n        'tooltip'     => 'Lietotāju darbības',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/lv/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Tips',\n        ],\n        'event' => [\n            'label' => 'Notikums',\n        ],\n        'subject_type' => [\n            'label' => 'Objekts',\n        ],\n        'causer' => [\n            'label' => 'Lietotājs',\n        ],\n        'description' => [\n            'label' => 'Apraksts',\n        ],\n        'properties' => [\n            'label' => 'Īpašības',\n        ],\n        'created_at' => [\n            'label' => 'Ierakstīts',\n        ],\n        'old' => [\n            'label' => 'Vecs',\n        ],\n        'attributes' => [\n            'label' => 'Jauns',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/lv/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Tips',\n        ],\n        'event' => [\n            'label' => 'Notikums',\n        ],\n        'subject_type' => [\n            'label' => 'Objekts',\n        ],\n        'causer' => [\n            'label' => 'Lietotājs',\n        ],\n        'properties' => [\n            'label' => 'Īpašības',\n        ],\n        'created_at' => [\n            'label' => 'Ierakstīts',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Ierakstīts',\n            'created_from'  => 'Izveidots no ',\n            'created_until' => 'Izveidots līdz ',\n        ],\n        'event' => [\n            'label' => 'Notikums',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/lv/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => '<strong>%s</strong> tika <strong>%s</strong> ar lietotāju <strong>%s</strong>. <br><small> Atjaunots: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s sekojošu: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s no <strong>%s</strong> uz <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/nl/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Gebruikersctiviteiten Log',\n        'description' => 'Volg alle gebruikersactiviteiten',\n        'tooltip'     => 'Gebruikersctiviteiten',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/nl/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Type',\n        ],\n        'event' => [\n            'label' => 'Event',\n        ],\n        'subject_type' => [\n            'label' => 'Onderwerp',\n        ],\n        'causer' => [\n            'label' => 'Gebruiker',\n        ],\n        'description' => [\n            'label' => 'Omschrijving',\n        ],\n        'properties' => [\n            'label' => 'Velden',\n        ],\n        'created_at' => [\n            'label' => 'Gelogd op',\n        ],\n        'old' => [\n            'label' => 'Oud',\n        ],\n        'attributes' => [\n            'label' => 'Nieuw',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/nl/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Type',\n        ],\n        'event' => [\n            'label' => 'Event',\n        ],\n        'subject_type' => [\n            'label' => 'Onderwerp',\n        ],\n        'causer' => [\n            'label' => 'Gebruiker',\n        ],\n        'properties' => [\n            'label' => 'Velden',\n        ],\n        'created_at' => [\n            'label' => 'Gelogd op',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Gelogd op',\n            'created_from'  => 'Aangemaakt van ',\n            'created_until' => 'Aangemaakt tot ',\n        ],\n        'event' => [\n            'label' => 'Event',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/nl/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'De <strong>%s</strong> is <strong>%s</strong> door <strong>%s</strong>. <br><small> Geupdate om: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s het volgende: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s van <strong>%s</strong> tot <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pl/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Dziennik zdarzeń',\n        'description' => 'Sprawdź historię wszystkich zmian',\n        'tooltip'     => 'Historia zmian',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pl/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Typ',\n        ],\n        'event' => [\n            'label' => 'Zdarzenie',\n        ],\n        'subject_type' => [\n            'label' => 'Element',\n        ],\n        'causer' => [\n            'label' => 'Użytkownik',\n        ],\n        'description' => [\n            'label' => 'Opis',\n        ],\n        'properties' => [\n            'label' => 'Właściwości',\n        ],\n        'created_at' => [\n            'label' => 'Data zdarzenia',\n        ],\n        'old' => [\n            'label' => 'Przed zmianą',\n        ],\n        'attributes' => [\n            'label' => 'Po zmianie',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pl/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Typ',\n        ],\n        'event' => [\n            'label' => 'Zdarzenie',\n        ],\n        'subject_type' => [\n            'label' => 'Element',\n        ],\n        'causer' => [\n            'label' => 'Użytkownik',\n        ],\n        'properties' => [\n            'label' => 'Właściwości',\n        ],\n        'created_at' => [\n            'label' => 'Data zdarzenia',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Data zdarzenia',\n            'created_from'  => 'Utworzony od ',\n            'created_until' => 'Utworzony do ',\n        ],\n        'event' => [\n            'label' => 'Zdarzenie',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pl/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_BR/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Registro de Logs do usuário',\n        'description' => 'Acompanhe todas as atividades do usuário',\n        'tooltip'     => 'Atividades do usuário',\n    ],\n    'event' => [\n        'created'  => 'criado',\n        'deleted'  => 'excluído',\n        'updated'  => 'atualizado',\n        'restored' => 'restaurado',\n    ],\n    'view'                => 'Visualizar',\n    'edit'                => 'Editar',\n    'restore'             => 'Restaurar',\n    'restore_soft_delete' => [\n        'label'             => 'Restaurar Modelo',\n        'modal_heading'     => 'Restaurar Modelo Excluído',\n        'modal_description' => 'Isso irá restaurar o modelo que foi excluído (soft delete).',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_BR/forms.php",
    "content": "<?php\n\nreturn [\n    'changes' => 'Mudanças',\n    'fields'  => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label' => 'Assunto',\n        ],\n        'causer' => [\n            'label' => 'Usuário',\n        ],\n        'description' => [\n            'label' => 'Descrição',\n        ],\n        'properties' => [\n            'label' => 'Propriedades',\n        ],\n        'created_at' => [\n            'label' => 'Criando em',\n        ],\n        'old' => [\n            'label' => 'Antigo',\n        ],\n        'attributes' => [\n            'label' => 'Novo',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_BR/infolists.php",
    "content": "<?php\n\nreturn [\n    'components' => [\n        'created_by_at'             => 'O <strong>:subject</strong> foi <strong>:event</strong> por <strong>:causer</strong>. <br><small> Atualizado em: <strong>:update_at</strong></small>',\n        'updater_updated'           => ':causer :event o seguinte: <br>:changes',\n        'from_oldvalue_to_newvalue' => '- :key de <strong>:old_value</strong> para <strong>:new_value</strong>',\n        'to_newvalue'               => '- :key <strong>:new_value</strong>',\n        'unknown'                   => 'Desconhecido',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_BR/notifications.php",
    "content": "<?php\n\nreturn [\n    'no_properties_to_restore'       => 'Nenhuma propriedade para restaurar.',\n    'activity_restored'              => 'Atividade restaurada.',\n    'activity_restored_successfully' => 'Atividade restaurada com sucesso.',\n    'failed_to_restore_activity'     => 'Falha ao restaurar a atividade: :error.',\n    'subject_not_found'              => 'Registro não encontrado.',\n    'unable_to_restore_this_model'   => 'Não é possível restaurar este modelo',\n    'model_successfully_restored'    => 'Modelo restaurado com sucesso',\n    'error_restoring_model'          => 'Erro ao restaurar modelo',\n];\n"
  },
  {
    "path": "resources/lang/pt_BR/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label'        => 'Assunto',\n            'soft_deleted' => ' (Delete suave)',\n            'deleted'      => ' (Deletado)',\n        ],\n        'causer' => [\n            'label' => 'Usuário',\n        ],\n        'properties' => [\n            'label' => 'Propriedades',\n        ],\n        'created_at' => [\n            'label' => 'Criado em',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'                   => 'Criado em',\n            'created_from'            => 'Criado a partir de ',\n            'created_from_indicator'  => 'Criado a partir de  : :created_from',\n            'created_until'           => 'Criado até ',\n            'created_until_indicator' => 'Criado até  : :created_until',\n        ],\n        'event' => [\n            'label' => 'Eventos',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_BR/timeline.php",
    "content": "<?php\n\nreturn [\n    'title' => [\n        'modifiedTitle' => 'O <strong>%s</strong> foi <strong>%s</strong> por <strong>%s</strong>. <br><small> Atualizado em: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s o seguinte: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s de <strong>%s</strong> para <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_PT/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Registro de Logs do utilizador',\n        'description' => 'Acompanhe todas as atividades do utilizador.',\n        'tooltip'     => 'Atividades do utilizador',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_PT/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label' => 'Assunto',\n        ],\n        'causer' => [\n            'label' => 'Utilizador',\n        ],\n        'description' => [\n            'label' => 'Descrição',\n        ],\n        'properties' => [\n            'label' => 'Propriedades',\n        ],\n        'created_at' => [\n            'label' => 'Criando em',\n        ],\n        'old' => [\n            'label' => 'Antigo',\n        ],\n        'attributes' => [\n            'label' => 'Novo',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_PT/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Tipo',\n        ],\n        'event' => [\n            'label' => 'Evento',\n        ],\n        'subject_type' => [\n            'label' => 'Assunto',\n        ],\n        'causer' => [\n            'label' => 'Utilizador',\n        ],\n        'properties' => [\n            'label' => 'Propriedades',\n        ],\n        'created_at' => [\n            'label' => 'Criado em',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Criado em',\n            'created_from'  => 'Criado a partir de ',\n            'created_until' => 'Criado até ',\n        ],\n        'event' => [\n            'label' => 'Eventos',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/pt_PT/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/tr/action.php",
    "content": "<?php\n\nreturn [\n    'modal' => [\n        'heading'     => 'Kullanıcı Aktivite Günlüğü',\n        'description' => 'Tüm kullanıcı aktivitelerini takip edin',\n        'tooltip'     => 'Kullanıcı Aktiviteleri',\n    ],\n];\n"
  },
  {
    "path": "resources/lang/tr/forms.php",
    "content": "<?php\n\nreturn [\n    'fields' => [\n        'log_name' => [\n            'label' => 'Tip',\n        ],\n        'event' => [\n            'label' => 'Olay',\n        ],\n        'subject_type' => [\n            'label' => 'Konu',\n        ],\n        'causer' => [\n            'label' => 'Kullanıcı',\n        ],\n        'description' => [\n            'label' => 'Açıklama',\n        ],\n        'properties' => [\n            'label' => 'Özellikler',\n        ],\n        'created_at' => [\n            'label' => 'Kayıt Tarihi',\n        ],\n        'old' => [\n            'label' => 'Eski',\n        ],\n        'attributes' => [\n            'label' => 'Yeni',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/tr/tables.php",
    "content": "<?php\n\nreturn [\n    'columns' => [\n        'log_name' => [\n            'label' => 'Tip',\n        ],\n        'event' => [\n            'label' => 'Olay',\n        ],\n        'subject_type' => [\n            'label' => 'Konu',\n        ],\n        'causer' => [\n            'label' => 'Kullanıcı',\n        ],\n        'properties' => [\n            'label' => 'Özellikler',\n        ],\n        'created_at' => [\n            'label' => 'Kayıt Tarihi',\n        ],\n    ],\n    'filters' => [\n        'created_at' => [\n            'label'         => 'Kayıt Tarihi',\n            'created_from'  => 'Kayıt tarihinden ',\n            'created_until' => 'Kayıt tarihine ',\n        ],\n        'event' => [\n            'label' => 'Olay',\n        ],\n    ],\n];\n"
  },
  {
    "path": "resources/lang/tr/timeline.php",
    "content": "<?php\nreturn [\n    'title' => [\n        'modifiedTitle' => 'The <strong>%s</strong> was <strong>%s</strong> by <strong>%s</strong>. <br><small> Updated at: <strong>%s</strong></small>',\n    ],\n    'properties' => [\n        'modifiedProperties'     => '%s %s the following: <br>%s',\n        'compareOldAndNewValues' => [\n            'notEquals' => '- %s from <strong>%s</strong> to <strong>%s</strong>',\n            'equals'    => '- %s <strong>%s</strong>',\n        ],\n        'getNewValues' => '- %s <strong>%s</strong>',\n    ],\n];\n"
  },
  {
    "path": "resources/views/.gitkeep",
    "content": ""
  },
  {
    "path": "resources/views/filament/infolists/components/time-line-icon-entry.blade.php",
    "content": "@php\n    use Filament\\Infolists\\Components\\IconEntry\\IconEntrySize;\n@endphp\n\n<x-dynamic-component :component=\"$getEntryWrapperView()\" :entry=\"$entry\">\n    <div\n        {{\n            $attributes\n                ->merge($getExtraAttributes(), escape: false)\n                ->class([\n                    'absolute flex items-center justify-center w-6 h-6 bg-gray-200 rounded-full -start-3 ring-4 ring-white dark:bg-gray-700 dark:ring-gray-900',\n                ])\n        }}\n    >\n        @if (count($arrayState = \\Illuminate\\Support\\Arr::wrap($getState())))\n            @foreach ($arrayState as $state)\n                @if ($icon = $getIcon($state))\n                    @php\n                        $color = $getColor($state) ?? 'gray';\n                        $size = $getSize($state) ?? IconEntrySize::Large;\n                    @endphp\n\n                    <x-filament::icon\n                        :icon=\"$icon\"\n                        @class([\n                            'fi-in-icon-item',\n                            match ($size) {\n                                IconEntrySize::ExtraSmall, 'xs' => 'fi-in-icon-item-size-xs h-3 w-3',\n                                IconEntrySize::Small, 'sm' => 'fi-in-icon-item-size-sm h-4 w-4',\n                                IconEntrySize::Medium, 'md' => 'fi-in-icon-item-size-md h-5 w-5',\n                                IconEntrySize::Large, 'lg' => 'fi-in-icon-item-size-lg h-6 w-6',\n                                IconEntrySize::ExtraLarge, 'xl' => 'fi-in-icon-item-size-xl h-7 w-7',\n                                IconEntrySize::TwoExtraLarge, IconEntrySize::ExtraExtraLarge, '2xl' => 'fi-in-icon-item-size-2xl h-8 w-8',\n                                default => $size,\n                            },\n                            match ($color) {\n                                'gray' => 'fi-color-gray text-gray-400 dark:text-gray-500',\n                                default => 'fi-color-custom text-custom-500 dark:text-custom-400',\n                            },\n                        ])\n                        @style([\n                            \\Filament\\Support\\get_color_css_variables(\n                                $color,\n                                shades: [400, 500],\n                                alias: 'infolists::components.icon-entry.item',\n                            ) => $color !== 'gray',\n                        ])\n                    />\n                @endif\n            @endforeach\n        @elseif (($placeholder = $getPlaceholder()) !== null)\n            <x-filament-infolists::entries.placeholder>\n                {{ $placeholder }}\n            </x-filament-infolists::entries.placeholder>\n        @endif\n    </div>\n</x-dynamic-component>\n"
  },
  {
    "path": "resources/views/filament/infolists/components/time-line-propertie-entry.blade.php",
    "content": "<x-dynamic-component :component=\"$getEntryWrapperView()\" :entry=\"$entry\">\n    <div>\n\n        {{ $getModifiedState() ?? (!is_array($getState()) ? $getState() ?? $getPlaceholder() : null) }}\n\n    </div>\n</x-dynamic-component>\n"
  },
  {
    "path": "resources/views/filament/infolists/components/time-line-repeatable-entry.blade.php",
    "content": "@php\n    $isContained = $isContained();\n@endphp\n\n<x-dynamic-component :component=\"$getEntryWrapperView()\" :entry=\"$entry\">\n    <div\n        {{\n            $attributes\n                ->merge([\n                    'id' => $getId(),\n                ], escape: false)\n                ->merge($getExtraAttributes(), escape: false)\n                ->class([\n                    'fi-in-repeatable',\n                    'fi-contained' => $isContained,\n                ])\n        }}\n    >\n        @if (count($childComponentContainers = $getChildComponentContainers()))\n            <ol class=\"relative border-gray-200 border-s dark:border-gray-700\">\n                <x-filament::grid\n                    :default=\"$getGridColumns('default')\"\n                    :sm=\"$getGridColumns('sm')\"\n                    :md=\"$getGridColumns('md')\"\n                    :lg=\"$getGridColumns('lg')\"\n                    :xl=\"$getGridColumns('xl')\"\n                    :two-xl=\"$getGridColumns('2xl')\"\n                    class=\"gap-2\"\n                >\n                    @foreach ($childComponentContainers as $container)\n                        <li\n                            @class([\n                                'mb-4 ms-6',\n                                'fi-in-repeatable-item block',\n                                'rounded-xl bg-white p-4 shadow-sm ring-1 ring-gray-950/5 dark:bg-white/5 dark:ring-white/10' => $isContained,\n                            ])\n                        >\n                            {{ $container }}\n                        </li>\n                    @endforeach\n                </x-filament::grid>\n            </ol>\n        @elseif (($placeholder = $getPlaceholder()) !== null)\n            <x-filament-infolists::entries.placeholder>\n                {{ $placeholder }}\n            </x-filament-infolists::entries.placeholder>\n        @endif\n    </div>\n</x-dynamic-component>"
  },
  {
    "path": "resources/views/filament/infolists/components/time-line-title-entry.blade.php",
    "content": "<x-dynamic-component :component=\"$getEntryWrapperView()\" :entry=\"$entry\">\n    <div\n        {{\n            $attributes\n                ->merge($getExtraAttributes(), escape: false)\n                ->class(['fi-in-text w-full -mt-6'])\n        }}\n    >\n\n        {{ $getModifiedState() }}\n\n    </div>\n</x-dynamic-component>\n"
  },
  {
    "path": "resources/views/filament/tables/columns/activity-logs-properties.blade.php",
    "content": "<div class=\"my-2 text-sm tracking-tight\">\n    @foreach($getState() ?? [] as $key => $value)\n        <span class=\"inline-block p-1 mr-1 font-medium text-gray-700 whitespace-normal rounded-md dark:text-gray-200 bg-gray-500/10\">\n            {{ $key }}\n        </span>\n\n        @if(is_array($value))\n            <span class=\"whitespace-normal divide-x divide-gray-200 divide-solid dark:divide-gray-700\">\n                @foreach ($value as $nestedKey => $nestedValue)\n                    <span class=\"inline-block mr-1\">\n                        {{ $nestedKey }}: {{ is_array($nestedValue) ? json_encode($nestedValue) : $nestedValue }}\n                    </span>\n                @endforeach\n            </span>\n        @else\n            <span class=\"whitespace-normal\">{{ $value }}</span>\n        @endif\n    @endforeach\n</div>\n"
  },
  {
    "path": "src/Actions/ActivityLogTimelineSimpleAction.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Actions;\n\nuse Filament\\Actions\\Action;\nuse Rmsramos\\Activitylog\\Actions\\Concerns\\ActionContent;\n\nclass ActivityLogTimelineSimpleAction extends Action\n{\n    use ActionContent;\n}\n"
  },
  {
    "path": "src/Actions/ActivityLogTimelineTableAction.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Actions;\n\nuse Filament\\Tables\\Actions\\Action;\nuse Rmsramos\\Activitylog\\Actions\\Concerns\\ActionContent;\n\nclass ActivityLogTimelineTableAction extends Action\n{\n    use ActionContent;\n}\n"
  },
  {
    "path": "src/Actions/Concerns/ActionContent.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Actions\\Concerns;\n\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse Closure;\nuse Filament\\Actions\\StaticAction;\nuse Filament\\Infolists\\Components\\TextEntry;\nuse Filament\\Infolists\\Infolist;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany;\nuse Illuminate\\Support\\Collection;\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\nuse Rmsramos\\Activitylog\\Infolists\\Components\\TimeLineIconEntry;\nuse Rmsramos\\Activitylog\\Infolists\\Components\\TimeLinePropertiesEntry;\nuse Rmsramos\\Activitylog\\Infolists\\Components\\TimeLineRepeatableEntry;\nuse Rmsramos\\Activitylog\\Infolists\\Components\\TimeLineTitleEntry;\nuse Spatie\\Activitylog\\Models\\Activity;\n\ntrait ActionContent\n{\n    protected ?array $withRelations = null;\n\n    protected ?array $timelineIcons = [\n        'created'  => 'heroicon-m-plus',\n        'updated'  => 'heroicon-m-pencil-square',\n        'deleted'  => 'heroicon-m-trash',\n        'restored' => 'heroicon-m-arrow-uturn-left',\n    ];\n\n    protected ?array $timelineIconColors = [\n        'created'  => 'success',\n        'updated'  => 'warning',\n        'deleted'  => 'danger',\n        'restored' => 'info',\n    ];\n\n    protected ?int $limit = 10;\n\n    protected Closure $modifyQueryUsing;\n\n    protected Closure|Builder $query;\n\n    protected ?Closure $activitiesUsing;\n\n    protected ?Closure $modifyTitleUsing;\n\n    protected ?Closure $shouldModifyTitleUsing;\n\n    public static function getDefaultName(): ?string\n    {\n        return 'activitylog_timeline';\n    }\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->configureInfolist();\n        $this->configureModal();\n        $this->activitiesUsing        = null;\n        $this->modifyTitleUsing       = null;\n        $this->shouldModifyTitleUsing = fn () => true;\n        $this->modifyQueryUsing       = fn ($builder) => $builder;\n        $this->modalHeading           = __('activitylog::action.modal.heading');\n        $this->modalDescription       = __('activitylog::action.modal.description');\n\n        $this->query = function (?Model $record) {\n            if (! $record) {\n                return Activity::query()->whereRaw('1 = 0');\n            }\n\n            return Activity::query()\n                ->with([\n                    'subject' => function ($query) {\n                        if (method_exists($query, 'withTrashed')) {\n                            $query->withTrashed();\n                        }\n                    },\n                    'causer',\n                ])\n                ->where(function (Builder $query) use ($record) {\n                    $query->where('subject_type', $record->getMorphClass())\n                        ->where('subject_id', $record->getKey());\n\n                    if ($relations = $this->getWithRelations()) {\n                        foreach ($relations as $relation) {\n                            if (method_exists($record, $relation)) {\n                                try {\n                                    $relationInstance = $record->{$relation}();\n\n                                    if ($relationInstance instanceof BelongsToMany) {\n                                        $subjectType = $relationInstance->getPivotClass();\n                                        $relatedIds  = $relationInstance->pluck($relationInstance->getTable().'.id')->toArray();\n\n                                        if (! empty($relatedIds)) {\n                                            $query->orWhere(function (Builder $q) use ($subjectType, $relatedIds) {\n                                                $q->where('subject_type', $subjectType)\n                                                    ->whereIn('subject_id', $relatedIds);\n                                            });\n                                        }\n\n                                        continue;\n                                    }\n\n                                    $relatedModel     = $relationInstance->getRelated();\n                                    $relatedIds       = $relationInstance->pluck('id')->toArray();\n\n                                    if (! empty($relatedIds)) {\n                                        $query->orWhere(function (Builder $q) use ($relatedModel, $relatedIds) {\n                                            $q->where('subject_type', $relatedModel->getMorphClass())\n                                                ->whereIn('subject_id', $relatedIds);\n                                        });\n                                    }\n                                } catch (\\Exception $e) {\n                                    // Ignore errors\n                                }\n                            }\n                        }\n                    }\n                });\n        };\n    }\n    protected function configureInfolist(): void\n    {\n        $this->infolist(function (?Model $record, Infolist $infolist) {\n            $activities = $this->getActivityLogRecord($record, $this->getWithRelations());\n\n            $formattedActivities = $activities->map(function ($activity) {\n                return [\n                    'id'           => $activity->id,\n                    'log_name'     => $activity->log_name,\n                    'updated_at'   => $activity->updated_at,\n                    'activityData' => $activity->activityData,\n                ];\n            })->toArray();\n\n            return $infolist\n                ->state(['activities' => $formattedActivities])\n                ->schema($this->getSchema());\n        });\n    }\n\n    protected function configureModal(): void\n    {\n        $this->slideOver()\n            ->modalIcon('heroicon-o-eye')\n            ->modalFooterActions(fn () => [])\n            ->tooltip(__('activitylog::action.modal.tooltip'))\n            ->icon('heroicon-o-bell-alert');\n    }\n\n    protected function getSchema(): array\n    {\n        return [\n            TimeLineRepeatableEntry::make('activities')\n                ->schema([\n                    TimeLineIconEntry::make('activityData.event')\n                        ->icon(function ($state) {\n                            return $this->getTimelineIcons()[$state] ?? 'heroicon-m-check';\n                        })\n                        ->color(function ($state) {\n                            return $this->getTimelineIconColors()[$state] ?? 'primary';\n                        }),\n                    TimeLineTitleEntry::make('activityData')\n                        ->configureTitleUsing($this->modifyTitleUsing)\n                        ->shouldConfigureTitleUsing($this->shouldModifyTitleUsing),\n                    TimeLinePropertiesEntry::make('activityData'),\n                    TextEntry::make('log_name')\n                        ->hiddenLabel()\n                        ->badge(),\n                    TextEntry::make('updated_at')\n                        ->hiddenLabel()\n                        ->since()\n                        ->badge(),\n                ]),\n        ];\n    }\n\n    public function withRelations(?array $relations = null): ?StaticAction\n    {\n        $this->withRelations = $relations;\n\n        return $this;\n    }\n\n    public function timelineIcons(?array $timelineIcons = null): ?StaticAction\n    {\n        $this->timelineIcons = $timelineIcons;\n\n        return $this;\n    }\n\n    public function timelineIconColors(?array $timelineIconColors = null): ?StaticAction\n    {\n        $this->timelineIconColors = $timelineIconColors;\n\n        return $this;\n    }\n\n    public function limit(?int $limit = 10): ?StaticAction\n    {\n        $this->limit = $limit;\n\n        return $this;\n    }\n\n    public function query(Closure|Builder|null $query): static\n    {\n        $this->query = $query;\n\n        return $this;\n    }\n\n    public function modifyQueryUsing(Closure $closure): static\n    {\n        $this->modifyQueryUsing = $closure;\n\n        return $this;\n    }\n\n    public function modifyTitleUsing(Closure $closure): static\n    {\n        $this->modifyTitleUsing = $closure;\n\n        return $this;\n    }\n\n    public function shouldModifyTitleUsing(Closure $closure): static\n    {\n        $this->shouldModifyTitleUsing = $closure;\n\n        return $this;\n    }\n\n    public function activitiesUsing(Closure $closure): static\n    {\n        $this->activitiesUsing = $closure;\n\n        return $this;\n    }\n\n    public function getWithRelations(): ?array\n    {\n        return $this->evaluate($this->withRelations);\n    }\n\n    public function getTimelineIcons(): ?array\n    {\n        return $this->evaluate($this->timelineIcons);\n    }\n\n    public function getTimelineIconColors(): ?array\n    {\n        return $this->evaluate($this->timelineIconColors);\n    }\n\n    public function getLimit(): ?int\n    {\n        return $this->evaluate($this->limit);\n    }\n\n    public function getQuery(): ?Builder\n    {\n        return $this->evaluate($this->query);\n    }\n\n    public function getModifyQueryUsing(Builder $builder): Builder\n    {\n        return $this->evaluate($this->modifyQueryUsing, ['builder' => $builder]);\n    }\n\n    public function getActivitiesUsing(): ?Collection\n    {\n        return $this->evaluate($this->activitiesUsing);\n    }\n\n    protected function getActivities(?Model $record, ?array $relations = null): Collection\n    {\n        if ($activities = $this->getActivitiesUsing()) {\n            return $activities;\n        }\n\n        if (! $record) {\n            return collect();\n        }\n\n        $builder = $this->getQuery()\n            ->latest()\n            ->limit($this->getLimit());\n\n        return $this->getModifyQueryUsing($builder)->get();\n    }\n\n    protected function getActivityLogRecord(?Model $record, ?array $relations = null): Collection\n    {\n        $activities = $this->getActivities($record, $relations);\n\n        return $activities->transform(function ($activity) {\n            $activity->activityData = $this->formatActivityData($activity);\n\n            return $activity;\n        });\n    }\n\n    protected function formatActivityData($activity): array\n    {\n        $properties = [];\n\n        if ($activity->properties) {\n            if (is_string($activity->properties)) {\n                $properties = json_decode($activity->properties, true) ?? [];\n            } elseif (is_array($activity->properties)) {\n                $properties = $activity->properties;\n            } elseif (is_object($activity->properties) && method_exists($activity->properties, 'toArray')) {\n                $properties = $activity->properties->toArray();\n            }\n        }\n\n        if ($activity->event === 'restored') {\n            if (empty($properties) && $activity->description !== 'restored') {\n                $properties['description'] = $activity->description;\n            }\n        }\n\n        return [\n            'log_name'    => $activity->log_name,\n            'description' => $activity->description,\n            'subject'     => $activity->subject,\n            'event'       => $activity->event,\n            'causer'      => $activity->causer,\n            'properties'  => $this->formatDateValues($properties),\n            'batch_uuid'  => $activity->batch_uuid,\n            'update'      => $activity->updated_at,\n        ];\n    }\n\n\n    protected static function formatDateValues(array|string|null $value): array|string|null\n    {\n        if (is_null($value)) {\n            return $value;\n        }\n\n        if (is_array($value)) {\n            foreach ($value as &$item) {\n                $item = self::formatDateValues($item);\n            }\n\n            return $value;\n        }\n\n        if (is_numeric($value) && ! preg_match('/^\\d{10,}$/', $value)) {\n            return $value;\n        }\n\n        if (is_bool($value)) {\n            return $value ? 'true' : 'false';\n        }\n\n        try {\n            $parser = ActivitylogPlugin::get()->getDateParser();\n\n            return $parser($value)->format(ActivitylogPlugin::get()->getDatetimeFormat());\n        } catch (InvalidFormatException $e) {\n            return $value;\n        } catch (\\Exception $e) {\n            return $value;\n        }\n    }\n}\n"
  },
  {
    "path": "src/ActivitylogPlugin.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog;\n\nuse Closure;\nuse Filament\\Contracts\\Plugin;\nuse Filament\\Panel;\nuse Filament\\Support\\Concerns\\EvaluatesClosures;\nuse Illuminate\\Support\\Carbon;\n\nclass ActivitylogPlugin implements Plugin\n{\n    use EvaluatesClosures;\n\n    protected ?string $resource = null;\n\n    protected string|Closure|null $label = null;\n\n    protected string|Closure|null $resourceActionLabel = null;\n\n    protected bool|Closure|null $isResourceActionHidden = null;\n\n    protected bool|Closure|null $isRestoreActionHidden = null;\n\n    protected bool|Closure|null $isRestoreModelActionHidden = null;\n\n    protected Closure|bool $navigationItem = true;\n\n    protected string|Closure|null $navigationGroup = null;\n\n    protected string|Closure|null $dateParser = null;\n\n    protected string|Closure|null $dateFormat = null;\n\n    protected string|Closure|null $datetimeFormat = null;\n\n    protected ?Closure $datetimeColumnCallback = null;\n\n    protected ?Closure $datePickerCallback = null;\n\n    protected ?Closure $translateSubject = null;\n\n    protected ?Closure $translateLogKey = null;\n\n    protected ?string $navigationIcon = null;\n\n    protected ?int $navigationSort = null;\n\n    protected ?bool $navigationCountBadge = null;\n\n    protected string|Closure|null $pluralLabel = null;\n\n    protected bool|Closure $authorizeUsing = true;\n\n    public static function make(): static\n    {\n        return app(static::class);\n    }\n\n    public function getId(): string\n    {\n        return 'rmsramos/activitylog';\n    }\n\n    public function register(Panel $panel): void\n    {\n        $panel\n            ->resources([\n                $this->getResource(),\n            ]);\n    }\n\n    public function boot(Panel $panel): void\n    {\n        //\n    }\n\n    public static function get(): static\n    {\n        return filament(app(static::class)->getId());\n    }\n\n    public function getResource(): string\n    {\n        return $this->resource ?? config('filament-activitylog.resources.resource');\n    }\n\n    public function getLabel(): string\n    {\n        return $this->evaluate($this->label) ?? config('filament-activitylog.resources.label');\n    }\n\n    public function getResourceActionLabel(): string\n    {\n        return $this->evaluate($this->resourceActionLabel) ?? config('filament-activitylog.resources.resource_action_label');\n    }\n\n    public function getIsResourceActionHidden(): bool\n    {\n        return $this->evaluate($this->isResourceActionHidden) ?? config('filament-activitylog.resources.hide_resource_action');\n    }\n\n    public function getIsRestoreActionHidden(): bool\n    {\n        return $this->evaluate($this->isRestoreActionHidden) ?? config('filament-activitylog.resources.hide_restore_action');\n    }\n\n    public function getIsRestoreModelActionHidden(): bool\n    {\n        return $this->evaluate($this->isRestoreModelActionHidden) ?? config('filament-activitylog.resources.hide_restore_model_action');\n    }\n\n    public function getPluralLabel(): string\n    {\n        return $this->evaluate($this->pluralLabel) ?? config('filament-activitylog.resources.plural_label');\n    }\n\n    public function getNavigationItem(): bool\n    {\n        return $this->evaluate($this->navigationItem) ?? config('filament-activitylog.resources.navigation_item');\n    }\n\n    public function getNavigationGroup(): ?string\n    {\n        return $this->evaluate($this->navigationGroup) ?? config('filament-activitylog.resources.navigation_group');\n    }\n\n    public function getDateFormat(): ?string\n    {\n        return $this->evaluate($this->dateFormat) ?? config('filament-activitylog.date_format');\n    }\n\n    public function getDatetimeFormat(): ?string\n    {\n        return $this->evaluate($this->datetimeFormat) ?? config('filament-activitylog.datetime_format');\n    }\n\n    public function getDatetimeColumnCallback(): ?Closure\n    {\n        return $this->datetimeColumnCallback;\n    }\n\n    public function getDatePickerCallback(): ?Closure\n    {\n        return $this->datePickerCallback;\n    }\n\n    public function getTranslateSubject($label): ?string\n    {\n        if (is_null($this->translateSubject)) {\n            return $label;\n        }\n\n        $callable = $this->translateSubject;\n\n        return $callable($label);\n    }\n\n    public function getTranslateLogKey($label): ?string\n    {\n        if (is_null($this->translateLogKey)) {\n            return $label;\n        }\n\n        $callable = $this->translateLogKey;\n\n        return $callable($label);\n    }\n\n    public function getDateParser(): ?Closure\n    {\n        return $this->dateParser ?? fn ($date) => Carbon::parse($date);\n    }\n\n    public function getNavigationIcon(): ?string\n    {\n        return $this->navigationIcon ?? config('filament-activitylog.resources.navigation_icon');\n    }\n\n    public function getNavigationSort(): ?int\n    {\n        return $this->navigationSort ?? config('filament-activitylog.resources.navigation_sort');\n    }\n\n    public function getNavigationCountBadge(): ?bool\n    {\n        return $this->navigationCountBadge ?? config('filament-activitylog.resources.navigation_count_badge');\n    }\n\n    public function resource(string $resource): static\n    {\n        $this->resource = $resource;\n\n        return $this;\n    }\n\n    public function label(string|Closure $label): static\n    {\n        $this->label = $label;\n\n        return $this;\n    }\n\n    public function resourceActionLabel(string|Closure $label): static\n    {\n        $this->resourceActionLabel = $label;\n\n        return $this;\n    }\n\n    public function isResourceActionHidden(bool|Closure $isHidden): static\n    {\n        $this->isResourceActionHidden = $isHidden;\n\n        return $this;\n    }\n\n    public function isRestoreActionHidden(bool|Closure $isHidden): static\n    {\n        $this->isRestoreActionHidden = $isHidden;\n\n        return $this;\n    }\n\n    public function isRestoreModelActionHidden(bool|Closure $isHidden): static\n    {\n        $this->isRestoreModelActionHidden = $isHidden;\n\n        return $this;\n    }\n\n    public function pluralLabel(string|Closure $label): static\n    {\n        $this->pluralLabel = $label;\n\n        return $this;\n    }\n\n    public function navigationItem(Closure|bool $value = true): static\n    {\n        $this->navigationItem = $value;\n\n        return $this;\n    }\n\n    public function navigationGroup(string|Closure|null $group = null): static\n    {\n        $this->navigationGroup = $group;\n\n        return $this;\n    }\n\n    public function dateParser(?Closure $parser = null): static\n    {\n        $this->dateParser = $parser;\n\n        return $this;\n    }\n\n    public function dateFormat(string|Closure|null $format = null): static\n    {\n        $this->dateFormat = $format;\n\n        return $this;\n    }\n\n    public function datetimeFormat(string|Closure|null $format = null): static\n    {\n        $this->datetimeFormat = $format;\n\n        return $this;\n    }\n\n    public function customizeDatetimeColumn(Closure $callable): self\n    {\n        $this->datetimeColumnCallback = $callable;\n\n        return $this;\n    }\n\n    public function customizeDatePicker(Closure $callable): self\n    {\n        $this->datePickerCallback = $callable;\n\n        return $this;\n    }\n\n    public function translateSubject(string|Closure|null $callable = null): static\n    {\n        $this->translateSubject = $callable;\n\n        return $this;\n    }\n\n    public function translateLogKey(string|Closure|null $callable = null): static\n    {\n        $this->translateLogKey = $callable;\n\n        return $this;\n    }\n\n    public function navigationIcon(string $icon): static\n    {\n        $this->navigationIcon = $icon;\n\n        return $this;\n    }\n\n    public function navigationSort(int $order): static\n    {\n        $this->navigationSort = $order;\n\n        return $this;\n    }\n\n    public function navigationCountBadge(bool $show = true): static\n    {\n        $this->navigationCountBadge = $show;\n\n        return $this;\n    }\n\n    public function authorize(bool|Closure $callback = true): static\n    {\n        $this->authorizeUsing = $callback;\n\n        return $this;\n    }\n\n    public function isAuthorized(): bool\n    {\n        return $this->evaluate($this->authorizeUsing) === true;\n    }\n}\n"
  },
  {
    "path": "src/ActivitylogServiceProvider.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog;\n\nuse Filament\\Support\\Assets\\Css;\nuse Filament\\Support\\Facades\\FilamentAsset;\nuse Spatie\\LaravelPackageTools\\Commands\\InstallCommand;\nuse Spatie\\LaravelPackageTools\\Package;\nuse Spatie\\LaravelPackageTools\\PackageServiceProvider;\n\nclass ActivitylogServiceProvider extends PackageServiceProvider\n{\n    public static string $name = 'activitylog';\n\n    public function configurePackage(Package $package): void\n    {\n        $package\n            ->name('activitylog')\n            ->hasConfigFile('filament-activitylog')\n            ->hasViews('activitylog')\n            ->hasTranslations()\n            ->hasInstallCommand(function (InstallCommand $installCommand) {\n                $installCommand\n                    ->publishConfigFile()\n                    ->askToStarRepoOnGitHub('rmsramos/activitylog')\n                    ->startWith(function (InstallCommand $installCommand) {\n                        $installCommand->call('vendor:publish', [\n                            '--provider' => \"Spatie\\Activitylog\\ActivitylogServiceProvider\",\n                            '--tag'      => 'activitylog-migrations',\n                        ]);\n                    });\n            });\n    }\n\n    public function packageBooted(): void\n    {\n        $assets = [\n            Css::make('activitylog-styles', __DIR__ . '/../resources/dist/activitylog.css'),\n        ];\n\n        FilamentAsset::register($assets, 'rmsramos/activitylog');\n    }\n}\n"
  },
  {
    "path": "src/Helpers/ActivityLogHelper.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Helpers;\n\nuse Illuminate\\Support\\Str;\n\nclass ActivityLogHelper\n{\n    /**\n     * Checks if a class uses a specific trait.\n     *\n     * @param  mixed  $class  The class or object instance to check.\n     * @param  string  $trait  The fully qualified name of the trait to look for.\n     */\n    public static function classUsesTrait($class, $trait): bool\n    {\n        $traits = class_uses_recursive($class);\n\n        return in_array($trait, $traits);\n    }\n\n    public static function getResourcePluralName($class): string\n    {\n        return Str::plural(Str::kebab(class_basename($class)));\n    }\n}\n"
  },
  {
    "path": "src/Infolists/Components/TimeLineIconEntry.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Infolists\\Components;\n\nuse Filament\\Infolists\\Components\\IconEntry;\n\nclass TimeLineIconEntry extends IconEntry\n{\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->configureIconEntry();\n    }\n\n    protected string $view = 'activitylog::filament.infolists.components.time-line-icon-entry';\n\n    protected function configureIconEntry()\n    {\n        $this\n            ->hiddenLabel()\n            ->size('w-4 h-4');\n    }\n}\n"
  },
  {
    "path": "src/Infolists/Components/TimeLinePropertiesEntry.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Infolists\\Components;\n\nuse Filament\\Infolists\\Components\\Entry;\nuse Illuminate\\Support\\HtmlString;\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\nuse Rmsramos\\Activitylog\\Infolists\\Concerns\\HasModifyState;\n\nclass TimeLinePropertiesEntry extends Entry\n{\n    use HasModifyState;\n\n    protected string $view = 'activitylog::filament.infolists.components.time-line-propertie-entry';\n\n    protected function setup(): void\n    {\n        parent::setup();\n\n        $this->configurePropertieEntry();\n    }\n\n    protected function configurePropertieEntry(): void\n    {\n        $this\n            ->hiddenLabel()\n            ->modifyState(fn ($state) => $this->modifiedProperties($state));\n    }\n\n    protected function modifiedProperties($state): ?HtmlString\n    {\n        $properties = $state['properties'];\n\n        if (! empty($properties)) {\n            $changes    = $this->getPropertyChanges($properties);\n            $causerName = $this->getCauserName($state['causer']);\n\n            return new HtmlString(trans('activitylog::infolists.components.updater_updated', [\n                'causer'  => $causerName,\n                'event'   => __('activitylog::action.event.' . $state['event']),\n                'changes' => implode('<br>', $changes),\n            ]));\n        }\n\n        return null;\n    }\n\n    protected function getPropertyChanges(array $properties): array\n    {\n        $changes = [];\n\n        if (isset($properties['old'], $properties['attributes'])) {\n            $changes = $this->compareOldAndNewValues($properties['old'], $properties['attributes']);\n        } elseif (isset($properties['attributes'])) {\n            $changes = $this->getNewValues($properties['attributes']);\n        } elseif (isset($properties['old'])) {\n            $changes = $this->getNewValues($properties['old']);\n        }\n\n        return $changes;\n    }\n\n    protected function compareOldAndNewValues(array $oldValues, array $newValues): array\n    {\n        $changes = [];\n\n        foreach ($newValues as $key => $newValue) {\n            $oldValue = is_array($oldValues[$key]) ? json_encode($oldValues[$key]) : $oldValues[$key] ?? '-';\n            $newValue = $this->formatNewValue($newValue);\n\n            if (isset($oldValues[$key]) && $oldValues[$key] != $newValue) {\n                $changes[] = trans('activitylog::infolists.components.from_oldvalue_to_newvalue',\n                    [\n                        'key'       => ActivitylogPlugin::get()->getTranslateLogKey($key),\n                        'old_value' => htmlspecialchars($oldValue),\n                        'new_value' => htmlspecialchars($newValue),\n                    ]);\n            } else {\n                $changes[] = trans('activitylog::infolists.components.to_newvalue',\n                    [\n                        'key'       => ActivitylogPlugin::get()->getTranslateLogKey($key),\n                        'new_value' => htmlspecialchars($newValue),\n                    ]);\n            }\n        }\n\n        return $changes;\n    }\n\n    protected function getNewValues(array $newValues): array\n    {\n        return array_map(\n            fn ($key, $value) => sprintf(\n                __('activitylog::timeline.properties.getNewValues'),\n                ActivitylogPlugin::get()->getTranslateLogKey($key),\n                htmlspecialchars($this->formatNewValue($value))\n            ),\n            array_keys($newValues),\n            $newValues\n        );\n    }\n\n    protected function formatNewValue($value): string\n    {\n        return is_array($value) ? json_encode($value) : $value ?? '—';\n    }\n}\n"
  },
  {
    "path": "src/Infolists/Components/TimeLineRepeatableEntry.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Infolists\\Components;\n\nuse Filament\\Infolists\\Components\\RepeatableEntry;\n\nclass TimeLineRepeatableEntry extends RepeatableEntry\n{\n    protected function setup(): void\n    {\n        parent::setup();\n\n        $this->configureRepeatableEntry();\n    }\n\n    protected function configureRepeatableEntry(): void\n    {\n        $this\n            ->extraAttributes(['style' => 'margin-left:1.25rem;'])\n            ->contained(false)\n            ->hiddenLabel();\n    }\n\n    protected string $view = 'activitylog::filament.infolists.components.time-line-repeatable-entry';\n}\n"
  },
  {
    "path": "src/Infolists/Components/TimeLineTitleEntry.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Infolists\\Components;\n\nuse Closure;\nuse Filament\\Forms\\Components\\Concerns\\CanAllowHtml;\nuse Filament\\Infolists\\Components\\Entry;\nuse Filament\\Support\\Concerns\\HasExtraAttributes;\nuse Illuminate\\Support\\HtmlString;\nuse Illuminate\\Support\\Str;\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\nuse Rmsramos\\Activitylog\\Infolists\\Concerns\\HasModifyState;\n\nclass TimeLineTitleEntry extends Entry\n{\n    use CanAllowHtml;\n    use HasExtraAttributes;\n    use HasModifyState;\n\n    protected ?Closure $configureTitleUsing = null;\n\n    protected ?Closure $shouldConfigureTitleUsing = null;\n\n    protected function setUp(): void\n    {\n        parent::setUp();\n\n        $this->configureTitleEntry();\n    }\n\n    protected string $view = 'activitylog::filament.infolists.components.time-line-title-entry';\n\n    public function configureTitleUsing(?Closure $configureTitleUsing): TimeLineTitleEntry\n    {\n        $this->configureTitleUsing = $configureTitleUsing;\n\n        return $this;\n    }\n\n    public function shouldConfigureTitleUsing(?Closure $condition): TimeLineTitleEntry\n    {\n        $this->shouldConfigureTitleUsing = $condition;\n\n        return $this;\n    }\n\n    protected function configureTitleEntry()\n    {\n        $this\n            ->hiddenLabel()\n            ->modifyState(fn ($state) => $this->modifiedTitle($state));\n    }\n\n    protected function modifiedTitle($state): string|HtmlString|Closure\n    {\n        if ($this->configureTitleUsing !== null && $this->shouldConfigureTitleUsing !== null && $this->evaluate($this->shouldConfigureTitleUsing)) {\n            return $this->evaluate($this->configureTitleUsing, ['state' => $state]);\n        } else {\n            if ($state['description'] == $state['event'] || $state['event'] === 'restored') {\n                $className = property_exists($state['subject'], 'activityTitleName') && ! empty($state['subject']::$activityTitleName)\n                    ? $state['subject']::$activityTitleName\n                    : Str::lower(Str::snake(class_basename($state['subject']), ' '));\n                $causerName = $this->getCauserName($state['causer']);\n\n                $parser    = ActivitylogPlugin::get()->getDateParser();\n                $update_at = $parser($state['update'])->format(ActivitylogPlugin::get()->getDatetimeFormat());\n\n                return new HtmlString(\n                    __('activitylog::infolists.components.created_by_at',\n                        [\n                            'subject'   => ActivitylogPlugin::get()->getTranslateSubject($className),\n                            'event'     => __('activitylog::action.event.' . $state['event']),\n                            'causer'    => $causerName,\n                            'update_at' => $update_at,\n                        ]),\n                );\n            }\n        }\n\n        return '';\n    }\n}\n"
  },
  {
    "path": "src/Infolists/Concerns/HasModifyState.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Infolists\\Concerns;\n\nuse Closure;\nuse Illuminate\\Support\\HtmlString;\n\ntrait HasModifyState\n{\n    protected $state;\n\n    public function modifyState(Closure $callback): static\n    {\n        $this->state = $callback;\n\n        return $this;\n    }\n\n    public function getModifiedState(): null|string|HtmlString\n    {\n        return $this->evaluate($this->state);\n    }\n\n    protected function getCauserName($causer): string\n    {\n        return $causer->name ?? $causer->first_name ?? $causer->last_name ?? $causer->username ?? trans('activitylog::infolists.components.unknown');\n    }\n}\n"
  },
  {
    "path": "src/RelationManagers/ActivitylogRelationManager.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\RelationManagers;\n\nuse Filament\\Forms\\Form;\nuse Filament\\Resources\\RelationManagers\\RelationManager;\nuse Filament\\Tables\\Actions\\ViewAction;\nuse Filament\\Tables\\Table;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\nuse Rmsramos\\Activitylog\\Resources\\ActivitylogResource;\n\nclass ActivitylogRelationManager extends RelationManager\n{\n    protected static string $relationship = 'activities';\n\n    protected static ?string $recordTitleAttribute = 'description';\n\n    public static function getTitle(Model $ownerRecord, string $pageClass): string\n    {\n        return static::$title ?? (string) str(ActivitylogPlugin::get()->getPluralLabel())\n            ->kebab()\n            ->replace('-', ' ')\n            ->headline();\n    }\n\n    public function form(Form $form): Form\n    {\n        return ActivitylogResource::form($form);\n    }\n\n    public function table(Table $table): Table\n    {\n        return ActivitylogResource::table(\n            $table\n                ->heading(ActivitylogPlugin::get()->getPluralLabel())\n                ->actions([\n                    ViewAction::make(),\n                ])\n        );\n    }\n}\n"
  },
  {
    "path": "src/Resources/ActivitylogResource/ActivitylogResource.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Resources\\ActivitylogResource;\n\nuse ActivitylogForm;\nuse Exception;\nuse Filament\\Facades\\Filament;\nuse Filament\\Forms\\Components\\DatePicker;\nuse Filament\\Forms\\Components\\Placeholder;\nuse Filament\\Notifications\\Notification;\nuse Filament\\Resources\\Resource;\nuse Filament\\Schemas\\Schema;\nuse Filament\\Tables\\Columns\\Column;\nuse Filament\\Tables\\Columns\\TextColumn;\nuse Filament\\Tables\\Columns\\ViewColumn;\nuse Filament\\Tables\\Filters\\Filter;\nuse Filament\\Tables\\Filters\\SelectFilter;\nuse Filament\\Tables\\Table;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\ModelNotFoundException;\nuse Illuminate\\Support\\Facades\\DB;\nuse Illuminate\\Support\\Facades\\Gate;\nuse Illuminate\\Support\\HtmlString;\nuse Illuminate\\Support\\Str;\nuse Livewire\\Component as Livewire;\nuse Rmsramos\\Activitylog\\Actions\\Concerns\\ActionContent;\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\nuse Rmsramos\\Activitylog\\Helpers\\ActivityLogHelper;\nuse Rmsramos\\Activitylog\\RelationManagers\\ActivitylogRelationManager;\nuse Rmsramos\\Activitylog\\Resources\\ActivitylogResource\\Pages\\ListActivitylog;\nuse Rmsramos\\Activitylog\\Resources\\ActivitylogResource\\Pages\\ViewActivitylog;\nuse Rmsramos\\Activitylog\\Traits\\HasCustomActivityResource;\nuse Spatie\\Activitylog\\Models\\Activity;\n\nclass ActivitylogResource extends Resource\n{\n    use ActionContent;\n\n    protected static ?string $slug = 'activitylogs';\n\n    public static function getModel(): string\n    {\n        return config('activitylog.activity_model', Activity::class);\n    }\n\n    public static function getModelLabel(): string\n    {\n        return ActivitylogPlugin::get()->getLabel();\n    }\n\n    public static function getPluralModelLabel(): string\n    {\n        return ActivitylogPlugin::get()->getPluralLabel();\n    }\n\n    public static function getNavigationIcon(): string\n    {\n        return ActivitylogPlugin::get()->getNavigationIcon();\n    }\n\n    public static function getNavigationLabel(): string\n    {\n        return Str::title(static::getPluralModelLabel()) ?? Str::title(static::getModelLabel());\n    }\n\n    public static function getNavigationSort(): ?int\n    {\n        return ActivitylogPlugin::get()->getNavigationSort();\n    }\n\n    public static function getNavigationGroup(): ?string\n    {\n        return ActivitylogPlugin::get()->getNavigationGroup();\n    }\n\n    public static function getNavigationBadge(): ?string\n    {\n        return ActivitylogPlugin::get()->getNavigationCountBadge() ?\n            number_format(static::getModel()::count()) : null;\n    }\n\n    protected static function getResourceUrl(Activity $record): string\n    {\n        $panelID = Filament::getCurrentPanel()->getId();\n\n        if ($record->subject_type && $record->subject_id) {\n            try {\n                $model = app($record->subject_type);\n\n                if (ActivityLogHelper::classUsesTrait($model, HasCustomActivityResource::class)) {\n                    $resourceModel = $model->getFilamentActualResourceModel($record);\n                    $resourcePluralName = ActivityLogHelper::getResourcePluralName($resourceModel);\n\n                    return route('filament.'.$panelID.'.resources.'.$resourcePluralName.'.edit', ['record' => $resourceModel->id]);\n                }\n\n                // Fallback to a standard resource mapping\n                $resourcePluralName = ActivityLogHelper::getResourcePluralName($record->subject_type);\n\n                return route('filament.'.$panelID.'.resources.'.$resourcePluralName.'.edit', ['record' => $record->subject_id]);\n            } catch (Exception $e) {\n                // If there's any error generating the URL, return placeholder\n                return '#';\n            }\n        }\n\n        return '#';\n    }\n\n    public static function form(Schema $schema): Schema\n    {\n        return ActivitylogForm::configure($schema);\n    }\n\n    protected static function flattenArrayForKeyValue(array $data): array\n    {\n        $flattened = [];\n\n        foreach ($data as $key => $value) {\n            if (is_array($value) || is_object($value)) {\n                $flattened[$key] = json_encode($value, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);\n            } else {\n                $flattened[$key] = $value;\n            }\n        }\n\n        return $flattened;\n    }\n\n    public static function table(Table $table): Table\n    {\n        return $table\n            ->columns([\n                static::getLogNameColumnComponent(),\n                static::getEventColumnComponent(),\n                static::getSubjectTypeColumnComponent(),\n                static::getCauserNameColumnComponent(),\n                static::getPropertiesColumnComponent(),\n                static::getCreatedAtColumnComponent(),\n            ])\n            ->defaultSort(\n                config('filament-activitylog.resources.default_sort_column', 'created_at'),\n                config('filament-activitylog.resources.default_sort_direction', 'desc')\n            )\n            ->filters([\n                static::getDateFilterComponent(),\n                static::getEventFilterComponent(),\n                static::getLogNameFilterComponent(),\n            ]);\n    }\n\n    public static function getEloquentQuery(): Builder\n    {\n        return parent::getEloquentQuery()\n            ->with([\n                'subject' => function ($query) {\n                    if (method_exists($query, 'withTrashed')) {\n                        $query->withTrashed();\n                    }\n                },\n                'causer',\n            ]);\n    }\n\n    public static function getLogNameColumnComponent(): Column\n    {\n        return TextColumn::make('log_name')\n            ->label(__('activitylog::tables.columns.log_name.label'))\n            ->formatStateUsing(fn ($state) => $state ? ucwords($state) : '-')\n            ->searchable()\n            ->sortable()\n            ->badge();\n    }\n\n    public static function getEventColumnComponent(): Column\n    {\n        return TextColumn::make('event')\n            ->label(__('activitylog::tables.columns.event.label'))\n            ->formatStateUsing(fn ($state) => $state ? ucwords(__('activitylog::action.event.'.$state)) : '-')\n            ->badge()\n            ->color(fn (?string $state): string => match ($state) {\n                'draft' => 'gray',\n                'updated' => 'warning',\n                'created' => 'success',\n                'deleted' => 'danger',\n                'restored' => 'info',\n                default => 'primary',\n            })\n            ->searchable()\n            ->sortable();\n    }\n\n    public static function getSubjectTypeColumnComponent(): Column\n    {\n        return TextColumn::make('subject_type')\n            ->label(__('activitylog::tables.columns.subject_type.label'))\n            ->formatStateUsing(function ($state, Model $record) {\n                /** @var Activity $record */\n                if (! $state) {\n                    return '-';\n                }\n\n                $subjectInfo = Str::of($state)->afterLast('\\\\')->headline().' # '.$record->subject_id;\n\n                if ($record->subject) {\n                    if (method_exists($record->subject, 'trashed') && $record->subject->trashed()) {\n                        $subjectInfo .= __('activitylog::tables.columns.subject_type.soft_deleted');\n                    }\n                } else {\n                    $subjectInfo .= __('activitylog::tables.columns.subject_type.deleted');\n                }\n\n                return $subjectInfo;\n            })\n            ->searchable()\n            ->hidden(fn (Livewire $livewire) => $livewire instanceof ActivitylogRelationManager);\n    }\n\n    public static function getCauserNameColumnComponent(): Column\n    {\n        return TextColumn::make('causer.name')\n            ->label(__('activitylog::tables.columns.causer.label'))\n            ->getStateUsing(function (Model $record) {\n                /** @var Activity $record */\n                if ($record->causer_id === null || $record->causer === null) {\n                    return new HtmlString('&mdash;');\n                }\n\n                return $record->causer->name ?? new HtmlString('&mdash;');\n            })\n            ->searchable();\n    }\n\n    public static function getPropertiesColumnComponent(): Column\n    {\n        return ViewColumn::make('properties')\n            ->searchable()\n            ->label(__('activitylog::tables.columns.properties.label'))\n            ->view('activitylog::filament.tables.columns.activity-logs-properties')\n            ->toggleable(isToggledHiddenByDefault: true);\n    }\n\n    public static function getCreatedAtColumnComponent(): Column\n    {\n        $column = TextColumn::make('created_at')\n            ->label(__('activitylog::tables.columns.created_at.label'))\n            ->dateTime(ActivitylogPlugin::get()->getDatetimeFormat())\n            ->searchable()\n            ->sortable();\n\n        // Apply the custom callback if set\n        $callback = ActivitylogPlugin::get()->getDatetimeColumnCallback();\n\n        if ($callback) {\n            $column = $callback($column);\n        }\n\n        return $column;\n    }\n\n    public static function getDatePickerCompoment(string $label): DatePicker\n    {\n        $field = DatePicker::make($label)\n            ->format(ActivitylogPlugin::get()->getDateFormat())\n            ->label(__('activitylog::tables.filters.created_at.'.$label));\n\n        // Apply the custom callback if set\n        $callback = ActivitylogPlugin::get()->getDatePickerCallback();\n\n        if ($callback) {\n            $field = $callback($field);\n        }\n\n        return $field;\n    }\n\n    public static function getDateFilterComponent(): Filter\n    {\n        return Filter::make('created_at')\n            ->label(__('activitylog::tables.filters.created_at.label'))\n            ->indicateUsing(function (array $data): array {\n                $indicators = [];\n                $parser = ActivitylogPlugin::get()->getDateParser();\n\n                if ($data['created_from'] ?? null) {\n                    $indicators['created_from'] = __('activitylog::tables.filters.created_at.created_from_indicator', [\n                        'created_from' => $parser($data['created_from'])\n                            ->format(ActivitylogPlugin::get()->getDateFormat()),\n                    ]);\n                }\n\n                if ($data['created_until'] ?? null) {\n                    $indicators['created_until'] = __('activitylog::tables.filters.created_at.created_until_indicator', [\n                        'created_until' => $parser($data['created_until'])\n                            ->format(ActivitylogPlugin::get()->getDateFormat()),\n                    ]);\n                }\n\n                return $indicators;\n            })\n            ->form([\n                self::getDatePickerCompoment('created_from'),\n                self::getDatePickerCompoment('created_until'),\n            ])\n            ->query(function (Builder $query, array $data): Builder {\n                return $query\n                    ->when(\n                        $data['created_from'] ?? null,\n                        fn (Builder $query, $date): Builder => $query->whereDate('created_at', '>=', $date),\n                    )\n                    ->when(\n                        $data['created_until'] ?? null,\n                        fn (Builder $query, $date): Builder => $query->whereDate('created_at', '<=', $date),\n                    );\n            });\n    }\n\n    public static function getEventFilterComponent(): SelectFilter\n    {\n        return SelectFilter::make('event')\n            ->label(__('activitylog::tables.filters.event.label'))\n            ->options(static::getModel()::distinct()\n                ->pluck('event', 'event')\n                ->mapWithKeys(fn ($value, $key) => [$key => __('activitylog::action.event.'.$value)])\n            );\n    }\n\n    public static function getLogNameFilterComponent(): SelectFilter\n    {\n        return SelectFilter::make('log_name')\n            ->label(__('activitylog::tables.filters.log_name.label'))\n            ->options(static::getModel()::distinct()->pluck('log_name', 'log_name')->filter());\n    }\n\n    public static function getPages(): array\n    {\n        return [\n            'index' => ListActivitylog::route('/'),\n            'view' => ViewActivitylog::route('/{record}'),\n        ];\n    }\n\n    public static function shouldRegisterNavigation(): bool\n    {\n        $plugin = Filament::getCurrentPanel()?->getPlugin('rmsramos/activitylog');\n\n        return $plugin?->getNavigationItem() ?? false;\n    }\n\n    public static function canAccess(): bool\n    {\n        $policy = Gate::getPolicyFor(static::getModel());\n\n        if ($policy && method_exists($policy, 'viewAny')) {\n            return static::canViewAny();\n        }\n\n        return ActivitylogPlugin::get()->isAuthorized();\n    }\n\n    protected static function canViewResource(Activity $record): bool\n    {\n        if ($record->subject_type && $record->subject_id) {\n            try {\n                $model = app($record->subject_type);\n\n                if (ActivityLogHelper::classUsesTrait($model, HasCustomActivityResource::class)) {\n                    $resourceModel = $model->getFilamentActualResourceModel($record);\n                    $user = auth()->user();\n\n                    return $user && $user->can('update', $resourceModel);\n                }\n\n                // Fallback to check if the user can edit the model using a generic policy\n                $user = auth()->user();\n\n                return $user && $record->subject && $user->can('update', $record->subject);\n            } catch (Exception $e) {\n                return false;\n            }\n        }\n\n        return false;\n    }\n\n    public static function restoreActivity(int|string $key): void\n    {\n        $activity = Activity::find($key);\n\n        if (! $activity) {\n            Notification::make()\n                ->title(__('activitylog::notifications.activity_not_found'))\n                ->danger()\n                ->send();\n\n            return;\n        }\n\n        $oldProperties = data_get($activity, 'properties.old');\n        $newProperties = data_get($activity, 'properties.attributes');\n\n        if ($oldProperties === null) {\n            Notification::make()\n                ->title(__('activitylog::notifications.no_properties_to_restore'))\n                ->danger()\n                ->send();\n\n            return;\n        }\n\n        try {\n            $record = $activity->subject;\n\n            if (! $record) {\n                Notification::make()\n                    ->title(__('activitylog::notifications.subject_not_found'))\n                    ->danger()\n                    ->send();\n\n                return;\n            }\n\n            // Temporarily disable activity logging to prevent updated log\n            activity()->withoutLogs(function () use ($record, $oldProperties) {\n                $record->update($oldProperties);\n            });\n\n            if (auth()->user()) {\n                activity()\n                    ->performedOn($record)\n                    ->causedBy(auth()->user())\n                    ->withProperties([\n                        'attributes' => $oldProperties,\n                        'old' => $newProperties,\n                    ])\n                    ->tap(function ($log) {\n                        $log->event = 'restored';\n                    })\n                    ->log('restored');\n            }\n\n            Notification::make()\n                ->title(__('activitylog::notifications.activity_restored_successfully'))\n                ->success()\n                ->send();\n        } catch (ModelNotFoundException $e) {\n            Notification::make()\n                ->title(__('activitylog::notifications.record_not_found'))\n                ->danger()\n                ->send();\n        } catch (Exception $e) {\n            Notification::make()\n                ->title(__('activitylog::notifications.failed_to_restore_activity', ['error' => $e->getMessage()]))\n                ->danger()\n                ->send();\n        }\n    }\n\n    public static function canRestoreSubjectFromSoftDelete(Activity $record): bool\n    {\n        if (ActivitylogPlugin::get()->getIsRestoreModelActionHidden()) {\n            return false;\n        }\n\n        if ($record->event !== 'deleted') {\n            return false;\n        }\n\n        if (! $record->subject) {\n            return false;\n        }\n\n        if (! method_exists($record->subject, 'trashed') ||\n            ! method_exists($record->subject, 'restore')) {\n            return false;\n        }\n\n        if (! $record->subject->trashed()) {\n            return false;\n        }\n\n        $user = auth()->user();\n\n        if ($user && method_exists($record->subject, 'exists')) {\n            try {\n                return $user->can('restore', $record->subject);\n            } catch (\\Exception $e) {\n                return true;\n            }\n        }\n\n        return true;\n    }\n\n    public static function restoreSubjectFromSoftDelete(Activity $record): void\n    {\n        if (! static::canRestoreSubjectFromSoftDelete($record)) {\n            Notification::make()\n                ->title(__('activitylog::notifications.unable_to_restore_this_model'))\n                ->danger()\n                ->send();\n\n            return;\n        }\n\n        try {\n            DB::beginTransaction();\n\n            $subject = $record->subject;\n\n            $beforeRestore = $subject->toArray();\n\n            activity()->withoutLogs(function () use ($subject) {\n                $subject->restore();\n            });\n\n            $subject->refresh();\n            $afterRestore = $subject->toArray();\n\n            if (auth()->user()) {\n                activity()\n                    ->performedOn($subject)\n                    ->causedBy(auth()->user())\n                    ->withProperties([\n                        'attributes' => $afterRestore,\n                        'old' => $beforeRestore,\n                        'restore_metadata' => [\n                            'restored_from_soft_delete' => true,\n                            'original_activity_id' => $record->id,\n                            'restore_type' => 'soft_delete',\n                        ],\n                    ])\n                    ->tap(function ($log) {\n                        $log->event = 'restored';\n                    })\n                    ->log('restored');\n            }\n\n            DB::commit();\n\n            Notification::make()\n                ->title(__('activitylog::notifications.model_successfully_restored'))\n                ->success()\n                ->send();\n\n        } catch (Exception $e) {\n            DB::rollBack();\n\n            Notification::make()\n                ->title(__('activitylog::notifications.error_restoring_model'))\n                ->body('Erro: '.$e->getMessage())\n                ->danger()\n                ->send();\n        }\n    }\n}\n"
  },
  {
    "path": "src/Resources/ActivitylogResource/Pages/ListActivitylog.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Resources\\ActivitylogResource\\Pages;\n\nuse Filament\\Resources\\Pages\\ListRecords;\nuse Rmsramos\\Activitylog\\Resources\\ActivitylogResource;\n\nclass ListActivitylog extends ListRecords\n{\n    protected static string $resource = ActivitylogResource::class;\n}\n"
  },
  {
    "path": "src/Resources/ActivitylogResource/Pages/ViewActivitylog.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Resources\\ActivitylogResource\\Pages;\n\nuse Filament\\Resources\\Pages\\ViewRecord;\nuse Rmsramos\\Activitylog\\Resources\\ActivitylogResource;\n\nclass ViewActivitylog extends ViewRecord\n{\n    public static function getResource(): string\n    {\n        return ActivitylogResource::class;\n    }\n}\n"
  },
  {
    "path": "src/Resources/ActivitylogResource/Schemas/ActivitylogForm.php",
    "content": "<?php\n\nuse Filament\\Forms\\Components\\Textarea;\nuse Filament\\Forms\\Components\\TextInput;\nuse Filament\\Infolists\\Components\\TextEntry;\nuse Filament\\Schemas\\Components\\Section;\nuse Filament\\Schemas\\Schema;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Rmsramos\\Activitylog\\ActivitylogPlugin;\n\nclass ActivitylogForm\n{\n    public static function configure(Schema $schema): Schema\n    {\n        return $schema\n            ->components([\n                Section::make([\n                    TextInput::make('causer_id')\n                        ->afterStateHydrated(function ($component, ?Model $record) {\n                            return $component->state($record?->causer?->name ?? '-');\n                        })\n                        ->label(__('activitylog::forms.fields.causer.label')),\n\n                    TextInput::make('subject_type')\n                        ->afterStateHydrated(function ($component, ?Model $record, $state) {\n                            /** @var Activity $record */\n                            return $state ? $component->state(Str::of($state)->afterLast('\\\\')->headline().' # '.$record->subject_id) : $component->state('-');\n                        })\n                        ->label(__('activitylog::forms.fields.subject_type.label')),\n\n                    Textarea::make('description')\n                        ->label(__('activitylog::forms.fields.description.label'))\n                        ->rows(2)\n                        ->columnSpan('full'),\n                ]),\n\n                Section::make([\n                    TextEntry::make('log_name')\n                        ->content(function (?Model $record): string {\n                            /** @var Activity $record */\n                            return $record?->log_name ? ucwords($record->log_name) : '-';\n                        })\n                        ->label(__('activitylog::forms.fields.log_name.label')),\n\n                    TextEntry::make('event')\n                        ->content(function (?Model $record): string {\n                            /** @var Activity $record */\n                            return $record?->event ? ucwords(__('activitylog::action.event.'.$record->event)) : '-';\n                        })\n                        ->label(__('activitylog::forms.fields.event.label')),\n\n                    TextEntry::make('created_at')\n                        ->label(__('activitylog::forms.fields.created_at.label'))\n                        ->content(function (?Model $record): string {\n                            /** @var Activity $record */\n                            if (! $record?->created_at) {\n                                return '-';\n                            }\n\n                            $parser = ActivitylogPlugin::get()->getDateParser();\n\n                            return $parser($record->created_at)\n                                ->format(ActivitylogPlugin::get()->getDatetimeFormat());\n                        }),\n                ]),\n            ]);\n    }\n}\n"
  },
  {
    "path": "src/Traits/HasCustomActivityResource.php",
    "content": "<?php\n\nnamespace Rmsramos\\Activitylog\\Traits;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\ntrait HasCustomActivityResource\n{\n    /**\n     * Retrieve the associated Filament resource model.\n     *\n     * @param  Model  $record  The activity log record providing context.\n     */\n    public function getFilamentActualResourceModel($record): Model\n    {\n        return $record;\n    }\n}\n"
  },
  {
    "path": "tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n  darkMode: 'class',\n  content: [\n    \"./resources/**/*.blade.php\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  }
]