views.static.entity.js.entity-query.js.map Maven / Gradle / Ivy
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/utils/exceptions.js","webpack:///./src/js/utils/utilities.js","webpack:///external \"jQuery\"","webpack:///./src/js/utils/entity-query/entity-query-ops.js","webpack:///./src/js/events/SortableTableEvent.ts","webpack:///./src/js/components/MultiValueAutoSuggest.ts","webpack:///./src/js/utils/entity-query/eq-type.js","webpack:///./src/js/components/EmbeddedCollection.ts","webpack:///./src/js/utils/entity-query/entity-query-condition.js","webpack:///./src/js/utils/controls/entity-query-property-control-factory.js","webpack:///./src/js/modules/EntityModule.ts","webpack:///./src/js/utils/entity-query/eq-value.js","webpack:///./src/js/utils/entity-query/eq-string.js","webpack:///external \"_\"","webpack:///./src/js/utils/entity-query/eq-group.js","webpack:///./src/js/utils/controls/property-control-builders/property-control.js","webpack:///./src/js/utils/entity-query/entity-query.js","webpack:///./src/js/utils/controls/entity-query-filter-control.js","webpack:///./src/js/entity-query.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","NullOrUndefinedException","_Error","type","field","_this","_classCallCheck","this","_possibleConstructorReturn","_getPrototypeOf","concat","_inherits","_wrapNativeSuper","Error","isNullOrUndefined","arrayEquals","array1","array2","length","o1","o2","equals","convertArgsToArray","values","_toConsumableArray","Array","assertNotNull","location","convertToTypedValue","stringVal","toString","startsWith","endsWith","EQString","substring","EQValue","isEmptyArray","array","jQuery","EntityQueryOperand","opswriter","opsWriter","_len","arguments","tokens","_key","propertyName","_len2","args","_key2","apply","that","getToken","objectAsString","_","isString","replace","joinAsStrings","_len3","_key3","map","arg","join","EntityQueryToken","AND","OR","setBraces","expr","query","search","EntityQueryOps","_len4","_key4","_len5","_key5","EQ","undefined","NEQ","CONTAINS","NOT_CONTAINS","IN","_len6","_key6","NOT_IN","_len7","_key7","LIKE","LIKE_IC","NOT_LIKE","NOT_LIKE_IC","GT","GE","LT","LE","IS_NULL","IS_NOT_NULL","IS_EMPTY","IS_NOT_EMPTY","forToken","token","lookup","toLowerCase","trim","currentValue","includes","isGroupOperand","operand","SortableTableEvent","__webpack_exports__","MultiValueAutoSuggest","MultiValueAutoSuggestControlAdapter","jquery__WEBPACK_IMPORTED_MODULE_0__","element","bootstrapUiModule","window","BootstrapUiModule","items","find","first","editItemTemplate","removeClass","triggerChange","controller","data","removeHandler","e","preventDefault","currentTarget","closest","remove","addClass","click","adapter","getTarget","on","stopPropagation","selectedValue","getValue","escapeHtml","item","refTarget","html","label","append","reset","node","target","ix","hidden","val","context","toArray","selectValue","newValue","trigger","triggerSubmit","EQType","$","EmbeddedCollection","entityModule","EntityModule","wrapper","filter","results","is","templatePrefix","attr","nextItemIndex","targetPrefix","parentItem","parentPrefix","parentTemplate","sortIndex","id","template","each","initializeFormElements","EntityQueryCondition","prop","isSingleNullArgument","valueOf","expressions","_this$operand","EntityQueryPropertyControlItem","entityQueryPropertyControlBuilder","priority","entityQueryControlFactory","EntityQueryPropertyControlFactory","entityQueryPropertyControlBuilders","propertyControlBuilder","push","sort","a","b","getProperty","getPriority","queryFilterControl","getControlBuilder","_components_EmbeddedCollection__WEBPACK_IMPORTED_MODULE_0__","_components_MultiValueAutoSuggest__WEBPACK_IMPORTED_MODULE_1__","documentInitialized","initializers","registerInitializer","callback","callIfAlreadyInitialized","emSortableTable","dependsonConfig","options","hide","dependsOn","container","keyCode","which","value_1","clone","innerText","removeAttr","clickEvent","tooltip","EQGroup","setCondition","controlElement","filterControl","selectedVal","condition","eqType","selectedValues","filteredValues","converted","convertToEQType","setPropertyCondition","createDefaultControl","control","controlAdapter","event","EntityQuery","setSort","forEach","add","expression","parseSort","EntityQueryFilterControl","nodes","eqlFilter","entity_query_filter_control_classCallCheck","conditions","Map","entityQuery","initControlFactories","and","entity_query_filter_control_toConsumableArray","has","conditionToUse","getArguments","getOperand","set","resetEntityQuery","index","controlNode","createControl","_utils_controls_property_control_builders_property_control__WEBPACK_IMPORTED_MODULE_0__","_utils_utilities__WEBPACK_IMPORTED_MODULE_1__","_utils_controls_entity_query_property_control_factory__WEBPACK_IMPORTED_MODULE_2__","_utils_controls_entity_query_filter_control__WEBPACK_IMPORTED_MODULE_3__","register","entityQueryFilterControl","findShowBasicFilterElement","toggleClass","inputShowBasicFilter","initializeEntityQueryForm"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,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js/entity-query.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 17);\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class NullOrUndefinedException extends Error {\n constructor( type, field, object ) {\n super( `[${type}] field \"${field}\" may not be null or undefined: ${object}` );\n this.name = \"NullOrUndefinedException\";\n }\n}\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @author Steven Gentens\n * @since 2.2.0\n */\nimport {NullOrUndefinedException} from \"./exceptions\";\nimport EQValue from \"./entity-query/eq-value\";\nimport EQString from \"./entity-query/eq-string\";\n\n/**\n * Checks whether the incoming object is {@code null} or is {@code undefined}.\n * @param object\n * @returns (boolean) whether or not the object is null or undefined.\n */\nexport function isNullOrUndefined( object ) {\n return (object === null || typeof object === \"undefined\");\n}\n\n/**\n * Checks whether two arrays are the same based on their length and the elements at their corresponding positions\n * @param array1\n * @param array2\n * @returns {boolean}\n */\nexport function arrayEquals( array1, array2 ) {\n const length = array1.length;\n if ( length !== array2.length ) {\n return false;\n }\n\n for ( let i = 0; i < length; i++ ) {\n const o1 = array1[i];\n const o2 = array2[i];\n if ( !(isNullOrUndefined( o1 ) ? isNullOrUndefined( o2 ) : o1.equals( o2 )) ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Converts an array of values (as a result of a spread operator) to a useable array.\n * Returns the following:\n * - if the array is empty, returns the array\n * - If the array contains multiple values, returns the array.\n * - If the array contains a single value, which is also an array,\n * returns the inner array.\n * - If the array contains a single value that is not null or empty,\n * returns the value wrapped in an array.\n * @param values an array of values\n * @returns the result as an array.\n * @throws NullOrUndefinedException if the values contains a single element that is null or undefined\n */\nexport function convertArgsToArray( values ) {\n if ( values.length === 0 ) {\n return values;\n }\n else if ( values.length > 1 ) {\n return [...values];\n }\n else if ( values[0] instanceof Array ) {\n return [...values[0]];\n }\n else if ( !isNullOrUndefined( values[0] ) ) {\n return [values[0]];\n }\n throw new NullOrUndefinedException( null, null, values );\n}\n\n/**\n * Validates whether an object is null or undefined\n * @param location of the validation\n * @param property name of the object\n * @param object to validate\n * @throws NullOrUndefinedException if the object is {@code null} or {@code undefined}\n */\nexport function assertNotNull( location, property, object ) {\n if ( isNullOrUndefined( object ) ) {\n throw new NullOrUndefinedException( location, property, object );\n }\n}\n\nexport function convertToTypedValue( value ) {\n const stringVal = value.toString();\n if ( stringVal.startsWith( \"'\" ) && stringVal.endsWith( \"'\" ) ) {\n return new EQString( stringVal.substring( 1, stringVal.length - 1 ) );\n }\n return new EQValue( value );\n}\n\n/**\n * Checks whether an array is empty.\n * @param array to check\n * @returns {boolean} whether or not it is empty\n */\nexport function isEmptyArray( array ) {\n return isNullOrUndefined( array ) || isNullOrUndefined( array.length ) || array.length === 0;\n}\n","module.exports = jQuery;","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport _ from \"lodash\";\n// import isString from \"lodash.isstring\";\nimport {isNullOrUndefined} from \"../utilities\";\n\n/**\n * Defines an operand that can be used in a query.\n * @see com.foreach.across.modules.entity.query.EntityQueryOps\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nclass EntityQueryOperand {\n constructor( opswriter, ...tokens ) {\n this.opsWriter = opswriter;\n this.tokens = tokens;\n }\n\n toString( propertyName, ...args ) {\n return this.opsWriter( propertyName, ...args );\n }\n\n getToken() {\n return this.tokens[0];\n }\n\n equals( that ) {\n return this.getToken() === that.getToken();\n }\n}\n\nfunction escapeChars( value ) {\n return value.replace( \"\\\\\", \"\\\\\\\\\" ).replace( \"'\", \"\\\\'\" );\n}\n\nfunction objectAsString( object ) {\n if ( isNullOrUndefined( object ) ) {\n return \"NULL\";\n }\n if ( _.isString( object ) || typeof object === \"string\" ) {\n return `'${escapeChars( object )}'`;\n }\n return object.toString();\n}\n\nfunction joinAsStrings( ...args ) {\n return args.map( arg => objectAsString( arg ) ).join( \",\" );\n}\n\n/**\n * Defines the EntityQueryToken for the grouping operands AND and OR\n * @type {{AND: string, OR: string}}\n */\nconst EntityQueryToken = {\n \"AND\": \"and\",\n \"OR\": \"or\"\n};\n\n/**\n * Set braces around the query expression if necessary\n * @param expr the query expression\n * @returns ({@code(query)}) if it contains {@link EntityQueryOps.AND#getToken()} or {@link EntityQueryOps.AND#getToken()}\n * or else the query.\n */\nfunction setBraces( expr ) {\n const query = objectAsString( expr );\n if ( query.search( ` ${EntityQueryToken.AND} ` ) !== -1 || query.search( ` ${EntityQueryToken.OR} ` ) !== -1 ) {\n return `(${query})`;\n }\n return query;\n}\n\nexport const EntityQueryOps = {\n \"AND\": new EntityQueryOperand( ( field, ...args ) => `${args.map( arg => setBraces( arg ) ).join( \" and \" )}`, EntityQueryToken.AND ),\n \"OR\": new EntityQueryOperand( ( field, ...args ) => `${args.map( arg => setBraces( arg ) ).join( \" or \" )}`, EntityQueryToken.OR ),\n \"EQ\": new EntityQueryOperand( ( field, ...args ) => `${field} = ${args.length > 0 ? objectAsString( args[0] ) : \"\"}`, \"=\" ),\n \"NEQ\": new EntityQueryOperand( ( field, ...args ) => `${field} != ${args.length > 0 ? objectAsString( args[0] ) : \"\"}`, \"!=\", \"<>\" ),\n \"CONTAINS\": new EntityQueryOperand( ( field, ...args ) => `${field} contains ${objectAsString( args[0] )}`, \"contains\" ),\n \"NOT_CONTAINS\": new EntityQueryOperand( ( field, ...args ) => `${field} not contains ${objectAsString( args[0] )}`, \"not contains\" ),\n \"IN\": new EntityQueryOperand( ( field, ...args ) => `${field} in ${joinAsStrings( ...args )}`, \"in\" ),\n \"NOT_IN\": new EntityQueryOperand( ( field, ...args ) => `${field} not in ${joinAsStrings( ...args )}`, \"not in\" ),\n \"LIKE\": new EntityQueryOperand( ( field, ...args ) => `${field} like ${objectAsString( args[0] )}`, \"like\" ),\n \"LIKE_IC\": new EntityQueryOperand( ( field, ...args ) => `${field} ilike ${objectAsString( args[0] )}`, \"ilike\" ),\n \"NOT_LIKE\": new EntityQueryOperand( ( field, ...args ) => `${field} not like ${objectAsString( args[0] )}`, \"not like\" ),\n \"NOT_LIKE_IC\": new EntityQueryOperand( ( field, ...args ) => `${field} not ilike ${objectAsString( args[0] )}`, \"not ilike\" ),\n \"GT\": new EntityQueryOperand( ( field, ...args ) => `${field} > ${objectAsString( args[0] )}`, \">\" ),\n \"GE\": new EntityQueryOperand( ( field, ...args ) => `${field} >= ${objectAsString( args[0] )}`, \">=\" ),\n \"LT\": new EntityQueryOperand( ( field, ...args ) => `${field} < ${objectAsString( args[0] )}`\n , \"<\" ),\n \"LE\": new EntityQueryOperand( ( field, ...args ) => `${field} <= ${objectAsString( args[0] )}`, \"<=\" ),\n \"IS_NULL\": new EntityQueryOperand( ( field, ...args ) => `${field} is NULL`, \"is\" ),\n \"IS_NOT_NULL\": new EntityQueryOperand( ( field, ...args ) => `${field} is not NULL`\n , \"is not\" ),\n \"IS_EMPTY\": new EntityQueryOperand( ( field, ...args ) => `${field} is EMPTY`, \"is\" ),\n \"IS_NOT_EMPTY\": new EntityQueryOperand( ( field, ...args ) => `${field} is not EMPTY`, \"is not\" ),\n\n \"forToken\": function( token ) {\n const lookup = token.toLowerCase().trim();\n const values = Object.values( EntityQueryOps );\n for ( let i = 0; i < values.length; i++ ) {\n const currentValue = values[i];\n if ( currentValue instanceof EntityQueryOperand && currentValue.tokens.includes( lookup ) ) {\n return currentValue;\n }\n }\n return null;\n },\n\n isGroupOperand( operand ) {\n return operand.equals( EntityQueryOps.IN ) || operand.equals( EntityQueryOps.NOT_IN );\n }\n }\n;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport enum SortableTableEvent\n{\n /**\n * Trigger this event with the page number as parameter.\n */\n MOVE_TO_PAGE = 'emSortableTable:moveToPage',\n\n /**\n * Trigger this event with the new field name to sort on as parameter.\n */\n SORT = 'emSortableTable:sort',\n\n /**\n * Subscribe to this event if you want to modify the parameters for loading the data.\n */\n PREPARE_DATA = 'emSortableTable:prepareData',\n\n /**\n * Subscribe to this event if you want to modify the parameters for loading the data,\n * or if you want to implement custom data loading and rendering.\n * Prevent the default event handling in the latter case.\n */\n LOAD_DATA = 'emSortableTable:loadData',\n\n /**\n * Subscribe to this event if you want to be notified if data new has been loaded\n */\n NEW_DATA_LOADED = 'emSortableTable:newDataLoaded',\n}\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as $ from 'jquery';\n\nexport class MultiValueAutoSuggest\n{\n private bootstrapUiModule: any;\n\n constructor( element: JQuery )\n {\n this.bootstrapUiModule = (window).BootstrapUiModule;\n\n const items = element.find( '[data-role=items]' ).first();\n const editItemTemplate = element.find( '[data-role=edit-item-template]' ).first();\n\n if ( items.find( 'tr' ).length > 1 ) {\n items.removeClass( 'd-none' );\n }\n\n const triggerChange = () => {\n const controller = element.data( 'bootstrapui-adapter' ) as BootstrapUiControlAdapter;\n if ( controller ) {\n controller.triggerChange();\n }\n };\n\n const removeHandler = ( e: JQueryEventObject ) => {\n e.preventDefault();\n $( e.currentTarget ).closest( '[data-role=item]' ).remove();\n if ( items.find( 'tr' ).length === 1 ) {\n items.addClass( 'd-none' );\n }\n triggerChange();\n };\n\n items.find( '[data-action=remove-item]' ).click( removeHandler );\n\n const adapter = element.find( '[data-role=control]' ).first().data( 'bootstrapui-adapter' );\n $( adapter.getTarget() ).on( 'bootstrapui.change', ( e: JQueryEventObject, adapter: any ) => {\n e.stopPropagation();\n const selectedValue = adapter.getValue()[0];\n if ( selectedValue.value !== '' ) {\n const value = MultiValueAutoSuggest.escapeHtml( '' + selectedValue.value );\n\n if ( items.find( '[value=\"' + value + '\"]' ).length === 0 ) {\n const item = $( $( this.bootstrapUiModule.refTarget( editItemTemplate ) )\n .html()\n .replace( '{{id}}', value )\n .replace( '{{label}}', MultiValueAutoSuggest.escapeHtml( '' + selectedValue.label ) ) );\n item.find( '[data-action=remove-item]' ).click( removeHandler );\n items.append( item );\n items.removeClass( 'd-none' );\n }\n adapter.reset();\n triggerChange();\n }\n } );\n }\n\n private static escapeHtml( value: string ): string\n {\n return value.replace( /&/g, '&' )\n .replace( //g, '>' )\n .replace( /\"/g, '"' );\n }\n}\n\n/**\n * Control adapter implementation for a multi-value autosuggest control.\n * With limited support as it only allows fetching the values.\n */\nexport class MultiValueAutoSuggestControlAdapter implements BootstrapUiControlAdapter\n{\n private items: JQuery;\n private target: any;\n\n constructor( node: any )\n {\n this.target = node;\n this.items = $( node ).find( '[data-role=items]' ).first();\n }\n\n getTarget(): any\n {\n return this.target;\n }\n\n getValue(): BootstrapUiControlValueHolder[]\n {\n return this.items.find( 'input[type=hidden]' )\n .map( ( ix, hidden ) => {\n const val = $( hidden ).val();\n return {\n label: val,\n value: val,\n context: hidden,\n };\n } ).toArray() as BootstrapUiControlValueHolder[];\n }\n\n reset(): void\n {\n }\n\n selectValue( newValue: any ): void\n {\n }\n\n triggerChange(): void\n {\n $( this.getTarget() ).trigger( 'bootstrapui.change', [this] );\n }\n\n triggerSubmit(): void\n {\n $( this.getTarget() ).trigger( 'bootstrapui.submit', [this] );\n }\n}\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass EQType {\n}\n\nexport default EQType;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class EmbeddedCollection\n{\n private bootstrapUiModule: any;\n private entityModule: any;\n\n constructor( element: JQuery )\n {\n this.bootstrapUiModule = (window).BootstrapUiModule;\n this.entityModule = (window).EntityModule;\n\n const wrapper = element;\n\n const filter = ( results: any ) => {\n return results.filter( ( ix: number, element: any ) => {\n return $( element ).closest( '[data-item-format]' ).is( wrapper );\n } );\n };\n\n const items = filter( wrapper.find( '[data-role=items]' ) ).first();\n const editItemTemplate = filter( wrapper.find( '[data-role=edit-item-template]' ) ).first();\n\n const templatePrefix = editItemTemplate.attr( 'data-template-prefix' );\n let nextItemIndex = editItemTemplate.data( 'next-item-index' );\n let targetPrefix = wrapper.attr( 'data-item-format' );\n\n const parentItem = wrapper.closest( '[data-item-prefix]' );\n\n if ( parentItem.length ) {\n const parentPrefix = parentItem.attr( 'data-item-prefix' );\n const parentTemplate = parentItem.closest( '[data-item-format]' ).attr( 'data-item-format' );\n targetPrefix = targetPrefix.replace( parentTemplate, parentPrefix );\n }\n\n filter( items.find( '[data-action=remove-item]' ) ).click( ( e: JQueryEventObject ) => {\n e.preventDefault();\n $( e.currentTarget ).closest( '[data-role=item]' ).remove();\n } );\n\n filter( wrapper.find( '[data-action=add-item]' ) ).click( () => {\n const sortIndex = nextItemIndex++;\n const id = 'item-' + sortIndex;\n const target = targetPrefix.replace( '{{key}}', id );\n\n const template = $( this.bootstrapUiModule.refTarget( editItemTemplate ).html() );\n template.attr( 'data-item-key', id );\n template.attr( 'data-item-prefix', target );\n\n template.find( '[name^=\"' + templatePrefix + '\"]' ).each( ( ix: number, node: any ) => {\n $( node ).attr( 'name', $( node ).attr( 'name' ).replace( templatePrefix, target ) );\n } );\n template.find( '[name^=\"_' + templatePrefix + '\"]' ).each( ( ix: number, node: any ) => {\n $( node ).attr( 'name', $( node ).attr( 'name' ).replace( '_' + templatePrefix, '_' + target ) );\n } );\n template.find( '[for^=\"' + templatePrefix + '\"]' ).each( ( ix: number, node: any ) => {\n $( node ).attr( 'for', $( node ).attr( 'for' ).replace( templatePrefix, target ) );\n } );\n template.find( '[id^=\"' + templatePrefix + '\"]' ).each( ( ix: number, node: any ) => {\n $( node ).attr( 'id', $( node ).attr( 'id' ).replace( templatePrefix, target ) );\n } );\n\n template.find( '[data-action=remove-item]' ).click( ( e: JQueryEventObject ) => {\n e.preventDefault();\n $( e.currentTarget ).closest( '[data-role=item]' ).remove();\n } );\n\n template.find( '[name=\"' + target + '.sortIndex\"]' )\n .attr( 'value', sortIndex );\n\n items.append( template );\n\n this.entityModule.initializeFormElements( template );\n } );\n }\n\n}\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {arrayEquals, assertNotNull, convertArgsToArray, isNullOrUndefined} from \"../utilities\";\nimport {EntityQueryOps} from \"./entity-query-ops\";\n\nfunction isSingleNullArgument( args ) {\n return args.length === 1 && args[0].toString() === \"'NULL'\";\n}\n\n/**\n * Defines an entity query expression for a single property.\n * @see com.foreach.across.modules.entity.query.EntityQueryCondition\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nclass EntityQueryCondition {\n /**\n * The arguments may be:\n * - an array containing the arguments: [arg1, arg2, arg3]\n * - a single item: arg1\n * - a set of items listed separately: arg1, arg2, arg3\n * @param property to query on\n * @param operand to use in the condition\n * @param args the arguments of the condition.\n */\n constructor( property, operand, ...args ) {\n this.prop = property;\n this.operand = operand;\n this.args = convertArgsToArray( args );\n\n if ( isSingleNullArgument( this.args ) ) {\n if ( EntityQueryOps.EQ.equals( operand ) ) {\n this.operand = EntityQueryOps.IS_NULL;\n }\n else if ( EntityQueryOps.NEQ.equals( operand ) ) {\n this.operand = EntityQueryOps.IS_NOT_NULL;\n }\n }\n }\n\n getProperty() {\n return this.prop;\n }\n\n setProperty( property ) {\n this.prop = property;\n }\n\n getOperand() {\n return this.operand;\n }\n\n setOperand( operand ) {\n this.operand = operand;\n }\n\n getArguments() {\n return this.args;\n }\n\n setArguments( args ) {\n assertNotNull( \"EntityQueryCondition.setArguments\", \"args\", args );\n this.args = args;\n }\n\n hasArguments() {\n return this.args.length > 0;\n }\n\n getFirstArgument() {\n return this.args.length > 0 ? this.args[0] : null;\n }\n\n equals( that ) {\n if ( this.valueOf() === that.valueOf() ) {\n return true;\n }\n if ( isNullOrUndefined( that ) || !(that instanceof EntityQueryCondition) ) {\n return false;\n }\n if ( !arrayEquals( this.args, that.expressions ) ) {\n return false;\n }\n if ( this.operand !== that.operand ) {\n return false;\n }\n if ( !isNullOrUndefined( this.prop )\n ? !this.prop.equals( that.prop )\n : !isNullOrUndefined( that.prop ) ) {\n return false;\n }\n return true;\n }\n\n toString() {\n return this.operand.toString( this.prop, ...this.args );\n }\n}\n\nexport default EntityQueryCondition;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @author Steven Gentens\n * @since 2.2.0\n */\nimport $ from \"jquery\";\nimport {isNullOrUndefined} from \"../utilities\";\n\n/**\n * Holds a control builder with a priority.\n */\nclass EntityQueryPropertyControlItem {\n constructor( entityQueryPropertyControlBuilder, priority ) {\n this.entityQueryPropertyControlBuilder = entityQueryPropertyControlBuilder;\n this.priority = priority;\n if ( isNullOrUndefined( this.priority ) ) {\n this.priority = 0;\n }\n }\n\n getControlBuilder() {\n return this.entityQueryPropertyControlBuilder;\n }\n\n getPriority() {\n return this.priority;\n }\n}\n\n/**\n * Holds the registered EntityQueryPropertyControlBuilders\n */\nclass EntityQueryPropertyControlFactory {\n constructor() {\n this.entityQueryPropertyControlBuilders = [];\n }\n\n /**\n * Registers an EntityQueryPropertyControlBuilder with a given priority.\n * If the priority is not given, it will default to 0.\n * @param propertyControlBuilder\n * @param priority\n */\n register( propertyControlBuilder, priority ) {\n this.entityQueryPropertyControlBuilders.push( new EntityQueryPropertyControlItem( propertyControlBuilder, priority ) );\n this.entityQueryPropertyControlBuilders.sort( ( a, b ) => a.getProperty - b.getPriority );\n }\n\n /**\n * Creates a control for a given node and queryFilterControl\n * @param node to create a control for\n * @param queryFilterControl that needs to be updated by the control\n * @returns {boolean} true if a control is created.\n */\n createControl( node, queryFilterControl ) {\n for ( let i = 0; i < this.entityQueryPropertyControlBuilders.length; i++ ) {\n const control = this.entityQueryPropertyControlBuilders[i].getControlBuilder()( $( node ), queryFilterControl );\n if ( control ) {\n return true;\n }\n }\n return false;\n }\n}\n\nconst entityQueryControlFactory = new EntityQueryPropertyControlFactory();\nexport default entityQueryControlFactory;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {EmbeddedCollection} from '../components/EmbeddedCollection';\nimport {MultiValueAutoSuggest} from '../components/MultiValueAutoSuggest';\n\nexport class EntityModule\n{\n private documentInitialized: boolean = false;\n private initializers: any = [];\n private bootstrapUiModule: any;\n\n constructor()\n {\n this.bootstrapUiModule = (window).BootstrapUiModule;\n }\n\n /**\n * Register an additional initializer that should execute when running initializeFormElements.\n * An initializer is a callback function that will optionally receive the container node as argument.\n *\n * @param callback function to execute\n * @param callIfAlreadyInitialized should the initializer execute immediately if document has been initialized already - defaults to true\n */\n registerInitializer( callback: any, callIfAlreadyInitialized: any )\n {\n this.initializers.push( callback );\n\n const shouldExecute = (callIfAlreadyInitialized === undefined || true === callIfAlreadyInitialized) && this.documentInitialized;\n\n if ( shouldExecute ) {\n callback();\n }\n }\n\n /**\n * Scan for and initialize all known form element types.\n * This will in turn call BootstrapUiModule.initializeFormElements() if called at any time past the initial document initialization.\n *\n * @param node optional parent to limit the scan\n */\n initializeFormElements( node?: any )\n {\n // Dispatch to BootstrapUiModule directly if initial document initialization has happened\n if ( (node !== undefined || this.documentInitialized) && this.bootstrapUiModule && this.bootstrapUiModule.initializeFormElements ) {\n this.bootstrapUiModule.initializeFormElements( node );\n }\n\n if ( node === undefined && !this.documentInitialized ) {\n this.documentInitialized = true;\n }\n\n /**\n * Initialize sortable tables.\n */\n $( '[data-tbl-type=\"paged\"]', node ).emSortableTable();\n\n /**\n * Initialize depends-on conditions between controls.\n */\n $( '[data-dependson]', node ).each( function ( ix, n ) {\n const dependsonConfig = $( this ).data( 'dependson' );\n const options = dependsonConfig['options'] != null ? dependsonConfig['options'] : {hide: false};\n delete dependsonConfig['options'];\n\n $( n ).dependsOn( dependsonConfig, options );\n } );\n\n /**\n * Initialize multi value controls.\n */\n $( '.js-multi-value-control', node ).each( ( ix, element ) => {\n const container = $( element );\n\n container.find( '.js-multi-value-input' ).on( 'keypress', ( e ) => {\n const keyCode = (e.keyCode ? e.keyCode : e.which);\n if ( keyCode === 13 ) {\n e.preventDefault();\n const value = $( e.currentTarget ).val();\n if ( value ) {\n const template = container.find( '.js-multi-value-template' ).clone( false );\n template.removeClass( 'd-none js-multi-value-template' );\n template.addClass( 'js-multi-value-item' );\n\n template.find( '.js-multi-value-value' ).each( ( i: number, node: any ) => {\n node.innerText = value;\n } );\n\n template.find( '[type=hidden]' ).val( value ).removeAttr( 'disabled' );\n container.find( 'table' ).append( template );\n\n template.find( 'a' ).on( 'click', ( clickEvent ) => {\n clickEvent.preventDefault();\n $( clickEvent.currentTarget ).closest( 'tr' ).remove();\n } );\n\n $( e.currentTarget ).val( '' );\n }\n }\n } );\n\n container.find( '.js-multi-value-item a' ).on( 'click', ( clickEvent ) => {\n clickEvent.preventDefault();\n $( clickEvent.currentTarget ).closest( 'tr' ).remove();\n } );\n } );\n\n /**\n * Experimental: initialize embedded collections.\n */\n $( '.js-embedded-collection-form-group', node ).each( ( ix, n ) => new EmbeddedCollection( $( n ) ) );\n\n /**\n * Experimental: initialize multi-value autosuggest.\n */\n $( '.js-multi-value-autosuggest', node ).each( ( ix, n ) => new MultiValueAutoSuggest( $( n ) ) );\n\n /**\n * Initialize tooltips.\n */\n $( '[data-toggle=\"tooltip\"]', node ).tooltip();\n\n // Dispatch to additional initializers\n for ( let i = 0; i < this.initializers.length; i++ ) {\n this.initializers[i]( node );\n }\n }\n}\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport EQType from \"./eq-type\";\nimport {isNullOrUndefined, assertNotNull} from \"../utilities\";\n\n/**\n * Represents a value in an {@link EntityQuery} or {@link EntityQueryCondition}\n * @see com.foreach.across.modules.entity.query.EQValue\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nclass EQValue extends EQType {\n constructor( value ) {\n super();\n assertNotNull( \"EQValue\", \"value\", value );\n this.value = value;\n }\n\n getValue() {\n return this.value;\n }\n\n toString() {\n return this.value.toString();\n }\n\n equals( that ) {\n if ( this.valueOf() === that.valueOf() ) {\n return true;\n }\n if ( isNullOrUndefined( that ) ) {\n return false;\n }\n return this.toString() === that.toString();\n }\n}\n\nexport default EQValue;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport EQType from \"./eq-type\";\nimport {isNullOrUndefined, assertNotNull} from \"../utilities\";\n\n/**\n * Represents a string literal value in an {@link EntityQuery} or {@link EntityQueryCondition}\n * @see com.foreach.across.modules.entity.query.EQString\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nclass EQString extends EQType {\n constructor( value ) {\n super();\n assertNotNull( \"EQString\", \"value\", value );\n this.value = value;\n }\n\n getValue() {\n return this.value;\n }\n\n toString() {\n return `'${this.value.replace( \"'\", \"\\\\'\" )}'`;\n }\n\n equals( that ) {\n if ( this.valueOf() === that.valueOf() ) {\n return true;\n }\n if ( isNullOrUndefined( that ) ) {\n return false;\n }\n return this.toString() === that.toString();\n }\n}\n\nexport default EQString;\n","module.exports = _;","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport EQType from \"./eq-type\";\nimport {isNullOrUndefined, arrayEquals, convertArgsToArray} from \"../utilities\";\n\n/**\n * Represents an group of values in an {@link EntityQuery} or {@link EntityQueryCondition}\n * @see com.foreach.across.modules.entity.query.EQGroup\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nclass EQGroup extends EQType {\n /**\n * The values may be:\n * - an array containing the arguments: [arg1, arg2, arg3]\n * - a single item: arg1\n * - a set of items listed separately: arg1, arg2, arg3\n * @param values the values of the group.\n */\n constructor( ...values ) {\n super();\n this.values = convertArgsToArray( values );\n }\n\n getValues() {\n return this.values;\n }\n\n toString() {\n return `(${this.values.join( \",\" )})`;\n }\n\n equals( that ) {\n if ( this.valueOf() === that.valueOf() ) {\n return true;\n }\n if ( isNullOrUndefined( that ) ) {\n return false;\n }\n return arrayEquals( ...this.values, ...that.values );\n }\n}\n\nexport default EQGroup;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @author Steven Gentens\n * @since 3.3.0\n */\nimport $ from \"jquery\";\nimport {EntityQueryOps} from \"../../entity-query/entity-query-ops\";\nimport EntityQueryCondition from \"../../entity-query/entity-query-condition\";\nimport EQValue from \"../../entity-query/eq-value\";\nimport EQString from \"../../entity-query/eq-string\";\nimport {convertToTypedValue, isEmptyArray, isNullOrUndefined} from \"../../utilities\";\nimport EQGroup from \"../../entity-query/eq-group\";\n\n/**\n * Fetches the arguments for the control elements and transforms them for the specified {@code eqType}.\n *\n * @param eqType of the property\n * @param selectedValues for the property\n * @returns {*} the query arguments.\n */\nfunction convertToEQType( eqType, selectedValues ) {\n const filteredValues = selectedValues.filter( val => val !== '' );\n if ( eqType === 'EQGroup' ) {\n return new EQGroup( filteredValues.map( convertToTypedValue ) );\n }\n\n if ( filteredValues.length !== 0 ) {\n const converted = convertToTypedValue( filteredValues.toString() );\n if ( eqType === 'EQString' && converted instanceof EQValue ) {\n return new EQString( converted.getValue() );\n }\n return converted;\n }\n return null;\n}\n\n/**\n * Sets the entity query condition for a specific property.\n *\n * @param controlElement that holds the entity query attributes as well as the control adapter\n * @param filterControl that the condition should be applied on\n * @param reset whether the filter control should be reset.\n */\nfunction setCondition( controlElement, filterControl, reset = true ) {\n const property = $( controlElement ).data( \"entity-query-property\" );\n const adapter = $( controlElement ).data( \"bootstrapui-adapter\" );\n\n const values = adapter.getValue()\n .map( ( selectedVal ) => {\n const context = $( selectedVal.context );\n if ( context.is( '[data-entity-query-pretty-value]' ) ) {\n return context.data( 'entity-query-pretty-value' );\n }\n return selectedVal.value;\n } );\n\n let condition = null;\n if ( !isEmptyArray( values ) ) {\n const args = convertToEQType( $( controlElement ).data( \"entity-query-type\" ), values );\n\n if ( !isNullOrUndefined( args ) ) {\n const operand = EntityQueryOps[$( controlElement ).data( \"entity-query-operand\" )];\n condition = new EntityQueryCondition( property, operand, args );\n }\n }\n filterControl.setPropertyCondition( property, condition, reset );\n}\n\n/**\n * Creates an EntityQueryControl for a given node.\n *\n * @param control containing the value\n * @param filterControl to receive the condition from the control\n * @returns {boolean} true if a control has been made.\n */\nexport function createDefaultControl( control, filterControl ) {\n if ( !isEmptyArray( control ) ) {\n setCondition( control, filterControl, false );\n const controlAdapter = $( control ).data( 'bootstrapui-adapter' );\n if ( controlAdapter ) {\n $( controlAdapter.getTarget() ).on(\n 'bootstrapui.change',\n {\"item\": $( control ), \"filter\": filterControl},\n event => setCondition( event.data.item, event.data.filter )\n );\n return true;\n }\n }\n return false;\n}\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {arrayEquals, assertNotNull, convertArgsToArray, isNullOrUndefined} from \"../utilities\";\nimport {EntityQueryOps} from \"./entity-query-ops\";\n\n/**\n * Defines an query expression. An EntityQuery is formed by a base operand and query expressions and optionally a sort.\n * The query expressions can be {@link EntityQueryCondition}s and other EntityQueries.\n * @see com.foreach.across.modules.entity.query.EntityQuery;\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nclass EntityQuery {\n constructor( operand ) {\n this.expressions = [];\n this.operand = EntityQueryOps.AND;\n this.sort = null;\n if ( !isNullOrUndefined( operand ) ) {\n this.operand = operand;\n }\n }\n\n setSort( sort ) {\n this.sort = sort;\n }\n\n getSort() {\n return this.sort;\n }\n\n add( expression ) {\n this.expressions.push( expression );\n }\n\n getOperand() {\n return this.operand;\n }\n\n getExpressions() {\n return this.expressions;\n }\n\n /**\n * The expressions may be:\n * - an array containing the arguments: [arg1, arg2, arg3]\n * - a single item: arg1\n * - a set of items listed separately: arg1, arg2, arg3\n * @param expressions for the entity query\n */\n setExpressions( ...expressions ) {\n assertNotNull( \"EntityQuery.setExpressions\", \"expressions\", expressions );\n this.expressions = convertArgsToArray( expressions );\n }\n\n equals( that ) {\n if ( this.valueOf() === that.valueOf() ) {\n return true;\n }\n if ( isNullOrUndefined( that ) || !(that instanceof EntityQuery) ) {\n return false;\n }\n if ( !isNullOrUndefined( this.expressions ) ? !arrayEquals( this.expressions, that.expressions ) : !isNullOrUndefined( that.expressions ) ) {\n return false;\n }\n if ( this.operand !== that.operand ) {\n return false;\n }\n if ( !isNullOrUndefined( this.sort ) ? !this.sort.equals( that.sort ) : !isNullOrUndefined( that.sort ) ) {\n return false;\n }\n return true;\n }\n\n parseSort() {\n return isNullOrUndefined( this.sort ) ? \"\" :\n ` ${this.sort.toString()}`;\n }\n\n toString() {\n return `${this.operand.toString( null, ...this.expressions )}${this.parseSort()}`.trim();\n }\n\n static all( sort ) {\n const query = new EntityQuery();\n if ( !isNullOrUndefined( sort ) ) {\n query.setSort( sort );\n }\n return query;\n }\n\n static create( operand, ...expressions ) {\n const query = new EntityQuery( operand );\n convertArgsToArray( expressions ).forEach( expr => query.add( expr ) );\n return query;\n }\n\n static and( ...expressions ) {\n return this.create( EntityQueryOps.AND, ...expressions );\n }\n\n static or( ...expressions ) {\n return this.create( EntityQueryOps.OR, ...expressions );\n }\n}\n\nexport default EntityQuery;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @author Steven Gentens\n * @since 2.2.0\n */\nimport $ from \"jquery\";\nimport EntityQueryPropertyControlFactory from \"./entity-query-property-control-factory\";\nimport EntityQuery from \"../entity-query/entity-query\";\nimport {isNullOrUndefined} from \"../utilities\";\nimport {EntityQueryOps} from \"../entity-query/entity-query-ops\";\nimport EntityQueryCondition from \"../entity-query/entity-query-condition\";\n\n/**\n * Holds the EntityQuery for a set of controls and updates their corresponding EntityQueryFilter\n */\nclass EntityQueryFilterControl {\n /**\n * @param nodes the set of controls\n * @param eqlFilter the EntityQueryFilter\n */\n constructor( nodes, eqlFilter ) {\n this.conditions = new Map();\n this.entityQuery = null;\n this.eqlFilter = eqlFilter;\n this.initControlFactories( nodes );\n }\n\n resetEntityQuery() {\n this.entityQuery = EntityQuery.and( [...this.conditions.values()] );\n $( this.eqlFilter ).val( this.entityQuery.toString() );\n }\n\n /**\n * Sets the EntityQueryCondition for a given property.\n * If the given condition is null, it will remove the existing condition.\n * @param property to set a condition for\n * @param condition for the given property\n * @param reset whether the entityquery should be reset\n */\n setPropertyCondition( property, condition, reset ) {\n if ( !isNullOrUndefined( condition ) ) {\n let conditionToUse = condition;\n const values = condition.getArguments();\n if ( values.length === 1 && values[0].value === \"NULL\" ) {\n switch ( condition.getOperand() ) {\n case EntityQueryOps.EQ:\n conditionToUse = new EntityQueryCondition( property, EntityQueryOps.IS_NULL, values );\n break;\n case EntityQueryOps.NEQ:\n conditionToUse = new EntityQueryCondition( property, EntityQueryOps.IS_NOT_NULL, values );\n break;\n default:\n break;\n }\n }\n this.conditions.set( property, conditionToUse );\n }\n else if ( this.conditions.has( property ) ) {\n this.conditions.delete( property );\n }\n if ( reset ) {\n this.resetEntityQuery();\n }\n }\n\n initControlFactories( nodes ) {\n nodes.each( ( index, controlNode ) => {\n EntityQueryPropertyControlFactory.createControl( controlNode, this );\n } );\n }\n}\n\nexport default EntityQueryFilterControl;\n","/*\n * Copyright 2014 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {createDefaultControl} from \"./utils/controls/property-control-builders/property-control\";\nimport {isNullOrUndefined} from \"./utils/utilities\";\nimport EntityQueryPropertyControlFactory from \"./utils/controls/entity-query-property-control-factory\";\nimport EntityQueryFilterControl from \"./utils/controls/entity-query-filter-control\";\nimport {EntityModule} from \"./modules/EntityModule\";\nimport {SortableTableEvent} from \"./events/SortableTableEvent\";\n\n/**\n * Initializes an EntityQueryFilterControl for the given node.\n * @param node a container containing an eql filter and controls to filter on.\n */\nfunction initializeEntityQueryForm( node ) {\n const nodes = $( node ).find( \"[data-entity-query-property]\" );\n const eqlFilter = $( node ).find( \"input[name='extensions[eqFilter]']\" );\n const entityQueryFilterControl = new EntityQueryFilterControl( nodes, eqlFilter );\n\n function findShowBasicFilterElement() {\n return $( node ).find( \".js-entity-query-filter-form-show-basic-filter\" );\n }\n\n function toggleFilters( event ) {\n event.preventDefault();\n $( node ).find( \".entity-query-filter-form-basic\" ).toggleClass( \"d-none\" );\n $( node ).find( \".entity-query-filter-form-advanced\" ).toggleClass( \"d-none axu-d-flex\" );\n\n let inputShowBasicFilter = findShowBasicFilterElement();\n if ( $( inputShowBasicFilter ).attr( \"value\" ) === \"true\" ) {\n $( inputShowBasicFilter ).attr( \"value\", false );\n }\n else {\n $( inputShowBasicFilter ).attr( \"value\", true );\n }\n }\n\n $( node ).find( \"a[data-entity-query-filter-form-link]\" ).click( toggleFilters );\n\n $( node ).find( \"button[type=submit]\" ).on( 'click', function( e ) {\n if ( $( findShowBasicFilterElement() ).attr( \"value\" ) === \"true\" ) {\n entityQueryFilterControl.resetEntityQuery();\n }\n $( this ).find( 'span' ).removeClass( 'fas fa-search' ).addClass( 'fa fa-spin fa-spinner' );\n } );\n\n // After submit ajax\n\n // $( node ).find( 'span' ).removeClass( 'fa fa-spin fa-spinner' ).addClass( 'glyphicon glyphicon-search' );\n}\n\n/**\n * Sets the EntityQueryPropertyControlFactory globally.\n */\nif ( !isNullOrUndefined( window ) ) {\n window.EntityQueryPropertyControlFactory = EntityQueryPropertyControlFactory;\n}\n\n/** Initializes each container marked by \"data-entity-query-filter\" as an EntityQueryFilterControl\n * Registers base property control resolvers for control types.\n * @see initializeEntityQueryForm\n */\nwindow.EntityModule.registerInitializer( function( node ) {\n EntityQueryPropertyControlFactory.register( createDefaultControl, 1000 );\n\n $( \"[data-entity-query-filter-form]\" ).each( function() {\n initializeEntityQueryForm( $( this ) );\n } );\n} );\n"],"sourceRoot":""}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy