diff --git a/.github/workflows/discord-releases.yml b/.github/workflows/discord-releases.yml index 84ea5b888..236cea737 100644 --- a/.github/workflows/discord-releases.yml +++ b/.github/workflows/discord-releases.yml @@ -4,14 +4,16 @@ on: jobs: github-releases-to-discord: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - name: Package Releases - uses: SethCohen/github-releases-to-discord@v1.13.1 + uses: SethCohen/github-releases-to-discord@latest + env: + WEBHOOK_DISCORD_RELEASE_URL: ${{ secrets.WEBHOOK_DISCORD_RELEASE_URL }} with: - webhook_url: ${{ secrets.WEBHOOK_DISCORD_RELEASE_URL }} + webhook_url: $WEBHOOK_DISCORD_RELEASE_URL color: "2105893" username: "GitHub Release-Bot" avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png" diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index 230a58799..c533df969 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -24,9 +24,9 @@ jobs: ref: ${{ github.head_ref }} - name: Fix PHP code style issues - uses: aglipanci/laravel-pint-action@2.2.0 + uses: aglipanci/laravel-pint-action@latest - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + - name: Commit styling changes + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling diff --git a/.github/workflows/run-phpstan-pull.yml b/.github/workflows/run-phpstan-pull.yml new file mode 100644 index 000000000..bacc60816 --- /dev/null +++ b/.github/workflows/run-phpstan-pull.yml @@ -0,0 +1,91 @@ +name: run-phpstan-pull + +on: + pull_request: + branches: + - 'master' + - 'development' + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + php: [8.4] + laravel: [12] + stability: [prefer-dist] + + name: PHPStan - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} + env: + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, exif, iconv, fileinfo + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup cache environment + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + key: ${{ env.extensionKey }} + + - name: Cache extensions + uses: actions/cache@v4 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ steps.extcache.outputs.key }} + restore-keys: ${{ steps.extcache.outputs.key }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + coverage: pcov + tools: phpunit:11.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup problem matchers for PHP + run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + + - name: Get composer cache directory + id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + + - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer config github-oauth.github.com $GITHUB_TOKEN + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update + + - name: Update dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer update --${{ matrix.stability }} --no-interaction -W + + - name: Install PHPStan + run: composer require larastan/larastan:^3.0 --no-interaction -W + + - uses: actions/cache@v4 + with: + path: ./build/phpstan + key: phpstan-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} + + - name: Run PHPStan Tests + run: ./vendor/bin/phpstan analyse \ No newline at end of file diff --git a/.github/workflows/run-phpstan.yml b/.github/workflows/run-phpstan.yml index c8163e5ac..e3069324c 100644 --- a/.github/workflows/run-phpstan.yml +++ b/.github/workflows/run-phpstan.yml @@ -1,16 +1,13 @@ name: run-phpstan on: - pull_request: - branches: - - 'master' - - 'development' push: branches: - '*' # matches every branch that doesn't contain a '/' - '*/*' # matches every branch containing a single '/' - '**' # matches every branch - '!master' + - '!development' jobs: test: @@ -19,14 +16,14 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.3] - laravel: [10] + php: [8.4] + laravel: [12] stability: [prefer-dist] name: PHPStan - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} env: - extensionKey: phpextensions - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, exif, iconv, fileinfo steps: - name: Checkout code @@ -53,7 +50,7 @@ jobs: php-version: ${{ matrix.php }} extensions: ${{ env.extensions }} coverage: pcov - tools: phpunit:9.5 + tools: phpunit:11.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -68,12 +65,14 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-PHPStan-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-PHPStan-P${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: phpstan-${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer config github-oauth.github.com $GITHUB_TOKEN - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' @@ -81,10 +80,15 @@ jobs: - name: Update dependencies if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer update --${{ matrix.stability }} --no-interaction + run: composer update --${{ matrix.stability }} --no-interaction -W - name: Install PHPStan - run: composer require larastan/larastan:^2.0 --dev --no-interaction + run: composer require larastan/larastan:^3.0 --dev --no-interaction -W + + - uses: actions/cache@v4 + with: + path: ./build/phpstan + key: phpstan-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} - name: Run PHPStan Tests - run: ./vendor/bin/phpstan analyse + run: ./vendor/bin/phpstan analyse \ No newline at end of file diff --git a/.github/workflows/run-tests-pcov-pull.yml b/.github/workflows/run-tests-pcov-pull.yml index ef73e4b42..38c961e84 100644 --- a/.github/workflows/run-tests-pcov-pull.yml +++ b/.github/workflows/run-tests-pcov-pull.yml @@ -3,12 +3,10 @@ name: run-tests-pcov-pull on: push: branches: - - 'develop' - 'development' - 'master' pull_request: branches: - - 'develop' - 'development' - 'master' @@ -18,15 +16,15 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [ubuntu-24.04] php: [8.3] - laravel: [10] + laravel: [11] stability: [prefer-dist] name: PCOV - ${{ matrix.os }} - P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} env: extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-withpcov - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pcov,pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pcov,pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo steps: - name: Checkout code @@ -39,7 +37,14 @@ jobs: php-version: ${{ matrix.php }} extensions: ${{ env.extensions }} key: ${{ env.extensionKey }} - + + - name: Cache extensions + uses: actions/cache@v4 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ steps.extcache.outputs.key }} + restore-keys: ${{ steps.extcache.outputs.key }} + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -51,13 +56,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Cache extensions - uses: actions/cache@v4 - with: - path: ${{ steps.extcache.outputs.dir }} - key: ${{ steps.extcache.outputs.key }} - restore-keys: ${{ steps.extcache.outputs.key }} - - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" @@ -69,12 +67,14 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-PCOV-PULL-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-PCOV-PULL-PHP${{ matrix.php }}-Laravel${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer config github-oauth.github.com $GITHUB_TOKEN - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' @@ -88,14 +88,14 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --cache-directory=".phpunit.cache/code-coverage" --strict-coverage --coverage-clover ./coverage.xml --processes=4 + run: php ./vendor/bin/phpunit --cache-directory=".phpunit.cache/code-coverage" --strict-coverage --coverage-clover ./coverage.xml --testsuite "Laravel Livewire Tables Unit Test Suite","Laravel Livewire Tables Visuals Test Suite" - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: - token: ${{ secrets.CODE_COV_TOKEN }} + token: $CODECOV_TOKEN files: ./coverage.xml verbose: true diff --git a/.github/workflows/run-tests-pull.yml b/.github/workflows/run-tests-pull.yml index 38f635f9c..257e1d43d 100644 --- a/.github/workflows/run-tests-pull.yml +++ b/.github/workflows/run-tests-pull.yml @@ -1,9 +1,8 @@ -name: run-tests-pull +name: Run Tests Pull on: pull_request: branches: - - 'develop' - 'development' - 'master' @@ -12,17 +11,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: fail-fast: false - max-parallel: 3 + max-parallel: 2 matrix: os: [ubuntu-latest] - php: [8.1, 8.2, 8.3] + php: [8.2, 8.3] laravel: [10.*] stability: [prefer-dist] name: PULL PHP-${{ matrix.php }} - Laravel-10 env: - extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L{{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr steps: - name: Checkout code @@ -40,15 +39,15 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: ${{ env.extensions }} - tools: phpunit:latest + tools: phpunit:9.6 ini-values: memory_limit=512M coverage: none env: @@ -65,12 +64,14 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer config github-oauth.github.com $GITHUB_TOKEN - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' @@ -84,8 +85,10 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --no-coverage --processes=4 + run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage + - name: Run Visuals Tests + run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage test-laravel11: runs-on: ${{ matrix.os }} @@ -94,14 +97,97 @@ jobs: max-parallel: 2 matrix: os: [ubuntu-latest] - php: [8.2, 8.3] + php: [8.2, 8.3, 8.4] laravel: [11.*] stability: [prefer-dist] name: PULL PHP-${{ matrix.php }} - Laravel-11 env: - extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L{{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup cache environment + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + key: ${{ env.extensionKey }} + + - name: Cache extensions + uses: actions/cache@v4 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + tools: phpunit:latest + ini-values: memory_limit=512M + coverage: none + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup problem matchers for PHP + run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + + - name: Get composer cache directory + id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer- + + - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer config github-oauth.github.com $GITHUB_TOKEN + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update + + - name: Update dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer update --${{ matrix.stability }} --no-interaction + + - name: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run Unit Tests + run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage + + - name: Run Visuals Tests + run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage + + test-laravel12: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + os: [ubuntu-latest] + php: [8.2, 8.3, 8.4] + laravel: [12.*] + stability: [prefer-dist] + + name: PULL PHP-${{ matrix.php }} - Laravel-12 + env: + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }} + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr steps: - name: Checkout code @@ -119,8 +205,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -144,12 +230,14 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer config github-oauth.github.com $GITHUB_TOKEN - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' @@ -163,4 +251,7 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --no-coverage --processes=4 + run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage + + - name: Run Visuals Tests + run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9f6997a6c..70fb43bd8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,4 +1,4 @@ -name: run-tests +name: Run Standard Tests on: push: @@ -13,17 +13,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: fail-fast: false - max-parallel: 3 + max-parallel: 2 matrix: - os: [ubuntu-latest] - php: [8.1, 8.2, 8.3] + os: [ubuntu-24.04] + php: [8.2, 8.3] laravel: [10.*] stability: [prefer-dist] name: PHP-${{ matrix.php }} - Laravel-10 env: - extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L{{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr steps: - name: Checkout code @@ -41,15 +41,15 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: ${{ env.extensions }} - tools: phpunit:latest + tools: phpunit:9.6 ini-values: memory_limit=512M coverage: none env: @@ -66,12 +66,14 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer config github-oauth.github.com $GITHUB_TOKEN - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' @@ -85,8 +87,10 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --no-coverage --processes=4 + run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage + - name: Run Visuals Tests + run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage test-laravel11: runs-on: ${{ matrix.os }} @@ -94,15 +98,15 @@ jobs: fail-fast: false max-parallel: 2 matrix: - os: [ubuntu-latest] - php: [8.2, 8.3] + os: [ubuntu-24.04] + php: [8.2, 8.3, 8.4] laravel: [11.*] stability: [prefer-dist] name: PHP-${{ matrix.php }} - Laravel-11 env: - extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L{{ matrix.laravel }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pcov, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, :psr + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr steps: - name: Checkout code @@ -120,8 +124,8 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.extcache.outputs.dir }} - key: ${{ runner.os }}-${{ steps.extcache.outputs.key }} - restore-keys: ${{ runner.os }}-${{ steps.extcache.outputs.key }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -145,12 +149,14 @@ jobs: - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-STDPUSH-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }} + composer config github-oauth.github.com $GITHUB_TOKEN - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' @@ -164,4 +170,90 @@ jobs: run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Run Unit Tests - run: php ./vendor/bin/paratest --no-coverage --processes=4 + run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage + + - name: Run Visuals Tests + run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage + + test-laravel12: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + max-parallel: 2 + matrix: + os: [ubuntu-24.04] + php: [8.2, 8.3, 8.4] + laravel: [12.*] + stability: [prefer-dist] + + name: PHP-${{ matrix.php }} - Laravel-12 + env: + extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup cache environment + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + key: ${{ env.extensionKey }} + + - name: Cache extensions + uses: actions/cache@v4 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: ${{ env.extensions }} + tools: phpunit:latest + ini-values: memory_limit=512M + coverage: none + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup problem matchers for PHP + run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + + - name: Get composer cache directory + id: composer-cache + run: | + echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer- + + - name: Add token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer config github-oauth.github.com $GITHUB_TOKEN + + - name: Install dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update + + - name: Update dependencies + if: steps.composer-cache.outputs.cache-hit != 'true' + run: composer update --${{ matrix.stability }} --no-interaction + + - name: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run Unit Tests + run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage + + - name: Run Visuals Tests + run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f17a89a1..ce9dd01ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,300 @@ All notable changes to `laravel-livewire-tables` will be documented in this file +## [v3.7.3] - 2025-05-03 +### Bug Fixes +- Interim fix for Livewire Component Columns to mitigate core Livewire bug by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2258 + +## [v3.7.2] - 2025-05-03 +### Bug Fixes +- Improved Pagination UX for Bootstrap 4 by @daniel-skopek in https://github.com/rappasoft/laravel-livewire-tables/pull/2251 +- Fixes for livewire component column by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2245 +- Boolean filter for bootstrap by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2244 +- Update IsNumericFilter.php by @G4Zz0L1 in https://github.com/rappasoft/laravel-livewire-tables/pull/2230 +- Fixed collapsed function bug with tailwind CSS on mobile version by CarlosChub27 in https://github.com/rappasoft/laravel-livewire-tables/pull/2228 + +### New Features +- Add Wrapper Options to ArrayColumn by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2255 + +### Tweaks +- Tidying PHPDocs by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2246 + +## [v3.7.1] - 2025-02-28 +### Bug Fixes +- Ensure that LinkColumn is included in query if "from" is defined by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2224 + +## [v3.7.0] - 2025-02-27 + +### Bug Fixes +- Filters urgent fixes - correct Filter Default QueryString by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2188 +- Fix Search Field in bootstrap by @yparitcher in https://github.com/rappasoft/laravel-livewire-tables/pull/2183 +- Add "after-tools" configurable area by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2180 + +### New Features +- Add setFilterPillTitleAsHtml by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2204 +- Enable setting styles for sorting pills as a configuration by @HussamAlhennawi in https://github.com/rappasoft/laravel-livewire-tables/pull/2179 +- Enable setting styles for filter pills as a configuration by @HussamAlhennawi in https://github.com/rappasoft/laravel-livewire-tables/pull/2178 +- Enable setting styles for column select as a configuration by @HussamAlhennawi in https://github.com/rappasoft/laravel-livewire-tables/pull/2175 +- BulkActionTweaks - Adding default checkbox, customising attribute behaviours by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2203 +- Laravel v12 Support by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2217 + +### Tweaks +- Tweak for text pill title by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2206 +- Tweak Return Types by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2205 +- Migrate Column/Filter Traits by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2202 +- Filter Rationalisation & Livewire Array Filter improvements by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2191 +- Move Filter View Traits by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2189 +- Filter Trait - Reorganization by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2181 + +## [v3.6.0] - 2025-01-16 + +### Bug Fixes +- Ensure Default Sorting Is Shown in Pills by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2138 +- Filters + - Find Filters Before Query by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2143 + - Migrate Filter Code Appropriately by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2146 + - Migrate Filter Status into Own Trait by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2147 + +### Tweaks +- Enable InputAttributes for SelectFilter by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2133 +- Tidy ComponentUtilities, Migrate ColumnSelectQueryString by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2135 +- TH Fixes - Clean-up, efficiency, and Sort Icons fixes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2140 +- Add hasCollapsedColumns as Computed by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2141 +- Tidy up Blade Class Definitions by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2145 +- Tidy ColumnSelectHelpers & displayToolbarFilters Method by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2150 +- Tidy & Improve Collapsed Columns Behaviour by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2159 +- Tidy computed properties behaviour by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2160 +- WithSearch Tweaks by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2163 +- Optimize Header/Footer by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2164 +- Clean up Column Component View and Slot behaviours by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2169 +- Adjustments for ComponentColumn - cleaning up behaviours by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2173 + +### Testing +- Add Missing Test for getCustomSortingPillDirectionsLabel with invalid direction by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2130 +- Add Custom FIlter Input Attributes, Cleanup Filter Tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2131 +- Separate the Unit and Visuals Test Suites by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2144 +- Update PCOV Workflow by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2148 +- Add configurable area test by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2149 +- Add SortingConfiguration Missing Test by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2151 +- Add Missing Search Tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2152 +- Adjust SearchHelpersTest by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2153 +- Add test queryStringWithQueryString by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2154 +- Add missing tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2157 +- Add queryStringAliasTest by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2161 +- Migrate LivewireComponentColumn methods and add some missing basic tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2168 +- Add initial tests for LivewireComponentArrayFilter by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2170 +- Improve centralisation of tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2172 + +## [v3.5.10] - 2024-12-11 +### Tweaks +- Migrate additional Styling into separate traits by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2127 + +## [v3.5.9] - 2024-12-11 +### Tweaks +- Optimize Imports by @edwinvdpol in https://github.com/rappasoft/laravel-livewire-tables/pull/2124 + +## [v3.5.8] - 2024-12-10 +### New Features +- Set bulk action row button attributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2117 +- Add setFilterSlidedownWrapperAttributes and setFilterSlidedownRowAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2120 + +### Bug Fixes +- Respect setDisplayPaginationDetailsDisabled for unpaginated tables by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2119 + +### Localisation +- Added neccessary files for Farsi translation by @AmirMehrabi in https://github.com/rappasoft/laravel-livewire-tables/pull/2100 + +### Testing +- Workflow Adjustments by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2108 +- Add extra Search Lazy Tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2107 +- Restore Missing Lazy Search Tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2106 +- Ignore WithEvents Coverage by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2105 +- Add missing tests for WithCustomisations by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2104 +- Add missing LivewireComponentFilterTest and BooleanFilterTest by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2121 + +## [v3.5.7] - 2024-12-01 +### New Features +- IncrementColumn by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2096 +- Add setFilterPopoverAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2101 + +### Tweaks +- Remove View TypeHinting in blades due to reported errors by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2097 + +### Blades +- Remove $component from blades to improve performance by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2098 + +### Testing +- Exclude config/database from sources by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2102 +- Add missing tests for WithCustomisations by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2104 +- Ignore WithEvents Coverage by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2105 +- Add Search Lazy Tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2106 +- Add extra Search Lazy Tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2107 + + +## [v3.5.6] - 2024-11-28 +### New Features +- Add Icon to Search Input by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2092 + +### Tweaks +- Search - Rationalisation of blades into files by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2094 +- Columns() Setup Improvements by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2089 +- Typehinting in blade components by @edwinvdpol in https://github.com/rappasoft/laravel-livewire-tables/pull/2081 + +### Testing +- Tweak Workflows to use an env key by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2090 + +## [v3.5.5] - 2024-11-22 +### Bug Fixes +- Fix date range filter default value by @edwinvdpol in https://github.com/rappasoft/laravel-livewire-tables/pull/2082 + +## [v3.5.4] - 2024-11-21 +### Bug Fixes +- Allow JSON and PHP type localisations by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2071 +- Allow lazy loading of tables by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2072 + +### Testing +- RemoveConfigFileFromCoverage by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2080 +- Test for ViewComponentColumn - Cannot return non-array attributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2078 +- BooleanFilter - Add Tests for Null in IsEmpty and Validate by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2077 +- Add Attributes Check For ViewComponentColumn by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2076 +- Add ViewComponentColumn label test by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2075 +- Add ColorColumnTests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2074 + +## [v3.5.3] - 2024-11-18 +### Bug Fixes +- FixSetDefaultPerPage by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2067 +- Fix BooleanColumn unexpected truthy behaviour by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2066 +- Adjustment for DateRangeFilter by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2064 + +### Testing +- Adjust SessionStorageHelpersTest by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2065 +- Add updatedSelectedColumns test for Event by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2060 +- Add test for FilterApplied Event being dispatched by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2059 +- Add Simple updatedSearch tests by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2058 +- Add test for No Columns defined - throws correct Exception by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2057 + +## [v3.5.2] - 2024-11-09 +## Bug Fixes +- Migrate Localisation back to PHP Files from JSON by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2038 + +## [v3.5.1] - 2024-11-09 +### Bug Fixes +- Fix NumberFilter bug for string values by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2034 +- Fixes for Filter Pills - Split blades, and ensure invalid filter alues are removed by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2035 + +## [v3.5.0] - 2024-11-06 +### Bug Fixes +- Issue in multiple places where there is incorrect brackets in conjunction with coalescing operator (??) by @mrl22 in https://github.com/rappasoft/laravel-livewire-tables/pull/2021 +- Add Value to BooleanColumn custom view by @lrjoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2010 +- Add config option to bypass setting User on Events. by @me-julian in https://github.com/rappasoft/laravel-livewire-tables/pull/2006 +- Livewire column doesn't have title() method by @ChrisThompsonTLDR in https://github.com/rappasoft/laravel-livewire-tables/pull/2002 +- Loading Placeholder Adjustments by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1987 + +### New Features +- Add Sort in QueryString by @lrjoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2018 +- Add Search in QueryString by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2017 +- Add Filter in QueryString by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2011 +- BETA: Livewire Custom Filter (Array) by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/2025 + +### Localisation +- Adds Swedish translations by @Aiiion in https://github.com/rappasoft/laravel-livewire-tables/pull/2027 +- Fix missing i18n keys for FR, IT, EN, DE by @khwadj in https://github.com/rappasoft/laravel-livewire-tables/pull/1993 +- Add lang Norwegian and Albanian by @channor in https://github.com/rappasoft/laravel-livewire-tables/pull/1988 + +## [v3.4.22] - 2024-09-29 +### Bug Fixes +- Fix Loading Placeholder Bug - Breaking Table by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1969 + +### New Features +- Add setPaginationWrapperAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1978 +- Add configurable areas - before-wrapper and after-wrapper by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1977 +- Add ToolsAttributes and ToolbarAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1982 + +### Docs +- Add getTitle reference for setTdAttributes/setTrAttributes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1976 +- Add setToolsAttributes and setToolBarAttributes docs by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1984 +- Add docs for the ColumnSelect lifecycle hooks by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1983 + +## [v3.4.21] - 2024-09-25 +### Bug Fixes +- Remove persist from getFilterGenericData by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1966 +- In LaravelLivewireTablesEvent, change the type to Illuminate\Contracts\Auth\Authenticatable by @khwadj in https://github.com/rappasoft/laravel-livewire-tables/pull/1963 +- Fix for Search Field Attribute Defaults by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1962 +- Fix Filter Pills Icon - Tailwind by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1961 +- Add filterComponents into queryString to ensure they're maintained by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1957 +- Reset Current Page on "Per Page" changing by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1953 + +### New Features +- Add setLabelAttributes method to Action, and update Docs for Filter by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1952 + +### Tweaks +- Migration to Core attribute management by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1943 +- Localisation - Avoid Conflicts With Other Packages by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1955 +- GitHub Workflow Tweak for Styling Fixes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1967 +- GitHub Workflow Tweak for Discord - Updates by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1968 + +### Docs +- Fix syntax for DateColumn outputFormat in docs by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1960 + + +## [v3.4.20] - 2024-09-10 +### Bug Fixes +- Revert tableName to be public by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1937 + +## [v3.4.19] - 2024-09-08 +### Bug Fixes +- Adjustment for Laravel 10 GH Workflows by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1933 +- Fixes for ButtonGroupColumn, ImageColumn, LinkColumn - to not default as label if has a "from" property. by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1932 +- Add button type to tailwind pagination blade template by @matzeschmitt in https://github.com/rappasoft/laravel-livewire-tables/pull/1928 + +## [v3.4.18] - 2024-09-08 +### New Features +- Added translation to Polish by @meavric in https://github.com/rappasoft/laravel-livewire-tables/pull/1925 + +### Docs +- Added example for Vertical Scrolling table by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1926 + +## [v3.4.17] - 2024-09-01 +### New Features +- Add hide table option by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1914 +- Add column select session methods by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1913 +- Save filter selection to session (BETA) by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1910 + +### Tweaks +- Use Core Attribute Bag by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1916 +- Use Core HasTheme Methods by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1915 + +## [v3.4.16] - 2024-08-27 +### New Features +- Add icon column by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1902 +- Enable/Disable Tools/Toolbar by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1896 + +### Bug Fixes +- Fix has actions by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1901 +- Use Computed Properties By Default by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1898 + +### Tweaks +- PHPStan - Config File Update and Baseline by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1903 + +## [v3.4.15] - 2024-08-25 +### New Features +- BooleanColumn - Toggleable Callback by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1892 + +### Tweaks +- Doc Type Fixes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1891 + +## [v3.4.14] - 2024-08-25 +### New Features +- Set Action Position (Left/Center/Right) and Set Actions in Toolbar by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1889 + +## [v3.4.13] - 2024-08-25 +### Bug Fixes +- Fix for Action Button with no icon by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1887 + +### Docs +- Add a Recommended Approach document by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1886 +- Reorder the "Getting Started" docs by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1884 + ## [v3.4.12] - 2024-08-23 ### Tweaks - Adjust Action Button Margins by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1880 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4e9fea06..af96ac892 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,44 @@ # Contributing -Contributions are very welcome, please find below a summary of what is expected from contributions: +This package is maintained by a core team, backed by a strong community effort, and contributions are extremely welcome! -- Follow the conventions for methods, adding to the relevant configuration/helper trait -- Add properties to the "With" trait +Please find below a brief summary of how to make a good contribution. This helps to ensure a smooth review and merge of a PR. + +## Discussing A Feature +Please do feel free to raise a Discussion topic, a Feature Request Issue, or reach out on the official Discord to discuss any ideas! + +## Starting A Contribution +- Always create a fresh branch in your fork for every change. This should be based on the "development" branch, as other branches may be outdated, or lack the change history. +- Ensure that a PR contains a single feature/fix. PRs with multiple features often end up with merge conflicts! +- Avoid introducing a breaking change. If your change makes a radical or substantial change, then the existing behaviour should be maintained as the default. The core team tracks these, and as major versions are reached, may introduce new default behaviours. + +## Generic Information +- Avoid adding any additional dependencies/requirements to the package unless discussed and approved by the core team. - Typehint both properties and return values -- Add a comment to the method -- Add tests for new methods -- Add documentation for new methods \ No newline at end of file +- Add a comment to the method to explain what it does, this does not/should not be lengthy! + +## Views +- Where amending/appending to Views/Blades, ensure that you cater for Tailwind, Bootstrap-4 and Bootstrap-5 to ensure continued support + +## Tests +- Always add tests for new methods +- Review existing tests if you make changes. +- The project maintains a very high level of test coverage. A PR that reduces this coverage is less likely to be readily accepted. + +## Documentation +There is comprehensive documentation available for existing features. Please add documentation for any new/amended methods, as otherwise this may result in delays, which may be significant! + +## Conventions +- Please follow the project conventions below: + +### Core Features +A feature set typically exists in a "With" trait (For example - Rappasoft\LaravelLivewireTables\Traits\WithColumns.php) +- The "WithColumns" contains any properties, and any key methods +- Each feature set has a "Helper" and "Configuration" trait associated with it, for setting and getting properties, both server-side, and client-side. + +## Actions, Columns and Filters +An Action/Column/Filter type exists in the "Views" section (For example Rappasoft\LaravelLivewireTables\Views\Columns\DateColumn.php) +- Each Action/Column/Filter again has a "Helper" and "Configuration" trait associated with it, for setting and getting properties +- Actions should extend Rappasoft\LaravelLivewireTables\Views\Action (or a class that extends this) +- Columns should extend Rappasoft\LaravelLivewireTables\Views\Column (or a class that extends this) +- Filters should extend Rappasoft\LaravelLivewireTables\Views\Filter (or a class that extends this) + diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ffd644706..f4a2f3e2d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,22 +5,27 @@ # Localisation Contributors | Language | Contributor(s) | | --- | --- | +| Albanian (SQ) | [channor] (https://github.com/channor) | | Arabic (AR) | None | | Catalan (CA) | None | | Brazilian (pt_BR) | [irineujunior](https://github.com/irineujunior)| | Chinese - Taiwan (TW) | None | | Danish (DA) | [jeppeolesen](https://github.com/jeppeolesen) | | Dutch (NL) | [siebsie23](https://github.com/siebsie23), [spekkie2002](https://github.com/spekkie2002), [Jerimu](https://github.com/Jerimu) | -| English (EN) | Core Team | +| English (EN) | Core Maintainers | +| Farsi (FA) | [AmirMehrabi](https://github.com/AmirMehrabi) | | Finnish (FI) | [devmikromike](https://github.com/devmikromike) | -| French (FR) | [dgillier](https://github.com/dgillier) | -| German (DE) | None | +| French (FR) | [dgillier](https://github.com/dgillier), [khwadj](https://github.com/khwadj)| +| German (DE) | [khwadj](https://github.com/khwadj) | | Indonesian (ID) | None | -| Italian (IT) | Core Team | +| Italian (IT) | Core Maintainers, [khwadj](https://github.com/khwadj) | | Malay (MS) | [wanadri](https://github.com/wanadri) | +| Norwegian (NB) | [channor] (https://github.com/channor) | +| Polish (PL) | [meavric](https://github.com/meavric) | | Portugese (PT) | None | | Russian (RU) | None | | Spanish (ES) | [CristhoferMF](https://github.com/CristhoferMF) | +| Swedish (SV) | [Aiiion](https://github.com/Aiiion) | | Thai (TH) | None | | Turkish (TK) | None | | Ukrainian (UK) | [Oleksandr-Moik](https://github.com/Oleksandr-Moik) | \ No newline at end of file diff --git a/README.md b/README.md index 61e6523ef..16e4c36ee 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Tests](https://github.com/rappasoft/laravel-livewire-tables/actions/workflows/run-tests.yml/badge.svg)](https://github.com/rappasoft/laravel-livewire-tables/actions/workflows/run-tests.yml) [![Total Downloads](https://img.shields.io/packagist/dt/rappasoft/laravel-livewire-tables.svg?style=flat-square)](https://packagist.org/packages/rappasoft/laravel-livewire-tables) [![codecov](https://codecov.io/gh/rappasoft/laravel-livewire-tables/graph/badge.svg?token=1B9VKO9KWG)](https://codecov.io/gh/rappasoft/laravel-livewire-tables) -![PHP Stan Level 5](https://img.shields.io/badge/PHPStan-level%205-brightgreen.svg?style=flat) +![PHP Stan Level 6](https://img.shields.io/badge/PHPStan-level%206-brightgreen.svg?style=flat) ### Enjoying this package? [Buy me a beer 🍺](https://www.buymeacoffee.com/rappasoft) diff --git a/composer.json b/composer.json index bda267c29..bd58755ef 100644 --- a/composer.json +++ b/composer.json @@ -23,21 +23,21 @@ } ], "require": { - "php": "^8.1|^8.2|^8.3", + "php": "^8.1|^8.2|^8.3|^8.4", "blade-ui-kit/blade-heroicons": "^2.1", - "illuminate/contracts": "^10.0|^11.0", - "illuminate/support": "^10.0|^11.0", + "illuminate/contracts": "^10.0|^11.0|^12.0", + "illuminate/support": "^10.0|^11.0|^12.0", "livewire/livewire": "^3.0|dev-main" }, "require-dev": { "ext-sqlite3": "*", - "brianium/paratest": "^5.0|^6.0|^7.0|^8.0", + "brianium/paratest": "^5.0|^6.0|^7.0|^8.0|^9.0", + "larastan/larastan": "^2.6|^3.0", "laravel/pint": "^1.10", "monolog/monolog": "*", - "nunomaduro/collision": "^6.0|^7.0|^8.0", - "larastan/larastan": "^2.6", - "orchestra/testbench": "^7.0|^8.0|^9.0", - "phpunit/phpunit": "^9.0|^10.0|^11.0" + "nunomaduro/collision": "^6.0|^7.0|^8.0|^9.0", + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^9.0|^10.0|^11.0|^12.0" }, "autoload": { "psr-4": { diff --git a/config/livewire-tables.php b/config/livewire-tables.php index 4cc3dccab..dad9ea43c 100644 --- a/config/livewire-tables.php +++ b/config/livewire-tables.php @@ -30,6 +30,11 @@ */ 'enable_blade_directives' => false, + /** + * Use JSON Translations instead of PHP Array + */ + 'use_json_translations' => false, + /** * Customise Script & Styles Paths */ @@ -114,4 +119,14 @@ 'defaultConfig' => [], ], + /** + * Configuration options for Events + */ + 'events' => [ + /** + * Enable or disable passing the user from Laravel's Auth service to events + */ + 'enableUserForEvent' => true, + ], + ]; diff --git a/database/sqlite.database b/database/database.sqlite similarity index 87% rename from database/sqlite.database rename to database/database.sqlite index 51e3c6632..1a9e27435 100644 Binary files a/database/sqlite.database and b/database/database.sqlite differ diff --git a/docs/column-types/array_column.md b/docs/column-types/array_column.md index 7802e78aa..c0799bf3a 100644 --- a/docs/column-types/array_column.md +++ b/docs/column-types/array_column.md @@ -5,7 +5,7 @@ weight: 2 Array columns provide an easy way to work with and display an array of data from a field. -``` +```php ArrayColumn::make('notes', 'name') ->data(fn($value, $row) => ($row->notes)) ->outputFormat(fn($index, $value) => "".$value->name."") @@ -13,14 +13,64 @@ ArrayColumn::make('notes', 'name') ->sortable(), ``` -### Empty Value +## Empty Value You may define the default/empty value using the "emptyValue" method -``` +```php ArrayColumn::make('notes', 'name') ->emptyValue('Unknown'), ``` +## Wrapping the Output + +As the ArrayColumn is designed to handle multiple related records, you can choose to wrap these for improved UX. + +It is recommended that you utilise the built-in flexCol or flexRow approaches, which will also disable the separator + +### flexCol +This adds either: +- Tailwind: 'flex flex-col' +- Bootstrap: 'd-flex d-flex-col' + +And merges any attributes specified in the sole parameter (as an array) +```php +ArrayColumn::make('notes', 'name') + ->data(fn($value, $row) => ($row->notes)) + ->outputFormat(fn($index, $value) => "".$value->name."") + ->flexCol(['class' => 'bg-red-500']) + ->sortable(), +``` + +### flexRow + +This adds either: +- Tailwind: 'flex flex-row' +- Bootstrap: 'd-flex d-flex-row' + +And merges any attributes specified in the sole parameter (as an array) +```php +ArrayColumn::make('notes', 'name') + ->data(fn($value, $row) => ($row->notes)) + ->outputFormat(fn($index, $value) => "".$value->name."") + ->flexRow(['class' => 'bg-red-500']) + ->sortable(), +``` + +### Manually + +You can also specify a wrapperStart and wrapperEnd, for example, for an unordered list: + +```php +ArrayColumn::make('notes', 'name') + ->data(fn($value, $row) => ($row->notes)) + ->outputFormat(fn($index, $value) => "
  • ".$value->name."
  • ") + ->wrapperStart("") + ->sortable(), +``` + +## See Also + Please also see the following for other available methods: diff --git a/docs/column-types/sum_column.md b/docs/column-types/sum_column.md index d63aa8f47..638818b23 100644 --- a/docs/column-types/sum_column.md +++ b/docs/column-types/sum_column.md @@ -1,6 +1,6 @@ --- title: Sum Columns (beta) -weight: 13 +weight: 15 --- Sum columns provide an easy way to display the "Sum" of a field on a relation. diff --git a/docs/column-types/view_component_column.md b/docs/column-types/view_component_column.md index 4b1b9a033..5fdb4b46d 100644 --- a/docs/column-types/view_component_column.md +++ b/docs/column-types/view_component_column.md @@ -1,6 +1,6 @@ --- title: View Component Columns -weight: 14 +weight: 16 --- View Component columns let you specify a component name and attributes and provide attributes to the View Component. This will render the View Component in it's entirety. diff --git a/docs/column-types/wire_link_column.md b/docs/column-types/wire_link_column.md index 9abf15aac..63c23e8a2 100644 --- a/docs/column-types/wire_link_column.md +++ b/docs/column-types/wire_link_column.md @@ -1,6 +1,6 @@ --- title: Wire Link Column (beta) -weight: 15 +weight: 17 --- WireLink columns provide a way to display Wired Links in your table without having to use `format()` or partial views, with or without a Confirmation Message diff --git a/docs/columns/available-methods.md b/docs/columns/available-methods.md index 5c6eaa9b6..18f840b5d 100644 --- a/docs/columns/available-methods.md +++ b/docs/columns/available-methods.md @@ -302,3 +302,7 @@ Labels are visible by default, but should you wish to override a previous "hideC Column::make('Name') ->setColumnLabelStatusEnabled() ``` + +## See Also +[Column Styling](./styling) + diff --git a/docs/columns/column-selection.md b/docs/columns/column-selection.md index fae9eb906..0d5872fbb 100644 --- a/docs/columns/column-selection.md +++ b/docs/columns/column-selection.md @@ -222,4 +222,68 @@ class DataTableColumnsSelectedListener } } -``` \ No newline at end of file +``` + +## Styling + +### setColumnSelectButtonAttributes +Allows for customisation of the appearance of the "Column Select" button + +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Column Select button, the default colors are: + +Bootstrap: None + +Tailwind: `text-gray-700 bg-white border-gray-300 hover:bg-gray-50 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-700 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600` + +#### default-styling +Setting to false will disable the default styling for the Column Select button, the default styling is: + +Bootstrap: `btn dropdown-toggle d-block w-100 d-md-inline` + +Tailwind: `inline-flex justify-center px-4 py-2 w-full text-sm font-medium rounded-md border shadow-sm focus:ring focus:ring-opacity-50` + +```php +public function configure(): void +{ + $this->setColumnSelectButtonAttributes([ + 'class' => 'focus:border-rose-300 focus:ring-1 focus:ring-rose-300 focus-visible:outline-rose-300', // Add these classes to the column select button + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` + +### setColumnSelectMenuOptionCheckboxAttributes +Allows for customisation of the appearance of the "Column Select" menu option checkbox + +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Column Select menu option checkbox, the default colors are: + +Bootstrap: None + +Tailwind: `text-indigo-600 border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600` +#### default-styling + +Setting to false will disable the default styling for the Column Select menu option checkbox, the default styling is: + +Bootstrap 4: None + +Bootstrap 5: `form-check-input` + +Tailwind: `transition duration-150 ease-in-out rounded shadow-sm focus:ring focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-wait` + +```php +public function configure(): void +{ + $this->setColumnSelectMenuOptionCheckboxAttributes([ + 'class' => 'text-rose-300 focus:border-rose-300 focus:ring-rose-300', // Add these classes to the column select menu option checkbox + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` diff --git a/docs/columns/other-column-types.md b/docs/columns/other-column-types.md index c3a8bd154..f12adf6e7 100644 --- a/docs/columns/other-column-types.md +++ b/docs/columns/other-column-types.md @@ -28,6 +28,9 @@ weight: 4
  • Date Columns
  • +
  • + [Icon Columns (Beta)](../column-types/icon_columns) +
  • Image Columns
  • diff --git a/docs/columns/styling.md b/docs/columns/styling.md new file mode 100644 index 000000000..7862c9566 --- /dev/null +++ b/docs/columns/styling.md @@ -0,0 +1,302 @@ +--- +title: Styling +weight: 10 +--- + +## Keeping Defaults +To allow simpler customisation on a per-table basis, there are numerous methods available to over-ride the default CSS classes. +Historically, this was provided by a simple toggleable "default" flag. However - in many cases, the original "default" has been expanded to include: + +### Keep Default Colors And Default Styles +- set default flag to true +or +- set default-colors flag to true +- set default-styling flag to true + +### Keep Default Colors Only +- set default flag to false +- set default-colors flag to true +- set default-styling flag to false + +### Keep Default Styling Only +- set default flag to false +- set default-colors flag to false +- set default-styling flag to true + +## Styling The Column Label + +The Column itself provides the capability to style the Label shown in the "th" element. You can set custom attributes to pass to the Column Label on a per-Column basis: + +For example: +```php +Column::make('Name') + ->setLabelAttributes(['class' => 'text-2xl']) +``` +By default, this replaces the default classes on the label, if you would like to keep them, set the default/default-styling/default-colors flags to true as appropriate. + +## Styling Table Elements + +It is important to note that you can also customise the parent TH and TD elements, customising both classes and attributes for each Column's header (using setThAttributes) and each row of that Column (using setTdAttributes), these are available in the configure() method of the table. +This allows you to customise attributes based on the value of the table as well! + +Below is a copy of the relevant sections from [datatable styling](../datatable/styling) to ensure visibility of the options. More are documented on the main datatable styling page. + +## setThAttributes + +Set a list of attributes to override on the th elements. + +If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make() +```php + $column->getTitle() +``` + +```php +public function configure(): void +{ + // Takes a callback that gives you the current column. + $this->setThAttributes(function(Column $column) { + if ($column->isField('name')) { + return [ + 'class' => 'bg-green-500', + ]; + } + + return []; + }); +} +``` + +### Keeping Default Colors and Default Styling +```php +public function configure(): void +{ + $this->setThAttributes(function(Column $column) { + if ($column->isField('name')) { + return [ + 'default' => true, + 'class' => 'bg-green-500', + ]; + } + + return ['default' => true]; + }); +} +``` + +### Keeping Default Styling Only For the "Name" Column +```php +public function configure(): void +{ + $this->setThAttributes(function(Column $column) { + if ($column->isField('name')) { + return [ + 'default' => false, + 'default-styling' => true, + 'class' => 'text-black bg-green-500 dark:text-white dark:bg-green-900', + ]; + } + + return ['default' => true]; + }); +} +``` + +### Reorder Column +Note: If you are using Reorder, then the th for Reorder can be [styled separately](../reordering/available-methods). However this is now replaced with the following to ensure consistent behaviour. The separate method will be supported until at least v3.6 + +You can also use the "title" of the Column, which will be "reorder" for the "reorder" Column: +```php +public function configure(): void +{ + $this->setThAttributes(function(Column $column) { + if ($column->getTitle() == 'reorder') + { + return [ + 'class' => 'bg-green-500 dark:bg-green-800', + 'default' => false, + 'default-colors' => false, + ]; + + } + + return ['default' => true]; + }); +} +``` + +### Bulk Actions Column +Note: If you are using Bulk Actions, then the th for Bulk Actions can be [styled separately](../bulk-actions/customisations). However this is now replaced with the following to ensure consistent behaviour. The separate method will be supported until at least v3.6 + +You can also use the "title" of the Column, which will be "bulkactions" for the "Bulk Actions" Column: +```php +public function configure(): void +{ + $this->setThAttributes(function(Column $column) { + if ($column->getTitle() == 'bulkactions') + { + return [ + 'class' => 'bg-yellow-500 dark:bg-yellow-800', + 'default' => false, + 'default-colors' => false, + ]; + + } + + return ['default' => true]; + }); +} +``` + +## setThSortButtonAttributes + +Set a list of attributes to override on the th sort button elements + +```php +public function configure(): void +{ + // Takes a callback that gives you the current column. + $this->setThSortButtonAttributes(function(Column $column) { + if ($column->isField('name')) { + return [ + 'class' => 'bg-green-500', + ]; + } + + return []; + }); +} +``` + +## setTrAttributes + +Set a list of attributes to override on the tr elements + +```php +public function configure(): void +{ + // Takes a callback that gives you the current row and its index + $this->setTrAttributes(function($row, $index) { + if ($index % 2 === 0) { + return [ + 'class' => 'bg-gray-200', + ]; + } + + return []; + }); +} +``` + +By default, this replaces the default classes on the tr, if you would like to keep them, set the appropriate default flag (see above) + +```php +public function configure(): void +{ + $this->setTrAttributes(function($row, $index) { + if ($index % 2 === 0) { + return [ + 'default' => true, + 'class' => 'bg-gray-200', + ]; + } + + return ['default' => true]; + }); +} +``` + +## setTdAttributes + +Set a list of attributes to override on the td elements. For example, changing the background color between red/green based on whether the "total" field is over or under 1000. + +If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make() +```php + $column->getTitle() +``` + +```php +public function configure(): void +{ + // Takes a callback that gives you the current column, row, column index, and row index + $this->setTdAttributes(function(Column $column, $row, $columnIndex, $rowIndex) { + if ($column->isField('total') && $row->total < 1000) { + return [ + 'class' => 'bg-red-500 text-white', + ]; + } + elseif ($column->isField('total') && $row->total >= 1000) { + return [ + 'class' => 'bg-green-500 text-white', + ]; + } + + return []; + }); +} +``` + +By default, this replaces the default classes on the td, if you would like to keep them, set the appropriate default flag (see above). + +```php +public function configure(): void +{ + // Takes a callback that gives you the current column, row, column index, and row index + $this->setTdAttributes(function(Column $column, $row, $columnIndex, $rowIndex) { + if ($column->isField('total') && $row->total < 1000) { + return [ + 'default' => true, + 'class' => 'bg-red-500 text-white', + ]; + } + + return ['default' => true]; + }); +} + +``` + +### Reorder Column +Note: If you are using Reorder, then the td for Reorder can be [styled separately](../reordering/available-methods). However this is now replaced with the following to ensure consistent behaviour. The separate method will be supported until at least v3.6 + +You can use the "title" of the Column, which will be "reorder" for the "reorder" Column: +```php +public function configure(): void +{ + $this->setTdAttributes(function(Column $column) { + if ($column->getTitle() == 'reorder') + { + return [ + 'class' => 'bg-green-500 dark:bg-green-800', + 'default' => false, + 'default-colors' => false, + ]; + + } + + return ['default' => true]; + }); +} +``` + +### Bulk Actions Column +Note: If you are using Bulk Actions, then the td for Bulk Actions can be [styled separately](../bulk-actions/customisations). However this is now replaced with the following to ensure consistent behaviour. The separate method will be supported until at least v3.6 + +You can use the "title" of the Column, which will be "bulkactions" for the "Bulk Actions" Column: +```php +public function configure(): void +{ + $this->setTdAttributes(function(Column $column) { + if ($column->getTitle() == 'bulkactions') + { + return [ + 'class' => 'bg-yellow-500 dark:bg-yellow-800', + 'default' => false, + 'default-colors' => false, + ]; + + } + + return ['default' => true]; + }); +} +``` diff --git a/docs/datatable/available-methods.md b/docs/datatable/available-methods.md index 13d4091b3..01023973e 100644 --- a/docs/datatable/available-methods.md +++ b/docs/datatable/available-methods.md @@ -76,43 +76,7 @@ public function configure(): void ## Query String -The query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: - -### setQueryStringStatus - -Enable/disable the query string. - -```php -public function configure(): void -{ - $this->setQueryStringStatus(true); - $this->setQueryStringStatus(false); -} -``` - -### setQueryStringEnabled - -Enable the query string. - -```php -public function configure(): void -{ - // Shorthand for $this->setQueryStringStatus(true) - $this->setQueryStringEnabled(); -} -``` - -### setQueryStringDisabled - -Disable the query string. - -```php -public function configure(): void -{ - // Shorthand for $this->setQueryStringStatus(false) - $this->setQueryStringDisabled(); -} -``` +The documentation for Query String now lives: [here](./query-string) ## Relationships @@ -190,7 +154,7 @@ public function configure(): void Set the message displayed when the table is filtered but there are no results to show. -Defaults to: "_No items found. Try to broaden your search._" +Defaults to: "_No items found, try to broaden your search._" ```php public function configure(): void diff --git a/docs/datatable/configurable-areas.md b/docs/datatable/configurable-areas.md index bb9d78a5b..489a42cd6 100644 --- a/docs/datatable/configurable-areas.md +++ b/docs/datatable/configurable-areas.md @@ -26,6 +26,7 @@ You can use the `setConfigurableAreas` method to set multiple areas that you wan public function configure(): void { $this->setConfigurableAreas([ + 'before-wrapper' => 'path.to.my.view', 'before-tools' => 'path.to.my.view', 'toolbar-left-start' => 'path.to.my.view', 'toolbar-left-end' => 'path.to.my.view', @@ -33,8 +34,10 @@ public function configure(): void 'toolbar-right-end' => 'path.to.my.view', 'before-toolbar' => 'path.to.my.view', 'after-toolbar' => 'path.to.my.view', + 'after-tools' => 'path.to.my.view', 'before-pagination' => 'path.to.my.view', 'after-pagination' => 'path.to.my.view', + 'after-wrapper' => 'path.to.my.view', ]); } ``` diff --git a/docs/datatable/events.md b/docs/datatable/events.md index 2a64763a7..dc81a5695 100644 --- a/docs/datatable/events.md +++ b/docs/datatable/events.md @@ -55,6 +55,8 @@ There are several events, all in the Rappasoft\LaravelLivewireTables\Events name | FilterApplied | Applied when a Filter is applied (not when removed) | The Table Name ($tableName), Filter Key ($key), Filter Value ($value), Logged In User ($user) | | SearchApplied | Applied when a Search is applied (not when removed) | The Table Name ($tableName), Search Term ($value), Logged In User ($user) | +Passing the user with an event is optional and [can be disabled in the config](../start/configuration.md#bypassing-laravels-auth-service). + By default, the Tables will dispatch an event when the Selected Columns is changed, you may customise this behaviour: #### enableAllEvents diff --git a/docs/datatable/query-string.md b/docs/datatable/query-string.md new file mode 100644 index 000000000..c830ef15a --- /dev/null +++ b/docs/datatable/query-string.md @@ -0,0 +1,207 @@ +--- +title: Query String +weight: 5 +--- + +The query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +## Global +### setQueryStringStatus + +Enable/disable the query string. + +```php +public function configure(): void +{ + $this->setQueryStringStatus(true); + $this->setQueryStringStatus(false); +} +``` + +### setQueryStringEnabled + +Enable the query string. + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatus(true) + $this->setQueryStringEnabled(); +} +``` + +### setQueryStringDisabled + +Disable the query string. + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatus(false) + $this->setQueryStringDisabled(); +} +``` + +### setQueryStringAlias + +Change the Alias in the URL, otherwise defaults to "$tablename" + +```php +public function configure(): void +{ + $this->setQueryStringAlias('table1'); +} +``` + +## Filters + +The filter query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +### setQueryStringStatusForFilter + +Enable/disable the query string for the filters + +```php +public function configure(): void +{ + $this->setQueryStringStatusForFilter(true); + $this->setQueryStringStatusForFilter(false); +} +``` + +### setQueryStringForFilterEnabled + +Enable the query string for the filters + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForFilter(true) + $this->setQueryStringForFilterEnabled(); +} +``` + +### setQueryStringForFilterDisabled + +Disable the query string for the filters + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForFilter(false) + $this->setQueryStringForFilterDisabled(); +} +``` + +### setQueryStringAliasForFilter + +Change the Alias in the URL for the filter, otherwise defaults to "$tablename-filters" + +```php +public function configure(): void +{ + $this->setQueryStringAliasForFilter('filtervalues'); +} +``` + +## Search + +The search query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +### setQueryStringStatusForSearch + +Enable/disable the query string for search + +```php +public function configure(): void +{ + $this->setQueryStringStatusForSearch(true); + $this->setQueryStringStatusForSearch(false); +} +``` + +### setQueryStringForSearchEnabled + +Enable the query string for search + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSearch(true) + $this->setQueryStringForSearchEnabled(); +} +``` + +### setQueryStringForSearchDisabled + +Disable the query string for search + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSearch(false) + $this->setQueryStringForSearchDisabled(); +} +``` + +### setQueryStringAliasForSearch + +Change the Alias in the URL for the search, otherwise defaults to "$tablename-search" + +```php +public function configure(): void +{ + $this->setQueryStringAliasForSearch('search'); +} +``` + +## Sorts + +The sorts query string is **enabled by default**, but if you ever needed to toggle it you can use the following methods: + +### setQueryStringStatusForSort + +Enable/disable the query string for sort + +```php +public function configure(): void +{ + $this->setQueryStringStatusForSort(true); + $this->setQueryStringStatusForSort(false); +} +``` + +### setQueryStringForSortEnabled + +Enable the query string for sort + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSort(true) + $this->setQueryStringForSortEnabled(); +} +``` + +### setQueryStringForSortDisabled + +Disable the query string for sort + +```php +public function configure(): void +{ + // Shorthand for $this->setQueryStringStatusForSort(false) + $this->setQueryStringForSortDisabled(); +} +``` + +### setQueryStringAliasForSort + +Change the Alias in the URL for the sorts, otherwise defaults to "$tablename-sorts" + +```php +public function configure(): void +{ + $this->setQueryStringAliasForSort('sorts'); +} +``` \ No newline at end of file diff --git a/docs/datatable/styling.md b/docs/datatable/styling.md index 612cf7a47..937a6df94 100644 --- a/docs/datatable/styling.md +++ b/docs/datatable/styling.md @@ -1,10 +1,31 @@ --- title: Styling -weight: 5 +weight: 6 --- The package offers significant opportunities to customise the look & feel of the core table, as well as other elements (which are documented in the relevant sections). +## Keeping Defaults +To allow simpler customisation on a per-table basis, there are numerous methods available to over-ride the default CSS classes. +Historically, this was provided by a simple toggleable "default" flag. However - in many cases, the original "default" has been expanded to include: + +### Keep Default Colors And Default Styles +- set default flag to true +or +- set default-colors flag to true +- set default-styling flag to true + +### Keep Default Colors Only +- set default flag to false +- set default-colors flag to true +- set default-styling flag to false + +### Keep Default Styling Only +- set default flag to false +- set default-colors flag to false +- set default-styling flag to true + + ## Attributes ### setComponentWrapperAttributes @@ -129,8 +150,10 @@ public function configure(): void Set a list of attributes to override on the th elements. -Note: If you are using Bulk Actions, then the th for Bulk Actions is [styled separately](../bulk-actions/customisations). -Note: If you are using Reorder, then the th for Reorder is [styled separately](../reordering/available-methods). +If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make() +```php + $column->getTitle() +``` ```php public function configure(): void @@ -148,8 +171,7 @@ public function configure(): void } ``` -By default, this replaces the default classes on the th, if you would like to keep them, set the default flag to true. - +#### Keeping Default Colors and Default Styling ```php public function configure(): void { @@ -166,6 +188,72 @@ public function configure(): void } ``` +#### Keeping Default Styling Only For the "Name" Column +```php +public function configure(): void +{ + $this->setThAttributes(function(Column $column) { + if ($column->isField('name')) { + return [ + 'default' => false, + 'default-styling' => true, + 'class' => 'text-black bg-green-500 dark:text-white dark:bg-green-900', + ]; + } + + return ['default' => true]; + }); +} +``` + +#### Reorder Column +Note: If you are using Reorder, then the th for Reorder can be [styled separately](../reordering/available-methods). However this is now replaced with the following to ensure consistent behaviour. The separate method will be supported until at least v3.6 + +You can also use the "title" of the Column, which will be "reorder" for the "reorder" Column: +```php +public function configure(): void +{ + $this->setThAttributes(function(Column $column) { + if ($column->getTitle() == 'reorder') + { + return [ + 'class' => 'bg-green-500 dark:bg-green-800', + 'default' => false, + 'default-colors' => false, + ]; + + } + + return ['default' => true]; + }); +} +``` +#### Bulk Actions Column +Note: If you are using Bulk Actions, then the th for Bulk Actions can be [styled separately](../bulk-actions/customisations). However this is now replaced with the following to ensure consistent behaviour. The separate method will be supported until at least v3.6 + +You can also use the "title" of the Column, which will be "bulkactions" for the "Bulk Actions" Column: +```php +public function configure(): void +{ + $this->setThAttributes(function(Column $column) { + if ($column->getTitle() == 'bulkactions') + { + return [ + 'class' => 'bg-yellow-500 dark:bg-yellow-800', + 'default' => false, + 'default-colors' => false, + ]; + + } + + return ['default' => true]; + }); +} +``` + + + + ### setThSortButtonAttributes Set a list of attributes to override on the th sort button elements @@ -228,6 +316,11 @@ public function configure(): void Set a list of attributes to override on the td elements +If your Column does not have a field (e.g. a label column), then you may use the following, which will utilise the first parameter in Column::make() +```php + $column->getTitle() +``` + ```php public function configure(): void { @@ -386,3 +479,21 @@ public function configure(): void ]); } ``` + +### Vertical Scrolling Example +Should you wish to implement a table with a responsive height, and vertical scrolling for additional rows, a basic example is below that demonstrates the approach, noting that you will likely wish to adjust the break-points! + +```php +public function configure(): void +{ + + $this->setTableWrapperAttributes([ + 'class' => 'max-h-56 md:max-h-72 lg:max-h-96 overflow-y-scroll', + ]); + $this->setTheadAttributes([ + 'class' => 'sticky top-0 ' + ]); +} +``` + +Keep in mind that you must only call methods from configure() once to avoid overriding or conflicting results. \ No newline at end of file diff --git a/docs/filter-types/filters-boolean.md b/docs/filter-types/filters-boolean.md index 45c0d2577..e73343afd 100644 --- a/docs/filter-types/filters-boolean.md +++ b/docs/filter-types/filters-boolean.md @@ -4,7 +4,7 @@ weight: 2 --- ## Beta -This is currently in beta, and will only work with Tailwind. +This is currently in beta, but should work with Tailwind, Bootstrap 4 and Bootstrap 5 as of latest version ## Details diff --git a/docs/filter-types/filters-livewire-component-array.md b/docs/filter-types/filters-livewire-component-array.md new file mode 100644 index 000000000..86b2491dc --- /dev/null +++ b/docs/filter-types/filters-livewire-component-array.md @@ -0,0 +1,51 @@ +--- +title: Livewire Custom Array Filter (Beta) +weight: 13 +--- + +**IN BETA** +This feature is currently in beta, and use in production is not recommended. + +### Usage +This allows you to use a child/nested Livewire Component in place of the existing Filters, giving you more control over the look/feel/behaviour of a filter. This version supports use of returning an array of values for use in filtering. + +To use a LivewireComponentArrayFilter, you must include it in your namespace: +```php +use Rappasoft\LaravelLivewireTables\Views\Filters\LivewireComponentArrayFilter; +``` + +When creating a filter: +- Specify a unique name +- Set the path to a valid Livewire Component +- Define a filter() callback to define how the returned value will be used. + +```php + public function filters(): array + { + return [ + LivewireComponentArrayFilter::make('My External Filter') + ->setLivewireComponent('my-test-external-filter') + ->filter(function (Builder $builder, array $values) { + $builder->whereIn('foreign_id', $values); + }), + ]; + } +``` + +### setPillsSeparator +As this is an array, you can define the separator to use between pills values, by default this is set to ", " + +```php + public function filters(): array + { + return [ + LivewireComponentArrayFilter::make('My External Filter') + ->setLivewireComponent('my-test-external-filter') + ->setPillsSeparator(' OR ') + ->filter(function (Builder $builder, array $values) { + $builder->whereIn('foreign_id', $values); + }), + ]; + } +``` + diff --git a/docs/filter-types/filters-number.md b/docs/filter-types/filters-number.md index 2bfba4404..78dd191a3 100644 --- a/docs/filter-types/filters-number.md +++ b/docs/filter-types/filters-number.md @@ -5,6 +5,27 @@ weight: 9 Number filters are just HTML number inputs. +```php +public function filters(): array +{ + return [ + NumberFilter::make('Amount') + ->filter(function(Builder $builder, string $value) { + $builder->where('amount', '<', $value); + }), + ]; +} +``` + +Historically, min/max/placeholders were set using the "config" option, which is still available. However, it is strongly recommended to use the new setInputAttributes for enhanced customisation. + +## Old Behaviour +The following would: +- Set a min of 0 +- Set a max of 100 +- Add a placeholder +- Keep the default colors & styling + ```php public function filters(): array { @@ -21,3 +42,28 @@ public function filters(): array ]; } ``` + +## New Behaviour +The following would: +- Set a min of 5 +- Set a max of 20 +- Set steps to be 0.5 +- Add a placeholder +- Keep the default colors & styling + +```php +public function filters(): array +{ + return [ + NumberFilter::make('Age') + ->setInputAttributes([ + 'min' => '5', // Minimum Value Accepted + 'max' => '20', // Maximum Value Accepted + 'step' => '0.5', // Set step + 'placeholder' => 'Enter Number 0 - 100', // A placeholder value + 'default-colors' => true, + 'default-styling' => true, + ]), + ]; +} +``` \ No newline at end of file diff --git a/docs/filters/available-component-methods.md b/docs/filters/available-component-methods.md new file mode 100644 index 000000000..ffa02f29c --- /dev/null +++ b/docs/filters/available-component-methods.md @@ -0,0 +1,241 @@ +--- +title: Available Component Methods +weight: 5 +--- + +These are the available filters configuration methods on the component. These are "table-wide" methods. + +--- + +Filters are **enabled by default** but will only show up if you have at least one defined. + +## setFiltersStatus + +Enable/disable filters for the whole component. + +```php +public function configure(): void +{ + $this->setFiltersStatus(true); + $this->setFiltersStatus(false); +} +``` + +## setFiltersEnabled + +Enable filters for the component. + +```php +public function configure(): void +{ + // Shorthand for $this->setFiltersStatus(true) + $this->setFiltersEnabled(); +} +``` + +## setFiltersDisabled + +Disable filters for the component. + +```php +public function configure(): void +{ + // Shorthand for $this->setFiltersStatus(false) + $this->setFiltersDisabled(); +} +``` + +--- + +## setFiltersVisibilityStatus + +**Enabled by default**, show/hide the filters dropdown. + +```php +public function configure(): void +{ + $this->setFiltersVisibilityStatus(true); + $this->setFiltersVisibilityStatus(false); +} +``` + +## setFiltersVisibilityEnabled + +Show the filters dropdown for the component. + +```php +public function configure(): void +{ + // Shorthand for $this->setFiltersVisibilityStatus(true) + $this->setFiltersVisibilityEnabled(); +} +``` + +## setFiltersVisibilityDisabled + +Hide the filters dropdown for the component. + +```php +public function configure(): void +{ + // Shorthand for $this->setFiltersVisibilityStatus(false) + $this->setFiltersVisibilityDisabled(); +} +``` + +--- + +## Pills + +See the [Filter Pills](./filter-pills) documentation for help with configuring the pills + +--- + +## setFilterLayout + +Set the filter layout for the component. + +```php +public function configure(): void +{ + $this->setFilterLayout('slide-down'); +} +``` + +## setFilterLayoutPopover + +Set the filter layout to popover. + +```php +public function configure(): void +{ + $this->setFilterLayoutPopover(); +} +``` + +Set the filter layout to slide down. + +## setFilterLayoutSlideDown + +```php +public function configure(): void +{ + $this->setFilterLayoutSlideDown(); +} +``` + +## setFilterSlideDownDefaultStatusEnabled + +Set the filter slide down to visible by default + +```php +public function configure(): void +{ + // Shorthand for $this->setFilterSlideDownDefaultStatus(true) + $this->setFilterSlideDownDefaultStatusEnabled(); +} +``` + +## setFilterSlideDownDefaultStatusDisabled + +Set the filter slide down to collapsed by default + +```php +public function configure(): void +{ + // Shorthand for $this->setFilterSlideDownDefaultStatus(false) + $this->setFilterSlideDownDefaultStatusDisabled(); +} +``` + +## storeFiltersInSessionEnabled + +Optional behaviour - stores filter values in the session (specific to table - based on the table name) + +### Exercise Caution +If re-using the same Livewire Table Component multiple times in your site, with the same table name, this may cause clashes in filter values + +```php +public function configure(): void +{ + $this->storeFiltersInSessionEnabled(); +} +``` +## storeFiltersInSessionDisabled + +Default behaviour - does not store filters in the session + +```php +public function configure(): void +{ + $this->storeFiltersInSessionDisabled(); +} +``` + +## setFilterPopoverAttributes + +Allows for the customisation of the appearance of the Filter Popover Menu. + +Note the addition of a "default-width" boolean, allowing you to customise the width more smoothly without impacting other applied classes. + +You may also replace default colors by setting "default-colors" to false, or default styling by setting "default-styling" to false, and specifying replacement classes in the "class" property. + +You can also replace the default transition behaviours (Tailwind) by specifying replacement attributes in the array. + +```php +public function configure(): void +{ + $this->setFilterPopoverAttributes( + [ + 'class' => 'w-96', + 'default-width' => false, + 'default-colors' => true, + 'default-styling' => true, + 'x-transition:enter' => 'transition ease-out duration-100', + ] + ); +} +``` + +## setFilterSlidedownWrapperAttributes + +Allows for the customisation of the appearance of the Filter Slidedown Wrapper. + +You may also replace default colors by setting "default-colors" to false, or default styling by setting "default-styling" to false, and specifying replacement classes in the "class" property. + +You can also replace the default transition behaviours (Tailwind) by specifying replacement attributes in the array, for example to extend the duration of the transition effect from the default duration-100 to duration-1000: + +```php +public function configure(): void +{ + $this->setFilterSlidedownWrapperAttributes([ + 'x-transition:enter' => 'transition ease-out duration-1000', + 'class' => 'text-black', + 'default-colors' => true, + 'default-styling' => true, + ]); +} +``` + +## setFilterSlidedownRowAttributes + +Allows for the customisation of the appearance of the Filter Slidedown Row. Note that this uses a callback, which receives the "rowIndex" of the Slidedown Row + +You may replace default colors by setting "default-colors" to false, or default styling by setting "default-styling" to false, and specifying replacement classes in the "class" property. + +```php +public function configure(): void +{ + $this->setFilterSlidedownRowAttributes(fn($rowIndex) => $rowIndex % 2 === 0 ? + [ + 'class' => 'bg-red-500', + 'default-colors' => true, + 'default-styling' => true, + ] : [ + 'class' => 'bg-blue-500', + 'default-colors' => true, + 'default-styling' => true, + ] + ); +} +``` diff --git a/docs/filters/available-filter-methods.md b/docs/filters/available-filter-methods.md new file mode 100644 index 000000000..249273109 --- /dev/null +++ b/docs/filters/available-filter-methods.md @@ -0,0 +1,296 @@ +--- +title: Available Filter Methods +weight: 6 +--- + +The following methods are available on the filter object. These are "filter-specific" methods. + +Ensure you check out: +- [Available Component Methods](./available-component-methods) documentation for Table Wide configuration +- [Filter Pills](./filter-pills) documentation for help with configuring the pills for a filter + + +## hiddenFromMenus + +Hide the filter from both the filter popover and the filter slide down. + +```php +SelectFilter::make('Active') + ->hiddenFromMenus() +``` + +## hiddenFromPills + +Hide the filter from the filter pills when applied. + +```php +SelectFilter::make('Active') + ->hiddenFromPills() +``` + +## hiddenFromFilterCount + +Hide the filter from the filter count when applied. + +```php +SelectFilter::make('Active') + ->hiddenFromFilterCount() +``` + +## hiddenFromAll + +Hide the filter from the menus, pills, and count. + +```php +SelectFilter::make('Active') + ->hiddenFromAll() +``` + +## notResetByClearButton + +By default the `clear` button will reset all filters to their defaults. You can prevent this on a specific filter by using this method. + +```php +SelectFilter::make('Active') + ->notResetByClearButton() +``` + +## setCustomView +Use a fully custom view for a filter. This will utilise solely your view when rendering this filter. Note that the following methods will no longer apply to a filter using this: +- setCustomFilterLabel +- setFilterLabelAttributes + +```php +TextFilter::make('Name') + ->setCustomView('text-custom-view'), +``` + +## Config + +If the filter takes any config options, you can set them with the `config` method: + +```php + DateFilter::make('Date') + ->config([ + 'min' => '2020-01-01', + 'max' => '2021-12-31', + ]) +``` + +## Customising Wireable Behaviour + +For the following Filters, you may customise how the input is wire:model into the Table Component: + +- DateFilter (Defaults to Live) +- DateTimeFilter (Defaults to Live) +- MultiSelectDropdownFilter (Defaults to live.debounce.250ms) +- MultiSelectFilter (Defaults to live.debounce.250ms) +- NumberFilter (Defaults to Blur) +- SelectFilter (Defaults to Live) +- TextFilter (Defaults to Blur) + +You may override this using the following methods, on any of the above Filter types: + +### setWireBlur() +Forces the filter to use a wire:model.blur approach +```php + TextFilter::make('Name') + ->config([ + 'placeholder' => 'Search Name', + 'maxlength' => '25', + ]) + ->setWireBlur() +``` + +### setWireDefer() +Forces the filter to use a wire:model approach +```php + TextFilter::make('Name') + ->config([ + 'placeholder' => 'Search Name', + 'maxlength' => '25', + ]) + ->setWireDefer() +``` + +### setWireLive() +Forces the fitler to use a wire:model.live approach +```php + TextFilter::make('Name') + ->config([ + 'placeholder' => 'Search Name', + 'maxlength' => '25', + ]) + ->setWireLive() +``` + +### setWireDebounce(int $debounceDelay) +Allows you to pass a string to use a wire:model.live.debounce.Xms approach +```php + TextFilter::make('Name') + ->config([ + 'placeholder' => 'Search Name', + 'maxlength' => '25', + ]) + ->setWireDebounce(50) +``` + +--- + +## Styling + +These methods allow you to over-ride default styling for individual Filters + +--- + +### setFilterSlidedownRow + +This method applies only when using the Slide Down approach to filter display. +By default the filters will be displayed in the order that they are listed in the filters() method. This method allows you to specify the row that the filter will be listed. When multiple filters are placed on the same row, and a mobile device is used, then the first filter listed will "win" that row. +You may use either a string or an integer to pass to this method, and it can be used in conjunction with setFilterSlidedownColspan + +```php +SelectFilter::make('Active') + ->setFilterSlidedownRow(1) +``` + +### setFilterSlidedownColspan + +This method applies only when using the Slide Down approach to filter display. +By default each filter will take up one column, with the number of columns determined by the size of the screen, this ranges from 1 on a mobile device, to a maximum of 5 on a large display. This method allows you to specify the number of columns that the filter should span. It will span the number of columns specified, up to the number of columns available (depending on screen size). +You may use either a string or an integer to pass to this method, and it can be used in conjunction with setFilterSlidedownRow + +```php +DateFilter::make('Date') + ->config([ + 'min' => '2020-01-01', + 'max' => '2021-12-31', + ]) + ->setFilterSlidedownColspan('2') +``` + +--- + +### setCustomFilterLabel + +Set a custom blade file for the filter's label. This will be used in both the Pop-Over and SlideDown filter displays, you should therefore ensure that you cater for the different filter layouts. + +```php +SelectFilter::make('Active') + ->setCustomFilterLabel('path.to.blade') +``` + +You will receive several properties to your blade, explained here: +- $filter (the filter instance) +- $filterLayout ('slide-down' or 'popover') +- $tableName (the table name) +- $isTailwind (bool - is theme Tailwind) +- $isBootstrap (bool - is theme Bootstrap 4 or Bootstrap 5) +- $isBootstrap4 (bool - is theme Bootstrap 4) +- $isBootstrap5 (bool - is theme Bootstrap 5) +- $customLabelAttributes (array -> any customLabel attributes set using setFilterLabelAttributes()) + +Example label blade: +```php +@aware([ 'tableName']) +@props(['filter', 'filterLayout' => 'popover', 'tableName' => 'table', 'isTailwind' => false, 'isBootstrap' => false, 'isBootstrap4' => false, 'isBootstrap5' => false, 'for' => null]) + + +``` + +### setFilterLabelAttributes + +#### Old Method (Still Supported) +Set custom attributes for a Filter Label. At present it is recommended to only use this for "class" and "style" attributes to avoid conflicts. + +By default, this replaces the default classes on the Filter Label wrapper, if you would like to keep them, set the default flag to true. + +```php +TextFilter::make('Name') + ->setFilterLabelAttributes( + [ + 'class' => 'text-xl', + 'default' => true, + ] + ), +``` + +#### New Method (Recommended) +Set custom attributes for a Filter Label. At present it is recommended to only use this for "class" and "style" attributes to avoid conflicts. + +By default, this replaces the default classes on the Filter Label wrapper, if you would like to keep them, set the default flag to true. + +```php +TextFilter::make('Name') + ->setLabelAttributes( + [ + 'class' => 'text-xl', + 'default' => true, + ] + ), +``` + +--- + +### setInputAttributes +Allows for customising the attributes that will apply to the input field for the filter. + +By default, this replaces the default classes on the Filter Input, if you would like to keep them, set the default-styling and/or default-colors flags to true. + +#### TextFilter Example +The following would: +- Set a maxlength of 75 +- Set a placeholder of "Enter a Name" +- Replace the default colors +- Retain the default styling (e.g. rounding/shadow) + +```php +public function filters(): array +{ + return [ + TextFilter::make('Name') + ->setInputAttributes([ + 'maxlength' => '75', + 'placeholder' => 'Enter a Name', + 'class' => 'text-white bg-red-500 dark:bg-red-500', + 'default-colors' => false, + 'default-styling' => true, + ]), + ]; +} +``` + +#### NumberFilter Example +The following would: +- Set a min of 5 +- Set a max of 20 +- Set steps to be 0.5 +- Keep the default colors & styling + +```php +public function filters(): array +{ + return [ + NumberFilter::make('Age') + ->setInputAttributes([ + 'min' => '5', + 'max' => '20', + 'step' => '0.5', + 'default-colors' => true, + 'default-styling' => true, + ]), + ]; +} +``` \ No newline at end of file diff --git a/docs/filters/available-methods.md b/docs/filters/available-methods.md index 5dd8c42f5..2fd27f523 100644 --- a/docs/filters/available-methods.md +++ b/docs/filters/available-methods.md @@ -3,456 +3,7 @@ title: Available Methods weight: 4 --- -## Component Methods +The documentation has now been split into two sections to enhance clarity. -These are the available filters configuration methods on the component. - ---- - -Filters are **enabled by default** but will only show up if you have at least one defined. - -### setFiltersStatus - -Enable/disable filters for the whole component. - -```php -public function configure(): void -{ - $this->setFiltersStatus(true); - $this->setFiltersStatus(false); -} -``` - -### setFiltersEnabled - -Enable filters for the component. - -```php -public function configure(): void -{ - // Shorthand for $this->setFiltersStatus(true) - $this->setFiltersEnabled(); -} -``` - -### setFiltersDisabled - -Disable filters for the component. - -```php -public function configure(): void -{ - // Shorthand for $this->setFiltersStatus(false) - $this->setFiltersDisabled(); -} -``` - ---- - -### setFiltersVisibilityStatus - -**Enabled by default**, show/hide the filters dropdown. - -```php -public function configure(): void -{ - $this->setFiltersVisibilityStatus(true); - $this->setFiltersVisibilityStatus(false); -} -``` - -### setFiltersVisibilityEnabled - -Show the filters dropdown for the component. - -```php -public function configure(): void -{ - // Shorthand for $this->setFiltersVisibilityStatus(true) - $this->setFiltersVisibilityEnabled(); -} -``` - -### setFiltersVisibilityDisabled - -Hide the filters dropdown for the component. - -```php -public function configure(): void -{ - // Shorthand for $this->setFiltersVisibilityStatus(false) - $this->setFiltersVisibilityDisabled(); -} -``` - ---- - -### setFilterPillsStatus - -**Enabled by default**, show/hide the filter pills. - -```php -public function configure(): void -{ - $this->setFilterPillsStatus(true); - $this->setFilterPillsStatus(false); -} -``` - -### setFilterPillsEnabled - -Show the filter pills for the component. - -```php -public function configure(): void -{ - // Shorthand for $this->setFilterPillsStatus(true) - $this->setFilterPillsEnabled(); -} -``` - -### setFilterPillsDisabled - -Hide the filter pills for the component. - -```php -public function configure(): void -{ - // Shorthand for $this->setFilterPillsStatus(false) - $this->setFilterPillsDisabled(); -} -``` - ---- - -### setFilterLayout - -Set the filter layout for the component. - -```php -public function configure(): void -{ - $this->setFilterLayout('slide-down'); -} -``` - -### setFilterLayoutPopover - -Set the filter layout to popover. - -```php -public function configure(): void -{ - $this->setFilterLayoutPopover(); -} -``` - -Set the filter layout to slide down. - -### setFilterLayoutSlideDown - -```php -public function configure(): void -{ - $this->setFilterLayoutSlideDown(); -} -``` - -### setFilterSlideDownDefaultStatusEnabled - -Set the filter slide down to visible by default - -```php -public function configure(): void -{ - // Shorthand for $this->setFilterSlideDownDefaultStatus(true) - $this->setFilterSlideDownDefaultStatusEnabled(); -} -``` - -### setFilterSlideDownDefaultStatusDisabled - -Set the filter slide down to collapsed by default - -```php -public function configure(): void -{ - // Shorthand for $this->setFilterSlideDownDefaultStatus(false) - $this->setFilterSlideDownDefaultStatusDisabled(); -} -``` - - ----- - -## Filter Methods - -The following methods are available on the filter object. - ----- - -### setFilterPillTitle - -By default, the filter pill title is the filter name, but you can make it whatever you want: - -```php -SelectFilter::make('Active') - ->setFilterPillTitle('User Status') -``` - -### setFilterPillValues - -If you have numeric, or generated keys as your filter option values, they probably don't look too nice in the filter pill. You can set the values to be displayed in the filter pill: - -```php -SelectFilter::make('Active') - ->setFilterPillTitle('User Status') - ->setFilterPillValues([ - '1' => 'Active', - '0' => 'Inactive', - ]) - ->options([ - '' => 'All', - '1' => 'Yes', - '0' => 'No', - ]) -``` - -Now instead of `Active: Yes` it will say `User Status: Active` - -### hiddenFromMenus - -Hide the filter from both the filter popover and the filter slide down. - -```php -SelectFilter::make('Active') - ->hiddenFromMenus() -``` - -### hiddenFromPills - -Hide the filter from the filter pills when applied. - -```php -SelectFilter::make('Active') - ->hiddenFromPills() -``` - -### hiddenFromFilterCount - -Hide the filter from the filter count when applied. - -```php -SelectFilter::make('Active') - ->hiddenFromFilterCount() -``` - -### hiddenFromAll - -Hide the filter from the menus, pills, and count. - -```php -SelectFilter::make('Active') - ->hiddenFromAll() -``` - -### notResetByClearButton - -By default the `clear` button will reset all filters to their defaults. You can prevent this on a specific filter by using this method. - -```php -SelectFilter::make('Active') - ->notResetByClearButton() -``` - -### setFilterSlidedownRow - -This method applies only when using the Slide Down approach to filter display. -By default the filters will be displayed in the order that they are listed in the filters() method. This method allows you to specify the row that the filter will be listed. When multiple filters are placed on the same row, and a mobile device is used, then the first filter listed will "win" that row. -You may use either a string or an integer to pass to this method, and it can be used in conjunction with setFilterSlidedownColspan - -```php -SelectFilter::make('Active') - ->setFilterSlidedownRow(1) -``` - -### setFilterSlidedownColspan - -This method applies only when using the Slide Down approach to filter display. -By default each filter will take up one column, with the number of columns determined by the size of the screen, this ranges from 1 on a mobile device, to a maximum of 5 on a large display. This method allows you to specify the number of columns that the filter should span. It will span the number of columns specified, up to the number of columns available (depending on screen size). -You may use either a string or an integer to pass to this method, and it can be used in conjunction with setFilterSlidedownRow - -```php -DateFilter::make('Date') - ->config([ - 'min' => '2020-01-01', - 'max' => '2021-12-31', - ]) - ->setFilterSlidedownColspan('2') -``` - -### setFilterPillBlade - -Set a blade file for use in displaying the filter values in the pills area. You can use this in conjunction with setFilterPillValues() to prettify your applied filter values display. You will receive two properties ($filter) containing the filter instance, and ($value) containing the filter value. - -```php -SelectFilter::make('Active') - ->setFilterPillBlade('path.to.blade') -``` - -Example blade: -```php -@aware(['component']) -@props(['filter']) - - - {{ $filter->getFilterPillTitle() }} - ({{ $filter->getFilterPillValue($value) }}) - - - -``` - -### setCustomFilterLabel - -Set a custom blade file for the filter's label. This will be used in both the Pop-Over and SlideDown filter displays, you should therefore ensure that you cater for the different filter layouts. - -```php -SelectFilter::make('Active') - ->setCustomFilterLabel('path.to.blade') -``` - -You will receive several properties to your blade, explained here: -- $filter (the filter instance) -- $filterLayout ('slide-down' or 'popover') -- $tableName (the table name) -- $isTailwind (bool - is theme Tailwind) -- $isBootstrap (bool - is theme Bootstrap 4 or Bootstrap 5) -- $isBootstrap4 (bool - is theme Bootstrap 4) -- $isBootstrap5 (bool - is theme Bootstrap 5) -- $customLabelAttributes (array -> any customLabel attributes set using setFilterLabelAttributes()) - -Example label blade: -```php -@props(['filter', 'filterLayout' => 'popover', 'tableName' => 'table', 'isTailwind' => false, 'isBootstrap' => false, 'isBootstrap4' => false, 'isBootstrap5' => false, 'customLabelAttributes' => []) - - - -``` - -### setFilterLabelAttributes -Set custom attributes for a Filter Label. At present it is recommended to only use this for "class" and "style" attributes to avoid conflicts. - -By default, this replaces the default classes on the Filter Label wrapper, if you would like to keep them, set the default flag to true. - -```php -TextFilter::make('Name') - ->setFilterLabelAttributes( - [ - 'class' => 'text-xl', - 'default' => true, - ] - ), -``` - -### setCustomView -Use a fully custom view for a filter. This will utilise solely your view when rendering this filter. Note that the following methods will no longer apply to a filter using this: -- setCustomFilterLabel -- setFilterLabelAttributes - -```php -TextFilter::make('Name') - ->setCustomView('text-custom-view'), -``` - -### Config - -If the filter takes any config options, you can set them with the `config` method: - -```php - DateFilter::make('Date') - ->config([ - 'min' => '2020-01-01', - 'max' => '2021-12-31', - ]) -``` - -### Customising Wireable Behaviour - -For the following Filters, you may customise how the input is wire:model into the Table Component: - -- DateFilter (Defaults to Live) -- DateTimeFilter (Defaults to Live) -- MultiSelectDropdownFilter (Defaults to live.debounce.250ms) -- MultiSelectFilter (Defaults to live.debounce.250ms) -- NumberFilter (Defaults to Blur) -- SelectFilter (Defaults to Live) -- TextFilter (Defaults to Blur) - -You may override this using the following methods, on any of the above Filter types: - -#### setWireBlur() -Forces the filter to use a wire:model.blur approach -```php - TextFilter::make('Name') - ->config([ - 'placeholder' => 'Search Name', - 'maxlength' => '25', - ]) - ->setWireBlur() -``` - -#### setWireDefer() -Forces the filter to use a wire:model approach -```php - TextFilter::make('Name') - ->config([ - 'placeholder' => 'Search Name', - 'maxlength' => '25', - ]) - ->setWireDefer() -``` - -#### setWireLive() -Forces the fitler to use a wire:model.live approach -```php - TextFilter::make('Name') - ->config([ - 'placeholder' => 'Search Name', - 'maxlength' => '25', - ]) - ->setWireLive() -``` - -#### setWireDebounce(int $debounceDelay) -Allows you to pass a string to use a wire:model.live.debounce.Xms approach -```php - TextFilter::make('Name') - ->config([ - 'placeholder' => 'Search Name', - 'maxlength' => '25', - ]) - ->setWireDebounce(50) -``` +Documentation for Available Component Methods is now: [Here](./available-component-methods) +Documentation for Available Filter Methods is now: [Here](./available-filter-methods) diff --git a/docs/filters/creating-filters.md b/docs/filters/creating-filters.md index e940c5952..e13e98563 100644 --- a/docs/filters/creating-filters.md +++ b/docs/filters/creating-filters.md @@ -3,7 +3,7 @@ title: Creating Filters weight: 2 --- -To create filters, you must implement the `filters()` method on your component. +To create filters, you must implement the `filters()` method on your component, which must return an array. ```php public function filters(): array diff --git a/docs/filters/filter-pills.md b/docs/filters/filter-pills.md new file mode 100644 index 000000000..8ab0c20e7 --- /dev/null +++ b/docs/filters/filter-pills.md @@ -0,0 +1,315 @@ +--- +title: Filter Pills +weight: 7 +--- + +When a Filter is set/applied, it will be displayed at the top of your Table in a "filter pills" section, contained within the Tools area + +There are both Component/Table wide, and Filter specific configurations available: + +--- + +## Component Methods + +These methods apply across your whole table + +### setFilterPillsStatus + +**Enabled by default**, show/hide the filter pills. + +```php +public function configure(): void +{ + $this->setFilterPillsStatus(true); + $this->setFilterPillsStatus(false); +} +``` + +### setFilterPillsEnabled + +Show the filter pills for the component. + +```php +public function configure(): void +{ + // Shorthand for $this->setFilterPillsStatus(true) + $this->setFilterPillsEnabled(); +} +``` + +### setFilterPillsDisabled + +Hide the filter pills for the component. + +```php +public function configure(): void +{ + // Shorthand for $this->setFilterPillsStatus(false) + $this->setFilterPillsDisabled(); +} +``` + +--- + +### setFilterPillsItemAttributes +Allows for customisation of the appearance of each "Filter Pills Item" + +Note that this allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Filter Pills Item, the default colors are: + +Bootstrap: None + +Tailwind: `bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900` + +#### default-styling +Setting to false will disable the default styling for the Filter Pills Item, the default styling is: + +Bootstrap 4: `badge badge-pill badge-info d-inline-flex align-items-center` + +Bootstrap 5: `badge rounded-pill bg-info d-inline-flex align-items-center` + +Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full leading-4` + +#### default-text +Setting to false will disable the default text styling for the Filter Pills Item, the default text styling is: + +Bootstrap 4: none + +Bootstrap 5: none + +Tailwind: `text-xs font-medium capitalize` + +Note that colors are handled via default-colours + + +```php +public function configure(): void +{ + $this->setFilterPillsItemAttributes([ + 'class' => 'bg-rose-300 text-rose-800 dark:bg-indigo-200 dark:text-indigo-900', // Add these classes to the filter pills item + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` + +--- + +### setFilterPillsResetFilterButtonAttributes +Allows for customisation of the appearance of the "Filter Pills Reset Filter Button" + +Note that this utilises allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Filter Pills Reset Filter Button, the default colors are: + +Bootstrap: None + +Tailwind: `text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:bg-indigo-500 focus:text-white` + +#### default-styling +Setting to false will disable the default styling for the Filter Pills Reset Filter Button, the default styling is: + +Bootstrap: `text-white ml-2` + +Tailwind: `flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:outline-none` + +```php +public function configure(): void +{ + $this->setFilterPillsResetFilterButtonAttributes([ + 'class' => 'text-rose-400 hover:bg-rose-200 hover:text-rose-500 focus:bg-rose-500', // Add these classes to the filter pills reset filter button + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` + +--- + +### setFilterPillsResetAllButtonAttributes +Allows for customisation of the appearance of the "Filter Pills Reset All Button" + +Note that this allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Filter Pills Reset All Button, the default colors are: + +Bootstrap: None + +Tailwind: `bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-900` + +#### default-styling +Setting to false will disable the default styling for the Filter Pills Reset All Button, the default styling is: + +Bootstrap 4: `badge badge-pill badge-light` + +Bootstrap 5: `badge rounded-pill bg-light text-dark text-decoration-none` + +Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium` + +```php +public function configure(): void +{ + $this->setFilterPillsResetAllButtonAttributes([ + 'class' => 'bg-rose-100 text-rose-800 dark:bg-gray-200 dark:text-gray-900', // Add these classes to the filter pills reset all button + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` + +--- + +## Filter Methods + +These methods apply to individual filters + +### setFilterPillTitle + +By default, the filter pill title is the filter name, but you can make it whatever you want: + +```php +SelectFilter::make('Active') + ->setFilterPillTitle('User Status') +``` + +### setFilterPillValues + +If you have numeric, or generated keys as your filter option values, they probably don't look too nice in the filter pill. You can set the values to be displayed in the filter pill: + +```php +SelectFilter::make('Active') + ->setFilterPillTitle('User Status') + ->setFilterPillValues([ + '1' => 'Active', + '0' => 'Inactive', + ]) + ->options([ + '' => 'All', + '1' => 'Yes', + '0' => 'No', + ]) +``` + +Now instead of `Active: Yes` it will say `User Status: Active` + + +### hiddenFromPills + +Hide the filter from the filter pills when applied. + +```php +SelectFilter::make('Active') + ->hiddenFromPills() +``` + +--- + +### setFilterPillBlade + +Set a blade file for use in displaying the filter values in the pills area. You can use this in conjunction with setFilterPillValues() to prettify your applied filter values display. You will receive two properties: +- $filter which contains the filter instance +- $filterPillData which contains an instance of "Rappasoft\LaravelLivewireTables\DataTransferObjects\Filters\FilterPillData" + This provides ready access to configured pills elements + +```php +SelectFilter::make('Active') + ->setFilterPillBlade('path.to.blade') +``` + +Example blade: +```php +@aware(['tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) +@props(['filterKey', 'filterPillData']) + + + getFilterPillDisplayData() }}> + + +``` + +#### $filterPillData +An example of the returned object is below: + +```php +Rappasoft\LaravelLivewireTables\DataTransferObjects\Filters\FilterPillData { + #filterPillTitle: "Name" + #filterSelectName: "name" + #filterPillValue: "A Value Here" + #separator: ", " + +isAnExternalLivewireFilter: false + +hasCustomPillBlade: true + #customPillBlade: "tests.tables.pills.test" + #filterPillsItemAttributes: array:4 [▼ + // Any Custom Defined Attributes + ] + #separatedValues: null + #renderPillsAsHtml: false + #watchForEvents: false +} +``` + +### setPillAttributes + +This may be used in conjunction with, or instead of the setFilterPillsItemAttributes method, and applies to an individual Filter's pills. + +Note that if used, this will **replace** any matching array keys defined in the setFilterPillsItemAttributes method. + +Note that this allows for appending to, or replacing the styles and colors independently + +#### default-colors +Setting to false will disable the default colors for this Filter's Pills Item, the default colors are: + +Bootstrap: None + +Tailwind: `bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900` + +#### default-styling +Setting to false will disable the default styling for this Filter's Pills Item, the default styling is: + +Bootstrap 4: `badge badge-pill badge-info d-inline-flex align-items-center` + +Bootstrap 5: `badge rounded-pill bg-info d-inline-flex align-items-center` + +Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 capitalize` + +```php +SelectFilter::make('Active') + ->options([ + '' => 'All', + '1' => 'Yes', + '0' => 'No', + ]) + ->setFilterPillTitle('User Status') + ->setFilterPillValues([ + '1' => 'Active', + '0' => 'Inactive', + ]) + ->setPillAttributes([ + 'class' => 'bg-rose-300 text-rose-800 dark:bg-indigo-200 dark:text-indigo-900', + 'default-colors' => false, // Replace the default colors classes + 'default-styling' => true // Use the default styling classes + ]) +``` + +### setPillResetButtonAttributes + +This method allows for customisation of the filter's reset button within the Pills. This will merge/over-ride anything set in the Component setFilterPillsResetFilterButtonAttributes() method. + +```php +SelectFilter::make('Active') + ->options([ + '' => 'All', + '1' => 'Yes', + '0' => 'No', + ]) + ->setFilterPillTitle('User Status') + ->setPillResetButtonAttributes([ + 'class' => 'bg-red-500 text-cyan-500', + 'default-colors' => false, // Replace the default colors classes + 'default-styling' => true // Use the default styling classes + ]) +``` \ No newline at end of file diff --git a/docs/filters/introduction.md b/docs/filters/introduction.md index 11f0d9e76..b0888514b 100644 --- a/docs/filters/introduction.md +++ b/docs/filters/introduction.md @@ -3,7 +3,7 @@ title: Introduction weight: 1 --- -Filters are a good way to narrow down your data. Version 2 has two ways to interact with filters, either by a popover menu or a slide down area. +Filters are a good way to narrow down your data. Version 2 has two ways to interact with filters, either by a popover menu or a slide down area, which are configurable on a per-table basis. ## Popover Menu diff --git a/docs/misc/actions.md b/docs/misc/actions.md index 8a46a7b0c..089b71139 100644 --- a/docs/misc/actions.md +++ b/docs/misc/actions.md @@ -21,6 +21,61 @@ This is used to set attributes for the "div" that wraps all defined Action Butto } ``` +### setActionsInToolbarEnabled + +Displays the Actions within the Toolbar. Default is displaying above the Toolbar. + +```php + public function configure(): void + { + $this->setActionsInToolbarEnabled(); + } +``` + +### setActionsInToolbarDisabled + +Displays the Actions above the Toolbar, default behaviour +```php + public function configure(): void + { + $this->setActionsInToolbarDisabled(); + } +``` + + +### setActionsLeft + +Displays the Actions justified to the left + +```php + public function configure(): void + { + $this->setActionsLeft(); + } +``` + +### setActionsCenter + +Displays the Actions justified to the center + +```php + public function configure(): void + { + $this->setActionsCenter(); + } +``` + +### setActionsRight + +Displays the Actions justified to the right + +```php + public function configure(): void + { + $this->setActionsRight(); + } +``` + ### actions() Define your actions using the actions() method: @@ -37,6 +92,21 @@ public function actions(): array ## Button Available Methods +### setLabelAttributes +Set custom attributes for an Action Label. At present it is recommended to only use this for "class" and "style" attributes to avoid conflicts. + +By default, this replaces the default classes on the Action Label, if you would like to keep them, set the default flag to true. + +```php +Action::make('Dashboard') + ->setRoute('dashboard') + ->wireNavigate() + ->setLabelAttributes([ + 'class' => 'text-xl', + 'default' => true, + ]), +``` + ### setActionAttributes setActionAttributes is used to pass any attributes that you wish to implement on the "button" element for the action button. By default it will merge with the default classes. @@ -197,6 +267,7 @@ public function actions(): array } ``` + ## Extending You can extend the Base Action class which can be a useful timesaver, when you wish to re-use the same look/feel of an Action, but wish to set a different route (for example). diff --git a/docs/misc/hiding-the-table.md b/docs/misc/hiding-the-table.md new file mode 100644 index 000000000..b607ff52b --- /dev/null +++ b/docs/misc/hiding-the-table.md @@ -0,0 +1,78 @@ +--- +title: Hiding The Table (beta) +weight: 8 +--- + +You may wish to hide the table on load. To do so, you should use the following in the mount method. Note that this is in mount, not boot nor configure! + +```php + public function mount() + { + $this->setShouldBeHidden(); + } +``` + +### Using Events To Display/Hide + +For example, you may have a "Sales" table that you wish to hide by default: +```php +class SalesTable extends DataTableComponent +{ + public string $tableName = 'sales'; // Required to keep the call specific + + public function mount() + { + $this->setShouldBeHidden(); // Defaults the table to be hidden, note that this is in MOUNT and not CONFIGURE + } + + // Configure/Columns/Filters etc +} +``` + +The Table allows for different approaches, out-of-the-box it supports the more efficient client-side listeners. + +However - should you wish to use Livewire listeners in your table component, for example if you wish to pass more detail into the Table then you can: + +```php + #[On('showTable.{tableName}')] + public function showTable(): void + { + $this->setShouldBeDisplayed(); + } + + #[On('hideTable.{tableName}')] + public function hideTable(): void + { + $this->setShouldBeHidden(); + } +``` + + +### Secondary Table +Below are the two approaches. Note that you can customise the Livewire "On" to pass additional details should you wish. + +#### Using Client Side Listeners +```php + Column::make('Show') + ->label( + fn($row, Column $column) => "" + )->html(), + Column::make('Hide') + ->label( + fn($row, Column $column) => "" + )->html(), +``` + + +#### Using Livewire "On" Style Listeners: +```php + Column::make('Show') + ->label( + fn($row, Column $column) => "" + )->html(), + Column::make('Hide') + ->label( + fn($row, Column $column) => "" + )->html(), + +``` \ No newline at end of file diff --git a/docs/misc/lifecycle-hooks.md b/docs/misc/lifecycle-hooks.md index 1e05569a9..f56ce1f9a 100644 --- a/docs/misc/lifecycle-hooks.md +++ b/docs/misc/lifecycle-hooks.md @@ -19,6 +19,12 @@ This is called prior to setting up the available Columns via the columns() metho ## columnsSet This is called immediately after the Columns are set up +## configuringColumnSelect +This is called immediately prior to setting up Column Select + +## configuredColumnSelect +This is called immediately after setting up Column Select + ## rowsRetrieved This is called immediately after the query is executed, and is passed the result from the executed query. diff --git a/docs/misc/loading-placeholder.md b/docs/misc/loading-placeholder.md index 20ca7f9b5..67c4977ac 100644 --- a/docs/misc/loading-placeholder.md +++ b/docs/misc/loading-placeholder.md @@ -47,7 +47,9 @@ You may use this method to set custom text for the placeholder: $this->setLoadingPlaceholderContent('Text To Display'); } ``` -### setLoadingPlaceHolderWrapperAttributes +### setLoadingPlaceHolderWrapperAttributes (Deprecated) + +This is replaced by setLoadingPlaceHolderRowAttributes, but remains functional. This method allows you to customise the attributes for the <tr> element used as a Placeholder when the table is loading. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes. @@ -62,6 +64,22 @@ This method allows you to customise the attributes for the <tr> element us ``` +### setLoadingPlaceHolderRowAttributes + +Replaces setLoadingPlaceHolderWrapperAttributes +This method allows you to customise the attributes for the <tr> element used as a Placeholder when the table is loading. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes. + +```php + public function configure(): void + { + $this->setLoadingPlaceHolderRowAttributes([ + 'class' => 'text-bold', + 'default' => false, + ]); + } + +``` + ### setLoadingPlaceHolderIconAttributes This method allows you to customise the attributes for the <div> element that is used solely for the PlaceholderIcon. Similar to other setAttribute methods, this accepts a range of attributes, and a boolean "default", which will enable/disable the default attributes. diff --git a/docs/misc/tools.md b/docs/misc/tools.md new file mode 100644 index 000000000..0d9dbc390 --- /dev/null +++ b/docs/misc/tools.md @@ -0,0 +1,83 @@ +--- +title: Tools +weight: 9 +--- + +The Table offers additional configuration to show/hide the Tools/Toolbar sections: +## Tools +Contains: +- Filter Pills +- Sorting Pills +- The Toolbar + +## Toolbar +Contains: +- Actions (if set to Toolbar) +- Column Select dropdown +- Configurable Areas for Toolbar +- Filters Button/Dropdown/Popover +- Pagination dropdown +- Reorder Button +- Search Input + +## Component Available Methods + +### setToolsEnabled +The Default Behaviour, Tools Are Enabled. But will only be rendered if there are available/enabled elements. If the Toolbar is enabled, this takes into account any Toolbar elements that are present. +```php + public function configure(): void + { + $this->setToolsEnabled(); + } +``` + +### setToolsDisabled +Disables the Tools section, this includes the Toolbar, and Sort/Filter pills +```php + public function configure(): void + { + $this->setToolsDisabled(); + } +``` + +### setToolBarEnabled +The Default Behaviour, ToolBar is Enabled. But will only be rendered if there are available/enabled elements +```php + public function configure(): void + { + $this->setToolBarEnabled(); + } +``` + +### setToolBarDisabled +Disables the Toolbar, which contains the Reorder, Filters, Search, Column Select, Pagination buttons/options. Does not impact the Filter/Sort pills (if enabled) +```php + public function configure(): void + { + $this->setToolBarDisabled(); + } +``` + +### setToolsAttributes +Allows setting of attributes for the parent element in the tools blade + +By default, this replaces the default classes on the tools blade, if you would like to keep them, set the default-colors/default-styling flags to true as appropriate + +```php + public function configure(): void + { + $this->setToolsAttributes(['class' => ' bg-green-500', 'default-colors' => false, 'default-styling' => true]); + } +``` + +### setToolBarAttributes +Allows setting of attributes for the parent element in the toolbar blade. + +By default, this replaces the default classes on the toolbar blade, if you would like to keep them, set the default-colors/default-styling flags to true as appropriate + +```php + public function configure(): void + { + $this->setToolBarAttributes(['class' => ' bg-red-500', 'default-colors' => false, 'default-styling' => true]); + } +``` diff --git a/docs/pagination/available-methods.md b/docs/pagination/available-methods.md index 638e58a4b..eae078132 100644 --- a/docs/pagination/available-methods.md +++ b/docs/pagination/available-methods.md @@ -296,3 +296,14 @@ public function configure(): void $this->setShouldRetrieveTotalItemCountDisabled(); } ``` + +## setPaginationWrapperAttributes + +Used to set attributes for the "div" that wraps the pagination section + +```php +public function configure(): void +{ + $this->setPaginationWrapperAttributes(['class' => 'text-lg']); +} +``` diff --git a/docs/search/available-methods.md b/docs/search/available-methods.md index 1d8397a5f..422757c37 100644 --- a/docs/search/available-methods.md +++ b/docs/search/available-methods.md @@ -192,3 +192,39 @@ public function configure(): void $this->setTrimSearchStringDisabled(); } ``` + +## Search Icon + +To help customise, a "Search Input Icon" has been added, allowing for the addition of an icon to the search input field. + +At present, the Search Icon is only available as a "left aligned" icon. + +This is presently only available for Tailwind implementations + +### setSearchIcon + +This adds an Icon to the Search Input Field, which expects an icon path (e.g. heroicon-m-magnifying-glass) + +```php +public function configure(): void +{ + $this->setSearchIcon('heroicon-m-magnifying-glass'); +} +``` + +### setSearchIconAttributes + +This allows you to specify attributes for the Search Icon for the Input Field. + +Note that classes will be injected prior to styles, due to the behaviour of icons. + +```php +public function configure(): void +{ + $this->setSearchIconAttributes([ + 'class' => 'h-4 w-4', + 'style' => 'color: #000000', + ]); +} + +``` \ No newline at end of file diff --git a/docs/sorting/available-methods.md b/docs/sorting/available-methods.md index 85b181ae5..bd58d7064 100644 --- a/docs/sorting/available-methods.md +++ b/docs/sorting/available-methods.md @@ -153,6 +153,102 @@ public function configure(): void } ``` +## setSortingPillsItemAttributes +Allows for customisation of the appearance of the "Sorting Pills Item" + +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Sorting Pills Item, the default colors are: + +Bootstrap: None + +Tailwind: `bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900` + +#### default-styling +Setting to false will disable the default styling for the Sorting Pills Item, the default styling is: + +Bootstrap 4: `badge badge-pill badge-info d-inline-flex align-items-center` + +Bootstrap 5: `badge rounded-pill bg-info d-inline-flex align-items-center` + +Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 capitalize` + +```php +public function configure(): void +{ + $this->setSortingPillsItemAttributes([ + 'class' => 'bg-rose-300 text-rose-800 dark:bg-indigo-200 dark:text-indigo-900', // Add these classes to the sorting pills item + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` + +## setSortingPillsClearSortButtonAttributes +Allows for customisation of the appearance of the "Sorting Pills Clear Sort Button" + +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Sorting Pills Clear Sort Button, the default colors are: + +Bootstrap: None + +Tailwind: `text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:bg-indigo-500 focus:text-white` + +#### default-styling +Setting to false will disable the default styling for the Sorting Pills Clear Sort Button, the default styling is: + +Bootstrap 4: `text-white ml-2` + +Bootstrap 5: `text-white ms-2` + +Tailwind: `flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:outline-none` + +```php +public function configure(): void +{ + $this->setSortingPillsClearSortButtonAttributes([ + 'class' => 'text-rose-400 hover:bg-rose-200 hover:text-rose-500 focus:bg-rose-500', // Add these classes to the sorting pills clear sort button + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` + +## setSortingPillsClearAllButtonAttributes +Allows for customisation of the appearance of the "Sorting Pills Clear All Button" + +Note that this utilises a refreshed approach for attributes, and allows for appending to, or replacing the styles and colors independently, via the below methods. + +#### default-colors +Setting to false will disable the default colors for the Sorting Pills Clear All Button, the default colors are: + +Bootstrap: None + +Tailwind: `bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-900` + +#### default-styling +Setting to false will disable the default styling for the Sorting Pills Clear All Button, the default styling is: + +Bootstrap 4: `badge badge-pill badge-light` + +Bootstrap 5: `badge rounded-pill bg-light text-dark text-decoration-none` + +Tailwind: `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium` + +```php +public function configure(): void +{ + $this->setSortingPillsClearAllButtonAttributes([ + 'class' => 'bg-rose-100 text-rose-800 dark:bg-gray-200 dark:text-gray-900', // Add these classes to the sorting pills clear all button + 'default-colors' => false, // Do not output the default colors + 'default-styling' => true // Output the default styling + ]); +} +``` + --- ## setDefaultSortingLabels diff --git a/docs/start/configuration.md b/docs/start/configuration.md index 75aef5083..01725843f 100644 --- a/docs/start/configuration.md +++ b/docs/start/configuration.md @@ -1,6 +1,6 @@ --- title: Configuration -weight: 4 +weight: 5 --- ## Publishing Assets @@ -81,3 +81,22 @@ You must also make sure you have this Alpine style available globally. Note that [x-cloak] { display: none !important; } ``` + +## Bypassing Laravel's Auth Service + +By default, all [events](../datatable/events#dispatched) will retrieve any currently authenticated user from Laravel's [Auth service](https://laravel.com/docs/authentication) and pass it along with the event. + +If your project doesn't include the Illuminate/Auth package, or you otherwise want to prevent this, you can set the `enableUserForEvent` config option to false. + +```php +// config/livewire-tables.php +return [ + // ... + 'events' => [ + /** + * Enable or disable passing the user from Laravel's Auth service to events + */ + 'enableUserForEvent' => false, + ], +]; +``` diff --git a/docs/start/including-assets.md b/docs/start/including-assets.md index cbc25cb70..b0c782fe8 100644 --- a/docs/start/including-assets.md +++ b/docs/start/including-assets.md @@ -1,6 +1,6 @@ --- title: Including Assets -weight: 3 +weight: 4 --- ## Package Specific Code diff --git a/docs/start/installation.md b/docs/start/installation.md index d09a68879..11d07fa01 100644 --- a/docs/start/installation.md +++ b/docs/start/installation.md @@ -1,6 +1,6 @@ --- title: Installation -weight: 2 +weight: 3 --- You can install the package via composer: diff --git a/docs/start/recommended.md b/docs/start/recommended.md new file mode 100644 index 000000000..71f29e468 --- /dev/null +++ b/docs/start/recommended.md @@ -0,0 +1,90 @@ +--- +title: Recommended +weight: 2 +--- + +While the package is very customisable, and supports a number of different approaches. The below is the recommended approach, that gives the best performance for the tables: + +## Installation +``` +composer require rappasoft/laravel-livewire-tables +``` + +## Publish the Tables Config +``` +php artisan vendor:publish --tag="livewire-tables-config" +``` + +## Livewire Tables Config Updates +Update the published Livewire Tables Config (config/livewire-tables.php) and set the following to false: +```php + /** + * Cache Rappasoft Frontend Assets + */ + 'cache_assets' => false, + + /** + * Enable or Disable automatic injection of core assets + */ + 'inject_core_assets_enabled' => false, + + /** + * Enable or Disable automatic injection of third-party assets + */ + 'inject_third_party_assets_enabled' => false, + + /** + * Enable Blade Directives (Not required if automatically injecting or using bundler approaches) + */ + 'enable_blade_directives' => false, +``` + +## Bundling the Assets +As you have now told the package not to inject the assets, add the following to your resources/js/app.js file: + +```js +import '../../vendor/rappasoft/laravel-livewire-tables/resources/imports/laravel-livewire-tables-all.js'; +``` + +## Update Layouts +Ensure that your layouts do not reference any of the following blade directives, as these are not required with the above approach +```html + + @rappasoftTableStyles + + + @rappasoftTableThirdPartyStyles + + + @rappasoftTableScripts + + + @rappasoftTableThirdPartyScripts +``` + +## Tailwind Specific +If using Tailwind, you should update your tailwind.config.js file, adding the following to the "content" section under module.exports. This ensures that the Livewire Tables specific core classes are included. + +```js + './vendor/rappasoft/laravel-livewire-tables/resources/views/*.blade.php', + './vendor/rappasoft/laravel-livewire-tables/resources/views/**/*.blade.php', +``` + +It is also recommended to add the paths to any Livewire Tables components, for example: +```js + './app/Livewire/*.php', + './app/Livewire/**/*.php', +``` +So that any classes used in setTdAttributes or similar are included! + +## Run your build process +``` +npm run build +``` + +## Clear Cached Views +``` +php artisan view:clear +``` + +You may of course run view:cache at this point. \ No newline at end of file diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 000000000..d1ed59250 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,97 @@ +parameters: + ignoreErrors: + - + message: '#^Offset ''1'' on array\ in empty\(\) does not exist\.$#' + identifier: empty.offset + count: 1 + path: src/DataTableComponent.php + + - + message: '#^Offset ''99'' on array\ in isset\(\) does not exist\.$#' + identifier: isset.offset + count: 1 + path: src/DataTableComponent.php + + - + message: '#^Offset ''99'' on non\-empty\-array\<1\|string, list\> in isset\(\) does not exist\.$#' + identifier: isset.offset + count: 1 + path: src/DataTableComponent.php + + - + message: '#^Parameter \#1 \$view of function view expects view\-string\|null, string given\.$#' + identifier: argument.type + count: 1 + path: src/DataTableComponent.php + + - + message: '#^Property Rappasoft\\LaravelLivewireTables\\DataTableComponent\:\:\$model has no type specified\.$#' + identifier: missingType.property + count: 1 + path: src/DataTableComponent.php + + - + message: '#^Parameter \#1 \$view of function view expects view\-string\|null, string given\.$#' + identifier: argument.type + count: 1 + path: src/View/Components/FilterPill.php + + - + message: '#^Unsafe usage of new static\(\)\.$#' + identifier: new.static + count: 1 + path: src/Views/Action.php + + - + message: '#^Unsafe usage of new static\(\)\.$#' + identifier: new.static + count: 1 + path: src/Views/Column.php + + - + message: '#^Unsafe usage of new static\(\)\.$#' + identifier: new.static + count: 1 + path: src/Views/Filter.php + + - + message: '#^Parameter \#1 \$callback of method Illuminate\\Support\\Collection\\:\:filter\(\) expects \(callable\(string, int\)\: bool\)\|null, Closure\(mixed\)\: int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: src/Views/Filters/MultiSelectDropdownFilter.php + + - + message: '#^Unable to resolve the template type TMapWithKeysKey in call to method Illuminate\\Support\\Collection\<\(int\|string\),mixed\>\:\:mapWithKeys\(\)$#' + identifier: argument.templateType + count: 1 + path: src/Views/Filters/MultiSelectDropdownFilter.php + + - + message: '#^Unable to resolve the template type TMapWithKeysValue in call to method Illuminate\\Support\\Collection\<\(int\|string\),mixed\>\:\:mapWithKeys\(\)$#' + identifier: argument.templateType + count: 1 + path: src/Views/Filters/MultiSelectDropdownFilter.php + + - + message: '#^Parameter \#1 \$callback of method Illuminate\\Support\\Collection\\:\:filter\(\) expects \(callable\(string, int\)\: bool\)\|null, Closure\(mixed\)\: int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: src/Views/Filters/MultiSelectFilter.php + + - + message: '#^Parameter \#1 \$callback of method Illuminate\\Support\\Collection\\:\:filter\(\) expects \(callable\(string, int\)\: bool\)\|null, Closure\(mixed\)\: int\<0, max\> given\.$#' + identifier: argument.type + count: 1 + path: src/Views/Filters/NumberRangeFilter.php + + - + message: '#^Unable to resolve the template type TMapWithKeysKey in call to method Illuminate\\Support\\Collection\<\(int\|string\),mixed\>\:\:mapWithKeys\(\)$#' + identifier: argument.templateType + count: 1 + path: src/Views/Filters/SelectFilter.php + + - + message: '#^Unable to resolve the template type TMapWithKeysValue in call to method Illuminate\\Support\\Collection\<\(int\|string\),mixed\>\:\:mapWithKeys\(\)$#' + identifier: argument.templateType + count: 1 + path: src/Views/Filters/SelectFilter.php diff --git a/phpstan.neon b/phpstan.neon index eff01a782..096099854 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,9 +1,9 @@ includes: - vendor/larastan/larastan/extension.neon + - phpstan-baseline.neon parameters: paths: - - config - database - src level: 6 @@ -15,13 +15,28 @@ parameters: ignoreErrors: - identifier: missingType.generics - identifier: missingType.iterableValue - - '#Property Rappasoft\\LaravelLivewireTables\\DataTableComponent\:\:\$model has no type specified#' - - '#Unable to resolve the template type TMapWithKeysKey in call to method Illuminate\\Support\\Collection#' - - '#Unable to resolve the template type TMapWithKeysValue in call to method Illuminate\\Support\\Collection#' - - '#Access to an undefined property Rappasoft\\LaravelLivewireTables\\Views\\Column\:\:\$view#' - - "#Unsafe usage of new static#" - - '#on array\, mixed\>\> in empty\(\) does not exist.#' - - '#on array, mixed>> in isset\(\) does not exist#' - - '#on non-empty-array<1\|string, array, mixed>> in isset\(\) does not exist.#' - - '#\$callback of method Illuminate\\Support\\Collection::filter\(\) expects \(callable\(string, int\): bool\)\|null, Closure\(mixed\): int<0, max> given.#' - - '#Property Illuminate\\Database\\Query\\Builder\:\:\$joins \(array\) on left side of \?\? is not nullable.#' + - identifier: trait.unused + - identifier: deadCode.unreachable + - identifier: booleanNot.alwaysTrue + paths: + - src/Views/Columns/Traits/HasDataTableComponent.php + - identifier: notIdentical.alwaysTrue + paths: + - src/Traits/Filters/Helpers/FilterPillsHelpers.php + - src/Traits/Helpers/CustomisationsHelpers.php + - src/Traits/Helpers/QueryHelpers.php + - src/Views/Columns/Traits/HasSlot.php + - src/Views/Columns/Traits/Helpers/ArrayColumnHelpers.php + - identifier: function.alreadyNarrowedType + paths: + - src/Views/Columns/Traits/Helpers/ArrayColumnHelpers.php + - src/Features/AutoInjectRappasoftAssets.php + - src/Traits/WithBulkActions.php + - src/Views/Actions/Traits/HasActionAttributes.php + - src/Views/Filters/MultiSelectDropdownFilter.php + - src/Views/Filters/Traits/HasOptions.php + - src/Views/Traits/Core/HasTheme.php + - src/Views/Traits/Core/HasView.php + - identifier: unset.possiblyHookedProperty + paths: + - src/Traits/Configuration/CollapsingColumnConfiguration.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5ff33415f..30d511e6d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,19 +5,25 @@ colors="false" cacheResult="false" executionOrder="random" - failOnWarning="false" failOnRisky="false" failOnEmptyTestSuite="false" beStrictAboutOutputDuringTests="true" > - - tests + + tests/Unit + + + tests/Visuals + + + tests/Localisations/Unit + + + tests/Localisations/Presence - config - database src diff --git a/resources/js/laravel-livewire-tables.js b/resources/js/laravel-livewire-tables.js index 306c3857d..9641f02ee 100644 --- a/resources/js/laravel-livewire-tables.js +++ b/resources/js/laravel-livewire-tables.js @@ -2,7 +2,13 @@ document.addEventListener('alpine:init', () => { - Alpine.data('laravellivewiretable', (wire, showBulkActionsAlpine, tableID, primaryKeyName) => ({ + Alpine.data('laravellivewiretable', (wire) => ({ + tableId: '', + showBulkActionsAlpine: false, + primaryKeyName: '', + shouldBeDisplayed: wire.entangle('shouldBeDisplayed'), + tableName: wire.entangle('tableName'), + dataTableFingerprint: wire.entangle('dataTableFingerprint'), listeners: [], childElementOpen: false, filtersOpen: wire.entangle('filterSlideDownDefaultVisible'), @@ -25,11 +31,100 @@ document.addEventListener('alpine:init', () => { evenNotInOdd: {}, oddNotInEven: {}, orderedRows: [], - defaultReorderColumn: wire.get('defaultReorderColumn'), + defaultReorderColumn: wire.entangle('defaultReorderColumn'), reorderStatus: wire.entangle('reorderStatus'), currentlyReorderingStatus: wire.entangle('currentlyReorderingStatus'), hideReorderColumnUnlessReorderingStatus: wire.entangle('hideReorderColumnUnlessReorderingStatus'), reorderDisplayColumn: wire.entangle('reorderDisplayColumn'), + externalFilterPillsVals: wire.entangle('externalFilterPillsValues'), + internalFilterPillsVals: wire.entangle('internalFilterPillsVals'), + showFilterPillLabel: [], + filterPillsSeparator: ', ', + showFilterPillsSection: true, + removeHTMLTags(htmlString) { + // Create a new DOMParser instance + const parser = new DOMParser(); + // Parse the HTML string + let doc = parser.parseFromString(htmlString, 'text/html'); + // Extract text content + let textContent = doc.body.innerText || ""; + // Trim whitespace + let trimmedContent = textContent.trim(); + + return trimmedContent; + }, + resetSpecificFilter(filterKey) + { + this.externalFilterPillsVals[filterKey] = []; + wire.call('resetFilter',filterKey); + }, + resetAllFilters() + { + this.externalFilterPillsVals = []; + wire.call('setFilterDefaults'); + }, + setInternalFilterPillVal(filterKey, filterValues) + { + + if(typeof(filterValues) !== 'undefined') + { + this.internalFilterPillsVals[filterKey] = filterValues; + } + }, + syncExternalFilterPillsValues(filterKey,filterValues) { + this.externalFilterPillsVals[filterKey] = filterValues; + this.showFilterPillLabel[filterKey] = this.getFilterPillsLength(filterKey); + }, + getFilterPillsLength(filterKey) + { + return Object.keys(this.externalFilterPillsVals[filterKey]).length ?? 0; + }, + showFilterPillsValue(filterKey, filterPillValue) + { + if(typeof(filterPillValue) !== "undefined") + { + this.externalFilterPillsVals[filterKey] = filterPillValue; + } + else + { + this.externalFilterPillsVals[filterKey] = null; + } + + }, + setFilterPillsLength(externalFilterPillsValues) + { + let filterValueLength = 0; + if (typeof(externalFilterPillsValues) !== 'undefined') + { + filterValueLength = Object.keys(externalFilterPillsValues).length ?? 0; + } + else + { + filterValueLength = 0; + } + return filterValueLength; + }, + showFilterPillsLabel(filterKey) + { + let pillsLength = this.getFilterPillsLength(filterKey); + return (this.getFilterPillsLength(filterKey) > 0); + }, + getFilterPillImplodedValues(filterKey, separator) + { + let filterPillValues = this.externalFilterPillsVals[filterKey]; + if(filterPillValues !== 'undefined') + { + let joinedValues = filterPillValues.join(separator); + + return joinedValues; + } + + return ''; + }, + showFilterPillsSeparator(filterKey,index) + { + return ((index+1) < (this.getFilterPillsLength(filterKey))); + }, dragStart(event) { this.$nextTick(() => { this.setupEvenOddClasses() }); this.sourceID = event.target.id; @@ -67,7 +162,7 @@ document.addEventListener('alpine:init', () => { element.classList.remove("laravel-livewire-table-dragging"); let originalPosition = element.rowIndex; let newPosition = target.rowIndex; - let table = document.getElementById(tableID); + let table = document.getElementById(this.tableId); let loopStart = originalPosition; if (event.offsetY > (target.getBoundingClientRect().height / 2)) { parent.insertBefore(element, target.nextSibling); @@ -123,17 +218,17 @@ document.addEventListener('alpine:init', () => { }, updateOrderedItems() { - let table = document.getElementById(tableID); + let table = document.getElementById(this.tableId); let orderedRows = []; for (let i = 1, row; row = table.rows[i]; i++) { - orderedRows.push({ [primaryKeyName]: row.getAttribute('rowpk'), [this.defaultReorderColumn]: i }); + orderedRows.push({ [this.primaryKeyName]: row.getAttribute('rowpk'), [this.defaultReorderColumn]: i }); } wire.storeReorder(orderedRows); }, setupEvenOddClasses() { if (this.evenNotInOdd.length === undefined || this.evenNotInOdd.length == 0 || this.oddNotInEven.length === undefined || this.oddNotInEven.length == 0) { - let tbody = document.getElementById(tableID).getElementsByTagName('tbody')[0]; + let tbody = document.getElementById(this.tableId).getElementsByTagName('tbody')[0]; let evenRowClassArray = []; let oddRowClassArray = []; @@ -149,7 +244,7 @@ document.addEventListener('alpine:init', () => { } }, toggleSelectAll() { - if (!showBulkActionsAlpine) { + if (!this.showBulkActionsAlpine) { return; } @@ -168,14 +263,14 @@ document.addEventListener('alpine:init', () => { } }, setAllItemsSelected() { - if (!showBulkActionsAlpine) { + if (!this.showBulkActionsAlpine) { return; } this.selectAllStatus = true; this.selectAllOnPage(); }, setAllSelected() { - if (!showBulkActionsAlpine) { + if (!this.showBulkActionsAlpine) { return; } if (this.delaySelectAll) @@ -189,14 +284,14 @@ document.addEventListener('alpine:init', () => { } }, clearSelected() { - if (!showBulkActionsAlpine) { + if (!this.showBulkActionsAlpine) { return; } this.selectAllStatus = false; wire.clearSelected(); }, selectAllOnPage() { - if (!showBulkActionsAlpine) { + if (!this.showBulkActionsAlpine) { return; } @@ -207,16 +302,45 @@ document.addEventListener('alpine:init', () => { } this.selectedItems = [...new Set(tempSelectedItems)]; }, + setTableId(tableId) + { + this.tableId = tableId; + }, + setAlpineBulkActions(showBulkActionsAlpine) + { + this.showBulkActionsAlpine = showBulkActionsAlpine; + }, + setPrimaryKeyName(primaryKeyName) + { + this.primaryKeyName = primaryKeyName; + }, + showTable(event) + { + let eventTableName = event.detail.tableName ?? ''; + let eventTableFingerprint = event.detail.tableFingerpint ?? ''; + + if (((eventTableName ?? '') != '' && eventTableName === this.tableName) || (eventTableFingerprint != '' && eventTableFingerpint === this.dataTableFingerprint)) { + this.shouldBeDisplayed = true; + } + }, + hideTable(event) + { + let eventTableName = event.detail.tableName ?? ''; + let eventTableFingerprint = event.detail.tableFingerpint ?? ''; + + if ((eventTableName != '' && eventTableName === this.tableName) || (eventTableFingerprint != '' && eventTableFingerpint === this.dataTableFingerprint)) { + this.shouldBeDisplayed = false; + } + }, destroy() { this.listeners.forEach((listener) => { listener(); }); - - } + }, })); - Alpine.data('booleanFilter', (wire,filterKey,tableName,defaultValue) => ({ + localListeners: [], switchOn: false, value: wire.entangle('filterComponents.'+filterKey).live, init() { @@ -224,9 +348,57 @@ document.addEventListener('alpine:init', () => { if (typeof this.value !== 'undefined') { this.switchOn = Boolean(Number(this.value)); } + this.localListeners.push( + Livewire.on('filter-was-set', (detail) => { + if(detail.tableName == this.tableName && detail.filterKey == filterKey) { + this.switchOn = detail.value ?? defaultValue; + } + }) + ); + }, + destroy() { + this.localListeners.forEach((listener) => { + listener(); + }); + }, + })); + + Alpine.data('newBooleanFilter', (filterKey,tableName,defaultValue) => ({ + booleanFilterKey: filterKey, + switchOn: false, + value: false, + toggleStatus() + { + let tempValue = Boolean(Number(this.$wire.get('filterComponents.'+this.booleanFilterKey) ?? this.value)); + let newBoolean = !tempValue; + this.switchOn = this.value = newBoolean; + return Number(newBoolean); + }, + toggleStatusWithUpdate() + { + let newValue = this.toggleStatus(); + this.$wire.set('filterComponents.'+this.booleanFilterKey, newValue); + }, + toggleStatusWithReset() + { + let newValue = this.toggleStatus(); + this.$wire.call('resetFilter',this.booleanFilterKey); + }, + setSwitchOn(val) + { + let number = Number(val ?? 0); + this.switchOn = Boolean(number); + }, + init() { + + this.$nextTick(() => { + this.value = this.$wire.get('filterComponents.'+this.booleanFilterKey) ?? defaultValue; + this.setSwitchOn(this.value ?? 0); + }); + this.listeners.push( Livewire.on('filter-was-set', (detail) => { - if(detail.tableName == tableName && detail.filterKey == filterKey) { + if(detail.tableName == this.tableName && detail.filterKey == this.booleanFilterKey) { this.switchOn = detail.value ?? defaultValue; } }) @@ -234,6 +406,52 @@ document.addEventListener('alpine:init', () => { } })); + Alpine.data('booleanFilterLatest', (data) => ({ + booleanFilterKey: data.filterKey, + booleanFilterDefaultValue: data.defaultValue, + switchOn: false, + value: false, + toggleStatus() + { + let tempValue = Boolean(Number(this.$wire.get('filterComponents.'+this.booleanFilterKey) ?? this.value)); + let newBoolean = !tempValue; + this.switchOn = this.value = newBoolean; + return Number(newBoolean); + }, + toggleStatusWithUpdate() + { + let newValue = this.toggleStatus(); + this.$wire.set('filterComponents.'+this.booleanFilterKey, newValue); + }, + toggleStatusWithReset() + { + let newValue = this.toggleStatus(); + this.$wire.call('resetFilter',this.booleanFilterKey); + }, + setSwitchOn(val) + { + let number = Number(val ?? 0); + this.switchOn = Boolean(number); + }, + init() { + + this.$nextTick(() => { + this.value = this.$wire.get('filterComponents.'+this.booleanFilterKey) ?? this.booleanFilterDefaultValue; + this.setSwitchOn(this.value ?? 0); + }); + + this.listeners.push( + Livewire.on('filter-was-set', (detail) => { + if(detail.tableName == this.tableName && detail.filterKey == this.booleanFilterKey) { + this.switchOn = detail.value ?? this.booleanFilterDefaultValue; + } + }) + ); + } + })); + + + Alpine.data('numberRangeFilter', (wire, filterKey, parentElementPath, filterConfig, childElementRoot) => ({ allFilters: wire.entangle('filterComponents', false), originalMin: 0, @@ -371,8 +589,8 @@ document.addEventListener('alpine:init', () => { })); - Alpine.data('tableWrapper', (wire, showBulkActionsAlpine) => ({ + shouldBeDisplayed: wire.entangle('shouldBeDisplayed'), listeners: [], childElementOpen: false, filtersOpen: wire.entangle('filterSlideDownDefaultVisible'), @@ -583,4 +801,175 @@ document.addEventListener('alpine:init', () => { } })); + Alpine.data('filterPillsHandler', (data) => ({ + localData: data, + localFilterKey: '', + localFilterTitle: '', + isExternalFilter: false, + shouldRenderAsHTML: false, + shouldWatchPillValues: false, + pillsSeparator: ',', + pillValues: null, + pillHasValues: false, + displayString: '', + generateLocalFilterPillImplodedValues(filterPillValues) + { + if(typeof(filterPillValues) !== 'undefined') + { + var temporarySeparatorString = '---tablepillsseparator---'; + var regex = new RegExp(temporarySeparatorString, 'g'); + var joinedValues; + + if(Array.isArray(filterPillValues)) + { + joinedValues = filterPillValues.join(temporarySeparatorString); + } + else + { + joinedValues = filterPillValues; + } + + if(!this.shouldRenderAsHTML) + { + joinedValues = this.removeHTMLTags(joinedValues); + } + + if (joinedValues !== null) + { + let replacedJoinedValues = joinedValues.replace(regex, this.pillsSeparator); + return replacedJoinedValues; + + } + return ""; + } + return ""; + }, + clearExternalFilterPill() + { + if(this.isExternalFilter) + { + this.externalFilterPillsVals[this.localFilterKey] = []; + this.displayString = this.generateLocalFilterPillImplodedValues(this.externalFilterPillsVals[this.localFilterKey]); + this.updatePillHasValues(); + this.resetSpecificFilter(this.localFilterKey); + } + }, + trigger: { + ['@filterpillupdate.window'](event) { + this.watchForUpdateEvent(event); + }, + }, + checkEventIsValid(eventTableName, eventFilterKey) + { + return ((this.tableName === eventTableName) && (this.localFilterKey === eventFilterKey)); + }, + watchForUpdateEvent(event) + { + if(this.checkEventIsValid(event.detail.tableName ?? '', event.detail.filterKey ?? '')) + { + let eventPillItem = event.detail.pillItem ?? ''; + if(!this.shouldRenderAsHTML) + { + eventPillItem = this.removeHTMLTags(eventPillItem); + } + + if(eventPillItem != "") + { + if(this.isExternalFilter) + { + let filterPillValues = this.externalFilterPillsVals[this.localFilterKey]; + + filterPillValues.push(eventPillItem); + this.updatePillValues(filterPillValues); + } + else + { + this.updatePillValues(eventPillItem); + } + } + } + }, + updatePillValues(filterPillValues) + { + this.pillValues = filterPillValues; + this.displayString = this.generateLocalFilterPillImplodedValues(filterPillValues); + this.updatePillHasValues(); + + return this.displayString; + }, + updatePillHasValues() + { + this.pillHasValues = (this.displayString.length > 0); + }, + init() + { + this.localFilterKey = this.localData['filterKey'] ?? 'unknown'; + this.localFilterTitle = this.localData['filterPillTitle'] ?? 'Unknown'; + this.pillsSeparator = this.localData['separator'] ?? ','; + this.shouldWatchPillValues = Boolean(this.localData['watchForEvents'] ?? 0); + this.isExternalFilter = Boolean(this.localData['isAnExternalLivewireFilter'] ?? 0); + this.shouldRenderAsHTML = Boolean(this.localData['renderPillsAsHtml'] ?? 0); + this.pillValues = this.localData['pillValues'] ?? null; + + this.$nextTick(() => { + if(this.isExternalFilter) + { + this.updatePillValues(this.externalFilterPillsVals[this.localFilterKey]); + } + else + { + this.updatePillValues(this.pillValues); + } + }); + if(this.isExternalFilter && this.shouldWatchPillValues) + { + this.$watch('externalFilterPillsVals.'+this.localFilterKey, filterPillValues => { + this.updatePillValues(filterPillValues); + }); + } + } + })); + + + Alpine.data('tablesExternalFilter', (wire, filterKey) => ({ + externalFilterKey: filterKey, + pillValues: [], + optionsAvailable: wire.entangle('optionsAvailable'), + optionsSelected: wire.entangle('optionsSelected').live, + selectedItems: wire.entangle('selectedItems'), + sendValueToPill(value) + { + let sentValue = this.removeHTMLTags(value); + this.$dispatch('filterpillupdate', { tableName: this.tableName, filterKey: this.externalFilterKey, pillItem: sentValue }); + }, + overridePill(values) + { + let sentValue = this.removeHTMLTags(values); + this.$dispatch('filterpillupdate', { tableName: this.tableName, filterKey: this.externalFilterKey, pillItem: sentValue }); + }, + syncItems(items) { + this.pillValues = []; + items.forEach((item) => { + this.pillValues.push(this.optionsAvailable[item]); + }); + if(this.pillValues.length > 0) + { + this.pillValues.sort(); + this.syncExternalFilterPillsValues(this.externalFilterKey,this.pillValues); + } + this.optionsSelected = this.selectedItems; + wire.set('value', this.selectedItems); + + }, + init() { + this.selectedItems = this.optionsSelected; + this.syncItems(this.selectedItems); + this.$watch('selectedItems', value => this.syncItems(value)); + } + + + })); + + + }); \ No newline at end of file diff --git a/resources/js/laravel-livewire-tables.min.js b/resources/js/laravel-livewire-tables.min.js index 35cecdd4f..5e0980c39 100644 --- a/resources/js/laravel-livewire-tables.min.js +++ b/resources/js/laravel-livewire-tables.min.js @@ -1 +1 @@ -document.addEventListener("alpine:init",()=>{Alpine.data("laravellivewiretable",(e,t,l,i)=>({listeners:[],childElementOpen:!1,filtersOpen:e.entangle("filterSlideDownDefaultVisible"),paginationCurrentCount:e.entangle("paginationCurrentCount"),paginationTotalItemCount:e.entangle("paginationTotalItemCount"),paginationCurrentItems:e.entangle("paginationCurrentItems"),selectedItems:e.entangle("selected"),selectAllStatus:e.entangle("selectAll"),delaySelectAll:e.entangle("delaySelectAll"),hideBulkActionsWhenEmpty:e.entangle("hideBulkActionsWhenEmpty"),dragging:!1,reorderEnabled:!1,sourceID:"",targetID:"",evenRowClasses:"",oddRowClasses:"",currentlyHighlightedElement:"",evenRowClassArray:{},oddRowClassArray:{},evenNotInOdd:{},oddNotInEven:{},orderedRows:[],defaultReorderColumn:e.get("defaultReorderColumn"),reorderStatus:e.entangle("reorderStatus"),currentlyReorderingStatus:e.entangle("currentlyReorderingStatus"),hideReorderColumnUnlessReorderingStatus:e.entangle("hideReorderColumnUnlessReorderingStatus"),reorderDisplayColumn:e.entangle("reorderDisplayColumn"),dragStart(e){this.$nextTick(()=>{this.setupEvenOddClasses()}),this.sourceID=e.target.id,e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.classList.add("laravel-livewire-tables-dragging")},dragOverEvent(e){"object"==typeof this.currentlyHighlightedElement&&this.currentlyHighlightedElement.classList.remove("laravel-livewire-tables-highlight-bottom","laravel-livewire-tables-highlight-top");let t=e.target.closest("tr");this.currentlyHighlightedElement=t,e.offsetYt.getBoundingClientRect().height/2?i.insertBefore(s,t.nextSibling):i.insertBefore(s,t),r{this.setupEvenOddClasses()})},cancelReorder(){this.hideReorderColumnUnlessReorderingStatus&&(this.reorderDisplayColumn=!1),e.disableReordering()},updateOrderedItems(){let t=document.getElementById(l),s=[];for(let a=1,r;r=t.rows[a];a++)s.push({[i]:r.getAttribute("rowpk"),[this.defaultReorderColumn]:a});e.storeReorder(s)},setupEvenOddClasses(){if(void 0===this.evenNotInOdd.length||0==this.evenNotInOdd.length||void 0===this.oddNotInEven.length||0==this.oddNotInEven.length){let e=document.getElementById(l).getElementsByTagName("tbody")[0],t=[],i=[];void 0!==e.rows[0]&&void 0!==e.rows[1]&&(t=Array.from(e.rows[0].classList),i=Array.from(e.rows[1].classList),this.evenNotInOdd=t.filter(e=>!i.includes(e)),this.oddNotInEven=i.filter(e=>!t.includes(e)),t=[],i=[])}},toggleSelectAll(){t&&(this.paginationTotalItemCount===this.selectedItems.length?(this.clearSelected(),this.selectAllStatus=!1):this.delaySelectAll?this.setAllItemsSelected():this.setAllSelected())},setAllItemsSelected(){t&&(this.selectAllStatus=!0,this.selectAllOnPage())},setAllSelected(){t&&(this.delaySelectAll?(this.selectAllStatus=!0,this.selectAllOnPage()):e.setAllSelected())},clearSelected(){t&&(this.selectAllStatus=!1,e.clearSelected())},selectAllOnPage(){if(!t)return;let e=this.selectedItems,l=this.paginationCurrentItems.values();for(let i of l)e.push(i.toString());this.selectedItems=[...new Set(e)]},destroy(){this.listeners.forEach(e=>{e()})}})),Alpine.data("booleanFilter",(e,t,l,i)=>({switchOn:!1,value:e.entangle("filterComponents."+t).live,init(){this.switchOn=!1,void 0!==this.value&&(this.switchOn=Boolean(Number(this.value))),this.listeners.push(Livewire.on("filter-was-set",e=>{e.tableName==l&&e.filterKey==t&&(this.switchOn=e.value??i)}))}})),Alpine.data("numberRangeFilter",(e,t,l,i,s)=>({allFilters:e.entangle("filterComponents",!1),originalMin:0,originalMax:100,filterMin:0,filterMax:100,currentMin:0,currentMax:100,hasUpdate:!1,wireValues:e.entangle("filterComponents."+t,!1),defaultMin:i.minRange,defaultMax:i.maxRange,restrictUpdates:!1,initialiseStyles(){let e=document.getElementById(l);e.style.setProperty("--value-a",this.wireValues.min??this.filterMin),e.style.setProperty("--text-value-a",JSON.stringify(this.wireValues.min??this.filterMin)),e.style.setProperty("--value-b",this.wireValues.max??this.filterMax),e.style.setProperty("--text-value-b",JSON.stringify(this.wireValues.max??this.filterMax))},updateStyles(e,t){let i=document.getElementById(l);i.style.setProperty("--value-a",e),i.style.setProperty("--text-value-a",JSON.stringify(e)),i.style.setProperty("--value-b",t),i.style.setProperty("--text-value-b",JSON.stringify(t))},setupWire(){void 0!==this.wireValues?(this.filterMin=this.originalMin=void 0!==this.wireValues.min?this.wireValues.min:this.defaultMin,this.filterMax=this.originalMax=void 0!==this.wireValues.max?this.wireValues.max:this.defaultMax):(this.filterMin=this.originalMin=this.defaultMin,this.filterMax=this.originalMax=this.defaultMax),this.updateStyles(this.filterMin,this.filterMax)},allowUpdates(){this.updateWire()},updateWire(){let e=parseInt(this.filterMin),t=parseInt(this.filterMax);(e!=this.originalMin||t!=this.originalMax)&&(tthis.setupWire())}})),Alpine.data("flatpickrFilter",(e,t,l,i,s)=>({wireValues:e.entangle("filterComponents."+t),flatpickrInstance:flatpickr(i,{mode:"range",altFormat:l.altFormat??"F j, Y",altInput:l.altInput??!1,allowInput:l.allowInput??!1,allowInvalidPreload:l.allowInvalidPreload??!0,ariaDateFormat:l.ariaDateFormat??"F j, Y",clickOpens:!0,dateFormat:l.dateFormat??"Y-m-d",defaultDate:l.defaultDate??null,defaultHour:l.defaultHour??12,defaultMinute:l.defaultMinute??0,enableTime:l.enableTime??!1,enableSeconds:l.enableSeconds??!1,hourIncrement:l.hourIncrement??1,locale:l.locale??"en",minDate:l.earliestDate??null,maxDate:l.latestDate??null,minuteIncrement:l.minuteIncrement??5,shorthandCurrentMonth:l.shorthandCurrentMonth??!1,time_24hr:l.time_24hr??!1,weekNumbers:l.weekNumbers??!1,onOpen:function(){window.childElementOpen=!0},onChange:function(l,i,s){if(l.length>1){var a=i.split(" "),r={};window.childElementOpen=!1,window.filterPopoverOpen=!1,r={minDate:a[0],maxDate:void 0===a[2]?a[0]:a[2]},e.set("filterComponents."+t,r)}}}),changedValue:function(l){l.length<5&&(this.flatpickrInstance.setDate([]),e.set("filterComponents."+t,{}))},setupWire(){if(void 0!==this.wireValues){if(void 0!==this.wireValues.minDate&&void 0!==this.wireValues.maxDate){let e=[this.wireValues.minDate,this.wireValues.maxDate];this.flatpickrInstance.setDate(e)}else this.flatpickrInstance.setDate([])}else this.flatpickrInstance.setDate([])},init(){this.setupWire(),this.$watch("wireValues",e=>this.setupWire())}})),Alpine.data("tableWrapper",(e,t)=>({listeners:[],childElementOpen:!1,filtersOpen:e.entangle("filterSlideDownDefaultVisible"),paginationCurrentCount:e.entangle("paginationCurrentCount"),paginationTotalItemCount:e.entangle("paginationTotalItemCount"),paginationCurrentItems:e.entangle("paginationCurrentItems"),selectedItems:e.entangle("selected"),selectAllStatus:e.entangle("selectAll"),delaySelectAll:e.entangle("delaySelectAll"),hideBulkActionsWhenEmpty:e.entangle("hideBulkActionsWhenEmpty"),toggleSelectAll(){t&&(this.paginationTotalItemCount===this.selectedItems.length?(this.clearSelected(),this.selectAllStatus=!1):this.delaySelectAll?this.setAllItemsSelected():this.setAllSelected())},setAllItemsSelected(){t&&(this.selectAllStatus=!0,this.selectAllOnPage())},setAllSelected(){t&&(this.delaySelectAll?(this.selectAllStatus=!0,this.selectAllOnPage()):e.setAllSelected())},clearSelected(){t&&(this.selectAllStatus=!1,e.clearSelected())},selectAllOnPage(){if(!t)return;let e=this.selectedItems,l=this.paginationCurrentItems.values();for(let i of l)e.push(i.toString());this.selectedItems=[...new Set(e)]},destroy(){this.listeners.forEach(e=>{e()})}})),Alpine.data("reorderFunction",(e,t,l)=>({dragging:!1,reorderEnabled:!1,sourceID:"",targetID:"",evenRowClasses:"",oddRowClasses:"",currentlyHighlightedElement:"",evenRowClassArray:{},oddRowClassArray:{},evenNotInOdd:{},oddNotInEven:{},orderedRows:[],defaultReorderColumn:e.get("defaultReorderColumn"),reorderStatus:e.get("reorderStatus"),currentlyReorderingStatus:e.entangle("currentlyReorderingStatus"),hideReorderColumnUnlessReorderingStatus:e.entangle("hideReorderColumnUnlessReorderingStatus"),reorderDisplayColumn:e.entangle("reorderDisplayColumn"),dragStart(e){this.$nextTick(()=>{this.setupEvenOddClasses()}),this.sourceID=e.target.id,e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.classList.add("laravel-livewire-tables-dragging")},dragOverEvent(e){"object"==typeof this.currentlyHighlightedElement&&this.currentlyHighlightedElement.classList.remove("laravel-livewire-tables-highlight-bottom","laravel-livewire-tables-highlight-top");let t=e.target.closest("tr");this.currentlyHighlightedElement=t,e.offsetYl.getBoundingClientRect().height/2?i.insertBefore(s,l.nextSibling):i.insertBefore(s,l),r{this.setupEvenOddClasses()}),this.currentlyReorderingStatus?e.disableReordering():(this.setupEvenOddClasses(),this.hideReorderColumnUnlessReorderingStatus&&(this.reorderDisplayColumn=!0),e.enableReordering())},cancelReorder(){this.hideReorderColumnUnlessReorderingStatus&&(this.reorderDisplayColumn=!1),e.disableReordering()},updateOrderedItems(){let i=document.getElementById(t),s=[];for(let a=1,r;r=i.rows[a];a++)s.push({[l]:r.getAttribute("rowpk"),[this.defaultReorderColumn]:a});e.storeReorder(s)},setupEvenOddClasses(){if(void 0===this.evenNotInOdd.length||0==this.evenNotInOdd.length||void 0===this.oddNotInEven.length||0==this.oddNotInEven.length){let e=document.getElementById(t).getElementsByTagName("tbody")[0],l=[],i=[];void 0!==e.rows[0]&&void 0!==e.rows[1]&&(l=Array.from(e.rows[0].classList),i=Array.from(e.rows[1].classList),this.evenNotInOdd=l.filter(e=>!i.includes(e)),this.oddNotInEven=i.filter(e=>!l.includes(e)),l=[],i=[])}},init(){}}))}); \ No newline at end of file +document.addEventListener("alpine:init",()=>{Alpine.data("laravellivewiretable",e=>({tableId:"",showBulkActionsAlpine:!1,primaryKeyName:"",shouldBeDisplayed:e.entangle("shouldBeDisplayed"),tableName:e.entangle("tableName"),dataTableFingerprint:e.entangle("dataTableFingerprint"),listeners:[],childElementOpen:!1,filtersOpen:e.entangle("filterSlideDownDefaultVisible"),paginationCurrentCount:e.entangle("paginationCurrentCount"),paginationTotalItemCount:e.entangle("paginationTotalItemCount"),paginationCurrentItems:e.entangle("paginationCurrentItems"),selectedItems:e.entangle("selected"),selectAllStatus:e.entangle("selectAll"),delaySelectAll:e.entangle("delaySelectAll"),hideBulkActionsWhenEmpty:e.entangle("hideBulkActionsWhenEmpty"),dragging:!1,reorderEnabled:!1,sourceID:"",targetID:"",evenRowClasses:"",oddRowClasses:"",currentlyHighlightedElement:"",evenRowClassArray:{},oddRowClassArray:{},evenNotInOdd:{},oddNotInEven:{},orderedRows:[],defaultReorderColumn:e.entangle("defaultReorderColumn"),reorderStatus:e.entangle("reorderStatus"),currentlyReorderingStatus:e.entangle("currentlyReorderingStatus"),hideReorderColumnUnlessReorderingStatus:e.entangle("hideReorderColumnUnlessReorderingStatus"),reorderDisplayColumn:e.entangle("reorderDisplayColumn"),externalFilterPillsVals:e.entangle("externalFilterPillsValues"),internalFilterPillsVals:e.entangle("internalFilterPillsVals"),showFilterPillLabel:[],filterPillsSeparator:", ",showFilterPillsSection:!0,removeHTMLTags(e){let t=new DOMParser;return(t.parseFromString(e,"text/html").body.innerText||"").trim()},resetSpecificFilter(t){this.externalFilterPillsVals[t]=[],e.call("resetFilter",t)},resetAllFilters(){this.externalFilterPillsVals=[],e.call("setFilterDefaults")},setInternalFilterPillVal(e,t){void 0!==t&&(this.internalFilterPillsVals[e]=t)},syncExternalFilterPillsValues(e,t){this.externalFilterPillsVals[e]=t,this.showFilterPillLabel[e]=this.getFilterPillsLength(e)},getFilterPillsLength(e){return Object.keys(this.externalFilterPillsVals[e]).length??0},showFilterPillsValue(e,t){void 0!==t?this.externalFilterPillsVals[e]=t:this.externalFilterPillsVals[e]=null},setFilterPillsLength(e){let t=0;return void 0!==e?Object.keys(e).length??0:0},showFilterPillsLabel(e){return this.getFilterPillsLength(e),this.getFilterPillsLength(e)>0},getFilterPillImplodedValues(e,t){let l=this.externalFilterPillsVals[e];return"undefined"!==l?l.join(t):""},showFilterPillsSeparator(e,t){return t+1{this.setupEvenOddClasses()}),this.sourceID=e.target.id,e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.classList.add("laravel-livewire-tables-dragging")},dragOverEvent(e){"object"==typeof this.currentlyHighlightedElement&&this.currentlyHighlightedElement.classList.remove("laravel-livewire-tables-highlight-bottom","laravel-livewire-tables-highlight-top");let t=e.target.closest("tr");this.currentlyHighlightedElement=t,e.offsetYt.getBoundingClientRect().height/2?l.insertBefore(i,t.nextSibling):l.insertBefore(i,t),a{this.setupEvenOddClasses()})},cancelReorder(){this.hideReorderColumnUnlessReorderingStatus&&(this.reorderDisplayColumn=!1),e.disableReordering()},updateOrderedItems(){let t=document.getElementById(this.tableId),l=[];for(let i=1,s;s=t.rows[i];i++)l.push({[this.primaryKeyName]:s.getAttribute("rowpk"),[this.defaultReorderColumn]:i});e.storeReorder(l)},setupEvenOddClasses(){if(void 0===this.evenNotInOdd.length||0==this.evenNotInOdd.length||void 0===this.oddNotInEven.length||0==this.oddNotInEven.length){let e=document.getElementById(this.tableId).getElementsByTagName("tbody")[0],t=[],l=[];void 0!==e.rows[0]&&void 0!==e.rows[1]&&(t=Array.from(e.rows[0].classList),l=Array.from(e.rows[1].classList),this.evenNotInOdd=t.filter(e=>!l.includes(e)),this.oddNotInEven=l.filter(e=>!t.includes(e)),t=[],l=[])}},toggleSelectAll(){this.showBulkActionsAlpine&&(this.paginationTotalItemCount===this.selectedItems.length?(this.clearSelected(),this.selectAllStatus=!1):this.delaySelectAll?this.setAllItemsSelected():this.setAllSelected())},setAllItemsSelected(){this.showBulkActionsAlpine&&(this.selectAllStatus=!0,this.selectAllOnPage())},setAllSelected(){this.showBulkActionsAlpine&&(this.delaySelectAll?(this.selectAllStatus=!0,this.selectAllOnPage()):e.setAllSelected())},clearSelected(){this.showBulkActionsAlpine&&(this.selectAllStatus=!1,e.clearSelected())},selectAllOnPage(){if(!this.showBulkActionsAlpine)return;let e=this.selectedItems,t=this.paginationCurrentItems.values();for(let l of t)e.push(l.toString());this.selectedItems=[...new Set(e)]},setTableId(e){this.tableId=e},setAlpineBulkActions(e){this.showBulkActionsAlpine=e},setPrimaryKeyName(e){this.primaryKeyName=e},showTable(e){let t=e.detail.tableName??"",l=e.detail.tableFingerpint??"";((t??"")!=""&&t===this.tableName||""!=l&&eventTableFingerpint===this.dataTableFingerprint)&&(this.shouldBeDisplayed=!0)},hideTable(e){let t=e.detail.tableName??"",l=e.detail.tableFingerpint??"";(""!=t&&t===this.tableName||""!=l&&eventTableFingerpint===this.dataTableFingerprint)&&(this.shouldBeDisplayed=!1)},destroy(){this.listeners.forEach(e=>{e()})}})),Alpine.data("booleanFilter",(e,t,l,i)=>({localListeners:[],switchOn:!1,value:e.entangle("filterComponents."+t).live,init(){this.switchOn=!1,void 0!==this.value&&(this.switchOn=Boolean(Number(this.value))),this.localListeners.push(Livewire.on("filter-was-set",e=>{e.tableName==this.tableName&&e.filterKey==t&&(this.switchOn=e.value??i)}))},destroy(){this.localListeners.forEach(e=>{e()})}})),Alpine.data("newBooleanFilter",(e,t,l)=>({booleanFilterKey:e,switchOn:!1,value:!1,toggleStatus(){let e=!Boolean(Number(this.$wire.get("filterComponents."+this.booleanFilterKey)??this.value));return this.switchOn=this.value=e,Number(e)},toggleStatusWithUpdate(){let e=this.toggleStatus();this.$wire.set("filterComponents."+this.booleanFilterKey,e)},toggleStatusWithReset(){this.toggleStatus(),this.$wire.call("resetFilter",this.booleanFilterKey)},setSwitchOn(e){let t=Number(e??0);this.switchOn=Boolean(t)},init(){this.$nextTick(()=>{this.value=this.$wire.get("filterComponents."+this.booleanFilterKey)??l,this.setSwitchOn(this.value??0)}),this.listeners.push(Livewire.on("filter-was-set",e=>{e.tableName==this.tableName&&e.filterKey==this.booleanFilterKey&&(this.switchOn=e.value??l)}))}})),Alpine.data("booleanFilterLatest",e=>({booleanFilterKey:e.filterKey,booleanFilterDefaultValue:e.defaultValue,switchOn:!1,value:!1,toggleStatus(){let e=!Boolean(Number(this.$wire.get("filterComponents."+this.booleanFilterKey)??this.value));return this.switchOn=this.value=e,Number(e)},toggleStatusWithUpdate(){let e=this.toggleStatus();this.$wire.set("filterComponents."+this.booleanFilterKey,e)},toggleStatusWithReset(){this.toggleStatus(),this.$wire.call("resetFilter",this.booleanFilterKey)},setSwitchOn(e){let t=Number(e??0);this.switchOn=Boolean(t)},init(){this.$nextTick(()=>{this.value=this.$wire.get("filterComponents."+this.booleanFilterKey)??this.booleanFilterDefaultValue,this.setSwitchOn(this.value??0)}),this.listeners.push(Livewire.on("filter-was-set",e=>{e.tableName==this.tableName&&e.filterKey==this.booleanFilterKey&&(this.switchOn=e.value??this.booleanFilterDefaultValue)}))}})),Alpine.data("numberRangeFilter",(e,t,l,i,s)=>({allFilters:e.entangle("filterComponents",!1),originalMin:0,originalMax:100,filterMin:0,filterMax:100,currentMin:0,currentMax:100,hasUpdate:!1,wireValues:e.entangle("filterComponents."+t,!1),defaultMin:i.minRange,defaultMax:i.maxRange,restrictUpdates:!1,initialiseStyles(){let e=document.getElementById(l);e.style.setProperty("--value-a",this.wireValues.min??this.filterMin),e.style.setProperty("--text-value-a",JSON.stringify(this.wireValues.min??this.filterMin)),e.style.setProperty("--value-b",this.wireValues.max??this.filterMax),e.style.setProperty("--text-value-b",JSON.stringify(this.wireValues.max??this.filterMax))},updateStyles(e,t){let i=document.getElementById(l);i.style.setProperty("--value-a",e),i.style.setProperty("--text-value-a",JSON.stringify(e)),i.style.setProperty("--value-b",t),i.style.setProperty("--text-value-b",JSON.stringify(t))},setupWire(){void 0!==this.wireValues?(this.filterMin=this.originalMin=void 0!==this.wireValues.min?this.wireValues.min:this.defaultMin,this.filterMax=this.originalMax=void 0!==this.wireValues.max?this.wireValues.max:this.defaultMax):(this.filterMin=this.originalMin=this.defaultMin,this.filterMax=this.originalMax=this.defaultMax),this.updateStyles(this.filterMin,this.filterMax)},allowUpdates(){this.updateWire()},updateWire(){let e=parseInt(this.filterMin),t=parseInt(this.filterMax);(e!=this.originalMin||t!=this.originalMax)&&(tthis.setupWire())}})),Alpine.data("flatpickrFilter",(e,t,l,i,s)=>({wireValues:e.entangle("filterComponents."+t),flatpickrInstance:flatpickr(i,{mode:"range",altFormat:l.altFormat??"F j, Y",altInput:l.altInput??!1,allowInput:l.allowInput??!1,allowInvalidPreload:l.allowInvalidPreload??!0,ariaDateFormat:l.ariaDateFormat??"F j, Y",clickOpens:!0,dateFormat:l.dateFormat??"Y-m-d",defaultDate:l.defaultDate??null,defaultHour:l.defaultHour??12,defaultMinute:l.defaultMinute??0,enableTime:l.enableTime??!1,enableSeconds:l.enableSeconds??!1,hourIncrement:l.hourIncrement??1,locale:l.locale??"en",minDate:l.earliestDate??null,maxDate:l.latestDate??null,minuteIncrement:l.minuteIncrement??5,shorthandCurrentMonth:l.shorthandCurrentMonth??!1,time_24hr:l.time_24hr??!1,weekNumbers:l.weekNumbers??!1,onOpen:function(){window.childElementOpen=!0},onChange:function(l,i,s){if(l.length>1){var a=i.split(" "),r={};window.childElementOpen=!1,window.filterPopoverOpen=!1,r={minDate:a[0],maxDate:void 0===a[2]?a[0]:a[2]},e.set("filterComponents."+t,r)}}}),changedValue:function(l){l.length<5&&(this.flatpickrInstance.setDate([]),e.set("filterComponents."+t,{}))},setupWire(){if(void 0!==this.wireValues){if(void 0!==this.wireValues.minDate&&void 0!==this.wireValues.maxDate){let e=[this.wireValues.minDate,this.wireValues.maxDate];this.flatpickrInstance.setDate(e)}else this.flatpickrInstance.setDate([])}else this.flatpickrInstance.setDate([])},init(){this.setupWire(),this.$watch("wireValues",e=>this.setupWire())}})),Alpine.data("tableWrapper",(e,t)=>({shouldBeDisplayed:e.entangle("shouldBeDisplayed"),listeners:[],childElementOpen:!1,filtersOpen:e.entangle("filterSlideDownDefaultVisible"),paginationCurrentCount:e.entangle("paginationCurrentCount"),paginationTotalItemCount:e.entangle("paginationTotalItemCount"),paginationCurrentItems:e.entangle("paginationCurrentItems"),selectedItems:e.entangle("selected"),selectAllStatus:e.entangle("selectAll"),delaySelectAll:e.entangle("delaySelectAll"),hideBulkActionsWhenEmpty:e.entangle("hideBulkActionsWhenEmpty"),toggleSelectAll(){t&&(this.paginationTotalItemCount===this.selectedItems.length?(this.clearSelected(),this.selectAllStatus=!1):this.delaySelectAll?this.setAllItemsSelected():this.setAllSelected())},setAllItemsSelected(){t&&(this.selectAllStatus=!0,this.selectAllOnPage())},setAllSelected(){t&&(this.delaySelectAll?(this.selectAllStatus=!0,this.selectAllOnPage()):e.setAllSelected())},clearSelected(){t&&(this.selectAllStatus=!1,e.clearSelected())},selectAllOnPage(){if(!t)return;let e=this.selectedItems,l=this.paginationCurrentItems.values();for(let i of l)e.push(i.toString());this.selectedItems=[...new Set(e)]},destroy(){this.listeners.forEach(e=>{e()})}})),Alpine.data("reorderFunction",(e,t,l)=>({dragging:!1,reorderEnabled:!1,sourceID:"",targetID:"",evenRowClasses:"",oddRowClasses:"",currentlyHighlightedElement:"",evenRowClassArray:{},oddRowClassArray:{},evenNotInOdd:{},oddNotInEven:{},orderedRows:[],defaultReorderColumn:e.get("defaultReorderColumn"),reorderStatus:e.get("reorderStatus"),currentlyReorderingStatus:e.entangle("currentlyReorderingStatus"),hideReorderColumnUnlessReorderingStatus:e.entangle("hideReorderColumnUnlessReorderingStatus"),reorderDisplayColumn:e.entangle("reorderDisplayColumn"),dragStart(e){this.$nextTick(()=>{this.setupEvenOddClasses()}),this.sourceID=e.target.id,e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.classList.add("laravel-livewire-tables-dragging")},dragOverEvent(e){"object"==typeof this.currentlyHighlightedElement&&this.currentlyHighlightedElement.classList.remove("laravel-livewire-tables-highlight-bottom","laravel-livewire-tables-highlight-top");let t=e.target.closest("tr");this.currentlyHighlightedElement=t,e.offsetYl.getBoundingClientRect().height/2?i.insertBefore(s,l.nextSibling):i.insertBefore(s,l),r{this.setupEvenOddClasses()}),this.currentlyReorderingStatus?e.disableReordering():(this.setupEvenOddClasses(),this.hideReorderColumnUnlessReorderingStatus&&(this.reorderDisplayColumn=!0),e.enableReordering())},cancelReorder(){this.hideReorderColumnUnlessReorderingStatus&&(this.reorderDisplayColumn=!1),e.disableReordering()},updateOrderedItems(){let i=document.getElementById(t),s=[];for(let a=1,r;r=i.rows[a];a++)s.push({[l]:r.getAttribute("rowpk"),[this.defaultReorderColumn]:a});e.storeReorder(s)},setupEvenOddClasses(){if(void 0===this.evenNotInOdd.length||0==this.evenNotInOdd.length||void 0===this.oddNotInEven.length||0==this.oddNotInEven.length){let e=document.getElementById(t).getElementsByTagName("tbody")[0],l=[],i=[];void 0!==e.rows[0]&&void 0!==e.rows[1]&&(l=Array.from(e.rows[0].classList),i=Array.from(e.rows[1].classList),this.evenNotInOdd=l.filter(e=>!i.includes(e)),this.oddNotInEven=i.filter(e=>!l.includes(e)),l=[],i=[])}},init(){}})),Alpine.data("filterPillsHandler",e=>({localData:e,localFilterKey:"",localFilterTitle:"",isExternalFilter:!1,shouldRenderAsHTML:!1,shouldWatchPillValues:!1,pillsSeparator:",",pillValues:null,pillHasValues:!1,displayString:"",generateLocalFilterPillImplodedValues(e){if(void 0!==e){var t,l="---tablepillsseparator---",i=RegExp(l,"g");if(t=Array.isArray(e)?e.join(l):e,this.shouldRenderAsHTML||(t=this.removeHTMLTags(t)),null!==t)return t.replace(i,this.pillsSeparator)}return""},clearExternalFilterPill(){this.isExternalFilter&&(this.externalFilterPillsVals[this.localFilterKey]=[],this.displayString=this.generateLocalFilterPillImplodedValues(this.externalFilterPillsVals[this.localFilterKey]),this.updatePillHasValues(),this.resetSpecificFilter(this.localFilterKey))},trigger:{"@filterpillupdate.window"(e){this.watchForUpdateEvent(e)}},checkEventIsValid(e,t){return this.tableName===e&&this.localFilterKey===t},watchForUpdateEvent(e){if(this.checkEventIsValid(e.detail.tableName??"",e.detail.filterKey??"")){let t=e.detail.pillItem??"";if(this.shouldRenderAsHTML||(t=this.removeHTMLTags(t)),""!=t){if(this.isExternalFilter){let l=this.externalFilterPillsVals[this.localFilterKey];l.push(t),this.updatePillValues(l)}else this.updatePillValues(t)}}},updatePillValues(e){return this.pillValues=e,this.displayString=this.generateLocalFilterPillImplodedValues(e),this.updatePillHasValues(),this.displayString},updatePillHasValues(){this.pillHasValues=this.displayString.length>0},init(){this.localFilterKey=this.localData.filterKey??"unknown",this.localFilterTitle=this.localData.filterPillTitle??"Unknown",this.pillsSeparator=this.localData.separator??",",this.shouldWatchPillValues=Boolean(this.localData.watchForEvents??0),this.isExternalFilter=Boolean(this.localData.isAnExternalLivewireFilter??0),this.shouldRenderAsHTML=Boolean(this.localData.renderPillsAsHtml??0),this.pillValues=this.localData.pillValues??null,this.$nextTick(()=>{this.isExternalFilter?this.updatePillValues(this.externalFilterPillsVals[this.localFilterKey]):this.updatePillValues(this.pillValues)}),this.isExternalFilter&&this.shouldWatchPillValues&&this.$watch("externalFilterPillsVals."+this.localFilterKey,e=>{this.updatePillValues(e)})}})),Alpine.data("tablesExternalFilter",(e,t)=>({externalFilterKey:t,pillValues:[],optionsAvailable:e.entangle("optionsAvailable"),optionsSelected:e.entangle("optionsSelected").live,selectedItems:e.entangle("selectedItems"),sendValueToPill(e){let t=this.removeHTMLTags(e);this.$dispatch("filterpillupdate",{tableName:this.tableName,filterKey:this.externalFilterKey,pillItem:t})},overridePill(e){let t=this.removeHTMLTags(e);this.$dispatch("filterpillupdate",{tableName:this.tableName,filterKey:this.externalFilterKey,pillItem:t})},syncItems(t){this.pillValues=[],t.forEach(e=>{this.pillValues.push(this.optionsAvailable[e])}),this.pillValues.length>0&&(this.pillValues.sort(),this.syncExternalFilterPillsValues(this.externalFilterKey,this.pillValues)),this.optionsSelected=this.selectedItems,e.set("value",this.selectedItems)},init(){this.selectedItems=this.optionsSelected,this.syncItems(this.selectedItems),this.$watch("selectedItems",e=>this.syncItems(e))}}))}); \ No newline at end of file diff --git a/resources/lang/ar.json b/resources/lang/ar.json deleted file mode 100644 index bb39d9ab5..000000000 --- a/resources/lang/ar.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "الجميع", - "All Columns": "كافة الأعمدة", - "Applied Filters": "المرشحات التطبيقية", - "Applied Sorting": "الفرز التطبيقي", - "Bulk Actions": "إجراءات جملة", - "Clear": "واضح", - "Columns": "الأعمدة", - "Debugging Values": "قيم التصحيح", - "Deselect All": "الغاء تحديد الكل", - "Done Reordering": "تمت إعادة الترتيب", - "Filters": "المرشحات", - "No": "لا", - "No items found. Try to broaden your search.": "لم يتم العثور على العناصر. حاول توسيع نطاق البحث.", - "of": "ل", - "Remove filter option": "إزالة خيار التصفية", - "Remove sort option": "إزالة خيار الفرز", - "Reorder": "إعادة ترتيب", - "results": "نتائج", - "row": "صف", - "rows": "صفوف", - "rows, do you want to select all": "الصفوف ، هل تريد تحديد الكل", - "Search": "يبحث", - "Select All": "اختر الكل", - "Showing": "عرض", - "to": "ل", - "Yes": "نعم", - "You are currently selecting all": "أنت الآن تختار الكل", - "You are not connected to the internet.": "أنت غير متصل بالإنترنت.", - "You have selected": "قمت بتحديدها" -} \ No newline at end of file diff --git a/resources/lang/ca.json b/resources/lang/ca.json deleted file mode 100644 index 7e8eb6691..000000000 --- a/resources/lang/ca.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Tot", - "All Columns": "Totes les columnes", - "Applied Filters": "Filtres Aplicats", - "Applied Sorting": "Ordenació Aplicada", - "Bulk Actions": "Accions Massives", - "Clear": "Esborra", - "Columns": "Columnes", - "Debugging Values": "Valors de depuració", - "Deselect All": "Deselecciona tot", - "Done Reordering": "Reordenació finalitzada", - "Filters": "Filtres", - "No": "No", - "No items found. Try to broaden your search.": "No s'han trobat elements. Intenti ampliar la cerca.", - "of": "de", - "Remove filter option": "Elimina opció de filtre", - "Remove sort option": "Elimina opció d'ordenació", - "Reorder": "Reordena", - "results": "resultats", - "row": "fila", - "rows": "files", - "rows, do you want to select all": "files, vol seleccionar totes", - "to": "a", - "Search": "Cerca", - "Select All": "Selecciona tot", - "Showing": "Mostrant", - "Yes": "Sí", - "You are currently selecting all": "Actualment està seleccionant tot", - "You are not connected to the internet.": "No està conectat a Internet.", - "You have selected": "Ha seleccionat" -} \ No newline at end of file diff --git a/resources/lang/da.json b/resources/lang/da.json deleted file mode 100644 index e90e13ce2..000000000 --- a/resources/lang/da.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Alle", - "All Columns": "Alle kolonner", - "Applied Filters": "Anvendte filtre", - "Applied Sorting": "Anvendt sortering", - "Bulk Actions": "Massehandlinger", - "Clear": "Ryd", - "Columns": "Kolonner", - "Debugging Values": "Debugging-værdier", - "Deselect All": "Fravælg alle", - "Done Reordering": "Færdig med omorganisering", - "Filters": "Filtre", - "No": "Nej", - "No items found. Try to broaden your search.": "Ingen elementer fundet. Prøv at udvide din søgning.", - "of": "af", - "Remove filter option": "Fjern filtermulighed", - "Remove sort option": "Fjern sorteringsmulighed", - "Reorder": "Omorganisér", - "results": "resultater", - "row": "række", - "rows": "rækker", - "rows, do you want to select all": "rækker, vil du vælge alle", - "Search": "Søg", - "Select All": "Vælg alle", - "Showing": "Viser", - "to": "til", - "Yes": "Ja", - "You are currently selecting all": "Du vælger i øjeblikket alle", - "You are not connected to the internet.": "Du er ikke forbundet til internettet.", - "You have selected": "Du har valgt" -} diff --git a/resources/lang/de.json b/resources/lang/de.json deleted file mode 100644 index cc49b1b2a..000000000 --- a/resources/lang/de.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Alle", - "All Columns": "Alle Spalten", - "Applied Filters": "Angewendete Filter", - "Applied Sorting": "Angewendete Sortierung", - "Bulk Actions": "Aktionen", - "Clear": "Zurücksetzen", - "Columns": "Spalten", - "Debugging Values": "Werte debuggen", - "Deselect All": "Alle abwählen", - "Done Reordering": "Sortieren abgeschlossen", - "Filters": "Filter", - "No": "Nein", - "No items found. Try to broaden your search.": "Es gibt keine Ergebnisse/Einträge. Versuche die Suche zu erweitern.", - "of": "von", - "Remove filter option": "Entferne Filterauswahl", - "Remove sort option": "Entferne Sortierauswahl", - "Reorder": "erneut Sortieren", - "results": "Ergebnisse", - "row": "Zeile", - "rows": "Zeilen", - "rows, do you want to select all": "Zeilen, sollen alle ausgewählt werden", - "Search": "Suche", - "Select All": "Alle auswählen", - "Showing": "Anzeigen", - "to": "nach", - "Yes": "Ja", - "You are currently selecting all": "Es sind schon alle ausgewählt", - "You are not connected to the internet.": "Es liegt keine Verbindung zum Internet vor.", - "You have selected": "Es sind ausgewählt" -} \ No newline at end of file diff --git a/resources/lang/en.json b/resources/lang/en.json deleted file mode 100644 index 87b34925e..000000000 --- a/resources/lang/en.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "All": "All", - "All Columns": "All Columns", - "Applied Filters": "Applied Filters", - "Applied Sorting": "Applied Sorting", - "Bulk Actions": "Bulk Actions", - "Bulk Actions Confirm": "Are you sure?", - "Clear": "Clear", - "Columns": "Columns", - "Debugging Values": "Debugging Values", - "Deselect All": "Deselect All", - "Done Reordering": "Done Reordering", - "Filters": "Filters", - "No": "No", - "No items found. Try to broaden your search.": "No items found. Try to broaden your search.", - "of": "of", - "Remove filter option": "Remove filter option", - "Remove sort option": "Remove sort option", - "Reorder": "Reorder", - "results": "results", - "row": "row", - "rows": "rows", - "rows, do you want to select all": "rows, do you want to select all", - "Search": "Search", - "Select All": "Select All", - "Select All On Page": "Select All On Page", - "Showing": "Showing", - "to": "to", - "Yes": "Yes", - "You are currently selecting all": "You are currently selecting all", - "You are not connected to the internet.": "You are not connected to the internet.", - "You have selected": "You have selected" -} diff --git a/resources/lang/es.json b/resources/lang/es.json deleted file mode 100644 index a337cb094..000000000 --- a/resources/lang/es.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "All": "Todo", - "All Columns": "Todas las columnas", - "Applied Filters": "Filtros Aplicados", - "Applied Sorting": "Ordenamiento Aplicado", - "Bulk Actions": "Acciones Masivas", - "Clear": "Borrar", - "Columns": "Columnas", - "Debugging Values": "Valores de depuración", - "Deselect All": "Deseleccionar todo", - "Done Reordering": "Reordenación finalizada", - "Filters": "Filtros", - "No": "No", - "No items found. Try to broaden your search.": "No se encontraron elementos. Intente ampliar la búsqueda.", - "of": "de", - "Remove filter option": "Remover opción de filtro", - "Remove sort option": "Remover opción de ordenamineto", - "Reorder": "Reordenar", - "results": "resultados", - "row": "fila", - "rows": "filas", - "rows, do you want to select all": "filas, desea seleccionar todas", - "Search": "Buscar", - "Select All": "Seleccionar todo", - "Select All On Page": "Seleccionar todo en la página", - "Showing": "Mostrando", - "to": "a", - "Yes": "Sí", - "You are currently selecting all": "Actualmente está seleccionando todo", - "You are not connected to the internet.": "No está conectado a Internet.", - "You have selected": "Ha seleccionado" -} \ No newline at end of file diff --git a/resources/lang/fr.json b/resources/lang/fr.json deleted file mode 100644 index b6f21093b..000000000 --- a/resources/lang/fr.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Tous", - "All Columns": "Toutes les colonnes", - "Applied Filters": "Filtres appliqués", - "Applied Sorting": "Tris appliqués", - "Bulk Actions": "Actions en masse", - "Clear": "Effacer", - "Columns": "Colonnes", - "Debugging Values": "Valeurs de débogage", - "Deselect All": "Tout désélectionner ", - "Done Reordering": "Réordonnancement terminé", - "Filters": "Filtres", - "No": "Non", - "No items found. Try to broaden your search.": "Aucun élément trouvé. Essayez d'élargir votre recherche.", - "of": "sur", - "Remove filter option": "Supprimer l'option de filtrage", - "Remove sort option": "Supprimer l'option de tri", - "Reorder": "Réordonner", - "results": "résultats", - "row": "ligne", - "rows": "lignes", - "rows, do you want to select all": "lignes, voulez-vous tout sélectionner ?", - "Search": "Rechercher", - "Select All": "Tout sélectionner", - "Showing": "Montrant", - "to": "à", - "Yes": "Oui", - "You are currently selecting all": "Vous êtes en train de sélectionner ", - "You are not connected to the internet.": "Vous n'êtes pas connecté à l'Internet.", - "You have selected": "Vous avez sélectionné" -} \ No newline at end of file diff --git a/resources/lang/id.json b/resources/lang/id.json deleted file mode 100644 index 3ba72de81..000000000 --- a/resources/lang/id.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Semua", - "All Columns": "Semua Kolom", - "Applied Filters": "Filter Diterapkan", - "Applied Sorting": "Penyortiran Diterapkan", - "Bulk Actions": "Aksi", - "Clear": "Bersihkan", - "Columns": "Kolom", - "Debugging Values": "Nilai Debug", - "Deselect All": "Batalkan Semua Pilihan", - "Done Reordering": "Selesai Mengurutkan Ulang", - "Filters": "Filter", - "No": "Tidak", - "No items found. Try to broaden your search.": "Tidak ada data yang ditemukan. Cobalah untuk memperluas pencarian Anda.", - "of": "dari", - "Remove filter option": "Hapus opsi filter", - "Remove sort option": "Hapus opsi pengurutan", - "Reorder": "Urutkan ulang", - "results": "hasil", - "row": "baris", - "rows": "baris", - "rows, do you want to select all": "baris, apakah Anda ingin memilih semua?", - "Search": "Cari", - "Select All": "Pilih Semua", - "Showing": "Menampilkan", - "to": "ke", - "Yes": "Ya", - "You are currently selecting all": "Anda sedang memilih semua", - "You are not connected to the internet.": "Anda sedang tidak terhubung ke internet.", - "You have selected": "Anda telah memilih" -} \ No newline at end of file diff --git a/resources/lang/it.json b/resources/lang/it.json deleted file mode 100644 index 4cb15d436..000000000 --- a/resources/lang/it.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Tutti", - "All Columns": "Tutte le colonne", - "Applied Filters": "Filtri Applicati", - "Applied Sorting": "Ordinamento Applicato", - "Bulk Actions": "Azioni di Gruppo", - "Clear": "Pulisci", - "Columns": "Colonne", - "Debugging Values": "Valori di debug", - "Deselect All": "Deseleziona tutto", - "Done Reordering": "Ordinamento Terminato", - "Filters": "Filtri", - "No": "No", - "No items found. Try to broaden your search.": "Nessun risultato trovato. Prova ad ampliare la tua ricerca.", - "of": "di", - "Remove filter option": "Rimuovi filtro", - "Remove sort option": "Rimuovi ordinamento", - "Reorder": "Riordina", - "results": "risultati", - "row": "righe", - "rows": "righe", - "rows, do you want to select all": "righe, vuoi selezionarle tutte", - "Search": "Cerca", - "Select All": "Seleziona Tutto", - "Showing": "Visualizzati", - "to": "a", - "Yes": "SÌ", - "You are currently selecting all": "Stai selezionando tutto", - "You are not connected to the internet.": "Non sei connesso a internet", - "You have selected": "Hai selezionato" -} \ No newline at end of file diff --git a/resources/lang/json/ar.json b/resources/lang/json/ar.json new file mode 100644 index 000000000..8ed603244 --- /dev/null +++ b/resources/lang/json/ar.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "الجميع", + "livewire-tables::All Columns": "كافة الأعمدة", + "livewire-tables::Applied Filters": "المرشحات التطبيقية", + "livewire-tables::Applied Sorting": "الفرز التطبيقي", + "livewire-tables::Bulk Actions": "إجراءات جملة", + "livewire-tables::Clear": "واضح", + "livewire-tables::Columns": "الأعمدة", + "livewire-tables::Debugging Values": "قيم التصحيح", + "livewire-tables::Deselect All": "الغاء تحديد الكل", + "livewire-tables::Done Reordering": "تمت إعادة الترتيب", + "livewire-tables::Filters": "المرشحات", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "لا", + "livewire-tables::No items found. Try to broaden your search.": "لم يتم العثور على العناصر. حاول توسيع نطاق البحث.", + "livewire-tables::of": "ل", + "livewire-tables::Remove filter option": "إزالة خيار التصفية", + "livewire-tables::Remove sort option": "إزالة خيار الفرز", + "livewire-tables::Reorder": "إعادة ترتيب", + "livewire-tables::results": "نتائج", + "livewire-tables::row": "صف", + "livewire-tables::rows": "صفوف", + "livewire-tables::rows, do you want to select all": "الصفوف ، هل تريد تحديد الكل", + "livewire-tables::Search": "يبحث", + "livewire-tables::Select All": "اختر الكل", + "livewire-tables::Showing": "عرض", + "livewire-tables::to": "ل", + "livewire-tables::Yes": "نعم", + "livewire-tables::You are currently selecting all": "أنت الآن تختار الكل", + "livewire-tables::You are not connected to the internet.": "أنت غير متصل بالإنترنت.", + "livewire-tables::You have selected": "قمت بتحديدها", + "All": "الجميع", + "All Columns": "كافة الأعمدة", + "Applied Filters": "المرشحات التطبيقية", + "Applied Sorting": "الفرز التطبيقي", + "Bulk Actions": "إجراءات جملة", + "Clear": "واضح", + "Columns": "الأعمدة", + "Debugging Values": "قيم التصحيح", + "Deselect All": "الغاء تحديد الكل", + "Done Reordering": "تمت إعادة الترتيب", + "Filters": "المرشحات", + "not_applicable": "N/A", + "No": "لا", + "No items found. Try to broaden your search.": "لم يتم العثور على العناصر. حاول توسيع نطاق البحث.", + "of": "ل", + "Remove filter option": "إزالة خيار التصفية", + "Remove sort option": "إزالة خيار الفرز", + "Reorder": "إعادة ترتيب", + "results": "نتائج", + "row": "صف", + "rows": "صفوف", + "rows, do you want to select all": "الصفوف ، هل تريد تحديد الكل", + "Search": "يبحث", + "Select All": "اختر الكل", + "Showing": "عرض", + "to": "ل", + "Yes": "نعم", + "You are currently selecting all": "أنت الآن تختار الكل", + "You are not connected to the internet.": "أنت غير متصل بالإنترنت.", + "You have selected": "قمت بتحديدها" +} \ No newline at end of file diff --git a/resources/lang/json/ca.json b/resources/lang/json/ca.json new file mode 100644 index 000000000..532ff38b3 --- /dev/null +++ b/resources/lang/json/ca.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Tot", + "livewire-tables::All Columns": "Totes les columnes", + "livewire-tables::Applied Filters": "Filtres Aplicats", + "livewire-tables::Applied Sorting": "Ordenació Aplicada", + "livewire-tables::Bulk Actions": "Accions Massives", + "livewire-tables::Clear": "Esborra", + "livewire-tables::Columns": "Columnes", + "livewire-tables::Debugging Values": "Valors de depuració", + "livewire-tables::Deselect All": "Deselecciona tot", + "livewire-tables::Done Reordering": "Reordenació finalitzada", + "livewire-tables::Filters": "Filtres", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "No", + "livewire-tables::No items found. Try to broaden your search.": "No s'han trobat elements. Intenti ampliar la cerca.", + "livewire-tables::of": "de", + "livewire-tables::Remove filter option": "Elimina opció de filtre", + "livewire-tables::Remove sort option": "Elimina opció d'ordenació", + "livewire-tables::Reorder": "Reordena", + "livewire-tables::results": "resultats", + "livewire-tables::row": "fila", + "livewire-tables::rows": "files", + "livewire-tables::rows, do you want to select all": "files, vol seleccionar totes", + "livewire-tables::to": "a", + "livewire-tables::Search": "Cerca", + "livewire-tables::Select All": "Selecciona tot", + "livewire-tables::Showing": "Mostrant", + "livewire-tables::Yes": "Sí", + "livewire-tables::You are currently selecting all": "Actualment està seleccionant tot", + "livewire-tables::You are not connected to the internet.": "No està conectat a Internet.", + "livewire-tables::You have selected": "Ha seleccionat", + "All": "Tot", + "All Columns": "Totes les columnes", + "Applied Filters": "Filtres Aplicats", + "Applied Sorting": "Ordenació Aplicada", + "Bulk Actions": "Accions Massives", + "Clear": "Esborra", + "Columns": "Columnes", + "Debugging Values": "Valors de depuració", + "Deselect All": "Deselecciona tot", + "Done Reordering": "Reordenació finalitzada", + "Filters": "Filtres", + "not_applicable": "N/A", + "No": "No", + "No items found. Try to broaden your search.": "No s'han trobat elements. Intenti ampliar la cerca.", + "of": "de", + "Remove filter option": "Elimina opció de filtre", + "Remove sort option": "Elimina opció d'ordenació", + "Reorder": "Reordena", + "results": "resultats", + "row": "fila", + "rows": "files", + "rows, do you want to select all": "files, vol seleccionar totes", + "to": "a", + "Search": "Cerca", + "Select All": "Selecciona tot", + "Showing": "Mostrant", + "Yes": "Sí", + "You are currently selecting all": "Actualment està seleccionant tot", + "You are not connected to the internet.": "No està conectat a Internet.", + "You have selected": "Ha seleccionat" +} \ No newline at end of file diff --git a/resources/lang/json/da.json b/resources/lang/json/da.json new file mode 100644 index 000000000..0ce769f43 --- /dev/null +++ b/resources/lang/json/da.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Alle", + "livewire-tables::All Columns": "Alle kolonner", + "livewire-tables::Applied Filters": "Anvendte filtre", + "livewire-tables::Applied Sorting": "Anvendt sortering", + "livewire-tables::Bulk Actions": "Massehandlinger", + "livewire-tables::Clear": "Ryd", + "livewire-tables::Columns": "Kolonner", + "livewire-tables::Debugging Values": "Debugging-værdier", + "livewire-tables::Deselect All": "Fravælg alle", + "livewire-tables::Done Reordering": "Færdig med omorganisering", + "livewire-tables::Filters": "Filtre", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Nej", + "livewire-tables::No items found. Try to broaden your search.": "Ingen elementer fundet. Prøv at udvide din søgning.", + "livewire-tables::of": "af", + "livewire-tables::Remove filter option": "Fjern filtermulighed", + "livewire-tables::Remove sort option": "Fjern sorteringsmulighed", + "livewire-tables::Reorder": "Omorganisér", + "livewire-tables::results": "resultater", + "livewire-tables::row": "række", + "livewire-tables::rows": "rækker", + "livewire-tables::rows, do you want to select all": "rækker, vil du vælge alle", + "livewire-tables::Search": "Søg", + "livewire-tables::Select All": "Vælg alle", + "livewire-tables::Showing": "Viser", + "livewire-tables::to": "til", + "livewire-tables::Yes": "Ja", + "livewire-tables::You are currently selecting all": "Du vælger i øjeblikket alle", + "livewire-tables::You are not connected to the internet.": "Du er ikke forbundet til internettet.", + "livewire-tables::You have selected": "Du har valgt", + "All": "Alle", + "All Columns": "Alle kolonner", + "Applied Filters": "Anvendte filtre", + "Applied Sorting": "Anvendt sortering", + "Bulk Actions": "Massehandlinger", + "Clear": "Ryd", + "Columns": "Kolonner", + "Debugging Values": "Debugging-værdier", + "Deselect All": "Fravælg alle", + "Done Reordering": "Færdig med omorganisering", + "Filters": "Filtre", + "not_applicable": "N/A", + "No": "Nej", + "No items found. Try to broaden your search.": "Ingen elementer fundet. Prøv at udvide din søgning.", + "of": "af", + "Remove filter option": "Fjern filtermulighed", + "Remove sort option": "Fjern sorteringsmulighed", + "Reorder": "Omorganisér", + "results": "resultater", + "row": "række", + "rows": "rækker", + "rows, do you want to select all": "rækker, vil du vælge alle", + "Search": "Søg", + "Select All": "Vælg alle", + "Showing": "Viser", + "to": "til", + "Yes": "Ja", + "You are currently selecting all": "Du vælger i øjeblikket alle", + "You are not connected to the internet.": "Du er ikke forbundet til internettet.", + "You have selected": "Du har valgt" +} diff --git a/resources/lang/json/de.json b/resources/lang/json/de.json new file mode 100644 index 000000000..2ddfa94cc --- /dev/null +++ b/resources/lang/json/de.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Alle", + "livewire-tables::All Columns": "Alle Spalten", + "livewire-tables::Applied Filters": "Angewendete Filter", + "livewire-tables::Applied Sorting": "Angewendete Sortierung", + "livewire-tables::Bulk Actions": "Aktionen", + "livewire-tables::Clear": "Zurücksetzen", + "livewire-tables::Columns": "Spalten", + "livewire-tables::Debugging Values": "Werte debuggen", + "livewire-tables::Deselect All": "Alle abwählen", + "livewire-tables::Done Reordering": "Sortieren abgeschlossen", + "livewire-tables::Filters": "Filter", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Nein", + "livewire-tables::No items found. Try to broaden your search.": "Es gibt keine Ergebnisse/Einträge. Versuche die Suche zu erweitern.", + "livewire-tables::of": "von", + "livewire-tables::Remove filter option": "Entferne Filterauswahl", + "livewire-tables::Remove sort option": "Entferne Sortierauswahl", + "livewire-tables::Reorder": "erneut Sortieren", + "livewire-tables::results": "Ergebnisse", + "livewire-tables::row": "Zeile", + "livewire-tables::rows": "Zeilen", + "livewire-tables::rows, do you want to select all": "Zeilen, sollen alle ausgewählt werden", + "livewire-tables::Search": "Suche", + "livewire-tables::Select All": "Alle auswählen", + "livewire-tables::Showing": "Anzeigen", + "livewire-tables::to": "nach", + "livewire-tables::Yes": "Ja", + "livewire-tables::You are currently selecting all": "Es sind schon alle ausgewählt", + "livewire-tables::You are not connected to the internet.": "Es liegt keine Verbindung zum Internet vor.", + "livewire-tables::You have selected": "Es sind ausgewählt", + "All": "Alle", + "All Columns": "Alle Spalten", + "Applied Filters": "Angewendete Filter", + "Applied Sorting": "Angewendete Sortierung", + "Bulk Actions": "Aktionen", + "Clear": "Zurücksetzen", + "Columns": "Spalten", + "Debugging Values": "Werte debuggen", + "Deselect All": "Alle abwählen", + "Done Reordering": "Sortieren abgeschlossen", + "Filters": "Filter", + "not_applicable": "N/A", + "No": "Nein", + "No items found. Try to broaden your search.": "Es gibt keine Ergebnisse/Einträge. Versuche die Suche zu erweitern.", + "of": "von", + "Remove filter option": "Entferne Filterauswahl", + "Remove sort option": "Entferne Sortierauswahl", + "Reorder": "erneut Sortieren", + "results": "Ergebnisse", + "row": "Zeile", + "rows": "Zeilen", + "rows, do you want to select all": "Zeilen, sollen alle ausgewählt werden", + "Search": "Suche", + "Select All": "Alle auswählen", + "Showing": "Anzeigen", + "to": "nach", + "Yes": "Ja", + "You are currently selecting all": "Es sind schon alle ausgewählt", + "You are not connected to the internet.": "Es liegt keine Verbindung zum Internet vor.", + "You have selected": "Es sind ausgewählt" +} \ No newline at end of file diff --git a/resources/lang/json/en.json b/resources/lang/json/en.json new file mode 100644 index 000000000..1579cbbe2 --- /dev/null +++ b/resources/lang/json/en.json @@ -0,0 +1,72 @@ +{ + "livewire-tables::All": "All", + "livewire-tables::All Columns": "All Columns", + "livewire-tables::Applied Filters": "Applied Filters", + "livewire-tables::Applied Sorting": "Applied Sorting", + "livewire-tables::Bulk Actions": "Bulk Actions", + "livewire-tables::Bulk Actions Confirm": "Are you sure?", + "livewire-tables::Clear": "Clear", + "livewire-tables::Columns": "Columns", + "livewire-tables::Debugging Values": "Debugging Values", + "livewire-tables::Deselect All": "Deselect All", + "livewire-tables::Done Reordering": "Done Reordering", + "livewire-tables::Filters": "Filters", + "livewire-tables::loading": "Loading", + "livewire-tables::max": "Max", + "livewire-tables::min": "Min", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "No", + "livewire-tables::No items found. Try to broaden your search.": "No items found. Try to broaden your search.", + "livewire-tables::of": "of", + "livewire-tables::Remove filter option": "Remove filter option", + "livewire-tables::Remove sort option": "Remove sort option", + "livewire-tables::Reorder": "Reorder", + "livewire-tables::results": "results", + "livewire-tables::row": "row", + "livewire-tables::rows": "rows", + "livewire-tables::rows, do you want to select all": "rows, do you want to select all", + "livewire-tables::Search": "Search", + "livewire-tables::Select All": "Select All", + "livewire-tables::Select All On Page": "Select All On Page", + "livewire-tables::Showing": "Showing", + "livewire-tables::to": "to", + "livewire-tables::Yes": "Yes", + "livewire-tables::You are currently selecting all": "You are currently selecting all", + "livewire-tables::You are not connected to the internet.": "You are not connected to the internet.", + "livewire-tables::You have selected": "You have selected", + "All": "All", + "All Columns": "All Columns", + "Applied Filters": "Applied Filters", + "Applied Sorting": "Applied Sorting", + "Bulk Actions": "Bulk Actions", + "Bulk Actions Confirm": "Are you sure?", + "Clear": "Clear", + "Columns": "Columns", + "Debugging Values": "Debugging Values", + "Deselect All": "Deselect All", + "Done Reordering": "Done Reordering", + "Filters": "Filters", + "loading": "Loading", + "max": "Max", + "min": "Min", + "not_applicable": "N/A", + "No": "No", + "No items found. Try to broaden your search.": "No items found. Try to broaden your search.", + "of": "of", + "Remove filter option": "Remove filter option", + "Remove sort option": "Remove sort option", + "Reorder": "Reorder", + "results": "results", + "row": "row", + "rows": "rows", + "rows, do you want to select all": "rows, do you want to select all", + "Search": "Search", + "Select All": "Select All", + "Select All On Page": "Select All On Page", + "Showing": "Showing", + "to": "to", + "Yes": "Yes", + "You are currently selecting all": "You are currently selecting all", + "You are not connected to the internet.": "You are not connected to the internet.", + "You have selected": "You have selected" +} diff --git a/resources/lang/json/es.json b/resources/lang/json/es.json new file mode 100644 index 000000000..b03b2e25f --- /dev/null +++ b/resources/lang/json/es.json @@ -0,0 +1,64 @@ +{ + "livewire-tables::All": "Todo", + "livewire-tables::All Columns": "Todas las columnas", + "livewire-tables::Applied Filters": "Filtros Aplicados", + "livewire-tables::Applied Sorting": "Ordenamiento Aplicado", + "livewire-tables::Bulk Actions": "Acciones Masivas", + "livewire-tables::Clear": "Borrar", + "livewire-tables::Columns": "Columnas", + "livewire-tables::Debugging Values": "Valores de depuración", + "livewire-tables::Deselect All": "Deseleccionar todo", + "livewire-tables::Done Reordering": "Reordenación finalizada", + "livewire-tables::Filters": "Filtros", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "No", + "livewire-tables::No items found. Try to broaden your search.": "No se encontraron elementos. Intente ampliar la búsqueda.", + "livewire-tables::of": "de", + "livewire-tables::Remove filter option": "Remover opción de filtro", + "livewire-tables::Remove sort option": "Remover opción de ordenamineto", + "livewire-tables::Reorder": "Reordenar", + "livewire-tables::results": "resultados", + "livewire-tables::row": "fila", + "livewire-tables::rows": "filas", + "livewire-tables::rows, do you want to select all": "filas, desea seleccionar todas", + "livewire-tables::Search": "Buscar", + "livewire-tables::Select All": "Seleccionar todo", + "livewire-tables::Select All On Page": "Seleccionar todo en la página", + "livewire-tables::Showing": "Mostrando", + "livewire-tables::to": "a", + "livewire-tables::Yes": "Sí", + "livewire-tables::You are currently selecting all": "Actualmente está seleccionando todo", + "livewire-tables::You are not connected to the internet.": "No está conectado a Internet.", + "livewire-tables::You have selected": "Ha seleccionado", + "All": "Todo", + "All Columns": "Todas las columnas", + "Applied Filters": "Filtros Aplicados", + "Applied Sorting": "Ordenamiento Aplicado", + "Bulk Actions": "Acciones Masivas", + "Clear": "Borrar", + "Columns": "Columnas", + "Debugging Values": "Valores de depuración", + "Deselect All": "Deseleccionar todo", + "Done Reordering": "Reordenación finalizada", + "Filters": "Filtros", + "not_applicable": "N/A", + "No": "No", + "No items found. Try to broaden your search.": "No se encontraron elementos. Intente ampliar la búsqueda.", + "of": "de", + "Remove filter option": "Remover opción de filtro", + "Remove sort option": "Remover opción de ordenamineto", + "Reorder": "Reordenar", + "results": "resultados", + "row": "fila", + "rows": "filas", + "rows, do you want to select all": "filas, desea seleccionar todas", + "Search": "Buscar", + "Select All": "Seleccionar todo", + "Select All On Page": "Seleccionar todo en la página", + "Showing": "Mostrando", + "to": "a", + "Yes": "Sí", + "You are currently selecting all": "Actualmente está seleccionando todo", + "You are not connected to the internet.": "No está conectado a Internet.", + "You have selected": "Ha seleccionado" +} \ No newline at end of file diff --git a/resources/lang/json/fa.json b/resources/lang/json/fa.json new file mode 100644 index 000000000..7bcf32940 --- /dev/null +++ b/resources/lang/json/fa.json @@ -0,0 +1,72 @@ +{ + "livewire-tables::All": "همه", + "livewire-tables::All Columns": "تمام ستون‌ها", + "livewire-tables::Applied Filters": "فیلترهای اعمال‌شده", + "livewire-tables::Applied Sorting": "مرتب‌سازی اعمال‌شده", + "livewire-tables::Bulk Actions": "اقدامات گروهی", + "livewire-tables::Bulk Actions Confirm": "آیا مطمئن هستید؟", + "livewire-tables::Clear": "پاک کردن", + "livewire-tables::Columns": "ستون‌ها", + "livewire-tables::Debugging Values": "مقادیر اشکال‌زدایی", + "livewire-tables::Deselect All": "لغو انتخاب همه", + "livewire-tables::Done Reordering": "مرتب‌سازی تمام شد", + "livewire-tables::Filters": "فیلترها", + "livewire-tables::loading": "در حال بارگذاری", + "livewire-tables::max": "حداکثر", + "livewire-tables::min": "حداقل", + "livewire-tables::not_applicable": "نامعتبر", + "livewire-tables::No": "خیر", + "livewire-tables::No items found. Try to broaden your search.": "موردی یافت نشد. جستجوی خود را گسترش دهید.", + "livewire-tables::of": "از", + "livewire-tables::Remove filter option": "حذف گزینه فیلتر", + "livewire-tables::Remove sort option": "حذف گزینه مرتب‌سازی", + "livewire-tables::Reorder": "دوباره مرتب کنید", + "livewire-tables::results": "نتایج", + "livewire-tables::row": "ردیف", + "livewire-tables::rows": "ردیف‌ها", + "livewire-tables::rows, do you want to select all": "ردیف‌ها، آیا می‌خواهید همه را انتخاب کنید", + "livewire-tables::Search": "جستجو", + "livewire-tables::Select All": "انتخاب همه", + "livewire-tables::Select All On Page": "انتخاب همه در صفحه", + "livewire-tables::Showing": "در حال نمایش", + "livewire-tables::to": "تا", + "livewire-tables::Yes": "بله", + "livewire-tables::You are currently selecting all": "شما در حال حاضر همه را انتخاب کرده‌اید", + "livewire-tables::You are not connected to the internet.": "شما به اینترنت متصل نیستید.", + "livewire-tables::You have selected": "شما انتخاب کرده‌اید", + "All": "همه", + "All Columns": "تمام ستون‌ها", + "Applied Filters": "فیلترهای اعمال‌شده", + "Applied Sorting": "مرتب‌سازی اعمال‌شده", + "Bulk Actions": "اقدامات گروهی", + "Bulk Actions Confirm": "آیا مطمئن هستید؟", + "Clear": "پاک کردن", + "Columns": "ستون‌ها", + "Debugging Values": "مقادیر اشکال‌زدایی", + "Deselect All": "لغو انتخاب همه", + "Done Reordering": "مرتب‌سازی تمام شد", + "Filters": "فیلترها", + "loading": "در حال بارگذاری", + "max": "حداکثر", + "min": "حداقل", + "not_applicable": "نامعتبر", + "No": "خیر", + "No items found. Try to broaden your search.": "موردی یافت نشد. جستجوی خود را گسترش دهید.", + "of": "از", + "Remove filter option": "حذف گزینه فیلتر", + "Remove sort option": "حذف گزینه مرتب‌سازی", + "Reorder": "دوباره مرتب کنید", + "results": "نتایج", + "row": "ردیف", + "rows": "ردیف‌ها", + "rows, do you want to select all": "ردیف‌ها، آیا می‌خواهید همه را انتخاب کنید", + "Search": "جستجو", + "Select All": "انتخاب همه", + "Select All On Page": "انتخاب همه در صفحه", + "Showing": "در حال نمایش", + "to": "تا", + "Yes": "بله", + "You are currently selecting all": "شما در حال حاضر همه را انتخاب کرده‌اید", + "You are not connected to the internet.": "شما به اینترنت متصل نیستید.", + "You have selected": "شما انتخاب کرده‌اید" +} \ No newline at end of file diff --git a/resources/lang/json/fr.json b/resources/lang/json/fr.json new file mode 100644 index 000000000..89323dc4a --- /dev/null +++ b/resources/lang/json/fr.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Tous", + "livewire-tables::All Columns": "Toutes les colonnes", + "livewire-tables::Applied Filters": "Filtres appliqués", + "livewire-tables::Applied Sorting": "Tris appliqués", + "livewire-tables::Bulk Actions": "Actions en masse", + "livewire-tables::Clear": "Effacer", + "livewire-tables::Columns": "Colonnes", + "livewire-tables::Debugging Values": "Valeurs de débogage", + "livewire-tables::Deselect All": "Tout désélectionner ", + "livewire-tables::Done Reordering": "Réordonnancement terminé", + "livewire-tables::Filters": "Filtres", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Non", + "livewire-tables::No items found. Try to broaden your search.": "Aucun élément trouvé. Essayez d'élargir votre recherche.", + "livewire-tables::of": "sur", + "livewire-tables::Remove filter option": "Supprimer l'option de filtrage", + "livewire-tables::Remove sort option": "Supprimer l'option de tri", + "livewire-tables::Reorder": "Réordonner", + "livewire-tables::results": "résultats", + "livewire-tables::row": "ligne", + "livewire-tables::rows": "lignes", + "livewire-tables::rows, do you want to select all": "lignes, voulez-vous tout sélectionner ?", + "livewire-tables::Search": "Rechercher", + "livewire-tables::Select All": "Tout sélectionner", + "livewire-tables::Showing": "Montrant", + "livewire-tables::to": "à", + "livewire-tables::Yes": "Oui", + "livewire-tables::You are currently selecting all": "Vous êtes en train de sélectionner ", + "livewire-tables::You are not connected to the internet.": "Vous n'êtes pas connecté à l'Internet.", + "livewire-tables::You have selected": "Vous avez sélectionné", + "All": "Tous", + "All Columns": "Toutes les colonnes", + "Applied Filters": "Filtres appliqués", + "Applied Sorting": "Tris appliqués", + "Bulk Actions": "Actions en masse", + "Clear": "Effacer", + "Columns": "Colonnes", + "Debugging Values": "Valeurs de débogage", + "Deselect All": "Tout désélectionner ", + "Done Reordering": "Réordonnancement terminé", + "Filters": "Filtres", + "not_applicable": "N/A", + "No": "Non", + "No items found. Try to broaden your search.": "Aucun élément trouvé. Essayez d'élargir votre recherche.", + "of": "sur", + "Remove filter option": "Supprimer l'option de filtrage", + "Remove sort option": "Supprimer l'option de tri", + "Reorder": "Réordonner", + "results": "résultats", + "row": "ligne", + "rows": "lignes", + "rows, do you want to select all": "lignes, voulez-vous tout sélectionner ?", + "Search": "Rechercher", + "Select All": "Tout sélectionner", + "Showing": "Montrant", + "to": "à", + "Yes": "Oui", + "You are currently selecting all": "Vous êtes en train de sélectionner ", + "You are not connected to the internet.": "Vous n'êtes pas connecté à l'Internet.", + "You have selected": "Vous avez sélectionné" +} \ No newline at end of file diff --git a/resources/lang/json/id.json b/resources/lang/json/id.json new file mode 100644 index 000000000..06a9f38cf --- /dev/null +++ b/resources/lang/json/id.json @@ -0,0 +1,63 @@ +{ + "livewire-tables::All": "Semua", + "livewire-tables::All Columns": "Semua Kolom", + "livewire-tables::Applied Filters": "Filter Diterapkan", + "livewire-tables::Applied Sorting": "Penyortiran Diterapkan", + "livewire-tables::Bulk Actions": "Aksi", + "livewire-tables::Clear": "Bersihkan", + "livewire-tables::Columns": "Kolom", + "livewire-tables::Debugging Values": "Nilai Debug", + "livewire-tables::Deselect All": "Batalkan Semua Pilihan", + "livewire-tables::Done Reordering": "Selesai Mengurutkan Ulang", + "livewire-tables::Filters": "Filter", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Tidak", + "livewire-tables::No items found. Try to broaden your search.": "Tidak ada data yang ditemukan. Cobalah untuk memperluas pencarian Anda.", + "livewire-tables::of": "dari", + "livewire-tables::Remove filter option": "Hapus opsi filter", + "livewire-tables::Remove sort option": "Hapus opsi pengurutan", + "livewire-tables::Reorder": "Urutkan ulang", + "livewire-tables::results": "hasil", + "livewire-tables::row": "baris", + "livewire-tables::rows": "baris", + "livewire-tables::rows, do you want to select all": "baris, apakah Anda ingin memilih semua?", + "livewire-tables::Search": "Cari", + "livewire-tables::Select All": "Pilih Semua", + "livewire-tables::Showing": "Menampilkan", + "livewire-tables::to": "ke", + "livewire-tables::Yes": "Ya", + "livewire-tables::You are currently selecting all": "Anda sedang memilih semua", + "livewire-tables::You are not connected to the internet.": "Anda sedang tidak terhubung ke internet.", + "livewire-tables::You have selected": "Anda telah memilih", + "All": "Semua", + "All Columns": "Semua Kolom", + "Applied Filters": "Filter Diterapkan", + "Applied Sorting": "Penyortiran Diterapkan", + "Bulk Actions": "Aksi", + "Clear": "Bersihkan", + "Columns": "Kolom", + "Debugging Values": "Nilai Debug", + "Deselect All": "Batalkan Semua Pilihan", + "Done Reordering": "Selesai Mengurutkan Ulang", + "Filters": "Filter", + "not_applicable": "N/A", + "No": "Tidak", + "No items found. Try to broaden your search.": "Tidak ada data yang ditemukan. Cobalah untuk memperluas pencarian Anda.", + "of": "dari", + "Remove filter option": "Hapus opsi filter", + "Remove sort option": "Hapus opsi pengurutan", + "Reorder": "Urutkan ulang", + "results": "hasil", + "row": "baris", + "rows": "baris", + "rows, do you want to select all": "baris, apakah Anda ingin memilih semua?", + "Search": "Cari", + "Select All": "Pilih Semua", + "Showing": "Menampilkan", + "to": "ke", + "Yes": "Ya", + "You are currently selecting all": "Anda sedang memilih semua", + "You are not connected to the internet.": "Anda sedang tidak terhubung ke internet.", + "You have selected": "Anda telah memilih" + +} \ No newline at end of file diff --git a/resources/lang/json/it.json b/resources/lang/json/it.json new file mode 100644 index 000000000..a1c50fb21 --- /dev/null +++ b/resources/lang/json/it.json @@ -0,0 +1,63 @@ +{ + "livewire-tables::All": "Tutti", + "livewire-tables::All Columns": "Tutte le colonne", + "livewire-tables::Applied Filters": "Filtri Applicati", + "livewire-tables::Applied Sorting": "Ordinamento Applicato", + "livewire-tables::Bulk Actions": "Azioni di Gruppo", + "livewire-tables::Clear": "Pulisci", + "livewire-tables::Columns": "Colonne", + "livewire-tables::Debugging Values": "Valori di debug", + "livewire-tables::Deselect All": "Deseleziona tutto", + "livewire-tables::Done Reordering": "Ordinamento Terminato", + "livewire-tables::Filters": "Filtri", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "No", + "livewire-tables::No items found. Try to broaden your search.": "Nessun risultato trovato. Prova ad ampliare la tua ricerca.", + "livewire-tables::of": "di", + "livewire-tables::Remove filter option": "Rimuovi filtro", + "livewire-tables::Remove sort option": "Rimuovi ordinamento", + "livewire-tables::Reorder": "Riordina", + "livewire-tables::results": "risultati", + "livewire-tables::row": "righe", + "livewire-tables::rows": "righe", + "livewire-tables::rows, do you want to select all": "righe, vuoi selezionarle tutte", + "livewire-tables::Search": "Cerca", + "livewire-tables::Select All": "Seleziona Tutto", + "livewire-tables::Showing": "Visualizzati", + "livewire-tables::to": "a", + "livewire-tables::Yes": "SÌ", + "livewire-tables::You are currently selecting all": "Stai selezionando tutto", + "livewire-tables::You are not connected to the internet.": "Non sei connesso a internet", + "livewire-tables::You have selected": "Hai selezionato", + "All": "Tutti", + "All Columns": "Tutte le colonne", + "Applied Filters": "Filtri Applicati", + "Applied Sorting": "Ordinamento Applicato", + "Bulk Actions": "Azioni di Gruppo", + "Clear": "Pulisci", + "Columns": "Colonne", + "Debugging Values": "Valori di debug", + "Deselect All": "Deseleziona tutto", + "Done Reordering": "Ordinamento Terminato", + "Filters": "Filtri", + "not_applicable": "N/A", + "No": "No", + "No items found. Try to broaden your search.": "Nessun risultato trovato. Prova ad ampliare la tua ricerca.", + "of": "di", + "Remove filter option": "Rimuovi filtro", + "Remove sort option": "Rimuovi ordinamento", + "Reorder": "Riordina", + "results": "risultati", + "row": "righe", + "rows": "righe", + "rows, do you want to select all": "righe, vuoi selezionarle tutte", + "Search": "Cerca", + "Select All": "Seleziona Tutto", + "Showing": "Visualizzati", + "to": "a", + "Yes": "SÌ", + "You are currently selecting all": "Stai selezionando tutto", + "You are not connected to the internet.": "Non sei connesso a internet", + "You have selected": "Hai selezionato" + +} \ No newline at end of file diff --git a/resources/lang/json/ms.json b/resources/lang/json/ms.json new file mode 100644 index 000000000..e7e725fa7 --- /dev/null +++ b/resources/lang/json/ms.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Semua", + "livewire-tables::All Columns": "Semua Lajur", + "livewire-tables::Applied Filters": "Tapisan Digunakan", + "livewire-tables::Applied Sorting": "Susunan Digunakan", + "livewire-tables::Bulk Actions": "Tindakan Pukal", + "livewire-tables::Clear": "Kosongkan", + "livewire-tables::Columns": "Kolum", + "livewire-tables::Debugging Values": "Menyahpepijat Nilai", + "livewire-tables::Deselect All": "Nyahpilih semua", + "livewire-tables::Done Reordering": "Selesai Menyusun Semula", + "livewire-tables::Filters": "Tapisan", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Tidak", + "livewire-tables::No items found. Try to broaden your search.": "Tiada data ditemui. Sila perluaskan carian anda", + "livewire-tables::of": "daripada", + "livewire-tables::Remove filter option": "Keluarkan pilihan tapisan", + "livewire-tables::Remove sort option": "Keluarkan pilihan sususan", + "livewire-tables::Reorder": "menyusun semula", + "livewire-tables::results": "keputusan", + "livewire-tables::row": "barisan", + "livewire-tables::rows": "barisan", + "livewire-tables::rows, do you want to select all": "barisan, adakah anda mahu pilih semua?", + "livewire-tables::Search": "Carian", + "livewire-tables::Select All": "Pilih Semua", + "livewire-tables::Showing": "Menunjukkan", + "livewire-tables::to": "ke", + "livewire-tables::Yes": "ya", + "livewire-tables::You are currently selecting all": "Anda sedang memilih semua", + "livewire-tables::You are not connected to the internet.": "Anda tidak disambungkan ke internet.", + "livewire-tables::You have selected": "Anda telah memilih", + "All": "Semua", + "All Columns": "Semua Lajur", + "Applied Filters": "Tapisan Digunakan", + "Applied Sorting": "Susunan Digunakan", + "Bulk Actions": "Tindakan Pukal", + "Clear": "Kosongkan", + "Columns": "Kolum", + "Debugging Values": "Menyahpepijat Nilai", + "Deselect All": "Nyahpilih semua", + "Done Reordering": "Selesai Menyusun Semula", + "Filters": "Tapisan", + "not_applicable": "N/A", + "No": "Tidak", + "No items found. Try to broaden your search.": "Tiada data ditemui. Sila perluaskan carian anda", + "of": "daripada", + "Remove filter option": "Keluarkan pilihan tapisan", + "Remove sort option": "Keluarkan pilihan sususan", + "Reorder": "menyusun semula", + "results": "keputusan", + "row": "barisan", + "rows": "barisan", + "rows, do you want to select all": "barisan, adakah anda mahu pilih semua?", + "Search": "Carian", + "Select All": "Pilih Semua", + "Showing": "Menunjukkan", + "to": "ke", + "Yes": "ya", + "You are currently selecting all": "Anda sedang memilih semua", + "You are not connected to the internet.": "Anda tidak disambungkan ke internet.", + "You have selected": "Anda telah memilih" +} \ No newline at end of file diff --git a/resources/lang/json/nl.json b/resources/lang/json/nl.json new file mode 100644 index 000000000..a6223018c --- /dev/null +++ b/resources/lang/json/nl.json @@ -0,0 +1,66 @@ +{ + "livewire-tables::All": "Alle", + "livewire-tables::All Columns": "Alle kolommen", + "livewire-tables::Applied Filters": "Toegepaste filters", + "livewire-tables::Applied Sorting": "Toegepaste sortering", + "livewire-tables::Bulk Actions": "Bulkacties", + "livewire-tables::Bulk Actions Confirm": "Weet u het zeker?", + "livewire-tables::Clear": "Wissen", + "livewire-tables::Columns": "Kolommen", + "livewire-tables::Debugging Values": "Debugging waarden", + "livewire-tables::Deselect All": "Alles deselecteren", + "livewire-tables::Done Reordering": "Hersortering voltooid", + "livewire-tables::Filters": "Filters", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Nee", + "livewire-tables::No items found. Try to broaden your search.": "Er zijn geen items gevonden. Probeer uw zoekopdracht te verfijnen.", + "livewire-tables::of": "van", + "livewire-tables::Remove filter option": "Filteroptie verwijderen", + "livewire-tables::Remove sort option": "Sorteeroptie verwijderen", + "livewire-tables::Reorder": "Hersorteren", + "livewire-tables::results": "resultaten", + "livewire-tables::row": "rij", + "livewire-tables::rows": "rijen", + "livewire-tables::rows, do you want to select all": "rijen, wilt u alles selecteren", + "livewire-tables::Search": "Zoeken", + "livewire-tables::Select All": "Alles selecteren", + "livewire-tables::Showing": "Toont", + "livewire-tables::to": "tot", + "livewire-tables::Yes": "Ja", + "livewire-tables::You are currently selecting all": "Huidig heeft u alles geselecteerd", + "livewire-tables::You are not connected to the internet.": "U bent niet verbonden met het internet.", + "livewire-tables::You have selected": "U selecteerde", + "livewire-tables::Select All On Page": "Alles op deze pagina selecteren", + "All": "Alle", + "All Columns": "Alle kolommen", + "Applied Filters": "Toegepaste filters", + "Applied Sorting": "Toegepaste sortering", + "Bulk Actions": "Bulkacties", + "Bulk Actions Confirm": "Weet u het zeker?", + "Clear": "Wissen", + "Columns": "Kolommen", + "Debugging Values": "Debugging waarden", + "Deselect All": "Alles deselecteren", + "Done Reordering": "Hersortering voltooid", + "Filters": "Filters", + "not_applicable": "N/A", + "No": "Nee", + "No items found. Try to broaden your search.": "Er zijn geen items gevonden. Probeer uw zoekopdracht te verfijnen.", + "of": "van", + "Remove filter option": "Filteroptie verwijderen", + "Remove sort option": "Sorteeroptie verwijderen", + "Reorder": "Hersorteren", + "results": "resultaten", + "row": "rij", + "rows": "rijen", + "rows, do you want to select all": "rijen, wilt u alles selecteren", + "Search": "Zoeken", + "Select All": "Alles selecteren", + "Showing": "Toont", + "to": "tot", + "Yes": "Ja", + "You are currently selecting all": "Huidig heeft u alles geselecteerd", + "You are not connected to the internet.": "U bent niet verbonden met het internet.", + "You have selected": "U selecteerde", + "Select All On Page": "Alles op deze pagina selecteren" +} diff --git a/resources/lang/json/pl.json b/resources/lang/json/pl.json new file mode 100644 index 000000000..12469dc82 --- /dev/null +++ b/resources/lang/json/pl.json @@ -0,0 +1,66 @@ +{ + "livewire-tables::All": "Wszystko", + "livewire-tables::All Columns": "Wszystkie kolumny", + "livewire-tables::Applied Filters": "Użyte filtry", + "livewire-tables::Applied Sorting": "Użyte sortowanie", + "livewire-tables::Bulk Actions": "Akcje zbiorowe", + "livewire-tables::Bulk Actions Confirm": "Czy zastosować ?", + "livewire-tables::Clear": "Wyczyść", + "livewire-tables::Columns": "Kolumny", + "livewire-tables::Debugging Values": "Wartości debugowania", + "livewire-tables::Deselect All": "Odznacz wszystko", + "livewire-tables::Done Reordering": "Done Reordering", + "livewire-tables::Filters": "Filtry", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Nie", + "livewire-tables::No items found. Try to broaden your search.": "Brak rezultatów do wyświetlenia.", + "livewire-tables::of": "z", + "livewire-tables::Remove filter option": "Usuń opcję filtra", + "livewire-tables::Remove sort option": "Usuń opcję sortowania", + "livewire-tables::Reorder": "Zmień kolejność", + "livewire-tables::results": "wyniki", + "livewire-tables::row": "wiersz", + "livewire-tables::rows": "wiersze", + "livewire-tables::rows, do you want to select all": "czy chcesz zaznaczyć wszystkie wiersze", + "livewire-tables::Search": "Szukaj", + "livewire-tables::Select All": "Zaznacz wszystko", + "livewire-tables::Select All On Page": "Zaznacz wszystko na stronie", + "livewire-tables::Showing": "Pokazywanie", + "livewire-tables::to": "do", + "livewire-tables::Yes": "Tak", + "livewire-tables::You are currently selecting all": "Aktualnie masz wszystko zaznaczone", + "livewire-tables::You are not connected to the internet.": "Brak połączenia z internetem.", + "livewire-tables::You have selected": "Masz wybrane", + "All": "Wszystko", + "All Columns": "Wszystkie kolumny", + "Applied Filters": "Użyte filtry", + "Applied Sorting": "Użyte sortowanie", + "Bulk Actions": "Akcje zbiorowe", + "Bulk Actions Confirm": "Czy zastosować ?", + "Clear": "Wyczyść", + "Columns": "Kolumny", + "Debugging Values": "Wartości debugowania", + "Deselect All": "Odznacz wszystko", + "Done Reordering": "Done Reordering", + "Filters": "Filtry", + "not_applicable": "N/A", + "No": "Nie", + "No items found. Try to broaden your search.": "Brak rezultatów do wyświetlenia.", + "of": "z", + "Remove filter option": "Usuń opcję filtra", + "Remove sort option": "Usuń opcję sortowania", + "Reorder": "Zmień kolejność", + "results": "wyniki", + "row": "wiersz", + "rows": "wiersze", + "rows, do you want to select all": "czy chcesz zaznaczyć wszystkie wiersze", + "Search": "Szukaj", + "Select All": "Zaznacz wszystko", + "Select All On Page": "Zaznacz wszystko na stronie", + "Showing": "Pokazywanie", + "to": "do", + "Yes": "Tak", + "You are currently selecting all": "Aktualnie masz wszystko zaznaczone", + "You are not connected to the internet.": "Brak połączenia z internetem.", + "You have selected": "Masz wybrane" +} \ No newline at end of file diff --git a/resources/lang/json/pt.json b/resources/lang/json/pt.json new file mode 100644 index 000000000..f38578da1 --- /dev/null +++ b/resources/lang/json/pt.json @@ -0,0 +1,64 @@ +{ + "livewire-tables::All": "Tudo", + "livewire-tables::All Columns": "Todas as colunas", + "livewire-tables::Applied Filters": "Filtros Aplicados", + "livewire-tables::Applied Sorting": "Ordenação Aplicada", + "livewire-tables::Bulk Actions": "Ações Massivas", + "livewire-tables::Clear": "Limpar", + "livewire-tables::Columns": "Colunas", + "livewire-tables::Debugging Values": "Valores de depuração", + "livewire-tables::Deselect All": "Desmarcar Tudo", + "livewire-tables::Done Reordering": "Ordeanação finalizada", + "livewire-tables::Filters": "Filtros", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Não", + "livewire-tables::No items found. Try to broaden your search.": "Nenhum resultado encontrado. Tente ampliar a sua pesquisa.", + "livewire-tables::of": "de", + "livewire-tables::Remove filter option": "Remover opção de filtro", + "livewire-tables::Remove sort option": "Remover opção de ordenação", + "livewire-tables::Reorder": "Reordenar", + "livewire-tables::results": "resultados", + "livewire-tables::row": "linha", + "livewire-tables::rows": "linhas", + "livewire-tables::rows, do you want to select all": "linhas, pretende selecionar tudo", + "livewire-tables::Search": "Pesquisar", + "livewire-tables::Select All": "Seleccionar Tudo", + "livewire-tables::Select All On Page": "Selecione tudo na página", + "livewire-tables::Showing": "A mostrar", + "livewire-tables::to": "a", + "livewire-tables::Yes": "Sim", + "livewire-tables::You are currently selecting all": "Atualmente está a selecionar tudo", + "livewire-tables::You are not connected to the internet.": "Não está ligado à internet.", + "livewire-tables::You have selected": "Selecionou", + "All": "Tudo", + "All Columns": "Todas as colunas", + "Applied Filters": "Filtros Aplicados", + "Applied Sorting": "Ordenação Aplicada", + "Bulk Actions": "Ações Massivas", + "Clear": "Limpar", + "Columns": "Colunas", + "Debugging Values": "Valores de depuração", + "Deselect All": "Desmarcar Tudo", + "Done Reordering": "Ordeanação finalizada", + "Filters": "Filtros", + "not_applicable": "N/A", + "No": "Não", + "No items found. Try to broaden your search.": "Nenhum resultado encontrado. Tente ampliar a sua pesquisa.", + "of": "de", + "Remove filter option": "Remover opção de filtro", + "Remove sort option": "Remover opção de ordenação", + "Reorder": "Reordenar", + "results": "resultados", + "row": "linha", + "rows": "linhas", + "rows, do you want to select all": "linhas, pretende selecionar tudo", + "Search": "Pesquisar", + "Select All": "Seleccionar Tudo", + "Select All On Page": "Selecione tudo na página", + "Showing": "A mostrar", + "to": "a", + "Yes": "Sim", + "You are currently selecting all": "Atualmente está a selecionar tudo", + "You are not connected to the internet.": "Não está ligado à internet.", + "You have selected": "Selecionou" +} \ No newline at end of file diff --git a/resources/lang/json/pt_BR.json b/resources/lang/json/pt_BR.json new file mode 100644 index 000000000..09a0e2906 --- /dev/null +++ b/resources/lang/json/pt_BR.json @@ -0,0 +1,66 @@ +{ + "livewire-tables::All": "Tudo", + "livewire-tables::All Columns": "Todas as colunas", + "livewire-tables::Applied Filters": "Filtros aplicados", + "livewire-tables::Applied Sorting": "Ordenação aplicada", + "livewire-tables::Bulk Actions": "Ações em massa", + "livewire-tables::Bulk Actions Confirm": "Tem certeza", + "livewire-tables::Clear": "Limpar", + "livewire-tables::Columns": "Colunas", + "livewire-tables::Debugging Values": "Valores de depuração", + "livewire-tables::Deselect All": "Desmarcar Tudo", + "livewire-tables::Done Reordering": "Ordenação finalizada", + "livewire-tables::Filters": "Filtros", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Não", + "livewire-tables::No items found. Try to broaden your search.": "Nenhum resultado encontrado. Tente ampliar a sua pesquisa.", + "livewire-tables::of": "de", + "livewire-tables::Reorder": "Reordenar", + "livewire-tables::results": "resultados", + "livewire-tables::Remove filter option": "Remover opção de filtro", + "livewire-tables::Remove sort option": "Remover opção de ordenação", + "livewire-tables::row": "linha", + "livewire-tables::rows": "linhas", + "livewire-tables::rows, do you want to select all": "linhas, você deseja selecionar tudo?", + "livewire-tables::Search": "Pesquisar", + "livewire-tables::Select All": "Selecionar tudo", + "livewire-tables::Select All On Page": "Selecione tudo na página", + "livewire-tables::Showing": "Exibindo", + "livewire-tables::to": "a", + "livewire-tables::Yes": "Sim", + "livewire-tables::You are currently selecting all": "Você selecionou tudo", + "livewire-tables::You are not connected to the internet.": "Você não está conectado na internet.", + "livewire-tables::You have selected": "Você selecionou", + "All": "Tudo", + "All Columns": "Todas as colunas", + "Applied Filters": "Filtros aplicados", + "Applied Sorting": "Ordenação aplicada", + "Bulk Actions": "Ações em massa", + "Bulk Actions Confirm": "Tem certeza", + "Clear": "Limpar", + "Columns": "Colunas", + "Debugging Values": "Valores de depuração", + "Deselect All": "Desmarcar Tudo", + "Done Reordering": "Ordenação finalizada", + "Filters": "Filtros", + "not_applicable": "N/A", + "No": "Não", + "No items found. Try to broaden your search.": "Nenhum resultado encontrado. Tente ampliar a sua pesquisa.", + "of": "de", + "Reorder": "Reordenar", + "results": "resultados", + "Remove filter option": "Remover opção de filtro", + "Remove sort option": "Remover opção de ordenação", + "row": "linha", + "rows": "linhas", + "rows, do you want to select all": "linhas, você deseja selecionar tudo?", + "Search": "Pesquisar", + "Select All": "Selecionar tudo", + "Select All On Page": "Selecione tudo na página", + "Showing": "Exibindo", + "to": "a", + "Yes": "Sim", + "You are currently selecting all": "Você selecionou tudo", + "You are not connected to the internet.": "Você não está conectado na internet.", + "You have selected": "Você selecionou" +} \ No newline at end of file diff --git a/resources/lang/json/ru.json b/resources/lang/json/ru.json new file mode 100644 index 000000000..53b9fbf1b --- /dev/null +++ b/resources/lang/json/ru.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Все", + "livewire-tables::All Columns": "Все столбцы", + "livewire-tables::Applied Filters": "Примененные фильтры", + "livewire-tables::Applied Sorting": "Примененная сортировка", + "livewire-tables::Bulk Actions": "Массовые действия", + "livewire-tables::Clear": "Очистить", + "livewire-tables::Columns": "Столбцы", + "livewire-tables::Debugging Values": "Отладочные значения", + "livewire-tables::Deselect All": "Снять выделение", + "livewire-tables::Done Reordering": "Сортировка выполнена", + "livewire-tables::Filters": "Фильтры", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Нет", + "livewire-tables::No items found. Try to broaden your search.": "Ничего не найдено. Попробуйте расширить поиск.", + "livewire-tables::of": "из", + "livewire-tables::Remove filter option": "Удалить фильтр", + "livewire-tables::Remove sort option": "Удалить параметр сортировки", + "livewire-tables::Reorder": "Переупорядочить", + "livewire-tables::results": "результатов", + "livewire-tables::row": "ряды", + "livewire-tables::rows": "ряды", + "livewire-tables::rows, do you want to select all": "ряды, вы хотите выбрать все", + "livewire-tables::Search": "Поиск", + "livewire-tables::Select All": "Выбрать все", + "livewire-tables::Showing": "Показано с", + "livewire-tables::to": "к", + "livewire-tables::Yes": "Да", + "livewire-tables::You are currently selecting all": "Вы выбираете все", + "livewire-tables::You are not connected to the internet.": "Вы не подключены к Интернету", + "livewire-tables::You have selected": "Вы выбрали", + "All": "Все", + "All Columns": "Все столбцы", + "Applied Filters": "Примененные фильтры", + "Applied Sorting": "Примененная сортировка", + "Bulk Actions": "Массовые действия", + "Clear": "Очистить", + "Columns": "Столбцы", + "Debugging Values": "Отладочные значения", + "Deselect All": "Снять выделение", + "Done Reordering": "Сортировка выполнена", + "Filters": "Фильтры", + "not_applicable": "N/A", + "No": "Нет", + "No items found. Try to broaden your search.": "Ничего не найдено. Попробуйте расширить поиск.", + "of": "из", + "Remove filter option": "Удалить фильтр", + "Remove sort option": "Удалить параметр сортировки", + "Reorder": "Переупорядочить", + "results": "результатов", + "row": "ряды", + "rows": "ряды", + "rows, do you want to select all": "ряды, вы хотите выбрать все", + "Search": "Поиск", + "Select All": "Выбрать все", + "Showing": "Показано с", + "to": "к", + "Yes": "Да", + "You are currently selecting all": "Вы выбираете все", + "You are not connected to the internet.": "Вы не подключены к Интернету", + "You have selected": "Вы выбрали" +} \ No newline at end of file diff --git a/resources/lang/json/th.json b/resources/lang/json/th.json new file mode 100644 index 000000000..35c21b7fd --- /dev/null +++ b/resources/lang/json/th.json @@ -0,0 +1,66 @@ +{ + "livewire-tables::All": "ทั้งหมด", + "livewire-tables::All Columns": "คอลัมน์ทั้งหมด", + "livewire-tables::Applied Filters": "กรองข้อมูลตาม", + "livewire-tables::Applied Sorting": "เรียงลำดับตาม", + "livewire-tables::Bulk Actions": "เลือกการกระทำ", + "livewire-tables::Bulk Actions Confirm": "คุณแน่ใจ?", + "livewire-tables::Clear": "ล้างทั้งหมด", + "livewire-tables::Columns": "เลือกคอลัมน์", + "livewire-tables::Debugging Values": "ค่าการดีบัก", + "livewire-tables::Deselect All": "ไม่เลือกทั้งหมด", + "livewire-tables::Done Reordering": "จัดลำดับแล้ว", + "livewire-tables::Filters": "ตัวกรอง", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "เลขที่", + "livewire-tables::No items found. Try to broaden your search.": "ไม่พบรายการที่ค้นหา", + "livewire-tables::of": "จาก", + "livewire-tables::Remove filter option": "เอาตัวกรองออก", + "livewire-tables::Remove sort option": "เอาการเรียงลำดับออก", + "livewire-tables::Reorder": "จัดลำดับ", + "livewire-tables::results": "รายการ", + "livewire-tables::row": "รายการ", + "livewire-tables::rows": "รายการ", + "livewire-tables::rows, do you want to select all": "รายการ, คุณต้องการเลือกทั้งหมด", + "livewire-tables::Search": "ค้นหา...", + "livewire-tables::Select All": "เลือกทั้งหมด", + "livewire-tables::Select All On Page": "เลือกทั้งหมดบนหน้า", + "livewire-tables::Showing": "แสดง", + "livewire-tables::to": "-", + "livewire-tables::Yes": "ใช่", + "livewire-tables::You are currently selecting all": "ขณะนี้คุณได้เลือกทุกรายการ", + "livewire-tables::You are not connected to the internet.": "ขณะนี้คุณไม่ได้เชื่อมต่อกับอินเทอร์เน็ต", + "livewire-tables::You have selected": "คุณเลือก", + "All": "ทั้งหมด", + "All Columns": "คอลัมน์ทั้งหมด", + "Applied Filters": "กรองข้อมูลตาม", + "Applied Sorting": "เรียงลำดับตาม", + "Bulk Actions": "เลือกการกระทำ", + "Bulk Actions Confirm": "คุณแน่ใจ?", + "Clear": "ล้างทั้งหมด", + "Columns": "เลือกคอลัมน์", + "Debugging Values": "ค่าการดีบัก", + "Deselect All": "ไม่เลือกทั้งหมด", + "Done Reordering": "จัดลำดับแล้ว", + "Filters": "ตัวกรอง", + "not_applicable": "N/A", + "No": "เลขที่", + "No items found. Try to broaden your search.": "ไม่พบรายการที่ค้นหา", + "of": "จาก", + "Remove filter option": "เอาตัวกรองออก", + "Remove sort option": "เอาการเรียงลำดับออก", + "Reorder": "จัดลำดับ", + "results": "รายการ", + "row": "รายการ", + "rows": "รายการ", + "rows, do you want to select all": "รายการ, คุณต้องการเลือกทั้งหมด", + "Search": "ค้นหา...", + "Select All": "เลือกทั้งหมด", + "Select All On Page": "เลือกทั้งหมดบนหน้า", + "Showing": "แสดง", + "to": "-", + "Yes": "ใช่", + "You are currently selecting all": "ขณะนี้คุณได้เลือกทุกรายการ", + "You are not connected to the internet.": "ขณะนี้คุณไม่ได้เชื่อมต่อกับอินเทอร์เน็ต", + "You have selected": "คุณเลือก" +} \ No newline at end of file diff --git a/resources/lang/json/tk.json b/resources/lang/json/tk.json new file mode 100644 index 000000000..2099d845f --- /dev/null +++ b/resources/lang/json/tk.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Hemmesi", + "livewire-tables::All Columns": "Colhli sütünler", + "livewire-tables::Applied Filters": "Ulanylýan Süzgüçler", + "livewire-tables::Applied Sorting": "Ulanylýan Tertipleşdirme", + "livewire-tables::Bulk Actions": "Köpçülikleýin Hereketler", + "livewire-tables::Clear": "Arassala", + "livewire-tables::Columns": "Sütünler", + "livewire-tables::Debugging Values": "Gymmatlyklary düzetmek", + "livewire-tables::Deselect All": "Hemmesini Aýyr", + "livewire-tables::Done Reordering": "Täzeden Tertiplendi", + "livewire-tables::Filters": "Süzgüçler", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Hayir", + "livewire-tables::No items found. Try to broaden your search.": "Hiç zat tapylmady. Gözlegiňizi giňeltmäge synanyşyň.", + "livewire-tables::of": "aralygy", + "livewire-tables::Remove filter option": "Süzgüç görnüşini aýyryň", + "livewire-tables::Remove sort option": "Tertiplemek görnüşini aýyryň", + "livewire-tables::Reorder": "Tertibe salmak", + "livewire-tables::results": "netijeler", + "livewire-tables::row": "hatarlar", + "livewire-tables::rows": "hatarlar", + "livewire-tables::rows, do you want to select all": "hatarlar, hemmesini saýlamak isleýärsiňizmi?", + "livewire-tables::Search": "Gözlemek", + "livewire-tables::Select All": "Hepsini seç", + "livewire-tables::Showing": "Görkezmek", + "livewire-tables::to": "-", + "livewire-tables::Yes": "Evet", + "livewire-tables::You are currently selecting all": "Häzirki wagtda hemmesini saýlap alýarsyňyz", + "livewire-tables::You are not connected to the internet.": "Siz internete birikmediksiňiz.", + "livewire-tables::You have selected": "Saýladyňyz", + "All": "Hemmesi", + "All Columns": "Colhli sütünler", + "Applied Filters": "Ulanylýan Süzgüçler", + "Applied Sorting": "Ulanylýan Tertipleşdirme", + "Bulk Actions": "Köpçülikleýin Hereketler", + "Clear": "Arassala", + "Columns": "Sütünler", + "Debugging Values": "Gymmatlyklary düzetmek", + "Deselect All": "Hemmesini Aýyr", + "Done Reordering": "Täzeden Tertiplendi", + "Filters": "Süzgüçler", + "not_applicable": "N/A", + "No": "Hayir", + "No items found. Try to broaden your search.": "Hiç zat tapylmady. Gözlegiňizi giňeltmäge synanyşyň.", + "of": "aralygy", + "Remove filter option": "Süzgüç görnüşini aýyryň", + "Remove sort option": "Tertiplemek görnüşini aýyryň", + "Reorder": "Tertibe salmak", + "results": "netijeler", + "row": "hatarlar", + "rows": "hatarlar", + "rows, do you want to select all": "hatarlar, hemmesini saýlamak isleýärsiňizmi?", + "Search": "Gözlemek", + "Select All": "Hepsini seç", + "Showing": "Görkezmek", + "to": "-", + "Yes": "Evet", + "You are currently selecting all": "Häzirki wagtda hemmesini saýlap alýarsyňyz", + "You are not connected to the internet.": "Siz internete birikmediksiňiz.", + "You have selected": "Saýladyňyz" +} \ No newline at end of file diff --git a/resources/lang/json/tr.json b/resources/lang/json/tr.json new file mode 100644 index 000000000..f1218ae2b --- /dev/null +++ b/resources/lang/json/tr.json @@ -0,0 +1,62 @@ +{ + "livewire-tables::All": "Tümü", + "livewire-tables::All Columns": "Tüm Sütunlar", + "livewire-tables::Applied Filters": "Aktif Filtreler", + "livewire-tables::Applied Sorting": "Aktif Sıralamalar", + "livewire-tables::Bulk Actions": "Toplu İşlemler", + "livewire-tables::Clear": "Kaldır", + "livewire-tables::Columns": "Kolonlar", + "livewire-tables::Debugging Values": "Debug Değerleri", + "livewire-tables::Deselect All": "Seçimleri kaldır", + "livewire-tables::Done Reordering": "Sıralamayı Tamamla", + "livewire-tables::Filters": "Filtreler", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "HAYIR", + "livewire-tables::No items found. Try to broaden your search.": "Kayıt bulunamadı.", + "livewire-tables::of": " ", + "livewire-tables::Remove filter option": "Filtre seçeneğini kaldır", + "livewire-tables::Remove sort option": "Sıralama seçeneğini kaldır", + "livewire-tables::Reorder": "Yeniden Sırala", + "livewire-tables::results": "toplam sonuç", + "livewire-tables::row": "satır", + "livewire-tables::rows": "satır", + "livewire-tables::rows, do you want to select all": "satır seçtiniz. Hepsini seçmek ister misiniz?", + "livewire-tables::Search": "Ara", + "livewire-tables::Select All": "Hepsini seç", + "livewire-tables::Showing": "Gösterilen", + "livewire-tables::to": " - ", + "livewire-tables::Yes": "Evet", + "livewire-tables::You are currently selecting all": "Hepsini seçtiniz.", + "livewire-tables::You are not connected to the internet.": "İnternet bağlantınız kesildi.", + "livewire-tables::You have selected": "Siz seçildiniz", + "All": "Tümü", + "All Columns": "Tüm Sütunlar", + "Applied Filters": "Aktif Filtreler", + "Applied Sorting": "Aktif Sıralamalar", + "Bulk Actions": "Toplu İşlemler", + "Clear": "Kaldır", + "Columns": "Kolonlar", + "Debugging Values": "Debug Değerleri", + "Deselect All": "Seçimleri kaldır", + "Done Reordering": "Sıralamayı Tamamla", + "Filters": "Filtreler", + "not_applicable": "N/A", + "No": "HAYIR", + "No items found. Try to broaden your search.": "Kayıt bulunamadı.", + "of": " ", + "Remove filter option": "Filtre seçeneğini kaldır", + "Remove sort option": "Sıralama seçeneğini kaldır", + "Reorder": "Yeniden Sırala", + "results": "toplam sonuç", + "row": "satır", + "rows": "satır", + "rows, do you want to select all": "satır seçtiniz. Hepsini seçmek ister misiniz?", + "Search": "Ara", + "Select All": "Hepsini seç", + "Showing": "Gösterilen", + "to": " - ", + "Yes": "Evet", + "You are currently selecting all": "Hepsini seçtiniz.", + "You are not connected to the internet.": "İnternet bağlantınız kesildi.", + "You have selected": "Siz seçildiniz" +} \ No newline at end of file diff --git a/resources/lang/json/tw.json b/resources/lang/json/tw.json new file mode 100644 index 000000000..b675a47c7 --- /dev/null +++ b/resources/lang/json/tw.json @@ -0,0 +1,66 @@ +{ + "livewire-tables::All": "全部", + "livewire-tables::All Columns": "所有專欄", + "livewire-tables::Applied Filters": "已套用的過濾規則", + "livewire-tables::Applied Sorting": "已套用的搜尋規則", + "livewire-tables::Bulk Actions": "批次操作", + "livewire-tables::Bulk Actions Confirm": "你確定嗎", + "livewire-tables::Clear": "清除", + "livewire-tables::Columns": "欄位", + "livewire-tables::Debugging Values": "調試值", + "livewire-tables::Deselect All": "取消選擇", + "livewire-tables::Done Reordering": "排序完成", + "livewire-tables::Filters": "過濾規則", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "不", + "livewire-tables::No items found. Try to broaden your search.": "無資料呈現。請嘗試擴大搜尋範圍。", + "livewire-tables::of": "筆資料,共", + "livewire-tables::Reorder": "重新排序", + "livewire-tables::Remove filter option": "移除過濾規則", + "livewire-tables::Remove sort option": "移除排序規則", + "livewire-tables::results": "筆資料", + "livewire-tables::row": "筆資料", + "livewire-tables::rows": "筆資料", + "livewire-tables::rows, do you want to select all": "筆資料,您是否要全選", + "livewire-tables::Search": "搜尋", + "livewire-tables::Select All": "搜尋全部", + "livewire-tables::Select All On Page": "选择页面上的所有内容", + "livewire-tables::Showing": "顯示", + "livewire-tables::to": "至", + "livewire-tables::Yes": "是的", + "livewire-tables::You are currently selecting all": "您目前已選擇全部資料", + "livewire-tables::You are not connected to the internet.": "目前為離線模式", + "livewire-tables::You have selected": "您已選擇", + "All": "全部", + "All Columns": "所有專欄", + "Applied Filters": "已套用的過濾規則", + "Applied Sorting": "已套用的搜尋規則", + "Bulk Actions": "批次操作", + "Bulk Actions Confirm": "你確定嗎", + "Clear": "清除", + "Columns": "欄位", + "Debugging Values": "調試值", + "Deselect All": "取消選擇", + "Done Reordering": "排序完成", + "Filters": "過濾規則", + "not_applicable": "N/A", + "No": "不", + "No items found. Try to broaden your search.": "無資料呈現。請嘗試擴大搜尋範圍。", + "of": "筆資料,共", + "Reorder": "重新排序", + "Remove filter option": "移除過濾規則", + "Remove sort option": "移除排序規則", + "results": "筆資料", + "row": "筆資料", + "rows": "筆資料", + "rows, do you want to select all": "筆資料,您是否要全選", + "Search": "搜尋", + "Select All": "搜尋全部", + "Select All On Page": "选择页面上的所有内容", + "Showing": "顯示", + "to": "至", + "Yes": "是的", + "You are currently selecting all": "您目前已選擇全部資料", + "You are not connected to the internet.": "目前為離線模式", + "You have selected": "您已選擇" +} \ No newline at end of file diff --git a/resources/lang/json/uk.json b/resources/lang/json/uk.json new file mode 100644 index 000000000..540684056 --- /dev/null +++ b/resources/lang/json/uk.json @@ -0,0 +1,68 @@ +{ + "livewire-tables::All": "Всі", + "livewire-tables::All Columns": "Усі стовпці", + "livewire-tables::Applied Filters": "Застосовані фільтри", + "livewire-tables::Applied Sorting": "Застосовані сортування", + "livewire-tables::Bulk Actions": "Масові дії", + "livewire-tables::Bulk Actions Confirm": "Vy vpevneni?", + "livewire-tables::Clear": "Очистити", + "livewire-tables::Columns": "Колонки", + "livewire-tables::Debugging Values": "Значення налагодження", + "livewire-tables::Deselect All": "Зняти вибір із усіх", + "livewire-tables::Done Reordering": "Сортування виконанно", + "livewire-tables::Filters": "Фільтри", + "livewire-tables::not_applicable": "N/A", + "livewire-tables::No": "Немає", + "livewire-tables::No items found. Try to broaden your search.": "Немає елементів. Спробуйте розширити пошук.", + "livewire-tables::of": "від", + "livewire-tables::Remove filter option": "Видалити опцію фільтра", + "livewire-tables::Remove sort option": "Видалити параметр сортування", + "livewire-tables::Reorder": "Змінити порядок", + "livewire-tables::results": "результатів", + "livewire-tables::row": "рядки", + "livewire-tables::rows": "рядки", + "livewire-tables::rows, do you want to select all": "рядків, ви хочете вибрати всі", + "livewire-tables::Search": "Пошук", + "livewire-tables::Select All": "Вибрати все", + "livewire-tables::Select All On Page": "Виберіть «Усі на сторінці", + "livewire-tables::Showing": "Показано", + "livewire-tables::to": "до", + "livewire-tables::Unselect All": "Прибрати вибір усіх", + "livewire-tables::Yes": "Так", + "livewire-tables::You are currently selecting all": "Наразі ви вибираєте всі", + "livewire-tables::You are not connected to the internet.": "Ви не підключені до Інтернету.", + "livewire-tables::You have selected": "Ви вибрали", + "All": "Всі", + "All Columns": "Усі стовпці", + "Applied Filters": "Застосовані фільтри", + "Applied Sorting": "Застосовані сортування", + "Bulk Actions": "Масові дії", + "Bulk Actions Confirm": "Vy vpevneni?", + "Clear": "Очистити", + "Columns": "Колонки", + "Debugging Values": "Значення налагодження", + "Deselect All": "Зняти вибір із усіх", + "Done Reordering": "Сортування виконанно", + "Filters": "Фільтри", + "not_applicable": "N/A", + "No": "Немає", + "No items found. Try to broaden your search.": "Немає елементів. Спробуйте розширити пошук.", + "of": "від", + "Remove filter option": "Видалити опцію фільтра", + "Remove sort option": "Видалити параметр сортування", + "Reorder": "Змінити порядок", + "results": "результатів", + "row": "рядки", + "rows": "рядки", + "rows, do you want to select all": "рядків, ви хочете вибрати всі", + "Search": "Пошук", + "Select All": "Вибрати все", + "Select All On Page": "Виберіть «Усі на сторінці", + "Showing": "Показано", + "to": "до", + "Unselect All": "Прибрати вибір усіх", + "Yes": "Так", + "You are currently selecting all": "Наразі ви вибираєте всі", + "You are not connected to the internet.": "Ви не підключені до Інтернету.", + "You have selected": "Ви вибрали" +} \ No newline at end of file diff --git a/resources/lang/ms.json b/resources/lang/ms.json deleted file mode 100644 index ff04ae499..000000000 --- a/resources/lang/ms.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Semua", - "All Columns": "Semua Lajur", - "Applied Filters": "Tapisan Digunakan", - "Applied Sorting": "Susunan Digunakan", - "Bulk Actions": "Tindakan Pukal", - "Clear": "Kosongkan", - "Columns": "Kolum", - "Debugging Values": "Menyahpepijat Nilai", - "Deselect All": "Nyahpilih semua", - "Done Reordering": "Selesai Menyusun Semula", - "Filters": "Tapisan", - "No": "Tidak", - "No items found. Try to broaden your search.": "Tiada data ditemui. Sila perluaskan carian anda", - "of": "daripada", - "Remove filter option": "Keluarkan pilihan tapisan", - "Remove sort option": "Keluarkan pilihan sususan", - "Reorder": "menyusun semula", - "results": "keputusan", - "row": "barisan", - "rows": "barisan", - "rows, do you want to select all": "barisan, adakah anda mahu pilih semua?", - "Search": "Carian", - "Select All": "Pilih Semua", - "Showing": "Menunjukkan", - "to": "ke", - "Yes": "ya", - "You are currently selecting all": "Anda sedang memilih semua", - "You are not connected to the internet.": "Anda tidak disambungkan ke internet.", - "You have selected": "Anda telah memilih" -} \ No newline at end of file diff --git a/resources/lang/nl.json b/resources/lang/nl.json deleted file mode 100644 index e2f681d4d..000000000 --- a/resources/lang/nl.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "All": "Alle", - "All Columns": "Alle kolommen", - "Applied Filters": "Toegepaste filters", - "Applied Sorting": "Toegepaste sortering", - "Bulk Actions": "Bulkacties", - "Bulk Actions Confirm": "Weet u het zeker?", - "Clear": "Wissen", - "Columns": "Kolommen", - "Debugging Values": "Debugging waarden", - "Deselect All": "Alles deselecteren", - "Done Reordering": "Hersortering voltooid", - "Filters": "Filters", - "No": "Nee", - "No items found. Try to broaden your search.": "Er zijn geen items gevonden. Probeer uw zoekopdracht te verfijnen.", - "of": "van", - "Remove filter option": "Filteroptie verwijderen", - "Remove sort option": "Sorteeroptie verwijderen", - "Reorder": "Hersorteren", - "results": "resultaten", - "row": "rij", - "rows": "rijen", - "rows, do you want to select all": "rijen, wilt u alles selecteren", - "Search": "Zoeken", - "Select All": "Alles selecteren", - "Showing": "Toont", - "to": "tot", - "Yes": "Ja", - "You are currently selecting all": "Huidig heeft u alles geselecteerd", - "You are not connected to the internet.": "U bent niet verbonden met het internet.", - "You have selected": "U selecteerde", - "Select All On Page": "Alles op deze pagina selecteren" -} diff --git a/resources/lang/php/ar/core.php b/resources/lang/php/ar/core.php new file mode 100644 index 000000000..7a61e7327 --- /dev/null +++ b/resources/lang/php/ar/core.php @@ -0,0 +1,34 @@ + 'الجميع', + 'All Columns' => 'كافة الأعمدة', + 'Applied Filters' => 'المرشحات التطبيقية', + 'Applied Sorting' => 'الفرز التطبيقي', + 'Bulk Actions' => 'إجراءات جملة', + 'Clear' => 'واضح', + 'Columns' => 'الأعمدة', + 'Debugging Values' => 'قيم التصحيح', + 'Deselect All' => 'الغاء تحديد الكل', + 'Done Reordering' => 'تمت إعادة الترتيب', + 'Filters' => 'المرشحات', + 'not_applicable' => 'N/A', + 'No' => 'لا', + 'No items found, try to broaden your search' => 'لم يتم العثور على العناصر. حاول توسيع نطاق البحث', + 'of' => 'ل', + 'Remove filter option' => 'إزالة خيار التصفية', + 'Remove sort option' => 'إزالة خيار الفرز', + 'Reorder' => 'إعادة ترتيب', + 'results' => 'نتائج', + 'row' => 'صف', + 'rows' => 'صفوف', + 'rows, do you want to select all' => 'الصفوف ، هل تريد تحديد الكل', + 'Search' => 'يبحث', + 'Select All' => 'اختر الكل', + 'Showing' => 'عرض', + 'to' => 'ل', + 'Yes' => 'نعم', + 'You are currently selecting all' => 'أنت الآن تختار الكل', + 'You are not connected to the internet' => 'أنت غير متصل بالإنترنت', + 'You have selected' => 'قمت بتحديدها', +]; diff --git a/resources/lang/php/ca/core.php b/resources/lang/php/ca/core.php new file mode 100644 index 000000000..475148fa6 --- /dev/null +++ b/resources/lang/php/ca/core.php @@ -0,0 +1,34 @@ + 'Tot', + 'All Columns' => 'Totes les columnes', + 'Applied Filters' => 'Filtres Aplicats', + 'Applied Sorting' => 'Ordenació Aplicada', + 'Bulk Actions' => 'Accions Massives', + 'Clear' => 'Esborra', + 'Columns' => 'Columnes', + 'Debugging Values' => 'Valors de depuració', + 'Deselect All' => 'Deselecciona tot', + 'Done Reordering' => 'Reordenació finalitzada', + 'Filters' => 'Filtres', + 'not_applicable' => 'N/A', + 'No' => 'No', + 'No items found, try to broaden your search' => "No s'han trobat elements. Intenti ampliar la cerca", + 'of' => 'de', + 'Remove filter option' => 'Elimina opció de filtre', + 'Remove sort option' => "Elimina opció d'ordenació", + 'Reorder' => 'Reordena', + 'results' => 'resultats', + 'row' => 'fila', + 'rows' => 'files', + 'rows, do you want to select all' => 'files, vol seleccionar totes', + 'to' => 'a', + 'Search' => 'Cerca', + 'Select All' => 'Selecciona tot', + 'Showing' => 'Mostrant', + 'Yes' => 'Sí', + 'You are currently selecting all' => 'Actualment està seleccionant tot', + 'You are not connected to the internet' => 'No està conectat a Internet', + 'You have selected' => 'Ha seleccionat', +]; diff --git a/resources/lang/php/da/core.php b/resources/lang/php/da/core.php new file mode 100644 index 000000000..8ec69ce38 --- /dev/null +++ b/resources/lang/php/da/core.php @@ -0,0 +1,34 @@ + 'Alle', + 'All Columns' => 'Alle kolonner', + 'Applied Filters' => 'Anvendte filtre', + 'Applied Sorting' => 'Anvendt sortering', + 'Bulk Actions' => 'Massehandlinger', + 'Clear' => 'Ryd', + 'Columns' => 'Kolonner', + 'Debugging Values' => 'Debugging-værdier', + 'Deselect All' => 'Fravælg alle', + 'Done Reordering' => 'Færdig med omorganisering', + 'Filters' => 'Filtre', + 'not_applicable' => 'N/A', + 'No' => 'Nej', + 'No items found, try to broaden your search' => 'Ingen elementer fundet. Prøv at udvide din søgning', + 'of' => 'af', + 'Remove filter option' => 'Fjern filtermulighed', + 'Remove sort option' => 'Fjern sorteringsmulighed', + 'Reorder' => 'Omorganisér', + 'results' => 'resultater', + 'row' => 'række', + 'rows' => 'rækker', + 'rows, do you want to select all' => 'rækker, vil du vælge alle', + 'Search' => 'Søg', + 'Select All' => 'Vælg alle', + 'Showing' => 'Viser', + 'to' => 'til', + 'Yes' => 'Ja', + 'You are currently selecting all' => 'Du vælger i øjeblikket alle', + 'You are not connected to the internet' => 'Du er ikke forbundet til internettet', + 'You have selected' => 'Du har valgt', +]; diff --git a/resources/lang/php/de/core.php b/resources/lang/php/de/core.php new file mode 100644 index 000000000..04963e20a --- /dev/null +++ b/resources/lang/php/de/core.php @@ -0,0 +1,36 @@ + 'Alle', + 'All Columns' => 'Alle Spalten', + 'Applied Filters' => 'Angewendete Filter', + 'Applied Sorting' => 'Angewendete Sortierung', + 'Bulk Actions' => 'Aktionen', + 'Bulk Actions Confirm' => 'Bist du sicher?', + 'Clear' => 'Zurücksetzen', + 'Columns' => 'Spalten', + 'Debugging Values' => 'Werte debuggen', + 'Deselect All' => 'Alle abwählen', + 'Done Reordering' => 'Sortieren abgeschlossen', + 'Filters' => 'Filter', + 'not_applicable' => 'N/A', + 'No' => 'Nein', + 'No items found, try to broaden your search' => 'Es gibt keine Ergebnisse/Einträge. Versuche die Suche zu erweitern', + 'of' => 'von', + 'Remove filter option' => 'Entferne Filterauswahl', + 'Remove sort option' => 'Entferne Sortierauswahl', + 'Reorder' => 'erneut Sortieren', + 'results' => 'Ergebnisse', + 'row' => 'Zeile', + 'rows' => 'Zeilen', + 'rows, do you want to select all' => 'Zeilen, sollen alle ausgewählt werden', + 'Search' => 'Suche', + 'Select All' => 'Alle auswählen', + 'Select All On Page' => 'Alle auf der Seite auswählen', + 'Showing' => 'Anzeigen', + 'to' => 'nach', + 'Yes' => 'Ja', + 'You are currently selecting all' => 'Es sind schon alle ausgewählt', + 'You are not connected to the internet' => 'Es liegt keine Verbindung zum Internet vor.', + 'You have selected' => 'Es sind ausgewählt', +]; diff --git a/resources/lang/php/en/core.php b/resources/lang/php/en/core.php new file mode 100644 index 000000000..631762dba --- /dev/null +++ b/resources/lang/php/en/core.php @@ -0,0 +1,41 @@ + 'All', + 'All Columns' => 'All Columns', + 'Applied Filters' => 'Applied Filters', + 'Applied Sorting' => 'Applied Sorting', + 'Bulk Actions' => 'Bulk Actions', + 'Bulk Actions Confirm' => 'Are you sure?', + 'cancel' => 'Cancel', + 'Clear' => 'Clear', + 'Columns' => 'Columns', + 'Debugging Values' => 'Debugging Values', + 'Deselect All' => 'Deselect All', + 'Done Reordering' => 'Done Reordering', + 'Filters' => 'Filters', + 'loading' => 'Loading', + 'max' => 'Max', + 'min' => 'Min', + 'not_applicable' => 'N/A', + 'No' => 'No', + 'No items found, try to broaden your search' => 'No items found, try to broaden your search', + 'of' => 'of', + 'Remove filter option' => 'Remove filter option', + 'Remove sort option' => 'Remove sort option', + 'Reorder' => 'Reorder', + 'results' => 'results', + 'row' => 'row', + 'rows' => 'rows', + 'rows, do you want to select all' => 'rows, do you want to select all', + 'save' => 'Save', + 'Search' => 'Search', + 'Select All' => 'Select All', + 'Select All On Page' => 'Select All On Page', + 'Showing' => 'Showing', + 'to' => 'to', + 'Yes' => 'Yes', + 'You are currently selecting all' => 'You are currently selecting all', + 'You are not connected to the internet' => 'You are not connected to the internet', + 'You have selected' => 'You have selected', +]; diff --git a/resources/lang/php/es/core.php b/resources/lang/php/es/core.php new file mode 100644 index 000000000..6abcb91ea --- /dev/null +++ b/resources/lang/php/es/core.php @@ -0,0 +1,36 @@ + 'Todo', + 'All Columns' => 'Todas las columnas', + 'Applied Filters' => 'Filtros Aplicados', + 'Applied Sorting' => 'Ordenamiento Aplicado', + 'Bulk Actions' => 'Acciones Masivas', + 'Bulk Actions Confirm' => 'Está seguro?', + 'Clear' => 'Borrar', + 'Columns' => 'Columnas', + 'Debugging Values' => 'Valores de depuración', + 'Deselect All' => 'Deseleccionar todo', + 'Done Reordering' => 'Reordenación finalizada', + 'Filters' => 'Filtros', + 'not_applicable' => 'N/A', + 'No' => 'No', + 'No items found, try to broaden your search' => 'No se encontraron elementos. Intente ampliar la búsqueda', + 'of' => 'de', + 'Remove filter option' => 'Remover opción de filtro', + 'Remove sort option' => 'Remover opción de ordenamineto', + 'Reorder' => 'Reordenar', + 'results' => 'resultados', + 'row' => 'fila', + 'rows' => 'filas', + 'rows, do you want to select all' => 'filas, desea seleccionar todas', + 'Search' => 'Buscar', + 'Select All' => 'Seleccionar todo', + 'Select All On Page' => 'Seleccionar todo en la página', + 'Showing' => 'Mostrando', + 'to' => 'a', + 'Yes' => 'Sí', + 'You are currently selecting all' => 'Actualmente está seleccionando todo', + 'You are not connected to the internet' => 'No está conectado a Internet', + 'You have selected' => 'Ha seleccionado', +]; diff --git a/resources/lang/php/fa/core.php b/resources/lang/php/fa/core.php new file mode 100644 index 000000000..bf880aaeb --- /dev/null +++ b/resources/lang/php/fa/core.php @@ -0,0 +1,41 @@ + 'همه', + 'All Columns' => 'تمام ستون‌ها', + 'Applied Filters' => 'فیلترهای اعمال‌شده', + 'Applied Sorting' => 'مرتب‌سازی اعمال‌شده', + 'Bulk Actions' => 'اقدامات گروهی', + 'Bulk Actions Confirm' => 'آیا مطمئن هستید؟', + 'cancel' => 'لغو', + 'Clear' => 'پاک کردن', + 'Columns' => 'ستون‌ها', + 'Debugging Values' => 'مقادیر اشکال‌زدایی', + 'Deselect All' => 'لغو انتخاب همه', + 'Done Reordering' => 'مرتب‌سازی تمام شد', + 'Filters' => 'فیلترها', + 'loading' => 'در حال بارگذاری', + 'max' => 'حداکثر', + 'min' => 'حداقل', + 'not_applicable' => 'نامعتبر', + 'No' => 'خیر', + 'No items found, try to broaden your search' => 'موردی یافت نشد، جستجوی خود را گسترش دهید', + 'of' => 'از', + 'Remove filter option' => 'حذف گزینه فیلتر', + 'Remove sort option' => 'حذف گزینه مرتب‌سازی', + 'Reorder' => 'دوباره مرتب کنید', + 'results' => 'نتایج', + 'row' => 'ردیف', + 'rows' => 'ردیف‌ها', + 'rows, do you want to select all' => 'ردیف‌ها، آیا می‌خواهید همه را انتخاب کنید', + 'save' => 'ذخیره', + 'Search' => 'جستجو', + 'Select All' => 'انتخاب همه', + 'Select All On Page' => 'انتخاب همه در صفحه', + 'Showing' => 'در حال نمایش', + 'to' => 'تا', + 'Yes' => 'بله', + 'You are currently selecting all' => 'شما در حال حاضر همه را انتخاب کرده‌اید', + 'You are not connected to the internet' => 'شما به اینترنت متصل نیستید', + 'You have selected' => 'شما انتخاب کرده‌اید', +]; diff --git a/resources/lang/php/fr/core.php b/resources/lang/php/fr/core.php new file mode 100644 index 000000000..a81d0b8ad --- /dev/null +++ b/resources/lang/php/fr/core.php @@ -0,0 +1,36 @@ + 'Tous', + 'All Columns' => 'Toutes les colonnes', + 'Applied Filters' => 'Filtres appliqués', + 'Applied Sorting' => 'Tris appliqués', + 'Bulk Actions' => 'Actions en masse', + 'Bulk Actions Confirm' => 'Êtes-vous sûr ?', + 'Clear' => 'Effacer', + 'Columns' => 'Colonnes', + 'Debugging Values' => 'Valeurs de débogage', + 'Deselect All' => 'Tout désélectionner ', + 'Done Reordering' => 'Réordonnancement terminé', + 'Filters' => 'Filtres', + 'not_applicable' => 'N/A', + 'No' => 'Non', + 'No items found, try to broaden your search' => "Aucun élément trouvé. Essayez d'élargir votre recherche.", + 'of' => 'sur', + 'Remove filter option' => "Supprimer l'option de filtrage", + 'Remove sort option' => "Supprimer l'option de tri", + 'Reorder' => 'Réordonner', + 'results' => 'résultats', + 'row' => 'ligne', + 'rows' => 'lignes', + 'rows, do you want to select all' => 'lignes, voulez-vous tout sélectionner ?', + 'Search' => 'Rechercher', + 'Select All' => 'Tout sélectionner', + 'Select All On Page' => 'Tout sélectionner sur la page', + 'Showing' => 'Résultats', + 'to' => 'à', + 'Yes' => 'Oui', + 'You are currently selecting all' => 'Vous êtes en train de sélectionner ', + 'You are not connected to the internet' => "Vous n'êtes pas connecté à l'Internet", + 'You have selected' => 'Vous avez sélectionné', +]; diff --git a/resources/lang/php/id/core.php b/resources/lang/php/id/core.php new file mode 100644 index 000000000..47aac75f3 --- /dev/null +++ b/resources/lang/php/id/core.php @@ -0,0 +1,34 @@ + 'Semua', + 'All Columns' => 'Semua Kolom', + 'Applied Filters' => 'Filter Diterapkan', + 'Applied Sorting' => 'Penyortiran Diterapkan', + 'Bulk Actions' => 'Aksi', + 'Clear' => 'Bersihkan', + 'Columns' => 'Kolom', + 'Debugging Values' => 'Nilai Debug', + 'Deselect All' => 'Batalkan Semua Pilihan', + 'Done Reordering' => 'Selesai Mengurutkan Ulang', + 'Filters' => 'Filter', + 'not_applicable' => 'N/A', + 'No' => 'Tidak', + 'No items found, try to broaden your search' => 'Tidak ada data yang ditemukan. Cobalah untuk memperluas pencarian Anda.', + 'of' => 'dari', + 'Remove filter option' => 'Hapus opsi filter', + 'Remove sort option' => 'Hapus opsi pengurutan', + 'Reorder' => 'Urutkan ulang', + 'results' => 'hasil', + 'row' => 'baris', + 'rows' => 'baris', + 'rows, do you want to select all' => 'baris, apakah Anda ingin memilih semua?', + 'Search' => 'Cari', + 'Select All' => 'Pilih Semua', + 'Showing' => 'Menampilkan', + 'to' => 'ke', + 'Yes' => 'Ya', + 'You are currently selecting all' => 'Anda sedang memilih semua', + 'You are not connected to the internet' => 'Anda sedang tidak terhubung ke internet', + 'You have selected' => 'Anda telah memilih', +]; diff --git a/resources/lang/php/it/core.php b/resources/lang/php/it/core.php new file mode 100644 index 000000000..b29208f25 --- /dev/null +++ b/resources/lang/php/it/core.php @@ -0,0 +1,36 @@ + 'Tutti', + 'All Columns' => 'Tutte le colonne', + 'Applied Filters' => 'Filtri Applicati', + 'Applied Sorting' => 'Ordinamento Applicato', + 'Bulk Actions' => 'Azioni di Gruppo', + 'Bulk Actions Confirm' => 'Sei sicuro?', + 'Clear' => 'Pulisci', + 'Columns' => 'Colonne', + 'Debugging Values' => 'Valori di debug', + 'Deselect All' => 'Deseleziona tutto', + 'Done Reordering' => 'Ordinamento Terminato', + 'Filters' => 'Filtri', + 'not_applicable' => 'N/A', + 'No' => 'No', + 'No items found, try to broaden your search' => 'Nessun risultato trovato. Prova ad ampliare la tua ricerca.', + 'of' => 'di', + 'Remove filter option' => 'Rimuovi filtro', + 'Remove sort option' => 'Rimuovi ordinamento', + 'Reorder' => 'Riordina', + 'results' => 'risultati', + 'row' => 'righe', + 'rows' => 'righe', + 'rows, do you want to select all' => 'righe, vuoi selezionarle tutte', + 'Search' => 'Cerca', + 'Select All' => 'Seleziona tutto', + 'Select All On Page' => 'Seleziona tutto sulla pagina', + 'Showing' => 'Visualizzati', + 'to' => 'a', + 'Yes' => 'SÌ', + 'You are currently selecting all' => 'Stai selezionando tutto', + 'You are not connected to the internet' => 'Non sei connesso a internet', + 'You have selected' => 'Hai selezionato', +]; diff --git a/resources/lang/php/ms/core.php b/resources/lang/php/ms/core.php new file mode 100644 index 000000000..89c38f699 --- /dev/null +++ b/resources/lang/php/ms/core.php @@ -0,0 +1,34 @@ + 'Semua', + 'All Columns' => 'Semua Lajur', + 'Applied Filters' => 'Tapisan Digunakan', + 'Applied Sorting' => 'Susunan Digunakan', + 'Bulk Actions' => 'Tindakan Pukal', + 'Clear' => 'Kosongkan', + 'Columns' => 'Kolum', + 'Debugging Values' => 'Menyahpepijat Nilai', + 'Deselect All' => 'Nyahpilih semua', + 'Done Reordering' => 'Selesai Menyusun Semula', + 'Filters' => 'Tapisan', + 'not_applicable' => 'N/A', + 'No' => 'Tidak', + 'No items found, try to broaden your search' => 'Tiada data ditemui. Sila perluaskan carian anda', + 'of' => 'daripada', + 'Remove filter option' => 'Keluarkan pilihan tapisan', + 'Remove sort option' => 'Keluarkan pilihan sususan', + 'Reorder' => 'menyusun semula', + 'results' => 'keputusan', + 'row' => 'barisan', + 'rows' => 'barisan', + 'rows, do you want to select all' => 'barisan, adakah anda mahu pilih semua?', + 'Search' => 'Carian', + 'Select All' => 'Pilih Semua', + 'Showing' => 'Menunjukkan', + 'to' => 'ke', + 'Yes' => 'ya', + 'You are currently selecting all' => 'Anda sedang memilih semua', + 'You are not connected to the internet' => 'Anda tidak disambungkan ke internet', + 'You have selected' => 'Anda telah memilih', +]; diff --git a/resources/lang/php/nb/core.php b/resources/lang/php/nb/core.php new file mode 100644 index 000000000..9bcef1082 --- /dev/null +++ b/resources/lang/php/nb/core.php @@ -0,0 +1,38 @@ + 'Alle', + 'All Columns' => 'Alle kolonner', + 'Applied Filters' => 'Anvendte filtre', + 'Applied Sorting' => 'Anvendt sortering', + 'Bulk Actions' => 'Massehandlinger', + 'Bulk Actions Confirm' => 'Er du sikker?', + 'Clear' => 'Tøm', + 'Columns' => 'Kolonner', + 'Debugging Values' => 'Debugger verdier', + 'Deselect All' => 'Opphev valg for alle', + 'Done Reordering' => 'Ferdig med omorganisering', + 'Filters' => 'Filtre', + 'max' => 'Maks', + 'min' => 'Min', + 'not_applicable' => 'I/T', + 'No' => 'Nei', + 'No items found, try to broaden your search' => 'Ingen elementer funnet. Prøv å utvide søket', + 'of' => 'av', + 'Remove filter option' => 'Fjern filtervalg', + 'Remove sort option' => 'Fjern sorteringsvalg', + 'Reorder' => 'Omorganiser', + 'results' => 'resultater', + 'row' => 'rad', + 'rows' => 'rader', + 'rows, do you want to select all' => 'rader, vil du velge alle', + 'Search' => 'Søk', + 'Select All' => 'Velg alle', + 'Select All On Page' => 'Velg alle på siden', + 'Showing' => 'Viser', + 'to' => 'til', + 'Yes' => 'Ja', + 'You are currently selecting all' => 'Du velger for øyeblikket alle', + 'You are not connected to the internet' => 'Du er ikke tilkoblet internett', + 'You have selected' => 'Du har valgt', +]; diff --git a/resources/lang/php/nl/core.php b/resources/lang/php/nl/core.php new file mode 100644 index 000000000..ad1eb4c29 --- /dev/null +++ b/resources/lang/php/nl/core.php @@ -0,0 +1,36 @@ + 'Alle', + 'All Columns' => 'Alle kolommen', + 'Applied Filters' => 'Toegepaste filters', + 'Applied Sorting' => 'Toegepaste sortering', + 'Bulk Actions' => 'Bulkacties', + 'Bulk Actions Confirm' => 'Weet u het zeker?', + 'Clear' => 'Wissen', + 'Columns' => 'Kolommen', + 'Debugging Values' => 'Debugging waarden', + 'Deselect All' => 'Alles deselecteren', + 'Done Reordering' => 'Hersortering voltooid', + 'Filters' => 'Filters', + 'not_applicable' => 'N/A', + 'No' => 'Nee', + 'No items found, try to broaden your search' => 'Er zijn geen items gevonden. Probeer uw zoekopdracht te verfijnen', + 'of' => 'van', + 'Remove filter option' => 'Filteroptie verwijderen', + 'Remove sort option' => 'Sorteeroptie verwijderen', + 'Reorder' => 'Hersorteren', + 'results' => 'resultaten', + 'row' => 'rij', + 'rows' => 'rijen', + 'rows, do you want to select all' => 'rijen, wilt u alles selecteren', + 'Search' => 'Zoeken', + 'Select All' => 'Alles selecteren', + 'Select All On Page' => 'Alles op deze pagina selecteren', + 'Showing' => 'Toont', + 'to' => 'tot', + 'Yes' => 'Ja', + 'You are currently selecting all' => 'Huidig heeft u alles geselecteerd', + 'You are not connected to the internet' => 'U bent niet verbonden met het internet', + 'You have selected' => 'U selecteerde', +]; diff --git a/resources/lang/php/pl/core.php b/resources/lang/php/pl/core.php new file mode 100644 index 000000000..144c73d8a --- /dev/null +++ b/resources/lang/php/pl/core.php @@ -0,0 +1,36 @@ + 'Wszystko', + 'All Columns' => 'Wszystkie kolumny', + 'Applied Filters' => 'Użyte filtry', + 'Applied Sorting' => 'Użyte sortowanie', + 'Bulk Actions' => 'Akcje zbiorowe', + 'Bulk Actions Confirm' => 'Czy zastosować ?', + 'Clear' => 'Wyczyść', + 'Columns' => 'Kolumny', + 'Debugging Values' => 'Wartości debugowania', + 'Deselect All' => 'Odznacz wszystko', + 'Done Reordering' => 'Done Reordering', + 'Filters' => 'Filtry', + 'not_applicable' => 'N/A', + 'No' => 'Nie', + 'No items found, try to broaden your search' => 'Brak rezultatów do wyświetlenia', + 'of' => 'z', + 'Remove filter option' => 'Usuń opcję filtra', + 'Remove sort option' => 'Usuń opcję sortowania', + 'Reorder' => 'Zmień kolejność', + 'results' => 'wyniki', + 'row' => 'wiersz', + 'rows' => 'wiersze', + 'rows, do you want to select all' => 'czy chcesz zaznaczyć wszystkie wiersze', + 'Search' => 'Szukaj', + 'Select All' => 'Zaznacz wszystko', + 'Select All On Page' => 'Zaznacz wszystko na stronie', + 'Showing' => 'Pokazywanie', + 'to' => 'do', + 'Yes' => 'Tak', + 'You are currently selecting all' => 'Aktualnie masz wszystko zaznaczone', + 'You are not connected to the internet' => 'Brak połączenia z internetem', + 'You have selected' => 'Masz wybrane', +]; diff --git a/resources/lang/php/pt/core.php b/resources/lang/php/pt/core.php new file mode 100644 index 000000000..308f853f1 --- /dev/null +++ b/resources/lang/php/pt/core.php @@ -0,0 +1,35 @@ + 'Tudo', + 'All Columns' => 'Todas as colunas', + 'Applied Filters' => 'Filtros Aplicados', + 'Applied Sorting' => 'Ordenação Aplicada', + 'Bulk Actions' => 'Ações Massivas', + 'Clear' => 'Limpar', + 'Columns' => 'Colunas', + 'Debugging Values' => 'Valores de depuração', + 'Deselect All' => 'Desmarcar Tudo', + 'Done Reordering' => 'Ordeanação finalizada', + 'Filters' => 'Filtros', + 'not_applicable' => 'N/A', + 'No' => 'Não', + 'No items found, try to broaden your search' => 'Nenhum resultado encontrado. Tente ampliar a sua pesquisa', + 'of' => 'de', + 'Remove filter option' => 'Remover opção de filtro', + 'Remove sort option' => 'Remover opção de ordenação', + 'Reorder' => 'Reordenar', + 'results' => 'resultados', + 'row' => 'linha', + 'rows' => 'linhas', + 'rows, do you want to select all' => 'linhas, pretende selecionar tudo', + 'Search' => 'Pesquisar', + 'Select All' => 'Seleccionar Tudo', + 'Select All On Page' => 'Selecione tudo na página', + 'Showing' => 'A mostrar', + 'to' => 'a', + 'Yes' => 'Sim', + 'You are currently selecting all' => 'Atualmente está a selecionar tudo', + 'You are not connected to the internet' => 'Não está ligado à internet', + 'You have selected' => 'Selecionou', +]; diff --git a/resources/lang/php/pt_BR/core.php b/resources/lang/php/pt_BR/core.php new file mode 100644 index 000000000..af83595e6 --- /dev/null +++ b/resources/lang/php/pt_BR/core.php @@ -0,0 +1,36 @@ + 'Tudo', + 'All Columns' => 'Todas as colunas', + 'Applied Filters' => 'Filtros aplicados', + 'Applied Sorting' => 'Ordenação aplicada', + 'Bulk Actions' => 'Ações em massa', + 'Bulk Actions Confirm' => 'Tem certeza', + 'Clear' => 'Limpar', + 'Columns' => 'Colunas', + 'Debugging Values' => 'Valores de depuração', + 'Deselect All' => 'Desmarcar Tudo', + 'Done Reordering' => 'Ordenação finalizada', + 'Filters' => 'Filtros', + 'not_applicable' => 'N/A', + 'No' => 'Não', + 'No items found, try to broaden your search' => 'Nenhum resultado encontrado. Tente ampliar a sua pesquisa', + 'of' => 'de', + 'Reorder' => 'Reordenar', + 'results' => 'resultados', + 'Remove filter option' => 'Remover opção de filtro', + 'Remove sort option' => 'Remover opção de ordenação', + 'row' => 'linha', + 'rows' => 'linhas', + 'rows, do you want to select all' => 'linhas, você deseja selecionar tudo?', + 'Search' => 'Pesquisar', + 'Select All' => 'Selecionar tudo', + 'Select All On Page' => 'Selecione tudo na página', + 'Showing' => 'Exibindo', + 'to' => 'a', + 'Yes' => 'Sim', + 'You are currently selecting all' => 'Você selecionou tudo', + 'You are not connected to the internet' => 'Você não está conectado na internet', + 'You have selected' => 'Você selecionou', +]; diff --git a/resources/lang/php/ru/core.php b/resources/lang/php/ru/core.php new file mode 100644 index 000000000..0cf6dcbce --- /dev/null +++ b/resources/lang/php/ru/core.php @@ -0,0 +1,34 @@ + 'Все', + 'All Columns' => 'Все столбцы', + 'Applied Filters' => 'Примененные фильтры', + 'Applied Sorting' => 'Примененная сортировка', + 'Bulk Actions' => 'Массовые действия', + 'Clear' => 'Очистить', + 'Columns' => 'Столбцы', + 'Debugging Values' => 'Отладочные значения', + 'Deselect All' => 'Снять выделение', + 'Done Reordering' => 'Сортировка выполнена', + 'Filters' => 'Фильтры', + 'not_applicable' => 'N/A', + 'No' => 'Нет', + 'No items found, try to broaden your search' => 'Ничего не найдено. Попробуйте расширить поиск', + 'of' => 'из', + 'Remove filter option' => 'Удалить фильтр', + 'Remove sort option' => 'Удалить параметр сортировки', + 'Reorder' => 'Переупорядочить', + 'results' => 'результатов', + 'row' => 'ряды', + 'rows' => 'ряды', + 'rows, do you want to select all' => 'ряды, вы хотите выбрать все', + 'Search' => 'Поиск', + 'Select All' => 'Выбрать все', + 'Showing' => 'Показано с', + 'to' => 'к', + 'Yes' => 'Да', + 'You are currently selecting all' => 'Вы выбираете все', + 'You are not connected to the internet' => 'Вы не подключены к Интернету', + 'You have selected' => 'Вы выбрали', +]; diff --git a/resources/lang/php/sq/core.php b/resources/lang/php/sq/core.php new file mode 100644 index 000000000..3ea3ea6b9 --- /dev/null +++ b/resources/lang/php/sq/core.php @@ -0,0 +1,38 @@ + 'Të gjitha', + 'All Columns' => 'Të gjitha kolonat', + 'Applied Filters' => 'Filtrat e aplikuara', + 'Applied Sorting' => 'Renditja e aplikuar', + 'Bulk Actions' => 'Veprime në masë', + 'Bulk Actions Confirm' => 'A jeni i sigurt?', + 'Clear' => 'Pastro', + 'Columns' => 'Kolonat', + 'Debugging Values' => 'Vlerat e korrigjimit', + 'Deselect All' => 'Heq të gjitha', + 'Done Reordering' => 'Përfundoi riorganizimi', + 'Filters' => 'Filtrat', + 'max' => 'Maksimumi', + 'min' => 'Minimumi', + 'not_applicable' => 'N/A', + 'No' => 'Jo', + 'No items found, try to broaden your search' => 'Nuk u gjetën artikuj. Provoni të zgjeroni kërkimin tuaj', + 'of' => 'nga', + 'Remove filter option' => 'Hiq opsionin e filtrit', + 'Remove sort option' => 'Hiq opsionin e renditjes', + 'Reorder' => 'Riorganizo', + 'results' => 'rezultate', + 'row' => 'rreshti', + 'rows' => 'rreshtat', + 'rows, do you want to select all' => 'rreshtat, dëshironi të zgjidhni të gjitha', + 'Search' => 'Kërko', + 'Select All' => 'Zgjidh të gjitha', + 'Select All On Page' => 'Zgjidh të gjitha në faqe', + 'Showing' => 'Duke treguar', + 'to' => 'te', + 'Yes' => 'Po', + 'You are currently selecting all' => 'Po zgjedhni të gjitha aktualisht', + 'You are not connected to the internet' => 'Nuk jeni të lidhur me internetin', + 'You have selected' => 'Keni zgjedhur', +]; diff --git a/resources/lang/php/sv/core.php b/resources/lang/php/sv/core.php new file mode 100644 index 000000000..b3630fe7c --- /dev/null +++ b/resources/lang/php/sv/core.php @@ -0,0 +1,38 @@ + 'Alla', + 'All Columns' => 'Alla Kolumner', + 'Applied Filters' => 'Valda filter', + 'Applied Sorting' => 'Vald sortering', + 'Bulk Actions' => 'Bulk Modifiering', + 'Bulk Actions Confirm' => 'Är du säker?', + 'Clear' => 'Rensa', + 'Columns' => 'Kolumner', + 'Debugging Values' => 'Debug Värden', + 'Deselect All' => 'Avmarkera alla', + 'Done Reordering' => 'Omordning klart', + 'Filters' => 'Filter', + 'max' => 'Max', + 'min' => 'Min', + 'not_applicable' => 'N/A', + 'No' => 'Nej', + 'No items found, try to broaden your search' => 'Inga föremål hittades. Försök vidga din sökning', + 'of' => 'av', + 'Remove filter option' => 'Rensa valt filter', + 'Remove sort option' => 'Rensa vald sortering', + 'Reorder' => 'Omordna', + 'results' => 'resultat', + 'row' => 'rad', + 'rows' => 'rader', + 'rows, do you want to select all' => 'rader, vill du markera alla', + 'Search' => 'Sök', + 'Select All' => 'Markera alla', + 'Select All On Page' => 'Markera alla på sidan', + 'Showing' => 'Visar', + 'to' => 'till', + 'Yes' => 'Ja', + 'You are currently selecting all' => 'Du markerar för närvarande alla', + 'You are not connected to the internet' => 'Du är inte uppkopplad till internet', + 'You have selected' => 'Du har markerat', +]; diff --git a/resources/lang/php/th/core.php b/resources/lang/php/th/core.php new file mode 100644 index 000000000..bcbe31590 --- /dev/null +++ b/resources/lang/php/th/core.php @@ -0,0 +1,36 @@ + 'ทั้งหมด', + 'All Columns' => 'คอลัมน์ทั้งหมด', + 'Applied Filters' => 'กรองข้อมูลตาม', + 'Applied Sorting' => 'เรียงลำดับตาม', + 'Bulk Actions' => 'เลือกการกระทำ', + 'Bulk Actions Confirm' => 'คุณแน่ใจ?', + 'Clear' => 'ล้างทั้งหมด', + 'Columns' => 'เลือกคอลัมน์', + 'Debugging Values' => 'ค่าการดีบัก', + 'Deselect All' => 'ไม่เลือกทั้งหมด', + 'Done Reordering' => 'จัดลำดับแล้ว', + 'Filters' => 'ตัวกรอง', + 'not_applicable' => 'N/A', + 'No' => 'เลขที่', + 'No items found, try to broaden your search' => 'ไม่พบรายการที่ค้นหา', + 'of' => 'จาก', + 'Remove filter option' => 'เอาตัวกรองออก', + 'Remove sort option' => 'เอาการเรียงลำดับออก', + 'Reorder' => 'จัดลำดับ', + 'results' => 'รายการ', + 'row' => 'รายการ', + 'rows' => 'รายการ', + 'rows, do you want to select all' => 'รายการ, คุณต้องการเลือกทั้งหมด', + 'Search' => 'ค้นหา...', + 'Select All' => 'เลือกทั้งหมด', + 'Select All On Page' => 'เลือกทั้งหมดบนหน้า', + 'Showing' => 'แสดง', + 'to' => '-', + 'Yes' => 'ใช่', + 'You are currently selecting all' => 'ขณะนี้คุณได้เลือกทุกรายการ', + 'You are not connected to the internet' => 'ขณะนี้คุณไม่ได้เชื่อมต่อกับอินเทอร์เน็ต', + 'You have selected' => 'คุณเลือก', +]; diff --git a/resources/lang/php/tk/core.php b/resources/lang/php/tk/core.php new file mode 100644 index 000000000..33eaedc68 --- /dev/null +++ b/resources/lang/php/tk/core.php @@ -0,0 +1,34 @@ + 'Hemmesi', + 'All Columns' => 'Colhli sütünler', + 'Applied Filters' => 'Ulanylýan Süzgüçler', + 'Applied Sorting' => 'Ulanylýan Tertipleşdirme', + 'Bulk Actions' => 'Köpçülikleýin Hereketler', + 'Clear' => 'Arassala', + 'Columns' => 'Sütünler', + 'Debugging Values' => 'Gymmatlyklary düzetmek', + 'Deselect All' => 'Hemmesini Aýyr', + 'Done Reordering' => 'Täzeden Tertiplendi', + 'Filters' => 'Süzgüçler', + 'not_applicable' => 'N/A', + 'No' => 'Hayir', + 'No items found, try to broaden your search' => 'Hiç zat tapylmady. Gözlegiňizi giňeltmäge synanyşyň', + 'of' => 'aralygy', + 'Remove filter option' => 'Süzgüç görnüşini aýyryň', + 'Remove sort option' => 'Tertiplemek görnüşini aýyryň', + 'Reorder' => 'Tertibe salmak', + 'results' => 'netijeler', + 'row' => 'hatarlar', + 'rows' => 'hatarlar', + 'rows, do you want to select all' => 'hatarlar, hemmesini saýlamak isleýärsiňizmi?', + 'Search' => 'Gözlemek', + 'Select All' => 'Hepsini seç', + 'Showing' => 'Görkezmek', + 'to' => '-', + 'Yes' => 'Evet', + 'You are currently selecting all' => 'Häzirki wagtda hemmesini saýlap alýarsyňyz', + 'You are not connected to the internet' => 'Siz internete birikmediksiňiz', + 'You have selected' => 'Saýladyňyz', +]; diff --git a/resources/lang/php/tr/core.php b/resources/lang/php/tr/core.php new file mode 100644 index 000000000..6bb8b12e9 --- /dev/null +++ b/resources/lang/php/tr/core.php @@ -0,0 +1,34 @@ + 'Tümü', + 'All Columns' => 'Tüm Sütunlar', + 'Applied Filters' => 'Aktif Filtreler', + 'Applied Sorting' => 'Aktif Sıralamalar', + 'Bulk Actions' => 'Toplu İşlemler', + 'Clear' => 'Kaldır', + 'Columns' => 'Kolonlar', + 'Debugging Values' => 'Debug Değerleri', + 'Deselect All' => 'Seçimleri kaldır', + 'Done Reordering' => 'Sıralamayı Tamamla', + 'Filters' => 'Filtreler', + 'not_applicable' => 'N/A', + 'No' => 'HAYIR', + 'No items found, try to broaden your search' => 'Kayıt bulunamadı', + 'of' => ' ', + 'Remove filter option' => 'Filtre seçeneğini kaldır', + 'Remove sort option' => 'Sıralama seçeneğini kaldır', + 'Reorder' => 'Yeniden Sırala', + 'results' => 'toplam sonuç', + 'row' => 'satır', + 'rows' => 'satır', + 'rows, do you want to select all' => 'satır seçtiniz. Hepsini seçmek ister misiniz?', + 'Search' => 'Ara', + 'Select All' => 'Hepsini seç', + 'Showing' => 'Gösterilen', + 'to' => ' - ', + 'Yes' => 'Evet', + 'You are currently selecting all' => 'Hepsini seçtiniz.', + 'You are not connected to the internet' => 'İnternet bağlantınız kesildi', + 'You have selected' => 'Siz seçildiniz', +]; diff --git a/resources/lang/php/tw/core.php b/resources/lang/php/tw/core.php new file mode 100644 index 000000000..ff83d8a17 --- /dev/null +++ b/resources/lang/php/tw/core.php @@ -0,0 +1,36 @@ + '全部', + 'All Columns' => '所有專欄', + 'Applied Filters' => '已套用的過濾規則', + 'Applied Sorting' => '已套用的搜尋規則', + 'Bulk Actions' => '批次操作', + 'Bulk Actions Confirm' => '你確定嗎', + 'Clear' => '清除', + 'Columns' => '欄位', + 'Debugging Values' => '調試值', + 'Deselect All' => '取消選擇', + 'Done Reordering' => '排序完成', + 'Filters' => '過濾規則', + 'not_applicable' => 'N/A', + 'No' => '不', + 'No items found, try to broaden your search' => '無資料呈現。請嘗試擴大搜尋範圍', + 'of' => '筆資料,共', + 'Reorder' => '重新排序', + 'Remove filter option' => '移除過濾規則', + 'Remove sort option' => '移除排序規則', + 'results' => '筆資料', + 'row' => '筆資料', + 'rows' => '筆資料', + 'rows, do you want to select all' => '筆資料,您是否要全選', + 'Search' => '搜尋', + 'Select All' => '搜尋全部', + 'Select All On Page' => '选择页面上的所有内容', + 'Showing' => '顯示', + 'to' => '至', + 'Yes' => '是的', + 'You are currently selecting all' => '您目前已選擇全部資料', + 'You are not connected to the internet' => '目前為離線模式', + 'You have selected' => '您已選擇', +]; diff --git a/resources/lang/php/uk/core.php b/resources/lang/php/uk/core.php new file mode 100644 index 000000000..c0ea65f92 --- /dev/null +++ b/resources/lang/php/uk/core.php @@ -0,0 +1,37 @@ + 'Всі', + 'All Columns' => 'Усі стовпці', + 'Applied Filters' => 'Застосовані фільтри', + 'Applied Sorting' => 'Застосовані сортування', + 'Bulk Actions' => 'Масові дії', + 'Bulk Actions Confirm' => 'Vy vpevneni?', + 'Clear' => 'Очистити', + 'Columns' => 'Колонки', + 'Debugging Values' => 'Значення налагодження', + 'Deselect All' => 'Зняти вибір із усіх', + 'Done Reordering' => 'Сортування виконанно', + 'Filters' => 'Фільтри', + 'not_applicable' => 'N/A', + 'No' => 'Немає', + 'No items found, try to broaden your search' => 'Немає елементів. Спробуйте розширити пошук', + 'of' => 'від', + 'Remove filter option' => 'Видалити опцію фільтра', + 'Remove sort option' => 'Видалити параметр сортування', + 'Reorder' => 'Змінити порядок', + 'results' => 'результатів', + 'row' => 'рядки', + 'rows' => 'рядки', + 'rows, do you want to select all' => 'рядків, ви хочете вибрати всі', + 'Search' => 'Пошук', + 'Select All' => 'Вибрати все', + 'Select All On Page' => 'Виберіть «Усі на сторінці', + 'Showing' => 'Показано', + 'to' => 'до', + 'Unselect All' => 'Прибрати вибір усіх', + 'Yes' => 'Так', + 'You are currently selecting all' => 'Наразі ви вибираєте всі', + 'You are not connected to the internet' => 'Ви не підключені до Інтернету', + 'You have selected' => 'Ви вибрали', +]; diff --git a/resources/lang/pt.json b/resources/lang/pt.json deleted file mode 100644 index fd12aafbf..000000000 --- a/resources/lang/pt.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Tudo", - "All Columns": "Todas as colunas", - "Applied Filters": "Filtros Aplicados", - "Applied Sorting": "Ordenação Aplicada", - "Bulk Actions": "Ações Massivas", - "Clear": "Limpar", - "Columns": "Colunas", - "Debugging Values": "Valores de depuração", - "Deselect All": "Desmarcar Tudo", - "Done Reordering": "Ordeanação finalizada", - "Filters": "Filtros", - "No": "Não", - "No items found. Try to broaden your search.": "Nenhum resultado encontrado. Tente ampliar a sua pesquisa.", - "of": "de", - "Remove filter option": "Remover opção de filtro", - "Remove sort option": "Remover opção de ordenação", - "Reorder": "Reordenar", - "results": "resultados", - "row": "linha", - "rows": "linhas", - "rows, do you want to select all": "linhas, pretende selecionar tudo", - "Search": "Pesquisar", - "Select All": "Seleccionar Tudo", - "Showing": "A mostrar", - "to": "a", - "Yes": "Sim", - "You are currently selecting all": "Atualmente está a selecionar tudo", - "You are not connected to the internet.": "Não está ligado à internet.", - "You have selected": "Selecionou" -} \ No newline at end of file diff --git a/resources/lang/pt_BR.json b/resources/lang/pt_BR.json deleted file mode 100644 index 9bf168d13..000000000 --- a/resources/lang/pt_BR.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "All": "Tudo", - "Applied Filters": "Filtros aplicados", - "Applied Sorting": "Ordenação aplicada", - "Bulk Actions": "Ações em massa", - "Clear": "Limpar", - "Columns": "Colunas", - "Debugging Values": "Valores de depuração", - "Deselect All": "Desmarcar Tudo", - "Done Reordering": "Ordenação finalizada", - "Filters": "Filtros", - "No": "Não", - "No items found. Try to broaden your search.": "Nenhum resultado encontrado. Tente ampliar a sua pesquisa.", - "of": "de", - "Reorder": "Reordenar", - "results": "resultados", - "Remove filter option": "Remover opção de filtro", - "Remove sort option": "Remover opção de ordenação", - "row": "linha", - "rows": "linhas", - "rows, do you want to select all": "linhas, você deseja selecionar tudo?", - "Search": "Pesquisar", - "Select All": "Selecionar tudo", - "Showing": "Exibindo", - "to": "a", - "Yes": "Sim", - "You are currently selecting all": "Você selecionou tudo", - "You are not connected to the internet.": "Você não está conectado na internet.", - "You have selected": "Você selecionou" -} \ No newline at end of file diff --git a/resources/lang/ru.json b/resources/lang/ru.json deleted file mode 100644 index 7eb99d1f9..000000000 --- a/resources/lang/ru.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Все", - "All Columns": "Все столбцы", - "Applied Filters": "Примененные фильтры", - "Applied Sorting": "Примененная сортировка", - "Bulk Actions": "Массовые действия", - "Clear": "Очистить", - "Columns": "Столбцы", - "Debugging Values": "Отладочные значения", - "Deselect All": "Снять выделение", - "Done Reordering": "Сортировка выполнена", - "Filters": "Фильтры", - "No": "Нет", - "No items found. Try to broaden your search.": "Ничего не найдено. Попробуйте расширить поиск.", - "of": "из", - "Remove filter option": "Удалить фильтр", - "Remove sort option": "Удалить параметр сортировки", - "Reorder": "Переупорядочить", - "results": "результатов", - "row": "ряды", - "rows": "ряды", - "rows, do you want to select all": "ряды, вы хотите выбрать все", - "Search": "Поиск", - "Select All": "Выбрать все", - "Showing": "Показано с", - "to": "к", - "Yes": "Да", - "You are currently selecting all": "Вы выбираете все", - "You are not connected to the internet.": "Вы не подключены к Интернету", - "You have selected": "Вы выбрали" -} \ No newline at end of file diff --git a/resources/lang/th.json b/resources/lang/th.json deleted file mode 100644 index 34904172c..000000000 --- a/resources/lang/th.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "All": "ทั้งหมด", - "Applied Filters": "กรองข้อมูลตาม", - "Applied Sorting": "เรียงลำดับตาม", - "Bulk Actions": "เลือกการกระทำ", - "Clear": "ล้างทั้งหมด", - "Columns": "เลือกคอลัมน์", - "Debugging Values": "ค่าการดีบัก", - "Deselect All": "ไม่เลือกทั้งหมด", - "Done Reordering": "จัดลำดับแล้ว", - "Filters": "ตัวกรอง", - "No": "เลขที่", - "No items found. Try to broaden your search.": "ไม่พบรายการที่ค้นหา", - "of": "จาก", - "Remove filter option": "เอาตัวกรองออก", - "Remove sort option": "เอาการเรียงลำดับออก", - "Reorder": "จัดลำดับ", - "results": "รายการ", - "row": "รายการ", - "rows": "รายการ", - "rows, do you want to select all": "รายการ, คุณต้องการเลือกทั้งหมด", - "Search": "ค้นหา...", - "Select All": "เลือกทั้งหมด", - "Showing": "แสดง", - "to": "-", - "Yes": "ใช่", - "You are currently selecting all": "ขณะนี้คุณได้เลือกทุกรายการ", - "You are not connected to the internet.": "ขณะนี้คุณไม่ได้เชื่อมต่อกับอินเทอร์เน็ต", - "You have selected": "คุณเลือก" -} \ No newline at end of file diff --git a/resources/lang/tk.json b/resources/lang/tk.json deleted file mode 100644 index 78bb1460b..000000000 --- a/resources/lang/tk.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Hemmesi", - "All Columns": "Colhli sütünler", - "Applied Filters": "Ulanylýan Süzgüçler", - "Applied Sorting": "Ulanylýan Tertipleşdirme", - "Bulk Actions": "Köpçülikleýin Hereketler", - "Clear": "Arassala", - "Columns": "Sütünler", - "Debugging Values": "Gymmatlyklary düzetmek", - "Deselect All": "Hemmesini Aýyr", - "Done Reordering": "Täzeden Tertiplendi", - "Filters": "Süzgüçler", - "No": "Hayir", - "No items found. Try to broaden your search.": "Hiç zat tapylmady. Gözlegiňizi giňeltmäge synanyşyň.", - "of": "aralygy", - "Remove filter option": "Süzgüç görnüşini aýyryň", - "Remove sort option": "Tertiplemek görnüşini aýyryň", - "Reorder": "Tertibe salmak", - "results": "netijeler", - "row": "hatarlar", - "rows": "hatarlar", - "rows, do you want to select all": "hatarlar, hemmesini saýlamak isleýärsiňizmi?", - "Search": "Gözlemek", - "Select All": "Hepsini seç", - "Showing": "Görkezmek", - "to": "-", - "Yes": "Evet", - "You are currently selecting all": "Häzirki wagtda hemmesini saýlap alýarsyňyz", - "You are not connected to the internet.": "Siz internete birikmediksiňiz.", - "You have selected": "Saýladyňyz" -} \ No newline at end of file diff --git a/resources/lang/tr.json b/resources/lang/tr.json deleted file mode 100644 index a6c5c01f1..000000000 --- a/resources/lang/tr.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "Tümü", - "All Columns": "Tüm Sütunlar", - "Applied Filters": "Aktif Filtreler", - "Applied Sorting": "Aktif Sıralamalar", - "Bulk Actions": "Toplu İşlemler", - "Clear": "Kaldır", - "Columns": "Kolonlar", - "Debugging Values": "Debug Değerleri", - "Deselect All": "Seçimleri kaldır", - "Done Reordering": "Sıralamayı Tamamla", - "Filters": "Filtreler", - "No": "HAYIR", - "No items found. Try to broaden your search.": "Kayıt bulunamadı.", - "of": " ", - "Remove filter option": "Filtre seçeneğini kaldır", - "Remove sort option": "Sıralama seçeneğini kaldır", - "Reorder": "Yeniden Sırala", - "results": "toplam sonuç", - "row": "satır", - "rows": "satır", - "rows, do you want to select all": "satır seçtiniz. Hepsini seçmek ister misiniz?", - "Search": "Ara", - "Select All": "Hepsini seç", - "Showing": "Gösterilen", - "to": " - ", - "Yes": "Evet", - "You are currently selecting all": "Hepsini seçtiniz.", - "You are not connected to the internet.": "İnternet bağlantınız kesildi.", - "You have selected": "Siz seçildiniz" -} \ No newline at end of file diff --git a/resources/lang/tw.json b/resources/lang/tw.json deleted file mode 100644 index 6599bfdb7..000000000 --- a/resources/lang/tw.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "All": "全部", - "All Columns": "所有專欄", - "Applied Filters": "已套用的過濾規則", - "Applied Sorting": "已套用的搜尋規則", - "Bulk Actions": "批次操作", - "Clear": "清除", - "Columns": "欄位", - "Debugging Values": "調試值", - "Deselect All": "取消選擇", - "Done Reordering": "排序完成", - "Filters": "過濾規則", - "No": "不", - "No items found. Try to broaden your search.": "無資料呈現。請嘗試擴大搜尋範圍。", - "of": "筆資料,共", - "Reorder": "重新排序", - "Remove filter option": "移除過濾規則", - "Remove sort option": "移除排序規則", - "results": "筆資料", - "row": "筆資料", - "rows": "筆資料", - "rows, do you want to select all": "筆資料,您是否要全選", - "Search": "搜尋", - "Select All": "搜尋全部", - "Showing": "顯示", - "to": "至", - "Yes": "是的", - "You are currently selecting all": "您目前已選擇全部資料", - "You are not connected to the internet.": "目前為離線模式", - "You have selected": "您已選擇" -} \ No newline at end of file diff --git a/resources/lang/uk.json b/resources/lang/uk.json deleted file mode 100644 index 778560124..000000000 --- a/resources/lang/uk.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "All": "Всі", - "All Columns": "Усі стовпці", - "Applied Filters": "Застосовані фільтри", - "Applied Sorting": "Застосовані сортування", - "Bulk Actions": "Масові дії", - "Clear": "Очистити", - "Columns": "Колонки", - "Debugging Values": "Значення налагодження", - "Deselect All": "Зняти вибір із усіх", - "Done Reordering": "Сортування виконанно", - "Filters": "Фільтри", - "No": "Немає", - "No items found. Try to broaden your search.": "Немає елементів. Спробуйте розширити пошук.", - "of": "від", - "Remove filter option": "Видалити опцію фільтра", - "Remove sort option": "Видалити параметр сортування", - "Reorder": "Змінити порядок", - "results": "результатів", - "row": "рядки", - "rows": "рядки", - "rows, do you want to select all": "рядків, ви хочете вибрати всі", - "Search": "Пошук", - "Select All": "Вибрати все", - "Showing": "Показано", - "to": "до", - "Unselect All": "Прибрати вибір усіх", - "Yes": "Так", - "You are currently selecting all": "Наразі ви вибираєте всі", - "You are not connected to the internet.": "Ви не підключені до Інтернету.", - "You have selected": "Ви вибрали" -} \ No newline at end of file diff --git a/resources/views/components/external/filters/livewire-array-filter.blade.php b/resources/views/components/external/filters/livewire-array-filter.blade.php new file mode 100644 index 000000000..6a5bd30d0 --- /dev/null +++ b/resources/views/components/external/filters/livewire-array-filter.blade.php @@ -0,0 +1,4 @@ +
    + {{ $slot }} +
    \ No newline at end of file diff --git a/resources/views/components/forms/checkbox.blade.php b/resources/views/components/forms/checkbox.blade.php new file mode 100644 index 000000000..4b2b9b940 --- /dev/null +++ b/resources/views/components/forms/checkbox.blade.php @@ -0,0 +1,11 @@ +@aware(['tableName','primaryKey', 'isTailwind', 'isBootstrap', 'isBootstrap4', 'isBootstrap5']) +@props(['checkboxAttributes']) +merge($checkboxAttributes)->class([ + 'border-gray-300 text-indigo-600 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600' => ($isTailwind) && ($checkboxAttributes['default-colors'] ?? ($checkboxAttributes['default'] ?? true)), + 'rounded shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => ($isTailwind) && ($checkboxAttributes['default-styling'] ?? ($checkboxAttributes['default'] ?? true)), + 'form-check-input' => ($isBootstrap5) && ($checkboxAttributes['default'] ?? true), + ])->except(['default','default-styling','default-colors']) + }} +/> \ No newline at end of file diff --git a/resources/views/components/includes/actions.blade.php b/resources/views/components/includes/actions.blade.php index 422381ed1..837d6a136 100644 --- a/resources/views/components/includes/actions.blade.php +++ b/resources/views/components/includes/actions.blade.php @@ -1,12 +1,21 @@ +@aware(['isTailwind', 'isBootstrap']) +@php($actionWrapperAttributes = $this->getActionWrapperAttributes())
    merge($this->getActionWrapperAttributes()) - ->class(['flex flex-cols justify-center' => $this->isTailwind && $this->getActionWrapperAttributes()['default-styling'] ?? true]) - ->class(['' => $this->isTailwind && $this->getActionWrapperAttributes()['default-colors'] ?? true]) - ->class(['d-flex flex-cols justify-center' => $this->isBootstrap && $this->getActionWrapperAttributes()['default-styling'] ?? true]) - ->class(['' => $this->isBootstrap && $this->getActionWrapperAttributes()['default-colors'] ?? true]) - ->except(['default-styling','default-colors']) + ->merge($this->actionWrapperAttributes) + ->class([ + 'flex flex-cols py-2 space-x-2' => $isTailwind && ($actionWrapperAttributes['default-styling'] ?? true), + '' => $isTailwind && ($actionWrapperAttributes['default-colors'] ?? true), + 'd-flex flex-cols py-2 space-x-2' => $isBootstrap && ($this->actionWrapperAttributes['default-styling'] ?? true), + '' => $isBootstrap && ($actionWrapperAttributes['default-colors'] ?? true), + 'justify-start' => $this->getActionsPosition === 'left', + 'justify-center' => $this->getActionsPosition === 'center', + 'justify-end' => $this->getActionsPosition === 'right', + 'pl-2' => $this->showActionsInToolbar && $this->getActionsPosition === 'left', + 'pr-2' => $this->showActionsInToolbar && $this->getActionsPosition === 'right', + ]) + ->except(['default','default-styling','default-colors']) }} > @foreach($this->getActions as $action) {{ $action->render() }} @endforeach -
    \ No newline at end of file + diff --git a/resources/views/components/includes/loading.blade.php b/resources/views/components/includes/loading.blade.php index b60d41016..6d7eaf7a3 100644 --- a/resources/views/components/includes/loading.blade.php +++ b/resources/views/components/includes/loading.blade.php @@ -1,35 +1,42 @@ -@aware(['isTailwind', 'isBootstrap', 'tableName', 'component']) +@aware(['tableName','isTailwind','isBootstrap']) @props(['colCount' => 1]) @php -$customAttributes['loader-wrapper'] = $this->getLoadingPlaceHolderWrapperAttributes(); -$customAttributes['loader-icon'] = $this->getLoadingPlaceHolderIconAttributes(); + $loaderRow = $this->getLoadingPlaceHolderRowAttributes(); + $loaderCell = $this->getLoadingPlaceHolderCellAttributes(); + $loaderIcon = $this->getLoadingPlaceHolderIconAttributes(); @endphp -@if($this->hasLoadingPlaceholderBlade()) - @include($this->getLoadingPlaceHolderBlade(), ['colCount' => $colCount]) -@else - merge($customAttributes['loader-wrapper']) - ->class(['w-full text-center h-screen place-items-center align-middle' => $isTailwind && ($customAttributes['loader-wrapper']['default'] ?? true)]) - ->class(['w-100 text-center h-100 align-items-center' => $isBootstrap && ($customAttributes['loader-wrapper']['default'] ?? true)]); - }} - wire:loading.class.remove="hidden d-none" - > - +merge($loaderRow) + ->class([ + 'hidden w-full text-center place-items-center align-middle' => $isTailwind && ($loaderRow['default'] ?? true), + 'd-none w-100 text-center align-items-center' => $isBootstrap && ($loaderRow['default'] ?? true), + ]) + ->except(['default','default-styling','default-colors']) +}}> + merge($loaderCell) + ->class([ + 'py-4' => $isTailwind && ($loaderCell['default'] ?? true), + 'py-4' => $isBootstrap && ($loaderCell['default'] ?? true), + ]) + ->except(['default','default-styling','default-colors', 'colspan','wire:key']) + }}> + @if($this->hasLoadingPlaceholderBlade()) + @include($this->getLoadingPlaceHolderBlade(), ['colCount' => $colCount]) + @else
    -
    merge($customAttributes['loader-icon']) - ->class(['lds-hourglass' => $isTailwind && ($customAttributes['loader-icon']['default'] ?? true)]) - ->class(['lds-hourglass' => $isBootstrap && ($customAttributes['loader-icon']['default'] ?? true)]) - ->except('default'); - }} - >
    -
    {{ $this->getLoadingPlaceholderContent() }}
    +
    merge($loaderIcon) + ->class([ + 'lds-hourglass' => $isTailwind && ($loaderIcon['default'] ?? true), + 'lds-hourglass' => $isBootstrap && ($loaderIcon['default'] ?? true), + ]) + ->except(['default','default-styling','default-colors']) + }}>
    +
    {!! $this->getLoadingPlaceholderContent() !!}
    - - - -@endif + @endif + + diff --git a/resources/views/components/pagination.blade.php b/resources/views/components/pagination.blade.php index 846da2e06..633b31b24 100644 --- a/resources/views/components/pagination.blade.php +++ b/resources/views/components/pagination.blade.php @@ -1,157 +1,114 @@ -@aware(['component','isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) +@aware(['isTailwind','isBootstrap','isBootstrap4', 'isBootstrap5', 'localisationPath']) +@props(['currentRows']) +@includeWhen( + $this->hasConfigurableAreaFor('before-pagination'), + $this->getConfigurableAreaFor('before-pagination'), + $this->getParametersForConfigurableArea('before-pagination') +) -@if ($this->hasConfigurableAreaFor('before-pagination')) - @include($this->getConfigurableAreaFor('before-pagination'), $this->getParametersForConfigurableArea('before-pagination')) -@endif - -@if ($this->isTailwind) -
    - @if ($this->paginationVisibilityIsEnabled()) +
    getPaginationWrapperAttributesBag() }}> + @if ($this->paginationVisibilityIsEnabled()) + @if ($isTailwind)
    - @if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1) + @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $currentRows->lastPage() > 1 && $this->showPaginationDetails)

    - @if($this->showPaginationDetails()) - @lang('Showing') - {{ $this->getRows->firstItem() }} - @lang('to') - {{ $this->getRows->lastItem() }} - @lang('of') + {{ __($localisationPath.'Showing') }} + {{ $currentRows->firstItem() }} + {{ __($localisationPath.'to') }} + {{ $currentRows->lastItem() }} + {{ __($localisationPath.'of') }} - @lang('results') - @endif + {{ __($localisationPath.'results') }}

    - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('simple')) + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('simple') && $this->showPaginationDetails)

    - @if($this->showPaginationDetails()) - @lang('Showing') - {{ $this->getRows->firstItem() }} - @lang('to') - {{ $this->getRows->lastItem() }} - @endif + {{ __($localisationPath.'Showing') }} + {{ $currentRows->firstItem() }} + {{ __($localisationPath.'to') }} + {{ $currentRows->lastItem() }}

    - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('cursor')) + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('cursor')) @else -

    - @lang('Showing') - {{ $this->getRows->count() }} - @lang('results') -

    + @if($this->showPaginationDetails) +

    + {{ __($localisationPath.'Showing') }} + {{ $currentRows->count() }} + {{ __($localisationPath.'results') }} +

    + @endif @endif
    - @if ($this->paginationIsEnabled()) - {{ $this->getRows->links('livewire-tables::specific.tailwind.'.(!$this->isPaginationMethod('standard') ? 'simple-' : '').'pagination') }} + @if ($this->paginationIsEnabled) + {{ $currentRows->links('livewire-tables::specific.tailwind.'.(!$this->isPaginationMethod('standard') ? 'simple-' : '').'pagination') }} @endif
    - @endif -
    -@elseif ($this->isBootstrap4) -
    - @if ($this->paginationVisibilityIsEnabled()) - @if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1) + @else + @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $currentRows->lastPage() > 1)
    - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.pagination') }} + {{ $currentRows->links('livewire-tables::specific.bootstrap-4.pagination') }}
    -
    - @if($this->showPaginationDetails()) - @lang('Showing') - {{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }} - @lang('to') - {{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }} - @lang('of') +
    $isBootstrap4, + "text-md-end" => $isBootstrap5, + ])> + @if($this->showPaginationDetails) + {{ __($localisationPath.'Showing') }} + {{ $currentRows->count() ? $currentRows->firstItem() : 0 }} + {{ __($localisationPath.'to') }} + {{ $currentRows->count() ? $currentRows->lastItem() : 0 }} + {{ __($localisationPath.'of') }} - @lang('results') + {{ __($localisationPath.'results') }} @endif
    - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('simple')) + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('simple'))
    - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} + {{ $currentRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }}
    -
    - @if($this->showPaginationDetails()) - @lang('Showing') - {{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }} - @lang('to') - {{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }} +
    $isBootstrap4, + "text-md-end" => $isBootstrap5, + ])> + @if($this->showPaginationDetails) + {{ __($localisationPath.'Showing') }} + {{ $currentRows->count() ? $currentRows->firstItem() : 0 }} + {{ __($localisationPath.'to') }} + {{ $currentRows->count() ? $currentRows->lastItem() : 0 }} @endif
    - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('cursor')) + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('cursor'))
    - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} + {{ $currentRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }}
    @else
    - @lang('Showing') - {{ $this->getRows->count() }} - @lang('results') -
    -
    - @endif - @endif -
    -@elseif ($this->isBootstrap5) -
    - @if ($this->paginationVisibilityIsEnabled()) - @if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1) -
    -
    - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.pagination') }} -
    -
    - @if($this->showPaginationDetails()) - @lang('Showing') - {{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }} - @lang('to') - {{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }} - @lang('of') - - @lang('results') + @if($this->showPaginationDetails) + {{ __($localisationPath.'Showing') }} + {{ $currentRows->count() }} + {{ __($localisationPath.'results') }} @endif
    - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('simple')) -
    -
    - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} -
    -
    - @if($this->showPaginationDetails()) - @lang('Showing') - {{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }} - @lang('to') - {{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }} - @endif -
    -
    - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('cursor')) -
    -
    - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} -
    -
    - @else -
    -
    - @lang('Showing') - {{ $this->getRows->count() }} - @lang('results') -
    -
    @endif @endif -
    -@endif + @endif +
    -@if ($this->hasConfigurableAreaFor('after-pagination')) - @include($this->getConfigurableAreaFor('after-pagination'), $this->getParametersForConfigurableArea('after-pagination')) -@endif \ No newline at end of file +@includeWhen( + $this->hasConfigurableAreaFor('after-pagination'), + $this->getConfigurableAreaFor('after-pagination'), + $this->getParametersForConfigurableArea('after-pagination') +) diff --git a/resources/views/components/table.blade.php b/resources/views/components/table.blade.php index 0b92e6f39..a972275b0 100644 --- a/resources/views/components/table.blade.php +++ b/resources/views/components/table.blade.php @@ -1,4 +1,4 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap']) +@aware([ 'tableName','isTailwind','isBootstrap']) @php $customAttributes = [ @@ -13,19 +13,24 @@
    merge($customAttributes['wrapper']) - ->class(['shadow overflow-y-auto border-b border-gray-200 dark:border-gray-700 sm:rounded-lg' => $customAttributes['wrapper']['default'] ?? true]) - ->except('default') }} + ->class([ + 'shadow overflow-y-auto border-b border-gray-200 dark:border-gray-700 sm:rounded-lg' => $customAttributes['wrapper']['default'] ?? true + ]) + ->except(['default','default-styling','default-colors']) }} > merge($customAttributes['table']) ->class(['min-w-full divide-y divide-gray-200 dark:divide-none' => $customAttributes['table']['default'] ?? true]) - ->except('default') }} + ->except(['default','default-styling','default-colors']) }} + > merge($customAttributes['thead']) - ->class(['bg-gray-50 dark:bg-gray-800' => $customAttributes['thead']['default'] ?? true]) - ->except('default') }} + ->class([ + 'bg-gray-50 dark:bg-gray-800' => $customAttributes['thead']['default'] ?? true + ]) + ->except(['default','default-styling','default-colors']) }} > {{ $thead }} @@ -36,37 +41,39 @@ wire:key="{{ $tableName }}-tbody" id="{{ $tableName }}-tbody" {{ $attributes->merge($customAttributes['tbody']) - ->class(['bg-white divide-y divide-gray-200 dark:bg-gray-800 dark:divide-none' => $customAttributes['tbody']['default'] ?? true]) - ->except('default') }} + ->class([ + 'bg-white divide-y divide-gray-200 dark:bg-gray-800 dark:divide-none' => $customAttributes['tbody']['default'] ?? true + ]) + ->except(['default','default-styling','default-colors']) }} > {{ $slot }} - @if (isset($tfoot)) + @isset($tfoot) {{ $tfoot }} - @endif + @endisset
    @elseif ($isBootstrap)
    merge($customAttributes['wrapper']) ->class(['table-responsive' => $customAttributes['wrapper']['default'] ?? true]) - ->except('default') }} + ->except(['default','default-styling','default-colors']) }} > merge($customAttributes['table']) ->class(['laravel-livewire-table table' => $customAttributes['table']['default'] ?? true]) - ->except('default') + ->except(['default','default-styling','default-colors']) }} > merge($customAttributes['thead']) ->class(['' => $customAttributes['thead']['default'] ?? true]) - ->except('default') }} + ->except(['default','default-styling','default-colors']) }} > {{ $thead }} @@ -78,16 +85,16 @@ id="{{ $tableName }}-tbody" {{ $attributes->merge($customAttributes['tbody']) ->class(['' => $customAttributes['tbody']['default'] ?? true]) - ->except('default') }} + ->except(['default','default-styling','default-colors']) }} > {{ $slot }} - @if (isset($tfoot)) + @isset($tfoot) {{ $tfoot }} - @endif + @endisset
    @endif diff --git a/resources/views/components/table/collapsed-columns.blade.php b/resources/views/components/table/collapsed-columns.blade.php index ba21ee2ba..c46097a7f 100644 --- a/resources/views/components/table/collapsed-columns.blade.php +++ b/resources/views/components/table/collapsed-columns.blade.php @@ -1,75 +1,49 @@ -@aware(['component', 'tableName', 'primaryKey','isTailwind','isBootstrap']) +@aware([ 'tableName', 'primaryKey','isTailwind','isBootstrap']) @props(['row', 'rowIndex']) -@php - $customAttributes = $this->getTrAttributes($row, $rowIndex); -@endphp - -@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns()) - @php - $colspan = $this->getColspanCount(); - $columns = collect(); - - if($this->shouldCollapseAlways()) - { - $columns->push($this->getCollapsedAlwaysColumns()); - } - if ($this->shouldCollapseOnMobile() && $this->shouldCollapseOnTablet()) { - $columns->push($this->getCollapsedMobileColumns()); - $columns->push($this->getCollapsedTabletColumns()); - } elseif ($this->shouldCollapseOnTablet() && ! $this->shouldCollapseOnMobile()) { - $columns->push($this->getCollapsedTabletColumns()); - } elseif ($this->shouldCollapseOnMobile() && ! $this->shouldCollapseOnTablet()) { - $columns->push($this->getCollapsedMobileColumns()); - } - - $columns = $columns->collapse(); - @endphp - - collapsingColumnsAreEnabled && $this->hasCollapsedColumns) + @php($customAttributes = $this->getTrAttributes($row, $rowIndex)) + merge($customAttributes) - ->class(['hidden bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0)]) - ->class(['hidden bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0)]) - ->class(['d-none bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true))]) - ->class(['d-none bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true))]) - ->except(['default']) + $attributes->merge([ + 'wire:loading.class.delay' => 'opacity-50 dark:bg-gray-900 dark:opacity-60', + 'wire:key' => $tableName.'-row-'.$row->{$primaryKey}.'-collapsed-contents', + ]) + ->merge($customAttributes) + ->class([ + 'hidden bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0), + 'hidden bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0), + 'd-none bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true)), + 'd-none bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true)), + ]) + ->except(['default','default-styling','default-colors']) }} - > - $isTailwind, 'text-start pt-3 p-2' => $isBootstrap, - ]) - colspan="{{ $colspan }}" - > + ])>
    - @foreach($columns as $colIndex => $column) - @continue($column->isHidden()) - @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) - -

    $isTailwind && $column->shouldCollapseAlways(), - 'block mb-2 sm:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(), - 'block mb-2 md:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), - 'block mb-2 lg:hidden' => $isTailwind && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()), - - 'd-block mb-2' => $isBootstrap && $column->shouldCollapseAlways(), - 'd-block mb-2 d-sm-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(), - 'd-block mb-2 d-md-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), - 'd-block mb-2 d-lg-none' => $isBootstrap && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()), - - ]) - > - {{ $column->getTitle() }}: {{ $column->renderContents($row) }} + @foreach($this->getCollapsedColumnsForContent as $colIndex => $column) + +

    $isTailwind, + 'sm:block' => $isTailwind && $column->shouldCollapseAlways(), + 'sm:block md:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), + 'sm:block lg:hidden' => $isTailwind && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()), + + 'd-block mb-2' => $isBootstrap, + 'd-sm-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(), + 'd-md-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), + 'd-lg-none' => $isBootstrap && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()), + ])> + {{ $column->getTitle() }}: + @if($column->isHtml()) + {!! $column->setIndexes($rowIndex, $colIndex)->renderContents($row) !!} + @else + {{ $column->setIndexes($rowIndex, $colIndex)->renderContents($row) }} + @endif

    @endforeach
    diff --git a/resources/views/components/table/empty.blade.php b/resources/views/components/table/empty.blade.php index a5f1b5d22..705f93d48 100644 --- a/resources/views/components/table/empty.blade.php +++ b/resources/views/components/table/empty.blade.php @@ -1,4 +1,4 @@ -@aware(['component','isTailwind','isBootstrap']) +@aware(['isTailwind','isBootstrap']) @php($attributes = $attributes->merge(['wire:key' => 'empty-message-'.$this->getId()])) diff --git a/resources/views/components/table/td.blade.php b/resources/views/components/table/td.blade.php index 926cd3ae2..9fae459d3 100644 --- a/resources/views/components/table/td.blade.php +++ b/resources/views/components/table/td.blade.php @@ -1,4 +1,4 @@ -@aware(['component', 'row', 'rowIndex', 'tableName', 'primaryKey','isTailwind','isBootstrap']) +@aware([ 'row', 'rowIndex', 'tableName', 'primaryKey','isTailwind','isBootstrap']) @props(['column', 'colIndex']) @php @@ -7,22 +7,24 @@ isClickable()) - @if($this->getTableRowUrlTarget($row) === "navigate") wire:navigate href="{{ $this->getTableRowUrl($row) }}" + @if($this->getTableRowUrlTarget($row) === 'navigate') wire:navigate href="{{ $this->getTableRowUrl($row) }}" @else onclick="window.open('{{ $this->getTableRowUrl($row) }}', '{{ $this->getTableRowUrlTarget($row) ?? '_self' }}')" @endif @endif {{ $attributes->merge($customAttributes) - ->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $isTailwind && ($customAttributes['default'] ?? true)]) - ->class(['hidden' => $isTailwind && $column && $column->shouldCollapseAlways()]) - ->class(['hidden md:table-cell' => $isTailwind && $column && $column->shouldCollapseOnMobile()]) - ->class(['hidden lg:table-cell' => $isTailwind && $column && $column->shouldCollapseOnTablet()]) - ->class(['' => $isBootstrap && ($customAttributes['default'] ?? true)]) - ->class(['d-none' => $isBootstrap && $column && $column->shouldCollapseAlways()]) - ->class(['d-none d-md-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnMobile()]) - ->class(['d-none d-lg-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnTablet()]) - ->class(['laravel-livewire-tables-cursor' => $isBootstrap && $column && $column->isClickable()]) - ->except('default') + ->class([ + 'px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $isTailwind && ($customAttributes['default'] ?? true), + 'hidden' => $isTailwind && $column && $column->shouldCollapseAlways(), + 'hidden md:table-cell' => $isTailwind && $column && $column->shouldCollapseOnMobile(), + 'hidden lg:table-cell' => $isTailwind && $column && $column->shouldCollapseOnTablet(), + '' => $isBootstrap && ($customAttributes['default'] ?? true), + 'd-none' => $isBootstrap && $column && $column->shouldCollapseAlways(), + 'd-none d-md-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnMobile(), + 'd-none d-lg-table-cell' => $isBootstrap && $column && $column->shouldCollapseOnTablet(), + 'laravel-livewire-tables-cursor' => $isBootstrap && $column && $column->isClickable(), + ]) + ->except(['default','default-styling','default-colors']) }} > {{ $slot }} diff --git a/resources/views/components/table/td/bulk-actions.blade.php b/resources/views/components/table/td/bulk-actions.blade.php index 341ad650c..1b4049042 100644 --- a/resources/views/components/table/td/bulk-actions.blade.php +++ b/resources/views/components/table/td/bulk-actions.blade.php @@ -1,32 +1,21 @@ -@aware(['component', 'tableName','primaryKey']) +@aware([ 'tableName','primaryKey', 'isTailwind', 'isBootstrap', 'isBootstrap4', 'isBootstrap5']) @props(['row', 'rowIndex']) @php - $customAttributes = $this->getBulkActionsTdAttributes(); - $bulkActionsTdCheckboxAttributes = $this->getBulkActionsTdCheckboxAttributes(); - $theme = $this->getTheme(); + $tdAttributes = $this->getBulkActionsTdAttributes; + $tdCheckboxAttributes = $this->getBulkActionsTdCheckboxAttributes; @endphp -@if ($this->bulkActionsAreEnabled() && $this->hasBulkActions()) - +@if ($this->showBulkActionsSections()) +
    $theme === 'tailwind', - 'form-check' => $theme === 'bootstrap-5', + 'inline-flex rounded-md shadow-sm' => $isTailwind, + 'form-check' => $isBootstrap5, ])> - merge($bulkActionsTdCheckboxAttributes)->class([ - 'rounded border-gray-300 text-indigo-600 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600' => ($theme === 'tailwind') && ($bulkActionsTdCheckboxAttributes['default'] ?? true), - 'form-check-input' => ($theme === 'bootstrap-5') && ($bulkActionsTdCheckboxAttributes['default'] ?? true), - 'except' => 'default', - ]) - }} + :checkboxAttributes=$tdCheckboxAttributes />
    diff --git a/resources/views/components/table/td/collapsed-columns.blade.php b/resources/views/components/table/td/collapsed-columns.blade.php index 29cb50feb..078c1e39b 100644 --- a/resources/views/components/table/td/collapsed-columns.blade.php +++ b/resources/views/components/table/td/collapsed-columns.blade.php @@ -1,82 +1,52 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap']) +@aware([ 'tableName','isTailwind','isBootstrap']) @props(['rowIndex', 'hidden' => false]) -@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns()) - @if ($isTailwind) - merge(['class' => 'p-3 table-cell text-center ']) - ->class(['sm:hidden' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet()]) - ->class(['md:hidden' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile()]) - ->class(['lg:hidden' => !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile())]) - }} - :class="currentlyReorderingStatus ? 'laravel-livewire-tables-reorderingMinimised' : ''" - > - @if (! $hidden) - - @endif - - @elseif ($isBootstrap) - class(['d-sm-none' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet()]) - ->class(['d-md-none' => !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile()]) - ->class(['d-lg-none' => !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile())]) - }} - :class="currentlyReorderingStatus ? 'laravel-livewire-tables-reorderingMinimised' : ''" - > - @if (! $hidden) - - @endif - - @endif +@if ($this->collapsingColumnsAreEnabled && $this->hasCollapsedColumns) + merge() + ->class([ + 'p-3 table-cell text-center' => $isTailwind, + 'sm:hidden' => $isTailwind && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet(), + 'md:hidden' => $isTailwind && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile(), + 'lg:hidden' => $isTailwind && !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile()), + 'd-sm-none' => $isBootstrap && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet(), + 'd-md-none' => $isBootstrap && !$this->shouldCollapseAlways() && !$this->shouldCollapseOnTablet() && $this->shouldCollapseOnMobile(), + 'd-lg-none' => $isBootstrap && !$this->shouldCollapseAlways() && ($this->shouldCollapseOnTablet() || $this->shouldCollapseOnMobile()), + ]) + }} + :class="currentlyReorderingStatus ? 'laravel-livewire-tables-reorderingMinimised' : ''" + > + @if (! $hidden) + + @endif + @endif diff --git a/resources/views/components/table/td/plain.blade.php b/resources/views/components/table/td/plain.blade.php index 54c9efc67..d47872a03 100644 --- a/resources/views/components/table/td/plain.blade.php +++ b/resources/views/components/table/td/plain.blade.php @@ -1,25 +1,30 @@ -@aware(['component', 'rowIndex', 'rowID','isTailwind','isBootstrap']) +@aware([ 'rowIndex', 'rowID','isTailwind','isBootstrap']) @props(['column' => null, 'customAttributes' => [], 'displayMinimisedOnReorder' => false, 'hideUntilReorder' => false]) + @if ($isTailwind) merge($customAttributes) - ->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true]) - ->class(['hidden' => $column && $column->shouldCollapseAlways()]) - ->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnMobile()]) - ->class(['hidden lg:table-cell' => $column && $column->shouldCollapseOnTablet()]) - ->except('default') + ->class([ + 'px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true, + 'hidden' => $column && $column->shouldCollapseAlways(), + 'hidden md:table-cell' => $column && $column->shouldCollapseOnMobile(), + 'hidden lg:table-cell' => $column && $column->shouldCollapseOnTablet(), + ]) + ->except(['default','default-styling','default-colors']) }} @if($hideUntilReorder) x-show="reorderDisplayColumn" @endif > {{ $slot }} @elseif ($isBootstrap) merge($customAttributes) - ->class(['' => $customAttributes['default'] ?? true]) - ->class(['d-none' => $column && $column->shouldCollapseAlways()]) - ->class(['d-none d-md-table-cell' => $column && $column->shouldCollapseOnMobile()]) - ->class(['d-none d-lg-table-cell' => $column && $column->shouldCollapseOnTablet()]) - ->except('default') + ->class([ + '' => $customAttributes['default'] ?? true, + 'd-none' => $column && $column->shouldCollapseAlways(), + 'd-none d-md-table-cell' => $column && $column->shouldCollapseOnMobile(), + 'd-none d-lg-table-cell' => $column && $column->shouldCollapseOnTablet(), + ]) + ->except(['default','default-styling','default-colors']) }}> {{ $slot }} diff --git a/resources/views/components/table/td/reorder.blade.php b/resources/views/components/table/td/reorder.blade.php index d47b4629e..6b8c9b7a5 100644 --- a/resources/views/components/table/td/reorder.blade.php +++ b/resources/views/components/table/td/reorder.blade.php @@ -1,8 +1,6 @@ -@aware(['component', 'tableName']) +@aware([ 'tableName', 'isTailwind', 'isBootstrap', 'isBootstrap4', 'isBootstrap5']) @props(['rowID', 'rowIndex']) -@php($theme = $this->getTheme()) - $theme === 'tailwind', - 'd-inline' => $theme === 'bootstrap-4' || $theme === 'bootstrap-5', + 'inline w-4 h-4' => $isTailwind, + 'd-inline' => ($isBootstrap4 || $isBootstrap5), ]) @style([ - 'width:1em; height:1em;' => $theme === 'bootstrap-4' || $theme === 'bootstrap-5', + 'width:1em; height:1em;' => ($isBootstrap4 || $isBootstrap5), ]) > diff --git a/resources/views/components/table/th.blade.php b/resources/views/components/table/th.blade.php index 10436241f..3562f4cf6 100644 --- a/resources/views/components/table/th.blade.php +++ b/resources/views/components/table/th.blade.php @@ -1,90 +1,61 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap']) +@aware(['isTailwind','isBootstrap']) @props(['column', 'index']) @php - $attributes = $attributes->merge(['wire:key' => $tableName . '-header-col-'.$column->getSlug()]); - $customAttributes = $this->getThAttributes($column); - $customSortButtonAttributes = $this->getThSortButtonAttributes($column); - $direction = $column->hasField() ? $this->getSort($column->getColumnSelectName()) : $this->getSort($column->getSlug()) ?? null ; + $allThAttributes = $this->getAllThAttributes($column); + $customThAttributes = $allThAttributes['customAttributes']; + $customSortButtonAttributes = $allThAttributes['sortButtonAttributes']; + $customLabelAttributes = $allThAttributes['labelAttributes']; + $customIconAttributes = $this->getThSortIconAttributes($column); + $direction = $column->hasField() ? $this->getSort($column->getColumnSelectName()) : $this->getSort($column->getSlug()) ?? null; @endphp -@if ($isTailwind) - merge($customAttributes) - ->class(['px-6 py-3 text-left text-xs font-medium whitespace-nowrap text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400' => $customAttributes['default'] ?? true]) - ->class(['hidden' => $column->shouldCollapseAlways()]) - ->class(['hidden md:table-cell' => $column->shouldCollapseOnMobile()]) - ->class(['hidden lg:table-cell' => $column->shouldCollapseOnTablet()]) - ->except('default') - }} - > - @if($column->getColumnLabelStatus()) - @unless ($this->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback())) - {{ $column->getTitle() }} - @else - merge($customAttributes) - ->class(['text-left text-xs font-medium whitespace-nowrap text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400' => $customAttributes['default'] ?? true]) - ->class(['hidden' => $column->shouldCollapseAlways()]) - ->class(['hidden md:table-cell' => $column->shouldCollapseOnMobile()]) - ->class(['hidden lg:table-cell' => $column->shouldCollapseOnTablet()]) - ->except('default') - }}>{{ $column->getTitle() }} +merge($customThAttributes) + ->class([ + 'text-gray-500 dark:bg-gray-800 dark:text-gray-400' => $isTailwind && (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)), + 'px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => $isTailwind && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)), + 'hidden' => $isTailwind && $column->shouldCollapseAlways(), + 'hidden md:table-cell' => $isTailwind && $column->shouldCollapseOnMobile(), + 'hidden lg:table-cell' => $isTailwind && $column->shouldCollapseOnTablet(), + '' => $isBootstrap && ($customThAttributes['default'] ?? true), + 'd-none' => $isBootstrap && $column->shouldCollapseAlways(), + 'd-none d-md-table-cell' => $isBootstrap && $column->shouldCollapseOnMobile(), + 'd-none d-lg-table-cell' => $isBootstrap && $column->shouldCollapseOnTablet(), + ]) + ->except(['default', 'default-colors', 'default-styling']) +}}> + @if($column->getColumnLabelStatus()) + @unless ($this->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback())) + + @else + @if ($isTailwind) - - @if ($direction === 'asc') - - - @elseif ($direction === 'desc') - - - @else - - @endif - + - @endunless - @endif - -@elseif ($isBootstrap) - merge($customAttributes) - ->class(['' => $customAttributes['default'] ?? true]) - ->class(['d-none' => $column->shouldCollapseAlways()]) - ->class(['d-none d-md-table-cell' => $column->shouldCollapseOnMobile()]) - ->class(['d-none d-lg-table-cell' => $column->shouldCollapseOnTablet()]) - ->except('default') - }} - > - @if($column->getColumnLabelStatus()) - @unless ($this->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback())) - {{ $column->getTitle() }} - @else -
    - {{ $column->getTitle() }} + @elseif ($isBootstrap) +
    merge($customSortButtonAttributes) + ->class([ + 'd-flex align-items-center laravel-livewire-tables-cursor' => (($customSortButtonAttributes['default-styling'] ?? true) || ($customSortButtonAttributes['default'] ?? true)) + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) + }}> + + - - @if ($direction === 'asc') - - @elseif ($direction === 'desc') - - @else - - @endif -
    - @endunless - @endif - -@endif + @endif + + @endunless + @endif + diff --git a/resources/views/components/table/th/bulk-actions.blade.php b/resources/views/components/table/th/bulk-actions.blade.php index b07a67f09..64bc3632c 100644 --- a/resources/views/components/table/th/bulk-actions.blade.php +++ b/resources/views/components/table/th/bulk-actions.blade.php @@ -1,19 +1,18 @@ -@aware(['component', 'tableName']) +@aware(['tableName','isTailwind', 'isBootstrap']) @php - $customAttributes = $this->getBulkActionsThAttributes(); + $customAttributes = $this->hasBulkActionsThAttributes ? $this->getBulkActionsThAttributes : $this->getAllThAttributes($this->getBulkActionsColumn())['customAttributes']; $bulkActionsThCheckboxAttributes = $this->getBulkActionsThCheckboxAttributes(); - $theme = $this->getTheme(); @endphp @if ($this->bulkActionsAreEnabled() && $this->hasBulkActions()) - +
    $theme === 'tailwind', - 'form-check' => $theme === 'bootstrap-5', + 'inline-flex rounded-md shadow-sm' => $isTailwind, + 'form-check' => $isBootstrap, ]) > merge($bulkActionsThCheckboxAttributes)->class([ - 'rounded border-gray-300 text-indigo-600 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600' => ($theme === 'tailwind') && ($bulkActionsThCheckboxAttributes['default'] ?? true), - 'form-check-input' => ($theme === 'bootstrap-5') && ($bulkActionsThCheckboxAttributes['default'] ?? true), - 'except' => 'default', - ]) + 'border-gray-300 text-indigo-600 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600' => $isTailwind && (($bulkActionsThCheckboxAttributes['default'] ?? true) || ($bulkActionsThCheckboxAttributes['default-colors'] ?? true)), + 'rounded shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50 ' => $isTailwind && (($bulkActionsThCheckboxAttributes['default'] ?? true) || ($bulkActionsThCheckboxAttributes['default-styling'] ?? true)), + 'form-check-input' => $isBootstrap && ($bulkActionsThCheckboxAttributes['default'] ?? true), + ])->except(['default','default-styling','default-colors']) }} />
    -@endif +@endif \ No newline at end of file diff --git a/resources/views/components/table/th/collapsed-columns.blade.php b/resources/views/components/table/th/collapsed-columns.blade.php index 4965c2dd2..e05021bd2 100644 --- a/resources/views/components/table/th/collapsed-columns.blade.php +++ b/resources/views/components/table/th/collapsed-columns.blade.php @@ -1,29 +1,16 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap']) - -@if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns()) - @if ($isTailwind) - merge(['class' => 'table-cell dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised']) - ->class(['sm:hidden' => !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()]) - ->class(['md:hidden' => !$this->shouldCollapseOnMobile() && !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()]) - ->class(['lg:hidden' => !$this->shouldCollapseAlways()]) - }} - :class="{ 'laravel-livewire-tables-reorderingMinimised': ! currentlyReorderingStatus }" - > - @elseif ($isBootstrap) - merge(['class' => 'd-table-cell laravel-livewire-tables-reorderingMinimised']) - ->class(['d-sm-none' => !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()]) - ->class(['d-md-none' => !$this->shouldCollapseOnMobile() && !$this->shouldCollapseOnTablet() && !$this->shouldCollapseAlways()]) - ->class(['d-lg-none' => !$this->shouldCollapseAlways()]) - }} - :class="{ 'laravel-livewire-tables-reorderingMinimised': ! currentlyReorderingStatus }" - > - @endif +@aware(['isTailwind', 'isBootstrap']) +@if ($this->collapsingColumnsAreEnabled && $this->hasCollapsedColumns) + merge() + ->class([ + 'table-cell dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised' => $isTailwind, + 'sm:hidden' => $isTailwind && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways, + 'md:hidden' => $isTailwind && !$this->shouldCollapseOnMobile && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways, + 'lg:hidden' => $isTailwind && !$this->shouldCollapseAlways, + 'd-table-cell laravel-livewire-tables-reorderingMinimised' => $isBootstrap, + 'd-sm-none' => $isBootstrap && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways, + 'd-md-none' => $isBootstrap && !$this->shouldCollapseOnMobile && !$this->shouldCollapseOnTablet && !$this->shouldCollapseAlways, + 'd-lg-none' => $isBootstrap && !$this->shouldCollapseAlways, + ]) + }}> @endif diff --git a/resources/views/components/table/th/label.blade.php b/resources/views/components/table/th/label.blade.php new file mode 100644 index 000000000..bafe25fdb --- /dev/null +++ b/resources/views/components/table/th/label.blade.php @@ -0,0 +1,4 @@ +@props(['columnTitle' => '', 'customLabelAttributes' => ['default' => true]]) +except(['default', 'default-colors', 'default-styling']) }}> + {{ $columnTitle }} + diff --git a/resources/views/components/table/th/plain.blade.php b/resources/views/components/table/th/plain.blade.php index c8d36ad32..929bf1630 100644 --- a/resources/views/components/table/th/plain.blade.php +++ b/resources/views/components/table/th/plain.blade.php @@ -1,14 +1,12 @@ -@aware(['component','isTailwind','isBootstrap']) +@aware(['isTailwind', 'isBootstrap']) @props(['displayMinimisedOnReorder' => false, 'hideUntilReorder' => false, 'customAttributes' => ['default' => true]]) -merge($customAttributes)->class([ - 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left bg-gray-50 dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised' => ($isTailwind) && ($customAttributes['default'] ?? true), - 'laravel-livewire-tables-reorderingMinimised' => ($isBootstrap) && ($customAttributes['default'] ?? true), - ]) - }} - @if($hideUntilReorder) :class="!reorderDisplayColumn && 'w-0 p-0 hidden'" @endif -> + 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left laravel-livewire-tables-reorderingMinimised' => $isTailwind && (($customAttributes['default-styling'] ?? true) || ($customAttributes['default'] ?? true)), + 'bg-gray-50 dark:bg-gray-800' => $isTailwind && (($customAttributes['default-colors'] ?? true) || ($customAttributes['default'] ?? true)), + 'laravel-livewire-tables-reorderingMinimised' => $isBootstrap && (($customAttributes['default-colors'] ?? true) || ($customAttributes['default'] ?? true)), + ])->except(['default','default-styling','default-colors']) +}}> {{ $slot }} diff --git a/resources/views/components/table/th/reorder.blade.php b/resources/views/components/table/th/reorder.blade.php index b0dc73845..a3b1f7e86 100644 --- a/resources/views/components/table/th/reorder.blade.php +++ b/resources/views/components/table/th/reorder.blade.php @@ -1,10 +1,16 @@ -@aware(['tableName','isTailwind','isBootstrap']) +@php + $customThAttributes = $this->hasReorderThAttributes() ? $this->getReorderThAttributes() : $this->getAllThAttributes($this->getReorderColumn())['customAttributes']; +@endphp -merge($this->getReorderThAttributes())->class([ - 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left bg-gray-50 dark:bg-gray-800 laravel-livewire-tables-reorderingMinimised' => ($isTailwind) && ($this->getReorderThAttributes['default'] ?? true), - 'laravel-livewire-tables-reorderingMinimised' => ($isBootstrap) && ($this->getReorderThAttributes['default'] ?? true), - ]) +merge($customThAttributes) + ->class([ + 'table-cell px-6 py-3 text-left text-xs font-medium whitespace-nowrap uppercase tracking-wider' => $this->isTailwind && (($customThAttributes['default-styling'] ?? true) || ($customThAttributes['default'] ?? true)), + 'text-gray-500 dark:bg-gray-800 dark:text-gray-400' => $this->isTailwind && (($customThAttributes['default-colors'] ?? true) || ($customThAttributes['default'] ?? true)), + 'laravel-livewire-tables-reorderingMinimised' => $this->isBootstrap && ($customThAttributes['default'] ?? true), + ]) + ->except(['default','default-styling','default-colors']) }} >
    diff --git a/resources/views/components/table/th/sort-icons.blade.php b/resources/views/components/table/th/sort-icons.blade.php new file mode 100644 index 000000000..26b077bbb --- /dev/null +++ b/resources/views/components/table/th/sort-icons.blade.php @@ -0,0 +1,80 @@ +@aware(['isTailwind', 'isBootstrap']) +@props(['direction' => 'none', 'customIconAttributes']) + $isTailwind, + 'relative d-flex align-items-center' => $isBootstrap + ]) +> + + @if($isTailwind) + @switch($direction) + @case('asc') + merge($customIconAttributes) + ->class([ + 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + 'absolute opacity-100 group-hover:opacity-0', + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + merge($customIconAttributes) + ->class([ + 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + 'absolute opacity-0 group-hover:opacity-100', + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + @break + @case('desc') + merge($customIconAttributes) + ->class([ + 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + 'absolute opacity-100 group-hover:opacity-0', + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + merge($customIconAttributes) + ->class([ + 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + 'absolute opacity-0 group-hover:opacity-100', + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + + @break + @default + merge($customIconAttributes) + ->class([ + 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + 'absolute opacity-100 group-hover:opacity-0', + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + merge($customIconAttributes) + ->class([ + 'w-3 h-3' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + 'absolute opacity-0 group-hover:opacity-100', + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + @endswitch + + + @else + @switch($direction) + @case('asc') + merge($customIconAttributes) + ->class([ + 'laravel-livewire-tables-btn-smaller ms-1' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + @break + @case('desc') + merge($customIconAttributes) + ->class([ + 'laravel-livewire-tables-btn-smaller ms-1' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + @break + @default + merge($customIconAttributes) + ->class([ + 'laravel-livewire-tables-btn-smaller ms-1' => $customIconAttributes['default-styling'] ?? ($customIconAttributes['default'] ?? true), + ]) + ->except(['default', 'default-colors', 'default-styling', 'wire:key']) }} /> + @endswitch + @endif + diff --git a/resources/views/components/table/tr.blade.php b/resources/views/components/table/tr.blade.php index f043fbf8a..92ef2955e 100644 --- a/resources/views/components/table/tr.blade.php +++ b/resources/views/components/table/tr.blade.php @@ -1,4 +1,4 @@ -@aware(['component', 'tableName','primaryKey','isTailwind','isBootstrap']) +@aware([ 'tableName','primaryKey','isTailwind','isBootstrap']) @props(['row', 'rowIndex']) @php @@ -12,9 +12,9 @@ x-on:dragover.prevent.throttle.500ms="currentlyReorderingStatus && dragOverEvent(event)" x-on:dragleave.prevent.throttle.500ms="currentlyReorderingStatus && dragLeaveEvent(event)" @if($this->hasDisplayLoadingPlaceholder()) - wire:loading.remove + wire:loading.class.add="hidden d-none" @else - wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60" + wire:loading.class.delay="opacity-50 dark:bg-gray-900 dark:opacity-60" @endif id="{{ $tableName }}-row-{{ $row->{$primaryKey} }}" :draggable="currentlyReorderingStatus" @@ -22,12 +22,14 @@ loopType="{{ ($rowIndex % 2 === 0) ? 'even' : 'odd' }}" {{ $attributes->merge($customAttributes) - ->class(['bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0)]) - ->class(['bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0)]) - ->class(['cursor-pointer' => ($isTailwind && $this->hasTableRowUrl() && ($customAttributes['default'] ?? true))]) - ->class(['bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true))]) - ->class(['bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true))]) - ->except(['default']) + ->class([ + 'bg-white dark:bg-gray-700 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0), + 'bg-gray-50 dark:bg-gray-800 dark:text-white rappasoft-striped-row' => ($isTailwind && ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0), + 'cursor-pointer' => ($isTailwind && $this->hasTableRowUrl() && ($customAttributes['default'] ?? true)), + 'bg-light rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 === 0 && ($customAttributes['default'] ?? true)), + 'bg-white rappasoft-striped-row' => ($isBootstrap && $rowIndex % 2 !== 0 && ($customAttributes['default'] ?? true)), + ]) + ->except(['default','default-styling','default-colors']) }} > diff --git a/resources/views/components/table/tr/bulk-actions.blade.php b/resources/views/components/table/tr/bulk-actions.blade.php index 73201debf..64a788d99 100644 --- a/resources/views/components/table/tr/bulk-actions.blade.php +++ b/resources/views/components/table/tr/bulk-actions.blade.php @@ -1,4 +1,4 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap']) +@aware([ 'tableName', 'isTailwind', 'isBootstrap', 'localisationPath']) @if ($this->bulkActionsAreEnabled() && $this->hasBulkActions()) @php @@ -7,134 +7,94 @@ $simplePagination = $this->isPaginationMethod('simple'); @endphp - @if ($isTailwind) - - - - + + @endif diff --git a/resources/views/components/table/tr/footer.blade.php b/resources/views/components/table/tr/footer.blade.php index ba0ecc51e..d9681d779 100644 --- a/resources/views/components/table/tr/footer.blade.php +++ b/resources/views/components/table/tr/footer.blade.php @@ -1,4 +1,4 @@ -@aware(['component', 'tableName']) +@aware([ 'tableName']) [], 'displayMinimisedOnReorder' => true]) @if ($isTailwind) merge($customAttributes) - ->class(['bg-white dark:bg-gray-700 dark:text-white' => $customAttributes['default'] ?? true]) - ->class(['laravel-livewire-tables-reorderingMinimised']) - ->except('default') + ->class([ + 'laravel-livewire-tables-reorderingMinimised', + 'bg-white dark:bg-gray-700 dark:text-white' => ($customAttributes['default'] ?? true), + ]) + ->except(['default','default-styling','default-colors']) }} > {{ $slot }} @@ -14,9 +16,11 @@ @elseif ($isBootstrap) merge($customAttributes) - ->class(['' => $customAttributes['default'] ?? true]) - ->class(['laravel-livewire-tables-reorderingMinimised']) - ->except('default') + ->class([ + 'laravel-livewire-tables-reorderingMinimised', + '' => $customAttributes['default'] ?? true, + ]) + ->except(['default','default-styling','default-colors']) }} > {{ $slot }} diff --git a/resources/views/components/table/tr/secondary-header.blade.php b/resources/views/components/table/tr/secondary-header.blade.php index a6a7cc5f3..6e3ca28c0 100644 --- a/resources/views/components/table/tr/secondary-header.blade.php +++ b/resources/views/components/table/tr/secondary-header.blade.php @@ -1,4 +1,4 @@ -@aware(['component', 'tableName']) +@aware([ 'tableName']) $isTailwind, - 'd-flex flex-column ' => ($isBootstrap), -])> +
    merge($this->getToolsAttributes) + ->class([ + 'flex-col' => $isTailwind && ($this->getToolsAttributes['default-styling'] ?? true), + 'd-flex flex-column' => $isBootstrap && ($this->getToolsAttributes['default-styling'] ?? true) + ]) + ->except(['default','default-styling','default-colors']) + }} +> {{ $slot }}
    diff --git a/resources/views/components/tools/filter-label.blade.php b/resources/views/components/tools/filter-label.blade.php index 6ac6196ae..2274d74d4 100644 --- a/resources/views/components/tools/filter-label.blade.php +++ b/resources/views/components/tools/filter-label.blade.php @@ -1,25 +1,25 @@ -@aware(['component', 'tableName']) +@aware([ 'tableName']) @props(['filter', 'filterLayout' => 'popover', 'tableName' => 'table', 'isTailwind' => false, 'isBootstrap' => false, 'isBootstrap4' => false, 'isBootstrap5' => false, 'for' => null]) @php - $customLabelAttributes = $filter->getFilterLabelAttributes(); + $filterLabelAttributes = $filter->getFilterLabelAttributes(); + $customLabelAttributes = $filter->getLabelAttributes(); @endphp @if($filter->hasCustomFilterLabel() && !$filter->hasCustomPosition()) @include($filter->getCustomFilterLabel(),['filter' => $filter, 'filterLayout' => $filterLayout, 'tableName' => $tableName, 'isTailwind' => $isTailwind, 'isBootstrap' => $isBootstrap, 'isBootstrap4' => $isBootstrap4, 'isBootstrap5' => $isBootstrap5, 'customLabelAttributes' => $customLabelAttributes]) @elseif(!$filter->hasCustomPosition()) -
    +@elseif($isBootstrap4) +
    + + +
    +@else +
    + + +
    +@endif diff --git a/resources/views/components/tools/filters/date-range.blade.php b/resources/views/components/tools/filters/date-range.blade.php index 4d233b1e4..f9cab0a75 100644 --- a/resources/views/components/tools/filters/date-range.blade.php +++ b/resources/views/components/tools/filters/date-range.blade.php @@ -23,6 +23,6 @@ 'd-inline-block w-100 form-control' => $isBootstrap, ]) @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif - /> + />
    diff --git a/resources/views/components/tools/filters/date.blade.php b/resources/views/components/tools/filters/date.blade.php index 6191a299e..b32b38bbb 100644 --- a/resources/views/components/tools/filters/date.blade.php +++ b/resources/views/components/tools/filters/date.blade.php @@ -1,20 +1,17 @@
    $isTailwind, - "mb-3 mb-md-0 input-group" => $isBootstrap, + 'rounded-md shadow-sm' => $isTailwind, + 'mb-3 mb-md-0 input-group' => $isBootstrap, ])> - getWireMethod("filterComponents.".$filter->getKey()) }} - wire:key="{{ $filter->generateWireKey($tableName, 'date') }}" - id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif" - type="date" - @if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif - @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif - @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif - @class([ - "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind, - "form-control" => $isBootstrap, - ]) - /> + getWireMethod('filterComponents.'.$filter->getKey()) !!} {{ + $filterInputAttributes->merge() + ->class([ + 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true), + 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true), + 'form-control' => $isBootstrap, + ]) + ->except(['default-styling','default-colors']) + }} />
    -
    \ No newline at end of file + diff --git a/resources/views/components/tools/filters/datetime.blade.php b/resources/views/components/tools/filters/datetime.blade.php index 901cc8b11..74d80455a 100644 --- a/resources/views/components/tools/filters/datetime.blade.php +++ b/resources/views/components/tools/filters/datetime.blade.php @@ -2,20 +2,17 @@
    $isTailwind, - "mb-3 mb-md-0 input-group" => $isBootstrap, + 'rounded-md shadow-sm' => $isTailwind, + 'mb-3 mb-md-0 input-group' => $isBootstrap, ])> - getWireMethod("filterComponents.".$filter->getKey()) }} - wire:key="{{ $filter->generateWireKey($tableName, 'datetime') }}" - id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif" - type="datetime-local" - @if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif - @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif - @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif - @class([ - "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind, - "form-control" => $isBootstrap, - ]) - /> + getWireMethod('filterComponents.'.$filter->getKey()) !!} {{ + $filterInputAttributes->merge() + ->class([ + 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true), + 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true), + 'form-control' => $isBootstrap, + ]) + ->except(['default-styling','default-colors']) + }} />
    - \ No newline at end of file + diff --git a/resources/views/components/tools/filters/livewire-component-array-filter.blade.php b/resources/views/components/tools/filters/livewire-component-array-filter.blade.php new file mode 100644 index 000000000..237d062fa --- /dev/null +++ b/resources/views/components/tools/filters/livewire-component-array-filter.blade.php @@ -0,0 +1,4 @@ +
    + + +
    diff --git a/resources/views/components/tools/filters/livewire-component-filter.blade.php b/resources/views/components/tools/filters/livewire-component-filter.blade.php index 89b407133..a430faf9f 100644 --- a/resources/views/components/tools/filters/livewire-component-filter.blade.php +++ b/resources/views/components/tools/filters/livewire-component-filter.blade.php @@ -1,5 +1,4 @@
    - - +
    diff --git a/resources/views/components/tools/filters/multi-select-dropdown.blade.php b/resources/views/components/tools/filters/multi-select-dropdown.blade.php index 76cbc55c5..a0f1a580b 100644 --- a/resources/views/components/tools/filters/multi-select-dropdown.blade.php +++ b/resources/views/components/tools/filters/multi-select-dropdown.blade.php @@ -1,39 +1,23 @@
    - @if ($isTailwind) -
    - -
    - @elseif ($isBootstrap) +
    + @endif + @if ($isTailwind) +
    @endif -
    \ No newline at end of file + diff --git a/resources/views/components/tools/filters/multi-select.blade.php b/resources/views/components/tools/filters/multi-select.blade.php index 884a84441..6ee391a71 100644 --- a/resources/views/components/tools/filters/multi-select.blade.php +++ b/resources/views/components/tools/filters/multi-select.blade.php @@ -1,63 +1,58 @@
    - @if ($isTailwind) -
    -
    - -
    \ No newline at end of file +
    diff --git a/resources/views/components/tools/filters/number-range.blade.php b/resources/views/components/tools/filters/number-range.blade.php index 118b46006..ecdc29573 100644 --- a/resources/views/components/tools/filters/number-range.blade.php +++ b/resources/views/components/tools/filters/number-range.blade.php @@ -5,16 +5,17 @@ $suffix = $filter->hasConfig('suffix') ? '--suffix:"'. $filter->getConfig('suffix') .'";' : ''; $prefix = $filter->hasConfig('prefix') ? '--prefix:"'.$filter->getConfig('prefix').'";' : ''; @endphp +
    -
    $isTailwind, 'mt-4 h-22 w-100 pb-4 pt-2 grid gap-10' => $isBootstrap, ]) wire:ignore > -
    $isTailwind, @@ -23,7 +24,7 @@ style=' --min:{{ $minRange }}; --max:{{ $maxRange }}; {{ $suffix . $prefix }}' > diff --git a/resources/views/components/tools/filters/number.blade.php b/resources/views/components/tools/filters/number.blade.php index e31854848..0c8e766cb 100644 --- a/resources/views/components/tools/filters/number.blade.php +++ b/resources/views/components/tools/filters/number.blade.php @@ -1,22 +1,18 @@
    -
    $isTailwind, - "mb-3 mb-md-0 input-group" => $isBootstrap, + 'rounded-md shadow-sm' => $isTailwind, + 'mb-3 mb-md-0 input-group' => $isBootstrap, ])> - getWireMethod("filterComponents.".$filter->getKey()) }} - wire:key="{{ $filter->generateWireKey($tableName, 'number') }}" - id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif" - type="number" - @if($filter->hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif - @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif - @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif - @class([ - "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind, - "form-control" => $isBootstrap, - ]) - /> + getWireMethod('filterComponents.'.$filter->getKey()) !!} {{ + $filterInputAttributes->merge() + ->class([ + 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true), + 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true), + 'form-control' => $isBootstrap, + ]) + ->except(['default-styling','default-colors']) + }} />
    -
    \ No newline at end of file +
    diff --git a/resources/views/components/tools/filters/select.blade.php b/resources/views/components/tools/filters/select.blade.php index 42fcdad08..9a0ca9683 100644 --- a/resources/views/components/tools/filters/select.blade.php +++ b/resources/views/components/tools/filters/select.blade.php @@ -5,15 +5,16 @@ 'rounded-md shadow-sm' => $isTailwind, 'inline' => $isBootstrap, ])> - getWireMethod('filterComponents.'.$filter->getKey()) !!} {{ + $filterInputAttributes->merge() + ->class([ + 'block w-full transition duration-150 ease-in-out rounded-md shadow-sm focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true), + 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true), + 'form-control' => $isBootstrap4 && ($filterInputAttributes['default-styling'] ?? true), + 'form-select' => $isBootstrap5 && ($filterInputAttributes['default-styling'] ?? true), ]) - > + ->except(['default-styling','default-colors']) + }}> @foreach($filter->getOptions() as $key => $value) @if (is_iterable($value)) @@ -27,4 +28,4 @@ @endforeach
    -
    \ No newline at end of file +
    diff --git a/resources/views/components/tools/filters/text-field.blade.php b/resources/views/components/tools/filters/text-field.blade.php index 11bc7af79..74d80455a 100644 --- a/resources/views/components/tools/filters/text-field.blade.php +++ b/resources/views/components/tools/filters/text-field.blade.php @@ -2,19 +2,17 @@
    $isTailwind, - "mb-3 mb-md-0 input-group" => $isBootstrap, + 'rounded-md shadow-sm' => $isTailwind, + 'mb-3 mb-md-0 input-group' => $isBootstrap, ])> - getWireMethod("filterComponents.".$filter->getKey()) }} - wire:key="{{ $filter->generateWireKey($tableName, 'text') }}" - id="{{ $tableName }}-filter-{{ $filter->getKey() }}@if($filter->hasCustomPosition())-{{ $filter->getCustomPosition() }}@endif" - type="text" - @if($filter->hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif - @if($filter->hasConfig('maxlength')) maxlength="{{ $filter->getConfig('maxlength') }}" @endif - @class([ - "block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" => $isTailwind, - "form-control" => $isBootstrap, - ]) - /> + getWireMethod('filterComponents.'.$filter->getKey()) !!} {{ + $filterInputAttributes->merge() + ->class([ + 'block w-full rounded-md shadow-sm transition duration-150 ease-in-out focus:ring focus:ring-opacity-50' => $isTailwind && ($filterInputAttributes['default-styling'] ?? true), + 'border-gray-300 focus:border-indigo-300 focus:ring-indigo-200 dark:bg-gray-800 dark:text-white dark:border-gray-600' => $isTailwind && ($filterInputAttributes['default-colors'] ?? true), + 'form-control' => $isBootstrap, + ]) + ->except(['default-styling','default-colors']) + }} />
    - \ No newline at end of file + diff --git a/resources/views/components/tools/sorting-pills.blade.php b/resources/views/components/tools/sorting-pills.blade.php index a57a6a97d..25a2bc973 100644 --- a/resources/views/components/tools/sorting-pills.blade.php +++ b/resources/views/components/tools/sorting-pills.blade.php @@ -1,30 +1,44 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) +@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath']) -@if ($this->isTailwind) +@if ($isTailwind)
    @if ($this->sortingPillsAreEnabled() && $this->hasSorts())
    - @lang('Applied Sorting'): + {{ __($localisationPath.'Applied Sorting') }}: @foreach($this->getSorts() as $columnSelectName => $direction) @php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName)) @continue(is_null($column)) @continue($column->isHidden()) - @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + @continue($this->columnSelectIsEnabled && ! $this->columnSelectIsEnabledForColumn($column)) merge($this->getSortingPillsItemAttributes()) + ->class([ + 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium leading-4 capitalize' => $this->getSortingPillsItemAttributes()['default-styling'], + 'bg-indigo-100 text-indigo-800 dark:bg-indigo-200 dark:text-indigo-900' => $this->getSortingPillsItemAttributes()['default-colors'], + ]) + ->except(['default-styling', 'default-colors']) + }} > - {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($this, $direction) }} + {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirectionLabel($direction, $this->getDefaultSortingLabelAsc, $this->getDefaultSortingLabelDesc) }} @@ -34,38 +48,59 @@ class="flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justif wire:click.prevent="clearSorts" class="focus:outline-none active:outline-none" > - - @lang('Clear') + merge($this->getSortingPillsClearAllButtonAttributes()) + ->class([ + 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium' => $this->getSortingPillsClearAllButtonAttributes()['default-styling'], + 'bg-gray-100 text-gray-800 dark:bg-gray-200 dark:text-gray-900' => $this->getSortingPillsClearAllButtonAttributes()['default-colors'], + ]) + ->except(['default-styling', 'default-colors']) + }} + > + {{ __($localisationPath.'Clear') }}
    @endif
    -@elseif ($this->isBootstrap4) +@elseif ($isBootstrap4)
    @if ($this->sortingPillsAreEnabled() && $this->hasSorts())
    - @lang('Applied Sorting'): + {{ __($localisationPath.'Applied Sorting') }}: @foreach($this->getSorts() as $columnSelectName => $direction) @php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName)) @continue(is_null($column)) @continue($column->isHidden()) - @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + @continue($this->columnSelectIsEnabled && ! $this->columnSelectIsEnabledForColumn($column)) merge($this->getSortingPillsItemAttributes()) + ->class([ + 'badge badge-pill badge-info d-inline-flex align-items-center' => $this->getSortingPillsItemAttributes()['default-styling'], + ]) + ->except(['default-styling', 'default-colors']) + }} > - {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($this, $direction) }} + {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirectionLabel($direction, $this->getDefaultSortingLabelAsc, $this->getDefaultSortingLabelDesc) }} merge($this->getSortingPillsClearSortButtonAttributes()) + ->class([ + 'text-white ml-2' => $this->getSortingPillsClearSortButtonAttributes()['default-styling'], + ]) + ->except(['default-styling', 'default-colors']) + }} > - @lang('Remove sort option') + {{ __($localisationPath.'Remove sort option') }} @@ -74,38 +109,56 @@ class="text-white ml-2" merge($this->getSortingPillsClearAllButtonAttributes()) + ->class([ + 'badge badge-pill badge-light' => $this->getSortingPillsClearAllButtonAttributes()['default-styling'], + ]) + ->except(['default-styling', 'default-colors']) + }} > - @lang('Clear') + {{ __($localisationPath.'Clear') }}
    @endif
    -@elseif ($this->isBootstrap5) +@elseif ($isBootstrap5)
    @if ($this->sortingPillsAreEnabled() && $this->hasSorts())
    - @lang('Applied Sorting'): + {{ __($localisationPath.'Applied Sorting') }}: @foreach($this->getSorts() as $columnSelectName => $direction) @php($column = $this->getColumnBySelectName($columnSelectName) ?? $this->getColumnBySlug($columnSelectName)) @continue(is_null($column)) @continue($column->isHidden()) - @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + @continue($this->columnSelectIsEnabled && ! $this->columnSelectIsEnabledForColumn($column)) merge($this->getSortingPillsItemAttributes()) + ->class([ + 'badge rounded-pill bg-info d-inline-flex align-items-center' => $this->getSortingPillsItemAttributes()['default-styling'], + ]) + ->except(['default-styling', 'default-colors']) + }} > - {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($this, $direction) }} + {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirectionLabel($direction, $this->getDefaultSortingLabelAsc, $this->getDefaultSortingLabelDesc) }} merge($this->getSortingPillsClearSortButtonAttributes()) + ->class([ + 'text-white ms-2' => $this->getSortingPillsClearSortButtonAttributes()['default-styling'], + ]) + ->except(['default-styling', 'default-colors']) + }} > - @lang('Remove sort option') + {{ __($localisationPath.'Remove sort option') }} @@ -114,9 +167,15 @@ class="text-white ms-2" merge($this->getSortingPillsClearAllButtonAttributes()) + ->class([ + 'badge rounded-pill bg-light text-dark text-decoration-none' => $this->getSortingPillsClearAllButtonAttributes()['default-styling'], + ]) + ->except(['default-styling', 'default-colors']) + }} > - @lang('Clear') + {{ __($localisationPath.'Clear') }}
    @endif diff --git a/resources/views/components/tools/toolbar.blade.php b/resources/views/components/tools/toolbar.blade.php index 56cd2ec76..6f4a482fd 100644 --- a/resources/views/components/tools/toolbar.blade.php +++ b/resources/views/components/tools/toolbar.blade.php @@ -1,45 +1,51 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap']) +@aware([ 'tableName','isTailwind','isBootstrap']) @props([]) +@php($toolBarAttributes = $this->getToolBarAttributesBag) -@if ($this->hasConfigurableAreaFor('before-toolbar')) - @include($this->getConfigurableAreaFor('before-toolbar'), $this->getParametersForConfigurableArea('before-toolbar')) -@endif - -
    $this->isBootstrap, - 'md:flex md:justify-between mb-4 px-4 md:p-0' => $this->isTailwind, - ]) +
    merge() + ->class([ + 'md:flex md:justify-between mb-4 px-4 md:p-0' => $isTailwind && ($toolBarAttributes['default-styling'] ?? true), + 'd-md-flex justify-content-between mb-3' => $isBootstrap && ($toolBarAttributes['default-styling'] ?? true), + ]) + ->except(['default','default-styling','default-colors']) + }} >
    $this->isBootstrap, - 'w-full mb-4 md:mb-0 md:w-2/4 md:flex space-y-4 md:space-y-0 md:space-x-2' => $this->isTailwind, + 'd-md-flex' => $isBootstrap, + 'w-full mb-4 md:mb-0 md:w-2/4 md:flex space-y-4 md:space-y-0 md:space-x-2' => $isTailwind, ]) > @if ($this->hasConfigurableAreaFor('toolbar-left-start'))
    $this->isBootstrap, - 'flex rounded-md shadow-sm' => $this->isTailwind, + 'mb-3 mb-md-0 input-group' => $isBootstrap, + 'flex rounded-md shadow-sm' => $isTailwind, ])> @include($this->getConfigurableAreaFor('toolbar-left-start'), $this->getParametersForConfigurableArea('toolbar-left-start'))
    @endif - @if ($this->reorderIsEnabled()) + @if ($this->showReorderButton()) @endif - @if ($this->searchIsEnabled() && $this->searchVisibilityIsEnabled()) + @if ($this->showSearchField()) @endif - @if ($this->filtersAreEnabled() && $this->filtersVisibilityIsEnabled() && $this->hasVisibleFilters()) + @if ($this->showFiltersButton()) @endif + @if($this->showActionsInToolbarLeft()) + + @endif + @if ($this->hasConfigurableAreaFor('toolbar-left-end'))
    $this->isBootstrap, - 'flex rounded-md shadow-sm' => $this->isTailwind, + 'mb-3 mb-md-0 input-group' => $isBootstrap, + 'flex rounded-md shadow-sm' => $isTailwind, ])> @include($this->getConfigurableAreaFor('toolbar-left-end'), $this->getParametersForConfigurableArea('toolbar-left-end'))
    @@ -48,43 +54,29 @@
    $this->isBootstrap, - 'md:flex md:items-center space-y-4 md:space-y-0 md:space-x-2' => $this->isTailwind, + 'd-md-flex' => $isBootstrap, + 'md:flex md:items-center space-y-4 md:space-y-0 md:space-x-2' => $isTailwind, ]) > - @if ($this->hasConfigurableAreaFor('toolbar-right-start')) - @include($this->getConfigurableAreaFor('toolbar-right-start'), $this->getParametersForConfigurableArea('toolbar-right-start')) + @includeWhen($this->hasConfigurableAreaFor('toolbar-right-start'), $this->getConfigurableAreaFor('toolbar-right-start'), $this->getParametersForConfigurableArea('toolbar-right-start')) + + @if($this->showActionsInToolbarRight()) + @endif @if ($this->showBulkActionsDropdownAlpine() && $this->shouldAlwaysHideBulkActionsDropdownOption != true) @endif - @if ($this->columnSelectIsEnabled()) + @if ($this->columnSelectIsEnabled) @endif - @if ($this->paginationIsEnabled() && $this->perPageVisibilityIsEnabled()) + @if ($this->showPaginationDropdown()) @endif - @if ($this->hasConfigurableAreaFor('toolbar-right-end')) - @include($this->getConfigurableAreaFor('toolbar-right-end'), $this->getParametersForConfigurableArea('toolbar-right-end')) - @endif + @includeWhen($this->hasConfigurableAreaFor('toolbar-right-end'), $this->getConfigurableAreaFor('toolbar-right-end'), $this->getParametersForConfigurableArea('toolbar-right-end'))
    -@if ( - $this->filtersAreEnabled() && - $this->filtersVisibilityIsEnabled() && - $this->hasVisibleFilters() && - $this->isFilterLayoutSlideDown() -) - -@endif - -@if ($this->hasConfigurableAreaFor('after-toolbar')) -
    - @include($this->getConfigurableAreaFor('after-toolbar'), $this->getParametersForConfigurableArea('after-toolbar')) -
    -@endif diff --git a/resources/views/components/tools/toolbar/items/bulk-actions.blade.php b/resources/views/components/tools/toolbar/items/bulk-actions.blade.php index faabdf825..12ea6bb18 100644 --- a/resources/views/components/tools/toolbar/items/bulk-actions.blade.php +++ b/resources/views/components/tools/toolbar/items/bulk-actions.blade.php @@ -1,46 +1,47 @@ -@aware(['component', 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) +@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5', 'localisationPath'])
    $this->isBootstrap, - 'w-full md:w-auto mb-4 md:mb-0' => $this->isTailwind, + 'mb-3 mb-md-0' => $isBootstrap, + 'w-full md:w-auto mb-4 md:mb-0' => $isTailwind, ]) >
    $this->isBootstrap, - 'relative inline-block text-left z-10 w-full md:w-auto' => $this->isTailwind, + 'dropdown d-block d-md-inline' => $isBootstrap, + 'relative inline-block text-left z-10 w-full md:w-auto' => $isTailwind, ]) > - @if($this->isTailwind) + @if($isTailwind)