11<!DOCTYPE html>
2- < html >
2+ < html data-bs-theme =" light " >
33< head >
44 < meta charset ="utf-8 ">
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
66
77 < title > jQuery QueryBuilder Example</ title >
88
99 < link rel ="stylesheet " href ="/node_modules/bootstrap/dist/css/bootstrap.css " id ="bt-theme ">
10- < link rel ="stylesheet " href ="/node_modules/bootstrap-select/dist/css/bootstrap-select.css ">
1110 < link rel ="stylesheet " href ="/node_modules/chosenjs/chosen.css ">
1211 < link rel ="stylesheet " href ="/node_modules/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css ">
1312 < link rel ="stylesheet " href ="/node_modules/bootstrap-slider/dist/css/bootstrap-slider.css ">
14- < link rel ="stylesheet " href ="/node_modules/selectize/dist/css/selectize.bootstrap3 .css ">
15-
13+ < link rel ="stylesheet " href ="/node_modules/@ selectize/selectize/ dist/css/selectize.bootstrap5 .css ">
14+ < link rel =" stylesheet " href =" /node_modules/bootstrap-icons/font/bootstrap-icons.css " >
1615 < link rel ="stylesheet " href ="/dist/css/query-builder.default.css " id ="qb-theme ">
17- < link rel ="stylesheet " href ="http://mistic100.github.io/jQuery-QueryBuilder/assets/flags/flags.css ">
18-
19- < style >
20- .flag {
21- display : inline-block;
22- }
23- </ style >
2416</ head >
2517
2618< body >
2719
2820< div class ="container ">
29- < div class ="col-md-12 col-lg-10 col -lg-offset -1 ">
21+ < div class ="col-md-12 col-lg-10 offset -lg-1 ">
3022 < div class ="page-header ">
31- < a class ="pull-right " href ="https://github.com/mistic100/jQuery-QueryBuilder ">
23+ < a class ="float-end " href ="https://github.com/mistic100/jQuery-QueryBuilder ">
3224 < img src ="https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png " style ="height:48px; ">
3325 </ a >
3426 < h1 > jQuery QueryBuilder
@@ -40,47 +32,47 @@ <h1>jQuery QueryBuilder
4032 < label > Theme:</ label >
4133 < div class ="btn-group ">
4234 < button class ="btn btn-primary btn-sm change-theme " data-qb ="/dist/css/query-builder.default.css "
43- data-bt ="/node_modules/bootstrap/dist/css/bootstrap.css "> Default
35+ data-bt ="default "> Default
4436 </ button >
4537 < button class ="btn btn-primary btn-sm change-theme " data-qb ="/dist/css/query-builder.dark.css "
46- data-bt ="/node_modules/bootswatch-dist/css/bootstrap.css "> Dark
38+ data-bt ="dark "> Dark
4739 </ button >
4840 </ div >
4941
5042 < label > Language:</ label >
51- < select name ="language " class ="selectpicker show-tick show-menu-arrow " data-width ="auto ">
52- < option value ="sq " data-icon =" flag flag-al " > Albanian</ option >
53- < option value ="ar " data-icon =" flag flag-ar " > Arabic</ option >
54- < option value ="az " data-icon =" flag flag-az " > Azerbaijani</ option >
55- < option value ="bg " data-icon =" flag flag-bg " > Bulgarian</ option >
56- < option value ="zh-CN " data-icon =" flag flag-zh-CN " > Simplified Chinese</ option >
57- < option value ="cs " data-icon =" flag flag-cs " > Czech</ option >
58- < option value ="de " data-icon =" flag flag-de " > German</ option >
59- < option value ="da " data-icon =" flag flag-dk " > Danish</ option >
60- < option value ="nl " data-icon =" flag flag-nl " > Dutch</ option >
61- < option value ="en " data-icon =" flag flag-gb " selected > English</ option >
62- < option value ="fa-IR " data-icon =" flag flag-ir " > Farsi</ option >
63- < option value ="fr " data-icon =" flag flag-fr " > French</ option >
64- < option value ="el " data-icon =" flag flag-el " > Greek</ option >
65- < option value ="he " data-icon =" flag flag-he " > Hebrew</ option >
66- < option value ="it " data-icon =" flag flag-it " > Italian</ option >
67- < option value ="no " data-icon =" flag flag-no " > Norwegian</ option >
68- < option value ="pl " data-icon =" flag flag-pl " > Polish</ option >
69- < option value ="pt-PT " data-icon =" flag flag-pt-PT " > Portuguese</ option >
70- < option value ="pt-BR " data-icon =" flag flag-pt-BR " > Brazilian Portuguese</ option >
71- < option value ="ro " data-icon =" flag flag-ro " > Romanian</ option >
72- < option value ="ru " data-icon =" flag flag-ru " > Russian</ option >
73- < option value ="es " data-icon =" flag flag-es " > Spanish</ option >
74- < option value ="tr " data-icon =" flag flag-tr " > Turkish</ option >
75- < option value ="ua " data-icon =" flag flag-ua " > Ukrainian</ option >
43+ < select name ="language " class ="show-tick show-menu-arrow " data-width ="auto ">
44+ < option value ="sq "> Albanian</ option >
45+ < option value ="ar "> Arabic</ option >
46+ < option value ="az "> Azerbaijani</ option >
47+ < option value ="bg "> Bulgarian</ option >
48+ < option value ="zh-CN "> Simplified Chinese</ option >
49+ < option value ="cs "> Czech</ option >
50+ < option value ="de "> German</ option >
51+ < option value ="da "> Danish</ option >
52+ < option value ="nl "> Dutch</ option >
53+ < option value ="en " selected > English</ option >
54+ < option value ="fa-IR "> Farsi</ option >
55+ < option value ="fr "> French</ option >
56+ < option value ="el "> Greek</ option >
57+ < option value ="he "> Hebrew</ option >
58+ < option value ="it "> Italian</ option >
59+ < option value ="no "> Norwegian</ option >
60+ < option value ="pl "> Polish</ option >
61+ < option value ="pt-PT "> Portuguese</ option >
62+ < option value ="pt-BR "> Brazilian Portuguese</ option >
63+ < option value ="ro "> Romanian</ option >
64+ < option value ="ru "> Russian</ option >
65+ < option value ="es "> Spanish</ option >
66+ < option value ="tr "> Turkish</ option >
67+ < option value ="ua "> Ukrainian</ option >
7668 </ select >
7769 </ div >
7870
7971 < div id ="builder "> </ div >
8072
8173 < div class ="btn-group ">
8274 < button class ="btn btn-danger reset "> Reset</ button >
83- < button class ="btn btn-warning set-filters " data-toggle ="tooltip " data-container ="body " data-placement ="bottom "
75+ < button class ="btn btn-warning set-filters " data-bs- toggle ="tooltip " data-container ="body " data-placement ="bottom "
8476 title ="Adds a filter 'New filter' and removes 'Coordinates', 'State', 'BSON' "> Set filters
8577 </ button >
8678 </ div >
@@ -106,22 +98,23 @@ <h3>Output</h3>
10698 </ div >
10799 </ div >
108100</ div >
109-
110101< script src ="/node_modules/jquery/dist/jquery.js "> </ script >
102+ < script src ="/node_modules/@popperjs/core/dist/umd/popper.js "> </ script >
111103< script src ="/node_modules/bootstrap/dist/js/bootstrap.js "> </ script >
112- < script src ="/node_modules/bootstrap-select/dist/js/bootstrap-select.js "> </ script >
113104< script src ="/node_modules/chosenjs/chosen.jquery.js "> </ script >
114- < script src ="/node_modules/bootbox/bootbox.js "> </ script >
115105< script src ="/node_modules/bootstrap-slider/dist/bootstrap-slider.js "> </ script >
116- < script src ="/node_modules/selectize/dist/js/standalone /selectize.js "> </ script >
106+ < script src ="/node_modules/@ selectize/selectize/ dist/js/selectize.js "> </ script >
117107< script src ="/node_modules/jquery-extendext/jquery-extendext.js "> </ script >
118108< script src ="/node_modules/sql-parser-mistic/browser/sql-parser.js "> </ script >
119109< script src ="/node_modules/interactjs/dist/interact.js "> </ script >
110+ < script src ="/node_modules/bootbox/dist/bootbox.all.js "> </ script >
120111
121112< script src ="/dist/js/query-builder.js "> </ script >
122113
123114< script >
124- $ ( '[data-toggle="tooltip"]' ) . tooltip ( ) ;
115+ document . querySelectorAll ( '[data-bs-toggle="tooltip"]' ) . forEach ( function ( element ) {
116+ new bootstrap . Tooltip ( element ) ;
117+ } ) ;
125118
126119 var $b = $ ( '#builder' ) ;
127120
@@ -142,7 +135,6 @@ <h3>Output</h3>
142135 'bt-tooltip-errors' : { delay : 100 } ,
143136 'sortable' : null ,
144137 'filter-description' : { mode : 'bootbox' } ,
145- 'bt-selectpicker' : null ,
146138// 'chosen-selectpicker': null,
147139 'unique-filter' : null ,
148140 'bt-checkbox' : { color : 'primary' } ,
@@ -185,7 +177,7 @@ <h3>Output</h3>
185177 en : 'Name' ,
186178 fr : 'Nom'
187179 } ,
188- icon : 'glyphicon glyphicon-user ' ,
180+ icon : 'bi-person-fill ' ,
189181 value_separator : ',' ,
190182 type : 'string' ,
191183 optgroup : 'core' ,
@@ -202,7 +194,7 @@ <h3>Output</h3>
202194 {
203195 id : 'age' ,
204196 label : 'Age' ,
205- icon : 'glyphicon glyphicon-calendar ' ,
197+ icon : 'bi-calendar3 ' ,
206198 type : 'integer' ,
207199 input : 'text' ,
208200 value_separator : '|' ,
@@ -219,7 +211,7 @@ <h3>Output</h3>
219211 {
220212 id : 'bson' ,
221213 label : 'BSON' ,
222- icon : 'glyphicon glyphicon-qrcode ' ,
214+ icon : 'bi-qr-code ' ,
223215 type : 'string' ,
224216 input : 'textarea' ,
225217 operators : [ 'equal' ] ,
@@ -232,7 +224,7 @@ <h3>Output</h3>
232224 {
233225 id : 'category' ,
234226 label : 'Category' ,
235- icon : 'glyphicon glyphicon-th- list' ,
227+ icon : 'bi- list-task ' ,
236228 type : 'integer' ,
237229 input : 'checkbox' ,
238230 optgroup : 'core' ,
@@ -258,7 +250,7 @@ <h3>Output</h3>
258250 {
259251 id : 'continent' ,
260252 label : 'Continent' ,
261- icon : 'glyphicon glyphicon -globe' ,
253+ icon : 'bi -globe-americas ' ,
262254 type : 'string' ,
263255 input : 'select' ,
264256 optgroup : 'core' ,
@@ -307,7 +299,7 @@ <h3>Output</h3>
307299 {
308300 id : 'state' ,
309301 label : 'State' ,
310- icon : 'glyphicon glyphicon -globe' ,
302+ icon : 'bi -globe-americas ' ,
311303 type : 'string' ,
312304 input : 'select' ,
313305 multiple : true ,
@@ -343,7 +335,7 @@ <h3>Output</h3>
343335 {
344336 id : 'in_stock' ,
345337 label : 'In stock' ,
346- icon : 'glyphicon glyphicon-log-in ' ,
338+ icon : 'bi-box-arrow-in-right ' ,
347339 type : 'integer' ,
348340 input : 'radio' ,
349341 optgroup : 'plugin' ,
@@ -359,7 +351,7 @@ <h3>Output</h3>
359351 {
360352 id : 'price' ,
361353 label : 'Price' ,
362- icon : 'glyphicon glyphicon-usd ' ,
354+ icon : 'bi-currency-dollar ' ,
363355 type : 'double' ,
364356 size : 5 ,
365357 validation : {
@@ -376,7 +368,7 @@ <h3>Output</h3>
376368 {
377369 id : 'rate' ,
378370 label : 'Rate' ,
379- icon : 'glyphicon glyphicon-flash ' ,
371+ icon : 'bi-box-arrow-lightning-charge-fill ' ,
380372 type : 'integer' ,
381373 validation : {
382374 min : 0 ,
@@ -400,7 +392,7 @@ <h3>Output</h3>
400392 {
401393 id : 'id' ,
402394 label : 'Identifier' ,
403- icon : 'glyphicon glyphicon -sunglasses' ,
395+ icon : 'bi -sunglasses' ,
404396 type : 'string' ,
405397 optgroup : 'plugin' ,
406398 placeholder : '____-____-____' ,
@@ -419,7 +411,7 @@ <h3>Output</h3>
419411 {
420412 id : 'coord' ,
421413 label : 'Coordinates' ,
422- icon : 'glyphicon glyphicon -star-empty ' ,
414+ icon : 'bi -star' ,
423415 type : 'string' ,
424416 default_value : 'C.5' ,
425417 description : 'The letter is the cadran identifier:\
@@ -489,7 +481,7 @@ <h3>Output</h3>
489481 } ) ;
490482
491483 // change language
492- $ ( '[name=language]' ) . selectpicker ( ) . on ( 'change' , function ( ) {
484+ $ ( '[name=language]' ) . on ( 'change' , function ( ) {
493485 var lang = $ ( this ) . val ( ) ;
494486
495487 var done = function ( ) {
@@ -516,7 +508,7 @@ <h3>Output</h3>
516508 // change theme
517509 $ ( '.change-theme' ) . on ( 'click' , function ( ) {
518510 $ ( '#qb-theme' ) . replaceWith ( '<link rel="stylesheet" href="' + $ ( this ) . data ( 'qb' ) + '" id="qb-theme">' ) ;
519- $ ( '#bt- theme' ) . replaceWith ( '<link rel="stylesheet" href="' + $ ( this ) . data ( 'bt' ) + '" id="bt-theme">' ) ;
511+ $ ( '[data-bs- theme] ' ) . attr ( 'data-bs-theme' , $ ( this ) . data ( 'bt' ) ) ;
520512 } ) ;
521513
522514 // set rules
@@ -604,12 +596,12 @@ <h3>Output</h3>
604596 // reset builder
605597 $ ( '.reset' ) . on ( 'click' , function ( ) {
606598 $ ( '#builder' ) . queryBuilder ( 'reset' ) ;
607- $ ( '#result' ) . addClass ( 'hide ' ) . find ( 'pre' ) . empty ( ) ;
599+ $ ( '#result' ) . addClass ( 'd-none ' ) . find ( 'pre' ) . empty ( ) ;
608600 } ) ;
609601
610602 // get rules
611603 $ ( '.parse-json' ) . on ( 'click' , function ( ) {
612- $ ( '#result' ) . removeClass ( 'hide ' )
604+ $ ( '#result' ) . removeClass ( 'd-none ' )
613605 . find ( 'pre' ) . html ( JSON . stringify (
614606 $ ( '#builder' ) . queryBuilder ( 'getRules' , {
615607 get_flags : true ,
@@ -621,14 +613,14 @@ <h3>Output</h3>
621613
622614 $ ( '.parse-sql' ) . on ( 'click' , function ( ) {
623615 var res = $ ( '#builder' ) . queryBuilder ( 'getSQL' , $ ( this ) . data ( 'stmt' ) , false ) ;
624- $ ( '#result' ) . removeClass ( 'hide ' )
616+ $ ( '#result' ) . removeClass ( 'd-none ' )
625617 . find ( 'pre' ) . html (
626618 res . sql + ( res . params ? '\n\n' + JSON . stringify ( res . params , undefined , 2 ) : '' )
627619 ) ;
628620 } ) ;
629621
630622 $ ( '.parse-mongo' ) . on ( 'click' , function ( ) {
631- $ ( '#result' ) . removeClass ( 'hide ' )
623+ $ ( '#result' ) . removeClass ( 'd-none ' )
632624 . find ( 'pre' ) . html ( JSON . stringify (
633625 $ ( '#builder' ) . queryBuilder ( 'getMongo' ) ,
634626 undefined , 2
@@ -638,7 +630,7 @@ <h3>Output</h3>
638630 // set filters
639631 $ ( '.set-filters' ) . on ( 'click' , function ( ) {
640632 $ ( this ) . prop ( 'disabled' , true ) ;
641- $ ( this ) . tooltip ( ' hide' ) ;
633+ bootstrap . Tooltip . getInstance ( $ ( this ) ) . hide ( ) ;
642634
643635 // add a new filter after 'state'
644636 $ ( '#builder' ) . queryBuilder ( 'addFilter' ,
0 commit comments