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 = '\ -
\ -
\ -
\ - \ - {{? it.settings.allow_groups===-1 || it.settings.allow_groups>=it.level }} \ - \ - {{?}} \ - {{? it.level>1 }} \ - \ - {{?}} \ -
\ -
\ - {{~ it.conditions: condition }} \ - \ - {{~}} \ -
\ - {{? it.settings.display_errors }} \ -
\ - {{?}} \ -
\ -
\ -
\ -
\ -
'; +QueryBuilder.templates.group = ({ group_id, level, conditions, icons, settings, translate, builder }) => { + return ` +
+
+
+ + ${settings.allow_groups === -1 || settings.allow_groups >= level ? ` + + ` : ''} + ${level > 1 ? ` + + ` : ''} +
+
+ ${conditions.map(condition => ` + + `).join('\n')} +
+ ${settings.display_errors ? ` +
+ ` : ''} +
+
+
+
+
`; +}; -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; }} \ -'; - -QueryBuilder.templates.operatorSelect = '\ -{{? it.operators.length === 1 }} \ - \ -{{= it.translate("operators", it.operators[0].type) }} \ - \ -{{?}} \ -{{ var optgroup = null; }} \ -'; - -QueryBuilder.templates.ruleValueSelect = '\ -{{ var optgroup = null; }} \ -'; +QueryBuilder.templates.filterSelect = ({ rule, filters, icons, settings, translate, builder }) => { + let optgroup = null; + return ` +`; +}; + +QueryBuilder.templates.operatorSelect = ({ rule, operators, icons, settings, translate, builder }) => { + let optgroup = null; + return ` +${operators.length === 1 ? ` + +${translate("operators", operators[0].type)} + +` : ''} +`; +}; + +QueryBuilder.templates.ruleValueSelect = ({ name, rule, icons, settings, translate, builder }) => { + let optgroup = null; + return ` +`; +}; /** * 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 += '.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 '+t+" "});break;case"select":l=this.getRuleValueSelect(o,e);break;case"textarea":l+=''; - break; - - case 'number': - h += ' ' + val + ' '; + }); + break; + + case 'select': + h = this.getRuleValueSelect(name, rule); + break; + + case 'textarea': + h += '";break;case"number":l+=' "})}})},{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('"),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('"),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,UAAU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d,SAAY,WACZE,UAAa,YACbD,YAAe,SACfE,aAAgB,SAChB4B,WAAc,CACZwT,IAAO,MACPC,GAAM,MAER1Z,UAAa,CACXuE,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,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 - - - - - - - - + + + + + + + +