datatables.net-searchbuilder-bm 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,30 +11,37 @@
|
|
|
11
11
|
}
|
|
12
12
|
else if ( typeof exports === 'object' ) {
|
|
13
13
|
// CommonJS
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// CommonJS environments without a window global must pass a
|
|
17
|
-
// root. This will give an error otherwise
|
|
18
|
-
root = window;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if ( ! $ ) {
|
|
22
|
-
$ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window
|
|
23
|
-
require('jquery') :
|
|
24
|
-
require('jquery')( root );
|
|
25
|
-
}
|
|
26
|
-
|
|
14
|
+
var jq = require('jquery');
|
|
15
|
+
var cjsRequires = function (root, $) {
|
|
27
16
|
if ( ! $.fn.dataTable ) {
|
|
28
17
|
require('datatables.net-bm')(root, $);
|
|
29
18
|
}
|
|
30
19
|
|
|
31
|
-
if ( ! $.fn.dataTable ) {
|
|
20
|
+
if ( ! $.fn.dataTable.SearchBuilder ) {
|
|
32
21
|
require('datatables.net-searchbuilder')(root, $);
|
|
33
22
|
}
|
|
23
|
+
};
|
|
34
24
|
|
|
25
|
+
if (typeof window !== 'undefined') {
|
|
26
|
+
module.exports = function (root, $) {
|
|
27
|
+
if ( ! root ) {
|
|
28
|
+
// CommonJS environments without a window global must pass a
|
|
29
|
+
// root. This will give an error otherwise
|
|
30
|
+
root = window;
|
|
31
|
+
}
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
if ( ! $ ) {
|
|
34
|
+
$ = jq( root );
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
cjsRequires( root, $ );
|
|
38
|
+
return factory( $, root, root.document );
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
cjsRequires( window, jq );
|
|
43
|
+
module.exports = factory( jq, window, window.document );
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
46
|
else {
|
|
40
47
|
// Browser
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Bulma ui integration for DataTables' SearchBuilder
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
|
-
!function(n){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bm","datatables.net-searchbuilder"],function(e){return n(e,window,document)}):"object"==typeof exports?
|
|
4
|
+
!function(n){var d,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bm","datatables.net-searchbuilder"],function(e){return n(e,window,document)}):"object"==typeof exports?(d=require("jquery"),r=function(e,t){t.fn.dataTable||require("datatables.net-bm")(e,t),t.fn.dataTable.SearchBuilder||require("datatables.net-searchbuilder")(e,t)},"undefined"!=typeof window?module.exports=function(e,t){return e=e||window,t=t||d(e),r(e,t),n(t,0,e.document)}:(r(window,d),module.exports=n(d,window,window.document))):n(jQuery,window,document)}(function(e,t,n,d){"use strict";var r=e.fn.dataTable;return e.extend(!0,r.SearchBuilder.classes,{clearAll:"button dtsb-clearAll"}),e.extend(!0,r.Group.classes,{add:"button dtsb-add",clearGroup:"button dtsb-clearGroup is-light",logic:"button dtsb-logic is-light"}),e.extend(!0,r.Criteria.classes,{container:"dtsb-criteria",delete:"button dtsb-delete",left:"button dtsb-left",right:"button dtsb-right"}),r});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Bulma ui integration for DataTables' SearchBuilder
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
|
-
import $ from"jquery";import DataTable from"datatables.net-bm";import"datatables.net-searchbuilder";$.extend(!0,DataTable.SearchBuilder.classes,{clearAll:"button dtsb-clearAll"}),$.extend(!0,DataTable.Group.classes,{add:"button dtsb-add",clearGroup:"button dtsb-clearGroup is-light",logic:"button dtsb-logic is-light"}),$.extend(!0,DataTable.Criteria.classes,{container:"dtsb-criteria",delete:"button dtsb-delete",left:"button dtsb-left",right:"button dtsb-right"});export default DataTable;
|
|
4
|
+
import $ from"jquery";import DataTable from"datatables.net-bm";import SearchBuilder from"datatables.net-searchbuilder";$.extend(!0,DataTable.SearchBuilder.classes,{clearAll:"button dtsb-clearAll"}),$.extend(!0,DataTable.Group.classes,{add:"button dtsb-add",clearGroup:"button dtsb-clearGroup is-light",logic:"button dtsb-logic is-light"}),$.extend(!0,DataTable.Criteria.classes,{container:"dtsb-criteria",delete:"button dtsb-delete",left:"button dtsb-left",right:"button dtsb-right"});export default DataTable;
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import $ from 'jquery';
|
|
6
6
|
import DataTable from 'datatables.net-bm';
|
|
7
|
-
import 'datatables.net-searchbuilder';
|
|
8
|
-
|
|
7
|
+
import SearchBuilder from 'datatables.net-searchbuilder';
|
|
9
8
|
|
|
10
9
|
$.extend(true, DataTable.SearchBuilder.classes, {
|
|
11
10
|
clearAll: 'button dtsb-clearAll'
|
package/package.json
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -32,6 +32,22 @@ declare module 'datatables.net' {
|
|
|
32
32
|
searchBuilder?: ConfigSearchBuilderLanguage;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
interface ConfigColumns {
|
|
36
|
+
searchBuilder?: {
|
|
37
|
+
/** Set a default condition for this column */
|
|
38
|
+
defaultCondition?: number | string;
|
|
39
|
+
|
|
40
|
+
/** Set values of orthogonal data for rendering functions */
|
|
41
|
+
orthogonal?: {[key: string]: string};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** Set a custom title for a column in SearchBuilder */
|
|
45
|
+
searchBuilderTitle?: string;
|
|
46
|
+
|
|
47
|
+
/** Set the SearchBuilder type to use for a column */
|
|
48
|
+
searchBuilderType?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
35
51
|
interface Api<T> {
|
|
36
52
|
/**
|
|
37
53
|
* SearchBuilder methods container
|