@talend/react-faceted-search-query-client
Version:
Faceted search Query client
2 lines • 28.3 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.TalendReactFacetedSearchQueryClient=t():e.TalendReactFacetedSearchQueryClient=t()}(this,()=>(()=>{"use strict";var e={7:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=(r=n(278))&&r.__esModule?r:{default:r},u={contains:{operator:"contains",getValues:function(e){return e.args.phrase},getOptions:function(){}},contains_ignore_case:{operator:"containsIgnoreCase",getValues:function(e){return e.args.phrase},getOptions:function(){}},exact:{operator:"equal",getValues:function(e){return e.args.phrase},getOptions:function(){}},inside_range:{operator:"between",getValues:function(e){return e.args.intervals},getOptions:function(e){return{excludeMax:e.excludeMax,excludeMin:e.excludeMin}}},invalid_records:{operator:"invalid",getValues:function(){return[]},getOptions:function(){}},valid_records:{operator:"valid",getValues:function(){return[]},getOptions:function(){}},matches:{operator:"complies",getValues:function(e){return e.args.patterns},getOptions:function(){}},word_matches:{operator:"wordComplies",getValues:function(e){return e.args.patterns},getOptions:function(){}},empty_records:{operator:"empty",getValues:function(){return[]},getOptions:function(){}},quality:{operator:"quality",getValues:function(){return[]},getOptions:function(e){return e}},not_equals:{operator:"unequal",getValues:function(e){return[e.args]},getOptions:function(){}},greater_than:{operator:"greaterThan",getValues:function(e){return[e.args]},getOptions:function(){}},greater_than_or_equals:{operator:"greaterThanOrEqual",getValues:function(e){return[e.args]},getOptions:function(){}},less_than:{operator:"lessThan",getValues:function(e){return[e.args]},getOptions:function(){}},less_than_or_equals:{operator:"lessThanOrEqual",getValues:function(e){return[e.args]},getOptions:function(){}}},i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"parse",value:function(e){var t=new a.default;return e.reduce(function(t,n,r){var o=u[n.type];if(o.getValues(n).length)t.nest(function(e,t){var n=e.getValues(t),r=e.operator;return n.reduce(function(o,a,u){var i=e.getOptions(a);return o[r](t.colId,a.value,i),u<n.length-1?o.or():o},new a.default)}(o,n));else{var i=o.getOptions(n.args);t[o.operator](n.colId,null,i)}return r<e.length-1?t.and():t},t),t}}]),e}();t.default=i},26:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="wordComplies",o.hasOperand=!0,o.allowEmpty=!0,t.default=o},198:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="is valid",o.hasOperand=!1,t.default=o},221:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=i(n(850)),a=n(492),u=i(n(877));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"serialize",value:function(){var e=[];if(this.options.empty&&e.push(new a.Empty(this.field)),this.options.invalid&&e.push(new a.Invalid(this.field)),this.options.valid&&e.push(new a.Valid(this.field)),!e.length)throw new Error("Invalid options given to quality operator.");var t=e.map(function(e){return e.serialize()}).join(" "+u.default.or+" ");return e.length>1?"("+t+")":t}}]),t}(o.default);t.default=l},278:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(492)),a=f(n(544)),u=f(n(877)),i=f(n(961)),l=f(n(850));function f(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.stack=[],Object.keys(o).forEach(function(t){var n=t.charAt(0).toLowerCase()+t.slice(1);e[n]=function(){for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];return e.add(new(Function.prototype.bind.apply(o[t],[null].concat(r))))}}),e.and=function(){return e.add(u.default.get(u.default.and))},e.or=function(){return e.add(u.default.get(u.default.or))},e.not=function(t){return e.add(new i.default(i.default.not,t))},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"add",value:function(e){if((this.last instanceof t||this.last instanceof i.default||this.last instanceof l.default)&&!(e instanceof u.default))throw new Error("Only AND or OR operators are allowed after a query.");return this.stack.push(e),this}},{key:"nest",value:function(e){if(e instanceof t&&this.last&&!(this.last instanceof u.default))throw new Error("You can't nest a query if there is no AND or OR statement before.");return this.stack.push(e),this}},{key:"serialize",value:function(){return this.stack.map(function(e){return e instanceof t?"("+e.serialize()+")":e.serialize()}).join(" ")}},{key:"last",get:function(){return this.stack.length?this.stack[this.stack.length-1]:void 0}}]),t}(a.default);t.default=c},299:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="is invalid",o.hasOperand=!1,t.default=o},331:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="contains",o.hasOperand=!0,o.allowEmpty=!0,t.default=o},349:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="!=",o.hasOperand=!0,t.default=o},381:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(850),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"serialize",value:function(){if(!(0,a.isDefined)(this.operand))throw new Error(this.constructor.value+" does not allow empty.");var e=(Array.isArray(this.operand)?this.operand:[this.operand]).map(function(e){return(0,a.wrap)(e)});return"("+this.field+" "+this.constructor.value+" ["+e.join(", ")+"])"}}]),t}(((r=a)&&r.__esModule?r:{default:r}).default);u.value="in",u.hasOperand=!0,t.default=u},492:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.In=t.Quality=t.Between=t.Invalid=t.Valid=t.LessThanOrEqual=t.LessThan=t.GreaterThanOrEqual=t.GreaterThan=t.WordComplies=t.Complies=t.ContainsIgnoreCase=t.Contains=t.Unequal=t.Equal=t.Empty=void 0;var r=w(n(789)),o=w(n(504)),a=w(n(349)),u=w(n(331)),i=w(n(805)),l=w(n(778)),f=w(n(26)),c=w(n(536)),s=w(n(693)),p=w(n(579)),y=w(n(852)),d=w(n(198)),h=w(n(299)),b=w(n(624)),_=w(n(221)),O=w(n(381));function w(e){return e&&e.__esModule?e:{default:e}}t.Empty=r.default,t.Equal=o.default,t.Unequal=a.default,t.Contains=u.default,t.ContainsIgnoreCase=i.default,t.Complies=l.default,t.WordComplies=f.default,t.GreaterThan=c.default,t.GreaterThanOrEqual=s.default,t.LessThan=p.default,t.LessThanOrEqual=y.default,t.Valid=d.default,t.Invalid=h.default,t.Between=b.default,t.Quality=_.default,t.In=O.default},504:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="=",o.hasOperand=!0,o.allowEmpty=!0,t.default=o},536:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value=">",o.hasOperand=!0,t.default=o},544:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"serialize",value:function(){throw new Error("serialize() is not implemented.")}}]),e}();t.default=r},569:(e,t,n)=>{t.XK=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(n(492));var r=a(n(7)),o=a(n(278));function a(e){return e&&e.__esModule?e:{default:e}}r.default,t.XK=o.default},579:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="<",o.hasOperand=!0,t.default=o},624:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"serialize",value:function(){var e=this.options.excludeMin?"]":"[",t=this.options.excludeMax?"[":"]";return"("+this.field+" "+this.constructor.value+" "+e+this.operand.join(", ")+t+")"}}]),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);a.value="between",a.hasOperand=!0,t.default=a},693:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value=">=",o.hasOperand=!0,t.default=o},778:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="complies",o.hasOperand=!0,o.allowEmpty=!0,t.default=o},789:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="is empty",o.hasOperand=!1,t.default=o},805:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="containsIgnoreCase",o.hasOperand=!0,o.allowEmpty=!0,t.default=o},850:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.wrap=u,t.isDefined=i;var o=a(n(789));function a(e){return e&&e.__esModule?e:{default:e}}function u(e){return function(e){return"string"==typeof e}(e)?"'"+e.replace(/'/g,"\\'")+"'":e}function i(e){return null!=e&&""!==e}var l=function(e){function t(e,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.field=e||"*",o.options=r||{},Array.isArray(n)?o.operand=n.length>1?n:n[0]:o.operand=n,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"serialize",value:function(){if(!1!==this.constructor.hasOperand&&i(this.operand))return"("+this.field+" "+this.constructor.value+" "+u(this.operand)+")";if(!1===this.constructor.hasOperand)return"("+this.field+" "+this.constructor.value+")";if(!0===this.constructor.allowEmpty)return"("+this.field+" "+o.default.value+")";throw new Error(this.constructor.value+" does not allow empty.")}}]),t}(a(n(544)).default);t.default=l},852:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(850))&&r.__esModule?r:{default:r}).default);o.value="<=",o.hasOperand=!0,t.default=o},877:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(e!==t.and&&e!==t.or)throw new Error("Unknown compositor");return n.type=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"serialize",value:function(){return this.type}}],[{key:"get",value:function(e){return new t(e)}}]),t}(((r=n(544))&&r.__esModule?r:{default:r}).default);a.and="and",a.or="or",t.default=a},961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(e!==t.not)throw new Error("Unknown modifier");return r.type=e,r.query=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"serialize",value:function(){return this.type+"("+this.query.serialize()+")"}}]),t}(((r=n(544))&&r.__esModule?r:{default:r}).default);a.not="not",t.default=a}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{createTqlQuery:()=>d});var o=n(569);const a=TalendReactFacetedSearch;var u=n.n(a);const i=_,{operatorNames:l}=u().helpers,f=({properties:e})=>[e.attribute,e.operator.name,e.value],c=e=>"string"==typeof e?!(0,i.isEmpty)(e):!Number.isNaN(e),s=({properties:e})=>Array.isArray(e.value)?e.value.length&&e.value.every(({id:e})=>c(e)):c(e.value),p=(0,i.flow)([e=>e.filter(s),e=>e.map(f)]),y=e=>Array.isArray(e)?e.map(e=>e.id):"string"==typeof e?e.trim():e,d=e=>{if(!e||!e.length)return"";if(Array.isArray(e)){const n=p(e);return n.reduce((t=n.length,(e,[n,r,o],a)=>{const u=(e=>({[l.contains]:e.contains,[l.containsIgnoreCase]:e.containsIgnoreCase,[l.equals]:e.equal,[l.in]:e.in,[l.notEquals]:e.unequal,[l.greaterThan]:e.greaterThan,[l.greaterThanOrEquals]:e.greaterThanOrEqual,[l.lessThan]:e.lessThan,[l.lessThanOrEquals]:e.lessThanOrEqual,[l.complies]:e.complies,[l.wordComplies]:e.wordComplies}))(e)[r],i=u(n,y(o));return a===t-1?i:i.and()}),new o.XK).serialize()}var t;return y(e)};return r})());
//# sourceMappingURL=TalendReactFacetedSearchQueryClient.min.js.map