datatables.net-searchbuilder-bs 1.4.0 → 1.5.0
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.
- package/css/searchBuilder.bootstrap.css +8 -4
- package/css/searchBuilder.bootstrap.min.css +1 -1
- package/js/searchBuilder.bootstrap.js +23 -16
- package/js/searchBuilder.bootstrap.min.js +1 -1
- package/js/searchBuilder.bootstrap.min.mjs +1 -1
- package/js/searchBuilder.bootstrap.mjs +4 -2
- package/package.json +4 -4
- package/types/types.d.ts +0 -99
|
@@ -3,9 +3,8 @@ div.dt-button-collection {
|
|
|
3
3
|
z-index: 2002 !important;
|
|
4
4
|
}
|
|
5
5
|
div.dt-button-collection div.dtsb-searchBuilder {
|
|
6
|
-
|
|
7
|
-
padding-
|
|
8
|
-
padding-right: 10px !important;
|
|
6
|
+
padding-left: 1em !important;
|
|
7
|
+
padding-right: 1em !important;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
div.dt-button-collection.dtb-collection-closeable div.dtsb-titleRow {
|
|
@@ -80,7 +79,7 @@ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {
|
|
|
80
79
|
margin-right: 0.8em;
|
|
81
80
|
min-width: 5em;
|
|
82
81
|
max-width: 20em;
|
|
83
|
-
|
|
82
|
+
color: inherit;
|
|
84
83
|
}
|
|
85
84
|
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown option.dtsb-notItalic,
|
|
86
85
|
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input option.dtsb-notItalic {
|
|
@@ -99,6 +98,11 @@ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont span.
|
|
|
99
98
|
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input.dtsb-value {
|
|
100
99
|
width: 33%;
|
|
101
100
|
}
|
|
101
|
+
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont select,
|
|
102
|
+
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input {
|
|
103
|
+
height: 100%;
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
}
|
|
102
106
|
div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer {
|
|
103
107
|
margin-left: auto;
|
|
104
108
|
display: inline-block;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
div.dt-button-collection{overflow:visible !important;z-index:2002 !important}div.dt-button-collection div.dtsb-searchBuilder{
|
|
1
|
+
div.dt-button-collection{overflow:visible !important;z-index:2002 !important}div.dt-button-collection div.dtsb-searchBuilder{padding-left:1em !important;padding-right:1em !important}div.dt-button-collection.dtb-collection-closeable div.dtsb-titleRow{padding-right:40px}.dtsb-greyscale{border:1px solid #cecece !important}div.dtsb-logicContainer .dtsb-greyscale{border:none !important}div.dtsb-searchBuilder{justify-content:space-evenly;cursor:default;margin-bottom:1em;text-align:left}div.dtsb-searchBuilder button.dtsb-button,div.dtsb-searchBuilder select{font-size:1em}div.dtsb-searchBuilder div.dtsb-titleRow{justify-content:space-evenly;margin-bottom:.5em}div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title{display:inline-block;padding-top:6px}div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title:empty{display:inline}div.dtsb-searchBuilder div.dtsb-titleRow button.dtsb-clearAll{float:right;margin-bottom:.333em}div.dtsb-searchBuilder div.dtsb-vertical .dtsb-value,div.dtsb-searchBuilder div.dtsb-vertical .dtsb-data,div.dtsb-searchBuilder div.dtsb-vertical .dtsb-condition{display:block}div.dtsb-searchBuilder div.dtsb-group{position:relative;clear:both;margin-bottom:.8em}div.dtsb-searchBuilder div.dtsb-group button.dtsb-clearGroup{margin:2px;text-align:center;padding:0}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);position:absolute;margin-top:.8em;margin-right:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria{margin-bottom:.8em;display:flex;justify-content:start;flex-flow:row wrap}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input{padding:.4em;margin-right:.8em;min-width:5em;max-width:20em;color:inherit}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown option.dtsb-notItalic,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input option.dtsb-notItalic{font-style:normal}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-italic{font-style:italic}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont{flex:1;white-space:nowrap}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont span.dtsp-joiner{margin-right:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input.dtsb-value{width:33%}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont select,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input{height:100%;box-sizing:border-box}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer{margin-left:auto;display:inline-block}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-delete,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-right,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-left{margin-right:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-delete:last-child,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-right:last-child,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button.dtsb-left:last-child{margin-right:0}@media screen and (max-width: 550px){div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria{display:flex;flex-flow:none;flex-direction:column;justify-content:start;padding-right:calc(35px + 0.8em);margin-bottom:0px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:first-child),div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:nth-child(2)),div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:last-child){padding-top:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:first-child,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:nth-child(2),div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:last-child{padding-top:0em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input{max-width:none;width:100%;margin-bottom:.8em;margin-right:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont{margin-right:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer{position:absolute;width:35px;display:flex;flex-wrap:wrap-reverse;right:0}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button{margin-right:0px !important}}div.dtsb-searchBuilder div.dtsb-titleRow{height:40px}div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title{padding-top:10px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer{border:1px solid #ccc;border-radius:4px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start;margin-top:.8em}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-logic{border:none;border-radius:0px;flex-grow:1;flex-shrink:0;flex-basis:3em;margin:0px;padding:6px 9px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-clearGroup{border:none;border-radius:0px;min-width:2em;margin:0px}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-condition{border-color:#4cae4c}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-data{border-color:#d43f3a}div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value,div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-value{border-color:#2e6da4}
|
|
@@ -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-bs')(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
|
/*! Bootstrap 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-bs","datatables.net-searchbuilder"],function(
|
|
4
|
+
!function(n){var d,a;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-searchbuilder"],function(t){return n(t,window,document)}):"object"==typeof exports?(d=require("jquery"),a=function(t,e){e.fn.dataTable||require("datatables.net-bs")(t,e),e.fn.dataTable.SearchBuilder||require("datatables.net-searchbuilder")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||d(t),a(t,e),n(e,0,t.document)}:(a(window,d),module.exports=n(d,window,window.document))):n(jQuery,window,document)}(function(t,e,n,d){"use strict";var a=t.fn.dataTable;return t.extend(!0,a.SearchBuilder.classes,{clearAll:"btn btn-default dtsb-clearAll"}),t.extend(!0,a.Group.classes,{add:"btn btn-default dtsb-add",clearGroup:"btn btn-default dtsb-clearGroup",logic:"btn btn-default dtsb-logic"}),t.extend(!0,a.Criteria.classes,{condition:"form-control dtsb-condition",data:"form-control dtsb-data",delete:"btn btn-default dtsb-delete",left:"btn btn-default dtsb-left",right:"btn btn-default dtsb-right",value:"form-control dtsb-value"}),a});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! Bootstrap ui integration for DataTables' SearchBuilder
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import jQuery from"jquery";import DataTable from"datatables.net-bs";import SearchBuilder from"datatables.net-searchbuilder";let $=jQuery;$.extend(!0,DataTable.SearchBuilder.classes,{clearAll:"btn btn-default dtsb-clearAll"}),$.extend(!0,DataTable.Group.classes,{add:"btn btn-default dtsb-add",clearGroup:"btn btn-default dtsb-clearGroup",logic:"btn btn-default dtsb-logic"}),$.extend(!0,DataTable.Criteria.classes,{condition:"form-control dtsb-condition",data:"form-control dtsb-data",delete:"btn btn-default dtsb-delete",left:"btn btn-default dtsb-left",right:"btn btn-default dtsb-right",value:"form-control dtsb-value"});export default DataTable;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import jQuery from 'jquery';
|
|
6
6
|
import DataTable from 'datatables.net-bs';
|
|
7
|
-
import 'datatables.net-searchbuilder';
|
|
7
|
+
import SearchBuilder from 'datatables.net-searchbuilder';
|
|
8
8
|
|
|
9
|
+
// Allow reassignment of the $ variable
|
|
10
|
+
let $ = jQuery;
|
|
9
11
|
|
|
10
12
|
$.extend(true, DataTable.SearchBuilder.classes, {
|
|
11
13
|
clearAll: 'btn btn-default dtsb-clearAll'
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"main": "js/searchBuilder.bootstrap.js",
|
|
5
5
|
"module": "js/searchBuilder.bootstrap.mjs",
|
|
6
6
|
"style": "css/searchBuilder.bootstrap.css",
|
|
7
|
-
"types": "./types/
|
|
8
|
-
"version": "1.
|
|
7
|
+
"types": "./types/searchBuilder.bootstrap.d.ts",
|
|
8
|
+
"version": "1.5.0",
|
|
9
9
|
"files": [
|
|
10
10
|
"css/**/*.css",
|
|
11
11
|
"js/**/*.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"sort"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"datatables.net-searchbuilder": ">=1.
|
|
28
|
-
"datatables.net-bs": ">=1.
|
|
27
|
+
"datatables.net-searchbuilder": ">=1.4.2",
|
|
28
|
+
"datatables.net-bs": ">=1.13.4",
|
|
29
29
|
"jquery": ">=1.7"
|
|
30
30
|
},
|
|
31
31
|
"moduleType": [
|
package/types/types.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// Type definitions for DataTables SearchBuilder
|
|
2
|
-
//
|
|
3
|
-
// Project: https://datatables.net/extensions/searchbuilder/, https://datatables.net
|
|
4
|
-
|
|
5
|
-
/// <reference types="jquery" />
|
|
6
|
-
|
|
7
|
-
import DataTables, {Api} from 'datatables.net';
|
|
8
|
-
import {IDefaults, IDetails, II18n} from './searchBuilder';
|
|
9
|
-
|
|
10
|
-
export default DataTables;
|
|
11
|
-
|
|
12
|
-
type DeepPartial<T> = T extends object ? {
|
|
13
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
14
|
-
} : T;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
18
|
-
* DataTables' types integration
|
|
19
|
-
*/
|
|
20
|
-
declare module 'datatables.net' {
|
|
21
|
-
interface Config {
|
|
22
|
-
/**
|
|
23
|
-
* SearchBuilder extension options
|
|
24
|
-
*/
|
|
25
|
-
searchBuilder?: boolean | string[] | ConfigSearchBuilder | ConfigSearchBuilder[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface ConfigLanguage {
|
|
29
|
-
/**
|
|
30
|
-
* SearchBuilder language options
|
|
31
|
-
*/
|
|
32
|
-
searchBuilder?: ConfigSearchBuilderLanguage;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface Api<T> {
|
|
36
|
-
/**
|
|
37
|
-
* SearchBuilder methods container
|
|
38
|
-
*
|
|
39
|
-
* @returns Api for chaining with the additional SearchBuilder methods
|
|
40
|
-
*/
|
|
41
|
-
searchBuilder: ApiSearchBuilder<T>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
interface ApiStatic {
|
|
45
|
-
/**
|
|
46
|
-
* SearchBuilder class
|
|
47
|
-
*/
|
|
48
|
-
SearchBuilder: {
|
|
49
|
-
/**
|
|
50
|
-
* Create a new SearchBuilder instance for the target DataTable
|
|
51
|
-
*/
|
|
52
|
-
new (dt: Api<any>, settings: string[] | ConfigSearchBuilder | ConfigSearchBuilder[]);
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* SearchBuilder version
|
|
56
|
-
*/
|
|
57
|
-
version: string;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Default configuration values
|
|
61
|
-
*/
|
|
62
|
-
defaults: ConfigSearchBuilder;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
69
|
-
* Options
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
interface ConfigSearchBuilder extends Partial<IDefaults> {}
|
|
73
|
-
|
|
74
|
-
interface ConfigSearchBuilderLanguage extends DeepPartial<II18n> {}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
78
|
-
* API
|
|
79
|
-
*/
|
|
80
|
-
interface ApiSearchBuilder<T> extends Api<T> {
|
|
81
|
-
/**
|
|
82
|
-
* Returns the node of the SearchBuilder Container
|
|
83
|
-
*/
|
|
84
|
-
container(): JQuery<HTMLElement>;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Gets the details of the current SearchBuilder setup
|
|
88
|
-
*/
|
|
89
|
-
getDetails(): IDetails;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Rebuild the search to a given state.
|
|
93
|
-
*
|
|
94
|
-
* @param state Object of the same structure that is returned from searchBuilder.getDetails().
|
|
95
|
-
* This contains all of the details needed to rebuild the state.
|
|
96
|
-
* @returns self for chaining
|
|
97
|
-
*/
|
|
98
|
-
rebuild(state: IDetails): Api<T>;
|
|
99
|
-
}
|