1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-15 21:06:44 +02:00
TableFilter/doc/dump.json
2015-08-06 15:27:09 +10:00

16084 lines
669 KiB
JSON

[
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/array.js",
"memberof": null,
"longname": "src/array.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * Array utilities\r\n */\r\n\r\nimport Str from './string';\r\n\r\nexport default {\r\n has: function(arr, val, caseSensitive){\r\n let sCase = caseSensitive===undefined ? false : caseSensitive;\r\n for (var i=0; i<arr.length; i++){\r\n if(Str.matchCase(arr[i].toString(), sCase) == val){\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n indexByValue: function(arr, val, caseSensitive){\r\n let sCase = caseSensitive===undefined ? false : caseSensitive;\r\n for (var i=0; i<arr.length; i++){\r\n if(Str.matchCase(arr[i].toString(), sCase) == val){\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }\r\n};\r\n"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/cookie.js",
"memberof": null,
"longname": "src/cookie.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * Cookie utilities\r\n */\r\n\r\nexport default {\r\n\r\n write(name, value, hours){\r\n let expire = '';\r\n if(hours){\r\n expire = new Date((new Date()).getTime() + hours * 3600000);\r\n expire = '; expires=' + expire.toGMTString();\r\n }\r\n document.cookie = name + '=' + escape(value) + expire;\r\n },\r\n\r\n read(name){\r\n let cookieValue = '',\r\n search = name + '=';\r\n if(document.cookie.length > 0){\r\n let cookie = document.cookie,\r\n offset = cookie.indexOf(search);\r\n if(offset !== -1){\r\n offset += search.length;\r\n let end = cookie.indexOf(';', offset);\r\n if(end === -1){\r\n end = cookie.length;\r\n }\r\n cookieValue = unescape(cookie.substring(offset, end));\r\n }\r\n }\r\n return cookieValue;\r\n },\r\n\r\n remove(name){\r\n this.write(name, '', -1);\r\n },\r\n\r\n valueToArray(name, separator){\r\n if(!separator){\r\n separator = ',';\r\n }\r\n //reads the cookie\r\n let val = this.read(name);\r\n //creates an array with filters' values\r\n let arr = val.split(separator);\r\n return arr;\r\n },\r\n\r\n getValueByIndex(name, index, separator){\r\n if(!separator){\r\n separator = ',';\r\n }\r\n //reads the cookie\r\n let val = this.valueToArray(name, separator);\r\n return val[index];\r\n }\r\n\r\n};\r\n"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/date.js",
"memberof": null,
"longname": "src/date.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * Date utilities\r\n */\r\n\r\nexport default {\r\n isValid(dateStr, format){\r\n if(!format) {\r\n format = 'DMY';\r\n }\r\n format = format.toUpperCase();\r\n if(format.length != 3) {\r\n if(format==='DDMMMYYYY'){\r\n let d = this.format(dateStr, format);\r\n dateStr = d.getDate() +'/'+ (d.getMonth()+1) +'/'+\r\n d.getFullYear();\r\n format = 'DMY';\r\n }\r\n }\r\n if((format.indexOf('M') === -1) || (format.indexOf('D') === -1) ||\r\n (format.indexOf('Y') === -1)){\r\n format = 'DMY';\r\n }\r\n let reg1, reg2;\r\n // If the year is first\r\n if(format.substring(0, 1) == 'Y') {\r\n reg1 = /^\\d{2}(\\-|\\/|\\.)\\d{1,2}\\1\\d{1,2}$/;\r\n reg2 = /^\\d{4}(\\-|\\/|\\.)\\d{1,2}\\1\\d{1,2}$/;\r\n } else if(format.substring(1, 2) == 'Y') { // If the year is second\r\n reg1 = /^\\d{1,2}(\\-|\\/|\\.)\\d{2}\\1\\d{1,2}$/;\r\n reg2 = /^\\d{1,2}(\\-|\\/|\\.)\\d{4}\\1\\d{1,2}$/;\r\n } else { // The year must be third\r\n reg1 = /^\\d{1,2}(\\-|\\/|\\.)\\d{1,2}\\1\\d{2}$/;\r\n reg2 = /^\\d{1,2}(\\-|\\/|\\.)\\d{1,2}\\1\\d{4}$/;\r\n }\r\n // If it doesn't conform to the right format (with either a 2 digit year\r\n // or 4 digit year), fail\r\n if(reg1.test(dateStr) === false && reg2.test(dateStr) === false) {\r\n return false;\r\n }\r\n // Split into 3 parts based on what the divider was\r\n let parts = dateStr.split(RegExp.$1);\r\n let mm, dd, yy;\r\n // Check to see if the 3 parts end up making a valid date\r\n if(format.substring(0, 1) === 'M'){\r\n mm = parts[0];\r\n } else if(format.substring(1, 2) === 'M'){\r\n mm = parts[1];\r\n } else {\r\n mm = parts[2];\r\n }\r\n if(format.substring(0, 1) === 'D'){\r\n dd = parts[0];\r\n } else if(format.substring(1, 2) === 'D'){\r\n dd = parts[1];\r\n } else {\r\n dd = parts[2];\r\n }\r\n if(format.substring(0, 1) === 'Y'){\r\n yy = parts[0];\r\n } else if(format.substring(1, 2) === 'Y'){\r\n yy = parts[1];\r\n } else {\r\n yy = parts[2];\r\n }\r\n if(parseInt(yy, 10) <= 50){\r\n yy = (parseInt(yy, 10) + 2000).toString();\r\n }\r\n if(parseInt(yy, 10) <= 99){\r\n yy = (parseInt(yy, 10) + 1900).toString();\r\n }\r\n let dt = new Date(\r\n parseInt(yy, 10), parseInt(mm, 10)-1, parseInt(dd, 10),\r\n 0, 0, 0, 0);\r\n if(parseInt(dd, 10) != dt.getDate()){\r\n return false;\r\n }\r\n if(parseInt(mm, 10)-1 != dt.getMonth()){\r\n return false;\r\n }\r\n return true;\r\n },\r\n format(dateStr, formatStr) {\r\n if(!formatStr){\r\n formatStr = 'DMY';\r\n }\r\n if(!dateStr || dateStr === ''){\r\n return new Date(1001, 0, 1);\r\n }\r\n let oDate;\r\n let parts;\r\n\r\n switch(formatStr.toUpperCase()){\r\n case 'DDMMMYYYY':\r\n parts = dateStr.replace(/[- \\/.]/g,' ').split(' ');\r\n oDate = new Date(y2kDate(parts[2]),mmm2mm(parts[1])-1,parts[0]);\r\n break;\r\n case 'DMY':\r\n /* jshint ignore:start */\r\n parts = dateStr.replace(\r\n /^(0?[1-9]|[12][0-9]|3[01])([- \\/.])(0?[1-9]|1[012])([- \\/.])((\\d\\d)?\\d\\d)$/,'$1 $3 $5').split(' ');\r\n oDate = new Date(y2kDate(parts[2]),parts[1]-1,parts[0]);\r\n /* jshint ignore:end */\r\n break;\r\n case 'MDY':\r\n /* jshint ignore:start */\r\n parts = dateStr.replace(\r\n /^(0?[1-9]|1[012])([- \\/.])(0?[1-9]|[12][0-9]|3[01])([- \\/.])((\\d\\d)?\\d\\d)$/,'$1 $3 $5').split(' ');\r\n oDate = new Date(y2kDate(parts[2]),parts[0]-1,parts[1]);\r\n /* jshint ignore:end */\r\n break;\r\n case 'YMD':\r\n /* jshint ignore:start */\r\n parts = dateStr.replace(/^((\\d\\d)?\\d\\d)([- \\/.])(0?[1-9]|1[012])([- \\/.])(0?[1-9]|[12][0-9]|3[01])$/,'$1 $4 $6').split(' ');\r\n oDate = new Date(y2kDate(parts[0]),parts[1]-1,parts[2]);\r\n /* jshint ignore:end */\r\n break;\r\n default: //in case format is not correct\r\n /* jshint ignore:start */\r\n parts = dateStr.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \\/.])(0?[1-9]|1[012])([- \\/.])((\\d\\d)?\\d\\d)$/,'$1 $3 $5').split(' ');\r\n oDate = new Date(y2kDate(parts[2]),parts[1]-1,parts[0]);\r\n /* jshint ignore:end */\r\n break;\r\n }\r\n return oDate;\r\n }\r\n};\r\n\r\nfunction y2kDate(yr){\r\n if(yr === undefined){\r\n return 0;\r\n }\r\n if(yr.length>2){\r\n return yr;\r\n }\r\n let y;\r\n //>50 belong to 1900\r\n if(yr <= 99 && yr>50){\r\n y = '19' + yr;\r\n }\r\n //<50 belong to 2000\r\n if(yr<50 || yr === '00'){\r\n y = '20' + yr;\r\n }\r\n return y;\r\n}\r\n\r\nfunction mmm2mm(mmm){\r\n if(mmm === undefined){\r\n return 0;\r\n }\r\n let mondigit;\r\n let MONTH_NAMES = [\r\n 'january','february','march','april','may','june','july',\r\n 'august','september','october','november','december',\r\n 'jan','feb','mar','apr','may','jun','jul','aug','sep','oct',\r\n 'nov','dec'\r\n ];\r\n for(let m_i=0; m_i < MONTH_NAMES.length; m_i++){\r\n let month_name = MONTH_NAMES[m_i];\r\n if (mmm.toLowerCase() === month_name){\r\n mondigit = m_i+1;\r\n break;\r\n }\r\n }\r\n if(mondigit > 11 || mondigit < 23){\r\n mondigit = mondigit - 12;\r\n }\r\n if(mondigit < 1 || mondigit > 12){\r\n return 0;\r\n }\r\n return mondigit;\r\n}\r\n"
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "y2kDate",
"memberof": "src/date.js",
"longname": "src/date.js~y2kDate",
"access": null,
"export": false,
"importPath": "TableFilter/src/date.js",
"importStyle": null,
"description": null,
"lineNumber": 128,
"undocument": true,
"params": [
{
"name": "yr",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "mmm2mm",
"memberof": "src/date.js",
"longname": "src/date.js~mmm2mm",
"access": null,
"export": false,
"importPath": "TableFilter/src/date.js",
"importStyle": null,
"description": null,
"lineNumber": 147,
"undocument": true,
"params": [
{
"name": "mmm",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/dom.js",
"memberof": null,
"longname": "src/dom.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * DOM utilities\r\n */\r\n\r\nexport default {\r\n\r\n /**\r\n * Returns text + text of children of given node\r\n * @param {NodeElement} node\r\n * @return {String}\r\n */\r\n getText(node){\r\n let s = node.textContent || node.innerText ||\r\n node.innerHTML.replace(/<[^<>]+>/g, '');\r\n s = s.replace(/^\\s+/, '').replace(/\\s+$/, '');\r\n return s;\r\n },\r\n\r\n /**\r\n * Creates an html element with given collection of attributes\r\n * @param {String} tag a string of the html tag to create\r\n * @param {Array} an undetermined number of arrays containing the with 2\r\n * items, the attribute name and its value ['id','myId']\r\n * @return {Object} created element\r\n */\r\n create(tag){\r\n if(!tag || tag===''){\r\n return;\r\n }\r\n\r\n let el = document.createElement(tag),\r\n args = arguments;\r\n\r\n if(args.length > 1){\r\n for(let i=0; i<args.length; i++){\r\n let argtype = typeof args[i];\r\n if(argtype.toLowerCase() === 'object' && args[i].length === 2){\r\n el.setAttribute(args[i][0], args[i][1]);\r\n }\r\n }\r\n }\r\n return el;\r\n },\r\n\r\n /**\r\n * Returns a text node with given text\r\n * @param {String} txt\r\n * @return {Object}\r\n */\r\n text(txt){\r\n return document.createTextNode(txt);\r\n },\r\n\r\n hasClass(ele, cls){\r\n if(!ele){ return false; }\r\n\r\n if(supportsClassList()){\r\n return ele.classList.contains(cls);\r\n }\r\n return ele.className.match(new RegExp('(\\\\s|^)'+ cls +'(\\\\s|$)'));\r\n },\r\n\r\n addClass(ele, cls){\r\n if(!ele){ return; }\r\n\r\n if(supportsClassList()){\r\n ele.classList.add(cls);\r\n return;\r\n }\r\n\r\n if(ele.className === ''){\r\n ele.className = cls;\r\n }\r\n else if(!this.hasClass(ele, cls)){\r\n ele.className += ' ' + cls;\r\n }\r\n },\r\n\r\n removeClass(ele, cls){\r\n if(!ele){ return; }\r\n\r\n if(supportsClassList()){\r\n ele.classList.remove(cls);\r\n return;\r\n }\r\n let reg = new RegExp('(\\\\s|^)'+ cls +'(\\\\s|$)', 'g');\r\n ele.className = ele.className.replace(reg, '');\r\n },\r\n\r\n /**\r\n * Creates and returns an option element\r\n * @param {String} text option text\r\n * @param {String} value option value\r\n * @param {Boolean} isSel whether option is selected\r\n * @return {Object} option element\r\n */\r\n createOpt(text, value, isSel){\r\n let isSelected = isSel ? true : false,\r\n opt = isSelected ?\r\n this.create('option', ['value',value], ['selected','true']) :\r\n this.create('option', ['value',value]);\r\n opt.appendChild(this.text(text));\r\n return opt;\r\n },\r\n\r\n /**\r\n * Creates and returns a checklist item\r\n * @param {Number} chkIndex index of check item\r\n * @param {String} chkValue check item value\r\n * @param {String} labelText check item label text\r\n * @return {Object} li DOM element\r\n */\r\n createCheckItem(chkIndex, chkValue, labelText){\r\n let li = this.create('li'),\r\n label = this.create('label', ['for', chkIndex]),\r\n check = this.create('input',\r\n ['id', chkIndex],\r\n ['name', chkIndex],\r\n ['type', 'checkbox'],\r\n ['value', chkValue]\r\n );\r\n label.appendChild(check);\r\n label.appendChild(this.text(labelText));\r\n li.appendChild(label);\r\n li.label = label;\r\n li.check = check;\r\n return li;\r\n },\r\n\r\n id(_id){\r\n return document.getElementById(_id);\r\n },\r\n\r\n tag(o, tagname){\r\n return o.getElementsByTagName(tagname);\r\n }\r\n};\r\n\r\n// HTML5 classList API\r\nfunction supportsClassList(){\r\n return document.documentElement.classList;\r\n}\r\n"
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "supportsClassList",
"memberof": "src/dom.js",
"longname": "src/dom.js~supportsClassList",
"access": null,
"export": false,
"importPath": "TableFilter/src/dom.js",
"importStyle": null,
"description": null,
"lineNumber": 140,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/event.js",
"memberof": null,
"longname": "src/event.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * DOM event utilities\r\n */\r\n\r\nexport default {\r\n add(obj, type, func, capture){\r\n if(obj.addEventListener){\r\n obj.addEventListener(type, func, capture);\r\n }\r\n else if(obj.attachEvent){\r\n obj.attachEvent('on'+type, func);\r\n } else {\r\n obj['on'+type] = func;\r\n }\r\n },\r\n remove(obj, type, func, capture){\r\n if(obj.detachEvent){\r\n obj.detachEvent('on'+type,func);\r\n }\r\n else if(obj.removeEventListener){\r\n obj.removeEventListener(type, func, capture);\r\n } else {\r\n obj['on'+type] = null;\r\n }\r\n },\r\n stop(evt){\r\n if(!evt){\r\n evt = window.event;\r\n }\r\n if(evt.stopPropagation){\r\n evt.stopPropagation();\r\n } else {\r\n evt.cancelBubble = true;\r\n }\r\n },\r\n cancel(evt){\r\n if(!evt){\r\n evt = window.event;\r\n }\r\n if(evt.preventDefault) {\r\n evt.preventDefault();\r\n } else {\r\n evt.returnValue = false;\r\n }\r\n },\r\n target(evt){\r\n return (evt && evt.target) || (window.event && window.event.srcElement);\r\n },\r\n keyCode(evt){\r\n return evt.charCode ? evt.charCode :\r\n (evt.keyCode ? evt.keyCode: (evt.which ? evt.which : 0));\r\n }\r\n};\r\n"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/extensions/advancedGrid/adapterEzEditTable.js",
"memberof": null,
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../../dom';\r\nimport Arr from '../../array';\r\n\r\nexport default class AdapterEzEditTable {\r\n /**\r\n * Adapter module for ezEditTable, an external library providing advanced\r\n * grid features (selection and edition):\r\n * http://codecanyon.net/item/ezedittable-enhance-html-tables/2425123?ref=koalyptus\r\n *\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf, cfg){\r\n // ezEditTable config\r\n this.initialized = false;\r\n this.desc = cfg.description || 'ezEditTable adapter';\r\n this.filename = cfg.filename || 'ezEditTable.js';\r\n this.vendorPath = cfg.vendor_path;\r\n this.loadStylesheet = Boolean(cfg.load_stylesheet);\r\n this.stylesheet = cfg.stylesheet || this.vendorPath + 'ezEditTable.css';\r\n this.stylesheetName = cfg.stylesheet_name || 'ezEditTableCss';\r\n this.err = 'Failed to instantiate EditTable object.\\n\"ezEditTable\" ' +\r\n 'dependency not found.';\r\n\r\n this._ezEditTable = null;\r\n this.cfg = cfg;\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * Conditionally load ezEditTable library and set advanced grid\r\n * @return {[type]} [description]\r\n */\r\n init(){\r\n var tf = this.tf;\r\n if(window.EditTable){\r\n this._setAdvancedGrid();\r\n } else {\r\n var path = this.vendorPath + this.filename;\r\n tf.import(this.filename, path, ()=> { this._setAdvancedGrid(); });\r\n }\r\n if(this.loadStylesheet && !tf.isImported(this.stylesheet, 'link')){\r\n tf.import(this.stylesheetName, this.stylesheet, null, 'link');\r\n }\r\n }\r\n\r\n /**\r\n * Instantiate ezEditTable component for advanced grid features\r\n */\r\n _setAdvancedGrid(){\r\n var tf = this.tf;\r\n\r\n //start row for EditTable constructor needs to be calculated\r\n var startRow,\r\n cfg = this.cfg,\r\n thead = Dom.tag(tf.tbl, 'thead');\r\n\r\n //if thead exists and startRow not specified, startRow is calculated\r\n //automatically by EditTable\r\n if(thead.length > 0 && !cfg.startRow){\r\n startRow = undefined;\r\n }\r\n //otherwise startRow config property if any or TableFilter refRow\r\n else{\r\n startRow = cfg.startRow || tf.refRow;\r\n }\r\n\r\n cfg.base_path = cfg.base_path || tf.basePath + 'ezEditTable/';\r\n var editable = cfg.editable;\r\n var selectable = cfg.selection;\r\n\r\n if(selectable){\r\n cfg.default_selection = cfg.default_selection || 'row';\r\n }\r\n //CSS Styles\r\n cfg.active_cell_css = cfg.active_cell_css || 'ezETSelectedCell';\r\n\r\n var _lastValidRowIndex = 0;\r\n var _lastRowIndex = 0;\r\n\r\n if(selectable){\r\n //Row navigation needs to be calculated according to TableFilter's\r\n //validRowsIndex array\r\n var onAfterSelection = function(et, selectedElm, e){\r\n var slc = et.Selection;\r\n //Next valid filtered row needs to be selected\r\n var doSelect = function(nextRowIndex){\r\n if(et.defaultSelection === 'row'){\r\n slc.SelectRowByIndex(nextRowIndex);\r\n } else {\r\n et.ClearSelections();\r\n var cellIndex = selectedElm.cellIndex,\r\n row = tf.tbl.rows[nextRowIndex];\r\n if(et.defaultSelection === 'both'){\r\n slc.SelectRowByIndex(nextRowIndex);\r\n }\r\n if(row){\r\n slc.SelectCell(row.cells[cellIndex]);\r\n }\r\n }\r\n //Table is filtered\r\n if(tf.validRowsIndex.length !== tf.getRowsNb()){\r\n var r = tf.tbl.rows[nextRowIndex];\r\n if(r){\r\n r.scrollIntoView(false);\r\n }\r\n if(cell){\r\n if(cell.cellIndex === (tf.getCellsNb()-1) &&\r\n tf.gridLayout){\r\n tf.tblCont.scrollLeft = 100000000;\r\n }\r\n else if(cell.cellIndex===0 && tf.gridLayout){\r\n tf.tblCont.scrollLeft = 0;\r\n } else {\r\n cell.scrollIntoView(false);\r\n }\r\n }\r\n }\r\n };\r\n\r\n //table is not filtered\r\n if(!tf.validRowsIndex){\r\n return;\r\n }\r\n var validIndexes = tf.validRowsIndex,\r\n validIdxLen = validIndexes.length,\r\n row = et.defaultSelection !== 'row' ?\r\n selectedElm.parentNode : selectedElm,\r\n //cell for default_selection = 'both' or 'cell'\r\n cell = selectedElm.nodeName==='TD' ? selectedElm : null,\r\n keyCode = e !== undefined ? et.Event.GetKey(e) : 0,\r\n isRowValid = Arr.has(validIndexes, row.rowIndex),\r\n nextRowIndex,\r\n //pgup/pgdown keys\r\n d = (keyCode === 34 || keyCode === 33 ?\r\n (tf.feature('paging').pagingLength ||\r\n et.nbRowsPerPage) : 1);\r\n\r\n //If next row is not valid, next valid filtered row needs to be\r\n //calculated\r\n if(!isRowValid){\r\n //Selection direction up/down\r\n if(row.rowIndex>_lastRowIndex){\r\n //last row\r\n if(row.rowIndex >= validIndexes[validIdxLen-1]){\r\n nextRowIndex = validIndexes[validIdxLen-1];\r\n } else {\r\n var calcRowIndex = (_lastValidRowIndex + d);\r\n if(calcRowIndex > (validIdxLen-1)){\r\n nextRowIndex = validIndexes[validIdxLen-1];\r\n } else {\r\n nextRowIndex = validIndexes[calcRowIndex];\r\n }\r\n }\r\n } else{\r\n //first row\r\n if(row.rowIndex <= validIndexes[0]){\r\n nextRowIndex = validIndexes[0];\r\n } else {\r\n var v = validIndexes[_lastValidRowIndex - d];\r\n nextRowIndex = v ? v : validIndexes[0];\r\n }\r\n }\r\n _lastRowIndex = row.rowIndex;\r\n doSelect(nextRowIndex);\r\n } else {\r\n //If filtered row is valid, special calculation for\r\n //pgup/pgdown keys\r\n if(keyCode!==34 && keyCode!==33){\r\n _lastValidRowIndex = Arr.indexByValue(validIndexes,\r\n row.rowIndex);\r\n _lastRowIndex = row.rowIndex;\r\n } else {\r\n if(keyCode === 34){ //pgdown\r\n //last row\r\n if((_lastValidRowIndex + d) <= (validIdxLen-1)){\r\n nextRowIndex = validIndexes[\r\n _lastValidRowIndex + d];\r\n } else {\r\n nextRowIndex = [validIdxLen-1];\r\n }\r\n } else { //pgup\r\n //first row\r\n if((_lastValidRowIndex - d) <= validIndexes[0]){\r\n nextRowIndex = validIndexes[0];\r\n } else {\r\n nextRowIndex = validIndexes[\r\n _lastValidRowIndex - d];\r\n }\r\n }\r\n _lastRowIndex = nextRowIndex;\r\n _lastValidRowIndex = Arr.indexByValue(validIndexes,\r\n nextRowIndex);\r\n doSelect(nextRowIndex);\r\n }\r\n }\r\n };\r\n\r\n //Page navigation has to be enforced whenever selected row is out of\r\n //the current page range\r\n var onBeforeSelection = function(et, selectedElm){\r\n var row = et.defaultSelection !== 'row' ?\r\n selectedElm.parentNode : selectedElm;\r\n if(tf.paging){\r\n if(tf.feature('paging').nbPages > 1){\r\n var paging = tf.feature('paging');\r\n //page length is re-assigned in case it has changed\r\n et.nbRowsPerPage = paging.pagingLength;\r\n var validIndexes = tf.validRowsIndex,\r\n validIdxLen = validIndexes.length,\r\n pagingEndRow = parseInt(paging.startPagingRow, 10) +\r\n parseInt(paging.pagingLength, 10);\r\n var rowIndex = row.rowIndex;\r\n\r\n if((rowIndex === validIndexes[validIdxLen-1]) &&\r\n paging.currentPageNb!==paging.nbPages){\r\n paging.setPage('last');\r\n }\r\n else if((rowIndex == validIndexes[0]) &&\r\n paging.currentPageNb!==1){\r\n paging.setPage('first');\r\n }\r\n else if(rowIndex > validIndexes[pagingEndRow-1] &&\r\n rowIndex < validIndexes[validIdxLen-1]){\r\n paging.setPage('next');\r\n }\r\n else if(\r\n rowIndex < validIndexes[paging.startPagingRow] &&\r\n rowIndex > validIndexes[0]){\r\n paging.setPage('previous');\r\n }\r\n }\r\n }\r\n };\r\n\r\n //Selected row needs to be visible when paging is activated\r\n if(tf.paging){\r\n tf.feature('paging').onAfterChangePage = function(paging){\r\n var advGrid = paging.tf.extension('advancedGrid');\r\n var et = advGrid._ezEditTable;\r\n var slc = et.Selection;\r\n var row = slc.GetActiveRow();\r\n if(row){\r\n row.scrollIntoView(false);\r\n }\r\n var cell = slc.GetActiveCell();\r\n if(cell){\r\n cell.scrollIntoView(false);\r\n }\r\n };\r\n }\r\n\r\n //Rows navigation when rows are filtered is performed with the\r\n //EditTable row selection callback events\r\n if(cfg.default_selection==='row'){\r\n var fnB = cfg.on_before_selected_row;\r\n cfg.on_before_selected_row = function(){\r\n onBeforeSelection(arguments[0], arguments[1], arguments[2]);\r\n if(fnB){\r\n fnB.call(\r\n null, arguments[0], arguments[1], arguments[2]);\r\n }\r\n };\r\n var fnA = cfg.on_after_selected_row;\r\n cfg.on_after_selected_row = function(){\r\n onAfterSelection(arguments[0], arguments[1], arguments[2]);\r\n if(fnA){\r\n fnA.call(\r\n null, arguments[0], arguments[1], arguments[2]);\r\n }\r\n };\r\n } else {\r\n var fnD = cfg.on_before_selected_cell;\r\n cfg.on_before_selected_cell = function(){\r\n onBeforeSelection(arguments[0], arguments[1], arguments[2]);\r\n if(fnD){\r\n fnD.call(\r\n null, arguments[0], arguments[1], arguments[2]);\r\n }\r\n };\r\n var fnC = cfg.on_after_selected_cell;\r\n cfg.on_after_selected_cell = function(){\r\n onAfterSelection(arguments[0], arguments[1], arguments[2]);\r\n if(fnC){\r\n fnC.call(\r\n null, arguments[0], arguments[1], arguments[2]);\r\n }\r\n };\r\n }\r\n }\r\n if(editable){\r\n //Added or removed rows, TF rows number needs to be re-calculated\r\n var fnE = cfg.on_added_dom_row;\r\n cfg.on_added_dom_row = function(){\r\n tf.nbFilterableRows++;\r\n if(!tf.paging){\r\n tf.feature('rowsCounter').refresh();\r\n } else {\r\n tf.nbRows++;\r\n tf.nbVisibleRows++;\r\n tf.nbFilterableRows++;\r\n tf.paging=false;\r\n tf.feature('paging').destroy();\r\n tf.feature('paging').reset();\r\n }\r\n if(tf.alternateBgs){\r\n tf.feature('alternateRows').init();\r\n }\r\n if(fnE){\r\n fnE.call(null, arguments[0], arguments[1], arguments[2]);\r\n }\r\n };\r\n if(cfg.actions && cfg.actions['delete']){\r\n var fnF = cfg.actions['delete'].on_after_submit;\r\n cfg.actions['delete'].on_after_submit = function(){\r\n tf.nbFilterableRows--;\r\n if(!tf.paging){\r\n tf.feature('rowsCounter').refresh();\r\n } else {\r\n tf.nbRows--;\r\n tf.nbVisibleRows--;\r\n tf.nbFilterableRows--;\r\n tf.paging=false;\r\n tf.feature('paging').destroy();\r\n tf.feature('paging').reset(false);\r\n }\r\n if(tf.alternateBgs){\r\n tf.feature('alternateRows').init();\r\n }\r\n if(fnF){\r\n fnF.call(null, arguments[0], arguments[1]);\r\n }\r\n };\r\n }\r\n }\r\n\r\n try{\r\n this._ezEditTable = new EditTable(tf.id, cfg, startRow);\r\n this._ezEditTable.Init();\r\n } catch(e) { throw new Error(this.err); }\r\n\r\n this.initialized = true;\r\n }\r\n\r\n /**\r\n * Reset advanced grid when previously removed\r\n */\r\n reset(){\r\n var ezEditTable = this._ezEditTable;\r\n if(ezEditTable){\r\n if(this.cfg.selection){\r\n ezEditTable.Selection.Set();\r\n }\r\n if(this.cfg.editable){\r\n ezEditTable.Editable.Set();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Remove advanced grid\r\n */\r\n destroy(){\r\n var ezEditTable = this._ezEditTable;\r\n if(ezEditTable){\r\n if(this.cfg.selection){\r\n ezEditTable.Selection.ClearSelections();\r\n ezEditTable.Selection.Remove();\r\n }\r\n if(this.cfg.editable){\r\n ezEditTable.Editable.Remove();\r\n }\r\n }\r\n this.initialized = false;\r\n }\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "AdapterEzEditTable",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"access": null,
"export": true,
"importPath": "TableFilter/src/extensions/advancedGrid/adapterEzEditTable.js",
"importStyle": "AdapterEzEditTable",
"description": null,
"lineNumber": 4,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#constructor",
"access": null,
"description": "Adapter module for ezEditTable, an external library providing advanced\ngrid features (selection and edition):\nhttp://codecanyon.net/item/ezedittable-enhance-html-tables/2425123?ref=koalyptus",
"lineNumber": 12,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#initialized",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "desc",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#desc",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "filename",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#filename",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "vendorPath",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#vendorPath",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loadStylesheet",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#loadStylesheet",
"access": null,
"description": null,
"lineNumber": 18,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheet",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#stylesheet",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheetName",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#stylesheetName",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "err",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#err",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "_ezEditTable",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#_ezEditTable",
"access": null,
"description": null,
"lineNumber": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "cfg",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#cfg",
"access": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#tf",
"access": null,
"description": null,
"lineNumber": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#init",
"access": null,
"description": "Conditionally load ezEditTable library and set advanced grid",
"lineNumber": 33,
"params": [],
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_setAdvancedGrid",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#_setAdvancedGrid",
"access": null,
"description": "Instantiate ezEditTable component for advanced grid features",
"lineNumber": 49,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "_ezEditTable",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#_ezEditTable",
"access": null,
"description": null,
"lineNumber": 337,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#initialized",
"access": null,
"description": null,
"lineNumber": 341,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "reset",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#reset",
"access": null,
"description": "Reset advanced grid when previously removed",
"lineNumber": 347,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#destroy",
"access": null,
"description": "Remove advanced grid",
"lineNumber": 362,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#initialized",
"access": null,
"description": null,
"lineNumber": 373,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/extensions/advancedGrid/advancedGrid.js",
"memberof": null,
"longname": "src/extensions/advancedGrid/advancedGrid.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import AdapterEzEditTable from './adapterEzEditTable';\r\n\r\nexport default AdapterEzEditTable;"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/extensions/colOps/colOps.js",
"memberof": null,
"longname": "src/extensions/colOps/colOps.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../../dom';\r\nimport Str from '../../string';\r\nimport Types from '../../types';\r\n\r\nexport default class ColOps{\r\n\r\n /**\r\n * Column calculations\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf, opts) {\r\n\r\n //calls function before col operation\r\n this.onBeforeOperation = Types.isFn(opts.on_before_operation) ?\r\n opts.on_before_operation : null;\r\n //calls function after col operation\r\n this.onAfterOperation = Types.isFn(opts.on_after_operation) ?\r\n opts.on_after_operation : null;\r\n\r\n this.opts = opts;\r\n this.tf = tf;\r\n }\r\n\r\n init(){\r\n this.calc();\r\n }\r\n\r\n /**\r\n * Calculates columns' values\r\n * Configuration options are stored in 'opts' property\r\n * - 'id' contains ids of elements showing result (array)\r\n * - 'col' contains the columns' indexes (array)\r\n * - 'operation' contains operation type (array, values: 'sum', 'mean',\r\n * 'min', 'max', 'median', 'q1', 'q3')\r\n * - 'write_method' array defines which method to use for displaying the\r\n * result (innerHTML, setValue, createTextNode) - default: 'innerHTML'\r\n * - 'tot_row_index' defines in which row results are displayed\r\n * (integers array)\r\n *\r\n * - changes made by Nuovella:\r\n * (1) optimized the routine (now it will only process each column once),\r\n * (2) added calculations for the median, lower and upper quartile.\r\n */\r\n calc() {\r\n var tf = this.tf;\r\n if(!tf.isFirstLoad && !tf.hasGrid()){\r\n return;\r\n }\r\n\r\n if(this.onBeforeOperation){\r\n this.onBeforeOperation.call(null, tf);\r\n }\r\n\r\n var opts = this.opts,\r\n labelId = opts.id,\r\n colIndex = opts.col,\r\n operation = opts.operation,\r\n outputType = opts.write_method,\r\n totRowIndex = opts.tot_row_index,\r\n excludeRow = opts.exclude_row,\r\n decimalPrecision = Types.isUndef(opts.decimal_precision) ?\r\n 2 : opts.decimal_precision;\r\n\r\n //nuovella: determine unique list of columns to operate on\r\n var ucolIndex = [],\r\n ucolMax = 0;\r\n ucolIndex[ucolMax] = colIndex[0];\r\n\r\n for(var ii=1; ii<colIndex.length; ii++){\r\n var saved = 0;\r\n //see if colIndex[ii] is already in the list of unique indexes\r\n for(var jj=0; jj<=ucolMax; jj++){\r\n if(ucolIndex[jj] === colIndex[ii]){\r\n saved = 1;\r\n }\r\n }\r\n //if not saved then, save the index;\r\n if (saved === 0){\r\n ucolMax++;\r\n ucolIndex[ucolMax] = colIndex[ii];\r\n }\r\n }\r\n\r\n if(Str.lower(typeof labelId)=='object' &&\r\n Str.lower(typeof colIndex)=='object' &&\r\n Str.lower(typeof operation)=='object'){\r\n var rows = tf.tbl.rows,\r\n colvalues = [];\r\n\r\n for(var ucol=0; ucol<=ucolMax; ucol++){\r\n //this retrieves col values\r\n //use ucolIndex because we only want to pass through this loop\r\n //once for each column get the values in this unique column\r\n colvalues.push(\r\n tf.getColValues(ucolIndex[ucol], true, excludeRow));\r\n\r\n //next: calculate all operations for this column\r\n var result,\r\n nbvalues=0,\r\n temp,\r\n meanValue=0,\r\n sumValue=0,\r\n minValue=null,\r\n maxValue=null,\r\n q1Value=null,\r\n medValue=null,\r\n q3Value=null,\r\n meanFlag=0,\r\n sumFlag=0,\r\n minFlag=0,\r\n maxFlag=0,\r\n q1Flag=0,\r\n medFlag=0,\r\n q3Flag=0,\r\n theList=[],\r\n opsThisCol=[],\r\n decThisCol=[],\r\n labThisCol=[],\r\n oTypeThisCol=[],\r\n mThisCol=-1;\r\n\r\n for(var k=0; k<colIndex.length; k++){\r\n if(colIndex[k] === ucolIndex[ucol]){\r\n mThisCol++;\r\n opsThisCol[mThisCol]=Str.lower(operation[k]);\r\n decThisCol[mThisCol]=decimalPrecision[k];\r\n labThisCol[mThisCol]=labelId[k];\r\n oTypeThisCol = outputType !== undefined &&\r\n Str.lower(typeof outputType)==='object' ?\r\n outputType[k] : null;\r\n\r\n switch(opsThisCol[mThisCol]){\r\n case 'mean':\r\n meanFlag=1;\r\n break;\r\n case 'sum':\r\n sumFlag=1;\r\n break;\r\n case 'min':\r\n minFlag=1;\r\n break;\r\n case 'max':\r\n maxFlag=1;\r\n break;\r\n case 'median':\r\n medFlag=1;\r\n break;\r\n case 'q1':\r\n q1Flag=1;\r\n break;\r\n case 'q3':\r\n q3Flag=1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n for(var j=0; j<colvalues[ucol].length; j++){\r\n //sort the list for calculation of median and quartiles\r\n if((q1Flag==1)|| (q3Flag==1) || (medFlag==1)){\r\n if (j<colvalues[ucol].length -1){\r\n for(k=j+1; k<colvalues[ucol].length; k++) {\r\n if(eval(colvalues[ucol][k]) <\r\n eval(colvalues[ucol][j])){\r\n temp = colvalues[ucol][j];\r\n colvalues[ucol][j] = colvalues[ucol][k];\r\n colvalues[ucol][k] = temp;\r\n }\r\n }\r\n }\r\n }\r\n var cvalue = parseFloat(colvalues[ucol][j]);\r\n theList[j] = parseFloat(cvalue);\r\n\r\n if(!isNaN(cvalue)){\r\n nbvalues++;\r\n if(sumFlag===1 || meanFlag===1){\r\n sumValue += parseFloat( cvalue );\r\n }\r\n if(minFlag===1){\r\n if(minValue===null){\r\n minValue = parseFloat( cvalue );\r\n } else{\r\n minValue = parseFloat( cvalue ) < minValue ?\r\n parseFloat( cvalue ): minValue;\r\n }\r\n }\r\n if(maxFlag===1){\r\n if (maxValue===null){\r\n maxValue = parseFloat( cvalue );\r\n } else {\r\n maxValue = parseFloat( cvalue ) > maxValue ?\r\n parseFloat( cvalue ): maxValue;\r\n }\r\n }\r\n }\r\n }//for j\r\n if(meanFlag===1){\r\n meanValue = sumValue/nbvalues;\r\n }\r\n if(medFlag===1){\r\n var aux = 0;\r\n if(nbvalues%2 === 1){\r\n aux = Math.floor(nbvalues/2);\r\n medValue = theList[aux];\r\n } else{\r\n medValue =\r\n (theList[nbvalues/2] + theList[((nbvalues/2)-1)])/2;\r\n }\r\n }\r\n var posa;\r\n if(q1Flag===1){\r\n posa=0.0;\r\n posa = Math.floor(nbvalues/4);\r\n if(4*posa == nbvalues){\r\n q1Value = (theList[posa-1] + theList[posa])/2;\r\n } else {\r\n q1Value = theList[posa];\r\n }\r\n }\r\n if (q3Flag===1){\r\n posa=0.0;\r\n var posb=0.0;\r\n posa = Math.floor(nbvalues/4);\r\n if (4*posa === nbvalues){\r\n posb = 3*posa;\r\n q3Value = (theList[posb] + theList[posb-1])/2;\r\n } else {\r\n q3Value = theList[nbvalues-posa-1];\r\n }\r\n }\r\n\r\n for(var i=0; i<=mThisCol; i++){\r\n switch( opsThisCol[i] ){\r\n case 'mean':\r\n result=meanValue;\r\n break;\r\n case 'sum':\r\n result=sumValue;\r\n break;\r\n case 'min':\r\n result=minValue;\r\n break;\r\n case 'max':\r\n result=maxValue;\r\n break;\r\n case 'median':\r\n result=medValue;\r\n break;\r\n case 'q1':\r\n result=q1Value;\r\n break;\r\n case 'q3':\r\n result=q3Value;\r\n break;\r\n }\r\n\r\n var precision = !isNaN(decThisCol[i]) ? decThisCol[i] : 2;\r\n\r\n //if outputType is defined\r\n if(oTypeThisCol && result){\r\n result = result.toFixed( precision );\r\n\r\n if(Dom.id(labThisCol[i])){\r\n switch( Str.lower(oTypeThisCol) ){\r\n case 'innerhtml':\r\n if (isNaN(result) || !isFinite(result) ||\r\n nbvalues===0){\r\n Dom.id(labThisCol[i]).innerHTML = '.';\r\n } else{\r\n Dom.id(labThisCol[i]).innerHTML= result;\r\n }\r\n break;\r\n case 'setvalue':\r\n Dom.id( labThisCol[i] ).value = result;\r\n break;\r\n case 'createtextnode':\r\n var oldnode = Dom.id(labThisCol[i])\r\n .firstChild;\r\n var txtnode = Dom.text(result);\r\n Dom.id(labThisCol[i])\r\n .replaceChild(txtnode, oldnode);\r\n break;\r\n }//switch\r\n }\r\n } else {\r\n try{\r\n if(isNaN(result) || !isFinite(result) ||\r\n nbvalues===0){\r\n Dom.id(labThisCol[i]).innerHTML = '.';\r\n } else {\r\n Dom.id(labThisCol[i]).innerHTML =\r\n result.toFixed(precision);\r\n }\r\n } catch(e) {}//catch\r\n }//else\r\n }//for i\r\n\r\n // row(s) with result are always visible\r\n var totRow = totRowIndex && totRowIndex[ucol] ?\r\n rows[totRowIndex[ucol]] : null;\r\n if(totRow){\r\n totRow.style.display = '';\r\n }\r\n }//for ucol\r\n }//if typeof\r\n\r\n if(this.onAfterOperation){\r\n this.onAfterOperation.call(null, tf);\r\n }\r\n }\r\n\r\n destroy(){}\r\n\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "ColOps",
"memberof": "src/extensions/colOps/colOps.js",
"longname": "src/extensions/colOps/colOps.js~ColOps",
"access": null,
"export": true,
"importPath": "TableFilter/src/extensions/colOps/colOps.js",
"importStyle": "ColOps",
"description": null,
"lineNumber": 5,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#constructor",
"access": null,
"description": "Column calculations",
"lineNumber": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeOperation",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#onBeforeOperation",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterOperation",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#onAfterOperation",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "opts",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#opts",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#tf",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#init",
"access": null,
"description": null,
"lineNumber": 24,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "calc",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#calc",
"access": null,
"description": "Calculates columns' values\nConfiguration options are stored in 'opts' property\n- 'id' contains ids of elements showing result (array)\n- 'col' contains the columns' indexes (array)\n- 'operation' contains operation type (array, values: 'sum', 'mean',\n 'min', 'max', 'median', 'q1', 'q3')\n- 'write_method' array defines which method to use for displaying the\n result (innerHTML, setValue, createTextNode) - default: 'innerHTML'\n- 'tot_row_index' defines in which row results are displayed\n (integers array)\n\n- changes made by Nuovella:\n(1) optimized the routine (now it will only process each column once),\n(2) added calculations for the median, lower and upper quartile.",
"lineNumber": 44,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/extensions/colOps/colOps.js~ColOps",
"longname": "src/extensions/colOps/colOps.js~ColOps#destroy",
"access": null,
"description": null,
"lineNumber": 313,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/extensions/colsVisibility/colsVisibility.js",
"memberof": null,
"longname": "src/extensions/colsVisibility/colsVisibility.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../../dom';\r\nimport Types from '../../types';\r\nimport Event from '../../event';\r\nimport Arr from '../../array';\r\n\r\nexport default class ColsVisibility{\r\n\r\n /**\r\n * Columns Visibility extension\r\n * @param {Object} tf TableFilter instance\r\n * @param {Object} f Config\r\n */\r\n constructor(tf, f){\r\n\r\n // Configuration object\r\n var cfg = tf.config();\r\n\r\n this.initialized = false;\r\n this.name = f.name;\r\n this.desc = f.description || 'Columns visibility manager';\r\n\r\n //show/hide cols span element\r\n this.spanEl = null;\r\n //show/hide cols button element\r\n this.btnEl = null;\r\n //show/hide cols container div element\r\n this.contEl = null;\r\n\r\n //tick to hide or show column\r\n this.tickToHide = f.tick_to_hide===false ? false : true;\r\n //enables/disables cols manager generation\r\n this.manager = f.manager===false ? false : true;\r\n //only if external headers\r\n this.headersTbl = f.headers_table || false;\r\n //only if external headers\r\n this.headersIndex = f.headers_index || 1;\r\n //id of container element\r\n this.contElTgtId = f.container_target_id || null;\r\n //alternative headers text\r\n this.headersText = f.headers_text || null;\r\n //id of button container element\r\n this.btnTgtId = f.btn_target_id || null;\r\n //defines show/hide cols text\r\n this.btnText = f.btn_text || 'Columns&#9660;';\r\n //defines show/hide cols button innerHtml\r\n this.btnHtml = f.btn_html || null;\r\n //defines css class for show/hide cols button\r\n this.btnCssClass = f.btn_css_class || 'colVis';\r\n //defines close link text\r\n this.btnCloseText = f.btn_close_text || 'Close';\r\n //defines close button innerHtml\r\n this.btnCloseHtml = f.btn_close_html || null;\r\n //defines css class for close button\r\n this.btnCloseCssClass = f.btn_close_css_class || this.btnCssClass;\r\n this.stylesheet = f.stylesheet || 'colsVisibility.css';\r\n //span containing show/hide cols button\r\n this.prfx = 'colVis_';\r\n //defines css class span containing show/hide cols\r\n this.spanCssClass = f.span_css_class || 'colVisSpan';\r\n this.prfxCont = this.prfx + 'Cont_';\r\n //defines css class div containing show/hide cols\r\n this.contCssClass = f.cont_css_class || 'colVisCont';\r\n //defines css class for cols list (ul)\r\n this.listCssClass = cfg.list_css_class ||'cols_checklist';\r\n //defines css class for list item (li)\r\n this.listItemCssClass = cfg.checklist_item_css_class ||\r\n 'cols_checklist_item';\r\n //defines css class for selected list item (li)\r\n this.listSlcItemCssClass = cfg.checklist_selected_item_css_class ||\r\n 'cols_checklist_slc_item';\r\n //text preceding columns list\r\n this.text = f.text || (this.tickToHide ? 'Hide: ' : 'Show: ');\r\n this.atStart = f.at_start || null;\r\n this.enableHover = Boolean(f.enable_hover);\r\n //enables select all option\r\n this.enableTickAll = Boolean(f.enable_tick_all);\r\n //text preceding columns list\r\n this.tickAllText = f.tick_all_text || 'Select all:';\r\n\r\n //array containing hidden columns indexes\r\n this.hiddenCols = [];\r\n this.tblHasColTag = (Dom.tag(tf.tbl,'col').length > 0);\r\n\r\n //callback invoked just after cols manager is loaded\r\n this.onLoaded = Types.isFn(f.on_loaded) ? f.on_loaded : null;\r\n //calls function before cols manager is opened\r\n this.onBeforeOpen = Types.isFn(f.on_before_open) ?\r\n f.on_before_open : null;\r\n //calls function after cols manager is opened\r\n this.onAfterOpen = Types.isFn(f.on_after_open) ? f.on_after_open : null;\r\n //calls function before cols manager is closed\r\n this.onBeforeClose = Types.isFn(f.on_before_close) ?\r\n f.on_before_close : null;\r\n //calls function after cols manager is closed\r\n this.onAfterClose = Types.isFn(f.on_after_close) ?\r\n f.on_after_close : null;\r\n\r\n //callback before col is hidden\r\n this.onBeforeColHidden = Types.isFn(f.on_before_col_hidden) ?\r\n f.on_before_col_hidden : null;\r\n //callback after col is hidden\r\n this.onAfterColHidden = Types.isFn(f.on_after_col_hidden) ?\r\n f.on_after_col_hidden : null;\r\n //callback before col is displayed\r\n this.onBeforeColDisplayed = Types.isFn(f.on_before_col_displayed) ?\r\n f.on_before_col_displayed : null;\r\n //callback after col is displayed\r\n this.onAfterColDisplayed = Types.isFn(f.on_after_col_displayed) ?\r\n f.on_after_col_displayed : null;\r\n\r\n //Grid layout compatibility\r\n if(tf.gridLayout){\r\n this.headersTbl = tf.feature('gridLayout').headTbl; //headers table\r\n this.headersIndex = 0; //headers index\r\n this.onAfterColDisplayed = function(){};\r\n this.onAfterColHidden = function(){};\r\n }\r\n\r\n //Loads extension stylesheet\r\n tf.import(f.name+'Style', tf.stylePath + this.stylesheet, null, 'link');\r\n\r\n this.tf = tf;\r\n }\r\n\r\n toggle(){\r\n var contDisplay = this.contEl.style.display;\r\n var onBeforeOpen = this.onBeforeOpen;\r\n var onBeforeClose = this.onBeforeClose;\r\n var onAfterOpen = this.onAfterOpen;\r\n var onAfterClose = this.onAfterClose;\r\n\r\n if(onBeforeOpen && contDisplay !== 'inline'){\r\n onBeforeOpen.call(null, this);\r\n }\r\n if(onBeforeClose && contDisplay === 'inline'){\r\n onBeforeClose.call(null, this);\r\n }\r\n\r\n this.contEl.style.display = contDisplay === 'inline' ?\r\n 'none' : 'inline';\r\n\r\n if(onAfterOpen && contDisplay !== 'inline'){\r\n onAfterOpen.call(null, this);\r\n }\r\n if(onAfterClose && contDisplay === 'inline'){\r\n onAfterClose.call(null, this);\r\n }\r\n }\r\n\r\n checkItem(lbl){\r\n var li = lbl.parentNode;\r\n if(!li || !lbl){\r\n return;\r\n }\r\n var isChecked = lbl.firstChild.checked;\r\n var colIndex = lbl.firstChild.getAttribute('id').split('_')[1];\r\n colIndex = parseInt(colIndex, 10);\r\n if(isChecked){\r\n Dom.addClass(li, this.listSlcItemCssClass);\r\n } else {\r\n Dom.removeClass(li, this.listSlcItemCssClass);\r\n }\r\n\r\n var hide = false;\r\n if((this.tickToHide && isChecked) || (!this.tickToHide && !isChecked)){\r\n hide = true;\r\n }\r\n this.setHidden(colIndex, hide);\r\n }\r\n\r\n init(){\r\n if(!this.manager){\r\n return;\r\n }\r\n this.buildBtn();\r\n this.buildManager();\r\n\r\n this.initialized = true;\r\n }\r\n\r\n /**\r\n * Build main button UI\r\n */\r\n buildBtn(){\r\n if(this.btnEl){\r\n return;\r\n }\r\n var tf = this.tf;\r\n var span = Dom.create('span', ['id', this.prfx+tf.id]);\r\n span.className = this.spanCssClass;\r\n\r\n //Container element (rdiv or custom element)\r\n if(!this.btnTgtId){\r\n tf.setToolbar();\r\n }\r\n var targetEl = !this.btnTgtId ? tf.rDiv : Dom.id(this.btnTgtId);\r\n\r\n if(!this.btnTgtId){\r\n var firstChild = targetEl.firstChild;\r\n firstChild.parentNode.insertBefore(span, firstChild);\r\n } else {\r\n targetEl.appendChild(span);\r\n }\r\n\r\n if(!this.btnHtml){\r\n var btn = Dom.create('a', ['href','javascript:;']);\r\n btn.className = this.btnCssClass;\r\n btn.title = this.desc;\r\n\r\n btn.innerHTML = this.btnText;\r\n span.appendChild(btn);\r\n if(!this.enableHover){\r\n Event.add(btn, 'click', (evt)=> { this.toggle(evt); });\r\n } else {\r\n Event.add(btn, 'mouseover', (evt)=> { this.toggle(evt); });\r\n }\r\n } else { //Custom html\r\n span.innerHTML = this.btnHtml;\r\n var colVisEl = span.firstChild;\r\n if(!this.enableHover){\r\n Event.add(colVisEl, 'click', (evt)=> { this.toggle(evt); });\r\n } else {\r\n Event.add(colVisEl, 'mouseover', (evt)=> { this.toggle(evt); });\r\n }\r\n }\r\n\r\n this.spanEl = span;\r\n this.btnEl = this.spanEl.firstChild;\r\n\r\n if(this.onLoaded){\r\n this.onLoaded.call(null, this);\r\n }\r\n }\r\n\r\n /**\r\n * Build columns manager UI\r\n */\r\n buildManager(){\r\n var tf = this.tf;\r\n\r\n var container = !this.contElTgtId ?\r\n Dom.create('div', ['id', this.prfxCont+tf.id]) :\r\n Dom.id(this.contElTgtId);\r\n container.className = this.contCssClass;\r\n\r\n //Extension description\r\n var extNameLabel = Dom.create('p');\r\n extNameLabel.innerHTML = this.text;\r\n container.appendChild(extNameLabel);\r\n\r\n //Headers list\r\n var ul = Dom.create('ul' ,['id', 'ul'+this.name+'_'+tf.id]);\r\n ul.className = this.listCssClass;\r\n\r\n var tbl = this.headersTbl ? this.headersTbl : tf.tbl;\r\n var headerIndex = this.headersTbl ?\r\n this.headersIndex : tf.getHeadersRowIndex();\r\n var headerRow = tbl.rows[headerIndex];\r\n\r\n //Tick all option\r\n if(this.enableTickAll){\r\n var li = Dom.createCheckItem(\r\n 'col__'+tf.id, this.tickAllText, this.tickAllText);\r\n Dom.addClass(li, this.listItemCssClass);\r\n ul.appendChild(li);\r\n li.check.checked = !this.tickToHide;\r\n\r\n Event.add(li.check, 'click', ()=> {\r\n for(var h = 0; h < headerRow.cells.length; h++){\r\n var itm = Dom.id('col_'+h+'_'+tf.id);\r\n if(itm && li.check.checked !== itm.checked){\r\n itm.click();\r\n itm.checked = li.check.checked;\r\n }\r\n }\r\n });\r\n }\r\n\r\n for(var i = 0; i < headerRow.cells.length; i++){\r\n var cell = headerRow.cells[i];\r\n var cellText = this.headersText && this.headersText[i] ?\r\n this.headersText[i] : this._getHeaderText(cell);\r\n var liElm = Dom.createCheckItem(\r\n 'col_'+i+'_'+tf.id, cellText, cellText);\r\n Dom.addClass(liElm, this.listItemCssClass);\r\n if(!this.tickToHide){\r\n Dom.addClass(liElm, this.listSlcItemCssClass);\r\n }\r\n ul.appendChild(liElm);\r\n if(!this.tickToHide){\r\n liElm.check.checked = true;\r\n }\r\n\r\n Event.add(liElm.check, 'click', (evt)=> {\r\n var elm = Event.target(evt);\r\n var lbl = elm.parentNode;\r\n this.checkItem(lbl);\r\n });\r\n }\r\n\r\n //separator\r\n var p = Dom.create('p', ['align','center']);\r\n var btn;\r\n //Close link\r\n if(!this.btnCloseHtml){\r\n btn = Dom.create('a', ['href','javascript:;']);\r\n btn.className = this.btnCloseCssClass;\r\n btn.innerHTML = this.btnCloseText;\r\n Event.add(btn, 'click', (evt)=> { this.toggle(evt); });\r\n p.appendChild(btn);\r\n } else {\r\n p.innerHTML = this.btnCloseHtml;\r\n btn = p.firstChild;\r\n Event.add(btn, 'click', (evt)=> { this.toggle(evt); });\r\n }\r\n\r\n container.appendChild(ul);\r\n container.appendChild(p);\r\n\r\n this.btnEl.parentNode.insertBefore(container, this.btnEl);\r\n this.contEl = container;\r\n\r\n if(this.atStart){\r\n var a = this.atStart;\r\n for(var k=0; k<a.length; k++){\r\n var itm = Dom.id('col_'+a[k]+'_'+tf.id);\r\n if(itm){\r\n itm.click();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Hide or show specified columns\r\n * @param {Numner} colIndex Column index\r\n * @param {Boolean} hide hide column if true or show if false\r\n */\r\n setHidden(colIndex, hide){\r\n var tf = this.tf;\r\n var tbl = tf.tbl;\r\n\r\n if(this.onBeforeColHidden && hide){\r\n this.onBeforeColHidden.call(null, this, colIndex);\r\n }\r\n if(this.onBeforeColDisplayed && !hide){\r\n this.onBeforeColDisplayed.call(null, this, colIndex);\r\n }\r\n\r\n this._hideCells(tbl, colIndex, hide);\r\n if(this.headersTbl){\r\n this._hideCells(this.headersTbl, colIndex, hide);\r\n }\r\n\r\n var hiddenCols = this.hiddenCols;\r\n if(hide){\r\n if(hiddenCols.indexOf(colIndex) === -1){\r\n this.hiddenCols.push(colIndex);\r\n }\r\n } else {\r\n var itemIndex = Arr.indexByValue(hiddenCols, colIndex, true);\r\n if(hiddenCols.indexOf(colIndex) !== -1){\r\n this.hiddenCols.splice(itemIndex, 1);\r\n }\r\n }\r\n\r\n var gridLayout;\r\n var headTbl;\r\n var gridColElms;\r\n if(this.onAfterColHidden && hide){\r\n //This event is fired just after a column is displayed for\r\n //grid_layout support\r\n //TODO: grid layout module should be responsible for those\r\n //calculations\r\n if(tf.gridLayout){\r\n gridLayout = tf.feature('gridLayout');\r\n headTbl = gridLayout.headTbl;\r\n gridColElms = gridLayout.gridColElms;\r\n var hiddenWidth = parseInt(\r\n gridColElms[colIndex].style.width, 10);\r\n\r\n var headTblW = parseInt(headTbl.style.width, 10);\r\n headTbl.style.width = headTblW - hiddenWidth + 'px';\r\n tbl.style.width = headTbl.style.width;\r\n }\r\n this.onAfterColHidden.call(null, this, colIndex);\r\n }\r\n\r\n if(this.onAfterColDisplayed && !hide){\r\n //This event is fired just after a column is displayed for\r\n //grid_layout support\r\n //TODO: grid layout module should be responsible for those\r\n //calculations\r\n if(tf.gridLayout){\r\n gridLayout = tf.feature('gridLayout');\r\n headTbl = gridLayout.headTbl;\r\n gridColElms = gridLayout.gridColElms;\r\n var width = parseInt(gridColElms[colIndex].style.width, 10);\r\n headTbl.style.width =\r\n (parseInt(headTbl.style.width, 10) + width) + 'px';\r\n tf.tbl.style.width = headTbl.style.width;\r\n }\r\n this.onAfterColDisplayed.call(null, this, colIndex);\r\n }\r\n }\r\n\r\n /**\r\n * Show specified column\r\n * @param {Number} colIndex Column index\r\n */\r\n showCol(colIndex){\r\n if(colIndex === undefined || !this.isColHidden(colIndex)){\r\n return;\r\n }\r\n if(this.manager && this.contEl){\r\n var itm = Dom.id('col_'+colIndex+'_'+this.tf.id);\r\n if(itm){ itm.click(); }\r\n } else {\r\n this.setHidden(colIndex, false);\r\n }\r\n }\r\n\r\n /**\r\n * Hide specified column\r\n * @param {Number} colIndex Column index\r\n */\r\n hideCol(colIndex){\r\n if(colIndex === undefined || this.isColHidden(colIndex)){\r\n return;\r\n }\r\n if(this.manager && this.contEl){\r\n var itm = Dom.id('col_'+colIndex+'_'+this.tf.id);\r\n if(itm){ itm.click(); }\r\n } else {\r\n this.setHidden(colIndex, true);\r\n }\r\n }\r\n\r\n /**\r\n * Determine if specified column is hidden\r\n * @param {Number} colIndex Column index\r\n */\r\n isColHidden(colIndex){\r\n if(this.hiddenCols.indexOf(colIndex) !== -1){\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Toggle visibility of specified column\r\n * @param {Number} colIndex Column index\r\n */\r\n toggleCol(colIndex){\r\n if(colIndex === undefined || this.isColHidden(colIndex)){\r\n this.showCol(colIndex);\r\n } else {\r\n this.hideCol(colIndex);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the indexes of the columns currently hidden\r\n * @return {Array} column indexes\r\n */\r\n getHiddenCols(){\r\n return this.hiddenCols;\r\n }\r\n\r\n /**\r\n * Remove the columns manager\r\n */\r\n destroy(){\r\n if(!this.btnEl && !this.contEl){\r\n return;\r\n }\r\n if(Dom.id(this.contElTgtId)){\r\n Dom.id(this.contElTgtId).innerHTML = '';\r\n } else {\r\n this.contEl.innerHTML = '';\r\n this.contEl.parentNode.removeChild(this.contEl);\r\n this.contEl = null;\r\n }\r\n this.btnEl.innerHTML = '';\r\n this.btnEl.parentNode.removeChild(this.btnEl);\r\n this.btnEl = null;\r\n this.initialized = false;\r\n }\r\n\r\n _getHeaderText(cell){\r\n if(!cell.hasChildNodes){\r\n return '';\r\n }\r\n\r\n for(var i=0; i<cell.childNodes.length; i++){\r\n var n = cell.childNodes[i];\r\n if(n.nodeType === 3){\r\n return n.nodeValue;\r\n } else if(n.nodeType === 1){\r\n if(n.id && n.id.indexOf('popUp') !== -1){\r\n continue;\r\n } else {\r\n return Dom.getText(n);\r\n }\r\n }\r\n continue;\r\n }\r\n return '';\r\n }\r\n\r\n _hideCells(tbl, colIndex, hide){\r\n for(var i=0; i<tbl.rows.length; i++){\r\n var row = tbl.rows[i];\r\n var cell = row.cells[colIndex];\r\n if(cell){\r\n cell.style.display = hide ? 'none' : '';\r\n }\r\n }\r\n }\r\n\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "ColsVisibility",
"memberof": "src/extensions/colsVisibility/colsVisibility.js",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"access": null,
"export": true,
"importPath": "TableFilter/src/extensions/colsVisibility/colsVisibility.js",
"importStyle": "ColsVisibility",
"description": null,
"lineNumber": 6,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#constructor",
"access": null,
"description": "Columns Visibility extension",
"lineNumber": 13,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "f",
"description": "Config"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#initialized",
"access": null,
"description": null,
"lineNumber": 18,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "name",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#name",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "desc",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#desc",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "spanEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#spanEl",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnEl",
"access": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#contEl",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tickToHide",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#tickToHide",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "manager",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#manager",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersTbl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#headersTbl",
"access": null,
"description": null,
"lineNumber": 34,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersIndex",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#headersIndex",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contElTgtId",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#contElTgtId",
"access": null,
"description": null,
"lineNumber": 38,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersText",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#headersText",
"access": null,
"description": null,
"lineNumber": 40,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnTgtId",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnTgtId",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnText",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnText",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnHtml",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnHtml",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnCssClass",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnCssClass",
"access": null,
"description": null,
"lineNumber": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnCloseText",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnCloseText",
"access": null,
"description": null,
"lineNumber": 50,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnCloseHtml",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnCloseHtml",
"access": null,
"description": null,
"lineNumber": 52,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnCloseCssClass",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnCloseCssClass",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheet",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#stylesheet",
"access": null,
"description": null,
"lineNumber": 55,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfx",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#prfx",
"access": null,
"description": null,
"lineNumber": 57,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "spanCssClass",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#spanCssClass",
"access": null,
"description": null,
"lineNumber": 59,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCont",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#prfxCont",
"access": null,
"description": null,
"lineNumber": 60,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contCssClass",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#contCssClass",
"access": null,
"description": null,
"lineNumber": 62,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "listCssClass",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#listCssClass",
"access": null,
"description": null,
"lineNumber": 64,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "listItemCssClass",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#listItemCssClass",
"access": null,
"description": null,
"lineNumber": 66,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "listSlcItemCssClass",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#listSlcItemCssClass",
"access": null,
"description": null,
"lineNumber": 69,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "text",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#text",
"access": null,
"description": null,
"lineNumber": 72,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "atStart",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#atStart",
"access": null,
"description": null,
"lineNumber": 73,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableHover",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#enableHover",
"access": null,
"description": null,
"lineNumber": 74,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableTickAll",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#enableTickAll",
"access": null,
"description": null,
"lineNumber": 76,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tickAllText",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#tickAllText",
"access": null,
"description": null,
"lineNumber": 78,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hiddenCols",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#hiddenCols",
"access": null,
"description": null,
"lineNumber": 81,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblHasColTag",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#tblHasColTag",
"access": null,
"description": null,
"lineNumber": 82,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onLoaded",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onLoaded",
"access": null,
"description": null,
"lineNumber": 85,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeOpen",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onBeforeOpen",
"access": null,
"description": null,
"lineNumber": 87,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterOpen",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onAfterOpen",
"access": null,
"description": null,
"lineNumber": 90,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeClose",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onBeforeClose",
"access": null,
"description": null,
"lineNumber": 92,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterClose",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onAfterClose",
"access": null,
"description": null,
"lineNumber": 95,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeColHidden",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onBeforeColHidden",
"access": null,
"description": null,
"lineNumber": 99,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterColHidden",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onAfterColHidden",
"access": null,
"description": null,
"lineNumber": 102,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeColDisplayed",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onBeforeColDisplayed",
"access": null,
"description": null,
"lineNumber": 105,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterColDisplayed",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#onAfterColDisplayed",
"access": null,
"description": null,
"lineNumber": 108,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersTbl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#headersTbl",
"access": null,
"description": null,
"lineNumber": 113,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersIndex",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#headersIndex",
"access": null,
"description": null,
"lineNumber": 114,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#tf",
"access": null,
"description": null,
"lineNumber": 122,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "toggle",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#toggle",
"access": null,
"description": null,
"lineNumber": 125,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "checkItem",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#checkItem",
"access": null,
"description": null,
"lineNumber": 150,
"undocument": true,
"params": [
{
"name": "lbl",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#init",
"access": null,
"description": null,
"lineNumber": 171,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#initialized",
"access": null,
"description": null,
"lineNumber": 178,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "buildBtn",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#buildBtn",
"access": null,
"description": "Build main button UI",
"lineNumber": 184,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "spanEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#spanEl",
"access": null,
"description": null,
"lineNumber": 227,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnEl",
"access": null,
"description": null,
"lineNumber": 228,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "buildManager",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#buildManager",
"access": null,
"description": "Build columns manager UI",
"lineNumber": 238,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#contEl",
"access": null,
"description": null,
"lineNumber": 321,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setHidden",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#setHidden",
"access": null,
"description": "Hide or show specified columns",
"lineNumber": 339,
"params": [
{
"nullable": null,
"types": [
"Numner"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "hide",
"description": "hide column if true or show if false"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "showCol",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#showCol",
"access": null,
"description": "Show specified column",
"lineNumber": 411,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "hideCol",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#hideCol",
"access": null,
"description": "Hide specified column",
"lineNumber": 427,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "isColHidden",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#isColHidden",
"access": null,
"description": "Determine if specified column is hidden",
"lineNumber": 443,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"return": {
"types": [
"boolean"
]
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "toggleCol",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#toggleCol",
"access": null,
"description": "Toggle visibility of specified column",
"lineNumber": 454,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getHiddenCols",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#getHiddenCols",
"access": null,
"description": "Returns the indexes of the columns currently hidden",
"lineNumber": 466,
"params": [],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "column indexes"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#destroy",
"access": null,
"description": "Remove the columns manager",
"lineNumber": 473,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#contEl",
"access": null,
"description": null,
"lineNumber": 482,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnEl",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#btnEl",
"access": null,
"description": null,
"lineNumber": 486,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#initialized",
"access": null,
"description": null,
"lineNumber": 487,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_getHeaderText",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#_getHeaderText",
"access": null,
"description": null,
"lineNumber": 490,
"undocument": true,
"params": [
{
"name": "cell",
"types": [
"*"
]
}
],
"return": {
"types": [
"string"
]
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_hideCells",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#_hideCells",
"access": null,
"description": null,
"lineNumber": 511,
"undocument": true,
"params": [
{
"name": "tbl",
"types": [
"*"
]
},
{
"name": "colIndex",
"types": [
"*"
]
},
{
"name": "hide",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/extensions/filtersVisibility/filtersVisibility.js",
"memberof": null,
"longname": "src/extensions/filtersVisibility/filtersVisibility.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../../dom';\r\nimport Types from '../../types';\r\nimport Event from '../../event';\r\n\r\nexport default class FiltersVisibility{\r\n\r\n /**\r\n * Filters Row Visibility extension\r\n * @param {Object} tf TableFilter instance\r\n * @param {Object} f Config\r\n */\r\n constructor(tf, f){\r\n\r\n this.initialized = false;\r\n this.name = f.name;\r\n this.desc = f.description || 'Filters row visibility manager';\r\n\r\n // Path and image filenames\r\n this.stylesheet = f.stylesheet || 'filtersVisibility.css';\r\n this.icnExpand = f.expand_icon_name || 'icn_exp.png';\r\n this.icnCollapse = f.collapse_icon_name || 'icn_clp.png';\r\n\r\n //expand/collapse filters span element\r\n this.contEl = null;\r\n //expand/collapse filters btn element\r\n this.btnEl = null;\r\n\r\n this.icnExpandHtml = '<img src=\"'+ tf.themesPath + this.icnExpand +\r\n '\" alt=\"Expand filters\" >';\r\n this.icnCollapseHtml = '<img src=\"'+ tf.themesPath + this.icnCollapse +\r\n '\" alt=\"Collapse filters\" >';\r\n this.defaultText = 'Toggle filters';\r\n\r\n //id of container element\r\n this.targetId = f.target_id || null;\r\n //enables/disables expand/collapse icon\r\n this.enableIcon = f.enable_icon===false ? false : true;\r\n this.btnText = f.btn_text || '';\r\n\r\n //defines expand/collapse filters text\r\n this.collapseBtnHtml = this.enableIcon ?\r\n this.icnCollapseHtml + this.btnText :\r\n this.btnText || this.defaultText;\r\n this.expandBtnHtml = this.enableIcon ?\r\n this.icnExpandHtml + this.btnText :\r\n this.btnText || this.defaultText;\r\n\r\n //defines expand/collapse filters button innerHtml\r\n this.btnHtml = f.btn_html || null;\r\n //defines css class for expand/collapse filters button\r\n this.btnCssClass = f.btn_css_class || 'btnExpClpFlt';\r\n //defines css class span containing expand/collapse filters\r\n this.contCssClass = f.cont_css_class || 'expClpFlt';\r\n this.filtersRowIndex = !Types.isUndef(f.filters_row_index) ?\r\n f.filters_row_index : tf.getFiltersRowIndex();\r\n\r\n this.visibleAtStart = !Types.isUndef(f.visible_at_start) ?\r\n Boolean(f.visible_at_start) : true;\r\n\r\n // Prefix\r\n this.prfx = 'fltsVis_';\r\n\r\n //callback before filters row is shown\r\n this.onBeforeShow = Types.isFn(f.on_before_show) ?\r\n f.on_before_show : null;\r\n //callback after filters row is shown\r\n this.onAfterShow = Types.isFn(f.on_after_show) ?\r\n f.on_after_show : null;\r\n //callback before filters row is hidden\r\n this.onBeforeHide = Types.isFn(f.on_before_hide) ?\r\n f.on_before_hide : null;\r\n //callback after filters row is hidden\r\n this.onAfterHide = Types.isFn(f.on_after_hide) ? f.on_after_hide : null;\r\n\r\n //Loads extension stylesheet\r\n tf.import(f.name+'Style', tf.stylePath + this.stylesheet, null, 'link');\r\n\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * Initialise extension\r\n */\r\n init(){\r\n if(this.initialized){\r\n return;\r\n }\r\n\r\n this.buildUI();\r\n this.initialized = true;\r\n }\r\n\r\n /**\r\n * Build UI elements\r\n */\r\n buildUI(){\r\n let tf = this.tf;\r\n let span = Dom.create('span',['id', this.prfx+tf.id]);\r\n span.className = this.contCssClass;\r\n\r\n //Container element (rdiv or custom element)\r\n if(!this.targetId){\r\n tf.setToolbar();\r\n }\r\n let targetEl = !this.targetId ? tf.rDiv : Dom.id(this.targetId);\r\n\r\n if(!this.targetId){\r\n let firstChild = targetEl.firstChild;\r\n firstChild.parentNode.insertBefore(span, firstChild);\r\n } else {\r\n targetEl.appendChild(span);\r\n }\r\n\r\n let btn;\r\n if(!this.btnHtml){\r\n btn = Dom.create('a', ['href', 'javascript:void(0);']);\r\n btn.className = this.btnCssClass;\r\n btn.title = this.btnText || this.defaultText;\r\n btn.innerHTML = this.collapseBtnHtml;\r\n span.appendChild(btn);\r\n Event.add(btn, 'click', ()=> this.toggle());\r\n } else { //Custom html\r\n span.innerHTML = this.btnHtml;\r\n btn = span.firstChild;\r\n Event.add(btn, 'click', ()=> this.toggle());\r\n }\r\n\r\n this.contEl = span;\r\n this.btnEl = btn;\r\n\r\n if(!this.visibleAtStart){\r\n this.toggle();\r\n }\r\n }\r\n\r\n /**\r\n * Toggle filters visibility\r\n */\r\n toggle(){\r\n let tf = this.tf;\r\n let tbl = tf.gridLayout? tf.feature('gridLayout').headTbl : tf.tbl;\r\n let fltRow = tbl.rows[this.filtersRowIndex];\r\n let fltRowDisplay = fltRow.style.display;\r\n\r\n if(this.onBeforeShow && fltRowDisplay !== ''){\r\n this.onBeforeShow.call(this, this);\r\n }\r\n if(this.onBeforeHide && fltRowDisplay === ''){\r\n this.onBeforeHide.call(null, this);\r\n }\r\n\r\n fltRow.style.display = fltRowDisplay==='' ? 'none' : '';\r\n if(this.enableIcon && !this.btnHtml){\r\n this.btnEl.innerHTML = fltRowDisplay === '' ?\r\n this.expandBtnHtml : this.collapseBtnHtml;\r\n }\r\n\r\n if(this.onAfterShow && fltRowDisplay !== ''){\r\n this.onAfterShow.call(null, this);\r\n }\r\n if(this.onAfterHide && fltRowDisplay === ''){\r\n this.onAfterHide.call(null, this);\r\n }\r\n }\r\n\r\n /**\r\n * Destroy the UI\r\n */\r\n destroy(){\r\n if(!this.btnEl && !this.contEl){\r\n return;\r\n }\r\n\r\n this.btnEl.innerHTML = '';\r\n this.btnEl.parentNode.removeChild(this.btnEl);\r\n this.btnEl = null;\r\n\r\n this.contEl.innerHTML = '';\r\n this.contEl.parentNode.removeChild(this.contEl);\r\n this.contEl = null;\r\n this.initialized = false;\r\n }\r\n\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "FiltersVisibility",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"access": null,
"export": true,
"importPath": "TableFilter/src/extensions/filtersVisibility/filtersVisibility.js",
"importStyle": "FiltersVisibility",
"description": null,
"lineNumber": 5,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#constructor",
"access": null,
"description": "Filters Row Visibility extension",
"lineNumber": 12,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "f",
"description": "Config"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#initialized",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "name",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#name",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "desc",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#desc",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheet",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#stylesheet",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "icnExpand",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#icnExpand",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "icnCollapse",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#icnCollapse",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contEl",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#contEl",
"access": null,
"description": null,
"lineNumber": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnEl",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#btnEl",
"access": null,
"description": null,
"lineNumber": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "icnExpandHtml",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#icnExpandHtml",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "icnCollapseHtml",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#icnCollapseHtml",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "defaultText",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#defaultText",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "targetId",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#targetId",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableIcon",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#enableIcon",
"access": null,
"description": null,
"lineNumber": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnText",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#btnText",
"access": null,
"description": null,
"lineNumber": 38,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "collapseBtnHtml",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#collapseBtnHtml",
"access": null,
"description": null,
"lineNumber": 41,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "expandBtnHtml",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#expandBtnHtml",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnHtml",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#btnHtml",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnCssClass",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#btnCssClass",
"access": null,
"description": null,
"lineNumber": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contCssClass",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#contCssClass",
"access": null,
"description": null,
"lineNumber": 53,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "filtersRowIndex",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#filtersRowIndex",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "visibleAtStart",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#visibleAtStart",
"access": null,
"description": null,
"lineNumber": 57,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfx",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#prfx",
"access": null,
"description": null,
"lineNumber": 61,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeShow",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#onBeforeShow",
"access": null,
"description": null,
"lineNumber": 64,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterShow",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#onAfterShow",
"access": null,
"description": null,
"lineNumber": 67,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeHide",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#onBeforeHide",
"access": null,
"description": null,
"lineNumber": 70,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterHide",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#onAfterHide",
"access": null,
"description": null,
"lineNumber": 73,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#tf",
"access": null,
"description": null,
"lineNumber": 78,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#init",
"access": null,
"description": "Initialise extension",
"lineNumber": 84,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#initialized",
"access": null,
"description": null,
"lineNumber": 90,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "buildUI",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#buildUI",
"access": null,
"description": "Build UI elements",
"lineNumber": 96,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contEl",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#contEl",
"access": null,
"description": null,
"lineNumber": 128,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnEl",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#btnEl",
"access": null,
"description": null,
"lineNumber": 129,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "toggle",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#toggle",
"access": null,
"description": "Toggle filters visibility",
"lineNumber": 139,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#destroy",
"access": null,
"description": "Destroy the UI",
"lineNumber": 169,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnEl",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#btnEl",
"access": null,
"description": null,
"lineNumber": 176,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contEl",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#contEl",
"access": null,
"description": null,
"lineNumber": 180,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#initialized",
"access": null,
"description": null,
"lineNumber": 181,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/extensions/sort/adapterSortabletable.js",
"memberof": null,
"longname": "src/extensions/sort/adapterSortabletable.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Types from '../../types';\r\nimport Dom from '../../dom';\r\nimport Arr from '../../array';\r\nimport Event from '../../event';\r\nimport DateHelper from '../../date';\r\nimport Helpers from '../../helpers';\r\n\r\nexport default class AdapterSortableTable{\r\n\r\n /**\r\n * SortableTable Adapter module\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf, opts){\r\n // Configuration object\r\n let f = tf.config();\r\n\r\n this.initialized = false;\r\n this.name = opts.name;\r\n this.desc = opts.description || 'Sortable table';\r\n\r\n //indicates if paging is enabled\r\n this.isPaged = false;\r\n\r\n //indicates if tables was sorted\r\n this.sorted = false;\r\n\r\n this.sortTypes = Types.isArray(opts.types) ? opts.types : [];\r\n this.sortColAtStart = Types.isArray(opts.sort_col_at_start) ?\r\n opts.sort_col_at_start : null;\r\n this.asyncSort = Boolean(opts.async_sort);\r\n this.triggerIds = Types.isArray(opts.trigger_ids) ?\r\n opts.trigger_ids : [];\r\n\r\n // edit .sort-arrow.descending / .sort-arrow.ascending in\r\n // tablefilter.css to reflect any path change\r\n this.imgPath = opts.images_path || tf.themesPath;\r\n this.imgBlank = opts.image_blank || 'blank.png';\r\n this.imgClassName = opts.image_class_name || 'sort-arrow';\r\n this.imgAscClassName = opts.image_asc_class_name || 'ascending';\r\n this.imgDescClassName = opts.image_desc_class_name ||'descending';\r\n //cell attribute storing custom key\r\n this.customKey = opts.custom_key || 'data-tf-sortKey';\r\n\r\n /*** TF additional events ***/\r\n //additional paging events for alternating background\r\n // o.Evt._Paging.nextEvt = function(){\r\n // if(o.sorted && o.alternateBgs) o.Filter();\r\n // }\r\n // o.Evt._Paging.prevEvt = o.Evt._Paging.nextEvt;\r\n // o.Evt._Paging.firstEvt = o.Evt._Paging.nextEvt;\r\n // o.Evt._Paging.lastEvt = o.Evt._Paging.nextEvt;\r\n // o.Evt._OnSlcPagesChangeEvt = o.Evt._Paging.nextEvt;\r\n\r\n // callback invoked after sort is loaded and instanciated\r\n this.onSortLoaded = Types.isFn(opts.on_sort_loaded) ?\r\n opts.on_sort_loaded : null;\r\n // callback invoked before table is sorted\r\n this.onBeforeSort = Types.isFn(opts.on_before_sort) ?\r\n opts.on_before_sort : null;\r\n // callback invoked after table is sorted\r\n this.onAfterSort = Types.isFn(opts.on_after_sort) ?\r\n f.on_after_sort : null;\r\n\r\n this.tf = tf;\r\n }\r\n\r\n init(){\r\n let tf = this.tf;\r\n let adpt = this;\r\n\r\n // SortableTable class sanity check (sortabletable.js)\r\n if(Types.isUndef(SortableTable)){\r\n throw new Error('SortableTable class not found.');\r\n }\r\n\r\n this.overrideSortableTable();\r\n this.setSortTypes();\r\n\r\n //Column sort at start\r\n let sortColAtStart = adpt.sortColAtStart;\r\n if(sortColAtStart){\r\n this.stt.sort(sortColAtStart[0], sortColAtStart[1]);\r\n }\r\n\r\n if(this.onSortLoaded){\r\n this.onSortLoaded.call(null, tf, this);\r\n }\r\n\r\n /*** SortableTable callbacks ***/\r\n this.stt.onbeforesort = function(){\r\n if(this.onBeforeSort){\r\n this.onBeforeSort.call(null, tf, this.stt.sortColumn);\r\n }\r\n\r\n /*** sort behaviour for paging ***/\r\n if(tf.paging){\r\n adpt.isPaged = true;\r\n tf.paging = false;\r\n tf.feature('paging').destroy();\r\n }\r\n };\r\n\r\n this.stt.onsort = function(){\r\n adpt.sorted = true;\r\n\r\n //rows alternating bg issue\r\n // TODO: move into AlternateRows component\r\n if(tf.alternateBgs){\r\n let rows = tf.tbl.rows, c = 0;\r\n\r\n let setClass = function(row, i, removeOnly){\r\n if(Types.isUndef(removeOnly)){\r\n removeOnly = false;\r\n }\r\n let altRows = tf.feature('alternateRows'),\r\n oddCls = altRows.oddCss,\r\n evenCls = altRows.evenCss;\r\n Dom.removeClass(row, oddCls);\r\n Dom.removeClass(row, evenCls);\r\n\r\n if(!removeOnly){\r\n Dom.addClass(row, i % 2 ? oddCls : evenCls);\r\n }\r\n };\r\n\r\n for (let i = tf.refRow; i < tf.nbRows; i++){\r\n let isRowValid = rows[i].getAttribute('validRow');\r\n if(tf.paging && rows[i].style.display === ''){\r\n setClass(rows[i], c);\r\n c++;\r\n } else {\r\n if((isRowValid==='true' || isRowValid===null) &&\r\n rows[i].style.display === ''){\r\n setClass(rows[i], c);\r\n c++;\r\n } else {\r\n setClass(rows[i], c, true);\r\n }\r\n }\r\n }\r\n }\r\n //sort behaviour for paging\r\n if(adpt.isPaged){\r\n let paginator = tf.feature('paging');\r\n paginator.reset(false);\r\n paginator.setPage(paginator.getPage());\r\n adpt.isPaged = false;\r\n }\r\n\r\n if(adpt.onAfterSort){\r\n adpt.onAfterSort.call(null, tf, tf.stt.sortColumn);\r\n }\r\n };\r\n\r\n this.initialized = true;\r\n }\r\n\r\n /**\r\n * Sort specified column\r\n * @param {Number} colIdx Column index\r\n */\r\n sortByColumnIndex(colIdx){\r\n this.stt.sort(colIdx);\r\n }\r\n\r\n overrideSortableTable(){\r\n let adpt = this,\r\n tf = this.tf;\r\n\r\n /**\r\n * Overrides headerOnclick method in order to handle th event\r\n * @param {Object} e [description]\r\n */\r\n SortableTable.prototype.headerOnclick = function(evt){\r\n if(!adpt.initialized){\r\n return;\r\n }\r\n\r\n // find Header element\r\n let el = evt.target || evt.srcElement;\r\n\r\n while(el.tagName !== 'TD' && el.tagName !== 'TH'){\r\n el = el.parentNode;\r\n }\r\n\r\n this.sort(\r\n SortableTable.msie ?\r\n SortableTable.getCellIndex(el) : el.cellIndex\r\n );\r\n };\r\n\r\n /**\r\n * Overrides getCellIndex IE returns wrong cellIndex when columns are\r\n * hidden\r\n * @param {Object} oTd TD element\r\n * @return {Number} Cell index\r\n */\r\n SortableTable.getCellIndex = function(oTd){\r\n let cells = oTd.parentNode.cells,\r\n l = cells.length, i;\r\n for (i = 0; cells[i] != oTd && i < l; i++){}\r\n return i;\r\n };\r\n\r\n /**\r\n * Overrides initHeader in order to handle filters row position\r\n * @param {Array} oSortTypes\r\n */\r\n SortableTable.prototype.initHeader = function(oSortTypes){\r\n let stt = this;\r\n if (!stt.tHead){\r\n if(tf.gridLayout){\r\n stt.tHead = tf.feature('gridLayout').headTbl.tHead;\r\n } else {\r\n return;\r\n }\r\n }\r\n\r\n stt.headersRow = tf.headersRow;\r\n let cells = stt.tHead.rows[stt.headersRow].cells;\r\n stt.sortTypes = oSortTypes || [];\r\n let l = cells.length;\r\n let img, c;\r\n\r\n for (let i = 0; i < l; i++) {\r\n c = cells[i];\r\n if (stt.sortTypes[i] !== null && stt.sortTypes[i] !== 'None'){\r\n c.style.cursor = 'pointer';\r\n img = Dom.create('img',\r\n ['src', adpt.imgPath + adpt.imgBlank]);\r\n c.appendChild(img);\r\n if (stt.sortTypes[i] !== null){\r\n c.setAttribute( '_sortType', stt.sortTypes[i]);\r\n }\r\n Event.add(c, 'click', stt._headerOnclick);\r\n } else {\r\n c.setAttribute('_sortType', oSortTypes[i]);\r\n c._sortType = 'None';\r\n }\r\n }\r\n stt.updateHeaderArrows();\r\n };\r\n\r\n /**\r\n * Overrides updateHeaderArrows in order to handle arrows indicators\r\n */\r\n SortableTable.prototype.updateHeaderArrows = function(){\r\n let stt = this;\r\n let cells, l, img;\r\n\r\n // external headers\r\n if(adpt.asyncSort && adpt.triggerIds.length > 0){\r\n let triggers = adpt.triggerIds;\r\n cells = [];\r\n l = triggers.length;\r\n for(let j=0; j<triggers.length; j++){\r\n cells.push(Dom.id(triggers[j]));\r\n }\r\n } else {\r\n if(!this.tHead){\r\n return;\r\n }\r\n cells = stt.tHead.rows[stt.headersRow].cells;\r\n l = cells.length;\r\n }\r\n for(let i = 0; i < l; i++){\r\n let cellAttr = cells[i].getAttribute('_sortType');\r\n if(cellAttr !== null && cellAttr !== 'None'){\r\n img = cells[i].lastChild || cells[i];\r\n if(img.nodeName.toLowerCase() !== 'img'){\r\n img = Dom.create('img',\r\n ['src', adpt.imgPath + adpt.imgBlank]);\r\n cells[i].appendChild(img);\r\n }\r\n if (i === stt.sortColumn){\r\n img.className = adpt.imgClassName +' '+\r\n (this.descending ?\r\n adpt.imgDescClassName :\r\n adpt.imgAscClassName);\r\n } else{\r\n img.className = adpt.imgClassName;\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Overrides getRowValue for custom key value feature\r\n * @param {Object} oRow Row element\r\n * @param {String} sType\r\n * @param {Number} nColumn\r\n * @return {String}\r\n */\r\n SortableTable.prototype.getRowValue = function(oRow, sType, nColumn){\r\n let stt = this;\r\n // if we have defined a custom getRowValue use that\r\n let sortTypeInfo = stt._sortTypeInfo[sType];\r\n if (sortTypeInfo && sortTypeInfo.getRowValue){\r\n return sortTypeInfo.getRowValue(oRow, nColumn);\r\n }\r\n let c = oRow.cells[nColumn];\r\n let s = SortableTable.getInnerText(c);\r\n return stt.getValueFromString(s, sType);\r\n };\r\n\r\n /**\r\n * Overrides getInnerText in order to avoid Firefox unexpected sorting\r\n * behaviour with untrimmed text elements\r\n * @param {Object} oNode DOM element\r\n * @return {String} DOM element inner text\r\n */\r\n SortableTable.getInnerText = function(oNode){\r\n if(!oNode){\r\n return;\r\n }\r\n if(oNode.getAttribute(adpt.customKey)){\r\n return oNode.getAttribute(adpt.customKey);\r\n } else {\r\n return Dom.getText(oNode);\r\n }\r\n };\r\n }\r\n\r\n addSortType(){\r\n var args = arguments;\r\n SortableTable.prototype.addSortType(args[0], args[1], args[2], args[3]);\r\n }\r\n\r\n setSortTypes(){\r\n let tf = this.tf,\r\n sortTypes = this.sortTypes,\r\n _sortTypes = [];\r\n\r\n for(let i=0; i<tf.nbCells; i++){\r\n let colType;\r\n\r\n if(sortTypes[i]){\r\n colType = sortTypes[i].toLowerCase();\r\n if(colType === 'none'){\r\n colType = 'None';\r\n }\r\n } else { // resolve column types\r\n if(tf.hasColNbFormat && tf.colNbFormat[i] !== null){\r\n colType = tf.colNbFormat[i].toLowerCase();\r\n } else if(tf.hasColDateType && tf.colDateType[i] !== null){\r\n colType = tf.colDateType[i].toLowerCase()+'date';\r\n } else {\r\n colType = 'String';\r\n }\r\n }\r\n _sortTypes.push(colType);\r\n }\r\n\r\n //Public TF method to add sort type\r\n\r\n //Custom sort types\r\n this.addSortType('number', Number);\r\n this.addSortType('caseinsensitivestring', SortableTable.toUpperCase);\r\n this.addSortType('date', SortableTable.toDate);\r\n this.addSortType('string');\r\n this.addSortType('us', usNumberConverter);\r\n this.addSortType('eu', euNumberConverter);\r\n this.addSortType('dmydate', dmyDateConverter );\r\n this.addSortType('ymddate', ymdDateConverter);\r\n this.addSortType('mdydate', mdyDateConverter);\r\n this.addSortType('ddmmmyyyydate', ddmmmyyyyDateConverter);\r\n this.addSortType('ipaddress', ipAddress, sortIP);\r\n\r\n this.stt = new SortableTable(tf.tbl, _sortTypes);\r\n\r\n /*** external table headers adapter ***/\r\n if(this.asyncSort && this.triggerIds.length > 0){\r\n let triggers = this.triggerIds;\r\n for(let j=0; j<triggers.length; j++){\r\n if(triggers[j] === null){\r\n continue;\r\n }\r\n let trigger = Dom.id(triggers[j]);\r\n if(trigger){\r\n trigger.style.cursor = 'pointer';\r\n\r\n Event.add(trigger, 'click', (evt) => {\r\n let elm = evt.target;\r\n if(!this.tf.sort){\r\n return;\r\n }\r\n this.stt.asyncSort(\r\n Arr.indexByValue(triggers, elm.id, true)\r\n );\r\n });\r\n trigger.setAttribute('_sortType', _sortTypes[j]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Destroy sort\r\n */\r\n destroy(){\r\n let tf = this.tf;\r\n this.sorted = false;\r\n this.initialized = false;\r\n this.stt.destroy();\r\n\r\n let ids = tf.getFiltersId();\r\n for (let idx = 0; idx < ids.length; idx++){\r\n let header = tf.getHeaderElement(idx);\r\n let img = Dom.tag(header, 'img');\r\n\r\n if(img.length === 1){\r\n header.removeChild(img[0]);\r\n }\r\n }\r\n }\r\n\r\n}\r\n\r\n//Converters\r\nfunction usNumberConverter(s){\r\n return Helpers.removeNbFormat(s, 'us');\r\n}\r\nfunction euNumberConverter(s){\r\n return Helpers.removeNbFormat(s, 'eu');\r\n}\r\nfunction dateConverter(s, format){\r\n return DateHelper.format(s, format);\r\n}\r\nfunction dmyDateConverter(s){\r\n return dateConverter(s, 'DMY');\r\n}\r\nfunction mdyDateConverter(s){\r\n return dateConverter(s, 'MDY');\r\n}\r\nfunction ymdDateConverter(s){\r\n return dateConverter(s, 'YMD');\r\n}\r\nfunction ddmmmyyyyDateConverter(s){\r\n return dateConverter(s, 'DDMMMYYYY');\r\n}\r\n\r\nfunction ipAddress(value){\r\n let vals = value.split('.');\r\n for (let x in vals) {\r\n let val = vals[x];\r\n while (3 > val.length){\r\n val = '0'+val;\r\n }\r\n vals[x] = val;\r\n }\r\n return vals.join('.');\r\n}\r\n\r\nfunction sortIP(a,b){\r\n let aa = ipAddress(a.value.toLowerCase());\r\n let bb = ipAddress(b.value.toLowerCase());\r\n if (aa==bb){\r\n return 0;\r\n } else if (aa<bb){\r\n return -1;\r\n } else {\r\n return 1;\r\n }\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "AdapterSortableTable",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"access": null,
"export": true,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": "AdapterSortableTable",
"description": null,
"lineNumber": 8,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#constructor",
"access": null,
"description": "SortableTable Adapter module",
"lineNumber": 14,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#initialized",
"access": null,
"description": null,
"lineNumber": 18,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "name",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#name",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "desc",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#desc",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isPaged",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#isPaged",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sorted",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#sorted",
"access": null,
"description": null,
"lineNumber": 26,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sortTypes",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#sortTypes",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sortColAtStart",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#sortColAtStart",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "asyncSort",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#asyncSort",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "triggerIds",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#triggerIds",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "imgPath",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#imgPath",
"access": null,
"description": null,
"lineNumber": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "imgBlank",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#imgBlank",
"access": null,
"description": null,
"lineNumber": 38,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "imgClassName",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#imgClassName",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "imgAscClassName",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#imgAscClassName",
"access": null,
"description": null,
"lineNumber": 40,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "imgDescClassName",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#imgDescClassName",
"access": null,
"description": null,
"lineNumber": 41,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "customKey",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#customKey",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onSortLoaded",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#onSortLoaded",
"access": null,
"description": "TF additional events **",
"lineNumber": 56,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeSort",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#onBeforeSort",
"access": null,
"description": null,
"lineNumber": 59,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterSort",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#onAfterSort",
"access": null,
"description": null,
"lineNumber": 62,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#tf",
"access": null,
"description": null,
"lineNumber": 65,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#init",
"access": null,
"description": null,
"lineNumber": 68,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#initialized",
"access": null,
"description": null,
"lineNumber": 156,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "sortByColumnIndex",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#sortByColumnIndex",
"access": null,
"description": "Sort specified column",
"lineNumber": 163,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIdx",
"description": "Column index"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "overrideSortableTable",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#overrideSortableTable",
"access": null,
"description": null,
"lineNumber": 167,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "addSortType",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#addSortType",
"access": null,
"description": null,
"lineNumber": 325,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setSortTypes",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#setSortTypes",
"access": null,
"description": null,
"lineNumber": 330,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stt",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#stt",
"access": null,
"description": null,
"lineNumber": 370,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#destroy",
"access": null,
"description": "Destroy sort",
"lineNumber": 401,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sorted",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#sorted",
"access": null,
"description": null,
"lineNumber": 403,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#initialized",
"access": null,
"description": null,
"lineNumber": 404,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "usNumberConverter",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~usNumberConverter",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 421,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "euNumberConverter",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~euNumberConverter",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 424,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "dateConverter",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~dateConverter",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 427,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
},
{
"name": "format",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "dmyDateConverter",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~dmyDateConverter",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 430,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "mdyDateConverter",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~mdyDateConverter",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 433,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "ymdDateConverter",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~ymdDateConverter",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 436,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "ddmmmyyyyDateConverter",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~ddmmmyyyyDateConverter",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 439,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "ipAddress",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~ipAddress",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 443,
"undocument": true,
"params": [
{
"name": "value",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "function",
"static": true,
"variation": null,
"name": "sortIP",
"memberof": "src/extensions/sort/adapterSortabletable.js",
"longname": "src/extensions/sort/adapterSortabletable.js~sortIP",
"access": null,
"export": false,
"importPath": "TableFilter/src/extensions/sort/adapterSortabletable.js",
"importStyle": null,
"description": null,
"lineNumber": 455,
"undocument": true,
"params": [
{
"name": "a",
"types": [
"*"
]
},
{
"name": "b",
"types": [
"*"
]
}
],
"return": {
"types": [
"number"
]
},
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/extensions/sort/sort.js",
"memberof": null,
"longname": "src/extensions/sort/sort.js",
"access": null,
"description": null,
"lineNumber": 2,
"content": "// import 'script!sortabletable';\r\nimport AdapterSortableTable from './adapterSortabletable';\r\n\r\nif(!window.SortableTable){\r\n require('script!sortabletable');\r\n}\r\n\r\nexport default AdapterSortableTable;\r\n"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/helpers.js",
"memberof": null,
"longname": "src/helpers.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * Misc helpers\r\n */\r\n\r\nimport Str from './string';\r\n\r\nexport default {\r\n removeNbFormat(data, format){\r\n if(!data){\r\n return;\r\n }\r\n if(!format){\r\n format = 'us';\r\n }\r\n let n = data;\r\n if(Str.lower(format) === 'us'){\r\n n =+ n.replace(/[^\\d\\.-]/g,'');\r\n } else {\r\n n =+ n.replace(/[^\\d\\,-]/g,'').replace(',','.');\r\n }\r\n return n;\r\n }\r\n};\r\n"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/alternateRows.js",
"memberof": null,
"longname": "src/modules/alternateRows.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\n\r\nexport class AlternateRows{\r\n\r\n /**\r\n * Alternating rows color\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf) {\r\n var f = tf.config();\r\n //defines css class for even rows\r\n this.evenCss = f.even_row_css_class || 'even';\r\n //defines css class for odd rows\r\n this.oddCss = f.odd_row_css_class || 'odd';\r\n\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * Sets alternating rows color\r\n */\r\n init() {\r\n var tf = this.tf;\r\n if(!tf.hasGrid() && !tf.isFirstLoad){\r\n return;\r\n }\r\n var validRowsIndex = tf.validRowsIndex;\r\n var noValidRowsIndex = validRowsIndex===null;\r\n //1st index\r\n var beginIndex = noValidRowsIndex ? tf.refRow : 0;\r\n // nb indexes\r\n var indexLen = noValidRowsIndex ?\r\n tf.nbFilterableRows+beginIndex :\r\n validRowsIndex.length;\r\n var idx = 0;\r\n\r\n //alternates bg color\r\n for(var j=beginIndex; j<indexLen; j++){\r\n var rowIdx = noValidRowsIndex ? j : validRowsIndex[j];\r\n this.setRowBg(rowIdx, idx);\r\n idx++;\r\n }\r\n }\r\n\r\n /**\r\n * Sets row background color\r\n * @param {Number} rowIdx Row index\r\n * @param {Number} idx Valid rows collection index needed to calculate bg\r\n * color\r\n */\r\n setRowBg(rowIdx, idx) {\r\n if(!this.tf.alternateBgs || isNaN(rowIdx)){\r\n return;\r\n }\r\n var rows = this.tf.tbl.rows;\r\n var i = isNaN(idx) ? rowIdx : idx;\r\n this.removeRowBg(rowIdx);\r\n\r\n Dom.addClass(\r\n rows[rowIdx],\r\n (i%2) ? this.evenCss : this.oddCss\r\n );\r\n }\r\n\r\n /**\r\n * Removes row background color\r\n * @param {Number} idx Row index\r\n */\r\n removeRowBg(idx) {\r\n if(isNaN(idx)){\r\n return;\r\n }\r\n var rows = this.tf.tbl.rows;\r\n Dom.removeClass(rows[idx], this.oddCss);\r\n Dom.removeClass(rows[idx], this.evenCss);\r\n }\r\n\r\n /**\r\n * Removes all alternating backgrounds\r\n */\r\n remove() {\r\n if(!this.tf.hasGrid()){\r\n return;\r\n }\r\n for(var i=this.tf.refRow; i<this.tf.nbRows; i++){\r\n this.removeRowBg(i);\r\n }\r\n }\r\n\r\n enable() {\r\n this.tf.alternateBgs = true;\r\n }\r\n\r\n disable() {\r\n this.tf.alternateBgs = false;\r\n }\r\n\r\n}\r\n\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "AlternateRows",
"memberof": "src/modules/alternateRows.js",
"longname": "src/modules/alternateRows.js~AlternateRows",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/alternateRows.js",
"importStyle": "{AlternateRows}",
"description": null,
"lineNumber": 3,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#constructor",
"access": null,
"description": "Alternating rows color",
"lineNumber": 9,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "evenCss",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#evenCss",
"access": null,
"description": null,
"lineNumber": 12,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "oddCss",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#oddCss",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#tf",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#init",
"access": null,
"description": "Sets alternating rows color",
"lineNumber": 22,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setRowBg",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#setRowBg",
"access": null,
"description": "Sets row background color",
"lineNumber": 51,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "rowIdx",
"description": "Row index"
},
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "idx",
"description": "Valid rows collection index needed to calculate bg\ncolor"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "removeRowBg",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#removeRowBg",
"access": null,
"description": "Removes row background color",
"lineNumber": 69,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "idx",
"description": "Row index"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "remove",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#remove",
"access": null,
"description": "Removes all alternating backgrounds",
"lineNumber": 81,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "enable",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#enable",
"access": null,
"description": null,
"lineNumber": 90,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "disable",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#disable",
"access": null,
"description": null,
"lineNumber": 94,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/checkList.js",
"memberof": null,
"longname": "src/modules/checkList.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Arr from '../array';\r\nimport Str from '../string';\r\nimport Sort from '../sort';\r\nimport Event from '../event';\r\n\r\nexport class CheckList{\r\n\r\n /**\r\n * Checklist UI component\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // Configuration object\r\n var f = tf.config();\r\n\r\n this.checkListDiv = []; //checklist container div\r\n //defines css class for div containing checklist filter\r\n this.checkListDivCssClass = f.div_checklist_css_class ||\r\n 'div_checklist';\r\n //defines css class for checklist filters\r\n this.checkListCssClass = f.checklist_css_class || 'flt_checklist';\r\n //defines css class for checklist item (li)\r\n this.checkListItemCssClass = f.checklist_item_css_class ||\r\n 'flt_checklist_item';\r\n //defines css class for selected checklist item (li)\r\n this.checkListSlcItemCssClass = f.checklist_selected_item_css_class ||\r\n 'flt_checklist_slc_item';\r\n //Load on demand text\r\n this.activateCheckListTxt = f.activate_checklist_text ||\r\n 'Click to load filter data';\r\n //defines css class for checklist filters\r\n this.checkListItemDisabledCssClass =\r\n f.checklist_item_disabled_css_class ||\r\n 'flt_checklist_item_disabled';\r\n this.enableCheckListResetFilter =\r\n f.enable_checklist_reset_filter===false ? false : true;\r\n //checklist filter container div\r\n this.prfxCheckListDiv = 'chkdiv_';\r\n\r\n this.isCustom = null;\r\n this.opts = null;\r\n this.optsTxt = null;\r\n this.excludedOpts = null;\r\n\r\n this.tf = tf;\r\n }\r\n\r\n // TODO: move event here\r\n onChange(evt){\r\n let elm = evt.target;\r\n this.tf.activeFilterId = elm.getAttribute('id');\r\n this.tf.activeFlt = Dom.id(this.tf.activeFilterId);\r\n this.tf.Evt.onSlcChange.call(this.tf, evt);\r\n }\r\n\r\n optionClick(evt){\r\n this.setCheckListValues(evt.target);\r\n this.onChange(evt);\r\n }\r\n\r\n /**\r\n * Build checklist UI asynchronously\r\n * @param {Number} colIndex Column index\r\n * @param {Boolean} isExternal Render in external container\r\n * @param {String} extFltId External container id\r\n */\r\n build(colIndex, isExternal, extFltId){\r\n var tf = this.tf;\r\n tf.EvtManager(\r\n tf.Evt.name.checklist,\r\n { slcIndex:colIndex, slcExternal:isExternal, slcId:extFltId }\r\n );\r\n }\r\n\r\n /**\r\n * Build checklist UI\r\n * @param {Number} colIndex Column index\r\n * @param {Boolean} isExternal Render in external container\r\n * @param {String} extFltId External container id\r\n */\r\n _build(colIndex, isExternal=false, extFltId=null){\r\n var tf = this.tf;\r\n colIndex = parseInt(colIndex, 10);\r\n\r\n this.opts = [];\r\n this.optsTxt = [];\r\n\r\n var divFltId = this.prfxCheckListDiv+colIndex+'_'+tf.id;\r\n if((!Dom.id(divFltId) && !isExternal) ||\r\n (!Dom.id(extFltId) && isExternal)){\r\n return;\r\n }\r\n\r\n var flt = !isExternal ? this.checkListDiv[colIndex] : Dom.id(extFltId);\r\n var ul = Dom.create(\r\n 'ul', ['id', tf.fltIds[colIndex]], ['colIndex', colIndex]);\r\n ul.className = this.checkListCssClass;\r\n Event.add(ul, 'change', (evt) => { this.onChange(evt); });\r\n\r\n var rows = tf.tbl.rows;\r\n this.isCustom = tf.isCustomOptions(colIndex);\r\n\r\n var activeFlt;\r\n if(tf.linkedFilters && tf.activeFilterId){\r\n activeFlt = tf.activeFilterId.split('_')[0];\r\n activeFlt = activeFlt.split(tf.prfxFlt)[1];\r\n }\r\n\r\n var filteredDataCol = [];\r\n if(tf.linkedFilters && tf.disableExcludedOptions){\r\n this.excludedOpts = [];\r\n }\r\n\r\n for(var k=tf.refRow; k<tf.nbRows; k++){\r\n // always visible rows don't need to appear on selects as always\r\n // valid\r\n if(tf.hasVisibleRows && tf.visibleRows.indexOf(k) !== -1){\r\n continue;\r\n }\r\n\r\n var cells = rows[k].cells;\r\n var ncells = cells.length;\r\n\r\n // checks if row has exact cell #\r\n if(ncells !== tf.nbCells || this.isCustom){\r\n continue;\r\n }\r\n\r\n // this loop retrieves cell data\r\n for(var j=0; j<ncells; j++){\r\n // WTF: cyclomatic complexity hell :)\r\n if((colIndex===j && (!tf.linkedFilters ||\r\n (tf.linkedFilters && tf.disableExcludedOptions)))||\r\n (colIndex===j && tf.linkedFilters &&\r\n ((rows[k].style.display === '' && !tf.paging) ||\r\n (tf.paging && ((!activeFlt || activeFlt===colIndex )||\r\n (activeFlt!=colIndex &&\r\n Arr.has(tf.validRowsIndex, k))) )))){\r\n var cell_data = tf.getCellData(j, cells[j]);\r\n //Vary Peter's patch\r\n var cell_string = Str.matchCase(\r\n cell_data, tf.matchCase);\r\n // checks if celldata is already in array\r\n if(!Arr.has(this.opts, cell_string, tf.matchCase)){\r\n this.opts.push(cell_data);\r\n }\r\n var filteredCol = filteredDataCol[j];\r\n if(tf.linkedFilters && tf.disableExcludedOptions){\r\n if(!filteredCol){\r\n filteredCol = tf.getFilteredDataCol(j);\r\n }\r\n if(!Arr.has(filteredCol,\r\n cell_string, tf.matchCase) &&\r\n !Arr.has(this.excludedOpts,\r\n cell_string, tf.matchCase) &&\r\n !tf.isFirstLoad){\r\n this.excludedOpts.push(cell_data);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n //Retrieves custom values\r\n if(this.isCustom){\r\n var customValues = tf.getCustomOptions(colIndex);\r\n this.opts = customValues[0];\r\n this.optsTxt = customValues[1];\r\n }\r\n\r\n if(tf.sortSlc && !this.isCustom){\r\n if (!tf.matchCase){\r\n this.opts.sort(Sort.ignoreCase);\r\n if(this.excludedOpts){\r\n this.excludedOpts.sort(Sort.ignoreCase);\r\n }\r\n } else {\r\n this.opts.sort();\r\n if(this.excludedOpts){\r\n this.excludedOpts.sort();\r\n }\r\n }\r\n }\r\n //asc sort\r\n if(tf.sortNumAsc && Arr.has(tf.sortNumAsc, colIndex)){\r\n try{\r\n this.opts.sort(numSortAsc);\r\n if(this.excludedOpts){\r\n this.excludedOpts.sort(numSortAsc);\r\n }\r\n if(this.isCustom){\r\n this.optsTxt.sort(numSortAsc);\r\n }\r\n } catch(e) {\r\n this.opts.sort();\r\n if(this.excludedOpts){\r\n this.excludedOpts.sort();\r\n }\r\n if(this.isCustom){\r\n this.optsTxt.sort();\r\n }\r\n }//in case there are alphanumeric values\r\n }\r\n //desc sort\r\n if(tf.sortNumDesc && Arr.has(tf.sortNumDesc, colIndex)){\r\n try{\r\n this.opts.sort(numSortDesc);\r\n if(this.excludedOpts){\r\n this.excludedOpts.sort(numSortDesc);\r\n }\r\n if(this.isCustom){\r\n this.optsTxt.sort(numSortDesc);\r\n }\r\n } catch(e) {\r\n this.opts.sort();\r\n if(this.excludedOpts){\r\n this.excludedOpts.sort(); }\r\n if(this.isCustom){\r\n this.optsTxt.sort();\r\n }\r\n }//in case there are alphanumeric values\r\n }\r\n\r\n this.addChecks(colIndex, ul, tf.separator);\r\n\r\n if(tf.fillSlcOnDemand){\r\n flt.innerHTML = '';\r\n }\r\n flt.appendChild(ul);\r\n flt.setAttribute('filled', '1');\r\n }\r\n\r\n /**\r\n * Add checklist options\r\n * @param {Number} colIndex Column index\r\n * @param {Object} ul Ul element\r\n */\r\n addChecks(colIndex, ul){\r\n var tf = this.tf;\r\n var chkCt = this.addTChecks(colIndex, ul);\r\n var fltArr = []; //remember grid values\r\n var store = tf.feature('store');\r\n var tmpVal = store ?\r\n store.getFilterValues(tf.fltsValuesCookie)[colIndex] : null;\r\n if(tmpVal && Str.trim(tmpVal).length > 0){\r\n if(tf.hasCustomSlcOptions &&\r\n Arr.has(tf.customSlcOptions.cols, colIndex)){\r\n fltArr.push(tmpVal);\r\n } else {\r\n fltArr = tmpVal.split(' '+tf.orOperator+' ');\r\n }\r\n }\r\n\r\n for(var y=0; y<this.opts.length; y++){\r\n var val = this.opts[y]; //item value\r\n var lbl = this.isCustom ? this.optsTxt[y] : val; //item text\r\n var li = Dom.createCheckItem(\r\n tf.fltIds[colIndex]+'_'+(y+chkCt), val, lbl);\r\n li.className = this.checkListItemCssClass;\r\n if(tf.linkedFilters && tf.disableExcludedOptions &&\r\n Arr.has(this.excludedOpts,\r\n Str.matchCase(val, tf.matchCase), tf.matchCase)){\r\n Dom.addClass(li, this.checkListItemDisabledCssClass);\r\n li.check.disabled = true;\r\n li.disabled = true;\r\n } else {\r\n Event.add(li.check, 'click',\r\n (evt) => { this.optionClick(evt); });\r\n }\r\n ul.appendChild(li);\r\n\r\n if(val===''){\r\n //item is hidden\r\n li.style.display = 'none';\r\n }\r\n\r\n /*** remember grid values ***/\r\n if(tf.rememberGridValues){\r\n if((tf.hasCustomSlcOptions &&\r\n Arr.has(tf.customSlcOptions.cols, colIndex) &&\r\n fltArr.toString().indexOf(val)!= -1) ||\r\n Arr.has(fltArr,\r\n Str.matchCase(val, tf.matchCase), tf.matchCase)){\r\n li.check.checked = true;\r\n this.setCheckListValues(li.check);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add checklist header option\r\n * @param {Number} colIndex Column index\r\n * @param {Object} ul Ul element\r\n */\r\n addTChecks(colIndex, ul){\r\n var tf = this.tf;\r\n var chkCt = 1;\r\n var li0 = Dom.createCheckItem(\r\n tf.fltIds[colIndex]+'_0', '', tf.displayAllText);\r\n li0.className = this.checkListItemCssClass;\r\n ul.appendChild(li0);\r\n\r\n Event.add(li0.check, 'click', (evt) => {\r\n this.optionClick(evt);\r\n });\r\n\r\n if(!this.enableCheckListResetFilter){\r\n li0.style.display = 'none';\r\n }\r\n\r\n if(tf.enableEmptyOption){\r\n var li1 = Dom.createCheckItem(\r\n tf.fltIds[colIndex]+'_1', tf.emOperator, tf.emptyText);\r\n li1.className = this.checkListItemCssClass;\r\n ul.appendChild(li1);\r\n Event.add(li1.check, 'click', (evt) => {\r\n this.optionClick(evt);\r\n });\r\n chkCt++;\r\n }\r\n\r\n if(tf.enableNonEmptyOption){\r\n var li2 = Dom.createCheckItem(\r\n tf.fltIds[colIndex]+'_2',\r\n tf.nmOperator,\r\n tf.nonEmptyText\r\n );\r\n li2.className = this.checkListItemCssClass;\r\n ul.appendChild(li2);\r\n Event.add(li2.check, 'click', (evt) => {\r\n this.optionClick(evt);\r\n });\r\n chkCt++;\r\n }\r\n return chkCt;\r\n }\r\n\r\n /**\r\n * Store checked options in DOM element attribute\r\n * @param {Object} o checklist option DOM element\r\n */\r\n setCheckListValues(o){\r\n if(!o){\r\n return;\r\n }\r\n var tf = this.tf;\r\n var chkValue = o.value; //checked item value\r\n var chkIndex = parseInt(o.id.split('_')[2], 10);\r\n var filterTag = 'ul', itemTag = 'li';\r\n var n = o;\r\n\r\n //ul tag search\r\n while(Str.lower(n.nodeName)!==filterTag){\r\n n = n.parentNode;\r\n }\r\n\r\n var li = n.childNodes[chkIndex];\r\n var colIndex = n.getAttribute('colIndex');\r\n var fltValue = n.getAttribute('value'); //filter value (ul tag)\r\n var fltIndexes = n.getAttribute('indexes'); //selected items (ul tag)\r\n\r\n if(o.checked){\r\n //show all item\r\n if(chkValue===''){\r\n if((fltIndexes && fltIndexes!=='')){\r\n //items indexes\r\n var indSplit = fltIndexes.split(tf.separator);\r\n //checked items loop\r\n for(var u=0; u<indSplit.length; u++){\r\n //checked item\r\n var cChk = Dom.id(tf.fltIds[colIndex]+'_'+indSplit[u]);\r\n if(cChk){\r\n cChk.checked = false;\r\n Dom.removeClass(\r\n n.childNodes[indSplit[u]],\r\n this.checkListSlcItemCssClass\r\n );\r\n }\r\n }\r\n }\r\n n.setAttribute('value', '');\r\n n.setAttribute('indexes', '');\r\n\r\n } else {\r\n fltValue = (fltValue) ? fltValue : '';\r\n chkValue = Str.trim(\r\n fltValue+' '+chkValue+' '+tf.orOperator);\r\n chkIndex = fltIndexes + chkIndex + tf.separator;\r\n n.setAttribute('value', chkValue );\r\n n.setAttribute('indexes', chkIndex);\r\n //1st option unchecked\r\n if(Dom.id(tf.fltIds[colIndex]+'_0')){\r\n Dom.id(tf.fltIds[colIndex]+'_0').checked = false;\r\n }\r\n }\r\n\r\n if(Str.lower(li.nodeName) === itemTag){\r\n Dom.removeClass(\r\n n.childNodes[0], this.checkListSlcItemCssClass);\r\n Dom.addClass(li, this.checkListSlcItemCssClass);\r\n }\r\n } else { //removes values and indexes\r\n if(chkValue!==''){\r\n var replaceValue = new RegExp(\r\n Str.rgxEsc(chkValue+' '+tf.orOperator));\r\n fltValue = fltValue.replace(replaceValue,'');\r\n n.setAttribute('value', Str.trim(fltValue));\r\n\r\n var replaceIndex = new RegExp(\r\n Str.rgxEsc(chkIndex + tf.separator));\r\n fltIndexes = fltIndexes.replace(replaceIndex, '');\r\n n.setAttribute('indexes', fltIndexes);\r\n }\r\n if(Str.lower(li.nodeName)===itemTag){\r\n Dom.removeClass(li, this.checkListSlcItemCssClass);\r\n }\r\n }\r\n }\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "CheckList",
"memberof": "src/modules/checkList.js",
"longname": "src/modules/checkList.js~CheckList",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/checkList.js",
"importStyle": "{CheckList}",
"description": null,
"lineNumber": 7,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#constructor",
"access": null,
"description": "Checklist UI component",
"lineNumber": 13,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "checkListDiv",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#checkListDiv",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "checkListDivCssClass",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#checkListDivCssClass",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "checkListCssClass",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#checkListCssClass",
"access": null,
"description": null,
"lineNumber": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "checkListItemCssClass",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#checkListItemCssClass",
"access": null,
"description": null,
"lineNumber": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "checkListSlcItemCssClass",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#checkListSlcItemCssClass",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activateCheckListTxt",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#activateCheckListTxt",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "checkListItemDisabledCssClass",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#checkListItemDisabledCssClass",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableCheckListResetFilter",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#enableCheckListResetFilter",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCheckListDiv",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#prfxCheckListDiv",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isCustom",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#isCustom",
"access": null,
"description": null,
"lineNumber": 41,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "opts",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#opts",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "optsTxt",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#optsTxt",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "excludedOpts",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#excludedOpts",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#tf",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "onChange",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#onChange",
"access": null,
"description": null,
"lineNumber": 50,
"undocument": true,
"params": [
{
"name": "evt",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "optionClick",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#optionClick",
"access": null,
"description": null,
"lineNumber": 57,
"undocument": true,
"params": [
{
"name": "evt",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "build",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#build",
"access": null,
"description": "Build checklist UI asynchronously",
"lineNumber": 68,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isExternal",
"description": "Render in external container"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "extFltId",
"description": "External container id"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_build",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#_build",
"access": null,
"description": "Build checklist UI",
"lineNumber": 82,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isExternal",
"description": "Render in external container"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "extFltId",
"description": "External container id"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "opts",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#opts",
"access": null,
"description": null,
"lineNumber": 86,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "optsTxt",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#optsTxt",
"access": null,
"description": null,
"lineNumber": 87,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isCustom",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#isCustom",
"access": null,
"description": null,
"lineNumber": 102,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "excludedOpts",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#excludedOpts",
"access": null,
"description": null,
"lineNumber": 112,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "opts",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#opts",
"access": null,
"description": null,
"lineNumber": 168,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "optsTxt",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#optsTxt",
"access": null,
"description": null,
"lineNumber": 169,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "addChecks",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#addChecks",
"access": null,
"description": "Add checklist options",
"lineNumber": 239,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "ul",
"description": "Ul element"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "addTChecks",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#addTChecks",
"access": null,
"description": "Add checklist header option",
"lineNumber": 297,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "ul",
"description": "Ul element"
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setCheckListValues",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#setCheckListValues",
"access": null,
"description": "Store checked options in DOM element attribute",
"lineNumber": 344,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "o",
"description": "checklist option DOM element"
}
],
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/clearButton.js",
"memberof": null,
"longname": "src/modules/clearButton.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Event from '../event';\r\n\r\nexport class ClearButton{\r\n\r\n /**\r\n * Clear button component\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // Configuration object\r\n var f = tf.config();\r\n\r\n //id of container element\r\n this.btnResetTgtId = f.btn_reset_target_id || null;\r\n //reset button element\r\n this.btnResetEl = null;\r\n //defines reset text\r\n this.btnResetText = f.btn_reset_text || 'Reset';\r\n //defines reset button tooltip\r\n this.btnResetTooltip = f.btn_reset_tooltip || 'Clear filters';\r\n //defines reset button innerHtml\r\n this.btnResetHtml = f.btn_reset_html ||\r\n (!tf.enableIcons ? null :\r\n '<input type=\"button\" value=\"\" class=\"'+tf.btnResetCssClass+'\" ' +\r\n 'title=\"'+this.btnResetTooltip+'\" />');\r\n //span containing reset button\r\n this.prfxResetSpan = 'resetspan_';\r\n\r\n this.tf = tf;\r\n }\r\n\r\n onClick(){\r\n this.tf.clearFilters();\r\n }\r\n\r\n /**\r\n * Build DOM elements\r\n */\r\n init(){\r\n var tf = this.tf;\r\n\r\n if(!tf.hasGrid() && !tf.isFirstLoad && tf.btnResetEl){\r\n return;\r\n }\r\n\r\n var resetspan = Dom.create('span', ['id', this.prfxResetSpan+tf.id]);\r\n\r\n // reset button is added to defined element\r\n if(!this.btnResetTgtId){\r\n tf.setToolbar();\r\n }\r\n var targetEl = !this.btnResetTgtId ?\r\n tf.rDiv : Dom.id(this.btnResetTgtId);\r\n targetEl.appendChild(resetspan);\r\n\r\n if(!this.btnResetHtml){\r\n var fltreset = Dom.create('a', ['href', 'javascript:void(0);']);\r\n fltreset.className = tf.btnResetCssClass;\r\n fltreset.appendChild(Dom.text(this.btnResetText));\r\n resetspan.appendChild(fltreset);\r\n // fltreset.onclick = this.Evt._Clear;\r\n Event.add(fltreset, 'click', () => { this.onClick(); });\r\n } else {\r\n resetspan.innerHTML = this.btnResetHtml;\r\n var resetEl = resetspan.firstChild;\r\n // resetEl.onclick = this.Evt._Clear;\r\n Event.add(resetEl, 'click', () => { this.onClick(); });\r\n }\r\n this.btnResetEl = resetspan.firstChild;\r\n }\r\n\r\n /**\r\n * Remove clear button UI\r\n */\r\n destroy(){\r\n var tf = this.tf;\r\n\r\n if(!tf.hasGrid() || !this.btnResetEl){\r\n return;\r\n }\r\n\r\n var resetspan = Dom.id(tf.prfxResetSpan+tf.id);\r\n if(resetspan){\r\n resetspan.parentNode.removeChild(resetspan);\r\n }\r\n this.btnResetEl = null;\r\n }\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "ClearButton",
"memberof": "src/modules/clearButton.js",
"longname": "src/modules/clearButton.js~ClearButton",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/clearButton.js",
"importStyle": "{ClearButton}",
"description": null,
"lineNumber": 4,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#constructor",
"access": null,
"description": "Clear button component",
"lineNumber": 10,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetTgtId",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#btnResetTgtId",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetEl",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#btnResetEl",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetText",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#btnResetText",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetTooltip",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#btnResetTooltip",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetHtml",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#btnResetHtml",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxResetSpan",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#prfxResetSpan",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#tf",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "onClick",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#onClick",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#init",
"access": null,
"description": "Build DOM elements",
"lineNumber": 40,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetEl",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#btnResetEl",
"access": null,
"description": null,
"lineNumber": 70,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#destroy",
"access": null,
"description": "Remove clear button UI",
"lineNumber": 76,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetEl",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#btnResetEl",
"access": null,
"description": null,
"lineNumber": 87,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/dropdown.js",
"memberof": null,
"longname": "src/modules/dropdown.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Arr from '../array';\r\nimport Str from '../string';\r\nimport Sort from '../sort';\r\n\r\nexport class Dropdown{\r\n\r\n /**\r\n * Dropdown UI component\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // Configuration object\r\n var f = tf.config();\r\n\r\n this.enableSlcResetFilter = f.enable_slc_reset_filter===false ?\r\n false : true;\r\n //defines empty option text\r\n this.nonEmptyText = f.non_empty_text || '(Non empty)';\r\n //sets select filling method: 'innerHTML' or 'createElement'\r\n this.slcFillingMethod = f.slc_filling_method || 'createElement';\r\n //IE only, tooltip text appearing on select before it is populated\r\n this.activateSlcTooltip = f.activate_slc_tooltip ||\r\n 'Click to activate';\r\n //tooltip text appearing on multiple select\r\n this.multipleSlcTooltip = f.multiple_slc_tooltip ||\r\n 'Use Ctrl key for multiple selections';\r\n\r\n this.isCustom = null;\r\n this.opts = null;\r\n this.optsTxt = null;\r\n this.slcInnerHtml = null;\r\n\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * Build drop-down filter UI asynchronously\r\n * @param {Number} colIndex Column index\r\n * @param {Boolean} isLinked Enable linked refresh behaviour\r\n * @param {Boolean} isExternal Render in external container\r\n * @param {String} extSlcId External container id\r\n */\r\n build(colIndex, isLinked, isExternal, extSlcId){\r\n var tf = this.tf;\r\n tf.EvtManager(\r\n tf.Evt.name.dropdown,\r\n {\r\n slcIndex: colIndex,\r\n slcRefreshed: isLinked,\r\n slcExternal: isExternal,\r\n slcId: extSlcId\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * Build drop-down filter UI\r\n * @param {Number} colIndex Column index\r\n * @param {Boolean} isLinked Enable linked refresh behaviour\r\n * @param {Boolean} isExternal Render in external container\r\n * @param {String} extSlcId External container id\r\n */\r\n _build(colIndex, isLinked=false, isExternal=false, extSlcId=null){\r\n var tf = this.tf;\r\n colIndex = parseInt(colIndex, 10);\r\n\r\n this.opts = [];\r\n this.optsTxt = [];\r\n this.slcInnerHtml = '';\r\n\r\n var slcId = tf.fltIds[colIndex];\r\n if((!Dom.id(slcId) && !isExternal) ||\r\n (!Dom.id(extSlcId) && isExternal)){\r\n return;\r\n }\r\n var slc = !isExternal ? Dom.id(slcId) : Dom.id(extSlcId),\r\n rows = tf.tbl.rows,\r\n matchCase = tf.matchCase;\r\n\r\n //custom select test\r\n this.isCustom = tf.isCustomOptions(colIndex);\r\n\r\n //custom selects text\r\n var activeFlt;\r\n if(isLinked && tf.activeFilterId){\r\n activeFlt = tf.activeFilterId.split('_')[0];\r\n activeFlt = activeFlt.split(tf.prfxFlt)[1];\r\n }\r\n\r\n /*** remember grid values ***/\r\n var fltsValues = [], fltArr = [];\r\n if(tf.rememberGridValues){\r\n fltsValues =\r\n tf.feature('store').getFilterValues(tf.fltsValuesCookie);\r\n if(fltsValues && !Str.isEmpty(fltsValues.toString())){\r\n if(this.isCustom){\r\n fltArr.push(fltsValues[colIndex]);\r\n } else {\r\n fltArr = fltsValues[colIndex].split(' '+tf.orOperator+' ');\r\n }\r\n }\r\n }\r\n\r\n var excludedOpts = null,\r\n filteredDataCol = null;\r\n if(isLinked && tf.disableExcludedOptions){\r\n excludedOpts = [];\r\n filteredDataCol = [];\r\n }\r\n\r\n for(var k=tf.refRow; k<tf.nbRows; k++){\r\n // always visible rows don't need to appear on selects as always\r\n // valid\r\n if(tf.hasVisibleRows && tf.visibleRows.indexOf(k) !== -1){\r\n continue;\r\n }\r\n\r\n var cell = rows[k].cells,\r\n nchilds = cell.length;\r\n\r\n // checks if row has exact cell #\r\n if(nchilds !== tf.nbCells || this.isCustom){\r\n continue;\r\n }\r\n\r\n // this loop retrieves cell data\r\n for(var j=0; j<nchilds; j++){\r\n // WTF: cyclomatic complexity hell\r\n if((colIndex===j &&\r\n (!isLinked ||\r\n (isLinked && tf.disableExcludedOptions))) ||\r\n (colIndex==j && isLinked &&\r\n ((rows[k].style.display === '' && !tf.paging) ||\r\n (tf.paging && (!tf.validRowsIndex ||\r\n (tf.validRowsIndex &&\r\n Arr.has(tf.validRowsIndex, k))) &&\r\n ((activeFlt===undefined || activeFlt==colIndex) ||\r\n (activeFlt!=colIndex &&\r\n Arr.has(tf.validRowsIndex, k) ))) ))){\r\n var cell_data = tf.getCellData(j, cell[j]),\r\n //Vary Peter's patch\r\n cell_string = Str.matchCase(cell_data, matchCase);\r\n\r\n // checks if celldata is already in array\r\n if(!Arr.has(this.opts, cell_string, matchCase)){\r\n this.opts.push(cell_data);\r\n }\r\n\r\n if(isLinked && tf.disableExcludedOptions){\r\n var filteredCol = filteredDataCol[j];\r\n if(!filteredCol){\r\n filteredCol = tf.getFilteredDataCol(j);\r\n }\r\n if(!Arr.has(filteredCol, cell_string, matchCase) &&\r\n !Arr.has(\r\n excludedOpts, cell_string, matchCase) &&\r\n !this.isFirstLoad){\r\n excludedOpts.push(cell_data);\r\n }\r\n }\r\n }//if colIndex==j\r\n }//for j\r\n }//for k\r\n\r\n //Retrieves custom values\r\n if(this.isCustom){\r\n var customValues = tf.getCustomOptions(colIndex);\r\n this.opts = customValues[0];\r\n this.optsTxt = customValues[1];\r\n }\r\n\r\n if(tf.sortSlc && !this.isCustom){\r\n if (!matchCase){\r\n this.opts.sort(Sort.ignoreCase);\r\n if(excludedOpts){\r\n excludedOpts.sort(Sort.ignoreCase);\r\n }\r\n } else {\r\n this.opts.sort();\r\n if(excludedOpts){ excludedOpts.sort(); }\r\n }\r\n }\r\n\r\n //asc sort\r\n if(tf.sortNumAsc && Arr.has(tf.sortNumAsc, colIndex)){\r\n try{\r\n this.opts.sort( numSortAsc );\r\n if(excludedOpts){\r\n excludedOpts.sort(numSortAsc);\r\n }\r\n if(this.isCustom){\r\n this.optsTxt.sort(numSortAsc);\r\n }\r\n } catch(e) {\r\n this.opts.sort();\r\n if(excludedOpts){\r\n excludedOpts.sort();\r\n }\r\n if(this.isCustom){\r\n this.optsTxt.sort();\r\n }\r\n }//in case there are alphanumeric values\r\n }\r\n //desc sort\r\n if(tf.sortNumDesc && Arr.has(tf.sortNumDesc, colIndex)){\r\n try{\r\n this.opts.sort(numSortDesc);\r\n if(excludedOpts){\r\n excludedOpts.sort(numSortDesc);\r\n }\r\n if(this.isCustom){\r\n this.optsTxt.sort(numSortDesc);\r\n }\r\n } catch(e) {\r\n this.opts.sort();\r\n if(excludedOpts){\r\n excludedOpts.sort();\r\n }\r\n if(this.isCustom){\r\n this.optsTxt.sort();\r\n }\r\n }//in case there are alphanumeric values\r\n }\r\n\r\n //populates drop-down\r\n this.addOptions(\r\n colIndex, slc, isLinked, excludedOpts, fltsValues, fltArr);\r\n }\r\n\r\n /**\r\n * Add drop-down options\r\n * @param {Number} colIndex Column index\r\n * @param {Object} slc Select Dom element\r\n * @param {Boolean} isLinked Enable linked refresh behaviour\r\n * @param {Array} excludedOpts Array of excluded options\r\n * @param {Array} fltsValues Collection of persisted filter values\r\n * @param {Array} fltArr Collection of persisted filter values\r\n */\r\n addOptions(colIndex, slc, isLinked, excludedOpts, fltsValues, fltArr){\r\n var tf = this.tf,\r\n fillMethod = Str.lower(this.slcFillingMethod),\r\n slcValue = slc.value;\r\n\r\n slc.innerHTML = '';\r\n slc = this.addFirstOption(slc);\r\n\r\n for(var y=0; y<this.opts.length; y++){\r\n if(this.opts[y]===''){\r\n continue;\r\n }\r\n var val = this.opts[y]; //option value\r\n var lbl = this.isCustom ? this.optsTxt[y] : val; //option text\r\n var isDisabled = false;\r\n if(isLinked && tf.disableExcludedOptions &&\r\n Arr.has(\r\n excludedOpts,\r\n Str.matchCase(val, tf.matchCase),\r\n tf.matchCase\r\n )){\r\n isDisabled = true;\r\n }\r\n\r\n if(fillMethod === 'innerhtml'){\r\n var slcAttr = '';\r\n if(tf.fillSlcOnDemand && slcValue===this.opts[y]){\r\n slcAttr = 'selected=\"selected\"';\r\n }\r\n this.slcInnerHtml += '<option value=\"'+val+'\" ' + slcAttr +\r\n (isDisabled ? 'disabled=\"disabled\"' : '')+ '>' +\r\n lbl+'</option>';\r\n } else {\r\n var opt;\r\n //fill select on demand\r\n if(tf.fillSlcOnDemand && slcValue===this.opts[y] &&\r\n tf['col'+colIndex]===tf.fltTypeSlc){\r\n opt = Dom.createOpt(lbl, val, true);\r\n } else {\r\n if(tf['col'+colIndex]!==tf.fltTypeMulti){\r\n opt = Dom.createOpt(\r\n lbl,\r\n val,\r\n (fltsValues[colIndex]!==' ' &&\r\n val===fltsValues[colIndex]) ? true : false\r\n );\r\n } else {\r\n opt = Dom.createOpt(\r\n lbl,\r\n val,\r\n (Arr.has(fltArr,\r\n Str.matchCase(this.opts[y], tf.matchCase),\r\n tf.matchCase) ||\r\n fltArr.toString().indexOf(val)!== -1) ?\r\n true : false\r\n );\r\n }\r\n }\r\n if(isDisabled){\r\n opt.disabled = true;\r\n }\r\n slc.appendChild(opt);\r\n }\r\n }// for y\r\n\r\n if(fillMethod === 'innerhtml'){\r\n slc.innerHTML += this.slcInnerHtml;\r\n }\r\n slc.setAttribute('filled', '1');\r\n }\r\n\r\n /**\r\n * Add drop-down header option\r\n * @param {Object} slc Select DOM element\r\n */\r\n addFirstOption(slc){\r\n var tf = this.tf,\r\n fillMethod = Str.lower(this.slcFillingMethod);\r\n\r\n if(fillMethod === 'innerhtml'){\r\n this.slcInnerHtml += '<option value=\"\">'+ tf.displayAllText +\r\n '</option>';\r\n }\r\n else {\r\n var opt0 = Dom.createOpt(\r\n (!this.enableSlcResetFilter ? '' : tf.displayAllText),'');\r\n if(!this.enableSlcResetFilter){\r\n opt0.style.display = 'none';\r\n }\r\n slc.appendChild(opt0);\r\n if(tf.enableEmptyOption){\r\n var opt1 = Dom.createOpt(tf.emptyText, tf.emOperator);\r\n slc.appendChild(opt1);\r\n }\r\n if(tf.enableNonEmptyOption){\r\n var opt2 = Dom.createOpt(tf.nonEmptyText, tf.nmOperator);\r\n slc.appendChild(opt2);\r\n }\r\n }\r\n return slc;\r\n }\r\n\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "Dropdown",
"memberof": "src/modules/dropdown.js",
"longname": "src/modules/dropdown.js~Dropdown",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/dropdown.js",
"importStyle": "{Dropdown}",
"description": null,
"lineNumber": 6,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#constructor",
"access": null,
"description": "Dropdown UI component",
"lineNumber": 12,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableSlcResetFilter",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#enableSlcResetFilter",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nonEmptyText",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#nonEmptyText",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "slcFillingMethod",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#slcFillingMethod",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activateSlcTooltip",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#activateSlcTooltip",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "multipleSlcTooltip",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#multipleSlcTooltip",
"access": null,
"description": null,
"lineNumber": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isCustom",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#isCustom",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "opts",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#opts",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "optsTxt",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#optsTxt",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "slcInnerHtml",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#slcInnerHtml",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#tf",
"access": null,
"description": null,
"lineNumber": 34,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "build",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#build",
"access": null,
"description": "Build drop-down filter UI asynchronously",
"lineNumber": 44,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isLinked",
"description": "Enable linked refresh behaviour"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isExternal",
"description": "Render in external container"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "extSlcId",
"description": "External container id"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_build",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#_build",
"access": null,
"description": "Build drop-down filter UI",
"lineNumber": 64,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isLinked",
"description": "Enable linked refresh behaviour"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isExternal",
"description": "Render in external container"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "extSlcId",
"description": "External container id"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "opts",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#opts",
"access": null,
"description": null,
"lineNumber": 68,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "optsTxt",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#optsTxt",
"access": null,
"description": null,
"lineNumber": 69,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "slcInnerHtml",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#slcInnerHtml",
"access": null,
"description": null,
"lineNumber": 70,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isCustom",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#isCustom",
"access": null,
"description": null,
"lineNumber": 82,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "opts",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#opts",
"access": null,
"description": null,
"lineNumber": 169,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "optsTxt",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#optsTxt",
"access": null,
"description": null,
"lineNumber": 170,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "addOptions",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#addOptions",
"access": null,
"description": "Add drop-down options",
"lineNumber": 240,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "slc",
"description": "Select Dom element"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isLinked",
"description": "Enable linked refresh behaviour"
},
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "excludedOpts",
"description": "Array of excluded options"
},
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "fltsValues",
"description": "Collection of persisted filter values"
},
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "fltArr",
"description": "Collection of persisted filter values"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "slcInnerHtml",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#slcInnerHtml",
"access": null,
"description": null,
"lineNumber": 269,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "addFirstOption",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#addFirstOption",
"access": null,
"description": "Add drop-down header option",
"lineNumber": 315,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "slc",
"description": "Select DOM element"
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "slcInnerHtml",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#slcInnerHtml",
"access": null,
"description": null,
"lineNumber": 320,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/gridLayout.js",
"memberof": null,
"longname": "src/modules/gridLayout.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Types from '../types';\r\nimport Event from '../event';\r\n\r\nexport class GridLayout{\r\n\r\n /**\r\n * Grid layout, table with fixed headers\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf) {\r\n var f = tf.config();\r\n\r\n //defines grid width\r\n this.gridWidth = f.grid_width || null;\r\n //defines grid height\r\n this.gridHeight = f.grid_height || null;\r\n //defines css class for main container\r\n this.gridMainContCssClass = f.grid_cont_css_class || 'grd_Cont';\r\n //defines css class for div containing table\r\n this.gridContCssClass = f.grid_tbl_cont_css_class || 'grd_tblCont';\r\n //defines css class for div containing headers' table\r\n this.gridHeadContCssClass = f.grid_tblHead_cont_css_class ||\r\n 'grd_headTblCont';\r\n //defines css class for div containing rows counter, paging etc.\r\n this.gridInfDivCssClass = f.grid_inf_grid_css_class || 'grd_inf';\r\n //defines which row contains column headers\r\n this.gridHeadRowIndex = f.grid_headers_row_index || 0;\r\n //array of headers row indexes to be placed in header table\r\n this.gridHeadRows = f.grid_headers_rows || [0];\r\n //generate filters in table headers\r\n this.gridEnableFilters = f.grid_enable_default_filters!==undefined ?\r\n f.grid_enable_default_filters : true;\r\n //default col width\r\n this.gridDefaultColWidth = f.grid_default_col_width || '100px';\r\n //enables/disables columns resizer\r\n // this.gridEnableColResizer = f.grid_enable_cols_resizer!==undefined ?\r\n // f.grid_enable_cols_resizer : false;\r\n // //defines col resizer script path\r\n // this.gridColResizerPath = f.grid_cont_col_resizer_path ||\r\n // this.basePath+'TFExt_ColsResizer/TFExt_ColsResizer.js';\r\n\r\n this.gridColElms = [];\r\n\r\n //div containing grid elements if grid_layout true\r\n this.prfxMainTblCont = 'gridCont_';\r\n //div containing table if grid_layout true\r\n this.prfxTblCont = 'tblCont_';\r\n //div containing headers table if grid_layout true\r\n this.prfxHeadTblCont = 'tblHeadCont_';\r\n //headers' table if grid_layout true\r\n this.prfxHeadTbl = 'tblHead_';\r\n //id of td containing the filter if grid_layout true\r\n this.prfxGridFltTd = '_td_';\r\n //id of th containing column header if grid_layout true\r\n this.prfxGridTh = 'tblHeadTh_';\r\n\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * Generates a grid with fixed headers\r\n */\r\n init(){\r\n var tf = this.tf;\r\n var f = tf.config();\r\n var tbl = tf.tbl;\r\n\r\n if(!tf.gridLayout){\r\n return;\r\n }\r\n\r\n tf.isExternalFlt = true;\r\n\r\n // default width of 100px if column widths not set\r\n if(!tf.hasColWidths){\r\n tf.colWidths = [];\r\n for(var k=0; k<tf.nbCells; k++){\r\n var colW,\r\n cell = tbl.rows[this.gridHeadRowIndex].cells[k];\r\n if(cell.width !== ''){\r\n colW = cell.width;\r\n } else if(cell.style.width !== ''){\r\n colW = parseInt(cell.style.width, 10);\r\n } else {\r\n colW = this.gridDefaultColWidth;\r\n }\r\n tf.colWidths[k] = colW;\r\n }\r\n tf.hasColWidths = true;\r\n }\r\n tf.setColWidths(this.gridHeadRowIndex);\r\n\r\n var tblW;//initial table width\r\n if(tbl.width !== ''){\r\n tblW = tbl.width;\r\n }\r\n else if(tbl.style.width !== ''){\r\n tblW = parseInt(tbl.style.width, 10);\r\n } else {\r\n tblW = tbl.clientWidth;\r\n }\r\n\r\n //Main container: it will contain all the elements\r\n this.tblMainCont = Dom.create('div',\r\n ['id', this.prfxMainTblCont + tf.id]);\r\n this.tblMainCont.className = this.gridMainContCssClass;\r\n if(this.gridWidth){\r\n this.tblMainCont.style.width = this.gridWidth;\r\n }\r\n tbl.parentNode.insertBefore(this.tblMainCont, tbl);\r\n\r\n //Table container: div wrapping content table\r\n this.tblCont = Dom.create('div',['id', this.prfxTblCont + tf.id]);\r\n this.tblCont.className = this.gridContCssClass;\r\n if(this.gridWidth){\r\n if(this.gridWidth.indexOf('%') != -1){\r\n console.log(this.gridWidth);\r\n this.tblCont.style.width = '100%';\r\n } else {\r\n this.tblCont.style.width = this.gridWidth;\r\n }\r\n }\r\n if(this.gridHeight){\r\n this.tblCont.style.height = this.gridHeight;\r\n }\r\n tbl.parentNode.insertBefore(this.tblCont, tbl);\r\n var t = tbl.parentNode.removeChild(tbl);\r\n this.tblCont.appendChild(t);\r\n\r\n //In case table width is expressed in %\r\n if(tbl.style.width === ''){\r\n tbl.style.width = (tf._containsStr('%', tblW) ?\r\n tbl.clientWidth : tblW) + 'px';\r\n }\r\n\r\n var d = this.tblCont.parentNode.removeChild(this.tblCont);\r\n this.tblMainCont.appendChild(d);\r\n\r\n //Headers table container: div wrapping headers table\r\n this.headTblCont = Dom.create(\r\n 'div',['id', this.prfxHeadTblCont + tf.id]);\r\n this.headTblCont.className = this.gridHeadContCssClass;\r\n if(this.gridWidth){\r\n if(this.gridWidth.indexOf('%') != -1){\r\n console.log(this.gridWidth);\r\n this.headTblCont.style.width = '100%';\r\n } else {\r\n this.headTblCont.style.width = this.gridWidth;\r\n }\r\n }\r\n\r\n //Headers table\r\n this.headTbl = Dom.create('table', ['id', this.prfxHeadTbl + tf.id]);\r\n var tH = Dom.create('tHead'); //IE<7 needs it\r\n\r\n //1st row should be headers row, ids are added if not set\r\n //Those ids are used by the sort feature\r\n var hRow = tbl.rows[this.gridHeadRowIndex];\r\n var sortTriggers = [];\r\n for(var n=0; n<tf.nbCells; n++){\r\n var c = hRow.cells[n];\r\n var thId = c.getAttribute('id');\r\n if(!thId || thId===''){\r\n thId = this.prfxGridTh+n+'_'+tf.id;\r\n c.setAttribute('id', thId);\r\n }\r\n sortTriggers.push(thId);\r\n }\r\n\r\n //Filters row is created\r\n var filtersRow = Dom.create('tr');\r\n if(this.gridEnableFilters && tf.fltGrid){\r\n tf.externalFltTgtIds = [];\r\n for(var j=0; j<tf.nbCells; j++){\r\n var fltTdId = tf.prfxFlt+j+ this.prfxGridFltTd +tf.id;\r\n var cl = Dom.create(tf.fltCellTag, ['id', fltTdId]);\r\n filtersRow.appendChild(cl);\r\n tf.externalFltTgtIds[j] = fltTdId;\r\n }\r\n }\r\n //Headers row are moved from content table to headers table\r\n for(var i=0; i<this.gridHeadRows.length; i++){\r\n var headRow = tbl.rows[this.gridHeadRows[0]];\r\n tH.appendChild(headRow);\r\n }\r\n this.headTbl.appendChild(tH);\r\n if(tf.filtersRowIndex === 0){\r\n tH.insertBefore(filtersRow,hRow);\r\n } else {\r\n tH.appendChild(filtersRow);\r\n }\r\n\r\n this.headTblCont.appendChild(this.headTbl);\r\n this.tblCont.parentNode.insertBefore(this.headTblCont, this.tblCont);\r\n\r\n //THead needs to be removed in content table for sort feature\r\n var thead = Dom.tag(tbl, 'thead');\r\n if(thead.length>0){\r\n tbl.removeChild(thead[0]);\r\n }\r\n\r\n //Headers table style\r\n this.headTbl.style.tableLayout = 'fixed';\r\n tbl.style.tableLayout = 'fixed';\r\n this.headTbl.cellPadding = tbl.cellPadding;\r\n this.headTbl.cellSpacing = tbl.cellSpacing;\r\n // this.headTbl.style.width = tbl.style.width;\r\n\r\n //content table without headers needs col widths to be reset\r\n tf.setColWidths(0, this.headTbl);\r\n\r\n //Headers container width\r\n // this.headTblCont.style.width = this.tblCont.clientWidth+'px';\r\n\r\n tbl.style.width = '';\r\n //\r\n this.headTbl.style.width = tbl.clientWidth + 'px';\r\n //\r\n\r\n //scroll synchronisation\r\n Event.add(this.tblCont, 'scroll', (evt)=> {\r\n var elm = Event.target(evt);\r\n var scrollLeft = elm.scrollLeft;\r\n this.headTblCont.scrollLeft = scrollLeft;\r\n //New pointerX calc taking into account scrollLeft\r\n // if(!o.isPointerXOverwritten){\r\n // try{\r\n // o.Evt.pointerX = function(evt){\r\n // var e = evt || global.event;\r\n // var bdScrollLeft = tf_StandardBody().scrollLeft +\r\n // scrollLeft;\r\n // return (e.pageX + scrollLeft) ||\r\n // (e.clientX + bdScrollLeft);\r\n // };\r\n // o.isPointerXOverwritten = true;\r\n // } catch(err) {\r\n // o.isPointerXOverwritten = false;\r\n // }\r\n // }\r\n });\r\n\r\n //Configure sort extension if any\r\n var sort = (f.extensions || []).filter(function(itm){\r\n return itm.name === 'sort';\r\n });\r\n if(sort.length === 1){\r\n sort[0].async_sort = true;\r\n sort[0].trigger_ids = sortTriggers;\r\n }\r\n\r\n // if(this.gridEnableColResizer){\r\n // if(!tf.hasExtensions){\r\n // tf.extensions = {\r\n // name:['ColumnsResizer_'+tf.id],\r\n // src:[this.gridColResizerPath],\r\n // description:['Columns Resizing'],\r\n // initialize:[function(o){\r\n // o.SetColsResizer('ColumnsResizer_'+o.id);}]\r\n // };\r\n // tf.hasExtensions = true;\r\n // } else {\r\n // if(!tf._containsStr(\r\n // 'colsresizer',\r\n // Str.lower(tf.extensions.src.toString())) ){\r\n // tf.extensions.name.push('ColumnsResizer_'+tf.id);\r\n // tf.extensions.src.push(tf.gridColResizerPath);\r\n // tf.extensions.description.push('Columns Resizing');\r\n // tf.extensions.initialize.push(function(o){\r\n // o.SetColsResizer('ColumnsResizer_'+o.id);});\r\n // }\r\n // }\r\n // }\r\n\r\n //Default columns resizer properties for grid layout\r\n // f.col_resizer_cols_headers_table = this.headTbl.getAttribute('id');\r\n // f.col_resizer_cols_headers_index = this.gridHeadRowIndex;\r\n // f.col_resizer_width_adjustment = 0;\r\n // f.col_enable_text_ellipsis = false;\r\n\r\n //Cols generation for all browsers excepted IE<=7\r\n this.tblHasColTag = Dom.tag(tbl, 'col').length > 0 ? true : false;\r\n\r\n //Col elements are enough to keep column widths after sorting and\r\n //filtering\r\n var createColTags = function(){\r\n for(var k=(tf.nbCells-1); k>=0; k--){\r\n var col = Dom.create('col', ['id', tf.id+'_col_'+k]);\r\n tbl.insertBefore(col, tbl.firstChild);\r\n col.style.width = tf.colWidths[k];\r\n this.gridColElms[k] = col;\r\n }\r\n this.tblHasColTag = true;\r\n };\r\n\r\n if(!this.tblHasColTag){\r\n createColTags.call(this);\r\n } else {\r\n var cols = Dom.tag(tbl, 'col');\r\n for(var ii=0; ii<tf.nbCells; ii++){\r\n cols[ii].setAttribute('id', tf.id+'_col_'+ii);\r\n cols[ii].style.width = tf.colWidths[ii];\r\n this.gridColElms.push(cols[ii]);\r\n }\r\n }\r\n\r\n var afterColResizedFn = Types.isFn(f.on_after_col_resized) ?\r\n f.on_after_col_resized : null;\r\n f.on_after_col_resized = function(o, colIndex){\r\n if(!colIndex){\r\n return;\r\n }\r\n var w = o.crWColsRow.cells[colIndex].style.width;\r\n var col = o.gridColElms[colIndex];\r\n col.style.width = w;\r\n\r\n var thCW = o.crWColsRow.cells[colIndex].clientWidth;\r\n var tdCW = o.crWRowDataTbl.cells[colIndex].clientWidth;\r\n\r\n if(thCW != tdCW){\r\n o.headTbl.style.width = tbl.clientWidth+'px';\r\n }\r\n\r\n if(afterColResizedFn){\r\n afterColResizedFn.call(null,o,colIndex);\r\n }\r\n };\r\n\r\n if(tbl.clientWidth !== this.headTbl.clientWidth){\r\n tbl.style.width = this.headTbl.clientWidth+'px';\r\n }\r\n }\r\n\r\n /**\r\n * Removes the grid layout\r\n */\r\n destroy(){\r\n var tf = this.tf;\r\n var tbl = tf.tbl;\r\n\r\n if(!tf.gridLayout){\r\n return;\r\n }\r\n var t = tbl.parentNode.removeChild(tbl);\r\n this.tblMainCont.parentNode.insertBefore(t, this.tblMainCont);\r\n this.tblMainCont.parentNode.removeChild(this.tblMainCont);\r\n\r\n this.tblMainCont = null;\r\n this.headTblCont = null;\r\n this.headTbl = null;\r\n this.tblCont = null;\r\n\r\n tbl.outerHTML = tf.sourceTblHtml;\r\n //needed to keep reference of table element\r\n tbl = Dom.id(tf.id);\r\n }\r\n}"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "GridLayout",
"memberof": "src/modules/gridLayout.js",
"longname": "src/modules/gridLayout.js~GridLayout",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/gridLayout.js",
"importStyle": "{GridLayout}",
"description": null,
"lineNumber": 5,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#constructor",
"access": null,
"description": "Grid layout, table with fixed headers",
"lineNumber": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridWidth",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridWidth",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridHeight",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridHeight",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridMainContCssClass",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridMainContCssClass",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridContCssClass",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridContCssClass",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridHeadContCssClass",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridHeadContCssClass",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridInfDivCssClass",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridInfDivCssClass",
"access": null,
"description": null,
"lineNumber": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridHeadRowIndex",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridHeadRowIndex",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridHeadRows",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridHeadRows",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridEnableFilters",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridEnableFilters",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridDefaultColWidth",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridDefaultColWidth",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridColElms",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#gridColElms",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxMainTblCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#prfxMainTblCont",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxTblCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#prfxTblCont",
"access": null,
"description": null,
"lineNumber": 48,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxHeadTblCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#prfxHeadTblCont",
"access": null,
"description": null,
"lineNumber": 50,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxHeadTbl",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#prfxHeadTbl",
"access": null,
"description": null,
"lineNumber": 52,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxGridFltTd",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#prfxGridFltTd",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxGridTh",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#prfxGridTh",
"access": null,
"description": null,
"lineNumber": 56,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#tf",
"access": null,
"description": null,
"lineNumber": 58,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#init",
"access": null,
"description": "Generates a grid with fixed headers",
"lineNumber": 64,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblMainCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#tblMainCont",
"access": null,
"description": null,
"lineNumber": 105,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#tblCont",
"access": null,
"description": null,
"lineNumber": 114,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headTblCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#headTblCont",
"access": null,
"description": null,
"lineNumber": 141,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headTbl",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#headTbl",
"access": null,
"description": null,
"lineNumber": 154,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblHasColTag",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#tblHasColTag",
"access": null,
"description": null,
"lineNumber": 282,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblHasColTag",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#tblHasColTag",
"access": null,
"description": null,
"lineNumber": 293,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#destroy",
"access": null,
"description": "Removes the grid layout",
"lineNumber": 337,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblMainCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#tblMainCont",
"access": null,
"description": null,
"lineNumber": 348,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headTblCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#headTblCont",
"access": null,
"description": null,
"lineNumber": 349,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headTbl",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#headTbl",
"access": null,
"description": null,
"lineNumber": 350,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblCont",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#tblCont",
"access": null,
"description": null,
"lineNumber": 351,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/help.js",
"memberof": null,
"longname": "src/modules/help.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Event from '../event';\r\n\r\nexport class Help{\r\n\r\n /**\r\n * Help UI component\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // Configuration object\r\n var f = tf.config();\r\n\r\n //id of custom container element for instructions\r\n this.tgtId = f.help_instructions_target_id || null;\r\n //id of custom container element for instructions\r\n this.contTgtId = f.help_instructions_container_target_id ||\r\n null;\r\n //defines help text\r\n this.instrText = f.help_instructions_text ?\r\n f.help_instructions_text :\r\n 'Use the filters above each column to filter and limit table ' +\r\n 'data. Avanced searches can be performed by using the following ' +\r\n 'operators: <br /><b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, ' +\r\n '<b>&gt;=</b>, <b>=</b>, <b>*</b>, <b>!</b>, <b>{</b>, <b>}</b>, ' +\r\n '<b>||</b>,<b>&amp;&amp;</b>, <b>[empty]</b>, <b>[nonempty]</b>, ' +\r\n '<b>rgx:</b><br/>' +\r\n '<a href=\"https://github.com/koalyptus/TableFilter/wiki/' +\r\n '4.-Filter-operators\" target=\"_blank\">Learn more</a>.<hr/>';\r\n //defines help innerHtml\r\n this.instrHtml = f.help_instructions_html || null;\r\n //defines reset button text\r\n this.btnText = f.help_instructions_btn_text || '?';\r\n //defines reset button innerHtml\r\n this.btnHtml = f.help_instructions_btn_html || null;\r\n //defines css class for help button\r\n this.btnCssClass = f.help_instructions_btn_css_class || 'helpBtn';\r\n //defines css class for help container\r\n this.contCssClass = f.help_instructions_container_css_class ||\r\n 'helpCont';\r\n //help button element\r\n this.btn = null;\r\n //help content div\r\n this.cont = null;\r\n this.defaultHtml = '<div class=\"helpFooter\"><h4>TableFilter ' +\r\n 'v. '+ tf.version +'</h4>' +\r\n '<a href=\"https://github.com/koalyptus/TableFilter/\" ' +\r\n ' target=\"_blank\">https://github.com/koalyptus/TableFilter/</a>' +\r\n '<br/><span>&copy;2015-'+ tf.year +' Max Guglielmi.</span>' +\r\n '<div align=\"center\" style=\"margin-top:8px;\">' +\r\n '<a href=\"javascript:void(0);\" class=\"close\">Close</a></div></div>';\r\n\r\n //id prefix for help elements\r\n this.prfxHelpSpan = 'helpSpan_';\r\n //id prefix for help elements\r\n this.prfxHelpDiv = 'helpDiv_';\r\n\r\n this.tf = tf;\r\n }\r\n\r\n init(){\r\n if(this.btn){\r\n return;\r\n }\r\n\r\n var tf = this.tf;\r\n\r\n var helpspan = Dom.create('span',['id', this.prfxHelpSpan+tf.id]);\r\n var helpdiv = Dom.create('div',['id', this.prfxHelpDiv+tf.id]);\r\n\r\n //help button is added to defined element\r\n if(!this.tgtId){\r\n tf.setToolbar();\r\n }\r\n var targetEl = !this.tgtId ?\r\n tf.rDiv : Dom.id(this.tgtId);\r\n targetEl.appendChild(helpspan);\r\n\r\n var divContainer = !this.contTgtId ?\r\n helpspan : Dom.id(this.contTgtId);\r\n\r\n if(!this.btnHtml){\r\n divContainer.appendChild(helpdiv);\r\n var helplink = Dom.create('a', ['href', 'javascript:void(0);']);\r\n helplink.className = this.btnCssClass;\r\n helplink.appendChild(Dom.text(this.btnText));\r\n helpspan.appendChild(helplink);\r\n Event.add(helplink, 'click', () => { this.toggle(); });\r\n } else {\r\n helpspan.innerHTML = this.btnHtml;\r\n var helpEl = helpspan.firstChild;\r\n Event.add(helpEl, 'click', () => { this.toggle(); });\r\n divContainer.appendChild(helpdiv);\r\n }\r\n\r\n if(!this.instrHtml){\r\n helpdiv.innerHTML = this.instrText;\r\n helpdiv.className = this.contCssClass;\r\n Event.add(helpdiv, 'dblclick', () => { this.toggle(); });\r\n } else {\r\n if(this.contTgtId){\r\n divContainer.appendChild(helpdiv);\r\n }\r\n helpdiv.innerHTML = this.instrHtml;\r\n if(!this.contTgtId){\r\n helpdiv.className = this.contCssClass;\r\n Event.add(helpdiv, 'dblclick', () => { this.toggle(); });\r\n }\r\n }\r\n helpdiv.innerHTML += this.defaultHtml;\r\n Event.add(helpdiv, 'click', () => { this.toggle(); });\r\n\r\n this.cont = helpdiv;\r\n this.btn = helpspan;\r\n }\r\n\r\n /**\r\n * Toggle help pop-up\r\n */\r\n toggle(){\r\n if(!this.cont){\r\n return;\r\n }\r\n var divDisplay = this.cont.style.display;\r\n if(divDisplay === '' || divDisplay === 'none'){\r\n this.cont.style.display = 'inline';\r\n } else {\r\n this.cont.style.display = 'none';\r\n }\r\n }\r\n\r\n /**\r\n * Remove help UI\r\n */\r\n destroy(){\r\n if(!this.btn){\r\n return;\r\n }\r\n this.btn.parentNode.removeChild(this.btn);\r\n this.btn = null;\r\n if(!this.cont){\r\n return;\r\n }\r\n this.cont.parentNode.removeChild(this.cont);\r\n this.cont = null;\r\n }\r\n\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "Help",
"memberof": "src/modules/help.js",
"longname": "src/modules/help.js~Help",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/help.js",
"importStyle": "{Help}",
"description": null,
"lineNumber": 4,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#constructor",
"access": null,
"description": "Help UI component",
"lineNumber": 10,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tgtId",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#tgtId",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contTgtId",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#contTgtId",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "instrText",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#instrText",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "instrHtml",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#instrHtml",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnText",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#btnText",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnHtml",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#btnHtml",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnCssClass",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#btnCssClass",
"access": null,
"description": null,
"lineNumber": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contCssClass",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#contCssClass",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btn",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#btn",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "cont",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#cont",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "defaultHtml",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#defaultHtml",
"access": null,
"description": null,
"lineNumber": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxHelpSpan",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#prfxHelpSpan",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxHelpDiv",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#prfxHelpDiv",
"access": null,
"description": null,
"lineNumber": 56,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#tf",
"access": null,
"description": null,
"lineNumber": 58,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#init",
"access": null,
"description": null,
"lineNumber": 61,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "cont",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#cont",
"access": null,
"description": null,
"lineNumber": 113,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btn",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#btn",
"access": null,
"description": null,
"lineNumber": 114,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "toggle",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#toggle",
"access": null,
"description": "Toggle help pop-up",
"lineNumber": 120,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#destroy",
"access": null,
"description": "Remove help UI",
"lineNumber": 135,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btn",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#btn",
"access": null,
"description": null,
"lineNumber": 140,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "cont",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#cont",
"access": null,
"description": null,
"lineNumber": 145,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/highlightKeywords.js",
"memberof": null,
"longname": "src/modules/highlightKeywords.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Str from '../string';\r\n\r\nexport class HighlightKeyword{\r\n\r\n /**\r\n * HighlightKeyword, highlight matched keyword\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf) {\r\n var f = tf.config();\r\n //defines css class for highlighting\r\n this.highlightCssClass = f.highlight_css_class || 'keyword';\r\n this.highlightedNodes = [];\r\n\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * highlight occurences of searched term in passed node\r\n * @param {Node} node\r\n * @param {String} word Searched term\r\n * @param {String} cssClass Css class name\r\n */\r\n highlight(node, word, cssClass){\r\n // Iterate into this nodes childNodes\r\n if(node.hasChildNodes){\r\n var children = node.childNodes;\r\n for(var i=0; i<children.length; i++){\r\n this.highlight(children[i], word, cssClass);\r\n }\r\n }\r\n\r\n if(node.nodeType === 3){\r\n var tempNodeVal = Str.lower(node.nodeValue);\r\n var tempWordVal = Str.lower(word);\r\n if(tempNodeVal.indexOf(tempWordVal) != -1){\r\n var pn = node.parentNode;\r\n if(pn && pn.className != cssClass){\r\n // word not highlighted yet\r\n var nv = node.nodeValue,\r\n ni = tempNodeVal.indexOf(tempWordVal),\r\n // Create a load of replacement nodes\r\n before = Dom.text(nv.substr(0, ni)),\r\n docWordVal = nv.substr(ni,word.length),\r\n after = Dom.text(nv.substr(ni+word.length)),\r\n hiwordtext = Dom.text(docWordVal),\r\n hiword = Dom.create('span');\r\n hiword.className = cssClass;\r\n hiword.appendChild(hiwordtext);\r\n pn.insertBefore(before,node);\r\n pn.insertBefore(hiword,node);\r\n pn.insertBefore(after,node);\r\n pn.removeChild(node);\r\n this.highlightedNodes.push(hiword.firstChild);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Removes highlight to nodes matching passed string\r\n * @param {String} word\r\n * @param {String} cssClass Css class to remove\r\n */\r\n unhighlight(word, cssClass){\r\n var arrRemove = [];\r\n var highlightedNodes = this.highlightedNodes;\r\n for(var i=0; i<highlightedNodes.length; i++){\r\n var n = highlightedNodes[i];\r\n if(!n){\r\n continue;\r\n }\r\n var tempNodeVal = Str.lower(n.nodeValue),\r\n tempWordVal = Str.lower(word);\r\n if(tempNodeVal.indexOf(tempWordVal) !== -1){\r\n var pn = n.parentNode;\r\n if(pn && pn.className === cssClass){\r\n var prevSib = pn.previousSibling,\r\n nextSib = pn.nextSibling;\r\n if(!prevSib || !nextSib){ continue; }\r\n nextSib.nodeValue = prevSib.nodeValue + n.nodeValue +\r\n nextSib.nodeValue;\r\n prevSib.nodeValue = '';\r\n n.nodeValue = '';\r\n arrRemove.push(i);\r\n }\r\n }\r\n }\r\n for(var k=0; k<arrRemove.length; k++){\r\n highlightedNodes.splice(arrRemove[k], 1);\r\n }\r\n }\r\n\r\n /**\r\n * Clear all occurrences of highlighted nodes\r\n */\r\n unhighlightAll(){\r\n if(!this.tf.highlightKeywords || !this.tf.searchArgs){\r\n return;\r\n }\r\n for(var y=0; y<this.tf.searchArgs.length; y++){\r\n this.unhighlight(\r\n this.tf.searchArgs[y], this.highlightCssClass);\r\n }\r\n this.highlightedNodes = [];\r\n }\r\n}"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "HighlightKeyword",
"memberof": "src/modules/highlightKeywords.js",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/highlightKeywords.js",
"importStyle": "{HighlightKeyword}",
"description": null,
"lineNumber": 4,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#constructor",
"access": null,
"description": "HighlightKeyword, highlight matched keyword",
"lineNumber": 10,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "highlightCssClass",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#highlightCssClass",
"access": null,
"description": null,
"lineNumber": 13,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "highlightedNodes",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#highlightedNodes",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#tf",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "highlight",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#highlight",
"access": null,
"description": "highlight occurences of searched term in passed node",
"lineNumber": 25,
"params": [
{
"nullable": null,
"types": [
"Node"
],
"spread": false,
"optional": false,
"name": "node",
"description": ""
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "word",
"description": "Searched term"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cssClass",
"description": "Css class name"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "unhighlight",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#unhighlight",
"access": null,
"description": "Removes highlight to nodes matching passed string",
"lineNumber": 66,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "word",
"description": ""
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cssClass",
"description": "Css class to remove"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "unhighlightAll",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#unhighlightAll",
"access": null,
"description": "Clear all occurrences of highlighted nodes",
"lineNumber": 98,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "highlightedNodes",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#highlightedNodes",
"access": null,
"description": null,
"lineNumber": 106,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/loader.js",
"memberof": null,
"longname": "src/modules/loader.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Types from '../types';\r\n\r\nvar global = window;\r\n\r\nexport class Loader{\r\n\r\n /**\r\n * Loading message/spinner\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n\r\n // TableFilter configuration\r\n var f = tf.config();\r\n //id of container element\r\n this.loaderTgtId = f.loader_target_id || null;\r\n //div containing loader\r\n this.loaderDiv = null;\r\n //defines loader text\r\n this.loaderText = f.loader_text || 'Loading...';\r\n //defines loader innerHtml\r\n this.loaderHtml = f.loader_html || null;\r\n //defines css class for loader div\r\n this.loaderCssClass = f.loader_css_class || 'loader';\r\n //delay for hiding loader\r\n this.loaderCloseDelay = 200;\r\n //callback function before loader is displayed\r\n this.onShowLoader = Types.isFn(f.on_show_loader) ?\r\n f.on_show_loader : null;\r\n //callback function after loader is closed\r\n this.onHideLoader = Types.isFn(f.on_hide_loader) ?\r\n f.on_hide_loader : null;\r\n //loader div\r\n this.prfxLoader = 'load_';\r\n\r\n this.tf = tf;\r\n\r\n var containerDiv = Dom.create('div', ['id', this.prfxLoader+tf.id]);\r\n containerDiv.className = this.loaderCssClass;\r\n\r\n var targetEl = !this.loaderTgtId ?\r\n tf.tbl.parentNode : Dom.id(this.loaderTgtId);\r\n if(!this.loaderTgtId){\r\n targetEl.insertBefore(containerDiv, tf.tbl);\r\n } else {\r\n targetEl.appendChild(containerDiv);\r\n }\r\n this.loaderDiv = Dom.id(this.prfxLoader+tf.id);\r\n if(!this.loaderHtml){\r\n this.loaderDiv.appendChild(Dom.text(this.loaderText));\r\n } else {\r\n this.loaderDiv.innerHTML = this.loaderHtml;\r\n }\r\n }\r\n\r\n show(p) {\r\n if(!this.tf.loader || !this.loaderDiv ||\r\n this.loaderDiv.style.display===p){\r\n return;\r\n }\r\n\r\n var displayLoader = () => {\r\n if(!this.loaderDiv){\r\n return;\r\n }\r\n if(this.onShowLoader && p!=='none'){\r\n this.onShowLoader.call(null, this);\r\n }\r\n this.loaderDiv.style.display = p;\r\n if(this.onHideLoader && p==='none'){\r\n this.onHideLoader.call(null, this);\r\n }\r\n };\r\n\r\n var t = p==='none' ? this.loaderCloseDelay : 1;\r\n global.setTimeout(displayLoader, t);\r\n }\r\n\r\n destroy(){\r\n if(!this.loaderDiv){\r\n return;\r\n }\r\n var tf = this.tf,\r\n targetEl = !this.loaderTgtId ?\r\n (tf.gridLayout ?\r\n tf.feature('gridLayout').tblCont : tf.tbl.parentNode):\r\n Dom.id(this.loaderTgtId);\r\n targetEl.removeChild(this.loaderDiv);\r\n this.loaderDiv = null;\r\n }\r\n}\r\n"
},
{
"kind": "variable",
"static": true,
"variation": null,
"name": "global",
"memberof": "src/modules/loader.js",
"longname": "src/modules/loader.js~global",
"access": null,
"export": false,
"importPath": "TableFilter/src/modules/loader.js",
"importStyle": null,
"description": null,
"lineNumber": 4,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "Loader",
"memberof": "src/modules/loader.js",
"longname": "src/modules/loader.js~Loader",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/loader.js",
"importStyle": "{Loader}",
"description": null,
"lineNumber": 6,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#constructor",
"access": null,
"description": "Loading message/spinner",
"lineNumber": 12,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderTgtId",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderTgtId",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderDiv",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderDiv",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderText",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderText",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderHtml",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderHtml",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderCssClass",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderCssClass",
"access": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderCloseDelay",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderCloseDelay",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onShowLoader",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#onShowLoader",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onHideLoader",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#onHideLoader",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxLoader",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#prfxLoader",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#tf",
"access": null,
"description": null,
"lineNumber": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderDiv",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderDiv",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "show",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#show",
"access": null,
"description": null,
"lineNumber": 57,
"undocument": true,
"params": [
{
"name": "p",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#destroy",
"access": null,
"description": null,
"lineNumber": 80,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderDiv",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#loaderDiv",
"access": null,
"description": null,
"lineNumber": 90,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/paging.js",
"memberof": null,
"longname": "src/modules/paging.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Types from '../types';\r\nimport Str from '../string';\r\nimport Event from '../event';\r\n\r\nexport class Paging{\r\n\r\n /**\r\n * Pagination component\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // Configuration object\r\n var f = tf.config();\r\n\r\n //css class for paging buttons (previous,next,etc.)\r\n this.btnPageCssClass = f.paging_btn_css_class || 'pgInp';\r\n //stores paging select element\r\n this.pagingSlc = null;\r\n //results per page select element\r\n this.resultsPerPageSlc = null;\r\n //id of container element\r\n this.pagingTgtId = f.paging_target_id || null;\r\n //defines table paging length\r\n this.pagingLength = !isNaN(f.paging_length) ? f.paging_length : 10;\r\n //id of container element\r\n this.resultsPerPageTgtId = f.results_per_page_target_id || null;\r\n //css class for paging select element\r\n this.pgSlcCssClass = f.paging_slc_css_class || 'pgSlc';\r\n //css class for paging input element\r\n this.pgInpCssClass = f.paging_inp_css_class || 'pgNbInp';\r\n //stores results per page text and values\r\n this.resultsPerPage = f.results_per_page || null;\r\n //enables/disables results per page drop-down\r\n this.hasResultsPerPage = Types.isArray(this.resultsPerPage);\r\n //defines css class for results per page select\r\n this.resultsSlcCssClass = f.results_slc_css_class || 'rspg';\r\n //css class for label preceding results per page select\r\n this.resultsSpanCssClass = f.results_span_css_class || 'rspgSpan';\r\n //1st row index of current page\r\n this.startPagingRow = 0;\r\n //total nb of pages\r\n this.nbPages = 0;\r\n //current page nb\r\n this.currentPageNb = 1;\r\n //defines next page button text\r\n this.btnNextPageText = f.btn_next_page_text || '>';\r\n //defines previous page button text\r\n this.btnPrevPageText = f.btn_prev_page_text || '<';\r\n //defines last page button text\r\n this.btnLastPageText = f.btn_last_page_text || '>|';\r\n //defines first page button text\r\n this.btnFirstPageText = f.btn_first_page_text || '|<';\r\n //defines next page button html\r\n this.btnNextPageHtml = f.btn_next_page_html ||\r\n (!tf.enableIcons ? null :\r\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\r\n ' nextPage\" title=\"Next page\" />');\r\n //defines previous page button html\r\n this.btnPrevPageHtml = f.btn_prev_page_html ||\r\n (!tf.enableIcons ? null :\r\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\r\n ' previousPage\" title=\"Previous page\" />');\r\n //defines last page button html\r\n this.btnFirstPageHtml = f.btn_first_page_html ||\r\n (!tf.enableIcons ? null :\r\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\r\n ' firstPage\" title=\"First page\" />');\r\n //defines previous page button html\r\n this.btnLastPageHtml = f.btn_last_page_html ||\r\n (!tf.enableIcons ? null :\r\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\r\n ' lastPage\" title=\"Last page\" />');\r\n //defines text preceeding page selector drop-down\r\n this.pageText = f.page_text || ' Page ';\r\n //defines text after page selector drop-down\r\n this.ofText = f.of_text || ' of ';\r\n //css class for span containing tot nb of pages\r\n this.nbPgSpanCssClass = f.nb_pages_css_class || 'nbpg';\r\n //enables/disables paging buttons\r\n this.hasPagingBtns = f.paging_btns===false ? false : true;\r\n //defines previous page button html\r\n this.pageSelectorType = f.page_selector_type || tf.fltTypeSlc;\r\n //calls function before page is changed\r\n this.onBeforeChangePage = Types.isFn(f.on_before_change_page) ?\r\n f.on_before_change_page : null;\r\n //calls function before page is changed\r\n this.onAfterChangePage = Types.isFn(f.on_after_change_page) ?\r\n f.on_after_change_page : null;\r\n\r\n //pages select\r\n this.prfxSlcPages = 'slcPages_';\r\n //results per page select\r\n this.prfxSlcResults = 'slcResults_';\r\n //label preciding results per page select\r\n this.prfxSlcResultsTxt = 'slcResultsTxt_';\r\n //span containing next page button\r\n this.prfxBtnNextSpan = 'btnNextSpan_';\r\n //span containing previous page button\r\n this.prfxBtnPrevSpan = 'btnPrevSpan_';\r\n //span containing last page button\r\n this.prfxBtnLastSpan = 'btnLastSpan_';\r\n //span containing first page button\r\n this.prfxBtnFirstSpan = 'btnFirstSpan_';\r\n //next button\r\n this.prfxBtnNext = 'btnNext_';\r\n //previous button\r\n this.prfxBtnPrev = 'btnPrev_';\r\n //last button\r\n this.prfxBtnLast = 'btnLast_';\r\n //first button\r\n this.prfxBtnFirst = 'btnFirst_';\r\n //span for tot nb pages\r\n this.prfxPgSpan = 'pgspan_';\r\n //span preceding pages select (contains 'Page')\r\n this.prfxPgBeforeSpan = 'pgbeforespan_';\r\n //span following pages select (contains ' of ')\r\n this.prfxPgAfterSpan = 'pgafterspan_';\r\n\r\n var start_row = this.refRow;\r\n var nrows = this.nbRows;\r\n //calculates page nb\r\n this.nbPages = Math.ceil((nrows-start_row)/this.pagingLength);\r\n\r\n //Paging elements events\r\n var o = this;\r\n // Paging DOM events\r\n this.evt = {\r\n slcIndex(){\r\n return (o.pageSelectorType===tf.fltTypeSlc) ?\r\n o.pagingSlc.options.selectedIndex :\r\n parseInt(o.pagingSlc.value, 10)-1;\r\n },\r\n nbOpts(){\r\n return (o.pageSelectorType===tf.fltTypeSlc) ?\r\n parseInt(o.pagingSlc.options.length, 10)-1 :\r\n (o.nbPages-1);\r\n },\r\n next(){\r\n var nextIndex = o.evt.slcIndex() < o.evt.nbOpts() ?\r\n o.evt.slcIndex()+1 : 0;\r\n o.changePage(nextIndex);\r\n },\r\n prev(){\r\n var prevIndex = o.evt.slcIndex()>0 ?\r\n o.evt.slcIndex()-1 : o.evt.nbOpts();\r\n o.changePage(prevIndex);\r\n },\r\n last(){\r\n o.changePage(o.evt.nbOpts());\r\n },\r\n first(){\r\n o.changePage(0);\r\n },\r\n _detectKey(e){\r\n var key = Event.keyCode(e);\r\n if(key===13){\r\n if(tf.sorted){\r\n tf.filter();\r\n o.changePage(o.evt.slcIndex());\r\n } else{\r\n o.changePage();\r\n }\r\n this.blur();\r\n }\r\n },\r\n slcPagesChange: null,\r\n nextEvt: null,\r\n prevEvt: null,\r\n lastEvt: null,\r\n firstEvt: null\r\n };\r\n\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * Initialize DOM elements\r\n */\r\n init(){\r\n var slcPages;\r\n var tf = this.tf;\r\n var evt = this.evt;\r\n\r\n // Check resultsPerPage is in expected format and initialise the\r\n // results per page component\r\n if(this.hasResultsPerPage){\r\n if(this.resultsPerPage.length<2){\r\n this.hasResultsPerPage = false;\r\n } else {\r\n this.pagingLength = this.resultsPerPage[1][0];\r\n this.setResultsPerPage();\r\n }\r\n }\r\n\r\n evt.slcPagesChange = (event) => {\r\n var slc = event.target;\r\n this.changePage(slc.selectedIndex);\r\n };\r\n\r\n // Paging drop-down list selector\r\n if(this.pageSelectorType === tf.fltTypeSlc){\r\n slcPages = Dom.create(\r\n tf.fltTypeSlc, ['id', this.prfxSlcPages+tf.id]);\r\n slcPages.className = this.pgSlcCssClass;\r\n Event.add(slcPages, 'change', evt.slcPagesChange);\r\n }\r\n\r\n // Paging input selector\r\n if(this.pageSelectorType === tf.fltTypeInp){\r\n slcPages = Dom.create(\r\n tf.fltTypeInp,\r\n ['id', this.prfxSlcPages+tf.id],\r\n ['value', this.currentPageNb]\r\n );\r\n slcPages.className = this.pgInpCssClass;\r\n Event.add(slcPages, 'keypress', evt._detectKey);\r\n }\r\n\r\n // btns containers\r\n var btnNextSpan = Dom.create(\r\n 'span',['id', this.prfxBtnNextSpan+tf.id]);\r\n var btnPrevSpan = Dom.create(\r\n 'span',['id', this.prfxBtnPrevSpan+tf.id]);\r\n var btnLastSpan = Dom.create(\r\n 'span',['id', this.prfxBtnLastSpan+tf.id]);\r\n var btnFirstSpan = Dom.create(\r\n 'span',['id', this.prfxBtnFirstSpan+tf.id]);\r\n\r\n if(this.hasPagingBtns){\r\n // Next button\r\n if(!this.btnNextPageHtml){\r\n var btn_next = Dom.create(\r\n tf.fltTypeInp,\r\n ['id', this.prfxBtnNext+tf.id],\r\n ['type', 'button'],\r\n ['value', this.btnNextPageText],\r\n ['title', 'Next']\r\n );\r\n btn_next.className = this.btnPageCssClass;\r\n Event.add(btn_next, 'click', evt.next);\r\n btnNextSpan.appendChild(btn_next);\r\n } else {\r\n btnNextSpan.innerHTML = this.btnNextPageHtml;\r\n Event.add(btnNextSpan, 'click', evt.next);\r\n }\r\n // Previous button\r\n if(!this.btnPrevPageHtml){\r\n var btn_prev = Dom.create(\r\n tf.fltTypeInp,\r\n ['id', this.prfxBtnPrev+tf.id],\r\n ['type', 'button'],\r\n ['value', this.btnPrevPageText],\r\n ['title', 'Previous']\r\n );\r\n btn_prev.className = this.btnPageCssClass;\r\n Event.add(btn_prev, 'click', evt.prev);\r\n btnPrevSpan.appendChild(btn_prev);\r\n } else {\r\n btnPrevSpan.innerHTML = this.btnPrevPageHtml;\r\n Event.add(btnPrevSpan, 'click', evt.prev);\r\n }\r\n // Last button\r\n if(!this.btnLastPageHtml){\r\n var btn_last = Dom.create(\r\n tf.fltTypeInp,\r\n ['id', this.prfxBtnLast+tf.id],\r\n ['type', 'button'],\r\n ['value', this.btnLastPageText],\r\n ['title', 'Last']\r\n );\r\n btn_last.className = this.btnPageCssClass;\r\n Event.add(btn_last, 'click', evt.last);\r\n btnLastSpan.appendChild(btn_last);\r\n } else {\r\n btnLastSpan.innerHTML = this.btnLastPageHtml;\r\n Event.add(btnLastSpan, 'click', evt.last);\r\n }\r\n // First button\r\n if(!this.btnFirstPageHtml){\r\n var btn_first = Dom.create(\r\n tf.fltTypeInp,\r\n ['id', this.prfxBtnFirst+tf.id],\r\n ['type', 'button'],\r\n ['value', this.btnFirstPageText],\r\n ['title', 'First']\r\n );\r\n btn_first.className = this.btnPageCssClass;\r\n Event.add(btn_first, 'click', evt.first);\r\n btnFirstSpan.appendChild(btn_first);\r\n } else {\r\n btnFirstSpan.innerHTML = this.btnFirstPageHtml;\r\n Event.add(btnFirstSpan, 'click', evt.first);\r\n }\r\n }\r\n\r\n // paging elements (buttons+drop-down list) are added to defined element\r\n if(!this.pagingTgtId){\r\n tf.setToolbar();\r\n }\r\n var targetEl = !this.pagingTgtId ? tf.mDiv : Dom.id(this.pagingTgtId);\r\n targetEl.appendChild(btnFirstSpan);\r\n targetEl.appendChild(btnPrevSpan);\r\n\r\n var pgBeforeSpan = Dom.create(\r\n 'span',['id', this.prfxPgBeforeSpan+tf.id] );\r\n pgBeforeSpan.appendChild( Dom.text(this.pageText) );\r\n pgBeforeSpan.className = this.nbPgSpanCssClass;\r\n targetEl.appendChild(pgBeforeSpan);\r\n targetEl.appendChild(slcPages);\r\n var pgAfterSpan = Dom.create(\r\n 'span',['id', this.prfxPgAfterSpan+tf.id]);\r\n pgAfterSpan.appendChild( Dom.text(this.ofText) );\r\n pgAfterSpan.className = this.nbPgSpanCssClass;\r\n targetEl.appendChild(pgAfterSpan);\r\n var pgspan = Dom.create( 'span',['id', this.prfxPgSpan+tf.id] );\r\n pgspan.className = this.nbPgSpanCssClass;\r\n pgspan.appendChild( Dom.text(' '+this.nbPages+' ') );\r\n targetEl.appendChild(pgspan);\r\n targetEl.appendChild(btnNextSpan);\r\n targetEl.appendChild(btnLastSpan);\r\n this.pagingSlc = Dom.id(this.prfxSlcPages+tf.id);\r\n\r\n if(!tf.rememberGridValues || this.isPagingRemoved){\r\n this.setPagingInfo();\r\n }\r\n if(!tf.fltGrid){\r\n tf.validateAllRows();\r\n this.setPagingInfo(tf.validRowsIndex);\r\n }\r\n\r\n this.isPagingRemoved = false;\r\n }\r\n\r\n /**\r\n * Reset paging when filters are already instantiated\r\n * @param {Boolean} filterTable Execute filtering once paging instanciated\r\n */\r\n reset(filterTable=false){\r\n var tf = this.tf;\r\n if(!tf.hasGrid() || tf.paging){\r\n return;\r\n }\r\n tf.paging = true;\r\n this.isPagingRemoved = true;\r\n this.init();\r\n tf.resetValues();\r\n if(filterTable){\r\n tf.filter();\r\n }\r\n }\r\n\r\n /**\r\n * Calculate number of pages based on valid rows\r\n * Refresh paging select according to number of pages\r\n * @param {Array} validRows Collection of valid rows\r\n */\r\n setPagingInfo(validRows=[]){\r\n var tf = this.tf;\r\n var rows = tf.tbl.rows;\r\n var mdiv = !this.pagingTgtId ? tf.mDiv : Dom.id(this.pagingTgtId);\r\n var pgspan = Dom.id(this.prfxPgSpan+tf.id);\r\n\r\n //store valid rows indexes\r\n tf.validRowsIndex = validRows;\r\n\r\n if(validRows.length === 0){\r\n //counts rows to be grouped\r\n for(var j=tf.refRow; j<tf.nbRows; j++){\r\n var row = rows[j];\r\n if(!row){\r\n continue;\r\n }\r\n\r\n var isRowValid = row.getAttribute('validRow');\r\n if(Types.isNull(isRowValid) || Boolean(isRowValid==='true')){\r\n tf.validRowsIndex.push(j);\r\n }\r\n }\r\n }\r\n\r\n //calculate nb of pages\r\n this.nbPages = Math.ceil(tf.validRowsIndex.length/this.pagingLength);\r\n //refresh page nb span\r\n pgspan.innerHTML = this.nbPages;\r\n //select clearing shortcut\r\n if(this.pageSelectorType === tf.fltTypeSlc){\r\n this.pagingSlc.innerHTML = '';\r\n }\r\n\r\n if(this.nbPages>0){\r\n mdiv.style.visibility = 'visible';\r\n if(this.pageSelectorType === tf.fltTypeSlc){\r\n for(var z=0; z<this.nbPages; z++){\r\n var opt = Dom.createOpt(z+1, z*this.pagingLength, false);\r\n this.pagingSlc.options[z] = opt;\r\n }\r\n } else{\r\n //input type\r\n this.pagingSlc.value = this.currentPageNb;\r\n }\r\n\r\n } else {\r\n /*** if no results paging select and buttons are hidden ***/\r\n mdiv.style.visibility = 'hidden';\r\n }\r\n this.groupByPage(tf.validRowsIndex);\r\n }\r\n\r\n /**\r\n * Group table rows by page and display valid rows\r\n * @param {Array} validRows Collection of valid rows\r\n */\r\n groupByPage(validRows){\r\n var tf = this.tf;\r\n var alternateRows = tf.feature('alternateRows');\r\n var rows = tf.tbl.rows;\r\n var endPagingRow = parseInt(this.startPagingRow, 10) +\r\n parseInt(this.pagingLength, 10);\r\n\r\n //store valid rows indexes\r\n if(validRows){\r\n tf.validRowsIndex = validRows;\r\n }\r\n\r\n //this loop shows valid rows of current page\r\n for(var h=0, len=tf.validRowsIndex.length; h<len; h++){\r\n var validRowIdx = tf.validRowsIndex[h];\r\n var r = rows[validRowIdx];\r\n var isRowValid = r.getAttribute('validRow');\r\n\r\n if(h>=this.startPagingRow && h<endPagingRow){\r\n if(Types.isNull(isRowValid) || Boolean(isRowValid==='true')){\r\n r.style.display = '';\r\n }\r\n if(tf.alternateBgs && alternateRows){\r\n alternateRows.setRowBg(validRowIdx, h);\r\n }\r\n } else {\r\n r.style.display = 'none';\r\n if(tf.alternateBgs && alternateRows){\r\n alternateRows.removeRowBg(validRowIdx);\r\n }\r\n }\r\n }\r\n\r\n tf.nbVisibleRows = tf.validRowsIndex.length;\r\n //re-applies filter behaviours after filtering process\r\n tf.applyProps();\r\n }\r\n\r\n /**\r\n * Return the current page number\r\n * @return {Number} Page number\r\n */\r\n getPage(){\r\n return this.currentPageNb;\r\n }\r\n\r\n /**\r\n * Show page based on passed param value (string or number):\r\n * @param {String} or {Number} cmd possible string values: 'next',\r\n * 'previous', 'last', 'first' or page number as per param\r\n */\r\n setPage(cmd){\r\n var tf = this.tf;\r\n if(!tf.hasGrid() || !tf.paging){\r\n return;\r\n }\r\n var btnEvt = this.evt,\r\n cmdtype = typeof cmd;\r\n if(cmdtype==='string'){\r\n switch(Str.lower(cmd)){\r\n case 'next':\r\n btnEvt.next();\r\n break;\r\n case 'previous':\r\n btnEvt.prev();\r\n break;\r\n case 'last':\r\n btnEvt.last();\r\n break;\r\n case 'first':\r\n btnEvt.first();\r\n break;\r\n default:\r\n btnEvt.next();\r\n break;\r\n }\r\n }\r\n else if(cmdtype==='number'){\r\n this.changePage(cmd-1);\r\n }\r\n }\r\n\r\n /**\r\n * Generates UI elements for the number of results per page drop-down\r\n */\r\n setResultsPerPage(){\r\n var tf = this.tf;\r\n var evt = this.evt;\r\n\r\n if(!tf.hasGrid() && !tf.isFirstLoad){\r\n return;\r\n }\r\n if(this.resultsPerPageSlc || !this.resultsPerPage){\r\n return;\r\n }\r\n\r\n evt.slcResultsChange = (ev) => {\r\n this.changeResultsPerPage();\r\n ev.target.blur();\r\n };\r\n\r\n var slcR = Dom.create(\r\n tf.fltTypeSlc, ['id', this.prfxSlcResults+tf.id]);\r\n slcR.className = tf.resultsSlcCssClass;\r\n var slcRText = this.resultsPerPage[0],\r\n slcROpts = this.resultsPerPage[1];\r\n var slcRSpan = Dom.create(\r\n 'span',['id', this.prfxSlcResultsTxt+tf.id]);\r\n slcRSpan.className = this.resultsSpanCssClass;\r\n\r\n // results per page select is added to external element\r\n if(!this.resultsPerPageTgtId){\r\n tf.setToolbar();\r\n }\r\n var targetEl = !this.resultsPerPageTgtId ?\r\n tf.rDiv : Dom.id(this.resultsPerPageTgtId);\r\n slcRSpan.appendChild(Dom.text(slcRText));\r\n\r\n var help = tf.feature('help');\r\n if(help && help.cont){\r\n help.cont.parentNode.insertBefore(slcRSpan, help.cont);\r\n help.cont.parentNode.insertBefore(slcR, help.cont);\r\n } else {\r\n targetEl.appendChild(slcRSpan);\r\n targetEl.appendChild(slcR);\r\n }\r\n\r\n for(var r=0; r<slcROpts.length; r++){\r\n var currOpt = new Option(slcROpts[r], slcROpts[r], false, false);\r\n slcR.options[r] = currOpt;\r\n }\r\n Event.add(slcR, 'change', evt.slcResultsChange);\r\n this.resultsPerPageSlc = slcR;\r\n }\r\n\r\n /**\r\n * Remove number of results per page UI elements\r\n */\r\n removeResultsPerPage(){\r\n var tf = this.tf;\r\n if(!tf.hasGrid() || !this.resultsPerPageSlc || !this.resultsPerPage){\r\n return;\r\n }\r\n var slcR = this.resultsPerPageSlc,\r\n slcRSpan = Dom.id(this.prfxSlcResultsTxt+tf.id);\r\n if(slcR){\r\n slcR.parentNode.removeChild(slcR);\r\n }\r\n if(slcRSpan){\r\n slcRSpan.parentNode.removeChild(slcRSpan);\r\n }\r\n this.resultsPerPageSlc = null;\r\n }\r\n\r\n /**\r\n * Change the page asynchronously according to passed index\r\n * @param {Number} index Index of the page (0-n)\r\n */\r\n changePage(index){\r\n var tf = this.tf;\r\n var evt = tf.Evt;\r\n tf.EvtManager(evt.name.changepage, { pgIndex:index });\r\n }\r\n\r\n /**\r\n * Change rows asynchronously according to page results\r\n */\r\n changeResultsPerPage(){\r\n var tf = this.tf;\r\n var evt = tf.Evt;\r\n tf.EvtManager(evt.name.changeresultsperpage);\r\n }\r\n\r\n /**\r\n * Re-set asynchronously page nb at page re-load\r\n */\r\n resetPage(){\r\n var tf = this.tf;\r\n var evt = tf.Evt;\r\n tf.EvtManager(evt.name.resetpage);\r\n }\r\n\r\n /**\r\n * Re-set asynchronously page length at page re-load\r\n */\r\n resetPageLength(){\r\n var tf = this.tf;\r\n var evt = tf.Evt;\r\n tf.EvtManager(evt.name.resetpagelength);\r\n }\r\n\r\n /**\r\n * Change the page according to passed index\r\n * @param {Number} index Index of the page (0-n)\r\n */\r\n _changePage(index){\r\n var tf = this.tf;\r\n\r\n if(!tf.paging){\r\n return;\r\n }\r\n if(index === null){\r\n index = this.pageSelectorType===tf.fltTypeSlc ?\r\n this.pagingSlc.options.selectedIndex : (this.pagingSlc.value-1);\r\n }\r\n if( index>=0 && index<=(this.nbPages-1) ){\r\n if(this.onBeforeChangePage){\r\n this.onBeforeChangePage.call(null, this, index);\r\n }\r\n this.currentPageNb = parseInt(index, 10)+1;\r\n if(this.pageSelectorType===tf.fltTypeSlc){\r\n this.pagingSlc.options[index].selected = true;\r\n } else {\r\n this.pagingSlc.value = this.currentPageNb;\r\n }\r\n\r\n if(tf.rememberPageNb){\r\n tf.feature('store').savePageNb(tf.pgNbCookie);\r\n }\r\n this.startPagingRow = (this.pageSelectorType===tf.fltTypeSlc) ?\r\n this.pagingSlc.value : (index*this.pagingLength);\r\n\r\n this.groupByPage();\r\n\r\n if(this.onAfterChangePage){\r\n this.onAfterChangePage.call(null, this, index);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Change rows according to page results drop-down\r\n * TODO: accept a parameter setting the results per page length\r\n */\r\n _changeResultsPerPage(){\r\n var tf = this.tf;\r\n\r\n if(!tf.paging){\r\n return;\r\n }\r\n var slcR = this.resultsPerPageSlc;\r\n var slcPagesSelIndex = (this.pageSelectorType===tf.fltTypeSlc) ?\r\n this.pagingSlc.selectedIndex :\r\n parseInt(this.pagingSlc.value-1, 10);\r\n this.pagingLength = parseInt(slcR.options[slcR.selectedIndex].value,10);\r\n this.startPagingRow = this.pagingLength*slcPagesSelIndex;\r\n\r\n if(!isNaN(this.pagingLength)){\r\n if(this.startPagingRow >= tf.nbFilterableRows){\r\n this.startPagingRow = (tf.nbFilterableRows-this.pagingLength);\r\n }\r\n this.setPagingInfo();\r\n\r\n if(this.pageSelectorType===tf.fltTypeSlc){\r\n var slcIndex =\r\n (this.pagingSlc.options.length-1<=slcPagesSelIndex ) ?\r\n (this.pagingSlc.options.length-1) : slcPagesSelIndex;\r\n this.pagingSlc.options[slcIndex].selected = true;\r\n }\r\n if(tf.rememberPageLen){\r\n tf.feature('store').savePageLength(tf.pgLenCookie);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Re-set page nb at page re-load\r\n */\r\n _resetPage(name){\r\n var tf = this.tf;\r\n var pgnb = tf.feature('store').getPageNb(name);\r\n if(pgnb!==''){\r\n this.changePage((pgnb-1));\r\n }\r\n }\r\n\r\n /**\r\n * Re-set page length value at page re-load\r\n */\r\n _resetPageLength(name){\r\n var tf = this.tf;\r\n if(!tf.paging){\r\n return;\r\n }\r\n var pglenIndex = tf.feature('store').getPageLength(name);\r\n\r\n if(pglenIndex!==''){\r\n this.resultsPerPageSlc.options[pglenIndex].selected = true;\r\n this.changeResultsPerPage();\r\n }\r\n }\r\n\r\n /**\r\n * Remove paging feature\r\n */\r\n destroy(){\r\n var tf = this.tf;\r\n\r\n if(!tf.hasGrid()){\r\n return;\r\n }\r\n // btns containers\r\n var btnNextSpan = Dom.id(this.prfxBtnNextSpan+tf.id);\r\n var btnPrevSpan = Dom.id(this.prfxBtnPrevSpan+tf.id);\r\n var btnLastSpan = Dom.id(this.prfxBtnLastSpan+tf.id);\r\n var btnFirstSpan = Dom.id(this.prfxBtnFirstSpan+tf.id);\r\n //span containing 'Page' text\r\n var pgBeforeSpan = Dom.id(this.prfxPgBeforeSpan+tf.id);\r\n //span containing 'of' text\r\n var pgAfterSpan = Dom.id(this.prfxPgAfterSpan+tf.id);\r\n //span containing nb of pages\r\n var pgspan = Dom.id(this.prfxPgSpan+tf.id);\r\n\r\n var evt = this.evt;\r\n\r\n if(this.pagingSlc){\r\n if(this.pageSelectorType === tf.fltTypeSlc){\r\n Event.remove(this.pagingSlc, 'change', evt.slcPagesChange);\r\n }\r\n else if(this.pageSelectorType === tf.fltTypeInp){\r\n Event.remove(this.pagingSlc, 'keypress', evt._detectKey);\r\n }\r\n this.pagingSlc.parentNode.removeChild(this.pagingSlc);\r\n }\r\n\r\n if(btnNextSpan){\r\n Event.remove(btnNextSpan, 'click', evt.next);\r\n btnNextSpan.parentNode.removeChild(btnNextSpan);\r\n }\r\n\r\n if(btnPrevSpan){\r\n Event.remove(btnPrevSpan, 'click', evt.prev);\r\n btnPrevSpan.parentNode.removeChild(btnPrevSpan);\r\n }\r\n\r\n if(btnLastSpan){\r\n Event.remove(btnLastSpan, 'click', evt.last);\r\n btnLastSpan.parentNode.removeChild(btnLastSpan);\r\n }\r\n\r\n if(btnFirstSpan){\r\n Event.remove(btnFirstSpan, 'click', evt.first);\r\n btnFirstSpan.parentNode.removeChild(btnFirstSpan);\r\n }\r\n\r\n if(pgBeforeSpan){\r\n pgBeforeSpan.parentNode.removeChild(pgBeforeSpan);\r\n }\r\n\r\n if(pgAfterSpan){\r\n pgAfterSpan.parentNode.removeChild(pgAfterSpan);\r\n }\r\n\r\n if(pgspan){\r\n pgspan.parentNode.removeChild(pgspan);\r\n }\r\n\r\n if(this.hasResultsPerPage){\r\n this.removeResultsPerPage();\r\n }\r\n\r\n this.pagingSlc = null;\r\n this.nbPages = 0;\r\n this.isPagingRemoved = true;\r\n tf.paging = false;\r\n }\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "Paging",
"memberof": "src/modules/paging.js",
"longname": "src/modules/paging.js~Paging",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/paging.js",
"importStyle": "{Paging}",
"description": null,
"lineNumber": 6,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#constructor",
"access": null,
"description": "Pagination component",
"lineNumber": 12,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnPageCssClass",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnPageCssClass",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pagingSlc",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pagingSlc",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "resultsPerPageSlc",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resultsPerPageSlc",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pagingTgtId",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pagingTgtId",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pagingLength",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pagingLength",
"access": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "resultsPerPageTgtId",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resultsPerPageTgtId",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pgSlcCssClass",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pgSlcCssClass",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pgInpCssClass",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pgInpCssClass",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "resultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resultsPerPage",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#hasResultsPerPage",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "resultsSlcCssClass",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resultsSlcCssClass",
"access": null,
"description": null,
"lineNumber": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "resultsSpanCssClass",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resultsSpanCssClass",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "startPagingRow",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#startPagingRow",
"access": null,
"description": null,
"lineNumber": 41,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbPages",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#nbPages",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "currentPageNb",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#currentPageNb",
"access": null,
"description": null,
"lineNumber": 45,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnNextPageText",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnNextPageText",
"access": null,
"description": null,
"lineNumber": 47,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnPrevPageText",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnPrevPageText",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnLastPageText",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnLastPageText",
"access": null,
"description": null,
"lineNumber": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnFirstPageText",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnFirstPageText",
"access": null,
"description": null,
"lineNumber": 53,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnNextPageHtml",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnNextPageHtml",
"access": null,
"description": null,
"lineNumber": 55,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnPrevPageHtml",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnPrevPageHtml",
"access": null,
"description": null,
"lineNumber": 60,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnFirstPageHtml",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnFirstPageHtml",
"access": null,
"description": null,
"lineNumber": 65,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnLastPageHtml",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#btnLastPageHtml",
"access": null,
"description": null,
"lineNumber": 70,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pageText",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pageText",
"access": null,
"description": null,
"lineNumber": 75,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "ofText",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#ofText",
"access": null,
"description": null,
"lineNumber": 77,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbPgSpanCssClass",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#nbPgSpanCssClass",
"access": null,
"description": null,
"lineNumber": 79,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasPagingBtns",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#hasPagingBtns",
"access": null,
"description": null,
"lineNumber": 81,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pageSelectorType",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pageSelectorType",
"access": null,
"description": null,
"lineNumber": 83,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeChangePage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#onBeforeChangePage",
"access": null,
"description": null,
"lineNumber": 85,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterChangePage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#onAfterChangePage",
"access": null,
"description": null,
"lineNumber": 88,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxSlcPages",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxSlcPages",
"access": null,
"description": null,
"lineNumber": 92,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxSlcResults",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxSlcResults",
"access": null,
"description": null,
"lineNumber": 94,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxSlcResultsTxt",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxSlcResultsTxt",
"access": null,
"description": null,
"lineNumber": 96,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnNextSpan",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnNextSpan",
"access": null,
"description": null,
"lineNumber": 98,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnPrevSpan",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnPrevSpan",
"access": null,
"description": null,
"lineNumber": 100,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnLastSpan",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnLastSpan",
"access": null,
"description": null,
"lineNumber": 102,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnFirstSpan",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnFirstSpan",
"access": null,
"description": null,
"lineNumber": 104,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnNext",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnNext",
"access": null,
"description": null,
"lineNumber": 106,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnPrev",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnPrev",
"access": null,
"description": null,
"lineNumber": 108,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnLast",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnLast",
"access": null,
"description": null,
"lineNumber": 110,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxBtnFirst",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxBtnFirst",
"access": null,
"description": null,
"lineNumber": 112,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxPgSpan",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxPgSpan",
"access": null,
"description": null,
"lineNumber": 114,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxPgBeforeSpan",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxPgBeforeSpan",
"access": null,
"description": null,
"lineNumber": 116,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxPgAfterSpan",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#prfxPgAfterSpan",
"access": null,
"description": null,
"lineNumber": 118,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbPages",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#nbPages",
"access": null,
"description": null,
"lineNumber": 123,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "evt",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#evt",
"access": null,
"description": null,
"lineNumber": 128,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#tf",
"access": null,
"description": null,
"lineNumber": 174,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#init",
"access": null,
"description": "Initialize DOM elements",
"lineNumber": 180,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#hasResultsPerPage",
"access": null,
"description": null,
"lineNumber": 189,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pagingLength",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pagingLength",
"access": null,
"description": null,
"lineNumber": 191,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pagingSlc",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pagingSlc",
"access": null,
"description": null,
"lineNumber": 322,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isPagingRemoved",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#isPagingRemoved",
"access": null,
"description": null,
"lineNumber": 332,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "reset",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#reset",
"access": null,
"description": "Reset paging when filters are already instantiated",
"lineNumber": 339,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "filterTable",
"description": "Execute filtering once paging instanciated"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isPagingRemoved",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#isPagingRemoved",
"access": null,
"description": null,
"lineNumber": 345,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setPagingInfo",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#setPagingInfo",
"access": null,
"description": "Calculate number of pages based on valid rows\nRefresh paging select according to number of pages",
"lineNumber": 358,
"params": [
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "validRows",
"description": "Collection of valid rows"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbPages",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#nbPages",
"access": null,
"description": null,
"lineNumber": 383,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "groupByPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#groupByPage",
"access": null,
"description": "Group table rows by page and display valid rows",
"lineNumber": 414,
"params": [
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "validRows",
"description": "Collection of valid rows"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#getPage",
"access": null,
"description": "Return the current page number",
"lineNumber": 456,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": "Page number"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#setPage",
"access": null,
"description": "Show page based on passed param value (string or number):",
"lineNumber": 465,
"params": [
{
"nullable": null,
"types": [
"String} or {Number"
],
"spread": false,
"optional": false,
"name": "cmd",
"description": "possible string values: 'next',\n'previous', 'last', 'first' or page number as per param"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#setResultsPerPage",
"access": null,
"description": "Generates UI elements for the number of results per page drop-down",
"lineNumber": 499,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "resultsPerPageSlc",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resultsPerPageSlc",
"access": null,
"description": null,
"lineNumber": 546,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "removeResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#removeResultsPerPage",
"access": null,
"description": "Remove number of results per page UI elements",
"lineNumber": 552,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "resultsPerPageSlc",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resultsPerPageSlc",
"access": null,
"description": null,
"lineNumber": 565,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "changePage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#changePage",
"access": null,
"description": "Change the page asynchronously according to passed index",
"lineNumber": 572,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Index of the page (0-n)"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "changeResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#changeResultsPerPage",
"access": null,
"description": "Change rows asynchronously according to page results",
"lineNumber": 581,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "resetPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resetPage",
"access": null,
"description": "Re-set asynchronously page nb at page re-load",
"lineNumber": 590,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "resetPageLength",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resetPageLength",
"access": null,
"description": "Re-set asynchronously page length at page re-load",
"lineNumber": 599,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_changePage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#_changePage",
"access": null,
"description": "Change the page according to passed index",
"lineNumber": 609,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Index of the page (0-n)"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "currentPageNb",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#currentPageNb",
"access": null,
"description": null,
"lineNumber": 623,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "startPagingRow",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#startPagingRow",
"access": null,
"description": null,
"lineNumber": 633,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_changeResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#_changeResultsPerPage",
"access": null,
"description": "Change rows according to page results drop-down\nTODO: accept a parameter setting the results per page length",
"lineNumber": 648,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pagingLength",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pagingLength",
"access": null,
"description": null,
"lineNumber": 658,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "startPagingRow",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#startPagingRow",
"access": null,
"description": null,
"lineNumber": 659,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "startPagingRow",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#startPagingRow",
"access": null,
"description": null,
"lineNumber": 663,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_resetPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#_resetPage",
"access": null,
"description": "Re-set page nb at page re-load",
"lineNumber": 682,
"params": [
{
"name": "name",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_resetPageLength",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#_resetPageLength",
"access": null,
"description": "Re-set page length value at page re-load",
"lineNumber": 693,
"params": [
{
"name": "name",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#destroy",
"access": null,
"description": "Remove paging feature",
"lineNumber": 709,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pagingSlc",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#pagingSlc",
"access": null,
"description": null,
"lineNumber": 775,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbPages",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#nbPages",
"access": null,
"description": null,
"lineNumber": 776,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isPagingRemoved",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#isPagingRemoved",
"access": null,
"description": null,
"lineNumber": 777,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/popupFilter.js",
"memberof": null,
"longname": "src/modules/popupFilter.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Types from '../types';\r\nimport Dom from '../dom';\r\nimport Event from '../event';\r\n\r\nexport class PopupFilter{\r\n\r\n /**\r\n * Pop-up filter component\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // Configuration object\r\n var f = tf.config();\r\n\r\n // Enable external filters behaviour\r\n tf.isExternalFlt = true;\r\n tf.externalFltTgtIds = [];\r\n\r\n //filter icon path\r\n this.popUpImgFlt = f.popup_filters_image ||\r\n tf.themesPath+'icn_filter.gif';\r\n //active filter icon path\r\n this.popUpImgFltActive = f.popup_filters_image_active ||\r\n tf.themesPath+'icn_filterActive.gif';\r\n this.popUpImgFltHtml = f.popup_filters_image_html ||\r\n '<img src=\"'+ this.popUpImgFlt +'\" alt=\"Column filter\" />';\r\n //defines css class for popup div containing filter\r\n this.popUpDivCssClass = f.popup_div_css_class || 'popUpFilter';\r\n //callback function before popup filtes is opened\r\n this.onBeforePopUpOpen = Types.isFn(f.on_before_popup_filter_open) ?\r\n f.on_before_popup_filter_open : null;\r\n //callback function after popup filtes is opened\r\n this.onAfterPopUpOpen = Types.isFn(f.on_after_popup_filter_open) ?\r\n f.on_after_popup_filter_open : null;\r\n //callback function before popup filtes is closed\r\n this.onBeforePopUpClose =\r\n Types.isFn(f.on_before_popup_filter_close) ?\r\n f.on_before_popup_filter_close : null;\r\n //callback function after popup filtes is closed\r\n this.onAfterPopUpClose = Types.isFn(f.on_after_popup_filter_close) ?\r\n f.on_after_popup_filter_close : null;\r\n\r\n //stores filters spans\r\n this.popUpFltSpans = [];\r\n //stores filters icons\r\n this.popUpFltImgs = [];\r\n //stores filters containers\r\n this.popUpFltElms = this.popUpFltElmCache || [];\r\n this.popUpFltAdjustToContainer = true;\r\n\r\n //id prefix for pop-up filter span\r\n this.prfxPopUpSpan = 'popUpSpan_';\r\n //id prefix for pop-up div containing filter\r\n this.prfxPopUpDiv = 'popUpDiv_';\r\n\r\n this.tf = tf;\r\n }\r\n\r\n onClick(e){\r\n var evt = e || global.event,\r\n elm = evt.target.parentNode,\r\n colIndex = parseInt(elm.getAttribute('ci'), 10);\r\n\r\n this.closeAll(colIndex);\r\n this.toggle(colIndex);\r\n\r\n if(this.popUpFltAdjustToContainer){\r\n var popUpDiv = this.popUpFltElms[colIndex],\r\n header = this.tf.getHeaderElement(colIndex),\r\n headerWidth = header.clientWidth * 0.95;\r\n popUpDiv.style.width = parseInt(headerWidth, 10) + 'px';\r\n }\r\n Event.cancel(evt);\r\n Event.stop(evt);\r\n }\r\n\r\n /**\r\n * Initialize DOM elements\r\n */\r\n init(){\r\n var tf = this.tf;\r\n for(var i=0; i<tf.nbCells; i++){\r\n if(tf['col'+i] === tf.fltTypeNone){\r\n continue;\r\n }\r\n var popUpSpan = Dom.create(\r\n 'span',\r\n ['id', this.prfxPopUpSpan+tf.id+'_'+i],\r\n ['ci', i]\r\n );\r\n popUpSpan.innerHTML = this.popUpImgFltHtml;\r\n var header = tf.getHeaderElement(i);\r\n header.appendChild(popUpSpan);\r\n Event.add(popUpSpan, 'click', (evt) => { this.onClick(evt); });\r\n this.popUpFltSpans[i] = popUpSpan;\r\n this.popUpFltImgs[i] = popUpSpan.firstChild;\r\n }\r\n }\r\n\r\n /**\r\n * Build all pop-up filters elements\r\n */\r\n buildAll(){\r\n for(var i=0; i<this.popUpFltElmCache.length; i++){\r\n this.build(i, this.popUpFltElmCache[i]);\r\n }\r\n }\r\n\r\n /**\r\n * Build a specified pop-up filter elements\r\n * @param {Number} colIndex Column index\r\n * @param {Object} div Optional container DOM element\r\n */\r\n build(colIndex, div){\r\n var tf = this.tf;\r\n var popUpDiv = !div ?\r\n Dom.create('div', ['id', this.prfxPopUpDiv+tf.id+'_'+colIndex]) :\r\n div;\r\n popUpDiv.className = this.popUpDivCssClass;\r\n tf.externalFltTgtIds.push(popUpDiv.id);\r\n var header = tf.getHeaderElement(colIndex);\r\n header.insertBefore(popUpDiv, header.firstChild);\r\n Event.add(popUpDiv, 'click', (evt) => { Event.stop(evt); });\r\n this.popUpFltElms[colIndex] = popUpDiv;\r\n }\r\n\r\n /**\r\n * Toogle visibility of specified filter\r\n * @param {Number} colIndex Column index\r\n */\r\n toggle(colIndex){\r\n var tf = this.tf,\r\n popUpFltElm = this.popUpFltElms[colIndex];\r\n\r\n if(popUpFltElm.style.display === 'none' ||\r\n popUpFltElm.style.display === ''){\r\n if(this.onBeforePopUpOpen){\r\n this.onBeforePopUpOpen.call(\r\n null, this, this.popUpFltElms[colIndex], colIndex);\r\n }\r\n popUpFltElm.style.display = 'block';\r\n if(tf['col'+colIndex] === tf.fltTypeInp){\r\n var flt = tf.getFilterElement(colIndex);\r\n if(flt){\r\n flt.focus();\r\n }\r\n }\r\n if(this.onAfterPopUpOpen){\r\n this.onAfterPopUpOpen.call(\r\n null, this, this.popUpFltElms[colIndex], colIndex);\r\n }\r\n } else {\r\n if(this.onBeforePopUpClose){\r\n this.onBeforePopUpClose.call(\r\n null, this, this.popUpFltElms[colIndex], colIndex);\r\n }\r\n popUpFltElm.style.display = 'none';\r\n if(this.onAfterPopUpClose){\r\n this.onAfterPopUpClose.call(\r\n null, this, this.popUpFltElms[colIndex], colIndex);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Close all filters excepted for the specified one if any\r\n * @param {Number} exceptIdx Column index of the filter to not close\r\n */\r\n closeAll(exceptIdx){\r\n for(var i=0; i<this.popUpFltElms.length; i++){\r\n if(i === exceptIdx){\r\n continue;\r\n }\r\n var popUpFltElm = this.popUpFltElms[i];\r\n if(popUpFltElm){\r\n popUpFltElm.style.display = 'none';\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Build all the icons representing the pop-up filters\r\n */\r\n buildIcons(){\r\n for(var i=0; i<this.popUpFltImgs.length; i++){\r\n this.buildIcon(i, false);\r\n }\r\n }\r\n\r\n /**\r\n * Build specified icon\r\n * @param {Number} colIndex Column index\r\n * @param {Boolean} active Apply active state\r\n */\r\n buildIcon(colIndex, active){\r\n if(this.popUpFltImgs[colIndex]){\r\n this.popUpFltImgs[colIndex].src = active ?\r\n this.popUpImgFltActive : this.popUpImgFlt;\r\n }\r\n }\r\n\r\n /**\r\n * Remove pop-up filters\r\n */\r\n destroy(){\r\n this.popUpFltElmCache = [];\r\n for(var i=0; i<this.popUpFltElms.length; i++){\r\n var popUpFltElm = this.popUpFltElms[i],\r\n popUpFltSpan = this.popUpFltSpans[i],\r\n popUpFltImg = this.popUpFltImgs[i];\r\n if(popUpFltElm){\r\n popUpFltElm.parentNode.removeChild(popUpFltElm);\r\n this.popUpFltElmCache[i] = popUpFltElm;\r\n }\r\n popUpFltElm = null;\r\n if(popUpFltSpan){\r\n popUpFltSpan.parentNode.removeChild(popUpFltSpan);\r\n }\r\n popUpFltSpan = null;\r\n if(popUpFltImg){\r\n popUpFltImg.parentNode.removeChild(popUpFltImg);\r\n }\r\n popUpFltImg = null;\r\n }\r\n this.popUpFltElms = [];\r\n this.popUpFltSpans = [];\r\n this.popUpFltImgs = [];\r\n }\r\n\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "PopupFilter",
"memberof": "src/modules/popupFilter.js",
"longname": "src/modules/popupFilter.js~PopupFilter",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/popupFilter.js",
"importStyle": "{PopupFilter}",
"description": null,
"lineNumber": 5,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#constructor",
"access": null,
"description": "Pop-up filter component",
"lineNumber": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpImgFlt",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpImgFlt",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpImgFltActive",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpImgFltActive",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpImgFltHtml",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpImgFltHtml",
"access": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpDivCssClass",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpDivCssClass",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforePopUpOpen",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#onBeforePopUpOpen",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterPopUpOpen",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#onAfterPopUpOpen",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforePopUpClose",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#onBeforePopUpClose",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterPopUpClose",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#onAfterPopUpClose",
"access": null,
"description": null,
"lineNumber": 40,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltSpans",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltSpans",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltImgs",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltImgs",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltElms",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltElms",
"access": null,
"description": null,
"lineNumber": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltAdjustToContainer",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltAdjustToContainer",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxPopUpSpan",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#prfxPopUpSpan",
"access": null,
"description": null,
"lineNumber": 52,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxPopUpDiv",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#prfxPopUpDiv",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#tf",
"access": null,
"description": null,
"lineNumber": 56,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "onClick",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#onClick",
"access": null,
"description": null,
"lineNumber": 59,
"undocument": true,
"params": [
{
"name": "e",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#init",
"access": null,
"description": "Initialize DOM elements",
"lineNumber": 80,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "buildAll",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#buildAll",
"access": null,
"description": "Build all pop-up filters elements",
"lineNumber": 103,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "build",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#build",
"access": null,
"description": "Build a specified pop-up filter elements",
"lineNumber": 114,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "div",
"description": "Optional container DOM element"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "toggle",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#toggle",
"access": null,
"description": "Toogle visibility of specified filter",
"lineNumber": 131,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "closeAll",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#closeAll",
"access": null,
"description": "Close all filters excepted for the specified one if any",
"lineNumber": 169,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "exceptIdx",
"description": "Column index of the filter to not close"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "buildIcons",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#buildIcons",
"access": null,
"description": "Build all the icons representing the pop-up filters",
"lineNumber": 184,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "buildIcon",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#buildIcon",
"access": null,
"description": "Build specified icon",
"lineNumber": 195,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "active",
"description": "Apply active state"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#destroy",
"access": null,
"description": "Remove pop-up filters",
"lineNumber": 205,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltElmCache",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltElmCache",
"access": null,
"description": null,
"lineNumber": 206,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltElms",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltElms",
"access": null,
"description": null,
"lineNumber": 225,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltSpans",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltSpans",
"access": null,
"description": null,
"lineNumber": 226,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFltImgs",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#popUpFltImgs",
"access": null,
"description": null,
"lineNumber": 227,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/rowsCounter.js",
"memberof": null,
"longname": "src/modules/rowsCounter.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Types from '../types';\r\n\r\nexport class RowsCounter{\r\n\r\n /**\r\n * Rows counter\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // TableFilter configuration\r\n var f = tf.config();\r\n\r\n //id of custom container element\r\n this.rowsCounterTgtId = f.rows_counter_target_id || null;\r\n //element containing tot nb rows\r\n this.rowsCounterDiv = null;\r\n //element containing tot nb rows label\r\n this.rowsCounterSpan = null;\r\n //defines rows counter text\r\n this.rowsCounterText = f.rows_counter_text || 'Rows: ';\r\n this.fromToTextSeparator = f.from_to_text_separator || '-';\r\n this.overText = f.over_text || ' / ';\r\n //defines css class rows counter\r\n this.totRowsCssClass = f.tot_rows_css_class || 'tot';\r\n //rows counter div\r\n this.prfxCounter = 'counter_';\r\n //nb displayed rows label\r\n this.prfxTotRows = 'totrows_span_';\r\n //label preceding nb rows label\r\n this.prfxTotRowsTxt = 'totRowsTextSpan_';\r\n //callback raised before counter is refreshed\r\n this.onBeforeRefreshCounter = Types.isFn(f.on_before_refresh_counter) ?\r\n f.on_before_refresh_counter : null;\r\n //callback raised after counter is refreshed\r\n this.onAfterRefreshCounter = Types.isFn(f.on_after_refresh_counter) ?\r\n f.on_after_refresh_counter : null;\r\n\r\n this.tf = tf;\r\n }\r\n\r\n init(){\r\n var tf = this.tf;\r\n\r\n if((!tf.hasGrid() && !tf.isFirstLoad) || this.rowsCounterSpan){\r\n return;\r\n }\r\n\r\n //rows counter container\r\n var countDiv = Dom.create('div', ['id', this.prfxCounter+tf.id]);\r\n countDiv.className = this.totRowsCssClass;\r\n //rows counter label\r\n var countSpan = Dom.create('span', ['id', this.prfxTotRows+tf.id]);\r\n var countText = Dom.create('span', ['id', this.prfxTotRowsTxt+tf.id]);\r\n countText.appendChild(Dom.text(this.rowsCounterText));\r\n\r\n // counter is added to defined element\r\n if(!this.rowsCounterTgtId){\r\n tf.setToolbar();\r\n }\r\n var targetEl = !this.rowsCounterTgtId ?\r\n tf.lDiv : Dom.id( this.rowsCounterTgtId );\r\n\r\n //default container: 'lDiv'\r\n if(!this.rowsCounterTgtId){\r\n countDiv.appendChild(countText);\r\n countDiv.appendChild(countSpan);\r\n targetEl.appendChild(countDiv);\r\n }\r\n else{\r\n //custom container, no need to append statusDiv\r\n targetEl.appendChild(countText);\r\n targetEl.appendChild(countSpan);\r\n }\r\n this.rowsCounterDiv = countDiv;\r\n this.rowsCounterSpan = countSpan;\r\n\r\n this.refresh();\r\n }\r\n\r\n refresh(p){\r\n if(!this.rowsCounterSpan){\r\n return;\r\n }\r\n\r\n var tf = this.tf;\r\n\r\n if(this.onBeforeRefreshCounter){\r\n this.onBeforeRefreshCounter.call(null, tf, this.rowsCounterSpan);\r\n }\r\n\r\n var totTxt;\r\n if(!tf.paging){\r\n if(p && p !== ''){\r\n totTxt = p;\r\n } else{\r\n totTxt = tf.nbFilterableRows - tf.nbHiddenRows;\r\n }\r\n } else {\r\n var paging = tf.feature('paging');\r\n if(paging){\r\n //paging start row\r\n var paging_start_row = parseInt(paging.startPagingRow, 10) +\r\n ((tf.nbVisibleRows>0) ? 1 : 0);\r\n var paging_end_row = (paging_start_row+paging.pagingLength)-1 <=\r\n tf.nbVisibleRows ?\r\n paging_start_row+paging.pagingLength-1 :\r\n tf.nbVisibleRows;\r\n totTxt = paging_start_row + this.fromToTextSeparator +\r\n paging_end_row + this.overText + tf.nbVisibleRows;\r\n }\r\n }\r\n\r\n this.rowsCounterSpan.innerHTML = totTxt;\r\n if(this.onAfterRefreshCounter){\r\n this.onAfterRefreshCounter.call(\r\n null, tf, this.rowsCounterSpan, totTxt);\r\n }\r\n }\r\n\r\n destroy(){\r\n var tf = this.tf;\r\n if(!tf.hasGrid() || !this.rowsCounterSpan){\r\n return;\r\n }\r\n\r\n if(!this.rowsCounterTgtId && this.rowsCounterDiv){\r\n this.rowsCounterDiv.parentNode.removeChild(this.rowsCounterDiv);\r\n } else {\r\n Dom.id(this.rowsCounterTgtId).innerHTML = '';\r\n }\r\n this.rowsCounterSpan = null;\r\n this.rowsCounterDiv = null;\r\n }\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "RowsCounter",
"memberof": "src/modules/rowsCounter.js",
"longname": "src/modules/rowsCounter.js~RowsCounter",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/rowsCounter.js",
"importStyle": "{RowsCounter}",
"description": null,
"lineNumber": 4,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#constructor",
"access": null,
"description": "Rows counter",
"lineNumber": 10,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterTgtId",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterTgtId",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterDiv",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterDiv",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterSpan",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterSpan",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterText",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterText",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fromToTextSeparator",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#fromToTextSeparator",
"access": null,
"description": null,
"lineNumber": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "overText",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#overText",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "totRowsCssClass",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#totRowsCssClass",
"access": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCounter",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#prfxCounter",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxTotRows",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#prfxTotRows",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxTotRowsTxt",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#prfxTotRowsTxt",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeRefreshCounter",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#onBeforeRefreshCounter",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterRefreshCounter",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#onAfterRefreshCounter",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#tf",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#init",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterDiv",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterDiv",
"access": null,
"description": null,
"lineNumber": 75,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterSpan",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterSpan",
"access": null,
"description": null,
"lineNumber": 76,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "refresh",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#refresh",
"access": null,
"description": null,
"lineNumber": 81,
"undocument": true,
"params": [
{
"name": "p",
"types": [
"*"
]
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#destroy",
"access": null,
"description": null,
"lineNumber": 121,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterSpan",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterSpan",
"access": null,
"description": null,
"lineNumber": 132,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounterDiv",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#rowsCounterDiv",
"access": null,
"description": null,
"lineNumber": 133,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/statusBar.js",
"memberof": null,
"longname": "src/modules/statusBar.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Dom from '../dom';\r\nimport Types from '../types';\r\n\r\nvar global = window;\r\n\r\nexport class StatusBar{\r\n\r\n /**\r\n * Status bar UI component\r\n * @param {Object} tf TableFilter instance\r\n */\r\n constructor(tf){\r\n // Configuration object\r\n var f = tf.config();\r\n\r\n //id of custom container element\r\n this.statusBarTgtId = f.status_bar_target_id || null;\r\n //element containing status bar label\r\n this.statusBarDiv = null;\r\n //status bar\r\n this.statusBarSpan = null;\r\n //status bar label\r\n this.statusBarSpanText = null;\r\n //defines status bar text\r\n this.statusBarText = f.status_bar_text || '';\r\n //defines css class status bar\r\n this.statusBarCssClass = f.status_bar_css_class || 'status';\r\n //delay for status bar clearing\r\n this.statusBarCloseDelay = 250;\r\n\r\n //calls function before message is displayed\r\n this.onBeforeShowMsg = Types.isFn(f.on_before_show_msg) ?\r\n f.on_before_show_msg : null;\r\n //calls function after message is displayed\r\n this.onAfterShowMsg = Types.isFn(f.on_after_show_msg) ?\r\n f.on_after_show_msg : null;\r\n\r\n // status bar div\r\n this.prfxStatus = 'status_';\r\n // status bar label\r\n this.prfxStatusSpan = 'statusSpan_';\r\n // text preceding status bar label\r\n this.prfxStatusTxt = 'statusText_';\r\n\r\n this.tf = tf;\r\n }\r\n\r\n init(){\r\n var tf = this.tf;\r\n if(!tf.hasGrid() && !tf.isFirstLoad){\r\n return;\r\n }\r\n\r\n //status bar container\r\n var statusDiv = Dom.create('div', ['id', this.prfxStatus+tf.id]);\r\n statusDiv.className = this.statusBarCssClass;\r\n\r\n //status bar label\r\n var statusSpan = Dom.create('span', ['id', this.prfxStatusSpan+tf.id]);\r\n //preceding text\r\n var statusSpanText = Dom.create('span',\r\n ['id', this.prfxStatusTxt+tf.id]);\r\n statusSpanText.appendChild(Dom.text(this.statusBarText));\r\n\r\n // target element container\r\n if(!this.statusBarTgtId){\r\n tf.setToolbar();\r\n }\r\n var targetEl = (!this.statusBarTgtId) ?\r\n tf.lDiv : Dom.id(this.statusBarTgtId);\r\n\r\n //default container: 'lDiv'\r\n if(!this.statusBarTgtId){\r\n statusDiv.appendChild(statusSpanText);\r\n statusDiv.appendChild(statusSpan);\r\n targetEl.appendChild(statusDiv);\r\n } else {\r\n // custom container, no need to append statusDiv\r\n targetEl.appendChild(statusSpanText);\r\n targetEl.appendChild(statusSpan);\r\n }\r\n\r\n this.statusBarDiv = statusDiv;\r\n this.statusBarSpan = statusSpan;\r\n this.statusBarSpanText = statusSpanText;\r\n\r\n }\r\n\r\n message(t=''){\r\n var tf = this.tf;\r\n if(!tf.statusBar || !this.statusBarSpan){\r\n return;\r\n }\r\n if(this.onBeforeShowMsg){\r\n this.onBeforeShowMsg.call(null, this.tf, t);\r\n }\r\n\r\n var d = t==='' ? this.statusBarCloseDelay : 1;\r\n global.setTimeout(() => {\r\n this.statusBarSpan.innerHTML = t;\r\n if(this.onAfterShowMsg){\r\n this.onAfterShowMsg.call(null, this.tf, t);\r\n }\r\n }, d);\r\n }\r\n\r\n destroy(){\r\n var tf = this.tf;\r\n if(!tf.hasGrid() || !this.statusBarDiv){\r\n return;\r\n }\r\n\r\n this.statusBarDiv.innerHTML = '';\r\n this.statusBarDiv.parentNode.removeChild(this.statusBarDiv);\r\n this.statusBarSpan = null;\r\n this.statusBarSpanText = null;\r\n this.statusBarDiv = null;\r\n }\r\n\r\n}\r\n"
},
{
"kind": "variable",
"static": true,
"variation": null,
"name": "global",
"memberof": "src/modules/statusBar.js",
"longname": "src/modules/statusBar.js~global",
"access": null,
"export": false,
"importPath": "TableFilter/src/modules/statusBar.js",
"importStyle": null,
"description": null,
"lineNumber": 4,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "StatusBar",
"memberof": "src/modules/statusBar.js",
"longname": "src/modules/statusBar.js~StatusBar",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/statusBar.js",
"importStyle": "{StatusBar}",
"description": null,
"lineNumber": 6,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#constructor",
"access": null,
"description": "Status bar UI component",
"lineNumber": 12,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarTgtId",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarTgtId",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarDiv",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarDiv",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarSpan",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarSpan",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarSpanText",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarSpanText",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarText",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarText",
"access": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarCssClass",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarCssClass",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarCloseDelay",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarCloseDelay",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeShowMsg",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#onBeforeShowMsg",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterShowMsg",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#onAfterShowMsg",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxStatus",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#prfxStatus",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxStatusSpan",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#prfxStatusSpan",
"access": null,
"description": null,
"lineNumber": 41,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxStatusTxt",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#prfxStatusTxt",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#tf",
"access": null,
"description": null,
"lineNumber": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#init",
"access": null,
"description": null,
"lineNumber": 48,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarDiv",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarDiv",
"access": null,
"description": null,
"lineNumber": 83,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarSpan",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarSpan",
"access": null,
"description": null,
"lineNumber": 84,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarSpanText",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarSpanText",
"access": null,
"description": null,
"lineNumber": 85,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "message",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#message",
"access": null,
"description": null,
"lineNumber": 89,
"undocument": true,
"params": [
{
"name": "t",
"optional": true,
"types": [
"string"
],
"defaultRaw": "",
"defaultValue": ""
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#destroy",
"access": null,
"description": null,
"lineNumber": 107,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarSpan",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarSpan",
"access": null,
"description": null,
"lineNumber": 115,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarSpanText",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarSpanText",
"access": null,
"description": null,
"lineNumber": 116,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBarDiv",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#statusBarDiv",
"access": null,
"description": null,
"lineNumber": 117,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/store.js",
"memberof": null,
"longname": "src/modules/store.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Cookie from '../cookie';\r\n\r\nexport class Store{\r\n\r\n /**\r\n * Store, persistence manager\r\n * @param {Object} tf TableFilter instance\r\n *\r\n * TODO: use localStorage and fallback to cookie persistence\r\n */\r\n constructor(tf) {\r\n var f = tf.config();\r\n\r\n this.duration = !isNaN(f.set_cookie_duration) ?\r\n parseInt(f.set_cookie_duration, 10) : 100000;\r\n\r\n this.tf = tf;\r\n }\r\n\r\n /**\r\n * Store filters' values in cookie\r\n * @param {String} cookie name\r\n */\r\n saveFilterValues(name){\r\n var tf = this.tf;\r\n var fltValues = [];\r\n //store filters' values\r\n for(var i=0; i<tf.fltIds.length; i++){\r\n var value = tf.getFilterValue(i);\r\n if (value === ''){\r\n value = ' ';\r\n }\r\n fltValues.push(value);\r\n }\r\n //adds array size\r\n fltValues.push(tf.fltIds.length);\r\n\r\n //writes cookie\r\n Cookie.write(\r\n name,\r\n fltValues.join(tf.separator),\r\n this.duration\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve filters' values from cookie\r\n * @param {String} cookie name\r\n * @return {Array}\r\n */\r\n getFilterValues(name){\r\n var flts = Cookie.read(name);\r\n var rgx = new RegExp(this.tf.separator, 'g');\r\n // filters' values array\r\n return flts.split(rgx);\r\n }\r\n\r\n /**\r\n * Store page number in cookie\r\n * @param {String} cookie name\r\n */\r\n savePageNb(name){\r\n Cookie.write(\r\n name,\r\n this.tf.feature('paging').currentPageNb,\r\n this.duration\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve page number from cookie\r\n * @param {String} cookie name\r\n * @return {String}\r\n */\r\n getPageNb(name){\r\n return Cookie.read(name);\r\n }\r\n\r\n /**\r\n * Store page length in cookie\r\n * @param {String} cookie name\r\n */\r\n savePageLength(name){\r\n Cookie.write(\r\n name,\r\n this.tf.feature('paging').resultsPerPageSlc.selectedIndex,\r\n this.duration\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve page length from cookie\r\n * @param {String} cookie name\r\n * @return {String}\r\n */\r\n getPageLength(name){\r\n return Cookie.read(name);\r\n }\r\n\r\n}\r\n"
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "Store",
"memberof": "src/modules/store.js",
"longname": "src/modules/store.js~Store",
"access": null,
"export": true,
"importPath": "TableFilter/src/modules/store.js",
"importStyle": "{Store}",
"description": null,
"lineNumber": 3,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#constructor",
"access": null,
"description": "Store, persistence manager",
"lineNumber": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance\n\nTODO: use localStorage and fallback to cookie persistence"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "duration",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#duration",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#tf",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "saveFilterValues",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#saveFilterValues",
"access": null,
"description": "Store filters' values in cookie",
"lineNumber": 24,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cookie",
"description": "name"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilterValues",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#getFilterValues",
"access": null,
"description": "Retrieve filters' values from cookie",
"lineNumber": 51,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cookie",
"description": "name"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "savePageNb",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#savePageNb",
"access": null,
"description": "Store page number in cookie",
"lineNumber": 62,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cookie",
"description": "name"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getPageNb",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#getPageNb",
"access": null,
"description": "Retrieve page number from cookie",
"lineNumber": 75,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cookie",
"description": "name"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "savePageLength",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#savePageLength",
"access": null,
"description": "Store page length in cookie",
"lineNumber": 83,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cookie",
"description": "name"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getPageLength",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#getPageLength",
"access": null,
"description": "Retrieve page length from cookie",
"lineNumber": 96,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cookie",
"description": "name"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/sort.js",
"memberof": null,
"longname": "src/sort.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Str from './string';\r\n\r\nexport default {\r\n ignoreCase(a, b){\r\n let x = Str.lower(a);\r\n let y = Str.lower(b);\r\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\r\n }\r\n};\r\n"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/string.js",
"memberof": null,
"longname": "src/string.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * String utilities\r\n */\r\n\r\nexport default {\r\n\r\n lower(text){\r\n return text.toLowerCase();\r\n },\r\n\r\n upper(text){\r\n return text.toUpperCase();\r\n },\r\n\r\n trim(text){\r\n if (text.trim){\r\n return text.trim();\r\n }\r\n return text.replace(/^\\s*|\\s*$/g, '');\r\n },\r\n\r\n isEmpty(text){\r\n return this.trim(text) === '';\r\n },\r\n\r\n rgxEsc(text){\r\n let chars = /[-\\/\\\\^$*+?.()|[\\]{}]/g;\r\n let escMatch = '\\\\$&';\r\n return String(text).replace(chars, escMatch);\r\n },\r\n\r\n matchCase(text, mc){\r\n if(!mc){\r\n return this.lower(text);\r\n }\r\n return text;\r\n }\r\n\r\n};\r\n"
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/tablefilter.js",
"memberof": null,
"longname": "src/tablefilter.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Event from './event';\r\nimport Dom from './dom';\r\nimport Str from './string';\r\nimport Cookie from './cookie';\r\nimport Types from './types';\r\nimport Arr from './array';\r\nimport DateHelper from './date';\r\nimport Helpers from './helpers';\r\n\r\n// Features\r\nimport {Store} from './modules/store';\r\nimport {GridLayout} from './modules/gridLayout';\r\nimport {Loader} from './modules/loader';\r\nimport {HighlightKeyword} from './modules/highlightKeywords';\r\nimport {PopupFilter} from './modules/popupFilter';\r\nimport {Dropdown} from './modules/dropdown';\r\nimport {CheckList} from './modules/checkList';\r\nimport {RowsCounter} from './modules/rowsCounter';\r\nimport {StatusBar} from './modules/statusBar';\r\nimport {Paging} from './modules/paging';\r\nimport {ClearButton} from './modules/clearButton';\r\nimport {Help} from './modules/help';\r\nimport {AlternateRows} from './modules/alternateRows';\r\n\r\nvar global = window,\r\n isValidDate = DateHelper.isValid,\r\n formatDate = DateHelper.format,\r\n doc = global.document;\r\n\r\nexport class TableFilter{\r\n\r\n /**\r\n * TF object constructor\r\n * @param {String} id Table id\r\n * @param {Number} row index indicating the 1st row\r\n * @param {Object} configuration object\r\n *\r\n * TODO: Accept a TABLE element or query selectors\r\n */\r\n constructor(id) {\r\n if(arguments.length === 0){ return; }\r\n\r\n this.id = id;\r\n this.version = '{VERSION}';\r\n this.year = new Date().getFullYear();\r\n this.tbl = Dom.id(id);\r\n this.startRow = null;\r\n this.refRow = null;\r\n this.headersRow = null;\r\n this.cfg = {};\r\n this.nbFilterableRows = null;\r\n this.nbRows = null;\r\n this.nbCells = null;\r\n this._hasGrid = false;\r\n this.enableModules = false;\r\n\r\n if(!this.tbl || this.tbl.nodeName != 'TABLE' || this.getRowsNb() === 0){\r\n throw new Error(\r\n 'Could not instantiate TableFilter: HTML table not found.');\r\n }\r\n\r\n if(arguments.length > 1){\r\n for(let i=0, len=arguments.length; i<len; i++){\r\n let arg = arguments[i];\r\n let argtype = typeof arg;\r\n switch(Str.lower(argtype)){\r\n case 'number':\r\n this.startRow = arg;\r\n break;\r\n case 'object':\r\n this.cfg = arg;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // configuration object\r\n let f = this.cfg;\r\n\r\n //Start row et cols nb\r\n this.refRow = this.startRow===null ? 2 : (this.startRow+1);\r\n try{ this.nbCells = this.getCellsNb(this.refRow); }\r\n catch(e){ this.nbCells = this.getCellsNb(0); }\r\n\r\n //default script base path\r\n this.basePath = f.base_path || 'tablefilter/';\r\n\r\n /*** filter types ***/\r\n this.fltTypeInp = 'input';\r\n this.fltTypeSlc = 'select';\r\n this.fltTypeMulti = 'multiple';\r\n this.fltTypeCheckList = 'checklist';\r\n this.fltTypeNone = 'none';\r\n\r\n /*** filters' grid properties ***/\r\n\r\n //enables/disables filter grid\r\n this.fltGrid = f.grid===false ? false : true;\r\n\r\n /*** Grid layout ***/\r\n //enables/disables grid layout (fixed headers)\r\n this.gridLayout = Boolean(f.grid_layout);\r\n this.sourceTblHtml = null;\r\n if(this.gridLayout){\r\n this.sourceTblHtml = this.tbl.outerHTML;\r\n }\r\n /*** ***/\r\n\r\n this.filtersRowIndex = f.filters_row_index || 0;\r\n this.headersRow = f.headers_row_index ||\r\n (this.filtersRowIndex===0 ? 1 : 0);\r\n\r\n if(this.gridLayout){\r\n if(this.headersRow > 1){\r\n this.filtersRowIndex = this.headersRow+1;\r\n } else {\r\n this.filtersRowIndex = 1;\r\n this.headersRow = 0;\r\n }\r\n }\r\n\r\n //defines tag of the cells containing filters (td/th)\r\n this.fltCellTag = f.filters_cell_tag!=='th' ||\r\n f.filters_cell_tag!=='td' ? 'td' : f.filters_cell_tag;\r\n\r\n //stores filters ids\r\n this.fltIds = [];\r\n //stores filters DOM elements\r\n this.fltElms = [];\r\n //stores filters values\r\n this.searchArgs = null;\r\n //stores table data\r\n this.tblData = [];\r\n //stores valid rows indexes (rows visible upon filtering)\r\n this.validRowsIndex = null;\r\n //stores filters row element\r\n this.fltGridEl = null;\r\n //is first load boolean\r\n this.isFirstLoad = true;\r\n //container div for paging elements, reset btn etc.\r\n this.infDiv = null;\r\n //div for rows counter\r\n this.lDiv = null;\r\n //div for reset button and results per page select\r\n this.rDiv = null;\r\n //div for paging elements\r\n this.mDiv = null;\r\n\r\n //defines css class for div containing paging elements, rows counter etc\r\n this.infDivCssClass = f.inf_div_css_class || 'inf';\r\n //defines css class for left div\r\n this.lDivCssClass = f.left_div_css_class || 'ldiv';\r\n //defines css class for right div\r\n this.rDivCssClass = f.right_div_css_class || 'rdiv';\r\n //defines css class for mid div\r\n this.mDivCssClass = f.middle_div_css_class || 'mdiv';\r\n //table container div css class\r\n this.contDivCssClass = f.content_div_css_class || 'cont';\r\n\r\n /*** filters' grid appearance ***/\r\n //stylesheet file\r\n this.stylePath = f.style_path || this.basePath + 'style/';\r\n this.stylesheet = f.stylesheet || this.stylePath+'tablefilter.css';\r\n this.stylesheetId = this.id + '_style';\r\n //defines css class for filters row\r\n this.fltsRowCssClass = f.flts_row_css_class || 'fltrow';\r\n //enables/disables icons (paging, reset button)\r\n this.enableIcons = f.enable_icons===false ? false : true;\r\n //enables/disbles rows alternating bg colors\r\n this.alternateBgs = Boolean(f.alternate_rows);\r\n //defines widths of columns\r\n this.hasColWidths = Types.isArray(f.col_widths);\r\n this.colWidths = this.hasColWidths ? f.col_widths : null;\r\n //defines css class for filters\r\n this.fltCssClass = f.flt_css_class || 'flt';\r\n //defines css class for multiple selects filters\r\n this.fltMultiCssClass = f.flt_multi_css_class || 'flt_multi';\r\n //defines css class for filters\r\n this.fltSmallCssClass = f.flt_small_css_class || 'flt_s';\r\n //defines css class for single-filter\r\n this.singleFltCssClass = f.single_flt_css_class || 'single_flt';\r\n\r\n /*** filters' grid behaviours ***/\r\n //enables/disables enter key\r\n this.enterKey = f.enter_key===false ? false : true;\r\n //calls function before filtering starts\r\n this.onBeforeFilter = Types.isFn(f.on_before_filter) ?\r\n f.on_before_filter : null;\r\n //calls function after filtering\r\n this.onAfterFilter = Types.isFn(f.on_after_filter) ?\r\n f.on_after_filter : null;\r\n //enables/disables case sensitivity\r\n this.caseSensitive = Boolean(f.case_sensitive);\r\n //enables/disbles exact match for search\r\n this.exactMatch = Boolean(f.exact_match);\r\n //refreshes drop-down lists upon validation\r\n this.linkedFilters = Boolean(f.linked_filters);\r\n //wheter excluded options are disabled\r\n this.disableExcludedOptions = Boolean(f.disable_excluded_options);\r\n //stores active filter element\r\n this.activeFlt = null;\r\n //id of active filter\r\n this.activeFilterId = null;\r\n //enables always visible rows\r\n this.hasVisibleRows = Boolean(f.rows_always_visible);\r\n //array containing always visible rows\r\n this.visibleRows = this.hasVisibleRows ? f.rows_always_visible : [];\r\n //enables/disables external filters generation\r\n this.isExternalFlt = Boolean(f.external_flt_grid);\r\n //array containing ids of external elements containing filters\r\n this.externalFltTgtIds = f.external_flt_grid_ids || null;\r\n //stores filters elements if isExternalFlt is true\r\n this.externalFltEls = [];\r\n //delays any filtering process if loader true\r\n this.execDelay = !isNaN(f.exec_delay) ? parseInt(f.exec_delay,10) : 100;\r\n //calls function when filters grid loaded\r\n this.onFiltersLoaded = Types.isFn(f.on_filters_loaded) ?\r\n f.on_filters_loaded : null;\r\n //enables/disables single filter search\r\n this.singleSearchFlt = Boolean(f.single_search_filter);\r\n //calls function after row is validated\r\n this.onRowValidated = Types.isFn(f.on_row_validated) ?\r\n f.on_row_validated : null;\r\n //array defining columns for customCellData event\r\n this.customCellDataCols = f.custom_cell_data_cols ?\r\n f.custom_cell_data_cols : [];\r\n //calls custom function for retrieving cell data\r\n this.customCellData = Types.isFn(f.custom_cell_data) ?\r\n f.custom_cell_data : null;\r\n //input watermark text array\r\n this.watermark = f.watermark || '';\r\n this.isWatermarkArray = Types.isArray(this.watermark);\r\n //id of toolbar container element\r\n this.toolBarTgtId = f.toolbar_target_id || null;\r\n //enables/disables help div\r\n this.helpInstructions = Types.isUndef(f.help_instructions) ?\r\n undefined : Boolean(f.help_instructions);\r\n //popup filters\r\n this.popUpFilters = Boolean(f.popup_filters);\r\n //active columns color\r\n this.markActiveColumns = Boolean(f.mark_active_columns);\r\n //defines css class for active column header\r\n this.activeColumnsCssClass = f.active_columns_css_class ||\r\n 'activeHeader';\r\n //calls function before active column header is marked\r\n this.onBeforeActiveColumn = Types.isFn(f.on_before_active_column) ?\r\n f.on_before_active_column : null;\r\n //calls function after active column header is marked\r\n this.onAfterActiveColumn = Types.isFn(f.on_after_active_column) ?\r\n f.on_after_active_column : null;\r\n\r\n /*** select filter's customisation and behaviours ***/\r\n //defines 1st option text\r\n this.displayAllText = f.display_all_text || 'Clear';\r\n //enables/disables empty option in combo-box filters\r\n this.enableEmptyOption = Boolean(f.enable_empty_option);\r\n //defines empty option text\r\n this.emptyText = f.empty_text || '(Empty)';\r\n //enables/disables non empty option in combo-box filters\r\n this.enableNonEmptyOption = Boolean(f.enable_non_empty_option);\r\n //defines empty option text\r\n this.nonEmptyText = f.non_empty_text || '(Non empty)';\r\n //enables/disables onChange event on combo-box\r\n this.onSlcChange = f.on_change===false ? false : true;\r\n //enables/disables select options sorting\r\n this.sortSlc = f.sort_select===false ? false : true;\r\n //enables/disables ascending numeric options sorting\r\n this.isSortNumAsc = Boolean(f.sort_num_asc);\r\n this.sortNumAsc = this.isSortNumAsc ? f.sort_num_asc : null;\r\n //enables/disables descending numeric options sorting\r\n this.isSortNumDesc = Boolean(f.sort_num_desc);\r\n this.sortNumDesc = this.isSortNumDesc ? f.sort_num_desc : null;\r\n //enabled selects are populated on demand\r\n this.fillSlcOnDemand = Boolean(f.fill_slc_on_demand);\r\n this.hasCustomOptions = Types.isObj(f.custom_options);\r\n this.customOptions = f.custom_options;\r\n\r\n /*** Filter operators ***/\r\n this.rgxOperator = f.regexp_operator || 'rgx:';\r\n this.emOperator = f.empty_operator || '[empty]';\r\n this.nmOperator = f.nonempty_operator || '[nonempty]';\r\n this.orOperator = f.or_operator || '||';\r\n this.anOperator = f.and_operator || '&&';\r\n this.grOperator = f.greater_operator || '>';\r\n this.lwOperator = f.lower_operator || '<';\r\n this.leOperator = f.lower_equal_operator || '<=';\r\n this.geOperator = f.greater_equal_operator || '>=';\r\n this.dfOperator = f.different_operator || '!';\r\n this.lkOperator = f.like_operator || '*';\r\n this.eqOperator = f.equal_operator || '=';\r\n this.stOperator = f.start_with_operator || '{';\r\n this.enOperator = f.end_with_operator || '}';\r\n this.curExp = f.cur_exp || '^[¥£€$]';\r\n this.separator = f.separator || ',';\r\n\r\n /*** rows counter ***/\r\n //show/hides rows counter\r\n this.rowsCounter = Boolean(f.rows_counter);\r\n\r\n /*** status bar ***/\r\n //show/hides status bar\r\n this.statusBar = Boolean(f.status_bar);\r\n\r\n /*** loader ***/\r\n //enables/disables loader/spinner indicator\r\n this.loader = Boolean(f.loader);\r\n\r\n /*** validation - reset buttons/links ***/\r\n //show/hides filter's validation button\r\n this.displayBtn = Boolean(f.btn);\r\n //defines validation button text\r\n this.btnText = f.btn_text || (!this.enableIcons ? 'Go' : '');\r\n //defines css class for validation button\r\n this.btnCssClass = f.btn_css_class ||\r\n (!this.enableIcons ? 'btnflt' : 'btnflt_icon');\r\n //show/hides reset link\r\n this.btnReset = Boolean(f.btn_reset);\r\n //defines css class for reset button\r\n this.btnResetCssClass = f.btn_reset_css_class || 'reset';\r\n //callback function before filters are cleared\r\n this.onBeforeReset = Types.isFn(f.on_before_reset) ?\r\n f.on_before_reset : null;\r\n //callback function after filters are cleared\r\n this.onAfterReset = Types.isFn(f.on_after_reset) ?\r\n f.on_after_reset : null;\r\n\r\n /*** paging ***/\r\n //enables/disables table paging\r\n this.paging = Boolean(f.paging);\r\n this.nbVisibleRows = 0; //nb visible rows\r\n this.nbHiddenRows = 0; //nb hidden rows\r\n\r\n /*** autofilter on typing ***/\r\n //enables/disables auto filtering, table is filtered when user stops\r\n //typing\r\n this.autoFilter = Boolean(f.auto_filter);\r\n //onkeyup delay timer (msecs)\r\n this.autoFilterDelay = !isNaN(f.auto_filter_delay) ?\r\n f.auto_filter_delay : 900;\r\n //typing indicator\r\n this.isUserTyping = null;\r\n this.autoFilterTimer = null;\r\n\r\n /*** keyword highlighting ***/\r\n //enables/disables keyword highlighting\r\n this.highlightKeywords = Boolean(f.highlight_keywords);\r\n\r\n /*** data types ***/\r\n //defines default date type (european DMY)\r\n this.defaultDateType = f.default_date_type || 'DMY';\r\n //defines default thousands separator\r\n //US = ',' EU = '.'\r\n this.thousandsSeparator = f.thousands_separator || ',';\r\n //defines default decimal separator\r\n //US & javascript = '.' EU = ','\r\n this.decimalSeparator = f.decimal_separator || '.';\r\n //enables number format per column\r\n this.hasColNbFormat = Types.isArray(f.col_number_format);\r\n //array containing columns nb formats\r\n this.colNbFormat = this.hasColNbFormat ? f.col_number_format : null;\r\n //enables date type per column\r\n this.hasColDateType = Types.isArray(f.col_date_type);\r\n //array containing columns date type\r\n this.colDateType = this.hasColDateType ? f.col_date_type : null;\r\n\r\n /*** status messages ***/\r\n //filtering\r\n this.msgFilter = f.msg_filter || 'Filtering data...';\r\n //populating drop-downs\r\n this.msgPopulate = f.msg_populate || 'Populating filter...';\r\n //populating drop-downs\r\n this.msgPopulateCheckList = f.msg_populate_checklist ||\r\n 'Populating list...';\r\n //changing paging page\r\n this.msgChangePage = f.msg_change_page || 'Collecting paging data...';\r\n //clearing filters\r\n this.msgClear = f.msg_clear || 'Clearing filters...';\r\n //changing nb results/page\r\n this.msgChangeResults = f.msg_change_results ||\r\n 'Changing results per page...';\r\n //re-setting grid values\r\n this.msgResetValues = f.msg_reset_grid_values ||\r\n 'Re-setting filters values...';\r\n //re-setting page\r\n this.msgResetPage = f.msg_reset_page || 'Re-setting page...';\r\n //re-setting page length\r\n this.msgResetPageLength = f.msg_reset_page_length ||\r\n 'Re-setting page length...';\r\n //table sorting\r\n this.msgSort = f.msg_sort || 'Sorting data...';\r\n //extensions loading\r\n this.msgLoadExtensions = f.msg_load_extensions ||\r\n 'Loading extensions...';\r\n //themes loading\r\n this.msgLoadThemes = f.msg_load_themes || 'Loading theme(s)...';\r\n\r\n /*** ids prefixes ***/\r\n //css class name added to table\r\n this.prfxTf = 'TF';\r\n //filters (inputs - selects)\r\n this.prfxFlt = 'flt';\r\n //validation button\r\n this.prfxValButton = 'btn';\r\n //container div for paging elements, rows counter etc.\r\n this.prfxInfDiv = 'inf_';\r\n //left div\r\n this.prfxLDiv = 'ldiv_';\r\n //right div\r\n this.prfxRDiv = 'rdiv_';\r\n //middle div\r\n this.prfxMDiv = 'mdiv_';\r\n //filter values cookie\r\n this.prfxCookieFltsValues = 'tf_flts_';\r\n //page nb cookie\r\n this.prfxCookiePageNb = 'tf_pgnb_';\r\n //page length cookie\r\n this.prfxCookiePageLen = 'tf_pglen_';\r\n\r\n /*** cookies ***/\r\n this.hasStoredValues = false;\r\n //remembers filters values on page load\r\n this.rememberGridValues = Boolean(f.remember_grid_values);\r\n //cookie storing filter values\r\n this.fltsValuesCookie = this.prfxCookieFltsValues + this.id;\r\n //remembers page nb on page load\r\n this.rememberPageNb = this.paging && f.remember_page_number;\r\n //cookie storing page nb\r\n this.pgNbCookie = this.prfxCookiePageNb + this.id;\r\n //remembers page length on page load\r\n this.rememberPageLen = this.paging && f.remember_page_length;\r\n //cookie storing page length\r\n this.pgLenCookie = this.prfxCookiePageLen + this.id;\r\n\r\n /*** extensions ***/\r\n //imports external script\r\n this.extensions = f.extensions;\r\n this.hasExtensions = Types.isArray(this.extensions);\r\n\r\n /*** themes ***/\r\n this.enableDefaultTheme = Boolean(f.enable_default_theme);\r\n //imports themes\r\n this.hasThemes = (this.enableDefaultTheme || Types.isArray(f.themes));\r\n this.themes = f.themes || [];\r\n //themes path\r\n this.themesPath = f.themes_path || this.stylePath + 'themes/';\r\n\r\n // Features registry\r\n this.Mod = {};\r\n\r\n // Extensions registry\r\n this.ExtRegistry = {};\r\n\r\n /*** TF events ***/\r\n this.Evt = {\r\n name: {\r\n filter: 'Filter',\r\n dropdown: 'DropDown',\r\n checklist: 'CheckList',\r\n changepage: 'ChangePage',\r\n clear: 'Clear',\r\n changeresultsperpage: 'ChangeResults',\r\n resetvalues: 'ResetValues',\r\n resetpage: 'ResetPage',\r\n resetpagelength: 'ResetPageLength',\r\n loadextensions: 'LoadExtensions',\r\n loadthemes: 'LoadThemes'\r\n },\r\n\r\n // Detect <enter> key\r\n detectKey(e) {\r\n if(!this.enterKey){ return; }\r\n let _ev = e || global.event;\r\n if(_ev){\r\n let key = Event.keyCode(_ev);\r\n if(key===13){\r\n this.filter();\r\n Event.cancel(_ev);\r\n Event.stop(_ev);\r\n } else {\r\n this.isUserTyping = true;\r\n global.clearInterval(this.autoFilterTimer);\r\n this.autoFilterTimer = null;\r\n }\r\n }\r\n },\r\n // if auto-filter on, detect user is typing and filter columns\r\n onKeyUp(e) {\r\n if(!this.autoFilter){\r\n return;\r\n }\r\n let _ev = e || global.event;\r\n let key = Event.keyCode(_ev);\r\n this.isUserTyping = false;\r\n\r\n function filter() {\r\n /*jshint validthis:true */\r\n global.clearInterval(this.autoFilterTimer);\r\n this.autoFilterTimer = null;\r\n if(!this.isUserTyping){\r\n this.filter();\r\n this.isUserTyping = null;\r\n }\r\n }\r\n\r\n if(key!==13 && key!==9 && key!==27 && key!==38 && key!==40) {\r\n if(this.autoFilterTimer === null){\r\n this.autoFilterTimer = global.setInterval(\r\n filter.bind(this), this.autoFilterDelay);\r\n }\r\n } else {\r\n global.clearInterval(this.autoFilterTimer);\r\n this.autoFilterTimer = null;\r\n }\r\n },\r\n // if auto-filter on, detect user is typing\r\n onKeyDown() {\r\n if(!this.autoFilter) { return; }\r\n this.isUserTyping = true;\r\n },\r\n // if auto-filter on, clear interval on filter blur\r\n onInpBlur() {\r\n if(this.autoFilter){\r\n this.isUserTyping = false;\r\n global.clearInterval(this.autoFilterTimer);\r\n }\r\n // TODO: hack to prevent ezEditTable enter key event hijaking.\r\n // Needs to be fixed in the vendor's library\r\n if(this.hasExtension('advancedGrid')){\r\n var advGrid = this.extension('advancedGrid');\r\n var ezEditTable = advGrid._ezEditTable;\r\n if(advGrid.cfg.editable){\r\n ezEditTable.Editable.Set();\r\n }\r\n if(advGrid.cfg.selection){\r\n ezEditTable.Selection.Set();\r\n }\r\n }\r\n },\r\n // set focused text-box filter as active\r\n onInpFocus(e) {\r\n let _ev = e || global.event;\r\n let elm = Event.target(_ev);\r\n this.activeFilterId = elm.getAttribute('id');\r\n this.activeFlt = Dom.id(this.activeFilterId);\r\n if(this.popUpFilters){\r\n Event.cancel(_ev);\r\n Event.stop(_ev);\r\n }\r\n // TODO: hack to prevent ezEditTable enter key event hijaking.\r\n // Needs to be fixed in the vendor's library\r\n if(this.hasExtension('advancedGrid')){\r\n var advGrid = this.extension('advancedGrid');\r\n var ezEditTable = advGrid._ezEditTable;\r\n if(advGrid.cfg.editable){\r\n ezEditTable.Editable.Remove();\r\n }\r\n if(advGrid.cfg.selection){\r\n ezEditTable.Selection.Remove();\r\n }\r\n }\r\n },\r\n // set focused drop-down filter as active\r\n onSlcFocus(e) {\r\n let _ev = e || global.event;\r\n let elm = Event.target(_ev);\r\n this.activeFilterId = elm.getAttribute('id');\r\n this.activeFlt = Dom.id(this.activeFilterId);\r\n // select is populated when element has focus\r\n if(this.fillSlcOnDemand && elm.getAttribute('filled') === '0'){\r\n let ct = elm.getAttribute('ct');\r\n this.Mod.dropdown._build(ct);\r\n }\r\n if(this.popUpFilters){\r\n Event.cancel(_ev);\r\n Event.stop(_ev);\r\n }\r\n },\r\n // filter columns on drop-down filter change\r\n onSlcChange(e) {\r\n if(!this.activeFlt){ return; }\r\n let _ev = e || global.event;\r\n if(this.popUpFilters){ Event.stop(_ev); }\r\n if(this.onSlcChange){ this.filter(); }\r\n },\r\n // fill checklist filter on click if required\r\n onCheckListClick(e) {\r\n let _ev = e || global.event;\r\n let elm = Event.target(_ev);\r\n if(this.fillSlcOnDemand && elm.getAttribute('filled') === '0'){\r\n let ct = elm.getAttribute('ct');\r\n this.Mod.checkList._build(ct);\r\n this.Mod.checkList.checkListDiv[ct].onclick = null;\r\n this.Mod.checkList.checkListDiv[ct].title = '';\r\n }\r\n },\r\n // filter when validation button clicked\r\n onBtnClick() {\r\n this.filter();\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Initialise filtering grid bar behaviours and layout\r\n *\r\n * TODO: decompose in smaller methods\r\n */\r\n init(){\r\n if(this._hasGrid){\r\n return;\r\n }\r\n if(!this.tbl){\r\n this.tbl = Dom.id(this.id);\r\n }\r\n if(this.gridLayout){\r\n this.refRow = this.startRow===null ? 0 : this.startRow;\r\n }\r\n if(this.popUpFilters &&\r\n ((this.filtersRowIndex === 0 && this.headersRow === 1) ||\r\n this.gridLayout)){\r\n this.headersRow = 0;\r\n }\r\n\r\n let Mod = this.Mod;\r\n let n = this.singleSearchFlt ? 1 : this.nbCells,\r\n inpclass;\r\n\r\n //loads stylesheet if not imported\r\n this.import(this.stylesheetId, this.stylesheet, null, 'link');\r\n\r\n //loads theme\r\n if(this.hasThemes){ this._loadThemes(); }\r\n\r\n if(this.rememberGridValues || this.rememberPageNb ||\r\n this.rememberPageLen){\r\n Mod.store = new Store(this);\r\n }\r\n\r\n if(this.gridLayout){\r\n Mod.gridLayout = new GridLayout(this);\r\n Mod.gridLayout.init();\r\n }\r\n\r\n if(this.loader){\r\n if(!Mod.loader){\r\n Mod.loader = new Loader(this);\r\n }\r\n }\r\n\r\n if(this.highlightKeywords){\r\n Mod.highlightKeyword = new HighlightKeyword(this);\r\n }\r\n\r\n if(this.popUpFilters){\r\n if(!Mod.popupFilter){\r\n Mod.popupFilter = new PopupFilter(this);\r\n }\r\n Mod.popupFilter.init();\r\n }\r\n\r\n //filters grid is not generated\r\n if(!this.fltGrid){\r\n this.refRow = this.refRow-1;\r\n if(this.gridLayout){\r\n this.refRow = 0;\r\n }\r\n this.nbFilterableRows = this.getRowsNb();\r\n this.nbVisibleRows = this.nbFilterableRows;\r\n this.nbRows = this.nbFilterableRows + this.refRow;\r\n } else {\r\n if(this.isFirstLoad){\r\n let fltrow;\r\n if(!this.gridLayout){\r\n let thead = Dom.tag(this.tbl, 'thead');\r\n if(thead.length > 0){\r\n fltrow = thead[0].insertRow(this.filtersRowIndex);\r\n } else {\r\n fltrow = this.tbl.insertRow(this.filtersRowIndex);\r\n }\r\n\r\n if(this.headersRow > 1 &&\r\n this.filtersRowIndex <= this.headersRow &&\r\n !this.popUpFilters){\r\n this.headersRow++;\r\n }\r\n if(this.popUpFilters){\r\n this.headersRow++;\r\n }\r\n\r\n fltrow.className = this.fltsRowCssClass;\r\n //Disable for grid_layout\r\n if(this.isExternalFlt &&\r\n (!this.gridLayout || this.popUpFilters)){\r\n fltrow.style.display = 'none';\r\n }\r\n }\r\n\r\n this.nbFilterableRows = this.getRowsNb();\r\n this.nbVisibleRows = this.nbFilterableRows;\r\n this.nbRows = this.tbl.rows.length;\r\n\r\n for(let i=0; i<n; i++){// this loop adds filters\r\n\r\n if(this.popUpFilters){\r\n Mod.popupFilter.build(i);\r\n }\r\n\r\n let fltcell = Dom.create(this.fltCellTag),\r\n col = this.getFilterType(i),\r\n externalFltTgtId =\r\n this.isExternalFlt && this.externalFltTgtIds ?\r\n this.externalFltTgtIds[i] : null;\r\n\r\n if(this.singleSearchFlt){\r\n fltcell.colSpan = this.nbCells;\r\n }\r\n if(!this.gridLayout){\r\n fltrow.appendChild(fltcell);\r\n }\r\n inpclass = (i==n-1 && this.displayBtn) ?\r\n this.fltSmallCssClass : this.fltCssClass;\r\n\r\n //only 1 input for single search\r\n if(this.singleSearchFlt){\r\n col = this.fltTypeInp;\r\n inpclass = this.singleFltCssClass;\r\n }\r\n\r\n //drop-down filters\r\n if(col===this.fltTypeSlc || col===this.fltTypeMulti){\r\n if(!Mod.dropdown){\r\n Mod.dropdown = new Dropdown(this);\r\n }\r\n let dropdown = Mod.dropdown;\r\n\r\n let slc = Dom.create(this.fltTypeSlc,\r\n ['id', this.prfxFlt+i+'_'+this.id],\r\n ['ct', i], ['filled', '0']\r\n );\r\n\r\n if(col===this.fltTypeMulti){\r\n slc.multiple = this.fltTypeMulti;\r\n slc.title = dropdown.multipleSlcTooltip;\r\n }\r\n slc.className = Str.lower(col)===this.fltTypeSlc ?\r\n inpclass : this.fltMultiCssClass;// for ie<=6\r\n\r\n //filter is appended in desired external element\r\n if(externalFltTgtId){\r\n Dom.id(externalFltTgtId).appendChild(slc);\r\n this.externalFltEls.push(slc);\r\n } else {\r\n fltcell.appendChild(slc);\r\n }\r\n\r\n this.fltIds.push(this.prfxFlt+i+'_'+this.id);\r\n\r\n if(!this.fillSlcOnDemand){\r\n dropdown._build(i);\r\n }\r\n\r\n Event.add(slc, 'keypress',\r\n this.Evt.detectKey.bind(this));\r\n Event.add(slc, 'change',\r\n this.Evt.onSlcChange.bind(this));\r\n Event.add(slc, 'focus', this.Evt.onSlcFocus.bind(this));\r\n\r\n //1st option is created here since dropdown.build isn't\r\n //invoked\r\n if(this.fillSlcOnDemand){\r\n let opt0 = Dom.createOpt(this.displayAllText, '');\r\n slc.appendChild(opt0);\r\n }\r\n }\r\n // checklist\r\n else if(col===this.fltTypeCheckList){\r\n let checkList;\r\n Mod.checkList = new CheckList(this);\r\n checkList = Mod.checkList;\r\n\r\n let divCont = Dom.create('div',\r\n ['id', checkList.prfxCheckListDiv+i+'_'+this.id],\r\n ['ct', i], ['filled', '0']);\r\n divCont.className = checkList.checkListDivCssClass;\r\n\r\n //filter is appended in desired element\r\n if(externalFltTgtId){\r\n Dom.id(externalFltTgtId).appendChild(divCont);\r\n this.externalFltEls.push(divCont);\r\n } else {\r\n fltcell.appendChild(divCont);\r\n }\r\n\r\n checkList.checkListDiv[i] = divCont;\r\n this.fltIds.push(this.prfxFlt+i+'_'+this.id);\r\n if(!this.fillSlcOnDemand){\r\n checkList._build(i);\r\n }\r\n\r\n if(this.fillSlcOnDemand){\r\n Event.add(divCont, 'click',\r\n this.Evt.onCheckListClick.bind(this));\r\n divCont.appendChild(\r\n Dom.text(checkList.activateCheckListTxt));\r\n }\r\n }\r\n\r\n else{\r\n //show/hide input\r\n let inptype = col===this.fltTypeInp ? 'text' : 'hidden';\r\n let inp = Dom.create(this.fltTypeInp,\r\n ['id',this.prfxFlt+i+'_'+this.id],\r\n ['type',inptype], ['ct',i]);\r\n if(inptype!=='hidden' && this.watermark){\r\n inp.setAttribute(\r\n 'placeholder',\r\n this.isWatermarkArray ?\r\n (this.watermark[i] || '') : this.watermark\r\n );\r\n }\r\n inp.className = inpclass;\r\n Event.add(inp, 'focus', this.Evt.onInpFocus.bind(this));\r\n\r\n //filter is appended in desired element\r\n if(externalFltTgtId){\r\n Dom.id(externalFltTgtId).appendChild(inp);\r\n this.externalFltEls.push(inp);\r\n } else {\r\n fltcell.appendChild(inp);\r\n }\r\n\r\n this.fltIds.push(this.prfxFlt+i+'_'+this.id);\r\n\r\n Event.add(inp, 'keypress',\r\n this.Evt.detectKey.bind(this));\r\n Event.add(inp, 'keydown',\r\n this.Evt.onKeyDown.bind(this));\r\n Event.add(inp, 'keyup', this.Evt.onKeyUp.bind(this));\r\n Event.add(inp, 'blur', this.Evt.onInpBlur.bind(this));\r\n\r\n if(this.rememberGridValues){\r\n let flts_values = this.Mod.store.getFilterValues(\r\n this.fltsValuesCookie);\r\n if(flts_values[i]!=' '){\r\n this.setFilterValue(i, flts_values[i], false);\r\n }\r\n }\r\n }\r\n // this adds submit button\r\n if(i==n-1 && this.displayBtn){\r\n let btn = Dom.create(this.fltTypeInp,\r\n ['id',this.prfxValButton+i+'_'+this.id],\r\n ['type','button'], ['value',this.btnText]);\r\n btn.className = this.btnCssClass;\r\n\r\n //filter is appended in desired element\r\n if(externalFltTgtId){\r\n Dom.id(externalFltTgtId).appendChild(btn);\r\n } else{\r\n fltcell.appendChild(btn);\r\n }\r\n\r\n Event.add(btn, 'click', this.Evt.onBtnClick.bind(this));\r\n }//if\r\n\r\n }// for i\r\n\r\n } else {\r\n this._resetGrid();\r\n }//if isFirstLoad\r\n\r\n }//if this.fltGrid\r\n\r\n /* Filter behaviours */\r\n if(this.hasVisibleRows){\r\n this.enforceVisibility();\r\n }\r\n if(this.rowsCounter){\r\n Mod.rowsCounter = new RowsCounter(this);\r\n Mod.rowsCounter.init();\r\n }\r\n if(this.statusBar){\r\n Mod.statusBar = new StatusBar(this);\r\n Mod.statusBar.init();\r\n }\r\n if(this.paging || Mod.paging){\r\n if(!Mod.paging){\r\n Mod.paging = new Paging(this);\r\n }\r\n\r\n // TODO: handle both cases in paging init\r\n if(Mod.paging.isPagingRemoved){\r\n Mod.paging.reset();\r\n } else {\r\n Mod.paging.init();\r\n }\r\n }\r\n if(this.btnReset){\r\n Mod.clearButton = new ClearButton(this);\r\n Mod.clearButton.init();\r\n }\r\n if(this.helpInstructions){\r\n if(!Mod.help){\r\n Mod.help = new Help(this);\r\n }\r\n Mod.help.init();\r\n }\r\n if(this.hasColWidths && !this.gridLayout){\r\n this.setColWidths();\r\n }\r\n if(this.alternateBgs){\r\n Mod.alternateRows = new AlternateRows(this);\r\n Mod.alternateRows.init();\r\n }\r\n\r\n this.isFirstLoad = false;\r\n this._hasGrid = true;\r\n\r\n if(this.rememberGridValues || this.rememberPageLen ||\r\n this.rememberPageNb){\r\n this.resetValues();\r\n }\r\n\r\n //TF css class is added to table\r\n if(!this.gridLayout){\r\n Dom.addClass(this.tbl, this.prfxTf);\r\n }\r\n\r\n if(this.loader){\r\n Mod.loader.show('none');\r\n }\r\n\r\n /* Loads extensions */\r\n if(this.hasExtensions){\r\n this.initExtensions();\r\n }\r\n\r\n if(this.onFiltersLoaded){\r\n this.onFiltersLoaded.call(null, this);\r\n }\r\n }\r\n\r\n /**\r\n * Manages state messages\r\n * @param {String} evt Event name\r\n * @param {Object} cfg Config object\r\n */\r\n EvtManager(evt,\r\n cfg={ slcIndex: null, slcExternal: false, slcId: null, pgIndex: null }){\r\n let slcIndex = cfg.slcIndex;\r\n let slcExternal = cfg.slcExternal;\r\n let slcId = cfg.slcId;\r\n let pgIndex = cfg.pgIndex;\r\n let cpt = this.Mod;\r\n\r\n function efx(){\r\n /*jshint validthis:true */\r\n let ev = this.Evt.name;\r\n\r\n switch(evt){\r\n case ev.filter:\r\n this._filter();\r\n break;\r\n case ev.dropdown:\r\n if(this.linkedFilters){\r\n cpt.dropdown._build(slcIndex, true);\r\n } else {\r\n cpt.dropdown._build(\r\n slcIndex, false, slcExternal, slcId);\r\n }\r\n break;\r\n case ev.checklist:\r\n cpt.checkList._build(slcIndex, slcExternal, slcId);\r\n break;\r\n case ev.changepage:\r\n cpt.paging._changePage(pgIndex);\r\n break;\r\n case ev.clear:\r\n this._clearFilters();\r\n this._filter();\r\n break;\r\n case ev.changeresultsperpage:\r\n cpt.paging._changeResultsPerPage();\r\n break;\r\n case ev.resetvalues:\r\n this._resetValues();\r\n this._filter();\r\n break;\r\n case ev.resetpage:\r\n cpt.paging._resetPage(this.pgNbCookie);\r\n break;\r\n case ev.resetpagelength:\r\n cpt.paging._resetPageLength(this.pgLenCookie);\r\n break;\r\n case ev.loadextensions:\r\n this._loadExtensions();\r\n break;\r\n case ev.loadthemes:\r\n this._loadThemes();\r\n break;\r\n }\r\n if(this.statusBar){\r\n cpt.statusBar.message('');\r\n }\r\n if(this.loader){\r\n cpt.loader.show('none');\r\n }\r\n }\r\n\r\n if(!this.loader && !this.statusBar && !this.linkedFilters) {\r\n efx.call(this);\r\n } else {\r\n if(this.loader){\r\n cpt.loader.show('');\r\n }\r\n if(this.statusBar){\r\n cpt.statusBar.message(this['msg'+evt]);\r\n }\r\n global.setTimeout(efx.bind(this), this.execDelay);\r\n }\r\n }\r\n\r\n /**\r\n * Return a feature instance for a given name\r\n * @param {String} name Name of the feature\r\n * @return {Object}\r\n */\r\n feature(name){\r\n return this.Mod[name];\r\n }\r\n\r\n /**\r\n * Initialise all the extensions defined in the configuration object\r\n */\r\n initExtensions(){\r\n let exts = this.extensions;\r\n\r\n for(let i=0, len=exts.length; i<len; i++){\r\n let ext = exts[i];\r\n if(!this.ExtRegistry[ext.name]){\r\n this.loadExtension(ext);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Load an extension module\r\n * @param {Object} ext Extension config object\r\n */\r\n loadExtension(ext){\r\n if(!ext || !ext.name){\r\n return;\r\n }\r\n\r\n let name = ext.name;\r\n let path = ext.path;\r\n let modulePath;\r\n\r\n if(name && path){\r\n modulePath = ext.path + name;\r\n } else {\r\n name = name.replace('.js', '');\r\n modulePath = 'extensions/{}/{}'.replace(/{}/g, name);\r\n }\r\n\r\n require(['./' + modulePath], (mod)=> {\r\n let inst = new mod(this, ext);\r\n inst.init();\r\n this.ExtRegistry[name] = inst;\r\n });\r\n }\r\n\r\n /**\r\n * Get an extension instance\r\n * @param {String} name Name of the extension\r\n * @return {Object} Extension instance\r\n */\r\n extension(name){\r\n return this.ExtRegistry[name];\r\n }\r\n\r\n /**\r\n * Check passed extension name exists\r\n * @param {String} name Name of the extension\r\n * @return {Boolean}\r\n */\r\n hasExtension(name){\r\n return !Types.isEmpty(this.ExtRegistry[name]);\r\n }\r\n\r\n /**\r\n * Destroy all the extensions defined in the configuration object\r\n */\r\n destroyExtensions(){\r\n let exts = this.extensions;\r\n\r\n for(let i=0, len=exts.length; i<len; i++){\r\n let ext = exts[i];\r\n let extInstance = this.ExtRegistry[ext.name];\r\n if(extInstance){\r\n extInstance.destroy();\r\n this.ExtRegistry[ext.name] = null;\r\n }\r\n }\r\n }\r\n\r\n loadThemes(){\r\n this.EvtManager(this.Evt.name.loadthemes);\r\n }\r\n\r\n /**\r\n * Load themes defined in the configuration object\r\n */\r\n _loadThemes(){\r\n let themes = this.themes;\r\n //Default theme config\r\n if(this.enableDefaultTheme){\r\n let defaultTheme = { name: 'default' };\r\n this.themes.push(defaultTheme);\r\n }\r\n if(Types.isArray(themes)){\r\n for(let i=0, len=themes.length; i<len; i++){\r\n let theme = themes[i];\r\n let name = theme.name;\r\n let path = theme.path;\r\n let styleId = this.prfxTf + name;\r\n if(name && !path){\r\n path = this.themesPath + name + '/' + name + '.css';\r\n }\r\n else if(!name && theme.path){\r\n name = 'theme{0}'.replace('{0}', i);\r\n }\r\n\r\n if(!this.isImported(path, 'link')){\r\n this.import(styleId, path, null, 'link');\r\n }\r\n }\r\n }\r\n\r\n //Some elements need to be overriden for default theme\r\n //Reset button\r\n this.btnResetText = null;\r\n this.btnResetHtml = '<input type=\"button\" value=\"\" class=\"' +\r\n this.btnResetCssClass+'\" title=\"Clear filters\" />';\r\n\r\n //Paging buttons\r\n this.btnPrevPageHtml = '<input type=\"button\" value=\"\" class=\"' +\r\n this.btnPageCssClass+' previousPage\" title=\"Previous page\" />';\r\n this.btnNextPageHtml = '<input type=\"button\" value=\"\" class=\"' +\r\n this.btnPageCssClass+' nextPage\" title=\"Next page\" />';\r\n this.btnFirstPageHtml = '<input type=\"button\" value=\"\" class=\"' +\r\n this.btnPageCssClass+' firstPage\" title=\"First page\" />';\r\n this.btnLastPageHtml = '<input type=\"button\" value=\"\" class=\"' +\r\n this.btnPageCssClass+' lastPage\" title=\"Last page\" />';\r\n\r\n //Loader\r\n this.loader = true;\r\n this.loaderHtml = '<div class=\"defaultLoader\"></div>';\r\n this.loaderText = null;\r\n }\r\n\r\n /**\r\n * Return stylesheet DOM element for a given theme name\r\n * @return {DOMElement} stylesheet element\r\n */\r\n getStylesheet(name='default'){\r\n return Dom.id(this.prfxTf + name);\r\n }\r\n\r\n /**\r\n * Destroy filter grid\r\n */\r\n destroy(){\r\n if(!this._hasGrid){\r\n return;\r\n }\r\n let rows = this.tbl.rows,\r\n Mod = this.Mod;\r\n\r\n if(this.isExternalFlt && !this.popUpFilters){\r\n this.removeExternalFlts();\r\n }\r\n if(this.infDiv){\r\n this.removeToolbar();\r\n }\r\n if(this.highlightKeywords){\r\n Mod.highlightKeyword.unhighlightAll();\r\n }\r\n if(this.markActiveColumns){\r\n this.clearActiveColumns();\r\n }\r\n if(this.hasExtensions){\r\n this.destroyExtensions();\r\n }\r\n\r\n //this loop shows all rows and removes validRow attribute\r\n for(let j=this.refRow; j<this.nbRows; j++){\r\n rows[j].style.display = '';\r\n\r\n if(rows[j].hasAttribute('validRow')){\r\n rows[j].removeAttribute('validRow');\r\n }\r\n\r\n //removes alternating colors\r\n if(this.alternateBgs){\r\n Mod.alternateRows.removeRowBg(j);\r\n }\r\n\r\n }//for j\r\n\r\n if(this.fltGrid && !this.gridLayout){\r\n this.fltGridEl = rows[this.filtersRowIndex];\r\n this.tbl.deleteRow(this.filtersRowIndex);\r\n }\r\n\r\n // Destroy modules\r\n Object.keys(Mod).forEach(function(key) {\r\n var feature = Mod[key];\r\n if(feature && Types.isFn(feature.destroy)){\r\n feature.destroy();\r\n }\r\n });\r\n\r\n Dom.removeClass(this.tbl, this.prfxTf);\r\n this.activeFlt = null;\r\n this.isStartBgAlternate = true;\r\n this._hasGrid = false;\r\n this.tbl = null;\r\n }\r\n\r\n /**\r\n * Generate container element for paging, reset button, rows counter etc.\r\n */\r\n setToolbar(){\r\n if(this.infDiv){\r\n return;\r\n }\r\n\r\n /*** container div ***/\r\n let infdiv = Dom.create('div', ['id', this.prfxInfDiv+this.id]);\r\n infdiv.className = this.infDivCssClass;\r\n\r\n //custom container\r\n if(this.toolBarTgtId){\r\n Dom.id(this.toolBarTgtId).appendChild(infdiv);\r\n }\r\n //grid-layout\r\n else if(this.gridLayout){\r\n let gridLayout = this.Mod.gridLayout;\r\n gridLayout.tblMainCont.appendChild(infdiv);\r\n infdiv.className = gridLayout.gridInfDivCssClass;\r\n }\r\n //default location: just above the table\r\n else{\r\n var cont = Dom.create('caption');\r\n cont.appendChild(infdiv);\r\n this.tbl.insertBefore(cont, this.tbl.firstChild);\r\n }\r\n this.infDiv = Dom.id(this.prfxInfDiv+this.id);\r\n\r\n /*** left div containing rows # displayer ***/\r\n let ldiv = Dom.create('div', ['id', this.prfxLDiv+this.id]);\r\n ldiv.className = this.lDivCssClass;\r\n infdiv.appendChild(ldiv);\r\n this.lDiv = Dom.id(this.prfxLDiv+this.id);\r\n\r\n /*** right div containing reset button\r\n + nb results per page select ***/\r\n let rdiv = Dom.create('div', ['id', this.prfxRDiv+this.id]);\r\n rdiv.className = this.rDivCssClass;\r\n infdiv.appendChild(rdiv);\r\n this.rDiv = Dom.id(this.prfxRDiv+this.id);\r\n\r\n /*** mid div containing paging elements ***/\r\n let mdiv = Dom.create('div', ['id', this.prfxMDiv+this.id]);\r\n mdiv.className = this.mDivCssClass;\r\n infdiv.appendChild(mdiv);\r\n this.mDiv = Dom.id(this.prfxMDiv+this.id);\r\n\r\n // Enable help instructions by default if topbar is generated and not\r\n // explicitely set to false\r\n if(Types.isUndef(this.helpInstructions)){\r\n if(!this.Mod.help){\r\n this.Mod.help = new Help(this);\r\n }\r\n this.Mod.help.init();\r\n this.helpInstructions = true;\r\n }\r\n }\r\n\r\n /**\r\n * Remove toolbar container element\r\n */\r\n removeToolbar(){\r\n if(!this.infDiv){\r\n return;\r\n }\r\n this.infDiv.parentNode.removeChild(this.infDiv);\r\n this.infDiv = null;\r\n\r\n let tbl = this.tbl;\r\n let captions = Dom.tag(tbl, 'caption');\r\n if(captions.length > 0){\r\n [].forEach.call(captions, function(elm) {\r\n tbl.removeChild(elm);\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Remove all the external column filters\r\n */\r\n removeExternalFlts(){\r\n if(!this.isExternalFlt || !this.externalFltTgtIds){\r\n return;\r\n }\r\n let ids = this.externalFltTgtIds,\r\n len = ids.length;\r\n for(let ct=0; ct<len; ct++){\r\n let externalFltTgtId = ids[ct],\r\n externalFlt = Dom.id(externalFltTgtId);\r\n if(externalFlt){\r\n externalFlt.innerHTML = '';\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Check if given column implements a filter with custom options\r\n * @param {Number} colIndex Column's index\r\n * @return {Boolean}\r\n */\r\n isCustomOptions(colIndex) {\r\n return this.hasCustomOptions &&\r\n this.customOptions.cols.indexOf(colIndex) != -1;\r\n }\r\n\r\n /**\r\n * Returns an array [[value0, value1 ...],[text0, text1 ...]] with the\r\n * custom options values and texts\r\n * @param {Number} colIndex Column's index\r\n * @return {Array}\r\n */\r\n getCustomOptions(colIndex){\r\n if(!colIndex || !this.isCustomOptions(colIndex)){\r\n return;\r\n }\r\n\r\n let customOptions = this.customOptions;\r\n let cols = customOptions.cols;\r\n let optTxt = [], optArray = [];\r\n let index = Arr.indexByValue(cols, colIndex);\r\n let slcValues = customOptions.values[index];\r\n let slcTexts = customOptions.texts[index];\r\n let slcSort = customOptions.sorts[index];\r\n\r\n for(let r=0, len=slcValues.length; r<len; r++){\r\n optArray.push(slcValues[r]);\r\n if(slcTexts[r]){\r\n optTxt.push(slcTexts[r]);\r\n } else {\r\n optTxt.push(slcValues[r]);\r\n }\r\n }\r\n if(slcSort){\r\n optArray.sort();\r\n optTxt.sort();\r\n }\r\n return [optArray, optTxt];\r\n }\r\n\r\n resetValues(){\r\n this.EvtManager(this.Evt.name.resetvalues);\r\n }\r\n\r\n /**\r\n * Reset persisted filter values\r\n */\r\n _resetValues(){\r\n //only fillSlcOnDemand\r\n if(this.rememberGridValues && this.fillSlcOnDemand){\r\n this._resetGridValues(this.fltsValuesCookie);\r\n }\r\n if(this.rememberPageLen && this.Mod.paging){\r\n this.Mod.paging.resetPageLength(this.pgLenCookie);\r\n }\r\n if(this.rememberPageNb && this.Mod.paging){\r\n this.Mod.paging.resetPage(this.pgNbCookie);\r\n }\r\n }\r\n\r\n /**\r\n * Reset persisted filter values when load filters on demand feature is\r\n * enabled\r\n * @param {String} name cookie name storing filter values\r\n */\r\n _resetGridValues(name){\r\n if(!this.fillSlcOnDemand){\r\n return;\r\n }\r\n let fltsValues = this.Mod.store.getFilterValues(name),\r\n slcFltsIndex = this.getFiltersByType(this.fltTypeSlc, true),\r\n multiFltsIndex = this.getFiltersByType(this.fltTypeMulti, true);\r\n\r\n //if the number of columns is the same as before page reload\r\n if(Number(fltsValues[(fltsValues.length-1)]) === this.fltIds.length){\r\n for(let i=0; i<(fltsValues.length - 1); i++){\r\n if(fltsValues[i]===' '){\r\n continue;\r\n }\r\n let s, opt;\r\n let fltType = this.getFilterType(i);\r\n // if fillSlcOnDemand, drop-down needs to contain stored\r\n // value(s) for filtering\r\n if(fltType===this.fltTypeSlc || fltType===this.fltTypeMulti){\r\n let slc = Dom.id( this.fltIds[i] );\r\n slc.options[0].selected = false;\r\n\r\n //selects\r\n if(Arr.has(slcFltsIndex, i)){\r\n opt = Dom.createOpt(fltsValues[i],fltsValues[i],true);\r\n slc.appendChild(opt);\r\n this.hasStoredValues = true;\r\n }\r\n //multiple select\r\n if(Arr.has(multiFltsIndex, i)){\r\n s = fltsValues[i].split(' '+this.orOperator+' ');\r\n for(let j=0, len=s.length; j<len; j++){\r\n if(s[j]===''){\r\n continue;\r\n }\r\n opt = Dom.createOpt(s[j],s[j],true);\r\n slc.appendChild(opt);\r\n this.hasStoredValues = true;\r\n }\r\n }// if multiFltsIndex\r\n }\r\n else if(fltType===this.fltTypeCheckList){\r\n let checkList = this.Mod.checkList;\r\n let divChk = checkList.checkListDiv[i];\r\n divChk.title = divChk.innerHTML;\r\n divChk.innerHTML = '';\r\n\r\n let ul = Dom.create(\r\n 'ul',['id',this.fltIds[i]],['colIndex',i]);\r\n ul.className = checkList.checkListCssClass;\r\n\r\n let li0 = Dom.createCheckItem(\r\n this.fltIds[i]+'_0', '', this.displayAllText);\r\n li0.className = checkList.checkListItemCssClass;\r\n ul.appendChild(li0);\r\n\r\n divChk.appendChild(ul);\r\n\r\n s = fltsValues[i].split(' '+this.orOperator+' ');\r\n for(let j=0, len=s.length; j<len; j++){\r\n if(s[j]===''){\r\n continue;\r\n }\r\n let li = Dom.createCheckItem(\r\n this.fltIds[i]+'_'+(j+1), s[j], s[j]);\r\n li.className = checkList.checkListItemCssClass;\r\n ul.appendChild(li);\r\n li.check.checked = true;\r\n checkList.setCheckListValues(li.check);\r\n this.hasStoredValues = true;\r\n }\r\n }\r\n }//end for\r\n\r\n if(!this.hasStoredValues && this.paging){\r\n this.Mod.paging.setPagingInfo();\r\n }\r\n }//end if\r\n }\r\n\r\n filter(){\r\n this.EvtManager(this.Evt.name.filter);\r\n }\r\n\r\n /**\r\n * Filter the table by retrieving the data from each cell in every single\r\n * row and comparing it to the search term for current column. A row is\r\n * hidden when all the search terms are not found in inspected row.\r\n *\r\n * TODO: Reduce complexity of this massive method\r\n */\r\n _filter(){\r\n if(!this.fltGrid || (!this._hasGrid && !this.isFirstLoad)){\r\n return;\r\n }\r\n //invoke onbefore callback\r\n if(this.onBeforeFilter){\r\n this.onBeforeFilter.call(null, this);\r\n }\r\n\r\n let row = this.tbl.rows,\r\n Mod = this.Mod,\r\n hiddenrows = 0;\r\n\r\n this.validRowsIndex = [];\r\n\r\n // removes keyword highlighting\r\n if(this.highlightKeywords){\r\n Mod.highlightKeyword.unhighlightAll();\r\n }\r\n //removes popup filters active icons\r\n if(this.popUpFilters){\r\n Mod.popupFilter.buildIcons();\r\n }\r\n //removes active column header class\r\n if(this.markActiveColumns){\r\n this.clearActiveColumns();\r\n }\r\n // search args re-init\r\n this.searchArgs = this.getFiltersValue();\r\n\r\n var num_cell_data, nbFormat;\r\n var re_le = new RegExp(this.leOperator),\r\n re_ge = new RegExp(this.geOperator),\r\n re_l = new RegExp(this.lwOperator),\r\n re_g = new RegExp(this.grOperator),\r\n re_d = new RegExp(this.dfOperator),\r\n re_lk = new RegExp(Str.rgxEsc(this.lkOperator)),\r\n re_eq = new RegExp(this.eqOperator),\r\n re_st = new RegExp(this.stOperator),\r\n re_en = new RegExp(this.enOperator),\r\n // re_an = new RegExp(this.anOperator),\r\n // re_cr = new RegExp(this.curExp),\r\n re_em = this.emOperator,\r\n re_nm = this.nmOperator,\r\n re_re = new RegExp(Str.rgxEsc(this.rgxOperator));\r\n\r\n //keyword highlighting\r\n function highlight(str, ok, cell){\r\n /*jshint validthis:true */\r\n if(this.highlightKeywords && ok){\r\n str = str.replace(re_lk, '');\r\n str = str.replace(re_eq, '');\r\n str = str.replace(re_st, '');\r\n str = str.replace(re_en, '');\r\n let w = str;\r\n if(re_le.test(str) || re_ge.test(str) || re_l.test(str) ||\r\n re_g.test(str) || re_d.test(str)){\r\n w = Dom.getText(cell);\r\n }\r\n if(w !== ''){\r\n Mod.highlightKeyword.highlight(\r\n cell, w, Mod.highlightKeyword.highlightCssClass);\r\n }\r\n }\r\n }\r\n\r\n //looks for search argument in current row\r\n function hasArg(sA, cell_data, j){\r\n /*jshint validthis:true */\r\n let occurence,\r\n removeNbFormat = Helpers.removeNbFormat;\r\n //Search arg operator tests\r\n let hasLO = re_l.test(sA),\r\n hasLE = re_le.test(sA),\r\n hasGR = re_g.test(sA),\r\n hasGE = re_ge.test(sA),\r\n hasDF = re_d.test(sA),\r\n hasEQ = re_eq.test(sA),\r\n hasLK = re_lk.test(sA),\r\n // hasAN = re_an.test(sA),\r\n hasST = re_st.test(sA),\r\n hasEN = re_en.test(sA),\r\n hasEM = (re_em === sA),\r\n hasNM = (re_nm === sA),\r\n hasRE = re_re.test(sA);\r\n\r\n //Search arg dates tests\r\n let isLDate = hasLO && isValidDate(sA.replace(re_l,''), dtType);\r\n let isLEDate = hasLE && isValidDate(sA.replace(re_le,''), dtType);\r\n let isGDate = hasGR && isValidDate(sA.replace(re_g,''), dtType);\r\n let isGEDate = hasGE && isValidDate(sA.replace(re_ge,''), dtType);\r\n let isDFDate = hasDF && isValidDate(sA.replace(re_d,''), dtType);\r\n let isEQDate = hasEQ && isValidDate(sA.replace(re_eq,''), dtType);\r\n\r\n let dte1, dte2;\r\n //dates\r\n if(isValidDate(cell_data,dtType)){\r\n dte1 = formatDate(cell_data,dtType);\r\n // lower date\r\n if(isLDate){\r\n dte2 = formatDate(sA.replace(re_l,''), dtType);\r\n occurence = dte1 < dte2;\r\n }\r\n // lower equal date\r\n else if(isLEDate){\r\n dte2 = formatDate(sA.replace(re_le,''), dtType);\r\n occurence = dte1 <= dte2;\r\n }\r\n // greater equal date\r\n else if(isGEDate){\r\n dte2 = formatDate(sA.replace(re_ge,''), dtType);\r\n occurence = dte1 >= dte2;\r\n }\r\n // greater date\r\n else if(isGDate){\r\n dte2 = formatDate(sA.replace(re_g,''), dtType);\r\n occurence = dte1 > dte2;\r\n }\r\n // different date\r\n else if(isDFDate){\r\n dte2 = formatDate(sA.replace(re_d,''), dtType);\r\n occurence = dte1.toString() != dte2.toString();\r\n }\r\n // equal date\r\n else if(isEQDate){\r\n dte2 = formatDate(sA.replace(re_eq,''), dtType);\r\n occurence = dte1.toString() == dte2.toString();\r\n }\r\n // searched keyword with * operator doesn't have to be a date\r\n else if(re_lk.test(sA)){// like date\r\n occurence = this._containsStr(\r\n sA.replace(re_lk,''), cell_data, null, false);\r\n }\r\n else if(isValidDate(sA,dtType)){\r\n dte2 = formatDate(sA,dtType);\r\n occurence = dte1.toString() == dte2.toString();\r\n }\r\n //empty\r\n else if(hasEM){\r\n occurence = Str.isEmpty(cell_data);\r\n }\r\n //non-empty\r\n else if(hasNM){\r\n occurence = !Str.isEmpty(cell_data);\r\n }\r\n }\r\n\r\n else{\r\n //first numbers need to be formated\r\n if(this.hasColNbFormat && this.colNbFormat[j]){\r\n num_cell_data = removeNbFormat(\r\n cell_data, this.colNbFormat[j]);\r\n nbFormat = this.colNbFormat[j];\r\n } else {\r\n if(this.thousandsSeparator === ',' &&\r\n this.decimalSeparator === '.'){\r\n num_cell_data = removeNbFormat(cell_data, 'us');\r\n nbFormat = 'us';\r\n } else {\r\n num_cell_data = removeNbFormat(cell_data, 'eu');\r\n nbFormat = 'eu';\r\n }\r\n }\r\n\r\n // first checks if there is any operator (<,>,<=,>=,!,*,=,{,},\r\n // rgx:)\r\n // lower equal\r\n if(hasLE){\r\n occurence = num_cell_data <= removeNbFormat(\r\n sA.replace(re_le, ''), nbFormat);\r\n }\r\n //greater equal\r\n else if(hasGE){\r\n occurence = num_cell_data >= removeNbFormat(\r\n sA.replace(re_ge, ''), nbFormat);\r\n }\r\n //lower\r\n else if(hasLO){\r\n occurence = num_cell_data < removeNbFormat(\r\n sA.replace(re_l, ''), nbFormat);\r\n }\r\n //greater\r\n else if(hasGR){\r\n occurence = num_cell_data > removeNbFormat(\r\n sA.replace(re_g, ''), nbFormat);\r\n }\r\n //different\r\n else if(hasDF){\r\n occurence = this._containsStr(\r\n sA.replace(re_d, ''),cell_data) ? false : true;\r\n }\r\n //like\r\n else if(hasLK){\r\n occurence = this._containsStr(\r\n sA.replace(re_lk, ''), cell_data, null, false);\r\n }\r\n //equal\r\n else if(hasEQ){\r\n occurence = this._containsStr(\r\n sA.replace(re_eq, ''), cell_data, null, true);\r\n }\r\n //starts with\r\n else if(hasST){\r\n occurence = cell_data.indexOf(sA.replace(re_st, ''))===0 ?\r\n true : false;\r\n }\r\n //ends with\r\n else if(hasEN){\r\n let searchArg = sA.replace(re_en, '');\r\n occurence =\r\n cell_data.lastIndexOf(searchArg,cell_data.length-1) ===\r\n (cell_data.length-1)-(searchArg.length-1) &&\r\n cell_data.lastIndexOf(\r\n searchArg, cell_data.length-1) > -1 ? true : false;\r\n }\r\n //empty\r\n else if(hasEM){\r\n occurence = Str.isEmpty(cell_data);\r\n }\r\n //non-empty\r\n else if(hasNM){\r\n occurence = !Str.isEmpty(cell_data);\r\n }\r\n //regexp\r\n else if(hasRE){\r\n //in case regexp fires an exception\r\n try{\r\n //operator is removed\r\n let srchArg = sA.replace(re_re,'');\r\n let rgx = new RegExp(srchArg);\r\n occurence = rgx.test(cell_data);\r\n } catch(e) { occurence = false; }\r\n }\r\n else{\r\n occurence = this._containsStr(\r\n sA, cell_data, this.getFilterType(j));\r\n }\r\n\r\n }//else\r\n return occurence;\r\n }//fn\r\n\r\n for(let k=this.refRow; k<this.nbRows; k++){\r\n /*** if table already filtered some rows are not visible ***/\r\n if(row[k].style.display === 'none'){\r\n row[k].style.display = '';\r\n }\r\n\r\n let cell = row[k].cells,\r\n nchilds = cell.length;\r\n\r\n // checks if row has exact cell #\r\n if(nchilds !== this.nbCells){\r\n continue;\r\n }\r\n\r\n let occurence = [],\r\n isRowValid = true,\r\n //only for single filter search\r\n singleFltRowValid = false;\r\n\r\n // this loop retrieves cell data\r\n for(let j=0; j<nchilds; j++){\r\n //searched keyword\r\n let sA = this.searchArgs[this.singleSearchFlt ? 0 : j];\r\n var dtType = this.hasColDateType ?\r\n this.colDateType[j] : this.defaultDateType;\r\n if(sA === ''){\r\n continue;\r\n }\r\n\r\n let cell_data = Str.matchCase(\r\n this.getCellData(j, cell[j]), this.caseSensitive);\r\n\r\n //multiple search parameter operator ||\r\n let sAOrSplit = sA.split(this.orOperator),\r\n //multiple search || parameter boolean\r\n hasMultiOrSA = (sAOrSplit.length>1) ? true : false,\r\n //multiple search parameter operator &&\r\n sAAndSplit = sA.split(this.anOperator),\r\n //multiple search && parameter boolean\r\n hasMultiAndSA = sAAndSplit.length>1 ? true : false;\r\n\r\n //multiple sarch parameters\r\n if(hasMultiOrSA || hasMultiAndSA){\r\n let cS,\r\n occur = false,\r\n s = hasMultiOrSA ? sAOrSplit : sAAndSplit;\r\n for(let w=0, len=s.length; w<len; w++){\r\n cS = Str.trim(s[w]);\r\n occur = hasArg.call(this, cS, cell_data, j);\r\n highlight.call(this, cS, occur, cell[j]);\r\n if(hasMultiOrSA && occur){\r\n break;\r\n }\r\n if(hasMultiAndSA && !occur){\r\n break;\r\n }\r\n }\r\n occurence[j] = occur;\r\n }\r\n //single search parameter\r\n else {\r\n occurence[j] =\r\n hasArg.call(this, Str.trim(sA), cell_data, j);\r\n highlight.call(this, sA, occurence[j], cell[j]);\r\n }//else single param\r\n\r\n if(!occurence[j]){\r\n isRowValid = false;\r\n }\r\n if(this.singleSearchFlt && occurence[j]){\r\n singleFltRowValid = true;\r\n }\r\n if(this.popUpFilters){\r\n Mod.popupFilter.buildIcon(j, true);\r\n }\r\n if(this.markActiveColumns){\r\n if(k === this.refRow){\r\n if(this.onBeforeActiveColumn){\r\n this.onBeforeActiveColumn.call(null, this, j);\r\n }\r\n Dom.addClass(\r\n this.getHeaderElement(j),\r\n this.activeColumnsCssClass);\r\n if(this.onAfterActiveColumn){\r\n this.onAfterActiveColumn.call(null, this, j);\r\n }\r\n }\r\n }\r\n }//for j\r\n\r\n if(this.singleSearchFlt && singleFltRowValid){\r\n isRowValid = true;\r\n }\r\n\r\n if(!isRowValid){\r\n this.validateRow(k, false);\r\n if(Mod.alternateRows){\r\n Mod.alternateRows.removeRowBg(k);\r\n }\r\n // always visible rows need to be counted as valid\r\n if(this.hasVisibleRows && this.visibleRows.indexOf(k) !== -1){\r\n this.validRowsIndex.push(k);\r\n } else {\r\n hiddenrows++;\r\n }\r\n } else {\r\n this.validateRow(k, true);\r\n this.validRowsIndex.push(k);\r\n if(this.alternateBgs){\r\n Mod.alternateRows.setRowBg(k, this.validRowsIndex.length);\r\n }\r\n if(this.onRowValidated){\r\n this.onRowValidated.call(null, this, k);\r\n }\r\n }\r\n }// for k\r\n\r\n this.nbVisibleRows = this.validRowsIndex.length;\r\n this.nbHiddenRows = hiddenrows;\r\n\r\n if(this.rememberGridValues){\r\n Mod.store.saveFilterValues(this.fltsValuesCookie);\r\n }\r\n //applies filter props after filtering process\r\n if(!this.paging){\r\n this.applyProps();\r\n } else {\r\n // Shouldn't need to care of that here...\r\n // TODO: provide a method in paging module\r\n Mod.paging.startPagingRow = 0;\r\n Mod.paging.currentPageNb = 1;\r\n //\r\n Mod.paging.setPagingInfo(this.validRowsIndex);\r\n }\r\n //invokes onafter callback\r\n if(this.onAfterFilter){\r\n this.onAfterFilter.call(null,this);\r\n }\r\n }\r\n\r\n /**\r\n * Re-apply the features/behaviour concerned by filtering/paging operation\r\n *\r\n * NOTE: this will disappear whenever custom events in place\r\n */\r\n applyProps(){\r\n let Mod = this.Mod;\r\n\r\n //shows rows always visible\r\n if(this.hasVisibleRows){\r\n this.enforceVisibility();\r\n }\r\n //columns operations\r\n if(this.hasExtension('colOps')){\r\n this.extension('colOps').calc();\r\n }\r\n\r\n //re-populates drop-down filters\r\n if(this.linkedFilters){\r\n this.linkFilters();\r\n }\r\n\r\n if(this.rowsCounter){\r\n Mod.rowsCounter.refresh(this.nbVisibleRows);\r\n }\r\n\r\n if(this.popUpFilters){\r\n Mod.popupFilter.closeAll();\r\n }\r\n }\r\n\r\n /**\r\n * Return the data of a specified colum\r\n * @param {Number} colindex Column index\r\n * @param {Boolean} num Return unformatted number\r\n * @param {Array} exclude List of row indexes to be excluded\r\n * @return {Array} Flat list of data for a column\r\n */\r\n getColValues(colindex, num=false, exclude=undefined){\r\n if(!this.fltGrid){\r\n return;\r\n }\r\n let row = this.tbl.rows,\r\n colValues = [];\r\n\r\n for(let i=this.refRow; i<this.nbRows; i++){\r\n let isExludedRow = false;\r\n // checks if current row index appears in exclude array\r\n if(exclude && Types.isArray(exclude)){\r\n isExludedRow = Arr.has(exclude, i);\r\n }\r\n let cell = row[i].cells,\r\n nchilds = cell.length;\r\n\r\n // checks if row has exact cell # and is not excluded\r\n if(nchilds === this.nbCells && !isExludedRow){\r\n // this loop retrieves cell data\r\n for(let j=0; j<nchilds; j++){\r\n if(j != colindex || row[i].style.display !== ''){\r\n continue;\r\n }\r\n let cell_data = Str.lower(this.getCellData(j, cell[j])),\r\n nbFormat = this.colNbFormat ?\r\n this.colNbFormat[colindex] : null,\r\n data = num ?\r\n Helpers.removeNbFormat(cell_data, nbFormat) :\r\n cell_data;\r\n colValues.push(data);\r\n }\r\n }\r\n }\r\n return colValues;\r\n }\r\n\r\n /**\r\n * Return the filter's value of a specified column\r\n * @param {Number} index Column index\r\n * @return {String} Filter value\r\n */\r\n getFilterValue(index){\r\n if(!this.fltGrid){\r\n return;\r\n }\r\n let fltValue,\r\n flt = this.getFilterElement(index);\r\n if(!flt){\r\n return '';\r\n }\r\n\r\n let fltColType = this.getFilterType(index);\r\n if(fltColType !== this.fltTypeMulti &&\r\n fltColType !== this.fltTypeCheckList){\r\n fltValue = flt.value;\r\n }\r\n //mutiple select\r\n else if(fltColType === this.fltTypeMulti){\r\n fltValue = '';\r\n for(let j=0, len=flt.options.length; j<len; j++){\r\n if(flt.options[j].selected){\r\n fltValue = fltValue.concat(\r\n flt.options[j].value+' ' +\r\n this.orOperator + ' '\r\n );\r\n }\r\n }\r\n //removes last operator ||\r\n fltValue = fltValue.substr(0, fltValue.length-4);\r\n }\r\n //checklist\r\n else if(fltColType === this.fltTypeCheckList){\r\n if(flt.getAttribute('value') !== null){\r\n fltValue = flt.getAttribute('value');\r\n //removes last operator ||\r\n fltValue = fltValue.substr(0, fltValue.length-3);\r\n } else{\r\n fltValue = '';\r\n }\r\n }\r\n return fltValue;\r\n }\r\n\r\n /**\r\n * Return the filters' values\r\n * @return {Array} List of filters' values\r\n */\r\n getFiltersValue(){\r\n if(!this.fltGrid){\r\n return;\r\n }\r\n let searchArgs = [];\r\n for(let i=0, len=this.fltIds.length; i<len; i++){\r\n searchArgs.push(\r\n Str.trim(\r\n Str.matchCase(this.getFilterValue(i), this.caseSensitive))\r\n );\r\n }\r\n return searchArgs;\r\n }\r\n\r\n /**\r\n * Return the ID of the filter of a specified column\r\n * @param {Number} index Column's index\r\n * @return {String} ID of the filter element\r\n */\r\n getFilterId(index){\r\n if(!this.fltGrid){\r\n return;\r\n }\r\n return this.fltIds[index];\r\n }\r\n\r\n /**\r\n * Return the list of ids of filters matching a specified type.\r\n * Note: hidden filters are also returned\r\n *\r\n * @param {String} type Filter type string ('input', 'select', 'multiple',\r\n * 'checklist')\r\n * @param {Boolean} bool If true returns columns indexes instead of IDs\r\n * @return {[type]} List of element IDs or column indexes\r\n */\r\n getFiltersByType(type, bool){\r\n if(!this.fltGrid){\r\n return;\r\n }\r\n let arr = [];\r\n for(let i=0, len=this.fltIds.length; i<len; i++){\r\n let fltType = this.getFilterType(i);\r\n if(fltType === Str.lower(type)){\r\n let a = bool ? i : this.fltIds[i];\r\n arr.push(a);\r\n }\r\n }\r\n return arr;\r\n }\r\n\r\n /**\r\n * Return the filter's DOM element for a given column\r\n * @param {Number} index Column's index\r\n * @return {DOMElement}\r\n */\r\n getFilterElement(index){\r\n let fltId = this.fltIds[index];\r\n return Dom.id(fltId);\r\n }\r\n\r\n /**\r\n * Return the number of cells for a given row index\r\n * @param {Number} rowIndex Index of the row\r\n * @return {Number} Number of cells\r\n */\r\n getCellsNb(rowIndex=0){\r\n let tr = this.tbl.rows[rowIndex];\r\n return tr.cells.length;\r\n }\r\n\r\n /**\r\n * Return the number of filterable rows starting from reference row if\r\n * defined\r\n * @param {Boolean} includeHeaders Include the headers row\r\n * @return {Number} Number of filterable rows\r\n */\r\n getRowsNb(includeHeaders){\r\n let s = Types.isUndef(this.refRow) ? 0 : this.refRow,\r\n ntrs = this.tbl.rows.length;\r\n if(includeHeaders){ s = 0; }\r\n return parseInt(ntrs-s, 10);\r\n }\r\n\r\n /**\r\n * Return the data of a given cell\r\n * @param {Number} i Column's index\r\n * @param {Object} cell Cell's DOM object\r\n * @return {String}\r\n */\r\n getCellData(i, cell){\r\n if(Types.isUndef(i) || !cell){\r\n return '';\r\n }\r\n //First checks for customCellData event\r\n if(this.customCellData && Arr.has(this.customCellDataCols, i)){\r\n return this.customCellData.call(null, this, cell, i);\r\n } else {\r\n return Dom.getText(cell);\r\n }\r\n }\r\n\r\n /**\r\n * Return the table data with following format:\r\n * [\r\n * [rowIndex, [value0, value1...]],\r\n * [rowIndex, [value0, value1...]]\r\n * ]\r\n * @return {Array}\r\n *\r\n * TODO: provide an API returning data in JSON format\r\n */\r\n getTableData(){\r\n let row = this.tbl.rows;\r\n for(let k=this.refRow; k<this.nbRows; k++){\r\n let rowData = [k,[]];\r\n let cells = row[k].cells;\r\n // this loop retrieves cell data\r\n for(let j=0, len=cells.length; j<len; j++){\r\n let cell_data = this.getCellData(j, cells[j]);\r\n rowData[1].push(cell_data);\r\n }\r\n this.tblData.push(rowData);\r\n }\r\n return this.tblData;\r\n }\r\n\r\n /**\r\n * Return the filtered data with following format:\r\n * [\r\n * [rowIndex, [value0, value1...]],\r\n * [rowIndex, [value0, value1...]]\r\n * ]\r\n * @param {Boolean} includeHeaders Include headers row\r\n * @return {Array}\r\n *\r\n * TODO: provide an API returning data in JSON format\r\n */\r\n getFilteredData(includeHeaders){\r\n if(!this.validRowsIndex){\r\n return [];\r\n }\r\n let row = this.tbl.rows,\r\n filteredData = [];\r\n if(includeHeaders){\r\n let table = this.gridLayout ?\r\n this.Mod.gridLayout.headTbl : this.tbl,\r\n r = table.rows[this.headersRow],\r\n rowData = [r.rowIndex, []];\r\n for(let j=0; j<this.nbCells; j++){\r\n let headerText = this.getCellData(j, r.cells[j]);\r\n rowData[1].push(headerText);\r\n }\r\n filteredData.push(rowData);\r\n }\r\n\r\n let validRows = this.getValidRows(true);\r\n for(let i=0; i<validRows.length; i++){\r\n let rData = [this.validRowsIndex[i],[]],\r\n cells = row[this.validRowsIndex[i]].cells;\r\n for(let k=0; k<cells.length; k++){\r\n let cell_data = this.getCellData(k, cells[k]);\r\n rData[1].push(cell_data);\r\n }\r\n filteredData.push(rData);\r\n }\r\n return filteredData;\r\n }\r\n\r\n /**\r\n * Return the filtered data for a given column index\r\n * @param {Number} colIndex Colmun's index\r\n * @return {Array} Flat list of values ['val0','val1','val2'...]\r\n *\r\n * TODO: provide an API returning data in JSON format\r\n */\r\n getFilteredDataCol(colIndex){\r\n if(colIndex===undefined){\r\n return [];\r\n }\r\n let data = this.getFilteredData(),\r\n colData = [];\r\n for(let i=0, len=data.length; i<len; i++){\r\n let r = data[i],\r\n //cols values of current row\r\n d = r[1],\r\n //data of searched column\r\n c = d[colIndex];\r\n colData.push(c);\r\n }\r\n return colData;\r\n }\r\n\r\n /**\r\n * Get the display value of a row\r\n * @param {RowElement} DOM element of the row\r\n * @return {String} Usually 'none' or ''\r\n */\r\n getRowDisplay(row){\r\n if(!this.fltGrid || !Types.isObj(row)){\r\n return;\r\n }\r\n return row.style.display;\r\n }\r\n\r\n /**\r\n * Validate/invalidate row by setting the 'validRow' attribute on the row\r\n * @param {Number} rowIndex Index of the row\r\n * @param {Boolean} isValid\r\n */\r\n validateRow(rowIndex, isValid){\r\n let row = this.tbl.rows[rowIndex];\r\n if(!row || typeof isValid !== 'boolean'){\r\n return;\r\n }\r\n\r\n // always visible rows are valid\r\n if(this.hasVisibleRows && this.visibleRows.indexOf(rowIndex) !== -1){\r\n isValid = true;\r\n }\r\n\r\n let displayFlag = isValid ? '' : 'none',\r\n validFlag = isValid ? 'true' : 'false';\r\n row.style.display = displayFlag;\r\n\r\n if(this.paging){\r\n row.setAttribute('validRow', validFlag);\r\n }\r\n }\r\n\r\n /**\r\n * Validate all filterable rows\r\n */\r\n validateAllRows(){\r\n if(!this._hasGrid){\r\n return;\r\n }\r\n this.validRowsIndex = [];\r\n for(let k=this.refRow; k<this.nbFilterableRows; k++){\r\n this.validateRow(k, true);\r\n this.validRowsIndex.push(k);\r\n }\r\n }\r\n\r\n /**\r\n * Set search value to a given filter\r\n * @param {Number} index Column's index\r\n * @param {String} searcharg Search term\r\n */\r\n setFilterValue(index, searcharg=''){\r\n if((!this.fltGrid && !this.isFirstLoad) ||\r\n !this.getFilterElement(index)){\r\n return;\r\n }\r\n let slc = this.getFilterElement(index),\r\n fltColType = this.getFilterType(index);\r\n\r\n if(fltColType !== this.fltTypeMulti &&\r\n fltColType != this.fltTypeCheckList){\r\n slc.value = searcharg;\r\n }\r\n //multiple selects\r\n else if(fltColType === this.fltTypeMulti){\r\n let s = searcharg.split(' '+this.orOperator+' ');\r\n // let ct = 0; //keywords counter\r\n for(let j=0, len=slc.options.length; j<len; j++){\r\n let option = slc.options[j];\r\n if(s==='' || s[0]===''){\r\n option.selected = false;\r\n }\r\n if(option.value===''){\r\n option.selected = false;\r\n }\r\n if(option.value!=='' &&\r\n Arr.has(s, option.value, true)){\r\n option.selected = true;\r\n }//if\r\n }//for j\r\n }\r\n //checklist\r\n else if(fltColType === this.fltTypeCheckList){\r\n searcharg = Str.matchCase(searcharg, this.caseSensitive);\r\n let sarg = searcharg.split(' '+this.orOperator+' ');\r\n let lisNb = Dom.tag(slc,'li').length;\r\n\r\n slc.setAttribute('value', '');\r\n slc.setAttribute('indexes', '');\r\n\r\n for(let k=0; k<lisNb; k++){\r\n let li = Dom.tag(slc,'li')[k],\r\n lbl = Dom.tag(li,'label')[0],\r\n chk = Dom.tag(li,'input')[0],\r\n lblTxt = Str.matchCase(\r\n Dom.getText(lbl), this.caseSensitive);\r\n if(lblTxt !== '' && Arr.has(sarg, lblTxt, true)){\r\n chk.checked = true;\r\n this.Mod.checkList.setCheckListValues(chk);\r\n }\r\n else{\r\n chk.checked = false;\r\n this.Mod.checkList.setCheckListValues(chk);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set them columns' widths as per configuration\r\n * @param {Number} rowIndex Optional row index to apply the widths to\r\n * @param {Element} tbl DOM element\r\n */\r\n setColWidths(rowIndex, tbl){\r\n if(!this.fltGrid || !this.hasColWidths){\r\n return;\r\n }\r\n tbl = tbl || this.tbl;\r\n let rIndex;\r\n if(rowIndex===undefined){\r\n rIndex = tbl.rows[0].style.display!='none' ? 0 : 1;\r\n } else{\r\n rIndex = rowIndex;\r\n }\r\n\r\n setWidths.call(this, tbl.rows[rIndex]);\r\n\r\n function setWidths(row){\r\n /*jshint validthis:true */\r\n let nbCols = this.nbCells;\r\n let colWidths = this.colWidths;\r\n if((nbCols != colWidths.length) || (nbCols != row.cells.length)){\r\n throw new Error('Columns number mismatch!');\r\n }\r\n\r\n let colTags = Dom.tag(tbl, 'col');\r\n let tblHasColTag = colTags.length > 0;\r\n let frag = !tblHasColTag ? doc.createDocumentFragment() : null;\r\n for(let k=0; k<nbCols; k++){\r\n // row.cells[k].style.width = colWidths[k];\r\n let col;\r\n if(tblHasColTag){\r\n col = colTags[k];\r\n } else {\r\n col = Dom.create('col', ['id', this.id+'_col_'+k]);\r\n frag.appendChild(col);\r\n }\r\n col.style.width = colWidths[k];\r\n }\r\n if(!tblHasColTag){\r\n tbl.insertBefore(frag, tbl.firstChild);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Makes defined rows always visible\r\n */\r\n enforceVisibility(){\r\n if(!this.hasVisibleRows){\r\n return;\r\n }\r\n for(let i=0, len=this.visibleRows.length; i<len; i++){\r\n let row = this.visibleRows[i];\r\n //row index cannot be > nrows\r\n if(row <= this.nbRows){\r\n this.validateRow(row, true);\r\n }\r\n }\r\n }\r\n\r\n clearFilters(){\r\n this.EvtManager(this.Evt.name.clear);\r\n }\r\n\r\n /**\r\n * Clear all the filters' values\r\n */\r\n _clearFilters(){\r\n if(!this.fltGrid){\r\n return;\r\n }\r\n if(this.onBeforeReset){\r\n this.onBeforeReset.call(null, this, this.getFiltersValue());\r\n }\r\n for(let i=0, len=this.fltIds.length; i<len; i++){\r\n this.setFilterValue(i, '');\r\n }\r\n if(this.linkedFilters){\r\n this.activeFilterId = '';\r\n this.linkFilters();\r\n }\r\n if(this.rememberPageLen){ Cookie.remove(this.pgLenCookie); }\r\n if(this.rememberPageNb){ Cookie.remove(this.pgNbCookie); }\r\n if(this.onAfterReset){ this.onAfterReset.call(null, this); }\r\n }\r\n\r\n /**\r\n * Clears filtered columns visual indicator (background color)\r\n * @return {[type]} [description]\r\n */\r\n clearActiveColumns(){\r\n for(let i=0, len=this.fltIds.length; i<len; i++){\r\n Dom.removeClass(\r\n this.getHeaderElement(i), this.activeColumnsCssClass);\r\n }\r\n }\r\n\r\n /**\r\n * Refresh the filters subject to linking ('select', 'multiple',\r\n * 'checklist' type)\r\n */\r\n linkFilters(){\r\n if(!this.activeFilterId){\r\n return;\r\n }\r\n let slcA1 = this.getFiltersByType(this.fltTypeSlc, true),\r\n slcA2 = this.getFiltersByType(this.fltTypeMulti, true),\r\n slcA3 = this.getFiltersByType(this.fltTypeCheckList, true),\r\n slcIndex = slcA1.concat(slcA2);\r\n slcIndex = slcIndex.concat(slcA3);\r\n\r\n let activeFlt = this.activeFilterId.split('_')[0];\r\n activeFlt = activeFlt.split(this.prfxFlt)[1];\r\n let slcSelectedValue;\r\n for(let i=0, len=slcIndex.length; i<len; i++){\r\n let curSlc = Dom.id(this.fltIds[slcIndex[i]]);\r\n slcSelectedValue = this.getFilterValue(slcIndex[i]);\r\n\r\n // Welcome to cyclomatic complexity hell :)\r\n // TODO: simplify/refactor if statement\r\n if(activeFlt!==slcIndex[i] ||\r\n (this.paging && Arr.has(slcA1, slcIndex[i]) &&\r\n activeFlt === slcIndex[i] ) ||\r\n (!this.paging && (Arr.has(slcA3, slcIndex[i]) ||\r\n Arr.has(slcA2, slcIndex[i]))) ||\r\n slcSelectedValue === this.displayAllText ){\r\n\r\n if(Arr.has(slcA3, slcIndex[i])){\r\n this.Mod.checkList.checkListDiv[slcIndex[i]].innerHTML = '';\r\n } else {\r\n curSlc.innerHTML = '';\r\n }\r\n\r\n //1st option needs to be inserted\r\n if(this.fillSlcOnDemand) {\r\n let opt0 = Dom.createOpt(this.displayAllText, '');\r\n if(curSlc){\r\n curSlc.appendChild(opt0);\r\n }\r\n }\r\n\r\n if(Arr.has(slcA3, slcIndex[i])){\r\n this.Mod.checkList._build(slcIndex[i]);\r\n } else {\r\n this.Mod.dropdown._build(slcIndex[i], true);\r\n }\r\n\r\n this.setFilterValue(slcIndex[i], slcSelectedValue);\r\n }\r\n }// for i\r\n }\r\n\r\n /**\r\n * Re-generate the filters grid bar when previously removed\r\n */\r\n _resetGrid(){\r\n if(this.isFirstLoad){\r\n return;\r\n }\r\n\r\n let Mod = this.Mod;\r\n let tbl = this.tbl;\r\n let rows = tbl.rows;\r\n let filtersRowIndex = this.filtersRowIndex;\r\n let filtersRow = rows[filtersRowIndex];\r\n\r\n // grid was removed, grid row element is stored in fltGridEl property\r\n if(!this.gridLayout){\r\n // If table has a thead ensure the filters row is appended in the\r\n // thead element\r\n if(tbl.tHead){\r\n var tempRow = tbl.tHead.insertRow(this.filtersRowIndex);\r\n tbl.tHead.replaceChild(this.fltGridEl, tempRow);\r\n } else {\r\n filtersRow.parentNode.insertBefore(this.fltGridEl, filtersRow);\r\n }\r\n }\r\n\r\n // filters are appended in external placeholders elements\r\n if(this.isExternalFlt){\r\n let externalFltTgtIds = this.externalFltTgtIds;\r\n for(let ct=0, len=externalFltTgtIds.length; ct<len; ct++){\r\n let extFlt = Dom.id(externalFltTgtIds[ct]);\r\n\r\n if(!extFlt){ continue; }\r\n\r\n let externalFltEl = this.externalFltEls[ct];\r\n extFlt.appendChild(externalFltEl);\r\n let colFltType = this.getFilterType(ct);\r\n //IE special treatment for gridLayout, appended filters are\r\n //empty\r\n if(this.gridLayout &&\r\n externalFltEl.innerHTML === '' &&\r\n colFltType !== this.fltTypeInp){\r\n if(colFltType === this.fltTypeSlc ||\r\n colFltType === this.fltTypeMulti){\r\n Mod.dropdown.build(ct);\r\n }\r\n if(colFltType === this.fltTypeCheckList){\r\n Mod.checkList.build(ct);\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.nbFilterableRows = this.getRowsNb();\r\n this.nbVisibleRows = this.nbFilterableRows;\r\n this.nbRows = rows.length;\r\n\r\n if(this.popUpFilters){\r\n this.headersRow++;\r\n Mod.popupFilter.buildAll();\r\n }\r\n\r\n if(!this.gridLayout){\r\n Dom.addClass(this.tbl, this.prfxTf);\r\n }\r\n this._hasGrid = true;\r\n }\r\n\r\n /**\r\n * Checks if passed data contains the searched arg\r\n * @param {String} arg Search term\r\n * @param {String} data Data string\r\n * @param {String} fltType Filter type ('input', 'select')\r\n * @param {Boolean} forceMatch Exact match\r\n * @return {Boolean]}\r\n *\r\n * TODO: move into string module, remove fltType in order to decouple it\r\n * from TableFilter module\r\n */\r\n _containsStr(arg, data, fltType, forceMatch){\r\n // Improved by Cedric Wartel (cwl)\r\n // automatic exact match for selects and special characters are now\r\n // filtered\r\n let regexp,\r\n modifier = (this.caseSensitive) ? 'g' : 'gi',\r\n exactMatch = !forceMatch ? this.exactMatch : forceMatch;\r\n if(exactMatch || (fltType!==this.fltTypeInp && fltType)){\r\n regexp = new RegExp(\r\n '(^\\\\s*)'+ Str.rgxEsc(arg) +'(\\\\s*$)', modifier);\r\n } else{\r\n regexp = new RegExp(Str.rgxEsc(arg), modifier);\r\n }\r\n return regexp.test(data);\r\n }\r\n\r\n /**\r\n * Check if passed script or stylesheet is already imported\r\n * @param {String} filePath Ressource path\r\n * @param {String} type Possible values: 'script' or 'link'\r\n * @return {Boolean}\r\n */\r\n isImported(filePath, type){\r\n let imported = false,\r\n importType = !type ? 'script' : type,\r\n attr = importType == 'script' ? 'src' : 'href',\r\n files = Dom.tag(doc, importType);\r\n for (let i=0, len=files.length; i<len; i++){\r\n if(files[i][attr] === undefined){\r\n continue;\r\n }\r\n if(files[i][attr].match(filePath)){\r\n imported = true;\r\n break;\r\n }\r\n }\r\n return imported;\r\n }\r\n\r\n /**\r\n * Import script or stylesheet\r\n * @param {String} fileId Ressource ID\r\n * @param {String} filePath Ressource path\r\n * @param {Function} callback Callback\r\n * @param {String} type Possible values: 'script' or 'link'\r\n */\r\n import(fileId, filePath, callback, type){\r\n let ftype = !type ? 'script' : type,\r\n imported = this.isImported(filePath, ftype);\r\n if(imported){\r\n return;\r\n }\r\n let o = this,\r\n isLoaded = false,\r\n file,\r\n head = Dom.tag(doc, 'head')[0];\r\n\r\n if(Str.lower(ftype) === 'link'){\r\n file = Dom.create(\r\n 'link',\r\n ['id', fileId], ['type', 'text/css'],\r\n ['rel', 'stylesheet'], ['href', filePath]\r\n );\r\n } else {\r\n file = Dom.create(\r\n 'script', ['id', fileId],\r\n ['type', 'text/javascript'], ['src', filePath]\r\n );\r\n }\r\n\r\n //Browser <> IE onload event works only for scripts, not for stylesheets\r\n file.onload = file.onreadystatechange = function(){\r\n if(!isLoaded &&\r\n (!this.readyState || this.readyState === 'loaded' ||\r\n this.readyState === 'complete')){\r\n isLoaded = true;\r\n if(typeof callback === 'function'){\r\n callback.call(null, o);\r\n }\r\n }\r\n };\r\n file.onerror = function(){\r\n throw new Error('TF script could not load: ' + filePath);\r\n };\r\n head.appendChild(file);\r\n }\r\n\r\n /**\r\n * Check if table has filters grid\r\n * @return {Boolean}\r\n */\r\n hasGrid(){\r\n return this._hasGrid;\r\n }\r\n\r\n /**\r\n * Get list of filter IDs\r\n * @return {[type]} [description]\r\n */\r\n getFiltersId(){\r\n return this.fltIds || [];\r\n }\r\n\r\n /**\r\n * Get filtered (valid) rows indexes\r\n * @param {Boolean} reCalc Force calculation of filtered rows list\r\n * @return {Array} List of row indexes\r\n */\r\n getValidRows(reCalc){\r\n if(!reCalc){\r\n return this.validRowsIndex;\r\n }\r\n\r\n this.validRowsIndex = [];\r\n for(let k=this.refRow; k<this.getRowsNb(true); k++){\r\n let r = this.tbl.rows[k];\r\n if(!this.paging){\r\n if(this.getRowDisplay(r) !== 'none'){\r\n this.validRowsIndex.push(r.rowIndex);\r\n }\r\n } else {\r\n if(r.getAttribute('validRow') === 'true' ||\r\n r.getAttribute('validRow') === null){\r\n this.validRowsIndex.push(r.rowIndex);\r\n }\r\n }\r\n }\r\n return this.validRowsIndex;\r\n }\r\n\r\n /**\r\n * Get the index of the row containing the filters\r\n * @return {Number}\r\n */\r\n getFiltersRowIndex(){\r\n return this.filtersRowIndex;\r\n }\r\n\r\n /**\r\n * Get the index of the headers row\r\n * @return {Number}\r\n */\r\n getHeadersRowIndex(){\r\n return this.headersRow;\r\n }\r\n\r\n /**\r\n * Get the row index from where the filtering process start (1st filterable\r\n * row)\r\n * @return {Number}\r\n */\r\n getStartRowIndex(){\r\n return this.refRow;\r\n }\r\n\r\n /**\r\n * Get the index of the last row\r\n * @return {Number}\r\n */\r\n getLastRowIndex(){\r\n if(!this._hasGrid){\r\n return;\r\n }\r\n return (this.nbRows-1);\r\n }\r\n\r\n /**\r\n * Get the header DOM element for a given column index\r\n * @param {Number} colIndex Column index\r\n * @return {Object}\r\n */\r\n getHeaderElement(colIndex){\r\n let table = this.gridLayout ? this.Mod.gridLayout.headTbl : this.tbl;\r\n let tHead = Dom.tag(table, 'thead');\r\n let headersRow = this.headersRow;\r\n let header;\r\n for(let i=0; i<this.nbCells; i++){\r\n if(i !== colIndex){\r\n continue;\r\n }\r\n if(tHead.length === 0){\r\n header = table.rows[headersRow].cells[i];\r\n }\r\n if(tHead.length === 1){\r\n header = tHead[0].rows[headersRow].cells[i];\r\n }\r\n break;\r\n }\r\n return header;\r\n }\r\n\r\n /**\r\n * Return the filter type for a specified column\r\n * @param {Number} colIndex Column's index\r\n * @return {String}\r\n */\r\n getFilterType(colIndex){\r\n let colType = this.cfg['col_'+colIndex];\r\n return !colType ? this.fltTypeInp : Str.lower(colType);\r\n }\r\n\r\n /**\r\n * Get the total number of filterable rows\r\n * @return {Number}\r\n */\r\n getFilterableRowsNb(){\r\n return this.getRowsNb(false);\r\n }\r\n\r\n /**\r\n * Get the configuration object (literal object)\r\n * @return {Object}\r\n */\r\n config(){\r\n return this.cfg;\r\n }\r\n}\r\n"
},
{
"kind": "variable",
"static": true,
"variation": null,
"name": "global",
"memberof": "src/tablefilter.js",
"longname": "src/tablefilter.js~global",
"access": null,
"export": false,
"importPath": "TableFilter/src/tablefilter.js",
"importStyle": null,
"description": null,
"lineNumber": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "class",
"static": true,
"variation": null,
"name": "TableFilter",
"memberof": "src/tablefilter.js",
"longname": "src/tablefilter.js~TableFilter",
"access": null,
"export": true,
"importPath": "TableFilter/src/tablefilter.js",
"importStyle": "{TableFilter}",
"description": null,
"lineNumber": 30,
"undocument": true,
"interface": false
},
{
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#constructor",
"access": null,
"description": "TF object constructor",
"lineNumber": 40,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "id",
"description": "Table id"
},
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "row",
"description": "index indicating the 1st row"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "configuration",
"description": "object\n\nTODO: Accept a TABLE element or query selectors"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "id",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#id",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "version",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#version",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "year",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#year",
"access": null,
"description": null,
"lineNumber": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tbl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#tbl",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "startRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#startRow",
"access": null,
"description": null,
"lineNumber": 47,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#headersRow",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "cfg",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#cfg",
"access": null,
"description": null,
"lineNumber": 50,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbFilterableRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
"lineNumber": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbRows",
"access": null,
"description": null,
"lineNumber": 52,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbCells",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbCells",
"access": null,
"description": null,
"lineNumber": 53,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "_hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_hasGrid",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableModules",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableModules",
"access": null,
"description": null,
"lineNumber": 55,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "startRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#startRow",
"access": null,
"description": null,
"lineNumber": 68,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "cfg",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#cfg",
"access": null,
"description": null,
"lineNumber": 71,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 81,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbCells",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbCells",
"access": null,
"description": null,
"lineNumber": 82,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbCells",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbCells",
"access": null,
"description": null,
"lineNumber": 83,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "basePath",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#basePath",
"access": null,
"description": null,
"lineNumber": 86,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeInp",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeInp",
"access": null,
"description": "filter types **",
"lineNumber": 89,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeSlc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeSlc",
"access": null,
"description": null,
"lineNumber": 90,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeMulti",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeMulti",
"access": null,
"description": null,
"lineNumber": 91,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeCheckList",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeCheckList",
"access": null,
"description": null,
"lineNumber": 92,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeNone",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeNone",
"access": null,
"description": null,
"lineNumber": 93,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltGrid",
"access": null,
"description": "filters' grid properties **",
"lineNumber": 98,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "gridLayout",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#gridLayout",
"access": null,
"description": "Grid layout **",
"lineNumber": 102,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sourceTblHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sourceTblHtml",
"access": null,
"description": null,
"lineNumber": 103,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sourceTblHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sourceTblHtml",
"access": null,
"description": null,
"lineNumber": 105,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "filtersRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#filtersRowIndex",
"access": null,
"description": "**",
"lineNumber": 109,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#headersRow",
"access": null,
"description": null,
"lineNumber": 110,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "filtersRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#filtersRowIndex",
"access": null,
"description": null,
"lineNumber": 115,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "filtersRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#filtersRowIndex",
"access": null,
"description": null,
"lineNumber": 117,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#headersRow",
"access": null,
"description": null,
"lineNumber": 118,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltCellTag",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltCellTag",
"access": null,
"description": null,
"lineNumber": 123,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltIds",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltIds",
"access": null,
"description": null,
"lineNumber": 127,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltElms",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltElms",
"access": null,
"description": null,
"lineNumber": 129,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "searchArgs",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#searchArgs",
"access": null,
"description": null,
"lineNumber": 131,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tblData",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#tblData",
"access": null,
"description": null,
"lineNumber": 133,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 135,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltGridEl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltGridEl",
"access": null,
"description": null,
"lineNumber": 137,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isFirstLoad",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isFirstLoad",
"access": null,
"description": null,
"lineNumber": 139,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
"lineNumber": 141,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "lDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lDiv",
"access": null,
"description": null,
"lineNumber": 143,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rDiv",
"access": null,
"description": null,
"lineNumber": 145,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "mDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#mDiv",
"access": null,
"description": null,
"lineNumber": 147,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "infDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDivCssClass",
"access": null,
"description": null,
"lineNumber": 150,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "lDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lDivCssClass",
"access": null,
"description": null,
"lineNumber": 152,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rDivCssClass",
"access": null,
"description": null,
"lineNumber": 154,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "mDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#mDivCssClass",
"access": null,
"description": null,
"lineNumber": 156,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "contDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#contDivCssClass",
"access": null,
"description": null,
"lineNumber": 158,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stylePath",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#stylePath",
"access": null,
"description": "filters' grid appearance **",
"lineNumber": 162,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheet",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#stylesheet",
"access": null,
"description": null,
"lineNumber": 163,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheetId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#stylesheetId",
"access": null,
"description": null,
"lineNumber": 164,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltsRowCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltsRowCssClass",
"access": null,
"description": null,
"lineNumber": 166,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableIcons",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableIcons",
"access": null,
"description": null,
"lineNumber": 168,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "alternateBgs",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#alternateBgs",
"access": null,
"description": null,
"lineNumber": 170,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasColWidths",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasColWidths",
"access": null,
"description": null,
"lineNumber": 172,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "colWidths",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#colWidths",
"access": null,
"description": null,
"lineNumber": 173,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltCssClass",
"access": null,
"description": null,
"lineNumber": 175,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltMultiCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltMultiCssClass",
"access": null,
"description": null,
"lineNumber": 177,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltSmallCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltSmallCssClass",
"access": null,
"description": null,
"lineNumber": 179,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "singleFltCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#singleFltCssClass",
"access": null,
"description": null,
"lineNumber": 181,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enterKey",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enterKey",
"access": null,
"description": "filters' grid behaviours **",
"lineNumber": 185,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onBeforeFilter",
"access": null,
"description": null,
"lineNumber": 187,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onAfterFilter",
"access": null,
"description": null,
"lineNumber": 190,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "caseSensitive",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#caseSensitive",
"access": null,
"description": null,
"lineNumber": 193,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "exactMatch",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#exactMatch",
"access": null,
"description": null,
"lineNumber": 195,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "linkedFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#linkedFilters",
"access": null,
"description": null,
"lineNumber": 197,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "disableExcludedOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#disableExcludedOptions",
"access": null,
"description": null,
"lineNumber": 199,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFlt",
"access": null,
"description": null,
"lineNumber": 201,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
"lineNumber": 203,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasVisibleRows",
"access": null,
"description": null,
"lineNumber": 205,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "visibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#visibleRows",
"access": null,
"description": null,
"lineNumber": 207,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isExternalFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isExternalFlt",
"access": null,
"description": null,
"lineNumber": 209,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "externalFltTgtIds",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#externalFltTgtIds",
"access": null,
"description": null,
"lineNumber": 211,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "externalFltEls",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#externalFltEls",
"access": null,
"description": null,
"lineNumber": 213,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "execDelay",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#execDelay",
"access": null,
"description": null,
"lineNumber": 215,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onFiltersLoaded",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onFiltersLoaded",
"access": null,
"description": null,
"lineNumber": 217,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "singleSearchFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#singleSearchFlt",
"access": null,
"description": null,
"lineNumber": 220,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onRowValidated",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onRowValidated",
"access": null,
"description": null,
"lineNumber": 222,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "customCellDataCols",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#customCellDataCols",
"access": null,
"description": null,
"lineNumber": 225,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "customCellData",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#customCellData",
"access": null,
"description": null,
"lineNumber": 228,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "watermark",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#watermark",
"access": null,
"description": null,
"lineNumber": 231,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isWatermarkArray",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isWatermarkArray",
"access": null,
"description": null,
"lineNumber": 232,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "toolBarTgtId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#toolBarTgtId",
"access": null,
"description": null,
"lineNumber": 234,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "helpInstructions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#helpInstructions",
"access": null,
"description": null,
"lineNumber": 236,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "popUpFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#popUpFilters",
"access": null,
"description": null,
"lineNumber": 239,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "markActiveColumns",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#markActiveColumns",
"access": null,
"description": null,
"lineNumber": 241,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeColumnsCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeColumnsCssClass",
"access": null,
"description": null,
"lineNumber": 243,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeActiveColumn",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onBeforeActiveColumn",
"access": null,
"description": null,
"lineNumber": 246,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterActiveColumn",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onAfterActiveColumn",
"access": null,
"description": null,
"lineNumber": 249,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "displayAllText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#displayAllText",
"access": null,
"description": "select filter's customisation and behaviours **",
"lineNumber": 254,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableEmptyOption",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableEmptyOption",
"access": null,
"description": null,
"lineNumber": 256,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "emptyText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#emptyText",
"access": null,
"description": null,
"lineNumber": 258,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableNonEmptyOption",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableNonEmptyOption",
"access": null,
"description": null,
"lineNumber": 260,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nonEmptyText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nonEmptyText",
"access": null,
"description": null,
"lineNumber": 262,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onSlcChange",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onSlcChange",
"access": null,
"description": null,
"lineNumber": 264,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sortSlc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sortSlc",
"access": null,
"description": null,
"lineNumber": 266,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isSortNumAsc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isSortNumAsc",
"access": null,
"description": null,
"lineNumber": 268,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sortNumAsc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sortNumAsc",
"access": null,
"description": null,
"lineNumber": 269,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isSortNumDesc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isSortNumDesc",
"access": null,
"description": null,
"lineNumber": 271,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "sortNumDesc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sortNumDesc",
"access": null,
"description": null,
"lineNumber": 272,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fillSlcOnDemand",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fillSlcOnDemand",
"access": null,
"description": null,
"lineNumber": 274,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasCustomOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasCustomOptions",
"access": null,
"description": null,
"lineNumber": 275,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "customOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#customOptions",
"access": null,
"description": null,
"lineNumber": 276,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rgxOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rgxOperator",
"access": null,
"description": "Filter operators **",
"lineNumber": 279,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "emOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#emOperator",
"access": null,
"description": null,
"lineNumber": 280,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nmOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nmOperator",
"access": null,
"description": null,
"lineNumber": 281,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "orOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#orOperator",
"access": null,
"description": null,
"lineNumber": 282,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "anOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#anOperator",
"access": null,
"description": null,
"lineNumber": 283,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "grOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#grOperator",
"access": null,
"description": null,
"lineNumber": 284,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "lwOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lwOperator",
"access": null,
"description": null,
"lineNumber": 285,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "leOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#leOperator",
"access": null,
"description": null,
"lineNumber": 286,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "geOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#geOperator",
"access": null,
"description": null,
"lineNumber": 287,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "dfOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#dfOperator",
"access": null,
"description": null,
"lineNumber": 288,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "lkOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lkOperator",
"access": null,
"description": null,
"lineNumber": 289,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "eqOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#eqOperator",
"access": null,
"description": null,
"lineNumber": 290,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "stOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#stOperator",
"access": null,
"description": null,
"lineNumber": 291,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enOperator",
"access": null,
"description": null,
"lineNumber": 292,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "curExp",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#curExp",
"access": null,
"description": null,
"lineNumber": 293,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "separator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#separator",
"access": null,
"description": null,
"lineNumber": 294,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rowsCounter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rowsCounter",
"access": null,
"description": "rows counter **",
"lineNumber": 298,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "statusBar",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#statusBar",
"access": null,
"description": "status bar **",
"lineNumber": 302,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loader",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loader",
"access": null,
"description": "loader **",
"lineNumber": 306,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "displayBtn",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#displayBtn",
"access": null,
"description": "validation - reset buttons/links **",
"lineNumber": 310,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnText",
"access": null,
"description": null,
"lineNumber": 312,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnCssClass",
"access": null,
"description": null,
"lineNumber": 314,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnReset",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnReset",
"access": null,
"description": null,
"lineNumber": 317,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnResetCssClass",
"access": null,
"description": null,
"lineNumber": 319,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeReset",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onBeforeReset",
"access": null,
"description": null,
"lineNumber": 321,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterReset",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onAfterReset",
"access": null,
"description": null,
"lineNumber": 324,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "paging",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#paging",
"access": null,
"description": "paging **",
"lineNumber": 329,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 330,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbHiddenRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
"access": null,
"description": null,
"lineNumber": 331,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilter",
"access": null,
"description": "autofilter on typing **",
"lineNumber": 336,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterDelay",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterDelay",
"access": null,
"description": null,
"lineNumber": 338,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 341,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 342,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "highlightKeywords",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#highlightKeywords",
"access": null,
"description": "keyword highlighting **",
"lineNumber": 346,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "defaultDateType",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#defaultDateType",
"access": null,
"description": "data types **",
"lineNumber": 350,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "thousandsSeparator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#thousandsSeparator",
"access": null,
"description": null,
"lineNumber": 353,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "decimalSeparator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#decimalSeparator",
"access": null,
"description": null,
"lineNumber": 356,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasColNbFormat",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasColNbFormat",
"access": null,
"description": null,
"lineNumber": 358,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "colNbFormat",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#colNbFormat",
"access": null,
"description": null,
"lineNumber": 360,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasColDateType",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasColDateType",
"access": null,
"description": null,
"lineNumber": 362,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "colDateType",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#colDateType",
"access": null,
"description": null,
"lineNumber": 364,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgFilter",
"access": null,
"description": "status messages **",
"lineNumber": 368,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgPopulate",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgPopulate",
"access": null,
"description": null,
"lineNumber": 370,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgPopulateCheckList",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgPopulateCheckList",
"access": null,
"description": null,
"lineNumber": 372,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgChangePage",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgChangePage",
"access": null,
"description": null,
"lineNumber": 375,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgClear",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgClear",
"access": null,
"description": null,
"lineNumber": 377,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgChangeResults",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgChangeResults",
"access": null,
"description": null,
"lineNumber": 379,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgResetValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgResetValues",
"access": null,
"description": null,
"lineNumber": 382,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgResetPage",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgResetPage",
"access": null,
"description": null,
"lineNumber": 385,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgResetPageLength",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgResetPageLength",
"access": null,
"description": null,
"lineNumber": 387,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgSort",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgSort",
"access": null,
"description": null,
"lineNumber": 390,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgLoadExtensions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgLoadExtensions",
"access": null,
"description": null,
"lineNumber": 392,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "msgLoadThemes",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#msgLoadThemes",
"access": null,
"description": null,
"lineNumber": 395,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxTf",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxTf",
"access": null,
"description": "ids prefixes **",
"lineNumber": 399,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxFlt",
"access": null,
"description": null,
"lineNumber": 401,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxValButton",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxValButton",
"access": null,
"description": null,
"lineNumber": 403,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxInfDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxInfDiv",
"access": null,
"description": null,
"lineNumber": 405,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxLDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxLDiv",
"access": null,
"description": null,
"lineNumber": 407,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxRDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxRDiv",
"access": null,
"description": null,
"lineNumber": 409,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxMDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxMDiv",
"access": null,
"description": null,
"lineNumber": 411,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCookieFltsValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxCookieFltsValues",
"access": null,
"description": null,
"lineNumber": 413,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCookiePageNb",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxCookiePageNb",
"access": null,
"description": null,
"lineNumber": 415,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCookiePageLen",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxCookiePageLen",
"access": null,
"description": null,
"lineNumber": 417,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasStoredValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasStoredValues",
"access": null,
"description": "cookies **",
"lineNumber": 420,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rememberGridValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rememberGridValues",
"access": null,
"description": null,
"lineNumber": 422,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltsValuesCookie",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltsValuesCookie",
"access": null,
"description": null,
"lineNumber": 424,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rememberPageNb",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rememberPageNb",
"access": null,
"description": null,
"lineNumber": 426,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pgNbCookie",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#pgNbCookie",
"access": null,
"description": null,
"lineNumber": 428,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rememberPageLen",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rememberPageLen",
"access": null,
"description": null,
"lineNumber": 430,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "pgLenCookie",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#pgLenCookie",
"access": null,
"description": null,
"lineNumber": 432,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "extensions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#extensions",
"access": null,
"description": "extensions **",
"lineNumber": 436,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasExtensions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasExtensions",
"access": null,
"description": null,
"lineNumber": 437,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "enableDefaultTheme",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableDefaultTheme",
"access": null,
"description": "themes **",
"lineNumber": 440,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasThemes",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasThemes",
"access": null,
"description": null,
"lineNumber": 442,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "themes",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#themes",
"access": null,
"description": null,
"lineNumber": 443,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "themesPath",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#themesPath",
"access": null,
"description": null,
"lineNumber": 445,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "Mod",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#Mod",
"access": null,
"description": null,
"lineNumber": 448,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "ExtRegistry",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#ExtRegistry",
"access": null,
"description": null,
"lineNumber": 451,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "Evt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#Evt",
"access": null,
"description": "TF events **",
"lineNumber": 454,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 480,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 482,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 493,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 498,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 501,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 507,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 512,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 518,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 523,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
"lineNumber": 543,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFlt",
"access": null,
"description": null,
"lineNumber": 544,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
"lineNumber": 566,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFlt",
"access": null,
"description": null,
"lineNumber": 567,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#init",
"access": null,
"description": "Initialise filtering grid bar behaviours and layout\n\nTODO: decompose in smaller methods",
"lineNumber": 608,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tbl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#tbl",
"access": null,
"description": null,
"lineNumber": 613,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 616,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "headersRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#headersRow",
"access": null,
"description": null,
"lineNumber": 621,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 663,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 665,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbFilterableRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
"lineNumber": 667,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 668,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbRows",
"access": null,
"description": null,
"lineNumber": 669,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbFilterableRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
"lineNumber": 698,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 699,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbRows",
"access": null,
"description": null,
"lineNumber": 700,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isFirstLoad",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isFirstLoad",
"access": null,
"description": null,
"lineNumber": 916,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "_hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_hasGrid",
"access": null,
"description": null,
"lineNumber": 917,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "EvtManager",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#EvtManager",
"access": null,
"description": "Manages state messages",
"lineNumber": 948,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "evt",
"description": "Event name"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "cfg",
"description": "Config object"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "feature",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#feature",
"access": null,
"description": "Return a feature instance for a given name",
"lineNumber": 1028,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "name",
"description": "Name of the feature"
}
],
"return": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "initExtensions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#initExtensions",
"access": null,
"description": "Initialise all the extensions defined in the configuration object",
"lineNumber": 1035,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "loadExtension",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loadExtension",
"access": null,
"description": "Load an extension module",
"lineNumber": 1050,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "ext",
"description": "Extension config object"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "extension",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#extension",
"access": null,
"description": "Get an extension instance",
"lineNumber": 1078,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "name",
"description": "Name of the extension"
}
],
"return": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": "Extension instance"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "hasExtension",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasExtension",
"access": null,
"description": "Check passed extension name exists",
"lineNumber": 1087,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "name",
"description": "Name of the extension"
}
],
"return": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroyExtensions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#destroyExtensions",
"access": null,
"description": "Destroy all the extensions defined in the configuration object",
"lineNumber": 1094,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "loadThemes",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loadThemes",
"access": null,
"description": null,
"lineNumber": 1107,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_loadThemes",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_loadThemes",
"access": null,
"description": "Load themes defined in the configuration object",
"lineNumber": 1114,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnResetText",
"access": null,
"description": null,
"lineNumber": 1142,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnResetHtml",
"access": null,
"description": null,
"lineNumber": 1143,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnPrevPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnPrevPageHtml",
"access": null,
"description": null,
"lineNumber": 1147,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnNextPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnNextPageHtml",
"access": null,
"description": null,
"lineNumber": 1149,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnFirstPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnFirstPageHtml",
"access": null,
"description": null,
"lineNumber": 1151,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "btnLastPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnLastPageHtml",
"access": null,
"description": null,
"lineNumber": 1153,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loader",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loader",
"access": null,
"description": null,
"lineNumber": 1157,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loaderHtml",
"access": null,
"description": null,
"lineNumber": 1158,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "loaderText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loaderText",
"access": null,
"description": null,
"lineNumber": 1159,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getStylesheet",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getStylesheet",
"access": null,
"description": "Return stylesheet DOM element for a given theme name",
"lineNumber": 1166,
"params": [
{
"name": "name",
"optional": true,
"types": [
"string"
],
"defaultRaw": "default",
"defaultValue": "default"
}
],
"return": {
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"description": "stylesheet element"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#destroy",
"access": null,
"description": "Destroy filter grid",
"lineNumber": 1173,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "fltGridEl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltGridEl",
"access": null,
"description": null,
"lineNumber": 1212,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFlt",
"access": null,
"description": null,
"lineNumber": 1225,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "isStartBgAlternate",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isStartBgAlternate",
"access": null,
"description": null,
"lineNumber": 1226,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "_hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_hasGrid",
"access": null,
"description": null,
"lineNumber": 1227,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "tbl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#tbl",
"access": null,
"description": null,
"lineNumber": 1228,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setToolbar",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#setToolbar",
"access": null,
"description": "Generate container element for paging, reset button, rows counter etc.",
"lineNumber": 1234,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
"lineNumber": 1259,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "lDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lDiv",
"access": null,
"description": null,
"lineNumber": 1265,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "rDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rDiv",
"access": null,
"description": null,
"lineNumber": 1272,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "mDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#mDiv",
"access": null,
"description": null,
"lineNumber": 1278,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "helpInstructions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#helpInstructions",
"access": null,
"description": null,
"lineNumber": 1287,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "removeToolbar",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#removeToolbar",
"access": null,
"description": "Remove toolbar container element",
"lineNumber": 1294,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
"lineNumber": 1299,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "removeExternalFlts",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#removeExternalFlts",
"access": null,
"description": "Remove all the external column filters",
"lineNumber": 1313,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "isCustomOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isCustomOptions",
"access": null,
"description": "Check if given column implements a filter with custom options",
"lineNumber": 1333,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column's index"
}
],
"return": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getCustomOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getCustomOptions",
"access": null,
"description": "Returns an array [[value0, value1 ...],[text0, text1 ...]] with the\ncustom options values and texts",
"lineNumber": 1344,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column's index"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "resetValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#resetValues",
"access": null,
"description": null,
"lineNumber": 1372,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_resetValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_resetValues",
"access": null,
"description": "Reset persisted filter values",
"lineNumber": 1379,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_resetGridValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_resetGridValues",
"access": null,
"description": "Reset persisted filter values when load filters on demand feature is\nenabled",
"lineNumber": 1397,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "name",
"description": "cookie name storing filter values"
}
],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasStoredValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasStoredValues",
"access": null,
"description": null,
"lineNumber": 1423,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasStoredValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasStoredValues",
"access": null,
"description": null,
"lineNumber": 1434,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "hasStoredValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasStoredValues",
"access": null,
"description": null,
"lineNumber": 1466,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "filter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#filter",
"access": null,
"description": null,
"lineNumber": 1477,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_filter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_filter",
"access": null,
"description": "Filter the table by retrieving the data from each cell in every single\nrow and comparing it to the search term for current column. A row is\nhidden when all the search terms are not found in inspected row.\n\nTODO: Reduce complexity of this massive method",
"lineNumber": 1488,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 1501,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "searchArgs",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#searchArgs",
"access": null,
"description": null,
"lineNumber": 1516,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 1847,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbHiddenRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
"access": null,
"description": null,
"lineNumber": 1848,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "applyProps",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#applyProps",
"access": null,
"description": "Re-apply the features/behaviour concerned by filtering/paging operation\n\nNOTE: this will disappear whenever custom events in place",
"lineNumber": 1875,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getColValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getColValues",
"access": null,
"description": "Return the data of a specified colum",
"lineNumber": 1908,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colindex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "num",
"description": "Return unformatted number"
},
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "exclude",
"description": "List of row indexes to be excluded"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "Flat list of data for a column"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilterValue",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFilterValue",
"access": null,
"description": "Return the filter's value of a specified column",
"lineNumber": 1949,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Column index"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": "Filter value"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFiltersValue",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFiltersValue",
"access": null,
"description": "Return the filters' values",
"lineNumber": 1995,
"params": [],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "List of filters' values"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFilterId",
"access": null,
"description": "Return the ID of the filter of a specified column",
"lineNumber": 2014,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Column's index"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": "ID of the filter element"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFiltersByType",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFiltersByType",
"access": null,
"description": "Return the list of ids of filters matching a specified type.\nNote: hidden filters are also returned",
"lineNumber": 2030,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "type",
"description": "Filter type string ('input', 'select', 'multiple',\n 'checklist')"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "bool",
"description": "If true returns columns indexes instead of IDs"
}
],
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "List of element IDs or column indexes"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilterElement",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFilterElement",
"access": null,
"description": "Return the filter's DOM element for a given column",
"lineNumber": 2050,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Column's index"
}
],
"return": {
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getCellsNb",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getCellsNb",
"access": null,
"description": "Return the number of cells for a given row index",
"lineNumber": 2060,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "rowIndex",
"description": "Index of the row"
}
],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": "Number of cells"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getRowsNb",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getRowsNb",
"access": null,
"description": "Return the number of filterable rows starting from reference row if\ndefined",
"lineNumber": 2071,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "includeHeaders",
"description": "Include the headers row"
}
],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": "Number of filterable rows"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getCellData",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getCellData",
"access": null,
"description": "Return the data of a given cell",
"lineNumber": 2084,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "i",
"description": "Column's index"
},
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "cell",
"description": "Cell's DOM object"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getTableData",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getTableData",
"access": null,
"description": "Return the table data with following format:\n[\n [rowIndex, [value0, value1...]],\n [rowIndex, [value0, value1...]]\n]",
"lineNumber": 2106,
"params": [],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "TODO: provide an API returning data in JSON format"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilteredData",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFilteredData",
"access": null,
"description": "Return the filtered data with following format:\n[\n [rowIndex, [value0, value1...]],\n [rowIndex, [value0, value1...]]\n]",
"lineNumber": 2132,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "includeHeaders",
"description": "Include headers row"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "TODO: provide an API returning data in JSON format"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilteredDataCol",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFilteredDataCol",
"access": null,
"description": "Return the filtered data for a given column index",
"lineNumber": 2170,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Colmun's index"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "Flat list of values ['val0','val1','val2'...]\n\nTODO: provide an API returning data in JSON format"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getRowDisplay",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getRowDisplay",
"access": null,
"description": "Get the display value of a row",
"lineNumber": 2192,
"params": [
{
"nullable": null,
"types": [
"RowElement"
],
"spread": false,
"optional": false,
"name": "DOM",
"description": "element of the row"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": "Usually 'none' or ''"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "validateRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validateRow",
"access": null,
"description": "Validate/invalidate row by setting the 'validRow' attribute on the row",
"lineNumber": 2204,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "rowIndex",
"description": "Index of the row"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isValid",
"description": ""
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "validateAllRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validateAllRows",
"access": null,
"description": "Validate all filterable rows",
"lineNumber": 2227,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 2231,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setFilterValue",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#setFilterValue",
"access": null,
"description": "Set search value to a given filter",
"lineNumber": 2243,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Column's index"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "searcharg",
"description": "Search term"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "setColWidths",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#setColWidths",
"access": null,
"description": "Set them columns' widths as per configuration",
"lineNumber": 2305,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "rowIndex",
"description": "Optional row index to apply the widths to"
},
{
"nullable": null,
"types": [
"Element"
],
"spread": false,
"optional": false,
"name": "tbl",
"description": "DOM element"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "enforceVisibility",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enforceVisibility",
"access": null,
"description": "Makes defined rows always visible",
"lineNumber": 2350,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "clearFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#clearFilters",
"access": null,
"description": null,
"lineNumber": 2363,
"undocument": true,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_clearFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_clearFilters",
"access": null,
"description": "Clear all the filters' values",
"lineNumber": 2370,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "activeFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
"lineNumber": 2381,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "clearActiveColumns",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#clearActiveColumns",
"access": null,
"description": "Clears filtered columns visual indicator (background color)",
"lineNumber": 2393,
"params": [],
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "linkFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#linkFilters",
"access": null,
"description": "Refresh the filters subject to linking ('select', 'multiple',\n'checklist' type)",
"lineNumber": 2404,
"params": [],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_resetGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_resetGrid",
"access": null,
"description": "Re-generate the filters grid bar when previously removed",
"lineNumber": 2458,
"params": [],
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbFilterableRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
"lineNumber": 2508,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 2509,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "nbRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbRows",
"access": null,
"description": null,
"lineNumber": 2510,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "_hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_hasGrid",
"access": null,
"description": null,
"lineNumber": 2520,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "_containsStr",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_containsStr",
"access": null,
"description": "Checks if passed data contains the searched arg",
"lineNumber": 2534,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "arg",
"description": "Search term"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "data",
"description": "Data string"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "fltType",
"description": "Filter type ('input', 'select')"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "forceMatch",
"description": "Exact match"
}
],
"return": {
"nullable": null,
"types": [
"Boolean]"
],
"spread": false,
"description": "TODO: move into string module, remove fltType in order to decouple it\nfrom TableFilter module"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "isImported",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isImported",
"access": null,
"description": "Check if passed script or stylesheet is already imported",
"lineNumber": 2556,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "filePath",
"description": "Ressource path"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "type",
"description": "Possible values: 'script' or 'link'"
}
],
"return": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "import",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#import",
"access": null,
"description": "Import script or stylesheet",
"lineNumber": 2580,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "fileId",
"description": "Ressource ID"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "filePath",
"description": "Ressource path"
},
{
"nullable": null,
"types": [
"Function"
],
"spread": false,
"optional": false,
"name": "callback",
"description": "Callback"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "type",
"description": "Possible values: 'script' or 'link'"
}
],
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasGrid",
"access": null,
"description": "Check if table has filters grid",
"lineNumber": 2625,
"params": [],
"return": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFiltersId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFiltersId",
"access": null,
"description": "Get list of filter IDs",
"lineNumber": 2633,
"params": [],
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getValidRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getValidRows",
"access": null,
"description": "Get filtered (valid) rows indexes",
"lineNumber": 2642,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "reCalc",
"description": "Force calculation of filtered rows list"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "List of row indexes"
},
"generator": false
},
{
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 2647,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFiltersRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFiltersRowIndex",
"access": null,
"description": "Get the index of the row containing the filters",
"lineNumber": 2668,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getHeadersRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getHeadersRowIndex",
"access": null,
"description": "Get the index of the headers row",
"lineNumber": 2676,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getStartRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getStartRowIndex",
"access": null,
"description": "Get the row index from where the filtering process start (1st filterable\nrow)",
"lineNumber": 2685,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getLastRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getLastRowIndex",
"access": null,
"description": "Get the index of the last row",
"lineNumber": 2693,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getHeaderElement",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getHeaderElement",
"access": null,
"description": "Get the header DOM element for a given column index",
"lineNumber": 2705,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"return": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilterType",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFilterType",
"access": null,
"description": "Return the filter type for a specified column",
"lineNumber": 2730,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column's index"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "getFilterableRowsNb",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getFilterableRowsNb",
"access": null,
"description": "Get the total number of filterable rows",
"lineNumber": 2739,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "method",
"static": false,
"variation": null,
"name": "config",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#config",
"access": null,
"description": "Get the configuration object (literal object)",
"lineNumber": 2747,
"params": [],
"return": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"kind": "file",
"static": true,
"variation": null,
"name": "src/types.js",
"memberof": null,
"longname": "src/types.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\r\n * Types utilities\r\n */\r\n\r\nconst UNDEFINED = void 0;\r\n\r\nexport default {\r\n /**\r\n * Check if argument is an object or a global object\r\n * @param {String or Object} v\r\n * @return {Boolean}\r\n */\r\n isObj(v){\r\n let isO = false;\r\n if(typeof v === 'string'){\r\n if(window[v] && typeof window[v] === 'object'){\r\n isO = true;\r\n }\r\n } else {\r\n if(v && typeof v === 'object'){\r\n isO = true;\r\n }\r\n }\r\n return isO;\r\n },\r\n\r\n /**\r\n * Check if argument is a function\r\n * @param {Function} fn\r\n * @return {Boolean}\r\n */\r\n isFn(fn){\r\n return (fn && fn.constructor == Function);\r\n },\r\n\r\n /**\r\n * Check if argument is an array\r\n * @param {Array} obj\r\n * @return {Boolean}\r\n */\r\n isArray(obj){\r\n return (obj && obj.constructor == Array);\r\n },\r\n\r\n /**\r\n * Determine if argument is undefined\r\n * @param {Any} o\r\n * @return {Boolean}\r\n */\r\n isUndef(o){\r\n return o === UNDEFINED;\r\n },\r\n\r\n /**\r\n * Determine if argument is null\r\n * @param {Any} o\r\n * @return {Boolean}\r\n */\r\n isNull(o){\r\n return o === null;\r\n },\r\n\r\n /**\r\n * Determine if argument is empty (undefined, null or empty string)\r\n * @param {Any} o\r\n * @return {Boolean}\r\n */\r\n isEmpty(o){\r\n return this.isUndef(o) || this.isNull(o) || o.length===0;\r\n }\r\n};\r\n"
},
{
"kind": "variable",
"static": true,
"variation": null,
"name": "UNDEFINED",
"memberof": "src/types.js",
"longname": "src/types.js~UNDEFINED",
"access": null,
"export": false,
"importPath": "TableFilter/src/types.js",
"importStyle": null,
"description": "Types utilities",
"lineNumber": 5,
"type": {
"types": [
"*"
]
}
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Infinity",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Infinity",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "NaN",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~NaN",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "undefined",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~undefined",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "null",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~null",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Object",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Object",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "object",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~object",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Function",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Function",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "function",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~function",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Boolean",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Boolean",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "boolean",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~boolean",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Symbol",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Symbol",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Error",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Error",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "EvalError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~EvalError",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "InternalError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~InternalError",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "RangeError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~RangeError",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "ReferenceError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~ReferenceError",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "SyntaxError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~SyntaxError",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "TypeError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~TypeError",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "URIError",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~URIError",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Number",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Number",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "number",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~number",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Date",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Date",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "String",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~String",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "string",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~string",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "RegExp",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~RegExp",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Int8Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Int8Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Uint8Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Uint8ClampedArray",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Int16Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Int16Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Uint16Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Uint16Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Int32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Int32Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Uint32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Uint32Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Float32Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Float32Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Float64Array",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Float64Array",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Map",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Map",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Set",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Set",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "WeakMap",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~WeakMap",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "WeakSet",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~WeakSet",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "ArrayBuffer",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "DataView",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~DataView",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "JSON",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~JSON",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Promise",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Promise",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Generator",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Generator",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "GeneratorFunction",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Reflect",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Reflect",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Proxy",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
"memberof": "BuiltinExternal/ECMAScriptExternal.js",
"longname": "BuiltinExternal/ECMAScriptExternal.js~Proxy",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "CanvasRenderingContext2D",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "DocumentFragment",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~DocumentFragment",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Element",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Element",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~Element",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Event",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Event",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~Event",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "Node",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Node",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~Node",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "NodeList",
"externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/NodeList",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~NodeList",
"access": null,
"description": null,
"builtinExternal": true
},
{
"kind": "external",
"static": true,
"variation": null,
"name": "XMLHttpRequest",
"externalLink": "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest",
"access": null,
"description": null,
"builtinExternal": true
}
]