1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2026-03-16 15:45:45 +01:00
TableFilter/docs/dump.json
koalyptus b87e0d9084 publish Docs to gh-pages (auto)
branch:       master
SHA:          02668ed843
range SHA:    df1028acbc57...02668ed843cf
build id:     125785568
build number: 280
2016-04-26 09:43:42 +00:00

20158 lines
No EOL
764 KiB
JSON

[
{
"__docId__": 0,
"kind": "file",
"static": true,
"variation": null,
"name": "src/array.js",
"memberof": null,
"longname": "src/array.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\n * Array utilities\n */\n\nimport Str from './string';\n\nexport default {\n has: function(arr, val, caseSensitive){\n let sCase = caseSensitive===undefined ? false : caseSensitive;\n for (var i=0; i<arr.length; i++){\n if(Str.matchCase(arr[i].toString(), sCase) == val){\n return true;\n }\n }\n return false;\n }\n};\n"
},
{
"__docId__": 1,
"kind": "file",
"static": true,
"variation": null,
"name": "src/cookie.js",
"memberof": null,
"longname": "src/cookie.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\n * Cookie utilities\n */\n\nexport default {\n\n write(name, value, hours){\n let expire = '';\n if(hours){\n expire = new Date((new Date()).getTime() + hours * 3600000);\n expire = '; expires=' + expire.toGMTString();\n }\n document.cookie = name + '=' + escape(value) + expire;\n },\n\n read(name){\n let cookieValue = '',\n search = name + '=';\n if(document.cookie.length > 0){\n let cookie = document.cookie,\n offset = cookie.indexOf(search);\n if(offset !== -1){\n offset += search.length;\n let end = cookie.indexOf(';', offset);\n if(end === -1){\n end = cookie.length;\n }\n cookieValue = unescape(cookie.substring(offset, end));\n }\n }\n return cookieValue;\n },\n\n remove(name){\n this.write(name, '', -1);\n },\n\n valueToArray(name, separator){\n if(!separator){\n separator = ',';\n }\n //reads the cookie\n let val = this.read(name);\n //creates an array with filters' values\n let arr = val.split(separator);\n return arr;\n },\n\n getValueByIndex(name, index, separator){\n if(!separator){\n separator = ',';\n }\n //reads the cookie\n let val = this.valueToArray(name, separator);\n return val[index];\n }\n\n};\n"
},
{
"__docId__": 2,
"kind": "file",
"static": true,
"variation": null,
"name": "src/date.js",
"memberof": null,
"longname": "src/date.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\n * Date utilities\n */\n\nexport default {\n isValid(dateStr, format){\n if(!format) {\n format = 'DMY';\n }\n format = format.toUpperCase();\n if(format.length != 3) {\n if(format === 'DDMMMYYYY'){\n let d = this.format(dateStr, format);\n dateStr = d.getDate() +'/'+ (d.getMonth()+1) +'/'+\n d.getFullYear();\n format = 'DMY';\n }\n }\n if((format.indexOf('M') === -1) || (format.indexOf('D') === -1) ||\n (format.indexOf('Y') === -1)){\n format = 'DMY';\n }\n let reg1, reg2;\n // If the year is first\n if(format.substring(0, 1) === 'Y') {\n reg1 = /^\\d{2}(\\-|\\/|\\.)\\d{1,2}\\1\\d{1,2}$/;\n reg2 = /^\\d{4}(\\-|\\/|\\.)\\d{1,2}\\1\\d{1,2}$/;\n } else if(format.substring(1, 2) === 'Y') { // If the year is second\n reg1 = /^\\d{1,2}(\\-|\\/|\\.)\\d{2}\\1\\d{1,2}$/;\n reg2 = /^\\d{1,2}(\\-|\\/|\\.)\\d{4}\\1\\d{1,2}$/;\n } else { // The year must be third\n reg1 = /^\\d{1,2}(\\-|\\/|\\.)\\d{1,2}\\1\\d{2}$/;\n reg2 = /^\\d{1,2}(\\-|\\/|\\.)\\d{1,2}\\1\\d{4}$/;\n }\n // If it doesn't conform to the right format (with either a 2 digit year\n // or 4 digit year), fail\n if(reg1.test(dateStr) === false && reg2.test(dateStr) === false) {\n return false;\n }\n // Split into 3 parts based on what the divider was\n let parts = dateStr.split(RegExp.$1);\n let mm, dd, yy;\n // Check to see if the 3 parts end up making a valid date\n if(format.substring(0, 1) === 'M'){\n mm = parts[0];\n } else if(format.substring(1, 2) === 'M'){\n mm = parts[1];\n } else {\n mm = parts[2];\n }\n if(format.substring(0, 1) === 'D'){\n dd = parts[0];\n } else if(format.substring(1, 2) === 'D'){\n dd = parts[1];\n } else {\n dd = parts[2];\n }\n if(format.substring(0, 1) === 'Y'){\n yy = parts[0];\n } else if(format.substring(1, 2) === 'Y'){\n yy = parts[1];\n } else {\n yy = parts[2];\n }\n if(parseInt(yy, 10) <= 50){\n yy = (parseInt(yy, 10) + 2000).toString();\n }\n if(parseInt(yy, 10) <= 99){\n yy = (parseInt(yy, 10) + 1900).toString();\n }\n let dt = new Date(\n parseInt(yy, 10), parseInt(mm, 10)-1, parseInt(dd, 10),\n 0, 0, 0, 0);\n if(parseInt(dd, 10) != dt.getDate()){\n return false;\n }\n if(parseInt(mm, 10)-1 != dt.getMonth()){\n return false;\n }\n return true;\n },\n format(dateStr, formatStr) {\n if(!formatStr){\n formatStr = 'DMY';\n }\n if(!dateStr || dateStr === ''){\n return new Date(1001, 0, 1);\n }\n let oDate;\n let parts;\n\n switch(formatStr.toUpperCase()){\n case 'DDMMMYYYY':\n parts = dateStr.replace(/[- \\/.]/g,' ').split(' ');\n oDate = new Date(y2kDate(parts[2]),mmm2mm(parts[1])-1,parts[0]);\n break;\n case 'DMY':\n /* eslint-disable */\n parts = dateStr.replace(\n /^(0?[1-9]|[12][0-9]|3[01])([- \\/.])(0?[1-9]|1[012])([- \\/.])((\\d\\d)?\\d\\d)$/,'$1 $3 $5').split(' ');\n oDate = new Date(y2kDate(parts[2]),parts[1]-1,parts[0]);\n /* eslint-enable */\n break;\n case 'MDY':\n /* eslint-disable */\n parts = dateStr.replace(\n /^(0?[1-9]|1[012])([- \\/.])(0?[1-9]|[12][0-9]|3[01])([- \\/.])((\\d\\d)?\\d\\d)$/,'$1 $3 $5').split(' ');\n oDate = new Date(y2kDate(parts[2]),parts[0]-1,parts[1]);\n /* eslint-enable */\n break;\n case 'YMD':\n /* eslint-disable */\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(' ');\n oDate = new Date(y2kDate(parts[0]),parts[1]-1,parts[2]);\n /* eslint-enable */\n break;\n default: //in case format is not correct\n /* eslint-disable */\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(' ');\n oDate = new Date(y2kDate(parts[2]),parts[1]-1,parts[0]);\n /* eslint-enable */\n break;\n }\n return oDate;\n }\n};\n\nfunction y2kDate(yr){\n if(yr === undefined){\n return 0;\n }\n if(yr.length>2){\n return yr;\n }\n let y;\n //>50 belong to 1900\n if(yr <= 99 && yr>50){\n y = '19' + yr;\n }\n //<50 belong to 2000\n if(yr<50 || yr === '00'){\n y = '20' + yr;\n }\n return y;\n}\n\nfunction mmm2mm(mmm){\n if(mmm === undefined){\n return 0;\n }\n let mondigit;\n let MONTH_NAMES = [\n 'january','february','march','april','may','june','july',\n 'august','september','october','november','december',\n 'jan','feb','mar','apr','may','jun','jul','aug','sep','oct',\n 'nov','dec'\n ];\n for(let m_i=0; m_i < MONTH_NAMES.length; m_i++){\n let month_name = MONTH_NAMES[m_i];\n if (mmm.toLowerCase() === month_name){\n mondigit = m_i+1;\n break;\n }\n }\n if(mondigit > 11 || mondigit < 23){\n mondigit = mondigit - 12;\n }\n if(mondigit < 1 || mondigit > 12){\n return 0;\n }\n return mondigit;\n}\n"
},
{
"__docId__": 3,
"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
},
{
"__docId__": 4,
"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
},
{
"__docId__": 5,
"kind": "file",
"static": true,
"variation": null,
"name": "src/dom.js",
"memberof": null,
"longname": "src/dom.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Types from './types';\nimport Str from './string';\n\n/**\n * DOM utilities\n */\n\nexport default {\n\n /**\n * Returns text + text of children of given node\n * @param {NodeElement} node\n * @return {String}\n */\n getText(node){\n if(Types.isUndef(node.textContent)) {\n return Str.trim(node.innerText);\n }\n return Str.trim(node.textContent);\n },\n\n /**\n * Returns the first text node contained in the supplied node\n * @param {NodeElement} node node\n * @return {String}\n */\n getFirstTextNode(node){\n for(let i=0; i<node.childNodes.length; i++){\n let n = node.childNodes[i];\n if(n.nodeType === 3){\n return n.data;\n }\n }\n },\n\n /**\n * Creates an html element with given collection of attributes\n * @param {String} tag a string of the html tag to create\n * @param {Array} an undetermined number of arrays containing the with 2\n * items, the attribute name and its value ['id','myId']\n * @return {Object} created element\n */\n create(tag){\n if(!tag || tag===''){\n return;\n }\n\n let el = document.createElement(tag),\n args = arguments;\n\n if(args.length > 1){\n for(let i=0; i<args.length; i++){\n let argtype = typeof args[i];\n if(argtype.toLowerCase() === 'object' && args[i].length === 2){\n el.setAttribute(args[i][0], args[i][1]);\n }\n }\n }\n return el;\n },\n\n /**\n * Removes passed node from DOM\n * @param {DOMElement} node\n * @return {DOMElement} old node reference\n */\n remove(node){\n return node.parentNode.removeChild(node);\n },\n\n /**\n * Returns a text node with given text\n * @param {String} txt\n * @return {Object}\n */\n text(txt){\n return document.createTextNode(txt);\n },\n\n hasClass(ele, cls){\n if(!ele){ return false; }\n\n if(supportsClassList()){\n return ele.classList.contains(cls);\n }\n return ele.className.match(new RegExp('(\\\\s|^)'+ cls +'(\\\\s|$)'));\n },\n\n addClass(ele, cls){\n if(!ele){ return; }\n\n if(supportsClassList()){\n ele.classList.add(cls);\n return;\n }\n\n if(ele.className === ''){\n ele.className = cls;\n }\n else if(!this.hasClass(ele, cls)){\n ele.className += ' ' + cls;\n }\n },\n\n removeClass(ele, cls){\n if(!ele){ return; }\n\n if(supportsClassList()){\n ele.classList.remove(cls);\n return;\n }\n let reg = new RegExp('(\\\\s|^)'+ cls +'(\\\\s|$)', 'g');\n ele.className = ele.className.replace(reg, '');\n },\n\n /**\n * Creates and returns an option element\n * @param {String} text option text\n * @param {String} value option value\n * @param {Boolean} isSel whether option is selected\n * @return {Object} option element\n */\n createOpt(text, value, isSel){\n let isSelected = isSel ? true : false,\n opt = isSelected ?\n this.create('option', ['value',value], ['selected','true']) :\n this.create('option', ['value',value]);\n opt.appendChild(this.text(text));\n return opt;\n },\n\n /**\n * Creates and returns a checklist item\n * @param {Number} chkIndex index of check item\n * @param {String} chkValue check item value\n * @param {String} labelText check item label text\n * @return {Object} li DOM element\n */\n createCheckItem(chkIndex, chkValue, labelText){\n let li = this.create('li'),\n label = this.create('label', ['for', chkIndex]),\n check = this.create('input',\n ['id', chkIndex],\n ['name', chkIndex],\n ['type', 'checkbox'],\n ['value', chkValue]\n );\n label.appendChild(check);\n label.appendChild(this.text(labelText));\n li.appendChild(label);\n li.label = label;\n li.check = check;\n return li;\n },\n\n id(key){\n return document.getElementById(key);\n },\n\n tag(o, tagname){\n return o.getElementsByTagName(tagname);\n }\n};\n\n// HTML5 classList API\nfunction supportsClassList(){\n return document.documentElement.classList;\n}\n"
},
{
"__docId__": 6,
"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": 166,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 7,
"kind": "file",
"static": true,
"variation": null,
"name": "src/emitter.js",
"memberof": null,
"longname": "src/emitter.js",
"access": null,
"description": null,
"lineNumber": 4,
"content": "/**\n * Event emitter class\n */\nexport class Emitter {\n constructor() {\n /**\n * Events object\n * @type {Object}\n */\n this.events = {};\n }\n\n /**\n * Subscribe to an event\n * @param {Array} evts Collection of event names\n * @param {Function} fn Function invoked when event is emitted\n */\n on(evts, fn) {\n evts.forEach((evt)=> {\n this.events[evt] = this.events[evt] || [];\n this.events[evt].push(fn);\n });\n }\n\n /**\n * Unsubscribe to an event\n * @param {Array} evts Collection of event names\n * @param {Function} fn Function invoked when event is emitted\n */\n off(evts, fn) {\n evts.forEach((evt)=> {\n if(evt in this.events) {\n this.events[evt].splice(this.events[evt].indexOf(fn), 1);\n }\n });\n }\n\n /**\n * Emit an event\n * @param {String} evt Event name followed by any other argument passed to\n * the invoked function\n */\n emit(evt /*, args...*/) {\n if(evt in this.events) {\n for(let i = 0; i < this.events[evt].length; i++) {\n this.events[evt][i].apply(this, [].slice.call(arguments, 1));\n }\n }\n }\n}\n"
},
{
"__docId__": 8,
"kind": "class",
"static": true,
"variation": null,
"name": "Emitter",
"memberof": "src/emitter.js",
"longname": "src/emitter.js~Emitter",
"access": null,
"export": true,
"importPath": "tablefilter/src/emitter.js",
"importStyle": "{Emitter}",
"description": "Event emitter class",
"lineNumber": 4,
"interface": false
},
{
"__docId__": 9,
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/emitter.js~Emitter",
"longname": "src/emitter.js~Emitter#constructor",
"access": null,
"description": null,
"lineNumber": 5,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 10,
"kind": "member",
"static": false,
"variation": null,
"name": "events",
"memberof": "src/emitter.js~Emitter",
"longname": "src/emitter.js~Emitter#events",
"access": null,
"description": "Events object",
"lineNumber": 10,
"type": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": null
}
},
{
"__docId__": 11,
"kind": "method",
"static": false,
"variation": null,
"name": "on",
"memberof": "src/emitter.js~Emitter",
"longname": "src/emitter.js~Emitter#on",
"access": null,
"description": "Subscribe to an event",
"lineNumber": 18,
"params": [
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "evts",
"description": "Collection of event names"
},
{
"nullable": null,
"types": [
"Function"
],
"spread": false,
"optional": false,
"name": "fn",
"description": "Function invoked when event is emitted"
}
],
"generator": false
},
{
"__docId__": 12,
"kind": "method",
"static": false,
"variation": null,
"name": "off",
"memberof": "src/emitter.js~Emitter",
"longname": "src/emitter.js~Emitter#off",
"access": null,
"description": "Unsubscribe to an event",
"lineNumber": 30,
"params": [
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "evts",
"description": "Collection of event names"
},
{
"nullable": null,
"types": [
"Function"
],
"spread": false,
"optional": false,
"name": "fn",
"description": "Function invoked when event is emitted"
}
],
"generator": false
},
{
"__docId__": 13,
"kind": "method",
"static": false,
"variation": null,
"name": "emit",
"memberof": "src/emitter.js~Emitter",
"longname": "src/emitter.js~Emitter#emit",
"access": null,
"description": "Emit an event",
"lineNumber": 43,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "evt",
"description": "Event name followed by any other argument passed to\nthe invoked function"
}
],
"generator": false
},
{
"__docId__": 14,
"kind": "file",
"static": true,
"variation": null,
"name": "src/event.js",
"memberof": null,
"longname": "src/event.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\n * DOM event utilities\n */\n\nexport default {\n add(obj, type, func, capture){\n if(obj.addEventListener){\n obj.addEventListener(type, func, capture);\n }\n else if(obj.attachEvent){\n obj.attachEvent('on'+type, func);\n } else {\n obj['on'+type] = func;\n }\n },\n remove(obj, type, func, capture){\n if(obj.detachEvent){\n obj.detachEvent('on'+type,func);\n }\n else if(obj.removeEventListener){\n obj.removeEventListener(type, func, capture);\n } else {\n obj['on'+type] = null;\n }\n },\n stop(evt){\n if(!evt){\n evt = window.event;\n }\n if(evt.stopPropagation){\n evt.stopPropagation();\n } else {\n evt.cancelBubble = true;\n }\n },\n cancel(evt){\n if(!evt){\n evt = window.event;\n }\n if(evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n },\n target(evt){\n return (evt && evt.target) || (window.event && window.event.srcElement);\n },\n keyCode(evt){\n return evt.charCode ? evt.charCode :\n (evt.keyCode ? evt.keyCode: (evt.which ? evt.which : 0));\n }\n};\n"
},
{
"__docId__": 15,
"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';\n\nexport default class AdapterEzEditTable {\n /**\n * Adapter module for ezEditTable, an external library providing advanced\n * grid features (selection and edition):\n * http://codecanyon.net/item/ezedittable-enhance-html-tables/2425123?ref=koalyptus\n *\n * @param {Object} tf TableFilter instance\n */\n constructor(tf, cfg){\n // ezEditTable config\n this.initialized = false;\n this.desc = cfg.description || 'ezEditTable adapter';\n this.filename = cfg.filename || 'ezEditTable.js';\n this.vendorPath = cfg.vendor_path;\n this.loadStylesheet = Boolean(cfg.load_stylesheet);\n this.stylesheet = cfg.stylesheet || this.vendorPath + 'ezEditTable.css';\n this.stylesheetName = cfg.stylesheet_name || 'ezEditTableCss';\n this.err = 'Failed to instantiate EditTable object.\\n\"ezEditTable\" ' +\n 'dependency not found.';\n // Enable the ezEditTable's scroll into view behaviour if grid layout on\n cfg.scroll_into_view = cfg.scroll_into_view===false ?\n false : tf.gridLayout;\n\n this._ezEditTable = null;\n this.cfg = cfg;\n this.tf = tf;\n this.emitter = tf.emitter;\n }\n\n /**\n * Conditionally load ezEditTable library and set advanced grid\n * @return {[type]} [description]\n */\n init(){\n var tf = this.tf;\n if(window.EditTable){\n this._setAdvancedGrid();\n } else {\n var path = this.vendorPath + this.filename;\n tf.import(this.filename, path, ()=> { this._setAdvancedGrid(); });\n }\n if(this.loadStylesheet && !tf.isImported(this.stylesheet, 'link')){\n tf.import(this.stylesheetName, this.stylesheet, null, 'link');\n }\n\n // TODO: hack to prevent ezEditTable enter key event hijaking.\n // Needs to be fixed in the vendor's library\n this.emitter.on(['filter-focus', 'filter-blur'],\n ()=> this._toggleForInputFilter());\n }\n\n /**\n * Instantiate ezEditTable component for advanced grid features\n */\n _setAdvancedGrid(){\n var tf = this.tf;\n\n //start row for EditTable constructor needs to be calculated\n var startRow,\n cfg = this.cfg,\n thead = Dom.tag(tf.tbl, 'thead');\n\n //if thead exists and startRow not specified, startRow is calculated\n //automatically by EditTable\n if(thead.length > 0 && !cfg.startRow){\n startRow = undefined;\n }\n //otherwise startRow config property if any or TableFilter refRow\n else{\n startRow = cfg.startRow || tf.refRow;\n }\n\n cfg.base_path = cfg.base_path || tf.basePath + 'ezEditTable/';\n var editable = cfg.editable;\n var selectable = cfg.selection;\n\n if(selectable){\n cfg.default_selection = cfg.default_selection || 'row';\n }\n //CSS Styles\n cfg.active_cell_css = cfg.active_cell_css || 'ezETSelectedCell';\n\n var _lastValidRowIndex = 0;\n var _lastRowIndex = 0;\n\n if(selectable){\n //Row navigation needs to be calculated according to TableFilter's\n //validRowsIndex array\n var onAfterSelection = function(et, selectedElm, e){\n var slc = et.Selection;\n //Next valid filtered row needs to be selected\n var doSelect = function(nextRowIndex){\n if(et.defaultSelection === 'row'){\n /* eslint-disable */\n slc.SelectRowByIndex(nextRowIndex);\n /* eslint-enable */\n } else {\n /* eslint-disable */\n et.ClearSelections();\n /* eslint-enable */\n var cellIndex = selectedElm.cellIndex,\n row = tf.tbl.rows[nextRowIndex];\n if(et.defaultSelection === 'both'){\n /* eslint-disable */\n slc.SelectRowByIndex(nextRowIndex);\n /* eslint-enable */\n }\n if(row){\n /* eslint-disable */\n slc.SelectCell(row.cells[cellIndex]);\n /* eslint-enable */\n }\n }\n //Table is filtered\n if(tf.validRowsIndex.length !== tf.getRowsNb()){\n var r = tf.tbl.rows[nextRowIndex];\n if(r){\n r.scrollIntoView(false);\n }\n if(cell){\n if(cell.cellIndex === (tf.getCellsNb()-1) &&\n tf.gridLayout){\n tf.tblCont.scrollLeft = 100000000;\n }\n else if(cell.cellIndex===0 && tf.gridLayout){\n tf.tblCont.scrollLeft = 0;\n } else {\n cell.scrollIntoView(false);\n }\n }\n }\n };\n\n //table is not filtered\n if(!tf.validRowsIndex){\n return;\n }\n var validIndexes = tf.validRowsIndex,\n validIdxLen = validIndexes.length,\n row = et.defaultSelection !== 'row' ?\n selectedElm.parentNode : selectedElm,\n //cell for default_selection = 'both' or 'cell'\n cell = selectedElm.nodeName==='TD' ? selectedElm : null,\n /* eslint-disable */\n keyCode = e !== undefined ? et.Event.GetKey(e) : 0,\n /* eslint-enable */\n isRowValid = validIndexes.indexOf(row.rowIndex) !== -1,\n nextRowIndex,\n paging = tf.feature('paging'),\n //pgup/pgdown keys\n d = (keyCode === 34 || keyCode === 33 ?\n (paging && paging.pagingLength || et.nbRowsPerPage) :1);\n\n //If next row is not valid, next valid filtered row needs to be\n //calculated\n if(!isRowValid){\n //Selection direction up/down\n if(row.rowIndex>_lastRowIndex){\n //last row\n if(row.rowIndex >= validIndexes[validIdxLen-1]){\n nextRowIndex = validIndexes[validIdxLen-1];\n } else {\n var calcRowIndex = (_lastValidRowIndex + d);\n if(calcRowIndex > (validIdxLen-1)){\n nextRowIndex = validIndexes[validIdxLen-1];\n } else {\n nextRowIndex = validIndexes[calcRowIndex];\n }\n }\n } else{\n //first row\n if(row.rowIndex <= validIndexes[0]){\n nextRowIndex = validIndexes[0];\n } else {\n var v = validIndexes[_lastValidRowIndex - d];\n nextRowIndex = v ? v : validIndexes[0];\n }\n }\n _lastRowIndex = row.rowIndex;\n doSelect(nextRowIndex);\n } else {\n //If filtered row is valid, special calculation for\n //pgup/pgdown keys\n if(keyCode!==34 && keyCode!==33){\n _lastValidRowIndex = validIndexes.indexOf(row.rowIndex);\n _lastRowIndex = row.rowIndex;\n } else {\n if(keyCode === 34){ //pgdown\n //last row\n if((_lastValidRowIndex + d) <= (validIdxLen-1)){\n nextRowIndex = validIndexes[\n _lastValidRowIndex + d];\n } else {\n nextRowIndex = [validIdxLen-1];\n }\n } else { //pgup\n //first row\n if((_lastValidRowIndex - d) <= validIndexes[0]){\n nextRowIndex = validIndexes[0];\n } else {\n nextRowIndex = validIndexes[\n _lastValidRowIndex - d];\n }\n }\n _lastRowIndex = nextRowIndex;\n _lastValidRowIndex = validIndexes.indexOf(nextRowIndex);\n doSelect(nextRowIndex);\n }\n }\n };\n\n //Page navigation has to be enforced whenever selected row is out of\n //the current page range\n var onBeforeSelection = function(et, selectedElm){\n var row = et.defaultSelection !== 'row' ?\n selectedElm.parentNode : selectedElm;\n if(tf.paging){\n if(tf.feature('paging').nbPages > 1){\n var paging = tf.feature('paging');\n //page length is re-assigned in case it has changed\n et.nbRowsPerPage = paging.pagingLength;\n var validIndexes = tf.validRowsIndex,\n validIdxLen = validIndexes.length,\n pagingEndRow = parseInt(paging.startPagingRow, 10) +\n parseInt(paging.pagingLength, 10);\n var rowIndex = row.rowIndex;\n\n if((rowIndex === validIndexes[validIdxLen-1]) &&\n paging.currentPageNb!==paging.nbPages){\n paging.setPage('last');\n }\n else if((rowIndex == validIndexes[0]) &&\n paging.currentPageNb!==1){\n paging.setPage('first');\n }\n else if(rowIndex > validIndexes[pagingEndRow-1] &&\n rowIndex < validIndexes[validIdxLen-1]){\n paging.setPage('next');\n }\n else if(\n rowIndex < validIndexes[paging.startPagingRow] &&\n rowIndex > validIndexes[0]){\n paging.setPage('previous');\n }\n }\n }\n };\n\n //Selected row needs to be visible when paging is activated\n if(tf.paging){\n tf.feature('paging').onAfterChangePage = function(paging){\n var advGrid = paging.tf.extension('advancedGrid');\n var et = advGrid._ezEditTable;\n var slc = et.Selection;\n /* eslint-disable */\n var row = slc.GetActiveRow();\n /* eslint-enable */\n if(row){\n row.scrollIntoView(false);\n }\n /* eslint-disable */\n var cell = slc.GetActiveCell();\n /* eslint-enable */\n if(cell){\n cell.scrollIntoView(false);\n }\n };\n }\n\n //Rows navigation when rows are filtered is performed with the\n //EditTable row selection callback events\n if(cfg.default_selection==='row'){\n var fnB = cfg.on_before_selected_row;\n cfg.on_before_selected_row = function(){\n onBeforeSelection(arguments[0], arguments[1], arguments[2]);\n if(fnB){\n fnB.call(\n null, arguments[0], arguments[1], arguments[2]);\n }\n };\n var fnA = cfg.on_after_selected_row;\n cfg.on_after_selected_row = function(){\n onAfterSelection(arguments[0], arguments[1], arguments[2]);\n if(fnA){\n fnA.call(\n null, arguments[0], arguments[1], arguments[2]);\n }\n };\n } else {\n var fnD = cfg.on_before_selected_cell;\n cfg.on_before_selected_cell = function(){\n onBeforeSelection(arguments[0], arguments[1], arguments[2]);\n if(fnD){\n fnD.call(\n null, arguments[0], arguments[1], arguments[2]);\n }\n };\n var fnC = cfg.on_after_selected_cell;\n cfg.on_after_selected_cell = function(){\n onAfterSelection(arguments[0], arguments[1], arguments[2]);\n if(fnC){\n fnC.call(\n null, arguments[0], arguments[1], arguments[2]);\n }\n };\n }\n }\n if(editable){\n //Added or removed rows, TF rows number needs to be re-calculated\n var fnE = cfg.on_added_dom_row;\n cfg.on_added_dom_row = function(){\n tf.nbFilterableRows++;\n if(!tf.paging){\n tf.emitter.emit('rows-changed', tf, this);\n //tf.feature('rowsCounter').refresh();\n } else {\n tf.nbRows++;\n tf.nbVisibleRows++;\n tf.nbFilterableRows++;\n tf.paging=false;\n tf.feature('paging').destroy();\n tf.feature('paging').reset();\n }\n if(tf.alternateRows){\n tf.feature('alternateRows').init();\n }\n if(fnE){\n fnE.call(null, arguments[0], arguments[1], arguments[2]);\n }\n };\n if(cfg.actions && cfg.actions['delete']){\n var fnF = cfg.actions['delete'].on_after_submit;\n cfg.actions['delete'].on_after_submit = function(){\n tf.nbFilterableRows--;\n if(!tf.paging){\n // tf.feature('rowsCounter').refresh();\n tf.emitter.emit('rows-changed', tf, this);\n } else {\n tf.nbRows--;\n tf.nbVisibleRows--;\n tf.nbFilterableRows--;\n tf.paging=false;\n tf.feature('paging').destroy();\n tf.feature('paging').reset(false);\n }\n if(tf.alternateRows){\n tf.feature('alternateRows').init();\n }\n if(fnF){\n fnF.call(null, arguments[0], arguments[1]);\n }\n };\n }\n }\n\n try{\n /* eslint-disable */\n this._ezEditTable = new EditTable(tf.id, cfg, startRow);\n this._ezEditTable.Init();\n /* eslint-enable */\n } catch(e) { throw new Error(this.err); }\n\n this.initialized = true;\n }\n\n /**\n * Reset advanced grid when previously removed\n */\n reset(){\n var ezEditTable = this._ezEditTable;\n if(ezEditTable){\n if(this.cfg.selection){\n /* eslint-disable */\n ezEditTable.Selection.Set();\n /* eslint-enable */\n }\n if(this.cfg.editable){\n /* eslint-disable */\n ezEditTable.Editable.Set();\n /* eslint-enable */\n }\n }\n }\n\n /**\n * Toggle behaviour\n */\n toggle(){\n var ezEditTable = this._ezEditTable;\n if(ezEditTable.editable){\n /* eslint-disable */\n ezEditTable.Editable.Remove();\n /* eslint-enable */\n } else {\n /* eslint-disable */\n ezEditTable.Editable.Set();\n /* eslint-enable */\n }\n if(ezEditTable.selection){\n /* eslint-disable */\n ezEditTable.Selection.Remove();\n /* eslint-enable */\n } else {\n /* eslint-disable */\n ezEditTable.Selection.Set();\n /* eslint-enable */\n }\n }\n\n _toggleForInputFilter(){\n var tf = this.tf;\n if(!tf.getActiveFilterId()){\n return;\n }\n var colIndex = tf.getColumnIndexFromFilterId(tf.getActiveFilterId());\n var filterType = tf.getFilterType(colIndex);\n if(filterType === tf.fltTypeInp){\n this.toggle();\n }\n }\n\n /**\n * Remove advanced grid\n */\n destroy(){\n var ezEditTable = this._ezEditTable;\n if(ezEditTable){\n if(this.cfg.selection){\n /* eslint-disable */\n ezEditTable.Selection.ClearSelections();\n ezEditTable.Selection.Remove();\n /* eslint-enable */\n }\n if(this.cfg.editable){\n /* eslint-disable */\n ezEditTable.Editable.Remove();\n /* eslint-enable */\n }\n }\n\n this.emitter.off(['filter-focus', 'filter-blur'],\n ()=> this._toggleForInputFilter());\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 16,
"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": 3,
"undocument": true,
"interface": false
},
{
"__docId__": 17,
"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": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 18,
"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": 13,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 19,
"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": 14,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 20,
"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": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 21,
"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": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 22,
"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": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 23,
"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": 18,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 24,
"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": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 25,
"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": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 26,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 27,
"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": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 28,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 29,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#emitter",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 30,
"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": 36,
"params": [],
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"generator": false
},
{
"__docId__": 31,
"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": 57,
"params": [],
"generator": false
},
{
"__docId__": 32,
"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": 360,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 33,
"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": 365,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 34,
"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": 371,
"params": [],
"generator": false
},
{
"__docId__": 35,
"kind": "method",
"static": false,
"variation": null,
"name": "toggle",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#toggle",
"access": null,
"description": "Toggle behaviour",
"lineNumber": 390,
"params": [],
"generator": false
},
{
"__docId__": 36,
"kind": "method",
"static": false,
"variation": null,
"name": "_toggleForInputFilter",
"memberof": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable",
"longname": "src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable#_toggleForInputFilter",
"access": null,
"description": null,
"lineNumber": 412,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 37,
"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": 427,
"params": [],
"generator": false
},
{
"__docId__": 38,
"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": 445,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 39,
"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';\n\nexport default AdapterEzEditTable;"
},
{
"__docId__": 40,
"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';\nimport Str from '../../string';\nimport Types from '../../types';\n\nexport default class ColOps{\n\n /**\n * Column calculations\n * @param {Object} tf TableFilter instance\n */\n constructor(tf, opts) {\n\n //calls function before col operation\n this.onBeforeOperation = Types.isFn(opts.on_before_operation) ?\n opts.on_before_operation : null;\n //calls function after col operation\n this.onAfterOperation = Types.isFn(opts.on_after_operation) ?\n opts.on_after_operation : null;\n\n this.opts = opts;\n this.tf = tf;\n }\n\n init(){\n // subscribe to events\n this.tf.emitter.on(['after-filtering'], ()=> this.calc());\n\n this.calc();\n }\n\n /**\n * Calculates columns' values\n * Configuration 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.\n */\n calc() {\n var tf = this.tf;\n if(!tf.hasGrid()){\n return;\n }\n\n if(this.onBeforeOperation){\n this.onBeforeOperation.call(null, tf);\n }\n\n var opts = this.opts,\n labelId = opts.id,\n colIndex = opts.col,\n operation = opts.operation,\n outputType = opts.write_method,\n totRowIndex = opts.tot_row_index,\n excludeRow = opts.exclude_row,\n decimalPrecision = Types.isUndef(opts.decimal_precision) ?\n 2 : opts.decimal_precision;\n\n //nuovella: determine unique list of columns to operate on\n var ucolIndex = [],\n ucolMax = 0;\n ucolIndex[ucolMax] = colIndex[0];\n\n for(var ii=1; ii<colIndex.length; ii++){\n var saved = 0;\n //see if colIndex[ii] is already in the list of unique indexes\n for(var jj=0; jj<=ucolMax; jj++){\n if(ucolIndex[jj] === colIndex[ii]){\n saved = 1;\n }\n }\n //if not saved then, save the index;\n if (saved === 0){\n ucolMax++;\n ucolIndex[ucolMax] = colIndex[ii];\n }\n }\n\n if(Str.lower(typeof labelId)=='object' &&\n Str.lower(typeof colIndex)=='object' &&\n Str.lower(typeof operation)=='object'){\n var rows = tf.tbl.rows,\n colvalues = [];\n\n for(var ucol=0; ucol<=ucolMax; ucol++){\n //this retrieves col values\n //use ucolIndex because we only want to pass through this loop\n //once for each column get the values in this unique column\n colvalues.push(\n tf.getColValues(ucolIndex[ucol], false, true, excludeRow));\n\n //next: calculate all operations for this column\n var result,\n nbvalues=0,\n temp,\n meanValue=0,\n sumValue=0,\n minValue=null,\n maxValue=null,\n q1Value=null,\n medValue=null,\n q3Value=null,\n meanFlag=0,\n sumFlag=0,\n minFlag=0,\n maxFlag=0,\n q1Flag=0,\n medFlag=0,\n q3Flag=0,\n theList=[],\n opsThisCol=[],\n decThisCol=[],\n labThisCol=[],\n oTypeThisCol=[],\n mThisCol=-1;\n\n for(var k=0; k<colIndex.length; k++){\n if(colIndex[k] === ucolIndex[ucol]){\n mThisCol++;\n opsThisCol[mThisCol]=Str.lower(operation[k]);\n decThisCol[mThisCol]=decimalPrecision[k];\n labThisCol[mThisCol]=labelId[k];\n oTypeThisCol = outputType !== undefined &&\n Str.lower(typeof outputType)==='object' ?\n outputType[k] : null;\n\n switch(opsThisCol[mThisCol]){\n case 'mean':\n meanFlag=1;\n break;\n case 'sum':\n sumFlag=1;\n break;\n case 'min':\n minFlag=1;\n break;\n case 'max':\n maxFlag=1;\n break;\n case 'median':\n medFlag=1;\n break;\n case 'q1':\n q1Flag=1;\n break;\n case 'q3':\n q3Flag=1;\n break;\n }\n }\n }\n\n for(var j=0; j<colvalues[ucol].length; j++){\n //sort the list for calculation of median and quartiles\n if((q1Flag==1)|| (q3Flag==1) || (medFlag==1)){\n if (j<colvalues[ucol].length -1){\n for(k=j+1; k<colvalues[ucol].length; k++) {\n /* eslint-disable */\n if(eval(colvalues[ucol][k]) <\n eval(colvalues[ucol][j])){\n /* eslint-enable */\n temp = colvalues[ucol][j];\n colvalues[ucol][j] = colvalues[ucol][k];\n colvalues[ucol][k] = temp;\n }\n }\n }\n }\n var cvalue = parseFloat(colvalues[ucol][j]);\n theList[j] = parseFloat(cvalue);\n\n if(!isNaN(cvalue)){\n nbvalues++;\n if(sumFlag===1 || meanFlag===1){\n sumValue += parseFloat( cvalue );\n }\n if(minFlag===1){\n if(minValue===null){\n minValue = parseFloat( cvalue );\n } else{\n minValue = parseFloat( cvalue ) < minValue ?\n parseFloat( cvalue ): minValue;\n }\n }\n if(maxFlag===1){\n if (maxValue===null){\n maxValue = parseFloat( cvalue );\n } else {\n maxValue = parseFloat( cvalue ) > maxValue ?\n parseFloat( cvalue ): maxValue;\n }\n }\n }\n }//for j\n if(meanFlag===1){\n meanValue = sumValue/nbvalues;\n }\n if(medFlag===1){\n var aux = 0;\n if(nbvalues%2 === 1){\n aux = Math.floor(nbvalues/2);\n medValue = theList[aux];\n } else{\n medValue =\n (theList[nbvalues/2] + theList[((nbvalues/2)-1)])/2;\n }\n }\n var posa;\n if(q1Flag===1){\n posa=0.0;\n posa = Math.floor(nbvalues/4);\n if(4*posa == nbvalues){\n q1Value = (theList[posa-1] + theList[posa])/2;\n } else {\n q1Value = theList[posa];\n }\n }\n if (q3Flag===1){\n posa=0.0;\n var posb=0.0;\n posa = Math.floor(nbvalues/4);\n if (4*posa === nbvalues){\n posb = 3*posa;\n q3Value = (theList[posb] + theList[posb-1])/2;\n } else {\n q3Value = theList[nbvalues-posa-1];\n }\n }\n\n for(var i=0; i<=mThisCol; i++){\n switch( opsThisCol[i] ){\n case 'mean':\n result=meanValue;\n break;\n case 'sum':\n result=sumValue;\n break;\n case 'min':\n result=minValue;\n break;\n case 'max':\n result=maxValue;\n break;\n case 'median':\n result=medValue;\n break;\n case 'q1':\n result=q1Value;\n break;\n case 'q3':\n result=q3Value;\n break;\n }\n\n var precision = !isNaN(decThisCol[i]) ? decThisCol[i] : 2;\n\n //if outputType is defined\n if(oTypeThisCol && result){\n result = result.toFixed( precision );\n\n if(Dom.id(labThisCol[i])){\n switch( Str.lower(oTypeThisCol) ){\n case 'innerhtml':\n if (isNaN(result) || !isFinite(result) ||\n nbvalues===0){\n Dom.id(labThisCol[i]).innerHTML = '.';\n } else{\n Dom.id(labThisCol[i]).innerHTML= result;\n }\n break;\n case 'setvalue':\n Dom.id( labThisCol[i] ).value = result;\n break;\n case 'createtextnode':\n var oldnode = Dom.id(labThisCol[i])\n .firstChild;\n var txtnode = Dom.text(result);\n Dom.id(labThisCol[i])\n .replaceChild(txtnode, oldnode);\n break;\n }//switch\n }\n } else {\n try{\n if(isNaN(result) || !isFinite(result) ||\n nbvalues===0){\n Dom.id(labThisCol[i]).innerHTML = '.';\n } else {\n Dom.id(labThisCol[i]).innerHTML =\n result.toFixed(precision);\n }\n } catch(e) {}//catch\n }//else\n }//for i\n\n // row(s) with result are always visible\n var totRow = totRowIndex && totRowIndex[ucol] ?\n rows[totRowIndex[ucol]] : null;\n if(totRow){\n totRow.style.display = '';\n }\n }//for ucol\n }//if typeof\n\n if(this.onAfterOperation){\n this.onAfterOperation.call(null, tf);\n }\n }\n\n destroy(){\n // unsubscribe to events\n this.tf.emitter.off(['after-filtering'], ()=> this.calc());\n }\n\n}\n"
},
{
"__docId__": 41,
"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
},
{
"__docId__": 42,
"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
},
{
"__docId__": 43,
"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": [
"*"
]
}
},
{
"__docId__": 44,
"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": [
"*"
]
}
},
{
"__docId__": 45,
"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": [
"*"
]
}
},
{
"__docId__": 46,
"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": [
"*"
]
}
},
{
"__docId__": 47,
"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
},
{
"__docId__": 48,
"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": 47,
"params": [],
"generator": false
},
{
"__docId__": 49,
"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": 318,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 50,
"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';\nimport Types from '../../types';\nimport Event from '../../event';\n\nexport default class ColsVisibility {\n\n /**\n * Columns Visibility extension\n * @param {Object} tf TableFilter instance\n * @param {Object} f Extension's configuration\n */\n constructor(tf, f) {\n\n // Configuration object\n let cfg = tf.config();\n\n this.initialized = false;\n this.name = f.name;\n this.desc = f.description || 'Columns visibility manager';\n\n //show/hide cols span element\n this.spanEl = null;\n //show/hide cols button element\n this.btnEl = null;\n //show/hide cols container div element\n this.contEl = null;\n\n //tick to hide or show column\n this.tickToHide = f.tick_to_hide === false ? false : true;\n //enables/disables cols manager generation\n this.manager = f.manager === false ? false : true;\n //only if external headers\n this.headersTbl = f.headers_table || false;\n //only if external headers\n this.headersIndex = f.headers_index || 1;\n //id of container element\n this.contElTgtId = f.container_target_id || null;\n //alternative headers text\n this.headersText = f.headers_text || null;\n //id of button container element\n this.btnTgtId = f.btn_target_id || null;\n //defines show/hide cols text\n this.btnText = f.btn_text || 'Columns&#9660;';\n //defines show/hide cols button innerHtml\n this.btnHtml = f.btn_html || null;\n //defines css class for show/hide cols button\n this.btnCssClass = f.btn_css_class || 'colVis';\n //defines close link text\n this.btnCloseText = f.btn_close_text || 'Close';\n //defines close button innerHtml\n this.btnCloseHtml = f.btn_close_html || null;\n //defines css class for close button\n this.btnCloseCssClass = f.btn_close_css_class || this.btnCssClass;\n this.stylesheet = f.stylesheet || 'colsVisibility.css';\n //span containing show/hide cols button\n this.prfx = 'colVis_';\n //defines css class span containing show/hide cols\n this.spanCssClass = f.span_css_class || 'colVisSpan';\n this.prfxCont = this.prfx + 'Cont_';\n //defines css class div containing show/hide cols\n this.contCssClass = f.cont_css_class || 'colVisCont';\n //defines css class for cols list (ul)\n this.listCssClass = cfg.list_css_class || 'cols_checklist';\n //defines css class for list item (li)\n this.listItemCssClass = cfg.checklist_item_css_class ||\n 'cols_checklist_item';\n //defines css class for selected list item (li)\n this.listSlcItemCssClass = cfg.checklist_selected_item_css_class ||\n 'cols_checklist_slc_item';\n //text preceding columns list\n this.text = f.text || (this.tickToHide ? 'Hide: ' : 'Show: ');\n this.atStart = f.at_start || null;\n this.enableHover = Boolean(f.enable_hover);\n //enables select all option\n this.enableTickAll = Boolean(f.enable_tick_all);\n //text preceding columns list\n this.tickAllText = f.tick_all_text || 'Select all:';\n\n //array containing hidden columns indexes\n this.hiddenCols = [];\n this.tblHasColTag = (Dom.tag(tf.tbl, 'col').length > 0);\n\n //callback invoked just after cols manager is loaded\n this.onLoaded = Types.isFn(f.on_loaded) ? f.on_loaded : null;\n //calls function before cols manager is opened\n this.onBeforeOpen = Types.isFn(f.on_before_open) ?\n f.on_before_open : null;\n //calls function after cols manager is opened\n this.onAfterOpen = Types.isFn(f.on_after_open) ? f.on_after_open : null;\n //calls function before cols manager is closed\n this.onBeforeClose = Types.isFn(f.on_before_close) ?\n f.on_before_close : null;\n //calls function after cols manager is closed\n this.onAfterClose = Types.isFn(f.on_after_close) ?\n f.on_after_close : null;\n\n //callback before col is hidden\n this.onBeforeColHidden = Types.isFn(f.on_before_col_hidden) ?\n f.on_before_col_hidden : null;\n //callback after col is hidden\n this.onAfterColHidden = Types.isFn(f.on_after_col_hidden) ?\n f.on_after_col_hidden : null;\n //callback before col is displayed\n this.onBeforeColDisplayed = Types.isFn(f.on_before_col_displayed) ?\n f.on_before_col_displayed : null;\n //callback after col is displayed\n this.onAfterColDisplayed = Types.isFn(f.on_after_col_displayed) ?\n f.on_after_col_displayed : null;\n\n //Grid layout compatibility\n if (tf.gridLayout) {\n this.headersTbl = tf.feature('gridLayout').headTbl; //headers table\n this.headersIndex = 0; //headers index\n this.onAfterColDisplayed = function () { };\n this.onAfterColHidden = function () { };\n }\n\n //Loads extension stylesheet\n tf.import(f.name + 'Style', tf.stylePath + this.stylesheet, null,\n 'link');\n\n this.tf = tf;\n this.emitter = tf.emitter;\n }\n\n toggle() {\n let contDisplay = this.contEl.style.display;\n let onBeforeOpen = this.onBeforeOpen;\n let onBeforeClose = this.onBeforeClose;\n let onAfterOpen = this.onAfterOpen;\n let onAfterClose = this.onAfterClose;\n\n if (onBeforeOpen && contDisplay !== 'inline') {\n onBeforeOpen.call(null, this);\n }\n if (onBeforeClose && contDisplay === 'inline') {\n onBeforeClose.call(null, this);\n }\n\n this.contEl.style.display = contDisplay === 'inline' ?\n 'none' : 'inline';\n\n if (onAfterOpen && contDisplay !== 'inline') {\n onAfterOpen.call(null, this);\n }\n if (onAfterClose && contDisplay === 'inline') {\n onAfterClose.call(null, this);\n }\n }\n\n checkItem(lbl) {\n let li = lbl.parentNode;\n if (!li || !lbl) {\n return;\n }\n let isChecked = lbl.firstChild.checked;\n let colIndex = lbl.firstChild.getAttribute('id').split('_')[1];\n colIndex = parseInt(colIndex, 10);\n if (isChecked) {\n Dom.addClass(li, this.listSlcItemCssClass);\n } else {\n Dom.removeClass(li, this.listSlcItemCssClass);\n }\n\n let hide = false;\n if ((this.tickToHide && isChecked) ||\n (!this.tickToHide && !isChecked)) {\n hide = true;\n }\n this.setHidden(colIndex, hide);\n }\n\n init() {\n if (!this.manager) {\n return;\n }\n\n this.emitter.on(['hide-column'],\n (tf, colIndex) => this.hideCol(colIndex));\n\n this.buildBtn();\n this.buildManager();\n\n this.initialized = true;\n this.emitter.emit('columns-visibility-initialized', tf, this);\n\n // Hide columns at start at very end of initialization\n this._hideAtStart();\n }\n\n /**\n * Build main button UI\n */\n buildBtn() {\n if (this.btnEl) {\n return;\n }\n let tf = this.tf;\n let span = Dom.create('span', ['id', this.prfx + tf.id]);\n span.className = this.spanCssClass;\n\n //Container element (rdiv or custom element)\n if (!this.btnTgtId) {\n tf.setToolbar();\n }\n let targetEl = !this.btnTgtId ? tf.rDiv : Dom.id(this.btnTgtId);\n\n if (!this.btnTgtId) {\n let firstChild = targetEl.firstChild;\n firstChild.parentNode.insertBefore(span, firstChild);\n } else {\n targetEl.appendChild(span);\n }\n\n if (!this.btnHtml) {\n let btn = Dom.create('a', ['href', 'javascript:;']);\n btn.className = this.btnCssClass;\n btn.title = this.desc;\n\n btn.innerHTML = this.btnText;\n span.appendChild(btn);\n if (!this.enableHover) {\n Event.add(btn, 'click', (evt) => this.toggle(evt));\n } else {\n Event.add(btn, 'mouseover', (evt) => this.toggle(evt));\n }\n } else { //Custom html\n span.innerHTML = this.btnHtml;\n let colVisEl = span.firstChild;\n if (!this.enableHover) {\n Event.add(colVisEl, 'click', (evt) => this.toggle(evt));\n } else {\n Event.add(colVisEl, 'mouseover', (evt) => this.toggle(evt));\n }\n }\n\n this.spanEl = span;\n this.btnEl = this.spanEl.firstChild;\n\n if (this.onLoaded) {\n this.onLoaded.call(null, this);\n }\n }\n\n /**\n * Build columns manager UI\n */\n buildManager() {\n let tf = this.tf;\n\n let container = !this.contElTgtId ?\n Dom.create('div', ['id', this.prfxCont + tf.id]) :\n Dom.id(this.contElTgtId);\n container.className = this.contCssClass;\n\n //Extension description\n let extNameLabel = Dom.create('p');\n extNameLabel.innerHTML = this.text;\n container.appendChild(extNameLabel);\n\n //Headers list\n let ul = Dom.create('ul', ['id', 'ul' + this.name + '_' + tf.id]);\n ul.className = this.listCssClass;\n\n let tbl = this.headersTbl ? this.headersTbl : tf.tbl;\n let headerIndex = this.headersTbl ?\n this.headersIndex : tf.getHeadersRowIndex();\n let headerRow = tbl.rows[headerIndex];\n\n //Tick all option\n if (this.enableTickAll) {\n let li = Dom.createCheckItem(\n 'col__' + tf.id, this.tickAllText, this.tickAllText);\n Dom.addClass(li, this.listItemCssClass);\n ul.appendChild(li);\n li.check.checked = !this.tickToHide;\n\n Event.add(li.check, 'click', () => {\n for (let h = 0; h < headerRow.cells.length; h++) {\n let itm = Dom.id('col_' + h + '_' + tf.id);\n if (itm && li.check.checked !== itm.checked) {\n itm.click();\n itm.checked = li.check.checked;\n }\n }\n });\n }\n\n for (let i = 0; i < headerRow.cells.length; i++) {\n let cell = headerRow.cells[i];\n let cellText = this.headersText && this.headersText[i] ?\n this.headersText[i] : this._getHeaderText(cell);\n let liElm = Dom.createCheckItem(\n 'col_' + i + '_' + tf.id, cellText, cellText);\n Dom.addClass(liElm, this.listItemCssClass);\n if (!this.tickToHide) {\n Dom.addClass(liElm, this.listSlcItemCssClass);\n }\n ul.appendChild(liElm);\n if (!this.tickToHide) {\n liElm.check.checked = true;\n }\n\n Event.add(liElm.check, 'click', (evt) => {\n let elm = Event.target(evt);\n let lbl = elm.parentNode;\n this.checkItem(lbl);\n });\n }\n\n //separator\n let p = Dom.create('p', ['align', 'center']);\n let btn;\n //Close link\n if (!this.btnCloseHtml) {\n btn = Dom.create('a', ['href', 'javascript:;']);\n btn.className = this.btnCloseCssClass;\n btn.innerHTML = this.btnCloseText;\n Event.add(btn, 'click', (evt) => this.toggle(evt));\n p.appendChild(btn);\n } else {\n p.innerHTML = this.btnCloseHtml;\n btn = p.firstChild;\n Event.add(btn, 'click', (evt) => this.toggle(evt));\n }\n\n container.appendChild(ul);\n container.appendChild(p);\n\n this.btnEl.parentNode.insertBefore(container, this.btnEl);\n this.contEl = container;\n }\n\n /**\n * Hide or show specified columns\n * @param {Numner} colIndex Column index\n * @param {Boolean} hide Hide column if true or show if false\n */\n setHidden(colIndex, hide) {\n let tf = this.tf;\n let tbl = tf.tbl;\n\n if (this.onBeforeColHidden && hide) {\n this.onBeforeColHidden.call(null, this, colIndex);\n }\n if (this.onBeforeColDisplayed && !hide) {\n this.onBeforeColDisplayed.call(null, this, colIndex);\n }\n\n this._hideCells(tbl, colIndex, hide);\n if (this.headersTbl) {\n this._hideCells(this.headersTbl, colIndex, hide);\n }\n\n let hiddenCols = this.hiddenCols;\n let itemIndex = hiddenCols.indexOf(colIndex);\n if (hide) {\n if (itemIndex === -1) {\n this.hiddenCols.push(colIndex);\n }\n } else {\n if (itemIndex !== -1) {\n this.hiddenCols.splice(itemIndex, 1);\n }\n }\n\n let gridLayout;\n let headTbl;\n let gridColElms;\n if (hide) {\n //This event is fired just after a column is displayed for\n //grid_layout support\n //TODO: grid layout module should be responsible for those\n //calculations\n if (tf.gridLayout) {\n gridLayout = tf.feature('gridLayout');\n headTbl = gridLayout.headTbl;\n gridColElms = gridLayout.gridColElms;\n let hiddenWidth = parseInt(\n gridColElms[colIndex].style.width, 10);\n\n let headTblW = parseInt(headTbl.style.width, 10);\n headTbl.style.width = headTblW - hiddenWidth + 'px';\n tbl.style.width = headTbl.style.width;\n }\n if (this.onAfterColHidden) {\n this.onAfterColHidden.call(null, this, colIndex);\n }\n this.emitter.emit('column-hidden', tf, this, colIndex,\n this.hiddenCols);\n }\n\n if (!hide) {\n //This event is fired just after a column is displayed for\n //grid_layout support\n //TODO: grid layout module should be responsible for those\n //calculations\n if (tf.gridLayout) {\n gridLayout = tf.feature('gridLayout');\n headTbl = gridLayout.headTbl;\n gridColElms = gridLayout.gridColElms;\n let width = parseInt(gridColElms[colIndex].style.width, 10);\n headTbl.style.width =\n (parseInt(headTbl.style.width, 10) + width) + 'px';\n tf.tbl.style.width = headTbl.style.width;\n }\n if (this.onAfterColDisplayed) {\n this.onAfterColDisplayed.call(null, this, colIndex);\n }\n this.emitter.emit('column-shown', tf, this, colIndex,\n this.hiddenCols);\n }\n }\n\n /**\n * Show specified column\n * @param {Number} colIndex Column index\n */\n showCol(colIndex) {\n if (colIndex === undefined || !this.isColHidden(colIndex)) {\n return;\n }\n if (this.manager && this.contEl) {\n let itm = Dom.id('col_' + colIndex + '_' + this.tf.id);\n if (itm) {\n itm.click();\n }\n } else {\n this.setHidden(colIndex, false);\n }\n }\n\n /**\n * Hide specified column\n * @param {Number} colIndex Column index\n */\n hideCol(colIndex) {\n if (colIndex === undefined || this.isColHidden(colIndex)) {\n return;\n }\n if (this.manager && this.contEl) {\n let itm = Dom.id('col_' + colIndex + '_' + this.tf.id);\n if (itm) {\n itm.click();\n }\n } else {\n this.setHidden(colIndex, true);\n }\n }\n\n /**\n * Determine if specified column is hidden\n * @param {Number} colIndex Column index\n */\n isColHidden(colIndex) {\n if (this.hiddenCols.indexOf(colIndex) !== -1) {\n return true;\n }\n return false;\n }\n\n /**\n * Toggle visibility of specified column\n * @param {Number} colIndex Column index\n */\n toggleCol(colIndex) {\n if (colIndex === undefined || this.isColHidden(colIndex)) {\n this.showCol(colIndex);\n } else {\n this.hideCol(colIndex);\n }\n }\n\n /**\n * Return the indexes of the columns currently hidden\n * @return {Array} column indexes\n */\n getHiddenCols() {\n return this.hiddenCols;\n }\n\n /**\n * Remove the columns manager\n */\n destroy() {\n if (!this.btnEl && !this.contEl) {\n return;\n }\n if (Dom.id(this.contElTgtId)) {\n Dom.id(this.contElTgtId).innerHTML = '';\n } else {\n this.contEl.innerHTML = '';\n Dom.remove(this.contEl);\n this.contEl = null;\n }\n this.btnEl.innerHTML = '';\n Dom.remove(this.btnEl);\n this.btnEl = null;\n\n this.emitter.off(['hide-column'],\n (tf, colIndex) => this.hideCol(colIndex));\n\n this.initialized = false;\n }\n\n _getHeaderText(cell) {\n if (!cell.hasChildNodes) {\n return '';\n }\n\n for (let i = 0; i < cell.childNodes.length; i++) {\n let n = cell.childNodes[i];\n if (n.nodeType === 3) {\n return n.nodeValue;\n } else if (n.nodeType === 1) {\n if (n.id && n.id.indexOf('popUp') !== -1) {\n continue;\n } else {\n return Dom.getText(n);\n }\n }\n continue;\n }\n return '';\n }\n\n _hideCells(tbl, colIndex, hide) {\n for (let i = 0; i < tbl.rows.length; i++) {\n let row = tbl.rows[i];\n let cell = row.cells[colIndex];\n if (cell) {\n cell.style.display = hide ? 'none' : '';\n }\n }\n }\n\n _hideAtStart() {\n if (!this.atStart) {\n return;\n }\n this.atStart.forEach((colIdx) => {\n this.hideCol(colIdx);\n });\n }\n}\n"
},
{
"__docId__": 51,
"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": 5,
"undocument": true,
"interface": false
},
{
"__docId__": 52,
"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": 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": "Extension's configuration"
}
],
"generator": false
},
{
"__docId__": 53,
"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": 17,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 54,
"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": 18,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 55,
"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": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 56,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 57,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 58,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 59,
"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": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 60,
"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": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 61,
"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": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 62,
"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": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 63,
"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": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 64,
"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": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 65,
"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": 41,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 66,
"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": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 67,
"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": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 68,
"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": 47,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 69,
"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": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 70,
"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": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 71,
"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": 53,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 72,
"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": 54,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 73,
"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": 56,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 74,
"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": 58,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 75,
"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": 59,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 76,
"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": 61,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 77,
"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": 63,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 78,
"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": 65,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 79,
"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": 68,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 80,
"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": 71,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 81,
"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": 72,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 82,
"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": 73,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 83,
"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": 75,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 84,
"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": 77,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 85,
"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": 80,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 86,
"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": 81,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 87,
"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": 84,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 88,
"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": 86,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 89,
"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": 89,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 90,
"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": 91,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 91,
"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": 94,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 92,
"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": 98,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 93,
"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": 101,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 94,
"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": 104,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 95,
"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": 107,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 96,
"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": 112,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 97,
"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": 113,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 98,
"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": [
"*"
]
}
},
{
"__docId__": 99,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#emitter",
"access": null,
"description": null,
"lineNumber": 123,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 100,
"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": 126,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 101,
"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": 151,
"undocument": true,
"params": [
{
"name": "lbl",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 102,
"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": 173,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 103,
"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": 184,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 104,
"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": 194,
"params": [],
"generator": false
},
{
"__docId__": 105,
"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": 237,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 106,
"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": 238,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 107,
"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": 248,
"params": [],
"generator": false
},
{
"__docId__": 108,
"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": 331,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 109,
"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
},
{
"__docId__": 110,
"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": 419,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"__docId__": 111,
"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": 437,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"__docId__": 112,
"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": 455,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"return": {
"types": [
"boolean"
]
},
"generator": false
},
{
"__docId__": 113,
"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": 466,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"__docId__": 114,
"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": "Return the indexes of the columns currently hidden",
"lineNumber": 478,
"params": [],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "column indexes"
},
"generator": false
},
{
"__docId__": 115,
"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": 485,
"params": [],
"generator": false
},
{
"__docId__": 116,
"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": 494,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 117,
"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": 498,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 118,
"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": 503,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 119,
"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": 506,
"undocument": true,
"params": [
{
"name": "cell",
"types": [
"*"
]
}
],
"return": {
"types": [
"string"
]
},
"generator": false
},
{
"__docId__": 120,
"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": 527,
"undocument": true,
"params": [
{
"name": "tbl",
"types": [
"*"
]
},
{
"name": "colIndex",
"types": [
"*"
]
},
{
"name": "hide",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 121,
"kind": "method",
"static": false,
"variation": null,
"name": "_hideAtStart",
"memberof": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility",
"longname": "src/extensions/colsVisibility/colsVisibility.js~ColsVisibility#_hideAtStart",
"access": null,
"description": null,
"lineNumber": 537,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 122,
"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';\nimport Types from '../../types';\nimport Event from '../../event';\n\nexport default class FiltersVisibility {\n\n /**\n * Filters Row Visibility extension\n * @param {Object} tf TableFilter instance\n * @param {Object} f Config\n */\n constructor(tf, f) {\n\n this.initialized = false;\n this.name = f.name;\n this.desc = f.description || 'Filters row visibility manager';\n\n // Path and image filenames\n this.stylesheet = f.stylesheet || 'filtersVisibility.css';\n this.icnExpand = f.expand_icon_name || 'icn_exp.png';\n this.icnCollapse = f.collapse_icon_name || 'icn_clp.png';\n\n //expand/collapse filters span element\n this.contEl = null;\n //expand/collapse filters btn element\n this.btnEl = null;\n\n this.icnExpandHtml = '<img src=\"' + tf.themesPath + this.icnExpand +\n '\" alt=\"Expand filters\" >';\n this.icnCollapseHtml = '<img src=\"' + tf.themesPath + this.icnCollapse +\n '\" alt=\"Collapse filters\" >';\n this.defaultText = 'Toggle filters';\n\n //id of container element\n this.targetId = f.target_id || null;\n //enables/disables expand/collapse icon\n this.enableIcon = f.enable_icon === false ? false : true;\n this.btnText = f.btn_text || '';\n\n //defines expand/collapse filters text\n this.collapseBtnHtml = this.enableIcon ?\n this.icnCollapseHtml + this.btnText :\n this.btnText || this.defaultText;\n this.expandBtnHtml = this.enableIcon ?\n this.icnExpandHtml + this.btnText :\n this.btnText || this.defaultText;\n\n //defines expand/collapse filters button innerHtml\n this.btnHtml = f.btn_html || null;\n //defines css class for expand/collapse filters button\n this.btnCssClass = f.btn_css_class || 'btnExpClpFlt';\n //defines css class span containing expand/collapse filters\n this.contCssClass = f.cont_css_class || 'expClpFlt';\n this.filtersRowIndex = !Types.isUndef(f.filters_row_index) ?\n f.filters_row_index : tf.getFiltersRowIndex();\n\n this.visibleAtStart = !Types.isUndef(f.visible_at_start) ?\n Boolean(f.visible_at_start) : true;\n\n // Prefix\n this.prfx = 'fltsVis_';\n\n //callback before filters row is shown\n this.onBeforeShow = Types.isFn(f.on_before_show) ?\n f.on_before_show : null;\n //callback after filters row is shown\n this.onAfterShow = Types.isFn(f.on_after_show) ?\n f.on_after_show : null;\n //callback before filters row is hidden\n this.onBeforeHide = Types.isFn(f.on_before_hide) ?\n f.on_before_hide : null;\n //callback after filters row is hidden\n this.onAfterHide = Types.isFn(f.on_after_hide) ? f.on_after_hide : null;\n\n //Loads extension stylesheet\n tf.import(f.name + 'Style', tf.stylePath + this.stylesheet, null,\n 'link');\n\n this.tf = tf;\n this.emitter = tf.emitter;\n }\n\n /**\n * Initialise extension\n */\n init() {\n if (this.initialized) {\n return;\n }\n\n this.buildUI();\n this.initialized = true;\n this.emitter.on(['show-filters'], (tf, visible) => this.show(visible));\n this.emitter.emit('filters-visibility-initialized', tf, this);\n }\n\n /**\n * Build UI elements\n */\n buildUI() {\n let tf = this.tf;\n let span = Dom.create('span', ['id', this.prfx + tf.id]);\n span.className = this.contCssClass;\n\n //Container element (rdiv or custom element)\n if (!this.targetId) {\n tf.setToolbar();\n }\n let targetEl = !this.targetId ? tf.rDiv : Dom.id(this.targetId);\n\n if (!this.targetId) {\n let firstChild = targetEl.firstChild;\n firstChild.parentNode.insertBefore(span, firstChild);\n } else {\n targetEl.appendChild(span);\n }\n\n let btn;\n if (!this.btnHtml) {\n btn = Dom.create('a', ['href', 'javascript:void(0);']);\n btn.className = this.btnCssClass;\n btn.title = this.btnText || this.defaultText;\n btn.innerHTML = this.collapseBtnHtml;\n span.appendChild(btn);\n } else { //Custom html\n span.innerHTML = this.btnHtml;\n btn = span.firstChild;\n }\n\n Event.add(btn, 'click', () => this.toggle());\n\n this.contEl = span;\n this.btnEl = btn;\n\n if (!this.visibleAtStart) {\n this.toggle();\n }\n }\n\n /**\n * Toggle filters visibility\n */\n toggle() {\n let tf = this.tf;\n let tbl = tf.gridLayout ? tf.feature('gridLayout').headTbl : tf.tbl;\n let fltRow = tbl.rows[this.filtersRowIndex];\n let isDisplayed = fltRow.style.display === '';\n\n this.show(!isDisplayed);\n }\n\n /**\n * Show or hide filters\n *\n * @param {boolean} [visible=true] Visibility flag\n */\n show(visible = true) {\n let tf = this.tf;\n let tbl = tf.gridLayout ? tf.feature('gridLayout').headTbl : tf.tbl;\n let fltRow = tbl.rows[this.filtersRowIndex];\n\n if (this.onBeforeShow && visible) {\n this.onBeforeShow.call(this, this);\n }\n if (this.onBeforeHide && !visible) {\n this.onBeforeHide.call(null, this);\n }\n\n fltRow.style.display = visible ? '' : 'none';\n if (this.enableIcon && !this.btnHtml) {\n this.btnEl.innerHTML = visible ?\n this.collapseBtnHtml : this.expandBtnHtml;\n }\n\n if (this.onAfterShow && visible) {\n this.onAfterShow.call(null, this);\n }\n if (this.onAfterHide && !visible) {\n this.onAfterHide.call(null, this);\n }\n\n this.emitter.emit('filters-toggled', tf, this, visible);\n }\n\n /**\n * Destroy the UI\n */\n destroy() {\n if (!this.btnEl && !this.contEl) {\n return;\n }\n\n this.emitter.off(['show-filters'], (tf, visible) => this.show(visible));\n\n this.btnEl.innerHTML = '';\n Dom.remove(this.btnEl);\n this.btnEl = null;\n\n this.contEl.innerHTML = '';\n Dom.remove(this.contEl);\n this.contEl = null;\n this.initialized = false;\n }\n\n}\n"
},
{
"__docId__": 123,
"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
},
{
"__docId__": 124,
"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
},
{
"__docId__": 125,
"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"
]
}
},
{
"__docId__": 126,
"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": [
"*"
]
}
},
{
"__docId__": 127,
"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": [
"*"
]
}
},
{
"__docId__": 128,
"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": [
"*"
]
}
},
{
"__docId__": 129,
"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": [
"*"
]
}
},
{
"__docId__": 130,
"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": [
"*"
]
}
},
{
"__docId__": 131,
"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": [
"*"
]
}
},
{
"__docId__": 132,
"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": [
"*"
]
}
},
{
"__docId__": 133,
"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": [
"*"
]
}
},
{
"__docId__": 134,
"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": [
"*"
]
}
},
{
"__docId__": 135,
"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"
]
}
},
{
"__docId__": 136,
"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": [
"*"
]
}
},
{
"__docId__": 137,
"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": [
"*"
]
}
},
{
"__docId__": 138,
"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": [
"*"
]
}
},
{
"__docId__": 139,
"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": [
"*"
]
}
},
{
"__docId__": 140,
"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": [
"*"
]
}
},
{
"__docId__": 141,
"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": [
"*"
]
}
},
{
"__docId__": 142,
"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": [
"*"
]
}
},
{
"__docId__": 143,
"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": [
"*"
]
}
},
{
"__docId__": 144,
"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": [
"*"
]
}
},
{
"__docId__": 145,
"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": [
"*"
]
}
},
{
"__docId__": 146,
"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"
]
}
},
{
"__docId__": 147,
"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": [
"*"
]
}
},
{
"__docId__": 148,
"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": [
"*"
]
}
},
{
"__docId__": 149,
"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": [
"*"
]
}
},
{
"__docId__": 150,
"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": [
"*"
]
}
},
{
"__docId__": 151,
"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": 79,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 152,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#emitter",
"access": null,
"description": null,
"lineNumber": 80,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 153,
"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": 86,
"params": [],
"generator": false
},
{
"__docId__": 154,
"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": 92,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 155,
"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": 100,
"params": [],
"generator": false
},
{
"__docId__": 156,
"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": 132,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 157,
"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": 133,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 158,
"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": 143,
"params": [],
"generator": false
},
{
"__docId__": 159,
"kind": "method",
"static": false,
"variation": null,
"name": "show",
"memberof": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility",
"longname": "src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility#show",
"access": null,
"description": "Show or hide filters",
"lineNumber": 157,
"params": [
{
"nullable": null,
"types": [
"boolean"
],
"spread": false,
"optional": true,
"defaultValue": "true",
"defaultRaw": true,
"name": "visible",
"description": "Visibility flag"
}
],
"generator": false
},
{
"__docId__": 160,
"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": 188,
"params": [],
"generator": false
},
{
"__docId__": 161,
"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": 197,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 162,
"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": 201,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 163,
"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": 202,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 164,
"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';\nimport Dom from '../../dom';\nimport Event from '../../event';\nimport DateHelper from '../../date';\nimport Helpers from '../../helpers';\n\nexport default class AdapterSortableTable{\n\n /**\n * SortableTable Adapter module\n * @param {Object} tf TableFilter instance\n */\n constructor(tf, opts){\n this.initialized = false;\n this.name = opts.name;\n this.desc = opts.description || 'Sortable table';\n\n //indicates if tables was sorted\n this.sorted = false;\n\n this.sortTypes = Types.isArray(opts.types) ? opts.types : [];\n this.sortColAtStart = Types.isArray(opts.sort_col_at_start) ?\n opts.sort_col_at_start : null;\n this.asyncSort = Boolean(opts.async_sort);\n this.triggerIds = Types.isArray(opts.trigger_ids) ?\n opts.trigger_ids : [];\n\n // edit .sort-arrow.descending / .sort-arrow.ascending in\n // tablefilter.css to reflect any path change\n this.imgPath = opts.images_path || tf.themesPath;\n this.imgBlank = opts.image_blank || 'blank.png';\n this.imgClassName = opts.image_class_name || 'sort-arrow';\n this.imgAscClassName = opts.image_asc_class_name || 'ascending';\n this.imgDescClassName = opts.image_desc_class_name ||'descending';\n //cell attribute storing custom key\n this.customKey = opts.custom_key || 'data-tf-sortKey';\n\n // callback invoked after sort is loaded and instanciated\n this.onSortLoaded = Types.isFn(opts.on_sort_loaded) ?\n opts.on_sort_loaded : null;\n // callback invoked before table is sorted\n this.onBeforeSort = Types.isFn(opts.on_before_sort) ?\n opts.on_before_sort : null;\n // callback invoked after table is sorted\n this.onAfterSort = Types.isFn(opts.on_after_sort) ?\n opts.on_after_sort : null;\n\n this.tf = tf;\n this.emitter = tf.emitter;\n }\n\n init(){\n let tf = this.tf;\n let adpt = this;\n\n // SortableTable class sanity check (sortabletable.js)\n if(Types.isUndef(SortableTable)){\n throw new Error('SortableTable class not found.');\n }\n\n this.overrideSortableTable();\n this.setSortTypes();\n\n //Column sort at start\n let sortColAtStart = adpt.sortColAtStart;\n if(sortColAtStart){\n this.stt.sort(sortColAtStart[0], sortColAtStart[1]);\n }\n\n if(this.onSortLoaded){\n this.onSortLoaded.call(null, tf, this);\n }\n\n /*** SortableTable callbacks ***/\n this.stt.onbeforesort = function(){\n if(adpt.onBeforeSort){\n adpt.onBeforeSort.call(null, tf, adpt.stt.sortColumn);\n }\n\n /*** sort behaviour for paging ***/\n if(tf.paging){\n tf.feature('paging').disable();\n }\n };\n\n this.stt.onsort = function(){\n adpt.sorted = true;\n\n //sort behaviour for paging\n if(tf.paging){\n let paginator = tf.feature('paging');\n // recalculate valid rows index as sorting may have change it\n tf.getValidRows(true);\n paginator.enable();\n paginator.setPage(paginator.getPage());\n }\n\n if(adpt.onAfterSort){\n adpt.onAfterSort.call(null, tf, adpt.stt.sortColumn,\n adpt.stt.descending);\n }\n\n adpt.emitter.emit('column-sorted', tf, adpt.stt.sortColumn,\n adpt.stt.descending);\n };\n\n this.emitter.on(['sort'],\n (tf, colIdx, desc)=> this.sortByColumnIndex(colIdx, desc));\n\n this.initialized = true;\n this.emitter.emit('sort-initialized', tf, this);\n }\n\n /**\n * Sort specified column\n * @param {Number} colIdx Column index\n * @param {Boolean} desc Optional: descending manner\n */\n sortByColumnIndex(colIdx, desc){\n this.stt.sort(colIdx, desc);\n }\n\n overrideSortableTable(){\n let adpt = this,\n tf = this.tf;\n\n /**\n * Overrides headerOnclick method in order to handle th event\n * @param {Object} e [description]\n */\n SortableTable.prototype.headerOnclick = function(evt){\n if(!adpt.initialized){\n return;\n }\n\n // find Header element\n let el = evt.target || evt.srcElement;\n\n while(el.tagName !== 'TD' && el.tagName !== 'TH'){\n el = el.parentNode;\n }\n\n this.sort(\n SortableTable.msie ?\n SortableTable.getCellIndex(el) : el.cellIndex\n );\n };\n\n /**\n * Overrides getCellIndex IE returns wrong cellIndex when columns are\n * hidden\n * @param {Object} oTd TD element\n * @return {Number} Cell index\n */\n SortableTable.getCellIndex = function(oTd){\n let cells = oTd.parentNode.cells,\n l = cells.length, i;\n for (i = 0; cells[i] != oTd && i < l; i++){}\n return i;\n };\n\n /**\n * Overrides initHeader in order to handle filters row position\n * @param {Array} oSortTypes\n */\n SortableTable.prototype.initHeader = function(oSortTypes){\n let stt = this;\n if (!stt.tHead){\n if(tf.gridLayout){\n stt.tHead = tf.feature('gridLayout').headTbl.tHead;\n } else {\n return;\n }\n }\n\n stt.headersRow = tf.headersRow;\n let cells = stt.tHead.rows[stt.headersRow].cells;\n stt.sortTypes = oSortTypes || [];\n let l = cells.length;\n let img, c;\n\n for (let i = 0; i < l; i++) {\n c = cells[i];\n if (stt.sortTypes[i] !== null && stt.sortTypes[i] !== 'None'){\n c.style.cursor = 'pointer';\n img = Dom.create('img',\n ['src', adpt.imgPath + adpt.imgBlank]);\n c.appendChild(img);\n if (stt.sortTypes[i] !== null){\n c.setAttribute( '_sortType', stt.sortTypes[i]);\n }\n Event.add(c, 'click', stt._headerOnclick);\n } else {\n c.setAttribute('_sortType', oSortTypes[i]);\n c._sortType = 'None';\n }\n }\n stt.updateHeaderArrows();\n };\n\n /**\n * Overrides updateHeaderArrows in order to handle arrows indicators\n */\n SortableTable.prototype.updateHeaderArrows = function(){\n let stt = this;\n let cells, l, img;\n\n // external headers\n if(adpt.asyncSort && adpt.triggerIds.length > 0){\n let triggers = adpt.triggerIds;\n cells = [];\n l = triggers.length;\n for(let j=0; j<triggers.length; j++){\n cells.push(Dom.id(triggers[j]));\n }\n } else {\n if(!this.tHead){\n return;\n }\n cells = stt.tHead.rows[stt.headersRow].cells;\n l = cells.length;\n }\n for(let i = 0; i < l; i++){\n let cellAttr = cells[i].getAttribute('_sortType');\n if(cellAttr !== null && cellAttr !== 'None'){\n img = cells[i].lastChild || cells[i];\n if(img.nodeName.toLowerCase() !== 'img'){\n img = Dom.create('img',\n ['src', adpt.imgPath + adpt.imgBlank]);\n cells[i].appendChild(img);\n }\n if (i === stt.sortColumn){\n img.className = adpt.imgClassName +' '+\n (this.descending ?\n adpt.imgDescClassName :\n adpt.imgAscClassName);\n } else{\n img.className = adpt.imgClassName;\n }\n }\n }\n };\n\n /**\n * Overrides getRowValue for custom key value feature\n * @param {Object} oRow Row element\n * @param {String} sType\n * @param {Number} nColumn\n * @return {String}\n */\n SortableTable.prototype.getRowValue = function(oRow, sType, nColumn){\n let stt = this;\n // if we have defined a custom getRowValue use that\n let sortTypeInfo = stt._sortTypeInfo[sType];\n if (sortTypeInfo && sortTypeInfo.getRowValue){\n return sortTypeInfo.getRowValue(oRow, nColumn);\n }\n let c = oRow.cells[nColumn];\n let s = SortableTable.getInnerText(c);\n return stt.getValueFromString(s, sType);\n };\n\n /**\n * Overrides getInnerText in order to avoid Firefox unexpected sorting\n * behaviour with untrimmed text elements\n * @param {Object} oNode DOM element\n * @return {String} DOM element inner text\n */\n SortableTable.getInnerText = function(oNode){\n if(!oNode){\n return;\n }\n if(oNode.getAttribute(adpt.customKey)){\n return oNode.getAttribute(adpt.customKey);\n } else {\n return Dom.getText(oNode);\n }\n };\n }\n\n addSortType(){\n var args = arguments;\n SortableTable.prototype.addSortType(args[0], args[1], args[2], args[3]);\n }\n\n setSortTypes(){\n let tf = this.tf,\n sortTypes = this.sortTypes,\n _sortTypes = [];\n\n for(let i=0; i<tf.nbCells; i++){\n let colType;\n\n if(sortTypes[i]){\n colType = sortTypes[i].toLowerCase();\n if(colType === 'none'){\n colType = 'None';\n }\n } else { // resolve column types\n if(tf.hasColNbFormat && tf.colNbFormat[i] !== null){\n colType = tf.colNbFormat[i].toLowerCase();\n } else if(tf.hasColDateType && tf.colDateType[i] !== null){\n colType = tf.colDateType[i].toLowerCase()+'date';\n } else {\n colType = 'String';\n }\n }\n _sortTypes.push(colType);\n }\n\n //Public TF method to add sort type\n\n //Custom sort types\n this.addSortType('number', Number);\n this.addSortType('caseinsensitivestring', SortableTable.toUpperCase);\n this.addSortType('date', SortableTable.toDate);\n this.addSortType('string');\n this.addSortType('us', usNumberConverter);\n this.addSortType('eu', euNumberConverter);\n this.addSortType('dmydate', dmyDateConverter );\n this.addSortType('ymddate', ymdDateConverter);\n this.addSortType('mdydate', mdyDateConverter);\n this.addSortType('ddmmmyyyydate', ddmmmyyyyDateConverter);\n this.addSortType('ipaddress', ipAddress, sortIP);\n\n this.stt = new SortableTable(tf.tbl, _sortTypes);\n\n /*** external table headers adapter ***/\n if(this.asyncSort && this.triggerIds.length > 0){\n let triggers = this.triggerIds;\n for(let j=0; j<triggers.length; j++){\n if(triggers[j] === null){\n continue;\n }\n let trigger = Dom.id(triggers[j]);\n if(trigger){\n trigger.style.cursor = 'pointer';\n\n Event.add(trigger, 'click', (evt) => {\n let elm = evt.target;\n if(!this.tf.sort){\n return;\n }\n this.stt.asyncSort(triggers.indexOf(elm.id));\n });\n trigger.setAttribute('_sortType', _sortTypes[j]);\n }\n }\n }\n }\n\n /**\n * Destroy sort\n */\n destroy(){\n let tf = this.tf;\n this.emitter.off(['sort'],\n (tf, colIdx, desc)=> this.sortByColumnIndex(colIdx, desc));\n this.sorted = false;\n this.initialized = false;\n this.stt.destroy();\n\n let ids = tf.getFiltersId();\n for (let idx = 0; idx < ids.length; idx++){\n let header = tf.getHeaderElement(idx);\n let img = Dom.tag(header, 'img');\n\n if(img.length === 1){\n header.removeChild(img[0]);\n }\n }\n }\n\n}\n\n//Converters\nfunction usNumberConverter(s){\n return Helpers.removeNbFormat(s, 'us');\n}\nfunction euNumberConverter(s){\n return Helpers.removeNbFormat(s, 'eu');\n}\nfunction dateConverter(s, format){\n return DateHelper.format(s, format);\n}\nfunction dmyDateConverter(s){\n return dateConverter(s, 'DMY');\n}\nfunction mdyDateConverter(s){\n return dateConverter(s, 'MDY');\n}\nfunction ymdDateConverter(s){\n return dateConverter(s, 'YMD');\n}\nfunction ddmmmyyyyDateConverter(s){\n return dateConverter(s, 'DDMMMYYYY');\n}\n\nfunction ipAddress(value){\n let vals = value.split('.');\n for (let x in vals) {\n let val = vals[x];\n while (3 > val.length){\n val = '0'+val;\n }\n vals[x] = val;\n }\n return vals.join('.');\n}\n\nfunction sortIP(a,b){\n let aa = ipAddress(a.value.toLowerCase());\n let bb = ipAddress(b.value.toLowerCase());\n if (aa==bb){\n return 0;\n } else if (aa<bb){\n return -1;\n } else {\n return 1;\n }\n}\n"
},
{
"__docId__": 165,
"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": 7,
"undocument": true,
"interface": false
},
{
"__docId__": 166,
"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": 13,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 167,
"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": 14,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 168,
"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": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 169,
"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": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 170,
"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": 19,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 171,
"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": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 172,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 173,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 174,
"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": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 175,
"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": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 176,
"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": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 177,
"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": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 178,
"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": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 179,
"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": 34,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 180,
"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": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 181,
"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": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 182,
"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": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 183,
"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": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 184,
"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": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 185,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable",
"longname": "src/extensions/sort/adapterSortabletable.js~AdapterSortableTable#emitter",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 186,
"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": 52,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 187,
"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": 110,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 188,
"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": 119,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIdx",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "desc",
"description": "Optional: descending manner"
}
],
"generator": false
},
{
"__docId__": 189,
"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": 123,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 190,
"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": 281,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 191,
"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": 286,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 192,
"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": 326,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 193,
"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": 355,
"params": [],
"generator": false
},
{
"__docId__": 194,
"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": 359,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 195,
"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": 360,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 196,
"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": 377,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 197,
"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": 380,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 198,
"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": 383,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
},
{
"name": "format",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 199,
"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": 386,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 200,
"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": 389,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 201,
"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": 392,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 202,
"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": 395,
"undocument": true,
"params": [
{
"name": "s",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 203,
"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": 399,
"undocument": true,
"params": [
{
"name": "value",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 204,
"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": 411,
"undocument": true,
"params": [
{
"name": "a",
"types": [
"*"
]
},
{
"name": "b",
"types": [
"*"
]
}
],
"return": {
"types": [
"number"
]
},
"generator": false
},
{
"__docId__": 205,
"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": 1,
"content": "import AdapterSortableTable from './adapterSortabletable';\n\nif(!window.SortableTable){\n require('script!sortabletable');\n}\n\nexport default AdapterSortableTable;\n"
},
{
"__docId__": 206,
"kind": "file",
"static": true,
"variation": null,
"name": "src/helpers.js",
"memberof": null,
"longname": "src/helpers.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\n * Misc helpers\n */\n\nimport Str from './string';\n\nexport default {\n removeNbFormat(data, format){\n if(!data){\n return;\n }\n if(!format){\n format = 'us';\n }\n let n = data;\n if(Str.lower(format) === 'us'){\n n =+ n.replace(/[^\\d\\.-]/g,'');\n } else {\n n =+ n.replace(/[^\\d\\,-]/g,'').replace(',','.');\n }\n return n;\n }\n};\n"
},
{
"__docId__": 207,
"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 {Feature} from './feature';\nimport Dom from '../dom';\n\nexport class AlternateRows extends Feature {\n\n /**\n * Alternating rows color\n * @param {Object} tf TableFilter instance\n */\n constructor(tf) {\n super(tf, 'alternateRows');\n\n var config = this.config;\n //defines css class for even rows\n this.evenCss = config.even_row_css_class || 'even';\n //defines css class for odd rows\n this.oddCss = config.odd_row_css_class || 'odd';\n }\n\n /**\n * Sets alternating rows color\n */\n init() {\n if(this.initialized){\n return;\n }\n\n this.processAll();\n\n // Subscribe to events\n this.emitter.on(['row-processed', 'row-paged'],\n (tf, rowIndex, arrIndex, isValid)=>\n this.processRow(rowIndex, arrIndex, isValid));\n this.emitter.on(['column-sorted'], ()=> this.processAll());\n\n this.initialized = true;\n }\n\n processAll() {\n if(!this.isEnabled()){\n return;\n }\n var tf = this.tf;\n var validRowsIndex = tf.getValidRows(true);\n var noValidRowsIndex = validRowsIndex.length === 0;\n //1st index\n var beginIndex = noValidRowsIndex ? tf.refRow : 0;\n // nb indexes\n var indexLen = noValidRowsIndex ?\n tf.nbFilterableRows+beginIndex :\n validRowsIndex.length;\n var idx = 0;\n\n //alternates bg color\n for(var j=beginIndex; j<indexLen; j++){\n var rowIdx = noValidRowsIndex ? j : validRowsIndex[j];\n this.setRowBg(rowIdx, idx);\n idx++;\n }\n }\n\n /**\n * Set/remove row background based on row validation\n * @param {Number} rowIdx Row index\n * @param {Number} arrIdx Array index\n * @param {Boolean} isValid Valid row flag\n */\n processRow(rowIdx, arrIdx, isValid) {\n if(isValid){\n this.setRowBg(rowIdx, arrIdx);\n } else {\n this.removeRowBg(rowIdx);\n }\n }\n\n /**\n * Sets row background color\n * @param {Number} rowIdx Row index\n * @param {Number} idx Valid rows collection index needed to calculate bg\n * color\n */\n setRowBg(rowIdx, idx) {\n if(!this.isEnabled() || isNaN(rowIdx)){\n return;\n }\n var rows = this.tf.tbl.rows;\n var i = isNaN(idx) ? rowIdx : idx;\n this.removeRowBg(rowIdx);\n\n Dom.addClass(\n rows[rowIdx],\n (i%2) ? this.evenCss : this.oddCss\n );\n }\n\n /**\n * Removes row background color\n * @param {Number} idx Row index\n */\n removeRowBg(idx) {\n if(isNaN(idx)){\n return;\n }\n var rows = this.tf.tbl.rows;\n Dom.removeClass(rows[idx], this.oddCss);\n Dom.removeClass(rows[idx], this.evenCss);\n }\n\n /**\n * Removes all alternating backgrounds\n */\n destroy() {\n if(!this.initialized){\n return;\n }\n for(var i=0; i<this.tf.nbRows; i++){\n this.removeRowBg(i);\n }\n\n // Unsubscribe to events\n this.emitter.off(['row-processed', 'row-paged'],\n (tf, rowIndex, arrIndex, isValid)=>\n this.processRow(rowIndex, arrIndex, isValid));\n this.emitter.off(['column-sorted'], ()=> this.processAll());\n\n this.initialized = false;\n }\n\n}\n"
},
{
"__docId__": 208,
"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": 4,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 209,
"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": 10,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 210,
"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": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 211,
"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": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 212,
"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": 23,
"params": [],
"generator": false
},
{
"__docId__": 213,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#initialized",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 214,
"kind": "method",
"static": false,
"variation": null,
"name": "processAll",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#processAll",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 215,
"kind": "method",
"static": false,
"variation": null,
"name": "processRow",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#processRow",
"access": null,
"description": "Set/remove row background based on row validation",
"lineNumber": 68,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "rowIdx",
"description": "Row index"
},
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "arrIdx",
"description": "Array index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "isValid",
"description": "Valid row flag"
}
],
"generator": false
},
{
"__docId__": 216,
"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": 82,
"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
},
{
"__docId__": 217,
"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": 100,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "idx",
"description": "Row index"
}
],
"generator": false
},
{
"__docId__": 218,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#destroy",
"access": null,
"description": "Removes all alternating backgrounds",
"lineNumber": 112,
"params": [],
"generator": false
},
{
"__docId__": 219,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#initialized",
"access": null,
"description": null,
"lineNumber": 126,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 220,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Arr from '../array';\nimport Str from '../string';\nimport Sort from '../sort';\nimport Event from '../event';\n\nconst SORT_ERROR = 'Filter options for column {0} cannot be sorted in ' +\n '{1} manner.';\n\nexport class CheckList extends Feature{\n\n /**\n * Checklist UI component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'checkList');\n\n // Configuration object\n let f = tf.config();\n\n this.checkListDiv = []; //checklist container div\n //defines css class for div containing checklist filter\n this.checkListDivCssClass = f.div_checklist_css_class ||\n 'div_checklist';\n //defines css class for checklist filters\n this.checkListCssClass = f.checklist_css_class || 'flt_checklist';\n //defines css class for checklist item (li)\n this.checkListItemCssClass = f.checklist_item_css_class ||\n 'flt_checklist_item';\n //defines css class for selected checklist item (li)\n this.checkListSlcItemCssClass = f.checklist_selected_item_css_class ||\n 'flt_checklist_slc_item';\n //Load on demand text\n this.activateCheckListTxt = f.activate_checklist_text ||\n 'Click to load filter data';\n //defines css class for checklist filters\n this.checkListItemDisabledCssClass =\n f.checklist_item_disabled_css_class ||\n 'flt_checklist_item_disabled';\n this.enableCheckListResetFilter =\n f.enable_checklist_reset_filter===false ? false : true;\n //checklist filter container div\n this.prfxCheckListDiv = 'chkdiv_';\n\n this.isCustom = null;\n this.opts = null;\n this.optsTxt = null;\n this.excludedOpts = null;\n }\n\n onChange(evt){\n let elm = Event.target(evt);\n let tf = this.tf;\n this.emitter.emit('filter-focus', tf, elm);\n tf.filter();\n }\n\n optionClick(evt){\n this.setCheckListValues(evt.target);\n this.onChange(evt);\n }\n\n onCheckListClick(evt){\n let elm = Event.target(evt);\n if(this.tf.loadFltOnDemand && elm.getAttribute('filled') === '0'){\n let ct = elm.getAttribute('ct');\n let div = this.checkListDiv[ct];\n this.build(ct);\n Event.remove(div, 'click', (evt)=> this.onCheckListClick(evt));\n }\n }\n\n /**\n * Initialize checklist filter\n * @param {Number} colIndex Column index\n * @param {Boolean} isExternal External filter flag\n * @param {DOMElement} container Dom element containing the filter\n */\n init(colIndex, isExternal, container){\n let tf = this.tf;\n let externalFltTgtId = isExternal ?\n tf.externalFltTgtIds[colIndex] : null;\n\n let divCont = Dom.create('div',\n ['id', this.prfxCheckListDiv+colIndex+'_'+tf.id],\n ['ct', colIndex], ['filled', '0']);\n divCont.className = this.checkListDivCssClass;\n\n //filter is appended in desired element\n if(externalFltTgtId){\n Dom.id(externalFltTgtId).appendChild(divCont);\n tf.externalFltEls.push(divCont);\n } else {\n container.appendChild(divCont);\n }\n\n this.checkListDiv[colIndex] = divCont;\n tf.fltIds.push(tf.prfxFlt+colIndex+'_'+tf.id);\n\n if(!tf.loadFltOnDemand){\n this.build(colIndex);\n } else {\n Event.add(divCont, 'click', (evt)=> this.onCheckListClick(evt));\n divCont.appendChild(Dom.text(this.activateCheckListTxt));\n }\n\n this.emitter.on(\n ['build-checklist-filter'],\n (tf, colIndex, isExternal)=> this.build(colIndex, isExternal)\n );\n\n this.emitter.on(\n ['select-checklist-options'],\n (tf, colIndex, values)=> this.selectOptions(colIndex, values)\n );\n\n this.initialized = true;\n }\n\n /**\n * Build checklist UI\n * @param {Number} colIndex Column index\n */\n build(colIndex){\n let tf = this.tf;\n colIndex = parseInt(colIndex, 10);\n\n this.emitter.emit('before-populating-filter', tf, colIndex);\n\n this.opts = [];\n this.optsTxt = [];\n\n let flt = this.checkListDiv[colIndex];\n let ul = Dom.create(\n 'ul', ['id', tf.fltIds[colIndex]], ['colIndex', colIndex]);\n ul.className = this.checkListCssClass;\n Event.add(ul, 'change', (evt)=> this.onChange(evt));\n\n let rows = tf.tbl.rows;\n this.isCustom = tf.isCustomOptions(colIndex);\n\n let activeIdx;\n let activeFilterId = tf.getActiveFilterId();\n if(tf.linkedFilters && activeFilterId){\n activeIdx = tf.getColumnIndexFromFilterId(activeFilterId);\n }\n\n let filteredDataCol = [];\n if(tf.linkedFilters && tf.disableExcludedOptions){\n this.excludedOpts = [];\n }\n\n flt.innerHTML = '';\n\n for(let k=tf.refRow; k<tf.nbRows; k++){\n // always visible rows don't need to appear on selects as always\n // valid\n if(tf.hasVisibleRows && tf.visibleRows.indexOf(k) !== -1){\n continue;\n }\n\n let cells = rows[k].cells;\n let ncells = cells.length;\n\n // checks if row has exact cell #\n if(ncells !== tf.nbCells || this.isCustom){\n continue;\n }\n\n // this loop retrieves cell data\n for(let j=0; j<ncells; j++){\n // WTF: cyclomatic complexity hell :)\n if((colIndex === j && (!tf.linkedFilters ||\n (tf.linkedFilters && tf.disableExcludedOptions)))||\n (colIndex === j && tf.linkedFilters &&\n ((rows[k].style.display === '' && !tf.paging) ||\n (tf.paging && ((!activeIdx || activeIdx === colIndex )||\n (activeIdx != colIndex &&\n tf.validRowsIndex.indexOf(k) != -1)) )))){\n\n let cellData = tf.getCellData(cells[j]);\n //Vary Peter's patch\n let cellString = Str.matchCase(cellData, tf.matchCase);\n // checks if celldata is already in array\n if(!Arr.has(this.opts, cellString, tf.matchCase)){\n this.opts.push(cellData);\n }\n let filteredCol = filteredDataCol[j];\n if(tf.linkedFilters && tf.disableExcludedOptions){\n if(!filteredCol){\n filteredCol = tf.getFilteredDataCol(j);\n }\n if(!Arr.has(filteredCol, cellString, tf.matchCase) &&\n !Arr.has(this.excludedOpts,\n cellString, tf.matchCase)){\n this.excludedOpts.push(cellData);\n }\n }\n }\n }\n }\n\n //Retrieves custom values\n if(this.isCustom){\n let customValues = tf.getCustomOptions(colIndex);\n this.opts = customValues[0];\n this.optsTxt = customValues[1];\n }\n\n if(tf.sortSlc && !this.isCustom){\n if (!tf.matchCase){\n this.opts.sort(Sort.ignoreCase);\n if(this.excludedOpts){\n this.excludedOpts.sort(Sort.ignoreCase);\n }\n } else {\n this.opts.sort();\n if(this.excludedOpts){\n this.excludedOpts.sort();\n }\n }\n }\n //asc sort\n if(tf.sortNumAsc.indexOf(colIndex) != -1){\n try{\n this.opts.sort(Sort.numSortAsc);\n if(this.excludedOpts){\n this.excludedOpts.sort(Sort.numSortAsc);\n }\n if(this.isCustom){\n this.optsTxt.sort(Sort.numSortAsc);\n }\n } catch(e) {\n throw new Error(SORT_ERROR.replace('{0}', colIndex)\n .replace('{1}', 'ascending'));\n }//in case there are alphanumeric values\n }\n //desc sort\n if(tf.sortNumDesc.indexOf(colIndex) != -1){\n try{\n this.opts.sort(Sort.numSortDesc);\n if(this.excludedOpts){\n this.excludedOpts.sort(Sort.numSortDesc);\n }\n if(this.isCustom){\n this.optsTxt.sort(Sort.numSortDesc);\n }\n } catch(e) {\n throw new Error(SORT_ERROR.replace('{0}', colIndex)\n .replace('{1}', 'descending'));\n }//in case there are alphanumeric values\n }\n\n this.addChecks(colIndex, ul);\n\n if(tf.loadFltOnDemand){\n flt.innerHTML = '';\n }\n flt.appendChild(ul);\n flt.setAttribute('filled', '1');\n\n this.emitter.emit('after-populating-filter', tf, colIndex, flt);\n }\n\n /**\n * Add checklist options\n * @param {Number} colIndex Column index\n * @param {Object} ul Ul element\n */\n addChecks(colIndex, ul){\n let tf = this.tf;\n let chkCt = this.addTChecks(colIndex, ul);\n\n for(let y=0; y<this.opts.length; y++){\n let val = this.opts[y]; //item value\n let lbl = this.isCustom ? this.optsTxt[y] : val; //item text\n let li = Dom.createCheckItem(\n tf.fltIds[colIndex]+'_'+(y+chkCt), val, lbl);\n li.className = this.checkListItemCssClass;\n if(tf.linkedFilters && tf.disableExcludedOptions &&\n Arr.has(this.excludedOpts,\n Str.matchCase(val, tf.matchCase), tf.matchCase)){\n Dom.addClass(li, this.checkListItemDisabledCssClass);\n li.check.disabled = true;\n li.disabled = true;\n } else {\n Event.add(li.check, 'click', (evt)=> this.optionClick(evt));\n }\n ul.appendChild(li);\n\n if(val === ''){\n //item is hidden\n li.style.display = 'none';\n }\n }\n }\n\n /**\n * Add checklist header option\n * @param {Number} colIndex Column index\n * @param {Object} ul Ul element\n */\n addTChecks(colIndex, ul){\n let tf = this.tf;\n let chkCt = 1;\n let li0 = Dom.createCheckItem(\n tf.fltIds[colIndex]+'_0', '', tf.displayAllText);\n li0.className = this.checkListItemCssClass;\n ul.appendChild(li0);\n\n Event.add(li0.check, 'click', (evt)=> this.optionClick(evt));\n\n if(!this.enableCheckListResetFilter){\n li0.style.display = 'none';\n }\n\n if(tf.enableEmptyOption){\n let li1 = Dom.createCheckItem(\n tf.fltIds[colIndex]+'_1', tf.emOperator, tf.emptyText);\n li1.className = this.checkListItemCssClass;\n ul.appendChild(li1);\n Event.add(li1.check, 'click', (evt)=> this.optionClick(evt));\n chkCt++;\n }\n\n if(tf.enableNonEmptyOption){\n let li2 = Dom.createCheckItem(\n tf.fltIds[colIndex]+'_2',\n tf.nmOperator,\n tf.nonEmptyText\n );\n li2.className = this.checkListItemCssClass;\n ul.appendChild(li2);\n Event.add(li2.check, 'click', (evt)=> this.optionClick(evt));\n chkCt++;\n }\n return chkCt;\n }\n\n /**\n * Store checked options in DOM element attribute\n * @param {Object} o checklist option DOM element\n */\n setCheckListValues(o){\n if(!o){\n return;\n }\n\n let tf = this.tf;\n let chkValue = o.value; //checked item value\n // TODO: provide helper to extract column index, ugly!\n let chkIndex = parseInt(o.id.split('_')[2], 10);\n let colIdx = tf.getColumnIndexFromFilterId(o.id);\n let itemTag = 'LI';\n\n let n = tf.getFilterElement(parseInt(colIdx, 10));\n let li = n.childNodes[chkIndex];\n let colIndex = n.getAttribute('colIndex');\n let fltValue = n.getAttribute('value'); //filter value (ul tag)\n let fltIndexes = n.getAttribute('indexes'); //selected items (ul tag)\n\n if(o.checked){\n //show all item\n if(chkValue === ''){\n if((fltIndexes && fltIndexes!=='')){\n //items indexes\n let indSplit = fltIndexes.split(tf.separator);\n //checked items loop\n for(let u=0; u<indSplit.length; u++){\n //checked item\n let cChk = Dom.id(tf.fltIds[colIndex]+'_'+indSplit[u]);\n if(cChk){\n cChk.checked = false;\n Dom.removeClass(\n n.childNodes[indSplit[u]],\n this.checkListSlcItemCssClass\n );\n }\n }\n }\n n.setAttribute('value', '');\n n.setAttribute('indexes', '');\n\n } else {\n fltValue = (fltValue) ? fltValue : '';\n chkValue = Str.trim(fltValue+' '+chkValue+' '+tf.orOperator);\n chkIndex = fltIndexes + chkIndex + tf.separator;\n n.setAttribute('value', chkValue);\n n.setAttribute('indexes', chkIndex);\n //1st option unchecked\n if(Dom.id(tf.fltIds[colIndex]+'_0')){\n Dom.id(tf.fltIds[colIndex]+'_0').checked = false;\n }\n }\n\n if(li.nodeName === itemTag){\n Dom.removeClass(\n n.childNodes[0], this.checkListSlcItemCssClass);\n Dom.addClass(li, this.checkListSlcItemCssClass);\n }\n } else { //removes values and indexes\n if(chkValue !== ''){\n let replaceValue = new RegExp(\n Str.rgxEsc(chkValue+' '+tf.orOperator));\n fltValue = fltValue.replace(replaceValue,'');\n n.setAttribute('value', Str.trim(fltValue));\n\n let replaceIndex = new RegExp(\n Str.rgxEsc(chkIndex + tf.separator));\n fltIndexes = fltIndexes.replace(replaceIndex, '');\n n.setAttribute('indexes', fltIndexes);\n }\n if(li.nodeName === itemTag){\n Dom.removeClass(li, this.checkListSlcItemCssClass);\n }\n }\n }\n\n /**\n * Select filter options programmatically\n * @param {Number} colIndex Column index\n * @param {Array} values Array of option values to select\n */\n selectOptions(colIndex, values=[]){\n let tf = this.tf;\n if(tf.getFilterType(colIndex) !== tf.fltTypeCheckList ||\n values.length === 0){\n return;\n }\n let flt = tf.getFilterElement(colIndex);\n\n let lisNb = Dom.tag(flt, 'li').length;\n\n flt.setAttribute('value', '');\n flt.setAttribute('indexes', '');\n\n for(let k=0; k<lisNb; k++){\n let li = Dom.tag(flt, 'li')[k],\n lbl = Dom.tag(li, 'label')[0],\n chk = Dom.tag(li, 'input')[0],\n lblTxt = Str.matchCase(Dom.getText(lbl), tf.caseSensitive);\n if(lblTxt !== '' && Arr.has(values, lblTxt, tf.caseSensitive)){\n chk.checked = true;\n this.setCheckListValues(chk);\n }\n else{\n chk.checked = false;\n this.setCheckListValues(chk);\n }\n }\n }\n\n destroy(){\n this.emitter.off(\n ['build-checklist-filter'],\n (tf, colIndex, isExternal)=> this.build(colIndex, isExternal)\n );\n this.emitter.off(\n ['select-checklist-options'],\n (tf, colIndex, values)=> this.selectOptions(colIndex, values)\n );\n }\n}\n"
},
{
"__docId__": 221,
"kind": "variable",
"static": true,
"variation": null,
"name": "SORT_ERROR",
"memberof": "src/modules/checkList.js",
"longname": "src/modules/checkList.js~SORT_ERROR",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/checkList.js",
"importStyle": null,
"description": null,
"lineNumber": 8,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 222,
"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": 11,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 223,
"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": 17,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 224,
"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": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 225,
"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": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 226,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 227,
"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": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 228,
"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": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 229,
"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": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 230,
"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": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 231,
"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": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 232,
"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": 45,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 233,
"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": 47,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 234,
"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": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 235,
"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": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 236,
"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": 50,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 237,
"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": 53,
"undocument": true,
"params": [
{
"name": "evt",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 238,
"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": 60,
"undocument": true,
"params": [
{
"name": "evt",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 239,
"kind": "method",
"static": false,
"variation": null,
"name": "onCheckListClick",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#onCheckListClick",
"access": null,
"description": null,
"lineNumber": 65,
"undocument": true,
"params": [
{
"name": "evt",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 240,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#init",
"access": null,
"description": "Initialize checklist filter",
"lineNumber": 81,
"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": "External filter flag"
},
{
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"optional": false,
"name": "container",
"description": "Dom element containing the filter"
}
],
"generator": false
},
{
"__docId__": 241,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#initialized",
"access": null,
"description": null,
"lineNumber": 119,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 242,
"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": 126,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"__docId__": 243,
"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": 132,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 244,
"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": 133,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 245,
"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": 142,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 246,
"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": 152,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 247,
"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": 208,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 248,
"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": 209,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 249,
"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": 272,
"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
},
{
"__docId__": 250,
"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": 305,
"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
},
{
"__docId__": 251,
"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": 346,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "o",
"description": "checklist option DOM element"
}
],
"generator": false
},
{
"__docId__": 252,
"kind": "method",
"static": false,
"variation": null,
"name": "selectOptions",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#selectOptions",
"access": null,
"description": "Select filter options programmatically",
"lineNumber": 426,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "values",
"description": "Array of option values to select"
}
],
"generator": false
},
{
"__docId__": 253,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/checkList.js~CheckList",
"longname": "src/modules/checkList.js~CheckList#destroy",
"access": null,
"description": null,
"lineNumber": 455,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 254,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Event from '../event';\n\nexport class ClearButton extends Feature{\n\n /**\n * Clear button component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'btnReset');\n\n // Configuration object\n var f = this.config;\n\n //id of container element\n this.btnResetTgtId = f.btn_reset_target_id || null;\n //reset button element\n this.btnResetEl = null;\n //defines reset text\n this.btnResetText = f.btn_reset_text || 'Reset';\n //defines reset button tooltip\n this.btnResetTooltip = f.btn_reset_tooltip || 'Clear filters';\n //defines reset button innerHtml\n this.btnResetHtml = f.btn_reset_html ||\n (!tf.enableIcons ? null :\n '<input type=\"button\" value=\"\" class=\"'+tf.btnResetCssClass+'\" ' +\n 'title=\"'+this.btnResetTooltip+'\" />');\n //span containing reset button\n this.prfxResetSpan = 'resetspan_';\n }\n\n onClick(){\n if(!this.isEnabled()){\n return;\n }\n this.tf.clearFilters();\n }\n\n /**\n * Build DOM elements\n */\n init(){\n var tf = this.tf;\n\n if(this.initialized){\n return;\n }\n\n var resetspan = Dom.create('span', ['id', this.prfxResetSpan+tf.id]);\n\n // reset button is added to defined element\n if(!this.btnResetTgtId){\n tf.setToolbar();\n }\n var targetEl = !this.btnResetTgtId ?\n tf.rDiv : Dom.id(this.btnResetTgtId);\n targetEl.appendChild(resetspan);\n\n if(!this.btnResetHtml){\n var fltreset = Dom.create('a', ['href', 'javascript:void(0);']);\n fltreset.className = tf.btnResetCssClass;\n fltreset.appendChild(Dom.text(this.btnResetText));\n resetspan.appendChild(fltreset);\n Event.add(fltreset, 'click', ()=> { this.onClick(); });\n } else {\n resetspan.innerHTML = this.btnResetHtml;\n var resetEl = resetspan.firstChild;\n Event.add(resetEl, 'click', ()=> { this.onClick(); });\n }\n this.btnResetEl = resetspan.firstChild;\n\n this.initialized = true;\n }\n\n /**\n * Remove clear button UI\n */\n destroy(){\n var tf = this.tf;\n\n if(!this.initialized){\n return;\n }\n\n var resetspan = Dom.id(this.prfxResetSpan+tf.id);\n if(resetspan){\n Dom.remove(resetspan);\n }\n this.btnResetEl = null;\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 255,
"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": 5,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 256,
"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": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 257,
"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": 18,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 258,
"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": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 259,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 260,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 261,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 262,
"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": 31,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 263,
"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": 34,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 264,
"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": 44,
"params": [],
"generator": false
},
{
"__docId__": 265,
"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": 72,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 266,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#initialized",
"access": null,
"description": null,
"lineNumber": 74,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 267,
"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": 80,
"params": [],
"generator": false
},
{
"__docId__": 268,
"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": 91,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 269,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/clearButton.js~ClearButton",
"longname": "src/modules/clearButton.js~ClearButton#initialized",
"access": null,
"description": null,
"lineNumber": 92,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 270,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Arr from '../array';\nimport Str from '../string';\nimport Sort from '../sort';\nimport Event from '../event';\n\nconst SORT_ERROR = 'Filter options for column {0} cannot be sorted in ' +\n '{1} manner.';\n\nexport class Dropdown extends Feature{\n\n /**\n * Dropdown UI component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'dropdown');\n\n // Configuration object\n let f = tf.config();\n\n this.enableSlcResetFilter = f.enable_slc_reset_filter===false ?\n false : true;\n //defines empty option text\n this.nonEmptyText = f.non_empty_text || '(Non empty)';\n //IE only, tooltip text appearing on select before it is populated\n this.activateSlcTooltip = f.activate_slc_tooltip ||\n 'Click to activate';\n //tooltip text appearing on multiple select\n this.multipleSlcTooltip = f.multiple_slc_tooltip ||\n 'Use Ctrl key for multiple selections';\n\n this.isCustom = null;\n this.opts = null;\n this.optsTxt = null;\n this.slcInnerHtml = null;\n }\n\n onSlcFocus(e) {\n let elm = Event.target(e);\n let tf = this.tf;\n // select is populated when element has focus\n if(tf.loadFltOnDemand && elm.getAttribute('filled') === '0'){\n let ct = elm.getAttribute('ct');\n this.build(ct);\n }\n this.emitter.emit('filter-focus', tf, elm);\n }\n\n onSlcChange() {\n if(this.tf.onSlcChange){\n this.tf.filter();\n }\n }\n\n /**\n * Initialize drop-down filter\n * @param {Number} colIndex Column index\n * @param {Boolean} isExternal External filter flag\n * @param {DOMElement} container Dom element containing the filter\n */\n init(colIndex, isExternal, container){\n let tf = this.tf;\n let col = tf.getFilterType(colIndex);\n let externalFltTgtId = isExternal ?\n tf.externalFltTgtIds[colIndex] : null;\n\n let slc = Dom.create(tf.fltTypeSlc,\n ['id', tf.prfxFlt+colIndex+'_'+tf.id],\n ['ct', colIndex], ['filled', '0']\n );\n\n if(col === tf.fltTypeMulti){\n slc.multiple = tf.fltTypeMulti;\n slc.title = this.multipleSlcTooltip;\n }\n slc.className = Str.lower(col) === tf.fltTypeSlc ?\n tf.fltCssClass : tf.fltMultiCssClass;\n\n //filter is appended in container element\n if(externalFltTgtId){\n Dom.id(externalFltTgtId).appendChild(slc);\n tf.externalFltEls.push(slc);\n } else {\n container.appendChild(slc);\n }\n\n tf.fltIds.push(slc.id);\n\n if(!tf.loadFltOnDemand){\n this.build(colIndex);\n } else {\n //1st option is created here since build isn't invoked\n let opt0 = Dom.createOpt(tf.displayAllText, '');\n slc.appendChild(opt0);\n }\n\n Event.add(slc, 'change', ()=> this.onSlcChange());\n Event.add(slc, 'focus', (e)=> this.onSlcFocus(e));\n\n this.emitter.on(\n ['build-select-filter'],\n (tf, colIndex, isLinked, isExternal)=>\n this.build(colIndex, isLinked, isExternal)\n );\n this.emitter.on(\n ['select-options'],\n (tf, colIndex, values)=> this.selectOptions(colIndex, values)\n );\n\n this.initialized = true;\n }\n\n /**\n * Build drop-down filter UI\n * @param {Number} colIndex Column index\n * @param {Boolean} isLinked Enable linked refresh behaviour\n */\n build(colIndex, isLinked=false){\n let tf = this.tf;\n colIndex = parseInt(colIndex, 10);\n\n this.emitter.emit('before-populating-filter', tf, colIndex);\n\n this.opts = [];\n this.optsTxt = [];\n this.slcInnerHtml = '';\n\n let slcId = tf.fltIds[colIndex];\n let slc = Dom.id(slcId),\n rows = tf.tbl.rows,\n matchCase = tf.matchCase;\n\n //custom select test\n this.isCustom = tf.isCustomOptions(colIndex);\n\n //custom selects text\n let activeIdx;\n let activeFilterId = tf.getActiveFilterId();\n if(isLinked && activeFilterId){\n activeIdx = tf.getColumnIndexFromFilterId(activeFilterId);\n }\n\n let excludedOpts = null,\n filteredDataCol = null;\n if(isLinked && tf.disableExcludedOptions){\n excludedOpts = [];\n filteredDataCol = [];\n }\n\n for(let k=tf.refRow; k<tf.nbRows; k++){\n // always visible rows don't need to appear on selects as always\n // valid\n if(tf.hasVisibleRows && tf.visibleRows.indexOf(k) !== -1){\n continue;\n }\n\n let cell = rows[k].cells,\n nchilds = cell.length;\n\n // checks if row has exact cell #\n if(nchilds !== tf.nbCells || this.isCustom){\n continue;\n }\n\n // this loop retrieves cell data\n for(let j=0; j<nchilds; j++){\n // WTF: cyclomatic complexity hell\n if((colIndex === j &&\n (!isLinked ||\n (isLinked && tf.disableExcludedOptions))) ||\n (colIndex === j && isLinked &&\n ((rows[k].style.display === '' && !tf.paging) ||\n (tf.paging && (!tf.validRowsIndex ||\n (tf.validRowsIndex &&\n tf.validRowsIndex.indexOf(k) != -1)) &&\n ((activeIdx === undefined || activeIdx === colIndex) ||\n (activeIdx != colIndex &&\n tf.validRowsIndex.indexOf(k) != -1 ))) ))){\n let cellData = tf.getCellData(cell[j]),\n //Vary Peter's patch\n cellString = Str.matchCase(cellData, matchCase);\n\n // checks if celldata is already in array\n if(!Arr.has(this.opts, cellString, matchCase)){\n this.opts.push(cellData);\n }\n\n if(isLinked && tf.disableExcludedOptions){\n let filteredCol = filteredDataCol[j];\n if(!filteredCol){\n filteredCol = tf.getFilteredDataCol(j);\n }\n if(!Arr.has(filteredCol, cellString, matchCase) &&\n !Arr.has(\n excludedOpts, cellString, matchCase)){\n excludedOpts.push(cellData);\n }\n }\n }//if colIndex==j\n }//for j\n }//for k\n\n //Retrieves custom values\n if(this.isCustom){\n let customValues = tf.getCustomOptions(colIndex);\n this.opts = customValues[0];\n this.optsTxt = customValues[1];\n }\n\n if(tf.sortSlc && !this.isCustom){\n if (!matchCase){\n this.opts.sort(Sort.ignoreCase);\n if(excludedOpts){\n excludedOpts.sort(Sort.ignoreCase);\n }\n } else {\n this.opts.sort();\n if(excludedOpts){ excludedOpts.sort(); }\n }\n }\n\n //asc sort\n if(tf.sortNumAsc.indexOf(colIndex) != -1){\n try{\n this.opts.sort(Sort.numSortAsc);\n if(excludedOpts){\n excludedOpts.sort(Sort.numSortAsc);\n }\n if(this.isCustom){\n this.optsTxt.sort(Sort.numSortAsc);\n }\n } catch(e) {\n throw new Error(SORT_ERROR.replace('{0}', colIndex)\n .replace('{1}', 'ascending'));\n }//in case there are alphanumeric values\n }\n //desc sort\n if(tf.sortNumDesc.indexOf(colIndex) != -1){\n try{\n this.opts.sort(Sort.numSortDesc);\n if(excludedOpts){\n excludedOpts.sort(Sort.numSortDesc);\n }\n if(this.isCustom){\n this.optsTxt.sort(Sort.numSortDesc);\n }\n } catch(e) {\n throw new Error(SORT_ERROR.replace('{0}', colIndex)\n .replace('{1}', 'ascending'));\n }//in case there are alphanumeric values\n }\n\n //populates drop-down\n this.addOptions(colIndex, slc, isLinked, excludedOpts);\n\n this.emitter.emit('after-populating-filter', tf, colIndex, slc);\n }\n\n /**\n * Add drop-down options\n * @param {Number} colIndex Column index\n * @param {Object} slc Select Dom element\n * @param {Boolean} isLinked Enable linked refresh behaviour\n * @param {Array} excludedOpts Array of excluded options\n */\n addOptions(colIndex, slc, isLinked, excludedOpts){\n let tf = this.tf,\n slcValue = slc.value;\n\n slc.innerHTML = '';\n slc = this.addFirstOption(slc);\n\n for(let y=0; y<this.opts.length; y++){\n if(this.opts[y]===''){\n continue;\n }\n let val = this.opts[y]; //option value\n let lbl = this.isCustom ? this.optsTxt[y] : val; //option text\n let isDisabled = false;\n if(isLinked && tf.disableExcludedOptions &&\n Arr.has(\n excludedOpts,\n Str.matchCase(val, tf.matchCase),\n tf.matchCase\n )){\n isDisabled = true;\n }\n\n let opt;\n //fill select on demand\n if(tf.loadFltOnDemand && slcValue === this.opts[y] &&\n tf.getFilterType(colIndex) === tf.fltTypeSlc){\n opt = Dom.createOpt(lbl, val, true);\n } else {\n opt = Dom.createOpt(lbl, val, false);\n }\n if(isDisabled){\n opt.disabled = true;\n }\n slc.appendChild(opt);\n }// for y\n\n slc.setAttribute('filled', '1');\n }\n\n /**\n * Add drop-down header option\n * @param {Object} slc Select DOM element\n */\n addFirstOption(slc){\n let tf = this.tf;\n\n let opt0 = Dom.createOpt(\n (!this.enableSlcResetFilter ? '' : tf.displayAllText),'');\n if(!this.enableSlcResetFilter){\n opt0.style.display = 'none';\n }\n slc.appendChild(opt0);\n if(tf.enableEmptyOption){\n let opt1 = Dom.createOpt(tf.emptyText, tf.emOperator);\n slc.appendChild(opt1);\n }\n if(tf.enableNonEmptyOption){\n let opt2 = Dom.createOpt(tf.nonEmptyText, tf.nmOperator);\n slc.appendChild(opt2);\n }\n return slc;\n }\n\n /**\n * Select filter options programmatically\n * @param {Number} colIndex Column index\n * @param {Array} values Array of option values to select\n */\n selectOptions(colIndex, values=[]){\n let tf = this.tf;\n if(tf.getFilterType(colIndex) !== tf.fltTypeMulti ||\n values.length === 0){\n return;\n }\n let slc = tf.getFilterElement(colIndex);\n [].forEach.call(slc.options, (option)=> {\n // Empty value means clear all selections and first option is the\n // clear all option\n if(values[0] === '' || option.value === ''){\n option.selected = false;\n }\n\n if(option.value !== '' &&\n Arr.has(values, option.value, true)){\n option.selected = true;\n }//if\n });\n }\n\n destroy(){\n this.emitter.off(\n ['build-select-filter'],\n (colIndex, isLinked, isExternal)=>\n this.build(colIndex, isLinked, isExternal)\n );\n this.emitter.off(\n ['select-options'],\n (tf, colIndex, values)=> this.selectOptions(colIndex, values)\n );\n }\n}\n"
},
{
"__docId__": 271,
"kind": "variable",
"static": true,
"variation": null,
"name": "SORT_ERROR",
"memberof": "src/modules/dropdown.js",
"longname": "src/modules/dropdown.js~SORT_ERROR",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/dropdown.js",
"importStyle": null,
"description": null,
"lineNumber": 8,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 272,
"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": 11,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 273,
"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": 17,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 274,
"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": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 275,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 276,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 277,
"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": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 278,
"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": 34,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 279,
"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": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 280,
"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": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 281,
"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": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 282,
"kind": "method",
"static": false,
"variation": null,
"name": "onSlcFocus",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#onSlcFocus",
"access": null,
"description": null,
"lineNumber": 40,
"undocument": true,
"params": [
{
"name": "e",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 283,
"kind": "method",
"static": false,
"variation": null,
"name": "onSlcChange",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#onSlcChange",
"access": null,
"description": null,
"lineNumber": 51,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 284,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#init",
"access": null,
"description": "Initialize drop-down filter",
"lineNumber": 63,
"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": "External filter flag"
},
{
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"optional": false,
"name": "container",
"description": "Dom element containing the filter"
}
],
"generator": false
},
{
"__docId__": 285,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#initialized",
"access": null,
"description": null,
"lineNumber": 112,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 286,
"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": 120,
"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"
}
],
"generator": false
},
{
"__docId__": 287,
"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": 126,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 288,
"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": 127,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 289,
"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": 128,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 290,
"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": 136,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 291,
"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": 208,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 292,
"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": 209,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 293,
"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": 268,
"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"
}
],
"generator": false
},
{
"__docId__": 294,
"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": 312,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "slc",
"description": "Select DOM element"
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 295,
"kind": "method",
"static": false,
"variation": null,
"name": "selectOptions",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#selectOptions",
"access": null,
"description": "Select filter options programmatically",
"lineNumber": 337,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "values",
"description": "Array of option values to select"
}
],
"generator": false
},
{
"__docId__": 296,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/dropdown.js~Dropdown",
"longname": "src/modules/dropdown.js~Dropdown#destroy",
"access": null,
"description": null,
"lineNumber": 358,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 297,
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/feature.js",
"memberof": null,
"longname": "src/modules/feature.js",
"access": null,
"description": null,
"lineNumber": 2,
"content": "\nconst NOTIMPLEMENTED = 'Not implemented.';\n\nexport class Feature {\n constructor(tf, feature) {\n this.tf = tf;\n this.feature = feature;\n this.enabled = tf[feature];\n this.config = tf.config();\n this.emitter = tf.emitter;\n this.initialized = false;\n }\n\n init() {\n throw new Error(NOTIMPLEMENTED);\n }\n\n reset() {\n this.enable();\n this.init();\n }\n\n destroy() {\n throw new Error(NOTIMPLEMENTED);\n }\n\n enable() {\n this.enabled = true;\n }\n\n disable() {\n this.enabled = false;\n }\n\n isEnabled() {\n return this.enabled;\n }\n}\n"
},
{
"__docId__": 298,
"kind": "variable",
"static": true,
"variation": null,
"name": "NOTIMPLEMENTED",
"memberof": "src/modules/feature.js",
"longname": "src/modules/feature.js~NOTIMPLEMENTED",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/feature.js",
"importStyle": null,
"description": null,
"lineNumber": 2,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 299,
"kind": "class",
"static": true,
"variation": null,
"name": "Feature",
"memberof": "src/modules/feature.js",
"longname": "src/modules/feature.js~Feature",
"access": null,
"export": true,
"importPath": "tablefilter/src/modules/feature.js",
"importStyle": "{Feature}",
"description": null,
"lineNumber": 4,
"undocument": true,
"interface": false
},
{
"__docId__": 300,
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#constructor",
"access": null,
"description": null,
"lineNumber": 5,
"undocument": true,
"params": [
{
"name": "tf",
"types": [
"*"
]
},
{
"name": "feature",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 301,
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#tf",
"access": null,
"description": null,
"lineNumber": 6,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 302,
"kind": "member",
"static": false,
"variation": null,
"name": "feature",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#feature",
"access": null,
"description": null,
"lineNumber": 7,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 303,
"kind": "member",
"static": false,
"variation": null,
"name": "enabled",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#enabled",
"access": null,
"description": null,
"lineNumber": 8,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 304,
"kind": "member",
"static": false,
"variation": null,
"name": "config",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#config",
"access": null,
"description": null,
"lineNumber": 9,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 305,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#emitter",
"access": null,
"description": null,
"lineNumber": 10,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 306,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#initialized",
"access": null,
"description": null,
"lineNumber": 11,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 307,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#init",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 308,
"kind": "method",
"static": false,
"variation": null,
"name": "reset",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#reset",
"access": null,
"description": null,
"lineNumber": 18,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 309,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#destroy",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 310,
"kind": "method",
"static": false,
"variation": null,
"name": "enable",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#enable",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 311,
"kind": "member",
"static": false,
"variation": null,
"name": "enabled",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#enabled",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 312,
"kind": "method",
"static": false,
"variation": null,
"name": "disable",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#disable",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 313,
"kind": "member",
"static": false,
"variation": null,
"name": "enabled",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#enabled",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 314,
"kind": "method",
"static": false,
"variation": null,
"name": "isEnabled",
"memberof": "src/modules/feature.js~Feature",
"longname": "src/modules/feature.js~Feature#isEnabled",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 315,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Types from '../types';\nimport Event from '../event';\nimport Str from '../string';\n\nexport class GridLayout extends Feature{\n\n /**\n * Grid layout, table with fixed headers\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'gridLayout');\n\n let f = this.config;\n\n //defines grid width\n this.gridWidth = f.grid_width || null;\n //defines grid height\n this.gridHeight = f.grid_height || null;\n //defines css class for main container\n this.gridMainContCssClass = f.grid_cont_css_class || 'grd_Cont';\n //defines css class for div containing table\n this.gridContCssClass = f.grid_tbl_cont_css_class || 'grd_tblCont';\n //defines css class for div containing headers' table\n this.gridHeadContCssClass = f.grid_tblHead_cont_css_class ||\n 'grd_headTblCont';\n //defines css class for div containing rows counter, paging etc.\n this.gridInfDivCssClass = f.grid_inf_grid_css_class || 'grd_inf';\n //defines which row contains column headers\n this.gridHeadRowIndex = f.grid_headers_row_index || 0;\n //array of headers row indexes to be placed in header table\n this.gridHeadRows = f.grid_headers_rows || [0];\n //generate filters in table headers\n this.gridEnableFilters = f.grid_enable_default_filters!==undefined ?\n f.grid_enable_default_filters : true;\n this.noHeaders = Boolean(f.grid_no_headers);\n //default col width\n this.gridDefaultColWidth = f.grid_default_col_width || '100px';\n\n this.gridColElms = [];\n\n //div containing grid elements if grid_layout true\n this.prfxMainTblCont = 'gridCont_';\n //div containing table if grid_layout true\n this.prfxTblCont = 'tblCont_';\n //div containing headers table if grid_layout true\n this.prfxHeadTblCont = 'tblHeadCont_';\n //headers' table if grid_layout true\n this.prfxHeadTbl = 'tblHead_';\n //id of td containing the filter if grid_layout true\n this.prfxGridFltTd = '_td_';\n //id of th containing column header if grid_layout true\n this.prfxGridTh = 'tblHeadTh_';\n\n this.sourceTblHtml = tf.tbl.outerHTML;\n\n // filters flag at TF level\n tf.fltGrid = this.gridEnableFilters;\n }\n\n /**\n * Generates a grid with fixed headers\n */\n init(){\n let tf = this.tf;\n let f = this.config;\n let tbl = tf.tbl;\n\n if(this.initialized){\n return;\n }\n\n // Override reference rows indexes\n tf.refRow = Types.isNull(tf.startRow) ? 0 : tf.startRow;\n tf.headersRow = 0;\n tf.filtersRowIndex = 1;\n\n tf.isExternalFlt = true;\n\n // default width of 100px if column widths not set\n if(!tf.hasColWidths){\n tf.colWidths = [];\n for(let k=0; k<tf.nbCells; k++){\n let colW,\n cell = tbl.rows[this.gridHeadRowIndex].cells[k];\n if(cell.width !== ''){\n colW = cell.width;\n } else if(cell.style.width !== ''){\n colW = parseInt(cell.style.width, 10);\n } else {\n colW = this.gridDefaultColWidth;\n }\n tf.colWidths[k] = colW;\n }\n tf.hasColWidths = true;\n }\n tf.setColWidths();\n\n let tblW;//initial table width\n if(tbl.width !== ''){\n tblW = tbl.width;\n }\n else if(tbl.style.width !== ''){\n tblW = parseInt(tbl.style.width, 10);\n } else {\n tblW = tbl.clientWidth;\n }\n\n //Main container: it will contain all the elements\n this.tblMainCont = Dom.create('div',\n ['id', this.prfxMainTblCont + tf.id]);\n this.tblMainCont.className = this.gridMainContCssClass;\n if(this.gridWidth){\n this.tblMainCont.style.width = this.gridWidth;\n }\n tbl.parentNode.insertBefore(this.tblMainCont, tbl);\n\n //Table container: div wrapping content table\n this.tblCont = Dom.create('div', ['id', this.prfxTblCont + tf.id]);\n this.tblCont.className = this.gridContCssClass;\n if(this.gridWidth){\n if(this.gridWidth.indexOf('%') != -1){\n this.tblCont.style.width = '100%';\n } else {\n this.tblCont.style.width = this.gridWidth;\n }\n }\n if(this.gridHeight){\n this.tblCont.style.height = this.gridHeight;\n }\n tbl.parentNode.insertBefore(this.tblCont, tbl);\n let t = Dom.remove(tbl);\n this.tblCont.appendChild(t);\n\n //In case table width is expressed in %\n if(tbl.style.width === ''){\n tbl.style.width = (Str.contains('%', tblW) ?\n tbl.clientWidth : tblW) + 'px';\n }\n\n let d = Dom.remove(this.tblCont);\n this.tblMainCont.appendChild(d);\n\n //Headers table container: div wrapping headers table\n this.headTblCont = Dom.create(\n 'div',['id', this.prfxHeadTblCont + tf.id]);\n this.headTblCont.className = this.gridHeadContCssClass;\n if(this.gridWidth){\n if(this.gridWidth.indexOf('%') != -1){\n this.headTblCont.style.width = '100%';\n } else {\n this.headTblCont.style.width = this.gridWidth;\n }\n }\n\n //Headers table\n this.headTbl = Dom.create('table', ['id', this.prfxHeadTbl + tf.id]);\n let tH = Dom.create('tHead');\n\n //1st row should be headers row, ids are added if not set\n //Those ids are used by the sort feature\n let hRow = tbl.rows[this.gridHeadRowIndex];\n let sortTriggers = [];\n for(let n=0; n<tf.nbCells; n++){\n let c = hRow.cells[n];\n let thId = c.getAttribute('id');\n if(!thId || thId===''){\n thId = this.prfxGridTh+n+'_'+tf.id;\n c.setAttribute('id', thId);\n }\n sortTriggers.push(thId);\n }\n\n //Filters row is created\n let filtersRow = Dom.create('tr');\n if(this.gridEnableFilters && tf.fltGrid){\n tf.externalFltTgtIds = [];\n for(let j=0; j<tf.nbCells; j++){\n let fltTdId = tf.prfxFlt+j+ this.prfxGridFltTd +tf.id;\n let cl = Dom.create(tf.fltCellTag, ['id', fltTdId]);\n filtersRow.appendChild(cl);\n tf.externalFltTgtIds[j] = fltTdId;\n }\n }\n\n //Headers row are moved from content table to headers table\n if(!this.noHeaders) {\n for(let i=0; i<this.gridHeadRows.length; i++){\n let headRow = tbl.rows[this.gridHeadRows[0]];\n tH.appendChild(headRow);\n }\n } else {\n // Handle table with no headers, assuming here headers do not\n // exist\n tH.appendChild(Dom.create('tr'));\n }\n\n this.headTbl.appendChild(tH);\n if(tf.filtersRowIndex === 0){\n tH.insertBefore(filtersRow, hRow);\n } else {\n tH.appendChild(filtersRow);\n }\n\n this.headTblCont.appendChild(this.headTbl);\n this.tblCont.parentNode.insertBefore(this.headTblCont, this.tblCont);\n\n //THead needs to be removed in content table for sort feature\n let thead = Dom.tag(tbl, 'thead');\n if(thead.length>0){\n tbl.removeChild(thead[0]);\n }\n\n //Headers table style\n this.headTbl.style.tableLayout = 'fixed';\n tbl.style.tableLayout = 'fixed';\n this.headTbl.cellPadding = tbl.cellPadding;\n this.headTbl.cellSpacing = tbl.cellSpacing;\n // this.headTbl.style.width = tbl.style.width;\n\n //content table without headers needs col widths to be reset\n tf.setColWidths(this.headTbl);\n\n //Headers container width\n // this.headTblCont.style.width = this.tblCont.clientWidth+'px';\n\n tbl.style.width = '';\n //\n this.headTbl.style.width = tbl.clientWidth + 'px';\n //\n\n //scroll synchronisation\n Event.add(this.tblCont, 'scroll', (evt)=> {\n let elm = Event.target(evt);\n let scrollLeft = elm.scrollLeft;\n this.headTblCont.scrollLeft = scrollLeft;\n //New pointerX calc taking into account scrollLeft\n // if(!o.isPointerXOverwritten){\n // try{\n // o.Evt.pointerX = function(evt){\n // let e = evt || global.event;\n // let bdScrollLeft = tf_StandardBody().scrollLeft +\n // scrollLeft;\n // return (e.pageX + scrollLeft) ||\n // (e.clientX + bdScrollLeft);\n // };\n // o.isPointerXOverwritten = true;\n // } catch(err) {\n // o.isPointerXOverwritten = false;\n // }\n // }\n });\n\n //Configure sort extension if any\n let sort = (f.extensions || []).filter(function(itm){\n return itm.name === 'sort';\n });\n if(sort.length === 1){\n sort[0].async_sort = true;\n sort[0].trigger_ids = sortTriggers;\n }\n\n //Cols generation for all browsers excepted IE<=7\n this.tblHasColTag = Dom.tag(tbl, 'col').length > 0 ? true : false;\n\n //Col elements are enough to keep column widths after sorting and\n //filtering\n let createColTags = function(){\n for(let k=(tf.nbCells-1); k>=0; k--){\n let col = Dom.create('col', ['id', tf.id+'_col_'+k]);\n tbl.insertBefore(col, tbl.firstChild);\n col.style.width = tf.colWidths[k];\n this.gridColElms[k] = col;\n }\n this.tblHasColTag = true;\n };\n\n if(!this.tblHasColTag){\n createColTags.call(this);\n } else {\n let cols = Dom.tag(tbl, 'col');\n for(let ii=0; ii<tf.nbCells; ii++){\n cols[ii].setAttribute('id', tf.id+'_col_'+ii);\n cols[ii].style.width = tf.colWidths[ii];\n this.gridColElms.push(cols[ii]);\n }\n }\n\n let afterColResizedFn = Types.isFn(f.on_after_col_resized) ?\n f.on_after_col_resized : null;\n f.on_after_col_resized = function(o, colIndex){\n if(!colIndex){\n return;\n }\n let w = o.crWColsRow.cells[colIndex].style.width;\n let col = o.gridColElms[colIndex];\n col.style.width = w;\n\n let thCW = o.crWColsRow.cells[colIndex].clientWidth;\n let tdCW = o.crWRowDataTbl.cells[colIndex].clientWidth;\n\n if(thCW != tdCW){\n o.headTbl.style.width = tbl.clientWidth+'px';\n }\n\n if(afterColResizedFn){\n afterColResizedFn.call(null, o, colIndex);\n }\n };\n\n if(tf.popupFilters){\n filtersRow.style.display = 'none';\n }\n\n if(tbl.clientWidth !== this.headTbl.clientWidth){\n tbl.style.width = this.headTbl.clientWidth+'px';\n }\n\n this.initialized = true;\n }\n\n /**\n * Removes the grid layout\n */\n destroy(){\n let tf = this.tf;\n let tbl = tf.tbl;\n\n if(!this.initialized){\n return;\n }\n let t = Dom.remove(tbl);\n this.tblMainCont.parentNode.insertBefore(t, this.tblMainCont);\n Dom.remove(this.tblMainCont);\n\n this.tblMainCont = null;\n this.headTblCont = null;\n this.headTbl = null;\n this.tblCont = null;\n\n tbl.outerHTML = this.sourceTblHtml;\n //needed to keep reference of table element for future usage\n this.tf.tbl = Dom.id(tf.id);\n\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 316,
"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": 7,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 317,
"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": 13,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 318,
"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": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 319,
"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": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 320,
"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": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 321,
"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": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 322,
"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": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 323,
"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": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 324,
"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": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 325,
"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": 34,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 326,
"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": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 327,
"kind": "member",
"static": false,
"variation": null,
"name": "noHeaders",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#noHeaders",
"access": null,
"description": null,
"lineNumber": 38,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 328,
"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": 40,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 329,
"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": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 330,
"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": 45,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 331,
"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": 47,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 332,
"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": 49,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 333,
"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": 51,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 334,
"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": 53,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 335,
"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": 55,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 336,
"kind": "member",
"static": false,
"variation": null,
"name": "sourceTblHtml",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#sourceTblHtml",
"access": null,
"description": null,
"lineNumber": 57,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 337,
"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": 66,
"params": [],
"generator": false
},
{
"__docId__": 338,
"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": 112,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 339,
"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": 121,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 340,
"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": 147,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 341,
"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": 159,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 342,
"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": 266,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 343,
"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": 277,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 344,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#initialized",
"access": null,
"description": null,
"lineNumber": 321,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 345,
"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": 327,
"params": [],
"generator": false
},
{
"__docId__": 346,
"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": 338,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 347,
"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": 339,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 348,
"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": 340,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 349,
"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": 341,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 350,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/gridLayout.js~GridLayout",
"longname": "src/modules/gridLayout.js~GridLayout#initialized",
"access": null,
"description": null,
"lineNumber": 347,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 351,
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/hash.js",
"memberof": null,
"longname": "src/modules/hash.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Event from '../event';\n\nconst global = window;\nconst JSON = global.JSON;\nconst location = global.location;\nconst decodeURIComponent = global.decodeURIComponent;\n\nexport const hasHashChange = () => {\n var docMode = global.documentMode;\n return ('onhashchange' in global) && (docMode === undefined || docMode > 7);\n};\n\n/**\n * Manages the URL hash reflecting the features state to be persisted\n *\n * @export\n * @class Hash\n */\nexport class Hash {\n\n /**\n * Creates an instance of Hash\n *\n * @param {State} state Instance of State\n */\n constructor(state) {\n this.state = state;\n this.lastHash = null;\n this.emitter = state.emitter;\n }\n\n /**\n * Initializes the Hash object\n */\n init() {\n if (!hasHashChange()) {\n return;\n }\n\n this.lastHash = location.hash;\n\n this.emitter.on(['state-changed'], (tf, state) => this.update(state));\n this.emitter.on(['initialized'], () => this.sync());\n Event.add(global, 'hashchange', () => this.sync());\n }\n\n /**\n * Updates the URL hash based on a state change\n *\n * @param {State} state Instance of State\n */\n update(state) {\n let hash = `#${JSON.stringify(state)}`;\n if (this.lastHash === hash) {\n return;\n }\n\n location.hash = hash;\n this.lastHash = hash;\n }\n\n /**\n * Converts a URL hash into a state JSON object\n *\n * @param {String} hash URL hash fragment\n * @returns {Object} JSON object\n */\n parse(hash) {\n if (hash.indexOf('#') === -1) {\n return null;\n }\n hash = hash.substr(1);\n return JSON.parse(decodeURIComponent(hash));\n }\n\n /**\n * Applies current hash state to features\n */\n sync() {\n let state = this.parse(location.hash);\n if (!state) {\n return;\n }\n // override current state with persisted one and sync features\n this.state.overrideAndSync(state);\n }\n\n /**\n * Release Hash event subscriptions and clear fields\n */\n destroy() {\n this.emitter.off(['state-changed'], (tf, state) => this.update(state));\n this.emitter.off(['initialized'], () => this.sync());\n Event.remove(global, 'hashchange', () => this.sync());\n\n this.state = null;\n this.lastHash = null;\n this.emitter = null;\n }\n}\n"
},
{
"__docId__": 352,
"kind": "variable",
"static": true,
"variation": null,
"name": "global",
"memberof": "src/modules/hash.js",
"longname": "src/modules/hash.js~global",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/hash.js",
"importStyle": null,
"description": null,
"lineNumber": 3,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 353,
"kind": "variable",
"static": true,
"variation": null,
"name": "JSON",
"memberof": "src/modules/hash.js",
"longname": "src/modules/hash.js~JSON",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/hash.js",
"importStyle": null,
"description": null,
"lineNumber": 4,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 354,
"kind": "variable",
"static": true,
"variation": null,
"name": "location",
"memberof": "src/modules/hash.js",
"longname": "src/modules/hash.js~location",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/hash.js",
"importStyle": null,
"description": null,
"lineNumber": 5,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 355,
"kind": "variable",
"static": true,
"variation": null,
"name": "decodeURIComponent",
"memberof": "src/modules/hash.js",
"longname": "src/modules/hash.js~decodeURIComponent",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/hash.js",
"importStyle": null,
"description": null,
"lineNumber": 6,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 356,
"kind": "variable",
"static": true,
"variation": null,
"name": "hasHashChange",
"memberof": "src/modules/hash.js",
"longname": "src/modules/hash.js~hasHashChange",
"access": null,
"export": true,
"importPath": "tablefilter/src/modules/hash.js",
"importStyle": "{hasHashChange}",
"description": null,
"lineNumber": 8,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 357,
"kind": "class",
"static": true,
"variation": null,
"name": "Hash",
"memberof": "src/modules/hash.js",
"longname": "src/modules/hash.js~Hash",
"access": null,
"export": true,
"importPath": "tablefilter/src/modules/hash.js",
"importStyle": "{Hash}",
"description": "Manages the URL hash reflecting the features state to be persisted",
"lineNumber": 19,
"unknown": [
{
"tagName": "@export",
"tagValue": ""
},
{
"tagName": "@class",
"tagValue": "Hash"
}
],
"interface": false
},
{
"__docId__": 358,
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#constructor",
"access": null,
"description": "Creates an instance of Hash",
"lineNumber": 26,
"params": [
{
"nullable": null,
"types": [
"State"
],
"spread": false,
"optional": false,
"name": "state",
"description": "Instance of State"
}
],
"generator": false
},
{
"__docId__": 359,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#state",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 360,
"kind": "member",
"static": false,
"variation": null,
"name": "lastHash",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#lastHash",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 361,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#emitter",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 362,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#init",
"access": null,
"description": "Initializes the Hash object",
"lineNumber": 35,
"params": [],
"generator": false
},
{
"__docId__": 363,
"kind": "member",
"static": false,
"variation": null,
"name": "lastHash",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#lastHash",
"access": null,
"description": null,
"lineNumber": 40,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 364,
"kind": "method",
"static": false,
"variation": null,
"name": "update",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#update",
"access": null,
"description": "Updates the URL hash based on a state change",
"lineNumber": 52,
"params": [
{
"nullable": null,
"types": [
"State"
],
"spread": false,
"optional": false,
"name": "state",
"description": "Instance of State"
}
],
"generator": false
},
{
"__docId__": 365,
"kind": "member",
"static": false,
"variation": null,
"name": "lastHash",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#lastHash",
"access": null,
"description": null,
"lineNumber": 59,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 366,
"kind": "method",
"static": false,
"variation": null,
"name": "parse",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#parse",
"access": null,
"description": "Converts a URL hash into a state JSON object",
"lineNumber": 68,
"unknown": [
{
"tagName": "@returns",
"tagValue": "{Object} JSON object"
}
],
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "hash",
"description": "URL hash fragment"
}
],
"return": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": "JSON object"
},
"generator": false
},
{
"__docId__": 367,
"kind": "method",
"static": false,
"variation": null,
"name": "sync",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#sync",
"access": null,
"description": "Applies current hash state to features",
"lineNumber": 79,
"params": [],
"generator": false
},
{
"__docId__": 368,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#destroy",
"access": null,
"description": "Release Hash event subscriptions and clear fields",
"lineNumber": 91,
"params": [],
"generator": false
},
{
"__docId__": 369,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#state",
"access": null,
"description": null,
"lineNumber": 96,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 370,
"kind": "member",
"static": false,
"variation": null,
"name": "lastHash",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#lastHash",
"access": null,
"description": null,
"lineNumber": 97,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 371,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/modules/hash.js~Hash",
"longname": "src/modules/hash.js~Hash#emitter",
"access": null,
"description": null,
"lineNumber": 98,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 372,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Event from '../event';\n\n\nconst WIKI_URL = 'https://github.com/koalyptus/TableFilter/wiki/' +\n '4.-Filter-operators';\nconst WEBSITE_URL = 'http://koalyptus.github.io/TableFilter/';\n\nexport class Help extends Feature{\n\n /**\n * Help UI component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'help');\n\n var f = this.config;\n\n //id of custom container element for instructions\n this.tgtId = f.help_instructions_target_id || null;\n //id of custom container element for instructions\n this.contTgtId = f.help_instructions_container_target_id ||\n null;\n //defines help text\n this.instrText = f.help_instructions_text ?\n f.help_instructions_text :\n 'Use the filters above each column to filter and limit table ' +\n 'data. Advanced searches can be performed by using the following ' +\n 'operators: <br /><b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, ' +\n '<b>&gt;=</b>, <b>=</b>, <b>*</b>, <b>!</b>, <b>{</b>, <b>}</b>, ' +\n '<b>||</b>,<b>&amp;&amp;</b>, <b>[empty]</b>, <b>[nonempty]</b>, ' +\n '<b>rgx:</b><br/><a href=\"'+ WIKI_URL +'\" target=\"_blank\">' +\n 'Learn more</a><hr/>';\n //defines help innerHtml\n this.instrHtml = f.help_instructions_html || null;\n //defines reset button text\n this.btnText = f.help_instructions_btn_text || '?';\n //defines reset button innerHtml\n this.btnHtml = f.help_instructions_btn_html || null;\n //defines css class for help button\n this.btnCssClass = f.help_instructions_btn_css_class || 'helpBtn';\n //defines css class for help container\n this.contCssClass = f.help_instructions_container_css_class ||\n 'helpCont';\n //help button element\n this.btn = null;\n //help content div\n this.cont = null;\n this.defaultHtml = '<div class=\"helpFooter\"><h4>TableFilter ' +\n 'v'+ tf.version +'</h4>' +\n '<a href=\"'+ WEBSITE_URL +'\" target=\"_blank\">'+ WEBSITE_URL +'</a>'+\n '<br/><span>&copy;2015-'+ tf.year +' {AUTHOR}</span>' +\n '<div align=\"center\" style=\"margin-top:8px;\">' +\n '<a href=\"javascript:void(0);\" class=\"close\">Close</a></div></div>';\n\n //id prefix for help elements\n this.prfxHelpSpan = 'helpSpan_';\n //id prefix for help elements\n this.prfxHelpDiv = 'helpDiv_';\n\n this.emitter.on(['init-help'], ()=> this.init());\n }\n\n init(){\n if(this.initialized){\n return;\n }\n\n var tf = this.tf;\n\n var helpspan = Dom.create('span', ['id', this.prfxHelpSpan+tf.id]);\n var helpdiv = Dom.create('div', ['id', this.prfxHelpDiv+tf.id]);\n\n //help button is added to defined element\n if(!this.tgtId){\n tf.setToolbar();\n }\n var targetEl = !this.tgtId ? tf.rDiv : Dom.id(this.tgtId);\n targetEl.appendChild(helpspan);\n\n var divContainer = !this.contTgtId ? helpspan : Dom.id(this.contTgtId);\n\n if(!this.btnHtml){\n divContainer.appendChild(helpdiv);\n var helplink = Dom.create('a', ['href', 'javascript:void(0);']);\n helplink.className = this.btnCssClass;\n helplink.appendChild(Dom.text(this.btnText));\n helpspan.appendChild(helplink);\n Event.add(helplink, 'click', () => { this.toggle(); });\n } else {\n helpspan.innerHTML = this.btnHtml;\n var helpEl = helpspan.firstChild;\n Event.add(helpEl, 'click', () => { this.toggle(); });\n divContainer.appendChild(helpdiv);\n }\n\n if(!this.instrHtml){\n helpdiv.innerHTML = this.instrText;\n helpdiv.className = this.contCssClass;\n Event.add(helpdiv, 'dblclick', () => { this.toggle(); });\n } else {\n if(this.contTgtId){\n divContainer.appendChild(helpdiv);\n }\n helpdiv.innerHTML = this.instrHtml;\n if(!this.contTgtId){\n helpdiv.className = this.contCssClass;\n Event.add(helpdiv, 'dblclick', () => { this.toggle(); });\n }\n }\n helpdiv.innerHTML += this.defaultHtml;\n Event.add(helpdiv, 'click', () => { this.toggle(); });\n\n this.cont = helpdiv;\n this.btn = helpspan;\n this.initialized = true;\n }\n\n /**\n * Toggle help pop-up\n */\n toggle(){\n // check only if explicitily set to false as in this case undefined\n // signifies the help feature is enabled by default\n if(this.enabled === false){\n return;\n }\n var divDisplay = this.cont.style.display;\n if(divDisplay === '' || divDisplay === 'none'){\n this.cont.style.display = 'inline';\n } else {\n this.cont.style.display = 'none';\n }\n }\n\n /**\n * Remove help UI\n */\n destroy(){\n if(!this.initialized){\n return;\n }\n Dom.remove(this.btn);\n this.btn = null;\n if(!this.cont){\n return;\n }\n Dom.remove(this.cont);\n this.cont = null;\n this.initialized = false;\n }\n\n}\n"
},
{
"__docId__": 373,
"kind": "variable",
"static": true,
"variation": null,
"name": "WIKI_URL",
"memberof": "src/modules/help.js",
"longname": "src/modules/help.js~WIKI_URL",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/help.js",
"importStyle": null,
"description": null,
"lineNumber": 6,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 374,
"kind": "variable",
"static": true,
"variation": null,
"name": "WEBSITE_URL",
"memberof": "src/modules/help.js",
"longname": "src/modules/help.js~WEBSITE_URL",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/help.js",
"importStyle": null,
"description": null,
"lineNumber": 8,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 375,
"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": 10,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 376,
"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": 16,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 377,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 378,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 379,
"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": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 380,
"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": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 381,
"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": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 382,
"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": 41,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 383,
"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": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 384,
"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": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 385,
"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": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 386,
"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": 50,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 387,
"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": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 388,
"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": 59,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 389,
"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": 61,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 390,
"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": 66,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 391,
"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": 116,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 392,
"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": 117,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 393,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#initialized",
"access": null,
"description": null,
"lineNumber": 118,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 394,
"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": 124,
"params": [],
"generator": false
},
{
"__docId__": 395,
"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": 141,
"params": [],
"generator": false
},
{
"__docId__": 396,
"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": 146,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 397,
"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": 151,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 398,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#initialized",
"access": null,
"description": null,
"lineNumber": 152,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 399,
"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';\nimport Str from '../string';\nimport Types from '../types';\n\nexport class HighlightKeyword {\n\n /**\n * HighlightKeyword, highlight matched keyword\n * @param {Object} tf TableFilter instance\n */\n constructor(tf) {\n let f = tf.config();\n //defines css class for highlighting\n this.highlightCssClass = f.highlight_css_class || 'keyword';\n\n this.tf = tf;\n this.emitter = tf.emitter;\n }\n\n init() {\n this.emitter.on(\n ['before-filtering', 'destroy'],\n () => this.unhighlightAll()\n );\n this.emitter.on(\n ['highlight-keyword'],\n (tf, cell, word) =>\n this.highlight(cell, word, this.highlightCssClass)\n );\n }\n\n /**\n * highlight occurences of searched term in passed node\n * @param {Node} node\n * @param {String} word Searched term\n * @param {String} cssClass Css class name\n *\n * TODO: refactor this method\n */\n highlight(node, word, cssClass) {\n // Iterate into this nodes childNodes\n if (node.hasChildNodes) {\n let children = node.childNodes;\n for (let i = 0; i < children.length; i++) {\n this.highlight(children[i], word, cssClass);\n }\n }\n\n if (node.nodeType === 3) {\n let tempNodeVal = Str.lower(node.nodeValue);\n let tempWordVal = Str.lower(word);\n if (tempNodeVal.indexOf(tempWordVal) !== -1) {\n let pn = node.parentNode;\n if (pn && pn.className !== cssClass) {\n // word not highlighted yet\n let nv = node.nodeValue,\n ni = tempNodeVal.indexOf(tempWordVal),\n // Create a load of replacement nodes\n before = Dom.text(nv.substr(0, ni)),\n docWordVal = nv.substr(ni, word.length),\n after = Dom.text(nv.substr(ni + word.length)),\n hiwordtext = Dom.text(docWordVal),\n hiword = Dom.create('span');\n hiword.className = cssClass;\n hiword.appendChild(hiwordtext);\n pn.insertBefore(before, node);\n pn.insertBefore(hiword, node);\n pn.insertBefore(after, node);\n pn.removeChild(node);\n }\n }\n }\n }\n\n /**\n * Removes highlight to nodes matching passed string\n * @param {String} word\n * @param {String} cssClass Css class to remove\n */\n unhighlight(word, cssClass) {\n let highlightedNodes = this.tf.tbl.querySelectorAll(`.${cssClass}`);\n for (let i = 0; i < highlightedNodes.length; i++) {\n let n = highlightedNodes[i];\n let nodeVal = Dom.getText(n),\n tempNodeVal = Str.lower(nodeVal),\n tempWordVal = Str.lower(word);\n\n if (tempNodeVal.indexOf(tempWordVal) !== -1) {\n n.parentNode.replaceChild(Dom.text(nodeVal), n);\n }\n }\n }\n\n /**\n * Clear all occurrences of highlighted nodes\n */\n unhighlightAll() {\n if (!this.tf.highlightKeywords) {\n return;\n }\n // iterate filters values to unhighlight all values\n this.tf.getFiltersValue().forEach((val) => {\n if (Types.isArray(val)) {\n val.forEach((item) =>\n this.unhighlight(item, this.highlightCssClass));\n } else {\n this.unhighlight(val, this.highlightCssClass);\n }\n });\n }\n\n destroy() {\n this.emitter.off(\n ['before-filtering', 'destroy'],\n () => this.unhighlightAll()\n );\n this.emitter.off(\n ['highlight-keyword'],\n (tf, cell, word) =>\n this.highlight(cell, word, this.highlightCssClass)\n );\n }\n}\n"
},
{
"__docId__": 400,
"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": 5,
"undocument": true,
"interface": false
},
{
"__docId__": 401,
"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": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 402,
"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": 14,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 403,
"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": [
"*"
]
}
},
{
"__docId__": 404,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#emitter",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 405,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#init",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 406,
"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": 40,
"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\n\nTODO: refactor this method"
}
],
"generator": false
},
{
"__docId__": 407,
"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": 80,
"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
},
{
"__docId__": 408,
"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": 97,
"params": [],
"generator": false
},
{
"__docId__": 409,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/highlightKeywords.js~HighlightKeyword",
"longname": "src/modules/highlightKeywords.js~HighlightKeyword#destroy",
"access": null,
"description": null,
"lineNumber": 112,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 410,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Types from '../types';\n\nlet global = window;\n\nexport class Loader extends Feature{\n\n /**\n * Loading message/spinner\n * @param {Object} tf TableFilter instance\n */\n constructor(tf) {\n super(tf, 'loader');\n\n // TableFilter configuration\n let f = this.config;\n\n //id of container element\n this.loaderTgtId = f.loader_target_id || null;\n //div containing loader\n this.loaderDiv = null;\n //defines loader text\n this.loaderText = f.loader_text || 'Loading...';\n //defines loader innerHtml\n this.loaderHtml = f.loader_html || null;\n //defines css class for loader div\n this.loaderCssClass = f.loader_css_class || 'loader';\n //delay for hiding loader\n this.loaderCloseDelay = 250;\n //callback function before loader is displayed\n this.onShowLoader = Types.isFn(f.on_show_loader) ?\n f.on_show_loader : null;\n //callback function after loader is closed\n this.onHideLoader = Types.isFn(f.on_hide_loader) ?\n f.on_hide_loader : null;\n //loader div\n this.prfxLoader = 'load_';\n }\n\n init() {\n if(this.initialized){\n return;\n }\n\n let tf = this.tf;\n let emitter = this.emitter;\n\n let containerDiv = Dom.create('div', ['id', this.prfxLoader+tf.id]);\n containerDiv.className = this.loaderCssClass;\n\n let targetEl = !this.loaderTgtId ?\n tf.tbl.parentNode : Dom.id(this.loaderTgtId);\n if(!this.loaderTgtId){\n targetEl.insertBefore(containerDiv, tf.tbl);\n } else {\n targetEl.appendChild(containerDiv);\n }\n this.loaderDiv = containerDiv;\n if(!this.loaderHtml){\n this.loaderDiv.appendChild(Dom.text(this.loaderText));\n } else {\n this.loaderDiv.innerHTML = this.loaderHtml;\n }\n\n this.show('none');\n\n // Subscribe to events\n emitter.on([\n 'before-filtering',\n 'before-populating-filter',\n 'before-page-change',\n 'before-clearing-filters',\n 'before-page-length-change',\n 'before-reset-page',\n 'before-reset-page-length',\n 'before-loading-extensions',\n 'before-loading-themes'],\n ()=> this.show('')\n );\n emitter.on([\n 'after-filtering',\n 'after-populating-filter',\n 'after-page-change',\n 'after-clearing-filters',\n 'after-page-length-change',\n 'after-reset-page',\n 'after-reset-page-length',\n 'after-loading-extensions',\n 'after-loading-themes'],\n ()=> this.show('none')\n );\n\n this.initialized = true;\n }\n\n show(p) {\n if(!this.isEnabled() /*|| this.loaderDiv.style.display === p*/){\n return;\n }\n\n let displayLoader = () => {\n if(!this.loaderDiv){\n return;\n }\n if(this.onShowLoader && p !== 'none'){\n this.onShowLoader.call(null, this);\n }\n this.loaderDiv.style.display = p;\n if(this.onHideLoader && p === 'none'){\n this.onHideLoader.call(null, this);\n }\n };\n\n let t = p === 'none' ? this.loaderCloseDelay : 1;\n global.setTimeout(displayLoader, t);\n }\n\n destroy() {\n if(!this.initialized){\n return;\n }\n\n let emitter = this.emitter;\n\n Dom.remove(this.loaderDiv);\n this.loaderDiv = null;\n\n // Unsubscribe to events\n emitter.off([\n 'before-filtering',\n 'before-populating-filter',\n 'before-page-change',\n 'before-clearing-filters',\n 'before-page-length-change',\n 'before-reset-page',\n 'before-reset-page-length',\n 'before-loading-extensions',\n 'before-loading-themes'],\n ()=> this.show('')\n );\n emitter.off([\n 'after-filtering',\n 'after-populating-filter',\n 'after-page-change',\n 'after-clearing-filters',\n 'after-page-length-change',\n 'after-reset-page',\n 'after-reset-page-length',\n 'after-loading-extensions',\n 'after-loading-themes'],\n ()=> this.show('none')\n );\n\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 411,
"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": 5,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 412,
"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": 7,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 413,
"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": 13,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 414,
"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": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 415,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 416,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 417,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 418,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 419,
"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": 30,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 420,
"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": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 421,
"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": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 422,
"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": 38,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 423,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#init",
"access": null,
"description": null,
"lineNumber": 41,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 424,
"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": 59,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 425,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#initialized",
"access": null,
"description": null,
"lineNumber": 94,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 426,
"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": 97,
"undocument": true,
"params": [
{
"name": "p",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 427,
"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": 119,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 428,
"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": 127,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 429,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/loader.js~Loader",
"longname": "src/modules/loader.js~Loader#initialized",
"access": null,
"description": null,
"lineNumber": 155,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 430,
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/noResults.js",
"memberof": null,
"longname": "src/modules/noResults.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import {Feature} from './feature';\nimport Dom from '../dom';\nimport Types from '../types';\n\nexport class NoResults extends Feature{\n\n /**\n * No results message UI component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'noResults');\n\n //configuration object\n let f = this.config.no_results_message;\n\n this.content = f.content || 'No results';\n this.customContainer = f.custom_container || null;\n this.customContainerId = f.custom_container_id || null;\n this.isExternal = !Types.isEmpty(this.customContainer) ||\n !Types.isEmpty(this.customContainerId);\n this.cssClass = f.css_class || 'no-results';\n\n this.cont = null;\n\n //callback before message is displayed\n this.onBeforeShowMsg = Types.isFn(f.on_before_show_msg) ?\n f.on_before_show_msg : null;\n //callback after message is displayed\n this.onAfterShowMsg = Types.isFn(f.on_after_show_msg) ?\n f.on_after_show_msg : null;\n //callback before message is hidden\n this.onBeforeHideMsg = Types.isFn(f.on_before_hide_msg) ?\n f.on_before_hide_msg : null;\n //callback after message is hidden\n this.onAfterHideMsg = Types.isFn(f.on_after_hide_msg) ?\n f.on_after_hide_msg : null;\n\n this.prfxNoResults = 'nores_';\n }\n\n init(){\n if(this.initialized){\n return;\n }\n let tf = this.tf;\n let target = this.customContainer || Dom.id(this.customContainerId) ||\n tf.tbl;\n\n //container\n let cont = Dom.create('div', ['id', this.prfxNoResults+tf.id]);\n cont.className = this.cssClass;\n cont.innerHTML = this.content;\n\n if(this.isExternal){\n target.appendChild(cont);\n } else {\n target.parentNode.insertBefore(cont, target.nextSibling);\n }\n\n this.cont = cont;\n\n // subscribe to after-filtering event\n this.emitter.on(['after-filtering'], ()=> this.toggle());\n\n this.initialized = true;\n this.hide();\n }\n\n toggle(){\n if(this.tf.nbVisibleRows > 0){\n this.hide();\n } else {\n this.show();\n }\n }\n\n show(){\n if(!this.initialized || !this.isEnabled()){\n return;\n }\n\n if(this.onBeforeShowMsg){\n this.onBeforeShowMsg.call(null, this.tf, this);\n }\n\n this.setWidth();\n this.cont.style.display = 'block';\n\n if(this.onAfterShowMsg){\n this.onAfterShowMsg.call(null, this.tf, this);\n }\n }\n\n hide(){\n if(!this.initialized || !this.isEnabled()){\n return;\n }\n\n if(this.onBeforeHideMsg){\n this.onBeforeHideMsg.call(null, this.tf, this);\n }\n\n this.cont.style.display = 'none';\n\n if(this.onBeforeHideMsg){\n this.onBeforeHideMsg.call(null, this.tf, this);\n }\n }\n\n setWidth(){\n if(!this.initialized || this.isExternal || !this.isEnabled()){\n return;\n }\n if(this.tf.gridLayout){\n let gridLayout = this.tf.feature('gridLayout');\n this.cont.style.width = gridLayout.tblCont.clientWidth + 'px';\n } else {\n this.cont.style.width = this.tf.tbl.clientWidth + 'px';\n }\n\n }\n\n destroy(){\n if(!this.initialized){\n return;\n }\n Dom.remove(this.cont);\n this.cont = null;\n // unsubscribe to after-filtering event\n this.emitter.off(['after-filtering'], ()=> this.toggle());\n\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 431,
"kind": "class",
"static": true,
"variation": null,
"name": "NoResults",
"memberof": "src/modules/noResults.js",
"longname": "src/modules/noResults.js~NoResults",
"access": null,
"export": true,
"importPath": "tablefilter/src/modules/noResults.js",
"importStyle": "{NoResults}",
"description": null,
"lineNumber": 5,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 432,
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#constructor",
"access": null,
"description": "No results message UI component",
"lineNumber": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 433,
"kind": "member",
"static": false,
"variation": null,
"name": "content",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#content",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 434,
"kind": "member",
"static": false,
"variation": null,
"name": "customContainer",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#customContainer",
"access": null,
"description": null,
"lineNumber": 18,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 435,
"kind": "member",
"static": false,
"variation": null,
"name": "customContainerId",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#customContainerId",
"access": null,
"description": null,
"lineNumber": 19,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 436,
"kind": "member",
"static": false,
"variation": null,
"name": "isExternal",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#isExternal",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 437,
"kind": "member",
"static": false,
"variation": null,
"name": "cssClass",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#cssClass",
"access": null,
"description": null,
"lineNumber": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 438,
"kind": "member",
"static": false,
"variation": null,
"name": "cont",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#cont",
"access": null,
"description": null,
"lineNumber": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 439,
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeShowMsg",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#onBeforeShowMsg",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 440,
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterShowMsg",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#onAfterShowMsg",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 441,
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeHideMsg",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#onBeforeHideMsg",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 442,
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterHideMsg",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#onAfterHideMsg",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 443,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxNoResults",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#prfxNoResults",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 444,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#init",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 445,
"kind": "member",
"static": false,
"variation": null,
"name": "cont",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#cont",
"access": null,
"description": null,
"lineNumber": 61,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 446,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#initialized",
"access": null,
"description": null,
"lineNumber": 66,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 447,
"kind": "method",
"static": false,
"variation": null,
"name": "toggle",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#toggle",
"access": null,
"description": null,
"lineNumber": 70,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 448,
"kind": "method",
"static": false,
"variation": null,
"name": "show",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#show",
"access": null,
"description": null,
"lineNumber": 78,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 449,
"kind": "method",
"static": false,
"variation": null,
"name": "hide",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#hide",
"access": null,
"description": null,
"lineNumber": 95,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 450,
"kind": "method",
"static": false,
"variation": null,
"name": "setWidth",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#setWidth",
"access": null,
"description": null,
"lineNumber": 111,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 451,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#destroy",
"access": null,
"description": null,
"lineNumber": 124,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 452,
"kind": "member",
"static": false,
"variation": null,
"name": "cont",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#cont",
"access": null,
"description": null,
"lineNumber": 129,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 453,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/noResults.js~NoResults",
"longname": "src/modules/noResults.js~NoResults#initialized",
"access": null,
"description": null,
"lineNumber": 133,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 454,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Types from '../types';\nimport Str from '../string';\nimport Event from '../event';\n\nexport class Paging extends Feature{\n\n /**\n * Pagination component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'paging');\n\n // Configuration object\n var f = this.config;\n\n //css class for paging buttons (previous,next,etc.)\n this.btnPageCssClass = f.paging_btn_css_class || 'pgInp';\n //stores paging select element\n this.pagingSlc = null;\n //results per page select element\n this.resultsPerPageSlc = null;\n //id of container element\n this.pagingTgtId = f.paging_target_id || null;\n //defines table paging length\n this.pagingLength = !isNaN(f.paging_length) ? f.paging_length : 10;\n //id of container element\n this.resultsPerPageTgtId = f.results_per_page_target_id || null;\n //css class for paging select element\n this.pgSlcCssClass = f.paging_slc_css_class || 'pgSlc';\n //css class for paging input element\n this.pgInpCssClass = f.paging_inp_css_class || 'pgNbInp';\n //stores results per page text and values\n this.resultsPerPage = f.results_per_page || null;\n //enables/disables results per page drop-down\n this.hasResultsPerPage = Types.isArray(this.resultsPerPage);\n //defines css class for results per page select\n this.resultsSlcCssClass = f.results_slc_css_class || 'rspg';\n //css class for label preceding results per page select\n this.resultsSpanCssClass = f.results_span_css_class || 'rspgSpan';\n //1st row index of current page\n this.startPagingRow = 0;\n //total nb of pages\n this.nbPages = 0;\n //current page nb\n this.currentPageNb = 1;\n //defines next page button text\n this.btnNextPageText = f.btn_next_page_text || '>';\n //defines previous page button text\n this.btnPrevPageText = f.btn_prev_page_text || '<';\n //defines last page button text\n this.btnLastPageText = f.btn_last_page_text || '>|';\n //defines first page button text\n this.btnFirstPageText = f.btn_first_page_text || '|<';\n //defines next page button html\n this.btnNextPageHtml = f.btn_next_page_html ||\n (!tf.enableIcons ? null :\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\n ' nextPage\" title=\"Next page\" />');\n //defines previous page button html\n this.btnPrevPageHtml = f.btn_prev_page_html ||\n (!tf.enableIcons ? null :\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\n ' previousPage\" title=\"Previous page\" />');\n //defines last page button html\n this.btnFirstPageHtml = f.btn_first_page_html ||\n (!tf.enableIcons ? null :\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\n ' firstPage\" title=\"First page\" />');\n //defines previous page button html\n this.btnLastPageHtml = f.btn_last_page_html ||\n (!tf.enableIcons ? null :\n '<input type=\"button\" value=\"\" class=\"'+this.btnPageCssClass +\n ' lastPage\" title=\"Last page\" />');\n //defines text preceeding page selector drop-down\n this.pageText = f.page_text || ' Page ';\n //defines text after page selector drop-down\n this.ofText = f.of_text || ' of ';\n //css class for span containing tot nb of pages\n this.nbPgSpanCssClass = f.nb_pages_css_class || 'nbpg';\n //enables/disables paging buttons\n this.hasPagingBtns = f.paging_btns===false ? false : true;\n //defines previous page button html\n this.pageSelectorType = f.page_selector_type || tf.fltTypeSlc;\n //calls function before page is changed\n this.onBeforeChangePage = Types.isFn(f.on_before_change_page) ?\n f.on_before_change_page : null;\n //calls function before page is changed\n this.onAfterChangePage = Types.isFn(f.on_after_change_page) ?\n f.on_after_change_page : null;\n\n //pages select\n this.prfxSlcPages = 'slcPages_';\n //results per page select\n this.prfxSlcResults = 'slcResults_';\n //label preciding results per page select\n this.prfxSlcResultsTxt = 'slcResultsTxt_';\n //span containing next page button\n this.prfxBtnNextSpan = 'btnNextSpan_';\n //span containing previous page button\n this.prfxBtnPrevSpan = 'btnPrevSpan_';\n //span containing last page button\n this.prfxBtnLastSpan = 'btnLastSpan_';\n //span containing first page button\n this.prfxBtnFirstSpan = 'btnFirstSpan_';\n //next button\n this.prfxBtnNext = 'btnNext_';\n //previous button\n this.prfxBtnPrev = 'btnPrev_';\n //last button\n this.prfxBtnLast = 'btnLast_';\n //first button\n this.prfxBtnFirst = 'btnFirst_';\n //span for tot nb pages\n this.prfxPgSpan = 'pgspan_';\n //span preceding pages select (contains 'Page')\n this.prfxPgBeforeSpan = 'pgbeforespan_';\n //span following pages select (contains ' of ')\n this.prfxPgAfterSpan = 'pgafterspan_';\n\n var start_row = tf.refRow;\n var nrows = tf.nbRows;\n //calculates page nb\n this.nbPages = Math.ceil((nrows-start_row)/this.pagingLength);\n\n //Paging elements events\n var o = this;\n // Paging DOM events\n this.evt = {\n slcIndex(){\n return (o.pageSelectorType===tf.fltTypeSlc) ?\n o.pagingSlc.options.selectedIndex :\n parseInt(o.pagingSlc.value, 10)-1;\n },\n nbOpts(){\n return (o.pageSelectorType===tf.fltTypeSlc) ?\n parseInt(o.pagingSlc.options.length, 10)-1 :\n (o.nbPages-1);\n },\n next(){\n var nextIndex = o.evt.slcIndex() < o.evt.nbOpts() ?\n o.evt.slcIndex()+1 : 0;\n o.changePage(nextIndex);\n },\n prev(){\n var prevIndex = o.evt.slcIndex()>0 ?\n o.evt.slcIndex()-1 : o.evt.nbOpts();\n o.changePage(prevIndex);\n },\n last(){\n o.changePage(o.evt.nbOpts());\n },\n first(){\n o.changePage(0);\n },\n _detectKey(e){\n var key = Event.keyCode(e);\n if(key===13){\n if(tf.sorted){\n tf.filter();\n o.changePage(o.evt.slcIndex());\n } else{\n o.changePage();\n }\n this.blur();\n }\n },\n slcPagesChange: null,\n nextEvt: null,\n prevEvt: null,\n lastEvt: null,\n firstEvt: null\n };\n }\n\n /**\n * Initialize DOM elements\n */\n init(){\n var slcPages;\n var tf = this.tf;\n var evt = this.evt;\n\n if(this.initialized){\n return;\n }\n\n // Check resultsPerPage is in expected format and initialise the\n // results per page component\n if(this.hasResultsPerPage){\n if(this.resultsPerPage.length<2){\n this.hasResultsPerPage = false;\n } else {\n this.pagingLength = this.resultsPerPage[1][0];\n this.setResultsPerPage();\n }\n }\n\n evt.slcPagesChange = (event) => {\n var slc = event.target;\n this.changePage(slc.selectedIndex);\n };\n\n // Paging drop-down list selector\n if(this.pageSelectorType === tf.fltTypeSlc){\n slcPages = Dom.create(\n tf.fltTypeSlc, ['id', this.prfxSlcPages+tf.id]);\n slcPages.className = this.pgSlcCssClass;\n Event.add(slcPages, 'change', evt.slcPagesChange);\n }\n\n // Paging input selector\n if(this.pageSelectorType === tf.fltTypeInp){\n slcPages = Dom.create(\n tf.fltTypeInp,\n ['id', this.prfxSlcPages+tf.id],\n ['value', this.currentPageNb]\n );\n slcPages.className = this.pgInpCssClass;\n Event.add(slcPages, 'keypress', evt._detectKey);\n }\n\n // btns containers\n var btnNextSpan = Dom.create(\n 'span',['id', this.prfxBtnNextSpan+tf.id]);\n var btnPrevSpan = Dom.create(\n 'span',['id', this.prfxBtnPrevSpan+tf.id]);\n var btnLastSpan = Dom.create(\n 'span',['id', this.prfxBtnLastSpan+tf.id]);\n var btnFirstSpan = Dom.create(\n 'span',['id', this.prfxBtnFirstSpan+tf.id]);\n\n if(this.hasPagingBtns){\n // Next button\n if(!this.btnNextPageHtml){\n var btn_next = Dom.create(\n tf.fltTypeInp,\n ['id', this.prfxBtnNext+tf.id],\n ['type', 'button'],\n ['value', this.btnNextPageText],\n ['title', 'Next']\n );\n btn_next.className = this.btnPageCssClass;\n Event.add(btn_next, 'click', evt.next);\n btnNextSpan.appendChild(btn_next);\n } else {\n btnNextSpan.innerHTML = this.btnNextPageHtml;\n Event.add(btnNextSpan, 'click', evt.next);\n }\n // Previous button\n if(!this.btnPrevPageHtml){\n var btn_prev = Dom.create(\n tf.fltTypeInp,\n ['id', this.prfxBtnPrev+tf.id],\n ['type', 'button'],\n ['value', this.btnPrevPageText],\n ['title', 'Previous']\n );\n btn_prev.className = this.btnPageCssClass;\n Event.add(btn_prev, 'click', evt.prev);\n btnPrevSpan.appendChild(btn_prev);\n } else {\n btnPrevSpan.innerHTML = this.btnPrevPageHtml;\n Event.add(btnPrevSpan, 'click', evt.prev);\n }\n // Last button\n if(!this.btnLastPageHtml){\n var btn_last = Dom.create(\n tf.fltTypeInp,\n ['id', this.prfxBtnLast+tf.id],\n ['type', 'button'],\n ['value', this.btnLastPageText],\n ['title', 'Last']\n );\n btn_last.className = this.btnPageCssClass;\n Event.add(btn_last, 'click', evt.last);\n btnLastSpan.appendChild(btn_last);\n } else {\n btnLastSpan.innerHTML = this.btnLastPageHtml;\n Event.add(btnLastSpan, 'click', evt.last);\n }\n // First button\n if(!this.btnFirstPageHtml){\n var btn_first = Dom.create(\n tf.fltTypeInp,\n ['id', this.prfxBtnFirst+tf.id],\n ['type', 'button'],\n ['value', this.btnFirstPageText],\n ['title', 'First']\n );\n btn_first.className = this.btnPageCssClass;\n Event.add(btn_first, 'click', evt.first);\n btnFirstSpan.appendChild(btn_first);\n } else {\n btnFirstSpan.innerHTML = this.btnFirstPageHtml;\n Event.add(btnFirstSpan, 'click', evt.first);\n }\n }\n\n // paging elements (buttons+drop-down list) are added to defined element\n if(!this.pagingTgtId){\n tf.setToolbar();\n }\n var targetEl = !this.pagingTgtId ? tf.mDiv : Dom.id(this.pagingTgtId);\n targetEl.appendChild(btnFirstSpan);\n targetEl.appendChild(btnPrevSpan);\n\n var pgBeforeSpan = Dom.create(\n 'span',['id', this.prfxPgBeforeSpan+tf.id] );\n pgBeforeSpan.appendChild( Dom.text(this.pageText) );\n pgBeforeSpan.className = this.nbPgSpanCssClass;\n targetEl.appendChild(pgBeforeSpan);\n targetEl.appendChild(slcPages);\n var pgAfterSpan = Dom.create(\n 'span',['id', this.prfxPgAfterSpan+tf.id]);\n pgAfterSpan.appendChild( Dom.text(this.ofText) );\n pgAfterSpan.className = this.nbPgSpanCssClass;\n targetEl.appendChild(pgAfterSpan);\n var pgspan = Dom.create( 'span',['id', this.prfxPgSpan+tf.id] );\n pgspan.className = this.nbPgSpanCssClass;\n pgspan.appendChild( Dom.text(' '+this.nbPages+' ') );\n targetEl.appendChild(pgspan);\n targetEl.appendChild(btnNextSpan);\n targetEl.appendChild(btnLastSpan);\n this.pagingSlc = Dom.id(this.prfxSlcPages+tf.id);\n\n if(!tf.rememberGridValues){\n this.setPagingInfo();\n }\n if(!tf.fltGrid){\n tf.validateAllRows();\n this.setPagingInfo(tf.validRowsIndex);\n }\n\n this.emitter.on(['after-filtering'], ()=> this.resetPagingInfo());\n this.emitter.on(['initialized'], ()=> this.resetValues());\n this.emitter.on(['change-page'],\n (tf, pageNumber) => this.setPage(pageNumber));\n this.emitter.on(['change-page-results'],\n (tf, pageLength) => this.changeResultsPerPage(pageLength));\n\n this.initialized = true;\n }\n\n /**\n * Reset paging when filters are already instantiated\n * @param {Boolean} filterTable Execute filtering once paging instanciated\n */\n reset(filterTable=false){\n var tf = this.tf;\n if(this.isEnabled()){\n return;\n }\n this.enable();\n this.init();\n\n if(filterTable){\n tf.filter();\n }\n }\n\n /**\n * Reset paging info from scratch after a filtering process\n */\n resetPagingInfo(){\n this.startPagingRow = 0;\n this.currentPageNb = 1;\n this.setPagingInfo(this.tf.validRowsIndex);\n }\n\n /**\n * Calculate number of pages based on valid rows\n * Refresh paging select according to number of pages\n * @param {Array} validRows Collection of valid rows\n */\n setPagingInfo(validRows){\n var tf = this.tf;\n var mdiv = !this.pagingTgtId ? tf.mDiv : Dom.id(this.pagingTgtId);\n var pgspan = Dom.id(this.prfxPgSpan+tf.id);\n\n //store valid rows indexes\n tf.validRowsIndex = validRows || tf.getValidRows(true);\n\n //calculate nb of pages\n this.nbPages = Math.ceil(tf.validRowsIndex.length/this.pagingLength);\n //refresh page nb span\n pgspan.innerHTML = this.nbPages;\n //select clearing shortcut\n if(this.pageSelectorType === tf.fltTypeSlc){\n this.pagingSlc.innerHTML = '';\n }\n\n if(this.nbPages>0){\n mdiv.style.visibility = 'visible';\n if(this.pageSelectorType === tf.fltTypeSlc){\n for(var z=0; z<this.nbPages; z++){\n var opt = Dom.createOpt(z+1, z*this.pagingLength, false);\n this.pagingSlc.options[z] = opt;\n }\n } else{\n //input type\n this.pagingSlc.value = this.currentPageNb;\n }\n\n } else {\n /*** if no results paging select and buttons are hidden ***/\n mdiv.style.visibility = 'hidden';\n }\n this.groupByPage(tf.validRowsIndex);\n }\n\n /**\n * Group table rows by page and display valid rows\n * @param {Array} validRows Collection of valid rows\n */\n groupByPage(validRows){\n var tf = this.tf;\n var rows = tf.tbl.rows;\n var startPagingRow = parseInt(this.startPagingRow, 10);\n var endPagingRow = startPagingRow + parseInt(this.pagingLength, 10);\n\n //store valid rows indexes\n if(validRows){\n tf.validRowsIndex = validRows;\n }\n\n //this loop shows valid rows of current page\n for(var h=0, len=tf.validRowsIndex.length; h<len; h++){\n var validRowIdx = tf.validRowsIndex[h];\n var r = rows[validRowIdx];\n var isRowValid = r.getAttribute('validRow');\n var rowDisplayed = false;\n\n if(h>=startPagingRow && h<endPagingRow){\n if(Types.isNull(isRowValid) || Boolean(isRowValid==='true')){\n r.style.display = '';\n rowDisplayed = true;\n }\n } else {\n r.style.display = 'none';\n }\n this.emitter.emit('row-paged', tf, validRowIdx, h, rowDisplayed);\n }\n\n tf.nbVisibleRows = tf.validRowsIndex.length;\n\n // broadcast grouping by page\n this.emitter.emit('grouped-by-page', tf, this);\n }\n\n /**\n * Return the current page number\n * @return {Number} Page number\n */\n getPage(){\n return this.currentPageNb;\n }\n\n /**\n * Show page based on passed param value (string or number):\n * @param {String}/{Number} cmd possible string values: 'next',\n * 'previous', 'last', 'first' or page number as per param\n */\n setPage(cmd){\n var tf = this.tf;\n if(!tf.hasGrid() || !this.isEnabled()){\n return;\n }\n var btnEvt = this.evt,\n cmdtype = typeof cmd;\n if(cmdtype === 'string'){\n switch(Str.lower(cmd)){\n case 'next':\n btnEvt.next();\n break;\n case 'previous':\n btnEvt.prev();\n break;\n case 'last':\n btnEvt.last();\n break;\n case 'first':\n btnEvt.first();\n break;\n default:\n btnEvt.next();\n break;\n }\n }\n else if(cmdtype === 'number'){\n this.changePage(cmd-1);\n }\n }\n\n /**\n * Generates UI elements for the number of results per page drop-down\n */\n setResultsPerPage(){\n var tf = this.tf;\n var evt = this.evt;\n\n if(this.resultsPerPageSlc || !this.resultsPerPage){\n return;\n }\n\n evt.slcResultsChange = (ev) => {\n this.onChangeResultsPerPage();\n ev.target.blur();\n };\n\n var slcR = Dom.create(\n tf.fltTypeSlc, ['id', this.prfxSlcResults+tf.id]);\n slcR.className = this.resultsSlcCssClass;\n var slcRText = this.resultsPerPage[0],\n slcROpts = this.resultsPerPage[1];\n var slcRSpan = Dom.create(\n 'span',['id', this.prfxSlcResultsTxt+tf.id]);\n slcRSpan.className = this.resultsSpanCssClass;\n\n // results per page select is added to external element\n if(!this.resultsPerPageTgtId){\n tf.setToolbar();\n }\n var targetEl = !this.resultsPerPageTgtId ?\n tf.rDiv : Dom.id(this.resultsPerPageTgtId);\n slcRSpan.appendChild(Dom.text(slcRText));\n\n var help = tf.feature('help');\n if(help && help.btn){\n help.btn.parentNode.insertBefore(slcRSpan, help.btn);\n help.btn.parentNode.insertBefore(slcR, help.btn);\n } else {\n targetEl.appendChild(slcRSpan);\n targetEl.appendChild(slcR);\n }\n\n for(var r=0; r<slcROpts.length; r++){\n var currOpt = new Option(slcROpts[r], slcROpts[r], false, false);\n slcR.options[r] = currOpt;\n }\n Event.add(slcR, 'change', evt.slcResultsChange);\n this.resultsPerPageSlc = slcR;\n }\n\n /**\n * Remove number of results per page UI elements\n */\n removeResultsPerPage(){\n var tf = this.tf;\n if(!tf.hasGrid() || !this.resultsPerPageSlc || !this.resultsPerPage){\n return;\n }\n var slcR = this.resultsPerPageSlc,\n slcRSpan = Dom.id(this.prfxSlcResultsTxt+tf.id);\n if(slcR){\n Dom.remove(slcR);\n }\n if(slcRSpan){\n Dom.remove(slcRSpan);\n }\n this.resultsPerPageSlc = null;\n }\n\n /**\n * Change the page according to passed index\n * @param {Number} index Index of the page (0-n)\n */\n changePage(index){\n var tf = this.tf;\n\n if(!this.isEnabled()){\n return;\n }\n\n this.emitter.emit('before-page-change', tf, (index + 1));\n\n if(index === null){\n index = this.pageSelectorType === tf.fltTypeSlc ?\n this.pagingSlc.options.selectedIndex : (this.pagingSlc.value-1);\n }\n if( index>=0 && index<=(this.nbPages-1) ){\n if(this.onBeforeChangePage){\n this.onBeforeChangePage.call(null, this, (index + 1));\n }\n this.currentPageNb = parseInt(index, 10)+1;\n if(this.pageSelectorType===tf.fltTypeSlc){\n this.pagingSlc.options[index].selected = true;\n } else {\n this.pagingSlc.value = this.currentPageNb;\n }\n\n this.startPagingRow = (this.pageSelectorType === tf.fltTypeSlc) ?\n this.pagingSlc.value : (index*this.pagingLength);\n\n this.groupByPage();\n\n if(this.onAfterChangePage){\n this.onAfterChangePage.call(null, this, (index + 1));\n }\n }\n\n this.emitter.emit('after-page-change', tf, (index + 1));\n }\n\n changeResultsPerPage(val){\n if(!this.isEnabled() || isNaN(val)){\n return;\n }\n\n this.resultsPerPageSlc.value = val;\n this.onChangeResultsPerPage();\n }\n\n /**\n * Change rows according to page results drop-down\n */\n onChangeResultsPerPage(){\n var tf = this.tf;\n\n if(!this.isEnabled()){\n return;\n }\n\n this.emitter.emit('before-page-length-change', tf);\n\n var slcR = this.resultsPerPageSlc;\n var slcIndex = slcR.selectedIndex;\n var slcPagesSelIndex = (this.pageSelectorType === tf.fltTypeSlc) ?\n this.pagingSlc.selectedIndex :\n parseInt(this.pagingSlc.value-1, 10);\n this.pagingLength = parseInt(slcR.options[slcIndex].value, 10);\n this.startPagingRow = this.pagingLength*slcPagesSelIndex;\n\n if(!isNaN(this.pagingLength)){\n if(this.startPagingRow >= tf.nbFilterableRows){\n this.startPagingRow = (tf.nbFilterableRows-this.pagingLength);\n }\n this.setPagingInfo();\n\n if(this.pageSelectorType === tf.fltTypeSlc){\n var slcIdx =\n (this.pagingSlc.options.length-1<=slcPagesSelIndex) ?\n (this.pagingSlc.options.length-1) : slcPagesSelIndex;\n this.pagingSlc.options[slcIdx].selected = true;\n }\n }\n\n this.emitter.emit('after-page-length-change', tf, this.pagingLength);\n }\n\n /**\n * Re-set persisted pagination info\n */\n resetValues(){\n var tf = this.tf;\n if(tf.rememberPageLen){\n this.resetPageLength();\n }\n if(tf.rememberPageNb){\n this.resetPage();\n }\n }\n\n /**\n * Re-set page nb at page re-load\n */\n resetPage(){\n var tf = this.tf;\n if(!this.isEnabled()){\n return;\n }\n this.emitter.emit('before-reset-page', tf);\n var pgNb = tf.feature('store').getPageNb();\n if(pgNb !== ''){\n this.changePage((pgNb-1));\n }\n this.emitter.emit('after-reset-page', tf, pgNb);\n }\n\n /**\n * Re-set page length value at page re-load\n */\n resetPageLength(){\n var tf = this.tf;\n if(!this.isEnabled()){\n return;\n }\n this.emitter.emit('before-reset-page-length', tf);\n var pglenIndex = tf.feature('store').getPageLength();\n\n if(pglenIndex!==''){\n this.resultsPerPageSlc.options[pglenIndex].selected = true;\n this.changeResultsPerPage();\n }\n this.emitter.emit('after-reset-page-length', tf, pglenIndex);\n }\n\n /**\n * Remove paging feature\n */\n destroy(){\n var tf = this.tf;\n\n if(!this.initialized){\n return;\n }\n // btns containers\n var btnNextSpan = Dom.id(this.prfxBtnNextSpan+tf.id);\n var btnPrevSpan = Dom.id(this.prfxBtnPrevSpan+tf.id);\n var btnLastSpan = Dom.id(this.prfxBtnLastSpan+tf.id);\n var btnFirstSpan = Dom.id(this.prfxBtnFirstSpan+tf.id);\n //span containing 'Page' text\n var pgBeforeSpan = Dom.id(this.prfxPgBeforeSpan+tf.id);\n //span containing 'of' text\n var pgAfterSpan = Dom.id(this.prfxPgAfterSpan+tf.id);\n //span containing nb of pages\n var pgspan = Dom.id(this.prfxPgSpan+tf.id);\n\n var evt = this.evt;\n\n if(this.pagingSlc){\n if(this.pageSelectorType === tf.fltTypeSlc){\n Event.remove(this.pagingSlc, 'change', evt.slcPagesChange);\n }\n else if(this.pageSelectorType === tf.fltTypeInp){\n Event.remove(this.pagingSlc, 'keypress', evt._detectKey);\n }\n Dom.remove(this.pagingSlc);\n }\n\n if(btnNextSpan){\n Event.remove(btnNextSpan, 'click', evt.next);\n Dom.remove(btnNextSpan);\n }\n\n if(btnPrevSpan){\n Event.remove(btnPrevSpan, 'click', evt.prev);\n Dom.remove(btnPrevSpan);\n }\n\n if(btnLastSpan){\n Event.remove(btnLastSpan, 'click', evt.last);\n Dom.remove(btnLastSpan);\n }\n\n if(btnFirstSpan){\n Event.remove(btnFirstSpan, 'click', evt.first);\n Dom.remove(btnFirstSpan);\n }\n\n if(pgBeforeSpan){\n Dom.remove(pgBeforeSpan);\n }\n\n if(pgAfterSpan){\n Dom.remove(pgAfterSpan);\n }\n\n if(pgspan){\n Dom.remove(pgspan);\n }\n\n if(this.hasResultsPerPage){\n this.removeResultsPerPage();\n }\n\n this.emitter.off(['after-filtering'], ()=> this.resetPagingInfo());\n this.emitter.off(['initialized'], ()=> this.resetValues());\n this.emitter.off(['change-page'],\n (tf, pageNumber) => this.setPage(pageNumber));\n this.emitter.off(['change-page-results'],\n (tf, pageLength) => this.changeResultsPerPage(pageLength));\n\n this.pagingSlc = null;\n this.nbPages = 0;\n this.disable();\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 455,
"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": 7,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 456,
"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": 13,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 457,
"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": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 458,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 459,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 460,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 461,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 462,
"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": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 463,
"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": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 464,
"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": 34,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 465,
"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": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 466,
"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": 38,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 467,
"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": 40,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 468,
"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": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 469,
"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": 44,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 470,
"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": 46,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 471,
"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": 48,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 472,
"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": 50,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 473,
"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": 52,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 474,
"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": 54,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 475,
"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": 56,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 476,
"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": 58,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 477,
"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": 63,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 478,
"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": 68,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 479,
"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": 73,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 480,
"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": 78,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 481,
"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": 80,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 482,
"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": 82,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 483,
"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": 84,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 484,
"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": 86,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 485,
"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": 88,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 486,
"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": 91,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 487,
"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": 95,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 488,
"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": 97,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 489,
"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": 99,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 490,
"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": 101,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 491,
"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": 103,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 492,
"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": 105,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 493,
"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": 107,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 494,
"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": 109,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 495,
"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": 111,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 496,
"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": 113,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 497,
"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": 115,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 498,
"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": 117,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 499,
"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": 119,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 500,
"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": 121,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 501,
"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": 126,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 502,
"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": 131,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 503,
"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": 181,
"params": [],
"generator": false
},
{
"__docId__": 504,
"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": 194,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 505,
"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": 196,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 506,
"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": 327,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 507,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#initialized",
"access": null,
"description": null,
"lineNumber": 344,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 508,
"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": 351,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "filterTable",
"description": "Execute filtering once paging instanciated"
}
],
"generator": false
},
{
"__docId__": 509,
"kind": "method",
"static": false,
"variation": null,
"name": "resetPagingInfo",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resetPagingInfo",
"access": null,
"description": "Reset paging info from scratch after a filtering process",
"lineNumber": 367,
"params": [],
"generator": false
},
{
"__docId__": 510,
"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": 368,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 511,
"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": 369,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 512,
"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": 378,
"params": [
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "validRows",
"description": "Collection of valid rows"
}
],
"generator": false
},
{
"__docId__": 513,
"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": 387,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 514,
"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": 418,
"params": [
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "validRows",
"description": "Collection of valid rows"
}
],
"generator": false
},
{
"__docId__": 515,
"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": 457,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": "Page number"
},
"generator": false
},
{
"__docId__": 516,
"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": 466,
"params": [
{
"nullable": null,
"types": [
"String}/{Number"
],
"spread": false,
"optional": false,
"name": "cmd",
"description": "possible string values: 'next',\n 'previous', 'last', 'first' or page number as per param"
}
],
"generator": false
},
{
"__docId__": 517,
"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": 500,
"params": [],
"generator": false
},
{
"__docId__": 518,
"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": 544,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 519,
"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": 550,
"params": [],
"generator": false
},
{
"__docId__": 520,
"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": 563,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 521,
"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": 570,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Index of the page (0-n)"
}
],
"generator": false
},
{
"__docId__": 522,
"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": 587,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 523,
"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": 594,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 524,
"kind": "method",
"static": false,
"variation": null,
"name": "changeResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#changeResultsPerPage",
"access": null,
"description": null,
"lineNumber": 607,
"undocument": true,
"params": [
{
"name": "val",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 525,
"kind": "method",
"static": false,
"variation": null,
"name": "onChangeResultsPerPage",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#onChangeResultsPerPage",
"access": null,
"description": "Change rows according to page results drop-down",
"lineNumber": 619,
"params": [],
"generator": false
},
{
"__docId__": 526,
"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": 633,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 527,
"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": 634,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 528,
"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": 638,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 529,
"kind": "method",
"static": false,
"variation": null,
"name": "resetValues",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#resetValues",
"access": null,
"description": "Re-set persisted pagination info",
"lineNumber": 656,
"params": [],
"generator": false
},
{
"__docId__": 530,
"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": 669,
"params": [],
"generator": false
},
{
"__docId__": 531,
"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": 685,
"params": [],
"generator": false
},
{
"__docId__": 532,
"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": 703,
"params": [],
"generator": false
},
{
"__docId__": 533,
"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": 776,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 534,
"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": 777,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 535,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/paging.js~Paging",
"longname": "src/modules/paging.js~Paging#initialized",
"access": null,
"description": null,
"lineNumber": 779,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 536,
"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 {Feature} from './feature';\nimport Types from '../types';\nimport Dom from '../dom';\nimport Event from '../event';\n\nexport class PopupFilter extends Feature{\n\n /**\n * Pop-up filter component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'popupFilters');\n\n // Configuration object\n var f = this.config;\n\n // Enable external filters\n tf.isExternalFlt = true;\n tf.externalFltTgtIds = [];\n\n //filter icon path\n this.popUpImgFlt = f.popup_filters_image ||\n tf.themesPath+'icn_filter.gif';\n //active filter icon path\n this.popUpImgFltActive = f.popup_filters_image_active ||\n tf.themesPath+'icn_filterActive.gif';\n this.popUpImgFltHtml = f.popup_filters_image_html ||\n '<img src=\"'+ this.popUpImgFlt +'\" alt=\"Column filter\" />';\n //defines css class for popup div containing filter\n this.popUpDivCssClass = f.popup_div_css_class || 'popUpFilter';\n //callback function before popup filtes is opened\n this.onBeforePopUpOpen = Types.isFn(f.on_before_popup_filter_open) ?\n f.on_before_popup_filter_open : null;\n //callback function after popup filtes is opened\n this.onAfterPopUpOpen = Types.isFn(f.on_after_popup_filter_open) ?\n f.on_after_popup_filter_open : null;\n //callback function before popup filtes is closed\n this.onBeforePopUpClose =\n Types.isFn(f.on_before_popup_filter_close) ?\n f.on_before_popup_filter_close : null;\n //callback function after popup filtes is closed\n this.onAfterPopUpClose = Types.isFn(f.on_after_popup_filter_close) ?\n f.on_after_popup_filter_close : null;\n\n //stores filters spans\n this.popUpFltSpans = [];\n //stores filters icons\n this.popUpFltImgs = [];\n //stores filters containers\n this.popUpFltElms = this.popUpFltElmCache || [];\n this.popUpFltAdjustToContainer = true;\n\n //id prefix for pop-up filter span\n this.prfxPopUpSpan = 'popUpSpan_';\n //id prefix for pop-up div containing filter\n this.prfxPopUpDiv = 'popUpDiv_';\n }\n\n onClick(e){\n var evt = e || global.event,\n elm = evt.target.parentNode,\n colIndex = parseInt(elm.getAttribute('ci'), 10);\n\n this.closeAll(colIndex);\n this.toggle(colIndex);\n\n if(this.popUpFltAdjustToContainer){\n var popUpDiv = this.popUpFltElms[colIndex],\n header = this.tf.getHeaderElement(colIndex),\n headerWidth = header.clientWidth * 0.95;\n popUpDiv.style.width = parseInt(headerWidth, 10) + 'px';\n }\n Event.cancel(evt);\n Event.stop(evt);\n }\n\n /**\n * Initialize DOM elements\n */\n init(){\n if(this.initialized){\n return;\n }\n\n var tf = this.tf;\n\n // Override headers row index if no grouped headers\n if(tf.headersRow <= 1){\n tf.headersRow = 0;\n }\n\n for(var i=0; i<tf.nbCells; i++){\n if(tf.getFilterType(i) === tf.fltTypeNone){\n continue;\n }\n var popUpSpan = Dom.create(\n 'span',\n ['id', this.prfxPopUpSpan+tf.id+'_'+i],\n ['ci', i]\n );\n popUpSpan.innerHTML = this.popUpImgFltHtml;\n var header = tf.getHeaderElement(i);\n header.appendChild(popUpSpan);\n Event.add(popUpSpan, 'click', (evt) => { this.onClick(evt); });\n this.popUpFltSpans[i] = popUpSpan;\n this.popUpFltImgs[i] = popUpSpan.firstChild;\n }\n\n // subscribe to events\n this.emitter.on(['before-filtering'], ()=> this.buildIcons());\n this.emitter.on(['after-filtering'], ()=> this.closeAll());\n this.emitter.on(['cell-processed'],\n (tf, cellIndex)=> this.buildIcon(cellIndex, true));\n this.emitter.on(['filters-row-inserted'], ()=> this.tf.headersRow++);\n this.emitter.on(['before-filter-init'],\n (tf, colIndex)=> this.build(colIndex));\n\n this.initialized = true;\n }\n\n /**\n * Reset previously destroyed feature\n */\n reset(){\n this.enable();\n this.init();\n this.buildAll();\n }\n\n /**\n * Build all pop-up filters elements\n */\n buildAll(){\n for(var i=0; i<this.popUpFltElmCache.length; i++){\n this.build(i, this.popUpFltElmCache[i]);\n }\n }\n\n /**\n * Build a specified pop-up filter elements\n * @param {Number} colIndex Column index\n * @param {Object} div Optional container DOM element\n */\n build(colIndex, div){\n var tf = this.tf;\n var popUpDiv = !div ?\n Dom.create('div', ['id', this.prfxPopUpDiv+tf.id+'_'+colIndex]) :\n div;\n popUpDiv.className = this.popUpDivCssClass;\n tf.externalFltTgtIds.push(popUpDiv.id);\n var header = tf.getHeaderElement(colIndex);\n header.insertBefore(popUpDiv, header.firstChild);\n Event.add(popUpDiv, 'click', (evt) => Event.stop(evt));\n this.popUpFltElms[colIndex] = popUpDiv;\n }\n\n /**\n * Toogle visibility of specified filter\n * @param {Number} colIndex Column index\n */\n toggle(colIndex){\n var tf = this.tf,\n popUpFltElm = this.popUpFltElms[colIndex];\n\n if(popUpFltElm.style.display === 'none' ||\n popUpFltElm.style.display === ''){\n if(this.onBeforePopUpOpen){\n this.onBeforePopUpOpen.call(\n null, this, this.popUpFltElms[colIndex], colIndex);\n }\n popUpFltElm.style.display = 'block';\n if(tf.getFilterType(colIndex) === tf.fltTypeInp){\n var flt = tf.getFilterElement(colIndex);\n if(flt){\n flt.focus();\n }\n }\n if(this.onAfterPopUpOpen){\n this.onAfterPopUpOpen.call(\n null, this, this.popUpFltElms[colIndex], colIndex);\n }\n } else {\n if(this.onBeforePopUpClose){\n this.onBeforePopUpClose.call(\n null, this, this.popUpFltElms[colIndex], colIndex);\n }\n popUpFltElm.style.display = 'none';\n if(this.onAfterPopUpClose){\n this.onAfterPopUpClose.call(\n null, this, this.popUpFltElms[colIndex], colIndex);\n }\n }\n }\n\n /**\n * Close all filters excepted for the specified one if any\n * @param {Number} exceptIdx Column index of the filter to not close\n */\n closeAll(exceptIdx){\n for(var i=0; i<this.popUpFltElms.length; i++){\n if(i === exceptIdx){\n continue;\n }\n var popUpFltElm = this.popUpFltElms[i];\n if(popUpFltElm){\n popUpFltElm.style.display = 'none';\n }\n }\n }\n\n /**\n * Build all the icons representing the pop-up filters\n */\n buildIcons(){\n for(var i=0; i<this.popUpFltImgs.length; i++){\n this.buildIcon(i, false);\n }\n }\n\n /**\n * Apply specified icon state\n * @param {Number} colIndex Column index\n * @param {Boolean} active Apply active state\n */\n buildIcon(colIndex, active){\n if(this.popUpFltImgs[colIndex]){\n this.popUpFltImgs[colIndex].src = active ?\n this.popUpImgFltActive : this.popUpImgFlt;\n }\n }\n\n /**\n * Remove pop-up filters\n */\n destroy(){\n if(!this.initialized){\n return;\n }\n\n this.popUpFltElmCache = [];\n for(var i=0; i<this.popUpFltElms.length; i++){\n var popUpFltElm = this.popUpFltElms[i],\n popUpFltSpan = this.popUpFltSpans[i],\n popUpFltImg = this.popUpFltImgs[i];\n if(popUpFltElm){\n Dom.remove(popUpFltElm);\n this.popUpFltElmCache[i] = popUpFltElm;\n }\n popUpFltElm = null;\n if(popUpFltSpan){\n Dom.remove(popUpFltSpan);\n }\n popUpFltSpan = null;\n if(popUpFltImg){\n Dom.remove(popUpFltImg);\n }\n popUpFltImg = null;\n }\n this.popUpFltElms = [];\n this.popUpFltSpans = [];\n this.popUpFltImgs = [];\n\n // unsubscribe to events\n this.emitter.off(['before-filtering'], ()=> this.buildIcons());\n this.emitter.off(['after-filtering'], ()=> this.closeAll());\n this.emitter.off(['cell-processed'],\n (tf, cellIndex)=> this.buildIcon(cellIndex, true));\n this.emitter.off(['filters-row-inserted'], ()=> this.tf.headersRow++);\n this.emitter.off(['before-filter-init'],\n (tf, colIndex)=> this.build(colIndex));\n\n this.initialized = false;\n }\n\n}\n"
},
{
"__docId__": 537,
"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": 6,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 538,
"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": 12,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 539,
"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": 23,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 540,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 541,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 542,
"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": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 543,
"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": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 544,
"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": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 545,
"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": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 546,
"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": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 547,
"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": 47,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 548,
"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": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 549,
"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": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 550,
"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": 52,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 551,
"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": 55,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 552,
"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": 57,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 553,
"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": 60,
"undocument": true,
"params": [
{
"name": "e",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 554,
"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": 81,
"params": [],
"generator": false
},
{
"__docId__": 555,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#initialized",
"access": null,
"description": null,
"lineNumber": 119,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 556,
"kind": "method",
"static": false,
"variation": null,
"name": "reset",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#reset",
"access": null,
"description": "Reset previously destroyed feature",
"lineNumber": 125,
"params": [],
"generator": false
},
{
"__docId__": 557,
"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": 134,
"params": [],
"generator": false
},
{
"__docId__": 558,
"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": 145,
"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
},
{
"__docId__": 559,
"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": 162,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"__docId__": 560,
"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": 200,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "exceptIdx",
"description": "Column index of the filter to not close"
}
],
"generator": false
},
{
"__docId__": 561,
"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": 215,
"params": [],
"generator": false
},
{
"__docId__": 562,
"kind": "method",
"static": false,
"variation": null,
"name": "buildIcon",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#buildIcon",
"access": null,
"description": "Apply specified icon state",
"lineNumber": 226,
"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
},
{
"__docId__": 563,
"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": 236,
"params": [],
"generator": false
},
{
"__docId__": 564,
"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": 241,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 565,
"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": 260,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 566,
"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": 261,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 567,
"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": 262,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 568,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/popupFilter.js~PopupFilter",
"longname": "src/modules/popupFilter.js~PopupFilter#initialized",
"access": null,
"description": null,
"lineNumber": 273,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 569,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Types from '../types';\n\nexport class RowsCounter extends Feature{\n\n /**\n * Rows counter\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'rowsCounter');\n\n // TableFilter configuration\n var f = this.config;\n\n //id of custom container element\n this.rowsCounterTgtId = f.rows_counter_target_id || null;\n //element containing tot nb rows\n this.rowsCounterDiv = null;\n //element containing tot nb rows label\n this.rowsCounterSpan = null;\n //defines rows counter text\n this.rowsCounterText = f.rows_counter_text || 'Rows: ';\n this.fromToTextSeparator = f.from_to_text_separator || '-';\n this.overText = f.over_text || ' / ';\n //defines css class rows counter\n this.totRowsCssClass = f.tot_rows_css_class || 'tot';\n //rows counter div\n this.prfxCounter = 'counter_';\n //nb displayed rows label\n this.prfxTotRows = 'totrows_span_';\n //label preceding nb rows label\n this.prfxTotRowsTxt = 'totRowsTextSpan_';\n //callback raised before counter is refreshed\n this.onBeforeRefreshCounter = Types.isFn(f.on_before_refresh_counter) ?\n f.on_before_refresh_counter : null;\n //callback raised after counter is refreshed\n this.onAfterRefreshCounter = Types.isFn(f.on_after_refresh_counter) ?\n f.on_after_refresh_counter : null;\n }\n\n init(){\n if(this.initialized){\n return;\n }\n\n var tf = this.tf;\n\n //rows counter container\n var countDiv = Dom.create('div', ['id', this.prfxCounter+tf.id]);\n countDiv.className = this.totRowsCssClass;\n //rows counter label\n var countSpan = Dom.create('span', ['id', this.prfxTotRows+tf.id]);\n var countText = Dom.create('span', ['id', this.prfxTotRowsTxt+tf.id]);\n countText.appendChild(Dom.text(this.rowsCounterText));\n\n // counter is added to defined element\n if(!this.rowsCounterTgtId){\n tf.setToolbar();\n }\n var targetEl = !this.rowsCounterTgtId ?\n tf.lDiv : Dom.id( this.rowsCounterTgtId );\n\n //default container: 'lDiv'\n if(!this.rowsCounterTgtId){\n countDiv.appendChild(countText);\n countDiv.appendChild(countSpan);\n targetEl.appendChild(countDiv);\n }\n else{\n //custom container, no need to append statusDiv\n targetEl.appendChild(countText);\n targetEl.appendChild(countSpan);\n }\n this.rowsCounterDiv = countDiv;\n this.rowsCounterSpan = countSpan;\n\n // subscribe to events\n this.emitter.on(['after-filtering', 'grouped-by-page'],\n ()=> this.refresh(tf.nbVisibleRows));\n this.emitter.on(['rows-changed'], ()=> this.refresh());\n\n this.initialized = true;\n this.refresh();\n }\n\n refresh(p){\n if(!this.initialized || !this.isEnabled()){\n return;\n }\n\n var tf = this.tf;\n\n if(this.onBeforeRefreshCounter){\n this.onBeforeRefreshCounter.call(null, tf, this.rowsCounterSpan);\n }\n\n var totTxt;\n if(!tf.paging){\n if(p && p !== ''){\n totTxt = p;\n } else{\n totTxt = tf.nbFilterableRows - tf.nbHiddenRows;\n }\n } else {\n var paging = tf.feature('paging');\n if(paging){\n //paging start row\n var paging_start_row = parseInt(paging.startPagingRow, 10) +\n ((tf.nbVisibleRows>0) ? 1 : 0);\n var paging_end_row = (paging_start_row+paging.pagingLength)-1 <=\n tf.nbVisibleRows ?\n paging_start_row+paging.pagingLength-1 :\n tf.nbVisibleRows;\n totTxt = paging_start_row + this.fromToTextSeparator +\n paging_end_row + this.overText + tf.nbVisibleRows;\n }\n }\n\n this.rowsCounterSpan.innerHTML = totTxt;\n if(this.onAfterRefreshCounter){\n this.onAfterRefreshCounter.call(\n null, tf, this.rowsCounterSpan, totTxt);\n }\n }\n\n destroy(){\n if(!this.initialized){\n return;\n }\n\n if(!this.rowsCounterTgtId && this.rowsCounterDiv){\n Dom.remove(this.rowsCounterDiv);\n } else {\n Dom.id(this.rowsCounterTgtId).innerHTML = '';\n }\n this.rowsCounterSpan = null;\n this.rowsCounterDiv = null;\n\n // unsubscribe to events\n this.emitter.off(['after-filtering', 'grouped-by-page'],\n ()=> this.refresh(tf.nbVisibleRows));\n this.emitter.off(['rows-changed'], ()=> this.refresh());\n\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 570,
"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": 5,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 571,
"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": 11,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 572,
"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": 18,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 573,
"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": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 574,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 575,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 576,
"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": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 577,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 578,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 579,
"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": 30,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 580,
"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": 32,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 581,
"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": 34,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 582,
"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": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 583,
"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": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 584,
"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": 43,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 585,
"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": 76,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 586,
"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": 77,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 587,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#initialized",
"access": null,
"description": null,
"lineNumber": 84,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 588,
"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": 88,
"undocument": true,
"params": [
{
"name": "p",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 589,
"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": 128,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 590,
"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": 138,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 591,
"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": 139,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 592,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/rowsCounter.js~RowsCounter",
"longname": "src/modules/rowsCounter.js~RowsCounter#initialized",
"access": null,
"description": null,
"lineNumber": 146,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 593,
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/state.js",
"memberof": null,
"longname": "src/modules/state.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import {Feature} from './feature';\nimport {Hash} from './hash';\nimport {Storage} from './storage';\nimport Str from '../string';\nimport Types from '../types';\n\n/**\n * Reflects the state of features to be persisted via hash, localStorage or\n * cookie\n *\n * @export\n * @class State\n * @extends {Feature}\n */\nexport class State extends Feature {\n\n /**\n * Creates an instance of State\n *\n * @param {TableFilter} tf TableFilter instance\n */\n constructor(tf) {\n super(tf, 'state');\n\n let cfg = this.config.state;\n\n this.enableHash = cfg === true ||\n (Types.isObj(cfg.types) && cfg.types.indexOf('hash') !== -1);\n this.enableLocalStorage = Types.isObj(cfg.types) &&\n cfg.types.indexOf('local_storage') !== -1;\n this.enableCookie = Types.isObj(cfg.types) &&\n cfg.types.indexOf('cookie') !== -1;\n this.persistFilters = cfg.filters === false ? false : true;\n this.persistPageNumber = Boolean(cfg.page_number);\n this.persistPageLength = Boolean(cfg.page_length);\n this.persistSort = Boolean(cfg.sort);\n this.persistColsVisibility = Boolean(cfg.columns_visibility);\n this.persistFiltersVisibility = Boolean(cfg.filters_visibility);\n this.cookieDuration = !isNaN(cfg.cookie_duration) ?\n parseInt(cfg.cookie_duration, 10) : 87600;\n\n this.enableStorage = this.enableLocalStorage || this.enableCookie;\n this.hash = null;\n this.pageNb = null;\n this.pageLength = null;\n this.sort = null;\n this.hiddenCols = null;\n this.filtersVisibility = null;\n\n this.state = {};\n this.prfxCol = 'col_';\n this.pageNbKey = 'page';\n this.pageLengthKey = 'page_length';\n this.filtersVisKey = 'filters_visibility';\n }\n\n /**\n * Initializes the State object\n */\n init() {\n if (this.initialized) {\n return;\n }\n\n this.emitter.on(['after-filtering'], () => this.update());\n this.emitter.on(['after-page-change', 'after-clearing-filters'],\n (tf, pageNb) => this.updatePage(pageNb));\n this.emitter.on(['after-page-length-change'],\n (tf, pageLength) => this.updatePageLength(pageLength));\n this.emitter.on(['column-sorted'],\n (tf, index, descending) => this.updateSort(index, descending));\n this.emitter.on(['sort-initialized'], () => this._syncSort());\n this.emitter.on(['columns-visibility-initialized'],\n () => this._syncColsVisibility());\n this.emitter.on(['column-shown', 'column-hidden'], (tf, feature,\n colIndex, hiddenCols) => this.updateColsVisibility(hiddenCols));\n this.emitter.on(['filters-visibility-initialized'],\n () => this._syncFiltersVisibility());\n this.emitter.on(['filters-toggled'],\n (tf, extension, visible) => this.updateFiltersVisibility(visible));\n\n if (this.enableHash) {\n this.hash = new Hash(this);\n this.hash.init();\n }\n if (this.enableStorage) {\n this.storage = new Storage(this);\n this.storage.init();\n }\n this.initialized = true;\n }\n\n\n /**\n * Update state object based on current features state\n */\n update() {\n if (!this.isEnabled()) {\n return;\n }\n let state = this.state;\n let tf = this.tf;\n\n if (this.persistFilters) {\n let filterValues = tf.getFiltersValue();\n\n filterValues.forEach((val, idx) => {\n let key = `${this.prfxCol}${idx}`;\n\n if (Types.isString(val) && Str.isEmpty(val)) {\n if (state.hasOwnProperty(key)) {\n state[key].flt = undefined;\n }\n } else {\n state[key] = state[key] || {};\n state[key].flt = val;\n }\n });\n }\n\n if (this.persistPageNumber) {\n if (Types.isNull(this.pageNb)) {\n state[this.pageNbKey] = undefined;\n } else {\n state[this.pageNbKey] = this.pageNb;\n }\n }\n\n if (this.persistPageLength) {\n if (Types.isNull(this.pageLength)) {\n state[this.pageLengthKey] = undefined;\n } else {\n state[this.pageLengthKey] = this.pageLength;\n }\n }\n\n if (this.persistSort) {\n if (!Types.isNull(this.sort)) {\n // Remove previuosly sorted column\n Object.keys(state).forEach((key) => {\n if (key.indexOf(this.prfxCol) !== -1 && state[key]) {\n state[key].sort = undefined;\n }\n });\n\n let key = `${this.prfxCol}${this.sort.column}`;\n state[key] = state[key] || {};\n state[key].sort = { descending: this.sort.descending };\n }\n }\n\n if (this.persistColsVisibility) {\n if (!Types.isNull(this.hiddenCols)) {\n // Clear previuosly hidden columns\n Object.keys(state).forEach((key) => {\n if (key.indexOf(this.prfxCol) !== -1 && state[key]) {\n state[key].hidden = undefined;\n }\n });\n\n this.hiddenCols.forEach((colIdx) => {\n let key = `${this.prfxCol}${colIdx}`;\n state[key] = state[key] || {};\n state[key].hidden = true;\n });\n }\n }\n\n if (this.persistFiltersVisibility) {\n if (Types.isNull(this.filtersVisibility)) {\n state[this.filtersVisKey] = undefined;\n } else {\n state[this.filtersVisKey] = this.filtersVisibility;\n }\n }\n\n this.emitter.emit('state-changed', tf, state);\n }\n\n /**\n * Refresh page number field on page number changes\n *\n * @param {Number} pageNb Current page number\n */\n updatePage(pageNb) {\n this.pageNb = pageNb;\n this.update();\n }\n\n /**\n * Refresh page length field on page length changes\n *\n * @param {Number} pageLength Current page length value\n */\n updatePageLength(pageLength) {\n this.pageLength = pageLength;\n this.update();\n }\n\n /**\n * Refresh column sorting information on sort changes\n *\n * @param index {Number} Column index\n * @param {Boolean} descending Descending manner\n */\n updateSort(index, descending) {\n this.sort = {\n column: index,\n descending: descending\n };\n this.update();\n }\n\n /**\n * Refresh hidden columns information on columns visibility changes\n *\n * @param {Array} hiddenCols Columns indexes\n */\n updateColsVisibility(hiddenCols) {\n this.hiddenCols = hiddenCols;\n this.update();\n }\n\n /**\n * Refresh filters visibility on filters visibility change\n *\n * @param {Boolean} visible Visibility flad\n */\n updateFiltersVisibility(visible) {\n this.filtersVisibility = visible;\n this.update();\n }\n\n /**\n * Override state field\n *\n * @param state State object\n */\n override(state) {\n this.state = state;\n }\n\n /**\n * Sync stored features state\n */\n sync() {\n let state = this.state;\n let tf = this.tf;\n\n this._syncFilters();\n\n if (this.persistPageNumber) {\n let pageNumber = state[this.pageNbKey];\n this.emitter.emit('change-page', tf, pageNumber);\n }\n\n if (this.persistPageLength) {\n let pageLength = state[this.pageLengthKey];\n this.emitter.emit('change-page-results', tf, pageLength);\n }\n\n this._syncSort();\n this._syncColsVisibility();\n this._syncFiltersVisibility();\n }\n\n /**\n * Override current state with passed one and sync features\n *\n * @param {Object} state State object\n */\n overrideAndSync(state) {\n // To prevent state to react to features changes, state is temporarily\n // disabled\n this.disable();\n // State is overriden with passed state object\n this.override(state);\n // New hash state is applied to features\n this.sync();\n // State is re-enabled\n this.enable();\n }\n\n /**\n * Sync filters with stored values and filter table\n *\n * @private\n */\n _syncFilters() {\n if (!this.persistFilters) {\n return;\n }\n let state = this.state;\n let tf = this.tf;\n\n Object.keys(state).forEach((key) => {\n if (key.indexOf(this.prfxCol) !== -1) {\n let colIdx = parseInt(key.replace(this.prfxCol, ''), 10);\n let val = state[key].flt;\n tf.setFilterValue(colIdx, val);\n }\n });\n\n tf.filter();\n }\n\n /**\n * Sync sorted column with stored sorting information and sort table\n *\n * @private\n */\n _syncSort() {\n if (!this.persistSort) {\n return;\n }\n let state = this.state;\n let tf = this.tf;\n\n Object.keys(state).forEach((key) => {\n if (key.indexOf(this.prfxCol) !== -1) {\n let colIdx = parseInt(key.replace(this.prfxCol, ''), 10);\n if (!Types.isUndef(state[key].sort)) {\n let sort = state[key].sort;\n this.emitter.emit('sort', tf, colIdx, sort.descending);\n }\n }\n });\n }\n\n /**\n * Sync hidden columns with stored information\n *\n * @private\n */\n _syncColsVisibility() {\n if (!this.persistColsVisibility) {\n return;\n }\n let state = this.state;\n let tf = this.tf;\n let hiddenCols = [];\n\n Object.keys(state).forEach((key) => {\n if (key.indexOf(this.prfxCol) !== -1) {\n let colIdx = parseInt(key.replace(this.prfxCol, ''), 10);\n if (!Types.isUndef(state[key].hidden)) {\n hiddenCols.push(colIdx);\n }\n }\n });\n\n hiddenCols.forEach((colIdx) => {\n this.emitter.emit('hide-column', tf, colIdx);\n });\n }\n\n /**\n * Sync filters visibility with stored information\n *\n * @private\n */\n _syncFiltersVisibility() {\n if (!this.persistFiltersVisibility) {\n return;\n }\n let state = this.state;\n let tf = this.tf;\n let filtersVisibility = state[this.filtersVisKey];\n\n this.filtersVisibility = filtersVisibility;\n this.emitter.emit('show-filters', tf, filtersVisibility);\n }\n\n /**\n * Destroy State instance\n */\n destroy() {\n if (!this.initialized) {\n return;\n }\n\n this.state = {};\n\n this.emitter.off(['after-filtering'], () => this.update());\n this.emitter.off(['after-page-change', 'after-clearing-filters'],\n (tf, pageNb) => this.updatePage(pageNb));\n this.emitter.off(['after-page-length-change'],\n (tf, index) => this.updatePageLength(index));\n this.emitter.off(['column-sorted'],\n (tf, index, descending) => this.updateSort(index, descending));\n this.emitter.off(['sort-initialized'], () => this._syncSort());\n this.emitter.off(['columns-visibility-initialized'],\n () => this._syncColsVisibility());\n this.emitter.off(['column-shown', 'column-hidden'], (tf, feature,\n colIndex, hiddenCols) => this.updateColsVisibility(hiddenCols));\n this.emitter.off(['filters-visibility-initialized'],\n () => this._syncFiltersVisibility());\n this.emitter.off(['filters-toggled'],\n (tf, extension, visible) => this.updateFiltersVisibility(visible));\n\n if (this.enableHash) {\n this.hash.destroy();\n this.hash = null;\n }\n\n if (this.enableStorage) {\n this.storage.destroy();\n this.storage = null;\n }\n\n this.initialized = false;\n }\n}\n"
},
{
"__docId__": 594,
"kind": "class",
"static": true,
"variation": null,
"name": "State",
"memberof": "src/modules/state.js",
"longname": "src/modules/state.js~State",
"access": null,
"export": true,
"importPath": "tablefilter/src/modules/state.js",
"importStyle": "{State}",
"description": "Reflects the state of features to be persisted via hash, localStorage or\ncookie",
"lineNumber": 15,
"unknown": [
{
"tagName": "@export",
"tagValue": ""
},
{
"tagName": "@class",
"tagValue": "State"
}
],
"interface": false,
"extends": [
"Feature"
]
},
{
"__docId__": 595,
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#constructor",
"access": null,
"description": "Creates an instance of State",
"lineNumber": 22,
"params": [
{
"nullable": null,
"types": [
"TableFilter"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 596,
"kind": "member",
"static": false,
"variation": null,
"name": "enableHash",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#enableHash",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 597,
"kind": "member",
"static": false,
"variation": null,
"name": "enableLocalStorage",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#enableLocalStorage",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 598,
"kind": "member",
"static": false,
"variation": null,
"name": "enableCookie",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#enableCookie",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 599,
"kind": "member",
"static": false,
"variation": null,
"name": "persistFilters",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#persistFilters",
"access": null,
"description": null,
"lineNumber": 33,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 600,
"kind": "member",
"static": false,
"variation": null,
"name": "persistPageNumber",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#persistPageNumber",
"access": null,
"description": null,
"lineNumber": 34,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 601,
"kind": "member",
"static": false,
"variation": null,
"name": "persistPageLength",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#persistPageLength",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 602,
"kind": "member",
"static": false,
"variation": null,
"name": "persistSort",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#persistSort",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 603,
"kind": "member",
"static": false,
"variation": null,
"name": "persistColsVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#persistColsVisibility",
"access": null,
"description": null,
"lineNumber": 37,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 604,
"kind": "member",
"static": false,
"variation": null,
"name": "persistFiltersVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#persistFiltersVisibility",
"access": null,
"description": null,
"lineNumber": 38,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 605,
"kind": "member",
"static": false,
"variation": null,
"name": "cookieDuration",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#cookieDuration",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 606,
"kind": "member",
"static": false,
"variation": null,
"name": "enableStorage",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#enableStorage",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 607,
"kind": "member",
"static": false,
"variation": null,
"name": "hash",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#hash",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 608,
"kind": "member",
"static": false,
"variation": null,
"name": "pageNb",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#pageNb",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 609,
"kind": "member",
"static": false,
"variation": null,
"name": "pageLength",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#pageLength",
"access": null,
"description": null,
"lineNumber": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 610,
"kind": "member",
"static": false,
"variation": null,
"name": "sort",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#sort",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 611,
"kind": "member",
"static": false,
"variation": null,
"name": "hiddenCols",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#hiddenCols",
"access": null,
"description": null,
"lineNumber": 47,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 612,
"kind": "member",
"static": false,
"variation": null,
"name": "filtersVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#filtersVisibility",
"access": null,
"description": null,
"lineNumber": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 613,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#state",
"access": null,
"description": null,
"lineNumber": 50,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 614,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCol",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#prfxCol",
"access": null,
"description": null,
"lineNumber": 51,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 615,
"kind": "member",
"static": false,
"variation": null,
"name": "pageNbKey",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#pageNbKey",
"access": null,
"description": null,
"lineNumber": 52,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 616,
"kind": "member",
"static": false,
"variation": null,
"name": "pageLengthKey",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#pageLengthKey",
"access": null,
"description": null,
"lineNumber": 53,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 617,
"kind": "member",
"static": false,
"variation": null,
"name": "filtersVisKey",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#filtersVisKey",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 618,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#init",
"access": null,
"description": "Initializes the State object",
"lineNumber": 60,
"params": [],
"generator": false
},
{
"__docId__": 619,
"kind": "member",
"static": false,
"variation": null,
"name": "hash",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#hash",
"access": null,
"description": null,
"lineNumber": 83,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 620,
"kind": "member",
"static": false,
"variation": null,
"name": "storage",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#storage",
"access": null,
"description": null,
"lineNumber": 87,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 621,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#initialized",
"access": null,
"description": null,
"lineNumber": 90,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 622,
"kind": "method",
"static": false,
"variation": null,
"name": "update",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#update",
"access": null,
"description": "Update state object based on current features state",
"lineNumber": 97,
"params": [],
"generator": false
},
{
"__docId__": 623,
"kind": "method",
"static": false,
"variation": null,
"name": "updatePage",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#updatePage",
"access": null,
"description": "Refresh page number field on page number changes",
"lineNumber": 185,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "pageNb",
"description": "Current page number"
}
],
"generator": false
},
{
"__docId__": 624,
"kind": "member",
"static": false,
"variation": null,
"name": "pageNb",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#pageNb",
"access": null,
"description": null,
"lineNumber": 186,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 625,
"kind": "method",
"static": false,
"variation": null,
"name": "updatePageLength",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#updatePageLength",
"access": null,
"description": "Refresh page length field on page length changes",
"lineNumber": 195,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "pageLength",
"description": "Current page length value"
}
],
"generator": false
},
{
"__docId__": 626,
"kind": "member",
"static": false,
"variation": null,
"name": "pageLength",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#pageLength",
"access": null,
"description": null,
"lineNumber": 196,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 627,
"kind": "method",
"static": false,
"variation": null,
"name": "updateSort",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#updateSort",
"access": null,
"description": "Refresh column sorting information on sort changes",
"lineNumber": 206,
"params": [
{
"nullable": null,
"types": [
"*"
],
"spread": false,
"optional": false,
"name": "index",
"description": "{Number} Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "descending",
"description": "Descending manner"
}
],
"generator": false
},
{
"__docId__": 628,
"kind": "member",
"static": false,
"variation": null,
"name": "sort",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#sort",
"access": null,
"description": null,
"lineNumber": 207,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 629,
"kind": "method",
"static": false,
"variation": null,
"name": "updateColsVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#updateColsVisibility",
"access": null,
"description": "Refresh hidden columns information on columns visibility changes",
"lineNumber": 219,
"params": [
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "hiddenCols",
"description": "Columns indexes"
}
],
"generator": false
},
{
"__docId__": 630,
"kind": "member",
"static": false,
"variation": null,
"name": "hiddenCols",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#hiddenCols",
"access": null,
"description": null,
"lineNumber": 220,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 631,
"kind": "method",
"static": false,
"variation": null,
"name": "updateFiltersVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#updateFiltersVisibility",
"access": null,
"description": "Refresh filters visibility on filters visibility change",
"lineNumber": 229,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "visible",
"description": "Visibility flad"
}
],
"generator": false
},
{
"__docId__": 632,
"kind": "member",
"static": false,
"variation": null,
"name": "filtersVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#filtersVisibility",
"access": null,
"description": null,
"lineNumber": 230,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 633,
"kind": "method",
"static": false,
"variation": null,
"name": "override",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#override",
"access": null,
"description": "Override state field",
"lineNumber": 239,
"params": [
{
"nullable": null,
"types": [
"*"
],
"spread": false,
"optional": false,
"name": "state",
"description": "State object"
}
],
"generator": false
},
{
"__docId__": 634,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#state",
"access": null,
"description": null,
"lineNumber": 240,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 635,
"kind": "method",
"static": false,
"variation": null,
"name": "sync",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#sync",
"access": null,
"description": "Sync stored features state",
"lineNumber": 246,
"params": [],
"generator": false
},
{
"__docId__": 636,
"kind": "method",
"static": false,
"variation": null,
"name": "overrideAndSync",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#overrideAndSync",
"access": null,
"description": "Override current state with passed one and sync features",
"lineNumber": 272,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "state",
"description": "State object"
}
],
"generator": false
},
{
"__docId__": 637,
"kind": "method",
"static": false,
"variation": null,
"name": "_syncFilters",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#_syncFilters",
"access": "private",
"description": "Sync filters with stored values and filter table",
"lineNumber": 289,
"params": [],
"generator": false
},
{
"__docId__": 638,
"kind": "method",
"static": false,
"variation": null,
"name": "_syncSort",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#_syncSort",
"access": "private",
"description": "Sync sorted column with stored sorting information and sort table",
"lineNumber": 312,
"params": [],
"generator": false
},
{
"__docId__": 639,
"kind": "method",
"static": false,
"variation": null,
"name": "_syncColsVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#_syncColsVisibility",
"access": "private",
"description": "Sync hidden columns with stored information",
"lineNumber": 335,
"params": [],
"generator": false
},
{
"__docId__": 640,
"kind": "method",
"static": false,
"variation": null,
"name": "_syncFiltersVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#_syncFiltersVisibility",
"access": "private",
"description": "Sync filters visibility with stored information",
"lineNumber": 362,
"params": [],
"generator": false
},
{
"__docId__": 641,
"kind": "member",
"static": false,
"variation": null,
"name": "filtersVisibility",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#filtersVisibility",
"access": null,
"description": null,
"lineNumber": 370,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 642,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#destroy",
"access": null,
"description": "Destroy State instance",
"lineNumber": 377,
"params": [],
"generator": false
},
{
"__docId__": 643,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#state",
"access": null,
"description": null,
"lineNumber": 382,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 644,
"kind": "member",
"static": false,
"variation": null,
"name": "hash",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#hash",
"access": null,
"description": null,
"lineNumber": 403,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 645,
"kind": "member",
"static": false,
"variation": null,
"name": "storage",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#storage",
"access": null,
"description": null,
"lineNumber": 408,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 646,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/state.js~State",
"longname": "src/modules/state.js~State#initialized",
"access": null,
"description": null,
"lineNumber": 411,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 647,
"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 {Feature} from './feature';\nimport Dom from '../dom';\nimport Types from '../types';\n\nlet global = window;\n\nexport class StatusBar extends Feature{\n\n /**\n * Status bar UI component\n * @param {Object} tf TableFilter instance\n */\n constructor(tf){\n super(tf, 'statusBar');\n\n // Configuration object\n let f = this.config;\n\n //id of custom container element\n this.statusBarTgtId = f.status_bar_target_id || null;\n //element containing status bar label\n this.statusBarDiv = null;\n //status bar\n this.statusBarSpan = null;\n //status bar label\n this.statusBarSpanText = null;\n //defines status bar text\n this.statusBarText = f.status_bar_text || '';\n //defines css class status bar\n this.statusBarCssClass = f.status_bar_css_class || 'status';\n //delay for status bar clearing\n this.statusBarCloseDelay = 250;\n\n //calls function before message is displayed\n this.onBeforeShowMsg = Types.isFn(f.on_before_show_msg) ?\n f.on_before_show_msg : null;\n //calls function after message is displayed\n this.onAfterShowMsg = Types.isFn(f.on_after_show_msg) ?\n f.on_after_show_msg : null;\n\n //status messages\n this.msgFilter = f.msg_filter || 'Filtering data...';\n //populating drop-downs\n this.msgPopulate = f.msg_populate || 'Populating filter...';\n //populating drop-downs\n this.msgPopulateCheckList = f.msg_populate_checklist ||\n 'Populating list...';\n //changing paging page\n this.msgChangePage = f.msg_change_page || 'Collecting paging data...';\n //clearing filters\n this.msgClear = f.msg_clear || 'Clearing filters...';\n //changing nb results/page\n this.msgChangeResults = f.msg_change_results ||\n 'Changing results per page...';\n //re-setting page\n this.msgResetPage = f.msg_reset_page || 'Re-setting page...';\n //re-setting page length\n this.msgResetPageLength = f.msg_reset_page_length ||\n 'Re-setting page length...';\n //table sorting\n this.msgSort = f.msg_sort || 'Sorting data...';\n //extensions loading\n this.msgLoadExtensions = f.msg_load_extensions ||\n 'Loading extensions...';\n //themes loading\n this.msgLoadThemes = f.msg_load_themes || 'Loading theme(s)...';\n\n // status bar div\n this.prfxStatus = 'status_';\n // status bar label\n this.prfxStatusSpan = 'statusSpan_';\n // text preceding status bar label\n this.prfxStatusTxt = 'statusText_';\n }\n\n init(){\n if(this.initialized){\n return;\n }\n\n let tf = this.tf;\n let emitter = this.emitter;\n\n //status bar container\n let statusDiv = Dom.create('div', ['id', this.prfxStatus+tf.id]);\n statusDiv.className = this.statusBarCssClass;\n\n //status bar label\n let statusSpan = Dom.create('span', ['id', this.prfxStatusSpan+tf.id]);\n //preceding text\n let statusSpanText = Dom.create('span',\n ['id', this.prfxStatusTxt+tf.id]);\n statusSpanText.appendChild(Dom.text(this.statusBarText));\n\n // target element container\n if(!this.statusBarTgtId){\n tf.setToolbar();\n }\n let targetEl = (!this.statusBarTgtId) ?\n tf.lDiv : Dom.id(this.statusBarTgtId);\n\n //default container: 'lDiv'\n if(!this.statusBarTgtId){\n statusDiv.appendChild(statusSpanText);\n statusDiv.appendChild(statusSpan);\n targetEl.appendChild(statusDiv);\n } else {\n // custom container, no need to append statusDiv\n targetEl.appendChild(statusSpanText);\n targetEl.appendChild(statusSpan);\n }\n\n this.statusBarDiv = statusDiv;\n this.statusBarSpan = statusSpan;\n this.statusBarSpanText = statusSpanText;\n\n // Subscribe to events\n emitter.on(['before-filtering'], ()=> this.message(this.msgFilter));\n emitter.on(['before-populating-filter'],\n ()=> this.message(this.msgPopulate));\n emitter.on(['before-page-change'],\n ()=> this.message(this.msgChangePage));\n emitter.on(['before-clearing-filters'], ()=>\n this.message(this.msgClear));\n emitter.on(['before-page-length-change'],\n ()=> this.message(this.msgChangeResults));\n emitter.on(['before-reset-page'], ()=> this.message(this.msgResetPage));\n emitter.on(['before-reset-page-length'],\n ()=> this.message(this.msgResetPageLength));\n emitter.on(['before-loading-extensions'],\n ()=> this.message(this.msgLoadExtensions));\n emitter.on(['before-loading-themes'],\n ()=> this.message(this.msgLoadThemes));\n\n emitter.on([\n 'after-filtering',\n 'after-populating-filter',\n 'after-page-change',\n 'after-clearing-filters',\n 'after-page-length-change',\n 'after-reset-page',\n 'after-reset-page-length',\n 'after-loading-extensions',\n 'after-loading-themes'],\n ()=> this.message('')\n );\n\n this.initialized = true;\n }\n\n message(t=''){\n if(!this.isEnabled()){\n return;\n }\n\n if(this.onBeforeShowMsg){\n this.onBeforeShowMsg.call(null, this.tf, t);\n }\n\n let d = t==='' ? this.statusBarCloseDelay : 1;\n global.setTimeout(() => {\n if(!this.initialized){\n return;\n }\n this.statusBarSpan.innerHTML = t;\n if(this.onAfterShowMsg){\n this.onAfterShowMsg.call(null, this.tf, t);\n }\n }, d);\n }\n\n destroy(){\n if(!this.initialized){\n return;\n }\n\n let emitter = this.emitter;\n\n this.statusBarDiv.innerHTML = '';\n if(!this.statusBarTgtId){\n Dom.remove(this.statusBarDiv);\n }\n this.statusBarSpan = null;\n this.statusBarSpanText = null;\n this.statusBarDiv = null;\n\n // Unsubscribe to events\n emitter.off(['before-filtering'], ()=> this.message(this.msgFilter));\n emitter.off(['before-populating-filter'],\n ()=> this.message(this.msgPopulate));\n emitter.off(['before-page-change'],\n ()=> this.message(this.msgChangePage));\n emitter.off(['before-clearing-filters'],\n ()=> this.message(this.msgClear));\n emitter.off(['before-page-length-change'],\n ()=> this.message(this.msgChangeResults));\n emitter.off(['before-reset-page'], ()=>\n this.message(this.msgResetPage));\n emitter.off(['before-reset-page-length'],\n ()=> this.message(this.msgResetPageLength));\n emitter.off(['before-loading-extensions'],\n ()=> this.message(this.msgLoadExtensions));\n emitter.off(['before-loading-themes'],\n ()=> this.message(this.msgLoadThemes));\n\n emitter.off([\n 'after-filtering',\n 'after-populating-filter',\n 'after-page-change',\n 'after-clearing-filters',\n 'after-page-length-change',\n 'after-reset-page',\n 'after-reset-page-length',\n 'after-loading-extensions',\n 'after-loading-themes'],\n ()=> this.message('')\n );\n\n this.initialized = false;\n }\n\n}\n"
},
{
"__docId__": 648,
"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": 5,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 649,
"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": 7,
"undocument": true,
"interface": false,
"extends": [
"src/modules/feature.js~Feature"
]
},
{
"__docId__": 650,
"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": 13,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "tf",
"description": "TableFilter instance"
}
],
"generator": false
},
{
"__docId__": 651,
"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": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 652,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 653,
"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": 24,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 654,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 655,
"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": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 656,
"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": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 657,
"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": 32,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 658,
"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": 35,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 659,
"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": 38,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 660,
"kind": "member",
"static": false,
"variation": null,
"name": "msgFilter",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgFilter",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 661,
"kind": "member",
"static": false,
"variation": null,
"name": "msgPopulate",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgPopulate",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 662,
"kind": "member",
"static": false,
"variation": null,
"name": "msgPopulateCheckList",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgPopulateCheckList",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 663,
"kind": "member",
"static": false,
"variation": null,
"name": "msgChangePage",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgChangePage",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 664,
"kind": "member",
"static": false,
"variation": null,
"name": "msgClear",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgClear",
"access": null,
"description": null,
"lineNumber": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 665,
"kind": "member",
"static": false,
"variation": null,
"name": "msgChangeResults",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgChangeResults",
"access": null,
"description": null,
"lineNumber": 53,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 666,
"kind": "member",
"static": false,
"variation": null,
"name": "msgResetPage",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgResetPage",
"access": null,
"description": null,
"lineNumber": 56,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 667,
"kind": "member",
"static": false,
"variation": null,
"name": "msgResetPageLength",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgResetPageLength",
"access": null,
"description": null,
"lineNumber": 58,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 668,
"kind": "member",
"static": false,
"variation": null,
"name": "msgSort",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgSort",
"access": null,
"description": null,
"lineNumber": 61,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 669,
"kind": "member",
"static": false,
"variation": null,
"name": "msgLoadExtensions",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgLoadExtensions",
"access": null,
"description": null,
"lineNumber": 63,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 670,
"kind": "member",
"static": false,
"variation": null,
"name": "msgLoadThemes",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#msgLoadThemes",
"access": null,
"description": null,
"lineNumber": 66,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 671,
"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": 69,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 672,
"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": 71,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 673,
"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": 73,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 674,
"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": 76,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 675,
"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": 113,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 676,
"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": 114,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 677,
"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": 115,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 678,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#initialized",
"access": null,
"description": null,
"lineNumber": 148,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 679,
"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": 151,
"undocument": true,
"params": [
{
"name": "t",
"optional": true,
"types": [
"string"
],
"defaultRaw": "",
"defaultValue": ""
}
],
"generator": false
},
{
"__docId__": 680,
"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": 172,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 681,
"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": 183,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 682,
"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": 184,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 683,
"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": 185,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 684,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/modules/statusBar.js~StatusBar",
"longname": "src/modules/statusBar.js~StatusBar#initialized",
"access": null,
"description": null,
"lineNumber": 219,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 685,
"kind": "file",
"static": true,
"variation": null,
"name": "src/modules/storage.js",
"memberof": null,
"longname": "src/modules/storage.js",
"access": null,
"description": null,
"lineNumber": 2,
"content": "\nimport Cookie from '../cookie';\n\nconst global = window;\nconst JSON = global.JSON;\nconst localStorage = global.localStorage;\nconst location = global.location;\n\nexport const hasStorage = () => {\n return 'Storage' in global;\n};\n\n/**\n * Stores the features state in browser's local storage or cookie\n *\n * @export\n * @class Storage\n */\nexport class Storage {\n\n /**\n * Creates an instance of Storage\n *\n * @param {State} state Instance of State\n */\n constructor(state) {\n this.state = state;\n this.tf = state.tf;\n this.enableLocalStorage = state.enableLocalStorage && hasStorage();\n this.enableCookie = state.enableCookie && !this.enableLocalStorage;\n this.emitter = state.emitter;\n this.duration = state.cookieDuration;\n }\n\n\n /**\n * Initializes the Storage object\n */\n init() {\n this.emitter.on(['state-changed'], (tf, state) => this.save(state));\n this.emitter.on(['initialized'], () => this.sync());\n }\n\n /**\n * Persists the features state on state changes\n *\n * @param {State} state Instance of State\n */\n save(state) {\n if (this.enableLocalStorage) {\n localStorage[this.getKey()] = JSON.stringify(state);\n } else {\n Cookie.write(this.getKey(), JSON.stringify(state), this.duration);\n }\n }\n\n /**\n * Turns stored string into a State JSON object\n *\n * @returns {Object} JSON object\n */\n retrieve() {\n let state = null;\n if (this.enableLocalStorage) {\n state = localStorage[this.getKey()];\n } else {\n state = Cookie.read(this.getKey());\n }\n\n if (!state) {\n return null;\n }\n return JSON.parse(state);\n }\n\n /**\n * Removes persisted state from storage\n */\n remove() {\n if (this.enableLocalStorage) {\n localStorage.removeItem(this.getKey());\n } else {\n Cookie.remove(this.getKey());\n }\n }\n\n /**\n * Applies persisted state to features\n */\n sync() {\n let state = this.retrieve();\n if (!state) {\n return;\n }\n // override current state with persisted one and sync features\n this.state.overrideAndSync(state);\n }\n\n /**\n * Returns the storage key\n *\n * @returns {String} Key\n */\n getKey() {\n return JSON.stringify({\n key: `${this.tf.prfxTf}_${this.tf.id}`,\n path: location.pathname\n });\n }\n\n /**\n * Release Storage event subscriptions and clear fields\n */\n destroy() {\n this.emitter.off(['state-changed'], (tf, state) => this.save(state));\n this.emitter.off(['initialized'], () => this.sync());\n\n this.remove();\n\n this.state = null;\n this.emitter = null;\n }\n}\n"
},
{
"__docId__": 686,
"kind": "variable",
"static": true,
"variation": null,
"name": "global",
"memberof": "src/modules/storage.js",
"longname": "src/modules/storage.js~global",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/storage.js",
"importStyle": null,
"description": null,
"lineNumber": 4,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 687,
"kind": "variable",
"static": true,
"variation": null,
"name": "JSON",
"memberof": "src/modules/storage.js",
"longname": "src/modules/storage.js~JSON",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/storage.js",
"importStyle": null,
"description": null,
"lineNumber": 5,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 688,
"kind": "variable",
"static": true,
"variation": null,
"name": "localStorage",
"memberof": "src/modules/storage.js",
"longname": "src/modules/storage.js~localStorage",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/storage.js",
"importStyle": null,
"description": null,
"lineNumber": 6,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 689,
"kind": "variable",
"static": true,
"variation": null,
"name": "location",
"memberof": "src/modules/storage.js",
"longname": "src/modules/storage.js~location",
"access": null,
"export": false,
"importPath": "tablefilter/src/modules/storage.js",
"importStyle": null,
"description": null,
"lineNumber": 7,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 690,
"kind": "variable",
"static": true,
"variation": null,
"name": "hasStorage",
"memberof": "src/modules/storage.js",
"longname": "src/modules/storage.js~hasStorage",
"access": null,
"export": true,
"importPath": "tablefilter/src/modules/storage.js",
"importStyle": "{hasStorage}",
"description": null,
"lineNumber": 9,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 691,
"kind": "class",
"static": true,
"variation": null,
"name": "Storage",
"memberof": "src/modules/storage.js",
"longname": "src/modules/storage.js~Storage",
"access": null,
"export": true,
"importPath": "tablefilter/src/modules/storage.js",
"importStyle": "{Storage}",
"description": "Stores the features state in browser's local storage or cookie",
"lineNumber": 19,
"unknown": [
{
"tagName": "@export",
"tagValue": ""
},
{
"tagName": "@class",
"tagValue": "Storage"
}
],
"interface": false
},
{
"__docId__": 692,
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#constructor",
"access": null,
"description": "Creates an instance of Storage",
"lineNumber": 26,
"params": [
{
"nullable": null,
"types": [
"State"
],
"spread": false,
"optional": false,
"name": "state",
"description": "Instance of State"
}
],
"generator": false
},
{
"__docId__": 693,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#state",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 694,
"kind": "member",
"static": false,
"variation": null,
"name": "tf",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#tf",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 695,
"kind": "member",
"static": false,
"variation": null,
"name": "enableLocalStorage",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#enableLocalStorage",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 696,
"kind": "member",
"static": false,
"variation": null,
"name": "enableCookie",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#enableCookie",
"access": null,
"description": null,
"lineNumber": 30,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 697,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#emitter",
"access": null,
"description": null,
"lineNumber": 31,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 698,
"kind": "member",
"static": false,
"variation": null,
"name": "duration",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#duration",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 699,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#init",
"access": null,
"description": "Initializes the Storage object",
"lineNumber": 39,
"params": [],
"generator": false
},
{
"__docId__": 700,
"kind": "method",
"static": false,
"variation": null,
"name": "save",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#save",
"access": null,
"description": "Persists the features state on state changes",
"lineNumber": 49,
"params": [
{
"nullable": null,
"types": [
"State"
],
"spread": false,
"optional": false,
"name": "state",
"description": "Instance of State"
}
],
"generator": false
},
{
"__docId__": 701,
"kind": "method",
"static": false,
"variation": null,
"name": "retrieve",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#retrieve",
"access": null,
"description": "Turns stored string into a State JSON object",
"lineNumber": 62,
"unknown": [
{
"tagName": "@returns",
"tagValue": "{Object} JSON object"
}
],
"params": [],
"return": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": "JSON object"
},
"generator": false
},
{
"__docId__": 702,
"kind": "method",
"static": false,
"variation": null,
"name": "remove",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#remove",
"access": null,
"description": "Removes persisted state from storage",
"lineNumber": 79,
"params": [],
"generator": false
},
{
"__docId__": 703,
"kind": "method",
"static": false,
"variation": null,
"name": "sync",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#sync",
"access": null,
"description": "Applies persisted state to features",
"lineNumber": 90,
"params": [],
"generator": false
},
{
"__docId__": 704,
"kind": "method",
"static": false,
"variation": null,
"name": "getKey",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#getKey",
"access": null,
"description": "Returns the storage key",
"lineNumber": 104,
"unknown": [
{
"tagName": "@returns",
"tagValue": "{String} Key"
}
],
"params": [],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": "Key"
},
"generator": false
},
{
"__docId__": 705,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#destroy",
"access": null,
"description": "Release Storage event subscriptions and clear fields",
"lineNumber": 114,
"params": [],
"generator": false
},
{
"__docId__": 706,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#state",
"access": null,
"description": null,
"lineNumber": 120,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 707,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/modules/storage.js~Storage",
"longname": "src/modules/storage.js~Storage#emitter",
"access": null,
"description": null,
"lineNumber": 121,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 708,
"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';\nimport Types from '../types';\n\nexport class Store{\n\n /**\n * Store, persistence manager\n * @param {Object} tf TableFilter instance\n *\n * TODO: use localStorage and fallback to cookie persistence\n */\n constructor(tf){\n let f = tf.config();\n\n //cookie storing filter values\n this.fltsValuesCookie = tf.prfxCookieFltsValues + tf.id;\n //cookie storing page nb\n this.pgNbCookie = tf.prfxCookiePageNb + tf.id;\n //cookie storing page length\n this.pgLenCookie = tf.prfxCookiePageLen + tf.id;\n\n this.duration = !isNaN(f.set_cookie_duration) ?\n parseInt(f.set_cookie_duration, 10) : 100000;\n\n this.tf = tf;\n this.emitter = tf.emitter;\n }\n\n init(){\n this.emitter.on(['after-filtering'], ()=> this.saveFilterValues());\n this.emitter.on(['after-clearing-filters'], ()=> this.clearCookies());\n this.emitter.on(['after-page-change'],\n (tf, index)=> this.savePageNb(index));\n this.emitter.on(['after-page-length-change'],\n (tf, index)=> this.savePageLength(index));\n }\n\n /**\n * Store filters' values in cookie\n */\n saveFilterValues(){\n let tf = this.tf;\n let fltValues = [];\n\n if(!tf.rememberGridValues){\n return;\n }\n\n //store filters' values\n for(let i=0; i<tf.fltIds.length; i++){\n let value = tf.getFilterValue(i);\n //convert array to a || separated values\n if(Types.isArray(value)){\n let rgx = new RegExp(tf.separator, 'g');\n value = value.toString()\n .replace(rgx, ' ' + tf.orOperator + ' ');\n }\n if (value === ''){\n value = ' ';\n }\n fltValues.push(value);\n }\n\n //write cookie\n Cookie.write(\n this.fltsValuesCookie,\n fltValues.join(tf.separator),\n this.duration\n );\n }\n\n /**\n * Retrieve filters' values from cookie\n * @return {Array}\n */\n getFilterValues(){\n let flts = Cookie.read(this.fltsValuesCookie);\n let rgx = new RegExp(this.tf.separator, 'g');\n // filters' values array\n return flts.split(rgx);\n }\n\n /**\n * Store page number in cookie\n * @param {Number} pageIndex page index to persist\n */\n savePageNb(pageIndex){\n if(!this.tf.rememberPageNb){\n return;\n }\n Cookie.write(\n this.pgNbCookie,\n pageIndex,\n this.duration\n );\n }\n\n /**\n * Retrieve page number from cookie\n * @return {String}\n */\n getPageNb(){\n return Cookie.read(this.pgNbCookie);\n }\n\n /**\n * Store page length in cookie\n * @param {Number} index page length index to persist\n */\n savePageLength(index){\n if(!this.tf.rememberPageLen){\n return;\n }\n Cookie.write(\n this.pgLenCookie,\n index,\n this.duration\n );\n }\n\n /**\n * Retrieve page length from cookie\n * @return {String}\n */\n getPageLength(){\n return Cookie.read(this.pgLenCookie);\n }\n\n /**\n * Remove all cookies\n */\n clearCookies(){\n Cookie.remove(this.fltsValuesCookie);\n Cookie.remove(this.pgLenCookie);\n Cookie.remove(this.pgNbCookie);\n }\n\n destroy(){\n this.emitter.off(['after-filtering'], ()=> this.saveFilterValues());\n this.emitter.off(['after-clearing-filters'], ()=> this.clearCookies());\n this.emitter.off(['after-page-change'],\n (tf, index)=> this.savePageNb(index));\n this.emitter.off(['after-page-length-change'],\n (tf, index)=> this.savePageLength(index));\n }\n}\n"
},
{
"__docId__": 709,
"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": 4,
"undocument": true,
"interface": false
},
{
"__docId__": 710,
"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": 12,
"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
},
{
"__docId__": 711,
"kind": "member",
"static": false,
"variation": null,
"name": "fltsValuesCookie",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#fltsValuesCookie",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 712,
"kind": "member",
"static": false,
"variation": null,
"name": "pgNbCookie",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#pgNbCookie",
"access": null,
"description": null,
"lineNumber": 18,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 713,
"kind": "member",
"static": false,
"variation": null,
"name": "pgLenCookie",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#pgLenCookie",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 714,
"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": 22,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 715,
"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": 25,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 716,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#emitter",
"access": null,
"description": null,
"lineNumber": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 717,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#init",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 718,
"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": 41,
"params": [],
"generator": false
},
{
"__docId__": 719,
"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": 76,
"params": [],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 720,
"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": 87,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "pageIndex",
"description": "page index to persist"
}
],
"generator": false
},
{
"__docId__": 721,
"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": 102,
"params": [],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 722,
"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": 110,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "page length index to persist"
}
],
"generator": false
},
{
"__docId__": 723,
"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": 125,
"params": [],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 724,
"kind": "method",
"static": false,
"variation": null,
"name": "clearCookies",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#clearCookies",
"access": null,
"description": "Remove all cookies",
"lineNumber": 132,
"params": [],
"generator": false
},
{
"__docId__": 725,
"kind": "method",
"static": false,
"variation": null,
"name": "destroy",
"memberof": "src/modules/store.js~Store",
"longname": "src/modules/store.js~Store#destroy",
"access": null,
"description": null,
"lineNumber": 138,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 726,
"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';\n\nexport default {\n ignoreCase(a, b){\n let x = Str.lower(a);\n let y = Str.lower(b);\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n },\n numSortAsc(a, b){\n return (a - b);\n },\n numSortDesc(a, b){\n return (b - a);\n }\n};\n"
},
{
"__docId__": 727,
"kind": "file",
"static": true,
"variation": null,
"name": "src/string.js",
"memberof": null,
"longname": "src/string.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\n * String utilities\n */\n\nexport default {\n\n lower(text){\n return text.toLowerCase();\n },\n\n upper(text){\n return text.toUpperCase();\n },\n\n trim(text){\n if (text.trim){\n return text.trim();\n }\n return text.replace(/^\\s*|\\s*$/g, '');\n },\n\n isEmpty(text){\n return this.trim(text) === '';\n },\n\n rgxEsc(text){\n let chars = /[-\\/\\\\^$*+?.()|[\\]{}]/g;\n let escMatch = '\\\\$&';\n return String(text).replace(chars, escMatch);\n },\n\n matchCase(text, caseSensitive){\n if(!caseSensitive){\n return this.lower(text);\n }\n return text;\n },\n\n /**\n * Checks if passed data contains the searched term\n * @param {String} term Searched term\n * @param {String} data Data string\n * @param {Boolean} exactMatch Exact match\n * @param {Boolean} caseSensitive Case sensitive\n * @return {Boolean}\n */\n contains(term, data, exactMatch=false, caseSensitive=false){\n // Improved by Cedric Wartel (cwl) automatic exact match for selects and\n // special characters are now filtered\n let regexp,\n modifier = caseSensitive ? 'g' : 'gi';\n if(exactMatch){\n regexp = new RegExp(\n '(^\\\\s*)'+ this.rgxEsc(term) +'(\\\\s*$)', modifier);\n } else {\n regexp = new RegExp(this.rgxEsc(term), modifier);\n }\n return regexp.test(data);\n }\n\n};\n"
},
{
"__docId__": 728,
"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';\nimport Dom from './dom';\nimport Str from './string';\nimport Types from './types';\nimport DateHelper from './date';\nimport Helpers from './helpers';\nimport {Emitter} from './emitter';\n\n// Features\nimport {Store} from './modules/store';\nimport {GridLayout} from './modules/gridLayout';\nimport {Loader} from './modules/loader';\nimport {HighlightKeyword} from './modules/highlightKeywords';\nimport {PopupFilter} from './modules/popupFilter';\nimport {Dropdown} from './modules/dropdown';\nimport {CheckList} from './modules/checkList';\nimport {RowsCounter} from './modules/rowsCounter';\nimport {StatusBar} from './modules/statusBar';\nimport {Paging} from './modules/paging';\nimport {ClearButton} from './modules/clearButton';\nimport {Help} from './modules/help';\nimport {AlternateRows} from './modules/alternateRows';\nimport {NoResults} from './modules/noResults';\nimport {State} from './modules/state';\n\nlet global = window,\n doc = global.document;\n\nexport class TableFilter {\n\n /**\n * TableFilter object constructor\n * requires `table` or `id` arguments, `row` and `configuration` optional\n * @param {DOMElement} table Table DOM element\n * @param {String} id Table id\n * @param {Number} row index indicating the 1st row\n * @param {Object} configuration object\n */\n constructor(...args) {\n if(args.length === 0){ return; }\n\n this.id = null;\n this.version = '{VERSION}';\n this.year = new Date().getFullYear();\n this.tbl = null;\n this.startRow = null;\n this.refRow = null;\n this.headersRow = null;\n this.cfg = {};\n this.nbFilterableRows = null;\n this.nbRows = null;\n this.nbCells = null;\n this._hasGrid = false;\n\n // TODO: use for-of with babel plug-in\n args.forEach((arg)=> {\n // for (let arg of args) {\n let argtype = typeof arg;\n if(argtype === 'object' && arg && arg.nodeName === 'TABLE'){\n this.tbl = arg;\n this.id = arg.id || `tf_${new Date().getTime()}_`;\n } else if(argtype === 'string'){\n this.id = arg;\n this.tbl = Dom.id(arg);\n } else if(argtype === 'number'){\n this.startRow = arg;\n } else if(argtype === 'object'){\n this.cfg = arg;\n }\n // }\n });\n\n if(!this.tbl || this.tbl.nodeName != 'TABLE' || this.getRowsNb() === 0){\n throw new Error(\n 'Could not instantiate TableFilter: HTML table not found.');\n }\n\n // configuration object\n let f = this.cfg;\n\n this.emitter = new Emitter();\n\n //Start row et cols nb\n this.refRow = this.startRow === null ? 2 : (this.startRow+1);\n try{ this.nbCells = this.getCellsNb(this.refRow); }\n catch(e){ this.nbCells = this.getCellsNb(0); }\n\n //default script base path\n this.basePath = f.base_path || 'tablefilter/';\n\n /*** filter types ***/\n this.fltTypeInp = 'input';\n this.fltTypeSlc = 'select';\n this.fltTypeMulti = 'multiple';\n this.fltTypeCheckList = 'checklist';\n this.fltTypeNone = 'none';\n\n /*** filters' grid properties ***/\n\n //enables/disables filter grid\n this.fltGrid = f.grid === false ? false : true;\n\n //enables/disables grid layout (fixed headers)\n this.gridLayout = Boolean(f.grid_layout);\n\n this.filtersRowIndex = isNaN(f.filters_row_index) ?\n 0 : f.filters_row_index;\n this.headersRow = isNaN(f.headers_row_index) ?\n (this.filtersRowIndex === 0 ? 1 : 0) : f.headers_row_index;\n\n //defines tag of the cells containing filters (td/th)\n this.fltCellTag = f.filters_cell_tag!=='th' ||\n f.filters_cell_tag!=='td' ? 'td' : f.filters_cell_tag;\n\n //stores filters ids\n this.fltIds = [];\n //stores filters DOM elements\n this.fltElms = [];\n //stores valid rows indexes (rows visible upon filtering)\n this.validRowsIndex = [];\n //stores filters row element\n this.fltGridEl = null;\n //container div for paging elements, reset btn etc.\n this.infDiv = null;\n //div for rows counter\n this.lDiv = null;\n //div for reset button and results per page select\n this.rDiv = null;\n //div for paging elements\n this.mDiv = null;\n\n //defines css class for div containing paging elements, rows counter etc\n this.infDivCssClass = f.inf_div_css_class || 'inf';\n //defines css class for left div\n this.lDivCssClass = f.left_div_css_class || 'ldiv';\n //defines css class for right div\n this.rDivCssClass = f.right_div_css_class || 'rdiv';\n //defines css class for mid div\n this.mDivCssClass = f.middle_div_css_class || 'mdiv';\n //table container div css class\n this.contDivCssClass = f.content_div_css_class || 'cont';\n\n /*** filters' grid appearance ***/\n //stylesheet file\n this.stylePath = f.style_path || this.basePath + 'style/';\n this.stylesheet = f.stylesheet || this.stylePath+'tablefilter.css';\n this.stylesheetId = this.id + '_style';\n //defines css class for filters row\n this.fltsRowCssClass = f.flts_row_css_class || 'fltrow';\n //enables/disables icons (paging, reset button)\n this.enableIcons = f.enable_icons===false ? false : true;\n //enables/disbles rows alternating bg colors\n this.alternateRows = Boolean(f.alternate_rows);\n //defines widths of columns\n this.hasColWidths = Types.isArray(f.col_widths);\n this.colWidths = this.hasColWidths ? f.col_widths : null;\n //defines css class for filters\n this.fltCssClass = f.flt_css_class || 'flt';\n //defines css class for multiple selects filters\n this.fltMultiCssClass = f.flt_multi_css_class || 'flt_multi';\n //defines css class for filters\n this.fltSmallCssClass = f.flt_small_css_class || 'flt_s';\n //defines css class for single-filter\n this.singleFltCssClass = f.single_flt_css_class || 'single_flt';\n\n /*** filters' grid behaviours ***/\n //enables/disables enter key\n this.enterKey = f.enter_key===false ? false : true;\n //calls function before filtering starts\n this.onBeforeFilter = Types.isFn(f.on_before_filter) ?\n f.on_before_filter : null;\n //calls function after filtering\n this.onAfterFilter = Types.isFn(f.on_after_filter) ?\n f.on_after_filter : null;\n //enables/disables case sensitivity\n this.caseSensitive = Boolean(f.case_sensitive);\n //has exact match per column\n this.hasExactMatchByCol = Types.isArray(f.columns_exact_match);\n this.exactMatchByCol = this.hasExactMatchByCol ?\n f.columns_exact_match : [];\n //enables/disbles exact match for search\n this.exactMatch = Boolean(f.exact_match);\n //refreshes drop-down lists upon validation\n this.linkedFilters = Boolean(f.linked_filters);\n //wheter excluded options are disabled\n this.disableExcludedOptions = Boolean(f.disable_excluded_options);\n //id of active filter\n this.activeFilterId = null;\n //enables always visible rows\n this.hasVisibleRows = Boolean(f.rows_always_visible);\n //array containing always visible rows\n this.visibleRows = this.hasVisibleRows ? f.rows_always_visible : [];\n //enables/disables external filters generation\n this.isExternalFlt = Boolean(f.external_flt_grid);\n //array containing ids of external elements containing filters\n this.externalFltTgtIds = f.external_flt_grid_ids || [];\n //stores filters elements if isExternalFlt is true\n this.externalFltEls = [];\n //delays any filtering process if loader true\n this.execDelay = !isNaN(f.exec_delay) ? parseInt(f.exec_delay,10) : 100;\n //calls function when filters grid loaded\n this.onFiltersLoaded = Types.isFn(f.on_filters_loaded) ?\n f.on_filters_loaded : null;\n //enables/disables single filter search\n this.singleSearchFlt = Boolean(f.single_filter);\n //calls function after row is validated\n this.onRowValidated = Types.isFn(f.on_row_validated) ?\n f.on_row_validated : null;\n //array defining columns for customCellData event\n this.customCellDataCols = f.custom_cell_data_cols ?\n f.custom_cell_data_cols : [];\n //calls custom function for retrieving cell data\n this.customCellData = Types.isFn(f.custom_cell_data) ?\n f.custom_cell_data : null;\n //input watermark text array\n this.watermark = f.watermark || '';\n this.isWatermarkArray = Types.isArray(this.watermark);\n //id of toolbar container element\n this.toolBarTgtId = f.toolbar_target_id || null;\n //enables/disables help div\n this.help = Types.isUndef(f.help_instructions) ?\n undefined : Boolean(f.help_instructions);\n //popup filters\n this.popupFilters = Boolean(f.popup_filters);\n //active columns color\n this.markActiveColumns = Boolean(f.mark_active_columns);\n //defines css class for active column header\n this.activeColumnsCssClass = f.active_columns_css_class ||\n 'activeHeader';\n //calls function before active column header is marked\n this.onBeforeActiveColumn = Types.isFn(f.on_before_active_column) ?\n f.on_before_active_column : null;\n //calls function after active column header is marked\n this.onAfterActiveColumn = Types.isFn(f.on_after_active_column) ?\n f.on_after_active_column : null;\n\n /*** select filter's customisation and behaviours ***/\n //defines 1st option text\n this.displayAllText = f.display_all_text || 'Clear';\n //enables/disables empty option in combo-box filters\n this.enableEmptyOption = Boolean(f.enable_empty_option);\n //defines empty option text\n this.emptyText = f.empty_text || '(Empty)';\n //enables/disables non empty option in combo-box filters\n this.enableNonEmptyOption = Boolean(f.enable_non_empty_option);\n //defines empty option text\n this.nonEmptyText = f.non_empty_text || '(Non empty)';\n //enables/disables onChange event on combo-box\n this.onSlcChange = f.on_change===false ? false : true;\n //enables/disables select options sorting\n this.sortSlc = f.sort_select===false ? false : true;\n //enables/disables ascending numeric options sorting\n this.isSortNumAsc = Boolean(f.sort_num_asc);\n this.sortNumAsc = this.isSortNumAsc ? f.sort_num_asc : [];\n //enables/disables descending numeric options sorting\n this.isSortNumDesc = Boolean(f.sort_num_desc);\n this.sortNumDesc = this.isSortNumDesc ? f.sort_num_desc : [];\n //Select filters are populated on demand\n this.loadFltOnDemand = Boolean(f.load_filters_on_demand);\n this.hasCustomOptions = Types.isObj(f.custom_options);\n this.customOptions = f.custom_options;\n\n /*** Filter operators ***/\n this.rgxOperator = f.regexp_operator || 'rgx:';\n this.emOperator = f.empty_operator || '[empty]';\n this.nmOperator = f.nonempty_operator || '[nonempty]';\n this.orOperator = f.or_operator || '||';\n this.anOperator = f.and_operator || '&&';\n this.grOperator = f.greater_operator || '>';\n this.lwOperator = f.lower_operator || '<';\n this.leOperator = f.lower_equal_operator || '<=';\n this.geOperator = f.greater_equal_operator || '>=';\n this.dfOperator = f.different_operator || '!';\n this.lkOperator = f.like_operator || '*';\n this.eqOperator = f.equal_operator || '=';\n this.stOperator = f.start_with_operator || '{';\n this.enOperator = f.end_with_operator || '}';\n this.curExp = f.cur_exp || '^[¥£€$]';\n this.separator = f.separator || ',';\n\n /*** rows counter ***/\n //show/hides rows counter\n this.rowsCounter = Boolean(f.rows_counter);\n\n /*** status bar ***/\n //show/hides status bar\n this.statusBar = Boolean(f.status_bar);\n\n /*** loader ***/\n //enables/disables loader/spinner indicator\n this.loader = Boolean(f.loader);\n\n /*** validation - reset buttons/links ***/\n //show/hides filter's validation button\n this.displayBtn = Boolean(f.btn);\n //defines validation button text\n this.btnText = f.btn_text || (!this.enableIcons ? 'Go' : '');\n //defines css class for validation button\n this.btnCssClass = f.btn_css_class ||\n (!this.enableIcons ? 'btnflt' : 'btnflt_icon');\n //show/hides reset link\n this.btnReset = Boolean(f.btn_reset);\n //defines css class for reset button\n this.btnResetCssClass = f.btn_reset_css_class || 'reset';\n //callback function before filters are cleared\n this.onBeforeReset = Types.isFn(f.on_before_reset) ?\n f.on_before_reset : null;\n //callback function after filters are cleared\n this.onAfterReset = Types.isFn(f.on_after_reset) ?\n f.on_after_reset : null;\n\n /*** paging ***/\n //enables/disables table paging\n this.paging = Boolean(f.paging);\n this.nbVisibleRows = 0; //nb visible rows\n this.nbHiddenRows = 0; //nb hidden rows\n\n /*** autofilter on typing ***/\n //enables/disables auto filtering, table is filtered when user stops\n //typing\n this.autoFilter = Boolean(f.auto_filter);\n //onkeyup delay timer (msecs)\n this.autoFilterDelay = !isNaN(f.auto_filter_delay) ?\n f.auto_filter_delay : 900;\n //typing indicator\n this.isUserTyping = null;\n this.autoFilterTimer = null;\n\n /*** keyword highlighting ***/\n //enables/disables keyword highlighting\n this.highlightKeywords = Boolean(f.highlight_keywords);\n\n /*** No results feature ***/\n this.noResults = Types.isObj(f.no_results_message) ||\n Boolean(f.no_results_message);\n\n // stateful\n this.state = Types.isObj(f.state) || Boolean(f.state);\n\n /*** data types ***/\n //defines default date type (european DMY)\n this.defaultDateType = f.default_date_type || 'DMY';\n //defines default thousands separator\n //US = ',' EU = '.'\n this.thousandsSeparator = f.thousands_separator || ',';\n //defines default decimal separator\n //US & javascript = '.' EU = ','\n this.decimalSeparator = f.decimal_separator || '.';\n //enables number format per column\n this.hasColNbFormat = Types.isArray(f.col_number_format);\n //array containing columns nb formats\n this.colNbFormat = this.hasColNbFormat ? f.col_number_format : null;\n //enables date type per column\n this.hasColDateType = Types.isArray(f.col_date_type);\n //array containing columns date type\n this.colDateType = this.hasColDateType ? f.col_date_type : null;\n\n /*** ids prefixes ***/\n //css class name added to table\n this.prfxTf = 'TF';\n //filters (inputs - selects)\n this.prfxFlt = 'flt';\n //validation button\n this.prfxValButton = 'btn';\n //container div for paging elements, rows counter etc.\n this.prfxInfDiv = 'inf_';\n //left div\n this.prfxLDiv = 'ldiv_';\n //right div\n this.prfxRDiv = 'rdiv_';\n //middle div\n this.prfxMDiv = 'mdiv_';\n //filter values cookie\n this.prfxCookieFltsValues = 'tf_flts_';\n //page nb cookie\n this.prfxCookiePageNb = 'tf_pgnb_';\n //page length cookie\n this.prfxCookiePageLen = 'tf_pglen_';\n this.prfxResponsive = 'resp';\n\n /*** cookies ***/\n //remembers filters values on page load\n this.rememberGridValues = Boolean(f.remember_grid_values);\n //remembers page nb on page load\n this.rememberPageNb = this.paging && f.remember_page_number;\n //remembers page length on page load\n this.rememberPageLen = this.paging && f.remember_page_length;\n this.hasPersistence = this.rememberGridValues || this.rememberPageNb ||\n this.rememberPageLen;\n\n /*** extensions ***/\n //imports external script\n this.extensions = f.extensions;\n this.hasExtensions = Types.isArray(this.extensions);\n\n /*** themes ***/\n this.enableDefaultTheme = Boolean(f.enable_default_theme);\n //imports themes\n this.hasThemes = (this.enableDefaultTheme || Types.isArray(f.themes));\n this.themes = f.themes || [];\n //themes path\n this.themesPath = f.themes_path || this.stylePath + 'themes/';\n\n //responsive table\n this.responsive = Boolean(f.responsive);\n\n // Features registry\n this.Mod = {};\n\n // Extensions registry\n this.ExtRegistry = {};\n\n /*** TF events ***/\n this.Evt = {\n // Detect <enter> key\n detectKey(e) {\n if(!this.enterKey){ return; }\n if(e){\n let key = Event.keyCode(e);\n if(key===13){\n this.filter();\n Event.cancel(e);\n Event.stop(e);\n } else {\n this.isUserTyping = true;\n global.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n }\n }\n },\n // if auto-filter on, detect user is typing and filter columns\n onKeyUp(e) {\n if(!this.autoFilter){\n return;\n }\n let key = Event.keyCode(e);\n this.isUserTyping = false;\n\n function filter() {\n global.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n if(!this.isUserTyping){\n this.filter();\n this.isUserTyping = null;\n }\n }\n\n if(key!==13 && key!==9 && key!==27 && key!==38 && key!==40) {\n if(this.autoFilterTimer === null){\n this.autoFilterTimer = global.setInterval(\n filter.bind(this), this.autoFilterDelay);\n }\n } else {\n global.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n }\n },\n // if auto-filter on, detect user is typing\n onKeyDown() {\n if(!this.autoFilter) { return; }\n this.isUserTyping = true;\n },\n // if auto-filter on, clear interval on filter blur\n onInpBlur() {\n if(this.autoFilter){\n this.isUserTyping = false;\n global.clearInterval(this.autoFilterTimer);\n }\n this.emitter.emit('filter-blur', this);\n },\n // set focused text-box filter as active\n onInpFocus(e) {\n let elm = Event.target(e);\n this.emitter.emit('filter-focus', this, elm);\n }\n };\n }\n\n /**\n * Initialise features and layout\n */\n init(){\n if(this._hasGrid){\n return;\n }\n\n let Mod = this.Mod;\n let n = this.singleSearchFlt ? 1 : this.nbCells,\n inpclass;\n\n //loads stylesheet if not imported\n this.import(this.stylesheetId, this.stylesheet, null, 'link');\n\n //loads theme\n if(this.hasThemes){\n this.loadThemes();\n }\n\n // Instantiate help feature and initialise only if set true\n if(!Mod.help){\n Mod.help = new Help(this);\n }\n if(this.help){\n Mod.help.init();\n }\n\n if(this.state){\n if(!Mod.state){\n Mod.state = new State(this);\n }\n Mod.state.init();\n }\n\n if(this.hasPersistence){\n if(!Mod.store){\n Mod.store = new Store(this);\n }\n Mod.store.init();\n }\n\n if(this.gridLayout){\n if(!Mod.gridLayout){\n Mod.gridLayout = new GridLayout(this);\n }\n Mod.gridLayout.init();\n }\n\n if(this.loader){\n if(!Mod.loader){\n Mod.loader = new Loader(this);\n }\n Mod.loader.init();\n }\n\n if(this.highlightKeywords){\n Mod.highlightKeyword = new HighlightKeyword(this);\n Mod.highlightKeyword.init();\n }\n\n if(this.popupFilters){\n if(!Mod.popupFilter){\n Mod.popupFilter = new PopupFilter(this);\n }\n Mod.popupFilter.init();\n }\n\n //filters grid is not generated\n if(!this.fltGrid){\n this._initNoFilters();\n } else {\n let fltrow = this._insertFiltersRow();\n\n this.nbFilterableRows = this.getRowsNb();\n this.nbVisibleRows = this.nbFilterableRows;\n this.nbRows = this.tbl.rows.length;\n\n // Generate filters\n for(let i=0; i<n; i++){\n this.emitter.emit('before-filter-init', this, i);\n\n let fltcell = Dom.create(this.fltCellTag),\n col = this.getFilterType(i);\n\n if(this.singleSearchFlt){\n fltcell.colSpan = this.nbCells;\n }\n if(!this.gridLayout){\n fltrow.appendChild(fltcell);\n }\n inpclass = (i==n-1 && this.displayBtn) ?\n this.fltSmallCssClass : this.fltCssClass;\n\n //only 1 input for single search\n if(this.singleSearchFlt){\n col = this.fltTypeInp;\n inpclass = this.singleFltCssClass;\n }\n\n //drop-down filters\n if(col===this.fltTypeSlc || col===this.fltTypeMulti){\n if(!Mod.dropdown){\n Mod.dropdown = new Dropdown(this);\n }\n Mod.dropdown.init(i, this.isExternalFlt, fltcell);\n }\n // checklist\n else if(col===this.fltTypeCheckList){\n if(!Mod.checkList){\n Mod.checkList = new CheckList(this);\n }\n Mod.checkList.init(i, this.isExternalFlt, fltcell);\n } else {\n this._buildInputFilter(i, inpclass, fltcell);\n }\n\n // this adds submit button\n if(i==n-1 && this.displayBtn){\n this._buildSubmitButton(i, fltcell);\n }\n\n this.emitter.emit('after-filter-init', this, i);\n }\n\n this.emitter.on(['filter-focus'],\n (tf, filter)=> this.setActiveFilterId(filter.id));\n\n }//if this.fltGrid\n\n /* Features */\n if(this.hasVisibleRows){\n this.emitter.on(['after-filtering'], ()=> this.enforceVisibility());\n this.enforceVisibility();\n }\n if(this.rowsCounter){\n Mod.rowsCounter = new RowsCounter(this);\n Mod.rowsCounter.init();\n }\n if(this.statusBar){\n Mod.statusBar = new StatusBar(this);\n Mod.statusBar.init();\n }\n if(this.paging){\n if(!Mod.paging){\n Mod.paging = new Paging(this);\n Mod.paging.init();\n } else{\n Mod.paging.reset();\n }\n }\n if(this.btnReset){\n Mod.clearButton = new ClearButton(this);\n Mod.clearButton.init();\n }\n\n if(this.hasColWidths && !this.gridLayout){\n this.setColWidths();\n }\n if(this.alternateRows){\n Mod.alternateRows = new AlternateRows(this);\n Mod.alternateRows.init();\n }\n if(this.noResults){\n if(!Mod.noResults){\n Mod.noResults = new NoResults(this);\n }\n Mod.noResults.init();\n }\n\n this._hasGrid = true;\n\n if(this.hasPersistence){\n this.resetFilterValues();\n }\n\n //TF css class is added to table\n if(!this.gridLayout){\n Dom.addClass(this.tbl, this.prfxTf);\n if(this.responsive){\n Dom.addClass(this.tbl, this.prfxResponsive);\n }\n }\n\n /* Loads extensions */\n if(this.hasExtensions){\n this.initExtensions();\n }\n\n // Subscribe to events\n if(this.markActiveColumns){\n this.emitter.on(['before-filtering'],\n ()=> this.clearActiveColumns());\n this.emitter.on(['cell-processed'],\n (tf, colIndex)=> this.markActiveColumn(colIndex));\n }\n if(this.linkedFilters){\n this.emitter.on(['after-filtering'], ()=> this.linkFilters());\n }\n\n if(this.onFiltersLoaded){\n this.onFiltersLoaded.call(null, this);\n }\n\n this.initialized = true;\n this.emitter.emit('initialized', this);\n }\n\n /**\n * Insert filters row at initialization\n */\n _insertFiltersRow() {\n if(this.gridLayout){\n return;\n }\n let fltrow;\n\n let thead = Dom.tag(this.tbl, 'thead');\n if(thead.length > 0){\n fltrow = thead[0].insertRow(this.filtersRowIndex);\n } else {\n fltrow = this.tbl.insertRow(this.filtersRowIndex);\n }\n\n fltrow.className = this.fltsRowCssClass;\n\n if(this.isExternalFlt){\n fltrow.style.display = 'none';\n }\n\n this.emitter.emit('filters-row-inserted', this, fltrow);\n return fltrow;\n }\n\n /**\n * Initialize filtersless table\n */\n _initNoFilters(){\n if(this.fltGrid){\n return;\n }\n this.refRow = this.refRow > 0 ? this.refRow-1 : 0;\n this.nbFilterableRows = this.getRowsNb();\n this.nbVisibleRows = this.nbFilterableRows;\n this.nbRows = this.nbFilterableRows + this.refRow;\n }\n\n /**\n * Build input filter type\n * @param {Number} colIndex Column index\n * @param {String} cssClass Css class applied to filter\n * @param {DOMElement} container Container DOM element\n */\n _buildInputFilter(colIndex, cssClass, container){\n let col = this.getFilterType(colIndex);\n let externalFltTgtId = this.isExternalFlt ?\n this.externalFltTgtIds[colIndex] : null;\n let inptype = col===this.fltTypeInp ? 'text' : 'hidden';\n let inp = Dom.create(this.fltTypeInp,\n ['id', this.prfxFlt+colIndex+'_'+this.id],\n ['type', inptype], ['ct', colIndex]);\n\n if(inptype !== 'hidden' && this.watermark){\n inp.setAttribute('placeholder',\n this.isWatermarkArray ? (this.watermark[colIndex] || '') :\n this.watermark\n );\n }\n inp.className = cssClass || this.fltCssClass;\n Event.add(inp, 'focus', this.Evt.onInpFocus.bind(this));\n\n //filter is appended in custom element\n if(externalFltTgtId){\n Dom.id(externalFltTgtId).appendChild(inp);\n this.externalFltEls.push(inp);\n } else {\n container.appendChild(inp);\n }\n\n this.fltIds.push(inp.id);\n\n Event.add(inp, 'keypress', this.Evt.detectKey.bind(this));\n Event.add(inp, 'keydown', this.Evt.onKeyDown.bind(this));\n Event.add(inp, 'keyup', this.Evt.onKeyUp.bind(this));\n Event.add(inp, 'blur', this.Evt.onInpBlur.bind(this));\n }\n\n /**\n * Build submit button\n * @param {Number} colIndex Column index\n * @param {DOMElement} container Container DOM element\n */\n _buildSubmitButton(colIndex, container){\n let externalFltTgtId = this.isExternalFlt ?\n this.externalFltTgtIds[colIndex] : null;\n let btn = Dom.create(this.fltTypeInp,\n ['id', this.prfxValButton+colIndex+'_'+this.id],\n ['type', 'button'], ['value', this.btnText]);\n btn.className = this.btnCssClass;\n\n //filter is appended in custom element\n if(externalFltTgtId){\n Dom.id(externalFltTgtId).appendChild(btn);\n } else {\n container.appendChild(btn);\n }\n\n Event.add(btn, 'click', ()=> this.filter());\n }\n\n /**\n * Return a feature instance for a given name\n * @param {String} name Name of the feature\n * @return {Object}\n */\n feature(name){\n return this.Mod[name];\n }\n\n /**\n * Initialise all the extensions defined in the configuration object\n */\n initExtensions(){\n let exts = this.extensions;\n // Set config's publicPath dynamically for Webpack...\n __webpack_public_path__ = this.basePath;\n\n this.emitter.emit('before-loading-extensions', this);\n for(let i=0, len=exts.length; i<len; i++){\n let ext = exts[i];\n if(!this.ExtRegistry[ext.name]){\n this.loadExtension(ext);\n }\n }\n this.emitter.emit('after-loading-extensions', this);\n }\n\n /**\n * Load an extension module\n * @param {Object} ext Extension config object\n */\n loadExtension(ext){\n if(!ext || !ext.name){\n return;\n }\n\n let name = ext.name;\n let path = ext.path;\n let modulePath;\n\n if(name && path){\n modulePath = ext.path + name;\n } else {\n name = name.replace('.js', '');\n modulePath = 'extensions/{}/{}'.replace(/{}/g, name);\n }\n\n // Require pattern for Webpack\n require(['./' + modulePath], (mod)=> {\n /* eslint-disable */\n let inst = new mod.default(this, ext);\n /* eslint-enable */\n inst.init();\n this.ExtRegistry[name] = inst;\n });\n }\n\n /**\n * Get an extension instance\n * @param {String} name Name of the extension\n * @return {Object} Extension instance\n */\n extension(name){\n return this.ExtRegistry[name];\n }\n\n /**\n * Check passed extension name exists\n * @param {String} name Name of the extension\n * @return {Boolean}\n */\n hasExtension(name){\n return !Types.isEmpty(this.ExtRegistry[name]);\n }\n\n /**\n * Destroy all the extensions defined in the configuration object\n */\n destroyExtensions(){\n let exts = this.extensions;\n\n for(let i=0, len=exts.length; i<len; i++){\n let ext = exts[i];\n let extInstance = this.ExtRegistry[ext.name];\n if(extInstance){\n extInstance.destroy();\n this.ExtRegistry[ext.name] = null;\n }\n }\n }\n\n /**\n * Load themes defined in the configuration object\n */\n loadThemes(){\n let themes = this.themes;\n this.emitter.emit('before-loading-themes', this);\n\n //Default theme config\n if(this.enableDefaultTheme){\n let defaultTheme = { name: 'default' };\n this.themes.push(defaultTheme);\n }\n if(Types.isArray(themes)){\n for(let i=0, len=themes.length; i<len; i++){\n let theme = themes[i];\n let name = theme.name;\n let path = theme.path;\n let styleId = this.prfxTf + name;\n if(name && !path){\n path = this.themesPath + name + '/' + name + '.css';\n }\n else if(!name && theme.path){\n name = 'theme{0}'.replace('{0}', i);\n }\n\n if(!this.isImported(path, 'link')){\n this.import(styleId, path, null, 'link');\n }\n }\n }\n\n //Some elements need to be overriden for default theme\n //Reset button\n this.btnResetText = null;\n this.btnResetHtml = '<input type=\"button\" value=\"\" class=\"' +\n this.btnResetCssClass+'\" title=\"Clear filters\" />';\n\n //Paging buttons\n this.btnPrevPageHtml = '<input type=\"button\" value=\"\" class=\"' +\n this.btnPageCssClass+' previousPage\" title=\"Previous page\" />';\n this.btnNextPageHtml = '<input type=\"button\" value=\"\" class=\"' +\n this.btnPageCssClass+' nextPage\" title=\"Next page\" />';\n this.btnFirstPageHtml = '<input type=\"button\" value=\"\" class=\"' +\n this.btnPageCssClass+' firstPage\" title=\"First page\" />';\n this.btnLastPageHtml = '<input type=\"button\" value=\"\" class=\"' +\n this.btnPageCssClass+' lastPage\" title=\"Last page\" />';\n\n //Loader\n this.loader = true;\n this.loaderHtml = '<div class=\"defaultLoader\"></div>';\n this.loaderText = null;\n\n this.emitter.emit('after-loading-themes', this);\n }\n\n /**\n * Return stylesheet DOM element for a given theme name\n * @return {DOMElement} stylesheet element\n */\n getStylesheet(name='default'){\n return Dom.id(this.prfxTf + name);\n }\n\n /**\n * Destroy filter grid\n */\n destroy(){\n if(!this._hasGrid){\n return;\n }\n let rows = this.tbl.rows,\n Mod = this.Mod,\n emitter = this.emitter;\n\n if(this.isExternalFlt && !this.popupFilters){\n this.removeExternalFlts();\n }\n if(this.infDiv){\n this.removeToolbar();\n }\n if(this.markActiveColumns){\n this.clearActiveColumns();\n emitter.off(['before-filtering'], ()=> this.clearActiveColumns());\n emitter.off(['cell-processed'],\n (tf, colIndex)=> this.markActiveColumn(colIndex));\n }\n if(this.hasExtensions){\n this.destroyExtensions();\n }\n\n this.validateAllRows();\n\n if(this.fltGrid && !this.gridLayout){\n this.fltGridEl = rows[this.filtersRowIndex];\n this.tbl.deleteRow(this.filtersRowIndex);\n }\n\n // broadcast destroy event\n emitter.emit('destroy', this);\n\n // Destroy modules\n // TODO: subcribe modules to destroy event instead\n Object.keys(Mod).forEach(function(key){\n var feature = Mod[key];\n if(feature && Types.isFn(feature.destroy)){\n feature.destroy();\n }\n });\n\n // unsubscribe to events\n if(this.hasVisibleRows){\n emitter.off(['after-filtering'], ()=> this.enforceVisibility());\n }\n if(this.linkedFilters){\n emitter.off(['after-filtering'], ()=> this.linkFilters());\n }\n this.emitter.off(['filter-focus'],\n (tf, filter)=> this.setActiveFilterId(filter.id));\n\n Dom.removeClass(this.tbl, this.prfxTf);\n Dom.removeClass(this.tbl, this.prfxResponsive);\n\n this.nbHiddenRows = 0;\n this.validRowsIndex = [];\n this.fltIds = [];\n this._hasGrid = false;\n this.initialized = false;\n }\n\n /**\n * Generate container element for paging, reset button, rows counter etc.\n */\n setToolbar(){\n if(this.infDiv){\n return;\n }\n\n /*** container div ***/\n let infdiv = Dom.create('div', ['id', this.prfxInfDiv+this.id]);\n infdiv.className = this.infDivCssClass;\n\n //custom container\n if(this.toolBarTgtId){\n Dom.id(this.toolBarTgtId).appendChild(infdiv);\n }\n //grid-layout\n else if(this.gridLayout){\n let gridLayout = this.Mod.gridLayout;\n gridLayout.tblMainCont.appendChild(infdiv);\n infdiv.className = gridLayout.gridInfDivCssClass;\n }\n //default location: just above the table\n else{\n var cont = Dom.create('caption');\n cont.appendChild(infdiv);\n this.tbl.insertBefore(cont, this.tbl.firstChild);\n }\n this.infDiv = Dom.id(this.prfxInfDiv+this.id);\n\n /*** left div containing rows # displayer ***/\n let ldiv = Dom.create('div', ['id', this.prfxLDiv+this.id]);\n ldiv.className = this.lDivCssClass;\n infdiv.appendChild(ldiv);\n this.lDiv = Dom.id(this.prfxLDiv+this.id);\n\n /*** right div containing reset button\n + nb results per page select ***/\n let rdiv = Dom.create('div', ['id', this.prfxRDiv+this.id]);\n rdiv.className = this.rDivCssClass;\n infdiv.appendChild(rdiv);\n this.rDiv = Dom.id(this.prfxRDiv+this.id);\n\n /*** mid div containing paging elements ***/\n let mdiv = Dom.create('div', ['id', this.prfxMDiv+this.id]);\n mdiv.className = this.mDivCssClass;\n infdiv.appendChild(mdiv);\n this.mDiv = Dom.id(this.prfxMDiv+this.id);\n\n // emit help initialisation only if undefined\n if(Types.isUndef(this.help)){\n // explicitily set enabled field to true to initialise help by\n // default, only if setting is undefined\n this.Mod.help.enabled = true;\n this.emitter.emit('init-help', this);\n }\n }\n\n /**\n * Remove toolbar container element\n */\n removeToolbar(){\n if(!this.infDiv){\n return;\n }\n Dom.remove(this.infDiv);\n this.infDiv = null;\n\n let tbl = this.tbl;\n let captions = Dom.tag(tbl, 'caption');\n if(captions.length > 0){\n [].forEach.call(captions, (elm)=> tbl.removeChild(elm));\n }\n }\n\n /**\n * Remove all the external column filters\n */\n removeExternalFlts(){\n if(!this.isExternalFlt){\n return;\n }\n let ids = this.externalFltTgtIds,\n len = ids.length;\n for(let ct=0; ct<len; ct++){\n let externalFltTgtId = ids[ct],\n externalFlt = Dom.id(externalFltTgtId);\n if(externalFlt){\n externalFlt.innerHTML = '';\n }\n }\n }\n\n /**\n * Check if given column implements a filter with custom options\n * @param {Number} colIndex Column's index\n * @return {Boolean}\n */\n isCustomOptions(colIndex) {\n return this.hasCustomOptions &&\n this.customOptions.cols.indexOf(colIndex) != -1;\n }\n\n /**\n * Returns an array [[value0, value1 ...],[text0, text1 ...]] with the\n * custom options values and texts\n * @param {Number} colIndex Column's index\n * @return {Array}\n */\n getCustomOptions(colIndex){\n if(Types.isEmpty(colIndex) || !this.isCustomOptions(colIndex)){\n return;\n }\n\n let customOptions = this.customOptions;\n let cols = customOptions.cols;\n let optTxt = [], optArray = [];\n let index = cols.indexOf(colIndex);\n let slcValues = customOptions.values[index];\n let slcTexts = customOptions.texts[index];\n let slcSort = customOptions.sorts[index];\n\n for(let r=0, len=slcValues.length; r<len; r++){\n optArray.push(slcValues[r]);\n if(slcTexts[r]){\n optTxt.push(slcTexts[r]);\n } else {\n optTxt.push(slcValues[r]);\n }\n }\n if(slcSort){\n optArray.sort();\n optTxt.sort();\n }\n return [optArray, optTxt];\n }\n\n /**\n * Reset persisted filter values\n */\n resetFilterValues(){\n if(!this.rememberGridValues){\n return;\n }\n\n let storeValues = this.Mod.store.getFilterValues();\n storeValues.forEach((val, idx)=> {\n if(val !== ' '){\n this.setFilterValue(idx, val);\n }\n });\n this.filter();\n }\n\n /**\n * Filter the table by retrieving the data from each cell in every single\n * row and comparing it to the search term for current column. A row is\n * hidden when all the search terms are not found in inspected row.\n */\n filter(){\n if(!this.fltGrid || !this._hasGrid){\n return;\n }\n //invoke onbefore callback\n if(this.onBeforeFilter){\n this.onBeforeFilter.call(null, this);\n }\n this.emitter.emit('before-filtering', this);\n\n let row = this.tbl.rows,\n hiddenrows = 0;\n\n this.validRowsIndex = [];\n // search args re-init\n let searchArgs = this.getFiltersValue();\n\n var numCellData, nbFormat;\n var re_le = new RegExp(this.leOperator),\n re_ge = new RegExp(this.geOperator),\n re_l = new RegExp(this.lwOperator),\n re_g = new RegExp(this.grOperator),\n re_d = new RegExp(this.dfOperator),\n re_lk = new RegExp(Str.rgxEsc(this.lkOperator)),\n re_eq = new RegExp(this.eqOperator),\n re_st = new RegExp(this.stOperator),\n re_en = new RegExp(this.enOperator),\n // re_an = new RegExp(this.anOperator),\n // re_cr = new RegExp(this.curExp),\n re_em = this.emOperator,\n re_nm = this.nmOperator,\n re_re = new RegExp(Str.rgxEsc(this.rgxOperator));\n\n //keyword highlighting\n function highlight(str, ok, cell){\n /*jshint validthis:true */\n if(this.highlightKeywords && ok){\n str = str.replace(re_lk, '');\n str = str.replace(re_eq, '');\n str = str.replace(re_st, '');\n str = str.replace(re_en, '');\n let w = str;\n if(re_le.test(str) || re_ge.test(str) || re_l.test(str) ||\n re_g.test(str) || re_d.test(str)){\n w = Dom.getText(cell);\n }\n if(w !== ''){\n this.emitter.emit('highlight-keyword', this, cell, w);\n }\n }\n }\n\n //looks for search argument in current row\n function hasArg(sA, cellData, j){\n /*jshint validthis:true */\n sA = Str.matchCase(sA, this.caseSensitive);\n\n let occurence,\n removeNbFormat = Helpers.removeNbFormat;\n\n //Search arg operator tests\n let hasLO = re_l.test(sA),\n hasLE = re_le.test(sA),\n hasGR = re_g.test(sA),\n hasGE = re_ge.test(sA),\n hasDF = re_d.test(sA),\n hasEQ = re_eq.test(sA),\n hasLK = re_lk.test(sA),\n // hasAN = re_an.test(sA),\n hasST = re_st.test(sA),\n hasEN = re_en.test(sA),\n hasEM = (re_em === sA),\n hasNM = (re_nm === sA),\n hasRE = re_re.test(sA);\n\n //Search arg dates tests\n let isLDate = hasLO &&\n DateHelper.isValid(sA.replace(re_l,''), dtType);\n let isLEDate = hasLE &&\n DateHelper.isValid(sA.replace(re_le,''), dtType);\n let isGDate = hasGR &&\n DateHelper.isValid(sA.replace(re_g,''), dtType);\n let isGEDate = hasGE &&\n DateHelper.isValid(sA.replace(re_ge,''), dtType);\n let isDFDate = hasDF &&\n DateHelper.isValid(sA.replace(re_d,''), dtType);\n let isEQDate = hasEQ &&\n DateHelper.isValid(sA.replace(re_eq,''), dtType);\n\n let dte1, dte2;\n //dates\n if(DateHelper.isValid(cellData, dtType)){\n dte1 = DateHelper.format(cellData, dtType);\n // lower date\n if(isLDate){\n dte2 = DateHelper.format(sA.replace(re_l,''), dtType);\n occurence = dte1 < dte2;\n }\n // lower equal date\n else if(isLEDate){\n dte2 = DateHelper.format(sA.replace(re_le,''), dtType);\n occurence = dte1 <= dte2;\n }\n // greater equal date\n else if(isGEDate){\n dte2 = DateHelper.format(sA.replace(re_ge,''), dtType);\n occurence = dte1 >= dte2;\n }\n // greater date\n else if(isGDate){\n dte2 = DateHelper.format(sA.replace(re_g,''), dtType);\n occurence = dte1 > dte2;\n }\n // different date\n else if(isDFDate){\n dte2 = DateHelper.format(sA.replace(re_d,''), dtType);\n occurence = dte1.toString() != dte2.toString();\n }\n // equal date\n else if(isEQDate){\n dte2 = DateHelper.format(sA.replace(re_eq,''), dtType);\n occurence = dte1.toString() == dte2.toString();\n }\n // searched keyword with * operator doesn't have to be a date\n else if(re_lk.test(sA)){// like date\n occurence = Str.contains(sA.replace(re_lk,''), cellData,\n false, this.caseSensitive);\n }\n else if(DateHelper.isValid(sA,dtType)){\n dte2 = DateHelper.format(sA,dtType);\n occurence = dte1.toString() === dte2.toString();\n }\n //empty\n else if(hasEM){\n occurence = Str.isEmpty(cellData);\n }\n //non-empty\n else if(hasNM){\n occurence = !Str.isEmpty(cellData);\n } else {\n occurence = Str.contains(sA, cellData, this.isExactMatch(j),\n this.caseSensitive);\n }\n }\n\n else{\n //first numbers need to be formated\n if(this.hasColNbFormat && this.colNbFormat[j]){\n numCellData = removeNbFormat(\n cellData, this.colNbFormat[j]);\n nbFormat = this.colNbFormat[j];\n } else {\n if(this.thousandsSeparator === ',' &&\n this.decimalSeparator === '.'){\n numCellData = removeNbFormat(cellData, 'us');\n nbFormat = 'us';\n } else {\n numCellData = removeNbFormat(cellData, 'eu');\n nbFormat = 'eu';\n }\n }\n\n // first checks if there is any operator (<,>,<=,>=,!,*,=,{,},\n // rgx:)\n // lower equal\n if(hasLE){\n occurence = numCellData <= removeNbFormat(\n sA.replace(re_le, ''), nbFormat);\n }\n //greater equal\n else if(hasGE){\n occurence = numCellData >= removeNbFormat(\n sA.replace(re_ge, ''), nbFormat);\n }\n //lower\n else if(hasLO){\n occurence = numCellData < removeNbFormat(\n sA.replace(re_l, ''), nbFormat);\n }\n //greater\n else if(hasGR){\n occurence = numCellData > removeNbFormat(\n sA.replace(re_g, ''), nbFormat);\n }\n //different\n else if(hasDF){\n occurence = Str.contains(sA.replace(re_d, ''), cellData,\n false, this.caseSensitive) ? false : true;\n }\n //like\n else if(hasLK){\n occurence = Str.contains(sA.replace(re_lk, ''), cellData,\n false, this.caseSensitive);\n }\n //equal\n else if(hasEQ){\n occurence = Str.contains(sA.replace(re_eq, ''), cellData,\n true, this.caseSensitive);\n }\n //starts with\n else if(hasST){\n occurence = cellData.indexOf(sA.replace(re_st, '')) === 0 ?\n true : false;\n }\n //ends with\n else if(hasEN){\n let searchArg = sA.replace(re_en, '');\n occurence =\n cellData.lastIndexOf(searchArg, cellData.length-1) ===\n (cellData.length-1)-(searchArg.length-1) &&\n cellData.lastIndexOf(\n searchArg, cellData.length-1) > -1 ? true : false;\n }\n //empty\n else if(hasEM){\n occurence = Str.isEmpty(cellData);\n }\n //non-empty\n else if(hasNM){\n occurence = !Str.isEmpty(cellData);\n }\n //regexp\n else if(hasRE){\n //in case regexp fires an exception\n try{\n //operator is removed\n let srchArg = sA.replace(re_re,'');\n let rgx = new RegExp(srchArg);\n occurence = rgx.test(cellData);\n } catch(e) { occurence = false; }\n } else {\n occurence = Str.contains(sA, cellData, this.isExactMatch(j),\n this.caseSensitive);\n }\n\n }//else\n return occurence;\n }//fn\n\n for(let k=this.refRow; k<this.nbRows; k++){\n // already filtered rows display re-init\n row[k].style.display = '';\n\n let cells = row[k].cells,\n nchilds = cells.length;\n\n // checks if row has exact cell #\n if(nchilds !== this.nbCells){\n continue;\n }\n\n let occurence = [],\n isRowValid = true,\n //only for single filter search\n singleFltRowValid = false;\n\n // this loop retrieves cell data\n for(let j=0; j<nchilds; j++){\n //searched keyword\n let sA = searchArgs[this.singleSearchFlt ? 0 : j];\n var dtType = this.hasColDateType ?\n this.colDateType[j] : this.defaultDateType;\n\n if(sA === ''){\n continue;\n }\n\n let cellData = Str.matchCase(this.getCellData(cells[j]),\n this.caseSensitive);\n\n //multiple search parameter operator ||\n let sAOrSplit = sA.toString().split(this.orOperator),\n //multiple search || parameter boolean\n hasMultiOrSA = sAOrSplit.length > 1,\n //multiple search parameter operator &&\n sAAndSplit = sA.toString().split(this.anOperator),\n //multiple search && parameter boolean\n hasMultiAndSA = sAAndSplit.length > 1;\n\n //detect operators or array query\n if(Types.isArray(sA) || hasMultiOrSA || hasMultiAndSA){\n let cS,\n s,\n occur = false;\n if(Types.isArray(sA)){\n s = sA;\n } else {\n s = hasMultiOrSA ? sAOrSplit : sAAndSplit;\n }\n // TODO: improve clarity/readability of this block\n for(let w=0, len=s.length; w<len; w++){\n cS = Str.trim(s[w]);\n occur = hasArg.call(this, cS, cellData, j);\n highlight.call(this, cS, occur, cells[j]);\n if((hasMultiOrSA && occur) ||\n (hasMultiAndSA && !occur)){\n break;\n }\n if(Types.isArray(sA) && occur){\n break;\n }\n }\n occurence[j] = occur;\n\n }\n //single search parameter\n else {\n occurence[j] = hasArg.call(this, Str.trim(sA), cellData, j);\n highlight.call(this, sA, occurence[j], cells[j]);\n }//else single param\n\n if(!occurence[j]){\n isRowValid = false;\n }\n if(this.singleSearchFlt && occurence[j]){\n singleFltRowValid = true;\n }\n\n this.emitter.emit('cell-processed', this, j, cells[j]);\n }//for j\n\n if(this.singleSearchFlt && singleFltRowValid){\n isRowValid = true;\n }\n\n if(!isRowValid){\n this.validateRow(k, false);\n hiddenrows++;\n } else {\n this.validateRow(k, true);\n }\n\n this.emitter.emit('row-processed', this, k,\n this.validRowsIndex.length, isRowValid);\n }// for k\n\n this.nbVisibleRows = this.validRowsIndex.length;\n this.nbHiddenRows = hiddenrows;\n\n //invokes onafterfilter callback\n if(this.onAfterFilter){\n this.onAfterFilter.call(null, this);\n }\n\n this.emitter.emit('after-filtering', this, searchArgs);\n }\n\n /**\n * Return the data of a specified column\n * @param {Number} colIndex Column index\n * @param {Boolean} includeHeaders Optional: include headers row\n * @param {Boolean} num Optional: return unformatted number\n * @param {Array} exclude Optional: list of row indexes to be excluded\n * @return {Array} Flat list of data for a column\n */\n getColValues(colIndex, includeHeaders=false, num=false, exclude=[]){\n if(!this.fltGrid){\n return;\n }\n let row = this.tbl.rows,\n colValues = [];\n\n if(includeHeaders){\n colValues.push(this.getHeadersText()[colIndex]);\n }\n\n for(let i=this.refRow; i<this.nbRows; i++){\n let isExludedRow = false;\n // checks if current row index appears in exclude array\n if(exclude.length > 0){\n isExludedRow = exclude.indexOf(i) != -1;\n }\n let cell = row[i].cells,\n nchilds = cell.length;\n\n // checks if row has exact cell # and is not excluded\n if(nchilds === this.nbCells && !isExludedRow){\n // this loop retrieves cell data\n for(let j=0; j<nchilds; j++){\n if(j != colIndex || row[i].style.display !== ''){\n continue;\n }\n let cellData = this.getCellData(cell[j]),\n nbFormat = this.colNbFormat ?\n this.colNbFormat[colIndex] : null,\n data = num ?\n Helpers.removeNbFormat(cellData, nbFormat) :\n cellData;\n colValues.push(data);\n }\n }\n }\n return colValues;\n }\n\n /**\n * Return the filter's value of a specified column\n * @param {Number} index Column index\n * @return {String} Filter value\n */\n getFilterValue(index){\n if(!this.fltGrid){\n return;\n }\n let fltValue = '',\n fltValues = [],\n flt = this.getFilterElement(index);\n if(!flt){\n return '';\n }\n\n let fltColType = this.getFilterType(index);\n if(fltColType !== this.fltTypeMulti &&\n fltColType !== this.fltTypeCheckList){\n fltValue = flt.value;\n }\n //mutiple select\n else if(fltColType === this.fltTypeMulti){\n // TODO: extract a method in dropdown module from below\n for(let j=0, len=flt.options.length; j<len; j++){\n if(flt.options[j].selected){\n fltValues.push(flt.options[j].value);\n }\n }\n //return empty string if collection is empty\n fltValue = fltValues.length > 0 ? fltValues : '';\n }\n //checklist\n else if(fltColType === this.fltTypeCheckList){\n // TODO: extract a method in checklist module from below\n if(flt.getAttribute('value') !== null){\n fltValues = flt.getAttribute('value');\n //removes last operator ||\n fltValues = fltValues.substr(0, fltValues.length-3);\n //convert || separated values into array\n fltValues = fltValues.split(' ' + this.orOperator + ' ');\n }\n //return empty string if collection is empty\n fltValue = fltValues.length > 0 ? fltValues : '';\n }\n //return an empty string if collection contains a single empty string\n if(Types.isArray(fltValue) && fltValue.length === 1 &&\n fltValue[0] === ''){\n fltValue = '';\n }\n return fltValue;\n }\n\n /**\n * Return the filters' values\n * @return {Array} List of filters' values\n */\n getFiltersValue(){\n if(!this.fltGrid){\n return;\n }\n let searchArgs = [];\n for(let i=0, len=this.fltIds.length; i<len; i++){\n let fltValue = this.getFilterValue(i);\n if(Types.isArray(fltValue)){\n searchArgs.push(fltValue);\n } else {\n searchArgs.push(Str.trim(fltValue));\n }\n }\n return searchArgs;\n }\n\n /**\n * Return the ID of a specified column's filter\n * @param {Number} index Column's index\n * @return {String} ID of the filter element\n */\n getFilterId(index){\n if(!this.fltGrid){\n return;\n }\n return this.fltIds[index];\n }\n\n /**\n * Return the list of ids of filters matching a specified type.\n * Note: hidden filters are also returned\n *\n * @param {String} type Filter type string ('input', 'select', 'multiple',\n * 'checklist')\n * @param {Boolean} bool If true returns columns indexes instead of IDs\n * @return {[type]} List of element IDs or column indexes\n */\n getFiltersByType(type, bool){\n if(!this.fltGrid){\n return;\n }\n let arr = [];\n for(let i=0, len=this.fltIds.length; i<len; i++){\n let fltType = this.getFilterType(i);\n if(fltType === Str.lower(type)){\n let a = bool ? i : this.fltIds[i];\n arr.push(a);\n }\n }\n return arr;\n }\n\n /**\n * Return the filter's DOM element for a given column\n * @param {Number} index Column's index\n * @return {DOMElement}\n */\n getFilterElement(index){\n let fltId = this.fltIds[index];\n return Dom.id(fltId);\n }\n\n /**\n * Return the number of cells for a given row index\n * @param {Number} rowIndex Index of the row\n * @return {Number} Number of cells\n */\n getCellsNb(rowIndex=0){\n let tr = this.tbl.rows[rowIndex];\n return tr.cells.length;\n }\n\n /**\n * Return the number of filterable rows starting from reference row if\n * defined\n * @param {Boolean} includeHeaders Include the headers row\n * @return {Number} Number of filterable rows\n */\n getRowsNb(includeHeaders){\n let s = Types.isUndef(this.refRow) ? 0 : this.refRow,\n ntrs = this.tbl.rows.length;\n if(includeHeaders){ s = 0; }\n return parseInt(ntrs-s, 10);\n }\n\n /**\n * Return the data of a given cell\n * @param {DOMElement} cell Cell's DOM object\n * @return {String}\n */\n getCellData(cell){\n let idx = cell.cellIndex;\n //Check for customCellData callback\n if(this.customCellData && this.customCellDataCols.indexOf(idx) != -1){\n return this.customCellData.call(null, this, cell, idx);\n } else {\n return Dom.getText(cell);\n }\n }\n\n /**\n * Return the table data with following format:\n * [\n * [rowIndex, [value0, value1...]],\n * [rowIndex, [value0, value1...]]\n * ]\n * @param {Boolean} includeHeaders Optional: include headers row\n * @param {Boolean} excludeHiddenCols Optional: exclude hidden columns\n * @return {Array}\n *\n * TODO: provide an API returning data in JSON format\n */\n getTableData(includeHeaders=false, excludeHiddenCols=false){\n let rows = this.tbl.rows;\n let tblData = [];\n if(includeHeaders){\n let headers = this.getHeadersText(excludeHiddenCols);\n tblData.push([this.getHeadersRowIndex(), headers]);\n }\n for(let k=this.refRow; k<this.nbRows; k++){\n let rowData = [k, []];\n let cells = rows[k].cells;\n for(let j=0, len=cells.length; j<len; j++){\n if(excludeHiddenCols && this.hasExtension('colsVisibility')){\n if(this.extension('colsVisibility').isColHidden(j)){\n continue;\n }\n }\n let cellData = this.getCellData(cells[j]);\n rowData[1].push(cellData);\n }\n tblData.push(rowData);\n }\n return tblData;\n }\n\n /**\n * Return the filtered data with following format:\n * [\n * [rowIndex, [value0, value1...]],\n * [rowIndex, [value0, value1...]]\n * ]\n * @param {Boolean} includeHeaders Optional: include headers row\n * @param {Boolean} excludeHiddenCols Optional: exclude hidden columns\n * @return {Array}\n *\n * TODO: provide an API returning data in JSON format\n */\n getFilteredData(includeHeaders=false, excludeHiddenCols=false){\n if(!this.validRowsIndex){\n return [];\n }\n let rows = this.tbl.rows,\n filteredData = [];\n if(includeHeaders){\n let headers = this.getHeadersText(excludeHiddenCols);\n filteredData.push([this.getHeadersRowIndex(), headers]);\n }\n\n let validRows = this.getValidRows(true);\n for(let i=0; i<validRows.length; i++){\n let rData = [this.validRowsIndex[i], []],\n cells = rows[this.validRowsIndex[i]].cells;\n for(let k=0; k<cells.length; k++){\n if(excludeHiddenCols && this.hasExtension('colsVisibility')){\n if(this.extension('colsVisibility').isColHidden(k)){\n continue;\n }\n }\n let cellData = this.getCellData(cells[k]);\n rData[1].push(cellData);\n }\n filteredData.push(rData);\n }\n return filteredData;\n }\n\n /**\n * Return the filtered data for a given column index\n * @param {Number} colIndex Colmun's index\n * @param {Boolean} includeHeaders Optional: include headers row\n * @return {Array} Flat list of values ['val0','val1','val2'...]\n *\n * TODO: provide an API returning data in JSON format\n */\n getFilteredDataCol(colIndex, includeHeaders=false){\n if(Types.isUndef(colIndex)){\n return [];\n }\n let data = this.getFilteredData(),\n colData = [];\n if(includeHeaders){\n colData.push(this.getHeadersText()[colIndex]);\n }\n for(let i=0, len=data.length; i<len; i++){\n let r = data[i],\n //cols values of current row\n d = r[1],\n //data of searched column\n c = d[colIndex];\n colData.push(c);\n }\n return colData;\n }\n\n /**\n * Get the display value of a row\n * @param {RowElement} row DOM element of the row\n * @return {String} Usually 'none' or ''\n */\n getRowDisplay(row){\n if(!Types.isObj(row)){\n return null;\n }\n return row.style.display;\n }\n\n /**\n * Validate/invalidate row by setting the 'validRow' attribute on the row\n * @param {Number} rowIndex Index of the row\n * @param {Boolean} isValid\n */\n validateRow(rowIndex, isValid){\n let row = this.tbl.rows[rowIndex];\n if(!row || typeof isValid !== 'boolean'){\n return;\n }\n\n // always visible rows are valid\n if(this.hasVisibleRows && this.visibleRows.indexOf(rowIndex) !== -1){\n isValid = true;\n }\n\n let displayFlag = isValid ? '' : 'none',\n validFlag = isValid ? 'true' : 'false';\n row.style.display = displayFlag;\n\n if(this.paging){\n row.setAttribute('validRow', validFlag);\n }\n\n if(isValid){\n if(this.validRowsIndex.indexOf(rowIndex) === -1){\n this.validRowsIndex.push(rowIndex);\n }\n\n if(this.onRowValidated){\n this.onRowValidated.call(null, this, rowIndex);\n }\n\n this.emitter.emit('row-validated', this, rowIndex);\n }\n }\n\n /**\n * Validate all filterable rows\n */\n validateAllRows(){\n if(!this._hasGrid){\n return;\n }\n this.validRowsIndex = [];\n for(let k=this.refRow; k<this.nbFilterableRows; k++){\n this.validateRow(k, true);\n }\n }\n\n /**\n * Set search value to a given filter\n * @param {Number} index Column's index\n * @param {String or Array} query searcharg Search term\n */\n setFilterValue(index, query=''){\n if(!this.fltGrid){\n return;\n }\n let slc = this.getFilterElement(index),\n fltColType = this.getFilterType(index);\n\n if(fltColType !== this.fltTypeMulti &&\n fltColType != this.fltTypeCheckList){\n if(this.loadFltOnDemand && !this.initialized){\n this.emitter.emit('build-select-filter', this, index,\n this.linkedFilters, this.isExternalFlt);\n }\n slc.value = query;\n }\n //multiple selects\n else if(fltColType === this.fltTypeMulti){\n let values = Types.isArray(query) ? query :\n query.split(' '+this.orOperator+' ');\n\n if(this.loadFltOnDemand && !this.initialized){\n this.emitter.emit('build-select-filter', this, index,\n this.linkedFilters, this.isExternalFlt);\n }\n\n this.emitter.emit('select-options', this, index, values);\n }\n //checklist\n else if(fltColType === this.fltTypeCheckList){\n let values = [];\n if(this.loadFltOnDemand && !this.initialized){\n this.emitter.emit('build-checklist-filter', this, index,\n this.isExternalFlt);\n }\n if(Types.isArray(query)){\n values = query;\n } else {\n query = Str.matchCase(query, this.caseSensitive);\n values = query.split(' '+this.orOperator+' ');\n }\n\n this.emitter.emit('select-checklist-options', this, index, values);\n }\n }\n\n /**\n * Set them columns' widths as per configuration\n * @param {Element} tbl DOM element\n */\n setColWidths(tbl){\n if(!this.hasColWidths){\n return;\n }\n tbl = tbl || this.tbl;\n\n setWidths.call(this);\n\n function setWidths(){\n let nbCols = this.nbCells;\n let colWidths = this.colWidths;\n let colTags = Dom.tag(tbl, 'col');\n let tblHasColTag = colTags.length > 0;\n let frag = !tblHasColTag ? doc.createDocumentFragment() : null;\n for(let k=0; k<nbCols; k++){\n let col;\n if(tblHasColTag){\n col = colTags[k];\n } else {\n col = Dom.create('col', ['id', this.id+'_col_'+k]);\n frag.appendChild(col);\n }\n col.style.width = colWidths[k];\n }\n if(!tblHasColTag){\n tbl.insertBefore(frag, tbl.firstChild);\n }\n }\n }\n\n /**\n * Makes defined rows always visible\n */\n enforceVisibility(){\n if(!this.hasVisibleRows){\n return;\n }\n for(let i=0, len=this.visibleRows.length; i<len; i++){\n let row = this.visibleRows[i];\n //row index cannot be > nrows\n if(row <= this.nbRows){\n this.validateRow(row, true);\n }\n }\n }\n\n /**\n * Clear all the filters' values\n */\n clearFilters(){\n if(!this.fltGrid){\n return;\n }\n\n this.emitter.emit('before-clearing-filters', this);\n\n if(this.onBeforeReset){\n this.onBeforeReset.call(null, this, this.getFiltersValue());\n }\n for(let i=0, len=this.fltIds.length; i<len; i++){\n this.setFilterValue(i, '');\n }\n\n this.filter();\n\n if(this.onAfterReset){\n this.onAfterReset.call(null, this);\n }\n this.emitter.emit('after-clearing-filters', this);\n }\n\n /**\n * Clears filtered columns visual indicator (background color)\n */\n clearActiveColumns(){\n for(let i=0, len=this.getCellsNb(this.headersRow); i<len; i++){\n Dom.removeClass(\n this.getHeaderElement(i), this.activeColumnsCssClass);\n }\n }\n\n /**\n * Mark currently filtered column\n * @param {Number} colIndex Column index\n */\n markActiveColumn(colIndex){\n let header = this.getHeaderElement(colIndex);\n if(Dom.hasClass(header, this.activeColumnsCssClass)){\n return;\n }\n if(this.onBeforeActiveColumn){\n this.onBeforeActiveColumn.call(null, this, colIndex);\n }\n Dom.addClass(header, this.activeColumnsCssClass);\n if(this.onAfterActiveColumn){\n this.onAfterActiveColumn.call(null, this, colIndex);\n }\n }\n\n /**\n * Return the ID of the current active filter\n * @returns {String}\n */\n getActiveFilterId(){\n return this.activeFilterId;\n }\n\n /**\n * Set the ID of the current active filter\n * @param {String} filterId Element ID\n */\n setActiveFilterId(filterId){\n this.activeFilterId = filterId;\n }\n\n /**\n * Return the column index for a given filter ID\n * @param {string} [filterId=''] Filter ID\n * @returns {Number} Column index\n */\n getColumnIndexFromFilterId(filterId=''){\n let idx = filterId.split('_')[0];\n idx = idx.split(this.prfxFlt)[1];\n return parseInt(idx, 10);\n }\n\n /**\n * Make specified column's filter active\n * @param colIndex Index of a column\n */\n activateFilter(colIndex){\n if(Types.isUndef(colIndex)){\n return;\n }\n this.setActiveFilterId(this.getFilterId(colIndex));\n }\n\n /**\n * Refresh the filters subject to linking ('select', 'multiple',\n * 'checklist' type)\n */\n linkFilters(){\n if(!this.linkedFilters || !this.activeFilterId){\n return;\n }\n let slcA1 = this.getFiltersByType(this.fltTypeSlc, true),\n slcA2 = this.getFiltersByType(this.fltTypeMulti, true),\n slcA3 = this.getFiltersByType(this.fltTypeCheckList, true),\n slcIndex = slcA1.concat(slcA2);\n slcIndex = slcIndex.concat(slcA3);\n\n let activeIdx = this.getColumnIndexFromFilterId(this.activeFilterId);\n\n for(let i=0, len=slcIndex.length; i<len; i++){\n let curSlc = Dom.id(this.fltIds[slcIndex[i]]);\n let slcSelectedValue = this.getFilterValue(slcIndex[i]);\n\n // Welcome to cyclomatic complexity hell :)\n // TODO: simplify/refactor if statement\n if(activeIdx !== slcIndex[i] ||\n (this.paging && slcA1.indexOf(slcIndex[i]) != -1 &&\n activeIdx === slcIndex[i] ) ||\n (!this.paging && (slcA3.indexOf(slcIndex[i]) != -1 ||\n slcA2.indexOf(slcIndex[i]) != -1)) ||\n slcSelectedValue === this.displayAllText ){\n\n //1st option needs to be inserted\n if(this.loadFltOnDemand) {\n let opt0 = Dom.createOpt(this.displayAllText, '');\n curSlc.innerHTML = '';\n curSlc.appendChild(opt0);\n }\n\n if(slcA3.indexOf(slcIndex[i]) != -1){\n this.emitter.emit('build-checklist-filter', this,\n slcIndex[i]);\n } else {\n this.emitter.emit('build-select-filter', this, slcIndex[i],\n true);\n }\n\n this.setFilterValue(slcIndex[i], slcSelectedValue);\n }\n }// for i\n }\n\n /**\n * Determines if passed filter column implements exact query match\n * @param {Number} colIndex [description]\n * @return {Boolean} [description]\n */\n isExactMatch(colIndex){\n let fltType = this.getFilterType(colIndex);\n return this.exactMatchByCol[colIndex] || this.exactMatch ||\n (fltType !== this.fltTypeInp);\n }\n\n /**\n * Check if passed script or stylesheet is already imported\n * @param {String} filePath Ressource path\n * @param {String} type Possible values: 'script' or 'link'\n * @return {Boolean}\n */\n isImported(filePath, type){\n let imported = false,\n importType = !type ? 'script' : type,\n attr = importType == 'script' ? 'src' : 'href',\n files = Dom.tag(doc, importType);\n for (let i=0, len=files.length; i<len; i++){\n if(files[i][attr] === undefined){\n continue;\n }\n if(files[i][attr].match(filePath)){\n imported = true;\n break;\n }\n }\n return imported;\n }\n\n /**\n * Import script or stylesheet\n * @param {String} fileId Ressource ID\n * @param {String} filePath Ressource path\n * @param {Function} callback Callback\n * @param {String} type Possible values: 'script' or 'link'\n */\n import(fileId, filePath, callback, type){\n let ftype = !type ? 'script' : type,\n imported = this.isImported(filePath, ftype);\n if(imported){\n return;\n }\n let o = this,\n isLoaded = false,\n file,\n head = Dom.tag(doc, 'head')[0];\n\n if(Str.lower(ftype) === 'link'){\n file = Dom.create(\n 'link',\n ['id', fileId], ['type', 'text/css'],\n ['rel', 'stylesheet'], ['href', filePath]\n );\n } else {\n file = Dom.create(\n 'script', ['id', fileId],\n ['type', 'text/javascript'], ['src', filePath]\n );\n }\n\n //Browser <> IE onload event works only for scripts, not for stylesheets\n file.onload = file.onreadystatechange = function(){\n if(!isLoaded &&\n (!this.readyState || this.readyState === 'loaded' ||\n this.readyState === 'complete')){\n isLoaded = true;\n if(typeof callback === 'function'){\n callback.call(null, o);\n }\n }\n };\n file.onerror = function(){\n throw new Error('TF script could not load: ' + filePath);\n };\n head.appendChild(file);\n }\n\n /**\n * Check if table has filters grid\n * @return {Boolean}\n */\n hasGrid(){\n return this._hasGrid;\n }\n\n /**\n * Get list of filter IDs\n * @return {[type]} [description]\n */\n getFiltersId(){\n return this.fltIds || [];\n }\n\n /**\n * Get filtered (valid) rows indexes\n * @param {Boolean} reCalc Force calculation of filtered rows list\n * @return {Array} List of row indexes\n */\n getValidRows(reCalc){\n if(!reCalc){\n return this.validRowsIndex;\n }\n\n this.validRowsIndex = [];\n for(let k=this.refRow; k<this.getRowsNb(true); k++){\n let r = this.tbl.rows[k];\n if(!this.paging){\n if(this.getRowDisplay(r) !== 'none'){\n this.validRowsIndex.push(r.rowIndex);\n }\n } else {\n if(r.getAttribute('validRow') === 'true' ||\n r.getAttribute('validRow') === null){\n this.validRowsIndex.push(r.rowIndex);\n }\n }\n }\n return this.validRowsIndex;\n }\n\n /**\n * Get the index of the row containing the filters\n * @return {Number}\n */\n getFiltersRowIndex(){\n return this.filtersRowIndex;\n }\n\n /**\n * Get the index of the headers row\n * @return {Number}\n */\n getHeadersRowIndex(){\n return this.headersRow;\n }\n\n /**\n * Get the row index from where the filtering process start (1st filterable\n * row)\n * @return {Number}\n */\n getStartRowIndex(){\n return this.refRow;\n }\n\n /**\n * Get the index of the last row\n * @return {Number}\n */\n getLastRowIndex(){\n return (this.nbRows-1);\n }\n\n /**\n * Get the header DOM element for a given column index\n * @param {Number} colIndex Column index\n * @return {Element}\n */\n getHeaderElement(colIndex){\n let table = this.gridLayout ? this.Mod.gridLayout.headTbl : this.tbl;\n let tHead = Dom.tag(table, 'thead');\n let headersRow = this.headersRow;\n let header;\n for(let i=0; i<this.nbCells; i++){\n if(i !== colIndex){\n continue;\n }\n if(tHead.length === 0){\n header = table.rows[headersRow].cells[i];\n }\n if(tHead.length === 1){\n header = tHead[0].rows[headersRow].cells[i];\n }\n break;\n }\n return header;\n }\n\n /**\n * Return the list of headers' text\n * @param {Boolean} excludeHiddenCols Optional: exclude hidden columns\n * @return {Array} list of headers' text\n */\n getHeadersText(excludeHiddenCols=false){\n let headers = [];\n for(let j=0; j<this.nbCells; j++){\n if(excludeHiddenCols && this.hasExtension('colsVisibility')){\n if(this.extension('colsVisibility').isColHidden(j)){\n continue;\n }\n }\n let header = this.getHeaderElement(j);\n let headerText = Dom.getFirstTextNode(header);\n headers.push(headerText);\n }\n return headers;\n }\n\n /**\n * Return the filter type for a specified column\n * @param {Number} colIndex Column's index\n * @return {String}\n */\n getFilterType(colIndex){\n let colType = this.cfg['col_'+colIndex];\n return !colType ? this.fltTypeInp : Str.lower(colType);\n }\n\n /**\n * Get the total number of filterable rows\n * @return {Number}\n */\n getFilterableRowsNb(){\n return this.getRowsNb(false);\n }\n\n /**\n * Get the configuration object (literal object)\n * @return {Object}\n */\n config(){\n return this.cfg;\n }\n}\n"
},
{
"__docId__": 729,
"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": 26,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 730,
"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": 29,
"undocument": true,
"interface": false
},
{
"__docId__": 731,
"kind": "constructor",
"static": false,
"variation": null,
"name": "constructor",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#constructor",
"access": null,
"description": "TableFilter object constructor\nrequires `table` or `id` arguments, `row` and `configuration` optional",
"lineNumber": 39,
"params": [
{
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"optional": false,
"name": "table",
"description": "Table DOM element"
},
{
"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"
}
],
"generator": false
},
{
"__docId__": 732,
"kind": "member",
"static": false,
"variation": null,
"name": "id",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#id",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 733,
"kind": "member",
"static": false,
"variation": null,
"name": "version",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#version",
"access": null,
"description": null,
"lineNumber": 43,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 734,
"kind": "member",
"static": false,
"variation": null,
"name": "year",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#year",
"access": null,
"description": null,
"lineNumber": 44,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 735,
"kind": "member",
"static": false,
"variation": null,
"name": "tbl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#tbl",
"access": null,
"description": null,
"lineNumber": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 736,
"kind": "member",
"static": false,
"variation": null,
"name": "startRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#startRow",
"access": null,
"description": null,
"lineNumber": 46,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 737,
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 47,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 738,
"kind": "member",
"static": false,
"variation": null,
"name": "headersRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#headersRow",
"access": null,
"description": null,
"lineNumber": 48,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 739,
"kind": "member",
"static": false,
"variation": null,
"name": "cfg",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#cfg",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 740,
"kind": "member",
"static": false,
"variation": null,
"name": "nbFilterableRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
"lineNumber": 50,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 741,
"kind": "member",
"static": false,
"variation": null,
"name": "nbRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbRows",
"access": null,
"description": null,
"lineNumber": 51,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 742,
"kind": "member",
"static": false,
"variation": null,
"name": "nbCells",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbCells",
"access": null,
"description": null,
"lineNumber": 52,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 743,
"kind": "member",
"static": false,
"variation": null,
"name": "_hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_hasGrid",
"access": null,
"description": null,
"lineNumber": 53,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 744,
"kind": "member",
"static": false,
"variation": null,
"name": "tbl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#tbl",
"access": null,
"description": null,
"lineNumber": 60,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 745,
"kind": "member",
"static": false,
"variation": null,
"name": "id",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#id",
"access": null,
"description": null,
"lineNumber": 61,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 746,
"kind": "member",
"static": false,
"variation": null,
"name": "id",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#id",
"access": null,
"description": null,
"lineNumber": 63,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 747,
"kind": "member",
"static": false,
"variation": null,
"name": "tbl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#tbl",
"access": null,
"description": null,
"lineNumber": 64,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 748,
"kind": "member",
"static": false,
"variation": null,
"name": "startRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#startRow",
"access": null,
"description": null,
"lineNumber": 66,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 749,
"kind": "member",
"static": false,
"variation": null,
"name": "cfg",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#cfg",
"access": null,
"description": null,
"lineNumber": 68,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 750,
"kind": "member",
"static": false,
"variation": null,
"name": "emitter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#emitter",
"access": null,
"description": null,
"lineNumber": 81,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 751,
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 84,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 752,
"kind": "member",
"static": false,
"variation": null,
"name": "nbCells",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbCells",
"access": null,
"description": null,
"lineNumber": 85,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 753,
"kind": "member",
"static": false,
"variation": null,
"name": "nbCells",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbCells",
"access": null,
"description": null,
"lineNumber": 86,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 754,
"kind": "member",
"static": false,
"variation": null,
"name": "basePath",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#basePath",
"access": null,
"description": null,
"lineNumber": 89,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 755,
"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": 92,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 756,
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeSlc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeSlc",
"access": null,
"description": null,
"lineNumber": 93,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 757,
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeMulti",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeMulti",
"access": null,
"description": null,
"lineNumber": 94,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 758,
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeCheckList",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeCheckList",
"access": null,
"description": null,
"lineNumber": 95,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 759,
"kind": "member",
"static": false,
"variation": null,
"name": "fltTypeNone",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltTypeNone",
"access": null,
"description": null,
"lineNumber": 96,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 760,
"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": 101,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 761,
"kind": "member",
"static": false,
"variation": null,
"name": "gridLayout",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#gridLayout",
"access": null,
"description": null,
"lineNumber": 104,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 762,
"kind": "member",
"static": false,
"variation": null,
"name": "filtersRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#filtersRowIndex",
"access": null,
"description": null,
"lineNumber": 106,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 763,
"kind": "member",
"static": false,
"variation": null,
"name": "headersRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#headersRow",
"access": null,
"description": null,
"lineNumber": 108,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 764,
"kind": "member",
"static": false,
"variation": null,
"name": "fltCellTag",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltCellTag",
"access": null,
"description": null,
"lineNumber": 112,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 765,
"kind": "member",
"static": false,
"variation": null,
"name": "fltIds",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltIds",
"access": null,
"description": null,
"lineNumber": 116,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 766,
"kind": "member",
"static": false,
"variation": null,
"name": "fltElms",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltElms",
"access": null,
"description": null,
"lineNumber": 118,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 767,
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 120,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 768,
"kind": "member",
"static": false,
"variation": null,
"name": "fltGridEl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltGridEl",
"access": null,
"description": null,
"lineNumber": 122,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 769,
"kind": "member",
"static": false,
"variation": null,
"name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
"lineNumber": 124,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 770,
"kind": "member",
"static": false,
"variation": null,
"name": "lDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lDiv",
"access": null,
"description": null,
"lineNumber": 126,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 771,
"kind": "member",
"static": false,
"variation": null,
"name": "rDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rDiv",
"access": null,
"description": null,
"lineNumber": 128,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 772,
"kind": "member",
"static": false,
"variation": null,
"name": "mDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#mDiv",
"access": null,
"description": null,
"lineNumber": 130,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 773,
"kind": "member",
"static": false,
"variation": null,
"name": "infDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDivCssClass",
"access": null,
"description": null,
"lineNumber": 133,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 774,
"kind": "member",
"static": false,
"variation": null,
"name": "lDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lDivCssClass",
"access": null,
"description": null,
"lineNumber": 135,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 775,
"kind": "member",
"static": false,
"variation": null,
"name": "rDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rDivCssClass",
"access": null,
"description": null,
"lineNumber": 137,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 776,
"kind": "member",
"static": false,
"variation": null,
"name": "mDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#mDivCssClass",
"access": null,
"description": null,
"lineNumber": 139,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 777,
"kind": "member",
"static": false,
"variation": null,
"name": "contDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#contDivCssClass",
"access": null,
"description": null,
"lineNumber": 141,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 778,
"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": 145,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 779,
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheet",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#stylesheet",
"access": null,
"description": null,
"lineNumber": 146,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 780,
"kind": "member",
"static": false,
"variation": null,
"name": "stylesheetId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#stylesheetId",
"access": null,
"description": null,
"lineNumber": 147,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 781,
"kind": "member",
"static": false,
"variation": null,
"name": "fltsRowCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltsRowCssClass",
"access": null,
"description": null,
"lineNumber": 149,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 782,
"kind": "member",
"static": false,
"variation": null,
"name": "enableIcons",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableIcons",
"access": null,
"description": null,
"lineNumber": 151,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 783,
"kind": "member",
"static": false,
"variation": null,
"name": "alternateRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#alternateRows",
"access": null,
"description": null,
"lineNumber": 153,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 784,
"kind": "member",
"static": false,
"variation": null,
"name": "hasColWidths",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasColWidths",
"access": null,
"description": null,
"lineNumber": 155,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 785,
"kind": "member",
"static": false,
"variation": null,
"name": "colWidths",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#colWidths",
"access": null,
"description": null,
"lineNumber": 156,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 786,
"kind": "member",
"static": false,
"variation": null,
"name": "fltCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltCssClass",
"access": null,
"description": null,
"lineNumber": 158,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 787,
"kind": "member",
"static": false,
"variation": null,
"name": "fltMultiCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltMultiCssClass",
"access": null,
"description": null,
"lineNumber": 160,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 788,
"kind": "member",
"static": false,
"variation": null,
"name": "fltSmallCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltSmallCssClass",
"access": null,
"description": null,
"lineNumber": 162,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 789,
"kind": "member",
"static": false,
"variation": null,
"name": "singleFltCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#singleFltCssClass",
"access": null,
"description": null,
"lineNumber": 164,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 790,
"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": 168,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 791,
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onBeforeFilter",
"access": null,
"description": null,
"lineNumber": 170,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 792,
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onAfterFilter",
"access": null,
"description": null,
"lineNumber": 173,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 793,
"kind": "member",
"static": false,
"variation": null,
"name": "caseSensitive",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#caseSensitive",
"access": null,
"description": null,
"lineNumber": 176,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 794,
"kind": "member",
"static": false,
"variation": null,
"name": "hasExactMatchByCol",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasExactMatchByCol",
"access": null,
"description": null,
"lineNumber": 178,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 795,
"kind": "member",
"static": false,
"variation": null,
"name": "exactMatchByCol",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#exactMatchByCol",
"access": null,
"description": null,
"lineNumber": 179,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 796,
"kind": "member",
"static": false,
"variation": null,
"name": "exactMatch",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#exactMatch",
"access": null,
"description": null,
"lineNumber": 182,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 797,
"kind": "member",
"static": false,
"variation": null,
"name": "linkedFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#linkedFilters",
"access": null,
"description": null,
"lineNumber": 184,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 798,
"kind": "member",
"static": false,
"variation": null,
"name": "disableExcludedOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#disableExcludedOptions",
"access": null,
"description": null,
"lineNumber": 186,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 799,
"kind": "member",
"static": false,
"variation": null,
"name": "activeFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
"lineNumber": 188,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 800,
"kind": "member",
"static": false,
"variation": null,
"name": "hasVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasVisibleRows",
"access": null,
"description": null,
"lineNumber": 190,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 801,
"kind": "member",
"static": false,
"variation": null,
"name": "visibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#visibleRows",
"access": null,
"description": null,
"lineNumber": 192,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 802,
"kind": "member",
"static": false,
"variation": null,
"name": "isExternalFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isExternalFlt",
"access": null,
"description": null,
"lineNumber": 194,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 803,
"kind": "member",
"static": false,
"variation": null,
"name": "externalFltTgtIds",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#externalFltTgtIds",
"access": null,
"description": null,
"lineNumber": 196,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 804,
"kind": "member",
"static": false,
"variation": null,
"name": "externalFltEls",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#externalFltEls",
"access": null,
"description": null,
"lineNumber": 198,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 805,
"kind": "member",
"static": false,
"variation": null,
"name": "execDelay",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#execDelay",
"access": null,
"description": null,
"lineNumber": 200,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 806,
"kind": "member",
"static": false,
"variation": null,
"name": "onFiltersLoaded",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onFiltersLoaded",
"access": null,
"description": null,
"lineNumber": 202,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 807,
"kind": "member",
"static": false,
"variation": null,
"name": "singleSearchFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#singleSearchFlt",
"access": null,
"description": null,
"lineNumber": 205,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 808,
"kind": "member",
"static": false,
"variation": null,
"name": "onRowValidated",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onRowValidated",
"access": null,
"description": null,
"lineNumber": 207,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 809,
"kind": "member",
"static": false,
"variation": null,
"name": "customCellDataCols",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#customCellDataCols",
"access": null,
"description": null,
"lineNumber": 210,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 810,
"kind": "member",
"static": false,
"variation": null,
"name": "customCellData",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#customCellData",
"access": null,
"description": null,
"lineNumber": 213,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 811,
"kind": "member",
"static": false,
"variation": null,
"name": "watermark",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#watermark",
"access": null,
"description": null,
"lineNumber": 216,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 812,
"kind": "member",
"static": false,
"variation": null,
"name": "isWatermarkArray",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isWatermarkArray",
"access": null,
"description": null,
"lineNumber": 217,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 813,
"kind": "member",
"static": false,
"variation": null,
"name": "toolBarTgtId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#toolBarTgtId",
"access": null,
"description": null,
"lineNumber": 219,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 814,
"kind": "member",
"static": false,
"variation": null,
"name": "help",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#help",
"access": null,
"description": null,
"lineNumber": 221,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 815,
"kind": "member",
"static": false,
"variation": null,
"name": "popupFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#popupFilters",
"access": null,
"description": null,
"lineNumber": 224,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 816,
"kind": "member",
"static": false,
"variation": null,
"name": "markActiveColumns",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#markActiveColumns",
"access": null,
"description": null,
"lineNumber": 226,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 817,
"kind": "member",
"static": false,
"variation": null,
"name": "activeColumnsCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeColumnsCssClass",
"access": null,
"description": null,
"lineNumber": 228,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 818,
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeActiveColumn",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onBeforeActiveColumn",
"access": null,
"description": null,
"lineNumber": 231,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 819,
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterActiveColumn",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onAfterActiveColumn",
"access": null,
"description": null,
"lineNumber": 234,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 820,
"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": 239,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 821,
"kind": "member",
"static": false,
"variation": null,
"name": "enableEmptyOption",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableEmptyOption",
"access": null,
"description": null,
"lineNumber": 241,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 822,
"kind": "member",
"static": false,
"variation": null,
"name": "emptyText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#emptyText",
"access": null,
"description": null,
"lineNumber": 243,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 823,
"kind": "member",
"static": false,
"variation": null,
"name": "enableNonEmptyOption",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableNonEmptyOption",
"access": null,
"description": null,
"lineNumber": 245,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 824,
"kind": "member",
"static": false,
"variation": null,
"name": "nonEmptyText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nonEmptyText",
"access": null,
"description": null,
"lineNumber": 247,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 825,
"kind": "member",
"static": false,
"variation": null,
"name": "onSlcChange",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onSlcChange",
"access": null,
"description": null,
"lineNumber": 249,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 826,
"kind": "member",
"static": false,
"variation": null,
"name": "sortSlc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sortSlc",
"access": null,
"description": null,
"lineNumber": 251,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 827,
"kind": "member",
"static": false,
"variation": null,
"name": "isSortNumAsc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isSortNumAsc",
"access": null,
"description": null,
"lineNumber": 253,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 828,
"kind": "member",
"static": false,
"variation": null,
"name": "sortNumAsc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sortNumAsc",
"access": null,
"description": null,
"lineNumber": 254,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 829,
"kind": "member",
"static": false,
"variation": null,
"name": "isSortNumDesc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isSortNumDesc",
"access": null,
"description": null,
"lineNumber": 256,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 830,
"kind": "member",
"static": false,
"variation": null,
"name": "sortNumDesc",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#sortNumDesc",
"access": null,
"description": null,
"lineNumber": 257,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 831,
"kind": "member",
"static": false,
"variation": null,
"name": "loadFltOnDemand",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loadFltOnDemand",
"access": null,
"description": null,
"lineNumber": 259,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 832,
"kind": "member",
"static": false,
"variation": null,
"name": "hasCustomOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasCustomOptions",
"access": null,
"description": null,
"lineNumber": 260,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 833,
"kind": "member",
"static": false,
"variation": null,
"name": "customOptions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#customOptions",
"access": null,
"description": null,
"lineNumber": 261,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 834,
"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": 264,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 835,
"kind": "member",
"static": false,
"variation": null,
"name": "emOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#emOperator",
"access": null,
"description": null,
"lineNumber": 265,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 836,
"kind": "member",
"static": false,
"variation": null,
"name": "nmOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nmOperator",
"access": null,
"description": null,
"lineNumber": 266,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 837,
"kind": "member",
"static": false,
"variation": null,
"name": "orOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#orOperator",
"access": null,
"description": null,
"lineNumber": 267,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 838,
"kind": "member",
"static": false,
"variation": null,
"name": "anOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#anOperator",
"access": null,
"description": null,
"lineNumber": 268,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 839,
"kind": "member",
"static": false,
"variation": null,
"name": "grOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#grOperator",
"access": null,
"description": null,
"lineNumber": 269,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 840,
"kind": "member",
"static": false,
"variation": null,
"name": "lwOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lwOperator",
"access": null,
"description": null,
"lineNumber": 270,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 841,
"kind": "member",
"static": false,
"variation": null,
"name": "leOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#leOperator",
"access": null,
"description": null,
"lineNumber": 271,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 842,
"kind": "member",
"static": false,
"variation": null,
"name": "geOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#geOperator",
"access": null,
"description": null,
"lineNumber": 272,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 843,
"kind": "member",
"static": false,
"variation": null,
"name": "dfOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#dfOperator",
"access": null,
"description": null,
"lineNumber": 273,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 844,
"kind": "member",
"static": false,
"variation": null,
"name": "lkOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lkOperator",
"access": null,
"description": null,
"lineNumber": 274,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 845,
"kind": "member",
"static": false,
"variation": null,
"name": "eqOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#eqOperator",
"access": null,
"description": null,
"lineNumber": 275,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 846,
"kind": "member",
"static": false,
"variation": null,
"name": "stOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#stOperator",
"access": null,
"description": null,
"lineNumber": 276,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 847,
"kind": "member",
"static": false,
"variation": null,
"name": "enOperator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enOperator",
"access": null,
"description": null,
"lineNumber": 277,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 848,
"kind": "member",
"static": false,
"variation": null,
"name": "curExp",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#curExp",
"access": null,
"description": null,
"lineNumber": 278,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 849,
"kind": "member",
"static": false,
"variation": null,
"name": "separator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#separator",
"access": null,
"description": null,
"lineNumber": 279,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 850,
"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": 283,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 851,
"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": 287,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 852,
"kind": "member",
"static": false,
"variation": null,
"name": "loader",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loader",
"access": null,
"description": "loader **",
"lineNumber": 291,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 853,
"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": 295,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 854,
"kind": "member",
"static": false,
"variation": null,
"name": "btnText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnText",
"access": null,
"description": null,
"lineNumber": 297,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 855,
"kind": "member",
"static": false,
"variation": null,
"name": "btnCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnCssClass",
"access": null,
"description": null,
"lineNumber": 299,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 856,
"kind": "member",
"static": false,
"variation": null,
"name": "btnReset",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnReset",
"access": null,
"description": null,
"lineNumber": 302,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 857,
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetCssClass",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnResetCssClass",
"access": null,
"description": null,
"lineNumber": 304,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 858,
"kind": "member",
"static": false,
"variation": null,
"name": "onBeforeReset",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onBeforeReset",
"access": null,
"description": null,
"lineNumber": 306,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 859,
"kind": "member",
"static": false,
"variation": null,
"name": "onAfterReset",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#onAfterReset",
"access": null,
"description": null,
"lineNumber": 309,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 860,
"kind": "member",
"static": false,
"variation": null,
"name": "paging",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#paging",
"access": null,
"description": "paging **",
"lineNumber": 314,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 861,
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 315,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 862,
"kind": "member",
"static": false,
"variation": null,
"name": "nbHiddenRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
"access": null,
"description": null,
"lineNumber": 316,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 863,
"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": 321,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 864,
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterDelay",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterDelay",
"access": null,
"description": null,
"lineNumber": 323,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 865,
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 326,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 866,
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 327,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 867,
"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": 331,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 868,
"kind": "member",
"static": false,
"variation": null,
"name": "noResults",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#noResults",
"access": null,
"description": "No results feature **",
"lineNumber": 334,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 869,
"kind": "member",
"static": false,
"variation": null,
"name": "state",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#state",
"access": null,
"description": null,
"lineNumber": 338,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 870,
"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": 342,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 871,
"kind": "member",
"static": false,
"variation": null,
"name": "thousandsSeparator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#thousandsSeparator",
"access": null,
"description": null,
"lineNumber": 345,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 872,
"kind": "member",
"static": false,
"variation": null,
"name": "decimalSeparator",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#decimalSeparator",
"access": null,
"description": null,
"lineNumber": 348,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 873,
"kind": "member",
"static": false,
"variation": null,
"name": "hasColNbFormat",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasColNbFormat",
"access": null,
"description": null,
"lineNumber": 350,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 874,
"kind": "member",
"static": false,
"variation": null,
"name": "colNbFormat",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#colNbFormat",
"access": null,
"description": null,
"lineNumber": 352,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 875,
"kind": "member",
"static": false,
"variation": null,
"name": "hasColDateType",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasColDateType",
"access": null,
"description": null,
"lineNumber": 354,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 876,
"kind": "member",
"static": false,
"variation": null,
"name": "colDateType",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#colDateType",
"access": null,
"description": null,
"lineNumber": 356,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 877,
"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": 360,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 878,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxFlt",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxFlt",
"access": null,
"description": null,
"lineNumber": 362,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 879,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxValButton",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxValButton",
"access": null,
"description": null,
"lineNumber": 364,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 880,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxInfDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxInfDiv",
"access": null,
"description": null,
"lineNumber": 366,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 881,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxLDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxLDiv",
"access": null,
"description": null,
"lineNumber": 368,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 882,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxRDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxRDiv",
"access": null,
"description": null,
"lineNumber": 370,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 883,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxMDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxMDiv",
"access": null,
"description": null,
"lineNumber": 372,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 884,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCookieFltsValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxCookieFltsValues",
"access": null,
"description": null,
"lineNumber": 374,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 885,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCookiePageNb",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxCookiePageNb",
"access": null,
"description": null,
"lineNumber": 376,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 886,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxCookiePageLen",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxCookiePageLen",
"access": null,
"description": null,
"lineNumber": 378,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 887,
"kind": "member",
"static": false,
"variation": null,
"name": "prfxResponsive",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#prfxResponsive",
"access": null,
"description": null,
"lineNumber": 379,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 888,
"kind": "member",
"static": false,
"variation": null,
"name": "rememberGridValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rememberGridValues",
"access": null,
"description": "cookies **",
"lineNumber": 383,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 889,
"kind": "member",
"static": false,
"variation": null,
"name": "rememberPageNb",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rememberPageNb",
"access": null,
"description": null,
"lineNumber": 385,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 890,
"kind": "member",
"static": false,
"variation": null,
"name": "rememberPageLen",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rememberPageLen",
"access": null,
"description": null,
"lineNumber": 387,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 891,
"kind": "member",
"static": false,
"variation": null,
"name": "hasPersistence",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasPersistence",
"access": null,
"description": null,
"lineNumber": 388,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 892,
"kind": "member",
"static": false,
"variation": null,
"name": "extensions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#extensions",
"access": null,
"description": "extensions **",
"lineNumber": 393,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 893,
"kind": "member",
"static": false,
"variation": null,
"name": "hasExtensions",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasExtensions",
"access": null,
"description": null,
"lineNumber": 394,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 894,
"kind": "member",
"static": false,
"variation": null,
"name": "enableDefaultTheme",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#enableDefaultTheme",
"access": null,
"description": "themes **",
"lineNumber": 397,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 895,
"kind": "member",
"static": false,
"variation": null,
"name": "hasThemes",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#hasThemes",
"access": null,
"description": null,
"lineNumber": 399,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 896,
"kind": "member",
"static": false,
"variation": null,
"name": "themes",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#themes",
"access": null,
"description": null,
"lineNumber": 400,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 897,
"kind": "member",
"static": false,
"variation": null,
"name": "themesPath",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#themesPath",
"access": null,
"description": null,
"lineNumber": 402,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 898,
"kind": "member",
"static": false,
"variation": null,
"name": "responsive",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#responsive",
"access": null,
"description": null,
"lineNumber": 405,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 899,
"kind": "member",
"static": false,
"variation": null,
"name": "Mod",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#Mod",
"access": null,
"description": null,
"lineNumber": 408,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 900,
"kind": "member",
"static": false,
"variation": null,
"name": "ExtRegistry",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#ExtRegistry",
"access": null,
"description": null,
"lineNumber": 411,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 901,
"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": 414,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 902,
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 425,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 903,
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 427,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 904,
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 437,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 905,
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 441,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 906,
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 444,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 907,
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 450,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 908,
"kind": "member",
"static": false,
"variation": null,
"name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
"lineNumber": 455,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 909,
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 461,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 910,
"kind": "member",
"static": false,
"variation": null,
"name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
"lineNumber": 466,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 911,
"kind": "method",
"static": false,
"variation": null,
"name": "init",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#init",
"access": null,
"description": "Initialise features and layout",
"lineNumber": 482,
"params": [],
"generator": false
},
{
"__docId__": 912,
"kind": "member",
"static": false,
"variation": null,
"name": "nbFilterableRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
"lineNumber": 553,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 913,
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 554,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 914,
"kind": "member",
"static": false,
"variation": null,
"name": "nbRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbRows",
"access": null,
"description": null,
"lineNumber": 555,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 915,
"kind": "member",
"static": false,
"variation": null,
"name": "_hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_hasGrid",
"access": null,
"description": null,
"lineNumber": 649,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 916,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#initialized",
"access": null,
"description": null,
"lineNumber": 683,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 917,
"kind": "method",
"static": false,
"variation": null,
"name": "_insertFiltersRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_insertFiltersRow",
"access": null,
"description": "Insert filters row at initialization",
"lineNumber": 690,
"params": [],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 918,
"kind": "method",
"static": false,
"variation": null,
"name": "_initNoFilters",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_initNoFilters",
"access": null,
"description": "Initialize filtersless table",
"lineNumber": 716,
"params": [],
"generator": false
},
{
"__docId__": 919,
"kind": "member",
"static": false,
"variation": null,
"name": "refRow",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
"lineNumber": 720,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 920,
"kind": "member",
"static": false,
"variation": null,
"name": "nbFilterableRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
"lineNumber": 721,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 921,
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 722,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 922,
"kind": "member",
"static": false,
"variation": null,
"name": "nbRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbRows",
"access": null,
"description": null,
"lineNumber": 723,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 923,
"kind": "method",
"static": false,
"variation": null,
"name": "_buildInputFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_buildInputFilter",
"access": null,
"description": "Build input filter type",
"lineNumber": 732,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "cssClass",
"description": "Css class applied to filter"
},
{
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"optional": false,
"name": "container",
"description": "Container DOM element"
}
],
"generator": false
},
{
"__docId__": 924,
"kind": "method",
"static": false,
"variation": null,
"name": "_buildSubmitButton",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_buildSubmitButton",
"access": null,
"description": "Build submit button",
"lineNumber": 771,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"optional": false,
"name": "container",
"description": "Container DOM element"
}
],
"generator": false
},
{
"__docId__": 925,
"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": 794,
"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
},
{
"__docId__": 926,
"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": 801,
"params": [],
"generator": false
},
{
"__docId__": 927,
"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": 820,
"params": [
{
"nullable": null,
"types": [
"Object"
],
"spread": false,
"optional": false,
"name": "ext",
"description": "Extension config object"
}
],
"generator": false
},
{
"__docId__": 928,
"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": 851,
"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
},
{
"__docId__": 929,
"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": 860,
"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
},
{
"__docId__": 930,
"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": 867,
"params": [],
"generator": false
},
{
"__docId__": 931,
"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": 883,
"params": [],
"generator": false
},
{
"__docId__": 932,
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnResetText",
"access": null,
"description": null,
"lineNumber": 913,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 933,
"kind": "member",
"static": false,
"variation": null,
"name": "btnResetHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnResetHtml",
"access": null,
"description": null,
"lineNumber": 914,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 934,
"kind": "member",
"static": false,
"variation": null,
"name": "btnPrevPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnPrevPageHtml",
"access": null,
"description": null,
"lineNumber": 918,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 935,
"kind": "member",
"static": false,
"variation": null,
"name": "btnNextPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnNextPageHtml",
"access": null,
"description": null,
"lineNumber": 920,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 936,
"kind": "member",
"static": false,
"variation": null,
"name": "btnFirstPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnFirstPageHtml",
"access": null,
"description": null,
"lineNumber": 922,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 937,
"kind": "member",
"static": false,
"variation": null,
"name": "btnLastPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#btnLastPageHtml",
"access": null,
"description": null,
"lineNumber": 924,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 938,
"kind": "member",
"static": false,
"variation": null,
"name": "loader",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loader",
"access": null,
"description": null,
"lineNumber": 928,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 939,
"kind": "member",
"static": false,
"variation": null,
"name": "loaderHtml",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loaderHtml",
"access": null,
"description": null,
"lineNumber": 929,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 940,
"kind": "member",
"static": false,
"variation": null,
"name": "loaderText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loaderText",
"access": null,
"description": null,
"lineNumber": 930,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 941,
"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": 939,
"params": [
{
"name": "name",
"optional": true,
"types": [
"string"
],
"defaultRaw": "default",
"defaultValue": "default"
}
],
"return": {
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"description": "stylesheet element"
},
"generator": false
},
{
"__docId__": 942,
"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": 946,
"params": [],
"generator": false
},
{
"__docId__": 943,
"kind": "member",
"static": false,
"variation": null,
"name": "fltGridEl",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltGridEl",
"access": null,
"description": null,
"lineNumber": 973,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 944,
"kind": "member",
"static": false,
"variation": null,
"name": "nbHiddenRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
"access": null,
"description": null,
"lineNumber": 1002,
"undocument": true,
"type": {
"types": [
"number"
]
}
},
{
"__docId__": 945,
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 1003,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 946,
"kind": "member",
"static": false,
"variation": null,
"name": "fltIds",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#fltIds",
"access": null,
"description": null,
"lineNumber": 1004,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 947,
"kind": "member",
"static": false,
"variation": null,
"name": "_hasGrid",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#_hasGrid",
"access": null,
"description": null,
"lineNumber": 1005,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 948,
"kind": "member",
"static": false,
"variation": null,
"name": "initialized",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#initialized",
"access": null,
"description": null,
"lineNumber": 1006,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 949,
"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": 1012,
"params": [],
"generator": false
},
{
"__docId__": 950,
"kind": "member",
"static": false,
"variation": null,
"name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
"lineNumber": 1037,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 951,
"kind": "member",
"static": false,
"variation": null,
"name": "lDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#lDiv",
"access": null,
"description": null,
"lineNumber": 1043,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 952,
"kind": "member",
"static": false,
"variation": null,
"name": "rDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#rDiv",
"access": null,
"description": null,
"lineNumber": 1050,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 953,
"kind": "member",
"static": false,
"variation": null,
"name": "mDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#mDiv",
"access": null,
"description": null,
"lineNumber": 1056,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 954,
"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": 1070,
"params": [],
"generator": false
},
{
"__docId__": 955,
"kind": "member",
"static": false,
"variation": null,
"name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
"lineNumber": 1075,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 956,
"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": 1087,
"params": [],
"generator": false
},
{
"__docId__": 957,
"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": 1107,
"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
},
{
"__docId__": 958,
"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": 1118,
"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
},
{
"__docId__": 959,
"kind": "method",
"static": false,
"variation": null,
"name": "resetFilterValues",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#resetFilterValues",
"access": null,
"description": "Reset persisted filter values",
"lineNumber": 1149,
"params": [],
"generator": false
},
{
"__docId__": 960,
"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.",
"lineNumber": 1168,
"params": [],
"generator": false
},
{
"__docId__": 961,
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 1181,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 962,
"kind": "member",
"static": false,
"variation": null,
"name": "nbVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbVisibleRows",
"access": null,
"description": null,
"lineNumber": 1504,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 963,
"kind": "member",
"static": false,
"variation": null,
"name": "nbHiddenRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
"access": null,
"description": null,
"lineNumber": 1505,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 964,
"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 column",
"lineNumber": 1523,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "includeHeaders",
"description": "Optional: include headers row"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "num",
"description": "Optional: return unformatted number"
},
{
"nullable": null,
"types": [
"Array"
],
"spread": false,
"optional": false,
"name": "exclude",
"description": "Optional: list of row indexes to be excluded"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "Flat list of data for a column"
},
"generator": false
},
{
"__docId__": 965,
"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": 1568,
"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
},
{
"__docId__": 966,
"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": 1620,
"params": [],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "List of filters' values"
},
"generator": false
},
{
"__docId__": 967,
"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 a specified column's filter",
"lineNumber": 1641,
"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
},
{
"__docId__": 968,
"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": 1657,
"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
},
{
"__docId__": 969,
"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": 1677,
"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
},
{
"__docId__": 970,
"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": 1687,
"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
},
{
"__docId__": 971,
"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": 1698,
"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
},
{
"__docId__": 972,
"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": 1710,
"params": [
{
"nullable": null,
"types": [
"DOMElement"
],
"spread": false,
"optional": false,
"name": "cell",
"description": "Cell's DOM object"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 973,
"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": 1732,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "includeHeaders",
"description": "Optional: include headers row"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "excludeHiddenCols",
"description": "Optional: exclude hidden columns"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "TODO: provide an API returning data in JSON format"
},
"generator": false
},
{
"__docId__": 974,
"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": 1768,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "includeHeaders",
"description": "Optional: include headers row"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "excludeHiddenCols",
"description": "Optional: exclude hidden columns"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "TODO: provide an API returning data in JSON format"
},
"generator": false
},
{
"__docId__": 975,
"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": 1805,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Colmun's index"
},
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "includeHeaders",
"description": "Optional: include headers row"
}
],
"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
},
{
"__docId__": 976,
"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": 1830,
"params": [
{
"nullable": null,
"types": [
"RowElement"
],
"spread": false,
"optional": false,
"name": "row",
"description": "DOM element of the row"
}
],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": "Usually 'none' or ''"
},
"generator": false
},
{
"__docId__": 977,
"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": 1842,
"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
},
{
"__docId__": 978,
"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": 1877,
"params": [],
"generator": false
},
{
"__docId__": 979,
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 1881,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 980,
"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": 1892,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "index",
"description": "Column's index"
},
{
"nullable": null,
"types": [
"String or Array"
],
"spread": false,
"optional": false,
"name": "query",
"description": "searcharg Search term"
}
],
"generator": false
},
{
"__docId__": 981,
"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": 1941,
"params": [
{
"nullable": null,
"types": [
"Element"
],
"spread": false,
"optional": false,
"name": "tbl",
"description": "DOM element"
}
],
"generator": false
},
{
"__docId__": 982,
"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": 1974,
"params": [],
"generator": false
},
{
"__docId__": 983,
"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": 1990,
"params": [],
"generator": false
},
{
"__docId__": 984,
"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": 2015,
"params": [],
"generator": false
},
{
"__docId__": 985,
"kind": "method",
"static": false,
"variation": null,
"name": "markActiveColumn",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#markActiveColumn",
"access": null,
"description": "Mark currently filtered column",
"lineNumber": 2026,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"generator": false
},
{
"__docId__": 986,
"kind": "method",
"static": false,
"variation": null,
"name": "getActiveFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getActiveFilterId",
"access": null,
"description": "Return the ID of the current active filter",
"lineNumber": 2044,
"unknown": [
{
"tagName": "@returns",
"tagValue": "{String}"
}
],
"params": [],
"return": {
"nullable": null,
"types": [
"String"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 987,
"kind": "method",
"static": false,
"variation": null,
"name": "setActiveFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#setActiveFilterId",
"access": null,
"description": "Set the ID of the current active filter",
"lineNumber": 2052,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "filterId",
"description": "Element ID"
}
],
"generator": false
},
{
"__docId__": 988,
"kind": "member",
"static": false,
"variation": null,
"name": "activeFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
"lineNumber": 2053,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 989,
"kind": "method",
"static": false,
"variation": null,
"name": "getColumnIndexFromFilterId",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getColumnIndexFromFilterId",
"access": null,
"description": "Return the column index for a given filter ID",
"lineNumber": 2061,
"unknown": [
{
"tagName": "@returns",
"tagValue": "{Number} Column index"
}
],
"params": [
{
"nullable": null,
"types": [
"string"
],
"spread": false,
"optional": true,
"defaultValue": "''",
"defaultRaw": "''",
"name": "filterId",
"description": "Filter ID"
}
],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": "Column index"
},
"generator": false
},
{
"__docId__": 990,
"kind": "method",
"static": false,
"variation": null,
"name": "activateFilter",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#activateFilter",
"access": null,
"description": "Make specified column's filter active",
"lineNumber": 2071,
"params": [
{
"nullable": null,
"types": [
"*"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Index of a column"
}
],
"generator": false
},
{
"__docId__": 991,
"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": 2082,
"params": [],
"generator": false
},
{
"__docId__": 992,
"kind": "method",
"static": false,
"variation": null,
"name": "isExactMatch",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#isExactMatch",
"access": null,
"description": "Determines if passed filter column implements exact query match",
"lineNumber": 2132,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "[description]"
}
],
"return": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": "[description]"
},
"generator": false
},
{
"__docId__": 993,
"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": 2144,
"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
},
{
"__docId__": 994,
"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": 2168,
"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
},
{
"__docId__": 995,
"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": 2213,
"params": [],
"return": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 996,
"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": 2221,
"params": [],
"return": {
"nullable": null,
"types": [
"[type]"
],
"spread": false,
"description": "[description]"
},
"generator": false
},
{
"__docId__": 997,
"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": 2230,
"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
},
{
"__docId__": 998,
"kind": "member",
"static": false,
"variation": null,
"name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
"lineNumber": 2235,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 999,
"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": 2256,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 1000,
"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": 2264,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 1001,
"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": 2273,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 1002,
"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": 2281,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 1003,
"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": 2290,
"params": [
{
"nullable": null,
"types": [
"Number"
],
"spread": false,
"optional": false,
"name": "colIndex",
"description": "Column index"
}
],
"return": {
"nullable": null,
"types": [
"Element"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 1004,
"kind": "method",
"static": false,
"variation": null,
"name": "getHeadersText",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#getHeadersText",
"access": null,
"description": "Return the list of headers' text",
"lineNumber": 2315,
"params": [
{
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"optional": false,
"name": "excludeHiddenCols",
"description": "Optional: exclude hidden columns"
}
],
"return": {
"nullable": null,
"types": [
"Array"
],
"spread": false,
"description": "list of headers' text"
},
"generator": false
},
{
"__docId__": 1005,
"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": 2335,
"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
},
{
"__docId__": 1006,
"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": 2344,
"params": [],
"return": {
"nullable": null,
"types": [
"Number"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 1007,
"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": 2352,
"params": [],
"return": {
"nullable": null,
"types": [
"Object"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 1008,
"kind": "file",
"static": true,
"variation": null,
"name": "src/types.js",
"memberof": null,
"longname": "src/types.js",
"access": null,
"description": null,
"lineNumber": 5,
"content": "/**\n * Types utilities\n */\n\nconst UNDEFINED = void 0;\n\nexport default {\n /**\n * Check if argument is an object or a global object\n * @param {String or Object} v\n * @return {Boolean}\n */\n isObj(v){\n let isO = false;\n if(typeof v === 'string'){\n if(window[v] && typeof window[v] === 'object'){\n isO = true;\n }\n } else {\n if(v && typeof v === 'object'){\n isO = true;\n }\n }\n return isO;\n },\n\n /**\n * Check if argument is a function\n * @param {Function} fn\n * @return {Boolean}\n */\n isFn(fn){\n return (fn && fn.constructor == Function);\n },\n\n /**\n * Check if argument is an array\n * @param {Array} obj\n * @return {Boolean}\n */\n isArray(obj){\n return (obj && obj.constructor == Array);\n },\n\n /**\n * Check argument is a string\n * @param {String} val Value\n * @returns {Boolean}\n */\n isString(val){\n return Object.prototype.toString.call(val) === '[object String]';\n },\n\n /**\n * Determine if argument is undefined\n * @param {Any} o\n * @return {Boolean}\n */\n isUndef(o){\n return o === UNDEFINED;\n },\n\n /**\n * Determine if argument is null\n * @param {Any} o\n * @return {Boolean}\n */\n isNull(o){\n return o === null;\n },\n\n /**\n * Determine if argument is empty (undefined, null or empty string)\n * @param {Any} o\n * @return {Boolean}\n */\n isEmpty(o){\n return this.isUndef(o) || this.isNull(o) || o.length===0;\n }\n};\n"
},
{
"__docId__": 1009,
"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": [
"*"
]
}
},
{
"__docId__": 1011,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1012,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1013,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1014,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1015,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1016,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1017,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1018,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1019,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1020,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1021,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1022,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1023,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1024,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1025,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1026,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1027,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1028,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1029,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1030,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1031,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1032,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1033,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1034,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1035,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1036,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1037,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1038,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1039,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1040,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1041,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1042,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1043,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1044,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1045,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1046,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1047,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1048,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1049,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1050,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1051,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1052,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1053,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1054,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1055,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1056,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1057,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1059,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1060,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1061,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1062,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1063,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1064,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1065,
"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": "",
"builtinExternal": true
},
{
"__docId__": 1066,
"kind": "external",
"static": true,
"variation": null,
"name": "AudioContext",
"externalLink": "https://developer.mozilla.org/en/docs/Web/API/AudioContext",
"memberof": "BuiltinExternal/WebAPIExternal.js",
"longname": "BuiltinExternal/WebAPIExternal.js~AudioContext",
"access": null,
"description": "",
"builtinExternal": true
}
]