diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 7fe8317d..1131297f 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -3,6 +3,5 @@
- [ ] I read the [guidelines for contributing](https://github.com/mistic100/jQuery-QueryBuilder/blob/master/.github/CONTRIBUTING.md)
- [ ] I created my branch from `dev` and I am issuing the PR to `dev`
- [ ] I didn't pushed the `dist` directory
-- [ ] Unit tests are OK
- [ ] If it's a new feature, I added the necessary unit tests
- [ ] If it's a new language, I filled the `__locale` and `__author` fields
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 81718908..0648b398 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -8,9 +8,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
- - name: build
- run: |
- npm install
- npm run test
- npm run build
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '16'
+ cache: 'yarn'
+
+ - name: build
+ run: |
+ yarn install
+ yarn build
diff --git a/.gitignore b/.gitignore
index d9051de6..a952958a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,6 @@
-bower_components
node_modules
doc
.sass-cache
-.coverage-results
.idea
*.iml
-yarn.lock
package-lock.json
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index ce1e5220..00000000
--- a/.jscsrc
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "preset": "idiomatic",
- "validateIndentation": 4,
- "requireCamelCaseOrUpperCaseIdentifiers": false,
- "disallowKeywordsOnNewLine": [],
- "requireKeywordsOnNewLine": [
- "else"
- ],
- "requirePaddingNewLinesAfterBlocks": false,
- "safeContextKeyword": "self",
- "disallowMultipleLineStrings": false,
- "requirePaddingNewLinesBeforeLineComments": false,
- "requireSpaceBeforeBinaryOperators": [
- "=", "+", "-", "*", "/", "%",
- "<<", ">>", ">>>", "&", "|", "^",
- "&&", "||",
- "===", "==", ">=", "<=", "<", ">", "!=", "!=="
- ],
- "requireDotNotation": false,
- "requireSpacesInsideBrackets": false,
- "requireSpacesInsideParentheses": false,
- "maximumLineLength": null,
- "maximumNumberOfLines": null,
- "validateQuoteMarks": {
- "mark": "'",
- "escape": true
- },
- "requireCurlyBraces": [
- "for",
- "while",
- "do",
- "try",
- "catch"
- ],
- "requireEarlyReturn": false,
- "validateCommentPosition": false
-}
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 518111a8..00000000
--- a/.jshintrc
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "-W069": true, // accesses to "regional" in language files
- "multistr": true
-}
\ No newline at end of file
diff --git a/.sass-lint.yml b/.sass-lint.yml
deleted file mode 100644
index 2d387551..00000000
--- a/.sass-lint.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-rules:
- property-sort-order: [0]
- force-pseudo-nesting: [0]
- force-element-nesting: [0]
- force-attribute-nesting: [0]
- no-important: [0]
- no-qualifying-elements: [0]
- shorthand-values: [1, {allowed-shorthands: [1, 2, 4]}]
- hex-notation: [1, {style: uppercase}]
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 52cc8a99..00000000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,443 +0,0 @@
-var initConfig = require('./build/initConfig');
-var processLang = require('./build/processLang');
-var removeJshint = require('./build/removeJshint');
-var cleanLn = require('./build/cleanLn');
-
-module.exports = function(grunt) {
- require('time-grunt')(grunt);
- require('jit-grunt')(grunt, {
- sasslint: 'grunt-sass-lint',
- sass_injection: 'grunt-sass-injection',
- usebanner: 'grunt-banner'
- });
-
- grunt.util.linefeed = '\n';
-
- var config = initConfig(grunt, {
- js_core_files: [
- 'src/main.js',
- 'src/defaults.js',
- 'src/plugins.js',
- 'src/core.js',
- 'src/public.js',
- 'src/data.js',
- 'src/template.js',
- 'src/utils.js',
- 'src/model.js',
- 'src/jquery.js'
- ],
- js_files_for_standalone: [
- 'node_modules/jquery-extendext/jquery-extendext.js',
- 'node_modules/dot/doT.js',
- 'dist/js/query-builder.js'
- ]
- });
-
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
-
- banner: '/*!\n' +
- ' * jQuery QueryBuilder <%= pkg.version %>\n' +
- ' * Copyright 2014-<%= grunt.template.today("yyyy") %> Damien "Mistic" Sorel (http://www.strangeplanet.fr)\n' +
- ' * Licensed under MIT (https://opensource.org/licenses/MIT)\n' +
- ' */',
-
- langBanner: '/*!\n' +
- ' * jQuery QueryBuilder <%= pkg.version %>\n' +
- ' * Locale: <%= lang_locale %>\n' +
- '<% if (lang_author) { %> * Author: <%= lang_author %>\n<% } %>' +
- ' * Licensed under MIT (https://opensource.org/licenses/MIT)\n' +
- ' */',
-
- // serve folder content
- connect: {
- dev: {
- options: {
- host: '0.0.0.0',
- port: 9000,
- livereload: true
- }
- },
- test: {
- options: {
- port: 9001
- }
- }
- },
-
- // watchers
- watch: {
- options: {
- livereload: true
- },
- js: {
- files: ['src/*.js', 'src/plugins/**/plugin.js'],
- tasks: ['injector:example']
- },
- css: {
- files: ['src/scss/*.scss', 'src/plugins/**/plugin.scss'],
- tasks: ['build_css']
- },
- lang: {
- files: ['src/i18n/*.json', 'src/plugins/**/i18n/*.json'],
- tasks: ['build_lang']
- },
- example: {
- files: ['examples/**'],
- tasks: []
- }
- },
-
- // open example
- open: {
- dev: {
- path: 'http://localhost:<%= connect.dev.options.port%>/examples/index.html'
- }
- },
-
- // copy SASS files
- copy: {
- sass_core: {
- files: [{
- expand: true,
- flatten: true,
- src: ['src/scss/*.scss'],
- dest: 'dist/scss'
- }]
- },
- sass_plugins: {
- files: config.loaded_plugins.map(function(name) {
- return {
- src: 'src/plugins/' + name + '/plugin.scss',
- dest: 'dist/scss/plugins/_' + name + '.scss'
- };
- })
- },
- doc_script: {
- src: 'build/jsdoc.js',
- dest: 'doc/js/custom.js'
- }
- },
-
- concat: {
- // concat all JS
- js: {
- src: config.js_files_to_load,
- dest: 'dist/js/query-builder.js',
- options: {
- stripBanners: false,
- separator: '\n\n',
- process: function(src) {
- return cleanLn(removeJshint(src));
- }
- }
- },
- // create standalone version
- js_standalone: {
- src: config.js_files_for_standalone,
- dest: 'dist/js/query-builder.standalone.js',
- options: {
- stripBanners: false,
- separator: '\n\n',
- process: function(src, file) {
- var name = file.match(/([^\/]+?).js$/)[1];
-
- return cleanLn(removeJshint(src))
- .replace(/define\((.*?)\);/, 'define(\'' + name + '\', $1);');
- }
- }
- },
- // compile language files with AMD wrapper
- lang: {
- files: Object.keys(config.all_langs).map(function(name) {
- return {
- src: 'src/i18n/' + name + '.json',
- dest: 'dist/i18n/query-builder.' + name + '.js'
- };
- }),
- options: {
- process: function(src, file) {
- var wrapper = cleanLn(grunt.file.read('src/i18n/.wrapper.js')).split(/@@js\n/);
- return processLang(grunt, config.loaded_plugins)(file, src, wrapper);
- }
- }
- },
- // compile language files without AMD wrapper
- lang_temp: {
- files: Object.keys(config.all_langs).map(function(name) {
- return {
- src: 'src/i18n/' + name + '.json',
- dest: '.temp/i18n/' + name + '.js'
- };
- }),
- options: {
- process: function(src, file) {
- return processLang(grunt, config.loaded_plugins)(file, src);
- }
- }
- }
- },
-
- // add AMD wrapper
- wrap: {
- js: {
- src: ['dist/js/query-builder.js'],
- dest: 'dist/js/query-builder.js',
- options: {
- separator: '',
- wrapper: function() {
- return cleanLn(grunt.file.read('src/.wrapper.js')).split(/@@js\n/);
- }
- }
- }
- },
-
- // add banners
- usebanner: {
- options: {
- banner: '<%= banner %>'
- },
- js: {
- src: ['dist/js/*.js']
- },
- css: {
- src: ['dist/css/*.css', 'dist/scss/*.scss']
- }
- },
-
- // add plugins SASS imports
- sass_injection: {
- dist: {
- options: {
- replacePath: {
- pattern: 'dist/scss/',
- replace: ''
- }
- },
- src: ['dist/scss/plugins/*.scss'],
- target: 'dist/scss/default.scss'
- }
- },
-
- // parse scss
- sass: {
- options: {
- sourceMap: false,
- outputStyle: 'expanded'
- },
- dist: {
- files: [{
- expand: true,
- flatten: true,
- src: ['dist/scss/*.scss'],
- dest: 'dist/css',
- ext: '.css',
- rename: function(dest, src) {
- return dest + '/query-builder.' + src;
- }
- }]
- }
- },
-
- // compress js
- uglify: {
- options: {
- banner: '<%= banner %>\n',
- mangle: { reserved: ['$'] },
- sourceMap: true,
- },
- dist: {
- files: [{
- expand: true,
- flatten: true,
- src: ['dist/js/*.js', '!dist/js/*.min.js'],
- dest: 'dist/js',
- ext: '.min.js',
- extDot: 'last'
- }]
- }
- },
-
- // compress css
- cssmin: {
- dist: {
- files: [{
- expand: true,
- flatten: true,
- src: ['dist/css/*.css', '!dist/css/*.min.css'],
- dest: 'dist/css',
- ext: '.min.css',
- extDot: 'last'
- }]
- }
- },
-
- // clean build dir
- clean: {
- temp: ['.temp'],
- doc: ['doc']
- },
-
- // jshint tests
- jshint: {
- lib: {
- options: {
- jshintrc: '.jshintrc'
- },
- src: ['src/**/*.js', '!src/**/.wrapper.js']
- }
- },
-
- // jscs tests
- jscs: {
- lib: {
- options: {
- config: '.jscsrc'
- },
- src: ['src/**/*.js', '!src/**/.wrapper.js']
- }
- },
-
- // scss tests
- sasslint: {
- lib: {
- options: {
- configFile: '.sass-lint.yml'
- },
- src: ['src/**/*.scss']
- }
- },
-
- // jsDoc generation
- jsdoc: {
- lib: {
- src: ['src/**/*.js', '!src/**/.wrapper.js'],
- options: {
- destination: 'doc',
- config: '.jsdoc.json'
- }
- }
- },
-
- // inject sources files and tests modules in demo and test
- injector: {
- options: {
- relative: true,
- addRootSlash: false
- },
- example: {
- src: config.all_js_files.concat(['dist/i18n/query-builder.en.js']),
- dest: 'examples/index.html'
- },
- testSrc: {
- options: {
- starttag: '',
- transform: function(filepath) {
- return '';
- }
- },
- src: config.all_js_files,
- dest: 'tests/index.html'
- },
- testModules: {
- options: {
- starttag: ''
- },
- src: ['tests/*.module.js'],
- dest: 'tests/index.html'
- }
- },
-
- // qunit test suite
- qunit: {
- all: {
- options: {
- urls: ['http://localhost:<%= connect.test.options.port %>/tests/index.html?coverage=true'],
- noGlobals: true
- }
- }
- },
-
- // save LCOV files
- qunit_blanket_lcov: {
- all: {
- files: [{
- expand: true,
- src: ['src/*.js', 'src/plugins/**/plugin.js']
- }],
- options: {
- dest: '.coverage-results/all.lcov',
- prefix: 'http://localhost:<%= connect.test.options.port %>/'
- }
- }
- },
-
- // coveralls data
- coveralls: {
- options: {
- force: true
- },
- all: {
- src: '.coverage-results/all.lcov'
- }
- }
- });
-
-
- grunt.registerTask('build_js', [
- 'concat:lang_temp',
- 'concat:js',
- 'wrap:js',
- 'usebanner:js',
- 'concat:js_standalone',
- 'uglify',
- 'clean:temp'
- ]);
-
- grunt.registerTask('build_css', [
- 'copy:sass_core',
- 'copy:sass_plugins',
- 'sass_injection',
- 'sass',
- 'cssmin',
- 'usebanner:css'
- ]);
-
- grunt.registerTask('build_lang', [
- 'concat:lang'
- ]);
-
- grunt.registerTask('default', [
- 'build_lang',
- 'build_js',
- 'build_css'
- ]);
-
- grunt.registerTask('test', [
- 'jshint',
- 'jscs',
- 'sasslint',
- 'build_lang',
- 'build_css',
- 'injector:testSrc',
- 'injector:testModules',
- 'connect:test',
- 'qunit_blanket_lcov',
- 'qunit'
- ]);
-
- grunt.registerTask('serve', [
- 'build_lang',
- 'build_css',
- 'injector:example',
- 'open',
- 'connect:dev',
- 'watch'
- ]);
-
- grunt.registerTask('doc', [
- 'clean:doc',
- 'jsdoc',
- 'copy:doc_script'
- ]);
-};
diff --git a/README.md b/README.md
index 84e74403..9e32b24d 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,6 @@
[![npm version](https://img.shields.io/npm/v/jQuery-QueryBuilder.svg?style=flat-square)](https://www.npmjs.com/package/jQuery-QueryBuilder)
[![jsDelivr CDN](https://data.jsdelivr.com/v1/package/npm/jQuery-QueryBuilder/badge)](https://www.jsdelivr.com/package/npm/jQuery-QueryBuilder)
[![Build Status](https://github.com/mistic100/jQuery-QueryBuilder/workflows/CI/badge.svg)](https://github.com/mistic100/jQuery-QueryBuilder/actions)
-[![Coverage Status](https://img.shields.io/coveralls/mistic100/jQuery-QueryBuilder/master.svg?style=flat-square)](https://coveralls.io/r/mistic100/jQuery-QueryBuilder)
[![Dependencies Status](https://david-dm.org/mistic100/jQuery-QueryBuilder/status.svg?style=flat-square)](https://david-dm.org/mistic100/jQuery-QueryBuilder)
[![gitlocalized](https://gitlocalize.com/repo/5259/whole_project/badge.svg)](https://gitlocalize.com/repo/5259/whole_project?utm_source=badge)
@@ -50,40 +49,17 @@ jQuery-QueryBuilder is available on [jsDelivr](https://www.jsdelivr.com/package/
-## Build
+## Developement
-#### Prerequisites
+Install Node dependencies with `npm install`.
- * NodeJS + NPM: `apt-get install nodejs-legacy npm`
- * Grunt CLI: `npm install -g grunt-cli`
+#### Build
-#### Run
+Run `npm run build` in the root directory to generate production files inside `dist`.
-Install Node dependencies `npm install` then run `grunt` in the root directory to generate production files inside `dist`.
+#### Serve
-#### Options
-
-You can choose which plugins to include with `--plugins` :
-```bash
-# include "sql-support" and "mongodb-support" plugins
-grunt --plugins=sql-support,mongodb-support
-
-# disable all plugins
-grunt --plugins=false
-```
-All plugins are included by default.
-
-You can also include language files with `--languages` :
-```bash
-# include French & Italian translation
-grunt --languages=fr,it
-```
-
-#### Other commands
-
- * `grunt test` to run jshint/jscs/scsslint and the QUnit test suite.
- * `grunt serve` to open the example page with automatic build and livereload.
- * `grunt doc` to generate the documentation.
+Run `npm run serve` to open the example page with automatic build and livereload.
## License
diff --git a/build/cleanLn.js b/build/cleanLn.js
deleted file mode 100644
index f93432e8..00000000
--- a/build/cleanLn.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = function(src) {
- return src.replace(/\r\n/g, '\n');
-};
diff --git a/build/dist.mjs b/build/dist.mjs
new file mode 100644
index 00000000..e413853b
--- /dev/null
+++ b/build/dist.mjs
@@ -0,0 +1,210 @@
+import fs from 'fs';
+import path from 'path';
+import { globSync } from 'glob';
+import * as sass from 'sass';
+import pkg from '../package.json' assert { type: 'json' };
+
+const DEV = process.argv[2] === '--dev';
+
+const DIST = 'dist/';
+
+const CORE_JS = [
+ 'src/main.js',
+ 'src/defaults.js',
+ 'src/plugins.js',
+ 'src/core.js',
+ 'src/public.js',
+ 'src/data.js',
+ 'src/template.js',
+ 'src/utils.js',
+ 'src/model.js',
+ 'src/jquery.js',
+];
+
+const CORE_SASS = [
+ 'src/scss/dark.scss',
+ 'src/scss/default.scss',
+];
+
+const STANDALONE_JS = {
+ 'jquery-extendext': 'node_modules/jquery-extendext/jquery-extendext.js',
+ 'query-builder': `${DIST}js/query-builder.js`,
+};
+
+const BANNER = () => `/*!
+ * jQuery QueryBuilder ${pkg.version}
+ * Copyright 2014-${new Date().getFullYear()} Damien "Mistic" Sorel (http://www.strangeplanet.fr)
+ * Licensed under MIT (https://opensource.org/licenses/MIT)
+ */`;
+
+const LANG_BANNER = (locale, author) => `/*!
+ * jQuery QueryBuilder ${pkg.version}
+ * Locale: ${locale}
+ * Author: ${author}
+ * Licensed under MIT (https://opensource.org/licenses/MIT)
+ */`;
+
+const ALL_PLUGINS_JS = glob('src/plugins/*/plugin.js')
+ .sort()
+ .reduce((all, p) => {
+ const n = p.split('/')[2];
+ all[n] = p;
+ return all;
+ }, {});
+
+const ALL_PLUGINS_SASS = glob('src/plugins/*/plugin.scss')
+ .sort()
+ .reduce((all, p) => {
+ const n = p.split('/')[2];
+ all[n] = p;
+ return all;
+ }, {});
+
+const ALL_LANGS = glob('src/i18n/*.json')
+ .map(p => p.split(/[\/\.]/)[2])
+ .sort();
+
+function glob(pattern) {
+ return globSync(pattern)
+ .map(p => p.split(path.sep).join('/'));
+}
+
+/**
+ * Build lang files
+ */
+function buildLangs() {
+ const wrapper = fs.readFileSync('src/i18n/.wrapper.js', { encoding: 'utf8' })
+ .split('@@js\n');
+
+ ALL_LANGS.forEach(lang => {
+ const outpath = `${DIST}i18n/query-builder.${lang}.js`;
+ console.log(`LANG ${lang} (${outpath})`);
+ fs.writeFileSync(outpath, getLang(lang, wrapper));
+ });
+}
+
+/**
+ * Get the content of a single lang
+ */
+function getLang(lang, wrapper = ['', '']) {
+ const corepath = `src/i18n/${lang}.json`;
+ const content = JSON.parse(fs.readFileSync(corepath, { encoding: 'utf8' }));
+
+ Object.keys(ALL_PLUGINS_JS).forEach(plugin => {
+ const pluginpath = `src/plugins/${plugin}/i18n/${lang}.json`;
+ try {
+ const plugincontent = JSON.parse(fs.readFileSync(pluginpath, { encoding: 'utf8' }));
+ Object.assign(content, plugincontent);
+ } catch { }
+ });
+
+ return LANG_BANNER(content.__locale || lang, content.__author || '')
+ + '\n\n'
+ + wrapper[0]
+ + `QueryBuilder.regional['${lang}'] = `
+ + JSON.stringify(content, null, 2)
+ + ';\n\n'
+ + `QueryBuilder.defaults({ lang_code: '${lang}' });`
+ + wrapper[1];
+}
+
+/**
+ * Build main JS file
+ */
+function buildMain() {
+ const wrapper = fs.readFileSync('src/.wrapper.js', { encoding: 'utf8' })
+ .split('@@js\n');
+
+ const files_to_load = [
+ ...CORE_JS,
+ ...Object.values(ALL_PLUGINS_JS),
+ ];
+
+ const output = BANNER()
+ + '\n\n'
+ + wrapper[0]
+ + files_to_load.map(f => fs.readFileSync(f, { encoding: 'utf8' })).join('\n\n')
+ + '\n\n'
+ + getLang('en')
+ + wrapper[1];
+
+ const outpath = `${DIST}js/query-builder.js`;
+ console.log(`MAIN (${outpath})`);
+ fs.writeFileSync(outpath, output);
+}
+
+/**
+ * Build standalone JS file
+ */
+function buildStandalone() {
+ const output = Object.entries(STANDALONE_JS)
+ .map(([name, file]) => {
+ return fs.readFileSync(file, { encoding: 'utf8' })
+ .replace(/define\((.*?)\);/, `define('${name}', $1);`);
+ })
+ .join('\n\n');
+
+ const outpath = `${DIST}js/query-builder.standalone.js`;
+ console.log(`STANDALONE (${outpath})`);
+ fs.writeFileSync(outpath, output);
+}
+
+/**
+ * Copy SASS files
+ */
+function copySass() {
+ Object.entries(ALL_PLUGINS_SASS).forEach(([plugin, path]) => {
+ const outpath = `${DIST}scss/plugins/${plugin}.scss`;
+ console.log(`SASS ${plugin} (${path})`);
+ fs.copyFileSync(path, outpath);
+ });
+
+ CORE_SASS.forEach(path => {
+ const name = path.split('/').pop();
+
+ const content = fs.readFileSync(path, { encoding: 'utf8' });
+
+ let output = BANNER()
+ + '\n'
+ + content;
+ if (name === 'default.scss') {
+ output += '\n'
+ + Object.keys(ALL_PLUGINS_SASS).map(p => `@import "plugins/${p}";`).join('\n');
+ }
+
+ const outpath = `${DIST}scss/${name}`;
+ console.log(`SASS (${path})`);
+ fs.writeFileSync(outpath, output);
+ });
+}
+
+/**
+ * Build CSS files
+ */
+function buildCss() {
+ CORE_SASS.forEach(p => {
+ const path = p.replace('src/', DIST);
+ const name = path.split('/').pop();
+
+ const output = sass.compile(path);
+
+ const outpath = `${DIST}css/query-builder.${name.split('.').shift()}.css`;
+ console.log(`CSS (${path})`);
+ fs.writeFileSync(outpath, output.css);
+ });
+}
+
+if (!DEV) {
+ fs.rmSync(DIST, { recursive: true, force: true });
+}
+fs.mkdirSync(DIST + 'css', { recursive: true });
+fs.mkdirSync(DIST + 'i18n', { recursive: true });
+fs.mkdirSync(DIST + 'js', { recursive: true });
+fs.mkdirSync(DIST + 'scss', { recursive: true });
+fs.mkdirSync(DIST + 'scss/plugins', { recursive: true });
+
+buildLangs();
+buildMain();
+buildStandalone();
+copySass();
+buildCss();
diff --git a/build/initConfig.js b/build/initConfig.js
deleted file mode 100644
index 5bb333ee..00000000
--- a/build/initConfig.js
+++ /dev/null
@@ -1,68 +0,0 @@
-module.exports = function(grunt, config) {
- config.all_plugins = {};
- config.all_langs = {};
- config.loaded_plugins = [];
- config.loaded_langs = [];
- config.js_files_to_load = config.js_core_files.slice();
- config.all_js_files = config.js_core_files.slice();
-
- // list available plugins and languages
- grunt.file.expand('src/plugins/**/plugin.js')
- .forEach(function(f) {
- var n = f.split('/')[2];
- config.all_plugins[n] = f;
- });
-
- grunt.file.expand('src/i18n/*.json')
- .forEach(function(f) {
- var n = f.split(/[\/\.]/)[2];
- config.all_langs[n] = f;
- });
-
- // fill all js files
- for (var p in config.all_plugins) {
- config.all_js_files.push(config.all_plugins[p]);
- }
-
- // parse 'plugins' parameter
- var arg_plugins = grunt.option('plugins');
- if (typeof arg_plugins === 'string') {
- arg_plugins.replace(/ /g, '').split(',').forEach(function(p) {
- if (config.all_plugins[p]) {
- config.js_files_to_load.push(config.all_plugins[p]);
- config.loaded_plugins.push(p);
- }
- else {
- grunt.fail.warn('Plugin ' + p + ' unknown');
- }
- });
- }
- else if (arg_plugins === undefined) {
- for (var p in config.all_plugins) {
- config.js_files_to_load.push(config.all_plugins[p]);
- config.loaded_plugins.push(p);
- }
- }
-
- // default language
- config.js_files_to_load.push('.temp/i18n/en.js');
- config.loaded_langs.push('en');
-
- // parse 'lang' parameter
- var arg_langs = grunt.option('languages');
- if (typeof arg_langs === 'string') {
- arg_langs.replace(/ /g, '').split(',').forEach(function(l) {
- if (config.all_langs[l]) {
- if (l !== 'en') {
- config.js_files_to_load.push(config.all_langs[l].replace(/^src/, '.temp').replace(/json$/, 'js'));
- config.loaded_langs.push(l);
- }
- }
- else {
- grunt.fail.warn('Language ' + l + ' unknown');
- }
- });
- }
-
- return config;
-};
diff --git a/build/liveserver.mjs b/build/liveserver.mjs
new file mode 100644
index 00000000..3d60e23c
--- /dev/null
+++ b/build/liveserver.mjs
@@ -0,0 +1,20 @@
+import liveServer from 'alive-server';
+import path from 'path';
+
+const rootDir = process.cwd();
+
+const EXAMPLES_DIR = 'examples';
+const DIST_DIR = 'dist';
+
+liveServer.start({
+ open: true,
+ root: path.join(rootDir, EXAMPLES_DIR),
+ watch: [
+ path.join(rootDir, EXAMPLES_DIR),
+ path.join(rootDir, DIST_DIR),
+ ],
+ mount: [
+ ['/node_modules', path.join(rootDir, 'node_modules')],
+ ['/dist', path.join(rootDir, DIST_DIR)],
+ ],
+});
diff --git a/build/processLang.js b/build/processLang.js
deleted file mode 100644
index 33c6b2c7..00000000
--- a/build/processLang.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var deepmerge = require('deepmerge');
-
-module.exports = function(grunt, loaded_plugins) {
- return function(file, src, wrapper) {
- var lang = file.split(/[\/\.]/)[2];
- var content = JSON.parse(src);
- wrapper = wrapper || ['', ''];
-
- grunt.config.set('lang_locale', content.__locale || lang);
- grunt.config.set('lang_author', content.__author);
- var header = grunt.template.process('<%= langBanner %>');
-
- loaded_plugins.forEach(function(p) {
- var plugin_file = 'src/plugins/' + p + '/i18n/' + lang + '.json';
-
- if (grunt.file.exists(plugin_file)) {
- content = deepmerge(content, grunt.file.readJSON(plugin_file));
- }
- });
-
- return header
- + '\n\n'
- + wrapper[0]
- + 'QueryBuilder.regional[\'' + lang + '\'] = '
- + JSON.stringify(content, null, 2)
- + ';\n\n'
- + 'QueryBuilder.defaults({ lang_code: \'' + lang + '\' });'
- + wrapper[1];
- };
-};
diff --git a/build/removeJshint.js b/build/removeJshint.js
deleted file mode 100644
index 4ff583ac..00000000
--- a/build/removeJshint.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = function(src) {
- return src
- .replace(/\/\*jshint [a-z:]+ \*\/\r?\n\r?\n?/g, '')
- .replace(/\/\*jshint -[EWI]{1}[0-9]{3} \*\/\r?\n\r?\n?/g, '');
-};
diff --git a/dist/css/query-builder.dark.css b/dist/css/query-builder.dark.css
index d700b04f..c5a5960f 100644
--- a/dist/css/query-builder.dark.css
+++ b/dist/css/query-builder.dark.css
@@ -1,9 +1,14 @@
/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
+ * jQuery QueryBuilder 2.7.0
+ * Copyright 2014-2023 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
-.query-builder .rules-group-container, .query-builder .rule-container, .query-builder .rule-placeholder {
+/*!
+ * jQuery QueryBuilder 2.7.0
+ * Copyright 2014-2023 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
+ * Licensed under MIT (https://opensource.org/licenses/MIT)
+ */
+.query-builder .rule-placeholder, .query-builder .rule-container, .query-builder .rules-group-container {
position: relative;
margin: 4px 0;
border-radius: 5px;
@@ -12,9 +17,9 @@
background: rgba(40, 40, 40, 0.9);
}
-.query-builder .rule-container .rule-filter-container,
+.query-builder .drag-handle, .query-builder .error-container, .query-builder .rule-container .rule-filter-container,
.query-builder .rule-container .rule-operator-container,
-.query-builder .rule-container .rule-value-container, .query-builder .error-container, .query-builder .drag-handle {
+.query-builder .rule-container .rule-value-container {
display: inline-block;
margin: 0 5px 0 0;
vertical-align: middle;
@@ -26,13 +31,11 @@
border: 1px solid #00164A;
background: rgba(50, 70, 80, 0.5);
}
-
.query-builder .rules-group-header {
margin-bottom: 10px;
}
-
.query-builder .rules-group-header .group-conditions .btn.readonly:not(.active),
-.query-builder .rules-group-header .group-conditions input[name$='_cond'] {
+.query-builder .rules-group-header .group-conditions input[name$=_cond] {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
@@ -43,54 +46,44 @@
width: 1px;
white-space: nowrap;
}
-
.query-builder .rules-group-header .group-conditions .btn.readonly {
border-radius: 3px;
}
-
.query-builder .rules-list {
list-style: none;
padding: 0 0 0 15px;
margin: 0;
}
-
.query-builder .rule-value-container {
border-left: 1px solid #DDD;
padding-left: 5px;
}
-
.query-builder .rule-value-container label {
margin-bottom: 0;
font-weight: normal;
}
-
.query-builder .rule-value-container label.block {
display: block;
}
-
.query-builder .rule-value-container select,
-.query-builder .rule-value-container input[type='text'],
-.query-builder .rule-value-container input[type='number'] {
+.query-builder .rule-value-container input[type=text],
+.query-builder .rule-value-container input[type=number] {
padding: 1px;
}
-
.query-builder .error-container {
display: none;
cursor: help;
color: #F00;
}
-
.query-builder .has-error {
background-color: #322;
border-color: #800;
}
-
.query-builder .has-error .error-container {
display: inline-block !important;
}
-
.query-builder .rules-list > *::before, .query-builder .rules-list > *::after {
- content: '';
+ content: "";
position: absolute;
left: -10px;
width: 10px;
@@ -98,35 +91,29 @@
border-color: #222;
border-style: solid;
}
-
.query-builder .rules-list > *::before {
top: -4px;
border-width: 0 0 2px 2px;
}
-
.query-builder .rules-list > *::after {
top: 50%;
border-width: 0 0 0 2px;
}
-
.query-builder .rules-list > *:first-child::before {
top: -12px;
height: calc(50% + 14px);
}
-
.query-builder .rules-list > *:last-child::before {
border-radius: 0 0 0 4px;
}
-
.query-builder .rules-list > *:last-child::after {
display: none;
}
-.query-builder.bt-checkbox-glyphicons .checkbox input[type='checkbox']:checked + label::after {
- font-family: 'Glyphicons Halflings';
- content: '\e013';
+.query-builder.bt-checkbox-glyphicons .checkbox input[type=checkbox]:checked + label::after {
+ font-family: "Glyphicons Halflings";
+ content: "\e013";
}
-
.query-builder.bt-checkbox-glyphicons .checkbox label::after {
padding-left: 4px;
padding-top: 2px;
@@ -144,7 +131,7 @@
color: #AAD1E4;
border-radius: 5px;
padding: 2.5px 5px;
- font-size: .8em;
+ font-size: 0.8em;
}
.query-builder .rules-group-header [data-invert] {
@@ -156,18 +143,15 @@
vertical-align: middle;
margin-left: 5px;
}
-
.query-builder .dragging {
position: fixed;
- opacity: .5;
+ opacity: 0.5;
z-index: 100;
}
-
.query-builder .dragging::before, .query-builder .dragging::after {
display: none;
}
-
.query-builder .rule-placeholder {
border: 1px dashed #BBB;
- opacity: .7;
-}
+ opacity: 0.7;
+}
\ No newline at end of file
diff --git a/dist/css/query-builder.dark.min.css b/dist/css/query-builder.dark.min.css
deleted file mode 100644
index 0490ff0b..00000000
--- a/dist/css/query-builder.dark.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
- * Licensed under MIT (https://opensource.org/licenses/MIT)
- */
-.query-builder .rule-container,.query-builder .rule-placeholder,.query-builder .rules-group-container{position:relative;margin:4px 0;border-radius:5px;padding:5px;border:1px solid #111;background:rgba(40,40,40,.9)}.query-builder .drag-handle,.query-builder .error-container,.query-builder .rule-container .rule-filter-container,.query-builder .rule-container .rule-operator-container,.query-builder .rule-container .rule-value-container{display:inline-block;margin:0 5px 0 0;vertical-align:middle}.query-builder .rules-group-container{padding:10px;padding-bottom:6px;border:1px solid #00164a;background:rgba(50,70,80,.5)}.query-builder .rules-group-header{margin-bottom:10px}.query-builder .rules-group-header .group-conditions .btn.readonly:not(.active),.query-builder .rules-group-header .group-conditions input[name$='_cond']{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.query-builder .rules-group-header .group-conditions .btn.readonly{border-radius:3px}.query-builder .rules-list{list-style:none;padding:0 0 0 15px;margin:0}.query-builder .rule-value-container{border-left:1px solid #ddd;padding-left:5px}.query-builder .rule-value-container label{margin-bottom:0;font-weight:400}.query-builder .rule-value-container label.block{display:block}.query-builder .rule-value-container input[type=number],.query-builder .rule-value-container input[type=text],.query-builder .rule-value-container select{padding:1px}.query-builder .error-container{display:none;cursor:help;color:red}.query-builder .has-error{background-color:#322;border-color:#800}.query-builder .has-error .error-container{display:inline-block!important}.query-builder .rules-list>::after,.query-builder .rules-list>::before{content:'';position:absolute;left:-10px;width:10px;height:calc(50% + 4px);border-color:#222;border-style:solid}.query-builder .rules-list>::before{top:-4px;border-width:0 0 2px 2px}.query-builder .rules-list>::after{top:50%;border-width:0 0 0 2px}.query-builder .rules-list>:first-child::before{top:-12px;height:calc(50% + 14px)}.query-builder .rules-list>:last-child::before{border-radius:0 0 0 4px}.query-builder .rules-list>:last-child::after{display:none}.query-builder.bt-checkbox-glyphicons .checkbox input[type=checkbox]:checked+label::after{font-family:'Glyphicons Halflings';content:'\e013'}.query-builder.bt-checkbox-glyphicons .checkbox label::after{padding-left:4px;padding-top:2px;font-size:9px}.query-builder .error-container+.tooltip .tooltip-inner{color:#f22!important}.query-builder p.filter-description{margin:5px 0 0 0;background:rgba(0,170,255,.2);border:1px solid #346f7b;color:#aad1e4;border-radius:5px;padding:2.5px 5px;font-size:.8em}.query-builder .rules-group-header [data-invert]{margin-left:5px}.query-builder .drag-handle{cursor:move;vertical-align:middle;margin-left:5px}.query-builder .dragging{position:fixed;opacity:.5;z-index:100}.query-builder .dragging::after,.query-builder .dragging::before{display:none}.query-builder .rule-placeholder{border:1px dashed #bbb;opacity:.7}
\ No newline at end of file
diff --git a/dist/css/query-builder.default.css b/dist/css/query-builder.default.css
index 8eeb2373..c8a03cfb 100644
--- a/dist/css/query-builder.default.css
+++ b/dist/css/query-builder.default.css
@@ -1,9 +1,9 @@
/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
+ * jQuery QueryBuilder 2.7.0
+ * Copyright 2014-2023 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
-.query-builder .rules-group-container, .query-builder .rule-container, .query-builder .rule-placeholder {
+.query-builder .rule-placeholder, .query-builder .rule-container, .query-builder .rules-group-container {
position: relative;
margin: 4px 0;
border-radius: 5px;
@@ -12,9 +12,9 @@
background: rgba(255, 255, 255, 0.9);
}
-.query-builder .rule-container .rule-filter-container,
+.query-builder .drag-handle, .query-builder .error-container, .query-builder .rule-container .rule-filter-container,
.query-builder .rule-container .rule-operator-container,
-.query-builder .rule-container .rule-value-container, .query-builder .error-container, .query-builder .drag-handle {
+.query-builder .rule-container .rule-value-container {
display: inline-block;
margin: 0 5px 0 0;
vertical-align: middle;
@@ -26,13 +26,11 @@
border: 1px solid #DCC896;
background: rgba(250, 240, 210, 0.5);
}
-
.query-builder .rules-group-header {
margin-bottom: 10px;
}
-
.query-builder .rules-group-header .group-conditions .btn.readonly:not(.active),
-.query-builder .rules-group-header .group-conditions input[name$='_cond'] {
+.query-builder .rules-group-header .group-conditions input[name$=_cond] {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
@@ -43,54 +41,44 @@
width: 1px;
white-space: nowrap;
}
-
.query-builder .rules-group-header .group-conditions .btn.readonly {
border-radius: 3px;
}
-
.query-builder .rules-list {
list-style: none;
padding: 0 0 0 15px;
margin: 0;
}
-
.query-builder .rule-value-container {
border-left: 1px solid #DDD;
padding-left: 5px;
}
-
.query-builder .rule-value-container label {
margin-bottom: 0;
font-weight: normal;
}
-
.query-builder .rule-value-container label.block {
display: block;
}
-
.query-builder .rule-value-container select,
-.query-builder .rule-value-container input[type='text'],
-.query-builder .rule-value-container input[type='number'] {
+.query-builder .rule-value-container input[type=text],
+.query-builder .rule-value-container input[type=number] {
padding: 1px;
}
-
.query-builder .error-container {
display: none;
cursor: help;
color: #F00;
}
-
.query-builder .has-error {
background-color: #FDD;
border-color: #F99;
}
-
.query-builder .has-error .error-container {
display: inline-block !important;
}
-
.query-builder .rules-list > *::before, .query-builder .rules-list > *::after {
- content: '';
+ content: "";
position: absolute;
left: -10px;
width: 10px;
@@ -98,35 +86,29 @@
border-color: #CCC;
border-style: solid;
}
-
.query-builder .rules-list > *::before {
top: -4px;
border-width: 0 0 2px 2px;
}
-
.query-builder .rules-list > *::after {
top: 50%;
border-width: 0 0 0 2px;
}
-
.query-builder .rules-list > *:first-child::before {
top: -12px;
height: calc(50% + 14px);
}
-
.query-builder .rules-list > *:last-child::before {
border-radius: 0 0 0 4px;
}
-
.query-builder .rules-list > *:last-child::after {
display: none;
}
-.query-builder.bt-checkbox-glyphicons .checkbox input[type='checkbox']:checked + label::after {
- font-family: 'Glyphicons Halflings';
- content: '\e013';
+.query-builder.bt-checkbox-glyphicons .checkbox input[type=checkbox]:checked + label::after {
+ font-family: "Glyphicons Halflings";
+ content: "\e013";
}
-
.query-builder.bt-checkbox-glyphicons .checkbox label::after {
padding-left: 4px;
padding-top: 2px;
@@ -144,7 +126,7 @@
color: #31708F;
border-radius: 5px;
padding: 2.5px 5px;
- font-size: .8em;
+ font-size: 0.8em;
}
.query-builder .rules-group-header [data-invert] {
@@ -156,18 +138,15 @@
vertical-align: middle;
margin-left: 5px;
}
-
.query-builder .dragging {
position: fixed;
- opacity: .5;
+ opacity: 0.5;
z-index: 100;
}
-
.query-builder .dragging::before, .query-builder .dragging::after {
display: none;
}
-
.query-builder .rule-placeholder {
border: 1px dashed #BBB;
- opacity: .7;
-}
+ opacity: 0.7;
+}
\ No newline at end of file
diff --git a/dist/css/query-builder.default.min.css b/dist/css/query-builder.default.min.css
deleted file mode 100644
index 16912f06..00000000
--- a/dist/css/query-builder.default.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
- * Licensed under MIT (https://opensource.org/licenses/MIT)
- */
-.query-builder .rule-container,.query-builder .rule-placeholder,.query-builder .rules-group-container{position:relative;margin:4px 0;border-radius:5px;padding:5px;border:1px solid #eee;background:rgba(255,255,255,.9)}.query-builder .drag-handle,.query-builder .error-container,.query-builder .rule-container .rule-filter-container,.query-builder .rule-container .rule-operator-container,.query-builder .rule-container .rule-value-container{display:inline-block;margin:0 5px 0 0;vertical-align:middle}.query-builder .rules-group-container{padding:10px;padding-bottom:6px;border:1px solid #dcc896;background:rgba(250,240,210,.5)}.query-builder .rules-group-header{margin-bottom:10px}.query-builder .rules-group-header .group-conditions .btn.readonly:not(.active),.query-builder .rules-group-header .group-conditions input[name$='_cond']{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.query-builder .rules-group-header .group-conditions .btn.readonly{border-radius:3px}.query-builder .rules-list{list-style:none;padding:0 0 0 15px;margin:0}.query-builder .rule-value-container{border-left:1px solid #ddd;padding-left:5px}.query-builder .rule-value-container label{margin-bottom:0;font-weight:400}.query-builder .rule-value-container label.block{display:block}.query-builder .rule-value-container input[type=number],.query-builder .rule-value-container input[type=text],.query-builder .rule-value-container select{padding:1px}.query-builder .error-container{display:none;cursor:help;color:red}.query-builder .has-error{background-color:#fdd;border-color:#f99}.query-builder .has-error .error-container{display:inline-block!important}.query-builder .rules-list>::after,.query-builder .rules-list>::before{content:'';position:absolute;left:-10px;width:10px;height:calc(50% + 4px);border-color:#ccc;border-style:solid}.query-builder .rules-list>::before{top:-4px;border-width:0 0 2px 2px}.query-builder .rules-list>::after{top:50%;border-width:0 0 0 2px}.query-builder .rules-list>:first-child::before{top:-12px;height:calc(50% + 14px)}.query-builder .rules-list>:last-child::before{border-radius:0 0 0 4px}.query-builder .rules-list>:last-child::after{display:none}.query-builder.bt-checkbox-glyphicons .checkbox input[type=checkbox]:checked+label::after{font-family:'Glyphicons Halflings';content:'\e013'}.query-builder.bt-checkbox-glyphicons .checkbox label::after{padding-left:4px;padding-top:2px;font-size:9px}.query-builder .error-container+.tooltip .tooltip-inner{color:#f99!important}.query-builder p.filter-description{margin:5px 0 0 0;background:#d9edf7;border:1px solid #bce8f1;color:#31708f;border-radius:5px;padding:2.5px 5px;font-size:.8em}.query-builder .rules-group-header [data-invert]{margin-left:5px}.query-builder .drag-handle{cursor:move;vertical-align:middle;margin-left:5px}.query-builder .dragging{position:fixed;opacity:.5;z-index:100}.query-builder .dragging::after,.query-builder .dragging::before{display:none}.query-builder .rule-placeholder{border:1px dashed #bbb;opacity:.7}
\ No newline at end of file
diff --git a/dist/i18n/query-builder.ar.js b/dist/i18n/query-builder.ar.js
index 5f9b9df5..f4518b39 100644
--- a/dist/i18n/query-builder.ar.js
+++ b/dist/i18n/query-builder.ar.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Arabic (ar)
* Author: Mohamed YOUNES, https://github.com/MedYOUNES
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.az.js b/dist/i18n/query-builder.az.js
index a2ef7417..2d3b1bb4 100644
--- a/dist/i18n/query-builder.az.js
+++ b/dist/i18n/query-builder.az.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Azerbaijan (az)
* Author: Megaplan, mborisv
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.bg.js b/dist/i18n/query-builder.bg.js
index 4be820a3..1e085b71 100644
--- a/dist/i18n/query-builder.bg.js
+++ b/dist/i18n/query-builder.bg.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Bulgarian (bg)
* Author: Valentin Hristov
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.cs.js b/dist/i18n/query-builder.cs.js
index 00460ee8..9bbc9e81 100644
--- a/dist/i18n/query-builder.cs.js
+++ b/dist/i18n/query-builder.cs.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Čeština (cs)
* Author: Megaplan, mborisv
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.da.js b/dist/i18n/query-builder.da.js
index 87a0601c..bdb1e05c 100644
--- a/dist/i18n/query-builder.da.js
+++ b/dist/i18n/query-builder.da.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Danish (da)
* Author: Jna Borup Coyle, github@coyle.dk
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.de.js b/dist/i18n/query-builder.de.js
index 1d62ca72..bab1070e 100644
--- a/dist/i18n/query-builder.de.js
+++ b/dist/i18n/query-builder.de.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: German (de)
* Author: "raimu"
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.el.js b/dist/i18n/query-builder.el.js
index db394c9b..c73b4c92 100644
--- a/dist/i18n/query-builder.el.js
+++ b/dist/i18n/query-builder.el.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Greek (el)
* Author: Stelios Patsatzis, https://www.linkedin.com/in/stelios-patsatzis-89841561
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.en.js b/dist/i18n/query-builder.en.js
index a5224014..d2831bb5 100644
--- a/dist/i18n/query-builder.en.js
+++ b/dist/i18n/query-builder.en.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: English (en)
* Author: Damien "Mistic" Sorel, http://www.strangeplanet.fr
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.eo.js b/dist/i18n/query-builder.eo.js
index 721c9516..fa65b732 100644
--- a/dist/i18n/query-builder.eo.js
+++ b/dist/i18n/query-builder.eo.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Esperanto (eo)
* Author: Robin van der Vliet, https://robinvandervliet.com/
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.es.js b/dist/i18n/query-builder.es.js
index ac641ae5..021644cd 100644
--- a/dist/i18n/query-builder.es.js
+++ b/dist/i18n/query-builder.es.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Spanish (es)
* Author: "pyarza", "kddlb"
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.fa-IR.js b/dist/i18n/query-builder.fa-IR.js
index 00ac0787..c4fd7153 100644
--- a/dist/i18n/query-builder.fa-IR.js
+++ b/dist/i18n/query-builder.fa-IR.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Farsi (fa-ir)
* Author: Behzad Sedighzade, behzad.sedighzade@gmail.com
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.fr.js b/dist/i18n/query-builder.fr.js
index e57b826b..5baa88db 100644
--- a/dist/i18n/query-builder.fr.js
+++ b/dist/i18n/query-builder.fr.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: French (fr)
* Author: Damien "Mistic" Sorel, http://www.strangeplanet.fr
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.he.js b/dist/i18n/query-builder.he.js
index 93da2b3c..2cf9d0da 100644
--- a/dist/i18n/query-builder.he.js
+++ b/dist/i18n/query-builder.he.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Hebrew (he)
* Author: Kfir Stri https://github.com/kfirstri
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.hu.js b/dist/i18n/query-builder.hu.js
index 58832a66..daf91eeb 100644
--- a/dist/i18n/query-builder.hu.js
+++ b/dist/i18n/query-builder.hu.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Hungarian - Magyar (hu)
* Author: Szabó Attila "Tailor993", https://www.tailor993.hu
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.it.js b/dist/i18n/query-builder.it.js
index b3f500a3..55cee3b3 100644
--- a/dist/i18n/query-builder.it.js
+++ b/dist/i18n/query-builder.it.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Italian (it)
* Author: davegraziosi, Giuseppe Lodi Rizzini
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.lt.js b/dist/i18n/query-builder.lt.js
index 48d52a91..ea879ef7 100644
--- a/dist/i18n/query-builder.lt.js
+++ b/dist/i18n/query-builder.lt.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Lithuanian (lt)
* Author: Dalius Guzauskas (aka Tichij), https://lt.linkedin.com/in/daliusg
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.nl.js b/dist/i18n/query-builder.nl.js
index 005d7fa5..0ea33139 100644
--- a/dist/i18n/query-builder.nl.js
+++ b/dist/i18n/query-builder.nl.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Dutch (nl)
* Author: "Roywcm"
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.no.js b/dist/i18n/query-builder.no.js
index fefffea7..56bba7ee 100644
--- a/dist/i18n/query-builder.no.js
+++ b/dist/i18n/query-builder.no.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Norwegian (no)
* Author: Jna Borup Coyle, github@coyle.dk
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.pl.js b/dist/i18n/query-builder.pl.js
index 112b5089..a63591f4 100644
--- a/dist/i18n/query-builder.pl.js
+++ b/dist/i18n/query-builder.pl.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Polish (pl)
* Author: Artur Smolarek
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.pt-BR.js b/dist/i18n/query-builder.pt-BR.js
index 3c2df3e8..4dd9a042 100644
--- a/dist/i18n/query-builder.pt-BR.js
+++ b/dist/i18n/query-builder.pt-BR.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Brazilian Portuguese (pr-BR)
* Author: Leandro Gehlen, leandrogehlen@gmail.com; Marcos Ferretti, marcosvferretti@gmail.com
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.pt-PT.js b/dist/i18n/query-builder.pt-PT.js
index da2062a1..67bd1c1b 100644
--- a/dist/i18n/query-builder.pt-PT.js
+++ b/dist/i18n/query-builder.pt-PT.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Portuguese (pt-PT)
* Author: Miguel Guerreiro, migas.csi@gmail.com
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.ro.js b/dist/i18n/query-builder.ro.js
index 45b06d20..bd154998 100644
--- a/dist/i18n/query-builder.ro.js
+++ b/dist/i18n/query-builder.ro.js
@@ -1,7 +1,7 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Romanian (ro)
- * Author: ArianServ
+ * Author: ArianServ, totpero
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
@@ -19,7 +19,7 @@ var QueryBuilder = $.fn.queryBuilder;
QueryBuilder.regional['ro'] = {
"__locale": "Romanian (ro)",
- "__author": "ArianServ",
+ "__author": "ArianServ, totpero",
"add_rule": "Adaugă regulă",
"add_group": "Adaugă grup",
"delete_rule": "Şterge",
@@ -33,10 +33,12 @@ QueryBuilder.regional['ro'] = {
"not_equal": "diferit",
"in": "în",
"not_in": "nu în",
- "less": "mai puţin",
- "less_or_equal": "mai puţin sau egal",
+ "less": "mai mic",
+ "less_or_equal": "mai mic sau egal",
"greater": "mai mare",
"greater_or_equal": "mai mare sau egal",
+ "between": "între",
+ "not_between": "nu între",
"begins_with": "începe cu",
"not_begins_with": "nu începe cu",
"contains": "conţine",
@@ -47,6 +49,31 @@ QueryBuilder.regional['ro'] = {
"is_not_empty": "nu este gol",
"is_null": "e nul",
"is_not_null": "nu e nul"
+ },
+ "errors": {
+ "no_filter": "Nici un filtru selectat",
+ "empty_group": "Grupul este gol",
+ "radio_empty": "Nici o valoare nu este selectată",
+ "checkbox_empty": "Nici o valoare nu este selectată",
+ "select_empty": "Nici o valoare nu este selectată",
+ "string_empty": "Valoare goală",
+ "string_exceed_min_length": "Trebuie să conţină mai puţin de {0} caractere",
+ "string_exceed_max_length": "Trebuie să conţină mai mult de {0} caractere",
+ "string_invalid_format": "Format invalid ({0})",
+ "number_nan": "Nu este număr",
+ "number_not_integer": "Nu este număr întreg",
+ "number_not_double": "Nu este număr real",
+ "number_exceed_min": "Trebuie să fie mai mare decât {0}",
+ "number_exceed_max": "Trebuie să fie mai mic decât {0}",
+ "number_wrong_step": "Trebuie să fie multiplu de {0}",
+ "number_between_invalid": "Valori invalide, {0} este mai mare decât {1}",
+ "datetime_empty": "Valoare goală",
+ "datetime_invalid": "Format dată invalid ({0})",
+ "datetime_exceed_min": "Trebuie să fie după {0}",
+ "datetime_exceed_max": "Trebuie să fie înainte {0}",
+ "datetime_between_invalid": "Valori invalide, {0} este mai mare decât {1}",
+ "boolean_not_valid": "Nu este boolean",
+ "operator_not_multiple": "Operatorul \"{1}\" nu poate accepta mai multe valori"
}
};
diff --git a/dist/i18n/query-builder.ru.js b/dist/i18n/query-builder.ru.js
index 37866a88..562c93b9 100644
--- a/dist/i18n/query-builder.ru.js
+++ b/dist/i18n/query-builder.ru.js
@@ -1,6 +1,7 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Russian (ru)
+ * Author:
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
diff --git a/dist/i18n/query-builder.sk.js b/dist/i18n/query-builder.sk.js
index 737b119f..16ccc00c 100644
--- a/dist/i18n/query-builder.sk.js
+++ b/dist/i18n/query-builder.sk.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Slovensky (sk)
* Author: k2s
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.sq.js b/dist/i18n/query-builder.sq.js
index c20fb825..b811680c 100644
--- a/dist/i18n/query-builder.sq.js
+++ b/dist/i18n/query-builder.sq.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Albanian (sq)
* Author: Tomor Pupovci
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.sv.js b/dist/i18n/query-builder.sv.js
index 09fee8ec..ae28b6ab 100644
--- a/dist/i18n/query-builder.sv.js
+++ b/dist/i18n/query-builder.sv.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Svenska (sv)
* Author: hekin1
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.sw.js b/dist/i18n/query-builder.sw.js
index 04e883ee..c3e087ea 100644
--- a/dist/i18n/query-builder.sw.js
+++ b/dist/i18n/query-builder.sw.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Swahili (sw)
* Author: Timothy Anyona
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.tr.js b/dist/i18n/query-builder.tr.js
index d1db4824..90202cb2 100644
--- a/dist/i18n/query-builder.tr.js
+++ b/dist/i18n/query-builder.tr.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Turkish (tr)
* Author: Aykut Alpgiray Ateş
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.ua.js b/dist/i18n/query-builder.ua.js
index 2ddd3829..56eb677c 100644
--- a/dist/i18n/query-builder.ua.js
+++ b/dist/i18n/query-builder.ua.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Ukrainian (ua)
* Author: Megaplan, mborisv
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/i18n/query-builder.zh-CN.js b/dist/i18n/query-builder.zh-CN.js
index 42312498..cdc05bda 100644
--- a/dist/i18n/query-builder.zh-CN.js
+++ b/dist/i18n/query-builder.zh-CN.js
@@ -1,5 +1,5 @@
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: Simplified Chinese (zh_CN)
* Author: shadowwind, shatteredwindgo@gmail.com
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/js/query-builder.js b/dist/js/query-builder.js
index 38e4a4f9..97f77570 100644
--- a/dist/js/query-builder.js
+++ b/dist/js/query-builder.js
@@ -1,19 +1,20 @@
/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
+ * jQuery QueryBuilder 2.7.0
+ * Copyright 2014-2023 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
+
(function(root, factory) {
if (typeof define == 'function' && define.amd) {
- define(['jquery', 'dot/doT', 'jquery-extendext'], factory);
+ define(['jquery', 'jquery-extendext'], factory);
}
else if (typeof module === 'object' && module.exports) {
- module.exports = factory(require('jquery'), require('dot/doT'), require('jquery-extendext'));
+ module.exports = factory(require('jquery'), require('jquery-extendext'));
}
else {
- factory(root.jQuery, root.doT);
+ factory(root.jQuery);
}
-}(this, function($, doT) {
+}(this, function($) {
"use strict";
/**
@@ -139,8 +140,8 @@ var QueryBuilder = function($el, options) {
if (!this.templates[tpl]) {
this.templates[tpl] = QueryBuilder.templates[tpl];
}
- if (typeof this.templates[tpl] == 'string') {
- this.templates[tpl] = doT.template(this.templates[tpl]);
+ if (typeof this.templates[tpl] !== 'function') {
+ throw new Error(`Template ${tpl} must be a function`);
}
}, this);
@@ -2399,22 +2400,18 @@ QueryBuilder.prototype.getRuleInputValue = function(rule) {
case 'checkbox':
tmp = [];
- // jshint loopfunc:true
$value.find('[name=' + name + ']:checked').each(function() {
tmp.push($(this).val());
});
- // jshint loopfunc:false
value.push(tmp);
break;
case 'select':
if (filter.multiple) {
tmp = [];
- // jshint loopfunc:true
$value.find('[name=' + name + '] option:selected').each(function() {
tmp.push($(this).val());
});
- // jshint loopfunc:false
value.push(tmp);
}
else {
@@ -2501,11 +2498,9 @@ QueryBuilder.prototype.setRuleInputValue = function(rule, value) {
if (!$.isArray(value[i])) {
value[i] = [value[i]];
}
- // jshint loopfunc:true
value[i].forEach(function(value) {
$value.find('[name=' + name + '][value="' + value + '"]').prop('checked', true).trigger('change');
});
- // jshint loopfunc:false
break;
default:
@@ -2679,112 +2674,122 @@ QueryBuilder.prototype.getValidationMessage = function(validation, type, def) {
};
-QueryBuilder.templates.group = '\
-';
+QueryBuilder.templates.group = ({ group_id, level, conditions, icons, settings, translate, builder }) => {
+ return `
+`;
+};
-QueryBuilder.templates.rule = '\
- \
- \
- {{? it.settings.display_errors }} \
-
\
- {{?}} \
-
\
-
\
-
\
-
';
+QueryBuilder.templates.rule = ({ rule_id, icons, settings, translate, builder }) => {
+ return `
+
+
+ ${settings.display_errors ? `
+
+ ` : ''}
+
+
+
+
`;
+};
-QueryBuilder.templates.filterSelect = '\
-{{ var optgroup = null; }} \
- \
- {{? it.settings.display_empty_filter }} \
- {{= it.settings.select_placeholder }} \
- {{?}} \
- {{~ it.filters: filter }} \
- {{? optgroup !== filter.optgroup }} \
- {{? optgroup !== null }}{{?}} \
- {{? (optgroup = filter.optgroup) !== null }} \
- \
- {{?}} \
- {{?}} \
- {{= it.translate(filter.label) }} \
- {{~}} \
- {{? optgroup !== null }} {{?}} \
- ';
-
-QueryBuilder.templates.operatorSelect = '\
-{{? it.operators.length === 1 }} \
- \
-{{= it.translate("operators", it.operators[0].type) }} \
- \
-{{?}} \
-{{ var optgroup = null; }} \
- \
- {{~ it.operators: operator }} \
- {{? optgroup !== operator.optgroup }} \
- {{? optgroup !== null }}{{?}} \
- {{? (optgroup = operator.optgroup) !== null }} \
- \
- {{?}} \
- {{?}} \
- {{= it.translate("operators", operator.type) }} \
- {{~}} \
- {{? optgroup !== null }} {{?}} \
- ';
-
-QueryBuilder.templates.ruleValueSelect = '\
-{{ var optgroup = null; }} \
- \
- {{? it.rule.filter.placeholder }} \
- {{= it.rule.filter.placeholder }} \
- {{?}} \
- {{~ it.rule.filter.values: entry }} \
- {{? optgroup !== entry.optgroup }} \
- {{? optgroup !== null }}{{?}} \
- {{? (optgroup = entry.optgroup) !== null }} \
- \
- {{?}} \
- {{?}} \
- {{= entry.label }} \
- {{~}} \
- {{? optgroup !== null }} {{?}} \
- ';
+QueryBuilder.templates.filterSelect = ({ rule, filters, icons, settings, translate, builder }) => {
+ let optgroup = null;
+ return `
+
+ ${settings.display_empty_filter ? `
+ ${settings.select_placeholder}
+ ` : ''}
+ ${filters.map(filter => `
+ ${optgroup !== filter.optgroup ? `
+ ${optgroup !== null ? `` : ''}
+ ${(optgroup = filter.optgroup) !== null ? `
+
+ ` : ''}
+ ` : ''}
+ ${translate(filter.label)}
+ `).join('')}
+ ${optgroup !== null ? ' ' : ''}
+ `;
+};
+
+QueryBuilder.templates.operatorSelect = ({ rule, operators, icons, settings, translate, builder }) => {
+ let optgroup = null;
+ return `
+${operators.length === 1 ? `
+
+${translate("operators", operators[0].type)}
+
+` : ''}
+
+ ${operators.map(operator => `
+ ${optgroup !== operator.optgroup ? `
+ ${optgroup !== null ? `` : ''}
+ ${(optgroup = operator.optgroup) !== null ? `
+
+ ` : ''}
+ ` : ''}
+ ${translate("operators", operator.type)}
+ `).join('')}
+ ${optgroup !== null ? ' ' : ''}
+ `;
+};
+
+QueryBuilder.templates.ruleValueSelect = ({ name, rule, icons, settings, translate, builder }) => {
+ let optgroup = null;
+ return `
+
+ ${rule.filter.placeholder ? `
+ ${rule.filter.placeholder}
+ ` : ''}
+ ${rule.filter.values.map(entry => `
+ ${optgroup !== entry.optgroup ? `
+ ${optgroup !== null ? `` : ''}
+ ${(optgroup = entry.optgroup) !== null ? `
+
+ ` : ''}
+ ` : ''}
+ ${entry.label}
+ `).join('')}
+ ${optgroup !== null ? ' ' : ''}
+ `;
+};
/**
* Returns group's HTML
@@ -2794,26 +2799,26 @@ QueryBuilder.templates.ruleValueSelect = '\
* @fires QueryBuilder.changer:getGroupTemplate
* @private
*/
-QueryBuilder.prototype.getGroupTemplate = function(group_id, level) {
- var h = this.templates.group({
- builder: this,
- group_id: group_id,
- level: level,
- conditions: this.settings.conditions,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of a group
- * @event changer:getGroupTemplate
- * @memberof QueryBuilder
- * @param {string} html
- * @param {int} level
- * @returns {string}
- */
- return this.change('getGroupTemplate', h, level);
+QueryBuilder.prototype.getGroupTemplate = function (group_id, level) {
+ var h = this.templates.group({
+ builder: this,
+ group_id: group_id,
+ level: level,
+ conditions: this.settings.conditions,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of a group
+ * @event changer:getGroupTemplate
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {int} level
+ * @returns {string}
+ */
+ return this.change('getGroupTemplate', h, level);
};
/**
@@ -2823,23 +2828,23 @@ QueryBuilder.prototype.getGroupTemplate = function(group_id, level) {
* @fires QueryBuilder.changer:getRuleTemplate
* @private
*/
-QueryBuilder.prototype.getRuleTemplate = function(rule_id) {
- var h = this.templates.rule({
- builder: this,
- rule_id: rule_id,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of a rule
- * @event changer:getRuleTemplate
- * @memberof QueryBuilder
- * @param {string} html
- * @returns {string}
- */
- return this.change('getRuleTemplate', h);
+QueryBuilder.prototype.getRuleTemplate = function (rule_id) {
+ var h = this.templates.rule({
+ builder: this,
+ rule_id: rule_id,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of a rule
+ * @event changer:getRuleTemplate
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @returns {string}
+ */
+ return this.change('getRuleTemplate', h);
};
/**
@@ -2850,26 +2855,26 @@ QueryBuilder.prototype.getRuleTemplate = function(rule_id) {
* @fires QueryBuilder.changer:getRuleFilterTemplate
* @private
*/
-QueryBuilder.prototype.getRuleFilterSelect = function(rule, filters) {
- var h = this.templates.filterSelect({
- builder: this,
- rule: rule,
- filters: filters,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of the rule's filter dropdown
- * @event changer:getRuleFilterSelect
- * @memberof QueryBuilder
- * @param {string} html
- * @param {Rule} rule
- * @param {QueryBuilder.Filter[]} filters
- * @returns {string}
- */
- return this.change('getRuleFilterSelect', h, rule, filters);
+QueryBuilder.prototype.getRuleFilterSelect = function (rule, filters) {
+ var h = this.templates.filterSelect({
+ builder: this,
+ rule: rule,
+ filters: filters,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of the rule's filter dropdown
+ * @event changer:getRuleFilterSelect
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {Rule} rule
+ * @param {QueryBuilder.Filter[]} filters
+ * @returns {string}
+ */
+ return this.change('getRuleFilterSelect', h, rule, filters);
};
/**
@@ -2880,26 +2885,26 @@ QueryBuilder.prototype.getRuleFilterSelect = function(rule, filters) {
* @fires QueryBuilder.changer:getRuleOperatorTemplate
* @private
*/
-QueryBuilder.prototype.getRuleOperatorSelect = function(rule, operators) {
- var h = this.templates.operatorSelect({
- builder: this,
- rule: rule,
- operators: operators,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of the rule's operator dropdown
- * @event changer:getRuleOperatorSelect
- * @memberof QueryBuilder
- * @param {string} html
- * @param {Rule} rule
- * @param {QueryBuilder.Operator[]} operators
- * @returns {string}
- */
- return this.change('getRuleOperatorSelect', h, rule, operators);
+QueryBuilder.prototype.getRuleOperatorSelect = function (rule, operators) {
+ var h = this.templates.operatorSelect({
+ builder: this,
+ rule: rule,
+ operators: operators,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of the rule's operator dropdown
+ * @event changer:getRuleOperatorSelect
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {Rule} rule
+ * @param {QueryBuilder.Operator[]} operators
+ * @returns {string}
+ */
+ return this.change('getRuleOperatorSelect', h, rule, operators);
};
/**
@@ -2910,26 +2915,26 @@ QueryBuilder.prototype.getRuleOperatorSelect = function(rule, operators) {
* @fires QueryBuilder.changer:getRuleValueSelect
* @private
*/
-QueryBuilder.prototype.getRuleValueSelect = function(name, rule) {
- var h = this.templates.ruleValueSelect({
- builder: this,
- name: name,
- rule: rule,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of the rule's value dropdown (in case of a "select filter)
- * @event changer:getRuleValueSelect
- * @memberof QueryBuilder
- * @param {string} html
- * @param [string} name
- * @param {Rule} rule
- * @returns {string}
- */
- return this.change('getRuleValueSelect', h, name, rule);
+QueryBuilder.prototype.getRuleValueSelect = function (name, rule) {
+ var h = this.templates.ruleValueSelect({
+ builder: this,
+ name: name,
+ rule: rule,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of the rule's value dropdown (in case of a "select filter)
+ * @event changer:getRuleValueSelect
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param [string} name
+ * @param {Rule} rule
+ * @returns {string}
+ */
+ return this.change('getRuleValueSelect', h, name, rule);
};
/**
@@ -2940,70 +2945,70 @@ QueryBuilder.prototype.getRuleValueSelect = function(name, rule) {
* @fires QueryBuilder.changer:getRuleInput
* @private
*/
-QueryBuilder.prototype.getRuleInput = function(rule, value_id) {
- var filter = rule.filter;
- var validation = rule.filter.validation || {};
- var name = rule.id + '_value_' + value_id;
- var c = filter.vertical ? ' class=block' : '';
- var h = '';
- var placeholder = Array.isArray(filter.placeholder) ? filter.placeholder[value_id] : filter.placeholder;
-
- if (typeof filter.input == 'function') {
- h = filter.input.call(this, rule, name);
- }
- else {
- switch (filter.input) {
- case 'radio':
- case 'checkbox':
- Utils.iterateOptions(filter.values, function(key, val) {
- h += ' ' + val + ' ';
- });
- break;
-
- case 'select':
- h = this.getRuleValueSelect(name, rule);
- break;
-
- case 'textarea':
- h += '';
- break;
-
- case 'number':
- h += ' ';
- break;
-
- default:
- h += ' ';
- }
- }
-
- /**
- * Modifies the raw HTML of the rule's input
- * @event changer:getRuleInput
- * @memberof QueryBuilder
- * @param {string} html
- * @param {Rule} rule
- * @param {string} name - the name that the input must have
- * @returns {string}
- */
- return this.change('getRuleInput', h, rule, name);
+QueryBuilder.prototype.getRuleInput = function (rule, value_id) {
+ var filter = rule.filter;
+ var validation = rule.filter.validation || {};
+ var name = rule.id + '_value_' + value_id;
+ var c = filter.vertical ? ' class=block' : '';
+ var h = '';
+ var placeholder = Array.isArray(filter.placeholder) ? filter.placeholder[value_id] : filter.placeholder;
+
+ if (typeof filter.input == 'function') {
+ h = filter.input.call(this, rule, name);
+ }
+ else {
+ switch (filter.input) {
+ case 'radio':
+ case 'checkbox':
+ Utils.iterateOptions(filter.values, function (key, val) {
+ h += ' ' + val + ' ';
+ });
+ break;
+
+ case 'select':
+ h = this.getRuleValueSelect(name, rule);
+ break;
+
+ case 'textarea':
+ h += '';
+ break;
+
+ case 'number':
+ h += ' ';
+ break;
+
+ default:
+ h += ' ';
+ }
+ }
+
+ /**
+ * Modifies the raw HTML of the rule's input
+ * @event changer:getRuleInput
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {Rule} rule
+ * @param {string} name - the name that the input must have
+ * @returns {string}
+ */
+ return this.change('getRuleInput', h, rule, name);
};
@@ -6150,7 +6155,7 @@ QueryBuilder.extend(/** @lends module:plugins.UniqueFilter.prototype */ {
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: English (en)
* Author: Damien "Mistic" Sorel, http://www.strangeplanet.fr
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/js/query-builder.min.js b/dist/js/query-builder.min.js
deleted file mode 100644
index 55260b96..00000000
--- a/dist/js/query-builder.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
- * Licensed under MIT (https://opensource.org/licenses/MIT)
- */
-
-!function(e,t){"function"==typeof define&&define.amd?define(["jquery","dot/doT","jquery-extendext"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),require("dot/doT"),require("jquery-extendext")):t(e.jQuery,e.doT)}(this,function($,r){"use strict";var c=function(e,t){(e[0].queryBuilder=this).$el=e,this.settings=$.extendext(!0,"replace",{},c.DEFAULTS,t),this.model=new i,this.status={id:null,generated_id:!1,group_id:0,rule_id:0,has_optgroup:!1,has_operator_optgroup:!1},this.filters=this.settings.filters,this.icons=this.settings.icons,this.operators=this.settings.operators,this.templates=this.settings.templates,this.plugins=this.settings.plugins,this.lang=null,void 0===c.regional.en&&y.error("Config",'"i18n/en.js" not loaded.'),this.lang=$.extendext(!0,"replace",{},c.regional.en,c.regional[this.settings.lang_code],this.settings.lang),!1===this.settings.allow_groups?this.settings.allow_groups=0:!0===this.settings.allow_groups&&(this.settings.allow_groups=-1),Object.keys(this.templates).forEach(function(e){this.templates[e]||(this.templates[e]=c.templates[e]),"string"==typeof this.templates[e]&&(this.templates[e]=r.template(this.templates[e]))},this),this.$el.attr("id")||(this.$el.attr("id","qb_"+Math.floor(99999*Math.random())),this.status.generated_id=!0),this.status.id=this.$el.attr("id"),this.$el.addClass("query-builder form-inline"),this.filters=this.checkFilters(this.filters),this.operators=this.checkOperators(this.operators),this.bindEvents(),this.initPlugins()};$.extend(c.prototype,{trigger:function(e){var t=new $.Event(this._tojQueryEvent(e),{builder:this});return this.$el.triggerHandler(t,Array.prototype.slice.call(arguments,1)),t},change:function(e,t){var r=new $.Event(this._tojQueryEvent(e,!0),{builder:this,value:t});return this.$el.triggerHandler(r,Array.prototype.slice.call(arguments,2)),r.value},on:function(e,t){return this.$el.on(this._tojQueryEvent(e),t),this},off:function(e,t){return this.$el.off(this._tojQueryEvent(e),t),this},once:function(e,t){return this.$el.one(this._tojQueryEvent(e),t),this},_tojQueryEvent:function(e,t){return e.split(" ").map(function(e){return e+".queryBuilder"+(t?".filter":"")}).join(" ")}}),c.types={string:"string",integer:"number",double:"number",date:"datetime",time:"datetime",datetime:"datetime",boolean:"boolean"},c.inputs=["text","number","textarea","radio","checkbox","select"],c.modifiable_options=["display_errors","allow_groups","allow_empty","default_condition","default_filter"],c.selectors={group_container:".rules-group-container",rule_container:".rule-container",filter_container:".rule-filter-container",operator_container:".rule-operator-container",value_container:".rule-value-container",error_container:".error-container",condition_container:".rules-group-header .group-conditions",rule_header:".rule-header",group_header:".rules-group-header",group_actions:".group-actions",rule_actions:".rule-actions",rules_list:".rules-group-body>.rules-list",group_condition:".rules-group-header [name$=_cond]",rule_filter:".rule-filter-container [name$=_filter]",rule_operator:".rule-operator-container [name$=_operator]",rule_value:".rule-value-container [name*=_value_]",add_rule:"[data-add=rule]",delete_rule:"[data-delete=rule]",add_group:"[data-add=group]",delete_group:"[data-delete=group]"},c.templates={},c.regional={},c.OPERATORS={equal:{type:"equal",nb_inputs:1,multiple:!1,apply_to:["string","number","datetime","boolean"]},not_equal:{type:"not_equal",nb_inputs:1,multiple:!1,apply_to:["string","number","datetime","boolean"]},in:{type:"in",nb_inputs:1,multiple:!0,apply_to:["string","number","datetime"]},not_in:{type:"not_in",nb_inputs:1,multiple:!0,apply_to:["string","number","datetime"]},less:{type:"less",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},less_or_equal:{type:"less_or_equal",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},greater:{type:"greater",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},greater_or_equal:{type:"greater_or_equal",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},between:{type:"between",nb_inputs:2,multiple:!1,apply_to:["number","datetime"]},not_between:{type:"not_between",nb_inputs:2,multiple:!1,apply_to:["number","datetime"]},begins_with:{type:"begins_with",nb_inputs:1,multiple:!1,apply_to:["string"]},not_begins_with:{type:"not_begins_with",nb_inputs:1,multiple:!1,apply_to:["string"]},contains:{type:"contains",nb_inputs:1,multiple:!1,apply_to:["string"]},not_contains:{type:"not_contains",nb_inputs:1,multiple:!1,apply_to:["string"]},ends_with:{type:"ends_with",nb_inputs:1,multiple:!1,apply_to:["string"]},not_ends_with:{type:"not_ends_with",nb_inputs:1,multiple:!1,apply_to:["string"]},is_empty:{type:"is_empty",nb_inputs:0,multiple:!1,apply_to:["string"]},is_not_empty:{type:"is_not_empty",nb_inputs:0,multiple:!1,apply_to:["string"]},is_null:{type:"is_null",nb_inputs:0,multiple:!1,apply_to:["string","number","datetime","boolean"]},is_not_null:{type:"is_not_null",nb_inputs:0,multiple:!1,apply_to:["string","number","datetime","boolean"]}},c.DEFAULTS={filters:[],plugins:[],sort_filters:!1,display_errors:!0,allow_groups:-1,allow_empty:!1,conditions:["AND","OR"],default_condition:"AND",inputs_separator:" , ",select_placeholder:"------",display_empty_filter:!0,default_filter:null,optgroups:{},default_rule_flags:{filter_readonly:!1,operator_readonly:!1,value_readonly:!1,no_delete:!1},default_group_flags:{condition_readonly:!1,no_add_rule:!1,no_add_group:!1,no_delete:!1},templates:{group:null,rule:null,filterSelect:null,operatorSelect:null,ruleValueSelect:null},lang_code:"en",lang:{},operators:["equal","not_equal","in","not_in","less","less_or_equal","greater","greater_or_equal","between","not_between","begins_with","not_begins_with","contains","not_contains","ends_with","not_ends_with","is_empty","is_not_empty","is_null","is_not_null"],icons:{add_group:"glyphicon glyphicon-plus-sign",add_rule:"glyphicon glyphicon-plus",remove_group:"glyphicon glyphicon-remove",remove_rule:"glyphicon glyphicon-remove",error:"glyphicon glyphicon-warning-sign"}},c.plugins={},c.defaults=function(e){if("object"!=typeof e)return"string"==typeof e?"object"==typeof c.DEFAULTS[e]?$.extend(!0,{},c.DEFAULTS[e]):c.DEFAULTS[e]:$.extend(!0,{},c.DEFAULTS);$.extendext(!0,"replace",c.DEFAULTS,e)},c.define=function(e,t,r){c.plugins[e]={fct:t,def:r||{}}},c.extend=function(e){$.extend(c.prototype,e)},c.prototype.initPlugins=function(){if(this.plugins){if($.isArray(this.plugins)){var t={};this.plugins.forEach(function(e){t[e]=null}),this.plugins=t}Object.keys(this.plugins).forEach(function(e){e in c.plugins?(this.plugins[e]=$.extend(!0,{},c.plugins[e].def,this.plugins[e]||{}),c.plugins[e].fct.call(this,this.plugins[e])):y.error("Config",'Unable to find plugin "{0}"',e)},this)}},c.prototype.getPluginOptions=function(e,t){var r;if(this.plugins&&this.plugins[e]?r=this.plugins[e]:c.plugins[e]&&(r=c.plugins[e].def),r)return t?r[t]:r;y.error("Config",'Unable to find plugin "{0}"',e)},c.prototype.init=function(e){this.trigger("afterInit"),e?(this.setRules(e),delete this.settings.rules):this.setRoot(!0)},c.prototype.checkFilters=function(e){var t=[];if(e&&0!==e.length||y.error("Config","Missing filters list"),e.forEach(function(i,e){switch(i.id||y.error("Config","Missing filter {0} id",e),-1!=t.indexOf(i.id)&&y.error("Config",'Filter "{0}" already defined',i.id),t.push(i.id),i.type?c.types[i.type]||y.error("Config",'Invalid type "{0}"',i.type):i.type="string",i.input?"function"!=typeof i.input&&-1==c.inputs.indexOf(i.input)&&y.error("Config",'Invalid input "{0}"',i.input):i.input="number"===c.types[i.type]?"number":"text",i.operators&&i.operators.forEach(function(e){"string"!=typeof e&&y.error("Config","Filter operators must be global operators types (string)")}),i.field||(i.field=i.id),i.label||(i.label=i.field),i.optgroup?(this.status.has_optgroup=!0,this.settings.optgroups[i.optgroup]||(this.settings.optgroups[i.optgroup]=i.optgroup)):i.optgroup=null,i.input){case"radio":case"checkbox":(!i.values||i.values.length<1)&&y.error("Config",'Missing filter "{0}" values',i.id);break;case"select":var o=[];i.has_optgroup=!1,y.iterateOptions(i.values,function(e,t,r){o.push({value:e,label:t,optgroup:r||null}),r&&(i.has_optgroup=!0,this.settings.optgroups[r]||(this.settings.optgroups[r]=r))}.bind(this)),i.has_optgroup?i.values=y.groupSort(o,"optgroup"):i.values=o,i.placeholder&&(void 0===i.placeholder_value&&(i.placeholder_value=-1),i.values.forEach(function(e){e.value==i.placeholder_value&&y.error("Config",'Placeholder of filter "{0}" overlaps with one of its values',i.id)}))}},this),this.settings.sort_filters)if("function"==typeof this.settings.sort_filters)e.sort(this.settings.sort_filters);else{var r=this;e.sort(function(e,t){return r.translate(e.label).localeCompare(r.translate(t.label))})}return this.status.has_optgroup&&(e=y.groupSort(e,"optgroup")),e},c.prototype.checkOperators=function(r){var i=[];return r.forEach(function(e,t){"string"==typeof e?(c.OPERATORS[e]||y.error("Config",'Unknown operator "{0}"',e),r[t]=e=$.extendext(!0,"replace",{},c.OPERATORS[e])):(e.type||y.error("Config",'Missing "type" for operator {0}',t),c.OPERATORS[e.type]&&(r[t]=e=$.extendext(!0,"replace",{},c.OPERATORS[e.type],e)),void 0!==e.nb_inputs&&void 0!==e.apply_to||y.error("Config",'Missing "nb_inputs" and/or "apply_to" for operator "{0}"',e.type)),-1!=i.indexOf(e.type)&&y.error("Config",'Operator "{0}" already defined',e.type),i.push(e.type),e.optgroup?(this.status.has_operator_optgroup=!0,this.settings.optgroups[e.optgroup]||(this.settings.optgroups[e.optgroup]=e.optgroup)):e.optgroup=null},this),this.status.has_operator_optgroup&&(r=y.groupSort(r,"optgroup")),r},c.prototype.bindEvents=function(){var n=this,t=c.selectors;this.$el.on("change.queryBuilder",t.group_condition,function(){if($(this).is(":checked")){var e=$(this).closest(t.group_container);n.getModel(e).condition=$(this).val()}}),this.$el.on("change.queryBuilder",t.rule_filter,function(){var e=$(this).closest(t.rule_container);n.getModel(e).filter=n.getFilterById($(this).val())}),this.$el.on("change.queryBuilder",t.rule_operator,function(){var e=$(this).closest(t.rule_container);n.getModel(e).operator=n.getOperatorByType($(this).val())}),this.$el.on("click.queryBuilder",t.add_rule,function(){var e=$(this).closest(t.group_container);n.addRule(n.getModel(e))}),this.$el.on("click.queryBuilder",t.delete_rule,function(){var e=$(this).closest(t.rule_container);n.deleteRule(n.getModel(e))}),0!==this.settings.allow_groups&&(this.$el.on("click.queryBuilder",t.add_group,function(){var e=$(this).closest(t.group_container);n.addGroup(n.getModel(e))}),this.$el.on("click.queryBuilder",t.delete_group,function(){var e=$(this).closest(t.group_container);n.deleteGroup(n.getModel(e))})),this.model.on({drop:function(e,t){t.$el.remove(),n.refreshGroupsConditions()},add:function(e,t,r,i){0===i?r.$el.prependTo(t.$el.find(">"+c.selectors.rules_list)):r.$el.insertAfter(t.rules[i-1].$el),n.refreshGroupsConditions()},move:function(e,t,r,i){t.$el.detach(),0===i?t.$el.prependTo(r.$el.find(">"+c.selectors.rules_list)):t.$el.insertAfter(r.rules[i-1].$el),n.refreshGroupsConditions()},update:function(e,t,r,i,o){if(t instanceof l)switch(r){case"error":n.updateError(t);break;case"flags":n.applyRuleFlags(t);break;case"filter":n.updateRuleFilter(t,o);break;case"operator":n.updateRuleOperator(t,o);break;case"value":n.updateRuleValue(t,o)}else switch(r){case"error":n.updateError(t);break;case"flags":n.applyGroupFlags(t);break;case"condition":n.updateGroupCondition(t,o)}}})},c.prototype.setRoot=function(e,t,r){e=void 0===e||!0===e;var i=this.nextGroupId(),o=$($.parseHTML(this.getGroupTemplate(i,1)));return this.$el.append(o),this.model.root=new a(null,o),this.model.root.model=this.model,this.model.root.data=t,this.model.root.flags=$.extend({},this.settings.default_group_flags,r),this.model.root.condition=this.settings.default_condition,this.trigger("afterAddGroup",this.model.root),e&&this.addRule(this.model.root),this.model.root},c.prototype.addGroup=function(e,t,r,i){t=void 0===t||!0===t;var o=e.level+1;if(this.trigger("beforeAddGroup",e,t,o).isDefaultPrevented())return null;var n=this.nextGroupId(),l=$(this.getGroupTemplate(n,o)),s=e.addGroup(l);return s.data=r,s.flags=$.extend({},this.settings.default_group_flags,i),s.condition=this.settings.default_condition,this.trigger("afterAddGroup",s),this.trigger("rulesChanged"),t&&this.addRule(s),s},c.prototype.deleteGroup=function(e){if(e.isRoot())return!1;if(this.trigger("beforeDeleteGroup",e).isDefaultPrevented())return!1;var t=!0;return e.each("reverse",function(e){t&=this.deleteRule(e)},function(e){t&=this.deleteGroup(e)},this),t&&(e.drop(),this.trigger("afterDeleteGroup"),this.trigger("rulesChanged")),t},c.prototype.updateGroupCondition=function(t,e){t.$el.find(">"+c.selectors.group_condition).each(function(){var e=$(this);e.prop("checked",e.val()===t.condition),e.parent().toggleClass("active",e.val()===t.condition)}),this.trigger("afterUpdateGroupCondition",t,e),this.trigger("rulesChanged")},c.prototype.refreshGroupsConditions=function(){!function t(e){(!e.flags||e.flags&&!e.flags.condition_readonly)&&e.$el.find(">"+c.selectors.group_condition).prop("disabled",e.rules.length<=1).parent().toggleClass("disabled",e.rules.length<=1),e.each(null,function(e){t(e)},this)}(this.model.root)},c.prototype.addRule=function(e,t,r){if(this.trigger("beforeAddRule",e).isDefaultPrevented())return null;var i=this.nextRuleId(),o=$($.parseHTML(this.getRuleTemplate(i))),n=e.addRule(o);return n.data=t,n.flags=$.extend({},this.settings.default_rule_flags,r),this.trigger("afterAddRule",n),this.trigger("rulesChanged"),this.createRuleFilters(n),!this.settings.default_filter&&this.settings.display_empty_filter||(n.filter=this.change("getDefaultFilter",this.getFilterById(this.settings.default_filter||this.filters[0].id),n)),n},c.prototype.deleteRule=function(e){return!e.flags.no_delete&&(!this.trigger("beforeDeleteRule",e).isDefaultPrevented()&&(e.drop(),this.trigger("afterDeleteRule"),this.trigger("rulesChanged"),!0))},c.prototype.createRuleFilters=function(e){var t=this.change("getRuleFilters",this.filters,e),r=$($.parseHTML(this.getRuleFilterSelect(e,t)));e.$el.find(c.selectors.filter_container).html(r),this.trigger("afterCreateRuleFilters",e),this.applyRuleFlags(e)},c.prototype.createRuleOperators=function(e){var t=e.$el.find(c.selectors.operator_container).empty();if(e.filter){var r=this.getOperators(e.filter),i=$($.parseHTML(this.getRuleOperatorSelect(e,r)));t.html(i),e.filter.default_operator?e.__.operator=this.getOperatorByType(e.filter.default_operator):e.__.operator=r[0],e.$el.find(c.selectors.rule_operator).val(e.operator.type),this.trigger("afterCreateRuleOperators",e,r),this.applyRuleFlags(e)}},c.prototype.createRuleInput=function(e){var t=e.$el.find(c.selectors.value_container).empty();if(e.__.value=void 0,e.filter&&e.operator&&0!==e.operator.nb_inputs){for(var r=this,i=$(),o=e.filter,n=0;n"+r.group_condition).prop("disabled",t.condition_readonly).parent().toggleClass("readonly",t.condition_readonly),t.no_add_rule&&e.$el.find(r.add_rule).remove(),t.no_add_group&&e.$el.find(r.add_group).remove(),t.no_delete&&e.$el.find(r.delete_group).remove(),this.trigger("afterApplyGroupFlags",e)},c.prototype.clearErrors=function(e){(e=e||this.model.root)&&(e.error=null,e instanceof a&&e.each(function(e){e.error=null},function(e){this.clearErrors(e)},this))},c.prototype.updateError=function(e){if(this.settings.display_errors)if(null===e.error)e.$el.removeClass("has-error");else{var t=this.translate("errors",e.error[0]);t=y.fmt(t,e.error.slice(1)),t=this.change("displayError",t,e.error,e),e.$el.addClass("has-error").find(c.selectors.error_container).eq(0).attr("title",t)}},c.prototype.triggerValidationError=function(e,t,r){$.isArray(t)||(t=[t]),this.trigger("validationError",e,t,r).isDefaultPrevented()||(e.error=t)},c.prototype.destroy=function(){this.trigger("beforeDestroy"),this.status.generated_id&&this.$el.removeAttr("id"),this.clear(),this.model=null,this.$el.off(".queryBuilder").removeClass("query-builder").removeData("queryBuilder"),delete this.$el[0].queryBuilder},c.prototype.reset=function(){this.trigger("beforeReset").isDefaultPrevented()||(this.status.group_id=1,this.status.rule_id=0,this.model.root.empty(),this.model.root.data=void 0,this.model.root.flags=$.extend({},this.settings.default_group_flags),this.model.root.condition=this.settings.default_condition,this.addRule(this.model.root),this.trigger("afterReset"),this.trigger("rulesChanged"))},c.prototype.clear=function(){this.trigger("beforeClear").isDefaultPrevented()||(this.status.group_id=0,this.status.rule_id=0,this.model.root&&(this.model.root.drop(),this.model.root=null),this.trigger("afterClear"),this.trigger("rulesChanged"))},c.prototype.setOptions=function(e){$.each(e,function(e,t){-1!==c.modifiable_options.indexOf(e)&&(this.settings[e]=t)}.bind(this))},c.prototype.getModel=function(e){return e?e instanceof o?e:$(e).data("queryBuilderModel"):this.model.root},c.prototype.validate=function(n){n=$.extend({skip_empty:!1},n),this.clearErrors();var l=this,e=function r(e){var i=0,o=0;return e.each(function(e){if(e.filter||!n.skip_empty){if(!e.filter)return l.triggerValidationError(e,"no_filter",null),void o++;if(!e.operator)return l.triggerValidationError(e,"no_operator",null),void o++;if(0!==e.operator.nb_inputs){var t=l.validateValue(e,e.value);if(!0!==t)return l.triggerValidationError(e,t,e.value),void o++}i++}},function(e){var t=r(e);!0===t?i++:!1===t&&o++}),!(0parseInt(l.max)){s=[this.getValidationMessage(l,"max","string_exceed_max_length"),l.max];break}if(!l.format||("string"==typeof l.format&&(l.format=new RegExp(l.format)),l.format.test(i[u])))break;s=[this.getValidationMessage(l,"format","string_invalid_format"),l.format];break;case"number":if(void 0===i[u]||0===i[u].length){l.allow_empty_value||(s=["number_nan"]);break}if(isNaN(i[u])){s=["number_nan"];break}if("integer"==o.type){if(parseInt(i[u])!=i[u]){s=["number_not_integer"];break}}else if(parseFloat(i[u])!=i[u]){s=["number_not_double"];break}if(void 0!==l.min&&i[u]parseFloat(l.max)){s=[this.getValidationMessage(l,"max","number_exceed_max"),l.max];break}if(void 0!==l.step&&"any"!==l.step){var p=(i[u]/l.step).toPrecision(14);if(parseInt(p)!=p){s=[this.getValidationMessage(l,"step","number_wrong_step"),l.step];break}}break;case"datetime":if(void 0===i[u]||0===i[u].length){l.allow_empty_value||(s=["datetime_empty"]);break}if(l.format){"moment"in window||y.error("MissingLibrary","MomentJS is required for Date/Time validation. Get it here http://momentjs.com");var d=moment(i[u],l.format);if(!d.isValid()){s=[this.getValidationMessage(l,"format","datetime_invalid"),l.format];break}if(l.min&&dmoment(l.max,l.format)){s=[this.getValidationMessage(l,"max","datetime_exceed_max"),l.max];break}}break;case"boolean":if(void 0===i[u]||0===i[u].length){l.allow_empty_value||(s=["boolean_not_valid"]);break}if("true"!==(r=(""+i[u]).trim().toLowerCase())&&"false"!==r&&"1"!==r&&"0"!==r&&1!==i[u]&&0!==i[u]){s=["boolean_not_valid"];break}}if(!0!==s)break}}if(!0!==s)break}if(("between"===e.operator.type||"not_between"===e.operator.type)&&2===t.length)switch(c.types[o.type]){case"number":t[0]>t[1]&&(s=["number_between_invalid",t[0],t[1]]);break;case"datetime":l.format&&("moment"in window||y.error("MissingLibrary","MomentJS is required for Date/Time validation. Get it here http://momentjs.com"),moment(t[0],l.format).isAfter(moment(t[1],l.format))&&(s=["datetime_between_invalid",t[0],t[1]]))}return s},c.prototype.nextGroupId=function(){return this.status.id+"_group_"+this.status.group_id++},c.prototype.nextRuleId=function(){return this.status.id+"_rule_"+this.status.rule_id++},c.prototype.getOperators=function(r){"string"==typeof r&&(r=this.getFilterById(r));for(var e=[],t=0,i=this.operators.length;t ',c.templates.rule=' {{? it.settings.display_errors }}
{{?}}
',c.templates.filterSelect='{{ var optgroup = null; }} {{? it.settings.display_empty_filter }} {{= it.settings.select_placeholder }} {{?}} {{~ it.filters: filter }} {{? optgroup !== filter.optgroup }} {{? optgroup !== null }}{{?}} {{? (optgroup = filter.optgroup) !== null }} {{?}} {{?}} {{= it.translate(filter.label) }} {{~}} {{? optgroup !== null }} {{?}} ',c.templates.operatorSelect='{{? it.operators.length === 1 }} {{= it.translate("operators", it.operators[0].type) }} {{?}} {{ var optgroup = null; }} {{~ it.operators: operator }} {{? optgroup !== operator.optgroup }} {{? optgroup !== null }}{{?}} {{? (optgroup = operator.optgroup) !== null }} {{?}} {{?}} {{= it.translate("operators", operator.type) }} {{~}} {{? optgroup !== null }} {{?}} ',c.templates.ruleValueSelect='{{ var optgroup = null; }} {{? it.rule.filter.placeholder }} {{= it.rule.filter.placeholder }} {{?}} {{~ it.rule.filter.values: entry }} {{? optgroup !== entry.optgroup }} {{? optgroup !== null }}{{?}} {{? (optgroup = entry.optgroup) !== null }} {{?}} {{?}} {{= entry.label }} {{~}} {{? optgroup !== null }} {{?}} ',c.prototype.getGroupTemplate=function(e,t){var r=this.templates.group({builder:this,group_id:e,level:t,conditions:this.settings.conditions,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getGroupTemplate",r,t)},c.prototype.getRuleTemplate=function(e){var t=this.templates.rule({builder:this,rule_id:e,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleTemplate",t)},c.prototype.getRuleFilterSelect=function(e,t){var r=this.templates.filterSelect({builder:this,rule:e,filters:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleFilterSelect",r,e,t)},c.prototype.getRuleOperatorSelect=function(e,t){var r=this.templates.operatorSelect({builder:this,rule:e,operators:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleOperatorSelect",r,e,t)},c.prototype.getRuleValueSelect=function(e,t){var r=this.templates.ruleValueSelect({builder:this,name:e,rule:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleValueSelect",r,e,t)},c.prototype.getRuleInput=function(e,t){var r=e.filter,i=e.filter.validation||{},o=e.id+"_value_"+t,n=r.vertical?" class=block":"",l="",s=Array.isArray(r.placeholder)?r.placeholder[t]:r.placeholder;if("function"==typeof r.input)l=r.input.call(this,e,o);else switch(r.input){case"radio":case"checkbox":y.iterateOptions(r.values,function(e,t){l+=" '+t+" "});break;case"select":l=this.getRuleValueSelect(o,e);break;case"textarea":l+='";break;case"number":l+=' ";break;default:l+=' "}return this.change("getRuleInput",l,e,o)};var y={};function i(){this.root=null,this.$=$(this)}(c.utils=y).iterateOptions=function(e,r){e&&($.isArray(e)?e.forEach(function(e){$.isPlainObject(e)?"value"in e?r(e.value,e.label||e.value,e.optgroup):$.each(e,function(e,t){return r(e,t),!1}):r(e,e)}):$.each(e,function(e,t){r(e,t)}))},y.fmt=function(e,r){return Array.isArray(r)||(r=Array.prototype.slice.call(arguments,1)),e.replace(/{([0-9]+)}/g,function(e,t){return r[parseInt(t)]})},y.error=function(){var e=0,t="boolean"!=typeof arguments[e]||arguments[e++],r=arguments[e++],i=arguments[e++],o=Array.isArray(arguments[e])?arguments[e]:Array.prototype.slice.call(arguments,e);if(t){var n=new Error(y.fmt(i,o));throw n.name=r+"Error",n.args=o,n}console.error(r+"Error: "+y.fmt(i,o))},y.changeType=function(e,t){if(""!==e&&void 0!==e)switch(t){case"integer":return"string"!=typeof e||/^-?\d+$/.test(e)?parseInt(e):e;case"double":return"string"!=typeof e||/^-?\d+\.?\d*$/.test(e)?parseFloat(e):e;case"boolean":return"string"!=typeof e||/^(0|1|true|false){1}$/i.test(e)?!0===e||1===e||"true"===e.toLowerCase()||"1"===e:e;default:return e}},y.escapeString=function(e,t){if("string"!=typeof e)return e;var r=e.replace(/[\0\n\r\b\\\'\"]/g,function(e){switch(e){case"\0":return"\\0";case"\n":return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"'":return"''";default:return"\\"+e}}).replace(/\t/g,"\\t").replace(/\x1a/g,"\\Z");return t&&(r=r.replace(new RegExp("["+t+"]","g"),function(e){return"\\"+e})),r},y.escapeRegExp=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},y.escapeElementId=function(e){return e?e.replace(/(\\)?([:.\[\],])/g,function(e,t,r){return t?e:"\\"+r}):e},y.groupSort=function(e,r){var i=[],o=[];return e.forEach(function(e){var t;e[r]?-1==(t=i.lastIndexOf(e[r]))?t=i.length:t++:t=i.length,i.splice(t,0,e[r]),o.splice(t,0,e)}),o},y.defineModelProperties=function(e,t){t.forEach(function(r){Object.defineProperty(e.prototype,r,{enumerable:!0,get:function(){return this.__[r]},set:function(e){var t=null!==this.__[r]&&"object"==typeof this.__[r]?$.extend({},this.__[r]):this.__[r];this.__[r]=e,null!==this.model&&this.model.trigger("update",this,r,e,t)}})})},$.extend(i.prototype,{trigger:function(e){var t=new $.Event(e);return this.$.triggerHandler(t,Array.prototype.slice.call(arguments,1)),t},on:function(){return this.$.on.apply(this.$,Array.prototype.slice.call(arguments)),this},off:function(){return this.$.off.apply(this.$,Array.prototype.slice.call(arguments)),this},once:function(){return this.$.one.apply(this.$,Array.prototype.slice.call(arguments)),this}});var o=function(e,t){if(!(this instanceof o))return new o(e,t);Object.defineProperty(this,"__",{value:{}}),t.data("queryBuilderModel",this),this.__.level=1,this.__.error=null,this.__.flags={},this.__.data=void 0,this.$el=t,this.id=t[0].id,this.model=null,this.parent=e};y.defineModelProperties(o,["level","error","data","flags"]),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){return this.__.parent},set:function(e){this.__.parent=e,this.level=null===e?1:e.level+1,this.model=null===e?null:e.model}}),o.prototype.isRoot=function(){return 1===this.level},o.prototype.getPos=function(){return this.isRoot()?-1:this.parent.getNodePos(this)},o.prototype.drop=function(){var e=this.model;this.parent&&this.parent.removeNode(this),this.$el.removeData("queryBuilderModel"),null!==e&&e.trigger("drop",this)},o.prototype.moveAfter=function(e){this.isRoot()||this.move(e.parent,e.getPos()+1)},o.prototype.moveAtBegin=function(e){this.isRoot()||(void 0===e&&(e=this.parent),this.move(e,0))},o.prototype.moveAtEnd=function(e){this.isRoot()||(void 0===e&&(e=this.parent),this.move(e,0===e.length()?0:e.length()-1))},o.prototype.move=function(e,t){this.isRoot()||("number"==typeof e&&(t=e,e=this.parent),this.parent.removeNode(this),e.insertNode(this,t,!1),null!==this.model&&this.model.trigger("move",this,e,t))};var a=function(e,t){if(!(this instanceof a))return new a(e,t);o.call(this,e,t),this.rules=[],this.__.condition=null};a.prototype=Object.create(o.prototype),a.prototype.constructor=a,y.defineModelProperties(a,["condition"]),a.prototype.empty=function(){this.each("reverse",function(e){e.drop()},function(e){e.drop()})},a.prototype.drop=function(){this.empty(),o.prototype.drop.call(this)},a.prototype.length=function(){return this.rules.length},a.prototype.insertNode=function(e,t,r){return void 0===t&&(t=this.length()),this.rules.splice(t,0,e),e.parent=this,r&&null!==this.model&&this.model.trigger("add",this,e,t),e},a.prototype.addGroup=function(e,t){return this.insertNode(new a(this,e),t,!0)},a.prototype.addRule=function(e,t){return this.insertNode(new l(this,e),t,!0)},a.prototype.removeNode=function(e){var t=this.getNodePos(e);-1!==t&&(e.parent=null,this.rules.splice(t,1))},a.prototype.getNodePos=function(e){return this.rules.indexOf(e)},a.prototype.each=function(e,t,r,i){"boolean"!=typeof e&&"string"!=typeof e&&(i=r,r=t,t=e,e=!1),i=void 0===i?null:i;for(var o=e?this.rules.length-1:0,n=e?0:this.rules.length-1,l=e?-1:1,s=!1;(e?n<=o:o<=n)&&(this.rules[o]instanceof a?r&&(s=!1===r.call(i,this.rules[o])):t&&(s=!1===t.call(i,this.rules[o])),!s);o+=l);return!s},a.prototype.contains=function(t,e){return-1!==this.getNodePos(t)||!!e&&!this.each(function(){return!0},function(e){return!e.contains(t,!0)})};var l=function(e,t){if(!(this instanceof l))return new l(e,t);o.call(this,e,t),this._updating_value=!1,this._updating_input=!1,this.__.filter=null,this.__.operator=null,this.__.value=void 0};function u(e,t,r){var i,o,n=c.selectors;(i=t.closest(n.rule_container)).length&&(o="moveAfter"),o||(i=t.closest(n.group_header)).length&&(i=t.closest(n.group_container),o="moveAtBegin"),o||(i=t.closest(n.group_container)).length&&(o="moveAtEnd"),o&&(e[o](r.getModel(i)),r&&e instanceof l&&r.setRuleInputValue(e,e.value))}function n(e){var t=e.match(/(question_mark|numbered|named)(?:\((.)\))?/);return t||(t=[null,"question_mark",void 0]),t}return l.prototype=Object.create(o.prototype),l.prototype.constructor=l,y.defineModelProperties(l,["filter","operator","value"]),l.prototype.isRoot=function(){return!1},c.Group=a,c.Rule=l,$.fn.queryBuilder=function(e){0===this.length&&y.error("Config","No target defined"),1 '+t+" "})}})},{font:"glyphicons",color:"default"}),c.define("bt-selectpicker",function(r){$.fn.selectpicker&&$.fn.selectpicker.Constructor||y.error("MissingLibrary",'Bootstrap Select is required to use "bt-selectpicker" plugin. Get it here: http://silviomoreto.github.io/bootstrap-select');var i=c.selectors;this.on("afterCreateRuleFilters",function(e,t){t.$el.find(i.rule_filter).removeClass("form-control").selectpicker(r)}),this.on("afterCreateRuleOperators",function(e,t){t.$el.find(i.rule_operator).removeClass("form-control").selectpicker(r)}),this.on("afterUpdateRuleFilter",function(e,t){t.$el.find(i.rule_filter).selectpicker("render")}),this.on("afterUpdateRuleOperator",function(e,t){t.$el.find(i.rule_operator).selectpicker("render")}),this.on("beforeDeleteRule",function(e,t){t.$el.find(i.rule_filter).selectpicker("destroy"),t.$el.find(i.rule_operator).selectpicker("destroy")})},{container:"body",style:"btn-inverse btn-xs",width:"auto",showIcon:!1}),c.define("bt-tooltip-errors",function(i){$.fn.tooltip&&$.fn.tooltip.Constructor&&$.fn.tooltip.Constructor.prototype.fixTitle||y.error("MissingLibrary",'Bootstrap Tooltip is required to use "bt-tooltip-errors" plugin. Get it here: http://getbootstrap.com');var o=this;this.on("getRuleTemplate.filter getGroupTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(c.selectors.error_container).attr("data-toggle","tooltip"),e.value=t.prop("outerHTML")}),this.model.on("update",function(e,t,r){"error"==r&&o.settings.display_errors&&t.$el.find(c.selectors.error_container).eq(0).tooltip(i).tooltip("hide").tooltip("fixTitle")})},{placement:"right"}),c.extend({setFilters:function(e,t){var r=this;void 0===t&&(t=e,e=!1),t=this.checkFilters(t);var i=(t=this.change("setFilters",t)).map(function(e){return e.id});if(e||function e(t){t.each(function(e){e.filter&&-1===i.indexOf(e.filter.id)&&y.error("ChangeFilter",'A rule is using filter "{0}"',e.filter.id)},e)}(this.model.root),this.filters=t,function e(t){t.each(!0,function(e){e.filter&&-1===i.indexOf(e.filter.id)?(e.drop(),r.trigger("rulesChanged")):(r.createRuleFilters(e),e.$el.find(c.selectors.rule_filter).val(e.filter?e.filter.id:"-1"),r.trigger("afterUpdateRuleFilter",e))},e)}(this.model.root),this.settings.plugins&&(this.settings.plugins["unique-filter"]&&this.updateDisabledFilters(),this.settings.plugins["bt-selectpicker"]&&this.$el.find(c.selectors.rule_filter).selectpicker("render")),this.settings.default_filter)try{this.getFilterById(this.settings.default_filter)}catch(e){this.settings.default_filter=null}this.trigger("afterSetFilters",t)},addFilter:function(e,r){void 0===r||"#end"==r?r=this.filters.length:"#start"==r&&(r=0),$.isArray(e)||(e=[e]);var t=$.extend(!0,[],this.filters);parseInt(r)==r?Array.prototype.splice.apply(t,[r,0].concat(e)):this.filters.some(function(e,t){if(e.id==r)return r=t+1,!0})?Array.prototype.splice.apply(t,[r,0].concat(e)):Array.prototype.push.apply(t,e),this.setFilters(t)},removeFilter:function(t,e){var r=$.extend(!0,[],this.filters);"string"==typeof t&&(t=[t]),r=r.filter(function(e){return-1===t.indexOf(e.id)}),this.setFilters(e,r)}}),c.define("chosen-selectpicker",function(r){$.fn.chosen||y.error("MissingLibrary",'chosen is required to use "chosen-selectpicker" plugin. Get it here: https://github.com/harvesthq/chosen'),this.settings.plugins["bt-selectpicker"]&&y.error("Conflict","bt-selectpicker is already selected as the dropdown plugin. Please remove chosen-selectpicker from the plugin list");var i=c.selectors;this.on("afterCreateRuleFilters",function(e,t){t.$el.find(i.rule_filter).removeClass("form-control").chosen(r)}),this.on("afterCreateRuleOperators",function(e,t){1
'))).appendTo(t.$el):r.css("display",""),r.html(' '+i)):r.hide()}):"popover"===o.mode?($.fn.popover&&$.fn.popover.Constructor&&$.fn.popover.Constructor.prototype.fixTitle||y.error("MissingLibrary",'Bootstrap Popover is required to use "filter-description" plugin. Get it here: http://getbootstrap.com'),this.on("afterUpdateRuleFilter afterUpdateRuleOperator",function(e,t){var r=t.$el.find("button.filter-description"),i=e.builder.getFilterDescription(t.filter,t);i?(0===r.length?((r=$($.parseHTML(' '))).prependTo(t.$el.find(c.selectors.rule_actions)),r.popover({placement:"left",container:"body",html:!0}),r.on("mouseout",function(){r.popover("hide")})):r.css("display",""),r.data("bs.popover").options.content=i,r.attr("aria-describedby")&&r.popover("show")):(r.hide(),r.data("bs.popover")&&r.popover("hide"))})):"bootbox"===o.mode&&("bootbox"in window||y.error("MissingLibrary",'Bootbox is required to use "filter-description" plugin. Get it here: http://bootboxjs.com'),this.on("afterUpdateRuleFilter afterUpdateRuleOperator",function(e,t){var r=t.$el.find("button.filter-description"),i=e.builder.getFilterDescription(t.filter,t);i?(0===r.length?((r=$($.parseHTML(' '))).prependTo(t.$el.find(c.selectors.rule_actions)),r.on("click",function(){bootbox.alert(r.data("description"))})):r.css("display",""),r.data("description",i)):r.hide()}))},{icon:"glyphicon glyphicon-info-sign",mode:"popover"}),c.extend({getFilterDescription:function(e,t){return e?"function"==typeof e.description?e.description.call(this,t):e.description:void 0}}),c.define("invert",function(r){var i=this,o=c.selectors;this.on("afterInit",function(){i.$el.on("click.queryBuilder","[data-invert=group]",function(){var e=$(this).closest(o.group_container);i.invert(i.getModel(e),r)}),r.display_rules_button&&r.invert_rules&&i.$el.on("click.queryBuilder","[data-invert=rule]",function(){var e=$(this).closest(o.rule_container);i.invert(i.getModel(e),r)})}),r.disable_template||(this.on("getGroupTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(o.condition_container).after(' '+i.translate("invert")+" "),e.value=t.prop("outerHTML")}),r.display_rules_button&&r.invert_rules&&this.on("getRuleTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(o.rule_actions).prepend(' '+i.translate("invert")+" "),e.value=t.prop("outerHTML")}))},{icon:"glyphicon glyphicon-random",recursive:!0,invert_rules:!0,display_rules_button:!1,silent_fail:!1,disable_template:!1}),c.defaults({operatorOpposites:{equal:"not_equal",not_equal:"equal",in:"not_in",not_in:"in",less:"greater_or_equal",less_or_equal:"greater",greater:"less_or_equal",greater_or_equal:"less",between:"not_between",not_between:"between",begins_with:"not_begins_with",not_begins_with:"begins_with",contains:"not_contains",not_contains:"contains",ends_with:"not_ends_with",not_ends_with:"ends_with",is_empty:"is_not_empty",is_not_empty:"is_empty",is_null:"is_not_null",is_not_null:"is_null"},conditionOpposites:{AND:"OR",OR:"AND"}}),c.extend({invert:function(e,t){if(!(e instanceof o)){if(!this.model.root)return;t=e,e=this.model.root}if("object"!=typeof t&&(t={}),void 0===t.recursive&&(t.recursive=!0),void 0===t.invert_rules&&(t.invert_rules=!0),void 0===t.silent_fail&&(t.silent_fail=!1),void 0===t.trigger&&(t.trigger=!0),e instanceof a){if(this.settings.conditionOpposites[e.condition]?e.condition=this.settings.conditionOpposites[e.condition]:t.silent_fail||y.error("InvertCondition",'Unknown inverse of condition "{0}"',e.condition),t.recursive){var r=$.extend({},t,{trigger:!1});e.each(function(e){t.invert_rules&&this.invert(e,r)},function(e){this.invert(e,r)},this)}}else if(e instanceof l&&e.operator&&!e.filter.no_invert)if(this.settings.operatorOpposites[e.operator.type]){var i=this.settings.operatorOpposites[e.operator.type];e.filter.operators&&-1==e.filter.operators.indexOf(i)||(e.operator=this.getOperatorByType(i))}else t.silent_fail||y.error("InvertOperator",'Unknown inverse of operator "{0}"',e.operator.type);t.trigger&&(this.trigger("afterInvert",e,t),this.trigger("rulesChanged"))}}),c.defaults({mongoOperators:{equal:function(e){return e[0]},not_equal:function(e){return{$ne:e[0]}},in:function(e){return{$in:e}},not_in:function(e){return{$nin:e}},less:function(e){return{$lt:e[0]}},less_or_equal:function(e){return{$lte:e[0]}},greater:function(e){return{$gt:e[0]}},greater_or_equal:function(e){return{$gte:e[0]}},between:function(e){return{$gte:e[0],$lte:e[1]}},not_between:function(e){return{$lt:e[0],$gt:e[1]}},begins_with:function(e){return{$regex:"^"+y.escapeRegExp(e[0])}},not_begins_with:function(e){return{$regex:"^(?!"+y.escapeRegExp(e[0])+")"}},contains:function(e){return{$regex:y.escapeRegExp(e[0])}},not_contains:function(e){return{$regex:"^((?!"+y.escapeRegExp(e[0])+").)*$",$options:"s"}},ends_with:function(e){return{$regex:y.escapeRegExp(e[0])+"$"}},not_ends_with:function(e){return{$regex:"(? '+i.translate("NOT")+""),e.value=t.prop("outerHTML")}),this.on("groupToJson.filter",function(e,t){e.value.not=t.not}),this.on("jsonToGroup.filter",function(e,t){e.value.not=!!t.not}),this.on("groupToSQL.filter",function(e,t){t.not&&(e.value="NOT ( "+e.value+" )")}),this.on("parseSQLNode.filter",function(e){e.value.name&&"NOT"==e.value.name.toUpperCase()&&(e.value=e.value.arguments.value[0],-1===["AND","OR"].indexOf(e.value.operation.toUpperCase())&&(e.value=new SQLParser.nodes.Op(i.settings.default_condition,e.value,null)),e.value.not=!0)}),this.on("sqlGroupsDistinct.filter",function(e,t,r,i){r.not&&0"+c.selectors.group_not).toggleClass("active",e.not).find("i").attr("class",e.not?t.icon_checked:t.icon_unchecked),this.trigger("afterUpdateGroupNot",e),this.trigger("rulesChanged")}}),c.define("sortable",function(i){var o,n,l,s;"interact"in window||y.error("MissingLibrary",'interact.js is required to use "sortable" plugin. Get it here: http://interactjs.io'),void 0!==i.default_no_sortable&&(y.error(!1,"Config",'Sortable plugin : "default_no_sortable" options is deprecated, use standard "default_rule_flags" and "default_group_flags" instead'),this.settings.default_rule_flags.no_sortable=this.settings.default_group_flags.no_sortable=i.default_no_sortable),interact.dynamicDrop(!0),interact.pointerMoveTolerance(10),this.on("afterAddRule afterAddGroup",function(e,t){if(t!=o){var r=e.builder;i.inherit_no_sortable&&t.parent&&t.parent.flags.no_sortable&&(t.flags.no_sortable=!0),i.inherit_no_drop&&t.parent&&t.parent.flags.no_drop&&(t.flags.no_drop=!0),t.flags.no_sortable||interact(t.$el[0]).draggable({allowFrom:c.selectors.drag_handle,onstart:function(e){s=!1,l=r.getModel(e.target),n=l.$el.clone().appendTo(l.$el.parent()).width(l.$el.outerWidth()).addClass("dragging");var t=$($.parseHTML('
')).height(l.$el.outerHeight());o=l.parent.addRule(t,l.getPos()),l.$el.hide()},onmove:function(e){n[0].style.top=e.clientY-15+"px",n[0].style.left=e.clientX-15+"px"},onend:function(e){e.dropzone&&(u(l,$(e.relatedTarget),r),s=!0),n.remove(),n=void 0,o.drop(),o=void 0,l.$el.css("display",""),r.trigger("afterMove",l),r.trigger("rulesChanged")}}),t.flags.no_drop||(interact(t.$el[0]).dropzone({accept:c.selectors.rule_and_group_containers,ondragenter:function(e){u(o,$(e.target),r)},ondrop:function(e){s||u(l,$(e.target),r)}}),t instanceof a&&interact(t.$el.find(c.selectors.group_header)[0]).dropzone({accept:c.selectors.rule_and_group_containers,ondragenter:function(e){u(o,$(e.target),r)},ondrop:function(e){s||u(l,$(e.target),r)}}))}}),this.on("beforeDeleteRule beforeDeleteGroup",function(e,t){e.isDefaultPrevented()||(interact(t.$el[0]).unset(),t instanceof a&&interact(t.$el.find(c.selectors.group_header)[0]).unset())}),this.on("afterApplyRuleFlags afterApplyGroupFlags",function(e,t){t.flags.no_sortable&&t.$el.find(".drag-handle").remove()}),i.disable_template||(this.on("getGroupTemplate.filter",function(e,t){if(1 '),e.value=r.prop("outerHTML")}}),this.on("getRuleTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(c.selectors.rule_header).after('
'),e.value=t.prop("outerHTML")}))},{inherit_no_sortable:!0,inherit_no_drop:!0,icon:"glyphicon glyphicon-sort",disable_template:!1}),c.selectors.rule_and_group_containers=c.selectors.rule_container+", "+c.selectors.group_container,c.selectors.drag_handle=".drag-handle",c.defaults({default_rule_flags:{no_sortable:!1,no_drop:!1},default_group_flags:{no_sortable:!1,no_drop:!1}}),c.define("sql-support",function(e){},{boolean_as_integer:!0}),c.defaults({sqlOperators:{equal:{op:"= ?"},not_equal:{op:"!= ?"},in:{op:"IN(?)",sep:", "},not_in:{op:"NOT IN(?)",sep:", "},less:{op:"< ?"},less_or_equal:{op:"<= ?"},greater:{op:"> ?"},greater_or_equal:{op:">= ?"},between:{op:"BETWEEN ?",sep:" AND "},not_between:{op:"NOT BETWEEN ?",sep:" AND "},begins_with:{op:"LIKE ?",mod:"{0}%",escape:"%_"},not_begins_with:{op:"NOT LIKE ?",mod:"{0}%",escape:"%_"},contains:{op:"LIKE ?",mod:"%{0}%",escape:"%_"},not_contains:{op:"NOT LIKE ?",mod:"%{0}%",escape:"%_"},ends_with:{op:"LIKE ?",mod:"%{0}",escape:"%_"},not_ends_with:{op:"NOT LIKE ?",mod:"%{0}",escape:"%_"},is_empty:{op:"= ''"},is_not_empty:{op:"!= ''"},is_null:{op:"IS NULL"},is_not_null:{op:"IS NOT NULL"}},sqlRuleOperator:{"=":function(e){return{val:e,op:""===e?"is_empty":"equal"}},"!=":function(e){return{val:e,op:""===e?"is_not_empty":"not_equal"}},LIKE:function(e){return"%"==e.slice(0,1)&&"%"==e.slice(-1)?{val:e.slice(1,-1),op:"contains"}:"%"==e.slice(0,1)?{val:e.slice(1),op:"ends_with"}:"%"==e.slice(-1)?{val:e.slice(0,-1),op:"begins_with"}:void y.error("SQLParse",'Invalid value for LIKE operator "{0}"',e)},"NOT LIKE":function(e){return"%"==e.slice(0,1)&&"%"==e.slice(-1)?{val:e.slice(1,-1),op:"not_contains"}:"%"==e.slice(0,1)?{val:e.slice(1),op:"not_ends_with"}:"%"==e.slice(-1)?{val:e.slice(0,-1),op:"not_begins_with"}:void y.error("SQLParse",'Invalid value for NOT LIKE operator "{0}"',e)},IN:function(e){return{val:e,op:"in"}},"NOT IN":function(e){return{val:e,op:"not_in"}},"<":function(e){return{val:e,op:"less"}},"<=":function(e){return{val:e,op:"less_or_equal"}},">":function(e){return{val:e,op:"greater"}},">=":function(e){return{val:e,op:"greater_or_equal"}},BETWEEN:function(e){return{val:e,op:"between"}},"NOT BETWEEN":function(e){return{val:e,op:"not_between"}},IS:function(e){return null!==e&&y.error("SQLParse","Invalid value for IS operator"),{val:null,op:"is_null"}},"IS NOT":function(e){return null!==e&&y.error("SQLParse","Invalid value for IS operator"),{val:null,op:"is_not_null"}}},sqlStatements:{question_mark:function(){var r=[];return{add:function(e,t){return r.push(t),"?"},run:function(){return r}}},numbered:function(r){(!r||1"==l&&(l="!=");var s=_.settings.sqlRuleOperator[l];void 0===s&&y.error("UndefinedSQLOperator",'Invalid SQL operation "{0}".',t.operation);var a,u=s.call(this,n,t.operation);"values"in t.left?a=t.left.values.join("."):"value"in t.left?a=t.left.value:y.error("SQLParse","Cannot find field name in {0}",JSON.stringify(t.left));var p=u.val,d=_.settings.sqlOperators[u.op];if(!h&&d&&d.escape){var c=d.escape.split("").map(function(e){return"\\\\"+e}).join("|");p=p.replace(new RegExp("("+c+")","g"),function(e){return e[1]})}var f=_.getSQLFieldID(a,n),g=_.change("sqlToRule",{id:f,field:a,operator:u.op,value:p},t);v.rules.push(g)}}(i,0),o},setRulesFromSQL:function(e,t){this.setRules(this.getRulesFromSQL(e,t))},getSQLFieldID:function(t,e){var r=this.filters.filter(function(e){return e.field.toLowerCase()===t.toLowerCase()});return 1===r.length?r[0].id:this.change("getSQLFieldID",t,e)}}),c.define("unique-filter",function(){this.status.used_filters={},this.on("afterUpdateRuleFilter",this.updateDisabledFilters),this.on("afterDeleteRule",this.updateDisabledFilters),this.on("afterCreateRuleFilters",this.applyDisabledFilters),this.on("afterReset",this.clearDisabledFilters),this.on("afterClear",this.clearDisabledFilters),this.on("getDefaultFilter.filter",function(t,r){var i=t.builder;(i.updateDisabledFilters(),t.value.id in i.status.used_filters)&&(i.filters.some(function(e){if(!(e.id in i.status.used_filters)||0",">=","BETWEEN","NOT BETWEEN","IS","IS NOT","sqlStatements","question_mark","params","run","numbered","char","named","indexes","sqlRuleStatement","esc","sql","regex1","regex2","getSQL","nl","sqlFn","getRulesFromSQL","parsed","where","curr","flatten","next","right","sqlrl","JSON","stringify","finalValue","searchChars","getSQLFieldID","setRulesFromSQL","used_filters","applyDisabledFilters","clearDisabledFilters","unique","filterId","groups","__locale","__author","no_filter","empty_group","radio_empty","checkbox_empty","select_empty","string_empty","string_exceed_min_length","string_exceed_max_length","string_invalid_format","number_nan","number_not_integer","number_not_double","number_exceed_min","number_exceed_max","number_wrong_step","number_between_invalid","datetime_empty","datetime_invalid","datetime_exceed_min","datetime_exceed_max","datetime_between_invalid","boolean_not_valid","operator_not_multiple","NOT"],"mappings":";;;;;;CAKC,SAASA,EAAMC,GACS,mBAAVC,QAAwBA,OAAOC,IACtCD,OAAO,CAAC,SAAU,UAAW,oBAAqBD,GAE3B,iBAAXG,QAAuBA,OAAOC,QAC1CD,OAAOC,QAAUJ,EAAQK,QAAQ,UAAWA,QAAQ,WAAYA,QAAQ,qBAGxEL,EAAQD,EAAKO,OAAQP,EAAKQ,KARlC,CAUEC,KAAM,SAASC,EAAGF,GACpB,aAmBA,IAAIG,EAAe,SAASC,EAAKC,IAC7BD,EAAI,GAAGE,aAAeL,MAOjBG,IAAMA,EAOXH,KAAKM,SAAWL,EAAEM,WAAU,EAAM,UAAW,GAAIL,EAAaM,SAAUJ,GAOxEJ,KAAKS,MAAQ,IAAIC,EAcjBV,KAAKW,OAAS,CACVC,GAAI,KACJC,cAAc,EACdC,SAAU,EACVC,QAAS,EACTC,cAAc,EACdC,uBAAuB,GAQ3BjB,KAAKkB,QAAUlB,KAAKM,SAASY,QAO7BlB,KAAKmB,MAAQnB,KAAKM,SAASa,MAO3BnB,KAAKoB,UAAYpB,KAAKM,SAASc,UAO/BpB,KAAKqB,UAAYrB,KAAKM,SAASe,UAO/BrB,KAAKsB,QAAUtB,KAAKM,SAASgB,QAO7BtB,KAAKuB,KAAO,UAGwBC,IAAhCtB,EAAauB,SAAa,IAC1BC,EAAMC,MAAM,SAAU,4BAE1B3B,KAAKuB,KAAOtB,EAAEM,WAAU,EAAM,UAAW,GAAIL,EAAauB,SAAa,GAAGvB,EAAauB,SAASzB,KAAKM,SAASsB,WAAY5B,K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,SAAa,GAAI,CAC5ByjB,SAAY,eACZC,SAAY,qDACZnf,SAAY,WACZE,UAAa,YACbD,YAAe,SACfE,aAAgB,SAChB4B,WAAc,CACZ4U,IAAO,MACPC,GAAM,MAERxb,UAAa,CACXiF,MAAS,QACTI,UAAa,YACbC,GAAM,KACNC,OAAU,SACVC,KAAQ,OACRC,cAAiB,gBACjBC,QAAW,UACXC,iBAAoB,mBACpBC,QAAW,UACXC,YAAe,cACfC,YAAe,cACfC,gBAAmB,qBACnBC,SAAY,WACZC,aAAgB,kBAChBC,UAAa,YACbC,cAAiB,mBACjBC,SAAY,WACZC,aAAgB,eAChBC,QAAW,UACXC,YAAe,eAEjB2K,OAAU,CACR8S,UAAa,qBACbC,YAAe,qBACfC,YAAe,oBACfC,eAAkB,oBAClBC,aAAgB,oBAChBC,aAAgB,cAChBC,yBAA4B,uCAC5BC,yBAA4B,4CAC5BC,sBAAyB,uBACzBC,WAAc,eACdC,mBAAsB,iBACtBC,kBAAqB,oBACrBC,kBAAqB,2BACrBC,kBAAqB,yBACrBC,kBAAqB,4BACrBC,uBAA0B,0CAC1BC,eAAkB,cAClBC,iBAAoB,4BACpBC,oBAAuB,oBACvBC,oBAAuB,qBACvBC,yBAA4B,0CAC5BC,kBAAqB,gBACrBC,sBAAyB,gDAE3BxK,OAAU,SACVyK,IAAO,OAGTzmB,EAAaoJ,SAAS,CAAE1H,UAAW,OAC5B1B","file":"query-builder.min.js"}
\ No newline at end of file
diff --git a/dist/js/query-builder.standalone.js b/dist/js/query-builder.standalone.js
index 557a431c..f5de0b97 100644
--- a/dist/js/query-builder.standalone.js
+++ b/dist/js/query-builder.standalone.js
@@ -132,168 +132,23 @@
}));
-// doT.js
-// 2011-2014, Laura Doktorova, https://github.com/olado/doT
-// Licensed under the MIT license.
-
-(function () {
- "use strict";
-
- var doT = {
- name: "doT",
- version: "1.1.1",
- templateSettings: {
- evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g,
- interpolate: /\{\{=([\s\S]+?)\}\}/g,
- encode: /\{\{!([\s\S]+?)\}\}/g,
- use: /\{\{#([\s\S]+?)\}\}/g,
- useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,
- define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,
- defineParams:/^\s*([\w$]+):([\s\S]+)/,
- conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,
- iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,
- varname: "it",
- strip: true,
- append: true,
- selfcontained: false,
- doNotSkipEncoded: false
- },
- template: undefined, //fn, compile template
- compile: undefined, //fn, for express
- log: true
- }, _globals;
-
- doT.encodeHTMLSource = function(doNotSkipEncoded) {
- var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" },
- matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
- return function(code) {
- return code ? code.toString().replace(matchHTML, function(m) {return encodeHTMLRules[m] || m;}) : "";
- };
- };
-
- _globals = (function(){ return this || (0,eval)("this"); }());
-
- /* istanbul ignore else */
- if (typeof module !== "undefined" && module.exports) {
- module.exports = doT;
- } else if (typeof define === "function" && define.amd) {
- define('doT', function(){return doT;});
- } else {
- _globals.doT = doT;
- }
-
- var startend = {
- append: { start: "'+(", end: ")+'", startencode: "'+encodeHTML(" },
- split: { start: "';out+=(", end: ");out+='", startencode: "';out+=encodeHTML(" }
- }, skip = /$^/;
-
- function resolveDefs(c, block, def) {
- return ((typeof block === "string") ? block : block.toString())
- .replace(c.define || skip, function(m, code, assign, value) {
- if (code.indexOf("def.") === 0) {
- code = code.substring(4);
- }
- if (!(code in def)) {
- if (assign === ":") {
- if (c.defineParams) value.replace(c.defineParams, function(m, param, v) {
- def[code] = {arg: param, text: v};
- });
- if (!(code in def)) def[code]= value;
- } else {
- new Function("def", "def['"+code+"']=" + value)(def);
- }
- }
- return "";
- })
- .replace(c.use || skip, function(m, code) {
- if (c.useParams) code = code.replace(c.useParams, function(m, s, d, param) {
- if (def[d] && def[d].arg && param) {
- var rw = (d+":"+param).replace(/'|\\/g, "_");
- def.__exp = def.__exp || {};
- def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2");
- return s + "def.__exp['"+rw+"']";
- }
- });
- var v = new Function("def", "return " + code)(def);
- return v ? resolveDefs(c, v, def) : v;
- });
- }
-
- function unescape(code) {
- return code.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, " ");
- }
-
- doT.template = function(tmpl, c, def) {
- c = c || doT.templateSettings;
- var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv,
- str = (c.use || c.define) ? resolveDefs(c, tmpl, def || {}) : tmpl;
-
- str = ("var out='" + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ")
- .replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""): str)
- .replace(/'|\\/g, "\\$&")
- .replace(c.interpolate || skip, function(m, code) {
- return cse.start + unescape(code) + cse.end;
- })
- .replace(c.encode || skip, function(m, code) {
- needhtmlencode = true;
- return cse.startencode + unescape(code) + cse.end;
- })
- .replace(c.conditional || skip, function(m, elsecase, code) {
- return elsecase ?
- (code ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='") :
- (code ? "';if(" + unescape(code) + "){out+='" : "';}out+='");
- })
- .replace(c.iterate || skip, function(m, iterate, vname, iname) {
- if (!iterate) return "';} } out+='";
- sid+=1; indv=iname || "i"+sid; iterate=unescape(iterate);
- return "';var arr"+sid+"="+iterate+";if(arr"+sid+"){var "+vname+","+indv+"=-1,l"+sid+"=arr"+sid+".length-1;while("+indv+" \
- \
- \
-';
+QueryBuilder.templates.group = ({ group_id, level, conditions, icons, settings, translate, builder }) => {
+ return `
+`;
+};
-QueryBuilder.templates.rule = '\
- \
- \
- {{? it.settings.display_errors }} \
-
\
- {{?}} \
-
\
-
\
-
\
-
';
+QueryBuilder.templates.rule = ({ rule_id, icons, settings, translate, builder }) => {
+ return `
+
+
+ ${settings.display_errors ? `
+
+ ` : ''}
+
+
+
+
`;
+};
+
+QueryBuilder.templates.filterSelect = ({ rule, filters, icons, settings, translate, builder }) => {
+ let optgroup = null;
+ return `
+
+ ${settings.display_empty_filter ? `
+ ${settings.select_placeholder}
+ ` : ''}
+ ${filters.map(filter => `
+ ${optgroup !== filter.optgroup ? `
+ ${optgroup !== null ? `` : ''}
+ ${(optgroup = filter.optgroup) !== null ? `
+
+ ` : ''}
+ ` : ''}
+ ${translate(filter.label)}
+ `).join('')}
+ ${optgroup !== null ? ' ' : ''}
+ `;
+};
-QueryBuilder.templates.filterSelect = '\
-{{ var optgroup = null; }} \
- \
- {{? it.settings.display_empty_filter }} \
- {{= it.settings.select_placeholder }} \
- {{?}} \
- {{~ it.filters: filter }} \
- {{? optgroup !== filter.optgroup }} \
- {{? optgroup !== null }}{{?}} \
- {{? (optgroup = filter.optgroup) !== null }} \
- \
- {{?}} \
- {{?}} \
- {{= it.translate(filter.label) }} \
- {{~}} \
- {{? optgroup !== null }} {{?}} \
- ';
-
-QueryBuilder.templates.operatorSelect = '\
-{{? it.operators.length === 1 }} \
- \
-{{= it.translate("operators", it.operators[0].type) }} \
- \
-{{?}} \
-{{ var optgroup = null; }} \
- \
- {{~ it.operators: operator }} \
- {{? optgroup !== operator.optgroup }} \
- {{? optgroup !== null }}{{?}} \
- {{? (optgroup = operator.optgroup) !== null }} \
- \
- {{?}} \
- {{?}} \
- {{= it.translate("operators", operator.type) }} \
- {{~}} \
- {{? optgroup !== null }} {{?}} \
- ';
-
-QueryBuilder.templates.ruleValueSelect = '\
-{{ var optgroup = null; }} \
- \
- {{? it.rule.filter.placeholder }} \
- {{= it.rule.filter.placeholder }} \
- {{?}} \
- {{~ it.rule.filter.values: entry }} \
- {{? optgroup !== entry.optgroup }} \
- {{? optgroup !== null }}{{?}} \
- {{? (optgroup = entry.optgroup) !== null }} \
- \
- {{?}} \
- {{?}} \
- {{= entry.label }} \
- {{~}} \
- {{? optgroup !== null }} {{?}} \
- ';
+QueryBuilder.templates.operatorSelect = ({ rule, operators, icons, settings, translate, builder }) => {
+ let optgroup = null;
+ return `
+${operators.length === 1 ? `
+
+${translate("operators", operators[0].type)}
+
+` : ''}
+
+ ${operators.map(operator => `
+ ${optgroup !== operator.optgroup ? `
+ ${optgroup !== null ? `` : ''}
+ ${(optgroup = operator.optgroup) !== null ? `
+
+ ` : ''}
+ ` : ''}
+ ${translate("operators", operator.type)}
+ `).join('')}
+ ${optgroup !== null ? ' ' : ''}
+ `;
+};
+
+QueryBuilder.templates.ruleValueSelect = ({ name, rule, icons, settings, translate, builder }) => {
+ let optgroup = null;
+ return `
+
+ ${rule.filter.placeholder ? `
+ ${rule.filter.placeholder}
+ ` : ''}
+ ${rule.filter.values.map(entry => `
+ ${optgroup !== entry.optgroup ? `
+ ${optgroup !== null ? `` : ''}
+ ${(optgroup = entry.optgroup) !== null ? `
+
+ ` : ''}
+ ` : ''}
+ ${entry.label}
+ `).join('')}
+ ${optgroup !== null ? ' ' : ''}
+ `;
+};
/**
* Returns group's HTML
@@ -3074,26 +2933,26 @@ QueryBuilder.templates.ruleValueSelect = '\
* @fires QueryBuilder.changer:getGroupTemplate
* @private
*/
-QueryBuilder.prototype.getGroupTemplate = function(group_id, level) {
- var h = this.templates.group({
- builder: this,
- group_id: group_id,
- level: level,
- conditions: this.settings.conditions,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of a group
- * @event changer:getGroupTemplate
- * @memberof QueryBuilder
- * @param {string} html
- * @param {int} level
- * @returns {string}
- */
- return this.change('getGroupTemplate', h, level);
+QueryBuilder.prototype.getGroupTemplate = function (group_id, level) {
+ var h = this.templates.group({
+ builder: this,
+ group_id: group_id,
+ level: level,
+ conditions: this.settings.conditions,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of a group
+ * @event changer:getGroupTemplate
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {int} level
+ * @returns {string}
+ */
+ return this.change('getGroupTemplate', h, level);
};
/**
@@ -3103,23 +2962,23 @@ QueryBuilder.prototype.getGroupTemplate = function(group_id, level) {
* @fires QueryBuilder.changer:getRuleTemplate
* @private
*/
-QueryBuilder.prototype.getRuleTemplate = function(rule_id) {
- var h = this.templates.rule({
- builder: this,
- rule_id: rule_id,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of a rule
- * @event changer:getRuleTemplate
- * @memberof QueryBuilder
- * @param {string} html
- * @returns {string}
- */
- return this.change('getRuleTemplate', h);
+QueryBuilder.prototype.getRuleTemplate = function (rule_id) {
+ var h = this.templates.rule({
+ builder: this,
+ rule_id: rule_id,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of a rule
+ * @event changer:getRuleTemplate
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @returns {string}
+ */
+ return this.change('getRuleTemplate', h);
};
/**
@@ -3130,26 +2989,26 @@ QueryBuilder.prototype.getRuleTemplate = function(rule_id) {
* @fires QueryBuilder.changer:getRuleFilterTemplate
* @private
*/
-QueryBuilder.prototype.getRuleFilterSelect = function(rule, filters) {
- var h = this.templates.filterSelect({
- builder: this,
- rule: rule,
- filters: filters,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of the rule's filter dropdown
- * @event changer:getRuleFilterSelect
- * @memberof QueryBuilder
- * @param {string} html
- * @param {Rule} rule
- * @param {QueryBuilder.Filter[]} filters
- * @returns {string}
- */
- return this.change('getRuleFilterSelect', h, rule, filters);
+QueryBuilder.prototype.getRuleFilterSelect = function (rule, filters) {
+ var h = this.templates.filterSelect({
+ builder: this,
+ rule: rule,
+ filters: filters,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of the rule's filter dropdown
+ * @event changer:getRuleFilterSelect
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {Rule} rule
+ * @param {QueryBuilder.Filter[]} filters
+ * @returns {string}
+ */
+ return this.change('getRuleFilterSelect', h, rule, filters);
};
/**
@@ -3160,26 +3019,26 @@ QueryBuilder.prototype.getRuleFilterSelect = function(rule, filters) {
* @fires QueryBuilder.changer:getRuleOperatorTemplate
* @private
*/
-QueryBuilder.prototype.getRuleOperatorSelect = function(rule, operators) {
- var h = this.templates.operatorSelect({
- builder: this,
- rule: rule,
- operators: operators,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of the rule's operator dropdown
- * @event changer:getRuleOperatorSelect
- * @memberof QueryBuilder
- * @param {string} html
- * @param {Rule} rule
- * @param {QueryBuilder.Operator[]} operators
- * @returns {string}
- */
- return this.change('getRuleOperatorSelect', h, rule, operators);
+QueryBuilder.prototype.getRuleOperatorSelect = function (rule, operators) {
+ var h = this.templates.operatorSelect({
+ builder: this,
+ rule: rule,
+ operators: operators,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of the rule's operator dropdown
+ * @event changer:getRuleOperatorSelect
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {Rule} rule
+ * @param {QueryBuilder.Operator[]} operators
+ * @returns {string}
+ */
+ return this.change('getRuleOperatorSelect', h, rule, operators);
};
/**
@@ -3190,26 +3049,26 @@ QueryBuilder.prototype.getRuleOperatorSelect = function(rule, operators) {
* @fires QueryBuilder.changer:getRuleValueSelect
* @private
*/
-QueryBuilder.prototype.getRuleValueSelect = function(name, rule) {
- var h = this.templates.ruleValueSelect({
- builder: this,
- name: name,
- rule: rule,
- icons: this.icons,
- settings: this.settings,
- translate: this.translate.bind(this)
- });
-
- /**
- * Modifies the raw HTML of the rule's value dropdown (in case of a "select filter)
- * @event changer:getRuleValueSelect
- * @memberof QueryBuilder
- * @param {string} html
- * @param [string} name
- * @param {Rule} rule
- * @returns {string}
- */
- return this.change('getRuleValueSelect', h, name, rule);
+QueryBuilder.prototype.getRuleValueSelect = function (name, rule) {
+ var h = this.templates.ruleValueSelect({
+ builder: this,
+ name: name,
+ rule: rule,
+ icons: this.icons,
+ settings: this.settings,
+ translate: this.translate.bind(this)
+ }).trim();
+
+ /**
+ * Modifies the raw HTML of the rule's value dropdown (in case of a "select filter)
+ * @event changer:getRuleValueSelect
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param [string} name
+ * @param {Rule} rule
+ * @returns {string}
+ */
+ return this.change('getRuleValueSelect', h, name, rule);
};
/**
@@ -3220,70 +3079,70 @@ QueryBuilder.prototype.getRuleValueSelect = function(name, rule) {
* @fires QueryBuilder.changer:getRuleInput
* @private
*/
-QueryBuilder.prototype.getRuleInput = function(rule, value_id) {
- var filter = rule.filter;
- var validation = rule.filter.validation || {};
- var name = rule.id + '_value_' + value_id;
- var c = filter.vertical ? ' class=block' : '';
- var h = '';
- var placeholder = Array.isArray(filter.placeholder) ? filter.placeholder[value_id] : filter.placeholder;
-
- if (typeof filter.input == 'function') {
- h = filter.input.call(this, rule, name);
- }
- else {
- switch (filter.input) {
- case 'radio':
- case 'checkbox':
- Utils.iterateOptions(filter.values, function(key, val) {
- h += ' ' + val + ' ';
- });
- break;
-
- case 'select':
- h = this.getRuleValueSelect(name, rule);
- break;
-
- case 'textarea':
- h += '';
- break;
-
- case 'number':
- h += ' ';
- break;
-
- default:
- h += ' ';
- }
- }
-
- /**
- * Modifies the raw HTML of the rule's input
- * @event changer:getRuleInput
- * @memberof QueryBuilder
- * @param {string} html
- * @param {Rule} rule
- * @param {string} name - the name that the input must have
- * @returns {string}
- */
- return this.change('getRuleInput', h, rule, name);
+QueryBuilder.prototype.getRuleInput = function (rule, value_id) {
+ var filter = rule.filter;
+ var validation = rule.filter.validation || {};
+ var name = rule.id + '_value_' + value_id;
+ var c = filter.vertical ? ' class=block' : '';
+ var h = '';
+ var placeholder = Array.isArray(filter.placeholder) ? filter.placeholder[value_id] : filter.placeholder;
+
+ if (typeof filter.input == 'function') {
+ h = filter.input.call(this, rule, name);
+ }
+ else {
+ switch (filter.input) {
+ case 'radio':
+ case 'checkbox':
+ Utils.iterateOptions(filter.values, function (key, val) {
+ h += ' ' + val + ' ';
+ });
+ break;
+
+ case 'select':
+ h = this.getRuleValueSelect(name, rule);
+ break;
+
+ case 'textarea':
+ h += '';
+ break;
+
+ case 'number':
+ h += ' ';
+ break;
+
+ default:
+ h += ' ';
+ }
+ }
+
+ /**
+ * Modifies the raw HTML of the rule's input
+ * @event changer:getRuleInput
+ * @memberof QueryBuilder
+ * @param {string} html
+ * @param {Rule} rule
+ * @param {string} name - the name that the input must have
+ * @returns {string}
+ */
+ return this.change('getRuleInput', h, rule, name);
};
@@ -6430,7 +6289,7 @@ QueryBuilder.extend(/** @lends module:plugins.UniqueFilter.prototype */ {
/*!
- * jQuery QueryBuilder 2.6.2
+ * jQuery QueryBuilder 2.7.0
* Locale: English (en)
* Author: Damien "Mistic" Sorel, http://www.strangeplanet.fr
* Licensed under MIT (https://opensource.org/licenses/MIT)
diff --git a/dist/js/query-builder.standalone.min.js b/dist/js/query-builder.standalone.min.js
deleted file mode 100644
index 2b9038c2..00000000
--- a/dist/js/query-builder.standalone.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
- * Licensed under MIT (https://opensource.org/licenses/MIT)
- */
-
-!function(e,t){"function"==typeof define&&define.amd?define("jquery-extendext",["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function($){"use strict";$.extendext=function(){var e,t,r,n,i,o,l=arguments[0]||{},s=1,a=arguments.length,u=!1,p="default";for("boolean"==typeof l&&(u=l,l=arguments[s++]||{}),"string"==typeof l&&("concat"!==(p=l.toLowerCase())&&"replace"!==p&&"extend"!==p&&(p="default"),l=arguments[s++]||{}),"object"==typeof l||$.isFunction(l)||(l={}),s===a&&(l=this,s--);s":">",'"':""","'":"'","/":"/"},r=e?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(e){return e?e.toString().replace(r,function(e){return t[e]||e}):""}},a=function(){return this||(0,eval)("this")}(),"undefined"!=typeof module&&module.exports?module.exports=u:"function"==typeof define&&define.amd?define("doT",function(){return u}):a.doT=u;var p={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},d=/$^/;function c(e){return e.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}u.template=function(e,t,r){var n,i,o=(t=t||u.templateSettings).append?p.append:p.split,l=0,s=t.use||t.define?function n(i,e,o){return("string"==typeof e?e:e.toString()).replace(i.define||d,function(e,n,t,r){return 0===n.indexOf("def.")&&(n=n.substring(4)),n in o||(":"===t?(i.defineParams&&r.replace(i.defineParams,function(e,t,r){o[n]={arg:t,text:r}}),n in o||(o[n]=r)):new Function("def","def['"+n+"']="+r)(o)),""}).replace(i.use||d,function(e,t){i.useParams&&(t=t.replace(i.useParams,function(e,t,r,n){if(o[r]&&o[r].arg&&n){var i=(r+":"+n).replace(/'|\\/g,"_");return o.__exp=o.__exp||{},o.__exp[i]=o[r].text.replace(new RegExp("(^|[^\\w$])"+o[r].arg+"([^\\w$])","g"),"$1"+n+"$2"),t+"def.__exp['"+i+"']"}}));var r=new Function("def","return "+t)(o);return r?n(i,r,o):r})}(t,e,r||{}):e;s=("var out='"+(t.strip?s.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):s).replace(/'|\\/g,"\\$&").replace(t.interpolate||d,function(e,t){return o.start+c(t)+o.end}).replace(t.encode||d,function(e,t){return n=!0,o.startencode+c(t)+o.end}).replace(t.conditional||d,function(e,t,r){return t?r?"';}else if("+c(r)+"){out+='":"';}else{out+='":r?"';if("+c(r)+"){out+='":"';}out+='"}).replace(t.iterate||d,function(e,t,r,n){return t?(l+=1,i=n||"i"+l,t=c(t),"';var arr"+l+"="+t+";if(arr"+l+"){var "+r+","+i+"=-1,l"+l+"=arr"+l+".length-1;while("+i+".rules-list",group_condition:".rules-group-header [name$=_cond]",rule_filter:".rule-filter-container [name$=_filter]",rule_operator:".rule-operator-container [name$=_operator]",rule_value:".rule-value-container [name*=_value_]",add_rule:"[data-add=rule]",delete_rule:"[data-delete=rule]",add_group:"[data-add=group]",delete_group:"[data-delete=group]"},c.templates={},c.regional={},c.OPERATORS={equal:{type:"equal",nb_inputs:1,multiple:!1,apply_to:["string","number","datetime","boolean"]},not_equal:{type:"not_equal",nb_inputs:1,multiple:!1,apply_to:["string","number","datetime","boolean"]},in:{type:"in",nb_inputs:1,multiple:!0,apply_to:["string","number","datetime"]},not_in:{type:"not_in",nb_inputs:1,multiple:!0,apply_to:["string","number","datetime"]},less:{type:"less",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},less_or_equal:{type:"less_or_equal",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},greater:{type:"greater",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},greater_or_equal:{type:"greater_or_equal",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},between:{type:"between",nb_inputs:2,multiple:!1,apply_to:["number","datetime"]},not_between:{type:"not_between",nb_inputs:2,multiple:!1,apply_to:["number","datetime"]},begins_with:{type:"begins_with",nb_inputs:1,multiple:!1,apply_to:["string"]},not_begins_with:{type:"not_begins_with",nb_inputs:1,multiple:!1,apply_to:["string"]},contains:{type:"contains",nb_inputs:1,multiple:!1,apply_to:["string"]},not_contains:{type:"not_contains",nb_inputs:1,multiple:!1,apply_to:["string"]},ends_with:{type:"ends_with",nb_inputs:1,multiple:!1,apply_to:["string"]},not_ends_with:{type:"not_ends_with",nb_inputs:1,multiple:!1,apply_to:["string"]},is_empty:{type:"is_empty",nb_inputs:0,multiple:!1,apply_to:["string"]},is_not_empty:{type:"is_not_empty",nb_inputs:0,multiple:!1,apply_to:["string"]},is_null:{type:"is_null",nb_inputs:0,multiple:!1,apply_to:["string","number","datetime","boolean"]},is_not_null:{type:"is_not_null",nb_inputs:0,multiple:!1,apply_to:["string","number","datetime","boolean"]}},c.DEFAULTS={filters:[],plugins:[],sort_filters:!1,display_errors:!0,allow_groups:-1,allow_empty:!1,conditions:["AND","OR"],default_condition:"AND",inputs_separator:" , ",select_placeholder:"------",display_empty_filter:!0,default_filter:null,optgroups:{},default_rule_flags:{filter_readonly:!1,operator_readonly:!1,value_readonly:!1,no_delete:!1},default_group_flags:{condition_readonly:!1,no_add_rule:!1,no_add_group:!1,no_delete:!1},templates:{group:null,rule:null,filterSelect:null,operatorSelect:null,ruleValueSelect:null},lang_code:"en",lang:{},operators:["equal","not_equal","in","not_in","less","less_or_equal","greater","greater_or_equal","between","not_between","begins_with","not_begins_with","contains","not_contains","ends_with","not_ends_with","is_empty","is_not_empty","is_null","is_not_null"],icons:{add_group:"glyphicon glyphicon-plus-sign",add_rule:"glyphicon glyphicon-plus",remove_group:"glyphicon glyphicon-remove",remove_rule:"glyphicon glyphicon-remove",error:"glyphicon glyphicon-warning-sign"}},c.plugins={},c.defaults=function(e){if("object"!=typeof e)return"string"==typeof e?"object"==typeof c.DEFAULTS[e]?$.extend(!0,{},c.DEFAULTS[e]):c.DEFAULTS[e]:$.extend(!0,{},c.DEFAULTS);$.extendext(!0,"replace",c.DEFAULTS,e)},c.define=function(e,t,r){c.plugins[e]={fct:t,def:r||{}}},c.extend=function(e){$.extend(c.prototype,e)},c.prototype.initPlugins=function(){if(this.plugins){if($.isArray(this.plugins)){var t={};this.plugins.forEach(function(e){t[e]=null}),this.plugins=t}Object.keys(this.plugins).forEach(function(e){e in c.plugins?(this.plugins[e]=$.extend(!0,{},c.plugins[e].def,this.plugins[e]||{}),c.plugins[e].fct.call(this,this.plugins[e])):m.error("Config",'Unable to find plugin "{0}"',e)},this)}},c.prototype.getPluginOptions=function(e,t){var r;if(this.plugins&&this.plugins[e]?r=this.plugins[e]:c.plugins[e]&&(r=c.plugins[e].def),r)return t?r[t]:r;m.error("Config",'Unable to find plugin "{0}"',e)},c.prototype.init=function(e){this.trigger("afterInit"),e?(this.setRules(e),delete this.settings.rules):this.setRoot(!0)},c.prototype.checkFilters=function(e){var t=[];if(e&&0!==e.length||m.error("Config","Missing filters list"),e.forEach(function(n,e){switch(n.id||m.error("Config","Missing filter {0} id",e),-1!=t.indexOf(n.id)&&m.error("Config",'Filter "{0}" already defined',n.id),t.push(n.id),n.type?c.types[n.type]||m.error("Config",'Invalid type "{0}"',n.type):n.type="string",n.input?"function"!=typeof n.input&&-1==c.inputs.indexOf(n.input)&&m.error("Config",'Invalid input "{0}"',n.input):n.input="number"===c.types[n.type]?"number":"text",n.operators&&n.operators.forEach(function(e){"string"!=typeof e&&m.error("Config","Filter operators must be global operators types (string)")}),n.field||(n.field=n.id),n.label||(n.label=n.field),n.optgroup?(this.status.has_optgroup=!0,this.settings.optgroups[n.optgroup]||(this.settings.optgroups[n.optgroup]=n.optgroup)):n.optgroup=null,n.input){case"radio":case"checkbox":(!n.values||n.values.length<1)&&m.error("Config",'Missing filter "{0}" values',n.id);break;case"select":var i=[];n.has_optgroup=!1,m.iterateOptions(n.values,function(e,t,r){i.push({value:e,label:t,optgroup:r||null}),r&&(n.has_optgroup=!0,this.settings.optgroups[r]||(this.settings.optgroups[r]=r))}.bind(this)),n.has_optgroup?n.values=m.groupSort(i,"optgroup"):n.values=i,n.placeholder&&(void 0===n.placeholder_value&&(n.placeholder_value=-1),n.values.forEach(function(e){e.value==n.placeholder_value&&m.error("Config",'Placeholder of filter "{0}" overlaps with one of its values',n.id)}))}},this),this.settings.sort_filters)if("function"==typeof this.settings.sort_filters)e.sort(this.settings.sort_filters);else{var r=this;e.sort(function(e,t){return r.translate(e.label).localeCompare(r.translate(t.label))})}return this.status.has_optgroup&&(e=m.groupSort(e,"optgroup")),e},c.prototype.checkOperators=function(r){var n=[];return r.forEach(function(e,t){"string"==typeof e?(c.OPERATORS[e]||m.error("Config",'Unknown operator "{0}"',e),r[t]=e=$.extendext(!0,"replace",{},c.OPERATORS[e])):(e.type||m.error("Config",'Missing "type" for operator {0}',t),c.OPERATORS[e.type]&&(r[t]=e=$.extendext(!0,"replace",{},c.OPERATORS[e.type],e)),void 0!==e.nb_inputs&&void 0!==e.apply_to||m.error("Config",'Missing "nb_inputs" and/or "apply_to" for operator "{0}"',e.type)),-1!=n.indexOf(e.type)&&m.error("Config",'Operator "{0}" already defined',e.type),n.push(e.type),e.optgroup?(this.status.has_operator_optgroup=!0,this.settings.optgroups[e.optgroup]||(this.settings.optgroups[e.optgroup]=e.optgroup)):e.optgroup=null},this),this.status.has_operator_optgroup&&(r=m.groupSort(r,"optgroup")),r},c.prototype.bindEvents=function(){var o=this,t=c.selectors;this.$el.on("change.queryBuilder",t.group_condition,function(){if($(this).is(":checked")){var e=$(this).closest(t.group_container);o.getModel(e).condition=$(this).val()}}),this.$el.on("change.queryBuilder",t.rule_filter,function(){var e=$(this).closest(t.rule_container);o.getModel(e).filter=o.getFilterById($(this).val())}),this.$el.on("change.queryBuilder",t.rule_operator,function(){var e=$(this).closest(t.rule_container);o.getModel(e).operator=o.getOperatorByType($(this).val())}),this.$el.on("click.queryBuilder",t.add_rule,function(){var e=$(this).closest(t.group_container);o.addRule(o.getModel(e))}),this.$el.on("click.queryBuilder",t.delete_rule,function(){var e=$(this).closest(t.rule_container);o.deleteRule(o.getModel(e))}),0!==this.settings.allow_groups&&(this.$el.on("click.queryBuilder",t.add_group,function(){var e=$(this).closest(t.group_container);o.addGroup(o.getModel(e))}),this.$el.on("click.queryBuilder",t.delete_group,function(){var e=$(this).closest(t.group_container);o.deleteGroup(o.getModel(e))})),this.model.on({drop:function(e,t){t.$el.remove(),o.refreshGroupsConditions()},add:function(e,t,r,n){0===n?r.$el.prependTo(t.$el.find(">"+c.selectors.rules_list)):r.$el.insertAfter(t.rules[n-1].$el),o.refreshGroupsConditions()},move:function(e,t,r,n){t.$el.detach(),0===n?t.$el.prependTo(r.$el.find(">"+c.selectors.rules_list)):t.$el.insertAfter(r.rules[n-1].$el),o.refreshGroupsConditions()},update:function(e,t,r,n,i){if(t instanceof l)switch(r){case"error":o.updateError(t);break;case"flags":o.applyRuleFlags(t);break;case"filter":o.updateRuleFilter(t,i);break;case"operator":o.updateRuleOperator(t,i);break;case"value":o.updateRuleValue(t,i)}else switch(r){case"error":o.updateError(t);break;case"flags":o.applyGroupFlags(t);break;case"condition":o.updateGroupCondition(t,i)}}})},c.prototype.setRoot=function(e,t,r){e=void 0===e||!0===e;var n=this.nextGroupId(),i=$($.parseHTML(this.getGroupTemplate(n,1)));return this.$el.append(i),this.model.root=new a(null,i),this.model.root.model=this.model,this.model.root.data=t,this.model.root.flags=$.extend({},this.settings.default_group_flags,r),this.model.root.condition=this.settings.default_condition,this.trigger("afterAddGroup",this.model.root),e&&this.addRule(this.model.root),this.model.root},c.prototype.addGroup=function(e,t,r,n){t=void 0===t||!0===t;var i=e.level+1;if(this.trigger("beforeAddGroup",e,t,i).isDefaultPrevented())return null;var o=this.nextGroupId(),l=$(this.getGroupTemplate(o,i)),s=e.addGroup(l);return s.data=r,s.flags=$.extend({},this.settings.default_group_flags,n),s.condition=this.settings.default_condition,this.trigger("afterAddGroup",s),this.trigger("rulesChanged"),t&&this.addRule(s),s},c.prototype.deleteGroup=function(e){if(e.isRoot())return!1;if(this.trigger("beforeDeleteGroup",e).isDefaultPrevented())return!1;var t=!0;return e.each("reverse",function(e){t&=this.deleteRule(e)},function(e){t&=this.deleteGroup(e)},this),t&&(e.drop(),this.trigger("afterDeleteGroup"),this.trigger("rulesChanged")),t},c.prototype.updateGroupCondition=function(t,e){t.$el.find(">"+c.selectors.group_condition).each(function(){var e=$(this);e.prop("checked",e.val()===t.condition),e.parent().toggleClass("active",e.val()===t.condition)}),this.trigger("afterUpdateGroupCondition",t,e),this.trigger("rulesChanged")},c.prototype.refreshGroupsConditions=function(){!function t(e){(!e.flags||e.flags&&!e.flags.condition_readonly)&&e.$el.find(">"+c.selectors.group_condition).prop("disabled",e.rules.length<=1).parent().toggleClass("disabled",e.rules.length<=1),e.each(null,function(e){t(e)},this)}(this.model.root)},c.prototype.addRule=function(e,t,r){if(this.trigger("beforeAddRule",e).isDefaultPrevented())return null;var n=this.nextRuleId(),i=$($.parseHTML(this.getRuleTemplate(n))),o=e.addRule(i);return o.data=t,o.flags=$.extend({},this.settings.default_rule_flags,r),this.trigger("afterAddRule",o),this.trigger("rulesChanged"),this.createRuleFilters(o),!this.settings.default_filter&&this.settings.display_empty_filter||(o.filter=this.change("getDefaultFilter",this.getFilterById(this.settings.default_filter||this.filters[0].id),o)),o},c.prototype.deleteRule=function(e){return!e.flags.no_delete&&(!this.trigger("beforeDeleteRule",e).isDefaultPrevented()&&(e.drop(),this.trigger("afterDeleteRule"),this.trigger("rulesChanged"),!0))},c.prototype.createRuleFilters=function(e){var t=this.change("getRuleFilters",this.filters,e),r=$($.parseHTML(this.getRuleFilterSelect(e,t)));e.$el.find(c.selectors.filter_container).html(r),this.trigger("afterCreateRuleFilters",e),this.applyRuleFlags(e)},c.prototype.createRuleOperators=function(e){var t=e.$el.find(c.selectors.operator_container).empty();if(e.filter){var r=this.getOperators(e.filter),n=$($.parseHTML(this.getRuleOperatorSelect(e,r)));t.html(n),e.filter.default_operator?e.__.operator=this.getOperatorByType(e.filter.default_operator):e.__.operator=r[0],e.$el.find(c.selectors.rule_operator).val(e.operator.type),this.trigger("afterCreateRuleOperators",e,r),this.applyRuleFlags(e)}},c.prototype.createRuleInput=function(e){var t=e.$el.find(c.selectors.value_container).empty();if(e.__.value=void 0,e.filter&&e.operator&&0!==e.operator.nb_inputs){for(var r=this,n=$(),i=e.filter,o=0;o"+r.group_condition).prop("disabled",t.condition_readonly).parent().toggleClass("readonly",t.condition_readonly),t.no_add_rule&&e.$el.find(r.add_rule).remove(),t.no_add_group&&e.$el.find(r.add_group).remove(),t.no_delete&&e.$el.find(r.delete_group).remove(),this.trigger("afterApplyGroupFlags",e)},c.prototype.clearErrors=function(e){(e=e||this.model.root)&&(e.error=null,e instanceof a&&e.each(function(e){e.error=null},function(e){this.clearErrors(e)},this))},c.prototype.updateError=function(e){if(this.settings.display_errors)if(null===e.error)e.$el.removeClass("has-error");else{var t=this.translate("errors",e.error[0]);t=m.fmt(t,e.error.slice(1)),t=this.change("displayError",t,e.error,e),e.$el.addClass("has-error").find(c.selectors.error_container).eq(0).attr("title",t)}},c.prototype.triggerValidationError=function(e,t,r){$.isArray(t)||(t=[t]),this.trigger("validationError",e,t,r).isDefaultPrevented()||(e.error=t)},c.prototype.destroy=function(){this.trigger("beforeDestroy"),this.status.generated_id&&this.$el.removeAttr("id"),this.clear(),this.model=null,this.$el.off(".queryBuilder").removeClass("query-builder").removeData("queryBuilder"),delete this.$el[0].queryBuilder},c.prototype.reset=function(){this.trigger("beforeReset").isDefaultPrevented()||(this.status.group_id=1,this.status.rule_id=0,this.model.root.empty(),this.model.root.data=void 0,this.model.root.flags=$.extend({},this.settings.default_group_flags),this.model.root.condition=this.settings.default_condition,this.addRule(this.model.root),this.trigger("afterReset"),this.trigger("rulesChanged"))},c.prototype.clear=function(){this.trigger("beforeClear").isDefaultPrevented()||(this.status.group_id=0,this.status.rule_id=0,this.model.root&&(this.model.root.drop(),this.model.root=null),this.trigger("afterClear"),this.trigger("rulesChanged"))},c.prototype.setOptions=function(e){$.each(e,function(e,t){-1!==c.modifiable_options.indexOf(e)&&(this.settings[e]=t)}.bind(this))},c.prototype.getModel=function(e){return e?e instanceof i?e:$(e).data("queryBuilderModel"):this.model.root},c.prototype.validate=function(o){o=$.extend({skip_empty:!1},o),this.clearErrors();var l=this,e=function r(e){var n=0,i=0;return e.each(function(e){if(e.filter||!o.skip_empty){if(!e.filter)return l.triggerValidationError(e,"no_filter",null),void i++;if(!e.operator)return l.triggerValidationError(e,"no_operator",null),void i++;if(0!==e.operator.nb_inputs){var t=l.validateValue(e,e.value);if(!0!==t)return l.triggerValidationError(e,t,e.value),void i++}n++}},function(e){var t=r(e);!0===t?n++:!1===t&&i++}),!(0parseInt(l.max)){s=[this.getValidationMessage(l,"max","string_exceed_max_length"),l.max];break}if(!l.format||("string"==typeof l.format&&(l.format=new RegExp(l.format)),l.format.test(n[u])))break;s=[this.getValidationMessage(l,"format","string_invalid_format"),l.format];break;case"number":if(void 0===n[u]||0===n[u].length){l.allow_empty_value||(s=["number_nan"]);break}if(isNaN(n[u])){s=["number_nan"];break}if("integer"==i.type){if(parseInt(n[u])!=n[u]){s=["number_not_integer"];break}}else if(parseFloat(n[u])!=n[u]){s=["number_not_double"];break}if(void 0!==l.min&&n[u]parseFloat(l.max)){s=[this.getValidationMessage(l,"max","number_exceed_max"),l.max];break}if(void 0!==l.step&&"any"!==l.step){var p=(n[u]/l.step).toPrecision(14);if(parseInt(p)!=p){s=[this.getValidationMessage(l,"step","number_wrong_step"),l.step];break}}break;case"datetime":if(void 0===n[u]||0===n[u].length){l.allow_empty_value||(s=["datetime_empty"]);break}if(l.format){"moment"in window||m.error("MissingLibrary","MomentJS is required for Date/Time validation. Get it here http://momentjs.com");var d=moment(n[u],l.format);if(!d.isValid()){s=[this.getValidationMessage(l,"format","datetime_invalid"),l.format];break}if(l.min&&dmoment(l.max,l.format)){s=[this.getValidationMessage(l,"max","datetime_exceed_max"),l.max];break}}break;case"boolean":if(void 0===n[u]||0===n[u].length){l.allow_empty_value||(s=["boolean_not_valid"]);break}if("true"!==(r=(""+n[u]).trim().toLowerCase())&&"false"!==r&&"1"!==r&&"0"!==r&&1!==n[u]&&0!==n[u]){s=["boolean_not_valid"];break}}if(!0!==s)break}}if(!0!==s)break}if(("between"===e.operator.type||"not_between"===e.operator.type)&&2===t.length)switch(c.types[i.type]){case"number":t[0]>t[1]&&(s=["number_between_invalid",t[0],t[1]]);break;case"datetime":l.format&&("moment"in window||m.error("MissingLibrary","MomentJS is required for Date/Time validation. Get it here http://momentjs.com"),moment(t[0],l.format).isAfter(moment(t[1],l.format))&&(s=["datetime_between_invalid",t[0],t[1]]))}return s},c.prototype.nextGroupId=function(){return this.status.id+"_group_"+this.status.group_id++},c.prototype.nextRuleId=function(){return this.status.id+"_rule_"+this.status.rule_id++},c.prototype.getOperators=function(r){"string"==typeof r&&(r=this.getFilterById(r));for(var e=[],t=0,n=this.operators.length;t ',c.templates.rule=' {{? it.settings.display_errors }}
{{?}}
',c.templates.filterSelect='{{ var optgroup = null; }} {{? it.settings.display_empty_filter }} {{= it.settings.select_placeholder }} {{?}} {{~ it.filters: filter }} {{? optgroup !== filter.optgroup }} {{? optgroup !== null }}{{?}} {{? (optgroup = filter.optgroup) !== null }} {{?}} {{?}} {{= it.translate(filter.label) }} {{~}} {{? optgroup !== null }} {{?}} ',c.templates.operatorSelect='{{? it.operators.length === 1 }} {{= it.translate("operators", it.operators[0].type) }} {{?}} {{ var optgroup = null; }} {{~ it.operators: operator }} {{? optgroup !== operator.optgroup }} {{? optgroup !== null }}{{?}} {{? (optgroup = operator.optgroup) !== null }} {{?}} {{?}} {{= it.translate("operators", operator.type) }} {{~}} {{? optgroup !== null }} {{?}} ',c.templates.ruleValueSelect='{{ var optgroup = null; }} {{? it.rule.filter.placeholder }} {{= it.rule.filter.placeholder }} {{?}} {{~ it.rule.filter.values: entry }} {{? optgroup !== entry.optgroup }} {{? optgroup !== null }}{{?}} {{? (optgroup = entry.optgroup) !== null }} {{?}} {{?}} {{= entry.label }} {{~}} {{? optgroup !== null }} {{?}} ',c.prototype.getGroupTemplate=function(e,t){var r=this.templates.group({builder:this,group_id:e,level:t,conditions:this.settings.conditions,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getGroupTemplate",r,t)},c.prototype.getRuleTemplate=function(e){var t=this.templates.rule({builder:this,rule_id:e,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleTemplate",t)},c.prototype.getRuleFilterSelect=function(e,t){var r=this.templates.filterSelect({builder:this,rule:e,filters:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleFilterSelect",r,e,t)},c.prototype.getRuleOperatorSelect=function(e,t){var r=this.templates.operatorSelect({builder:this,rule:e,operators:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleOperatorSelect",r,e,t)},c.prototype.getRuleValueSelect=function(e,t){var r=this.templates.ruleValueSelect({builder:this,name:e,rule:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleValueSelect",r,e,t)},c.prototype.getRuleInput=function(e,t){var r=e.filter,n=e.filter.validation||{},i=e.id+"_value_"+t,o=r.vertical?" class=block":"",l="",s=Array.isArray(r.placeholder)?r.placeholder[t]:r.placeholder;if("function"==typeof r.input)l=r.input.call(this,e,i);else switch(r.input){case"radio":case"checkbox":m.iterateOptions(r.values,function(e,t){l+=" '+t+" "});break;case"select":l=this.getRuleValueSelect(i,e);break;case"textarea":l+='";break;case"number":l+=' ";break;default:l+=' "}return this.change("getRuleInput",l,e,i)};var m={};function n(){this.root=null,this.$=$(this)}(c.utils=m).iterateOptions=function(e,r){e&&($.isArray(e)?e.forEach(function(e){$.isPlainObject(e)?"value"in e?r(e.value,e.label||e.value,e.optgroup):$.each(e,function(e,t){return r(e,t),!1}):r(e,e)}):$.each(e,function(e,t){r(e,t)}))},m.fmt=function(e,r){return Array.isArray(r)||(r=Array.prototype.slice.call(arguments,1)),e.replace(/{([0-9]+)}/g,function(e,t){return r[parseInt(t)]})},m.error=function(){var e=0,t="boolean"!=typeof arguments[e]||arguments[e++],r=arguments[e++],n=arguments[e++],i=Array.isArray(arguments[e])?arguments[e]:Array.prototype.slice.call(arguments,e);if(t){var o=new Error(m.fmt(n,i));throw o.name=r+"Error",o.args=i,o}console.error(r+"Error: "+m.fmt(n,i))},m.changeType=function(e,t){if(""!==e&&void 0!==e)switch(t){case"integer":return"string"!=typeof e||/^-?\d+$/.test(e)?parseInt(e):e;case"double":return"string"!=typeof e||/^-?\d+\.?\d*$/.test(e)?parseFloat(e):e;case"boolean":return"string"!=typeof e||/^(0|1|true|false){1}$/i.test(e)?!0===e||1===e||"true"===e.toLowerCase()||"1"===e:e;default:return e}},m.escapeString=function(e,t){if("string"!=typeof e)return e;var r=e.replace(/[\0\n\r\b\\\'\"]/g,function(e){switch(e){case"\0":return"\\0";case"\n":return"\\n";case"\r":return"\\r";case"\b":return"\\b";case"'":return"''";default:return"\\"+e}}).replace(/\t/g,"\\t").replace(/\x1a/g,"\\Z");return t&&(r=r.replace(new RegExp("["+t+"]","g"),function(e){return"\\"+e})),r},m.escapeRegExp=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},m.escapeElementId=function(e){return e?e.replace(/(\\)?([:.\[\],])/g,function(e,t,r){return t?e:"\\"+r}):e},m.groupSort=function(e,r){var n=[],i=[];return e.forEach(function(e){var t;e[r]?-1==(t=n.lastIndexOf(e[r]))?t=n.length:t++:t=n.length,n.splice(t,0,e[r]),i.splice(t,0,e)}),i},m.defineModelProperties=function(e,t){t.forEach(function(r){Object.defineProperty(e.prototype,r,{enumerable:!0,get:function(){return this.__[r]},set:function(e){var t=null!==this.__[r]&&"object"==typeof this.__[r]?$.extend({},this.__[r]):this.__[r];this.__[r]=e,null!==this.model&&this.model.trigger("update",this,r,e,t)}})})},$.extend(n.prototype,{trigger:function(e){var t=new $.Event(e);return this.$.triggerHandler(t,Array.prototype.slice.call(arguments,1)),t},on:function(){return this.$.on.apply(this.$,Array.prototype.slice.call(arguments)),this},off:function(){return this.$.off.apply(this.$,Array.prototype.slice.call(arguments)),this},once:function(){return this.$.one.apply(this.$,Array.prototype.slice.call(arguments)),this}});var i=function(e,t){if(!(this instanceof i))return new i(e,t);Object.defineProperty(this,"__",{value:{}}),t.data("queryBuilderModel",this),this.__.level=1,this.__.error=null,this.__.flags={},this.__.data=void 0,this.$el=t,this.id=t[0].id,this.model=null,this.parent=e};m.defineModelProperties(i,["level","error","data","flags"]),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){return this.__.parent},set:function(e){this.__.parent=e,this.level=null===e?1:e.level+1,this.model=null===e?null:e.model}}),i.prototype.isRoot=function(){return 1===this.level},i.prototype.getPos=function(){return this.isRoot()?-1:this.parent.getNodePos(this)},i.prototype.drop=function(){var e=this.model;this.parent&&this.parent.removeNode(this),this.$el.removeData("queryBuilderModel"),null!==e&&e.trigger("drop",this)},i.prototype.moveAfter=function(e){this.isRoot()||this.move(e.parent,e.getPos()+1)},i.prototype.moveAtBegin=function(e){this.isRoot()||(void 0===e&&(e=this.parent),this.move(e,0))},i.prototype.moveAtEnd=function(e){this.isRoot()||(void 0===e&&(e=this.parent),this.move(e,0===e.length()?0:e.length()-1))},i.prototype.move=function(e,t){this.isRoot()||("number"==typeof e&&(t=e,e=this.parent),this.parent.removeNode(this),e.insertNode(this,t,!1),null!==this.model&&this.model.trigger("move",this,e,t))};var a=function(e,t){if(!(this instanceof a))return new a(e,t);i.call(this,e,t),this.rules=[],this.__.condition=null};a.prototype=Object.create(i.prototype),a.prototype.constructor=a,m.defineModelProperties(a,["condition"]),a.prototype.empty=function(){this.each("reverse",function(e){e.drop()},function(e){e.drop()})},a.prototype.drop=function(){this.empty(),i.prototype.drop.call(this)},a.prototype.length=function(){return this.rules.length},a.prototype.insertNode=function(e,t,r){return void 0===t&&(t=this.length()),this.rules.splice(t,0,e),e.parent=this,r&&null!==this.model&&this.model.trigger("add",this,e,t),e},a.prototype.addGroup=function(e,t){return this.insertNode(new a(this,e),t,!0)},a.prototype.addRule=function(e,t){return this.insertNode(new l(this,e),t,!0)},a.prototype.removeNode=function(e){var t=this.getNodePos(e);-1!==t&&(e.parent=null,this.rules.splice(t,1))},a.prototype.getNodePos=function(e){return this.rules.indexOf(e)},a.prototype.each=function(e,t,r,n){"boolean"!=typeof e&&"string"!=typeof e&&(n=r,r=t,t=e,e=!1),n=void 0===n?null:n;for(var i=e?this.rules.length-1:0,o=e?0:this.rules.length-1,l=e?-1:1,s=!1;(e?o<=i:i<=o)&&(this.rules[i]instanceof a?r&&(s=!1===r.call(n,this.rules[i])):t&&(s=!1===t.call(n,this.rules[i])),!s);i+=l);return!s},a.prototype.contains=function(t,e){return-1!==this.getNodePos(t)||!!e&&!this.each(function(){return!0},function(e){return!e.contains(t,!0)})};var l=function(e,t){if(!(this instanceof l))return new l(e,t);i.call(this,e,t),this._updating_value=!1,this._updating_input=!1,this.__.filter=null,this.__.operator=null,this.__.value=void 0};function u(e,t,r){var n,i,o=c.selectors;(n=t.closest(o.rule_container)).length&&(i="moveAfter"),i||(n=t.closest(o.group_header)).length&&(n=t.closest(o.group_container),i="moveAtBegin"),i||(n=t.closest(o.group_container)).length&&(i="moveAtEnd"),i&&(e[i](r.getModel(n)),r&&e instanceof l&&r.setRuleInputValue(e,e.value))}function o(e){var t=e.match(/(question_mark|numbered|named)(?:\((.)\))?/);return t||(t=[null,"question_mark",void 0]),t}return l.prototype=Object.create(i.prototype),l.prototype.constructor=l,m.defineModelProperties(l,["filter","operator","value"]),l.prototype.isRoot=function(){return!1},c.Group=a,c.Rule=l,$.fn.queryBuilder=function(e){0===this.length&&m.error("Config","No target defined"),1 '+t+" "})}})},{font:"glyphicons",color:"default"}),c.define("bt-selectpicker",function(r){$.fn.selectpicker&&$.fn.selectpicker.Constructor||m.error("MissingLibrary",'Bootstrap Select is required to use "bt-selectpicker" plugin. Get it here: http://silviomoreto.github.io/bootstrap-select');var n=c.selectors;this.on("afterCreateRuleFilters",function(e,t){t.$el.find(n.rule_filter).removeClass("form-control").selectpicker(r)}),this.on("afterCreateRuleOperators",function(e,t){t.$el.find(n.rule_operator).removeClass("form-control").selectpicker(r)}),this.on("afterUpdateRuleFilter",function(e,t){t.$el.find(n.rule_filter).selectpicker("render")}),this.on("afterUpdateRuleOperator",function(e,t){t.$el.find(n.rule_operator).selectpicker("render")}),this.on("beforeDeleteRule",function(e,t){t.$el.find(n.rule_filter).selectpicker("destroy"),t.$el.find(n.rule_operator).selectpicker("destroy")})},{container:"body",style:"btn-inverse btn-xs",width:"auto",showIcon:!1}),c.define("bt-tooltip-errors",function(n){$.fn.tooltip&&$.fn.tooltip.Constructor&&$.fn.tooltip.Constructor.prototype.fixTitle||m.error("MissingLibrary",'Bootstrap Tooltip is required to use "bt-tooltip-errors" plugin. Get it here: http://getbootstrap.com');var i=this;this.on("getRuleTemplate.filter getGroupTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(c.selectors.error_container).attr("data-toggle","tooltip"),e.value=t.prop("outerHTML")}),this.model.on("update",function(e,t,r){"error"==r&&i.settings.display_errors&&t.$el.find(c.selectors.error_container).eq(0).tooltip(n).tooltip("hide").tooltip("fixTitle")})},{placement:"right"}),c.extend({setFilters:function(e,t){var r=this;void 0===t&&(t=e,e=!1),t=this.checkFilters(t);var n=(t=this.change("setFilters",t)).map(function(e){return e.id});if(e||function e(t){t.each(function(e){e.filter&&-1===n.indexOf(e.filter.id)&&m.error("ChangeFilter",'A rule is using filter "{0}"',e.filter.id)},e)}(this.model.root),this.filters=t,function e(t){t.each(!0,function(e){e.filter&&-1===n.indexOf(e.filter.id)?(e.drop(),r.trigger("rulesChanged")):(r.createRuleFilters(e),e.$el.find(c.selectors.rule_filter).val(e.filter?e.filter.id:"-1"),r.trigger("afterUpdateRuleFilter",e))},e)}(this.model.root),this.settings.plugins&&(this.settings.plugins["unique-filter"]&&this.updateDisabledFilters(),this.settings.plugins["bt-selectpicker"]&&this.$el.find(c.selectors.rule_filter).selectpicker("render")),this.settings.default_filter)try{this.getFilterById(this.settings.default_filter)}catch(e){this.settings.default_filter=null}this.trigger("afterSetFilters",t)},addFilter:function(e,r){void 0===r||"#end"==r?r=this.filters.length:"#start"==r&&(r=0),$.isArray(e)||(e=[e]);var t=$.extend(!0,[],this.filters);parseInt(r)==r?Array.prototype.splice.apply(t,[r,0].concat(e)):this.filters.some(function(e,t){if(e.id==r)return r=t+1,!0})?Array.prototype.splice.apply(t,[r,0].concat(e)):Array.prototype.push.apply(t,e),this.setFilters(t)},removeFilter:function(t,e){var r=$.extend(!0,[],this.filters);"string"==typeof t&&(t=[t]),r=r.filter(function(e){return-1===t.indexOf(e.id)}),this.setFilters(e,r)}}),c.define("chosen-selectpicker",function(r){$.fn.chosen||m.error("MissingLibrary",'chosen is required to use "chosen-selectpicker" plugin. Get it here: https://github.com/harvesthq/chosen'),this.settings.plugins["bt-selectpicker"]&&m.error("Conflict","bt-selectpicker is already selected as the dropdown plugin. Please remove chosen-selectpicker from the plugin list");var n=c.selectors;this.on("afterCreateRuleFilters",function(e,t){t.$el.find(n.rule_filter).removeClass("form-control").chosen(r)}),this.on("afterCreateRuleOperators",function(e,t){1'))).appendTo(t.$el):r.css("display",""),r.html(' '+n)):r.hide()}):"popover"===i.mode?($.fn.popover&&$.fn.popover.Constructor&&$.fn.popover.Constructor.prototype.fixTitle||m.error("MissingLibrary",'Bootstrap Popover is required to use "filter-description" plugin. Get it here: http://getbootstrap.com'),this.on("afterUpdateRuleFilter afterUpdateRuleOperator",function(e,t){var r=t.$el.find("button.filter-description"),n=e.builder.getFilterDescription(t.filter,t);n?(0===r.length?((r=$($.parseHTML(' '))).prependTo(t.$el.find(c.selectors.rule_actions)),r.popover({placement:"left",container:"body",html:!0}),r.on("mouseout",function(){r.popover("hide")})):r.css("display",""),r.data("bs.popover").options.content=n,r.attr("aria-describedby")&&r.popover("show")):(r.hide(),r.data("bs.popover")&&r.popover("hide"))})):"bootbox"===i.mode&&("bootbox"in window||m.error("MissingLibrary",'Bootbox is required to use "filter-description" plugin. Get it here: http://bootboxjs.com'),this.on("afterUpdateRuleFilter afterUpdateRuleOperator",function(e,t){var r=t.$el.find("button.filter-description"),n=e.builder.getFilterDescription(t.filter,t);n?(0===r.length?((r=$($.parseHTML(' '))).prependTo(t.$el.find(c.selectors.rule_actions)),r.on("click",function(){bootbox.alert(r.data("description"))})):r.css("display",""),r.data("description",n)):r.hide()}))},{icon:"glyphicon glyphicon-info-sign",mode:"popover"}),c.extend({getFilterDescription:function(e,t){return e?"function"==typeof e.description?e.description.call(this,t):e.description:void 0}}),c.define("invert",function(r){var n=this,i=c.selectors;this.on("afterInit",function(){n.$el.on("click.queryBuilder","[data-invert=group]",function(){var e=$(this).closest(i.group_container);n.invert(n.getModel(e),r)}),r.display_rules_button&&r.invert_rules&&n.$el.on("click.queryBuilder","[data-invert=rule]",function(){var e=$(this).closest(i.rule_container);n.invert(n.getModel(e),r)})}),r.disable_template||(this.on("getGroupTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(i.condition_container).after(' '+n.translate("invert")+" "),e.value=t.prop("outerHTML")}),r.display_rules_button&&r.invert_rules&&this.on("getRuleTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(i.rule_actions).prepend(' '+n.translate("invert")+" "),e.value=t.prop("outerHTML")}))},{icon:"glyphicon glyphicon-random",recursive:!0,invert_rules:!0,display_rules_button:!1,silent_fail:!1,disable_template:!1}),c.defaults({operatorOpposites:{equal:"not_equal",not_equal:"equal",in:"not_in",not_in:"in",less:"greater_or_equal",less_or_equal:"greater",greater:"less_or_equal",greater_or_equal:"less",between:"not_between",not_between:"between",begins_with:"not_begins_with",not_begins_with:"begins_with",contains:"not_contains",not_contains:"contains",ends_with:"not_ends_with",not_ends_with:"ends_with",is_empty:"is_not_empty",is_not_empty:"is_empty",is_null:"is_not_null",is_not_null:"is_null"},conditionOpposites:{AND:"OR",OR:"AND"}}),c.extend({invert:function(e,t){if(!(e instanceof i)){if(!this.model.root)return;t=e,e=this.model.root}if("object"!=typeof t&&(t={}),void 0===t.recursive&&(t.recursive=!0),void 0===t.invert_rules&&(t.invert_rules=!0),void 0===t.silent_fail&&(t.silent_fail=!1),void 0===t.trigger&&(t.trigger=!0),e instanceof a){if(this.settings.conditionOpposites[e.condition]?e.condition=this.settings.conditionOpposites[e.condition]:t.silent_fail||m.error("InvertCondition",'Unknown inverse of condition "{0}"',e.condition),t.recursive){var r=$.extend({},t,{trigger:!1});e.each(function(e){t.invert_rules&&this.invert(e,r)},function(e){this.invert(e,r)},this)}}else if(e instanceof l&&e.operator&&!e.filter.no_invert)if(this.settings.operatorOpposites[e.operator.type]){var n=this.settings.operatorOpposites[e.operator.type];e.filter.operators&&-1==e.filter.operators.indexOf(n)||(e.operator=this.getOperatorByType(n))}else t.silent_fail||m.error("InvertOperator",'Unknown inverse of operator "{0}"',e.operator.type);t.trigger&&(this.trigger("afterInvert",e,t),this.trigger("rulesChanged"))}}),c.defaults({mongoOperators:{equal:function(e){return e[0]},not_equal:function(e){return{$ne:e[0]}},in:function(e){return{$in:e}},not_in:function(e){return{$nin:e}},less:function(e){return{$lt:e[0]}},less_or_equal:function(e){return{$lte:e[0]}},greater:function(e){return{$gt:e[0]}},greater_or_equal:function(e){return{$gte:e[0]}},between:function(e){return{$gte:e[0],$lte:e[1]}},not_between:function(e){return{$lt:e[0],$gt:e[1]}},begins_with:function(e){return{$regex:"^"+m.escapeRegExp(e[0])}},not_begins_with:function(e){return{$regex:"^(?!"+m.escapeRegExp(e[0])+")"}},contains:function(e){return{$regex:m.escapeRegExp(e[0])}},not_contains:function(e){return{$regex:"^((?!"+m.escapeRegExp(e[0])+").)*$",$options:"s"}},ends_with:function(e){return{$regex:m.escapeRegExp(e[0])+"$"}},not_ends_with:function(e){return{$regex:"(? '+n.translate("NOT")+""),e.value=t.prop("outerHTML")}),this.on("groupToJson.filter",function(e,t){e.value.not=t.not}),this.on("jsonToGroup.filter",function(e,t){e.value.not=!!t.not}),this.on("groupToSQL.filter",function(e,t){t.not&&(e.value="NOT ( "+e.value+" )")}),this.on("parseSQLNode.filter",function(e){e.value.name&&"NOT"==e.value.name.toUpperCase()&&(e.value=e.value.arguments.value[0],-1===["AND","OR"].indexOf(e.value.operation.toUpperCase())&&(e.value=new SQLParser.nodes.Op(n.settings.default_condition,e.value,null)),e.value.not=!0)}),this.on("sqlGroupsDistinct.filter",function(e,t,r,n){r.not&&0"+c.selectors.group_not).toggleClass("active",e.not).find("i").attr("class",e.not?t.icon_checked:t.icon_unchecked),this.trigger("afterUpdateGroupNot",e),this.trigger("rulesChanged")}}),c.define("sortable",function(n){var i,o,l,s;"interact"in window||m.error("MissingLibrary",'interact.js is required to use "sortable" plugin. Get it here: http://interactjs.io'),void 0!==n.default_no_sortable&&(m.error(!1,"Config",'Sortable plugin : "default_no_sortable" options is deprecated, use standard "default_rule_flags" and "default_group_flags" instead'),this.settings.default_rule_flags.no_sortable=this.settings.default_group_flags.no_sortable=n.default_no_sortable),interact.dynamicDrop(!0),interact.pointerMoveTolerance(10),this.on("afterAddRule afterAddGroup",function(e,t){if(t!=i){var r=e.builder;n.inherit_no_sortable&&t.parent&&t.parent.flags.no_sortable&&(t.flags.no_sortable=!0),n.inherit_no_drop&&t.parent&&t.parent.flags.no_drop&&(t.flags.no_drop=!0),t.flags.no_sortable||interact(t.$el[0]).draggable({allowFrom:c.selectors.drag_handle,onstart:function(e){s=!1,l=r.getModel(e.target),o=l.$el.clone().appendTo(l.$el.parent()).width(l.$el.outerWidth()).addClass("dragging");var t=$($.parseHTML('
')).height(l.$el.outerHeight());i=l.parent.addRule(t,l.getPos()),l.$el.hide()},onmove:function(e){o[0].style.top=e.clientY-15+"px",o[0].style.left=e.clientX-15+"px"},onend:function(e){e.dropzone&&(u(l,$(e.relatedTarget),r),s=!0),o.remove(),o=void 0,i.drop(),i=void 0,l.$el.css("display",""),r.trigger("afterMove",l),r.trigger("rulesChanged")}}),t.flags.no_drop||(interact(t.$el[0]).dropzone({accept:c.selectors.rule_and_group_containers,ondragenter:function(e){u(i,$(e.target),r)},ondrop:function(e){s||u(l,$(e.target),r)}}),t instanceof a&&interact(t.$el.find(c.selectors.group_header)[0]).dropzone({accept:c.selectors.rule_and_group_containers,ondragenter:function(e){u(i,$(e.target),r)},ondrop:function(e){s||u(l,$(e.target),r)}}))}}),this.on("beforeDeleteRule beforeDeleteGroup",function(e,t){e.isDefaultPrevented()||(interact(t.$el[0]).unset(),t instanceof a&&interact(t.$el.find(c.selectors.group_header)[0]).unset())}),this.on("afterApplyRuleFlags afterApplyGroupFlags",function(e,t){t.flags.no_sortable&&t.$el.find(".drag-handle").remove()}),n.disable_template||(this.on("getGroupTemplate.filter",function(e,t){if(1 '),e.value=r.prop("outerHTML")}}),this.on("getRuleTemplate.filter",function(e){var t=$($.parseHTML(e.value));t.find(c.selectors.rule_header).after('
'),e.value=t.prop("outerHTML")}))},{inherit_no_sortable:!0,inherit_no_drop:!0,icon:"glyphicon glyphicon-sort",disable_template:!1}),c.selectors.rule_and_group_containers=c.selectors.rule_container+", "+c.selectors.group_container,c.selectors.drag_handle=".drag-handle",c.defaults({default_rule_flags:{no_sortable:!1,no_drop:!1},default_group_flags:{no_sortable:!1,no_drop:!1}}),c.define("sql-support",function(e){},{boolean_as_integer:!0}),c.defaults({sqlOperators:{equal:{op:"= ?"},not_equal:{op:"!= ?"},in:{op:"IN(?)",sep:", "},not_in:{op:"NOT IN(?)",sep:", "},less:{op:"< ?"},less_or_equal:{op:"<= ?"},greater:{op:"> ?"},greater_or_equal:{op:">= ?"},between:{op:"BETWEEN ?",sep:" AND "},not_between:{op:"NOT BETWEEN ?",sep:" AND "},begins_with:{op:"LIKE ?",mod:"{0}%",escape:"%_"},not_begins_with:{op:"NOT LIKE ?",mod:"{0}%",escape:"%_"},contains:{op:"LIKE ?",mod:"%{0}%",escape:"%_"},not_contains:{op:"NOT LIKE ?",mod:"%{0}%",escape:"%_"},ends_with:{op:"LIKE ?",mod:"%{0}",escape:"%_"},not_ends_with:{op:"NOT LIKE ?",mod:"%{0}",escape:"%_"},is_empty:{op:"= ''"},is_not_empty:{op:"!= ''"},is_null:{op:"IS NULL"},is_not_null:{op:"IS NOT NULL"}},sqlRuleOperator:{"=":function(e){return{val:e,op:""===e?"is_empty":"equal"}},"!=":function(e){return{val:e,op:""===e?"is_not_empty":"not_equal"}},LIKE:function(e){return"%"==e.slice(0,1)&&"%"==e.slice(-1)?{val:e.slice(1,-1),op:"contains"}:"%"==e.slice(0,1)?{val:e.slice(1),op:"ends_with"}:"%"==e.slice(-1)?{val:e.slice(0,-1),op:"begins_with"}:void m.error("SQLParse",'Invalid value for LIKE operator "{0}"',e)},"NOT LIKE":function(e){return"%"==e.slice(0,1)&&"%"==e.slice(-1)?{val:e.slice(1,-1),op:"not_contains"}:"%"==e.slice(0,1)?{val:e.slice(1),op:"not_ends_with"}:"%"==e.slice(-1)?{val:e.slice(0,-1),op:"not_begins_with"}:void m.error("SQLParse",'Invalid value for NOT LIKE operator "{0}"',e)},IN:function(e){return{val:e,op:"in"}},"NOT IN":function(e){return{val:e,op:"not_in"}},"<":function(e){return{val:e,op:"less"}},"<=":function(e){return{val:e,op:"less_or_equal"}},">":function(e){return{val:e,op:"greater"}},">=":function(e){return{val:e,op:"greater_or_equal"}},BETWEEN:function(e){return{val:e,op:"between"}},"NOT BETWEEN":function(e){return{val:e,op:"not_between"}},IS:function(e){return null!==e&&m.error("SQLParse","Invalid value for IS operator"),{val:null,op:"is_null"}},"IS NOT":function(e){return null!==e&&m.error("SQLParse","Invalid value for IS operator"),{val:null,op:"is_not_null"}}},sqlStatements:{question_mark:function(){var r=[];return{add:function(e,t){return r.push(t),"?"},run:function(){return r}}},numbered:function(r){(!r||1"==l&&(l="!=");var s=_.settings.sqlRuleOperator[l];void 0===s&&m.error("UndefinedSQLOperator",'Invalid SQL operation "{0}".',t.operation);var a,u=s.call(this,o,t.operation);"values"in t.left?a=t.left.values.join("."):"value"in t.left?a=t.left.value:m.error("SQLParse","Cannot find field name in {0}",JSON.stringify(t.left));var p=u.val,d=_.settings.sqlOperators[u.op];if(!h&&d&&d.escape){var c=d.escape.split("").map(function(e){return"\\\\"+e}).join("|");p=p.replace(new RegExp("("+c+")","g"),function(e){return e[1]})}var f=_.getSQLFieldID(a,o),g=_.change("sqlToRule",{id:f,field:a,operator:u.op,value:p},t);v.rules.push(g)}}(n,0),i},setRulesFromSQL:function(e,t){this.setRules(this.getRulesFromSQL(e,t))},getSQLFieldID:function(t,e){var r=this.filters.filter(function(e){return e.field.toLowerCase()===t.toLowerCase()});return 1===r.length?r[0].id:this.change("getSQLFieldID",t,e)}}),c.define("unique-filter",function(){this.status.used_filters={},this.on("afterUpdateRuleFilter",this.updateDisabledFilters),this.on("afterDeleteRule",this.updateDisabledFilters),this.on("afterCreateRuleFilters",this.applyDisabledFilters),this.on("afterReset",this.clearDisabledFilters),this.on("afterClear",this.clearDisabledFilters),this.on("getDefaultFilter.filter",function(t,r){var n=t.builder;(n.updateDisabledFilters(),t.value.id in n.status.used_filters)&&(n.filters.some(function(e){if(!(e.id in n.status.used_filters)||0","\"","'","/","matchHTML","code","toString","replace","m","eval","startend","start","end","startencode","split","skip","unescape","tmpl","c","def","needhtmlencode","indv","cse","sid","str","resolveDefs","block","assign","value","substring","param","v","arg","text","Function","s","d","rw","__exp","RegExp","elsecase","vname","iname","_encodeHTML","console","QueryBuilder","$el","queryBuilder","settings","DEFAULTS","model","Model","status","id","generated_id","group_id","rule_id","has_optgroup","has_operator_optgroup","filters","icons","operators","templates","plugins","lang","regional","Utils","error","lang_code","allow_groups","Object","keys","tpl","attr","Math","floor","random","addClass","checkFilters","checkOperators","bindEvents","initPlugins","prototype","trigger","event","Event","_tojQueryEvent","builder","triggerHandler","slice","call","change","on","cb","off","once","one","filter","map","join","types","string","integer","double","date","time","datetime","boolean","inputs","modifiable_options","selectors","group_container","rule_container","filter_container","operator_container","value_container","error_container","condition_container","rule_header","group_header","group_actions","rule_actions","rules_list","group_condition","rule_filter","rule_operator","rule_value","add_rule","delete_rule","add_group","delete_group","OPERATORS","equal","nb_inputs","multiple","apply_to","not_equal","in","not_in","less","less_or_equal","greater","greater_or_equal","between","not_between","begins_with","not_begins_with","contains","not_contains","ends_with","not_ends_with","is_empty","is_not_empty","is_null","is_not_null","sort_filters","display_errors","allow_empty","conditions","default_condition","inputs_separator","select_placeholder","display_empty_filter","default_filter","optgroups","default_rule_flags","filter_readonly","operator_readonly","value_readonly","no_delete","default_group_flags","condition_readonly","no_add_rule","no_add_group","group","rule","filterSelect","operatorSelect","ruleValueSelect","remove_group","remove_rule","defaults","fct","methods","tmp","plugin","getPluginOptions","property","init","rules","setRules","setRoot","definedFilters","input","operator","field","label","optgroup","values","cleanValues","iterateOptions","bind","groupSort","placeholder","placeholder_value","entry","sort","self","a","b","translate","localeCompare","definedOperators","Selectors","is","$group","closest","getModel","condition","val","$rule","getFilterById","getOperatorByType","addRule","deleteRule","addGroup","deleteGroup","drop","node","remove","refreshGroupsConditions","add","parent","index","prependTo","find","insertAfter","move","detach","update","oldValue","Rule","updateError","applyRuleFlags","updateRuleFilter","updateRuleOperator","updateRuleValue","applyGroupFlags","updateGroupCondition","data","flags","nextGroupId","parseHTML","getGroupTemplate","Group","level","isDefaultPrevented","isRoot","del","each","previousCondition","$this","prop","toggleClass","walk","nextRuleId","getRuleTemplate","createRuleFilters","$filterSelect","getRuleFilterSelect","html","createRuleOperators","$operatorContainer","empty","getOperators","$operatorSelect","getRuleOperatorSelect","default_operator","__","createRuleInput","$valueContainer","$inputs","$ruleInput","trim","getRuleInput","css","input_event","_updating_input","_updating_value","getRuleInputValue","plugin_config","default_value","previousFilter","previousOperator","hide","previousValue","setRuleInputValue","clearErrors","removeClass","errorMessage","fmt","eq","triggerValidationError","destroy","removeAttr","clear","removeData","reset","setOptions","opt","Node","validate","skip_empty","valid","parse","done","errors","validateValue","res","getRules","get_flags","allow_invalid","out","groupData","getGroupFlags","isEmptyObject","ruleData","getRuleFlags","parseGroupFlags","item","parseRuleFlags","validation","result","callback","_validateValue","tempValue","allow_empty_value","j","min","parseInt","getValidationMessage","max","format","test","isNaN","parseFloat","step","toPrecision","window","moment","isValid","isAfter","l","doThrow","valueGetter","$value","escapeElementId","value_separator","subval","changeType","valueParser","valueSetter","readonly","all","ret","key","category","translation","messages","h","getRuleValueSelect","value_id","vertical","size","rows","utils","args","message","err","Error","escapeString","additionalEscape","escaped","escapeRegExp","$0","$1","$2","items","newItems","idx","lastIndexOf","splice","defineModelProperties","obj","fields","defineProperty","enumerable","get","set","apply","getPos","getNodePos","removeNode","moveAfter","moveAtBegin","moveAtEnd","insertNode","create","constructor","reverse","cbRule","cbGroup","context","stop","recursive","moveSortableToTarget","method","getStmtConfig","stmt","config","match","fn","option","font","colors","color","_def_","style","selectpicker","Constructor","container","width","showIcon","tooltip","fixTitle","$h","placement","setFilters","deleteOrphans","filtersIds","checkOrphans","updateBuilder","updateDisabledFilters","addFilter","newFilters","position","some","removeFilter","filterIds","chosen","mode","$p","description","getFilterDescription","appendTo","icon","popover","$b","content","bootbox","alert","invert","display_rules_button","invert_rules","disable_template","after","prepend","silent_fail","operatorOpposites","conditionOpposites","AND","OR","tempOpts","no_invert","mongoOperators","$ne","$in","$nin","$lt","$lte","$gt","$gte","$regex","$options","mongoRuleOperators","$eq","op","getMongo","toUpperCase","parts","mdb","ope","ruleExpression","groupExpression","getRulesFromMongo","query","getMongoCondition","topKey","getMongoOperator","mdbrl","opVal","getMongoDBFieldID","setRulesFromMongo","matchingFilters","knownKeys","not","updateGroupNot","icon_unchecked","json","operation","SQLParser","nodes","Op","$nor","icon_checked","group_not","ghost","moved","default_no_sortable","no_sortable","interact","dynamicDrop","pointerMoveTolerance","inherit_no_sortable","inherit_no_drop","no_drop","draggable","allowFrom","drag_handle","onstart","outerWidth","ph","height","outerHeight","onmove","top","clientY","left","clientX","onend","dropzone","relatedTarget","accept","rule_and_group_containers","ondragenter","ondrop","unset","boolean_as_integer","sqlOperators","sep","mod","escape","sqlRuleOperator","=","!=","LIKE","NOT LIKE","IN","NOT IN","<=",">=","BETWEEN","NOT BETWEEN","IS","IS NOT","sqlStatements","question_mark","params","run","numbered","char","named","indexes","sqlRuleStatement","esc","sql","regex1","regex2","getSQL","nl","sqlFn","getRulesFromSQL","parsed","where","curr","flatten","next","right","sqlrl","JSON","stringify","finalValue","searchChars","getSQLFieldID","setRulesFromSQL","used_filters","applyDisabledFilters","clearDisabledFilters","unique","filterId","groups","__locale","__author","no_filter","empty_group","radio_empty","checkbox_empty","select_empty","string_empty","string_exceed_min_length","string_exceed_max_length","string_invalid_format","number_nan","number_not_integer","number_not_double","number_exceed_min","number_exceed_max","number_wrong_step","number_between_invalid","datetime_empty","datetime_invalid","datetime_exceed_min","datetime_exceed_max","datetime_between_invalid","boolean_not_valid","operator_not_multiple","NOT"],"mappings":";;;;;;CASC,SAAUA,EAAMC,GACS,mBAAXC,QAAyBA,OAAOC,IACvCD,OAAO,mBAAoB,CAAC,UAAWD,GAEhB,iBAAXG,QAAuBA,OAAOC,QAC1CD,OAAOC,QAAUJ,EAAQK,QAAQ,WAGjCL,EAAQD,EAAKO,QARrB,CAUEC,KAAM,SAAUC,GACd,aAEAA,EAAEC,UAAY,WACV,IAAIC,EAASC,EAAMC,EAAKC,EAAMC,EAAaC,EACvCC,EAASC,UAAU,IAAM,GACzBC,EAAI,EACJC,EAASF,UAAUE,OACnBC,GAAO,EACPC,EAAY,UAgChB,IA7BsB,kBAAXL,IACPI,EAAOJ,EAGPA,EAASC,UAAUC,MAAQ,IAIT,iBAAXF,IAEW,YADlBK,EAAYL,EAAOM,gBACyB,YAAdD,GAAyC,WAAdA,IACrDA,EAAY,WAIhBL,EAASC,UAAUC,MAAQ,IAIT,iBAAXF,GAAwBR,EAAEe,WAAWP,KAC5CA,EAAS,IAITE,IAAMC,IACNH,EAAST,KACTW,KAGGA,EAAIC,EAAQD,IAEf,GAAiC,QAA5BR,EAAUO,UAAUC,IAErB,GAAIV,EAAEgB,QAAQd,IAA0B,YAAdW,EAGtB,OAFAN,EAAQC,GAAUR,EAAEgB,QAAQR,GAAUA,EAAS,GAEvCK,GACR,IAAK,SACDL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bC,GAAM,KACNC,OAAU,SACVC,KAAQ,OACRC,cAAiB,gBACjBC,QAAW,UACXC,iBAAoB,mBACpBC,QAAW,UACXC,YAAe,cACfC,YAAe,cACfC,gBAAmB,qBACnBC,SAAY,WACZC,aAAgB,kBAChBC,UAAa,YACbC,cAAiB,mBACjBC,SAAY,WACZC,aAAgB,eAChBC,QAAW,UACXC,YAAe,eAEjBkK,OAAU,CACR+R,UAAa,qBACbC,YAAe,qBACfC,YAAe,oBACfC,eAAkB,oBAClBC,aAAgB,oBAChBC,aAAgB,cAChBC,yBAA4B,uCAC5BC,yBAA4B,4CAC5BC,sBAAyB,uBACzBC,WAAc,eACdC,mBAAsB,iBACtBC,kBAAqB,oBACrBC,kBAAqB,2BACrBC,kBAAqB,yBACrBC,kBAAqB,4BACrBC,uBAA0B,0CAC1BC,eAAkB,cAClBC,iBAAoB,4BACpBC,oBAAuB,oBACvBC,oBAAuB,qBACvBC,yBAA4B,0CAC5BC,kBAAqB,gBACrBC,sBAAyB,gDAE3BpK,OAAU,SACVqK,IAAO,OAGTrkB,EAAawI,SAAS,CAAEjH,UAAW,OAC5BvB","file":"query-builder.standalone.min.js"}
\ No newline at end of file
diff --git a/dist/scss/dark.scss b/dist/scss/dark.scss
index 371faa70..dfd90bc5 100644
--- a/dist/scss/dark.scss
+++ b/dist/scss/dark.scss
@@ -1,6 +1,6 @@
/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
+ * jQuery QueryBuilder 2.7.0
+ * Copyright 2014-2023 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
$theme-name: dark;
diff --git a/dist/scss/default.scss b/dist/scss/default.scss
index b35c07e0..ccdd36ff 100644
--- a/dist/scss/default.scss
+++ b/dist/scss/default.scss
@@ -1,6 +1,6 @@
/*!
- * jQuery QueryBuilder 2.6.2
- * Copyright 2014-2021 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
+ * jQuery QueryBuilder 2.7.0
+ * Copyright 2014-2023 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
$theme-name: default !default;
@@ -177,10 +177,8 @@ $ticks-position: 5px, 10px !default;
}
}
-// import
-@import "plugins/_bt-checkbox";
-@import "plugins/_bt-tooltip-errors";
-@import "plugins/_filter-description";
-@import "plugins/_invert";
-@import "plugins/_sortable";
-// endimport
+@import "plugins/bt-checkbox";
+@import "plugins/bt-tooltip-errors";
+@import "plugins/filter-description";
+@import "plugins/invert";
+@import "plugins/sortable";
\ No newline at end of file
diff --git a/dist/scss/plugins/_bt-tooltip-errors.scss b/dist/scss/plugins/_bt-tooltip-errors.scss
deleted file mode 100644
index 21323e5f..00000000
--- a/dist/scss/plugins/_bt-tooltip-errors.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-$error-tooltip-color: #F99;
-
-@if $theme-name == 'dark' {
- $error-tooltip-color: #F22;
-}
-
-.query-builder .error-container + .tooltip .tooltip-inner {
- color: $error-tooltip-color !important;
-}
diff --git a/dist/scss/plugins/_filter-description.scss b/dist/scss/plugins/_filter-description.scss
deleted file mode 100644
index 80a2af71..00000000
--- a/dist/scss/plugins/_filter-description.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-$description-background-color: #D9EDF7;
-$description-border-color: #BCE8F1;
-$description-text-color: #31708F;
-
-@if $theme-name == 'dark' {
- $description-background-color: rgba(0, 170, 255, .2);
- $description-text-color: #AAD1E4;
- $description-border-color: #346F7B;
-}
-
-$description-border: 1px solid $description-border-color;
-
-.query-builder p.filter-description {
- margin: $rule-padding 0 0 0;
- background: $description-background-color;
- border: $description-border;
- color: $description-text-color;
- border-radius: $item-border-radius;
- padding: #{$rule-padding / 2} $rule-padding;
- font-size: .8em;
-}
diff --git a/dist/scss/plugins/_invert.scss b/dist/scss/plugins/_invert.scss
deleted file mode 100644
index 5eb0458b..00000000
--- a/dist/scss/plugins/_invert.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.query-builder {
- .rules-group-header [data-invert] {
- margin-left: 5px;
- }
-}
diff --git a/dist/scss/plugins/_sortable.scss b/dist/scss/plugins/_sortable.scss
deleted file mode 100644
index ac902fe1..00000000
--- a/dist/scss/plugins/_sortable.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-$placeholder-border-color: #BBB;
-$placeholder-border: 1px dashed $placeholder-border-color;
-
-.query-builder {
- .drag-handle {
- @extend %rule-component;
- cursor: move;
- vertical-align: middle;
- margin-left: 5px;
- }
-
- .dragging {
- position: fixed;
- opacity: .5;
- z-index: 100;
-
- &::before,
- &::after {
- display: none;
- }
- }
-
- .rule-placeholder {
- @extend %base-container;
- border: $placeholder-border;
- opacity: .7;
- }
-}
diff --git a/dist/scss/plugins/_bt-checkbox.scss b/dist/scss/plugins/bt-checkbox.scss
similarity index 100%
rename from dist/scss/plugins/_bt-checkbox.scss
rename to dist/scss/plugins/bt-checkbox.scss
diff --git a/dist/scss/plugins/filter-description.scss b/dist/scss/plugins/filter-description.scss
index 80a2af71..41498718 100644
--- a/dist/scss/plugins/filter-description.scss
+++ b/dist/scss/plugins/filter-description.scss
@@ -16,6 +16,6 @@ $description-border: 1px solid $description-border-color;
border: $description-border;
color: $description-text-color;
border-radius: $item-border-radius;
- padding: #{$rule-padding / 2} $rule-padding;
+ padding: #{$rule-padding * .5} $rule-padding;
font-size: .8em;
}
diff --git a/dist/scss/plugins/sortable.scss b/dist/scss/plugins/sortable.scss
index cf57c795..ac902fe1 100644
--- a/dist/scss/plugins/sortable.scss
+++ b/dist/scss/plugins/sortable.scss
@@ -14,7 +14,8 @@ $placeholder-border: 1px dashed $placeholder-border-color;
opacity: .5;
z-index: 100;
- &::before, &::after {
+ &::before,
+ &::after {
display: none;
}
}
diff --git a/examples/index.html b/examples/index.html
index 1c734012..0b697b7d 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -6,14 +6,14 @@
jQuery QueryBuilder Example
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+