datatables.net-searchbuilder 1.3.1 → 1.3.4
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/js/dataTables.searchBuilder.js +318 -264
- package/js/dataTables.searchBuilder.min.js +146 -143
- package/package.json +1 -1
- package/types/criteria.d.ts +20 -6
- package/types/group.d.ts +5 -2
- package/types/index.d.ts +1 -1
- package/types/searchBuilder.d.ts +7 -0
package/package.json
CHANGED
package/types/criteria.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface IClasses {
|
|
|
11
11
|
dropDown: string;
|
|
12
12
|
greyscale: string;
|
|
13
13
|
input: string;
|
|
14
|
+
inputCont: string;
|
|
14
15
|
italic: string;
|
|
15
16
|
joiner: string;
|
|
16
17
|
left: string;
|
|
@@ -41,6 +42,7 @@ export interface IDom {
|
|
|
41
42
|
dataTitle: JQuery<HTMLElement>;
|
|
42
43
|
defaultValue: JQuery<HTMLElement>;
|
|
43
44
|
delete: JQuery<HTMLElement>;
|
|
45
|
+
inputCont: JQuery<HTMLElement>;
|
|
44
46
|
left: JQuery<HTMLElement>;
|
|
45
47
|
right: JQuery<HTMLElement>;
|
|
46
48
|
value: Array<JQuery<HTMLElement>>;
|
|
@@ -60,6 +62,10 @@ export interface IS {
|
|
|
60
62
|
filled: boolean;
|
|
61
63
|
index: number;
|
|
62
64
|
origData: string;
|
|
65
|
+
preventRedraw: boolean;
|
|
66
|
+
serverData: {
|
|
67
|
+
[keys: string]: builderType.IServerData[];
|
|
68
|
+
};
|
|
63
69
|
topGroup: JQuery<HTMLElement>;
|
|
64
70
|
type: string;
|
|
65
71
|
value: string[];
|
|
@@ -95,7 +101,7 @@ export default class Criteria {
|
|
|
95
101
|
dom: IDom;
|
|
96
102
|
c: builderType.IDefaults;
|
|
97
103
|
s: IS;
|
|
98
|
-
constructor(table: any, opts: builderType.IDefaults, topGroup: JQuery<HTMLElement>, index?: number, depth?: number);
|
|
104
|
+
constructor(table: any, opts: builderType.IDefaults, topGroup: JQuery<HTMLElement>, index?: number, depth?: number, serverData?: any);
|
|
99
105
|
/**
|
|
100
106
|
* Escape html characters within a string
|
|
101
107
|
*
|
|
@@ -107,6 +113,10 @@ export default class Criteria {
|
|
|
107
113
|
* Default initialisation function for select conditions
|
|
108
114
|
*/
|
|
109
115
|
private static initSelect;
|
|
116
|
+
/**
|
|
117
|
+
* Default initialisation function for select conditions
|
|
118
|
+
*/
|
|
119
|
+
private static initSelectSSP;
|
|
110
120
|
/**
|
|
111
121
|
* Default initialisation function for select array conditions
|
|
112
122
|
*
|
|
@@ -147,6 +157,13 @@ export default class Criteria {
|
|
|
147
157
|
* Function that is run on each element as a call back when a search should be triggered
|
|
148
158
|
*/
|
|
149
159
|
private static updateListener;
|
|
160
|
+
/**
|
|
161
|
+
* Parses formatted numbers down to a form where they can be compared
|
|
162
|
+
*
|
|
163
|
+
* @param val the value to convert
|
|
164
|
+
* @returns the converted value
|
|
165
|
+
*/
|
|
166
|
+
private static parseNumFmt;
|
|
150
167
|
static dateConditions: {
|
|
151
168
|
[keys: string]: ICondition;
|
|
152
169
|
};
|
|
@@ -172,7 +189,7 @@ export default class Criteria {
|
|
|
172
189
|
/**
|
|
173
190
|
* Adds the left button to the criteria
|
|
174
191
|
*/
|
|
175
|
-
updateArrows(hasSiblings?: boolean
|
|
192
|
+
updateArrows(hasSiblings?: boolean): void;
|
|
176
193
|
/**
|
|
177
194
|
* Destroys the criteria, removing listeners and container from the dom
|
|
178
195
|
*/
|
|
@@ -208,10 +225,7 @@ export default class Criteria {
|
|
|
208
225
|
* Sets the listeners for the criteria
|
|
209
226
|
*/
|
|
210
227
|
setListeners(): void;
|
|
211
|
-
|
|
212
|
-
* Adjusts the criteria to make SearchBuilder responsive
|
|
213
|
-
*/
|
|
214
|
-
private _adjustCriteria;
|
|
228
|
+
setupButtons(): void;
|
|
215
229
|
/**
|
|
216
230
|
* Builds the elements of the dom together
|
|
217
231
|
*/
|
package/types/group.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ export interface IS {
|
|
|
28
28
|
logic: string;
|
|
29
29
|
opts: builderType.IDefaults;
|
|
30
30
|
preventRedraw: boolean;
|
|
31
|
+
serverData: {
|
|
32
|
+
[keys: string]: builderType.IServerData;
|
|
33
|
+
};
|
|
31
34
|
toDrop: Criteria;
|
|
32
35
|
topGroup: JQuery<HTMLElement>;
|
|
33
36
|
}
|
|
@@ -68,7 +71,7 @@ export default class Group {
|
|
|
68
71
|
dom: IDom;
|
|
69
72
|
c: builderType.IDefaults;
|
|
70
73
|
s: IS;
|
|
71
|
-
constructor(table: any, opts: builderType.IDefaults, topGroup: JQuery<HTMLElement>, index?: number, isChild?: boolean, depth?: number);
|
|
74
|
+
constructor(table: any, opts: builderType.IDefaults, topGroup: JQuery<HTMLElement>, index?: number, isChild?: boolean, depth?: number, serverData?: any);
|
|
72
75
|
/**
|
|
73
76
|
* Destroys the groups buttons, clears the internal criteria and removes it from the dom
|
|
74
77
|
*/
|
|
@@ -117,7 +120,7 @@ export default class Group {
|
|
|
117
120
|
*
|
|
118
121
|
* @param crit Instance of Criteria to be added to the group
|
|
119
122
|
*/
|
|
120
|
-
addCriteria(crit?: Criteria
|
|
123
|
+
addCriteria(crit?: Criteria): void;
|
|
121
124
|
/**
|
|
122
125
|
* Checks the group to see if it has any filled criteria
|
|
123
126
|
*/
|
package/types/index.d.ts
CHANGED
package/types/searchBuilder.d.ts
CHANGED
|
@@ -72,10 +72,17 @@ export interface II18n {
|
|
|
72
72
|
value: string;
|
|
73
73
|
valueJoiner: string;
|
|
74
74
|
}
|
|
75
|
+
export interface IServerData {
|
|
76
|
+
label: any;
|
|
77
|
+
value: any;
|
|
78
|
+
}
|
|
75
79
|
export interface IS {
|
|
76
80
|
dt: any;
|
|
77
81
|
opts: IDefaults;
|
|
78
82
|
search: (settings: any, searchData: any, dataIndex: any, origData: any) => boolean;
|
|
83
|
+
serverData: {
|
|
84
|
+
[keys: string]: IServerData[];
|
|
85
|
+
};
|
|
79
86
|
topGroup: Group;
|
|
80
87
|
}
|
|
81
88
|
/**
|