├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── composer.json ├── docs ├── .vitepress │ └── config.mts ├── contribute │ ├── contribution.md │ └── report-bugs.md ├── getting-started │ ├── changelog.md │ ├── installation.md │ └── versions.md ├── home.md ├── index.md ├── other-features │ └── data-preparated.md ├── public │ ├── css │ │ └── style.css │ └── img │ │ ├── fronts.png │ │ ├── laravel-red.svg │ │ ├── laravel_black.svg │ │ ├── logo-full-banner.png │ │ ├── logo-full-scream.png │ │ ├── logo-github.png │ │ └── logo.png └── usage │ ├── client-side.md │ └── server-side.md ├── examples ├── ClientSide │ ├── Controller.php │ ├── Index.html │ ├── WithJQuery.js │ └── WithMetronicTheme.js └── ServerSide │ ├── Controller.php │ ├── Index.html │ ├── WithJQuery.js │ └── WithMetronicTheme.js ├── package-lock.json ├── package.json └── src ├── Bases └── EasyDataTableBase.php ├── Contracts └── IEasyDataTable.php ├── EasyDataTable.php ├── Exceptions └── DatatableException.php └── Traits ├── Client.php └── Init.php /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy VitePress site to Pages 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | # Allows you to run this workflow manually from the Actions tab 8 | workflow_dispatch: 9 | 10 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 11 | permissions: 12 | contents: read 13 | pages: write 14 | id-token: write 15 | 16 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 17 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 18 | concurrency: 19 | group: pages 20 | cancel-in-progress: false 21 | 22 | jobs: 23 | # Build job 24 | build: 25 | runs-on: ubuntu-latest 26 | steps: 27 | - name: Checkout 28 | uses: actions/checkout@v3 29 | with: 30 | fetch-depth: 0 # Not needed if lastUpdated is not enabled 31 | # - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm 32 | # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun 33 | - name: Setup Node 34 | uses: actions/setup-node@v3 35 | with: 36 | node-version: 18 37 | cache: npm # or pnpm / yarn 38 | - name: Setup Pages 39 | uses: actions/configure-pages@v3 40 | - name: Install dependencies 41 | run: npm ci # or pnpm install / yarn install / bun install 42 | - name: Build with VitePress 43 | run: | 44 | npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build 45 | touch docs/.vitepress/dist/.nojekyll 46 | - name: Upload artifact 47 | uses: actions/upload-pages-artifact@v2 48 | with: 49 | path: docs/.vitepress/dist 50 | 51 | # Deployment job 52 | deploy: 53 | environment: 54 | name: github-pages 55 | url: ${{ steps.deployment.outputs.page_url }} 56 | needs: build 57 | runs-on: ubuntu-latest 58 | name: Deploy 59 | steps: 60 | - name: Deploy to GitHub Pages 61 | id: deployment 62 | uses: actions/deploy-pages@v2 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore common macOS files and directories 2 | **/.DS_Store 3 | 4 | # Ignore automatically generated files and directories 5 | /vendor/ 6 | /.fleet 7 | /.idea 8 | /.vscode 9 | 10 | # Ignore Composer generated directory and files 11 | /vendor 12 | 13 | # Ignore development tool generated files and directories 14 | .fleet 15 | .idea 16 | .vscode 17 | composer.lock 18 | 19 | # Node 20 | node_modules 21 | docs/.vitepress/cache 22 | docs/.vitepress/dist 23 | docs/.vitepress/.temp 24 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Raúl Mauricio Uñate Castro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EasyDataTable: 2 | **A Fast and Efficient Way to Create BackEnd for Any DataTable in the Laravel PHP Framework** 3 | 4 | ![LOGO](https://github.com/rmunate/EasyDataTable/assets/91748598/f05bac16-8619-4181-a994-10837c00b5d4) 5 | 6 | Are you tired of the hassle of handling DataTables in your Laravel projects? Say goodbye to the complexity! EasyDataTable is here to streamline your backend processes. 7 | 8 | With EasyDataTable, you can harness the power of Laravel's Query Builder to swiftly and effortlessly create tables with all the features you need, as demanded by [DataTables](https://datatables.net/). 9 | 10 | ## Documentation 11 | [![📖📖📖 **FULL DOCUMENTATION** 📖📖📖](https://img.shields.io/badge/FULL%20DOCUMENTATION-Visit%20Here-blue?style=for-the-badge)](https://rmunate.github.io/EasyDataTable/) 12 | 13 | ## Installation 14 | 15 | When you wish to use this solution, you must ensure the following: 16 | 17 | **PHP:** Version equal to or higher than 7.4 18 | [![Laravel 8.0+](https://img.shields.io/badge/PHP-7.4%2B-orange.svg)](https://laravel.com) 19 | 20 | **Laravel Framework:** Version equal to or higher than 8.0 21 | [![Laravel 8.0+](https://img.shields.io/badge/Laravel-8.0%2B-orange.svg)](https://laravel.com) 22 | 23 | To install the dependency via Composer, run the following command: 24 | 25 | ```shell 26 | composer require rmunate/easy-datatable 27 | ``` 28 | ## License 29 | This project is under the [MIT License](https://choosealicense.com/licenses/mit/). 30 | 31 | 🌟 Support My Projects! 🚀 32 | 33 | [![Become a Sponsor](https://img.shields.io/badge/-Become%20a%20Sponsor-blue?style=for-the-badge&logo=github)](https://github.com/sponsors/rmunate) 34 | 35 | Make any contributions you see fit; the code is entirely yours. Together, we can do amazing things and improve the world of development. Your support is invaluable. ✨ 36 | 37 | If you have ideas, suggestions, or just want to collaborate, we are open to everything! Join our community and be part of our journey to success! 🌐👩‍💻👨‍💻 38 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rmunate/easy-datatable", 3 | "description": "EasyDataTable: A powerful and elegant solution for effortless creation of dynamic datatables in Laravel applications.", 4 | "keywords": [ 5 | "laravel", 6 | "datatable", 7 | "easy-datatable", 8 | "data-grid", 9 | "backend", 10 | "laravel-package" 11 | ], 12 | "homepage": "https://github.com/rmunate/EasyDataTable", 13 | "type": "library", 14 | "license": "MIT", 15 | "autoload": { 16 | "psr-4": { 17 | "Rmunate\\EasyDatatable\\": "src/" 18 | } 19 | }, 20 | "authors": [ 21 | { 22 | "name": "Raul Mauricio Uñate Castro", 23 | "email": "raulmauriciounate@gmail.com", 24 | "homepage": "https://github.com/rmunate", 25 | "role": "owner" 26 | } 27 | ], 28 | "require": { 29 | "php": "^7.4|^8.0", 30 | "illuminate/support": "^8.0|^9.0|^10.0|^11.0" 31 | }, 32 | "require-dev": {}, 33 | "extra": { 34 | "branch-alias": { 35 | "dev-main": "1.0.x-dev" 36 | } 37 | }, 38 | "minimum-stability": "dev", 39 | "prefer-stable": true 40 | } 41 | -------------------------------------------------------------------------------- /docs/.vitepress/config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitepress' 2 | 3 | export default defineConfig({ 4 | title: "EasyDataTable", 5 | description: "A Quick and Efficient Way to Create the Backend for Any DataTable in the PHP Laravel Framework 💻✨", 6 | lang: 'en-US', 7 | lastUpdated: true, 8 | base: '/EasyDataTable', 9 | themeConfig: { 10 | footer: { 11 | message: 'Released under the MIT License.', 12 | copyright: 'Copyright © 2021-2024 Raul Mauricio Uñate' 13 | }, 14 | editLink: { 15 | pattern: 'https://github.com/rmunate/EasyDataTable/tree/main/docs/:path' 16 | }, 17 | logo: '/img/logo.png', 18 | nav: [ 19 | { 20 | text: 'Docs ^2.1', 21 | link: '/', 22 | } 23 | ], 24 | sidebar: [ 25 | { 26 | text: 'Getting Started', 27 | collapsed: false, 28 | items: [ 29 | {text: 'Introduction', link: '/home'}, 30 | {text: 'Installation', link: '/getting-started/installation'}, 31 | {text: 'Versions', link: '/getting-started/versions'}, 32 | {text: 'Release Notes', link: '/getting-started/changelog'}, 33 | ] 34 | }, { 35 | text: 'Usage', 36 | collapsed: true, 37 | items: [ 38 | {text: 'Client Side', link: '/usage/client-side'}, 39 | {text: 'Server Side', link: '/usage/server-side'} 40 | ] 41 | }, { 42 | text: 'Other Features', 43 | collapsed: true, 44 | items: [ 45 | {text: 'Data Preparated', link: '/other-features/data-preparated'} 46 | ] 47 | },{ 48 | text: 'Contribute', 49 | collapsed: true, 50 | items: [ 51 | {text: 'Bug Report', link: '/contribute/report-bugs'}, 52 | {text: 'Contribution', link: '/contribute/contribution'} 53 | ] 54 | } 55 | ], 56 | socialLinks: [ 57 | {icon: 'github', link: 'https://github.com/rmunate/PHP2JS'} 58 | ], 59 | search: { 60 | provider: 'local' 61 | } 62 | }, 63 | head: [ 64 | ['link', { 65 | rel: 'stylesheet', 66 | href: '/EasyDataTable/css/style.css' 67 | } 68 | ], 69 | ['link', { 70 | rel: 'icon', 71 | href: '/EasyDataTable/img/logo.png', 72 | type: 'image/png' 73 | } 74 | ], 75 | ['meta', { 76 | property: 'og:image', 77 | content: '/EasyDataTable/img/logo-github.png' 78 | } 79 | ], 80 | ['meta', { 81 | property: 'og:image:secure_url', 82 | content: '/EasyDataTable/img/logo-github.png' 83 | } 84 | ], 85 | ['meta', { 86 | property: 'og:image:width', 87 | content: '600' 88 | } 89 | ], 90 | ['meta', { 91 | property: 'og:image:height', 92 | content: '400' 93 | } 94 | ], 95 | ['meta', { 96 | property: 'og:title', 97 | content: 'EasyDataTable' 98 | } 99 | ], 100 | ['meta', { 101 | property: 'og:description', 102 | content: 'A Quick and Efficient Way to Create the Backend for Any DataTable in the PHP Laravel Framework 💻✨' 103 | } 104 | ], 105 | ['meta', { 106 | property: 'og:url', 107 | content: 'https://rmunate.github.io/EasyDataTable/' 108 | } 109 | ], 110 | ['meta', { 111 | property: 'og:type', 112 | content: 'website' 113 | } 114 | ] 115 | ], 116 | 117 | }) -------------------------------------------------------------------------------- /docs/contribute/contribution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contributing 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | 56 | 57 | # Contributing 58 | 59 | ## How to Contribute to this Solution? 60 | 61 | If you see ways in which we can improve, change how we handle information, adjust pre-built blocks, or add new features, or even develop them yourself and add them. 62 | 63 | We are eager to receive your pull requests! 64 | 65 | Simply fork the repository on GitHub and create pull requests (PRs) to the main branch once you have prepared your changes. 66 | 67 | It is essential to provide a clear justification for the changes or new features, accompanied by a usage manual. 68 | 69 | ::: tip TEST 70 | Remember to test your code before submitting pull requests. 71 | ::: 72 | 73 | ## Developers and Contributors 74 | 75 | 76 | 77 | ## License 78 | This project is under the [MIT License](https://choosealicense.com/licenses/mit/). 79 | 80 | 🌟 Support My Projects! 🚀 81 | 82 | [![Become a Sponsor](https://img.shields.io/badge/-Become%20a%20Sponsor-blue?style=for-the-badge&logo=github)](https://github.com/sponsors/rmunate) 83 | 84 | Make any contributions you see fit; the code is entirely yours. Together, we can do amazing things and improve the world of development. Your support is invaluable. ✨ 85 | 86 | If you have ideas, suggestions, or just want to collaborate, we are open to everything! Join our community and be part of our journey to success! 🌐👩‍💻👨‍💻 -------------------------------------------------------------------------------- /docs/contribute/report-bugs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Bug Report 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | # Bug Report 8 | 9 | If you find errors or opportunities within the package, you can create an incident that we will attend to in the shortest time possible. 10 | 11 | Here!: 12 | [https://github.com/rmunate/EasyDataTable/issues/new](https://github.com/rmunate/EasyDataTable/issues/new) 13 | 14 | Remember that you can also contribute as a collaborator of this solution. 15 | -------------------------------------------------------------------------------- /docs/getting-started/changelog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Release Notes 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | ::: warning We strongly recommend migrating to the current version 8 | If you have applications using previous versions, we highly recommend migrating to the current version. Keep in mind that the current version does not support functionalities from earlier versions. Its source code has been completely rewritten. 9 | ::: 10 | 11 | # Release Notes 12 | 13 | ## [2.0.0] - 2024-05-27 14 | 15 | - Adjusted to be compatible with Laravel 11 -------------------------------------------------------------------------------- /docs/getting-started/installation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | # Installation 8 | 9 | ## Requirements 10 | 11 | When you wish to use this solution, you must ensure the following: 12 | 13 | **PHP:** Version equal to or higher than 7.4 14 | [![Laravel 8.0+](https://img.shields.io/badge/PHP-7.4%2B-orange.svg)](https://laravel.com) 15 | 16 | **Laravel Framework:** Version equal to or higher than 8.0 17 | [![Laravel 8.0+](https://img.shields.io/badge/Laravel-8.0%2B-orange.svg)](https://laravel.com) 18 | 19 | ## Installation 20 | 21 | This package is available via Composer. You can install the latest stable version of the package by running the following command in your Laravel Framework project: 22 | 23 | ``` bash 24 | composer require rmunate/easy-datatable 25 | ``` 26 | 27 | Make sure that in the `composer.json`, you have the library in the latest version. `rmunate/easy-datatable": "^2.0"` 28 | 29 | -------------------------------------------------------------------------------- /docs/getting-started/versions.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Versions 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | # Versions 8 | 9 | During the development of this solution, multiple tool versions were released. It's crucial to note that previous versions are NOT compatible with the latest update. This documentation is tailored specifically for the usage of the current version. 10 | 11 | We highly recommend migrating from older versions to the latest release, as no support is provided for any previous versions. 12 | 13 | | Version | Release Date | End of Support Date | 14 | |--------------------------------------------------------|--------------|---------------------| 15 | | ^0.1   | 2021-10-21 | 2021-12-31 | 16 | | ^1.0   | 2022-01-01 | 2024-05-26 | 17 | | ^2.0   | 2024-05-27 | Undefined | 18 | -------------------------------------------------------------------------------- /docs/home.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | ![EasyDataTable](/img/logo-full-banner.png) 8 | 9 | ## Introduction 10 | 11 | **Welcome to EasyDataTable!** 12 | 13 | Are you tired of the hassle of handling DataTables in your Laravel projects? Say goodbye to the complexity! EasyDataTable is here to streamline your backend processes. 14 | 15 | With EasyDataTable, you can harness the power of Laravel's Query Builder to swiftly and effortlessly create tables with all the features you need, as demanded by [DataTables](https://datatables.net/). 16 | 17 | ### Explore our Frontend Compatibility! 18 | 19 | ![Frontend Technologies](/img/fronts.png) 20 | 21 | Discover the seamless integration with various frontends. Whether you're using jQuery, Vue.js, Angular, or React, EasyDataTable has got you covered! 22 | 23 | ## Table Types 24 | Below, we detail the difference between the two types of tables that you can implement in your project, depending on the amount of data you are working with. 25 | 26 | ### ClientSide 27 | The main feature of a ClientSide DataTable is that all data and data manipulation logic are handled on the client side, i.e., in the user's web browser, rather than making requests to the web server for each interaction. This means that all the data needed to populate the table is initially loaded in the user's browser, and operations such as search, filtering, sorting, and pagination are performed without the need to communicate with the server. 28 | 29 | ### ServerSide 30 | The main feature of a ServerSide DataTable is that most data-related operations are performed on the server side rather than the client side. Here are some key aspects of a ServerSide DataTable: 31 | 32 | **Efficient Data Loading:** In a ServerSide DataTable, data is loaded from the server as the user navigates the table or performs actions such as search, filtering, sorting, and pagination. This allows for handling large data sets without overloading the user's browser. 33 | 34 | **Server Requests:** When an action that requires data manipulation, such as sorting the table, is performed, the DataTable sends a request to the web server. The server processes the request and returns the corresponding data. 35 | 36 | **Efficient Filtering and Searching:** Filtering and searching are performed on the server side, which means that only relevant data is sent to the client. This is especially useful when working with large amounts of data. 37 | 38 | **Security:** By performing most operations on the server, you can implement greater security and authorization control to ensure that users only access data they have permission to access. -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | 4 | hero: 5 | name: Easy 6 | text: DataTable 7 | tagline: A Fast and Efficient Way to Create Backend for Any Datatable in the PHP Laravel Framework 💻✨ 8 | image: 9 | src: img/logo.png 10 | alt: EasyDataTable Logo 11 | actions: 12 | - theme: brand 13 | text: Get Started 14 | link: /home 15 | - theme: alt 16 | text: View on GitHub 17 | link: https://github.com/rmunate/EasyDataTable 18 | 19 | features: 20 | - icon: 🎨 21 | title: Easy and Elegant Backend 22 | details: Standardize your backend creation for any datatable in the frontend with Laravel using this package. 23 | - icon: 🔍 24 | title: Integrated with Query Builder 25 | details: Conveniently create data queries to return to the frontend with Query Builder functionality. 26 | - icon: ⚙️ 27 | title: Simple Usage Methods 28 | details: Utilize a series of useful methods to process data before returning it to the frontend. 29 | --- 30 | -------------------------------------------------------------------------------- /docs/other-features/data-preparated.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Assign 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | # Assign Same Object 8 | 9 | There will surely be cases where the data you need to return to your table is the result of a series of processes and calculations performed in your backend. In these cases, we have provided the following option: 10 | 11 | Let's assume you have the following data to return to the frontend, and note that you can have it either in an `Array` or in a Laravel `Collection`: 12 | 13 | ```php 14 | $data = [ 15 | "status" => "A", 16 | "name" => "JOHN ALEJANDRO DIAZ PINILLA", 17 | "birth_date" => "1993-11-30", 18 | "shift" => "SHIFT 235 HOURS" 19 | ] 20 | 21 | $data = new \Illuminate\Support\Collection([ 22 | "status" => "A", 23 | "name" => "CARLOS GIOVANNY RODRIGUEZ TRIVIÑO", 24 | "birth_date" => "1992-10-19", 25 | "shift" => "SHIFT 235 HOURS" 26 | ]) 27 | ``` 28 | 29 | Now, to pass this as values to return to the frontend, you can do it as follows: 30 | 31 | ```php 32 | $dataTable = new EasyDataTable(); 33 | $dataTable->fromData($data) 34 | $dataTable->map(function ($row) { 35 | return [ 36 | "status" => $row->status, 37 | "name" => $row->name, 38 | "birth_date" => $row->birth_date, 39 | "shift" => $row->shift, 40 | ]; 41 | }); 42 | ``` 43 | 44 | As you can see, we have used the `fromData` method to pass the data we had in either the `Array` or the `Collection`. -------------------------------------------------------------------------------- /docs/public/css/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --vp-home-hero-name-color: #25b7d3; 3 | --vp-button-brand-border: #25b7d3; 4 | --vp-button-brand-bg: #25b7d3; 5 | --vp-button-brand-text: black; 6 | --vp-button-brand-hover-bg: #25b7d3; 7 | --vp-c-brand-1: #25b7d3; 8 | } 9 | 10 | .tagline{ 11 | font-size: 22px !important; 12 | } -------------------------------------------------------------------------------- /docs/public/img/fronts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmunate/EasyDataTable/68a5db132270715975f9481c9f2b754cad23c7c7/docs/public/img/fronts.png -------------------------------------------------------------------------------- /docs/public/img/laravel-red.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/public/img/laravel_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/public/img/logo-full-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmunate/EasyDataTable/68a5db132270715975f9481c9f2b754cad23c7c7/docs/public/img/logo-full-banner.png -------------------------------------------------------------------------------- /docs/public/img/logo-full-scream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmunate/EasyDataTable/68a5db132270715975f9481c9f2b754cad23c7c7/docs/public/img/logo-full-scream.png -------------------------------------------------------------------------------- /docs/public/img/logo-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmunate/EasyDataTable/68a5db132270715975f9481c9f2b754cad23c7c7/docs/public/img/logo-github.png -------------------------------------------------------------------------------- /docs/public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmunate/EasyDataTable/68a5db132270715975f9481c9f2b754cad23c7c7/docs/public/img/logo.png -------------------------------------------------------------------------------- /docs/usage/client-side.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Customize JavaScript Alias 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | # Client-Side Configuration 8 | 9 | The main feature of a ClientSide DataTable is that all data and data manipulation logic are handled on the client side, i.e., in the user's web browser, rather than making requests to the web server for each interaction. This means that all the data needed to populate the table is initially loaded in the user's browser, and operations such as search, filtering, sorting, and pagination are performed without the need to communicate with the server. 10 | 11 | If you want to download the example, you can find it [here](https://github.com/rmunate/EasyDataTable/tree/master/examples/ClientSide). 12 | 13 | Let's see how to set up the backend for a ClientSide table. Remember that in these cases, all the information must be delivered to the Frontend, which is not recommended for very large data sizes. 14 | 15 | ## Route 16 | Define a GET route without sending arguments via the URL; this will be done implicitly by the JavaScript DataTable library. 17 | 18 | ```php 19 | Route::get('/module/datatable', [NameController::class, 'dataTable']); 20 | ``` 21 | 22 | ## Controller 23 | 24 | Now that we have the route, let's proceed to create the method in the corresponding controller. This method will always handle Query Builder. For now, it's not possible to use Eloquent because we need to know the names of the columns we want to render in the Frontend, and Query Builder offers more convenient ways to standardize this. 25 | 26 | ```php 27 | use Rmunate\EasyDatatable\EasyDataTable; 28 | 29 | class NameController extends Controller 30 | { 31 | /** 32 | * Define a method to handle the GET request receiving a Request type variable. 33 | */ 34 | public function dataTable(Request $request) 35 | { 36 | /** 37 | * Create a query with Query Builder; you can apply all the conditions you require, just DO NOT apply the final get() method. 38 | */ 39 | $query = DB::table('novedades') 40 | ->leftJoin('tipo_novedades', 'tipo_novedades.id', '=', 'novedades.tipo_novedad_id') 41 | ->leftJoin('empleados', 'empleados.id', '=', 'novedades.empleado_id') 42 | ->select( 43 | 'empleados.cedula AS identification', 44 | 'empleados.nombre AS employee', 45 | 'tipo_novedades.nombre AS novelty_type', 46 | 'novedades.descripcion AS description', 47 | 'novedades.dias_calendario AS calendar_days', 48 | 'novedades.dias_habiles AS business_days', 49 | 'novedades.fecha_inicial AS initial_date', 50 | 'novedades.fecha_final AS final_date' 51 | ); 52 | 53 | /** 54 | * (Optional) Sometimes, to determine if a user has permissions for some action in the table rows, you need to make queries like these. 55 | */ 56 | $permissionEdit = Auth::user()->can('novedades.editar'); 57 | 58 | /** 59 | * Using the library is as simple as using the following code. 60 | */ 61 | $datatable = new EasyDataTable(); 62 | $datatable->clientSide(); /* Mandatory / Required */ 63 | $datatable->query($query); 64 | $datatable->map(function ($row) use ($permissionEdit) { 65 | /** 66 | * (Optional) If you need to customize how the information is displayed in the table, the map() method will be very helpful. 67 | * Additionally, if you need to send additional data or perform validations, you can apply the logic here. 68 | * It's important that the alias of each value in the query is the same value used in the array, as shown below. 69 | */ 70 | return [ 71 | 'identification' => $row->identification, 72 | 'employee' => strtolower($row->employee), 73 | 'novelty_type' => strtolower($row->novelty_type), 74 | 'description' => strtolower($row->description), 75 | 'calendar_days' => $row->calendar_days, 76 | 'business_days' => $row->business_days, 77 | 'initial_date' => date('d/m/Y', strtotime($row->initial_date)), 78 | 'final_date' => date('d/m/Y', strtotime($row->final_date)), 79 | 'action' => [ 80 | 'editar' => $permissionEdit, 81 | ], 82 | ]; 83 | }); 84 | 85 | /** 86 | * This method returns the structure built as required by the DataTable library on the Frontend. 87 | */ 88 | return $datatable->response(); 89 | } 90 | } 91 | ``` 92 | 93 | ## JavaScript 94 | 95 | Below is a basic example of DataTable configuration. Here, you should use whatever you need from what DataTable offers as a JS library with JQuery. In this example, you will find what we consider necessary for you to create a table that covers the standard needs of a web software. 96 | 97 | ```javascript 98 | /* Create a global variable in the JS file to store the value of the data table to be built. This will be very useful when you need to update the information of the table without having to reload the page. */ 99 | var dataTable; 100 | 101 | /* Define this variable that will contain the base of the server where the requests will be sent */ 102 | var baseUrl = window.location.protocol + "//" + window.location.host; 103 | 104 | /* When the file is loaded */ 105 | $(document).ready(function () { 106 | /* Here we will assign to the variable an instance of dataTable; make sure it's the same ID as the table tag */ 107 | dataTable = $("#datatable").DataTable({ 108 | processing: true, 109 | responsive: true, 110 | pagingType: "full_numbers", 111 | ajax: { 112 | /* Make sure the route (web.php) is of type GET */ 113 | url: baseUrl + "/modulo/datatable", 114 | dataSrc: "data", 115 | }, 116 | columns: [ 117 | /* The name must be the same as that of the associative array returned from the BackEnd */ 118 | { data: "identification" }, 119 | { data: "employee" }, 120 | { data: "novelty_type" }, 121 | { data: "description" }, 122 | { data: "calendar_days" }, 123 | { data: "business_days" }, 124 | { data: "initial_date" }, 125 | { data: "final_date" }, 126 | { data: "action", 127 | render: function (data, type, row, meta) { 128 | let btnEdit = ""; 129 | if (data.editar) { 130 | btnEdit = ``; 133 | } 134 | return `
${btnEdit}
`; 135 | }, 136 | orderable: false, 137 | }, 138 | ], 139 | /* Remember that you can apply language settings for your region. */ 140 | language: { 141 | url: "https://cdn.datatables.net/plug-ins/1.13.5/i18n/es-ES.json", 142 | }, 143 | }); 144 | }); 145 | ``` 146 | 147 | ## HTML 148 | 149 | In the HTML, you should have a structure similar to the following. Make sure that the number of columns defined in the JS matches those defined in the HTML: 150 | 151 | ```html 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 |
IdentificationEmployeeNovelty TypeDescriptionCalendar DaysBusiness DaysInitial DateFinal DateAction
170 | ``` -------------------------------------------------------------------------------- /docs/usage/server-side.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Share Specific Values with JavaScript 3 | editLink: true 4 | outline: deep 5 | --- 6 | 7 | # Server-Side Configuration 8 | 9 | The primary feature of a ServerSide DataTable is that most data-related operations are performed on the server-side rather than the client-side. Here are some key aspects of a ServerSide DataTable: 10 | 11 | **Efficient Data Loading:** In a ServerSide DataTable, data is loaded from the server as the user navigates through the table or performs actions such as searching, filtering, sorting, and pagination. This allows for managing large data sets without overburdening the user's browser. 12 | 13 | **Server Requests:** When an action requiring data manipulation, such as sorting the table, is performed, the DataTable sends a request to the web server. The server processes the request and returns the corresponding data. 14 | 15 | **Efficient Filtering and Searching:** Filtering and searching are performed on the server-side, meaning only relevant data is sent to the client. This is especially useful when working with large data sets. 16 | 17 | **Security:** By performing most operations on the server, greater security and authorization control can be implemented to ensure that users only access data they are authorized to view. 18 | 19 | If you want to download the example, you can find it [here](https://github.com/rmunate/EasyDataTable/tree/master/examples/ServerSide). 20 | 21 | Here's how to set up the backend for a ServerSide table: 22 | 23 | ## Route 24 | 25 | You need to define a GET route without sending any arguments via the URL; this will be implicitly handled by the JS DataTable library. 26 | 27 | ```php 28 | Route::get('/module/datatable', [NameController::class, 'dataTable']); 29 | ``` 30 | 31 | ## Controller 32 | 33 | Now that we have the route, let's proceed to create the method in the corresponding controller. In this case, the method will handle Query Builder. It's not possible to use Eloquent because we need to know the names of the columns that we want to render in the Front, and Query Builder offers more convenient ways to standardize this. 34 | 35 | ```php 36 | use Rmunate\EasyDatatable\EasyDataTable; 37 | 38 | class NameController extends Controller 39 | { 40 | /** 41 | * Defines a method that handles the GET route receiving a Request variable. 42 | */ 43 | public function dataTable(Request $request) 44 | { 45 | /** 46 | * Creates a query with Query Builder, you can apply all the conditions you need, just DO NOT apply the final get() method. 47 | */ 48 | $query = DB::table('novedades') 49 | ->leftJoin('tipo_novedades', 'tipo_novedades.id', '=', 'novedades.tipo_novedad_id') 50 | ->leftJoin('empleados', 'empleados.id', '=', 'novedades.empleado_id') 51 | ->select( 52 | 'empleados.cedula AS identification', 53 | 'empleados.nombre AS employee', 54 | 'tipo_novedades.nombre AS novelty_type', 55 | 'novedades.descripcion AS description', 56 | 'novedades.dias_calendario AS calendar_days', 57 | 'novedades.dias_habiles AS business_days', 58 | 'novedades.fecha_inicial AS initial_date', 59 | 'novedades.fecha_final AS final_date', 60 | ); 61 | 62 | /** 63 | * (Optional) Sometimes, to determine if a user has permissions on some action in the table rows, you must perform queries like these. 64 | */ 65 | $permissionEdit = Auth::user()->can('novedades.editar'); /* (Optional) */ 66 | 67 | /** 68 | * Using the library is as simple as using the following code. 69 | */ 70 | $datatable = new EasyDataTable(); 71 | $datatable->serverSide(); /* Mandatory / Required */ 72 | $datatable->request($request); 73 | $datatable->query($query); 74 | $datatable->map(function ($row) use ($editar) { 75 | 76 | /** 77 | * (Optional) If you need to customize how the information is displayed in the table, the map() method will be very helpful. 78 | * Also, if you need to send additional data or perform validations, you can apply the logic here. 79 | * It's important that the alias of each value in the query matches the value used in the array, as shown below. 80 | */ 81 | 82 | return [ 83 | 'identification' => $row->identification, 84 | 'employee' => strtolower($row->employee), 85 | 'novelty_type' => strtolower($row->novelty_type), 86 | 'description' => strtolower($row->description), 87 | 'calendar_days' => $row->calendar_days, 88 | 'business_days' => $row->business_days, 89 | 'initial_date' => date('d/m/Y', strtotime($row->initial_date)), 90 | 'final_date' => date('d/m/Y', strtotime($row->final_date)), 91 | 'action' => [ 92 | 'editar' => $editar, 93 | ], 94 | ]; 95 | }); 96 | $datatable->search(function ($query, $search) { 97 | /* This method will be very useful to define which filters the backend should execute when values are entered in the search field. The variable $search will contain this value. Remember to use the table.field structure in the conditions and not the aliases. */ 98 | return $query->where(function ($query) use ($search) { 99 | $query->where('novedades.id', 'like', "%{$search}%") 100 | ->orWhere('novedades.descripcion', 'like', "%{$search}%") 101 | ->orWhere('tipo_novedades.nombre', 'like', "%{$search}%") 102 | ->orWhere('empleados.nombre', 'like', "%{$search}%") 103 | ->orWhere('empleados.cedula', 'like', "%{$search}%"); 104 | }); 105 | }); 106 | 107 | /** 108 | * This method returns the built structure as required by the DataTable library on the Front. 109 | */ 110 | return $datatable->response(); 111 | } 112 | } 113 | ``` 114 | 115 | ## JavaScript 116 | 117 | Below is a basic example of DataTable configuration. Here, it's a matter of using what you need from what DataTable offers as a JS library with JQuery. In this example, you'll find what we consider necessary for creating a table that covers the standard needs of a web software. 118 | 119 | ```javascript 120 | /* Create a global variable in the JS file to store the value of the data table to be built. This will be very useful when you need to update the table information without having to reload the page. */ 121 | var dataTable; 122 | 123 | /* Define this variable that will contain the base URL of the server where the requests will be sent */ 124 | var baseUrl = window.location.protocol + "//" + window.location.host; 125 | 126 | /* When the file is loaded */ 127 | $(document).ready(function () { 128 | /* Here we will assign to the variable an instance of dataTable; make sure it's the same ID as the table tag */ 129 | dataTable = $("#datatable").DataTable({ 130 | processing: true, 131 | serverSide: true, /* Note, this value must be true to enable communication with the server */ 132 | responsive: true, 133 | pagingType: "full_numbers", 134 | ajax: { 135 | /* Make sure the route (web.php) is of type GET */ 136 | url: baseUrl + "/modulo/datatable", 137 | dataSrc: "data", 138 | }, 139 | columns: [ 140 | /* The name must be the same as the one from the associative array returned from the BackEnd */ 141 | { data: "identification" }, 142 | { data: "employee" }, 143 | { data: "novelty_type" }, 144 | { data: "description" }, 145 | { data: "calendar_days" }, 146 | { data: "business_days" }, 147 | { data: "initial_date" }, 148 | { data: "final_date" }, 149 | { 150 | data: "action", 151 | render: function (data, type, row, meta) { 152 | let btnEdit = ""; 153 | if (data.editar) { 154 | btnEdit = ``; 157 | } 158 | return `
${btnEdit}
`; 159 | }, 160 | orderable: false, 161 | }, 162 | ], 163 | /* Remember that you can apply language settings for your region. */ 164 | language: { 165 | url: "https://cdn.datatables.net/plug-ins/1.13.5/i18n/es-ES.json", 166 | }, 167 | }); 168 | }); 169 | ``` 170 | 171 | ## HTML 172 | 173 | In HTML, you should have a structure similar to the following. Make sure that the number of columns defined in the JavaScript matches those defined in the HTML: 174 | 175 | ```html 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 |
IdentificationEmployeeNovelty TypeDescriptionCalendar DaysBusiness DaysInitial DateFinal DateAction
194 | ``` -------------------------------------------------------------------------------- /examples/ClientSide/Controller.php: -------------------------------------------------------------------------------- 1 | leftJoin('tipo_novedades', 'tipo_novedades.id', '=', 'novedades.tipo_novedad_id') 19 | ->leftJoin('empleados', 'empleados.id', '=', 'novedades.empleado_id') 20 | ->select( 21 | 'empleados.cedula AS identification', 22 | 'empleados.nombre AS employee', 23 | 'tipo_novedades.nombre AS novelty_type', 24 | 'novedades.descripcion AS description', 25 | 'novedades.dias_calendario AS calendar_days', 26 | 'novedades.dias_habiles AS business_days', 27 | 'novedades.fecha_inicial AS initial_date', 28 | 'novedades.fecha_final AS final_date' 29 | ) 30 | ->where('empleados.empresa', $request->company); 31 | 32 | /** 33 | * ES: (Opcional) A veces, para determinar si un usuario tiene permisos sobre alguna acción en las filas de la tabla, debes realizar consultas como estas. 34 | * EN: (Optional) Sometimes, to determine if a user has permissions for some action on the table rows, you need to make queries like these. 35 | */ 36 | $permissionEdit = Auth::user()->can('novedades.editar'); 37 | 38 | /** 39 | * ES: El uso de la librería es tan simple como emplear el siguiente código. 40 | * EN: Using the library is as simple as using the following code. 41 | */ 42 | $datatable = new EasyDataTable(); 43 | $datatable->clientSide(); /* Obligatorio / Requerid */ 44 | $datatable->query($query); 45 | $datatable->map(function ($row) use ($permissionEdit) { 46 | /** 47 | * ES: (Opcional) Si necesitas personalizar la forma en que se visualiza la información en la tabla, el método map() será de gran ayuda. 48 | * Además, si necesitas enviar datos adicionales o realizar validaciones, aquí puedes aplicar la lógica. 49 | * Es importante que el alias de cada valor en la consulta sea el mismo valor que se utiliza en el array, como se muestra a continuación. 50 | */ 51 | 52 | /** 53 | * EN: (Optional) If you need to customize how the information is displayed in the table, the map() method will be very helpful. 54 | * Additionally, if you need to send additional data or perform validations, you can apply the logic here. 55 | * It's important that the alias of each value in the query is the same as the value used in the array, as shown below. 56 | */ 57 | return [ 58 | 'identification' => $row->identification, 59 | 'employee' => strtolower($row->employee), 60 | 'novelty_type' => strtolower($row->novelty_type), 61 | 'description' => strtolower($row->description), 62 | 'calendar_days' => $row->calendar_days, 63 | 'business_days' => $row->business_days, 64 | 'initial_date' => date('d/m/Y', strtotime($row->initial_date)), 65 | 'final_date' => date('d/m/Y', strtotime($row->final_date)), 66 | 'action' => [ 67 | 'editar' => $permissionEdit, 68 | ], 69 | ]; 70 | }); 71 | 72 | /** 73 | * ES: Este método retorna la estructura construida tal como la requiere la librería DataTable en el Front. 74 | * EN: This method returns the constructed structure as required by the DataTable library on the Front. 75 | */ 76 | return $datatable->response(); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /examples/ClientSide/Index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
IdentificationEmployeeNovelty TypeDescriptionCcalendar DaysBusiness DaysInitial DateFinal DateAction
-------------------------------------------------------------------------------- /examples/ClientSide/WithJQuery.js: -------------------------------------------------------------------------------- 1 | /* ES: Crearás una variable global en el archivo JS para almacenar el valor de la tabla de datos a construir. Esto te será de gran utilidad cuando necesites actualizar la información de la tabla sin tener que recargar la página. */ 2 | /* EN: You will create a global variable in the JS file to store the value of the data table to be built. This will be very useful when you need to update the table information without reloading the page. */ 3 | var dataTable; 4 | 5 | /* ES: Define esta variable que contendrá la base del servidor a donde se enviarán las peticiones */ 6 | /* EN: Define this variable that will hold the server base where requests will be sent to */ 7 | var baseUrl = window.location.protocol + "//" + window.location.host 8 | 9 | /* ES: Al Cargar el archivo */ 10 | /* EN: Upon loading the file */ 11 | $(document).ready(function () { 12 | 13 | /* ES: Aquí le asignaremos a la variable una instancia de dataTable, garantiza que sea el mismo ID del tag table */ 14 | /* EN: Here, we will assign an instance of dataTable to the variable, ensure it matches the ID of the table tag */ 15 | dataTable = $("#datatable").DataTable({ 16 | processing: true, 17 | responsive: true, 18 | pagingType: "full_numbers", 19 | ajax: { 20 | /* ES: Asegúrate de que la ruta (web.php) sea de tipo GET */ 21 | /* EN: Ensure that the route (web.php) is of type GET */ 22 | url: baseUrl + "/modulo/datatable", 23 | dataSrc: "data", 24 | }, 25 | columns: [ 26 | /* ES: El nombre debe ser el mismo que el del arreglo asociativo devuelto desde el BackEnd */ 27 | /* EN: The name must be the same as that of the associative array returned from the BackEnd */ 28 | { data: "identification" }, 29 | { data: "employee" }, 30 | { data: "novelty_type" }, 31 | { data: "description" }, 32 | { data: "calendar_days" }, 33 | { data: "business_days" }, 34 | { data: "initial_date" }, 35 | { data: "final_date" }, 36 | { 37 | data: "action", 38 | render: function (data, type, row, meta) { 39 | let btnEdit = ""; 40 | if (data.editar) { 41 | btnEdit = ``; 44 | } 45 | return `
${btnEdit}
`; 46 | }, 47 | orderable: false, 48 | }, 49 | ], 50 | /* ES: Recuerda que puedes aplicar la configuración de idioma de tu región. */ 51 | /* EN: Remember that you can apply the language configuration of your region. */ 52 | language: { 53 | url: "https://cdn.datatables.net/plug-ins/1.13.5/i18n/es-ES.json", 54 | }, 55 | }); 56 | }); 57 | -------------------------------------------------------------------------------- /examples/ClientSide/WithMetronicTheme.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ESTE CODIGO ES EXCLUSIVO PARA USARLO EN LOS PROYECTOS QUE EMPLEEN EL TEMA METRONIC 3 | * THIS CODE IS EXCLUSIVE FOR USE IN PROJECTS THAT USE THE METRONIC THEME 4 | * https://keenthemes.com/metronic 5 | * https://preview.keenthemes.com/html/metronic/docs/general/datatables/server-side (See For More Settings) 6 | */ 7 | 8 | /* ES: Define esta variable que contendrá la base del servidor a donde se enviarán las peticiones */ 9 | /* EN: Define this variable that will hold the server base where requests will be sent to */ 10 | var baseUrl = window.location.protocol + "//" + window.location.host 11 | 12 | /* ES: Se requiere crear una variable global en la cual se aloje una función autoinvocada. */ 13 | /* EN: It is required to create a global variable in which a self-invoking function is hosted. */ 14 | var KTDatatablesServerSide = function () { 15 | 16 | 17 | /* ES: Variables que se emplearan durante la ejecucion de la funcion autoinvocada. */ 18 | /* EN: Variables that will be used during the execution of the self-invoking function. */ 19 | var table; 20 | var dt; 21 | 22 | /* ES: Funcion privada para la construccion de la datatable */ 23 | /* EN: Private function for datatable construction. */ 24 | var initDatatable = function () { 25 | dt = $("#datatable").DataTable({ 26 | processing: true, 27 | responsive: true, 28 | pagingType: "full_numbers", 29 | ajax: { 30 | /* ES: Asegúrate de que la ruta (web.php) sea de tipo GET */ 31 | /* EN: Ensure that the route (web.php) is of type GET */ 32 | url: baseUrl + "/modulo/datatable", 33 | dataType: "JSON", 34 | type: "GET", 35 | }, 36 | columns: [ 37 | /* ES: El nombre debe ser el mismo que el del arreglo asociativo devuelto desde el BackEnd */ 38 | /* EN: The name must be the same as that of the associative array returned from the BackEnd */ 39 | { data: "identification" }, 40 | { data: "employee" }, 41 | { data: "novelty_type" }, 42 | { data: "description" }, 43 | { data: "calendar_days" }, 44 | { data: "business_days" }, 45 | { data: "initial_date" }, 46 | { data: "final_date" }, 47 | { 48 | data: "action", 49 | render: function (data, type, row, meta) { 50 | let btnEdit = ""; 51 | if (data.editar) { 52 | btnEdit = ``; 55 | } 56 | return `
${btnEdit}
`; 57 | }, 58 | orderable: false, 59 | }, 60 | ], 61 | /* ES: Recuerda que puedes aplicar la configuración de idioma de tu región. */ 62 | /* EN: Remember that you can apply the language configuration of your region. */ 63 | "oLanguage": { 64 | "sUrl": "https://cdn.datatables.net/plug-ins/1.13.5/i18n/es-ES.json" 65 | } 66 | }); 67 | 68 | table = dt.$; 69 | } 70 | 71 | /* ES: Aqui puedes definir cual será el input de busqueda (official docs reference: https://datatables.net/reference/api/search()) */ 72 | /* EN: Here you can define which will be the search input.(official docs reference: https://datatables.net/reference/api/search()) */ 73 | var handleSearchDatatable = function () { 74 | const filterSearch = document.querySelector('[data-kt-docs-table-filter="search"]'); 75 | filterSearch.addEventListener('keyup', function (e) { 76 | dt.search(e.target.value).draw(); 77 | }); 78 | } 79 | 80 | /* ES: Metodo para la inicializacion de la datatable. */ 81 | /* EN: Method for the initialization of the datatable. */ 82 | return { 83 | init: function () { 84 | initDatatable(); 85 | handleSearchDatatable(); 86 | } 87 | } 88 | }(); 89 | 90 | /* ES: Cuando cargue el documento se llamará la variable con su funcion, algo importante es que tambien se podria usar el metodo de Jquery */ 91 | /* EN: When the document loads, the variable will be called with its function; something important is that you could also use the jQuery method. */ 92 | // KTUtil.onDOMContentLoaded() == $(document).ready() 93 | KTUtil.onDOMContentLoaded(function () { 94 | KTDatatablesServerSide.init(); 95 | }); -------------------------------------------------------------------------------- /examples/ServerSide/Controller.php: -------------------------------------------------------------------------------- 1 | leftJoin('tipo_novedades', 'tipo_novedades.id', '=', 'novedades.tipo_novedad_id') 19 | ->leftJoin('empleados', 'empleados.id', '=', 'novedades.empleado_id') 20 | ->select( 21 | 'empleados.cedula AS identification', 22 | 'empleados.nombre AS employee', 23 | 'tipo_novedades.nombre AS novelty_type', 24 | 'novedades.descripcion AS description', 25 | 'novedades.dias_calendario AS calendar_days', 26 | 'novedades.dias_habiles AS business_days', 27 | 'novedades.fecha_inicial AS initial_date', 28 | 'novedades.fecha_final AS final_date', 29 | ); 30 | 31 | /** 32 | * ES: (Opcional) A veces, para determinar si un usuario tiene permisos sobre alguna acción en las filas de la tabla, debes realizar consultas como estas. 33 | * EN: (Optional) Sometimes, to determine if a user has permissions for some action on the table rows, you need to make queries like these. 34 | */ 35 | $permissionEdit = Auth::user()->can('novedades.editar'); /* (Opcional) */ 36 | 37 | /** 38 | * ES: El uso de la librería es tan simple como emplear el siguiente código. 39 | * EN: Using the library is as simple as using the following code. 40 | */ 41 | $datatable = new EasyDataTable(); 42 | $datatable->serverSide(); /* Obligatorio / Requerid */ 43 | $datatable->request($request); 44 | $datatable->query($query); 45 | $datatable->map(function ($row) use ($editar) { 46 | /** 47 | * ES: (Opcional) Si necesitas personalizar la forma en que se visualiza la información en la tabla, el método map() será de gran ayuda. 48 | * Además, si necesitas enviar datos adicionales o realizar validaciones, aquí puedes aplicar la lógica. 49 | * Es importante que el alias de cada valor en la consulta sea el mismo valor que se utiliza en el array, como se muestra a continuación. 50 | */ 51 | 52 | /** 53 | * EN: (Optional) If you need to customize how the information is displayed in the table, the map() method will be very helpful. 54 | * Additionally, if you need to send additional data or perform validations, you can apply the logic here. 55 | * It's important that the alias of each value in the query is the same as the value used in the array, as shown below. 56 | */ 57 | 58 | return [ 59 | 'identification' => $row->identification, 60 | 'employee' => strtolower($row->employee), 61 | 'novelty_type' => strtolower($row->novelty_type), 62 | 'description' => strtolower($row->description), 63 | 'calendar_days' => $row->calendar_days, 64 | 'business_days' => $row->business_days, 65 | 'initial_date' => date('d/m/Y', strtotime($row->initial_date)), 66 | 'final_date' => date('d/m/Y', strtotime($row->final_date)), 67 | 'action' => [ 68 | 'editar' => $editar, 69 | ], 70 | ]; 71 | }); 72 | $datatable->search(function ($query, $search) { 73 | /* ES: Este método será de gran utilidad para definir qué filtros debe ejecutar el backend cuando se ingresen valores dentro del campo de búsqueda. La variable $search contendrá este valor. Recuerda utilizar la estructura tabla.campo en las condiciones y no los alias. */ 74 | /* EN: This method will be very useful to define which filters the backend should execute when values are entered in the search field. The variable $search will contain this value. Remember to use the table.field structure in the conditions and not the aliases. */ 75 | return $query->where(function ($query) use ($search) { 76 | $query->where('novedades.id', 'like', "%{$search}%") 77 | ->orWhere('novedades.descripcion', 'like', "%{$search}%") 78 | ->orWhere('tipo_novedades.nombre', 'like', "%{$search}%") 79 | ->orWhere('empleados.nombre', 'like', "%{$search}%") 80 | ->orWhere('empleados.cedula', 'like', "%{$search}%"); 81 | }); 82 | }); 83 | 84 | /** 85 | * ES: Este método retorna la estructura construida tal como la requiere la librería DataTable en el Front. 86 | * EN: This method returns the constructed structure as required by the DataTable library on the Front. 87 | */ 88 | return $datatable->response(); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /examples/ServerSide/Index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
IdentificationEmployeeNovelty TypeDescriptionCcalendar DaysBusiness DaysInitial DateFinal DateAction
-------------------------------------------------------------------------------- /examples/ServerSide/WithJQuery.js: -------------------------------------------------------------------------------- 1 | /* ES: Crearás una variable global en el archivo JS para almacenar el valor de la tabla de datos a construir. Esto te será de gran utilidad cuando necesites actualizar la información de la tabla sin tener que recargar la página. */ 2 | /* EN: You will create a global variable in the JS file to store the value of the data table to be built. This will be very useful when you need to update the table information without reloading the page. */ 3 | var dataTable; 4 | 5 | /* ES: Define esta variable que contendrá la base del servidor a donde se enviarán las peticiones */ 6 | /* EN: Define this variable that will hold the server base where requests will be sent to */ 7 | var baseUrl = window.location.protocol + "//" + window.location.host 8 | 9 | /* ES: Al Cargar el archivo */ 10 | /* EN: Upon loading the file */ 11 | $(document).ready(function () { 12 | 13 | /* ES: Aquí le asignaremos a la variable una instancia de dataTable, garantiza que sea el mismo ID del tag table */ 14 | /* EN: Here, we will assign an instance of dataTable to the variable, ensure it matches the ID of the table tag */ 15 | dataTable = $("#datatable").DataTable({ 16 | processing: true, 17 | serverSide: true, 18 | responsive: true, 19 | pagingType: "full_numbers", 20 | ajax: { 21 | /* ES: Asegúrate de que la ruta (web.php) sea de tipo GET */ 22 | /* EN: Ensure that the route (web.php) is of type GET */ 23 | url: baseUrl + "/modulo/datatable", 24 | dataType: "JSON", 25 | type: "GET", 26 | }, 27 | columns: [ 28 | /* ES: El nombre debe ser el mismo que el del arreglo asociativo devuelto desde el BackEnd */ 29 | /* EN: The name must be the same as that of the associative array returned from the BackEnd */ 30 | { data: "identification" }, 31 | { data: "employee" }, 32 | { data: "novelty_type" }, 33 | { data: "description" }, 34 | { data: "calendar_days" }, 35 | { data: "business_days" }, 36 | { data: "initial_date" }, 37 | { data: "final_date" }, 38 | { data: "action", 39 | render: function (data, type, row, meta) { 40 | let btnEdit = ""; 41 | if (data.editar) { 42 | btnEdit = ``; 45 | } 46 | return `
${btnEdit}
`; 47 | }, 48 | orderable: false, 49 | }, 50 | ], 51 | /* ES: Recuerda que puedes aplicar la configuración de idioma de tu región. */ 52 | /* EN: Remember that you can apply the language configuration of your region. */ 53 | language: { 54 | url: "https://cdn.datatables.net/plug-ins/1.13.5/i18n/es-ES.json", 55 | }, 56 | }); 57 | }); 58 | -------------------------------------------------------------------------------- /examples/ServerSide/WithMetronicTheme.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ESTE CODIGO ES EXCLUSIVO PARA USARLO EN LOS PROYECTOS QUE EMPLEEN EL TEMA METRONIC 3 | * THIS CODE IS EXCLUSIVE FOR USE IN PROJECTS THAT USE THE METRONIC THEME 4 | * https://keenthemes.com/metronic 5 | * https://preview.keenthemes.com/html/metronic/docs/general/datatables/server-side (See For More Settings) 6 | */ 7 | 8 | 9 | /* ES: Se requiere crear una variable global en la cual se aloje una función autoinvocada. */ 10 | /* EN: It is required to create a global variable in which a self-invoking function is hosted. */ 11 | var KTDatatablesServerSide = function () { 12 | 13 | 14 | /* ES: Variables que se emplearan durante la ejecucion de la funcion autoinvocada. */ 15 | /* EN: Variables that will be used during the execution of the self-invoking function. */ 16 | var table; 17 | var dt; 18 | 19 | /* ES: Funcion privada para la construccion de la datatable */ 20 | /* EN: Private function for datatable construction. */ 21 | var initDatatable = function () { 22 | dt = $("#datatable").DataTable({ 23 | processing: true, 24 | serverSide: true, 25 | responsive: true, 26 | stateSave: false, 27 | pagingType: "full_numbers", 28 | ajax: { 29 | /* ES: Asegúrate de que la ruta (web.php) sea de tipo GET */ 30 | /* EN: Ensure that the route (web.php) is of type GET */ 31 | url: baseUrl + "/modulo/datatable", 32 | dataType: "JSON", 33 | type: "GET", 34 | }, 35 | columns: [ 36 | /* ES: El nombre debe ser el mismo que el del arreglo asociativo devuelto desde el BackEnd */ 37 | /* EN: The name must be the same as that of the associative array returned from the BackEnd */ 38 | { data: "identification" }, 39 | { data: "employee" }, 40 | { data: "novelty_type" }, 41 | { data: "description" }, 42 | { data: "calendar_days" }, 43 | { data: "business_days" }, 44 | { data: "initial_date" }, 45 | { data: "final_date" }, 46 | { 47 | data: "action", 48 | render: function (data, type, row, meta) { 49 | let btnEdit = ""; 50 | if (data.editar) { 51 | btnEdit = ``; 54 | } 55 | return `
${btnEdit}
`; 56 | }, 57 | orderable: false, 58 | }, 59 | ], 60 | /* ES: Recuerda que puedes aplicar la configuración de idioma de tu región. */ 61 | /* EN: Remember that you can apply the language configuration of your region. */ 62 | "oLanguage": { 63 | "sUrl": "https://cdn.datatables.net/plug-ins/1.13.5/i18n/es-ES.json" 64 | } 65 | }); 66 | 67 | table = dt.$; 68 | } 69 | 70 | /* ES: Aqui puedes definir cual será el input de busqueda (official docs reference: https://datatables.net/reference/api/search()) */ 71 | /* EN: Here you can define which will be the search input.(official docs reference: https://datatables.net/reference/api/search()) */ 72 | var handleSearchDatatable = function () { 73 | const filterSearch = document.querySelector('[data-kt-docs-table-filter="search"]'); 74 | filterSearch.addEventListener('keyup', function (e) { 75 | dt.search(e.target.value).draw(); 76 | }); 77 | } 78 | 79 | /* ES: Metodo para la inicializacion de la datatable. */ 80 | /* EN: Method for the initialization of the datatable. */ 81 | return { 82 | init: function () { 83 | initDatatable(); 84 | handleSearchDatatable(); 85 | } 86 | } 87 | }(); 88 | 89 | /* ES: Cuando cargue el documento se llamará la variable con su funcion, algo importante es que tambien se podria usar el metodo de Jquery */ 90 | /* EN: When the document loads, the variable will be called with its function; something important is that you could also use the jQuery method. */ 91 | // KTUtil.onDOMContentLoaded() == $(document).ready() 92 | KTUtil.onDOMContentLoaded(function () { 93 | KTDatatablesServerSide.init(); 94 | }); -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EasyDataTable", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "devDependencies": { 8 | "vitepress": "^1.2.2" 9 | } 10 | }, 11 | "node_modules/@algolia/autocomplete-core": { 12 | "version": "1.9.3", 13 | "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", 14 | "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", 15 | "dev": true, 16 | "dependencies": { 17 | "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", 18 | "@algolia/autocomplete-shared": "1.9.3" 19 | } 20 | }, 21 | "node_modules/@algolia/autocomplete-plugin-algolia-insights": { 22 | "version": "1.9.3", 23 | "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", 24 | "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", 25 | "dev": true, 26 | "dependencies": { 27 | "@algolia/autocomplete-shared": "1.9.3" 28 | }, 29 | "peerDependencies": { 30 | "search-insights": ">= 1 < 3" 31 | } 32 | }, 33 | "node_modules/@algolia/autocomplete-preset-algolia": { 34 | "version": "1.9.3", 35 | "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", 36 | "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", 37 | "dev": true, 38 | "dependencies": { 39 | "@algolia/autocomplete-shared": "1.9.3" 40 | }, 41 | "peerDependencies": { 42 | "@algolia/client-search": ">= 4.9.1 < 6", 43 | "algoliasearch": ">= 4.9.1 < 6" 44 | } 45 | }, 46 | "node_modules/@algolia/autocomplete-shared": { 47 | "version": "1.9.3", 48 | "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", 49 | "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", 50 | "dev": true, 51 | "peerDependencies": { 52 | "@algolia/client-search": ">= 4.9.1 < 6", 53 | "algoliasearch": ">= 4.9.1 < 6" 54 | } 55 | }, 56 | "node_modules/@algolia/cache-browser-local-storage": { 57 | "version": "4.23.3", 58 | "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.23.3.tgz", 59 | "integrity": "sha512-vRHXYCpPlTDE7i6UOy2xE03zHF2C8MEFjPN2v7fRbqVpcOvAUQK81x3Kc21xyb5aSIpYCjWCZbYZuz8Glyzyyg==", 60 | "dev": true, 61 | "dependencies": { 62 | "@algolia/cache-common": "4.23.3" 63 | } 64 | }, 65 | "node_modules/@algolia/cache-common": { 66 | "version": "4.23.3", 67 | "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.23.3.tgz", 68 | "integrity": "sha512-h9XcNI6lxYStaw32pHpB1TMm0RuxphF+Ik4o7tcQiodEdpKK+wKufY6QXtba7t3k8eseirEMVB83uFFF3Nu54A==", 69 | "dev": true 70 | }, 71 | "node_modules/@algolia/cache-in-memory": { 72 | "version": "4.23.3", 73 | "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.23.3.tgz", 74 | "integrity": "sha512-yvpbuUXg/+0rbcagxNT7un0eo3czx2Uf0y4eiR4z4SD7SiptwYTpbuS0IHxcLHG3lq22ukx1T6Kjtk/rT+mqNg==", 75 | "dev": true, 76 | "dependencies": { 77 | "@algolia/cache-common": "4.23.3" 78 | } 79 | }, 80 | "node_modules/@algolia/client-account": { 81 | "version": "4.23.3", 82 | "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.23.3.tgz", 83 | "integrity": "sha512-hpa6S5d7iQmretHHF40QGq6hz0anWEHGlULcTIT9tbUssWUriN9AUXIFQ8Ei4w9azD0hc1rUok9/DeQQobhQMA==", 84 | "dev": true, 85 | "dependencies": { 86 | "@algolia/client-common": "4.23.3", 87 | "@algolia/client-search": "4.23.3", 88 | "@algolia/transporter": "4.23.3" 89 | } 90 | }, 91 | "node_modules/@algolia/client-analytics": { 92 | "version": "4.23.3", 93 | "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.23.3.tgz", 94 | "integrity": "sha512-LBsEARGS9cj8VkTAVEZphjxTjMVCci+zIIiRhpFun9jGDUlS1XmhCW7CTrnaWeIuCQS/2iPyRqSy1nXPjcBLRA==", 95 | "dev": true, 96 | "dependencies": { 97 | "@algolia/client-common": "4.23.3", 98 | "@algolia/client-search": "4.23.3", 99 | "@algolia/requester-common": "4.23.3", 100 | "@algolia/transporter": "4.23.3" 101 | } 102 | }, 103 | "node_modules/@algolia/client-common": { 104 | "version": "4.23.3", 105 | "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.23.3.tgz", 106 | "integrity": "sha512-l6EiPxdAlg8CYhroqS5ybfIczsGUIAC47slLPOMDeKSVXYG1n0qGiz4RjAHLw2aD0xzh2EXZ7aRguPfz7UKDKw==", 107 | "dev": true, 108 | "dependencies": { 109 | "@algolia/requester-common": "4.23.3", 110 | "@algolia/transporter": "4.23.3" 111 | } 112 | }, 113 | "node_modules/@algolia/client-personalization": { 114 | "version": "4.23.3", 115 | "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.23.3.tgz", 116 | "integrity": "sha512-3E3yF3Ocr1tB/xOZiuC3doHQBQ2zu2MPTYZ0d4lpfWads2WTKG7ZzmGnsHmm63RflvDeLK/UVx7j2b3QuwKQ2g==", 117 | "dev": true, 118 | "dependencies": { 119 | "@algolia/client-common": "4.23.3", 120 | "@algolia/requester-common": "4.23.3", 121 | "@algolia/transporter": "4.23.3" 122 | } 123 | }, 124 | "node_modules/@algolia/client-search": { 125 | "version": "4.23.3", 126 | "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.23.3.tgz", 127 | "integrity": "sha512-P4VAKFHqU0wx9O+q29Q8YVuaowaZ5EM77rxfmGnkHUJggh28useXQdopokgwMeYw2XUht49WX5RcTQ40rZIabw==", 128 | "dev": true, 129 | "dependencies": { 130 | "@algolia/client-common": "4.23.3", 131 | "@algolia/requester-common": "4.23.3", 132 | "@algolia/transporter": "4.23.3" 133 | } 134 | }, 135 | "node_modules/@algolia/logger-common": { 136 | "version": "4.23.3", 137 | "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.23.3.tgz", 138 | "integrity": "sha512-y9kBtmJwiZ9ZZ+1Ek66P0M68mHQzKRxkW5kAAXYN/rdzgDN0d2COsViEFufxJ0pb45K4FRcfC7+33YB4BLrZ+g==", 139 | "dev": true 140 | }, 141 | "node_modules/@algolia/logger-console": { 142 | "version": "4.23.3", 143 | "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.23.3.tgz", 144 | "integrity": "sha512-8xoiseoWDKuCVnWP8jHthgaeobDLolh00KJAdMe9XPrWPuf1by732jSpgy2BlsLTaT9m32pHI8CRfrOqQzHv3A==", 145 | "dev": true, 146 | "dependencies": { 147 | "@algolia/logger-common": "4.23.3" 148 | } 149 | }, 150 | "node_modules/@algolia/recommend": { 151 | "version": "4.23.3", 152 | "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.23.3.tgz", 153 | "integrity": "sha512-9fK4nXZF0bFkdcLBRDexsnGzVmu4TSYZqxdpgBW2tEyfuSSY54D4qSRkLmNkrrz4YFvdh2GM1gA8vSsnZPR73w==", 154 | "dev": true, 155 | "dependencies": { 156 | "@algolia/cache-browser-local-storage": "4.23.3", 157 | "@algolia/cache-common": "4.23.3", 158 | "@algolia/cache-in-memory": "4.23.3", 159 | "@algolia/client-common": "4.23.3", 160 | "@algolia/client-search": "4.23.3", 161 | "@algolia/logger-common": "4.23.3", 162 | "@algolia/logger-console": "4.23.3", 163 | "@algolia/requester-browser-xhr": "4.23.3", 164 | "@algolia/requester-common": "4.23.3", 165 | "@algolia/requester-node-http": "4.23.3", 166 | "@algolia/transporter": "4.23.3" 167 | } 168 | }, 169 | "node_modules/@algolia/requester-browser-xhr": { 170 | "version": "4.23.3", 171 | "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.23.3.tgz", 172 | "integrity": "sha512-jDWGIQ96BhXbmONAQsasIpTYWslyjkiGu0Quydjlowe+ciqySpiDUrJHERIRfELE5+wFc7hc1Q5hqjGoV7yghw==", 173 | "dev": true, 174 | "dependencies": { 175 | "@algolia/requester-common": "4.23.3" 176 | } 177 | }, 178 | "node_modules/@algolia/requester-common": { 179 | "version": "4.23.3", 180 | "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.23.3.tgz", 181 | "integrity": "sha512-xloIdr/bedtYEGcXCiF2muajyvRhwop4cMZo+K2qzNht0CMzlRkm8YsDdj5IaBhshqfgmBb3rTg4sL4/PpvLYw==", 182 | "dev": true 183 | }, 184 | "node_modules/@algolia/requester-node-http": { 185 | "version": "4.23.3", 186 | "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.23.3.tgz", 187 | "integrity": "sha512-zgu++8Uj03IWDEJM3fuNl34s746JnZOWn1Uz5taV1dFyJhVM/kTNw9Ik7YJWiUNHJQXcaD8IXD1eCb0nq/aByA==", 188 | "dev": true, 189 | "dependencies": { 190 | "@algolia/requester-common": "4.23.3" 191 | } 192 | }, 193 | "node_modules/@algolia/transporter": { 194 | "version": "4.23.3", 195 | "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.23.3.tgz", 196 | "integrity": "sha512-Wjl5gttqnf/gQKJA+dafnD0Y6Yw97yvfY8R9h0dQltX1GXTgNs1zWgvtWW0tHl1EgMdhAyw189uWiZMnL3QebQ==", 197 | "dev": true, 198 | "dependencies": { 199 | "@algolia/cache-common": "4.23.3", 200 | "@algolia/logger-common": "4.23.3", 201 | "@algolia/requester-common": "4.23.3" 202 | } 203 | }, 204 | "node_modules/@babel/parser": { 205 | "version": "7.24.6", 206 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.6.tgz", 207 | "integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==", 208 | "dev": true, 209 | "bin": { 210 | "parser": "bin/babel-parser.js" 211 | }, 212 | "engines": { 213 | "node": ">=6.0.0" 214 | } 215 | }, 216 | "node_modules/@docsearch/css": { 217 | "version": "3.6.0", 218 | "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.0.tgz", 219 | "integrity": "sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==", 220 | "dev": true 221 | }, 222 | "node_modules/@docsearch/js": { 223 | "version": "3.6.0", 224 | "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.6.0.tgz", 225 | "integrity": "sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==", 226 | "dev": true, 227 | "dependencies": { 228 | "@docsearch/react": "3.6.0", 229 | "preact": "^10.0.0" 230 | } 231 | }, 232 | "node_modules/@docsearch/react": { 233 | "version": "3.6.0", 234 | "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.0.tgz", 235 | "integrity": "sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==", 236 | "dev": true, 237 | "dependencies": { 238 | "@algolia/autocomplete-core": "1.9.3", 239 | "@algolia/autocomplete-preset-algolia": "1.9.3", 240 | "@docsearch/css": "3.6.0", 241 | "algoliasearch": "^4.19.1" 242 | }, 243 | "peerDependencies": { 244 | "@types/react": ">= 16.8.0 < 19.0.0", 245 | "react": ">= 16.8.0 < 19.0.0", 246 | "react-dom": ">= 16.8.0 < 19.0.0", 247 | "search-insights": ">= 1 < 3" 248 | }, 249 | "peerDependenciesMeta": { 250 | "@types/react": { 251 | "optional": true 252 | }, 253 | "react": { 254 | "optional": true 255 | }, 256 | "react-dom": { 257 | "optional": true 258 | }, 259 | "search-insights": { 260 | "optional": true 261 | } 262 | } 263 | }, 264 | "node_modules/@esbuild/aix-ppc64": { 265 | "version": "0.20.2", 266 | "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", 267 | "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", 268 | "cpu": [ 269 | "ppc64" 270 | ], 271 | "dev": true, 272 | "optional": true, 273 | "os": [ 274 | "aix" 275 | ], 276 | "engines": { 277 | "node": ">=12" 278 | } 279 | }, 280 | "node_modules/@esbuild/android-arm": { 281 | "version": "0.20.2", 282 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", 283 | "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", 284 | "cpu": [ 285 | "arm" 286 | ], 287 | "dev": true, 288 | "optional": true, 289 | "os": [ 290 | "android" 291 | ], 292 | "engines": { 293 | "node": ">=12" 294 | } 295 | }, 296 | "node_modules/@esbuild/android-arm64": { 297 | "version": "0.20.2", 298 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", 299 | "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", 300 | "cpu": [ 301 | "arm64" 302 | ], 303 | "dev": true, 304 | "optional": true, 305 | "os": [ 306 | "android" 307 | ], 308 | "engines": { 309 | "node": ">=12" 310 | } 311 | }, 312 | "node_modules/@esbuild/android-x64": { 313 | "version": "0.20.2", 314 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", 315 | "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", 316 | "cpu": [ 317 | "x64" 318 | ], 319 | "dev": true, 320 | "optional": true, 321 | "os": [ 322 | "android" 323 | ], 324 | "engines": { 325 | "node": ">=12" 326 | } 327 | }, 328 | "node_modules/@esbuild/darwin-arm64": { 329 | "version": "0.20.2", 330 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", 331 | "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", 332 | "cpu": [ 333 | "arm64" 334 | ], 335 | "dev": true, 336 | "optional": true, 337 | "os": [ 338 | "darwin" 339 | ], 340 | "engines": { 341 | "node": ">=12" 342 | } 343 | }, 344 | "node_modules/@esbuild/darwin-x64": { 345 | "version": "0.20.2", 346 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", 347 | "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", 348 | "cpu": [ 349 | "x64" 350 | ], 351 | "dev": true, 352 | "optional": true, 353 | "os": [ 354 | "darwin" 355 | ], 356 | "engines": { 357 | "node": ">=12" 358 | } 359 | }, 360 | "node_modules/@esbuild/freebsd-arm64": { 361 | "version": "0.20.2", 362 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", 363 | "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", 364 | "cpu": [ 365 | "arm64" 366 | ], 367 | "dev": true, 368 | "optional": true, 369 | "os": [ 370 | "freebsd" 371 | ], 372 | "engines": { 373 | "node": ">=12" 374 | } 375 | }, 376 | "node_modules/@esbuild/freebsd-x64": { 377 | "version": "0.20.2", 378 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", 379 | "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", 380 | "cpu": [ 381 | "x64" 382 | ], 383 | "dev": true, 384 | "optional": true, 385 | "os": [ 386 | "freebsd" 387 | ], 388 | "engines": { 389 | "node": ">=12" 390 | } 391 | }, 392 | "node_modules/@esbuild/linux-arm": { 393 | "version": "0.20.2", 394 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", 395 | "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", 396 | "cpu": [ 397 | "arm" 398 | ], 399 | "dev": true, 400 | "optional": true, 401 | "os": [ 402 | "linux" 403 | ], 404 | "engines": { 405 | "node": ">=12" 406 | } 407 | }, 408 | "node_modules/@esbuild/linux-arm64": { 409 | "version": "0.20.2", 410 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", 411 | "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", 412 | "cpu": [ 413 | "arm64" 414 | ], 415 | "dev": true, 416 | "optional": true, 417 | "os": [ 418 | "linux" 419 | ], 420 | "engines": { 421 | "node": ">=12" 422 | } 423 | }, 424 | "node_modules/@esbuild/linux-ia32": { 425 | "version": "0.20.2", 426 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", 427 | "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", 428 | "cpu": [ 429 | "ia32" 430 | ], 431 | "dev": true, 432 | "optional": true, 433 | "os": [ 434 | "linux" 435 | ], 436 | "engines": { 437 | "node": ">=12" 438 | } 439 | }, 440 | "node_modules/@esbuild/linux-loong64": { 441 | "version": "0.20.2", 442 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", 443 | "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", 444 | "cpu": [ 445 | "loong64" 446 | ], 447 | "dev": true, 448 | "optional": true, 449 | "os": [ 450 | "linux" 451 | ], 452 | "engines": { 453 | "node": ">=12" 454 | } 455 | }, 456 | "node_modules/@esbuild/linux-mips64el": { 457 | "version": "0.20.2", 458 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", 459 | "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", 460 | "cpu": [ 461 | "mips64el" 462 | ], 463 | "dev": true, 464 | "optional": true, 465 | "os": [ 466 | "linux" 467 | ], 468 | "engines": { 469 | "node": ">=12" 470 | } 471 | }, 472 | "node_modules/@esbuild/linux-ppc64": { 473 | "version": "0.20.2", 474 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", 475 | "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", 476 | "cpu": [ 477 | "ppc64" 478 | ], 479 | "dev": true, 480 | "optional": true, 481 | "os": [ 482 | "linux" 483 | ], 484 | "engines": { 485 | "node": ">=12" 486 | } 487 | }, 488 | "node_modules/@esbuild/linux-riscv64": { 489 | "version": "0.20.2", 490 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", 491 | "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", 492 | "cpu": [ 493 | "riscv64" 494 | ], 495 | "dev": true, 496 | "optional": true, 497 | "os": [ 498 | "linux" 499 | ], 500 | "engines": { 501 | "node": ">=12" 502 | } 503 | }, 504 | "node_modules/@esbuild/linux-s390x": { 505 | "version": "0.20.2", 506 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", 507 | "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", 508 | "cpu": [ 509 | "s390x" 510 | ], 511 | "dev": true, 512 | "optional": true, 513 | "os": [ 514 | "linux" 515 | ], 516 | "engines": { 517 | "node": ">=12" 518 | } 519 | }, 520 | "node_modules/@esbuild/linux-x64": { 521 | "version": "0.20.2", 522 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", 523 | "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", 524 | "cpu": [ 525 | "x64" 526 | ], 527 | "dev": true, 528 | "optional": true, 529 | "os": [ 530 | "linux" 531 | ], 532 | "engines": { 533 | "node": ">=12" 534 | } 535 | }, 536 | "node_modules/@esbuild/netbsd-x64": { 537 | "version": "0.20.2", 538 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", 539 | "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", 540 | "cpu": [ 541 | "x64" 542 | ], 543 | "dev": true, 544 | "optional": true, 545 | "os": [ 546 | "netbsd" 547 | ], 548 | "engines": { 549 | "node": ">=12" 550 | } 551 | }, 552 | "node_modules/@esbuild/openbsd-x64": { 553 | "version": "0.20.2", 554 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", 555 | "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", 556 | "cpu": [ 557 | "x64" 558 | ], 559 | "dev": true, 560 | "optional": true, 561 | "os": [ 562 | "openbsd" 563 | ], 564 | "engines": { 565 | "node": ">=12" 566 | } 567 | }, 568 | "node_modules/@esbuild/sunos-x64": { 569 | "version": "0.20.2", 570 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", 571 | "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", 572 | "cpu": [ 573 | "x64" 574 | ], 575 | "dev": true, 576 | "optional": true, 577 | "os": [ 578 | "sunos" 579 | ], 580 | "engines": { 581 | "node": ">=12" 582 | } 583 | }, 584 | "node_modules/@esbuild/win32-arm64": { 585 | "version": "0.20.2", 586 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", 587 | "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", 588 | "cpu": [ 589 | "arm64" 590 | ], 591 | "dev": true, 592 | "optional": true, 593 | "os": [ 594 | "win32" 595 | ], 596 | "engines": { 597 | "node": ">=12" 598 | } 599 | }, 600 | "node_modules/@esbuild/win32-ia32": { 601 | "version": "0.20.2", 602 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", 603 | "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", 604 | "cpu": [ 605 | "ia32" 606 | ], 607 | "dev": true, 608 | "optional": true, 609 | "os": [ 610 | "win32" 611 | ], 612 | "engines": { 613 | "node": ">=12" 614 | } 615 | }, 616 | "node_modules/@esbuild/win32-x64": { 617 | "version": "0.20.2", 618 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", 619 | "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", 620 | "cpu": [ 621 | "x64" 622 | ], 623 | "dev": true, 624 | "optional": true, 625 | "os": [ 626 | "win32" 627 | ], 628 | "engines": { 629 | "node": ">=12" 630 | } 631 | }, 632 | "node_modules/@jridgewell/sourcemap-codec": { 633 | "version": "1.4.15", 634 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 635 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 636 | "dev": true 637 | }, 638 | "node_modules/@rollup/rollup-android-arm-eabi": { 639 | "version": "4.18.0", 640 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", 641 | "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", 642 | "cpu": [ 643 | "arm" 644 | ], 645 | "dev": true, 646 | "optional": true, 647 | "os": [ 648 | "android" 649 | ] 650 | }, 651 | "node_modules/@rollup/rollup-android-arm64": { 652 | "version": "4.18.0", 653 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", 654 | "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", 655 | "cpu": [ 656 | "arm64" 657 | ], 658 | "dev": true, 659 | "optional": true, 660 | "os": [ 661 | "android" 662 | ] 663 | }, 664 | "node_modules/@rollup/rollup-darwin-arm64": { 665 | "version": "4.18.0", 666 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", 667 | "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", 668 | "cpu": [ 669 | "arm64" 670 | ], 671 | "dev": true, 672 | "optional": true, 673 | "os": [ 674 | "darwin" 675 | ] 676 | }, 677 | "node_modules/@rollup/rollup-darwin-x64": { 678 | "version": "4.18.0", 679 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", 680 | "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", 681 | "cpu": [ 682 | "x64" 683 | ], 684 | "dev": true, 685 | "optional": true, 686 | "os": [ 687 | "darwin" 688 | ] 689 | }, 690 | "node_modules/@rollup/rollup-linux-arm-gnueabihf": { 691 | "version": "4.18.0", 692 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", 693 | "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", 694 | "cpu": [ 695 | "arm" 696 | ], 697 | "dev": true, 698 | "optional": true, 699 | "os": [ 700 | "linux" 701 | ] 702 | }, 703 | "node_modules/@rollup/rollup-linux-arm-musleabihf": { 704 | "version": "4.18.0", 705 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", 706 | "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", 707 | "cpu": [ 708 | "arm" 709 | ], 710 | "dev": true, 711 | "optional": true, 712 | "os": [ 713 | "linux" 714 | ] 715 | }, 716 | "node_modules/@rollup/rollup-linux-arm64-gnu": { 717 | "version": "4.18.0", 718 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", 719 | "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", 720 | "cpu": [ 721 | "arm64" 722 | ], 723 | "dev": true, 724 | "optional": true, 725 | "os": [ 726 | "linux" 727 | ] 728 | }, 729 | "node_modules/@rollup/rollup-linux-arm64-musl": { 730 | "version": "4.18.0", 731 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", 732 | "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", 733 | "cpu": [ 734 | "arm64" 735 | ], 736 | "dev": true, 737 | "optional": true, 738 | "os": [ 739 | "linux" 740 | ] 741 | }, 742 | "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { 743 | "version": "4.18.0", 744 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", 745 | "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", 746 | "cpu": [ 747 | "ppc64" 748 | ], 749 | "dev": true, 750 | "optional": true, 751 | "os": [ 752 | "linux" 753 | ] 754 | }, 755 | "node_modules/@rollup/rollup-linux-riscv64-gnu": { 756 | "version": "4.18.0", 757 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", 758 | "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", 759 | "cpu": [ 760 | "riscv64" 761 | ], 762 | "dev": true, 763 | "optional": true, 764 | "os": [ 765 | "linux" 766 | ] 767 | }, 768 | "node_modules/@rollup/rollup-linux-s390x-gnu": { 769 | "version": "4.18.0", 770 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", 771 | "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", 772 | "cpu": [ 773 | "s390x" 774 | ], 775 | "dev": true, 776 | "optional": true, 777 | "os": [ 778 | "linux" 779 | ] 780 | }, 781 | "node_modules/@rollup/rollup-linux-x64-gnu": { 782 | "version": "4.18.0", 783 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", 784 | "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", 785 | "cpu": [ 786 | "x64" 787 | ], 788 | "dev": true, 789 | "optional": true, 790 | "os": [ 791 | "linux" 792 | ] 793 | }, 794 | "node_modules/@rollup/rollup-linux-x64-musl": { 795 | "version": "4.18.0", 796 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", 797 | "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", 798 | "cpu": [ 799 | "x64" 800 | ], 801 | "dev": true, 802 | "optional": true, 803 | "os": [ 804 | "linux" 805 | ] 806 | }, 807 | "node_modules/@rollup/rollup-win32-arm64-msvc": { 808 | "version": "4.18.0", 809 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", 810 | "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", 811 | "cpu": [ 812 | "arm64" 813 | ], 814 | "dev": true, 815 | "optional": true, 816 | "os": [ 817 | "win32" 818 | ] 819 | }, 820 | "node_modules/@rollup/rollup-win32-ia32-msvc": { 821 | "version": "4.18.0", 822 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", 823 | "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", 824 | "cpu": [ 825 | "ia32" 826 | ], 827 | "dev": true, 828 | "optional": true, 829 | "os": [ 830 | "win32" 831 | ] 832 | }, 833 | "node_modules/@rollup/rollup-win32-x64-msvc": { 834 | "version": "4.18.0", 835 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", 836 | "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", 837 | "cpu": [ 838 | "x64" 839 | ], 840 | "dev": true, 841 | "optional": true, 842 | "os": [ 843 | "win32" 844 | ] 845 | }, 846 | "node_modules/@shikijs/core": { 847 | "version": "1.6.0", 848 | "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.0.tgz", 849 | "integrity": "sha512-NIEAi5U5R7BLkbW1pG/ZKu3eb1lzc3/+jD0lFsuxMT7zjaf9bbNwdNyMr7zh/Zl8EXQtQ+MYBAt5G+JLu+5DlA==", 850 | "dev": true 851 | }, 852 | "node_modules/@shikijs/transformers": { 853 | "version": "1.6.0", 854 | "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.6.0.tgz", 855 | "integrity": "sha512-qGfHe1ECiqfE2STPWvfogIj/9Q0SK+MCRJdoITkW7AmFuB7DmbFnBT2US84+zklJOB51MzNO8RUXZiauWssJlQ==", 856 | "dev": true, 857 | "dependencies": { 858 | "shiki": "1.6.0" 859 | } 860 | }, 861 | "node_modules/@types/estree": { 862 | "version": "1.0.5", 863 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", 864 | "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", 865 | "dev": true 866 | }, 867 | "node_modules/@types/linkify-it": { 868 | "version": "5.0.0", 869 | "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", 870 | "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", 871 | "dev": true 872 | }, 873 | "node_modules/@types/markdown-it": { 874 | "version": "14.1.1", 875 | "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", 876 | "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", 877 | "dev": true, 878 | "dependencies": { 879 | "@types/linkify-it": "^5", 880 | "@types/mdurl": "^2" 881 | } 882 | }, 883 | "node_modules/@types/mdurl": { 884 | "version": "2.0.0", 885 | "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", 886 | "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", 887 | "dev": true 888 | }, 889 | "node_modules/@types/web-bluetooth": { 890 | "version": "0.0.20", 891 | "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", 892 | "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", 893 | "dev": true 894 | }, 895 | "node_modules/@vitejs/plugin-vue": { 896 | "version": "5.0.4", 897 | "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.4.tgz", 898 | "integrity": "sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==", 899 | "dev": true, 900 | "engines": { 901 | "node": "^18.0.0 || >=20.0.0" 902 | }, 903 | "peerDependencies": { 904 | "vite": "^5.0.0", 905 | "vue": "^3.2.25" 906 | } 907 | }, 908 | "node_modules/@vue/compiler-core": { 909 | "version": "3.4.27", 910 | "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.27.tgz", 911 | "integrity": "sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==", 912 | "dev": true, 913 | "dependencies": { 914 | "@babel/parser": "^7.24.4", 915 | "@vue/shared": "3.4.27", 916 | "entities": "^4.5.0", 917 | "estree-walker": "^2.0.2", 918 | "source-map-js": "^1.2.0" 919 | } 920 | }, 921 | "node_modules/@vue/compiler-dom": { 922 | "version": "3.4.27", 923 | "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.27.tgz", 924 | "integrity": "sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==", 925 | "dev": true, 926 | "dependencies": { 927 | "@vue/compiler-core": "3.4.27", 928 | "@vue/shared": "3.4.27" 929 | } 930 | }, 931 | "node_modules/@vue/compiler-sfc": { 932 | "version": "3.4.27", 933 | "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.27.tgz", 934 | "integrity": "sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==", 935 | "dev": true, 936 | "dependencies": { 937 | "@babel/parser": "^7.24.4", 938 | "@vue/compiler-core": "3.4.27", 939 | "@vue/compiler-dom": "3.4.27", 940 | "@vue/compiler-ssr": "3.4.27", 941 | "@vue/shared": "3.4.27", 942 | "estree-walker": "^2.0.2", 943 | "magic-string": "^0.30.10", 944 | "postcss": "^8.4.38", 945 | "source-map-js": "^1.2.0" 946 | } 947 | }, 948 | "node_modules/@vue/compiler-ssr": { 949 | "version": "3.4.27", 950 | "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.27.tgz", 951 | "integrity": "sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==", 952 | "dev": true, 953 | "dependencies": { 954 | "@vue/compiler-dom": "3.4.27", 955 | "@vue/shared": "3.4.27" 956 | } 957 | }, 958 | "node_modules/@vue/devtools-api": { 959 | "version": "7.2.1", 960 | "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.2.1.tgz", 961 | "integrity": "sha512-6oNCtyFOrNdqm6GUkFujsCgFlpbsHLnZqq7edeM/+cxAbMyCWvsaCsIMUaz7AiluKLccCGEM8fhOsjaKgBvb7g==", 962 | "dev": true, 963 | "dependencies": { 964 | "@vue/devtools-kit": "^7.2.1" 965 | } 966 | }, 967 | "node_modules/@vue/devtools-kit": { 968 | "version": "7.2.1", 969 | "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.2.1.tgz", 970 | "integrity": "sha512-Wak/fin1X0Q8LLIfCAHBrdaaB+R6IdpSXsDByPHbQ3BmkCP0/cIo/oEGp9i0U2+gEqD4L3V9RDjNf1S34DTzQQ==", 971 | "dev": true, 972 | "dependencies": { 973 | "@vue/devtools-shared": "^7.2.1", 974 | "hookable": "^5.5.3", 975 | "mitt": "^3.0.1", 976 | "perfect-debounce": "^1.0.0", 977 | "speakingurl": "^14.0.1" 978 | }, 979 | "peerDependencies": { 980 | "vue": "^3.0.0" 981 | } 982 | }, 983 | "node_modules/@vue/devtools-shared": { 984 | "version": "7.2.1", 985 | "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.2.1.tgz", 986 | "integrity": "sha512-PCJF4UknJmOal68+X9XHyVeQ+idv0LFujkTOIW30+GaMJqwFVN9LkQKX4gLqn61KkGMdJTzQ1bt7EJag3TI6AA==", 987 | "dev": true, 988 | "dependencies": { 989 | "rfdc": "^1.3.1" 990 | } 991 | }, 992 | "node_modules/@vue/reactivity": { 993 | "version": "3.4.27", 994 | "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.27.tgz", 995 | "integrity": "sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==", 996 | "dev": true, 997 | "dependencies": { 998 | "@vue/shared": "3.4.27" 999 | } 1000 | }, 1001 | "node_modules/@vue/runtime-core": { 1002 | "version": "3.4.27", 1003 | "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.27.tgz", 1004 | "integrity": "sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==", 1005 | "dev": true, 1006 | "dependencies": { 1007 | "@vue/reactivity": "3.4.27", 1008 | "@vue/shared": "3.4.27" 1009 | } 1010 | }, 1011 | "node_modules/@vue/runtime-dom": { 1012 | "version": "3.4.27", 1013 | "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.27.tgz", 1014 | "integrity": "sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==", 1015 | "dev": true, 1016 | "dependencies": { 1017 | "@vue/runtime-core": "3.4.27", 1018 | "@vue/shared": "3.4.27", 1019 | "csstype": "^3.1.3" 1020 | } 1021 | }, 1022 | "node_modules/@vue/server-renderer": { 1023 | "version": "3.4.27", 1024 | "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.27.tgz", 1025 | "integrity": "sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==", 1026 | "dev": true, 1027 | "dependencies": { 1028 | "@vue/compiler-ssr": "3.4.27", 1029 | "@vue/shared": "3.4.27" 1030 | }, 1031 | "peerDependencies": { 1032 | "vue": "3.4.27" 1033 | } 1034 | }, 1035 | "node_modules/@vue/shared": { 1036 | "version": "3.4.27", 1037 | "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.27.tgz", 1038 | "integrity": "sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==", 1039 | "dev": true 1040 | }, 1041 | "node_modules/@vueuse/core": { 1042 | "version": "10.9.0", 1043 | "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.9.0.tgz", 1044 | "integrity": "sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==", 1045 | "dev": true, 1046 | "dependencies": { 1047 | "@types/web-bluetooth": "^0.0.20", 1048 | "@vueuse/metadata": "10.9.0", 1049 | "@vueuse/shared": "10.9.0", 1050 | "vue-demi": ">=0.14.7" 1051 | }, 1052 | "funding": { 1053 | "url": "https://github.com/sponsors/antfu" 1054 | } 1055 | }, 1056 | "node_modules/@vueuse/core/node_modules/vue-demi": { 1057 | "version": "0.14.7", 1058 | "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", 1059 | "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", 1060 | "dev": true, 1061 | "hasInstallScript": true, 1062 | "bin": { 1063 | "vue-demi-fix": "bin/vue-demi-fix.js", 1064 | "vue-demi-switch": "bin/vue-demi-switch.js" 1065 | }, 1066 | "engines": { 1067 | "node": ">=12" 1068 | }, 1069 | "funding": { 1070 | "url": "https://github.com/sponsors/antfu" 1071 | }, 1072 | "peerDependencies": { 1073 | "@vue/composition-api": "^1.0.0-rc.1", 1074 | "vue": "^3.0.0-0 || ^2.6.0" 1075 | }, 1076 | "peerDependenciesMeta": { 1077 | "@vue/composition-api": { 1078 | "optional": true 1079 | } 1080 | } 1081 | }, 1082 | "node_modules/@vueuse/integrations": { 1083 | "version": "10.9.0", 1084 | "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.9.0.tgz", 1085 | "integrity": "sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==", 1086 | "dev": true, 1087 | "dependencies": { 1088 | "@vueuse/core": "10.9.0", 1089 | "@vueuse/shared": "10.9.0", 1090 | "vue-demi": ">=0.14.7" 1091 | }, 1092 | "funding": { 1093 | "url": "https://github.com/sponsors/antfu" 1094 | }, 1095 | "peerDependencies": { 1096 | "async-validator": "*", 1097 | "axios": "*", 1098 | "change-case": "*", 1099 | "drauu": "*", 1100 | "focus-trap": "*", 1101 | "fuse.js": "*", 1102 | "idb-keyval": "*", 1103 | "jwt-decode": "*", 1104 | "nprogress": "*", 1105 | "qrcode": "*", 1106 | "sortablejs": "*", 1107 | "universal-cookie": "*" 1108 | }, 1109 | "peerDependenciesMeta": { 1110 | "async-validator": { 1111 | "optional": true 1112 | }, 1113 | "axios": { 1114 | "optional": true 1115 | }, 1116 | "change-case": { 1117 | "optional": true 1118 | }, 1119 | "drauu": { 1120 | "optional": true 1121 | }, 1122 | "focus-trap": { 1123 | "optional": true 1124 | }, 1125 | "fuse.js": { 1126 | "optional": true 1127 | }, 1128 | "idb-keyval": { 1129 | "optional": true 1130 | }, 1131 | "jwt-decode": { 1132 | "optional": true 1133 | }, 1134 | "nprogress": { 1135 | "optional": true 1136 | }, 1137 | "qrcode": { 1138 | "optional": true 1139 | }, 1140 | "sortablejs": { 1141 | "optional": true 1142 | }, 1143 | "universal-cookie": { 1144 | "optional": true 1145 | } 1146 | } 1147 | }, 1148 | "node_modules/@vueuse/integrations/node_modules/vue-demi": { 1149 | "version": "0.14.7", 1150 | "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", 1151 | "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", 1152 | "dev": true, 1153 | "hasInstallScript": true, 1154 | "bin": { 1155 | "vue-demi-fix": "bin/vue-demi-fix.js", 1156 | "vue-demi-switch": "bin/vue-demi-switch.js" 1157 | }, 1158 | "engines": { 1159 | "node": ">=12" 1160 | }, 1161 | "funding": { 1162 | "url": "https://github.com/sponsors/antfu" 1163 | }, 1164 | "peerDependencies": { 1165 | "@vue/composition-api": "^1.0.0-rc.1", 1166 | "vue": "^3.0.0-0 || ^2.6.0" 1167 | }, 1168 | "peerDependenciesMeta": { 1169 | "@vue/composition-api": { 1170 | "optional": true 1171 | } 1172 | } 1173 | }, 1174 | "node_modules/@vueuse/metadata": { 1175 | "version": "10.9.0", 1176 | "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.9.0.tgz", 1177 | "integrity": "sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==", 1178 | "dev": true, 1179 | "funding": { 1180 | "url": "https://github.com/sponsors/antfu" 1181 | } 1182 | }, 1183 | "node_modules/@vueuse/shared": { 1184 | "version": "10.9.0", 1185 | "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.9.0.tgz", 1186 | "integrity": "sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==", 1187 | "dev": true, 1188 | "dependencies": { 1189 | "vue-demi": ">=0.14.7" 1190 | }, 1191 | "funding": { 1192 | "url": "https://github.com/sponsors/antfu" 1193 | } 1194 | }, 1195 | "node_modules/@vueuse/shared/node_modules/vue-demi": { 1196 | "version": "0.14.7", 1197 | "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.7.tgz", 1198 | "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", 1199 | "dev": true, 1200 | "hasInstallScript": true, 1201 | "bin": { 1202 | "vue-demi-fix": "bin/vue-demi-fix.js", 1203 | "vue-demi-switch": "bin/vue-demi-switch.js" 1204 | }, 1205 | "engines": { 1206 | "node": ">=12" 1207 | }, 1208 | "funding": { 1209 | "url": "https://github.com/sponsors/antfu" 1210 | }, 1211 | "peerDependencies": { 1212 | "@vue/composition-api": "^1.0.0-rc.1", 1213 | "vue": "^3.0.0-0 || ^2.6.0" 1214 | }, 1215 | "peerDependenciesMeta": { 1216 | "@vue/composition-api": { 1217 | "optional": true 1218 | } 1219 | } 1220 | }, 1221 | "node_modules/algoliasearch": { 1222 | "version": "4.23.3", 1223 | "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.23.3.tgz", 1224 | "integrity": "sha512-Le/3YgNvjW9zxIQMRhUHuhiUjAlKY/zsdZpfq4dlLqg6mEm0nL6yk+7f2hDOtLpxsgE4jSzDmvHL7nXdBp5feg==", 1225 | "dev": true, 1226 | "dependencies": { 1227 | "@algolia/cache-browser-local-storage": "4.23.3", 1228 | "@algolia/cache-common": "4.23.3", 1229 | "@algolia/cache-in-memory": "4.23.3", 1230 | "@algolia/client-account": "4.23.3", 1231 | "@algolia/client-analytics": "4.23.3", 1232 | "@algolia/client-common": "4.23.3", 1233 | "@algolia/client-personalization": "4.23.3", 1234 | "@algolia/client-search": "4.23.3", 1235 | "@algolia/logger-common": "4.23.3", 1236 | "@algolia/logger-console": "4.23.3", 1237 | "@algolia/recommend": "4.23.3", 1238 | "@algolia/requester-browser-xhr": "4.23.3", 1239 | "@algolia/requester-common": "4.23.3", 1240 | "@algolia/requester-node-http": "4.23.3", 1241 | "@algolia/transporter": "4.23.3" 1242 | } 1243 | }, 1244 | "node_modules/csstype": { 1245 | "version": "3.1.3", 1246 | "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", 1247 | "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", 1248 | "dev": true 1249 | }, 1250 | "node_modules/entities": { 1251 | "version": "4.5.0", 1252 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 1253 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", 1254 | "dev": true, 1255 | "engines": { 1256 | "node": ">=0.12" 1257 | }, 1258 | "funding": { 1259 | "url": "https://github.com/fb55/entities?sponsor=1" 1260 | } 1261 | }, 1262 | "node_modules/esbuild": { 1263 | "version": "0.20.2", 1264 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", 1265 | "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", 1266 | "dev": true, 1267 | "hasInstallScript": true, 1268 | "bin": { 1269 | "esbuild": "bin/esbuild" 1270 | }, 1271 | "engines": { 1272 | "node": ">=12" 1273 | }, 1274 | "optionalDependencies": { 1275 | "@esbuild/aix-ppc64": "0.20.2", 1276 | "@esbuild/android-arm": "0.20.2", 1277 | "@esbuild/android-arm64": "0.20.2", 1278 | "@esbuild/android-x64": "0.20.2", 1279 | "@esbuild/darwin-arm64": "0.20.2", 1280 | "@esbuild/darwin-x64": "0.20.2", 1281 | "@esbuild/freebsd-arm64": "0.20.2", 1282 | "@esbuild/freebsd-x64": "0.20.2", 1283 | "@esbuild/linux-arm": "0.20.2", 1284 | "@esbuild/linux-arm64": "0.20.2", 1285 | "@esbuild/linux-ia32": "0.20.2", 1286 | "@esbuild/linux-loong64": "0.20.2", 1287 | "@esbuild/linux-mips64el": "0.20.2", 1288 | "@esbuild/linux-ppc64": "0.20.2", 1289 | "@esbuild/linux-riscv64": "0.20.2", 1290 | "@esbuild/linux-s390x": "0.20.2", 1291 | "@esbuild/linux-x64": "0.20.2", 1292 | "@esbuild/netbsd-x64": "0.20.2", 1293 | "@esbuild/openbsd-x64": "0.20.2", 1294 | "@esbuild/sunos-x64": "0.20.2", 1295 | "@esbuild/win32-arm64": "0.20.2", 1296 | "@esbuild/win32-ia32": "0.20.2", 1297 | "@esbuild/win32-x64": "0.20.2" 1298 | } 1299 | }, 1300 | "node_modules/estree-walker": { 1301 | "version": "2.0.2", 1302 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", 1303 | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", 1304 | "dev": true 1305 | }, 1306 | "node_modules/focus-trap": { 1307 | "version": "7.5.4", 1308 | "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", 1309 | "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", 1310 | "dev": true, 1311 | "dependencies": { 1312 | "tabbable": "^6.2.0" 1313 | } 1314 | }, 1315 | "node_modules/fsevents": { 1316 | "version": "2.3.3", 1317 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 1318 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 1319 | "dev": true, 1320 | "hasInstallScript": true, 1321 | "optional": true, 1322 | "os": [ 1323 | "darwin" 1324 | ], 1325 | "engines": { 1326 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 1327 | } 1328 | }, 1329 | "node_modules/hookable": { 1330 | "version": "5.5.3", 1331 | "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", 1332 | "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", 1333 | "dev": true 1334 | }, 1335 | "node_modules/magic-string": { 1336 | "version": "0.30.10", 1337 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", 1338 | "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", 1339 | "dev": true, 1340 | "dependencies": { 1341 | "@jridgewell/sourcemap-codec": "^1.4.15" 1342 | } 1343 | }, 1344 | "node_modules/mark.js": { 1345 | "version": "8.11.1", 1346 | "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", 1347 | "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", 1348 | "dev": true 1349 | }, 1350 | "node_modules/minisearch": { 1351 | "version": "6.3.0", 1352 | "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.3.0.tgz", 1353 | "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==", 1354 | "dev": true 1355 | }, 1356 | "node_modules/mitt": { 1357 | "version": "3.0.1", 1358 | "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", 1359 | "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", 1360 | "dev": true 1361 | }, 1362 | "node_modules/nanoid": { 1363 | "version": "3.3.7", 1364 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", 1365 | "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", 1366 | "dev": true, 1367 | "funding": [ 1368 | { 1369 | "type": "github", 1370 | "url": "https://github.com/sponsors/ai" 1371 | } 1372 | ], 1373 | "bin": { 1374 | "nanoid": "bin/nanoid.cjs" 1375 | }, 1376 | "engines": { 1377 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 1378 | } 1379 | }, 1380 | "node_modules/perfect-debounce": { 1381 | "version": "1.0.0", 1382 | "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", 1383 | "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", 1384 | "dev": true 1385 | }, 1386 | "node_modules/picocolors": { 1387 | "version": "1.0.1", 1388 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", 1389 | "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", 1390 | "dev": true 1391 | }, 1392 | "node_modules/postcss": { 1393 | "version": "8.4.38", 1394 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", 1395 | "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", 1396 | "dev": true, 1397 | "funding": [ 1398 | { 1399 | "type": "opencollective", 1400 | "url": "https://opencollective.com/postcss/" 1401 | }, 1402 | { 1403 | "type": "tidelift", 1404 | "url": "https://tidelift.com/funding/github/npm/postcss" 1405 | }, 1406 | { 1407 | "type": "github", 1408 | "url": "https://github.com/sponsors/ai" 1409 | } 1410 | ], 1411 | "dependencies": { 1412 | "nanoid": "^3.3.7", 1413 | "picocolors": "^1.0.0", 1414 | "source-map-js": "^1.2.0" 1415 | }, 1416 | "engines": { 1417 | "node": "^10 || ^12 || >=14" 1418 | } 1419 | }, 1420 | "node_modules/preact": { 1421 | "version": "10.22.0", 1422 | "resolved": "https://registry.npmjs.org/preact/-/preact-10.22.0.tgz", 1423 | "integrity": "sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw==", 1424 | "dev": true, 1425 | "funding": { 1426 | "type": "opencollective", 1427 | "url": "https://opencollective.com/preact" 1428 | } 1429 | }, 1430 | "node_modules/rfdc": { 1431 | "version": "1.3.1", 1432 | "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", 1433 | "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", 1434 | "dev": true 1435 | }, 1436 | "node_modules/rollup": { 1437 | "version": "4.18.0", 1438 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", 1439 | "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", 1440 | "dev": true, 1441 | "dependencies": { 1442 | "@types/estree": "1.0.5" 1443 | }, 1444 | "bin": { 1445 | "rollup": "dist/bin/rollup" 1446 | }, 1447 | "engines": { 1448 | "node": ">=18.0.0", 1449 | "npm": ">=8.0.0" 1450 | }, 1451 | "optionalDependencies": { 1452 | "@rollup/rollup-android-arm-eabi": "4.18.0", 1453 | "@rollup/rollup-android-arm64": "4.18.0", 1454 | "@rollup/rollup-darwin-arm64": "4.18.0", 1455 | "@rollup/rollup-darwin-x64": "4.18.0", 1456 | "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", 1457 | "@rollup/rollup-linux-arm-musleabihf": "4.18.0", 1458 | "@rollup/rollup-linux-arm64-gnu": "4.18.0", 1459 | "@rollup/rollup-linux-arm64-musl": "4.18.0", 1460 | "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", 1461 | "@rollup/rollup-linux-riscv64-gnu": "4.18.0", 1462 | "@rollup/rollup-linux-s390x-gnu": "4.18.0", 1463 | "@rollup/rollup-linux-x64-gnu": "4.18.0", 1464 | "@rollup/rollup-linux-x64-musl": "4.18.0", 1465 | "@rollup/rollup-win32-arm64-msvc": "4.18.0", 1466 | "@rollup/rollup-win32-ia32-msvc": "4.18.0", 1467 | "@rollup/rollup-win32-x64-msvc": "4.18.0", 1468 | "fsevents": "~2.3.2" 1469 | } 1470 | }, 1471 | "node_modules/search-insights": { 1472 | "version": "2.14.0", 1473 | "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.14.0.tgz", 1474 | "integrity": "sha512-OLN6MsPMCghDOqlCtsIsYgtsC0pnwVTyT9Mu6A3ewOj1DxvzZF6COrn2g86E/c05xbktB0XN04m/t1Z+n+fTGw==", 1475 | "dev": true, 1476 | "peer": true 1477 | }, 1478 | "node_modules/shiki": { 1479 | "version": "1.6.0", 1480 | "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.0.tgz", 1481 | "integrity": "sha512-P31ROeXcVgW/k3Z+vUUErcxoTah7ZRaimctOpzGuqAntqnnSmx1HOsvnbAB8Z2qfXPRhw61yptAzCsuKOhTHwQ==", 1482 | "dev": true, 1483 | "dependencies": { 1484 | "@shikijs/core": "1.6.0" 1485 | } 1486 | }, 1487 | "node_modules/source-map-js": { 1488 | "version": "1.2.0", 1489 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", 1490 | "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", 1491 | "dev": true, 1492 | "engines": { 1493 | "node": ">=0.10.0" 1494 | } 1495 | }, 1496 | "node_modules/speakingurl": { 1497 | "version": "14.0.1", 1498 | "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", 1499 | "integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==", 1500 | "dev": true, 1501 | "engines": { 1502 | "node": ">=0.10.0" 1503 | } 1504 | }, 1505 | "node_modules/tabbable": { 1506 | "version": "6.2.0", 1507 | "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", 1508 | "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", 1509 | "dev": true 1510 | }, 1511 | "node_modules/vite": { 1512 | "version": "5.2.11", 1513 | "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", 1514 | "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", 1515 | "dev": true, 1516 | "dependencies": { 1517 | "esbuild": "^0.20.1", 1518 | "postcss": "^8.4.38", 1519 | "rollup": "^4.13.0" 1520 | }, 1521 | "bin": { 1522 | "vite": "bin/vite.js" 1523 | }, 1524 | "engines": { 1525 | "node": "^18.0.0 || >=20.0.0" 1526 | }, 1527 | "funding": { 1528 | "url": "https://github.com/vitejs/vite?sponsor=1" 1529 | }, 1530 | "optionalDependencies": { 1531 | "fsevents": "~2.3.3" 1532 | }, 1533 | "peerDependencies": { 1534 | "@types/node": "^18.0.0 || >=20.0.0", 1535 | "less": "*", 1536 | "lightningcss": "^1.21.0", 1537 | "sass": "*", 1538 | "stylus": "*", 1539 | "sugarss": "*", 1540 | "terser": "^5.4.0" 1541 | }, 1542 | "peerDependenciesMeta": { 1543 | "@types/node": { 1544 | "optional": true 1545 | }, 1546 | "less": { 1547 | "optional": true 1548 | }, 1549 | "lightningcss": { 1550 | "optional": true 1551 | }, 1552 | "sass": { 1553 | "optional": true 1554 | }, 1555 | "stylus": { 1556 | "optional": true 1557 | }, 1558 | "sugarss": { 1559 | "optional": true 1560 | }, 1561 | "terser": { 1562 | "optional": true 1563 | } 1564 | } 1565 | }, 1566 | "node_modules/vitepress": { 1567 | "version": "1.2.2", 1568 | "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.2.2.tgz", 1569 | "integrity": "sha512-uZ3nXR5NY4nYj3RJWCo5jev9qlNZAQo5SUXu1U0QSUx84cUm/o7hCTDVjZ4njVSVui+PsV1oAbdQOg8ygbaf4w==", 1570 | "dev": true, 1571 | "dependencies": { 1572 | "@docsearch/css": "^3.6.0", 1573 | "@docsearch/js": "^3.6.0", 1574 | "@shikijs/core": "^1.5.2", 1575 | "@shikijs/transformers": "^1.5.2", 1576 | "@types/markdown-it": "^14.1.1", 1577 | "@vitejs/plugin-vue": "^5.0.4", 1578 | "@vue/devtools-api": "^7.2.0", 1579 | "@vue/shared": "^3.4.27", 1580 | "@vueuse/core": "^10.9.0", 1581 | "@vueuse/integrations": "^10.9.0", 1582 | "focus-trap": "^7.5.4", 1583 | "mark.js": "8.11.1", 1584 | "minisearch": "^6.3.0", 1585 | "shiki": "^1.5.2", 1586 | "vite": "^5.2.11", 1587 | "vue": "^3.4.27" 1588 | }, 1589 | "bin": { 1590 | "vitepress": "bin/vitepress.js" 1591 | }, 1592 | "peerDependencies": { 1593 | "markdown-it-mathjax3": "^4", 1594 | "postcss": "^8" 1595 | }, 1596 | "peerDependenciesMeta": { 1597 | "markdown-it-mathjax3": { 1598 | "optional": true 1599 | }, 1600 | "postcss": { 1601 | "optional": true 1602 | } 1603 | } 1604 | }, 1605 | "node_modules/vue": { 1606 | "version": "3.4.27", 1607 | "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.27.tgz", 1608 | "integrity": "sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==", 1609 | "dev": true, 1610 | "dependencies": { 1611 | "@vue/compiler-dom": "3.4.27", 1612 | "@vue/compiler-sfc": "3.4.27", 1613 | "@vue/runtime-dom": "3.4.27", 1614 | "@vue/server-renderer": "3.4.27", 1615 | "@vue/shared": "3.4.27" 1616 | }, 1617 | "peerDependencies": { 1618 | "typescript": "*" 1619 | }, 1620 | "peerDependenciesMeta": { 1621 | "typescript": { 1622 | "optional": true 1623 | } 1624 | } 1625 | } 1626 | } 1627 | } 1628 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "vitepress": "^1.2.2" 4 | }, 5 | "scripts": { 6 | "docs:dev": "vitepress dev docs", 7 | "docs:build": "vitepress build docs", 8 | "docs:preview": "vitepress preview docs" 9 | } 10 | } -------------------------------------------------------------------------------- /src/Bases/EasyDataTableBase.php: -------------------------------------------------------------------------------- 1 | maxExecutionTime(); 36 | $this->memoryLimit(); 37 | } 38 | 39 | /** 40 | * Set the server-side mode for the EasyDataTable. 41 | * 42 | * @return $this 43 | */ 44 | public function serverSide() 45 | { 46 | $this->serverSide = true; 47 | $this->clientSide = false; 48 | 49 | return $this; 50 | } 51 | 52 | /** 53 | * Set the client-side mode for the EasyDataTable. 54 | * 55 | * @return $this 56 | */ 57 | public function clientSide() 58 | { 59 | $this->serverSide = false; 60 | $this->clientSide = true; 61 | 62 | return $this; 63 | } 64 | 65 | /** 66 | * Set the request for the EasyDataTable. 67 | * 68 | * @param \Illuminate\Http\Request $request 69 | * 70 | * @return $this 71 | */ 72 | public function request(Request $request) 73 | { 74 | $this->request = $request; 75 | 76 | return $this; 77 | } 78 | 79 | /** 80 | * Set the query for the EasyDataTable. 81 | * 82 | * @param \Illuminate\Database\Query\Builder $query 83 | * 84 | * @return $this 85 | */ 86 | public function query(Builder $query) 87 | { 88 | $this->query = $query; 89 | 90 | return $this; 91 | } 92 | 93 | /** 94 | * Set the array or a collection for the EasyDataTable. 95 | * 96 | * @param iterable $data 97 | * 98 | * @return $this 99 | */ 100 | public function fromData(iterable $data) 101 | { 102 | $this->clientSide(); 103 | $this->data = $data; 104 | 105 | return $this; 106 | } 107 | 108 | /** 109 | * Set the map closure for the EasyDataTable. 110 | * 111 | * @param \Closure $map 112 | * 113 | * @return $this 114 | */ 115 | public function map(Closure $map) 116 | { 117 | $this->map = $map; 118 | 119 | return $this; 120 | } 121 | 122 | /** 123 | * Set the search closure for the EasyDataTable. 124 | * 125 | * @param \Closure $search 126 | * 127 | * @return $this 128 | */ 129 | public function search(Closure $search) 130 | { 131 | $this->search = $search; 132 | 133 | return $this; 134 | } 135 | 136 | /** 137 | * Get the response for the EasyDataTable. 138 | * 139 | * @return array 140 | */ 141 | public function response() 142 | { 143 | if ($this->serverSide) { 144 | return $this->dataServerSide(); 145 | } 146 | 147 | if ($this->clientSide) { 148 | if (!empty($this->request)) { 149 | throw DatatableException::create("The '->request()' method is only for ServerSide mode."); 150 | } 151 | 152 | if (!empty($this->search)) { 153 | throw DatatableException::create("The '->search()' method is only for ServerSide mode."); 154 | } 155 | 156 | return $this->dataClientSide(); 157 | } 158 | } 159 | 160 | /** 161 | * Get the response for client-side EasyDataTable. 162 | * 163 | * @return array 164 | */ 165 | private function dataClientSide() 166 | { 167 | $rows = is_iterable($this->data) ? $this->data : $this->query->get(); 168 | 169 | $data = []; 170 | foreach ($rows as $r) { 171 | $item = !empty($this->map) ? ($this->map)((object) $r) : $r; 172 | $data[] = $item; 173 | } 174 | 175 | return [ 176 | 'data' => $data, 177 | ]; 178 | } 179 | 180 | /** 181 | * Get the response for server-side EasyDataTable. 182 | * 183 | * @return array 184 | */ 185 | private function dataServerSide() 186 | { 187 | $totalData = $this->query->count(); 188 | $limit = $this->limit(); 189 | $start = $this->start(); 190 | $order = $this->order(); 191 | $dir = $this->direction(); 192 | 193 | if (empty($this->inputSearch())) { 194 | $rows = $this->query->offset($start)->limit($limit)->orderBy($order, $dir)->get(); 195 | $totalFiltered = $totalData; 196 | } else { 197 | $search = $this->inputSearch(); 198 | 199 | if (!empty($this->search)) { 200 | $newRows = ($this->search)($this->query, $search); 201 | } else { 202 | $columns = $this->query->columns; 203 | $tableAndField = []; 204 | 205 | foreach ($columns as $column) { 206 | if (strpos($column, '*') === false) { 207 | $tableAndField[] = explode(' ', $column)[0]; 208 | } 209 | } 210 | 211 | $newRows = $this->query->where(function ($query) use ($search, $tableAndField) { 212 | foreach ($tableAndField as $field) { 213 | $query->orWhere($field, 'LIKE', "%{$search}%"); 214 | } 215 | }); 216 | } 217 | 218 | $totalFiltered = $newRows->count(); 219 | $rows = $newRows->offset($start)->limit($limit)->orderBy($order, $dir)->get(); 220 | } 221 | 222 | $data = []; 223 | foreach ($rows as $r) { 224 | $item = !empty($this->map) ? ($this->map)($r) : $r; 225 | $data[] = $item; 226 | } 227 | 228 | return [ 229 | 'draw' => $this->draw(), 230 | 'recordsTotal' => $totalData, 231 | 'recordsFiltered' => $totalFiltered, 232 | 'data' => $data, 233 | ]; 234 | } 235 | } 236 | -------------------------------------------------------------------------------- /src/Exceptions/DatatableException.php: -------------------------------------------------------------------------------- 1 | request->has('length')) { 24 | return $this->request->input('length'); 25 | } 26 | 27 | throw DatatableException::create("Property 'length' not found in the request."); 28 | } 29 | 30 | /** 31 | * Get the start value for the database query based on DataTable input. 32 | * 33 | * @throws \Rmunate\EasyDatatable\Exceptions\DatatableException If 'start' is not found in the request. 34 | * 35 | * @return int|null 36 | */ 37 | public function start() 38 | { 39 | if ($this->request->has('start')) { 40 | return $this->request->input('start'); 41 | } 42 | 43 | throw DatatableException::create("Property 'start' not found in the request."); 44 | } 45 | 46 | /** 47 | * Get the requested ordering column from the DataTable. 48 | * 49 | * @throws \Rmunate\EasyDatatable\Exceptions\DatatableException If 'order.0.column' or 'order.column' is not found in the request. 50 | * 51 | * @return string|null 52 | */ 53 | public function order() 54 | { 55 | if ($this->request->has('order.0.column')) { 56 | $column = $this->request->input('order.0.column'); 57 | } elseif ($this->request->has('order.column')) { 58 | $column = $this->request->input('order.column'); 59 | } else { 60 | // throw DatatableException::create("Property 'order.0.column' or 'order.column' not found in the request."); 61 | $column = 0; 62 | } 63 | 64 | return $this->request->columns[$column]['data']; 65 | } 66 | 67 | /** 68 | * Get the ordering direction from the DataTable. 69 | * 70 | * @throws \Rmunate\EasyDatatable\Exceptions\DatatableException If 'order.0.dir' or 'order.dir' is not found in the request. 71 | * 72 | * @return string|null 73 | */ 74 | public function direction() 75 | { 76 | if ($this->request->has('order.0.dir')) { 77 | return $this->request->input('order.0.dir'); 78 | } elseif ($this->request->has('order.dir')) { 79 | return $this->request->input('order.dir'); 80 | } 81 | 82 | return 'asc'; 83 | // throw DatatableException::create("Property 'order.0.dir' or 'order.dir' not found in the request."); 84 | } 85 | 86 | /** 87 | * Get the search value from the DataTable input. 88 | * 89 | * @throws \Rmunate\EasyDatatable\Exceptions\DatatableException If 'search.value' or 'search' is not found in the request. 90 | * 91 | * @return string|null 92 | */ 93 | public function inputSearch() 94 | { 95 | if ($this->request->has('search.value')) { 96 | return $this->request->input('search.value'); 97 | } elseif ($this->request->has('search')) { 98 | return $this->request->input('search'); 99 | } 100 | 101 | throw DatatableException::create("Property 'search' not found in the request."); 102 | } 103 | 104 | /** 105 | * Get the "draw" value sent by the DataTable. 106 | * 107 | * @throws \Rmunate\EasyDatatable\Exceptions\DatatableException If 'draw' is not found in the request. 108 | * 109 | * @return int|null 110 | */ 111 | public function draw() 112 | { 113 | if ($this->request->has('draw')) { 114 | return intval($this->request->input('draw')); 115 | } 116 | 117 | throw DatatableException::create("Property 'draw' not found in the request."); 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /src/Traits/Init.php: -------------------------------------------------------------------------------- 1 | maxExecutionTime = $seconds; 37 | 38 | // Set the PHP configuration for maximum execution time 39 | ini_set('max_execution_time', $seconds); 40 | 41 | // Allow method chaining by returning the current instance 42 | return $this; 43 | } 44 | 45 | /** 46 | * Set the memory limit for the script. 47 | * 48 | * This method sets the `memory_limit` directive in PHP to the specified 49 | * value, allowing scripts to use more memory if necessary. 50 | * 51 | * @param string $limit Memory limit. Default is '512M'. 52 | * 53 | * @return $this 54 | */ 55 | public function memoryLimit(string $limit = '512M') 56 | { 57 | // Store the memory limit in the instance variable 58 | $this->memoryLimit = $limit; 59 | 60 | // Set the PHP configuration for memory limit 61 | ini_set('memory_limit', $limit); 62 | 63 | // Allow method chaining by returning the current instance 64 | return $this; 65 | } 66 | } 67 | --------------------------------------------------------------------------------