datatables.net-searchbuilder-bs4
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -1,51 +0,49 @@ | ||
(function () { | ||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
// AMD | ||
define(['jquery', 'datatables.net-bs4', 'datatables.net-searchbuilder'], function ($) { | ||
return factory($, window, document); | ||
}); | ||
} | ||
else if (typeof exports === 'object') { | ||
// CommonJS | ||
module.exports = function (root, $) { | ||
if (!root) { | ||
root = window; | ||
} | ||
if (!$ || !$.fn.dataTable) { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
$ = require('datatables.net-bs4')(root, $).$; | ||
} | ||
if (!$.fn.dataTable.searchBuilder) { | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
require('datatables.net-searchbuilder')(root, $); | ||
} | ||
return factory($, root, root.document); | ||
}; | ||
} | ||
else { | ||
// Browser | ||
factory(jQuery, window, document); | ||
} | ||
}(function ($, window, document) { | ||
'use strict'; | ||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
// AMD | ||
define(['jquery', 'datatables.net-bs4', 'datatables.net-searchbuilder'], function ($) { | ||
return factory($, window, document); | ||
}); | ||
} | ||
else if (typeof exports === 'object') { | ||
// CommonJS | ||
module.exports = function (root, $) { | ||
if (!root) { | ||
root = window; | ||
} | ||
if (!$ || !$.fn.dataTable) { | ||
$ = require('datatables.net-bs4')(root, $).$; | ||
} | ||
if (!$.fn.dataTable.searchBuilder) { | ||
require('datatables.net-searchbuilder')(root, $); | ||
} | ||
return factory($, root, root.document); | ||
}; | ||
} | ||
else { | ||
// Browser | ||
factory(jQuery, window, document); | ||
} | ||
}(function ($, window, document) { | ||
var DataTable = $.fn.dataTable; | ||
$.extend(true, DataTable.SearchBuilder.classes, { | ||
clearAll: 'btn btn-light dtsb-clearAll' | ||
}); | ||
$.extend(true, DataTable.Group.classes, { | ||
add: 'btn btn-light dtsb-add', | ||
clearGroup: 'btn btn-light dtsb-clearGroup', | ||
logic: 'btn btn-light dtsb-logic' | ||
}); | ||
$.extend(true, DataTable.Criteria.classes, { | ||
condition: 'form-control dtsb-condition', | ||
data: 'form-control dtsb-data', | ||
"delete": 'btn btn-light dtsb-delete', | ||
left: 'btn btn-light dtsb-left', | ||
right: 'btn btn-light dtsb-right', | ||
value: 'form-control dtsb-value' | ||
}); | ||
return DataTable.searchPanes; | ||
})); | ||
}()); | ||
var dataTable = $.fn.dataTable; | ||
$.extend(true, dataTable.SearchBuilder.classes, { | ||
clearAll: 'btn btn-light dtsb-clearAll' | ||
}); | ||
$.extend(true, dataTable.Group.classes, { | ||
add: 'btn btn-light dtsb-add', | ||
clearGroup: 'btn btn-light dtsb-clearGroup', | ||
logic: 'btn btn-light dtsb-logic' | ||
}); | ||
$.extend(true, dataTable.Criteria.classes, { | ||
condition: 'form-control dtsb-condition', | ||
data: 'form-control dtsb-data', | ||
"delete": 'btn btn-light dtsb-delete', | ||
left: 'btn btn-light dtsb-left', | ||
right: 'btn btn-light dtsb-right', | ||
value: 'form-control dtsb-value' | ||
}); | ||
return dataTable.searchPanes; | ||
})); |
@@ -0,1 +1,3 @@ | ||
The MIT License (MIT) | ||
Copyright SpryMedia Limited and other contributors | ||
@@ -20,2 +22,2 @@ http://datatables.net | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
THE SOFTWARE. |
{ | ||
"name": "datatables.net-searchbuilder-bs4", | ||
"version": "1.0.1", | ||
"description": "Advanced Search Builder for DataTables with styling for [Bootstrap](http://getbootstrap.com/)", | ||
"description": "SearchBuilder for DataTables with styling for [Bootstrap4](https://getbootstrap.com/docs/4.6/getting-started/introduction/)", | ||
"main": "js/searchBuilder.bootstrap4.js", | ||
"style": "css/searchBuilder.bootstrap4.css", | ||
"types": "./types/searchBuilder.bootstrap4.d.ts", | ||
"version": "1.1.0", | ||
"files": [ | ||
@@ -9,28 +12,40 @@ "css/**/*.css", | ||
], | ||
"main": "js/searchBuilder.bootstrap4.js", | ||
"style": "css/searchBuilder.bootstrap4.css", | ||
"keywords": [ | ||
"SearchBuilder", | ||
"Filtering", | ||
"Search", | ||
"Filtering", | ||
"DataTables", | ||
"Bootstrap", | ||
"Bootstrap4", | ||
"Datatables", | ||
"jQuery", | ||
"table", | ||
"Bootstrap" | ||
"filter", | ||
"sort" | ||
], | ||
"homepage": "https://datatables.net", | ||
"bugs": "https://datatables.net/forums", | ||
"license": "MIT", | ||
"author": { | ||
"name": "SpryMedia ltd", | ||
"url": "http://datatables.net" | ||
}, | ||
"dependencies": { | ||
"jquery": ">=1.7", | ||
"datatables.net-bs4": "^1.10.15", | ||
"datatables.net-searchbuilder": "1.0.1" | ||
"datatables.net-searchbuilder": "1.1.0" | ||
}, | ||
"moduleType": [ | ||
"globals", | ||
"amd", | ||
"node" | ||
], | ||
"ignore": [ | ||
"composer.json", | ||
"datatables.json", | ||
"package.json" | ||
], | ||
"author": { | ||
"name": "SpryMedia Ltd", | ||
"url": "http://datatables.net" | ||
}, | ||
"homepage": "https://datatables.net", | ||
"bugs": "https://datatables.net/forums", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/DataTables/Dist-DataTables-SearchBuilder-Bootstrap4.git" | ||
"url": "https://github.com/DataTables/Dist-DataTables-SearchBuilder-Bootstrap4.git" | ||
} | ||
} |
@@ -1,36 +0,57 @@ | ||
# SearchBuilder | ||
# SearchBuilder for DataTables with styling for [Bootstrap4](https://getbootstrap.com/docs/4.6/getting-started/introduction/) | ||
SearchBuilder adds user defined complex search to the DataTable with the capability to search the DataTable by creating groups and conditions. This offers more advanced search controls than is currently offered by [SearchPanes](/extensions/searchpanes) or the core DataTables functionality. It is possible to set logic types for groups and apply a variety of conditions. | ||
This package contains a built distribution of the [SearchBuilder extension](https://datatables.net/extensions/SearchBuilder) for [DataTables](https://datatables.net/) with styling for [Bootstrap4](https://getbootstrap.com/docs/4.6/getting-started/introduction/). | ||
# Installation | ||
SearchBuilder adds user defined complex search to the DataTable with the capability to search the DataTable by creating groups and conditions. | ||
The SearchBuilder extension is available on the [DataTables CDN](https://cdn.datatables.net/#SearchBuilder) and in the [download builder](/download). See the [documentation](http://datatables.net/extensions/searchbuilder/) for full details. | ||
# NPM | ||
## Installation | ||
You can also install it from [NPM](/download/npm/#SearchBuilder) | ||
### Browser | ||
If you prefer to use a package manager such as NPM or Bower, distribution repositories are available with software built from this repository under the name `datatables.net-searchpanes. Styling packages for Bootstrap, Foundation and other styling libraries are also available by adding a suffix to the package name. | ||
For inclusion of this library using a standard `<script>` tag, rather than using this package, it is recommended that you use the [DataTables download builder](//datatables.net/download) which can create CDN or locally hosted packages for you, will all dependencies satisfied. | ||
Please see the DataTables [NPM](//datatables.net/download/npm) installation page for further information. The [DataTables installation manual](//datatables.net/manual/installation) also has details on how to use package managers with DataTables. | ||
### npm | ||
# Basic Usage | ||
``` | ||
npm install datatables.net-searchbuilder-bs4 | ||
``` | ||
SearchBuilder is initialised by placing a `Q` into the DataTables [`dom`](https://datatables.net/reference/option/dom) option. Further options can be specified using this option as an object - see the documentation for details. For example: | ||
ES3 Syntax | ||
``` | ||
var $ = require( 'jquery' ); | ||
var dt = require( 'datatables.net-searchbuilder-bs4' )( window, $ ); | ||
``` | ||
```js | ||
$(document).ready(function() { | ||
$('#example').DataTable( { | ||
dom: 'Qfrtip' | ||
}); | ||
}); | ||
ES6 Syntax | ||
``` | ||
import 'datatables.net-searchbuilder-bs4' | ||
``` | ||
# Documentation / Support | ||
### bower | ||
* [Documentation](https://datatables.net/extensions/searchbuilder/) | ||
* [DataTables support forums](http://datatables.net/forums) | ||
``` | ||
bower install --save datatables.net-searchbuilder-bs4 | ||
``` | ||
# GitHub | ||
If you fancy getting involved with the development of SearchBuilder and help make it better, please refer to its [GitHub repo](https://github.com/DataTables/SearchBuilder) | ||
## Documentation | ||
Full documentation and examples for SearchBuilder can be found [on the website](https://datatables.net/extensions/searchbuilder). | ||
## Bug / Support | ||
Support for DataTables is available through the [DataTables forums](//datatables.net/forums) and [commercial support options](//datatables.net/support) are available. | ||
### Contributing | ||
If you are thinking of contributing code to DataTables, first of all, thank you! All fixes, patches and enhancements to DataTables are very warmly welcomed. This repository is a distribution repo, so patches and issues sent to this repo will not be accepted. Instead, please direct pull requests to the [DataTables/SearchBuilder](http://github.com/DataTables/SearchBuilder). For issues / bugs, please direct your questions to the [DataTables forums](//datatables.net/forums). | ||
## License | ||
This software is released under the [MIT license](//datatables.net/license). You are free to use, modify and distribute this software, but all copyright information must remain. | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
58
15596
203
+ Addeddatatables.net-searchbuilder@1.1.0(transitive)
- Removeddatatables.net-searchbuilder@1.0.1(transitive)