key\n * @param {Event} evt\n ",
"range": [
- 21869,
- 21932
+ 21736,
+ 21799
],
"loc": {
"start": {
- "line": 578,
+ "line": 574,
"column": 4
},
"end": {
- "line": 581,
+ "line": 577,
"column": 7
}
}
@@ -171748,16 +171138,16 @@
"type": "Block",
"value": "*\n * Filter's keyup event: if auto-filter on, detect user is typing and filter\n * columns\n * @param {Event} evt\n ",
"range": [
- 22412,
- 22545
+ 22279,
+ 22412
],
"loc": {
"start": {
- "line": 600,
+ "line": 596,
"column": 4
},
"end": {
- "line": 604,
+ "line": 600,
"column": 7
}
}
@@ -171766,16 +171156,16 @@
"type": "Block",
"value": "*\n * Filter's keydown event: if auto-filter on, detect user is typing\n ",
"range": [
- 23407,
- 23490
+ 23274,
+ 23357
],
"loc": {
"start": {
- "line": 633,
+ "line": 629,
"column": 4
},
"end": {
- "line": 635,
+ "line": 631,
"column": 7
}
}
@@ -171784,16 +171174,16 @@
"type": "Block",
"value": "*\n * Filter's focus event\n * @param {Event} evt\n ",
"range": [
- 23599,
- 23664
+ 23466,
+ 23531
],
"loc": {
"start": {
- "line": 642,
+ "line": 638,
"column": 4
},
"end": {
- "line": 645,
+ "line": 641,
"column": 7
}
}
@@ -171802,16 +171192,16 @@
"type": "Block",
"value": "*\n * Filter's blur event: if auto-filter on, clear interval on filter blur\n ",
"range": [
- 23789,
- 23877
+ 23656,
+ 23744
],
"loc": {
"start": {
- "line": 651,
+ "line": 647,
"column": 4
},
"end": {
- "line": 653,
+ "line": 649,
"column": 7
}
}
@@ -171820,16 +171210,16 @@
"type": "Block",
"value": "*\n * Insert filters row at initialization\n ",
"range": [
- 24089,
- 24144
+ 23956,
+ 24011
],
"loc": {
"start": {
- "line": 662,
+ "line": 658,
"column": 4
},
"end": {
- "line": 664,
+ "line": 660,
"column": 7
}
}
@@ -171838,16 +171228,16 @@
"type": "Block",
"value": "*\n * Initialize filtersless table\n ",
"range": [
- 24718,
- 24765
+ 24585,
+ 24632
],
"loc": {
"start": {
- "line": 688,
+ "line": 684,
"column": 4
},
"end": {
- "line": 690,
+ "line": 686,
"column": 7
}
}
@@ -171856,16 +171246,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 24969,
- 25188
+ 24836,
+ 25055
],
"loc": {
"start": {
- "line": 699,
+ "line": 695,
"column": 4
},
"end": {
- "line": 704,
+ "line": 700,
"column": 7
}
}
@@ -171874,16 +171264,16 @@
"type": "Line",
"value": "filter is appended in custom element",
"range": [
- 25961,
- 25999
+ 25828,
+ 25866
],
"loc": {
"start": {
- "line": 723,
+ "line": 719,
"column": 8
},
"end": {
- "line": 723,
+ "line": 719,
"column": 46
}
}
@@ -171892,16 +171282,16 @@
"type": "Block",
"value": "*\n * Build submit button\n * @param {Number} colIndex Column index\n * @param {DOMElement} container Container DOM element\n ",
"range": [
- 26483,
- 26632
+ 26350,
+ 26499
],
"loc": {
"start": {
- "line": 739,
+ "line": 735,
"column": 4
},
"end": {
- "line": 743,
+ "line": 739,
"column": 7
}
}
@@ -171910,16 +171300,16 @@
"type": "Line",
"value": "filter is appended in custom element",
"range": [
- 26995,
- 27033
+ 26862,
+ 26900
],
"loc": {
"start": {
- "line": 752,
+ "line": 748,
"column": 8
},
"end": {
- "line": 752,
+ "line": 748,
"column": 46
}
}
@@ -171928,16 +171318,16 @@
"type": "Block",
"value": "*\n * Return a feature instance for a given name\n * @param {String} name Name of the feature\n * @return {Object}\n ",
"range": [
- 27251,
- 27385
+ 27118,
+ 27252
],
"loc": {
"start": {
- "line": 762,
+ "line": 758,
"column": 4
},
"end": {
- "line": 766,
+ "line": 762,
"column": 7
}
}
@@ -171946,16 +171336,16 @@
"type": "Block",
"value": "*\n * Initialise all the extensions defined in the configuration object\n ",
"range": [
- 27448,
- 27532
+ 27315,
+ 27399
],
"loc": {
"start": {
- "line": 771,
+ "line": 767,
"column": 4
},
"end": {
- "line": 773,
+ "line": 769,
"column": 7
}
}
@@ -171964,16 +171354,16 @@
"type": "Line",
"value": " Set config's publicPath dynamically for Webpack...",
"range": [
- 27600,
- 27653
+ 27467,
+ 27520
],
"loc": {
"start": {
- "line": 776,
+ "line": 772,
"column": 8
},
"end": {
- "line": 776,
+ "line": 772,
"column": 61
}
}
@@ -171982,16 +171372,16 @@
"type": "Block",
"value": "*\n * Load an extension module\n * @param {Object} ext Extension config object\n ",
"range": [
- 28040,
- 28135
+ 27907,
+ 28002
],
"loc": {
"start": {
- "line": 789,
+ "line": 785,
"column": 4
},
"end": {
- "line": 792,
+ "line": 788,
"column": 7
}
}
@@ -172000,16 +171390,16 @@
"type": "Line",
"value": " Require pattern for Webpack",
"range": [
- 28524,
- 28554
+ 28391,
+ 28421
],
"loc": {
"start": {
- "line": 809,
+ "line": 805,
"column": 8
},
"end": {
- "line": 809,
+ "line": 805,
"column": 38
}
}
@@ -172018,16 +171408,16 @@
"type": "Block",
"value": " eslint-disable ",
"range": [
- 28615,
- 28635
+ 28482,
+ 28502
],
"loc": {
"start": {
- "line": 811,
+ "line": 807,
"column": 12
},
"end": {
- "line": 811,
+ "line": 807,
"column": 32
}
}
@@ -172036,16 +171426,16 @@
"type": "Block",
"value": " eslint-enable ",
"range": [
- 28699,
- 28718
+ 28566,
+ 28585
],
"loc": {
"start": {
- "line": 813,
+ "line": 809,
"column": 12
},
"end": {
- "line": 813,
+ "line": 809,
"column": 31
}
}
@@ -172054,16 +171444,16 @@
"type": "Block",
"value": "*\n * Get an extension instance\n * @param {String} name Name of the extension\n * @return {Object} Extension instance\n ",
"range": [
- 28810,
- 28953
+ 28677,
+ 28820
],
"loc": {
"start": {
- "line": 819,
+ "line": 815,
"column": 4
},
"end": {
- "line": 823,
+ "line": 819,
"column": 7
}
}
@@ -172072,16 +171462,16 @@
"type": "Block",
"value": "*\n * Check passed extension name exists\n * @param {String} name Name of the extension\n * @return {Boolean}\n ",
"range": [
- 29026,
- 29156
+ 28893,
+ 29023
],
"loc": {
"start": {
- "line": 828,
+ "line": 824,
"column": 4
},
"end": {
- "line": 832,
+ "line": 828,
"column": 7
}
}
@@ -172090,16 +171480,16 @@
"type": "Block",
"value": "*\n * Destroy all the extensions defined in the configuration object\n ",
"range": [
- 29242,
- 29323
+ 29109,
+ 29190
],
"loc": {
"start": {
- "line": 837,
+ "line": 833,
"column": 4
},
"end": {
- "line": 839,
+ "line": 835,
"column": 7
}
}
@@ -172108,16 +171498,16 @@
"type": "Block",
"value": "*\n * Load themes defined in the configuration object\n ",
"range": [
- 29696,
- 29762
+ 29563,
+ 29629
],
"loc": {
"start": {
- "line": 853,
+ "line": 849,
"column": 4
},
"end": {
- "line": 855,
+ "line": 851,
"column": 7
}
}
@@ -172126,16 +171516,16 @@
"type": "Line",
"value": "Default theme config",
"range": [
- 29883,
- 29905
+ 29750,
+ 29772
],
"loc": {
"start": {
- "line": 860,
+ "line": 856,
"column": 8
},
"end": {
- "line": 860,
+ "line": 856,
"column": 30
}
}
@@ -172144,16 +171534,16 @@
"type": "Line",
"value": "Some elements need to be overriden for default theme",
"range": [
- 30733,
- 30787
+ 30600,
+ 30654
],
"loc": {
"start": {
- "line": 884,
+ "line": 880,
"column": 8
},
"end": {
- "line": 884,
+ "line": 880,
"column": 62
}
}
@@ -172162,16 +171552,16 @@
"type": "Line",
"value": "Reset button",
"range": [
- 30796,
- 30810
+ 30663,
+ 30677
],
"loc": {
"start": {
- "line": 885,
+ "line": 881,
"column": 8
},
"end": {
- "line": 885,
+ "line": 881,
"column": 22
}
}
@@ -172180,16 +171570,16 @@
"type": "Line",
"value": "Paging buttons",
"range": [
- 30990,
- 31006
+ 30857,
+ 30873
],
"loc": {
"start": {
- "line": 890,
+ "line": 886,
"column": 8
},
"end": {
- "line": 890,
+ "line": 886,
"column": 24
}
}
@@ -172198,16 +171588,16 @@
"type": "Line",
"value": "Loader",
"range": [
- 31599,
- 31607
+ 31466,
+ 31474
],
"loc": {
"start": {
- "line": 900,
+ "line": 896,
"column": 8
},
"end": {
- "line": 900,
+ "line": 896,
"column": 16
}
}
@@ -172216,16 +171606,16 @@
"type": "Block",
"value": "*\n * Return stylesheet DOM element for a given theme name\n * @return {DOMElement} stylesheet element\n ",
"range": [
- 31800,
- 31918
+ 31667,
+ 31785
],
"loc": {
"start": {
- "line": 908,
+ "line": 904,
"column": 4
},
"end": {
- "line": 911,
+ "line": 907,
"column": 7
}
}
@@ -172234,16 +171624,16 @@
"type": "Block",
"value": "*\n * Destroy filter grid\n ",
"range": [
- 32008,
- 32046
+ 31875,
+ 31913
],
"loc": {
"start": {
- "line": 916,
+ "line": 912,
"column": 4
},
"end": {
- "line": 918,
+ "line": 914,
"column": 7
}
}
@@ -172252,16 +171642,16 @@
"type": "Line",
"value": " broadcast destroy event",
"range": [
- 32974,
- 33000
+ 32751,
+ 32777
],
"loc": {
"start": {
- "line": 950,
+ "line": 945,
"column": 8
},
"end": {
- "line": 950,
+ "line": 945,
"column": 34
}
}
@@ -172270,16 +171660,16 @@
"type": "Line",
"value": " Destroy modules",
"range": [
- 33049,
- 33067
+ 32826,
+ 32844
],
"loc": {
"start": {
- "line": 953,
+ "line": 948,
"column": 8
},
"end": {
- "line": 953,
+ "line": 948,
"column": 26
}
}
@@ -172288,16 +171678,16 @@
"type": "Line",
"value": " TODO: subcribe modules to destroy event instead",
"range": [
- 33076,
- 33126
+ 32853,
+ 32903
],
"loc": {
"start": {
- "line": 954,
+ "line": 949,
"column": 8
},
"end": {
- "line": 954,
+ "line": 949,
"column": 58
}
}
@@ -172306,16 +171696,16 @@
"type": "Line",
"value": " unsubscribe to events",
"range": [
- 33335,
- 33359
+ 33112,
+ 33136
],
"loc": {
"start": {
- "line": 962,
+ "line": 957,
"column": 8
},
"end": {
- "line": 962,
+ "line": 957,
"column": 32
}
}
@@ -172324,16 +171714,16 @@
"type": "Block",
"value": "*\n * Generate container element for paging, reset button, rows counter etc.\n ",
"range": [
- 33940,
- 34029
+ 33717,
+ 33806
],
"loc": {
"start": {
- "line": 981,
+ "line": 976,
"column": 4
},
"end": {
- "line": 983,
+ "line": 978,
"column": 7
}
}
@@ -172342,16 +171732,16 @@
"type": "Block",
"value": "** container div **",
"range": [
- 34115,
- 34138
+ 33892,
+ 33915
],
"loc": {
"start": {
- "line": 989,
+ "line": 984,
"column": 8
},
"end": {
- "line": 989,
+ "line": 984,
"column": 31
}
}
@@ -172360,16 +171750,16 @@
"type": "Line",
"value": "custom container",
"range": [
- 34270,
- 34288
+ 34047,
+ 34065
],
"loc": {
"start": {
- "line": 993,
+ "line": 988,
"column": 8
},
"end": {
- "line": 993,
+ "line": 988,
"column": 26
}
}
@@ -172378,16 +171768,16 @@
"type": "Line",
"value": "grid-layout",
"range": [
- 34396,
- 34409
+ 34173,
+ 34186
],
"loc": {
"start": {
- "line": 997,
+ "line": 992,
"column": 8
},
"end": {
- "line": 997,
+ "line": 992,
"column": 21
}
}
@@ -172396,16 +171786,16 @@
"type": "Line",
"value": "default location: just above the table",
"range": [
- 34632,
- 34672
+ 34409,
+ 34449
],
"loc": {
"start": {
- "line": 1003,
+ "line": 998,
"column": 8
},
"end": {
- "line": 1003,
+ "line": 998,
"column": 48
}
}
@@ -172414,16 +171804,16 @@
"type": "Block",
"value": "** left div containing rows # displayer **",
"range": [
- 34906,
- 34952
+ 34683,
+ 34729
],
"loc": {
"start": {
- "line": 1011,
+ "line": 1006,
"column": 8
},
"end": {
- "line": 1011,
+ "line": 1006,
"column": 54
}
}
@@ -172432,16 +171822,16 @@
"type": "Block",
"value": "** right div containing reset button\n + nb results per page select **",
"range": [
- 35160,
- 35254
+ 34937,
+ 35031
],
"loc": {
"start": {
- "line": 1017,
+ "line": 1012,
"column": 8
},
"end": {
- "line": 1018,
+ "line": 1013,
"column": 52
}
}
@@ -172450,16 +171840,16 @@
"type": "Block",
"value": "** mid div containing paging elements **",
"range": [
- 35462,
- 35506
+ 35239,
+ 35283
],
"loc": {
"start": {
- "line": 1024,
+ "line": 1019,
"column": 8
},
"end": {
- "line": 1024,
+ "line": 1019,
"column": 52
}
}
@@ -172468,16 +171858,16 @@
"type": "Line",
"value": " emit help initialisation only if undefined",
"range": [
- 35714,
- 35759
+ 35491,
+ 35536
],
"loc": {
"start": {
- "line": 1030,
+ "line": 1025,
"column": 8
},
"end": {
- "line": 1030,
+ "line": 1025,
"column": 53
}
}
@@ -172486,16 +171876,16 @@
"type": "Line",
"value": " explicitily set enabled field to true to initialise help by",
"range": [
- 35806,
- 35868
+ 35583,
+ 35645
],
"loc": {
"start": {
- "line": 1032,
+ "line": 1027,
"column": 12
},
"end": {
- "line": 1032,
+ "line": 1027,
"column": 74
}
}
@@ -172504,16 +171894,16 @@
"type": "Line",
"value": " default, only if setting is undefined",
"range": [
- 35881,
- 35921
+ 35658,
+ 35698
],
"loc": {
"start": {
- "line": 1033,
+ "line": 1028,
"column": 12
},
"end": {
- "line": 1033,
+ "line": 1028,
"column": 52
}
}
@@ -172522,16 +171912,16 @@
"type": "Block",
"value": "*\n * Remove toolbar container element\n ",
"range": [
- 36035,
- 36086
+ 35812,
+ 35863
],
"loc": {
"start": {
- "line": 1039,
+ "line": 1034,
"column": 4
},
"end": {
- "line": 1041,
+ "line": 1036,
"column": 7
}
}
@@ -172540,16 +171930,16 @@
"type": "Block",
"value": "*\n * Remove all the external column filters\n ",
"range": [
- 36426,
- 36483
+ 36203,
+ 36260
],
"loc": {
"start": {
- "line": 1056,
+ "line": 1051,
"column": 4
},
"end": {
- "line": 1058,
+ "line": 1053,
"column": 7
}
}
@@ -172558,16 +171948,16 @@
"type": "Block",
"value": "*\n * Check if given column implements a filter with custom options\n * @param {Number} colIndex Column's index\n * @return {Boolean}\n ",
"range": [
- 36898,
- 37052
+ 36675,
+ 36829
],
"loc": {
"start": {
- "line": 1074,
+ "line": 1069,
"column": 4
},
"end": {
- "line": 1078,
+ "line": 1073,
"column": 7
}
}
@@ -172576,16 +171966,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 37198,
- 37394
+ 36975,
+ 37171
],
"loc": {
"start": {
- "line": 1084,
+ "line": 1079,
"column": 4
},
"end": {
- "line": 1089,
+ "line": 1084,
"column": 7
}
}
@@ -172594,16 +171984,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 38254,
- 38491
+ 38031,
+ 38268
],
"loc": {
"start": {
- "line": 1118,
+ "line": 1113,
"column": 4
},
"end": {
- "line": 1122,
+ "line": 1117,
"column": 7
}
}
@@ -172612,16 +172002,16 @@
"type": "Line",
"value": "invoke onbefore callback",
"range": [
- 38595,
- 38621
+ 38372,
+ 38398
],
"loc": {
"start": {
- "line": 1127,
+ "line": 1122,
"column": 8
},
"end": {
- "line": 1127,
+ "line": 1122,
"column": 34
}
}
@@ -172630,16 +172020,16 @@
"type": "Line",
"value": " search args re-init",
"range": [
- 38918,
- 38940
+ 38695,
+ 38717
],
"loc": {
"start": {
- "line": 1138,
+ "line": 1133,
"column": 8
},
"end": {
- "line": 1138,
+ "line": 1133,
"column": 30
}
}
@@ -172648,16 +172038,16 @@
"type": "Line",
"value": " re_an = new RegExp(this.anOperator),",
"range": [
- 39496,
- 39535
+ 39273,
+ 39312
],
"loc": {
"start": {
- "line": 1152,
+ "line": 1147,
"column": 12
},
"end": {
- "line": 1152,
+ "line": 1147,
"column": 51
}
}
@@ -172666,16 +172056,16 @@
"type": "Line",
"value": " re_cr = new RegExp(this.curExp),",
"range": [
- 39548,
- 39583
+ 39325,
+ 39360
],
"loc": {
"start": {
- "line": 1153,
+ "line": 1148,
"column": 12
},
"end": {
- "line": 1153,
+ "line": 1148,
"column": 47
}
}
@@ -172684,16 +172074,16 @@
"type": "Line",
"value": "keyword highlighting",
"range": [
- 39725,
- 39747
+ 39502,
+ 39524
],
"loc": {
"start": {
- "line": 1158,
+ "line": 1153,
"column": 8
},
"end": {
- "line": 1158,
+ "line": 1153,
"column": 30
}
}
@@ -172702,16 +172092,16 @@
"type": "Block",
"value": "jshint validthis:true ",
"range": [
- 39804,
- 39830
+ 39581,
+ 39607
],
"loc": {
"start": {
- "line": 1160,
+ "line": 1155,
"column": 12
},
"end": {
- "line": 1160,
+ "line": 1155,
"column": 38
}
}
@@ -172720,16 +172110,16 @@
"type": "Line",
"value": "looks for search argument in current row",
"range": [
- 40439,
- 40481
+ 40216,
+ 40258
],
"loc": {
"start": {
- "line": 1177,
+ "line": 1172,
"column": 8
},
"end": {
- "line": 1177,
+ "line": 1172,
"column": 50
}
}
@@ -172738,16 +172128,16 @@
"type": "Line",
"value": "Search arg operator tests",
"range": [
- 40725,
- 40752
+ 40502,
+ 40529
],
"loc": {
"start": {
- "line": 1185,
+ "line": 1180,
"column": 12
},
"end": {
- "line": 1185,
+ "line": 1180,
"column": 39
}
}
@@ -172756,16 +172146,16 @@
"type": "Line",
"value": " hasAN = re_an.test(sA),",
"range": [
- 41046,
- 41072
+ 40823,
+ 40849
],
"loc": {
"start": {
- "line": 1193,
+ "line": 1188,
"column": 16
},
"end": {
- "line": 1193,
+ "line": 1188,
"column": 42
}
}
@@ -172774,16 +172164,16 @@
"type": "Line",
"value": "Search arg dates tests",
"range": [
- 41286,
- 41310
+ 41063,
+ 41087
],
"loc": {
"start": {
- "line": 1200,
+ "line": 1195,
"column": 12
},
"end": {
- "line": 1200,
+ "line": 1195,
"column": 36
}
}
@@ -172792,16 +172182,16 @@
"type": "Line",
"value": "dates",
"range": [
- 41827,
- 41834
+ 41604,
+ 41611
],
"loc": {
"start": {
- "line": 1209,
+ "line": 1204,
"column": 12
},
"end": {
- "line": 1209,
+ "line": 1204,
"column": 19
}
}
@@ -172810,16 +172200,16 @@
"type": "Line",
"value": " lower date",
"range": [
- 41953,
- 41966
+ 41730,
+ 41743
],
"loc": {
"start": {
- "line": 1212,
+ "line": 1207,
"column": 16
},
"end": {
- "line": 1212,
+ "line": 1207,
"column": 29
}
}
@@ -172828,16 +172218,16 @@
"type": "Line",
"value": " lower equal date",
"range": [
- 42146,
- 42165
+ 41923,
+ 41942
],
"loc": {
"start": {
- "line": 1217,
+ "line": 1212,
"column": 16
},
"end": {
- "line": 1217,
+ "line": 1212,
"column": 35
}
}
@@ -172846,16 +172236,16 @@
"type": "Line",
"value": " greater equal date",
"range": [
- 42353,
- 42374
+ 42130,
+ 42151
],
"loc": {
"start": {
- "line": 1222,
+ "line": 1217,
"column": 16
},
"end": {
- "line": 1222,
+ "line": 1217,
"column": 37
}
}
@@ -172864,16 +172254,16 @@
"type": "Line",
"value": " greater date",
"range": [
- 42562,
- 42577
+ 42339,
+ 42354
],
"loc": {
"start": {
- "line": 1227,
+ "line": 1222,
"column": 16
},
"end": {
- "line": 1227,
+ "line": 1222,
"column": 31
}
}
@@ -172882,7 +172272,25 @@
"type": "Line",
"value": " different date",
"range": [
- 42762,
+ 42539,
+ 42556
+ ],
+ "loc": {
+ "start": {
+ "line": 1227,
+ "column": 16
+ },
+ "end": {
+ "line": 1227,
+ "column": 33
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": " equal date",
+ "range": [
+ 42766,
42779
],
"loc": {
@@ -172892,24 +172300,6 @@
},
"end": {
"line": 1232,
- "column": 33
- }
- }
- },
- {
- "type": "Line",
- "value": " equal date",
- "range": [
- 42989,
- 43002
- ],
- "loc": {
- "start": {
- "line": 1237,
- "column": 16
- },
- "end": {
- "line": 1237,
"column": 29
}
}
@@ -172918,16 +172308,16 @@
"type": "Line",
"value": " searched keyword with * operator doesn't have to be a date",
"range": [
- 43213,
- 43274
+ 42990,
+ 43051
],
"loc": {
"start": {
- "line": 1242,
+ "line": 1237,
"column": 16
},
"end": {
- "line": 1242,
+ "line": 1237,
"column": 77
}
}
@@ -172936,16 +172326,16 @@
"type": "Line",
"value": " like date",
"range": [
- 43317,
- 43329
+ 43094,
+ 43106
],
"loc": {
"start": {
- "line": 1243,
+ "line": 1238,
"column": 42
},
"end": {
- "line": 1243,
+ "line": 1238,
"column": 54
}
}
@@ -172954,16 +172344,16 @@
"type": "Line",
"value": "empty",
"range": [
- 43680,
- 43687
+ 43457,
+ 43464
],
"loc": {
"start": {
- "line": 1251,
+ "line": 1246,
"column": 16
},
"end": {
- "line": 1251,
+ "line": 1246,
"column": 23
}
}
@@ -172972,16 +172362,16 @@
"type": "Line",
"value": "non-empty",
"range": [
- 43813,
- 43824
+ 43590,
+ 43601
],
"loc": {
"start": {
- "line": 1255,
+ "line": 1250,
"column": 16
},
"end": {
- "line": 1255,
+ "line": 1250,
"column": 27
}
}
@@ -172990,16 +172380,16 @@
"type": "Line",
"value": "first numbers need to be formated",
"range": [
- 44132,
- 44167
+ 43909,
+ 43944
],
"loc": {
"start": {
- "line": 1265,
+ "line": 1260,
"column": 16
},
"end": {
- "line": 1265,
+ "line": 1260,
"column": 51
}
}
@@ -173008,16 +172398,16 @@
"type": "Line",
"value": " first checks if there is any operator (<,>,<=,>=,!,*,=,{,},",
"range": [
- 44816,
- 44878
+ 44593,
+ 44655
],
"loc": {
"start": {
- "line": 1280,
+ "line": 1275,
"column": 16
},
"end": {
- "line": 1280,
+ "line": 1275,
"column": 78
}
}
@@ -173026,16 +172416,16 @@
"type": "Line",
"value": " rgx:)",
"range": [
- 44895,
- 44903
+ 44672,
+ 44680
],
"loc": {
"start": {
- "line": 1281,
+ "line": 1276,
"column": 16
},
"end": {
- "line": 1281,
+ "line": 1276,
"column": 24
}
}
@@ -173044,16 +172434,16 @@
"type": "Line",
"value": " lower equal",
"range": [
- 44920,
- 44934
+ 44697,
+ 44711
],
"loc": {
"start": {
- "line": 1282,
+ "line": 1277,
"column": 16
},
"end": {
- "line": 1282,
+ "line": 1277,
"column": 30
}
}
@@ -173062,16 +172452,16 @@
"type": "Line",
"value": "greater equal",
"range": [
- 45119,
- 45134
+ 44896,
+ 44911
],
"loc": {
"start": {
- "line": 1287,
+ "line": 1282,
"column": 16
},
"end": {
- "line": 1287,
+ "line": 1282,
"column": 31
}
}
@@ -173080,16 +172470,16 @@
"type": "Line",
"value": "lower",
"range": [
- 45324,
- 45331
+ 45101,
+ 45108
],
"loc": {
"start": {
- "line": 1292,
+ "line": 1287,
"column": 16
},
"end": {
- "line": 1292,
+ "line": 1287,
"column": 23
}
}
@@ -173098,16 +172488,16 @@
"type": "Line",
"value": "greater",
"range": [
- 45519,
- 45528
+ 45296,
+ 45305
],
"loc": {
"start": {
- "line": 1297,
+ "line": 1292,
"column": 16
},
"end": {
- "line": 1297,
+ "line": 1292,
"column": 25
}
}
@@ -173116,16 +172506,16 @@
"type": "Line",
"value": "different",
"range": [
- 45716,
- 45727
+ 45493,
+ 45504
],
"loc": {
"start": {
- "line": 1302,
+ "line": 1297,
"column": 16
},
"end": {
- "line": 1302,
+ "line": 1297,
"column": 27
}
}
@@ -173134,16 +172524,16 @@
"type": "Line",
"value": "like",
"range": [
- 45936,
- 45942
+ 45713,
+ 45719
],
"loc": {
"start": {
- "line": 1307,
+ "line": 1302,
"column": 16
},
"end": {
- "line": 1307,
+ "line": 1302,
"column": 22
}
}
@@ -173152,16 +172542,16 @@
"type": "Line",
"value": "equal",
"range": [
- 46137,
- 46144
+ 45914,
+ 45921
],
"loc": {
"start": {
- "line": 1312,
+ "line": 1307,
"column": 16
},
"end": {
- "line": 1312,
+ "line": 1307,
"column": 23
}
}
@@ -173170,16 +172560,16 @@
"type": "Line",
"value": "starts with",
"range": [
- 46338,
- 46351
+ 46115,
+ 46128
],
"loc": {
"start": {
- "line": 1317,
+ "line": 1312,
"column": 16
},
"end": {
- "line": 1317,
+ "line": 1312,
"column": 29
}
}
@@ -173188,16 +172578,16 @@
"type": "Line",
"value": "ends with",
"range": [
- 46538,
- 46549
+ 46315,
+ 46326
],
"loc": {
"start": {
- "line": 1322,
+ "line": 1317,
"column": 16
},
"end": {
- "line": 1322,
+ "line": 1317,
"column": 27
}
}
@@ -173206,16 +172596,16 @@
"type": "Line",
"value": "empty",
"range": [
- 46998,
- 47005
+ 46775,
+ 46782
],
"loc": {
"start": {
- "line": 1331,
+ "line": 1326,
"column": 16
},
"end": {
- "line": 1331,
+ "line": 1326,
"column": 23
}
}
@@ -173224,16 +172614,16 @@
"type": "Line",
"value": "non-empty",
"range": [
- 47131,
- 47142
+ 46908,
+ 46919
],
"loc": {
"start": {
- "line": 1335,
+ "line": 1330,
"column": 16
},
"end": {
- "line": 1335,
+ "line": 1330,
"column": 27
}
}
@@ -173242,16 +172632,16 @@
"type": "Line",
"value": "regexp",
"range": [
- 47269,
- 47277
+ 47046,
+ 47054
],
"loc": {
"start": {
- "line": 1339,
+ "line": 1334,
"column": 16
},
"end": {
- "line": 1339,
+ "line": 1334,
"column": 24
}
}
@@ -173260,16 +172650,16 @@
"type": "Line",
"value": "in case regexp fires an exception",
"range": [
- 47332,
- 47367
+ 47109,
+ 47144
],
"loc": {
"start": {
- "line": 1341,
+ "line": 1336,
"column": 20
},
"end": {
- "line": 1341,
+ "line": 1336,
"column": 55
}
}
@@ -173278,16 +172668,16 @@
"type": "Line",
"value": "operator is removed",
"range": [
- 47418,
- 47439
+ 47195,
+ 47216
],
"loc": {
"start": {
- "line": 1343,
+ "line": 1338,
"column": 24
},
"end": {
- "line": 1343,
+ "line": 1338,
"column": 45
}
}
@@ -173296,16 +172686,16 @@
"type": "Line",
"value": " If numeric type data, perform a strict equality test and",
"range": [
- 47757,
- 47816
+ 47534,
+ 47593
],
"loc": {
"start": {
- "line": 1351,
+ "line": 1346,
"column": 20
},
"end": {
- "line": 1351,
+ "line": 1346,
"column": 79
}
}
@@ -173314,16 +172704,16 @@
"type": "Line",
"value": " fallback to unformatted number string comparison",
"range": [
- 47837,
- 47888
+ 47614,
+ 47665
],
"loc": {
"start": {
- "line": 1352,
+ "line": 1347,
"column": 20
},
"end": {
- "line": 1352,
+ "line": 1347,
"column": 71
}
}
@@ -173332,16 +172722,16 @@
"type": "Line",
"value": " Finally test search term is contained in cell data",
"range": [
- 48344,
- 48397
+ 48121,
+ 48174
],
"loc": {
"start": {
- "line": 1360,
+ "line": 1355,
"column": 24
},
"end": {
- "line": 1360,
+ "line": 1355,
"column": 77
}
}
@@ -173350,16 +172740,16 @@
"type": "Line",
"value": "else",
"range": [
- 48582,
- 48588
+ 48359,
+ 48365
],
"loc": {
"start": {
- "line": 1366,
+ "line": 1361,
"column": 13
},
"end": {
- "line": 1366,
+ "line": 1361,
"column": 19
}
}
@@ -173368,16 +172758,16 @@
"type": "Line",
"value": "fn",
"range": [
- 48628,
- 48632
+ 48405,
+ 48409
],
"loc": {
"start": {
- "line": 1368,
+ "line": 1363,
"column": 9
},
"end": {
- "line": 1368,
+ "line": 1363,
"column": 13
}
}
@@ -173386,16 +172776,16 @@
"type": "Line",
"value": " already filtered rows display re-init",
"range": [
- 48699,
- 48739
+ 48476,
+ 48516
],
"loc": {
"start": {
- "line": 1371,
+ "line": 1366,
"column": 12
},
"end": {
- "line": 1371,
+ "line": 1366,
"column": 52
}
}
@@ -173404,16 +172794,16 @@
"type": "Line",
"value": " checks if row has exact cell #",
"range": [
- 48871,
- 48904
+ 48648,
+ 48681
],
"loc": {
"start": {
- "line": 1377,
+ "line": 1372,
"column": 12
},
"end": {
- "line": 1377,
+ "line": 1372,
"column": 45
}
}
@@ -173422,16 +172812,16 @@
"type": "Line",
"value": "only for single filter search",
"range": [
- 49073,
- 49104
+ 48850,
+ 48881
],
"loc": {
"start": {
- "line": 1384,
+ "line": 1379,
"column": 16
},
"end": {
- "line": 1384,
+ "line": 1379,
"column": 47
}
}
@@ -173440,16 +172830,16 @@
"type": "Line",
"value": " this loop retrieves cell data",
"range": [
- 49161,
- 49193
+ 48938,
+ 48970
],
"loc": {
"start": {
- "line": 1387,
+ "line": 1382,
"column": 12
},
"end": {
- "line": 1387,
+ "line": 1382,
"column": 44
}
}
@@ -173458,16 +172848,16 @@
"type": "Line",
"value": "searched keyword",
"range": [
- 49258,
- 49276
+ 49035,
+ 49053
],
"loc": {
"start": {
- "line": 1389,
+ "line": 1384,
"column": 16
},
"end": {
- "line": 1389,
+ "line": 1384,
"column": 34
}
}
@@ -173476,16 +172866,16 @@
"type": "Line",
"value": "multiple search parameter operator ||",
"range": [
- 49554,
- 49593
+ 49331,
+ 49370
],
"loc": {
"start": {
- "line": 1399,
+ "line": 1394,
"column": 16
},
"end": {
- "line": 1399,
+ "line": 1394,
"column": 55
}
}
@@ -173494,16 +172884,16 @@
"type": "Line",
"value": "multiple search || parameter boolean",
"range": [
- 49684,
- 49722
+ 49461,
+ 49499
],
"loc": {
"start": {
- "line": 1401,
+ "line": 1396,
"column": 20
},
"end": {
- "line": 1401,
+ "line": 1396,
"column": 58
}
}
@@ -173512,16 +172902,16 @@
"type": "Line",
"value": "multiple search parameter operator &&",
"range": [
- 49800,
- 49839
+ 49577,
+ 49616
],
"loc": {
"start": {
- "line": 1403,
+ "line": 1398,
"column": 20
},
"end": {
- "line": 1403,
+ "line": 1398,
"column": 59
}
}
@@ -173530,16 +172920,16 @@
"type": "Line",
"value": "multiple search && parameter boolean",
"range": [
- 49931,
- 49969
+ 49708,
+ 49746
],
"loc": {
"start": {
- "line": 1405,
+ "line": 1400,
"column": 20
},
"end": {
- "line": 1405,
+ "line": 1400,
"column": 58
}
}
@@ -173548,16 +172938,16 @@
"type": "Line",
"value": "detect operators or array query",
"range": [
- 50046,
- 50079
+ 49823,
+ 49856
],
"loc": {
"start": {
- "line": 1408,
+ "line": 1403,
"column": 16
},
"end": {
- "line": 1408,
+ "line": 1403,
"column": 49
}
}
@@ -173566,16 +172956,16 @@
"type": "Line",
"value": " TODO: improve clarity/readability of this block",
"range": [
- 50451,
- 50501
+ 50228,
+ 50278
],
"loc": {
"start": {
- "line": 1418,
+ "line": 1413,
"column": 20
},
"end": {
- "line": 1418,
+ "line": 1413,
"column": 70
}
}
@@ -173584,16 +172974,16 @@
"type": "Line",
"value": "single search parameter",
"range": [
- 51131,
- 51156
+ 50908,
+ 50933
],
"loc": {
"start": {
- "line": 1434,
+ "line": 1429,
"column": 16
},
"end": {
- "line": 1434,
+ "line": 1429,
"column": 41
}
}
@@ -173602,16 +172992,16 @@
"type": "Line",
"value": "else single param",
"range": [
- 51344,
- 51363
+ 51121,
+ 51140
],
"loc": {
"start": {
- "line": 1438,
+ "line": 1433,
"column": 17
},
"end": {
- "line": 1438,
+ "line": 1433,
"column": 36
}
}
@@ -173620,16 +173010,16 @@
"type": "Line",
"value": "for j",
"range": [
- 51670,
- 51677
+ 51447,
+ 51454
],
"loc": {
"start": {
- "line": 1448,
+ "line": 1443,
"column": 13
},
"end": {
- "line": 1448,
+ "line": 1443,
"column": 20
}
}
@@ -173638,16 +173028,16 @@
"type": "Line",
"value": " for k",
"range": [
- 52096,
- 52104
+ 51873,
+ 51881
],
"loc": {
"start": {
- "line": 1463,
+ "line": 1458,
"column": 9
},
"end": {
- "line": 1463,
+ "line": 1458,
"column": 17
}
}
@@ -173656,16 +173046,16 @@
"type": "Line",
"value": "invokes onafterfilter callback",
"range": [
- 52155,
- 52187
+ 51932,
+ 51964
],
"loc": {
"start": {
- "line": 1467,
+ "line": 1462,
"column": 8
},
"end": {
- "line": 1467,
+ "line": 1462,
"column": 40
}
}
@@ -173674,16 +173064,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 52357,
- 52741
+ 52134,
+ 52518
],
"loc": {
"start": {
- "line": 1475,
+ "line": 1470,
"column": 4
},
"end": {
- "line": 1482,
+ "line": 1477,
"column": 7
}
}
@@ -173692,16 +173082,16 @@
"type": "Line",
"value": " checks if current row index appears in exclude array",
"range": [
- 53191,
- 53246
+ 52968,
+ 53023
],
"loc": {
"start": {
- "line": 1497,
+ "line": 1492,
"column": 12
},
"end": {
- "line": 1497,
+ "line": 1492,
"column": 67
}
}
@@ -173710,16 +173100,16 @@
"type": "Line",
"value": " checks if row has exact cell # and is not excluded",
"range": [
- 53446,
- 53499
+ 53223,
+ 53276
],
"loc": {
"start": {
- "line": 1504,
+ "line": 1499,
"column": 12
},
"end": {
- "line": 1504,
+ "line": 1499,
"column": 65
}
}
@@ -173728,16 +173118,16 @@
"type": "Line",
"value": " this loop retrieves cell data",
"range": [
- 53577,
- 53609
+ 53354,
+ 53386
],
"loc": {
"start": {
- "line": 1506,
+ "line": 1501,
"column": 16
},
"end": {
- "line": 1506,
+ "line": 1501,
"column": 48
}
}
@@ -173746,16 +173136,16 @@
"type": "Block",
"value": "*\n * Return the filter's value of a specified column\n * @param {Number} index Column index\n * @return {String} Filter value\n ",
"range": [
- 54203,
- 54355
+ 53980,
+ 54132
],
"loc": {
"start": {
- "line": 1523,
+ "line": 1518,
"column": 4
},
"end": {
- "line": 1527,
+ "line": 1522,
"column": 7
}
}
@@ -173764,16 +173154,16 @@
"type": "Line",
"value": "mutiple select",
"range": [
- 54749,
- 54765
+ 54526,
+ 54542
],
"loc": {
"start": {
- "line": 1542,
+ "line": 1537,
"column": 8
},
"end": {
- "line": 1542,
+ "line": 1537,
"column": 24
}
}
@@ -173782,16 +173172,16 @@
"type": "Line",
"value": "checklist",
"range": [
- 54894,
- 54905
+ 54671,
+ 54682
],
"loc": {
"start": {
- "line": 1546,
+ "line": 1541,
"column": 8
},
"end": {
- "line": 1546,
+ "line": 1541,
"column": 19
}
}
@@ -173800,16 +173190,16 @@
"type": "Line",
"value": "return an empty string if collection is empty or contains a single",
"range": [
- 55036,
- 55104
+ 54813,
+ 54881
],
"loc": {
"start": {
- "line": 1550,
+ "line": 1545,
"column": 8
},
"end": {
- "line": 1550,
+ "line": 1545,
"column": 76
}
}
@@ -173818,16 +173208,16 @@
"type": "Line",
"value": "empty string",
"range": [
- 55113,
- 55127
+ 54890,
+ 54904
],
"loc": {
"start": {
- "line": 1551,
+ "line": 1546,
"column": 8
},
"end": {
- "line": 1551,
+ "line": 1546,
"column": 22
}
}
@@ -173836,16 +173226,16 @@
"type": "Block",
"value": "*\n * Return the filters' values\n * @return {Array} List of filters' values\n ",
"range": [
- 55321,
- 55413
+ 55098,
+ 55190
],
"loc": {
"start": {
- "line": 1560,
+ "line": 1555,
"column": 4
},
"end": {
- "line": 1563,
+ "line": 1558,
"column": 7
}
}
@@ -173854,16 +173244,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 55855,
- 56018
+ 55632,
+ 55795
],
"loc": {
"start": {
- "line": 1580,
+ "line": 1575,
"column": 4
},
"end": {
- "line": 1584,
+ "line": 1579,
"column": 7
}
}
@@ -173872,16 +173262,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 56149,
- 56550
+ 55926,
+ 56327
],
"loc": {
"start": {
- "line": 1592,
+ "line": 1587,
"column": 4
},
"end": {
- "line": 1600,
+ "line": 1595,
"column": 7
}
}
@@ -173890,16 +173280,16 @@
"type": "Block",
"value": "*\n * Return the filter's DOM element for a given column\n * @param {Number} index Column's index\n * @return {DOMElement}\n ",
"range": [
- 56967,
- 57113
+ 56744,
+ 56890
],
"loc": {
"start": {
- "line": 1616,
+ "line": 1611,
"column": 4
},
"end": {
- "line": 1620,
+ "line": 1615,
"column": 7
}
}
@@ -173908,16 +173298,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 57222,
- 57388
+ 56999,
+ 57165
],
"loc": {
"start": {
- "line": 1626,
+ "line": 1621,
"column": 4
},
"end": {
- "line": 1630,
+ "line": 1625,
"column": 7
}
}
@@ -173926,16 +173316,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 57505,
- 57736
+ 57282,
+ 57513
],
"loc": {
"start": {
- "line": 1636,
+ "line": 1631,
"column": 4
},
"end": {
- "line": 1641,
+ "line": 1636,
"column": 7
}
}
@@ -173944,16 +173334,16 @@
"type": "Block",
"value": "*\n * Return the data of a given cell\n * @param {DOMElement} cell Cell's DOM object\n * @return {String}\n ",
"range": [
- 57975,
- 58100
+ 57752,
+ 57877
],
"loc": {
"start": {
- "line": 1651,
+ "line": 1646,
"column": 4
},
"end": {
- "line": 1655,
+ "line": 1650,
"column": 7
}
}
@@ -173962,16 +173352,16 @@
"type": "Line",
"value": "Check for customCellData callback",
"range": [
- 58167,
- 58202
+ 57944,
+ 57979
],
"loc": {
"start": {
- "line": 1658,
+ "line": 1653,
"column": 8
},
"end": {
- "line": 1658,
+ "line": 1653,
"column": 43
}
}
@@ -173980,16 +173370,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 58437,
- 58841
+ 58214,
+ 58618
],
"loc": {
"start": {
- "line": 1667,
+ "line": 1662,
"column": 4
},
"end": {
- "line": 1678,
+ "line": 1673,
"column": 7
}
}
@@ -173998,16 +173388,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 59801,
- 60208
+ 59578,
+ 59985
],
"loc": {
"start": {
- "line": 1704,
+ "line": 1699,
"column": 4
},
"end": {
- "line": 1715,
+ "line": 1710,
"column": 7
}
}
@@ -174016,16 +173406,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 61292,
- 61623
+ 61069,
+ 61400
],
"loc": {
"start": {
- "line": 1745,
+ "line": 1740,
"column": 4
},
"end": {
- "line": 1752,
+ "line": 1747,
"column": 7
}
}
@@ -174034,16 +173424,16 @@
"type": "Line",
"value": "cols values of current row",
"range": [
- 62021,
- 62049
+ 61798,
+ 61826
],
"loc": {
"start": {
- "line": 1764,
+ "line": 1759,
"column": 16
},
"end": {
- "line": 1764,
+ "line": 1759,
"column": 44
}
}
@@ -174052,16 +173442,16 @@
"type": "Line",
"value": "data of searched column",
"range": [
- 62092,
- 62117
+ 61869,
+ 61894
],
"loc": {
"start": {
- "line": 1766,
+ "line": 1761,
"column": 16
},
"end": {
- "line": 1766,
+ "line": 1761,
"column": 41
}
}
@@ -174070,16 +173460,16 @@
"type": "Block",
"value": "*\n * Get the display value of a row\n * @param {HTMLTableRowElement} row DOM element of the row\n * @return {String} Usually 'none' or ''\n ",
"range": [
- 62225,
- 62387
+ 62002,
+ 62164
],
"loc": {
"start": {
- "line": 1773,
+ "line": 1768,
"column": 4
},
"end": {
- "line": 1777,
+ "line": 1772,
"column": 7
}
}
@@ -174088,16 +173478,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 62458,
- 62631
+ 62235,
+ 62408
],
"loc": {
"start": {
- "line": 1782,
+ "line": 1777,
"column": 4
},
"end": {
- "line": 1786,
+ "line": 1781,
"column": 7
}
}
@@ -174106,16 +173496,16 @@
"type": "Line",
"value": " always visible rows are valid",
"range": [
- 62803,
- 62835
+ 62580,
+ 62612
],
"loc": {
"start": {
- "line": 1793,
+ "line": 1788,
"column": 8
},
"end": {
- "line": 1793,
+ "line": 1788,
"column": 40
}
}
@@ -174124,16 +173514,16 @@
"type": "Block",
"value": "*\n * Validate all filterable rows\n ",
"range": [
- 63544,
- 63591
+ 63321,
+ 63368
],
"loc": {
"start": {
- "line": 1819,
+ "line": 1814,
"column": 4
},
"end": {
- "line": 1821,
+ "line": 1816,
"column": 7
}
}
@@ -174142,16 +173532,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 63841,
- 64003
+ 63618,
+ 63780
],
"loc": {
"start": {
- "line": 1832,
+ "line": 1827,
"column": 4
},
"end": {
- "line": 1836,
+ "line": 1831,
"column": 7
}
}
@@ -174160,16 +173550,16 @@
"type": "Line",
"value": "multiple selects",
"range": [
- 64526,
- 64544
+ 64303,
+ 64321
],
"loc": {
"start": {
- "line": 1851,
+ "line": 1846,
"column": 8
},
"end": {
- "line": 1851,
+ "line": 1846,
"column": 26
}
}
@@ -174178,16 +173568,16 @@
"type": "Line",
"value": "checklist",
"range": [
- 64993,
- 65004
+ 64770,
+ 64781
],
"loc": {
"start": {
- "line": 1863,
+ "line": 1858,
"column": 8
},
"end": {
- "line": 1863,
+ "line": 1858,
"column": 19
}
}
@@ -174196,16 +173586,16 @@
"type": "Block",
"value": "*\n * Set them columns' widths as per configuration\n * @param {Element} tbl DOM element\n ",
"range": [
- 65600,
- 65704
+ 65377,
+ 65481
],
"loc": {
"start": {
- "line": 1881,
+ "line": 1876,
"column": 4
},
"end": {
- "line": 1884,
+ "line": 1879,
"column": 7
}
}
@@ -174214,16 +173604,16 @@
"type": "Block",
"value": "*\n * Makes defined rows always visible\n ",
"range": [
- 66633,
- 66685
+ 66410,
+ 66462
],
"loc": {
"start": {
- "line": 1915,
+ "line": 1910,
"column": 4
},
"end": {
- "line": 1917,
+ "line": 1912,
"column": 7
}
}
@@ -174232,16 +173622,16 @@
"type": "Line",
"value": "row index cannot be > nrows",
"range": [
- 66947,
- 66976
+ 66724,
+ 66753
],
"loc": {
"start": {
- "line": 1925,
+ "line": 1920,
"column": 12
},
"end": {
- "line": 1925,
+ "line": 1920,
"column": 41
}
}
@@ -174250,16 +173640,16 @@
"type": "Block",
"value": "*\n * Clear all the filters' values\n ",
"range": [
- 67090,
- 67138
+ 66867,
+ 66915
],
"loc": {
"start": {
- "line": 1932,
+ "line": 1927,
"column": 4
},
"end": {
- "line": 1934,
+ "line": 1929,
"column": 7
}
}
@@ -174268,16 +173658,16 @@
"type": "Block",
"value": "*\n * Clears filtered columns visual indicator (background color)\n ",
"range": [
- 67700,
- 67778
+ 67477,
+ 67555
],
"loc": {
"start": {
- "line": 1957,
+ "line": 1952,
"column": 4
},
"end": {
- "line": 1959,
+ "line": 1954,
"column": 7
}
}
@@ -174286,16 +173676,16 @@
"type": "Block",
"value": "*\n * Mark currently filtered column\n * @param {Number} colIndex Column index\n ",
"range": [
- 67986,
- 68081
+ 67763,
+ 67858
],
"loc": {
"start": {
- "line": 1966,
+ "line": 1961,
"column": 4
},
"end": {
- "line": 1969,
+ "line": 1964,
"column": 7
}
}
@@ -174304,16 +173694,16 @@
"type": "Block",
"value": "*\n * Return the ID of the current active filter\n * @returns {String}\n ",
"range": [
- 68556,
- 68642
+ 68333,
+ 68419
],
"loc": {
"start": {
- "line": 1984,
+ "line": 1979,
"column": 4
},
"end": {
- "line": 1987,
+ "line": 1982,
"column": 7
}
}
@@ -174322,16 +173712,16 @@
"type": "Block",
"value": "*\n * Set the ID of the current active filter\n * @param {String} filterId Element ID\n ",
"range": [
- 68716,
- 68817
+ 68493,
+ 68594
],
"loc": {
"start": {
- "line": 1992,
+ "line": 1987,
"column": 4
},
"end": {
- "line": 1995,
+ "line": 1990,
"column": 7
}
}
@@ -174340,16 +173730,16 @@
"type": "Block",
"value": "*\n * Return the column index for a given filter ID\n * @param {string} [filterId=''] Filter ID\n * @returns {Number} Column index\n ",
"range": [
- 68903,
- 69052
+ 68680,
+ 68829
],
"loc": {
"start": {
- "line": 2000,
+ "line": 1995,
"column": 4
},
"end": {
- "line": 2004,
+ "line": 1999,
"column": 7
}
}
@@ -174358,16 +173748,16 @@
"type": "Block",
"value": "*\n * Make specified column's filter active\n * @param colIndex Index of a column\n ",
"range": [
- 69230,
- 69327
+ 69007,
+ 69104
],
"loc": {
"start": {
- "line": 2011,
+ "line": 2006,
"column": 4
},
"end": {
- "line": 2014,
+ "line": 2009,
"column": 7
}
}
@@ -174376,16 +173766,16 @@
"type": "Block",
"value": "*\n * Refresh the filters subject to linking ('select', 'multiple',\n * 'checklist' type)\n ",
"range": [
- 69493,
- 69598
+ 69270,
+ 69375
],
"loc": {
"start": {
- "line": 2022,
+ "line": 2017,
"column": 4
},
"end": {
- "line": 2025,
+ "line": 2020,
"column": 7
}
}
@@ -174394,16 +173784,16 @@
"type": "Line",
"value": " Welcome to cyclomatic complexity hell :)",
"range": [
- 70252,
- 70295
+ 70029,
+ 70072
],
"loc": {
"start": {
- "line": 2042,
+ "line": 2037,
"column": 12
},
"end": {
- "line": 2042,
+ "line": 2037,
"column": 55
}
}
@@ -174412,16 +173802,16 @@
"type": "Line",
"value": " TODO: simplify/refactor if statement",
"range": [
- 70308,
- 70347
+ 70085,
+ 70124
],
"loc": {
"start": {
- "line": 2043,
+ "line": 2038,
"column": 12
},
"end": {
- "line": 2043,
+ "line": 2038,
"column": 51
}
}
@@ -174430,16 +173820,16 @@
"type": "Line",
"value": "1st option needs to be inserted",
"range": [
- 70719,
- 70752
+ 70496,
+ 70529
],
"loc": {
"start": {
- "line": 2051,
+ "line": 2046,
"column": 16
},
"end": {
- "line": 2051,
+ "line": 2046,
"column": 49
}
}
@@ -174448,16 +173838,16 @@
"type": "Block",
"value": "*\n * Determines if passed filter column implements exact query match\n * @param {Number} colIndex [description]\n * @return {Boolean} [description]\n ",
"range": [
- 71395,
- 71573
+ 71172,
+ 71350
],
"loc": {
"start": {
- "line": 2071,
+ "line": 2066,
"column": 4
},
"end": {
- "line": 2075,
+ "line": 2070,
"column": 7
}
}
@@ -174466,16 +173856,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 71765,
- 71984
+ 71542,
+ 71761
],
"loc": {
"start": {
- "line": 2082,
+ "line": 2077,
"column": 4
},
"end": {
- "line": 2087,
+ "line": 2082,
"column": 7
}
}
@@ -174484,16 +173874,16 @@
"type": "Block",
"value": "*\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 ",
"range": [
- 72515,
- 72774
+ 72292,
+ 72551
],
"loc": {
"start": {
- "line": 2105,
+ "line": 2100,
"column": 4
},
"end": {
- "line": 2111,
+ "line": 2106,
"column": 7
}
}
@@ -174502,16 +173892,16 @@
"type": "Line",
"value": "Browser <> IE onload event works only for scripts, not for stylesheets",
"range": [
- 73484,
- 73556
+ 73261,
+ 73333
],
"loc": {
"start": {
- "line": 2135,
+ "line": 2130,
"column": 8
},
"end": {
- "line": 2135,
+ "line": 2130,
"column": 80
}
}
@@ -174520,16 +173910,16 @@
"type": "Block",
"value": "*\n * Check if table has filters grid\n * @return {Boolean}\n ",
"range": [
- 74109,
- 74184
+ 73886,
+ 73961
],
"loc": {
"start": {
- "line": 2152,
+ "line": 2147,
"column": 4
},
"end": {
- "line": 2155,
+ "line": 2150,
"column": 7
}
}
@@ -174538,16 +173928,16 @@
"type": "Block",
"value": "*\n * Get list of filter IDs\n * @return {[type]} [description]\n ",
"range": [
- 74251,
- 74330
+ 74028,
+ 74107
],
"loc": {
"start": {
- "line": 2160,
+ "line": 2155,
"column": 4
},
"end": {
- "line": 2163,
+ "line": 2158,
"column": 7
}
}
@@ -174556,16 +173946,16 @@
"type": "Block",
"value": "*\n * Get filtered (valid) rows indexes\n * @param {Boolean} reCalc Force calculation of filtered rows list\n * @return {Array} List of row indexes\n ",
"range": [
- 74397,
- 74573
+ 74174,
+ 74350
],
"loc": {
"start": {
- "line": 2168,
+ "line": 2163,
"column": 4
},
"end": {
- "line": 2172,
+ "line": 2167,
"column": 7
}
}
@@ -174574,16 +173964,16 @@
"type": "Block",
"value": "*\n * Get the index of the row containing the filters\n * @return {Number}\n ",
"range": [
- 75293,
- 75383
+ 75070,
+ 75160
],
"loc": {
"start": {
- "line": 2196,
+ "line": 2191,
"column": 4
},
"end": {
- "line": 2199,
+ "line": 2194,
"column": 7
}
}
@@ -174592,16 +173982,16 @@
"type": "Block",
"value": "*\n * Get the index of the headers row\n * @return {Number}\n ",
"range": [
- 75459,
- 75534
+ 75236,
+ 75311
],
"loc": {
"start": {
- "line": 2204,
+ "line": 2199,
"column": 4
},
"end": {
- "line": 2207,
+ "line": 2202,
"column": 7
}
}
@@ -174610,16 +174000,16 @@
"type": "Block",
"value": "*\n * Get the row index from where the filtering process start (1st filterable\n * row)\n * @return {Number}\n ",
"range": [
- 75605,
- 75732
+ 75382,
+ 75509
],
"loc": {
"start": {
- "line": 2212,
+ "line": 2207,
"column": 4
},
"end": {
- "line": 2216,
+ "line": 2211,
"column": 7
}
}
@@ -174628,16 +174018,16 @@
"type": "Block",
"value": "*\n * Get the index of the last row\n * @return {Number}\n ",
"range": [
- 75797,
- 75869
+ 75574,
+ 75646
],
"loc": {
"start": {
- "line": 2221,
+ "line": 2216,
"column": 4
},
"end": {
- "line": 2224,
+ "line": 2219,
"column": 7
}
}
@@ -174646,16 +174036,16 @@
"type": "Block",
"value": "*\n * Get the header DOM element for a given column index\n * @param {Number} colIndex Column index\n * @return {Element}\n ",
"range": [
- 75977,
- 76118
+ 75754,
+ 75895
],
"loc": {
"start": {
- "line": 2230,
+ "line": 2225,
"column": 4
},
"end": {
- "line": 2234,
+ "line": 2229,
"column": 7
}
}
@@ -174664,16 +174054,16 @@
"type": "Block",
"value": "*\n * Return the list of headers' text\n * @param {Boolean} excludeHiddenCols Optional: exclude hidden columns\n * @return {Array} list of headers' text\n ",
"range": [
- 76742,
- 76915
+ 76519,
+ 76692
],
"loc": {
"start": {
- "line": 2255,
+ "line": 2250,
"column": 4
},
"end": {
- "line": 2259,
+ "line": 2254,
"column": 7
}
}
@@ -174682,16 +174072,16 @@
"type": "Block",
"value": "*\n * Return the filter type for a specified column\n * @param {Number} colIndex Column's index\n * @return {String}\n ",
"range": [
- 77437,
- 77573
+ 77214,
+ 77350
],
"loc": {
"start": {
- "line": 2275,
+ "line": 2270,
"column": 4
},
"end": {
- "line": 2279,
+ "line": 2274,
"column": 7
}
}
@@ -174700,16 +174090,16 @@
"type": "Block",
"value": "*\n * Get the total number of filterable rows\n * @return {Number}\n ",
"range": [
- 77723,
- 77805
+ 77500,
+ 77582
],
"loc": {
"start": {
- "line": 2285,
+ "line": 2280,
"column": 4
},
"end": {
- "line": 2288,
+ "line": 2283,
"column": 7
}
}
@@ -174718,16 +174108,16 @@
"type": "Block",
"value": "*\n * Return the total number of valid rows\n * @param {Boolean} [reCalc=false] Forces calculation of filtered rows\n * @returns {Number}\n ",
"range": [
- 77883,
- 78039
+ 77660,
+ 77816
],
"loc": {
"start": {
- "line": 2293,
+ "line": 2288,
"column": 4
},
"end": {
- "line": 2297,
+ "line": 2292,
"column": 7
}
}
@@ -174736,16 +174126,16 @@
"type": "Block",
"value": "*\n * Get the configuration object (literal object)\n * @return {Object}\n ",
"range": [
- 78137,
- 78225
+ 77914,
+ 78002
],
"loc": {
"start": {
- "line": 2302,
+ "line": 2297,
"column": 4
},
"end": {
- "line": 2305,
+ "line": 2300,
"column": 7
}
}
diff --git a/docs/class/src/emitter.js~Emitter.html b/docs/class/src/emitter.js~Emitter.html
index 5e9bdd6e..f7daee34 100644
--- a/docs/class/src/emitter.js~Emitter.html
+++ b/docs/class/src/emitter.js~Emitter.html
@@ -3,7 +3,7 @@
- Emitter | tablefilter v0.2.33 API Document
+ Emitter | tablefilter v0.2.34 API Document
@@ -170,7 +170,8 @@
-
+
Creates an instance of Emitter.
+
@@ -317,14 +318,15 @@
- source
+ source
-
+ Creates an instance of Emitter.
+
@@ -360,7 +362,7 @@
- source
+ source
@@ -404,7 +406,7 @@
- source
+ source
@@ -463,7 +465,7 @@ the invoked function
- source
+ source
@@ -528,7 +530,7 @@ the invoked function
- source
+ source
diff --git a/docs/class/src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable.html b/docs/class/src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable.html
index 06d8ba6f..1d0e6135 100644
--- a/docs/class/src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable.html
+++ b/docs/class/src/extensions/advancedGrid/adapterEzEditTable.js~AdapterEzEditTable.html
@@ -3,7 +3,7 @@
- AdapterEzEditTable | tablefilter v0.2.33 API Document
+ AdapterEzEditTable | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/extensions/colOps/colOps.js~ColOps.html b/docs/class/src/extensions/colOps/colOps.js~ColOps.html
index 5868f0cf..94cbbc8a 100644
--- a/docs/class/src/extensions/colOps/colOps.js~ColOps.html
+++ b/docs/class/src/extensions/colOps/colOps.js~ColOps.html
@@ -3,7 +3,7 @@
- ColOps | tablefilter v0.2.33 API Document
+ ColOps | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/extensions/colsVisibility/colsVisibility.js~ColsVisibility.html b/docs/class/src/extensions/colsVisibility/colsVisibility.js~ColsVisibility.html
index 11b53727..9ffa246e 100644
--- a/docs/class/src/extensions/colsVisibility/colsVisibility.js~ColsVisibility.html
+++ b/docs/class/src/extensions/colsVisibility/colsVisibility.js~ColsVisibility.html
@@ -3,7 +3,7 @@
- ColsVisibility | tablefilter v0.2.33 API Document
+ ColsVisibility | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility.html b/docs/class/src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility.html
index e86ddb1b..5f00332d 100644
--- a/docs/class/src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility.html
+++ b/docs/class/src/extensions/filtersVisibility/filtersVisibility.js~FiltersVisibility.html
@@ -3,7 +3,7 @@
- FiltersVisibility | tablefilter v0.2.33 API Document
+ FiltersVisibility | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/extensions/sort/adapterSortabletable.js~AdapterSortableTable.html b/docs/class/src/extensions/sort/adapterSortabletable.js~AdapterSortableTable.html
index 8a950b80..08d631c2 100644
--- a/docs/class/src/extensions/sort/adapterSortabletable.js~AdapterSortableTable.html
+++ b/docs/class/src/extensions/sort/adapterSortabletable.js~AdapterSortableTable.html
@@ -3,7 +3,7 @@
- AdapterSortableTable | tablefilter v0.2.33 API Document
+ AdapterSortableTable | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/feature.js~Feature.html b/docs/class/src/feature.js~Feature.html
index 82a90d0a..58e08b77 100644
--- a/docs/class/src/feature.js~Feature.html
+++ b/docs/class/src/feature.js~Feature.html
@@ -3,7 +3,7 @@
- Feature | tablefilter v0.2.33 API Document
+ Feature | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/alternateRows.js~AlternateRows.html b/docs/class/src/modules/alternateRows.js~AlternateRows.html
index 13bb4a68..66422824 100644
--- a/docs/class/src/modules/alternateRows.js~AlternateRows.html
+++ b/docs/class/src/modules/alternateRows.js~AlternateRows.html
@@ -3,7 +3,7 @@
- AlternateRows | tablefilter v0.2.33 API Document
+ AlternateRows | tablefilter v0.2.34 API Document
@@ -109,13 +109,13 @@
@@ -135,7 +135,8 @@
-
+ Rows with alternating background color for improved readability
+
@@ -169,7 +170,7 @@
- Alternating rows color
+ Creates an instance of AlternateRows.
|
@@ -336,7 +337,8 @@
-
+
Apply background to all valid rows
+
@@ -749,14 +751,14 @@
- source
+ source
- Alternating rows color
+ Creates an instance of AlternateRows.
@@ -810,7 +812,7 @@
- source
+ source
@@ -850,7 +852,7 @@
- source
+ source
@@ -890,7 +892,7 @@
- source
+ source
@@ -933,7 +935,7 @@
- source
+ source
@@ -974,7 +976,7 @@
- source
+ source
@@ -1015,14 +1017,15 @@
- source
+ source
-
+ Apply background to all valid rows
+
@@ -1055,7 +1058,7 @@
- source
+ source
@@ -1127,7 +1130,7 @@
- source
+ source
@@ -1185,7 +1188,7 @@
- source
+ source
diff --git a/docs/class/src/modules/checkList.js~CheckList.html b/docs/class/src/modules/checkList.js~CheckList.html
index 70393ea9..bffb1aa8 100644
--- a/docs/class/src/modules/checkList.js~CheckList.html
+++ b/docs/class/src/modules/checkList.js~CheckList.html
@@ -3,7 +3,7 @@
- CheckList | tablefilter v0.2.33 API Document
+ CheckList | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/clearButton.js~ClearButton.html b/docs/class/src/modules/clearButton.js~ClearButton.html
index b562d7a8..6ed231d2 100644
--- a/docs/class/src/modules/clearButton.js~ClearButton.html
+++ b/docs/class/src/modules/clearButton.js~ClearButton.html
@@ -3,7 +3,7 @@
- ClearButton | tablefilter v0.2.33 API Document
+ ClearButton | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/dropdown.js~Dropdown.html b/docs/class/src/modules/dropdown.js~Dropdown.html
index 28278a9e..0c77d0d8 100644
--- a/docs/class/src/modules/dropdown.js~Dropdown.html
+++ b/docs/class/src/modules/dropdown.js~Dropdown.html
@@ -3,7 +3,7 @@
- Dropdown | tablefilter v0.2.33 API Document
+ Dropdown | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/gridLayout.js~GridLayout.html b/docs/class/src/modules/gridLayout.js~GridLayout.html
index 0e8c3d62..5dccc23c 100644
--- a/docs/class/src/modules/gridLayout.js~GridLayout.html
+++ b/docs/class/src/modules/gridLayout.js~GridLayout.html
@@ -3,7 +3,7 @@
- GridLayout | tablefilter v0.2.33 API Document
+ GridLayout | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/hash.js~Hash.html b/docs/class/src/modules/hash.js~Hash.html
index ddc00bf4..5fa63827 100644
--- a/docs/class/src/modules/hash.js~Hash.html
+++ b/docs/class/src/modules/hash.js~Hash.html
@@ -3,7 +3,7 @@
- Hash | tablefilter v0.2.33 API Document
+ Hash | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/help.js~Help.html b/docs/class/src/modules/help.js~Help.html
index 4317b1c9..b4a74ec6 100644
--- a/docs/class/src/modules/help.js~Help.html
+++ b/docs/class/src/modules/help.js~Help.html
@@ -3,7 +3,7 @@
- Help | tablefilter v0.2.33 API Document
+ Help | tablefilter v0.2.34 API Document
@@ -579,13 +579,14 @@
-
+ Initialise Help instance
+
|
@@ -1327,7 +1328,7 @@
- source
+ source
@@ -1570,7 +1571,7 @@
- source
+ source
@@ -1607,25 +1608,37 @@
- init()
+ init(): *
- source
+ source
-
+ Initialise Help instance
+
-
+
+ Return:
+
+
+ | * |
+ (description)
+ |
+
+
+
+
+
@@ -1651,7 +1664,7 @@
- source
+ source
diff --git a/docs/class/src/modules/highlightKeywords.js~HighlightKeyword.html b/docs/class/src/modules/highlightKeywords.js~HighlightKeyword.html
index 39decead..21e1b0f6 100644
--- a/docs/class/src/modules/highlightKeywords.js~HighlightKeyword.html
+++ b/docs/class/src/modules/highlightKeywords.js~HighlightKeyword.html
@@ -3,7 +3,7 @@
- HighlightKeyword | tablefilter v0.2.33 API Document
+ HighlightKeyword | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/loader.js~Loader.html b/docs/class/src/modules/loader.js~Loader.html
index d4fe2dcc..6930aa81 100644
--- a/docs/class/src/modules/loader.js~Loader.html
+++ b/docs/class/src/modules/loader.js~Loader.html
@@ -3,7 +3,7 @@
- Loader | tablefilter v0.2.33 API Document
+ Loader | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/noResults.js~NoResults.html b/docs/class/src/modules/noResults.js~NoResults.html
index 5179d8ed..23335915 100644
--- a/docs/class/src/modules/noResults.js~NoResults.html
+++ b/docs/class/src/modules/noResults.js~NoResults.html
@@ -3,7 +3,7 @@
- NoResults | tablefilter v0.2.33 API Document
+ NoResults | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/paging.js~Paging.html b/docs/class/src/modules/paging.js~Paging.html
index 572c93c0..84faa2d6 100644
--- a/docs/class/src/modules/paging.js~Paging.html
+++ b/docs/class/src/modules/paging.js~Paging.html
@@ -3,7 +3,7 @@
- Paging | tablefilter v0.2.33 API Document
+ Paging | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/popupFilter.js~PopupFilter.html b/docs/class/src/modules/popupFilter.js~PopupFilter.html
index a536e491..717ba59a 100644
--- a/docs/class/src/modules/popupFilter.js~PopupFilter.html
+++ b/docs/class/src/modules/popupFilter.js~PopupFilter.html
@@ -3,7 +3,7 @@
- PopupFilter | tablefilter v0.2.33 API Document
+ PopupFilter | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/rowsCounter.js~RowsCounter.html b/docs/class/src/modules/rowsCounter.js~RowsCounter.html
index df9eef8b..635ffd59 100644
--- a/docs/class/src/modules/rowsCounter.js~RowsCounter.html
+++ b/docs/class/src/modules/rowsCounter.js~RowsCounter.html
@@ -3,7 +3,7 @@
- RowsCounter | tablefilter v0.2.33 API Document
+ RowsCounter | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/state.js~State.html b/docs/class/src/modules/state.js~State.html
index 4c6ead46..69d4e893 100644
--- a/docs/class/src/modules/state.js~State.html
+++ b/docs/class/src/modules/state.js~State.html
@@ -3,7 +3,7 @@
- State | tablefilter v0.2.33 API Document
+ State | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/statusBar.js~StatusBar.html b/docs/class/src/modules/statusBar.js~StatusBar.html
index 9731c7b8..97c2c4db 100644
--- a/docs/class/src/modules/statusBar.js~StatusBar.html
+++ b/docs/class/src/modules/statusBar.js~StatusBar.html
@@ -3,7 +3,7 @@
- StatusBar | tablefilter v0.2.33 API Document
+ StatusBar | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/modules/storage.js~Storage.html b/docs/class/src/modules/storage.js~Storage.html
index 49335734..2a9f7d5a 100644
--- a/docs/class/src/modules/storage.js~Storage.html
+++ b/docs/class/src/modules/storage.js~Storage.html
@@ -3,7 +3,7 @@
- Storage | tablefilter v0.2.33 API Document
+ Storage | tablefilter v0.2.34 API Document
diff --git a/docs/class/src/tablefilter.js~TableFilter.html b/docs/class/src/tablefilter.js~TableFilter.html
index dd42e652..f80f88b5 100644
--- a/docs/class/src/tablefilter.js~TableFilter.html
+++ b/docs/class/src/tablefilter.js~TableFilter.html
@@ -3,7 +3,7 @@
- TableFilter | tablefilter v0.2.33 API Document
+ TableFilter | tablefilter v0.2.34 API Document
@@ -1549,31 +1549,6 @@ requires table or id arguments, row and <
-
- |
-
-
-
-
-
-
-
- |
-
-
-
- |
-
-
- |
- public
-
-
-
|
@@ -1600,31 +1575,6 @@ requires table or id arguments, row and <
-
- |
-
-
-
-
-
-
-
- |
-
-
-
- |
-
-
- |
- public
-
-
-
|
@@ -5763,7 +5713,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -5803,7 +5753,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -5843,7 +5793,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -5883,7 +5833,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -5923,7 +5873,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -5963,7 +5913,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6003,7 +5953,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6044,7 +5994,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6084,7 +6034,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6164,7 +6114,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6204,7 +6154,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6244,7 +6194,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6284,7 +6234,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6324,7 +6274,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6364,7 +6314,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6404,7 +6354,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6444,7 +6394,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6484,7 +6434,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6524,7 +6474,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6564,7 +6514,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6644,7 +6594,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6684,7 +6634,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6724,7 +6674,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6764,7 +6714,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6804,7 +6754,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6844,7 +6794,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6884,7 +6834,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6924,7 +6874,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -6964,7 +6914,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7004,7 +6954,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7045,7 +6995,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7085,7 +7035,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7125,7 +7075,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7166,7 +7116,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7207,7 +7157,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7287,7 +7237,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7327,7 +7277,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7367,7 +7317,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7408,7 +7358,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7448,7 +7398,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7488,7 +7438,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7528,7 +7478,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7569,7 +7519,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7609,7 +7559,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7649,7 +7599,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7689,7 +7639,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7730,7 +7680,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7770,7 +7720,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -7890,47 +7840,7 @@ requires table or id arguments, row and <
- source
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- public
-
-
-
-
- fltElms: *
-
-
-
- source
+ source
@@ -7999,46 +7909,6 @@ requires table or id arguments, row and <
-
-
-
- public
-
-
-
-
- fltGridEl: *
-
-
-
- source
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -8091,7 +7961,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8131,7 +8001,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8171,7 +8041,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8211,7 +8081,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8251,7 +8121,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8331,7 +8201,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8371,7 +8241,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8411,7 +8281,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8451,7 +8321,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8491,7 +8361,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8531,7 +8401,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8571,7 +8441,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8611,7 +8481,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8691,7 +8561,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8731,7 +8601,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8812,7 +8682,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8852,7 +8722,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8892,7 +8762,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8932,7 +8802,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -8972,7 +8842,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9012,7 +8882,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9052,7 +8922,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9092,7 +8962,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9132,7 +9002,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9172,7 +9042,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9212,7 +9082,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9252,7 +9122,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9292,7 +9162,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9332,7 +9202,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9372,7 +9242,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9412,7 +9282,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9452,7 +9322,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9492,7 +9362,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9532,7 +9402,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9572,7 +9442,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9612,7 +9482,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9732,7 +9602,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9772,7 +9642,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9812,7 +9682,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9853,7 +9723,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9893,7 +9763,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9933,7 +9803,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -9973,7 +9843,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10013,7 +9883,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10053,7 +9923,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10093,7 +9963,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10133,7 +10003,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10173,7 +10043,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10213,7 +10083,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10253,7 +10123,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10293,7 +10163,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10334,7 +10204,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10374,7 +10244,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10414,7 +10284,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10454,7 +10324,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10494,7 +10364,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10534,7 +10404,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10574,7 +10444,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10614,7 +10484,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10655,7 +10525,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10695,7 +10565,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10735,7 +10605,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10815,7 +10685,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10855,7 +10725,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10896,7 +10766,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10936,7 +10806,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -10976,7 +10846,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11016,7 +10886,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11056,7 +10926,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11096,7 +10966,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11136,7 +11006,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11176,7 +11046,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11256,7 +11126,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11296,7 +11166,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11336,7 +11206,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11377,7 +11247,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11417,7 +11287,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11497,7 +11367,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11537,7 +11407,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11577,7 +11447,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11617,7 +11487,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11657,7 +11527,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11737,7 +11607,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11777,7 +11647,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11860,7 +11730,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11918,7 +11788,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -11959,7 +11829,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12000,7 +11870,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12051,7 +11921,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12092,7 +11962,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12133,7 +12003,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12190,7 +12060,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12231,7 +12101,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12300,7 +12170,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12368,7 +12238,7 @@ requires table or id arguments, row and <
- source
+ source
@@ -12411,7 +12281,7 @@ hidden when all the search terms are not found in inspected row.
- source
+ source
@@ -12462,7 +12332,7 @@ hidden when all the search terms are not found in inspected row.
- source
+ source
@@ -12530,7 +12400,7 @@ hidden when all the search terms are not found in inspected row.
- source
+ source
@@ -12599,7 +12469,7 @@ hidden when all the search terms are not found in inspected row.
- source
+ source
@@ -12689,7 +12559,7 @@ hidden when all the search terms are not found in inspected row.
- source
+ source
@@ -12759,7 +12629,7 @@ hidden when all the search terms are not found in inspected row.
- source
+ source
@@ -12828,7 +12698,7 @@ custom options values and texts
- source
+ source
@@ -12896,7 +12766,7 @@ custom options values and texts
- source
+ source
@@ -12965,7 +12835,7 @@ custom options values and texts
- source
+ source
@@ -13033,7 +12903,7 @@ custom options values and texts
- source
+ source
@@ -13102,7 +12972,7 @@ custom options values and texts
- source
+ source
@@ -13153,7 +13023,7 @@ custom options values and texts
- source
+ source
@@ -13233,7 +13103,7 @@ custom options values and texts
- source
+ source
@@ -13310,7 +13180,7 @@ custom options values and texts
- source
+ source
@@ -13388,7 +13258,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13440,7 +13310,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13491,7 +13361,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13543,7 +13413,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13611,7 +13481,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13662,7 +13532,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13731,7 +13601,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13782,7 +13652,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13851,7 +13721,7 @@ Note: hidden filters are also returned
- source
+ source
@@ -13921,7 +13791,7 @@ defined
- source
+ source
@@ -13973,7 +13843,7 @@ row)
- source
+ source
@@ -14042,7 +13912,7 @@ row)
- source
+ source
@@ -14122,7 +13992,7 @@ row)
- source
+ source
@@ -14191,7 +14061,7 @@ row)
- source
+ source
@@ -14260,7 +14130,7 @@ row)
- source
+ source
@@ -14328,7 +14198,7 @@ row)
- source
+ source
@@ -14407,7 +14277,7 @@ row)
- source
+ source
@@ -14448,7 +14318,7 @@ row)
- source
+ source
@@ -14489,7 +14359,7 @@ row)
- source
+ source
@@ -14557,7 +14427,7 @@ row)
- source
+ source
@@ -14626,7 +14496,7 @@ row)
- source
+ source
@@ -14701,7 +14571,7 @@ row)
- source
+ source
@@ -14752,7 +14622,7 @@ row)
- source
+ source
@@ -14794,7 +14664,7 @@ row)
- source
+ source
@@ -14852,7 +14722,7 @@ row)
- source
+ source
@@ -14893,7 +14763,7 @@ row)
- source
+ source
@@ -14951,7 +14821,7 @@ row)
- source
+ source
@@ -14992,7 +14862,7 @@ row)
- source
+ source
@@ -15049,7 +14919,7 @@ row)
- source
+ source
@@ -15090,7 +14960,7 @@ row)
- source
+ source
@@ -15148,7 +15018,7 @@ columns
- source
+ source
@@ -15189,7 +15059,7 @@ columns
- source
+ source
@@ -15230,7 +15100,7 @@ columns
- source
+ source
@@ -15288,7 +15158,7 @@ columns
- source
+ source
@@ -15346,7 +15216,7 @@ columns
- source
+ source
@@ -15411,7 +15281,7 @@ columns
- source
+ source
@@ -15452,7 +15322,7 @@ columns
- source
+ source
@@ -15493,7 +15363,7 @@ columns
- source
+ source
diff --git a/docs/coverage.json b/docs/coverage.json
index 28905401..bf7a1473 100644
--- a/docs/coverage.json
+++ b/docs/coverage.json
@@ -1,7 +1,7 @@
{
- "coverage": "30.24%",
- "expectCount": 787,
- "actualCount": 238,
+ "coverage": "30.82%",
+ "expectCount": 785,
+ "actualCount": 242,
"files": {
"src/const.js": {
"expectCount": 13,
@@ -64,13 +64,11 @@
},
"src/modules/alternateRows.js": {
"expectCount": 11,
- "actualCount": 6,
+ "actualCount": 8,
"undocumentLines": [
- 4,
- 15,
- 36,
- 17,
- 39
+ 19,
+ 40,
+ 21
]
},
"src/modules/checkList.js": {
@@ -200,153 +198,149 @@
},
"src/emitter.js": {
"expectCount": 6,
- "actualCount": 5,
- "undocumentLines": [
- 5
- ]
+ "actualCount": 6,
+ "undocumentLines": []
},
"src/tablefilter.js": {
- "expectCount": 217,
+ "expectCount": 215,
"actualCount": 78,
"undocumentLines": [
- 381,
- 378,
+ 377,
+ 374,
38,
- 220,
- 182,
- 148,
- 260,
+ 216,
+ 178,
+ 144,
+ 256,
+ 305,
309,
- 313,
92,
- 288,
- 895,
- 897,
- 893,
+ 284,
891,
- 291,
- 293,
+ 893,
+ 889,
887,
- 886,
- 286,
- 170,
+ 287,
+ 289,
+ 883,
+ 882,
+ 282,
+ 166,
56,
- 341,
337,
- 151,
- 136,
- 270,
- 205,
- 202,
- 253,
333,
- 265,
- 180,
- 257,
- 84,
- 235,
- 269,
- 233,
- 146,
- 237,
- 267,
+ 147,
+ 132,
+ 266,
+ 201,
+ 198,
+ 249,
+ 329,
+ 261,
176,
- 173,
- 192,
- 190,
+ 253,
+ 84,
+ 231,
+ 265,
+ 229,
+ 142,
+ 233,
+ 263,
+ 172,
+ 169,
+ 188,
+ 186,
101,
107,
- 153,
- 113,
- 117,
+ 149,
111,
- 155,
- 157,
- 144,
- 264,
- 261,
+ 151,
+ 153,
+ 140,
+ 260,
+ 257,
99,
- 339,
335,
- 150,
- 252,
- 172,
- 364,
- 369,
- 184,
- 55,
- 213,
- 49,
- 119,
- 128,
- 574,
- 188,
- 245,
+ 331,
+ 146,
248,
- 312,
+ 168,
+ 360,
+ 365,
+ 180,
+ 55,
209,
+ 49,
+ 115,
+ 124,
+ 570,
+ 184,
+ 241,
+ 244,
+ 308,
+ 205,
+ 117,
+ 126,
+ 259,
+ 174,
+ 262,
+ 247,
+ 276,
+ 898,
+ 899,
+ 258,
121,
130,
- 263,
- 178,
- 266,
- 251,
- 280,
- 902,
- 903,
- 262,
- 125,
- 134,
- 218,
+ 214,
58,
57,
- 303,
- 258,
- 239,
- 226,
- 168,
- 298,
- 223,
- 165,
- 295,
- 194,
- 199,
- 241,
- 259,
- 216,
+ 299,
+ 254,
+ 235,
+ 222,
+ 164,
+ 294,
+ 219,
+ 161,
+ 291,
+ 190,
+ 195,
+ 237,
+ 255,
+ 212,
+ 343,
347,
- 351,
- 353,
- 357,
- 355,
- 359,
349,
- 123,
- 132,
+ 353,
+ 351,
+ 355,
+ 345,
+ 119,
+ 128,
54,
- 375,
- 274,
- 271,
- 159,
- 197,
- 246,
- 249,
- 243,
- 268,
+ 371,
+ 270,
+ 267,
+ 155,
+ 193,
+ 242,
+ 245,
+ 239,
+ 264,
53,
- 324,
- 277,
- 141,
- 142,
+ 320,
+ 273,
+ 137,
+ 138,
52,
- 370,
- 372,
- 330,
- 211,
- 115,
+ 366,
+ 368,
+ 326,
+ 207,
+ 113,
50,
- 186,
- 208,
+ 182,
+ 204,
51
]
},
@@ -447,7 +441,7 @@
},
"src/modules/help.js": {
"expectCount": 19,
- "actualCount": 3,
+ "actualCount": 4,
"undocumentLines": [
10,
48,
@@ -458,8 +452,7 @@
45,
24,
51,
- 66,
- 118,
+ 123,
37,
27,
61,
diff --git a/docs/dump.json b/docs/dump.json
index a0ee0997..141d0fb9 100644
--- a/docs/dump.json
+++ b/docs/dump.json
@@ -364,11 +364,31 @@
"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"
+ "lineNumber": 1,
+ "content": "import {root} from './root';\n\n/**\n * Cookie utilities\n */\n\nconst doc = root.document;\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 doc.cookie = name + '=' + escape(value) + expire;\n },\n\n read(name) {\n let cookieValue = '',\n search = name + '=';\n if (doc.cookie.length > 0) {\n let cookie = doc.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__": 17,
+ "kind": "variable",
+ "static": true,
+ "variation": null,
+ "name": "doc",
+ "memberof": "src/cookie.js",
+ "longname": "src/cookie.js~doc",
+ "access": null,
+ "export": false,
+ "importPath": "tablefilter/src/cookie.js",
+ "importStyle": null,
+ "description": "Cookie utilities",
+ "lineNumber": 7,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 18,
"kind": "file",
"static": true,
"variation": null,
@@ -381,7 +401,7 @@
"content": "/**\n * Date utilities\n */\n\n/**\n * Verifies passed formatted date string is valid\n * @param {String} dateStr Formatted date string\n * @param {String} format accepted formats: 'DMY', 'MDY', 'YMD', 'DDMMMYYYY'\n * @return {Boolean}\n */\nexport const isValidDate = (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 = formatDate(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\n/**\n * Converts formatted date into a Date object\n * @param {String} dateStr Formatted date string\n * @param {String} format accepted formats: 'DMY', 'MDY', 'YMD', 'DDMMMYYYY'\n * @return {Object} date object\n */\nexport const formatDate = (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\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__": 18,
+ "__docId__": 19,
"kind": "variable",
"static": true,
"variation": null,
@@ -431,7 +451,7 @@
}
},
{
- "__docId__": 19,
+ "__docId__": 20,
"kind": "variable",
"static": true,
"variation": null,
@@ -481,7 +501,7 @@
}
},
{
- "__docId__": 20,
+ "__docId__": 21,
"kind": "function",
"static": true,
"variation": null,
@@ -511,7 +531,7 @@
"generator": false
},
{
- "__docId__": 21,
+ "__docId__": 22,
"kind": "function",
"static": true,
"variation": null,
@@ -541,7 +561,7 @@
"generator": false
},
{
- "__docId__": 22,
+ "__docId__": 23,
"kind": "file",
"static": true,
"variation": null,
@@ -554,7 +574,7 @@
"content": "import {root} from './root';\nimport {isArray, isString, isUndef} from './types';\nimport {trim} from './string';\n\n/**\n * DOM utilities\n */\n\nconst doc = root.document;\n\n/**\n * Returns text + text of children of given node\n * @param {NodeElement} node\n * @return {String}\n */\nexport const getText = node => {\n if (isUndef(node.textContent)) {\n return trim(node.innerText);\n }\n return 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 */\nexport const 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 */\nexport const createElm = (...args) => {\n let tag = args[0];\n if (!isString(tag)) {\n return null;\n }\n\n let el = doc.createElement(tag);\n for (let i = 0; i < args.length; i++) {\n let arg = args[i];\n\n if (isArray(arg) && arg.length === 2) {\n el.setAttribute(arg[0], arg[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 */\nexport const removeElm = node => node.parentNode.removeChild(node);\n\n/**\n * Returns a text node with given text\n * @param {String} txt\n * @return {Object}\n */\nexport const createText = txt => doc.createTextNode(txt);\n\n/**\n * Determine whether the passed elements is assigned the given class\n * @param {DOMElement} ele DOM element\n * @param {String} cls CSS class name\n * @returns {Boolean}\n */\nexport const hasClass = (ele, cls) => {\n if (isUndef(ele)) {\n return false;\n }\n\n if (supportsClassList()) {\n return ele.classList.contains(cls);\n }\n return ele.className.match(new RegExp('(\\\\s|^)' + cls + '(\\\\s|$)'));\n}\n\n/**\n * Adds the specified class to the passed element\n * @param {DOMElement} ele DOM element\n * @param {String} cls CSS class name\n */\nexport const addClass = (ele, cls) => {\n if (isUndef(ele)) {\n return;\n }\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 (!hasClass(ele, cls)) {\n ele.className += ' ' + cls;\n }\n}\n\n/**\n * Removes the specified class to the passed element\n * @param {DOMElement} ele DOM element\n * @param {String} cls CSS class name\n */\nexport const removeClass = (ele, cls) => {\n if (isUndef(ele)) {\n return;\n }\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 */\nexport const createOpt = (text, value, isSel) => {\n let isSelected = isSel ? true : false;\n let opt = isSelected ?\n createElm('option', ['value', value], ['selected', 'true']) :\n createElm('option', ['value', value]);\n opt.appendChild(createText(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 */\nexport const createCheckItem = (chkIndex, chkValue, labelText) => {\n let li = createElm('li');\n let label = createElm('label', ['for', chkIndex]);\n let check = createElm('input',\n ['id', chkIndex],\n ['name', chkIndex],\n ['type', 'checkbox'],\n ['value', chkValue]\n );\n label.appendChild(check);\n label.appendChild(createText(labelText));\n li.appendChild(label);\n li.label = label;\n li.check = check;\n return li;\n}\n\n/**\n * Returns the element matching the supplied Id\n * @param {String} id Element identifier\n * @return {DOMElement}\n */\nexport const elm = id => doc.getElementById(id);\n\n/**\n * Returns list of element matching the supplied tag name\n * @param {String} tagname Tag name\n * @return {NodeList}\n */\nexport const tag = (o, tagname) => o.getElementsByTagName(tagname);\n\n// HTML5 classList API\nfunction supportsClassList() {\n return doc.documentElement.classList;\n}\n"
},
{
- "__docId__": 23,
+ "__docId__": 24,
"kind": "variable",
"static": true,
"variation": null,
@@ -574,7 +594,7 @@
}
},
{
- "__docId__": 24,
+ "__docId__": 25,
"kind": "variable",
"static": true,
"variation": null,
@@ -614,7 +634,7 @@
}
},
{
- "__docId__": 25,
+ "__docId__": 26,
"kind": "variable",
"static": true,
"variation": null,
@@ -654,7 +674,7 @@
}
},
{
- "__docId__": 26,
+ "__docId__": 27,
"kind": "variable",
"static": true,
"variation": null,
@@ -704,7 +724,7 @@
}
},
{
- "__docId__": 27,
+ "__docId__": 28,
"kind": "variable",
"static": true,
"variation": null,
@@ -744,7 +764,7 @@
}
},
{
- "__docId__": 28,
+ "__docId__": 29,
"kind": "variable",
"static": true,
"variation": null,
@@ -784,7 +804,7 @@
}
},
{
- "__docId__": 29,
+ "__docId__": 30,
"kind": "variable",
"static": true,
"variation": null,
@@ -840,7 +860,7 @@
}
},
{
- "__docId__": 30,
+ "__docId__": 31,
"kind": "variable",
"static": true,
"variation": null,
@@ -882,7 +902,7 @@
}
},
{
- "__docId__": 31,
+ "__docId__": 32,
"kind": "variable",
"static": true,
"variation": null,
@@ -924,7 +944,7 @@
}
},
{
- "__docId__": 32,
+ "__docId__": 33,
"kind": "variable",
"static": true,
"variation": null,
@@ -984,7 +1004,7 @@
}
},
{
- "__docId__": 33,
+ "__docId__": 34,
"kind": "variable",
"static": true,
"variation": null,
@@ -1044,7 +1064,7 @@
}
},
{
- "__docId__": 34,
+ "__docId__": 35,
"kind": "variable",
"static": true,
"variation": null,
@@ -1084,7 +1104,7 @@
}
},
{
- "__docId__": 35,
+ "__docId__": 36,
"kind": "variable",
"static": true,
"variation": null,
@@ -1124,7 +1144,7 @@
}
},
{
- "__docId__": 36,
+ "__docId__": 37,
"kind": "function",
"static": true,
"variation": null,
@@ -1147,7 +1167,7 @@
"generator": false
},
{
- "__docId__": 37,
+ "__docId__": 38,
"kind": "file",
"static": true,
"variation": null,
@@ -1157,10 +1177,10 @@
"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"
+ "content": "/**\n * Event emitter class\n */\nexport class Emitter {\n /**\n * Creates an instance of Emitter.\n */\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__": 38,
+ "__docId__": 39,
"kind": "class",
"static": true,
"variation": null,
@@ -1176,7 +1196,7 @@
"interface": false
},
{
- "__docId__": 39,
+ "__docId__": 40,
"kind": "constructor",
"static": false,
"variation": null,
@@ -1184,14 +1204,13 @@
"memberof": "src/emitter.js~Emitter",
"longname": "src/emitter.js~Emitter#constructor",
"access": null,
- "description": null,
- "lineNumber": 5,
- "undocument": true,
+ "description": "Creates an instance of Emitter.",
+ "lineNumber": 8,
"params": [],
"generator": false
},
{
- "__docId__": 40,
+ "__docId__": 41,
"kind": "member",
"static": false,
"variation": null,
@@ -1200,7 +1219,7 @@
"longname": "src/emitter.js~Emitter#events",
"access": null,
"description": "Events object",
- "lineNumber": 10,
+ "lineNumber": 13,
"type": {
"nullable": null,
"types": [
@@ -1211,7 +1230,7 @@
}
},
{
- "__docId__": 41,
+ "__docId__": 42,
"kind": "method",
"static": false,
"variation": null,
@@ -1220,42 +1239,7 @@
"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__": 42,
- "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,
+ "lineNumber": 21,
"params": [
{
"nullable": null,
@@ -1285,12 +1269,47 @@
"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": 33,
+ "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__": 44,
+ "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,
+ "lineNumber": 46,
"params": [
{
"nullable": null,
@@ -1306,7 +1325,7 @@
"generator": false
},
{
- "__docId__": 44,
+ "__docId__": 45,
"kind": "file",
"static": true,
"variation": null,
@@ -1316,10 +1335,10 @@
"access": null,
"description": null,
"lineNumber": 1,
- "content": "import {root} from './root';\n\n/**\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 = root.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 = root.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) || (root.event && root.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"
+ "content": "import {root} from './root';\n\n/**\n * DOM event utilities\n */\n\nexport default {\n /**\n * Add event handler for specified event on passed element\n *\n * @param {DOMElement} obj Element\n * @param {String} type Event type\n * @param {Function} Handler\n * @param {Boolean} capture Specifiy whether the event should be executed in\n * the capturing or in the bubbling phase\n */\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 /**\n * Remove event handler for specified event on passed element\n *\n * @param {DOMElement} obj Element\n * @param {String} type Event type\n * @param {Function} Handler\n * @param {Boolean} capture Specifiy whether the event should be executed in\n * the capturing or in the bubbling phase\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 /**\n * Prevents further propagation of the current event in the bubbling phase\n *\n * @param {Event} evt Event on the DOM\n */\n stop(evt) {\n if (!evt) {\n evt = root.event;\n }\n if (evt.stopPropagation) {\n evt.stopPropagation();\n } else {\n evt.cancelBubble = true;\n }\n },\n /**\n * Cancels the event if it is cancelable, without stopping further\n * propagation of the event.\n *\n * @param {Event} evt Event on the DOM\n */\n cancel(evt) {\n if (!evt) {\n evt = root.event;\n }\n if (evt.preventDefault) {\n evt.preventDefault();\n } else {\n evt.returnValue = false;\n }\n },\n /**\n * Reference to the object that dispatched the event\n *\n * @param {Event} evt Event on the DOM\n * @returns {DOMElement}\n */\n target(evt) {\n if (!evt) {\n evt = root.event;\n }\n return evt.target || evt.srcElement;\n },\n /**\n * Returns the Unicode value of pressed key\n *\n * @param {Event} evt Event on the DOM\n * @returns {Number}\n */\n keyCode(evt) {\n return evt.charCode ? evt.charCode :\n (evt.keyCode ? evt.keyCode : (evt.which ? evt.which : 0));\n }\n};\n"
},
{
- "__docId__": 45,
+ "__docId__": 46,
"kind": "file",
"static": true,
"variation": null,
@@ -1332,7 +1351,7 @@
"content": "import {Feature} from '../../feature';\nimport {tag} from '../../dom';\nimport {INPUT} from '../../const';\nimport {root} from '../../root';\n\nconst INSTANTIATION_ERROR = `Failed to instantiate EditTable object.\n \\n\"ezEditTable\" dependency not found.`;\n\nexport default class AdapterEzEditTable extends Feature {\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 super(tf, cfg.name);\n\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\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.enable();\n }\n\n /**\n * Conditionally load ezEditTable library and set advanced grid\n * @return {[type]} [description]\n */\n init() {\n if (this.initialized) {\n return;\n }\n var tf = this.tf;\n if (root.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 this.initialized = true;\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 = 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) :\n 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.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.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(INSTANTIATION_ERROR); }\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 === INPUT) {\n this.toggle();\n }\n }\n\n /**\n * Remove advanced grid\n */\n destroy() {\n if (!this.initialized) {\n return;\n }\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__": 46,
+ "__docId__": 47,
"kind": "variable",
"static": true,
"variation": null,
@@ -1353,7 +1372,7 @@
}
},
{
- "__docId__": 47,
+ "__docId__": 48,
"kind": "class",
"static": true,
"variation": null,
@@ -1373,7 +1392,7 @@
]
},
{
- "__docId__": 48,
+ "__docId__": 49,
"kind": "constructor",
"static": false,
"variation": null,
@@ -1398,7 +1417,7 @@
"generator": false
},
{
- "__docId__": 49,
+ "__docId__": 50,
"kind": "member",
"static": false,
"variation": null,
@@ -1416,7 +1435,7 @@
}
},
{
- "__docId__": 50,
+ "__docId__": 51,
"kind": "member",
"static": false,
"variation": null,
@@ -1434,7 +1453,7 @@
}
},
{
- "__docId__": 51,
+ "__docId__": 52,
"kind": "member",
"static": false,
"variation": null,
@@ -1452,7 +1471,7 @@
}
},
{
- "__docId__": 52,
+ "__docId__": 53,
"kind": "member",
"static": false,
"variation": null,
@@ -1470,7 +1489,7 @@
}
},
{
- "__docId__": 53,
+ "__docId__": 54,
"kind": "member",
"static": false,
"variation": null,
@@ -1488,7 +1507,7 @@
}
},
{
- "__docId__": 54,
+ "__docId__": 55,
"kind": "member",
"static": false,
"variation": null,
@@ -1506,7 +1525,7 @@
}
},
{
- "__docId__": 55,
+ "__docId__": 56,
"kind": "member",
"static": false,
"variation": null,
@@ -1524,7 +1543,7 @@
}
},
{
- "__docId__": 56,
+ "__docId__": 57,
"kind": "member",
"static": false,
"variation": null,
@@ -1542,7 +1561,7 @@
}
},
{
- "__docId__": 57,
+ "__docId__": 58,
"kind": "member",
"static": false,
"variation": null,
@@ -1560,7 +1579,7 @@
}
},
{
- "__docId__": 58,
+ "__docId__": 59,
"kind": "method",
"static": false,
"variation": null,
@@ -1582,7 +1601,7 @@
"generator": false
},
{
- "__docId__": 59,
+ "__docId__": 60,
"kind": "member",
"static": false,
"variation": null,
@@ -1600,7 +1619,7 @@
}
},
{
- "__docId__": 60,
+ "__docId__": 61,
"kind": "method",
"static": false,
"variation": null,
@@ -1614,7 +1633,7 @@
"generator": false
},
{
- "__docId__": 61,
+ "__docId__": 62,
"kind": "member",
"static": false,
"variation": null,
@@ -1632,7 +1651,7 @@
}
},
{
- "__docId__": 62,
+ "__docId__": 63,
"kind": "member",
"static": false,
"variation": null,
@@ -1650,7 +1669,7 @@
}
},
{
- "__docId__": 63,
+ "__docId__": 64,
"kind": "method",
"static": false,
"variation": null,
@@ -1664,7 +1683,7 @@
"generator": false
},
{
- "__docId__": 64,
+ "__docId__": 65,
"kind": "method",
"static": false,
"variation": null,
@@ -1678,7 +1697,7 @@
"generator": false
},
{
- "__docId__": 65,
+ "__docId__": 66,
"kind": "method",
"static": false,
"variation": null,
@@ -1693,7 +1712,7 @@
"generator": false
},
{
- "__docId__": 66,
+ "__docId__": 67,
"kind": "method",
"static": false,
"variation": null,
@@ -1707,7 +1726,7 @@
"generator": false
},
{
- "__docId__": 67,
+ "__docId__": 68,
"kind": "member",
"static": false,
"variation": null,
@@ -1725,7 +1744,7 @@
}
},
{
- "__docId__": 68,
+ "__docId__": 69,
"kind": "file",
"static": true,
"variation": null,
@@ -1738,7 +1757,7 @@
"content": "import AdapterEzEditTable from './adapterEzEditTable';\n\nexport default AdapterEzEditTable;"
},
{
- "__docId__": 69,
+ "__docId__": 70,
"kind": "file",
"static": true,
"variation": null,
@@ -1751,7 +1770,7 @@
"content": "import {Feature} from '../../feature';\nimport {createText, elm} from '../../dom';\nimport {isArray, isFn, isUndef} from '../../types';\n\nexport default class ColOps extends Feature {\n\n /**\n * Column calculations\n * @param {Object} tf TableFilter instance\n */\n constructor(tf, opts) {\n super(tf, opts.name);\n\n //calls function before col operation\n this.onBeforeOperation = isFn(opts.on_before_operation) ?\n opts.on_before_operation : null;\n //calls function after col operation\n this.onAfterOperation = isFn(opts.on_after_operation) ?\n opts.on_after_operation : null;\n\n this.opts = opts;\n this.enable();\n }\n\n init() {\n if (this.initialized) {\n return;\n }\n // subscribe to events\n this.tf.emitter.on(['after-filtering'], () => this.calc());\n\n this.calc();\n this.initialized = true;\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.isInitialized()) {\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 = 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 (isArray(labelId) && isArray(colIndex) && isArray(operation)) {\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] = operation[k].toLowerCase();\n decThisCol[mThisCol] = decimalPrecision[k];\n labThisCol[mThisCol] = labelId[k];\n oTypeThisCol = isArray(outputType) ?\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 = (theList[nbvalues / 2] +\n 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 (elm(labThisCol[i])) {\n switch (oTypeThisCol.toLowerCase()) {\n case 'innerhtml':\n if (isNaN(result) || !isFinite(result) ||\n nbvalues === 0) {\n elm(labThisCol[i]).innerHTML = '.';\n } else {\n elm(labThisCol[i]).innerHTML = result;\n }\n break;\n case 'setvalue':\n elm(labThisCol[i]).value = result;\n break;\n case 'createtextnode':\n var oldnode =\n elm(labThisCol[i]).firstChild;\n var txtnode = createText(result);\n elm(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 elm(labThisCol[i]).innerHTML = '.';\n } else {\n elm(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 if (!this.initialized) {\n return;\n }\n // unsubscribe to events\n this.tf.emitter.off(['after-filtering'], () => this.calc());\n this.initialized = false;\n }\n\n}\n"
},
{
- "__docId__": 70,
+ "__docId__": 71,
"kind": "class",
"static": true,
"variation": null,
@@ -1771,7 +1790,7 @@
]
},
{
- "__docId__": 71,
+ "__docId__": 72,
"kind": "constructor",
"static": false,
"variation": null,
@@ -1796,7 +1815,7 @@
"generator": false
},
{
- "__docId__": 72,
+ "__docId__": 73,
"kind": "member",
"static": false,
"variation": null,
@@ -1814,7 +1833,7 @@
}
},
{
- "__docId__": 73,
+ "__docId__": 74,
"kind": "member",
"static": false,
"variation": null,
@@ -1832,7 +1851,7 @@
}
},
{
- "__docId__": 74,
+ "__docId__": 75,
"kind": "member",
"static": false,
"variation": null,
@@ -1850,7 +1869,7 @@
}
},
{
- "__docId__": 75,
+ "__docId__": 76,
"kind": "method",
"static": false,
"variation": null,
@@ -1865,7 +1884,7 @@
"generator": false
},
{
- "__docId__": 76,
+ "__docId__": 77,
"kind": "member",
"static": false,
"variation": null,
@@ -1883,7 +1902,7 @@
}
},
{
- "__docId__": 77,
+ "__docId__": 78,
"kind": "method",
"static": false,
"variation": null,
@@ -1897,7 +1916,7 @@
"generator": false
},
{
- "__docId__": 78,
+ "__docId__": 79,
"kind": "method",
"static": false,
"variation": null,
@@ -1912,7 +1931,7 @@
"generator": false
},
{
- "__docId__": 79,
+ "__docId__": 80,
"kind": "member",
"static": false,
"variation": null,
@@ -1930,7 +1949,7 @@
}
},
{
- "__docId__": 80,
+ "__docId__": 81,
"kind": "file",
"static": true,
"variation": null,
@@ -1943,7 +1962,7 @@
"content": "import {Feature} from '../../feature';\nimport {\n addClass, removeClass, createCheckItem, createElm, elm, removeElm,\n getText, tag\n} from '../../dom';\nimport {isFn} from '../../types';\nimport Event from '../../event';\n\nexport default class ColsVisibility extends Feature {\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 super(tf, f.name);\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▼';\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 = tag(tf.tbl, 'col').length > 0;\n\n //callback invoked just after cols manager is loaded\n this.onLoaded = isFn(f.on_loaded) ? f.on_loaded : null;\n //calls function before cols manager is opened\n this.onBeforeOpen = isFn(f.on_before_open) ? f.on_before_open : null;\n //calls function after cols manager is opened\n this.onAfterOpen = isFn(f.on_after_open) ? f.on_after_open : null;\n //calls function before cols manager is closed\n this.onBeforeClose = isFn(f.on_before_close) ? f.on_before_close : null;\n //calls function after cols manager is closed\n this.onAfterClose = isFn(f.on_after_close) ? f.on_after_close : null;\n\n //callback before col is hidden\n this.onBeforeColHidden = isFn(f.on_before_col_hidden) ?\n f.on_before_col_hidden : null;\n //callback after col is hidden\n this.onAfterColHidden = isFn(f.on_after_col_hidden) ?\n f.on_after_col_hidden : null;\n //callback before col is displayed\n this.onBeforeColDisplayed = isFn(f.on_before_col_displayed) ?\n f.on_before_col_displayed : null;\n //callback after col is displayed\n this.onAfterColDisplayed = 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.enable();\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 addClass(li, this.listSlcItemCssClass);\n } else {\n 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.initialized || !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', this.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 = createElm('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 : elm(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 = createElm('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 createElm('div', ['id', this.prfxCont + tf.id]) :\n elm(this.contElTgtId);\n container.className = this.contCssClass;\n\n //Extension description\n let extNameLabel = createElm('p');\n extNameLabel.innerHTML = this.text;\n container.appendChild(extNameLabel);\n\n //Headers list\n let ul = createElm('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 = createCheckItem('col__' + tf.id, this.tickAllText,\n this.tickAllText);\n 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 = elm('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 = createCheckItem('col_' + i + '_' + tf.id, cellText,\n cellText);\n addClass(liElm, this.listItemCssClass);\n if (!this.tickToHide) {\n 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 = createElm('p', ['align', 'center']);\n let btn;\n //Close link\n if (!this.btnCloseHtml) {\n btn = createElm('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 = elm('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 = elm('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.initialized) {\n return;\n }\n if (elm(this.contElTgtId)) {\n elm(this.contElTgtId).innerHTML = '';\n } else {\n this.contEl.innerHTML = '';\n removeElm(this.contEl);\n this.contEl = null;\n }\n this.btnEl.innerHTML = '';\n removeElm(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 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__": 81,
+ "__docId__": 82,
"kind": "class",
"static": true,
"variation": null,
@@ -1963,7 +1982,7 @@
]
},
{
- "__docId__": 82,
+ "__docId__": 83,
"kind": "constructor",
"static": false,
"variation": null,
@@ -1998,7 +2017,7 @@
"generator": false
},
{
- "__docId__": 83,
+ "__docId__": 84,
"kind": "member",
"static": false,
"variation": null,
@@ -2016,7 +2035,7 @@
}
},
{
- "__docId__": 84,
+ "__docId__": 85,
"kind": "member",
"static": false,
"variation": null,
@@ -2034,7 +2053,7 @@
}
},
{
- "__docId__": 85,
+ "__docId__": 86,
"kind": "member",
"static": false,
"variation": null,
@@ -2052,7 +2071,7 @@
}
},
{
- "__docId__": 86,
+ "__docId__": 87,
"kind": "member",
"static": false,
"variation": null,
@@ -2070,7 +2089,7 @@
}
},
{
- "__docId__": 87,
+ "__docId__": 88,
"kind": "member",
"static": false,
"variation": null,
@@ -2088,7 +2107,7 @@
}
},
{
- "__docId__": 88,
+ "__docId__": 89,
"kind": "member",
"static": false,
"variation": null,
@@ -2106,7 +2125,7 @@
}
},
{
- "__docId__": 89,
+ "__docId__": 90,
"kind": "member",
"static": false,
"variation": null,
@@ -2124,7 +2143,7 @@
}
},
{
- "__docId__": 90,
+ "__docId__": 91,
"kind": "member",
"static": false,
"variation": null,
@@ -2142,7 +2161,7 @@
}
},
{
- "__docId__": 91,
+ "__docId__": 92,
"kind": "member",
"static": false,
"variation": null,
@@ -2160,7 +2179,7 @@
}
},
{
- "__docId__": 92,
+ "__docId__": 93,
"kind": "member",
"static": false,
"variation": null,
@@ -2178,7 +2197,7 @@
}
},
{
- "__docId__": 93,
+ "__docId__": 94,
"kind": "member",
"static": false,
"variation": null,
@@ -2196,7 +2215,7 @@
}
},
{
- "__docId__": 94,
+ "__docId__": 95,
"kind": "member",
"static": false,
"variation": null,
@@ -2214,7 +2233,7 @@
}
},
{
- "__docId__": 95,
+ "__docId__": 96,
"kind": "member",
"static": false,
"variation": null,
@@ -2232,7 +2251,7 @@
}
},
{
- "__docId__": 96,
+ "__docId__": 97,
"kind": "member",
"static": false,
"variation": null,
@@ -2250,7 +2269,7 @@
}
},
{
- "__docId__": 97,
+ "__docId__": 98,
"kind": "member",
"static": false,
"variation": null,
@@ -2268,7 +2287,7 @@
}
},
{
- "__docId__": 98,
+ "__docId__": 99,
"kind": "member",
"static": false,
"variation": null,
@@ -2286,7 +2305,7 @@
}
},
{
- "__docId__": 99,
+ "__docId__": 100,
"kind": "member",
"static": false,
"variation": null,
@@ -2304,7 +2323,7 @@
}
},
{
- "__docId__": 100,
+ "__docId__": 101,
"kind": "member",
"static": false,
"variation": null,
@@ -2322,7 +2341,7 @@
}
},
{
- "__docId__": 101,
+ "__docId__": 102,
"kind": "member",
"static": false,
"variation": null,
@@ -2340,7 +2359,7 @@
}
},
{
- "__docId__": 102,
+ "__docId__": 103,
"kind": "member",
"static": false,
"variation": null,
@@ -2358,7 +2377,7 @@
}
},
{
- "__docId__": 103,
+ "__docId__": 104,
"kind": "member",
"static": false,
"variation": null,
@@ -2376,7 +2395,7 @@
}
},
{
- "__docId__": 104,
+ "__docId__": 105,
"kind": "member",
"static": false,
"variation": null,
@@ -2394,7 +2413,7 @@
}
},
{
- "__docId__": 105,
+ "__docId__": 106,
"kind": "member",
"static": false,
"variation": null,
@@ -2412,7 +2431,7 @@
}
},
{
- "__docId__": 106,
+ "__docId__": 107,
"kind": "member",
"static": false,
"variation": null,
@@ -2430,7 +2449,7 @@
}
},
{
- "__docId__": 107,
+ "__docId__": 108,
"kind": "member",
"static": false,
"variation": null,
@@ -2448,7 +2467,7 @@
}
},
{
- "__docId__": 108,
+ "__docId__": 109,
"kind": "member",
"static": false,
"variation": null,
@@ -2466,7 +2485,7 @@
}
},
{
- "__docId__": 109,
+ "__docId__": 110,
"kind": "member",
"static": false,
"variation": null,
@@ -2484,7 +2503,7 @@
}
},
{
- "__docId__": 110,
+ "__docId__": 111,
"kind": "member",
"static": false,
"variation": null,
@@ -2502,7 +2521,7 @@
}
},
{
- "__docId__": 111,
+ "__docId__": 112,
"kind": "member",
"static": false,
"variation": null,
@@ -2520,7 +2539,7 @@
}
},
{
- "__docId__": 112,
+ "__docId__": 113,
"kind": "member",
"static": false,
"variation": null,
@@ -2538,7 +2557,7 @@
}
},
{
- "__docId__": 113,
+ "__docId__": 114,
"kind": "member",
"static": false,
"variation": null,
@@ -2556,7 +2575,7 @@
}
},
{
- "__docId__": 114,
+ "__docId__": 115,
"kind": "member",
"static": false,
"variation": null,
@@ -2574,7 +2593,7 @@
}
},
{
- "__docId__": 115,
+ "__docId__": 116,
"kind": "member",
"static": false,
"variation": null,
@@ -2592,7 +2611,7 @@
}
},
{
- "__docId__": 116,
+ "__docId__": 117,
"kind": "member",
"static": false,
"variation": null,
@@ -2610,7 +2629,7 @@
}
},
{
- "__docId__": 117,
+ "__docId__": 118,
"kind": "member",
"static": false,
"variation": null,
@@ -2628,7 +2647,7 @@
}
},
{
- "__docId__": 118,
+ "__docId__": 119,
"kind": "member",
"static": false,
"variation": null,
@@ -2646,7 +2665,7 @@
}
},
{
- "__docId__": 119,
+ "__docId__": 120,
"kind": "member",
"static": false,
"variation": null,
@@ -2664,7 +2683,7 @@
}
},
{
- "__docId__": 120,
+ "__docId__": 121,
"kind": "member",
"static": false,
"variation": null,
@@ -2682,7 +2701,7 @@
}
},
{
- "__docId__": 121,
+ "__docId__": 122,
"kind": "member",
"static": false,
"variation": null,
@@ -2700,7 +2719,7 @@
}
},
{
- "__docId__": 122,
+ "__docId__": 123,
"kind": "member",
"static": false,
"variation": null,
@@ -2718,7 +2737,7 @@
}
},
{
- "__docId__": 123,
+ "__docId__": 124,
"kind": "member",
"static": false,
"variation": null,
@@ -2736,7 +2755,7 @@
}
},
{
- "__docId__": 124,
+ "__docId__": 125,
"kind": "member",
"static": false,
"variation": null,
@@ -2754,7 +2773,7 @@
}
},
{
- "__docId__": 125,
+ "__docId__": 126,
"kind": "member",
"static": false,
"variation": null,
@@ -2772,7 +2791,7 @@
}
},
{
- "__docId__": 126,
+ "__docId__": 127,
"kind": "member",
"static": false,
"variation": null,
@@ -2790,7 +2809,7 @@
}
},
{
- "__docId__": 127,
+ "__docId__": 128,
"kind": "member",
"static": false,
"variation": null,
@@ -2808,7 +2827,7 @@
}
},
{
- "__docId__": 128,
+ "__docId__": 129,
"kind": "method",
"static": false,
"variation": null,
@@ -2823,7 +2842,7 @@
"generator": false
},
{
- "__docId__": 129,
+ "__docId__": 130,
"kind": "method",
"static": false,
"variation": null,
@@ -2845,7 +2864,7 @@
"generator": false
},
{
- "__docId__": 130,
+ "__docId__": 131,
"kind": "method",
"static": false,
"variation": null,
@@ -2860,7 +2879,7 @@
"generator": false
},
{
- "__docId__": 131,
+ "__docId__": 132,
"kind": "member",
"static": false,
"variation": null,
@@ -2878,7 +2897,7 @@
}
},
{
- "__docId__": 132,
+ "__docId__": 133,
"kind": "method",
"static": false,
"variation": null,
@@ -2892,7 +2911,7 @@
"generator": false
},
{
- "__docId__": 133,
+ "__docId__": 134,
"kind": "member",
"static": false,
"variation": null,
@@ -2910,7 +2929,7 @@
}
},
{
- "__docId__": 134,
+ "__docId__": 135,
"kind": "member",
"static": false,
"variation": null,
@@ -2928,7 +2947,7 @@
}
},
{
- "__docId__": 135,
+ "__docId__": 136,
"kind": "method",
"static": false,
"variation": null,
@@ -2942,7 +2961,7 @@
"generator": false
},
{
- "__docId__": 136,
+ "__docId__": 137,
"kind": "member",
"static": false,
"variation": null,
@@ -2960,7 +2979,7 @@
}
},
{
- "__docId__": 137,
+ "__docId__": 138,
"kind": "method",
"static": false,
"variation": null,
@@ -2995,7 +3014,7 @@
"generator": false
},
{
- "__docId__": 138,
+ "__docId__": 139,
"kind": "method",
"static": false,
"variation": null,
@@ -3020,7 +3039,7 @@
"generator": false
},
{
- "__docId__": 139,
+ "__docId__": 140,
"kind": "method",
"static": false,
"variation": null,
@@ -3045,7 +3064,7 @@
"generator": false
},
{
- "__docId__": 140,
+ "__docId__": 141,
"kind": "method",
"static": false,
"variation": null,
@@ -3075,7 +3094,7 @@
"generator": false
},
{
- "__docId__": 141,
+ "__docId__": 142,
"kind": "method",
"static": false,
"variation": null,
@@ -3100,7 +3119,7 @@
"generator": false
},
{
- "__docId__": 142,
+ "__docId__": 143,
"kind": "method",
"static": false,
"variation": null,
@@ -3122,7 +3141,7 @@
"generator": false
},
{
- "__docId__": 143,
+ "__docId__": 144,
"kind": "method",
"static": false,
"variation": null,
@@ -3136,7 +3155,7 @@
"generator": false
},
{
- "__docId__": 144,
+ "__docId__": 145,
"kind": "member",
"static": false,
"variation": null,
@@ -3154,7 +3173,7 @@
}
},
{
- "__docId__": 145,
+ "__docId__": 146,
"kind": "member",
"static": false,
"variation": null,
@@ -3172,7 +3191,7 @@
}
},
{
- "__docId__": 146,
+ "__docId__": 147,
"kind": "member",
"static": false,
"variation": null,
@@ -3190,7 +3209,7 @@
}
},
{
- "__docId__": 147,
+ "__docId__": 148,
"kind": "method",
"static": false,
"variation": null,
@@ -3217,7 +3236,7 @@
"generator": false
},
{
- "__docId__": 148,
+ "__docId__": 149,
"kind": "method",
"static": false,
"variation": null,
@@ -3251,7 +3270,7 @@
"generator": false
},
{
- "__docId__": 149,
+ "__docId__": 150,
"kind": "method",
"static": false,
"variation": null,
@@ -3266,7 +3285,7 @@
"generator": false
},
{
- "__docId__": 150,
+ "__docId__": 151,
"kind": "file",
"static": true,
"variation": null,
@@ -3279,7 +3298,7 @@
"content": "import {Feature} from '../../feature';\nimport {createElm, removeElm, elm} from '../../dom';\nimport {isFn, isUndef} from '../../types';\nimport Event from '../../event';\n\nexport default class FiltersVisibility extends Feature {\n\n /**\n * Filters Row Visibility extension\n * @param {Object} tf TableFilter instance\n * @param {Object} f Config\n */\n constructor(tf, f) {\n super(tf, f.name);\n\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 = '  ';\n this.icnCollapseHtml = '  ';\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 = !isUndef(f.filters_row_index) ?\n f.filters_row_index : tf.getFiltersRowIndex();\n\n this.visibleAtStart = !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 = isFn(f.on_before_show) ? f.on_before_show : null;\n //callback after filters row is shown\n this.onAfterShow = isFn(f.on_after_show) ? f.on_after_show : null;\n //callback before filters row is hidden\n this.onBeforeHide = isFn(f.on_before_hide) ? f.on_before_hide : null;\n //callback after filters row is hidden\n this.onAfterHide = 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.enable();\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', this.tf, this);\n }\n\n /**\n * Build UI elements\n */\n buildUI() {\n let tf = this.tf;\n let span = createElm('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 : elm(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 = createElm('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.initialized) {\n return;\n }\n\n this.emitter.off(['show-filters'], (tf, visible) => this.show(visible));\n\n this.btnEl.innerHTML = '';\n removeElm(this.btnEl);\n this.btnEl = null;\n\n this.contEl.innerHTML = '';\n removeElm(this.contEl);\n this.contEl = null;\n this.initialized = false;\n }\n\n}\n"
},
{
- "__docId__": 151,
+ "__docId__": 152,
"kind": "class",
"static": true,
"variation": null,
@@ -3299,7 +3318,7 @@
]
},
{
- "__docId__": 152,
+ "__docId__": 153,
"kind": "constructor",
"static": false,
"variation": null,
@@ -3334,7 +3353,7 @@
"generator": false
},
{
- "__docId__": 153,
+ "__docId__": 154,
"kind": "member",
"static": false,
"variation": null,
@@ -3352,7 +3371,7 @@
}
},
{
- "__docId__": 154,
+ "__docId__": 155,
"kind": "member",
"static": false,
"variation": null,
@@ -3370,7 +3389,7 @@
}
},
{
- "__docId__": 155,
+ "__docId__": 156,
"kind": "member",
"static": false,
"variation": null,
@@ -3388,7 +3407,7 @@
}
},
{
- "__docId__": 156,
+ "__docId__": 157,
"kind": "member",
"static": false,
"variation": null,
@@ -3406,7 +3425,7 @@
}
},
{
- "__docId__": 157,
+ "__docId__": 158,
"kind": "member",
"static": false,
"variation": null,
@@ -3424,7 +3443,7 @@
}
},
{
- "__docId__": 158,
+ "__docId__": 159,
"kind": "member",
"static": false,
"variation": null,
@@ -3442,7 +3461,7 @@
}
},
{
- "__docId__": 159,
+ "__docId__": 160,
"kind": "member",
"static": false,
"variation": null,
@@ -3460,7 +3479,7 @@
}
},
{
- "__docId__": 160,
+ "__docId__": 161,
"kind": "member",
"static": false,
"variation": null,
@@ -3478,7 +3497,7 @@
}
},
{
- "__docId__": 161,
+ "__docId__": 162,
"kind": "member",
"static": false,
"variation": null,
@@ -3496,7 +3515,7 @@
}
},
{
- "__docId__": 162,
+ "__docId__": 163,
"kind": "member",
"static": false,
"variation": null,
@@ -3514,7 +3533,7 @@
}
},
{
- "__docId__": 163,
+ "__docId__": 164,
"kind": "member",
"static": false,
"variation": null,
@@ -3532,7 +3551,7 @@
}
},
{
- "__docId__": 164,
+ "__docId__": 165,
"kind": "member",
"static": false,
"variation": null,
@@ -3550,7 +3569,7 @@
}
},
{
- "__docId__": 165,
+ "__docId__": 166,
"kind": "member",
"static": false,
"variation": null,
@@ -3568,7 +3587,7 @@
}
},
{
- "__docId__": 166,
+ "__docId__": 167,
"kind": "member",
"static": false,
"variation": null,
@@ -3586,7 +3605,7 @@
}
},
{
- "__docId__": 167,
+ "__docId__": 168,
"kind": "member",
"static": false,
"variation": null,
@@ -3604,7 +3623,7 @@
}
},
{
- "__docId__": 168,
+ "__docId__": 169,
"kind": "member",
"static": false,
"variation": null,
@@ -3622,7 +3641,7 @@
}
},
{
- "__docId__": 169,
+ "__docId__": 170,
"kind": "member",
"static": false,
"variation": null,
@@ -3640,7 +3659,7 @@
}
},
{
- "__docId__": 170,
+ "__docId__": 171,
"kind": "member",
"static": false,
"variation": null,
@@ -3658,7 +3677,7 @@
}
},
{
- "__docId__": 171,
+ "__docId__": 172,
"kind": "member",
"static": false,
"variation": null,
@@ -3676,7 +3695,7 @@
}
},
{
- "__docId__": 172,
+ "__docId__": 173,
"kind": "member",
"static": false,
"variation": null,
@@ -3694,7 +3713,7 @@
}
},
{
- "__docId__": 173,
+ "__docId__": 174,
"kind": "member",
"static": false,
"variation": null,
@@ -3712,7 +3731,7 @@
}
},
{
- "__docId__": 174,
+ "__docId__": 175,
"kind": "member",
"static": false,
"variation": null,
@@ -3730,7 +3749,7 @@
}
},
{
- "__docId__": 175,
+ "__docId__": 176,
"kind": "member",
"static": false,
"variation": null,
@@ -3748,7 +3767,7 @@
}
},
{
- "__docId__": 176,
+ "__docId__": 177,
"kind": "member",
"static": false,
"variation": null,
@@ -3766,7 +3785,7 @@
}
},
{
- "__docId__": 177,
+ "__docId__": 178,
"kind": "member",
"static": false,
"variation": null,
@@ -3784,7 +3803,7 @@
}
},
{
- "__docId__": 178,
+ "__docId__": 179,
"kind": "method",
"static": false,
"variation": null,
@@ -3798,7 +3817,7 @@
"generator": false
},
{
- "__docId__": 179,
+ "__docId__": 180,
"kind": "member",
"static": false,
"variation": null,
@@ -3816,7 +3835,7 @@
}
},
{
- "__docId__": 180,
+ "__docId__": 181,
"kind": "method",
"static": false,
"variation": null,
@@ -3830,7 +3849,7 @@
"generator": false
},
{
- "__docId__": 181,
+ "__docId__": 182,
"kind": "member",
"static": false,
"variation": null,
@@ -3848,7 +3867,7 @@
}
},
{
- "__docId__": 182,
+ "__docId__": 183,
"kind": "member",
"static": false,
"variation": null,
@@ -3866,7 +3885,7 @@
}
},
{
- "__docId__": 183,
+ "__docId__": 184,
"kind": "method",
"static": false,
"variation": null,
@@ -3880,7 +3899,7 @@
"generator": false
},
{
- "__docId__": 184,
+ "__docId__": 185,
"kind": "method",
"static": false,
"variation": null,
@@ -3907,7 +3926,7 @@
"generator": false
},
{
- "__docId__": 185,
+ "__docId__": 186,
"kind": "method",
"static": false,
"variation": null,
@@ -3921,7 +3940,7 @@
"generator": false
},
{
- "__docId__": 186,
+ "__docId__": 187,
"kind": "member",
"static": false,
"variation": null,
@@ -3939,7 +3958,7 @@
}
},
{
- "__docId__": 187,
+ "__docId__": 188,
"kind": "member",
"static": false,
"variation": null,
@@ -3957,7 +3976,7 @@
}
},
{
- "__docId__": 188,
+ "__docId__": 189,
"kind": "member",
"static": false,
"variation": null,
@@ -3975,7 +3994,7 @@
}
},
{
- "__docId__": 189,
+ "__docId__": 190,
"kind": "file",
"static": true,
"variation": null,
@@ -3988,7 +4007,7 @@
"content": "import {Feature} from '../../feature';\nimport {isArray, isFn, isUndef} from '../../types';\nimport {createElm, elm, getText, tag} from '../../dom';\nimport Event from '../../event';\nimport {formatDate} from '../../date';\nimport {removeNbFormat} from '../../helpers';\nimport {NONE, CELL_TAG, HEADER_TAG} from '../../const';\n\nexport default class AdapterSortableTable extends Feature {\n\n /**\n * SortableTable Adapter module\n * @param {Object} tf TableFilter instance\n */\n constructor(tf, opts) {\n super(tf, opts.name);\n\n this.name = opts.name;\n this.desc = opts.description || 'Sortable table';\n\n //indicates if table previously sorted\n this.sorted = false;\n\n this.sortTypes = isArray(opts.types) ? opts.types : [];\n this.sortColAtStart = isArray(opts.sort_col_at_start) ?\n opts.sort_col_at_start : null;\n this.asyncSort = Boolean(opts.async_sort);\n this.triggerIds = isArray(opts.trigger_ids) ? 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 = isFn(opts.on_sort_loaded) ?\n opts.on_sort_loaded : null;\n // callback invoked before table is sorted\n this.onBeforeSort = isFn(opts.on_before_sort) ?\n opts.on_before_sort : null;\n // callback invoked after table is sorted\n this.onAfterSort = isFn(opts.on_after_sort) ? opts.on_after_sort : null;\n\n this.enable();\n }\n\n init() {\n if (this.initialized) {\n return;\n }\n let tf = this.tf;\n let adpt = this;\n\n // SortableTable class sanity check (sortabletable.js)\n if (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 !== CELL_TAG && el.tagName !== HEADER_TAG) {\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 = createElm('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(elm(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 = createElm('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 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 = elm(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 if (!this.initialized) {\n return;\n }\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 = tag(header, 'img');\n\n if (img.length === 1) {\n header.removeChild(img[0]);\n }\n }\n this.initialized = false;\n }\n\n}\n\n//Converters\nfunction usNumberConverter(s) {\n return removeNbFormat(s, 'us');\n}\nfunction euNumberConverter(s) {\n return removeNbFormat(s, 'eu');\n}\nfunction dateConverter(s, format) {\n return formatDate(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__": 190,
+ "__docId__": 191,
"kind": "class",
"static": true,
"variation": null,
@@ -4008,7 +4027,7 @@
]
},
{
- "__docId__": 191,
+ "__docId__": 192,
"kind": "constructor",
"static": false,
"variation": null,
@@ -4033,7 +4052,7 @@
"generator": false
},
{
- "__docId__": 192,
+ "__docId__": 193,
"kind": "member",
"static": false,
"variation": null,
@@ -4051,7 +4070,7 @@
}
},
{
- "__docId__": 193,
+ "__docId__": 194,
"kind": "member",
"static": false,
"variation": null,
@@ -4069,7 +4088,7 @@
}
},
{
- "__docId__": 194,
+ "__docId__": 195,
"kind": "member",
"static": false,
"variation": null,
@@ -4087,7 +4106,7 @@
}
},
{
- "__docId__": 195,
+ "__docId__": 196,
"kind": "member",
"static": false,
"variation": null,
@@ -4105,7 +4124,7 @@
}
},
{
- "__docId__": 196,
+ "__docId__": 197,
"kind": "member",
"static": false,
"variation": null,
@@ -4123,7 +4142,7 @@
}
},
{
- "__docId__": 197,
+ "__docId__": 198,
"kind": "member",
"static": false,
"variation": null,
@@ -4141,7 +4160,7 @@
}
},
{
- "__docId__": 198,
+ "__docId__": 199,
"kind": "member",
"static": false,
"variation": null,
@@ -4159,7 +4178,7 @@
}
},
{
- "__docId__": 199,
+ "__docId__": 200,
"kind": "member",
"static": false,
"variation": null,
@@ -4177,7 +4196,7 @@
}
},
{
- "__docId__": 200,
+ "__docId__": 201,
"kind": "member",
"static": false,
"variation": null,
@@ -4195,7 +4214,7 @@
}
},
{
- "__docId__": 201,
+ "__docId__": 202,
"kind": "member",
"static": false,
"variation": null,
@@ -4213,7 +4232,7 @@
}
},
{
- "__docId__": 202,
+ "__docId__": 203,
"kind": "member",
"static": false,
"variation": null,
@@ -4231,7 +4250,7 @@
}
},
{
- "__docId__": 203,
+ "__docId__": 204,
"kind": "member",
"static": false,
"variation": null,
@@ -4249,7 +4268,7 @@
}
},
{
- "__docId__": 204,
+ "__docId__": 205,
"kind": "member",
"static": false,
"variation": null,
@@ -4267,7 +4286,7 @@
}
},
{
- "__docId__": 205,
+ "__docId__": 206,
"kind": "member",
"static": false,
"variation": null,
@@ -4285,7 +4304,7 @@
}
},
{
- "__docId__": 206,
+ "__docId__": 207,
"kind": "member",
"static": false,
"variation": null,
@@ -4303,7 +4322,7 @@
}
},
{
- "__docId__": 207,
+ "__docId__": 208,
"kind": "member",
"static": false,
"variation": null,
@@ -4321,7 +4340,7 @@
}
},
{
- "__docId__": 208,
+ "__docId__": 209,
"kind": "method",
"static": false,
"variation": null,
@@ -4336,7 +4355,7 @@
"generator": false
},
{
- "__docId__": 209,
+ "__docId__": 210,
"kind": "member",
"static": false,
"variation": null,
@@ -4354,7 +4373,7 @@
}
},
{
- "__docId__": 210,
+ "__docId__": 211,
"kind": "method",
"static": false,
"variation": null,
@@ -4389,7 +4408,7 @@
"generator": false
},
{
- "__docId__": 211,
+ "__docId__": 212,
"kind": "method",
"static": false,
"variation": null,
@@ -4404,7 +4423,7 @@
"generator": false
},
{
- "__docId__": 212,
+ "__docId__": 213,
"kind": "method",
"static": false,
"variation": null,
@@ -4419,7 +4438,7 @@
"generator": false
},
{
- "__docId__": 213,
+ "__docId__": 214,
"kind": "method",
"static": false,
"variation": null,
@@ -4434,7 +4453,7 @@
"generator": false
},
{
- "__docId__": 214,
+ "__docId__": 215,
"kind": "member",
"static": false,
"variation": null,
@@ -4452,7 +4471,7 @@
}
},
{
- "__docId__": 215,
+ "__docId__": 216,
"kind": "method",
"static": false,
"variation": null,
@@ -4466,7 +4485,7 @@
"generator": false
},
{
- "__docId__": 216,
+ "__docId__": 217,
"kind": "member",
"static": false,
"variation": null,
@@ -4484,7 +4503,7 @@
}
},
{
- "__docId__": 217,
+ "__docId__": 218,
"kind": "member",
"static": false,
"variation": null,
@@ -4502,7 +4521,7 @@
}
},
{
- "__docId__": 218,
+ "__docId__": 219,
"kind": "member",
"static": false,
"variation": null,
@@ -4520,7 +4539,7 @@
}
},
{
- "__docId__": 219,
+ "__docId__": 220,
"kind": "function",
"static": true,
"variation": null,
@@ -4550,7 +4569,7 @@
"generator": false
},
{
- "__docId__": 220,
+ "__docId__": 221,
"kind": "function",
"static": true,
"variation": null,
@@ -4580,7 +4599,7 @@
"generator": false
},
{
- "__docId__": 221,
+ "__docId__": 222,
"kind": "function",
"static": true,
"variation": null,
@@ -4616,7 +4635,7 @@
"generator": false
},
{
- "__docId__": 222,
+ "__docId__": 223,
"kind": "function",
"static": true,
"variation": null,
@@ -4646,7 +4665,7 @@
"generator": false
},
{
- "__docId__": 223,
+ "__docId__": 224,
"kind": "function",
"static": true,
"variation": null,
@@ -4676,7 +4695,7 @@
"generator": false
},
{
- "__docId__": 224,
+ "__docId__": 225,
"kind": "function",
"static": true,
"variation": null,
@@ -4706,7 +4725,7 @@
"generator": false
},
{
- "__docId__": 225,
+ "__docId__": 226,
"kind": "function",
"static": true,
"variation": null,
@@ -4736,7 +4755,7 @@
"generator": false
},
{
- "__docId__": 226,
+ "__docId__": 227,
"kind": "function",
"static": true,
"variation": null,
@@ -4766,7 +4785,7 @@
"generator": false
},
{
- "__docId__": 227,
+ "__docId__": 228,
"kind": "function",
"static": true,
"variation": null,
@@ -4802,7 +4821,7 @@
"generator": false
},
{
- "__docId__": 228,
+ "__docId__": 229,
"kind": "file",
"static": true,
"variation": null,
@@ -4812,10 +4831,10 @@
"access": null,
"description": null,
"lineNumber": 1,
- "content": "import AdapterSortableTable from './adapterSortabletable';\nimport {root} from '../../root';\n\nif(!root.SortableTable){\n require('script!sortabletable');\n}\n\nexport default AdapterSortableTable;\n"
+ "content": "import AdapterSortableTable from './adapterSortabletable';\nimport {root} from '../../root';\n\nif (!root.SortableTable) {\n require('script!sortabletable');\n}\n\nexport default AdapterSortableTable;\n"
},
{
- "__docId__": 229,
+ "__docId__": 230,
"kind": "file",
"static": true,
"variation": null,
@@ -4828,7 +4847,7 @@
"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__": 230,
+ "__docId__": 231,
"kind": "variable",
"static": true,
"variation": null,
@@ -4849,7 +4868,7 @@
}
},
{
- "__docId__": 231,
+ "__docId__": 232,
"kind": "class",
"static": true,
"variation": null,
@@ -4866,7 +4885,7 @@
"interface": false
},
{
- "__docId__": 232,
+ "__docId__": 233,
"kind": "constructor",
"static": false,
"variation": null,
@@ -4894,7 +4913,7 @@
"generator": false
},
{
- "__docId__": 233,
+ "__docId__": 234,
"kind": "member",
"static": false,
"variation": null,
@@ -4912,7 +4931,7 @@
}
},
{
- "__docId__": 234,
+ "__docId__": 235,
"kind": "member",
"static": false,
"variation": null,
@@ -4930,7 +4949,7 @@
}
},
{
- "__docId__": 235,
+ "__docId__": 236,
"kind": "member",
"static": false,
"variation": null,
@@ -4948,7 +4967,7 @@
}
},
{
- "__docId__": 236,
+ "__docId__": 237,
"kind": "member",
"static": false,
"variation": null,
@@ -4966,7 +4985,7 @@
}
},
{
- "__docId__": 237,
+ "__docId__": 238,
"kind": "member",
"static": false,
"variation": null,
@@ -4984,7 +5003,7 @@
}
},
{
- "__docId__": 238,
+ "__docId__": 239,
"kind": "member",
"static": false,
"variation": null,
@@ -5002,7 +5021,7 @@
}
},
{
- "__docId__": 239,
+ "__docId__": 240,
"kind": "method",
"static": false,
"variation": null,
@@ -5017,7 +5036,7 @@
"generator": false
},
{
- "__docId__": 240,
+ "__docId__": 241,
"kind": "method",
"static": false,
"variation": null,
@@ -5032,7 +5051,7 @@
"generator": false
},
{
- "__docId__": 241,
+ "__docId__": 242,
"kind": "method",
"static": false,
"variation": null,
@@ -5047,7 +5066,7 @@
"generator": false
},
{
- "__docId__": 242,
+ "__docId__": 243,
"kind": "method",
"static": false,
"variation": null,
@@ -5062,7 +5081,7 @@
"generator": false
},
{
- "__docId__": 243,
+ "__docId__": 244,
"kind": "member",
"static": false,
"variation": null,
@@ -5080,7 +5099,7 @@
}
},
{
- "__docId__": 244,
+ "__docId__": 245,
"kind": "method",
"static": false,
"variation": null,
@@ -5095,7 +5114,7 @@
"generator": false
},
{
- "__docId__": 245,
+ "__docId__": 246,
"kind": "member",
"static": false,
"variation": null,
@@ -5113,7 +5132,7 @@
}
},
{
- "__docId__": 246,
+ "__docId__": 247,
"kind": "method",
"static": false,
"variation": null,
@@ -5133,7 +5152,7 @@
"generator": false
},
{
- "__docId__": 247,
+ "__docId__": 248,
"kind": "file",
"static": true,
"variation": null,
@@ -5146,7 +5165,7 @@
"content": "/**\n * Misc helpers\n */\n\n/**\n * Returns a unformatted number\n * @param {String} Formatted number\n * @param {String} Format type, currently 'us' or 'eu'\n * @return {String} Unformatted number\n */\nexport const removeNbFormat = (data, format) => {\n if (!data) {\n return;\n }\n if (!format) {\n format = 'us';\n }\n let n = data;\n if (format.toLowerCase() === 'us') {\n n = + n.replace(/[^\\d\\.-]/g, '');\n } else {\n n = + n.replace(/[^\\d\\,-]/g, '').replace(',', '.');\n }\n return n;\n}\n"
},
{
- "__docId__": 248,
+ "__docId__": 249,
"kind": "variable",
"static": true,
"variation": null,
@@ -5196,7 +5215,7 @@
}
},
{
- "__docId__": 249,
+ "__docId__": 250,
"kind": "file",
"static": true,
"variation": null,
@@ -5206,10 +5225,10 @@
"access": null,
"description": null,
"lineNumber": 1,
- "content": "import {Feature} from '../feature';\nimport {addClass, removeClass} 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 addClass(rows[rowIdx], (i % 2) ? this.evenCss : this.oddCss);\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 removeClass(rows[idx], this.oddCss);\n removeClass(rows[idx], this.evenCss);\n }\n\n /**\n * Removes all alternating backgrounds\n */\n destroy() {\n if (!this.initialized) {\n return;\n }\n let nbRows = this.tf.getRowsNb(true);\n for (var i = 0; i < 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"
+ "content": "import {Feature} from '../feature';\nimport {addClass, removeClass} from '../dom';\n\n/**\n * Rows with alternating background color for improved readability\n */\nexport class AlternateRows extends Feature {\n\n /**\n * Creates an instance of AlternateRows.\n *\n * @param {Object} tf TableFilter instance\n */\n constructor(tf) {\n super(tf, 'alternateRows');\n\n let 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 /**\n * Apply background to all valid rows\n */\n processAll() {\n if (!this.isEnabled()) {\n return;\n }\n let tf = this.tf;\n let validRowsIndex = tf.getValidRows(true);\n let indexLen = validRowsIndex.length;\n let idx = 0;\n\n //alternates bg color\n for (let j = 0; j < indexLen; j++) {\n let rowIdx = 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 let rows = this.tf.tbl.rows;\n let i = isNaN(idx) ? rowIdx : idx;\n this.removeRowBg(rowIdx);\n\n addClass(rows[rowIdx], (i % 2) ? this.evenCss : this.oddCss);\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 let rows = this.tf.tbl.rows;\n removeClass(rows[idx], this.oddCss);\n removeClass(rows[idx], this.evenCss);\n }\n\n /**\n * Removes all alternating backgrounds\n */\n destroy() {\n if (!this.initialized) {\n return;\n }\n let nbRows = this.tf.getRowsNb(true);\n for (let i = 0; i < 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__": 250,
+ "__docId__": 251,
"kind": "class",
"static": true,
"variation": null,
@@ -5220,16 +5239,15 @@
"export": true,
"importPath": "tablefilter/src/modules/alternateRows.js",
"importStyle": "{AlternateRows}",
- "description": null,
- "lineNumber": 4,
- "undocument": true,
+ "description": "Rows with alternating background color for improved readability",
+ "lineNumber": 7,
"interface": false,
"extends": [
"src/feature.js~Feature"
]
},
{
- "__docId__": 251,
+ "__docId__": 252,
"kind": "constructor",
"static": false,
"variation": null,
@@ -5237,8 +5255,8 @@
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#constructor",
"access": null,
- "description": "Alternating rows color",
- "lineNumber": 10,
+ "description": "Creates an instance of AlternateRows.",
+ "lineNumber": 14,
"params": [
{
"nullable": null,
@@ -5254,7 +5272,7 @@
"generator": false
},
{
- "__docId__": 252,
+ "__docId__": 253,
"kind": "member",
"static": false,
"variation": null,
@@ -5263,25 +5281,7 @@
"longname": "src/modules/alternateRows.js~AlternateRows#evenCss",
"access": null,
"description": null,
- "lineNumber": 15,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 253,
- "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,
+ "lineNumber": 19,
"undocument": true,
"type": {
"types": [
@@ -5291,6 +5291,24 @@
},
{
"__docId__": 254,
+ "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": 21,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 255,
"kind": "method",
"static": false,
"variation": null,
@@ -5299,12 +5317,12 @@
"longname": "src/modules/alternateRows.js~AlternateRows#init",
"access": null,
"description": "Sets alternating rows color",
- "lineNumber": 23,
+ "lineNumber": 27,
"params": [],
"generator": false
},
{
- "__docId__": 255,
+ "__docId__": 256,
"kind": "member",
"static": false,
"variation": null,
@@ -5313,7 +5331,7 @@
"longname": "src/modules/alternateRows.js~AlternateRows#initialized",
"access": null,
"description": null,
- "lineNumber": 36,
+ "lineNumber": 40,
"undocument": true,
"type": {
"types": [
@@ -5322,7 +5340,7 @@
}
},
{
- "__docId__": 256,
+ "__docId__": 257,
"kind": "method",
"static": false,
"variation": null,
@@ -5330,14 +5348,13 @@
"memberof": "src/modules/alternateRows.js~AlternateRows",
"longname": "src/modules/alternateRows.js~AlternateRows#processAll",
"access": null,
- "description": null,
- "lineNumber": 39,
- "undocument": true,
+ "description": "Apply background to all valid rows",
+ "lineNumber": 46,
"params": [],
"generator": false
},
{
- "__docId__": 257,
+ "__docId__": 258,
"kind": "method",
"static": false,
"variation": null,
@@ -5346,7 +5363,7 @@
"longname": "src/modules/alternateRows.js~AlternateRows#processRow",
"access": null,
"description": "Set/remove row background based on row validation",
- "lineNumber": 68,
+ "lineNumber": 69,
"params": [
{
"nullable": null,
@@ -5382,7 +5399,7 @@
"generator": false
},
{
- "__docId__": 258,
+ "__docId__": 259,
"kind": "method",
"static": false,
"variation": null,
@@ -5391,7 +5408,7 @@
"longname": "src/modules/alternateRows.js~AlternateRows#setRowBg",
"access": null,
"description": "Sets row background color",
- "lineNumber": 82,
+ "lineNumber": 83,
"params": [
{
"nullable": null,
@@ -5417,7 +5434,7 @@
"generator": false
},
{
- "__docId__": 259,
+ "__docId__": 260,
"kind": "method",
"static": false,
"variation": null,
@@ -5426,7 +5443,7 @@
"longname": "src/modules/alternateRows.js~AlternateRows#removeRowBg",
"access": null,
"description": "Removes row background color",
- "lineNumber": 97,
+ "lineNumber": 98,
"params": [
{
"nullable": null,
@@ -5442,7 +5459,7 @@
"generator": false
},
{
- "__docId__": 260,
+ "__docId__": 261,
"kind": "method",
"static": false,
"variation": null,
@@ -5451,12 +5468,12 @@
"longname": "src/modules/alternateRows.js~AlternateRows#destroy",
"access": null,
"description": "Removes all alternating backgrounds",
- "lineNumber": 109,
+ "lineNumber": 110,
"params": [],
"generator": false
},
{
- "__docId__": 261,
+ "__docId__": 262,
"kind": "member",
"static": false,
"variation": null,
@@ -5465,7 +5482,7 @@
"longname": "src/modules/alternateRows.js~AlternateRows#initialized",
"access": null,
"description": null,
- "lineNumber": 124,
+ "lineNumber": 125,
"undocument": true,
"type": {
"types": [
@@ -5474,7 +5491,7 @@
}
},
{
- "__docId__": 262,
+ "__docId__": 263,
"kind": "file",
"static": true,
"variation": null,
@@ -5487,7 +5504,7 @@
"content": "import {Feature} from '../feature';\nimport {\n addClass, createCheckItem, createText, createElm, elm, getText,\n removeClass, tag\n} from '../dom';\nimport {has} from '../array';\nimport {matchCase, trim, rgxEsc} from '../string';\nimport {ignoreCase, numSortAsc, numSortDesc} from '../sort';\nimport Event from '../event';\nimport {isEmpty} from '../types';\nimport {CHECKLIST, NONE} from '../const';\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 = createElm('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 elm(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(createText(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 = createElm('ul', ['id', tf.fltIds[colIndex]],\n ['colIndex', colIndex]);\n ul.className = this.checkListCssClass;\n Event.add(ul, 'change', (evt) => this.onChange(evt));\n\n let rows = tf.tbl.rows;\n let nbRows = tf.getRowsNb(true);\n let caseSensitive = tf.caseSensitive;\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 < 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 ||\n 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 = matchCase(cellData, caseSensitive);\n // checks if celldata is already in array\n if (!has(this.opts, cellString, caseSensitive)) {\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 (!has(filteredCol, cellString, caseSensitive) &&\n !has(this.excludedOpts, cellString,\n caseSensitive)) {\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 (!caseSensitive) {\n this.opts.sort(ignoreCase);\n if (this.excludedOpts) {\n this.excludedOpts.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(numSortAsc);\n if (this.excludedOpts) {\n this.excludedOpts.sort(numSortAsc);\n }\n if (this.isCustom) {\n this.optsTxt.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(numSortDesc);\n if (this.excludedOpts) {\n this.excludedOpts.sort(numSortDesc);\n }\n if (this.isCustom) {\n this.optsTxt.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 = createCheckItem(tf.fltIds[colIndex] + '_' + (y + chkCt),\n val, lbl);\n li.className = this.checkListItemCssClass;\n\n if (tf.linkedFilters && tf.disableExcludedOptions &&\n has(this.excludedOpts, matchCase(val, tf.caseSensitive),\n tf.caseSensitive)) {\n 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 = createCheckItem(tf.fltIds[colIndex] + '_0', '',\n 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 = createCheckItem(tf.fltIds[colIndex] + '_1',\n 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 = createCheckItem(tf.fltIds[colIndex] + '_2', tf.nmOperator,\n tf.nonEmptyText);\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 = elm(tf.fltIds[colIndex] + '_' +\n indSplit[u]);\n if (cChk) {\n cChk.checked = false;\n removeClass(n.childNodes[indSplit[u]],\n this.checkListSlcItemCssClass);\n }\n }\n }\n n.setAttribute('value', '');\n n.setAttribute('indexes', '');\n\n } else {\n fltValue = (fltValue) ? fltValue : '';\n chkValue = trim(fltValue + ' ' + chkValue + ' ' +\n tf.orOperator);\n chkIndex = fltIndexes + chkIndex + tf.separator;\n n.setAttribute('value', chkValue);\n n.setAttribute('indexes', chkIndex);\n //1st option unchecked\n if (elm(tf.fltIds[colIndex] + '_0')) {\n elm(tf.fltIds[colIndex] + '_0').checked = false;\n }\n }\n\n if (li.nodeName === itemTag) {\n removeClass(n.childNodes[0], this.checkListSlcItemCssClass);\n addClass(li, this.checkListSlcItemCssClass);\n }\n } else { //removes values and indexes\n if (chkValue !== '') {\n let replaceValue = new RegExp(\n rgxEsc(chkValue + ' ' + tf.orOperator));\n fltValue = fltValue.replace(replaceValue, '');\n n.setAttribute('value', trim(fltValue));\n\n let replaceIndex = new RegExp(\n rgxEsc(chkIndex + tf.separator));\n fltIndexes = fltIndexes.replace(replaceIndex, '');\n n.setAttribute('indexes', fltIndexes);\n }\n if (li.nodeName === itemTag) {\n 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 let flt = tf.getFilterElement(colIndex);\n if (tf.getFilterType(colIndex) !== CHECKLIST || !flt) {\n return;\n }\n\n let lisNb = 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 = tag(flt, 'li')[k],\n lbl = tag(li, 'label')[0],\n chk = tag(li, 'input')[0],\n lblTxt = matchCase(getText(lbl), tf.caseSensitive);\n if (lblTxt !== '' && 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 /**\n * Get filter values for a given column index\n * @param {Number} colIndex Column index\n * @returns {Array} values Collection of selected values\n */\n getValues(colIndex) {\n let tf = this.tf;\n let flt = tf.getFilterElement(colIndex);\n let fltAttr = flt.getAttribute('value');\n let values = isEmpty(fltAttr) ? '' : fltAttr;\n\n //removes last operator ||\n values = values.substr(0, values.length - 3);\n //turn || separated values into array\n values = values.split(' ' + tf.orOperator + ' ');\n\n return values;\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__": 263,
+ "__docId__": 264,
"kind": "variable",
"static": true,
"variation": null,
@@ -5508,7 +5525,7 @@
}
},
{
- "__docId__": 264,
+ "__docId__": 265,
"kind": "class",
"static": true,
"variation": null,
@@ -5528,7 +5545,7 @@
]
},
{
- "__docId__": 265,
+ "__docId__": 266,
"kind": "constructor",
"static": false,
"variation": null,
@@ -5553,7 +5570,7 @@
"generator": false
},
{
- "__docId__": 266,
+ "__docId__": 267,
"kind": "member",
"static": false,
"variation": null,
@@ -5571,7 +5588,7 @@
}
},
{
- "__docId__": 267,
+ "__docId__": 268,
"kind": "member",
"static": false,
"variation": null,
@@ -5589,7 +5606,7 @@
}
},
{
- "__docId__": 268,
+ "__docId__": 269,
"kind": "member",
"static": false,
"variation": null,
@@ -5607,7 +5624,7 @@
}
},
{
- "__docId__": 269,
+ "__docId__": 270,
"kind": "member",
"static": false,
"variation": null,
@@ -5625,7 +5642,7 @@
}
},
{
- "__docId__": 270,
+ "__docId__": 271,
"kind": "member",
"static": false,
"variation": null,
@@ -5643,7 +5660,7 @@
}
},
{
- "__docId__": 271,
+ "__docId__": 272,
"kind": "member",
"static": false,
"variation": null,
@@ -5661,7 +5678,7 @@
}
},
{
- "__docId__": 272,
+ "__docId__": 273,
"kind": "member",
"static": false,
"variation": null,
@@ -5679,7 +5696,7 @@
}
},
{
- "__docId__": 273,
+ "__docId__": 274,
"kind": "member",
"static": false,
"variation": null,
@@ -5697,7 +5714,7 @@
}
},
{
- "__docId__": 274,
+ "__docId__": 275,
"kind": "member",
"static": false,
"variation": null,
@@ -5715,7 +5732,7 @@
}
},
{
- "__docId__": 275,
+ "__docId__": 276,
"kind": "member",
"static": false,
"variation": null,
@@ -5733,7 +5750,7 @@
}
},
{
- "__docId__": 276,
+ "__docId__": 277,
"kind": "member",
"static": false,
"variation": null,
@@ -5751,7 +5768,7 @@
}
},
{
- "__docId__": 277,
+ "__docId__": 278,
"kind": "member",
"static": false,
"variation": null,
@@ -5769,7 +5786,7 @@
}
},
{
- "__docId__": 278,
+ "__docId__": 279,
"kind": "member",
"static": false,
"variation": null,
@@ -5787,7 +5804,7 @@
}
},
{
- "__docId__": 279,
+ "__docId__": 280,
"kind": "method",
"static": false,
"variation": null,
@@ -5809,7 +5826,7 @@
"generator": false
},
{
- "__docId__": 280,
+ "__docId__": 281,
"kind": "method",
"static": false,
"variation": null,
@@ -5831,7 +5848,7 @@
"generator": false
},
{
- "__docId__": 281,
+ "__docId__": 282,
"kind": "method",
"static": false,
"variation": null,
@@ -5853,7 +5870,7 @@
"generator": false
},
{
- "__docId__": 282,
+ "__docId__": 283,
"kind": "method",
"static": false,
"variation": null,
@@ -5898,7 +5915,7 @@
"generator": false
},
{
- "__docId__": 283,
+ "__docId__": 284,
"kind": "member",
"static": false,
"variation": null,
@@ -5916,7 +5933,7 @@
}
},
{
- "__docId__": 284,
+ "__docId__": 285,
"kind": "method",
"static": false,
"variation": null,
@@ -5941,7 +5958,7 @@
"generator": false
},
{
- "__docId__": 285,
+ "__docId__": 286,
"kind": "member",
"static": false,
"variation": null,
@@ -5959,7 +5976,7 @@
}
},
{
- "__docId__": 286,
+ "__docId__": 287,
"kind": "member",
"static": false,
"variation": null,
@@ -5977,7 +5994,7 @@
}
},
{
- "__docId__": 287,
+ "__docId__": 288,
"kind": "member",
"static": false,
"variation": null,
@@ -5995,7 +6012,7 @@
}
},
{
- "__docId__": 288,
+ "__docId__": 289,
"kind": "member",
"static": false,
"variation": null,
@@ -6013,7 +6030,7 @@
}
},
{
- "__docId__": 289,
+ "__docId__": 290,
"kind": "member",
"static": false,
"variation": null,
@@ -6031,7 +6048,7 @@
}
},
{
- "__docId__": 290,
+ "__docId__": 291,
"kind": "member",
"static": false,
"variation": null,
@@ -6049,7 +6066,7 @@
}
},
{
- "__docId__": 291,
+ "__docId__": 292,
"kind": "method",
"static": false,
"variation": null,
@@ -6084,7 +6101,7 @@
"generator": false
},
{
- "__docId__": 292,
+ "__docId__": 293,
"kind": "method",
"static": false,
"variation": null,
@@ -6124,7 +6141,7 @@
"generator": false
},
{
- "__docId__": 293,
+ "__docId__": 294,
"kind": "method",
"static": false,
"variation": null,
@@ -6149,7 +6166,7 @@
"generator": false
},
{
- "__docId__": 294,
+ "__docId__": 295,
"kind": "method",
"static": false,
"variation": null,
@@ -6184,7 +6201,7 @@
"generator": false
},
{
- "__docId__": 295,
+ "__docId__": 296,
"kind": "method",
"static": false,
"variation": null,
@@ -6223,7 +6240,7 @@
"generator": false
},
{
- "__docId__": 296,
+ "__docId__": 297,
"kind": "method",
"static": false,
"variation": null,
@@ -6238,7 +6255,7 @@
"generator": false
},
{
- "__docId__": 297,
+ "__docId__": 298,
"kind": "file",
"static": true,
"variation": null,
@@ -6251,7 +6268,7 @@
"content": "import {Feature} from '../feature';\nimport {createElm, createText, elm, removeElm} 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 let 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 ' ');\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 let tf = this.tf;\n\n if (this.initialized) {\n return;\n }\n\n let resetspan = createElm('span', ['id', this.prfxResetSpan + tf.id]);\n\n // reset button is added to defined element\n if (!this.btnResetTgtId) {\n tf.setToolbar();\n }\n let targetEl = !this.btnResetTgtId ? tf.rDiv : elm(this.btnResetTgtId);\n targetEl.appendChild(resetspan);\n\n if (!this.btnResetHtml) {\n let fltreset = createElm('a', ['href', 'javascript:voelm(0);']);\n fltreset.className = tf.btnResetCssClass;\n fltreset.appendChild(createText(this.btnResetText));\n resetspan.appendChild(fltreset);\n Event.add(fltreset, 'click', () => { this.onClick(); });\n } else {\n resetspan.innerHTML = this.btnResetHtml;\n let 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 let tf = this.tf;\n\n if (!this.initialized) {\n return;\n }\n\n let resetspan = elm(this.prfxResetSpan + tf.id);\n if (resetspan) {\n removeElm(resetspan);\n }\n this.btnResetEl = null;\n this.initialized = false;\n }\n}\n"
},
{
- "__docId__": 298,
+ "__docId__": 299,
"kind": "class",
"static": true,
"variation": null,
@@ -6271,7 +6288,7 @@
]
},
{
- "__docId__": 299,
+ "__docId__": 300,
"kind": "constructor",
"static": false,
"variation": null,
@@ -6296,7 +6313,7 @@
"generator": false
},
{
- "__docId__": 300,
+ "__docId__": 301,
"kind": "member",
"static": false,
"variation": null,
@@ -6314,7 +6331,7 @@
}
},
{
- "__docId__": 301,
+ "__docId__": 302,
"kind": "member",
"static": false,
"variation": null,
@@ -6332,7 +6349,7 @@
}
},
{
- "__docId__": 302,
+ "__docId__": 303,
"kind": "member",
"static": false,
"variation": null,
@@ -6350,7 +6367,7 @@
}
},
{
- "__docId__": 303,
+ "__docId__": 304,
"kind": "member",
"static": false,
"variation": null,
@@ -6368,7 +6385,7 @@
}
},
{
- "__docId__": 304,
+ "__docId__": 305,
"kind": "member",
"static": false,
"variation": null,
@@ -6386,7 +6403,7 @@
}
},
{
- "__docId__": 305,
+ "__docId__": 306,
"kind": "member",
"static": false,
"variation": null,
@@ -6404,7 +6421,7 @@
}
},
{
- "__docId__": 306,
+ "__docId__": 307,
"kind": "method",
"static": false,
"variation": null,
@@ -6419,7 +6436,7 @@
"generator": false
},
{
- "__docId__": 307,
+ "__docId__": 308,
"kind": "method",
"static": false,
"variation": null,
@@ -6433,7 +6450,7 @@
"generator": false
},
{
- "__docId__": 308,
+ "__docId__": 309,
"kind": "member",
"static": false,
"variation": null,
@@ -6451,7 +6468,7 @@
}
},
{
- "__docId__": 309,
+ "__docId__": 310,
"kind": "member",
"static": false,
"variation": null,
@@ -6469,7 +6486,7 @@
}
},
{
- "__docId__": 310,
+ "__docId__": 311,
"kind": "method",
"static": false,
"variation": null,
@@ -6483,7 +6500,7 @@
"generator": false
},
{
- "__docId__": 311,
+ "__docId__": 312,
"kind": "member",
"static": false,
"variation": null,
@@ -6501,7 +6518,7 @@
}
},
{
- "__docId__": 312,
+ "__docId__": 313,
"kind": "member",
"static": false,
"variation": null,
@@ -6519,7 +6536,7 @@
}
},
{
- "__docId__": 313,
+ "__docId__": 314,
"kind": "file",
"static": true,
"variation": null,
@@ -6532,7 +6549,7 @@
"content": "import {Feature} from '../feature';\nimport {createElm, createOpt, elm} from '../dom';\nimport {has} from '../array';\nimport {matchCase} from '../string';\nimport {ignoreCase, numSortAsc, numSortDesc} from '../sort';\nimport Event from '../event';\nimport {SELECT, MULTIPLE, NONE} from '../const';\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 = createElm(SELECT,\n ['id', tf.prfxFlt + colIndex + '_' + tf.id],\n ['ct', colIndex], ['filled', '0']\n );\n\n if (col === MULTIPLE) {\n slc.multiple = MULTIPLE;\n slc.title = this.multipleSlcTooltip;\n }\n slc.className = col.toLowerCase() === SELECT ?\n tf.fltCssClass : tf.fltMultiCssClass;\n\n //filter is appended in container element\n if (externalFltTgtId) {\n elm(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 = 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 = elm(slcId);\n let rows = tf.tbl.rows;\n let nbRows = tf.getRowsNb(true);\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 < 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 // TODO: simplify hell below\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 ||\n 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 = matchCase(cellData, tf.caseSensitive);\n\n // checks if celldata is already in array\n if (!has(this.opts, cellString, tf.caseSensitive)) {\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 (!has(filteredCol, cellString, tf.caseSensitive) &&\n !has(excludedOpts, cellString, tf.caseSensitive)) {\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 (!tf.caseSensitive) {\n this.opts.sort(ignoreCase);\n if (excludedOpts) {\n excludedOpts.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(numSortAsc);\n if (excludedOpts) {\n excludedOpts.sort(numSortAsc);\n }\n if (this.isCustom) {\n this.optsTxt.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(numSortDesc);\n if (excludedOpts) {\n excludedOpts.sort(numSortDesc);\n }\n if (this.isCustom) {\n this.optsTxt.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 has(excludedOpts, matchCase(val, tf.caseSensitive),\n tf.caseSensitive)) {\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) === SELECT) {\n opt = createOpt(lbl, val, true);\n } else {\n opt = 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 = 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 = createOpt(tf.emptyText, tf.emOperator);\n slc.appendChild(opt1);\n }\n if (tf.enableNonEmptyOption) {\n let opt2 = 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) !== MULTIPLE || 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 !== '' && has(values, option.value, true)) {\n option.selected = true;\n }//if\n });\n }\n\n /**\n * Get filter values for a given column index\n * @param {Number} colIndex Column index\n * @returns {Array} values Array of selected values\n */\n getValues(colIndex) {\n let tf = this.tf;\n let slc = tf.getFilterElement(colIndex);\n let values = [];\n\n // IE >= 9 does not support the selectedOptions property :(\n if (slc.selectedOptions) {\n [].forEach.call(slc.selectedOptions,\n option => values.push(option.value));\n } else {\n [].forEach.call(slc.options, (option) => {\n if (option.selected) {\n values.push(option.value);\n }\n });\n }\n\n return values;\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__": 314,
+ "__docId__": 315,
"kind": "variable",
"static": true,
"variation": null,
@@ -6553,7 +6570,7 @@
}
},
{
- "__docId__": 315,
+ "__docId__": 316,
"kind": "class",
"static": true,
"variation": null,
@@ -6573,7 +6590,7 @@
]
},
{
- "__docId__": 316,
+ "__docId__": 317,
"kind": "constructor",
"static": false,
"variation": null,
@@ -6598,7 +6615,7 @@
"generator": false
},
{
- "__docId__": 317,
+ "__docId__": 318,
"kind": "member",
"static": false,
"variation": null,
@@ -6616,7 +6633,7 @@
}
},
{
- "__docId__": 318,
+ "__docId__": 319,
"kind": "member",
"static": false,
"variation": null,
@@ -6634,7 +6651,7 @@
}
},
{
- "__docId__": 319,
+ "__docId__": 320,
"kind": "member",
"static": false,
"variation": null,
@@ -6652,7 +6669,7 @@
}
},
{
- "__docId__": 320,
+ "__docId__": 321,
"kind": "member",
"static": false,
"variation": null,
@@ -6670,7 +6687,7 @@
}
},
{
- "__docId__": 321,
+ "__docId__": 322,
"kind": "member",
"static": false,
"variation": null,
@@ -6688,7 +6705,7 @@
}
},
{
- "__docId__": 322,
+ "__docId__": 323,
"kind": "member",
"static": false,
"variation": null,
@@ -6706,7 +6723,7 @@
}
},
{
- "__docId__": 323,
+ "__docId__": 324,
"kind": "member",
"static": false,
"variation": null,
@@ -6724,7 +6741,7 @@
}
},
{
- "__docId__": 324,
+ "__docId__": 325,
"kind": "member",
"static": false,
"variation": null,
@@ -6742,7 +6759,7 @@
}
},
{
- "__docId__": 325,
+ "__docId__": 326,
"kind": "method",
"static": false,
"variation": null,
@@ -6764,7 +6781,7 @@
"generator": false
},
{
- "__docId__": 326,
+ "__docId__": 327,
"kind": "method",
"static": false,
"variation": null,
@@ -6779,7 +6796,7 @@
"generator": false
},
{
- "__docId__": 327,
+ "__docId__": 328,
"kind": "method",
"static": false,
"variation": null,
@@ -6824,7 +6841,7 @@
"generator": false
},
{
- "__docId__": 328,
+ "__docId__": 329,
"kind": "member",
"static": false,
"variation": null,
@@ -6842,7 +6859,7 @@
}
},
{
- "__docId__": 329,
+ "__docId__": 330,
"kind": "method",
"static": false,
"variation": null,
@@ -6877,7 +6894,7 @@
"generator": false
},
{
- "__docId__": 330,
+ "__docId__": 331,
"kind": "member",
"static": false,
"variation": null,
@@ -6895,7 +6912,7 @@
}
},
{
- "__docId__": 331,
+ "__docId__": 332,
"kind": "member",
"static": false,
"variation": null,
@@ -6913,7 +6930,7 @@
}
},
{
- "__docId__": 332,
+ "__docId__": 333,
"kind": "member",
"static": false,
"variation": null,
@@ -6931,7 +6948,7 @@
}
},
{
- "__docId__": 333,
+ "__docId__": 334,
"kind": "member",
"static": false,
"variation": null,
@@ -6949,7 +6966,7 @@
}
},
{
- "__docId__": 334,
+ "__docId__": 335,
"kind": "member",
"static": false,
"variation": null,
@@ -6967,7 +6984,7 @@
}
},
{
- "__docId__": 335,
+ "__docId__": 336,
"kind": "member",
"static": false,
"variation": null,
@@ -6985,7 +7002,7 @@
}
},
{
- "__docId__": 336,
+ "__docId__": 337,
"kind": "method",
"static": false,
"variation": null,
@@ -7040,7 +7057,7 @@
"generator": false
},
{
- "__docId__": 337,
+ "__docId__": 338,
"kind": "method",
"static": false,
"variation": null,
@@ -7070,7 +7087,7 @@
"generator": false
},
{
- "__docId__": 338,
+ "__docId__": 339,
"kind": "method",
"static": false,
"variation": null,
@@ -7105,7 +7122,7 @@
"generator": false
},
{
- "__docId__": 339,
+ "__docId__": 340,
"kind": "method",
"static": false,
"variation": null,
@@ -7144,7 +7161,7 @@
"generator": false
},
{
- "__docId__": 340,
+ "__docId__": 341,
"kind": "method",
"static": false,
"variation": null,
@@ -7159,7 +7176,7 @@
"generator": false
},
{
- "__docId__": 341,
+ "__docId__": 342,
"kind": "file",
"static": true,
"variation": null,
@@ -7172,7 +7189,7 @@
"content": "import {Feature} from '../feature';\nimport {createElm, removeElm, elm, tag} from '../dom';\nimport {isFn, isNull, isUndef} from '../types';\nimport Event from '../event';\nimport {contains} from '../string';\nimport {NONE} from '../const';\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 = !isUndef(f.grid_enable_default_filters) ?\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 = 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 = createElm('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 = createElm('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 = removeElm(tbl);\n this.tblCont.appendChild(t);\n\n //In case table width is expressed in %\n if (tbl.style.width === '') {\n tbl.style.width = (contains('%', tblW) ?\n tbl.clientWidth : tblW) + 'px';\n }\n\n let d = removeElm(this.tblCont);\n this.tblMainCont.appendChild(d);\n\n //Headers table container: div wrapping headers table\n this.headTblCont = createElm(\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 = createElm('table', ['id', this.prfxHeadTbl + tf.id]);\n let tH = createElm('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 = createElm('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 = createElm(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(createElm('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 = 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 = 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 = createElm('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 = 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 = 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 = removeElm(tbl);\n this.tblMainCont.parentNode.insertBefore(t, this.tblMainCont);\n removeElm(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 = elm(tf.id);\n\n this.initialized = false;\n }\n}\n"
},
{
- "__docId__": 342,
+ "__docId__": 343,
"kind": "class",
"static": true,
"variation": null,
@@ -7192,7 +7209,7 @@
]
},
{
- "__docId__": 343,
+ "__docId__": 344,
"kind": "constructor",
"static": false,
"variation": null,
@@ -7217,7 +7234,7 @@
"generator": false
},
{
- "__docId__": 344,
+ "__docId__": 345,
"kind": "member",
"static": false,
"variation": null,
@@ -7235,7 +7252,7 @@
}
},
{
- "__docId__": 345,
+ "__docId__": 346,
"kind": "member",
"static": false,
"variation": null,
@@ -7253,7 +7270,7 @@
}
},
{
- "__docId__": 346,
+ "__docId__": 347,
"kind": "member",
"static": false,
"variation": null,
@@ -7271,7 +7288,7 @@
}
},
{
- "__docId__": 347,
+ "__docId__": 348,
"kind": "member",
"static": false,
"variation": null,
@@ -7289,7 +7306,7 @@
}
},
{
- "__docId__": 348,
+ "__docId__": 349,
"kind": "member",
"static": false,
"variation": null,
@@ -7307,7 +7324,7 @@
}
},
{
- "__docId__": 349,
+ "__docId__": 350,
"kind": "member",
"static": false,
"variation": null,
@@ -7325,7 +7342,7 @@
}
},
{
- "__docId__": 350,
+ "__docId__": 351,
"kind": "member",
"static": false,
"variation": null,
@@ -7343,7 +7360,7 @@
}
},
{
- "__docId__": 351,
+ "__docId__": 352,
"kind": "member",
"static": false,
"variation": null,
@@ -7361,7 +7378,7 @@
}
},
{
- "__docId__": 352,
+ "__docId__": 353,
"kind": "member",
"static": false,
"variation": null,
@@ -7379,7 +7396,7 @@
}
},
{
- "__docId__": 353,
+ "__docId__": 354,
"kind": "member",
"static": false,
"variation": null,
@@ -7397,7 +7414,7 @@
}
},
{
- "__docId__": 354,
+ "__docId__": 355,
"kind": "member",
"static": false,
"variation": null,
@@ -7415,7 +7432,7 @@
}
},
{
- "__docId__": 355,
+ "__docId__": 356,
"kind": "member",
"static": false,
"variation": null,
@@ -7433,7 +7450,7 @@
}
},
{
- "__docId__": 356,
+ "__docId__": 357,
"kind": "member",
"static": false,
"variation": null,
@@ -7451,7 +7468,7 @@
}
},
{
- "__docId__": 357,
+ "__docId__": 358,
"kind": "member",
"static": false,
"variation": null,
@@ -7469,7 +7486,7 @@
}
},
{
- "__docId__": 358,
+ "__docId__": 359,
"kind": "member",
"static": false,
"variation": null,
@@ -7487,7 +7504,7 @@
}
},
{
- "__docId__": 359,
+ "__docId__": 360,
"kind": "member",
"static": false,
"variation": null,
@@ -7505,7 +7522,7 @@
}
},
{
- "__docId__": 360,
+ "__docId__": 361,
"kind": "member",
"static": false,
"variation": null,
@@ -7523,7 +7540,7 @@
}
},
{
- "__docId__": 361,
+ "__docId__": 362,
"kind": "member",
"static": false,
"variation": null,
@@ -7541,7 +7558,7 @@
}
},
{
- "__docId__": 362,
+ "__docId__": 363,
"kind": "member",
"static": false,
"variation": null,
@@ -7559,7 +7576,7 @@
}
},
{
- "__docId__": 363,
+ "__docId__": 364,
"kind": "method",
"static": false,
"variation": null,
@@ -7573,7 +7590,7 @@
"generator": false
},
{
- "__docId__": 364,
+ "__docId__": 365,
"kind": "member",
"static": false,
"variation": null,
@@ -7591,7 +7608,7 @@
}
},
{
- "__docId__": 365,
+ "__docId__": 366,
"kind": "member",
"static": false,
"variation": null,
@@ -7609,7 +7626,7 @@
}
},
{
- "__docId__": 366,
+ "__docId__": 367,
"kind": "member",
"static": false,
"variation": null,
@@ -7627,7 +7644,7 @@
}
},
{
- "__docId__": 367,
+ "__docId__": 368,
"kind": "member",
"static": false,
"variation": null,
@@ -7645,7 +7662,7 @@
}
},
{
- "__docId__": 368,
+ "__docId__": 369,
"kind": "member",
"static": false,
"variation": null,
@@ -7663,7 +7680,7 @@
}
},
{
- "__docId__": 369,
+ "__docId__": 370,
"kind": "member",
"static": false,
"variation": null,
@@ -7681,7 +7698,7 @@
}
},
{
- "__docId__": 370,
+ "__docId__": 371,
"kind": "member",
"static": false,
"variation": null,
@@ -7699,7 +7716,7 @@
}
},
{
- "__docId__": 371,
+ "__docId__": 372,
"kind": "method",
"static": false,
"variation": null,
@@ -7713,7 +7730,7 @@
"generator": false
},
{
- "__docId__": 372,
+ "__docId__": 373,
"kind": "member",
"static": false,
"variation": null,
@@ -7731,7 +7748,7 @@
}
},
{
- "__docId__": 373,
+ "__docId__": 374,
"kind": "member",
"static": false,
"variation": null,
@@ -7749,7 +7766,7 @@
}
},
{
- "__docId__": 374,
+ "__docId__": 375,
"kind": "member",
"static": false,
"variation": null,
@@ -7767,7 +7784,7 @@
}
},
{
- "__docId__": 375,
+ "__docId__": 376,
"kind": "member",
"static": false,
"variation": null,
@@ -7785,7 +7802,7 @@
}
},
{
- "__docId__": 376,
+ "__docId__": 377,
"kind": "member",
"static": false,
"variation": null,
@@ -7803,7 +7820,7 @@
}
},
{
- "__docId__": 377,
+ "__docId__": 378,
"kind": "file",
"static": true,
"variation": null,
@@ -7816,7 +7833,7 @@
"content": "import Event from '../event';\nimport {root} from '../root';\n\nconst JSON = root.JSON;\nconst location = root.location;\nconst decodeURIComponent = root.decodeURIComponent;\n\nexport const hasHashChange = () => {\n let docMode = root.documentMode;\n return ('onhashchange' in root) && (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(root, '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(root, 'hashchange', () => this.sync());\n\n this.state = null;\n this.lastHash = null;\n this.emitter = null;\n }\n}\n"
},
{
- "__docId__": 378,
+ "__docId__": 379,
"kind": "variable",
"static": true,
"variation": null,
@@ -7837,7 +7854,7 @@
}
},
{
- "__docId__": 379,
+ "__docId__": 380,
"kind": "variable",
"static": true,
"variation": null,
@@ -7858,7 +7875,7 @@
}
},
{
- "__docId__": 380,
+ "__docId__": 381,
"kind": "variable",
"static": true,
"variation": null,
@@ -7879,7 +7896,7 @@
}
},
{
- "__docId__": 381,
+ "__docId__": 382,
"kind": "variable",
"static": true,
"variation": null,
@@ -7900,7 +7917,7 @@
}
},
{
- "__docId__": 382,
+ "__docId__": 383,
"kind": "class",
"static": true,
"variation": null,
@@ -7926,7 +7943,7 @@
"interface": false
},
{
- "__docId__": 383,
+ "__docId__": 384,
"kind": "constructor",
"static": false,
"variation": null,
@@ -7951,7 +7968,7 @@
"generator": false
},
{
- "__docId__": 384,
+ "__docId__": 385,
"kind": "member",
"static": false,
"variation": null,
@@ -7969,7 +7986,7 @@
}
},
{
- "__docId__": 385,
+ "__docId__": 386,
"kind": "member",
"static": false,
"variation": null,
@@ -7987,7 +8004,7 @@
}
},
{
- "__docId__": 386,
+ "__docId__": 387,
"kind": "member",
"static": false,
"variation": null,
@@ -8005,7 +8022,7 @@
}
},
{
- "__docId__": 387,
+ "__docId__": 388,
"kind": "method",
"static": false,
"variation": null,
@@ -8019,7 +8036,7 @@
"generator": false
},
{
- "__docId__": 388,
+ "__docId__": 389,
"kind": "member",
"static": false,
"variation": null,
@@ -8037,7 +8054,7 @@
}
},
{
- "__docId__": 389,
+ "__docId__": 390,
"kind": "method",
"static": false,
"variation": null,
@@ -8062,7 +8079,7 @@
"generator": false
},
{
- "__docId__": 390,
+ "__docId__": 391,
"kind": "member",
"static": false,
"variation": null,
@@ -8080,7 +8097,7 @@
}
},
{
- "__docId__": 391,
+ "__docId__": 392,
"kind": "method",
"static": false,
"variation": null,
@@ -8119,7 +8136,7 @@
"generator": false
},
{
- "__docId__": 392,
+ "__docId__": 393,
"kind": "method",
"static": false,
"variation": null,
@@ -8133,7 +8150,7 @@
"generator": false
},
{
- "__docId__": 393,
+ "__docId__": 394,
"kind": "method",
"static": false,
"variation": null,
@@ -8147,7 +8164,7 @@
"generator": false
},
{
- "__docId__": 394,
+ "__docId__": 395,
"kind": "member",
"static": false,
"variation": null,
@@ -8165,7 +8182,7 @@
}
},
{
- "__docId__": 395,
+ "__docId__": 396,
"kind": "member",
"static": false,
"variation": null,
@@ -8183,7 +8200,7 @@
}
},
{
- "__docId__": 396,
+ "__docId__": 397,
"kind": "member",
"static": false,
"variation": null,
@@ -8201,7 +8218,7 @@
}
},
{
- "__docId__": 397,
+ "__docId__": 398,
"kind": "file",
"static": true,
"variation": null,
@@ -8211,10 +8228,10 @@
"access": null,
"description": null,
"lineNumber": 1,
- "content": "import {Feature} from '../feature';\nimport {createElm, createText, elm, removeElm} from '../dom';\nimport Event from '../event';\nimport {NONE} from '../const';\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: <, <=, >, ' +\n ' >=, =, *, !, {, }, ' +\n ' ||, &&, [empty], [nonempty], ' +\n ' rgx:' +\n 'Learn more
';\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 = '';\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 = createElm('span', ['id', this.prfxHelpSpan+tf.id]);\n var helpdiv = createElm('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 : elm(this.tgtId);\n targetEl.appendChild(helpspan);\n\n var divContainer = !this.contTgtId ? helpspan : elm(this.contTgtId);\n\n if(!this.btnHtml){\n divContainer.appendChild(helpdiv);\n var helplink = createElm('a', ['href', 'javascript:void(0);']);\n helplink.className = this.btnCssClass;\n helplink.appendChild(createText(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 removeElm(this.btn);\n this.btn = null;\n if(!this.cont){\n return;\n }\n removeElm(this.cont);\n this.cont = null;\n this.initialized = false;\n }\n\n}\n"
+ "content": "import {Feature} from '../feature';\nimport {createElm, createText, elm, removeElm} from '../dom';\nimport Event from '../event';\nimport {NONE} from '../const';\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: <, <=, >, ' +\n ' >=, =, *, !, {, }, ' +\n ' ||, &&, [empty], [nonempty], ' +\n ' rgx:' +\n 'Learn more
';\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 = '';\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 /**\n * Initialise Help instance\n *\n * @returns (description)\n */\n init() {\n if (this.initialized) {\n return;\n }\n\n var tf = this.tf;\n\n var helpspan = createElm('span', ['id', this.prfxHelpSpan + tf.id]);\n var helpdiv = createElm('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 : elm(this.tgtId);\n targetEl.appendChild(helpspan);\n\n var divContainer = !this.contTgtId ? helpspan : elm(this.contTgtId);\n\n if (!this.btnHtml) {\n divContainer.appendChild(helpdiv);\n var helplink = createElm('a', ['href', 'javascript:void(0);']);\n helplink.className = this.btnCssClass;\n helplink.appendChild(createText(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 removeElm(this.btn);\n this.btn = null;\n if (!this.cont) {\n return;\n }\n removeElm(this.cont);\n this.cont = null;\n this.initialized = false;\n }\n\n}\n"
},
{
- "__docId__": 398,
+ "__docId__": 399,
"kind": "variable",
"static": true,
"variation": null,
@@ -8235,7 +8252,7 @@
}
},
{
- "__docId__": 399,
+ "__docId__": 400,
"kind": "variable",
"static": true,
"variation": null,
@@ -8256,7 +8273,7 @@
}
},
{
- "__docId__": 400,
+ "__docId__": 401,
"kind": "class",
"static": true,
"variation": null,
@@ -8276,7 +8293,7 @@
]
},
{
- "__docId__": 401,
+ "__docId__": 402,
"kind": "constructor",
"static": false,
"variation": null,
@@ -8301,7 +8318,7 @@
"generator": false
},
{
- "__docId__": 402,
+ "__docId__": 403,
"kind": "member",
"static": false,
"variation": null,
@@ -8319,7 +8336,7 @@
}
},
{
- "__docId__": 403,
+ "__docId__": 404,
"kind": "member",
"static": false,
"variation": null,
@@ -8337,7 +8354,7 @@
}
},
{
- "__docId__": 404,
+ "__docId__": 405,
"kind": "member",
"static": false,
"variation": null,
@@ -8355,7 +8372,7 @@
}
},
{
- "__docId__": 405,
+ "__docId__": 406,
"kind": "member",
"static": false,
"variation": null,
@@ -8373,7 +8390,7 @@
}
},
{
- "__docId__": 406,
+ "__docId__": 407,
"kind": "member",
"static": false,
"variation": null,
@@ -8391,7 +8408,7 @@
}
},
{
- "__docId__": 407,
+ "__docId__": 408,
"kind": "member",
"static": false,
"variation": null,
@@ -8409,7 +8426,7 @@
}
},
{
- "__docId__": 408,
+ "__docId__": 409,
"kind": "member",
"static": false,
"variation": null,
@@ -8427,7 +8444,7 @@
}
},
{
- "__docId__": 409,
+ "__docId__": 410,
"kind": "member",
"static": false,
"variation": null,
@@ -8445,7 +8462,7 @@
}
},
{
- "__docId__": 410,
+ "__docId__": 411,
"kind": "member",
"static": false,
"variation": null,
@@ -8463,7 +8480,7 @@
}
},
{
- "__docId__": 411,
+ "__docId__": 412,
"kind": "member",
"static": false,
"variation": null,
@@ -8481,7 +8498,7 @@
}
},
{
- "__docId__": 412,
+ "__docId__": 413,
"kind": "member",
"static": false,
"variation": null,
@@ -8499,7 +8516,7 @@
}
},
{
- "__docId__": 413,
+ "__docId__": 414,
"kind": "member",
"static": false,
"variation": null,
@@ -8517,7 +8534,7 @@
}
},
{
- "__docId__": 414,
+ "__docId__": 415,
"kind": "member",
"static": false,
"variation": null,
@@ -8535,7 +8552,7 @@
}
},
{
- "__docId__": 415,
+ "__docId__": 416,
"kind": "method",
"static": false,
"variation": null,
@@ -8543,14 +8560,27 @@
"memberof": "src/modules/help.js~Help",
"longname": "src/modules/help.js~Help#init",
"access": null,
- "description": null,
- "lineNumber": 66,
- "undocument": true,
+ "description": "Initialise Help instance",
+ "lineNumber": 71,
+ "unknown": [
+ {
+ "tagName": "@returns",
+ "tagValue": "(description)"
+ }
+ ],
"params": [],
+ "return": {
+ "nullable": null,
+ "types": [
+ "*"
+ ],
+ "spread": false,
+ "description": "(description)"
+ },
"generator": false
},
{
- "__docId__": 416,
+ "__docId__": 417,
"kind": "member",
"static": false,
"variation": null,
@@ -8559,25 +8589,7 @@
"longname": "src/modules/help.js~Help#cont",
"access": null,
"description": null,
- "lineNumber": 116,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 417,
- "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,
+ "lineNumber": 121,
"undocument": true,
"type": {
"types": [
@@ -8590,58 +8602,12 @@
"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__": 419,
- "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__": 420,
- "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__": 421,
- "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,
+ "lineNumber": 122,
"undocument": true,
"type": {
"types": [
@@ -8649,14 +8615,60 @@
]
}
},
+ {
+ "__docId__": 419,
+ "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": 123,
+ "undocument": true,
+ "type": {
+ "types": [
+ "boolean"
+ ]
+ }
+ },
+ {
+ "__docId__": 420,
+ "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": 129,
+ "params": [],
+ "generator": false
+ },
+ {
+ "__docId__": 421,
+ "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": 146,
+ "params": [],
+ "generator": false
+ },
{
"__docId__": 422,
"kind": "member",
"static": false,
"variation": null,
- "name": "cont",
+ "name": "btn",
"memberof": "src/modules/help.js~Help",
- "longname": "src/modules/help.js~Help#cont",
+ "longname": "src/modules/help.js~Help#btn",
"access": null,
"description": null,
"lineNumber": 151,
@@ -8672,12 +8684,30 @@
"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": 156,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 424,
+ "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,
+ "lineNumber": 157,
"undocument": true,
"type": {
"types": [
@@ -8686,7 +8716,7 @@
}
},
{
- "__docId__": 424,
+ "__docId__": 425,
"kind": "file",
"static": true,
"variation": null,
@@ -8699,7 +8729,7 @@
"content": "import {createText, createElm, getText} from '../dom';\nimport {isArray} 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 = node.nodeValue.toLowerCase();\n let tempWordVal = word.toLowerCase();\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 = createText(nv.substr(0, ni)),\n docWordVal = nv.substr(ni, word.length),\n after = createText(nv.substr(ni + word.length)),\n hiwordtext = createText(docWordVal),\n hiword = createElm('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 = getText(n),\n tempNodeVal = nodeVal.toLowerCase(),\n tempWordVal = word.toLowerCase();\n\n if (tempNodeVal.indexOf(tempWordVal) !== -1) {\n n.parentNode.replaceChild(createText(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 (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__": 425,
+ "__docId__": 426,
"kind": "class",
"static": true,
"variation": null,
@@ -8716,7 +8746,7 @@
"interface": false
},
{
- "__docId__": 426,
+ "__docId__": 427,
"kind": "constructor",
"static": false,
"variation": null,
@@ -8741,7 +8771,7 @@
"generator": false
},
{
- "__docId__": 427,
+ "__docId__": 428,
"kind": "member",
"static": false,
"variation": null,
@@ -8759,7 +8789,7 @@
}
},
{
- "__docId__": 428,
+ "__docId__": 429,
"kind": "member",
"static": false,
"variation": null,
@@ -8777,7 +8807,7 @@
}
},
{
- "__docId__": 429,
+ "__docId__": 430,
"kind": "member",
"static": false,
"variation": null,
@@ -8795,7 +8825,7 @@
}
},
{
- "__docId__": 430,
+ "__docId__": 431,
"kind": "method",
"static": false,
"variation": null,
@@ -8810,7 +8840,7 @@
"generator": false
},
{
- "__docId__": 431,
+ "__docId__": 432,
"kind": "method",
"static": false,
"variation": null,
@@ -8855,7 +8885,7 @@
"generator": false
},
{
- "__docId__": 432,
+ "__docId__": 433,
"kind": "method",
"static": false,
"variation": null,
@@ -8890,7 +8920,7 @@
"generator": false
},
{
- "__docId__": 433,
+ "__docId__": 434,
"kind": "method",
"static": false,
"variation": null,
@@ -8904,7 +8934,7 @@
"generator": false
},
{
- "__docId__": 434,
+ "__docId__": 435,
"kind": "method",
"static": false,
"variation": null,
@@ -8919,7 +8949,7 @@
"generator": false
},
{
- "__docId__": 435,
+ "__docId__": 436,
"kind": "file",
"static": true,
"variation": null,
@@ -8932,7 +8962,7 @@
"content": "import {Feature} from '../feature';\nimport {createElm, createText, elm, removeElm} from '../dom';\nimport {isFn} from '../types';\nimport {root} from '../root';\nimport {NONE} from '../const';\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 = isFn(f.on_show_loader) ? f.on_show_loader : null;\n //callback function after loader is closed\n this.onHideLoader = isFn(f.on_hide_loader) ? 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 = createElm('div', ['id', this.prfxLoader + tf.id]);\n containerDiv.className = this.loaderCssClass;\n\n let targetEl = !this.loaderTgtId ?\n tf.tbl.parentNode : elm(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(createText(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()) {\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 root.setTimeout(displayLoader, t);\n }\n\n destroy() {\n if (!this.initialized) {\n return;\n }\n\n let emitter = this.emitter;\n\n removeElm(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__": 436,
+ "__docId__": 437,
"kind": "class",
"static": true,
"variation": null,
@@ -8952,7 +8982,7 @@
]
},
{
- "__docId__": 437,
+ "__docId__": 438,
"kind": "constructor",
"static": false,
"variation": null,
@@ -8977,7 +9007,7 @@
"generator": false
},
{
- "__docId__": 438,
+ "__docId__": 439,
"kind": "member",
"static": false,
"variation": null,
@@ -8995,7 +9025,7 @@
}
},
{
- "__docId__": 439,
+ "__docId__": 440,
"kind": "member",
"static": false,
"variation": null,
@@ -9013,7 +9043,7 @@
}
},
{
- "__docId__": 440,
+ "__docId__": 441,
"kind": "member",
"static": false,
"variation": null,
@@ -9031,7 +9061,7 @@
}
},
{
- "__docId__": 441,
+ "__docId__": 442,
"kind": "member",
"static": false,
"variation": null,
@@ -9049,7 +9079,7 @@
}
},
{
- "__docId__": 442,
+ "__docId__": 443,
"kind": "member",
"static": false,
"variation": null,
@@ -9067,7 +9097,7 @@
}
},
{
- "__docId__": 443,
+ "__docId__": 444,
"kind": "member",
"static": false,
"variation": null,
@@ -9085,7 +9115,7 @@
}
},
{
- "__docId__": 444,
+ "__docId__": 445,
"kind": "member",
"static": false,
"variation": null,
@@ -9103,7 +9133,7 @@
}
},
{
- "__docId__": 445,
+ "__docId__": 446,
"kind": "member",
"static": false,
"variation": null,
@@ -9121,7 +9151,7 @@
}
},
{
- "__docId__": 446,
+ "__docId__": 447,
"kind": "member",
"static": false,
"variation": null,
@@ -9139,7 +9169,7 @@
}
},
{
- "__docId__": 447,
+ "__docId__": 448,
"kind": "method",
"static": false,
"variation": null,
@@ -9154,7 +9184,7 @@
"generator": false
},
{
- "__docId__": 448,
+ "__docId__": 449,
"kind": "member",
"static": false,
"variation": null,
@@ -9172,7 +9202,7 @@
}
},
{
- "__docId__": 449,
+ "__docId__": 450,
"kind": "member",
"static": false,
"variation": null,
@@ -9190,7 +9220,7 @@
}
},
{
- "__docId__": 450,
+ "__docId__": 451,
"kind": "method",
"static": false,
"variation": null,
@@ -9212,7 +9242,7 @@
"generator": false
},
{
- "__docId__": 451,
+ "__docId__": 452,
"kind": "method",
"static": false,
"variation": null,
@@ -9227,7 +9257,7 @@
"generator": false
},
{
- "__docId__": 452,
+ "__docId__": 453,
"kind": "member",
"static": false,
"variation": null,
@@ -9245,7 +9275,7 @@
}
},
{
- "__docId__": 453,
+ "__docId__": 454,
"kind": "member",
"static": false,
"variation": null,
@@ -9263,7 +9293,7 @@
}
},
{
- "__docId__": 454,
+ "__docId__": 455,
"kind": "file",
"static": true,
"variation": null,
@@ -9276,7 +9306,7 @@
"content": "import {Feature} from '../feature';\nimport {createElm, elm, removeElm} from '../dom';\nimport {isEmpty, isFn} from '../types';\nimport {NONE} from '../const';\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 = !isEmpty(this.customContainer) ||\n !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 = isFn(f.on_before_show_msg) ?\n f.on_before_show_msg : null;\n //callback after message is displayed\n this.onAfterShowMsg = isFn(f.on_after_show_msg) ?\n f.on_after_show_msg : null;\n //callback before message is hidden\n this.onBeforeHideMsg = isFn(f.on_before_hide_msg) ?\n f.on_before_hide_msg : null;\n //callback after message is hidden\n this.onAfterHideMsg = 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 || elm(this.customContainerId) ||\n tf.tbl;\n\n //container\n let cont = createElm('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.getValidRowsNb() > 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 removeElm(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__": 455,
+ "__docId__": 456,
"kind": "class",
"static": true,
"variation": null,
@@ -9296,7 +9326,7 @@
]
},
{
- "__docId__": 456,
+ "__docId__": 457,
"kind": "constructor",
"static": false,
"variation": null,
@@ -9321,7 +9351,7 @@
"generator": false
},
{
- "__docId__": 457,
+ "__docId__": 458,
"kind": "member",
"static": false,
"variation": null,
@@ -9339,7 +9369,7 @@
}
},
{
- "__docId__": 458,
+ "__docId__": 459,
"kind": "member",
"static": false,
"variation": null,
@@ -9357,7 +9387,7 @@
}
},
{
- "__docId__": 459,
+ "__docId__": 460,
"kind": "member",
"static": false,
"variation": null,
@@ -9375,7 +9405,7 @@
}
},
{
- "__docId__": 460,
+ "__docId__": 461,
"kind": "member",
"static": false,
"variation": null,
@@ -9393,7 +9423,7 @@
}
},
{
- "__docId__": 461,
+ "__docId__": 462,
"kind": "member",
"static": false,
"variation": null,
@@ -9411,7 +9441,7 @@
}
},
{
- "__docId__": 462,
+ "__docId__": 463,
"kind": "member",
"static": false,
"variation": null,
@@ -9429,7 +9459,7 @@
}
},
{
- "__docId__": 463,
+ "__docId__": 464,
"kind": "member",
"static": false,
"variation": null,
@@ -9447,7 +9477,7 @@
}
},
{
- "__docId__": 464,
+ "__docId__": 465,
"kind": "member",
"static": false,
"variation": null,
@@ -9465,7 +9495,7 @@
}
},
{
- "__docId__": 465,
+ "__docId__": 466,
"kind": "member",
"static": false,
"variation": null,
@@ -9483,7 +9513,7 @@
}
},
{
- "__docId__": 466,
+ "__docId__": 467,
"kind": "member",
"static": false,
"variation": null,
@@ -9501,7 +9531,7 @@
}
},
{
- "__docId__": 467,
+ "__docId__": 468,
"kind": "member",
"static": false,
"variation": null,
@@ -9519,7 +9549,7 @@
}
},
{
- "__docId__": 468,
+ "__docId__": 469,
"kind": "method",
"static": false,
"variation": null,
@@ -9534,7 +9564,7 @@
"generator": false
},
{
- "__docId__": 469,
+ "__docId__": 470,
"kind": "member",
"static": false,
"variation": null,
@@ -9552,7 +9582,7 @@
}
},
{
- "__docId__": 470,
+ "__docId__": 471,
"kind": "member",
"static": false,
"variation": null,
@@ -9570,7 +9600,7 @@
}
},
{
- "__docId__": 471,
+ "__docId__": 472,
"kind": "method",
"static": false,
"variation": null,
@@ -9585,7 +9615,7 @@
"generator": false
},
{
- "__docId__": 472,
+ "__docId__": 473,
"kind": "method",
"static": false,
"variation": null,
@@ -9600,7 +9630,7 @@
"generator": false
},
{
- "__docId__": 473,
+ "__docId__": 474,
"kind": "method",
"static": false,
"variation": null,
@@ -9615,7 +9645,7 @@
"generator": false
},
{
- "__docId__": 474,
+ "__docId__": 475,
"kind": "method",
"static": false,
"variation": null,
@@ -9630,7 +9660,7 @@
"generator": false
},
{
- "__docId__": 475,
+ "__docId__": 476,
"kind": "method",
"static": false,
"variation": null,
@@ -9645,7 +9675,7 @@
"generator": false
},
{
- "__docId__": 476,
+ "__docId__": 477,
"kind": "member",
"static": false,
"variation": null,
@@ -9663,7 +9693,7 @@
}
},
{
- "__docId__": 477,
+ "__docId__": 478,
"kind": "member",
"static": false,
"variation": null,
@@ -9681,7 +9711,7 @@
}
},
{
- "__docId__": 478,
+ "__docId__": 479,
"kind": "file",
"static": true,
"variation": null,
@@ -9694,7 +9724,7 @@
"content": "import {Feature} from '../feature';\nimport {createElm, createOpt, createText, elm, removeElm} from '../dom';\nimport {isArray, isFn, isNull} from '../types';\nimport Event from '../event';\nimport {INPUT, SELECT, NONE, ENTER_KEY} from '../const';\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 = 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 ' ');\n //defines previous page button html\n this.btnPrevPageHtml = f.btn_prev_page_html ||\n (!tf.enableIcons ? null :\n ' ');\n //defines last page button html\n this.btnFirstPageHtml = f.btn_first_page_html ||\n (!tf.enableIcons ? null :\n ' ');\n //defines previous page button html\n this.btnLastPageHtml = f.btn_last_page_html ||\n (!tf.enableIcons ? null :\n ' ');\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 || SELECT;\n //calls function before page is changed\n this.onBeforeChangePage = isFn(f.on_before_change_page) ?\n f.on_before_change_page : null;\n //calls function before page is changed\n this.onAfterChangePage = 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.getRowsNb(true);\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 === SELECT) ?\n o.pagingSlc.options.selectedIndex :\n parseInt(o.pagingSlc.value, 10) - 1;\n },\n nbOpts() {\n return (o.pageSelectorType === SELECT) ?\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 === ENTER_KEY) {\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 === SELECT) {\n slcPages = createElm(SELECT, ['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 === INPUT) {\n slcPages = createElm(INPUT,\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 = createElm(\n 'span', ['id', this.prfxBtnNextSpan + tf.id]);\n var btnPrevSpan = createElm(\n 'span', ['id', this.prfxBtnPrevSpan + tf.id]);\n var btnLastSpan = createElm(\n 'span', ['id', this.prfxBtnLastSpan + tf.id]);\n var btnFirstSpan = createElm(\n 'span', ['id', this.prfxBtnFirstSpan + tf.id]);\n\n if (this.hasPagingBtns) {\n // Next button\n if (!this.btnNextPageHtml) {\n var btn_next = createElm(INPUT,\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 = createElm(INPUT,\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 = createElm(INPUT,\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 = createElm(INPUT,\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 : elm(this.pagingTgtId);\n targetEl.appendChild(btnFirstSpan);\n targetEl.appendChild(btnPrevSpan);\n\n var pgBeforeSpan = createElm(\n 'span', ['id', this.prfxPgBeforeSpan + tf.id]);\n pgBeforeSpan.appendChild(createText(this.pageText));\n pgBeforeSpan.className = this.nbPgSpanCssClass;\n targetEl.appendChild(pgBeforeSpan);\n targetEl.appendChild(slcPages);\n var pgAfterSpan = createElm(\n 'span', ['id', this.prfxPgAfterSpan + tf.id]);\n pgAfterSpan.appendChild(createText(this.ofText));\n pgAfterSpan.className = this.nbPgSpanCssClass;\n targetEl.appendChild(pgAfterSpan);\n var pgspan = createElm('span', ['id', this.prfxPgSpan + tf.id]);\n pgspan.className = this.nbPgSpanCssClass;\n pgspan.appendChild(createText(' ' + this.nbPages + ' '));\n targetEl.appendChild(pgspan);\n targetEl.appendChild(btnNextSpan);\n targetEl.appendChild(btnLastSpan);\n this.pagingSlc = elm(this.prfxSlcPages + tf.id);\n\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(['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 : elm(this.pagingTgtId);\n var pgspan = elm(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 === SELECT) {\n this.pagingSlc.innerHTML = '';\n }\n\n if (this.nbPages > 0) {\n mdiv.style.visibility = 'visible';\n if (this.pageSelectorType === SELECT) {\n for (var z = 0; z < this.nbPages; z++) {\n var opt = 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.getValidRowsNb(true); 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 (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 // 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 defined by passed argument (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.isInitialized() || !this.isEnabled()) {\n return;\n }\n var btnEvt = this.evt,\n cmdtype = typeof cmd;\n if (cmdtype === 'string') {\n switch (cmd.toLowerCase()) {\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 = createElm(SELECT, ['id', this.prfxSlcResults + tf.id]);\n slcR.className = this.resultsSlcCssClass;\n var slcRText = this.resultsPerPage[0],\n slcROpts = this.resultsPerPage[1];\n var slcRSpan = createElm(\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 : elm(this.resultsPerPageTgtId);\n slcRSpan.appendChild(createText(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.isInitialized() || !this.resultsPerPageSlc ||\n !this.resultsPerPage) {\n return;\n }\n var slcR = this.resultsPerPageSlc,\n slcRSpan = elm(this.prfxSlcResultsTxt + tf.id);\n if (slcR) {\n removeElm(slcR);\n }\n if (slcRSpan) {\n removeElm(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 === SELECT ?\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 === SELECT) {\n this.pagingSlc.options[index].selected = true;\n } else {\n this.pagingSlc.value = this.currentPageNb;\n }\n\n this.startPagingRow = (this.pageSelectorType === SELECT) ?\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 === SELECT) ?\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 === SELECT) {\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 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 = elm(this.prfxBtnNextSpan + tf.id);\n var btnPrevSpan = elm(this.prfxBtnPrevSpan + tf.id);\n var btnLastSpan = elm(this.prfxBtnLastSpan + tf.id);\n var btnFirstSpan = elm(this.prfxBtnFirstSpan + tf.id);\n //span containing 'Page' text\n var pgBeforeSpan = elm(this.prfxPgBeforeSpan + tf.id);\n //span containing 'of' text\n var pgAfterSpan = elm(this.prfxPgAfterSpan + tf.id);\n //span containing nb of pages\n var pgspan = elm(this.prfxPgSpan + tf.id);\n\n var evt = this.evt;\n\n if (this.pagingSlc) {\n if (this.pageSelectorType === SELECT) {\n Event.remove(this.pagingSlc, 'change', evt.slcPagesChange);\n }\n else if (this.pageSelectorType === INPUT) {\n Event.remove(this.pagingSlc, 'keypress', evt._detectKey);\n }\n removeElm(this.pagingSlc);\n }\n\n if (btnNextSpan) {\n Event.remove(btnNextSpan, 'click', evt.next);\n removeElm(btnNextSpan);\n }\n\n if (btnPrevSpan) {\n Event.remove(btnPrevSpan, 'click', evt.prev);\n removeElm(btnPrevSpan);\n }\n\n if (btnLastSpan) {\n Event.remove(btnLastSpan, 'click', evt.last);\n removeElm(btnLastSpan);\n }\n\n if (btnFirstSpan) {\n Event.remove(btnFirstSpan, 'click', evt.first);\n removeElm(btnFirstSpan);\n }\n\n if (pgBeforeSpan) {\n removeElm(pgBeforeSpan);\n }\n\n if (pgAfterSpan) {\n removeElm(pgAfterSpan);\n }\n\n if (pgspan) {\n removeElm(pgspan);\n }\n\n if (this.hasResultsPerPage) {\n this.removeResultsPerPage();\n }\n\n this.emitter.off(['after-filtering'], () => this.resetPagingInfo());\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__": 479,
+ "__docId__": 480,
"kind": "class",
"static": true,
"variation": null,
@@ -9714,7 +9744,7 @@
]
},
{
- "__docId__": 480,
+ "__docId__": 481,
"kind": "constructor",
"static": false,
"variation": null,
@@ -9739,7 +9769,7 @@
"generator": false
},
{
- "__docId__": 481,
+ "__docId__": 482,
"kind": "member",
"static": false,
"variation": null,
@@ -9757,7 +9787,7 @@
}
},
{
- "__docId__": 482,
+ "__docId__": 483,
"kind": "member",
"static": false,
"variation": null,
@@ -9775,7 +9805,7 @@
}
},
{
- "__docId__": 483,
+ "__docId__": 484,
"kind": "member",
"static": false,
"variation": null,
@@ -9793,7 +9823,7 @@
}
},
{
- "__docId__": 484,
+ "__docId__": 485,
"kind": "member",
"static": false,
"variation": null,
@@ -9811,7 +9841,7 @@
}
},
{
- "__docId__": 485,
+ "__docId__": 486,
"kind": "member",
"static": false,
"variation": null,
@@ -9829,7 +9859,7 @@
}
},
{
- "__docId__": 486,
+ "__docId__": 487,
"kind": "member",
"static": false,
"variation": null,
@@ -9847,7 +9877,7 @@
}
},
{
- "__docId__": 487,
+ "__docId__": 488,
"kind": "member",
"static": false,
"variation": null,
@@ -9865,7 +9895,7 @@
}
},
{
- "__docId__": 488,
+ "__docId__": 489,
"kind": "member",
"static": false,
"variation": null,
@@ -9883,7 +9913,7 @@
}
},
{
- "__docId__": 489,
+ "__docId__": 490,
"kind": "member",
"static": false,
"variation": null,
@@ -9901,7 +9931,7 @@
}
},
{
- "__docId__": 490,
+ "__docId__": 491,
"kind": "member",
"static": false,
"variation": null,
@@ -9919,7 +9949,7 @@
}
},
{
- "__docId__": 491,
+ "__docId__": 492,
"kind": "member",
"static": false,
"variation": null,
@@ -9937,7 +9967,7 @@
}
},
{
- "__docId__": 492,
+ "__docId__": 493,
"kind": "member",
"static": false,
"variation": null,
@@ -9955,7 +9985,7 @@
}
},
{
- "__docId__": 493,
+ "__docId__": 494,
"kind": "member",
"static": false,
"variation": null,
@@ -9973,7 +10003,7 @@
}
},
{
- "__docId__": 494,
+ "__docId__": 495,
"kind": "member",
"static": false,
"variation": null,
@@ -9991,7 +10021,7 @@
}
},
{
- "__docId__": 495,
+ "__docId__": 496,
"kind": "member",
"static": false,
"variation": null,
@@ -10009,7 +10039,7 @@
}
},
{
- "__docId__": 496,
+ "__docId__": 497,
"kind": "member",
"static": false,
"variation": null,
@@ -10027,7 +10057,7 @@
}
},
{
- "__docId__": 497,
+ "__docId__": 498,
"kind": "member",
"static": false,
"variation": null,
@@ -10045,7 +10075,7 @@
}
},
{
- "__docId__": 498,
+ "__docId__": 499,
"kind": "member",
"static": false,
"variation": null,
@@ -10063,7 +10093,7 @@
}
},
{
- "__docId__": 499,
+ "__docId__": 500,
"kind": "member",
"static": false,
"variation": null,
@@ -10081,7 +10111,7 @@
}
},
{
- "__docId__": 500,
+ "__docId__": 501,
"kind": "member",
"static": false,
"variation": null,
@@ -10099,7 +10129,7 @@
}
},
{
- "__docId__": 501,
+ "__docId__": 502,
"kind": "member",
"static": false,
"variation": null,
@@ -10117,7 +10147,7 @@
}
},
{
- "__docId__": 502,
+ "__docId__": 503,
"kind": "member",
"static": false,
"variation": null,
@@ -10135,7 +10165,7 @@
}
},
{
- "__docId__": 503,
+ "__docId__": 504,
"kind": "member",
"static": false,
"variation": null,
@@ -10153,7 +10183,7 @@
}
},
{
- "__docId__": 504,
+ "__docId__": 505,
"kind": "member",
"static": false,
"variation": null,
@@ -10171,7 +10201,7 @@
}
},
{
- "__docId__": 505,
+ "__docId__": 506,
"kind": "member",
"static": false,
"variation": null,
@@ -10189,7 +10219,7 @@
}
},
{
- "__docId__": 506,
+ "__docId__": 507,
"kind": "member",
"static": false,
"variation": null,
@@ -10207,7 +10237,7 @@
}
},
{
- "__docId__": 507,
+ "__docId__": 508,
"kind": "member",
"static": false,
"variation": null,
@@ -10225,7 +10255,7 @@
}
},
{
- "__docId__": 508,
+ "__docId__": 509,
"kind": "member",
"static": false,
"variation": null,
@@ -10243,7 +10273,7 @@
}
},
{
- "__docId__": 509,
+ "__docId__": 510,
"kind": "member",
"static": false,
"variation": null,
@@ -10261,7 +10291,7 @@
}
},
{
- "__docId__": 510,
+ "__docId__": 511,
"kind": "member",
"static": false,
"variation": null,
@@ -10279,7 +10309,7 @@
}
},
{
- "__docId__": 511,
+ "__docId__": 512,
"kind": "member",
"static": false,
"variation": null,
@@ -10297,7 +10327,7 @@
}
},
{
- "__docId__": 512,
+ "__docId__": 513,
"kind": "member",
"static": false,
"variation": null,
@@ -10315,7 +10345,7 @@
}
},
{
- "__docId__": 513,
+ "__docId__": 514,
"kind": "member",
"static": false,
"variation": null,
@@ -10333,7 +10363,7 @@
}
},
{
- "__docId__": 514,
+ "__docId__": 515,
"kind": "member",
"static": false,
"variation": null,
@@ -10351,7 +10381,7 @@
}
},
{
- "__docId__": 515,
+ "__docId__": 516,
"kind": "member",
"static": false,
"variation": null,
@@ -10369,7 +10399,7 @@
}
},
{
- "__docId__": 516,
+ "__docId__": 517,
"kind": "member",
"static": false,
"variation": null,
@@ -10387,7 +10417,7 @@
}
},
{
- "__docId__": 517,
+ "__docId__": 518,
"kind": "member",
"static": false,
"variation": null,
@@ -10405,7 +10435,7 @@
}
},
{
- "__docId__": 518,
+ "__docId__": 519,
"kind": "member",
"static": false,
"variation": null,
@@ -10423,7 +10453,7 @@
}
},
{
- "__docId__": 519,
+ "__docId__": 520,
"kind": "member",
"static": false,
"variation": null,
@@ -10441,7 +10471,7 @@
}
},
{
- "__docId__": 520,
+ "__docId__": 521,
"kind": "member",
"static": false,
"variation": null,
@@ -10459,7 +10489,7 @@
}
},
{
- "__docId__": 521,
+ "__docId__": 522,
"kind": "member",
"static": false,
"variation": null,
@@ -10477,7 +10507,7 @@
}
},
{
- "__docId__": 522,
+ "__docId__": 523,
"kind": "member",
"static": false,
"variation": null,
@@ -10495,7 +10525,7 @@
}
},
{
- "__docId__": 523,
+ "__docId__": 524,
"kind": "member",
"static": false,
"variation": null,
@@ -10513,7 +10543,7 @@
}
},
{
- "__docId__": 524,
+ "__docId__": 525,
"kind": "member",
"static": false,
"variation": null,
@@ -10531,7 +10561,7 @@
}
},
{
- "__docId__": 525,
+ "__docId__": 526,
"kind": "member",
"static": false,
"variation": null,
@@ -10549,7 +10579,7 @@
}
},
{
- "__docId__": 526,
+ "__docId__": 527,
"kind": "member",
"static": false,
"variation": null,
@@ -10567,7 +10597,7 @@
}
},
{
- "__docId__": 527,
+ "__docId__": 528,
"kind": "method",
"static": false,
"variation": null,
@@ -10581,7 +10611,7 @@
"generator": false
},
{
- "__docId__": 528,
+ "__docId__": 529,
"kind": "member",
"static": false,
"variation": null,
@@ -10599,7 +10629,7 @@
}
},
{
- "__docId__": 529,
+ "__docId__": 530,
"kind": "member",
"static": false,
"variation": null,
@@ -10617,7 +10647,7 @@
}
},
{
- "__docId__": 530,
+ "__docId__": 531,
"kind": "member",
"static": false,
"variation": null,
@@ -10635,7 +10665,7 @@
}
},
{
- "__docId__": 531,
+ "__docId__": 532,
"kind": "member",
"static": false,
"variation": null,
@@ -10653,7 +10683,7 @@
}
},
{
- "__docId__": 532,
+ "__docId__": 533,
"kind": "method",
"static": false,
"variation": null,
@@ -10678,7 +10708,7 @@
"generator": false
},
{
- "__docId__": 533,
+ "__docId__": 534,
"kind": "method",
"static": false,
"variation": null,
@@ -10692,7 +10722,7 @@
"generator": false
},
{
- "__docId__": 534,
+ "__docId__": 535,
"kind": "member",
"static": false,
"variation": null,
@@ -10710,7 +10740,7 @@
}
},
{
- "__docId__": 535,
+ "__docId__": 536,
"kind": "member",
"static": false,
"variation": null,
@@ -10728,7 +10758,7 @@
}
},
{
- "__docId__": 536,
+ "__docId__": 537,
"kind": "method",
"static": false,
"variation": null,
@@ -10753,7 +10783,7 @@
"generator": false
},
{
- "__docId__": 537,
+ "__docId__": 538,
"kind": "member",
"static": false,
"variation": null,
@@ -10771,7 +10801,7 @@
}
},
{
- "__docId__": 538,
+ "__docId__": 539,
"kind": "method",
"static": false,
"variation": null,
@@ -10796,7 +10826,7 @@
"generator": false
},
{
- "__docId__": 539,
+ "__docId__": 540,
"kind": "method",
"static": false,
"variation": null,
@@ -10818,7 +10848,7 @@
"generator": false
},
{
- "__docId__": 540,
+ "__docId__": 541,
"kind": "method",
"static": false,
"variation": null,
@@ -10843,7 +10873,7 @@
"generator": false
},
{
- "__docId__": 541,
+ "__docId__": 542,
"kind": "method",
"static": false,
"variation": null,
@@ -10857,7 +10887,7 @@
"generator": false
},
{
- "__docId__": 542,
+ "__docId__": 543,
"kind": "member",
"static": false,
"variation": null,
@@ -10875,7 +10905,7 @@
}
},
{
- "__docId__": 543,
+ "__docId__": 544,
"kind": "method",
"static": false,
"variation": null,
@@ -10889,7 +10919,7 @@
"generator": false
},
{
- "__docId__": 544,
+ "__docId__": 545,
"kind": "member",
"static": false,
"variation": null,
@@ -10907,7 +10937,7 @@
}
},
{
- "__docId__": 545,
+ "__docId__": 546,
"kind": "method",
"static": false,
"variation": null,
@@ -10932,7 +10962,7 @@
"generator": false
},
{
- "__docId__": 546,
+ "__docId__": 547,
"kind": "member",
"static": false,
"variation": null,
@@ -10950,7 +10980,7 @@
}
},
{
- "__docId__": 547,
+ "__docId__": 548,
"kind": "member",
"static": false,
"variation": null,
@@ -10968,7 +10998,7 @@
}
},
{
- "__docId__": 548,
+ "__docId__": 549,
"kind": "method",
"static": false,
"variation": null,
@@ -10990,7 +11020,7 @@
"generator": false
},
{
- "__docId__": 549,
+ "__docId__": 550,
"kind": "method",
"static": false,
"variation": null,
@@ -11004,7 +11034,7 @@
"generator": false
},
{
- "__docId__": 550,
+ "__docId__": 551,
"kind": "member",
"static": false,
"variation": null,
@@ -11022,7 +11052,7 @@
}
},
{
- "__docId__": 551,
+ "__docId__": 552,
"kind": "member",
"static": false,
"variation": null,
@@ -11040,7 +11070,7 @@
}
},
{
- "__docId__": 552,
+ "__docId__": 553,
"kind": "member",
"static": false,
"variation": null,
@@ -11058,7 +11088,7 @@
}
},
{
- "__docId__": 553,
+ "__docId__": 554,
"kind": "method",
"static": false,
"variation": null,
@@ -11072,7 +11102,7 @@
"generator": false
},
{
- "__docId__": 554,
+ "__docId__": 555,
"kind": "method",
"static": false,
"variation": null,
@@ -11086,7 +11116,7 @@
"generator": false
},
{
- "__docId__": 555,
+ "__docId__": 556,
"kind": "method",
"static": false,
"variation": null,
@@ -11100,7 +11130,7 @@
"generator": false
},
{
- "__docId__": 556,
+ "__docId__": 557,
"kind": "member",
"static": false,
"variation": null,
@@ -11118,7 +11148,7 @@
}
},
{
- "__docId__": 557,
+ "__docId__": 558,
"kind": "member",
"static": false,
"variation": null,
@@ -11136,7 +11166,7 @@
}
},
{
- "__docId__": 558,
+ "__docId__": 559,
"kind": "member",
"static": false,
"variation": null,
@@ -11154,7 +11184,7 @@
}
},
{
- "__docId__": 559,
+ "__docId__": 560,
"kind": "file",
"static": true,
"variation": null,
@@ -11167,7 +11197,7 @@
"content": "import {Feature} from '../feature';\nimport {isFn} from '../types';\nimport {createElm, removeElm} from '../dom';\nimport Event from '../event';\nimport {INPUT, NONE} from '../const';\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 let 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 '  ';\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 = 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 = 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 = 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 = 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(evt) {\n let elm = Event.target(evt).parentNode,\n colIndex = parseInt(elm.getAttribute('ci'), 10);\n\n this.closeAll(colIndex);\n this.toggle(colIndex);\n\n if (this.popUpFltAdjustToContainer) {\n let 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 let 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 (let i = 0; i < tf.nbCells; i++) {\n if (tf.getFilterType(i) === NONE) {\n continue;\n }\n let popUpSpan = createElm(\n 'span',\n ['id', this.prfxPopUpSpan + tf.id + '_' + i],\n ['ci', i]\n );\n popUpSpan.innerHTML = this.popUpImgFltHtml;\n let 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 (let 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 let tf = this.tf;\n let popUpDiv = !div ?\n createElm('div',\n ['id', this.prfxPopUpDiv + tf.id + '_' + colIndex]) :\n div;\n popUpDiv.className = this.popUpDivCssClass;\n tf.externalFltTgtIds.push(popUpDiv.id);\n let 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 let 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) === INPUT) {\n let 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 (let i = 0; i < this.popUpFltElms.length; i++) {\n if (i === exceptIdx) {\n continue;\n }\n let 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 (let 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 (let i = 0; i < this.popUpFltElms.length; i++) {\n let popUpFltElm = this.popUpFltElms[i],\n popUpFltSpan = this.popUpFltSpans[i],\n popUpFltImg = this.popUpFltImgs[i];\n if (popUpFltElm) {\n removeElm(popUpFltElm);\n this.popUpFltElmCache[i] = popUpFltElm;\n }\n popUpFltElm = null;\n if (popUpFltSpan) {\n removeElm(popUpFltSpan);\n }\n popUpFltSpan = null;\n if (popUpFltImg) {\n removeElm(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__": 560,
+ "__docId__": 561,
"kind": "class",
"static": true,
"variation": null,
@@ -11187,7 +11217,7 @@
]
},
{
- "__docId__": 561,
+ "__docId__": 562,
"kind": "constructor",
"static": false,
"variation": null,
@@ -11212,7 +11242,7 @@
"generator": false
},
{
- "__docId__": 562,
+ "__docId__": 563,
"kind": "member",
"static": false,
"variation": null,
@@ -11230,7 +11260,7 @@
}
},
{
- "__docId__": 563,
+ "__docId__": 564,
"kind": "member",
"static": false,
"variation": null,
@@ -11248,7 +11278,7 @@
}
},
{
- "__docId__": 564,
+ "__docId__": 565,
"kind": "member",
"static": false,
"variation": null,
@@ -11266,7 +11296,7 @@
}
},
{
- "__docId__": 565,
+ "__docId__": 566,
"kind": "member",
"static": false,
"variation": null,
@@ -11284,7 +11314,7 @@
}
},
{
- "__docId__": 566,
+ "__docId__": 567,
"kind": "member",
"static": false,
"variation": null,
@@ -11302,7 +11332,7 @@
}
},
{
- "__docId__": 567,
+ "__docId__": 568,
"kind": "member",
"static": false,
"variation": null,
@@ -11320,7 +11350,7 @@
}
},
{
- "__docId__": 568,
+ "__docId__": 569,
"kind": "member",
"static": false,
"variation": null,
@@ -11338,7 +11368,7 @@
}
},
{
- "__docId__": 569,
+ "__docId__": 570,
"kind": "member",
"static": false,
"variation": null,
@@ -11356,7 +11386,7 @@
}
},
{
- "__docId__": 570,
+ "__docId__": 571,
"kind": "member",
"static": false,
"variation": null,
@@ -11374,7 +11404,7 @@
}
},
{
- "__docId__": 571,
+ "__docId__": 572,
"kind": "member",
"static": false,
"variation": null,
@@ -11392,7 +11422,7 @@
}
},
{
- "__docId__": 572,
+ "__docId__": 573,
"kind": "member",
"static": false,
"variation": null,
@@ -11410,7 +11440,7 @@
}
},
{
- "__docId__": 573,
+ "__docId__": 574,
"kind": "member",
"static": false,
"variation": null,
@@ -11428,7 +11458,7 @@
}
},
{
- "__docId__": 574,
+ "__docId__": 575,
"kind": "member",
"static": false,
"variation": null,
@@ -11446,7 +11476,7 @@
}
},
{
- "__docId__": 575,
+ "__docId__": 576,
"kind": "member",
"static": false,
"variation": null,
@@ -11464,7 +11494,7 @@
}
},
{
- "__docId__": 576,
+ "__docId__": 577,
"kind": "method",
"static": false,
"variation": null,
@@ -11486,7 +11516,7 @@
"generator": false
},
{
- "__docId__": 577,
+ "__docId__": 578,
"kind": "method",
"static": false,
"variation": null,
@@ -11500,7 +11530,7 @@
"generator": false
},
{
- "__docId__": 578,
+ "__docId__": 579,
"kind": "member",
"static": false,
"variation": null,
@@ -11518,7 +11548,7 @@
}
},
{
- "__docId__": 579,
+ "__docId__": 580,
"kind": "method",
"static": false,
"variation": null,
@@ -11532,7 +11562,7 @@
"generator": false
},
{
- "__docId__": 580,
+ "__docId__": 581,
"kind": "method",
"static": false,
"variation": null,
@@ -11546,7 +11576,7 @@
"generator": false
},
{
- "__docId__": 581,
+ "__docId__": 582,
"kind": "method",
"static": false,
"variation": null,
@@ -11581,7 +11611,7 @@
"generator": false
},
{
- "__docId__": 582,
+ "__docId__": 583,
"kind": "method",
"static": false,
"variation": null,
@@ -11606,7 +11636,7 @@
"generator": false
},
{
- "__docId__": 583,
+ "__docId__": 584,
"kind": "method",
"static": false,
"variation": null,
@@ -11631,7 +11661,7 @@
"generator": false
},
{
- "__docId__": 584,
+ "__docId__": 585,
"kind": "method",
"static": false,
"variation": null,
@@ -11645,7 +11675,7 @@
"generator": false
},
{
- "__docId__": 585,
+ "__docId__": 586,
"kind": "method",
"static": false,
"variation": null,
@@ -11680,7 +11710,7 @@
"generator": false
},
{
- "__docId__": 586,
+ "__docId__": 587,
"kind": "method",
"static": false,
"variation": null,
@@ -11694,7 +11724,7 @@
"generator": false
},
{
- "__docId__": 587,
+ "__docId__": 588,
"kind": "member",
"static": false,
"variation": null,
@@ -11712,7 +11742,7 @@
}
},
{
- "__docId__": 588,
+ "__docId__": 589,
"kind": "member",
"static": false,
"variation": null,
@@ -11730,7 +11760,7 @@
}
},
{
- "__docId__": 589,
+ "__docId__": 590,
"kind": "member",
"static": false,
"variation": null,
@@ -11748,7 +11778,7 @@
}
},
{
- "__docId__": 590,
+ "__docId__": 591,
"kind": "member",
"static": false,
"variation": null,
@@ -11766,7 +11796,7 @@
}
},
{
- "__docId__": 591,
+ "__docId__": 592,
"kind": "member",
"static": false,
"variation": null,
@@ -11784,7 +11814,7 @@
}
},
{
- "__docId__": 592,
+ "__docId__": 593,
"kind": "file",
"static": true,
"variation": null,
@@ -11797,7 +11827,7 @@
"content": "import {Feature} from '../feature';\nimport {createElm, createText, elm, removeElm} from '../dom';\nimport {isFn} 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 = isFn(f.on_before_refresh_counter) ?\n f.on_before_refresh_counter : null;\n //callback raised after counter is refreshed\n this.onAfterRefreshCounter = 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 = createElm('div', ['id', this.prfxCounter + tf.id]);\n countDiv.className = this.totRowsCssClass;\n //rows counter label\n var countSpan = createElm('span', ['id', this.prfxTotRows + tf.id]);\n var countText = createElm('span', ['id', this.prfxTotRowsTxt + tf.id]);\n countText.appendChild(createText(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 : elm(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.getValidRowsNb()));\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.getFilterableRowsNb() - tf.nbHiddenRows;\n }\n } else {\n var paging = tf.feature('paging');\n if (paging) {\n //paging start row\n var pagingStartRow = parseInt(paging.startPagingRow, 10) +\n ((tf.getValidRowsNb() > 0) ? 1 : 0);\n var pagingEndRow =\n (pagingStartRow + paging.pagingLength) - 1 <=\n tf.getValidRowsNb() ?\n pagingStartRow + paging.pagingLength - 1 :\n tf.getValidRowsNb();\n totTxt = pagingStartRow + this.fromToTextSeparator +\n pagingEndRow + this.overText + tf.getValidRowsNb();\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 removeElm(this.rowsCounterDiv);\n } else {\n elm(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.getValidRowsNb()));\n this.emitter.off(['rows-changed'], () => this.refresh());\n\n this.initialized = false;\n }\n}\n"
},
{
- "__docId__": 593,
+ "__docId__": 594,
"kind": "class",
"static": true,
"variation": null,
@@ -11817,7 +11847,7 @@
]
},
{
- "__docId__": 594,
+ "__docId__": 595,
"kind": "constructor",
"static": false,
"variation": null,
@@ -11842,7 +11872,7 @@
"generator": false
},
{
- "__docId__": 595,
+ "__docId__": 596,
"kind": "member",
"static": false,
"variation": null,
@@ -11860,7 +11890,7 @@
}
},
{
- "__docId__": 596,
+ "__docId__": 597,
"kind": "member",
"static": false,
"variation": null,
@@ -11878,7 +11908,7 @@
}
},
{
- "__docId__": 597,
+ "__docId__": 598,
"kind": "member",
"static": false,
"variation": null,
@@ -11896,7 +11926,7 @@
}
},
{
- "__docId__": 598,
+ "__docId__": 599,
"kind": "member",
"static": false,
"variation": null,
@@ -11914,7 +11944,7 @@
}
},
{
- "__docId__": 599,
+ "__docId__": 600,
"kind": "member",
"static": false,
"variation": null,
@@ -11932,7 +11962,7 @@
}
},
{
- "__docId__": 600,
+ "__docId__": 601,
"kind": "member",
"static": false,
"variation": null,
@@ -11950,7 +11980,7 @@
}
},
{
- "__docId__": 601,
+ "__docId__": 602,
"kind": "member",
"static": false,
"variation": null,
@@ -11968,7 +11998,7 @@
}
},
{
- "__docId__": 602,
+ "__docId__": 603,
"kind": "member",
"static": false,
"variation": null,
@@ -11986,7 +12016,7 @@
}
},
{
- "__docId__": 603,
+ "__docId__": 604,
"kind": "member",
"static": false,
"variation": null,
@@ -12004,7 +12034,7 @@
}
},
{
- "__docId__": 604,
+ "__docId__": 605,
"kind": "member",
"static": false,
"variation": null,
@@ -12022,7 +12052,7 @@
}
},
{
- "__docId__": 605,
+ "__docId__": 606,
"kind": "member",
"static": false,
"variation": null,
@@ -12040,7 +12070,7 @@
}
},
{
- "__docId__": 606,
+ "__docId__": 607,
"kind": "member",
"static": false,
"variation": null,
@@ -12058,7 +12088,7 @@
}
},
{
- "__docId__": 607,
+ "__docId__": 608,
"kind": "method",
"static": false,
"variation": null,
@@ -12073,7 +12103,7 @@
"generator": false
},
{
- "__docId__": 608,
+ "__docId__": 609,
"kind": "member",
"static": false,
"variation": null,
@@ -12091,7 +12121,7 @@
}
},
{
- "__docId__": 609,
+ "__docId__": 610,
"kind": "member",
"static": false,
"variation": null,
@@ -12109,7 +12139,7 @@
}
},
{
- "__docId__": 610,
+ "__docId__": 611,
"kind": "member",
"static": false,
"variation": null,
@@ -12127,7 +12157,7 @@
}
},
{
- "__docId__": 611,
+ "__docId__": 612,
"kind": "method",
"static": false,
"variation": null,
@@ -12149,7 +12179,7 @@
"generator": false
},
{
- "__docId__": 612,
+ "__docId__": 613,
"kind": "method",
"static": false,
"variation": null,
@@ -12164,7 +12194,7 @@
"generator": false
},
{
- "__docId__": 613,
+ "__docId__": 614,
"kind": "member",
"static": false,
"variation": null,
@@ -12182,7 +12212,7 @@
}
},
{
- "__docId__": 614,
+ "__docId__": 615,
"kind": "member",
"static": false,
"variation": null,
@@ -12200,7 +12230,7 @@
}
},
{
- "__docId__": 615,
+ "__docId__": 616,
"kind": "member",
"static": false,
"variation": null,
@@ -12218,7 +12248,7 @@
}
},
{
- "__docId__": 616,
+ "__docId__": 617,
"kind": "file",
"static": true,
"variation": null,
@@ -12231,7 +12261,7 @@
"content": "import {Feature} from '../feature';\nimport {Hash} from './hash';\nimport {Storage} from './storage';\nimport {isEmpty} from '../string';\nimport {isArray, isNull, isString, isUndef} 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 (isArray(cfg.types) && cfg.types.indexOf('hash') !== -1);\n this.enableLocalStorage = isArray(cfg.types) &&\n cfg.types.indexOf('local_storage') !== -1;\n this.enableCookie = isArray(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 (isString(val) && 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 (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 (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 (!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 (!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 (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 (!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 (!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__": 617,
+ "__docId__": 618,
"kind": "class",
"static": true,
"variation": null,
@@ -12260,7 +12290,7 @@
]
},
{
- "__docId__": 618,
+ "__docId__": 619,
"kind": "constructor",
"static": false,
"variation": null,
@@ -12285,7 +12315,7 @@
"generator": false
},
{
- "__docId__": 619,
+ "__docId__": 620,
"kind": "member",
"static": false,
"variation": null,
@@ -12303,7 +12333,7 @@
}
},
{
- "__docId__": 620,
+ "__docId__": 621,
"kind": "member",
"static": false,
"variation": null,
@@ -12321,7 +12351,7 @@
}
},
{
- "__docId__": 621,
+ "__docId__": 622,
"kind": "member",
"static": false,
"variation": null,
@@ -12339,7 +12369,7 @@
}
},
{
- "__docId__": 622,
+ "__docId__": 623,
"kind": "member",
"static": false,
"variation": null,
@@ -12357,7 +12387,7 @@
}
},
{
- "__docId__": 623,
+ "__docId__": 624,
"kind": "member",
"static": false,
"variation": null,
@@ -12375,7 +12405,7 @@
}
},
{
- "__docId__": 624,
+ "__docId__": 625,
"kind": "member",
"static": false,
"variation": null,
@@ -12393,7 +12423,7 @@
}
},
{
- "__docId__": 625,
+ "__docId__": 626,
"kind": "member",
"static": false,
"variation": null,
@@ -12411,7 +12441,7 @@
}
},
{
- "__docId__": 626,
+ "__docId__": 627,
"kind": "member",
"static": false,
"variation": null,
@@ -12429,7 +12459,7 @@
}
},
{
- "__docId__": 627,
+ "__docId__": 628,
"kind": "member",
"static": false,
"variation": null,
@@ -12447,7 +12477,7 @@
}
},
{
- "__docId__": 628,
+ "__docId__": 629,
"kind": "member",
"static": false,
"variation": null,
@@ -12465,7 +12495,7 @@
}
},
{
- "__docId__": 629,
+ "__docId__": 630,
"kind": "member",
"static": false,
"variation": null,
@@ -12483,7 +12513,7 @@
}
},
{
- "__docId__": 630,
+ "__docId__": 631,
"kind": "member",
"static": false,
"variation": null,
@@ -12501,7 +12531,7 @@
}
},
{
- "__docId__": 631,
+ "__docId__": 632,
"kind": "member",
"static": false,
"variation": null,
@@ -12519,7 +12549,7 @@
}
},
{
- "__docId__": 632,
+ "__docId__": 633,
"kind": "member",
"static": false,
"variation": null,
@@ -12537,7 +12567,7 @@
}
},
{
- "__docId__": 633,
+ "__docId__": 634,
"kind": "member",
"static": false,
"variation": null,
@@ -12555,7 +12585,7 @@
}
},
{
- "__docId__": 634,
+ "__docId__": 635,
"kind": "member",
"static": false,
"variation": null,
@@ -12573,7 +12603,7 @@
}
},
{
- "__docId__": 635,
+ "__docId__": 636,
"kind": "member",
"static": false,
"variation": null,
@@ -12591,7 +12621,7 @@
}
},
{
- "__docId__": 636,
+ "__docId__": 637,
"kind": "member",
"static": false,
"variation": null,
@@ -12609,7 +12639,7 @@
}
},
{
- "__docId__": 637,
+ "__docId__": 638,
"kind": "member",
"static": false,
"variation": null,
@@ -12627,7 +12657,7 @@
}
},
{
- "__docId__": 638,
+ "__docId__": 639,
"kind": "member",
"static": false,
"variation": null,
@@ -12645,7 +12675,7 @@
}
},
{
- "__docId__": 639,
+ "__docId__": 640,
"kind": "member",
"static": false,
"variation": null,
@@ -12663,7 +12693,7 @@
}
},
{
- "__docId__": 640,
+ "__docId__": 641,
"kind": "member",
"static": false,
"variation": null,
@@ -12681,7 +12711,7 @@
}
},
{
- "__docId__": 641,
+ "__docId__": 642,
"kind": "method",
"static": false,
"variation": null,
@@ -12695,7 +12725,7 @@
"generator": false
},
{
- "__docId__": 642,
+ "__docId__": 643,
"kind": "member",
"static": false,
"variation": null,
@@ -12713,7 +12743,7 @@
}
},
{
- "__docId__": 643,
+ "__docId__": 644,
"kind": "member",
"static": false,
"variation": null,
@@ -12731,7 +12761,7 @@
}
},
{
- "__docId__": 644,
+ "__docId__": 645,
"kind": "member",
"static": false,
"variation": null,
@@ -12749,7 +12779,7 @@
}
},
{
- "__docId__": 645,
+ "__docId__": 646,
"kind": "method",
"static": false,
"variation": null,
@@ -12763,7 +12793,7 @@
"generator": false
},
{
- "__docId__": 646,
+ "__docId__": 647,
"kind": "method",
"static": false,
"variation": null,
@@ -12788,7 +12818,7 @@
"generator": false
},
{
- "__docId__": 647,
+ "__docId__": 648,
"kind": "member",
"static": false,
"variation": null,
@@ -12806,7 +12836,7 @@
}
},
{
- "__docId__": 648,
+ "__docId__": 649,
"kind": "method",
"static": false,
"variation": null,
@@ -12831,7 +12861,7 @@
"generator": false
},
{
- "__docId__": 649,
+ "__docId__": 650,
"kind": "member",
"static": false,
"variation": null,
@@ -12849,7 +12879,7 @@
}
},
{
- "__docId__": 650,
+ "__docId__": 651,
"kind": "method",
"static": false,
"variation": null,
@@ -12884,7 +12914,7 @@
"generator": false
},
{
- "__docId__": 651,
+ "__docId__": 652,
"kind": "member",
"static": false,
"variation": null,
@@ -12902,7 +12932,7 @@
}
},
{
- "__docId__": 652,
+ "__docId__": 653,
"kind": "method",
"static": false,
"variation": null,
@@ -12927,7 +12957,7 @@
"generator": false
},
{
- "__docId__": 653,
+ "__docId__": 654,
"kind": "member",
"static": false,
"variation": null,
@@ -12945,7 +12975,7 @@
}
},
{
- "__docId__": 654,
+ "__docId__": 655,
"kind": "method",
"static": false,
"variation": null,
@@ -12970,7 +13000,7 @@
"generator": false
},
{
- "__docId__": 655,
+ "__docId__": 656,
"kind": "member",
"static": false,
"variation": null,
@@ -12988,7 +13018,7 @@
}
},
{
- "__docId__": 656,
+ "__docId__": 657,
"kind": "method",
"static": false,
"variation": null,
@@ -13013,7 +13043,7 @@
"generator": false
},
{
- "__docId__": 657,
+ "__docId__": 658,
"kind": "member",
"static": false,
"variation": null,
@@ -13031,7 +13061,7 @@
}
},
{
- "__docId__": 658,
+ "__docId__": 659,
"kind": "method",
"static": false,
"variation": null,
@@ -13045,7 +13075,7 @@
"generator": false
},
{
- "__docId__": 659,
+ "__docId__": 660,
"kind": "method",
"static": false,
"variation": null,
@@ -13070,7 +13100,7 @@
"generator": false
},
{
- "__docId__": 660,
+ "__docId__": 661,
"kind": "method",
"static": false,
"variation": null,
@@ -13084,7 +13114,7 @@
"generator": false
},
{
- "__docId__": 661,
+ "__docId__": 662,
"kind": "method",
"static": false,
"variation": null,
@@ -13098,7 +13128,7 @@
"generator": false
},
{
- "__docId__": 662,
+ "__docId__": 663,
"kind": "method",
"static": false,
"variation": null,
@@ -13112,7 +13142,7 @@
"generator": false
},
{
- "__docId__": 663,
+ "__docId__": 664,
"kind": "method",
"static": false,
"variation": null,
@@ -13126,7 +13156,7 @@
"generator": false
},
{
- "__docId__": 664,
+ "__docId__": 665,
"kind": "member",
"static": false,
"variation": null,
@@ -13144,7 +13174,7 @@
}
},
{
- "__docId__": 665,
+ "__docId__": 666,
"kind": "method",
"static": false,
"variation": null,
@@ -13158,7 +13188,7 @@
"generator": false
},
{
- "__docId__": 666,
+ "__docId__": 667,
"kind": "member",
"static": false,
"variation": null,
@@ -13176,7 +13206,7 @@
}
},
{
- "__docId__": 667,
+ "__docId__": 668,
"kind": "member",
"static": false,
"variation": null,
@@ -13194,7 +13224,7 @@
}
},
{
- "__docId__": 668,
+ "__docId__": 669,
"kind": "member",
"static": false,
"variation": null,
@@ -13212,7 +13242,7 @@
}
},
{
- "__docId__": 669,
+ "__docId__": 670,
"kind": "member",
"static": false,
"variation": null,
@@ -13230,7 +13260,7 @@
}
},
{
- "__docId__": 670,
+ "__docId__": 671,
"kind": "file",
"static": true,
"variation": null,
@@ -13243,7 +13273,7 @@
"content": "import {Feature} from '../feature';\nimport {root} from '../root';\nimport {createElm, createText, elm, removeElm} from '../dom';\nimport {isFn} from '../types';\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 = isFn(f.on_before_show_msg) ?\n f.on_before_show_msg : null;\n //calls function after message is displayed\n this.onAfterShowMsg = 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 = createElm('div', ['id', this.prfxStatus + tf.id]);\n statusDiv.className = this.statusBarCssClass;\n\n //status bar label\n let statusSpan = createElm('span', ['id', this.prfxStatusSpan + tf.id]);\n //preceding text\n let statusSpanText = createElm('span',\n ['id', this.prfxStatusTxt + tf.id]);\n statusSpanText.appendChild(createText(this.statusBarText));\n\n // target element container\n if (!this.statusBarTgtId) {\n tf.setToolbar();\n }\n let targetEl = (!this.statusBarTgtId) ?\n tf.lDiv : elm(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'],\n () => 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 root.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 removeElm(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__": 671,
+ "__docId__": 672,
"kind": "class",
"static": true,
"variation": null,
@@ -13263,7 +13293,7 @@
]
},
{
- "__docId__": 672,
+ "__docId__": 673,
"kind": "constructor",
"static": false,
"variation": null,
@@ -13288,7 +13318,7 @@
"generator": false
},
{
- "__docId__": 673,
+ "__docId__": 674,
"kind": "member",
"static": false,
"variation": null,
@@ -13306,7 +13336,7 @@
}
},
{
- "__docId__": 674,
+ "__docId__": 675,
"kind": "member",
"static": false,
"variation": null,
@@ -13324,7 +13354,7 @@
}
},
{
- "__docId__": 675,
+ "__docId__": 676,
"kind": "member",
"static": false,
"variation": null,
@@ -13342,7 +13372,7 @@
}
},
{
- "__docId__": 676,
+ "__docId__": 677,
"kind": "member",
"static": false,
"variation": null,
@@ -13360,7 +13390,7 @@
}
},
{
- "__docId__": 677,
+ "__docId__": 678,
"kind": "member",
"static": false,
"variation": null,
@@ -13378,7 +13408,7 @@
}
},
{
- "__docId__": 678,
+ "__docId__": 679,
"kind": "member",
"static": false,
"variation": null,
@@ -13396,7 +13426,7 @@
}
},
{
- "__docId__": 679,
+ "__docId__": 680,
"kind": "member",
"static": false,
"variation": null,
@@ -13414,7 +13444,7 @@
}
},
{
- "__docId__": 680,
+ "__docId__": 681,
"kind": "member",
"static": false,
"variation": null,
@@ -13432,7 +13462,7 @@
}
},
{
- "__docId__": 681,
+ "__docId__": 682,
"kind": "member",
"static": false,
"variation": null,
@@ -13450,7 +13480,7 @@
}
},
{
- "__docId__": 682,
+ "__docId__": 683,
"kind": "member",
"static": false,
"variation": null,
@@ -13468,7 +13498,7 @@
}
},
{
- "__docId__": 683,
+ "__docId__": 684,
"kind": "member",
"static": false,
"variation": null,
@@ -13486,7 +13516,7 @@
}
},
{
- "__docId__": 684,
+ "__docId__": 685,
"kind": "member",
"static": false,
"variation": null,
@@ -13504,7 +13534,7 @@
}
},
{
- "__docId__": 685,
+ "__docId__": 686,
"kind": "member",
"static": false,
"variation": null,
@@ -13522,7 +13552,7 @@
}
},
{
- "__docId__": 686,
+ "__docId__": 687,
"kind": "member",
"static": false,
"variation": null,
@@ -13540,7 +13570,7 @@
}
},
{
- "__docId__": 687,
+ "__docId__": 688,
"kind": "member",
"static": false,
"variation": null,
@@ -13558,7 +13588,7 @@
}
},
{
- "__docId__": 688,
+ "__docId__": 689,
"kind": "member",
"static": false,
"variation": null,
@@ -13576,7 +13606,7 @@
}
},
{
- "__docId__": 689,
+ "__docId__": 690,
"kind": "member",
"static": false,
"variation": null,
@@ -13594,7 +13624,7 @@
}
},
{
- "__docId__": 690,
+ "__docId__": 691,
"kind": "member",
"static": false,
"variation": null,
@@ -13612,7 +13642,7 @@
}
},
{
- "__docId__": 691,
+ "__docId__": 692,
"kind": "member",
"static": false,
"variation": null,
@@ -13630,7 +13660,7 @@
}
},
{
- "__docId__": 692,
+ "__docId__": 693,
"kind": "member",
"static": false,
"variation": null,
@@ -13648,7 +13678,7 @@
}
},
{
- "__docId__": 693,
+ "__docId__": 694,
"kind": "member",
"static": false,
"variation": null,
@@ -13666,7 +13696,7 @@
}
},
{
- "__docId__": 694,
+ "__docId__": 695,
"kind": "member",
"static": false,
"variation": null,
@@ -13684,7 +13714,7 @@
}
},
{
- "__docId__": 695,
+ "__docId__": 696,
"kind": "member",
"static": false,
"variation": null,
@@ -13702,7 +13732,7 @@
}
},
{
- "__docId__": 696,
+ "__docId__": 697,
"kind": "method",
"static": false,
"variation": null,
@@ -13717,7 +13747,7 @@
"generator": false
},
{
- "__docId__": 697,
+ "__docId__": 698,
"kind": "member",
"static": false,
"variation": null,
@@ -13735,7 +13765,7 @@
}
},
{
- "__docId__": 698,
+ "__docId__": 699,
"kind": "member",
"static": false,
"variation": null,
@@ -13753,7 +13783,7 @@
}
},
{
- "__docId__": 699,
+ "__docId__": 700,
"kind": "member",
"static": false,
"variation": null,
@@ -13771,7 +13801,7 @@
}
},
{
- "__docId__": 700,
+ "__docId__": 701,
"kind": "member",
"static": false,
"variation": null,
@@ -13789,7 +13819,7 @@
}
},
{
- "__docId__": 701,
+ "__docId__": 702,
"kind": "method",
"static": false,
"variation": null,
@@ -13814,7 +13844,7 @@
"generator": false
},
{
- "__docId__": 702,
+ "__docId__": 703,
"kind": "method",
"static": false,
"variation": null,
@@ -13829,7 +13859,7 @@
"generator": false
},
{
- "__docId__": 703,
+ "__docId__": 704,
"kind": "member",
"static": false,
"variation": null,
@@ -13847,7 +13877,7 @@
}
},
{
- "__docId__": 704,
+ "__docId__": 705,
"kind": "member",
"static": false,
"variation": null,
@@ -13865,7 +13895,7 @@
}
},
{
- "__docId__": 705,
+ "__docId__": 706,
"kind": "member",
"static": false,
"variation": null,
@@ -13883,7 +13913,7 @@
}
},
{
- "__docId__": 706,
+ "__docId__": 707,
"kind": "member",
"static": false,
"variation": null,
@@ -13901,7 +13931,7 @@
}
},
{
- "__docId__": 707,
+ "__docId__": 708,
"kind": "file",
"static": true,
"variation": null,
@@ -13914,7 +13944,7 @@
"content": "\nimport Cookie from '../cookie';\nimport {root} from '../root';\n\nconst JSON = root.JSON;\nconst localStorage = root.localStorage;\nconst location = root.location;\n\nexport const hasStorage = () => {\n return 'Storage' in root;\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__": 708,
+ "__docId__": 709,
"kind": "variable",
"static": true,
"variation": null,
@@ -13935,7 +13965,7 @@
}
},
{
- "__docId__": 709,
+ "__docId__": 710,
"kind": "variable",
"static": true,
"variation": null,
@@ -13956,7 +13986,7 @@
}
},
{
- "__docId__": 710,
+ "__docId__": 711,
"kind": "variable",
"static": true,
"variation": null,
@@ -13977,7 +14007,7 @@
}
},
{
- "__docId__": 711,
+ "__docId__": 712,
"kind": "variable",
"static": true,
"variation": null,
@@ -13998,7 +14028,7 @@
}
},
{
- "__docId__": 712,
+ "__docId__": 713,
"kind": "class",
"static": true,
"variation": null,
@@ -14024,7 +14054,7 @@
"interface": false
},
{
- "__docId__": 713,
+ "__docId__": 714,
"kind": "constructor",
"static": false,
"variation": null,
@@ -14049,7 +14079,7 @@
"generator": false
},
{
- "__docId__": 714,
+ "__docId__": 715,
"kind": "member",
"static": false,
"variation": null,
@@ -14067,7 +14097,7 @@
}
},
{
- "__docId__": 715,
+ "__docId__": 716,
"kind": "member",
"static": false,
"variation": null,
@@ -14085,7 +14115,7 @@
}
},
{
- "__docId__": 716,
+ "__docId__": 717,
"kind": "member",
"static": false,
"variation": null,
@@ -14103,7 +14133,7 @@
}
},
{
- "__docId__": 717,
+ "__docId__": 718,
"kind": "member",
"static": false,
"variation": null,
@@ -14121,7 +14151,7 @@
}
},
{
- "__docId__": 718,
+ "__docId__": 719,
"kind": "member",
"static": false,
"variation": null,
@@ -14139,7 +14169,7 @@
}
},
{
- "__docId__": 719,
+ "__docId__": 720,
"kind": "member",
"static": false,
"variation": null,
@@ -14157,7 +14187,7 @@
}
},
{
- "__docId__": 720,
+ "__docId__": 721,
"kind": "method",
"static": false,
"variation": null,
@@ -14171,7 +14201,7 @@
"generator": false
},
{
- "__docId__": 721,
+ "__docId__": 722,
"kind": "method",
"static": false,
"variation": null,
@@ -14196,7 +14226,7 @@
"generator": false
},
{
- "__docId__": 722,
+ "__docId__": 723,
"kind": "method",
"static": false,
"variation": null,
@@ -14224,7 +14254,7 @@
"generator": false
},
{
- "__docId__": 723,
+ "__docId__": 724,
"kind": "method",
"static": false,
"variation": null,
@@ -14238,7 +14268,7 @@
"generator": false
},
{
- "__docId__": 724,
+ "__docId__": 725,
"kind": "method",
"static": false,
"variation": null,
@@ -14252,7 +14282,7 @@
"generator": false
},
{
- "__docId__": 725,
+ "__docId__": 726,
"kind": "method",
"static": false,
"variation": null,
@@ -14280,7 +14310,7 @@
"generator": false
},
{
- "__docId__": 726,
+ "__docId__": 727,
"kind": "method",
"static": false,
"variation": null,
@@ -14294,7 +14324,7 @@
"generator": false
},
{
- "__docId__": 727,
+ "__docId__": 728,
"kind": "member",
"static": false,
"variation": null,
@@ -14312,7 +14342,7 @@
}
},
{
- "__docId__": 728,
+ "__docId__": 729,
"kind": "member",
"static": false,
"variation": null,
@@ -14330,7 +14360,7 @@
}
},
{
- "__docId__": 729,
+ "__docId__": 730,
"kind": "file",
"static": true,
"variation": null,
@@ -14343,7 +14373,7 @@
"content": "/**\n * Export window or global object depending on the environment\n */\nexport const root = (typeof self === 'object' && self.self === self && self) ||\n (typeof global === 'object' && global.global === global && global) ||\n this;\n"
},
{
- "__docId__": 730,
+ "__docId__": 731,
"kind": "variable",
"static": true,
"variation": null,
@@ -14363,7 +14393,7 @@
}
},
{
- "__docId__": 731,
+ "__docId__": 732,
"kind": "file",
"static": true,
"variation": null,
@@ -14376,7 +14406,7 @@
"content": "/**\n * Sorting utilities\n */\n\n/**\n * Case insensitive compare function for passed strings\n * @param {String} First string\n * @param {String} Second string\n * @return {Number} -1 if first string lower than second one\n * 0 if first string same order as second one\n * 1 if first string greater than second one\n */\nexport const ignoreCase = (a, b) => {\n let x = a.toLowerCase();\n let y = b.toLowerCase();\n return ((x < y) ? -1 : ((x > y) ? 1 : 0));\n}\n\n/**\n * Sorts passed numbers in a ascending manner\n * @param {Number} First number\n * @param {Number} Second number\n * @param {Number} Negative, zero or positive number\n */\nexport const numSortAsc = (a, b) => (a - b);\n\n/**\n * Sorts passed numbers in a descending manner\n * @param {Number} First number\n * @param {Number} Second number\n * @param {Number} Negative, zero or positive number\n */\nexport const numSortDesc = (a, b) => (b - a);\n"
},
{
- "__docId__": 732,
+ "__docId__": 733,
"kind": "variable",
"static": true,
"variation": null,
@@ -14426,7 +14456,7 @@
}
},
{
- "__docId__": 733,
+ "__docId__": 734,
"kind": "variable",
"static": true,
"variation": null,
@@ -14478,7 +14508,7 @@
}
},
{
- "__docId__": 734,
+ "__docId__": 735,
"kind": "variable",
"static": true,
"variation": null,
@@ -14530,7 +14560,7 @@
}
},
{
- "__docId__": 735,
+ "__docId__": 736,
"kind": "file",
"static": true,
"variation": null,
@@ -14543,7 +14573,7 @@
"content": "/**\n * String utilities\n */\n\n/**\n * Removes whitespace from both sides of passed string\n * @param {String} text\n * @return {String}\n */\nexport const trim = text => {\n if (text.trim) {\n return text.trim();\n }\n return text.replace(/^\\s*|\\s*$/g, '');\n}\n\n/**\n * Checks if passed string is empty\n * @param {String} text\n * @return {Boolean}\n */\nexport const isEmpty = (text) => trim(text) === '';\n\n/**\n * Makes regex safe string by escaping special characters from passed string\n * @param {String} text\n * @return {String} escaped string\n */\nexport const rgxEsc = text => {\n let chars = /[-\\/\\\\^$*+?.()|[\\]{}]/g;\n let escMatch = '\\\\$&';\n return String(text).replace(chars, escMatch);\n}\n\n/**\n * Returns passed string as lowercase if caseSensitive flag set false. By\n * default it returns the string with no casing changes.\n * @param {String} text\n * @return {String} string\n */\nexport const matchCase = (text, caseSensitive = false) => {\n if (!caseSensitive) {\n return text.toLowerCase();\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 */\nexport const contains =\n (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 let modifier = caseSensitive ? 'g' : 'gi';\n if (exactMatch) {\n regexp = new RegExp('(^\\\\s*)' + rgxEsc(term) + '(\\\\s*$)',\n modifier);\n } else {\n regexp = new RegExp(rgxEsc(term), modifier);\n }\n return regexp.test(data);\n }\n"
},
{
- "__docId__": 736,
+ "__docId__": 737,
"kind": "variable",
"static": true,
"variation": null,
@@ -14583,7 +14613,7 @@
}
},
{
- "__docId__": 737,
+ "__docId__": 738,
"kind": "variable",
"static": true,
"variation": null,
@@ -14623,7 +14653,7 @@
}
},
{
- "__docId__": 738,
+ "__docId__": 739,
"kind": "variable",
"static": true,
"variation": null,
@@ -14663,7 +14693,7 @@
}
},
{
- "__docId__": 739,
+ "__docId__": 740,
"kind": "variable",
"static": true,
"variation": null,
@@ -14703,7 +14733,7 @@
}
},
{
- "__docId__": 740,
+ "__docId__": 741,
"kind": "variable",
"static": true,
"variation": null,
@@ -14773,7 +14803,7 @@
}
},
{
- "__docId__": 741,
+ "__docId__": 742,
"kind": "file",
"static": true,
"variation": null,
@@ -14783,10 +14813,10 @@
"access": null,
"description": null,
"lineNumber": 1,
- "content": "import Event from './event';\nimport {\n addClass, createElm, createOpt, elm, getText, getFirstTextNode, hasClass,\n removeClass, removeElm, tag\n} from './dom';\nimport {contains, matchCase, rgxEsc, trim} from './string';\nimport {isEmpty as isEmptyString} from './string';\nimport {isArray, isEmpty, isFn, isNumber, isObj, isString, isUndef}\nfrom './types';\nimport {formatDate, isValidDate} from './date';\nimport {removeNbFormat} from './helpers';\n\nimport {root} from './root';\nimport {Emitter} from './emitter';\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\nimport {\n INPUT, SELECT, MULTIPLE, CHECKLIST, NONE,\n ENTER_KEY, TAB_KEY, ESC_KEY, UP_ARROW_KEY, DOWN_ARROW_KEY,\n CELL_TAG, AUTO_FILTER_DELAY\n} from './const';\n\nlet doc = root.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 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 = 0;\n this.nbCells = null;\n\n // TODO: use for-of\n args.forEach((arg) => {\n if (typeof arg === 'object' && arg.nodeName === 'TABLE') {\n this.tbl = arg;\n this.id = arg.id || `tf_${new Date().getTime()}_`;\n } else if (isString(arg)) {\n this.id = arg;\n this.tbl = elm(arg);\n } else if (isNumber(arg)) {\n this.startRow = arg;\n } else if (isObj(arg)) {\n this.cfg = arg;\n }\n });\n\n if (!this.tbl || this.tbl.nodeName !== 'TABLE' ||\n this.getRowsNb() === 0) {\n throw new Error(`Could not instantiate TableFilter: HTML table\n DOM element 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 /*** filters' grid properties ***/\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 = isString(f.filters_cell_tag) ?\n f.filters_cell_tag : 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 = 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 = isFn(f.on_before_filter) ?\n f.on_before_filter : null;\n //calls function after filtering\n this.onAfterFilter = isFn(f.on_after_filter) ? 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 = 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 //calls function when filters grid loaded\n this.onFiltersLoaded = 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 = 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 = isFn(f.custom_cell_data) ?\n f.custom_cell_data : null;\n //input watermark text array\n this.watermark = f.watermark || '';\n this.isWatermarkArray = 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 = 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 = 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 = 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 = 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 //show/hides rows counter\n this.rowsCounter = Boolean(f.rows_counter);\n\n //show/hides status bar\n this.statusBar = Boolean(f.status_bar);\n\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 = isFn(f.on_before_reset) ?\n f.on_before_reset : null;\n //callback function after filters are cleared\n this.onAfterReset = isFn(f.on_after_reset) ? f.on_after_reset : null;\n\n /*** paging ***/\n //enables/disables table paging\n this.paging = Boolean(f.paging);\n this.nbHiddenRows = 0; //nb hidden rows\n\n /*** autofilter on typing ***/\n //Auto filtering, table is filtered when user stops 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 : AUTO_FILTER_DELAY;\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 = isObj(f.no_results_message) ||\n Boolean(f.no_results_message);\n\n // state persisstence\n this.state = 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 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 = 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 = 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 //responsive table css class\n this.prfxResponsive = 'resp';\n\n /*** extensions ***/\n //imports external script\n this.extensions = f.extensions;\n this.hasExtensions = isArray(this.extensions);\n\n /*** themes ***/\n this.enableDefaultTheme = Boolean(f.enable_default_theme);\n //imports themes\n this.hasThemes = (this.enableDefaultTheme || 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\n /**\n * Initialise features and layout\n */\n init() {\n if (this.initialized) {\n return;\n }\n\n let Mod = this.Mod;\n let n = this.singleSearchFlt ? 1 : this.nbCells;\n let 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.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\n // Generate filters\n for (let i = 0; i < n; i++) {\n this.emitter.emit('before-filter-init', this, i);\n\n let fltcell = createElm(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 = INPUT;\n inpclass = this.singleFltCssClass;\n }\n\n //drop-down filters\n if (col === SELECT || col === MULTIPLE) {\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 === CHECKLIST) {\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'],\n () => 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 //TF css class is added to table\n if (!this.gridLayout) {\n addClass(this.tbl, this.prfxTf);\n if (this.responsive) {\n 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 * Detect key\n * @param {Event} evt\n */\n detectKey(evt) {\n if (!this.enterKey) {\n return;\n }\n if (evt) {\n let key = Event.keyCode(evt);\n if (key === ENTER_KEY) {\n this.filter();\n Event.cancel(evt);\n Event.stop(evt);\n } else {\n this.isUserTyping = true;\n root.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n }\n }\n }\n\n /**\n * Filter's keyup event: if auto-filter on, detect user is typing and filter\n * columns\n * @param {Event} evt\n */\n onKeyUp(evt) {\n if (!this.autoFilter) {\n return;\n }\n let key = Event.keyCode(evt);\n this.isUserTyping = false;\n\n function filter() {\n root.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n if (!this.isUserTyping) {\n this.filter();\n this.isUserTyping = null;\n }\n }\n\n if (key !== ENTER_KEY && key !== TAB_KEY && key !== ESC_KEY &&\n key !== UP_ARROW_KEY && key !== DOWN_ARROW_KEY) {\n if (this.autoFilterTimer === null) {\n this.autoFilterTimer = root.setInterval(filter.bind(this),\n this.autoFilterDelay);\n }\n } else {\n root.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n }\n }\n\n /**\n * Filter's keydown event: if auto-filter on, detect user is typing\n */\n onKeyDown() {\n if (this.autoFilter) {\n this.isUserTyping = true;\n }\n }\n\n /**\n * Filter's focus event\n * @param {Event} evt\n */\n onInpFocus(evt) {\n let elm = Event.target(evt);\n this.emitter.emit('filter-focus', this, elm);\n }\n\n /**\n * Filter's blur event: if auto-filter on, clear interval on filter blur\n */\n onInpBlur() {\n if (this.autoFilter) {\n this.isUserTyping = false;\n root.clearInterval(this.autoFilterTimer);\n }\n this.emitter.emit('filter-blur', 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 = 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 }\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 === INPUT ? 'text' : 'hidden';\n let inp = createElm(INPUT,\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', (evt) => this.onInpFocus(evt));\n\n //filter is appended in custom element\n if (externalFltTgtId) {\n elm(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', (evt) => this.detectKey(evt));\n Event.add(inp, 'keydown', () => this.onKeyDown());\n Event.add(inp, 'keyup', (evt) => this.onKeyUp(evt));\n Event.add(inp, 'blur', () => this.onInpBlur());\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 = createElm(INPUT,\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 elm(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 !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] = undefined;\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 (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 = '';\n\n //Paging buttons\n this.btnPrevPageHtml = '';\n this.btnNextPageHtml = '';\n this.btnFirstPageHtml = '';\n this.btnLastPageHtml = '';\n\n //Loader\n this.loader = true;\n this.loaderHtml = '';\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 elm(this.prfxTf + name);\n }\n\n /**\n * Destroy filter grid\n */\n destroy() {\n if (!this.initialized) {\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 let feature = Mod[key];\n if (feature && 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 removeClass(this.tbl, this.prfxTf);\n removeClass(this.tbl, this.prfxResponsive);\n\n this.nbHiddenRows = 0;\n this.validRowsIndex = [];\n this.fltIds = [];\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 = createElm('div', ['id', this.prfxInfDiv + this.id]);\n infdiv.className = this.infDivCssClass;\n\n //custom container\n if (this.toolBarTgtId) {\n elm(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 let cont = createElm('caption');\n cont.appendChild(infdiv);\n this.tbl.insertBefore(cont, this.tbl.firstChild);\n }\n this.infDiv = elm(this.prfxInfDiv + this.id);\n\n /*** left div containing rows # displayer ***/\n let ldiv = createElm('div', ['id', this.prfxLDiv + this.id]);\n ldiv.className = this.lDivCssClass;\n infdiv.appendChild(ldiv);\n this.lDiv = elm(this.prfxLDiv + this.id);\n\n /*** right div containing reset button\n + nb results per page select ***/\n let rdiv = createElm('div', ['id', this.prfxRDiv + this.id]);\n rdiv.className = this.rDivCssClass;\n infdiv.appendChild(rdiv);\n this.rDiv = elm(this.prfxRDiv + this.id);\n\n /*** mid div containing paging elements ***/\n let mdiv = createElm('div', ['id', this.prfxMDiv + this.id]);\n mdiv.className = this.mDivCssClass;\n infdiv.appendChild(mdiv);\n this.mDiv = elm(this.prfxMDiv + this.id);\n\n // emit help initialisation only if undefined\n if (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 removeElm(this.infDiv);\n this.infDiv = null;\n\n let tbl = this.tbl;\n let captions = 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 = elm(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 (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 * 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.initialized) {\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 nbRows = this.getRowsNb(true),\n hiddenRows = 0;\n\n this.validRowsIndex = [];\n // search args re-init\n let searchArgs = this.getFiltersValue();\n\n let numCellData;\n let nbFormat;\n let 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(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(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 = 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 sA = matchCase(sA, this.caseSensitive);\n\n let occurence;\n let dtType = this.hasColDateType ?\n this.colDateType[j] : this.defaultDateType;\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 && isValidDate(sA.replace(re_l, ''), dtType);\n let isLEDate = hasLE && isValidDate(sA.replace(re_le, ''), dtType);\n let isGDate = hasGR && isValidDate(sA.replace(re_g, ''), dtType);\n let isGEDate = hasGE && isValidDate(sA.replace(re_ge, ''), dtType);\n let isDFDate = hasDF && isValidDate(sA.replace(re_d, ''), dtType);\n let isEQDate = hasEQ && isValidDate(sA.replace(re_eq, ''), dtType);\n\n let dte1, dte2;\n //dates\n if (isValidDate(cellData, dtType)) {\n dte1 = formatDate(cellData, dtType);\n // lower date\n if (isLDate) {\n dte2 = formatDate(sA.replace(re_l, ''), dtType);\n occurence = dte1 < dte2;\n }\n // lower equal date\n else if (isLEDate) {\n dte2 = formatDate(sA.replace(re_le, ''), dtType);\n occurence = dte1 <= dte2;\n }\n // greater equal date\n else if (isGEDate) {\n dte2 = formatDate(sA.replace(re_ge, ''), dtType);\n occurence = dte1 >= dte2;\n }\n // greater date\n else if (isGDate) {\n dte2 = formatDate(sA.replace(re_g, ''), dtType);\n occurence = dte1 > dte2;\n }\n // different date\n else if (isDFDate) {\n dte2 = formatDate(sA.replace(re_d, ''), dtType);\n occurence = dte1.toString() !== dte2.toString();\n }\n // equal date\n else if (isEQDate) {\n dte2 = formatDate(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 = contains(sA.replace(re_lk, ''), cellData,\n false, this.caseSensitive);\n }\n else if (isValidDate(sA, dtType)) {\n dte2 = formatDate(sA, dtType);\n occurence = dte1.toString() === dte2.toString();\n }\n //empty\n else if (hasEM) {\n occurence = isEmptyString(cellData);\n }\n //non-empty\n else if (hasNM) {\n occurence = !isEmptyString(cellData);\n } else {\n occurence = 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(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 = contains(sA.replace(re_d, ''), cellData,\n false, this.caseSensitive) ? false : true;\n }\n //like\n else if (hasLK) {\n occurence = contains(sA.replace(re_lk, ''), cellData,\n false, this.caseSensitive);\n }\n //equal\n else if (hasEQ) {\n occurence = 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(searchArg, cellData.length - 1)\n > -1 ? true : false;\n }\n //empty\n else if (hasEM) {\n occurence = isEmptyString(cellData);\n }\n //non-empty\n else if (hasNM) {\n occurence = !isEmptyString(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 (ex) {\n occurence = false;\n }\n } else {\n // If numeric type data, perform a strict equality test and\n // fallback to unformatted number string comparison\n if (numCellData && this.hasColNbFormat &&\n this.colNbFormat[j] && !this.singleSearchFlt) {\n sA = removeNbFormat(sA, nbFormat);\n occurence = numCellData === sA ||\n contains(sA.toString(), numCellData.toString(),\n this.isExactMatch(j), this.caseSensitive);\n } else {\n // Finally test search term is contained in cell data\n occurence = contains(sA, cellData, this.isExactMatch(j),\n this.caseSensitive);\n }\n }\n\n }//else\n return occurence;\n }//fn\n\n for (let k = this.refRow; k < 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\n if (sA === '') {\n continue;\n }\n\n let cellData = 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 (isArray(sA) || hasMultiOrSA || hasMultiAndSA) {\n let cS,\n s,\n occur = false;\n if (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 = 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 (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, 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.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 let nbRows = this.getRowsNb(true);\n let colValues = [];\n\n if (includeHeaders) {\n colValues.push(this.getHeadersText()[colIndex]);\n }\n\n for (let i = this.refRow; i < 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 ? 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 let flt = this.getFilterElement(index);\n if (!flt) {\n return fltValue;\n }\n\n let fltColType = this.getFilterType(index);\n if (fltColType !== MULTIPLE && fltColType !== CHECKLIST) {\n fltValue = flt.value;\n }\n //mutiple select\n else if (fltColType === MULTIPLE) {\n fltValue = this.feature('dropdown').getValues(index);\n }\n //checklist\n else if (fltColType === CHECKLIST) {\n fltValue = this.feature('checkList').getValues(index);\n }\n //return an empty string if collection is empty or contains a single\n //empty string\n if (isArray(fltValue) && fltValue.length === 0 ||\n (fltValue.length === 1 && fltValue[0] === '')) {\n fltValue = '';\n }\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 (isArray(fltValue)) {\n searchArgs.push(fltValue);\n } else {\n searchArgs.push(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 === type.toLowerCase()) {\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 elm(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 = isUndef(this.refRow) ? 0 : this.refRow;\n let ntrs = this.tbl.rows.length;\n if (includeHeaders) {\n s = 0;\n }\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 &&\n this.customCellDataCols.indexOf(idx) !== -1) {\n return this.customCellData.call(null, this, cell, idx);\n } else {\n return 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 nbRows = this.getRowsNb(true);\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 < 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 (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 {HTMLTableRowElement} row DOM element of the row\n * @return {String} Usually 'none' or ''\n */\n getRowDisplay(row) {\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.initialized) {\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 !== MULTIPLE && fltColType !== CHECKLIST) {\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 === MULTIPLE) {\n let values = 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 === CHECKLIST) {\n let values = [];\n if (this.loadFltOnDemand && !this.initialized) {\n this.emitter.emit('build-checklist-filter', this, index,\n this.isExternalFlt);\n }\n if (isArray(query)) {\n values = query;\n } else {\n query = 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 = 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 = createElm('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 let nbRows = this.getRowsNb(true);\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 <= 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 removeClass(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 (hasClass(header, this.activeColumnsCssClass)) {\n return;\n }\n if (this.onBeforeActiveColumn) {\n this.onBeforeActiveColumn.call(null, this, colIndex);\n }\n 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 (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(SELECT, true),\n slcA2 = this.getFiltersByType(MULTIPLE, true),\n slcA3 = this.getFiltersByType(CHECKLIST, 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 = elm(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 = 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 }\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 !== INPUT;\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 = 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 = tag(doc, 'head')[0];\n\n if (ftype.toLowerCase() === 'link') {\n file = createElm('link',\n ['id', fileId], ['type', 'text/css'],\n ['rel', 'stylesheet'], ['href', filePath]\n );\n } else {\n file = createElm('script',\n ['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('TableFilter could not load: ' + filePath);\n };\n head.appendChild(file);\n }\n\n /**\n * Check if table has filters grid\n * @return {Boolean}\n */\n isInitialized() {\n return this.initialized;\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 let nbRows = this.getRowsNb(true);\n this.validRowsIndex = [];\n for (let k = this.refRow; k < nbRows; 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 let nbRows = this.getRowsNb(true);\n return (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 = 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 = 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 ? INPUT : colType.toLowerCase();\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 * Return the total number of valid rows\n * @param {Boolean} [reCalc=false] Forces calculation of filtered rows\n * @returns {Number}\n */\n getValidRowsNb(reCalc = false) {\n return this.getValidRows(reCalc).length;\n }\n\n /**\n * Get the configuration object (literal object)\n * @return {Object}\n */\n config() {\n return this.cfg;\n }\n}\n"
+ "content": "import Event from './event';\nimport {\n addClass, createElm, createOpt, elm, getText, getFirstTextNode, hasClass,\n removeClass, removeElm, tag\n} from './dom';\nimport {contains, matchCase, rgxEsc, trim} from './string';\nimport {isEmpty as isEmptyString} from './string';\nimport {isArray, isEmpty, isFn, isNumber, isObj, isString, isUndef}\nfrom './types';\nimport {formatDate, isValidDate} from './date';\nimport {removeNbFormat} from './helpers';\n\nimport {root} from './root';\nimport {Emitter} from './emitter';\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\nimport {\n INPUT, SELECT, MULTIPLE, CHECKLIST, NONE,\n ENTER_KEY, TAB_KEY, ESC_KEY, UP_ARROW_KEY, DOWN_ARROW_KEY,\n CELL_TAG, AUTO_FILTER_DELAY\n} from './const';\n\nlet doc = root.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 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 = 0;\n this.nbCells = null;\n\n // TODO: use for-of\n args.forEach((arg) => {\n if (typeof arg === 'object' && arg.nodeName === 'TABLE') {\n this.tbl = arg;\n this.id = arg.id || `tf_${new Date().getTime()}_`;\n } else if (isString(arg)) {\n this.id = arg;\n this.tbl = elm(arg);\n } else if (isNumber(arg)) {\n this.startRow = arg;\n } else if (isObj(arg)) {\n this.cfg = arg;\n }\n });\n\n if (!this.tbl || this.tbl.nodeName !== 'TABLE' ||\n this.getRowsNb() === 0) {\n throw new Error(`Could not instantiate TableFilter: HTML table\n DOM element 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 /*** filters' grid properties ***/\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 = isString(f.filters_cell_tag) ?\n f.filters_cell_tag : CELL_TAG;\n\n //stores filters ids\n this.fltIds = [];\n //stores valid rows indexes (rows visible upon filtering)\n this.validRowsIndex = [];\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 = 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 = isFn(f.on_before_filter) ?\n f.on_before_filter : null;\n //calls function after filtering\n this.onAfterFilter = isFn(f.on_after_filter) ? 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 = 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 //calls function when filters grid loaded\n this.onFiltersLoaded = 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 = 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 = isFn(f.custom_cell_data) ?\n f.custom_cell_data : null;\n //input watermark text array\n this.watermark = f.watermark || '';\n this.isWatermarkArray = 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 = 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 = 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 = 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 = 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 //show/hides rows counter\n this.rowsCounter = Boolean(f.rows_counter);\n\n //show/hides status bar\n this.statusBar = Boolean(f.status_bar);\n\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 = isFn(f.on_before_reset) ?\n f.on_before_reset : null;\n //callback function after filters are cleared\n this.onAfterReset = isFn(f.on_after_reset) ? f.on_after_reset : null;\n\n /*** paging ***/\n //enables/disables table paging\n this.paging = Boolean(f.paging);\n this.nbHiddenRows = 0; //nb hidden rows\n\n /*** autofilter on typing ***/\n //Auto filtering, table is filtered when user stops 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 : AUTO_FILTER_DELAY;\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 = isObj(f.no_results_message) ||\n Boolean(f.no_results_message);\n\n // state persisstence\n this.state = 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 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 = 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 = 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 //responsive table css class\n this.prfxResponsive = 'resp';\n\n /*** extensions ***/\n //imports external script\n this.extensions = f.extensions;\n this.hasExtensions = isArray(this.extensions);\n\n /*** themes ***/\n this.enableDefaultTheme = Boolean(f.enable_default_theme);\n //imports themes\n this.hasThemes = (this.enableDefaultTheme || 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\n /**\n * Initialise features and layout\n */\n init() {\n if (this.initialized) {\n return;\n }\n\n let Mod = this.Mod;\n let n = this.singleSearchFlt ? 1 : this.nbCells;\n let 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.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\n // Generate filters\n for (let i = 0; i < n; i++) {\n this.emitter.emit('before-filter-init', this, i);\n\n let fltcell = createElm(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 = INPUT;\n inpclass = this.singleFltCssClass;\n }\n\n //drop-down filters\n if (col === SELECT || col === MULTIPLE) {\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 === CHECKLIST) {\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'],\n () => 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 //TF css class is added to table\n if (!this.gridLayout) {\n addClass(this.tbl, this.prfxTf);\n if (this.responsive) {\n 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 * Detect key\n * @param {Event} evt\n */\n detectKey(evt) {\n if (!this.enterKey) {\n return;\n }\n if (evt) {\n let key = Event.keyCode(evt);\n if (key === ENTER_KEY) {\n this.filter();\n Event.cancel(evt);\n Event.stop(evt);\n } else {\n this.isUserTyping = true;\n root.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n }\n }\n }\n\n /**\n * Filter's keyup event: if auto-filter on, detect user is typing and filter\n * columns\n * @param {Event} evt\n */\n onKeyUp(evt) {\n if (!this.autoFilter) {\n return;\n }\n let key = Event.keyCode(evt);\n this.isUserTyping = false;\n\n function filter() {\n root.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n if (!this.isUserTyping) {\n this.filter();\n this.isUserTyping = null;\n }\n }\n\n if (key !== ENTER_KEY && key !== TAB_KEY && key !== ESC_KEY &&\n key !== UP_ARROW_KEY && key !== DOWN_ARROW_KEY) {\n if (this.autoFilterTimer === null) {\n this.autoFilterTimer = root.setInterval(filter.bind(this),\n this.autoFilterDelay);\n }\n } else {\n root.clearInterval(this.autoFilterTimer);\n this.autoFilterTimer = null;\n }\n }\n\n /**\n * Filter's keydown event: if auto-filter on, detect user is typing\n */\n onKeyDown() {\n if (this.autoFilter) {\n this.isUserTyping = true;\n }\n }\n\n /**\n * Filter's focus event\n * @param {Event} evt\n */\n onInpFocus(evt) {\n let elm = Event.target(evt);\n this.emitter.emit('filter-focus', this, elm);\n }\n\n /**\n * Filter's blur event: if auto-filter on, clear interval on filter blur\n */\n onInpBlur() {\n if (this.autoFilter) {\n this.isUserTyping = false;\n root.clearInterval(this.autoFilterTimer);\n }\n this.emitter.emit('filter-blur', 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 = 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 }\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 === INPUT ? 'text' : 'hidden';\n let inp = createElm(INPUT,\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', (evt) => this.onInpFocus(evt));\n\n //filter is appended in custom element\n if (externalFltTgtId) {\n elm(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', (evt) => this.detectKey(evt));\n Event.add(inp, 'keydown', () => this.onKeyDown());\n Event.add(inp, 'keyup', (evt) => this.onKeyUp(evt));\n Event.add(inp, 'blur', () => this.onInpBlur());\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 = createElm(INPUT,\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 elm(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 !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] = undefined;\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 (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 = '';\n\n //Paging buttons\n this.btnPrevPageHtml = '';\n this.btnNextPageHtml = '';\n this.btnFirstPageHtml = '';\n this.btnLastPageHtml = '';\n\n //Loader\n this.loader = true;\n this.loaderHtml = '';\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 elm(this.prfxTf + name);\n }\n\n /**\n * Destroy filter grid\n */\n destroy() {\n if (!this.initialized) {\n return;\n }\n\n let Mod = this.Mod;\n let 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.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 let feature = Mod[key];\n if (feature && 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 removeClass(this.tbl, this.prfxTf);\n removeClass(this.tbl, this.prfxResponsive);\n\n this.nbHiddenRows = 0;\n this.validRowsIndex = [];\n this.fltIds = [];\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 = createElm('div', ['id', this.prfxInfDiv + this.id]);\n infdiv.className = this.infDivCssClass;\n\n //custom container\n if (this.toolBarTgtId) {\n elm(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 let cont = createElm('caption');\n cont.appendChild(infdiv);\n this.tbl.insertBefore(cont, this.tbl.firstChild);\n }\n this.infDiv = elm(this.prfxInfDiv + this.id);\n\n /*** left div containing rows # displayer ***/\n let ldiv = createElm('div', ['id', this.prfxLDiv + this.id]);\n ldiv.className = this.lDivCssClass;\n infdiv.appendChild(ldiv);\n this.lDiv = elm(this.prfxLDiv + this.id);\n\n /*** right div containing reset button\n + nb results per page select ***/\n let rdiv = createElm('div', ['id', this.prfxRDiv + this.id]);\n rdiv.className = this.rDivCssClass;\n infdiv.appendChild(rdiv);\n this.rDiv = elm(this.prfxRDiv + this.id);\n\n /*** mid div containing paging elements ***/\n let mdiv = createElm('div', ['id', this.prfxMDiv + this.id]);\n mdiv.className = this.mDivCssClass;\n infdiv.appendChild(mdiv);\n this.mDiv = elm(this.prfxMDiv + this.id);\n\n // emit help initialisation only if undefined\n if (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 removeElm(this.infDiv);\n this.infDiv = null;\n\n let tbl = this.tbl;\n let captions = 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 = elm(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 (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 * 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.initialized) {\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 nbRows = this.getRowsNb(true),\n hiddenRows = 0;\n\n this.validRowsIndex = [];\n // search args re-init\n let searchArgs = this.getFiltersValue();\n\n let numCellData;\n let nbFormat;\n let 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(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(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 = 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 sA = matchCase(sA, this.caseSensitive);\n\n let occurence;\n let dtType = this.hasColDateType ?\n this.colDateType[j] : this.defaultDateType;\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 && isValidDate(sA.replace(re_l, ''), dtType);\n let isLEDate = hasLE && isValidDate(sA.replace(re_le, ''), dtType);\n let isGDate = hasGR && isValidDate(sA.replace(re_g, ''), dtType);\n let isGEDate = hasGE && isValidDate(sA.replace(re_ge, ''), dtType);\n let isDFDate = hasDF && isValidDate(sA.replace(re_d, ''), dtType);\n let isEQDate = hasEQ && isValidDate(sA.replace(re_eq, ''), dtType);\n\n let dte1, dte2;\n //dates\n if (isValidDate(cellData, dtType)) {\n dte1 = formatDate(cellData, dtType);\n // lower date\n if (isLDate) {\n dte2 = formatDate(sA.replace(re_l, ''), dtType);\n occurence = dte1 < dte2;\n }\n // lower equal date\n else if (isLEDate) {\n dte2 = formatDate(sA.replace(re_le, ''), dtType);\n occurence = dte1 <= dte2;\n }\n // greater equal date\n else if (isGEDate) {\n dte2 = formatDate(sA.replace(re_ge, ''), dtType);\n occurence = dte1 >= dte2;\n }\n // greater date\n else if (isGDate) {\n dte2 = formatDate(sA.replace(re_g, ''), dtType);\n occurence = dte1 > dte2;\n }\n // different date\n else if (isDFDate) {\n dte2 = formatDate(sA.replace(re_d, ''), dtType);\n occurence = dte1.toString() !== dte2.toString();\n }\n // equal date\n else if (isEQDate) {\n dte2 = formatDate(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 = contains(sA.replace(re_lk, ''), cellData,\n false, this.caseSensitive);\n }\n else if (isValidDate(sA, dtType)) {\n dte2 = formatDate(sA, dtType);\n occurence = dte1.toString() === dte2.toString();\n }\n //empty\n else if (hasEM) {\n occurence = isEmptyString(cellData);\n }\n //non-empty\n else if (hasNM) {\n occurence = !isEmptyString(cellData);\n } else {\n occurence = 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(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 = contains(sA.replace(re_d, ''), cellData,\n false, this.caseSensitive) ? false : true;\n }\n //like\n else if (hasLK) {\n occurence = contains(sA.replace(re_lk, ''), cellData,\n false, this.caseSensitive);\n }\n //equal\n else if (hasEQ) {\n occurence = 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(searchArg, cellData.length - 1)\n > -1 ? true : false;\n }\n //empty\n else if (hasEM) {\n occurence = isEmptyString(cellData);\n }\n //non-empty\n else if (hasNM) {\n occurence = !isEmptyString(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 (ex) {\n occurence = false;\n }\n } else {\n // If numeric type data, perform a strict equality test and\n // fallback to unformatted number string comparison\n if (numCellData && this.hasColNbFormat &&\n this.colNbFormat[j] && !this.singleSearchFlt) {\n sA = removeNbFormat(sA, nbFormat);\n occurence = numCellData === sA ||\n contains(sA.toString(), numCellData.toString(),\n this.isExactMatch(j), this.caseSensitive);\n } else {\n // Finally test search term is contained in cell data\n occurence = contains(sA, cellData, this.isExactMatch(j),\n this.caseSensitive);\n }\n }\n\n }//else\n return occurence;\n }//fn\n\n for (let k = this.refRow; k < 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\n if (sA === '') {\n continue;\n }\n\n let cellData = 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 (isArray(sA) || hasMultiOrSA || hasMultiAndSA) {\n let cS,\n s,\n occur = false;\n if (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 = 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 (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, 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.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 let nbRows = this.getRowsNb(true);\n let colValues = [];\n\n if (includeHeaders) {\n colValues.push(this.getHeadersText()[colIndex]);\n }\n\n for (let i = this.refRow; i < 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 ? 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 let flt = this.getFilterElement(index);\n if (!flt) {\n return fltValue;\n }\n\n let fltColType = this.getFilterType(index);\n if (fltColType !== MULTIPLE && fltColType !== CHECKLIST) {\n fltValue = flt.value;\n }\n //mutiple select\n else if (fltColType === MULTIPLE) {\n fltValue = this.feature('dropdown').getValues(index);\n }\n //checklist\n else if (fltColType === CHECKLIST) {\n fltValue = this.feature('checkList').getValues(index);\n }\n //return an empty string if collection is empty or contains a single\n //empty string\n if (isArray(fltValue) && fltValue.length === 0 ||\n (fltValue.length === 1 && fltValue[0] === '')) {\n fltValue = '';\n }\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 (isArray(fltValue)) {\n searchArgs.push(fltValue);\n } else {\n searchArgs.push(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 === type.toLowerCase()) {\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 elm(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 = isUndef(this.refRow) ? 0 : this.refRow;\n let ntrs = this.tbl.rows.length;\n if (includeHeaders) {\n s = 0;\n }\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 &&\n this.customCellDataCols.indexOf(idx) !== -1) {\n return this.customCellData.call(null, this, cell, idx);\n } else {\n return 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 nbRows = this.getRowsNb(true);\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 < 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 (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 {HTMLTableRowElement} row DOM element of the row\n * @return {String} Usually 'none' or ''\n */\n getRowDisplay(row) {\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.initialized) {\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 !== MULTIPLE && fltColType !== CHECKLIST) {\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 === MULTIPLE) {\n let values = 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 === CHECKLIST) {\n let values = [];\n if (this.loadFltOnDemand && !this.initialized) {\n this.emitter.emit('build-checklist-filter', this, index,\n this.isExternalFlt);\n }\n if (isArray(query)) {\n values = query;\n } else {\n query = 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 = 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 = createElm('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 let nbRows = this.getRowsNb(true);\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 <= 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 removeClass(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 (hasClass(header, this.activeColumnsCssClass)) {\n return;\n }\n if (this.onBeforeActiveColumn) {\n this.onBeforeActiveColumn.call(null, this, colIndex);\n }\n 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 (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(SELECT, true),\n slcA2 = this.getFiltersByType(MULTIPLE, true),\n slcA3 = this.getFiltersByType(CHECKLIST, 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 = elm(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 = 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 }\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 !== INPUT;\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 = 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 = tag(doc, 'head')[0];\n\n if (ftype.toLowerCase() === 'link') {\n file = createElm('link',\n ['id', fileId], ['type', 'text/css'],\n ['rel', 'stylesheet'], ['href', filePath]\n );\n } else {\n file = createElm('script',\n ['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('TableFilter could not load: ' + filePath);\n };\n head.appendChild(file);\n }\n\n /**\n * Check if table has filters grid\n * @return {Boolean}\n */\n isInitialized() {\n return this.initialized;\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 let nbRows = this.getRowsNb(true);\n this.validRowsIndex = [];\n for (let k = this.refRow; k < nbRows; 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 let nbRows = this.getRowsNb(true);\n return (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 = 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 = 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 ? INPUT : colType.toLowerCase();\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 * Return the total number of valid rows\n * @param {Boolean} [reCalc=false] Forces calculation of filtered rows\n * @returns {Number}\n */\n getValidRowsNb(reCalc = false) {\n return this.getValidRows(reCalc).length;\n }\n\n /**\n * Get the configuration object (literal object)\n * @return {Object}\n */\n config() {\n return this.cfg;\n }\n}\n"
},
{
- "__docId__": 742,
+ "__docId__": 743,
"kind": "variable",
"static": true,
"variation": null,
@@ -14807,7 +14837,7 @@
}
},
{
- "__docId__": 743,
+ "__docId__": 744,
"kind": "class",
"static": true,
"variation": null,
@@ -14824,7 +14854,7 @@
"interface": false
},
{
- "__docId__": 744,
+ "__docId__": 745,
"kind": "constructor",
"static": false,
"variation": null,
@@ -14879,7 +14909,7 @@
"generator": false
},
{
- "__docId__": 745,
+ "__docId__": 746,
"kind": "member",
"static": false,
"variation": null,
@@ -14897,7 +14927,7 @@
}
},
{
- "__docId__": 746,
+ "__docId__": 747,
"kind": "member",
"static": false,
"variation": null,
@@ -14915,7 +14945,7 @@
}
},
{
- "__docId__": 747,
+ "__docId__": 748,
"kind": "member",
"static": false,
"variation": null,
@@ -14933,7 +14963,7 @@
}
},
{
- "__docId__": 748,
+ "__docId__": 749,
"kind": "member",
"static": false,
"variation": null,
@@ -14951,7 +14981,7 @@
}
},
{
- "__docId__": 749,
+ "__docId__": 750,
"kind": "member",
"static": false,
"variation": null,
@@ -14969,7 +14999,7 @@
}
},
{
- "__docId__": 750,
+ "__docId__": 751,
"kind": "member",
"static": false,
"variation": null,
@@ -14987,7 +15017,7 @@
}
},
{
- "__docId__": 751,
+ "__docId__": 752,
"kind": "member",
"static": false,
"variation": null,
@@ -15005,7 +15035,7 @@
}
},
{
- "__docId__": 752,
+ "__docId__": 753,
"kind": "member",
"static": false,
"variation": null,
@@ -15023,7 +15053,7 @@
}
},
{
- "__docId__": 753,
+ "__docId__": 754,
"kind": "member",
"static": false,
"variation": null,
@@ -15041,7 +15071,7 @@
}
},
{
- "__docId__": 754,
+ "__docId__": 755,
"kind": "member",
"static": false,
"variation": null,
@@ -15059,7 +15089,7 @@
}
},
{
- "__docId__": 755,
+ "__docId__": 756,
"kind": "member",
"static": false,
"variation": null,
@@ -15077,7 +15107,7 @@
}
},
{
- "__docId__": 756,
+ "__docId__": 757,
"kind": "member",
"static": false,
"variation": null,
@@ -15095,7 +15125,7 @@
}
},
{
- "__docId__": 757,
+ "__docId__": 758,
"kind": "member",
"static": false,
"variation": null,
@@ -15113,7 +15143,7 @@
}
},
{
- "__docId__": 758,
+ "__docId__": 759,
"kind": "member",
"static": false,
"variation": null,
@@ -15131,7 +15161,7 @@
}
},
{
- "__docId__": 759,
+ "__docId__": 760,
"kind": "member",
"static": false,
"variation": null,
@@ -15149,7 +15179,7 @@
}
},
{
- "__docId__": 760,
+ "__docId__": 761,
"kind": "member",
"static": false,
"variation": null,
@@ -15167,7 +15197,7 @@
}
},
{
- "__docId__": 761,
+ "__docId__": 762,
"kind": "member",
"static": false,
"variation": null,
@@ -15185,7 +15215,7 @@
}
},
{
- "__docId__": 762,
+ "__docId__": 763,
"kind": "member",
"static": false,
"variation": null,
@@ -15203,7 +15233,7 @@
}
},
{
- "__docId__": 763,
+ "__docId__": 764,
"kind": "member",
"static": false,
"variation": null,
@@ -15221,7 +15251,7 @@
}
},
{
- "__docId__": 764,
+ "__docId__": 765,
"kind": "member",
"static": false,
"variation": null,
@@ -15239,7 +15269,7 @@
}
},
{
- "__docId__": 765,
+ "__docId__": 766,
"kind": "member",
"static": false,
"variation": null,
@@ -15257,7 +15287,7 @@
}
},
{
- "__docId__": 766,
+ "__docId__": 767,
"kind": "member",
"static": false,
"variation": null,
@@ -15274,7 +15304,7 @@
}
},
{
- "__docId__": 767,
+ "__docId__": 768,
"kind": "member",
"static": false,
"variation": null,
@@ -15292,7 +15322,7 @@
}
},
{
- "__docId__": 768,
+ "__docId__": 769,
"kind": "member",
"static": false,
"variation": null,
@@ -15310,7 +15340,7 @@
}
},
{
- "__docId__": 769,
+ "__docId__": 770,
"kind": "member",
"static": false,
"variation": null,
@@ -15328,7 +15358,7 @@
}
},
{
- "__docId__": 770,
+ "__docId__": 771,
"kind": "member",
"static": false,
"variation": null,
@@ -15346,7 +15376,7 @@
}
},
{
- "__docId__": 771,
+ "__docId__": 772,
"kind": "member",
"static": false,
"variation": null,
@@ -15363,24 +15393,6 @@
]
}
},
- {
- "__docId__": 772,
- "kind": "member",
- "static": false,
- "variation": null,
- "name": "fltElms",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltElms",
- "access": null,
- "description": null,
- "lineNumber": 113,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
{
"__docId__": 773,
"kind": "member",
@@ -15391,7 +15403,7 @@
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
- "lineNumber": 115,
+ "lineNumber": 113,
"undocument": true,
"type": {
"types": [
@@ -15404,12 +15416,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "fltGridEl",
+ "name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltGridEl",
+ "longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
- "lineNumber": 117,
+ "lineNumber": 115,
"undocument": true,
"type": {
"types": [
@@ -15422,12 +15434,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "infDiv",
+ "name": "lDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#infDiv",
+ "longname": "src/tablefilter.js~TableFilter#lDiv",
"access": null,
"description": null,
- "lineNumber": 119,
+ "lineNumber": 117,
"undocument": true,
"type": {
"types": [
@@ -15440,12 +15452,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "lDiv",
+ "name": "rDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#lDiv",
+ "longname": "src/tablefilter.js~TableFilter#rDiv",
"access": null,
"description": null,
- "lineNumber": 121,
+ "lineNumber": 119,
"undocument": true,
"type": {
"types": [
@@ -15458,12 +15470,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "rDiv",
+ "name": "mDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#rDiv",
+ "longname": "src/tablefilter.js~TableFilter#mDiv",
"access": null,
"description": null,
- "lineNumber": 123,
+ "lineNumber": 121,
"undocument": true,
"type": {
"types": [
@@ -15476,12 +15488,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "mDiv",
+ "name": "infDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#mDiv",
+ "longname": "src/tablefilter.js~TableFilter#infDivCssClass",
"access": null,
"description": null,
- "lineNumber": 125,
+ "lineNumber": 124,
"undocument": true,
"type": {
"types": [
@@ -15494,12 +15506,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "infDivCssClass",
+ "name": "lDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#infDivCssClass",
+ "longname": "src/tablefilter.js~TableFilter#lDivCssClass",
"access": null,
"description": null,
- "lineNumber": 128,
+ "lineNumber": 126,
"undocument": true,
"type": {
"types": [
@@ -15512,12 +15524,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "lDivCssClass",
+ "name": "rDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#lDivCssClass",
+ "longname": "src/tablefilter.js~TableFilter#rDivCssClass",
"access": null,
"description": null,
- "lineNumber": 130,
+ "lineNumber": 128,
"undocument": true,
"type": {
"types": [
@@ -15530,12 +15542,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "rDivCssClass",
+ "name": "mDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#rDivCssClass",
+ "longname": "src/tablefilter.js~TableFilter#mDivCssClass",
"access": null,
"description": null,
- "lineNumber": 132,
+ "lineNumber": 130,
"undocument": true,
"type": {
"types": [
@@ -15548,12 +15560,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "mDivCssClass",
+ "name": "contDivCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#mDivCssClass",
+ "longname": "src/tablefilter.js~TableFilter#contDivCssClass",
"access": null,
"description": null,
- "lineNumber": 134,
+ "lineNumber": 132,
"undocument": true,
"type": {
"types": [
@@ -15566,13 +15578,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "contDivCssClass",
+ "name": "stylePath",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#contDivCssClass",
+ "longname": "src/tablefilter.js~TableFilter#stylePath",
"access": null,
- "description": null,
+ "description": "filters' grid appearance **",
"lineNumber": 136,
- "undocument": true,
"type": {
"types": [
"*"
@@ -15584,12 +15595,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "stylePath",
+ "name": "stylesheet",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#stylePath",
+ "longname": "src/tablefilter.js~TableFilter#stylesheet",
"access": null,
- "description": "filters' grid appearance **",
- "lineNumber": 140,
+ "description": null,
+ "lineNumber": 137,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -15601,12 +15613,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "stylesheet",
+ "name": "stylesheetId",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#stylesheet",
+ "longname": "src/tablefilter.js~TableFilter#stylesheetId",
"access": null,
"description": null,
- "lineNumber": 141,
+ "lineNumber": 138,
"undocument": true,
"type": {
"types": [
@@ -15619,12 +15631,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "stylesheetId",
+ "name": "fltsRowCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#stylesheetId",
+ "longname": "src/tablefilter.js~TableFilter#fltsRowCssClass",
"access": null,
"description": null,
- "lineNumber": 142,
+ "lineNumber": 140,
"undocument": true,
"type": {
"types": [
@@ -15637,12 +15649,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "fltsRowCssClass",
+ "name": "enableIcons",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltsRowCssClass",
+ "longname": "src/tablefilter.js~TableFilter#enableIcons",
"access": null,
"description": null,
- "lineNumber": 144,
+ "lineNumber": 142,
"undocument": true,
"type": {
"types": [
@@ -15655,12 +15667,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "enableIcons",
+ "name": "alternateRows",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#enableIcons",
+ "longname": "src/tablefilter.js~TableFilter#alternateRows",
"access": null,
"description": null,
- "lineNumber": 146,
+ "lineNumber": 144,
"undocument": true,
"type": {
"types": [
@@ -15673,12 +15685,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "alternateRows",
+ "name": "hasColWidths",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#alternateRows",
+ "longname": "src/tablefilter.js~TableFilter#hasColWidths",
"access": null,
"description": null,
- "lineNumber": 148,
+ "lineNumber": 146,
"undocument": true,
"type": {
"types": [
@@ -15691,12 +15703,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasColWidths",
+ "name": "colWidths",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasColWidths",
+ "longname": "src/tablefilter.js~TableFilter#colWidths",
"access": null,
"description": null,
- "lineNumber": 150,
+ "lineNumber": 147,
"undocument": true,
"type": {
"types": [
@@ -15709,12 +15721,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "colWidths",
+ "name": "fltCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#colWidths",
+ "longname": "src/tablefilter.js~TableFilter#fltCssClass",
"access": null,
"description": null,
- "lineNumber": 151,
+ "lineNumber": 149,
"undocument": true,
"type": {
"types": [
@@ -15727,12 +15739,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "fltCssClass",
+ "name": "fltMultiCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltCssClass",
+ "longname": "src/tablefilter.js~TableFilter#fltMultiCssClass",
"access": null,
"description": null,
- "lineNumber": 153,
+ "lineNumber": 151,
"undocument": true,
"type": {
"types": [
@@ -15745,12 +15757,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "fltMultiCssClass",
+ "name": "fltSmallCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltMultiCssClass",
+ "longname": "src/tablefilter.js~TableFilter#fltSmallCssClass",
"access": null,
"description": null,
- "lineNumber": 155,
+ "lineNumber": 153,
"undocument": true,
"type": {
"types": [
@@ -15763,12 +15775,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "fltSmallCssClass",
+ "name": "singleFltCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltSmallCssClass",
+ "longname": "src/tablefilter.js~TableFilter#singleFltCssClass",
"access": null,
"description": null,
- "lineNumber": 157,
+ "lineNumber": 155,
"undocument": true,
"type": {
"types": [
@@ -15781,13 +15793,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "singleFltCssClass",
+ "name": "enterKey",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#singleFltCssClass",
+ "longname": "src/tablefilter.js~TableFilter#enterKey",
"access": null,
- "description": null,
+ "description": "filters' grid behaviours **",
"lineNumber": 159,
- "undocument": true,
"type": {
"types": [
"*"
@@ -15799,12 +15810,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "enterKey",
+ "name": "onBeforeFilter",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#enterKey",
+ "longname": "src/tablefilter.js~TableFilter#onBeforeFilter",
"access": null,
- "description": "filters' grid behaviours **",
- "lineNumber": 163,
+ "description": null,
+ "lineNumber": 161,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -15816,12 +15828,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onBeforeFilter",
+ "name": "onAfterFilter",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onBeforeFilter",
+ "longname": "src/tablefilter.js~TableFilter#onAfterFilter",
"access": null,
"description": null,
- "lineNumber": 165,
+ "lineNumber": 164,
"undocument": true,
"type": {
"types": [
@@ -15834,12 +15846,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onAfterFilter",
+ "name": "caseSensitive",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onAfterFilter",
+ "longname": "src/tablefilter.js~TableFilter#caseSensitive",
"access": null,
"description": null,
- "lineNumber": 168,
+ "lineNumber": 166,
"undocument": true,
"type": {
"types": [
@@ -15852,12 +15864,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "caseSensitive",
+ "name": "hasExactMatchByCol",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#caseSensitive",
+ "longname": "src/tablefilter.js~TableFilter#hasExactMatchByCol",
"access": null,
"description": null,
- "lineNumber": 170,
+ "lineNumber": 168,
"undocument": true,
"type": {
"types": [
@@ -15870,12 +15882,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasExactMatchByCol",
+ "name": "exactMatchByCol",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasExactMatchByCol",
+ "longname": "src/tablefilter.js~TableFilter#exactMatchByCol",
"access": null,
"description": null,
- "lineNumber": 172,
+ "lineNumber": 169,
"undocument": true,
"type": {
"types": [
@@ -15888,12 +15900,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "exactMatchByCol",
+ "name": "exactMatch",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#exactMatchByCol",
+ "longname": "src/tablefilter.js~TableFilter#exactMatch",
"access": null,
"description": null,
- "lineNumber": 173,
+ "lineNumber": 172,
"undocument": true,
"type": {
"types": [
@@ -15906,12 +15918,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "exactMatch",
+ "name": "linkedFilters",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#exactMatch",
+ "longname": "src/tablefilter.js~TableFilter#linkedFilters",
"access": null,
"description": null,
- "lineNumber": 176,
+ "lineNumber": 174,
"undocument": true,
"type": {
"types": [
@@ -15924,12 +15936,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "linkedFilters",
+ "name": "disableExcludedOptions",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#linkedFilters",
+ "longname": "src/tablefilter.js~TableFilter#disableExcludedOptions",
"access": null,
"description": null,
- "lineNumber": 178,
+ "lineNumber": 176,
"undocument": true,
"type": {
"types": [
@@ -15942,12 +15954,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "disableExcludedOptions",
+ "name": "activeFilterId",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#disableExcludedOptions",
+ "longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
- "lineNumber": 180,
+ "lineNumber": 178,
"undocument": true,
"type": {
"types": [
@@ -15960,12 +15972,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "activeFilterId",
+ "name": "hasVisibleRows",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#activeFilterId",
+ "longname": "src/tablefilter.js~TableFilter#hasVisibleRows",
"access": null,
"description": null,
- "lineNumber": 182,
+ "lineNumber": 180,
"undocument": true,
"type": {
"types": [
@@ -15978,12 +15990,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasVisibleRows",
+ "name": "visibleRows",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasVisibleRows",
+ "longname": "src/tablefilter.js~TableFilter#visibleRows",
"access": null,
"description": null,
- "lineNumber": 184,
+ "lineNumber": 182,
"undocument": true,
"type": {
"types": [
@@ -15996,12 +16008,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "visibleRows",
+ "name": "isExternalFlt",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#visibleRows",
+ "longname": "src/tablefilter.js~TableFilter#isExternalFlt",
"access": null,
"description": null,
- "lineNumber": 186,
+ "lineNumber": 184,
"undocument": true,
"type": {
"types": [
@@ -16014,12 +16026,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "isExternalFlt",
+ "name": "externalFltTgtIds",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#isExternalFlt",
+ "longname": "src/tablefilter.js~TableFilter#externalFltTgtIds",
"access": null,
"description": null,
- "lineNumber": 188,
+ "lineNumber": 186,
"undocument": true,
"type": {
"types": [
@@ -16032,12 +16044,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "externalFltTgtIds",
+ "name": "externalFltEls",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#externalFltTgtIds",
+ "longname": "src/tablefilter.js~TableFilter#externalFltEls",
"access": null,
"description": null,
- "lineNumber": 190,
+ "lineNumber": 188,
"undocument": true,
"type": {
"types": [
@@ -16050,12 +16062,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "externalFltEls",
+ "name": "onFiltersLoaded",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#externalFltEls",
+ "longname": "src/tablefilter.js~TableFilter#onFiltersLoaded",
"access": null,
"description": null,
- "lineNumber": 192,
+ "lineNumber": 190,
"undocument": true,
"type": {
"types": [
@@ -16068,12 +16080,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onFiltersLoaded",
+ "name": "singleSearchFlt",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onFiltersLoaded",
+ "longname": "src/tablefilter.js~TableFilter#singleSearchFlt",
"access": null,
"description": null,
- "lineNumber": 194,
+ "lineNumber": 193,
"undocument": true,
"type": {
"types": [
@@ -16086,12 +16098,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "singleSearchFlt",
+ "name": "onRowValidated",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#singleSearchFlt",
+ "longname": "src/tablefilter.js~TableFilter#onRowValidated",
"access": null,
"description": null,
- "lineNumber": 197,
+ "lineNumber": 195,
"undocument": true,
"type": {
"types": [
@@ -16104,12 +16116,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onRowValidated",
+ "name": "customCellDataCols",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onRowValidated",
+ "longname": "src/tablefilter.js~TableFilter#customCellDataCols",
"access": null,
"description": null,
- "lineNumber": 199,
+ "lineNumber": 198,
"undocument": true,
"type": {
"types": [
@@ -16122,12 +16134,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "customCellDataCols",
+ "name": "customCellData",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#customCellDataCols",
+ "longname": "src/tablefilter.js~TableFilter#customCellData",
"access": null,
"description": null,
- "lineNumber": 202,
+ "lineNumber": 201,
"undocument": true,
"type": {
"types": [
@@ -16140,12 +16152,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "customCellData",
+ "name": "watermark",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#customCellData",
+ "longname": "src/tablefilter.js~TableFilter#watermark",
"access": null,
"description": null,
- "lineNumber": 205,
+ "lineNumber": 204,
"undocument": true,
"type": {
"types": [
@@ -16158,12 +16170,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "watermark",
+ "name": "isWatermarkArray",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#watermark",
+ "longname": "src/tablefilter.js~TableFilter#isWatermarkArray",
"access": null,
"description": null,
- "lineNumber": 208,
+ "lineNumber": 205,
"undocument": true,
"type": {
"types": [
@@ -16176,12 +16188,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "isWatermarkArray",
+ "name": "toolBarTgtId",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#isWatermarkArray",
+ "longname": "src/tablefilter.js~TableFilter#toolBarTgtId",
"access": null,
"description": null,
- "lineNumber": 209,
+ "lineNumber": 207,
"undocument": true,
"type": {
"types": [
@@ -16194,12 +16206,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "toolBarTgtId",
+ "name": "help",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#toolBarTgtId",
+ "longname": "src/tablefilter.js~TableFilter#help",
"access": null,
"description": null,
- "lineNumber": 211,
+ "lineNumber": 209,
"undocument": true,
"type": {
"types": [
@@ -16212,12 +16224,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "help",
+ "name": "popupFilters",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#help",
+ "longname": "src/tablefilter.js~TableFilter#popupFilters",
"access": null,
"description": null,
- "lineNumber": 213,
+ "lineNumber": 212,
"undocument": true,
"type": {
"types": [
@@ -16230,12 +16242,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "popupFilters",
+ "name": "markActiveColumns",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#popupFilters",
+ "longname": "src/tablefilter.js~TableFilter#markActiveColumns",
"access": null,
"description": null,
- "lineNumber": 216,
+ "lineNumber": 214,
"undocument": true,
"type": {
"types": [
@@ -16248,12 +16260,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "markActiveColumns",
+ "name": "activeColumnsCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#markActiveColumns",
+ "longname": "src/tablefilter.js~TableFilter#activeColumnsCssClass",
"access": null,
"description": null,
- "lineNumber": 218,
+ "lineNumber": 216,
"undocument": true,
"type": {
"types": [
@@ -16266,12 +16278,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "activeColumnsCssClass",
+ "name": "onBeforeActiveColumn",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#activeColumnsCssClass",
+ "longname": "src/tablefilter.js~TableFilter#onBeforeActiveColumn",
"access": null,
"description": null,
- "lineNumber": 220,
+ "lineNumber": 219,
"undocument": true,
"type": {
"types": [
@@ -16284,12 +16296,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onBeforeActiveColumn",
+ "name": "onAfterActiveColumn",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onBeforeActiveColumn",
+ "longname": "src/tablefilter.js~TableFilter#onAfterActiveColumn",
"access": null,
"description": null,
- "lineNumber": 223,
+ "lineNumber": 222,
"undocument": true,
"type": {
"types": [
@@ -16302,13 +16314,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onAfterActiveColumn",
+ "name": "displayAllText",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onAfterActiveColumn",
+ "longname": "src/tablefilter.js~TableFilter#displayAllText",
"access": null,
- "description": null,
- "lineNumber": 226,
- "undocument": true,
+ "description": "select filter's customisation and behaviours **",
+ "lineNumber": 227,
"type": {
"types": [
"*"
@@ -16320,12 +16331,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "displayAllText",
+ "name": "enableEmptyOption",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#displayAllText",
+ "longname": "src/tablefilter.js~TableFilter#enableEmptyOption",
"access": null,
- "description": "select filter's customisation and behaviours **",
- "lineNumber": 231,
+ "description": null,
+ "lineNumber": 229,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -16337,12 +16349,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "enableEmptyOption",
+ "name": "emptyText",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#enableEmptyOption",
+ "longname": "src/tablefilter.js~TableFilter#emptyText",
"access": null,
"description": null,
- "lineNumber": 233,
+ "lineNumber": 231,
"undocument": true,
"type": {
"types": [
@@ -16355,12 +16367,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "emptyText",
+ "name": "enableNonEmptyOption",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#emptyText",
+ "longname": "src/tablefilter.js~TableFilter#enableNonEmptyOption",
"access": null,
"description": null,
- "lineNumber": 235,
+ "lineNumber": 233,
"undocument": true,
"type": {
"types": [
@@ -16373,12 +16385,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "enableNonEmptyOption",
+ "name": "nonEmptyText",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#enableNonEmptyOption",
+ "longname": "src/tablefilter.js~TableFilter#nonEmptyText",
"access": null,
"description": null,
- "lineNumber": 237,
+ "lineNumber": 235,
"undocument": true,
"type": {
"types": [
@@ -16391,12 +16403,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "nonEmptyText",
+ "name": "onSlcChange",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#nonEmptyText",
+ "longname": "src/tablefilter.js~TableFilter#onSlcChange",
"access": null,
"description": null,
- "lineNumber": 239,
+ "lineNumber": 237,
"undocument": true,
"type": {
"types": [
@@ -16409,12 +16421,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onSlcChange",
+ "name": "sortSlc",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onSlcChange",
+ "longname": "src/tablefilter.js~TableFilter#sortSlc",
"access": null,
"description": null,
- "lineNumber": 241,
+ "lineNumber": 239,
"undocument": true,
"type": {
"types": [
@@ -16427,12 +16439,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "sortSlc",
+ "name": "isSortNumAsc",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#sortSlc",
+ "longname": "src/tablefilter.js~TableFilter#isSortNumAsc",
"access": null,
"description": null,
- "lineNumber": 243,
+ "lineNumber": 241,
"undocument": true,
"type": {
"types": [
@@ -16445,12 +16457,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "isSortNumAsc",
+ "name": "sortNumAsc",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#isSortNumAsc",
+ "longname": "src/tablefilter.js~TableFilter#sortNumAsc",
"access": null,
"description": null,
- "lineNumber": 245,
+ "lineNumber": 242,
"undocument": true,
"type": {
"types": [
@@ -16463,12 +16475,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "sortNumAsc",
+ "name": "isSortNumDesc",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#sortNumAsc",
+ "longname": "src/tablefilter.js~TableFilter#isSortNumDesc",
"access": null,
"description": null,
- "lineNumber": 246,
+ "lineNumber": 244,
"undocument": true,
"type": {
"types": [
@@ -16481,12 +16493,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "isSortNumDesc",
+ "name": "sortNumDesc",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#isSortNumDesc",
+ "longname": "src/tablefilter.js~TableFilter#sortNumDesc",
"access": null,
"description": null,
- "lineNumber": 248,
+ "lineNumber": 245,
"undocument": true,
"type": {
"types": [
@@ -16499,12 +16511,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "sortNumDesc",
+ "name": "loadFltOnDemand",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#sortNumDesc",
+ "longname": "src/tablefilter.js~TableFilter#loadFltOnDemand",
"access": null,
"description": null,
- "lineNumber": 249,
+ "lineNumber": 247,
"undocument": true,
"type": {
"types": [
@@ -16517,12 +16529,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "loadFltOnDemand",
+ "name": "hasCustomOptions",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#loadFltOnDemand",
+ "longname": "src/tablefilter.js~TableFilter#hasCustomOptions",
"access": null,
"description": null,
- "lineNumber": 251,
+ "lineNumber": 248,
"undocument": true,
"type": {
"types": [
@@ -16535,12 +16547,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasCustomOptions",
+ "name": "customOptions",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasCustomOptions",
+ "longname": "src/tablefilter.js~TableFilter#customOptions",
"access": null,
"description": null,
- "lineNumber": 252,
+ "lineNumber": 249,
"undocument": true,
"type": {
"types": [
@@ -16553,13 +16565,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "customOptions",
+ "name": "rgxOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#customOptions",
+ "longname": "src/tablefilter.js~TableFilter#rgxOperator",
"access": null,
- "description": null,
- "lineNumber": 253,
- "undocument": true,
+ "description": "Filter operators **",
+ "lineNumber": 252,
"type": {
"types": [
"*"
@@ -16571,12 +16582,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "rgxOperator",
+ "name": "emOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#rgxOperator",
+ "longname": "src/tablefilter.js~TableFilter#emOperator",
"access": null,
- "description": "Filter operators **",
- "lineNumber": 256,
+ "description": null,
+ "lineNumber": 253,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -16588,12 +16600,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "emOperator",
+ "name": "nmOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#emOperator",
+ "longname": "src/tablefilter.js~TableFilter#nmOperator",
"access": null,
"description": null,
- "lineNumber": 257,
+ "lineNumber": 254,
"undocument": true,
"type": {
"types": [
@@ -16606,12 +16618,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "nmOperator",
+ "name": "orOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#nmOperator",
+ "longname": "src/tablefilter.js~TableFilter#orOperator",
"access": null,
"description": null,
- "lineNumber": 258,
+ "lineNumber": 255,
"undocument": true,
"type": {
"types": [
@@ -16624,12 +16636,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "orOperator",
+ "name": "anOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#orOperator",
+ "longname": "src/tablefilter.js~TableFilter#anOperator",
"access": null,
"description": null,
- "lineNumber": 259,
+ "lineNumber": 256,
"undocument": true,
"type": {
"types": [
@@ -16642,12 +16654,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "anOperator",
+ "name": "grOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#anOperator",
+ "longname": "src/tablefilter.js~TableFilter#grOperator",
"access": null,
"description": null,
- "lineNumber": 260,
+ "lineNumber": 257,
"undocument": true,
"type": {
"types": [
@@ -16660,12 +16672,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "grOperator",
+ "name": "lwOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#grOperator",
+ "longname": "src/tablefilter.js~TableFilter#lwOperator",
"access": null,
"description": null,
- "lineNumber": 261,
+ "lineNumber": 258,
"undocument": true,
"type": {
"types": [
@@ -16678,12 +16690,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "lwOperator",
+ "name": "leOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#lwOperator",
+ "longname": "src/tablefilter.js~TableFilter#leOperator",
"access": null,
"description": null,
- "lineNumber": 262,
+ "lineNumber": 259,
"undocument": true,
"type": {
"types": [
@@ -16696,12 +16708,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "leOperator",
+ "name": "geOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#leOperator",
+ "longname": "src/tablefilter.js~TableFilter#geOperator",
"access": null,
"description": null,
- "lineNumber": 263,
+ "lineNumber": 260,
"undocument": true,
"type": {
"types": [
@@ -16714,12 +16726,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "geOperator",
+ "name": "dfOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#geOperator",
+ "longname": "src/tablefilter.js~TableFilter#dfOperator",
"access": null,
"description": null,
- "lineNumber": 264,
+ "lineNumber": 261,
"undocument": true,
"type": {
"types": [
@@ -16732,12 +16744,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "dfOperator",
+ "name": "lkOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#dfOperator",
+ "longname": "src/tablefilter.js~TableFilter#lkOperator",
"access": null,
"description": null,
- "lineNumber": 265,
+ "lineNumber": 262,
"undocument": true,
"type": {
"types": [
@@ -16750,12 +16762,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "lkOperator",
+ "name": "eqOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#lkOperator",
+ "longname": "src/tablefilter.js~TableFilter#eqOperator",
"access": null,
"description": null,
- "lineNumber": 266,
+ "lineNumber": 263,
"undocument": true,
"type": {
"types": [
@@ -16768,12 +16780,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "eqOperator",
+ "name": "stOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#eqOperator",
+ "longname": "src/tablefilter.js~TableFilter#stOperator",
"access": null,
"description": null,
- "lineNumber": 267,
+ "lineNumber": 264,
"undocument": true,
"type": {
"types": [
@@ -16786,12 +16798,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "stOperator",
+ "name": "enOperator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#stOperator",
+ "longname": "src/tablefilter.js~TableFilter#enOperator",
"access": null,
"description": null,
- "lineNumber": 268,
+ "lineNumber": 265,
"undocument": true,
"type": {
"types": [
@@ -16804,12 +16816,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "enOperator",
+ "name": "curExp",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#enOperator",
+ "longname": "src/tablefilter.js~TableFilter#curExp",
"access": null,
"description": null,
- "lineNumber": 269,
+ "lineNumber": 266,
"undocument": true,
"type": {
"types": [
@@ -16822,12 +16834,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "curExp",
+ "name": "separator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#curExp",
+ "longname": "src/tablefilter.js~TableFilter#separator",
"access": null,
"description": null,
- "lineNumber": 270,
+ "lineNumber": 267,
"undocument": true,
"type": {
"types": [
@@ -16840,12 +16852,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "separator",
+ "name": "rowsCounter",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#separator",
+ "longname": "src/tablefilter.js~TableFilter#rowsCounter",
"access": null,
"description": null,
- "lineNumber": 271,
+ "lineNumber": 270,
"undocument": true,
"type": {
"types": [
@@ -16858,12 +16870,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "rowsCounter",
+ "name": "statusBar",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#rowsCounter",
+ "longname": "src/tablefilter.js~TableFilter#statusBar",
"access": null,
"description": null,
- "lineNumber": 274,
+ "lineNumber": 273,
"undocument": true,
"type": {
"types": [
@@ -16876,12 +16888,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "statusBar",
+ "name": "loader",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#statusBar",
+ "longname": "src/tablefilter.js~TableFilter#loader",
"access": null,
"description": null,
- "lineNumber": 277,
+ "lineNumber": 276,
"undocument": true,
"type": {
"types": [
@@ -16894,13 +16906,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "loader",
+ "name": "displayBtn",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#loader",
+ "longname": "src/tablefilter.js~TableFilter#displayBtn",
"access": null,
- "description": null,
+ "description": "validation - reset buttons/links **",
"lineNumber": 280,
- "undocument": true,
"type": {
"types": [
"*"
@@ -16912,12 +16923,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "displayBtn",
+ "name": "btnText",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#displayBtn",
+ "longname": "src/tablefilter.js~TableFilter#btnText",
"access": null,
- "description": "validation - reset buttons/links **",
- "lineNumber": 284,
+ "description": null,
+ "lineNumber": 282,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -16929,12 +16941,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnText",
+ "name": "btnCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnText",
+ "longname": "src/tablefilter.js~TableFilter#btnCssClass",
"access": null,
"description": null,
- "lineNumber": 286,
+ "lineNumber": 284,
"undocument": true,
"type": {
"types": [
@@ -16947,12 +16959,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnCssClass",
+ "name": "btnReset",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnCssClass",
+ "longname": "src/tablefilter.js~TableFilter#btnReset",
"access": null,
"description": null,
- "lineNumber": 288,
+ "lineNumber": 287,
"undocument": true,
"type": {
"types": [
@@ -16965,12 +16977,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnReset",
+ "name": "btnResetCssClass",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnReset",
+ "longname": "src/tablefilter.js~TableFilter#btnResetCssClass",
"access": null,
"description": null,
- "lineNumber": 291,
+ "lineNumber": 289,
"undocument": true,
"type": {
"types": [
@@ -16983,12 +16995,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnResetCssClass",
+ "name": "onBeforeReset",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnResetCssClass",
+ "longname": "src/tablefilter.js~TableFilter#onBeforeReset",
"access": null,
"description": null,
- "lineNumber": 293,
+ "lineNumber": 291,
"undocument": true,
"type": {
"types": [
@@ -17001,12 +17013,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onBeforeReset",
+ "name": "onAfterReset",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onBeforeReset",
+ "longname": "src/tablefilter.js~TableFilter#onAfterReset",
"access": null,
"description": null,
- "lineNumber": 295,
+ "lineNumber": 294,
"undocument": true,
"type": {
"types": [
@@ -17019,13 +17031,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "onAfterReset",
+ "name": "paging",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#onAfterReset",
+ "longname": "src/tablefilter.js~TableFilter#paging",
"access": null,
- "description": null,
+ "description": "paging **",
"lineNumber": 298,
- "undocument": true,
"type": {
"types": [
"*"
@@ -17037,29 +17048,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "paging",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#paging",
- "access": null,
- "description": "paging **",
- "lineNumber": 302,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 866,
- "kind": "member",
- "static": false,
- "variation": null,
"name": "nbHiddenRows",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
"access": null,
"description": null,
- "lineNumber": 303,
+ "lineNumber": 299,
"undocument": true,
"type": {
"types": [
@@ -17068,7 +17062,7 @@
}
},
{
- "__docId__": 867,
+ "__docId__": 866,
"kind": "member",
"static": false,
"variation": null,
@@ -17077,7 +17071,25 @@
"longname": "src/tablefilter.js~TableFilter#autoFilter",
"access": null,
"description": "autofilter on typing **",
- "lineNumber": 307,
+ "lineNumber": 303,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 867,
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "autoFilterDelay",
+ "memberof": "src/tablefilter.js~TableFilter",
+ "longname": "src/tablefilter.js~TableFilter#autoFilterDelay",
+ "access": null,
+ "description": null,
+ "lineNumber": 305,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -17089,12 +17101,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "autoFilterDelay",
+ "name": "isUserTyping",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#autoFilterDelay",
+ "longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
- "lineNumber": 309,
+ "lineNumber": 308,
"undocument": true,
"type": {
"types": [
@@ -17107,12 +17119,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "isUserTyping",
+ "name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#isUserTyping",
+ "longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
- "lineNumber": 312,
+ "lineNumber": 309,
"undocument": true,
"type": {
"types": [
@@ -17125,13 +17137,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "autoFilterTimer",
+ "name": "highlightKeywords",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
+ "longname": "src/tablefilter.js~TableFilter#highlightKeywords",
"access": null,
- "description": null,
+ "description": "keyword highlighting **",
"lineNumber": 313,
- "undocument": true,
"type": {
"types": [
"*"
@@ -17143,12 +17154,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "highlightKeywords",
+ "name": "noResults",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#highlightKeywords",
+ "longname": "src/tablefilter.js~TableFilter#noResults",
"access": null,
- "description": "keyword highlighting **",
- "lineNumber": 317,
+ "description": "No results feature **",
+ "lineNumber": 316,
"type": {
"types": [
"*"
@@ -17160,12 +17171,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "noResults",
+ "name": "state",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#noResults",
+ "longname": "src/tablefilter.js~TableFilter#state",
"access": null,
- "description": "No results feature **",
+ "description": null,
"lineNumber": 320,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -17177,13 +17189,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "state",
+ "name": "defaultDateType",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#state",
+ "longname": "src/tablefilter.js~TableFilter#defaultDateType",
"access": null,
- "description": null,
+ "description": "data types **",
"lineNumber": 324,
- "undocument": true,
"type": {
"types": [
"*"
@@ -17195,12 +17206,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "defaultDateType",
+ "name": "thousandsSeparator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#defaultDateType",
+ "longname": "src/tablefilter.js~TableFilter#thousandsSeparator",
"access": null,
- "description": "data types **",
- "lineNumber": 328,
+ "description": null,
+ "lineNumber": 326,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -17212,12 +17224,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "thousandsSeparator",
+ "name": "decimalSeparator",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#thousandsSeparator",
+ "longname": "src/tablefilter.js~TableFilter#decimalSeparator",
"access": null,
"description": null,
- "lineNumber": 330,
+ "lineNumber": 329,
"undocument": true,
"type": {
"types": [
@@ -17230,12 +17242,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "decimalSeparator",
+ "name": "hasColNbFormat",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#decimalSeparator",
+ "longname": "src/tablefilter.js~TableFilter#hasColNbFormat",
"access": null,
"description": null,
- "lineNumber": 333,
+ "lineNumber": 331,
"undocument": true,
"type": {
"types": [
@@ -17248,12 +17260,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasColNbFormat",
+ "name": "colNbFormat",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasColNbFormat",
+ "longname": "src/tablefilter.js~TableFilter#colNbFormat",
"access": null,
"description": null,
- "lineNumber": 335,
+ "lineNumber": 333,
"undocument": true,
"type": {
"types": [
@@ -17266,12 +17278,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "colNbFormat",
+ "name": "hasColDateType",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#colNbFormat",
+ "longname": "src/tablefilter.js~TableFilter#hasColDateType",
"access": null,
"description": null,
- "lineNumber": 337,
+ "lineNumber": 335,
"undocument": true,
"type": {
"types": [
@@ -17284,12 +17296,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasColDateType",
+ "name": "colDateType",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasColDateType",
+ "longname": "src/tablefilter.js~TableFilter#colDateType",
"access": null,
"description": null,
- "lineNumber": 339,
+ "lineNumber": 337,
"undocument": true,
"type": {
"types": [
@@ -17302,16 +17314,15 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "colDateType",
+ "name": "prfxTf",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#colDateType",
+ "longname": "src/tablefilter.js~TableFilter#prfxTf",
"access": null,
- "description": null,
+ "description": "ids prefixes **",
"lineNumber": 341,
- "undocument": true,
"type": {
"types": [
- "*"
+ "string"
]
}
},
@@ -17320,12 +17331,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxTf",
+ "name": "prfxFlt",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxTf",
+ "longname": "src/tablefilter.js~TableFilter#prfxFlt",
"access": null,
- "description": "ids prefixes **",
- "lineNumber": 345,
+ "description": null,
+ "lineNumber": 343,
+ "undocument": true,
"type": {
"types": [
"string"
@@ -17337,12 +17349,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxFlt",
+ "name": "prfxValButton",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxFlt",
+ "longname": "src/tablefilter.js~TableFilter#prfxValButton",
"access": null,
"description": null,
- "lineNumber": 347,
+ "lineNumber": 345,
"undocument": true,
"type": {
"types": [
@@ -17355,12 +17367,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxValButton",
+ "name": "prfxInfDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxValButton",
+ "longname": "src/tablefilter.js~TableFilter#prfxInfDiv",
"access": null,
"description": null,
- "lineNumber": 349,
+ "lineNumber": 347,
"undocument": true,
"type": {
"types": [
@@ -17373,12 +17385,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxInfDiv",
+ "name": "prfxLDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxInfDiv",
+ "longname": "src/tablefilter.js~TableFilter#prfxLDiv",
"access": null,
"description": null,
- "lineNumber": 351,
+ "lineNumber": 349,
"undocument": true,
"type": {
"types": [
@@ -17391,12 +17403,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxLDiv",
+ "name": "prfxRDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxLDiv",
+ "longname": "src/tablefilter.js~TableFilter#prfxRDiv",
"access": null,
"description": null,
- "lineNumber": 353,
+ "lineNumber": 351,
"undocument": true,
"type": {
"types": [
@@ -17409,12 +17421,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxRDiv",
+ "name": "prfxMDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxRDiv",
+ "longname": "src/tablefilter.js~TableFilter#prfxMDiv",
"access": null,
"description": null,
- "lineNumber": 355,
+ "lineNumber": 353,
"undocument": true,
"type": {
"types": [
@@ -17427,12 +17439,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxMDiv",
+ "name": "prfxResponsive",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxMDiv",
+ "longname": "src/tablefilter.js~TableFilter#prfxResponsive",
"access": null,
"description": null,
- "lineNumber": 357,
+ "lineNumber": 355,
"undocument": true,
"type": {
"types": [
@@ -17445,16 +17457,15 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "prfxResponsive",
+ "name": "extensions",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#prfxResponsive",
+ "longname": "src/tablefilter.js~TableFilter#extensions",
"access": null,
- "description": null,
+ "description": "extensions **",
"lineNumber": 359,
- "undocument": true,
"type": {
"types": [
- "string"
+ "*"
]
}
},
@@ -17463,12 +17474,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "extensions",
+ "name": "hasExtensions",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#extensions",
+ "longname": "src/tablefilter.js~TableFilter#hasExtensions",
"access": null,
- "description": "extensions **",
- "lineNumber": 363,
+ "description": null,
+ "lineNumber": 360,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -17480,13 +17492,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasExtensions",
+ "name": "enableDefaultTheme",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasExtensions",
+ "longname": "src/tablefilter.js~TableFilter#enableDefaultTheme",
"access": null,
- "description": null,
- "lineNumber": 364,
- "undocument": true,
+ "description": "themes **",
+ "lineNumber": 363,
"type": {
"types": [
"*"
@@ -17498,12 +17509,13 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "enableDefaultTheme",
+ "name": "hasThemes",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#enableDefaultTheme",
+ "longname": "src/tablefilter.js~TableFilter#hasThemes",
"access": null,
- "description": "themes **",
- "lineNumber": 367,
+ "description": null,
+ "lineNumber": 365,
+ "undocument": true,
"type": {
"types": [
"*"
@@ -17515,12 +17527,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "hasThemes",
+ "name": "themes",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#hasThemes",
+ "longname": "src/tablefilter.js~TableFilter#themes",
"access": null,
"description": null,
- "lineNumber": 369,
+ "lineNumber": 366,
"undocument": true,
"type": {
"types": [
@@ -17533,12 +17545,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "themes",
+ "name": "themesPath",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#themes",
+ "longname": "src/tablefilter.js~TableFilter#themesPath",
"access": null,
"description": null,
- "lineNumber": 370,
+ "lineNumber": 368,
"undocument": true,
"type": {
"types": [
@@ -17551,12 +17563,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "themesPath",
+ "name": "responsive",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#themesPath",
+ "longname": "src/tablefilter.js~TableFilter#responsive",
"access": null,
"description": null,
- "lineNumber": 372,
+ "lineNumber": 371,
"undocument": true,
"type": {
"types": [
@@ -17569,12 +17581,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "responsive",
+ "name": "Mod",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#responsive",
+ "longname": "src/tablefilter.js~TableFilter#Mod",
"access": null,
"description": null,
- "lineNumber": 375,
+ "lineNumber": 374,
"undocument": true,
"type": {
"types": [
@@ -17587,12 +17599,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "Mod",
+ "name": "ExtRegistry",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#Mod",
+ "longname": "src/tablefilter.js~TableFilter#ExtRegistry",
"access": null,
"description": null,
- "lineNumber": 378,
+ "lineNumber": 377,
"undocument": true,
"type": {
"types": [
@@ -17602,24 +17614,6 @@
},
{
"__docId__": 897,
- "kind": "member",
- "static": false,
- "variation": null,
- "name": "ExtRegistry",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#ExtRegistry",
- "access": null,
- "description": null,
- "lineNumber": 381,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 898,
"kind": "method",
"static": false,
"variation": null,
@@ -17628,12 +17622,12 @@
"longname": "src/tablefilter.js~TableFilter#init",
"access": null,
"description": "Initialise features and layout",
- "lineNumber": 387,
+ "lineNumber": 383,
"params": [],
"generator": false
},
{
- "__docId__": 899,
+ "__docId__": 898,
"kind": "member",
"static": false,
"variation": null,
@@ -17642,7 +17636,7 @@
"longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
"access": null,
"description": null,
- "lineNumber": 451,
+ "lineNumber": 447,
"undocument": true,
"type": {
"types": [
@@ -17651,7 +17645,7 @@
}
},
{
- "__docId__": 900,
+ "__docId__": 899,
"kind": "member",
"static": false,
"variation": null,
@@ -17660,7 +17654,7 @@
"longname": "src/tablefilter.js~TableFilter#initialized",
"access": null,
"description": null,
- "lineNumber": 574,
+ "lineNumber": 570,
"undocument": true,
"type": {
"types": [
@@ -17669,7 +17663,7 @@
}
},
{
- "__docId__": 901,
+ "__docId__": 900,
"kind": "method",
"static": false,
"variation": null,
@@ -17678,7 +17672,7 @@
"longname": "src/tablefilter.js~TableFilter#detectKey",
"access": null,
"description": "Detect key",
- "lineNumber": 582,
+ "lineNumber": 578,
"params": [
{
"nullable": null,
@@ -17694,7 +17688,7 @@
"generator": false
},
{
- "__docId__": 902,
+ "__docId__": 901,
"kind": "member",
"static": false,
"variation": null,
@@ -17703,7 +17697,7 @@
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
- "lineNumber": 593,
+ "lineNumber": 589,
"undocument": true,
"type": {
"types": [
@@ -17712,7 +17706,7 @@
}
},
{
- "__docId__": 903,
+ "__docId__": 902,
"kind": "member",
"static": false,
"variation": null,
@@ -17721,7 +17715,7 @@
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
- "lineNumber": 595,
+ "lineNumber": 591,
"undocument": true,
"type": {
"types": [
@@ -17730,7 +17724,7 @@
}
},
{
- "__docId__": 904,
+ "__docId__": 903,
"kind": "method",
"static": false,
"variation": null,
@@ -17739,7 +17733,7 @@
"longname": "src/tablefilter.js~TableFilter#onKeyUp",
"access": null,
"description": "Filter's keyup event: if auto-filter on, detect user is typing and filter\ncolumns",
- "lineNumber": 605,
+ "lineNumber": 601,
"params": [
{
"nullable": null,
@@ -17755,7 +17749,7 @@
"generator": false
},
{
- "__docId__": 905,
+ "__docId__": 904,
"kind": "member",
"static": false,
"variation": null,
@@ -17764,7 +17758,7 @@
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
- "lineNumber": 610,
+ "lineNumber": 606,
"undocument": true,
"type": {
"types": [
@@ -17773,7 +17767,7 @@
}
},
{
- "__docId__": 906,
+ "__docId__": 905,
"kind": "member",
"static": false,
"variation": null,
@@ -17782,7 +17776,25 @@
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
- "lineNumber": 614,
+ "lineNumber": 610,
+ "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": 613,
"undocument": true,
"type": {
"types": [
@@ -17795,12 +17807,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "isUserTyping",
+ "name": "autoFilterTimer",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#isUserTyping",
+ "longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
- "lineNumber": 617,
+ "lineNumber": 620,
"undocument": true,
"type": {
"types": [
@@ -17818,7 +17830,7 @@
"longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
"access": null,
"description": null,
- "lineNumber": 624,
+ "lineNumber": 625,
"undocument": true,
"type": {
"types": [
@@ -17828,24 +17840,6 @@
},
{
"__docId__": 909,
- "kind": "member",
- "static": false,
- "variation": null,
- "name": "autoFilterTimer",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#autoFilterTimer",
- "access": null,
- "description": null,
- "lineNumber": 629,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 910,
"kind": "method",
"static": false,
"variation": null,
@@ -17854,12 +17848,12 @@
"longname": "src/tablefilter.js~TableFilter#onKeyDown",
"access": null,
"description": "Filter's keydown event: if auto-filter on, detect user is typing",
- "lineNumber": 636,
+ "lineNumber": 632,
"params": [],
"generator": false
},
{
- "__docId__": 911,
+ "__docId__": 910,
"kind": "member",
"static": false,
"variation": null,
@@ -17868,7 +17862,7 @@
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
- "lineNumber": 638,
+ "lineNumber": 634,
"undocument": true,
"type": {
"types": [
@@ -17877,7 +17871,7 @@
}
},
{
- "__docId__": 912,
+ "__docId__": 911,
"kind": "method",
"static": false,
"variation": null,
@@ -17886,7 +17880,7 @@
"longname": "src/tablefilter.js~TableFilter#onInpFocus",
"access": null,
"description": "Filter's focus event",
- "lineNumber": 646,
+ "lineNumber": 642,
"params": [
{
"nullable": null,
@@ -17902,7 +17896,7 @@
"generator": false
},
{
- "__docId__": 913,
+ "__docId__": 912,
"kind": "method",
"static": false,
"variation": null,
@@ -17911,12 +17905,12 @@
"longname": "src/tablefilter.js~TableFilter#onInpBlur",
"access": null,
"description": "Filter's blur event: if auto-filter on, clear interval on filter blur",
- "lineNumber": 654,
+ "lineNumber": 650,
"params": [],
"generator": false
},
{
- "__docId__": 914,
+ "__docId__": 913,
"kind": "member",
"static": false,
"variation": null,
@@ -17925,7 +17919,7 @@
"longname": "src/tablefilter.js~TableFilter#isUserTyping",
"access": null,
"description": null,
- "lineNumber": 656,
+ "lineNumber": 652,
"undocument": true,
"type": {
"types": [
@@ -17934,7 +17928,7 @@
}
},
{
- "__docId__": 915,
+ "__docId__": 914,
"kind": "method",
"static": false,
"variation": null,
@@ -17943,7 +17937,7 @@
"longname": "src/tablefilter.js~TableFilter#_insertFiltersRow",
"access": null,
"description": "Insert filters row at initialization",
- "lineNumber": 665,
+ "lineNumber": 661,
"params": [],
"return": {
"types": [
@@ -17953,7 +17947,7 @@
"generator": false
},
{
- "__docId__": 916,
+ "__docId__": 915,
"kind": "method",
"static": false,
"variation": null,
@@ -17962,12 +17956,12 @@
"longname": "src/tablefilter.js~TableFilter#_initNoFilters",
"access": null,
"description": "Initialize filtersless table",
- "lineNumber": 691,
+ "lineNumber": 687,
"params": [],
"generator": false
},
{
- "__docId__": 917,
+ "__docId__": 916,
"kind": "member",
"static": false,
"variation": null,
@@ -17976,7 +17970,25 @@
"longname": "src/tablefilter.js~TableFilter#refRow",
"access": null,
"description": null,
- "lineNumber": 695,
+ "lineNumber": 691,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 917,
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "nbFilterableRows",
+ "memberof": "src/tablefilter.js~TableFilter",
+ "longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
+ "access": null,
+ "description": null,
+ "lineNumber": 692,
"undocument": true,
"type": {
"types": [
@@ -17986,24 +17998,6 @@
},
{
"__docId__": 918,
- "kind": "member",
- "static": false,
- "variation": null,
- "name": "nbFilterableRows",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#nbFilterableRows",
- "access": null,
- "description": null,
- "lineNumber": 696,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 919,
"kind": "method",
"static": false,
"variation": null,
@@ -18012,7 +18006,7 @@
"longname": "src/tablefilter.js~TableFilter#_buildInputFilter",
"access": null,
"description": "Build input filter type",
- "lineNumber": 705,
+ "lineNumber": 701,
"params": [
{
"nullable": null,
@@ -18048,7 +18042,7 @@
"generator": false
},
{
- "__docId__": 920,
+ "__docId__": 919,
"kind": "method",
"static": false,
"variation": null,
@@ -18057,7 +18051,7 @@
"longname": "src/tablefilter.js~TableFilter#_buildSubmitButton",
"access": null,
"description": "Build submit button",
- "lineNumber": 744,
+ "lineNumber": 740,
"params": [
{
"nullable": null,
@@ -18083,7 +18077,7 @@
"generator": false
},
{
- "__docId__": 921,
+ "__docId__": 920,
"kind": "method",
"static": false,
"variation": null,
@@ -18092,7 +18086,7 @@
"longname": "src/tablefilter.js~TableFilter#feature",
"access": null,
"description": "Return a feature instance for a given name",
- "lineNumber": 767,
+ "lineNumber": 763,
"params": [
{
"nullable": null,
@@ -18116,7 +18110,7 @@
"generator": false
},
{
- "__docId__": 922,
+ "__docId__": 921,
"kind": "method",
"static": false,
"variation": null,
@@ -18125,12 +18119,12 @@
"longname": "src/tablefilter.js~TableFilter#initExtensions",
"access": null,
"description": "Initialise all the extensions defined in the configuration object",
- "lineNumber": 774,
+ "lineNumber": 770,
"params": [],
"generator": false
},
{
- "__docId__": 923,
+ "__docId__": 922,
"kind": "method",
"static": false,
"variation": null,
@@ -18139,7 +18133,7 @@
"longname": "src/tablefilter.js~TableFilter#loadExtension",
"access": null,
"description": "Load an extension module",
- "lineNumber": 793,
+ "lineNumber": 789,
"params": [
{
"nullable": null,
@@ -18155,7 +18149,7 @@
"generator": false
},
{
- "__docId__": 924,
+ "__docId__": 923,
"kind": "method",
"static": false,
"variation": null,
@@ -18164,7 +18158,7 @@
"longname": "src/tablefilter.js~TableFilter#extension",
"access": null,
"description": "Get an extension instance",
- "lineNumber": 824,
+ "lineNumber": 820,
"params": [
{
"nullable": null,
@@ -18188,7 +18182,7 @@
"generator": false
},
{
- "__docId__": 925,
+ "__docId__": 924,
"kind": "method",
"static": false,
"variation": null,
@@ -18197,7 +18191,7 @@
"longname": "src/tablefilter.js~TableFilter#hasExtension",
"access": null,
"description": "Check passed extension name exists",
- "lineNumber": 833,
+ "lineNumber": 829,
"params": [
{
"nullable": null,
@@ -18221,7 +18215,7 @@
"generator": false
},
{
- "__docId__": 926,
+ "__docId__": 925,
"kind": "method",
"static": false,
"variation": null,
@@ -18230,12 +18224,12 @@
"longname": "src/tablefilter.js~TableFilter#destroyExtensions",
"access": null,
"description": "Destroy all the extensions defined in the configuration object",
- "lineNumber": 840,
+ "lineNumber": 836,
"params": [],
"generator": false
},
{
- "__docId__": 927,
+ "__docId__": 926,
"kind": "method",
"static": false,
"variation": null,
@@ -18244,12 +18238,12 @@
"longname": "src/tablefilter.js~TableFilter#loadThemes",
"access": null,
"description": "Load themes defined in the configuration object",
- "lineNumber": 856,
+ "lineNumber": 852,
"params": [],
"generator": false
},
{
- "__docId__": 928,
+ "__docId__": 927,
"kind": "member",
"static": false,
"variation": null,
@@ -18258,7 +18252,25 @@
"longname": "src/tablefilter.js~TableFilter#btnResetText",
"access": null,
"description": null,
- "lineNumber": 886,
+ "lineNumber": 882,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 928,
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "btnResetHtml",
+ "memberof": "src/tablefilter.js~TableFilter",
+ "longname": "src/tablefilter.js~TableFilter#btnResetHtml",
+ "access": null,
+ "description": null,
+ "lineNumber": 883,
"undocument": true,
"type": {
"types": [
@@ -18271,9 +18283,9 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnResetHtml",
+ "name": "btnPrevPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnResetHtml",
+ "longname": "src/tablefilter.js~TableFilter#btnPrevPageHtml",
"access": null,
"description": null,
"lineNumber": 887,
@@ -18289,12 +18301,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnPrevPageHtml",
+ "name": "btnNextPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnPrevPageHtml",
+ "longname": "src/tablefilter.js~TableFilter#btnNextPageHtml",
"access": null,
"description": null,
- "lineNumber": 891,
+ "lineNumber": 889,
"undocument": true,
"type": {
"types": [
@@ -18307,12 +18319,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnNextPageHtml",
+ "name": "btnFirstPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnNextPageHtml",
+ "longname": "src/tablefilter.js~TableFilter#btnFirstPageHtml",
"access": null,
"description": null,
- "lineNumber": 893,
+ "lineNumber": 891,
"undocument": true,
"type": {
"types": [
@@ -18325,12 +18337,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnFirstPageHtml",
+ "name": "btnLastPageHtml",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnFirstPageHtml",
+ "longname": "src/tablefilter.js~TableFilter#btnLastPageHtml",
"access": null,
"description": null,
- "lineNumber": 895,
+ "lineNumber": 893,
"undocument": true,
"type": {
"types": [
@@ -18343,30 +18355,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "btnLastPageHtml",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#btnLastPageHtml",
- "access": null,
- "description": null,
- "lineNumber": 897,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 934,
- "kind": "member",
- "static": false,
- "variation": null,
"name": "loader",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#loader",
"access": null,
"description": null,
- "lineNumber": 901,
+ "lineNumber": 897,
"undocument": true,
"type": {
"types": [
@@ -18375,7 +18369,7 @@
}
},
{
- "__docId__": 935,
+ "__docId__": 934,
"kind": "member",
"static": false,
"variation": null,
@@ -18384,7 +18378,7 @@
"longname": "src/tablefilter.js~TableFilter#loaderHtml",
"access": null,
"description": null,
- "lineNumber": 902,
+ "lineNumber": 898,
"undocument": true,
"type": {
"types": [
@@ -18393,7 +18387,7 @@
}
},
{
- "__docId__": 936,
+ "__docId__": 935,
"kind": "member",
"static": false,
"variation": null,
@@ -18402,7 +18396,7 @@
"longname": "src/tablefilter.js~TableFilter#loaderText",
"access": null,
"description": null,
- "lineNumber": 903,
+ "lineNumber": 899,
"undocument": true,
"type": {
"types": [
@@ -18411,7 +18405,7 @@
}
},
{
- "__docId__": 937,
+ "__docId__": 936,
"kind": "method",
"static": false,
"variation": null,
@@ -18420,7 +18414,7 @@
"longname": "src/tablefilter.js~TableFilter#getStylesheet",
"access": null,
"description": "Return stylesheet DOM element for a given theme name",
- "lineNumber": 912,
+ "lineNumber": 908,
"params": [
{
"name": "name",
@@ -18443,7 +18437,7 @@
"generator": false
},
{
- "__docId__": 938,
+ "__docId__": 937,
"kind": "method",
"static": false,
"variation": null,
@@ -18452,21 +18446,39 @@
"longname": "src/tablefilter.js~TableFilter#destroy",
"access": null,
"description": "Destroy filter grid",
- "lineNumber": 919,
+ "lineNumber": 915,
"params": [],
"generator": false
},
+ {
+ "__docId__": 938,
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "nbHiddenRows",
+ "memberof": "src/tablefilter.js~TableFilter",
+ "longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
+ "access": null,
+ "description": null,
+ "lineNumber": 970,
+ "undocument": true,
+ "type": {
+ "types": [
+ "number"
+ ]
+ }
+ },
{
"__docId__": 939,
"kind": "member",
"static": false,
"variation": null,
- "name": "fltGridEl",
+ "name": "validRowsIndex",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltGridEl",
+ "longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
- "lineNumber": 946,
+ "lineNumber": 971,
"undocument": true,
"type": {
"types": [
@@ -18479,16 +18491,16 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "nbHiddenRows",
+ "name": "fltIds",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
+ "longname": "src/tablefilter.js~TableFilter#fltIds",
"access": null,
"description": null,
- "lineNumber": 975,
+ "lineNumber": 972,
"undocument": true,
"type": {
"types": [
- "number"
+ "*"
]
}
},
@@ -18497,48 +18509,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "validRowsIndex",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#validRowsIndex",
- "access": null,
- "description": null,
- "lineNumber": 976,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 942,
- "kind": "member",
- "static": false,
- "variation": null,
- "name": "fltIds",
- "memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#fltIds",
- "access": null,
- "description": null,
- "lineNumber": 977,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 943,
- "kind": "member",
- "static": false,
- "variation": null,
"name": "initialized",
"memberof": "src/tablefilter.js~TableFilter",
"longname": "src/tablefilter.js~TableFilter#initialized",
"access": null,
"description": null,
- "lineNumber": 978,
+ "lineNumber": 973,
"undocument": true,
"type": {
"types": [
@@ -18547,7 +18523,7 @@
}
},
{
- "__docId__": 944,
+ "__docId__": 942,
"kind": "method",
"static": false,
"variation": null,
@@ -18556,12 +18532,12 @@
"longname": "src/tablefilter.js~TableFilter#setToolbar",
"access": null,
"description": "Generate container element for paging, reset button, rows counter etc.",
- "lineNumber": 984,
+ "lineNumber": 979,
"params": [],
"generator": false
},
{
- "__docId__": 945,
+ "__docId__": 943,
"kind": "member",
"static": false,
"variation": null,
@@ -18570,7 +18546,43 @@
"longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
- "lineNumber": 1009,
+ "lineNumber": 1004,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 944,
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "lDiv",
+ "memberof": "src/tablefilter.js~TableFilter",
+ "longname": "src/tablefilter.js~TableFilter#lDiv",
+ "access": null,
+ "description": null,
+ "lineNumber": 1010,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "__docId__": 945,
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "rDiv",
+ "memberof": "src/tablefilter.js~TableFilter",
+ "longname": "src/tablefilter.js~TableFilter#rDiv",
+ "access": null,
+ "description": null,
+ "lineNumber": 1017,
"undocument": true,
"type": {
"types": [
@@ -18583,12 +18595,12 @@
"kind": "member",
"static": false,
"variation": null,
- "name": "lDiv",
+ "name": "mDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#lDiv",
+ "longname": "src/tablefilter.js~TableFilter#mDiv",
"access": null,
"description": null,
- "lineNumber": 1015,
+ "lineNumber": 1023,
"undocument": true,
"type": {
"types": [
@@ -18598,33 +18610,29 @@
},
{
"__docId__": 947,
- "kind": "member",
+ "kind": "method",
"static": false,
"variation": null,
- "name": "rDiv",
+ "name": "removeToolbar",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#rDiv",
+ "longname": "src/tablefilter.js~TableFilter#removeToolbar",
"access": null,
- "description": null,
- "lineNumber": 1022,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
+ "description": "Remove toolbar container element",
+ "lineNumber": 1037,
+ "params": [],
+ "generator": false
},
{
"__docId__": 948,
"kind": "member",
"static": false,
"variation": null,
- "name": "mDiv",
+ "name": "infDiv",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#mDiv",
+ "longname": "src/tablefilter.js~TableFilter#infDiv",
"access": null,
"description": null,
- "lineNumber": 1028,
+ "lineNumber": 1042,
"undocument": true,
"type": {
"types": [
@@ -18637,49 +18645,17 @@
"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": 1042,
- "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": 1047,
- "undocument": true,
- "type": {
- "types": [
- "*"
- ]
- }
- },
- {
- "__docId__": 951,
- "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": 1059,
+ "lineNumber": 1054,
"params": [],
"generator": false
},
{
- "__docId__": 952,
+ "__docId__": 950,
"kind": "method",
"static": false,
"variation": null,
@@ -18688,7 +18664,7 @@
"longname": "src/tablefilter.js~TableFilter#isCustomOptions",
"access": null,
"description": "Check if given column implements a filter with custom options",
- "lineNumber": 1079,
+ "lineNumber": 1074,
"params": [
{
"nullable": null,
@@ -18712,7 +18688,7 @@
"generator": false
},
{
- "__docId__": 953,
+ "__docId__": 951,
"kind": "method",
"static": false,
"variation": null,
@@ -18721,7 +18697,7 @@
"longname": "src/tablefilter.js~TableFilter#getCustomOptions",
"access": null,
"description": "Returns an array [[value0, value1 ...],[text0, text1 ...]] with the\ncustom options values and texts",
- "lineNumber": 1090,
+ "lineNumber": 1085,
"params": [
{
"nullable": null,
@@ -18745,7 +18721,7 @@
"generator": false
},
{
- "__docId__": 954,
+ "__docId__": 952,
"kind": "method",
"static": false,
"variation": null,
@@ -18754,12 +18730,12 @@
"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": 1123,
+ "lineNumber": 1118,
"params": [],
"generator": false
},
{
- "__docId__": 955,
+ "__docId__": 953,
"kind": "member",
"static": false,
"variation": null,
@@ -18768,7 +18744,7 @@
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
- "lineNumber": 1137,
+ "lineNumber": 1132,
"undocument": true,
"type": {
"types": [
@@ -18777,7 +18753,7 @@
}
},
{
- "__docId__": 956,
+ "__docId__": 954,
"kind": "member",
"static": false,
"variation": null,
@@ -18786,7 +18762,7 @@
"longname": "src/tablefilter.js~TableFilter#nbHiddenRows",
"access": null,
"description": null,
- "lineNumber": 1465,
+ "lineNumber": 1460,
"undocument": true,
"type": {
"types": [
@@ -18795,7 +18771,7 @@
}
},
{
- "__docId__": 957,
+ "__docId__": 955,
"kind": "method",
"static": false,
"variation": null,
@@ -18804,7 +18780,7 @@
"longname": "src/tablefilter.js~TableFilter#getColValues",
"access": null,
"description": "Return the data of a specified column",
- "lineNumber": 1483,
+ "lineNumber": 1478,
"params": [
{
"nullable": null,
@@ -18858,7 +18834,7 @@
"generator": false
},
{
- "__docId__": 958,
+ "__docId__": 956,
"kind": "method",
"static": false,
"variation": null,
@@ -18867,7 +18843,7 @@
"longname": "src/tablefilter.js~TableFilter#getFilterValue",
"access": null,
"description": "Return the filter's value of a specified column",
- "lineNumber": 1528,
+ "lineNumber": 1523,
"params": [
{
"nullable": null,
@@ -18891,7 +18867,7 @@
"generator": false
},
{
- "__docId__": 959,
+ "__docId__": 957,
"kind": "method",
"static": false,
"variation": null,
@@ -18900,7 +18876,7 @@
"longname": "src/tablefilter.js~TableFilter#getFiltersValue",
"access": null,
"description": "Return the filters' values",
- "lineNumber": 1564,
+ "lineNumber": 1559,
"params": [],
"return": {
"nullable": null,
@@ -18913,7 +18889,7 @@
"generator": false
},
{
- "__docId__": 960,
+ "__docId__": 958,
"kind": "method",
"static": false,
"variation": null,
@@ -18922,7 +18898,7 @@
"longname": "src/tablefilter.js~TableFilter#getFilterId",
"access": null,
"description": "Return the ID of a specified column's filter",
- "lineNumber": 1585,
+ "lineNumber": 1580,
"params": [
{
"nullable": null,
@@ -18946,7 +18922,7 @@
"generator": false
},
{
- "__docId__": 961,
+ "__docId__": 959,
"kind": "method",
"static": false,
"variation": null,
@@ -18955,7 +18931,7 @@
"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": 1601,
+ "lineNumber": 1596,
"params": [
{
"nullable": null,
@@ -18989,7 +18965,7 @@
"generator": false
},
{
- "__docId__": 962,
+ "__docId__": 960,
"kind": "method",
"static": false,
"variation": null,
@@ -18998,7 +18974,7 @@
"longname": "src/tablefilter.js~TableFilter#getFilterElement",
"access": null,
"description": "Return the filter's DOM element for a given column",
- "lineNumber": 1621,
+ "lineNumber": 1616,
"params": [
{
"nullable": null,
@@ -19022,7 +18998,7 @@
"generator": false
},
{
- "__docId__": 963,
+ "__docId__": 961,
"kind": "method",
"static": false,
"variation": null,
@@ -19031,7 +19007,7 @@
"longname": "src/tablefilter.js~TableFilter#getCellsNb",
"access": null,
"description": "Return the number of cells for a given row index",
- "lineNumber": 1631,
+ "lineNumber": 1626,
"params": [
{
"nullable": null,
@@ -19055,7 +19031,7 @@
"generator": false
},
{
- "__docId__": 964,
+ "__docId__": 962,
"kind": "method",
"static": false,
"variation": null,
@@ -19064,7 +19040,7 @@
"longname": "src/tablefilter.js~TableFilter#getRowsNb",
"access": null,
"description": "Return the number of filterable rows starting from reference row if\ndefined",
- "lineNumber": 1642,
+ "lineNumber": 1637,
"params": [
{
"nullable": null,
@@ -19088,7 +19064,7 @@
"generator": false
},
{
- "__docId__": 965,
+ "__docId__": 963,
"kind": "method",
"static": false,
"variation": null,
@@ -19097,7 +19073,7 @@
"longname": "src/tablefilter.js~TableFilter#getCellData",
"access": null,
"description": "Return the data of a given cell",
- "lineNumber": 1656,
+ "lineNumber": 1651,
"params": [
{
"nullable": null,
@@ -19121,7 +19097,7 @@
"generator": false
},
{
- "__docId__": 966,
+ "__docId__": 964,
"kind": "method",
"static": false,
"variation": null,
@@ -19130,7 +19106,7 @@
"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": 1679,
+ "lineNumber": 1674,
"params": [
{
"nullable": null,
@@ -19164,7 +19140,7 @@
"generator": false
},
{
- "__docId__": 967,
+ "__docId__": 965,
"kind": "method",
"static": false,
"variation": null,
@@ -19173,7 +19149,7 @@
"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": 1716,
+ "lineNumber": 1711,
"params": [
{
"nullable": null,
@@ -19207,7 +19183,7 @@
"generator": false
},
{
- "__docId__": 968,
+ "__docId__": 966,
"kind": "method",
"static": false,
"variation": null,
@@ -19216,7 +19192,7 @@
"longname": "src/tablefilter.js~TableFilter#getFilteredDataCol",
"access": null,
"description": "Return the filtered data for a given column index",
- "lineNumber": 1753,
+ "lineNumber": 1748,
"params": [
{
"nullable": null,
@@ -19250,7 +19226,7 @@
"generator": false
},
{
- "__docId__": 969,
+ "__docId__": 967,
"kind": "method",
"static": false,
"variation": null,
@@ -19259,7 +19235,7 @@
"longname": "src/tablefilter.js~TableFilter#getRowDisplay",
"access": null,
"description": "Get the display value of a row",
- "lineNumber": 1778,
+ "lineNumber": 1773,
"params": [
{
"nullable": null,
@@ -19283,7 +19259,7 @@
"generator": false
},
{
- "__docId__": 970,
+ "__docId__": 968,
"kind": "method",
"static": false,
"variation": null,
@@ -19292,7 +19268,7 @@
"longname": "src/tablefilter.js~TableFilter#validateRow",
"access": null,
"description": "Validate/invalidate row by setting the 'validRow' attribute on the row",
- "lineNumber": 1787,
+ "lineNumber": 1782,
"params": [
{
"nullable": null,
@@ -19318,7 +19294,7 @@
"generator": false
},
{
- "__docId__": 971,
+ "__docId__": 969,
"kind": "method",
"static": false,
"variation": null,
@@ -19327,12 +19303,12 @@
"longname": "src/tablefilter.js~TableFilter#validateAllRows",
"access": null,
"description": "Validate all filterable rows",
- "lineNumber": 1822,
+ "lineNumber": 1817,
"params": [],
"generator": false
},
{
- "__docId__": 972,
+ "__docId__": 970,
"kind": "member",
"static": false,
"variation": null,
@@ -19341,7 +19317,7 @@
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
- "lineNumber": 1826,
+ "lineNumber": 1821,
"undocument": true,
"type": {
"types": [
@@ -19350,7 +19326,7 @@
}
},
{
- "__docId__": 973,
+ "__docId__": 971,
"kind": "method",
"static": false,
"variation": null,
@@ -19359,7 +19335,7 @@
"longname": "src/tablefilter.js~TableFilter#setFilterValue",
"access": null,
"description": "Set search value to a given filter",
- "lineNumber": 1837,
+ "lineNumber": 1832,
"params": [
{
"nullable": null,
@@ -19385,7 +19361,7 @@
"generator": false
},
{
- "__docId__": 974,
+ "__docId__": 972,
"kind": "method",
"static": false,
"variation": null,
@@ -19394,7 +19370,7 @@
"longname": "src/tablefilter.js~TableFilter#setColWidths",
"access": null,
"description": "Set them columns' widths as per configuration",
- "lineNumber": 1885,
+ "lineNumber": 1880,
"params": [
{
"nullable": null,
@@ -19410,7 +19386,7 @@
"generator": false
},
{
- "__docId__": 975,
+ "__docId__": 973,
"kind": "method",
"static": false,
"variation": null,
@@ -19419,12 +19395,12 @@
"longname": "src/tablefilter.js~TableFilter#enforceVisibility",
"access": null,
"description": "Makes defined rows always visible",
- "lineNumber": 1918,
+ "lineNumber": 1913,
"params": [],
"generator": false
},
{
- "__docId__": 976,
+ "__docId__": 974,
"kind": "method",
"static": false,
"variation": null,
@@ -19433,12 +19409,12 @@
"longname": "src/tablefilter.js~TableFilter#clearFilters",
"access": null,
"description": "Clear all the filters' values",
- "lineNumber": 1935,
+ "lineNumber": 1930,
"params": [],
"generator": false
},
{
- "__docId__": 977,
+ "__docId__": 975,
"kind": "method",
"static": false,
"variation": null,
@@ -19447,12 +19423,12 @@
"longname": "src/tablefilter.js~TableFilter#clearActiveColumns",
"access": null,
"description": "Clears filtered columns visual indicator (background color)",
- "lineNumber": 1960,
+ "lineNumber": 1955,
"params": [],
"generator": false
},
{
- "__docId__": 978,
+ "__docId__": 976,
"kind": "method",
"static": false,
"variation": null,
@@ -19461,7 +19437,7 @@
"longname": "src/tablefilter.js~TableFilter#markActiveColumn",
"access": null,
"description": "Mark currently filtered column",
- "lineNumber": 1970,
+ "lineNumber": 1965,
"params": [
{
"nullable": null,
@@ -19477,7 +19453,7 @@
"generator": false
},
{
- "__docId__": 979,
+ "__docId__": 977,
"kind": "method",
"static": false,
"variation": null,
@@ -19486,7 +19462,7 @@
"longname": "src/tablefilter.js~TableFilter#getActiveFilterId",
"access": null,
"description": "Return the ID of the current active filter",
- "lineNumber": 1988,
+ "lineNumber": 1983,
"unknown": [
{
"tagName": "@returns",
@@ -19505,7 +19481,7 @@
"generator": false
},
{
- "__docId__": 980,
+ "__docId__": 978,
"kind": "method",
"static": false,
"variation": null,
@@ -19514,7 +19490,7 @@
"longname": "src/tablefilter.js~TableFilter#setActiveFilterId",
"access": null,
"description": "Set the ID of the current active filter",
- "lineNumber": 1996,
+ "lineNumber": 1991,
"params": [
{
"nullable": null,
@@ -19530,7 +19506,7 @@
"generator": false
},
{
- "__docId__": 981,
+ "__docId__": 979,
"kind": "member",
"static": false,
"variation": null,
@@ -19539,7 +19515,7 @@
"longname": "src/tablefilter.js~TableFilter#activeFilterId",
"access": null,
"description": null,
- "lineNumber": 1997,
+ "lineNumber": 1992,
"undocument": true,
"type": {
"types": [
@@ -19548,7 +19524,7 @@
}
},
{
- "__docId__": 982,
+ "__docId__": 980,
"kind": "method",
"static": false,
"variation": null,
@@ -19557,7 +19533,7 @@
"longname": "src/tablefilter.js~TableFilter#getColumnIndexFromFilterId",
"access": null,
"description": "Return the column index for a given filter ID",
- "lineNumber": 2005,
+ "lineNumber": 2000,
"unknown": [
{
"tagName": "@returns",
@@ -19589,7 +19565,7 @@
"generator": false
},
{
- "__docId__": 983,
+ "__docId__": 981,
"kind": "method",
"static": false,
"variation": null,
@@ -19598,7 +19574,7 @@
"longname": "src/tablefilter.js~TableFilter#activateFilter",
"access": null,
"description": "Make specified column's filter active",
- "lineNumber": 2015,
+ "lineNumber": 2010,
"params": [
{
"nullable": null,
@@ -19614,7 +19590,7 @@
"generator": false
},
{
- "__docId__": 984,
+ "__docId__": 982,
"kind": "method",
"static": false,
"variation": null,
@@ -19623,12 +19599,12 @@
"longname": "src/tablefilter.js~TableFilter#linkFilters",
"access": null,
"description": "Refresh the filters subject to linking ('select', 'multiple',\n'checklist' type)",
- "lineNumber": 2026,
+ "lineNumber": 2021,
"params": [],
"generator": false
},
{
- "__docId__": 985,
+ "__docId__": 983,
"kind": "method",
"static": false,
"variation": null,
@@ -19637,7 +19613,7 @@
"longname": "src/tablefilter.js~TableFilter#isExactMatch",
"access": null,
"description": "Determines if passed filter column implements exact query match",
- "lineNumber": 2076,
+ "lineNumber": 2071,
"params": [
{
"nullable": null,
@@ -19661,7 +19637,7 @@
"generator": false
},
{
- "__docId__": 986,
+ "__docId__": 984,
"kind": "method",
"static": false,
"variation": null,
@@ -19670,7 +19646,7 @@
"longname": "src/tablefilter.js~TableFilter#isImported",
"access": null,
"description": "Check if passed script or stylesheet is already imported",
- "lineNumber": 2088,
+ "lineNumber": 2083,
"params": [
{
"nullable": null,
@@ -19704,7 +19680,7 @@
"generator": false
},
{
- "__docId__": 987,
+ "__docId__": 985,
"kind": "method",
"static": false,
"variation": null,
@@ -19713,7 +19689,7 @@
"longname": "src/tablefilter.js~TableFilter#import",
"access": null,
"description": "Import script or stylesheet",
- "lineNumber": 2112,
+ "lineNumber": 2107,
"params": [
{
"nullable": null,
@@ -19759,7 +19735,7 @@
"generator": false
},
{
- "__docId__": 988,
+ "__docId__": 986,
"kind": "method",
"static": false,
"variation": null,
@@ -19768,7 +19744,7 @@
"longname": "src/tablefilter.js~TableFilter#isInitialized",
"access": null,
"description": "Check if table has filters grid",
- "lineNumber": 2156,
+ "lineNumber": 2151,
"params": [],
"return": {
"nullable": null,
@@ -19781,7 +19757,7 @@
"generator": false
},
{
- "__docId__": 989,
+ "__docId__": 987,
"kind": "method",
"static": false,
"variation": null,
@@ -19790,7 +19766,7 @@
"longname": "src/tablefilter.js~TableFilter#getFiltersId",
"access": null,
"description": "Get list of filter IDs",
- "lineNumber": 2164,
+ "lineNumber": 2159,
"params": [],
"return": {
"nullable": null,
@@ -19803,7 +19779,7 @@
"generator": false
},
{
- "__docId__": 990,
+ "__docId__": 988,
"kind": "method",
"static": false,
"variation": null,
@@ -19812,7 +19788,7 @@
"longname": "src/tablefilter.js~TableFilter#getValidRows",
"access": null,
"description": "Get filtered (valid) rows indexes",
- "lineNumber": 2173,
+ "lineNumber": 2168,
"params": [
{
"nullable": null,
@@ -19836,7 +19812,7 @@
"generator": false
},
{
- "__docId__": 991,
+ "__docId__": 989,
"kind": "member",
"static": false,
"variation": null,
@@ -19845,7 +19821,7 @@
"longname": "src/tablefilter.js~TableFilter#validRowsIndex",
"access": null,
"description": null,
- "lineNumber": 2179,
+ "lineNumber": 2174,
"undocument": true,
"type": {
"types": [
@@ -19854,7 +19830,7 @@
}
},
{
- "__docId__": 992,
+ "__docId__": 990,
"kind": "method",
"static": false,
"variation": null,
@@ -19863,7 +19839,51 @@
"longname": "src/tablefilter.js~TableFilter#getFiltersRowIndex",
"access": null,
"description": "Get the index of the row containing the filters",
- "lineNumber": 2200,
+ "lineNumber": 2195,
+ "params": [],
+ "return": {
+ "nullable": null,
+ "types": [
+ "Number"
+ ],
+ "spread": false,
+ "description": ""
+ },
+ "generator": false
+ },
+ {
+ "__docId__": 991,
+ "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": 2203,
+ "params": [],
+ "return": {
+ "nullable": null,
+ "types": [
+ "Number"
+ ],
+ "spread": false,
+ "description": ""
+ },
+ "generator": false
+ },
+ {
+ "__docId__": 992,
+ "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": 2212,
"params": [],
"return": {
"nullable": null,
@@ -19880,12 +19900,12 @@
"kind": "method",
"static": false,
"variation": null,
- "name": "getHeadersRowIndex",
+ "name": "getLastRowIndex",
"memberof": "src/tablefilter.js~TableFilter",
- "longname": "src/tablefilter.js~TableFilter#getHeadersRowIndex",
+ "longname": "src/tablefilter.js~TableFilter#getLastRowIndex",
"access": null,
- "description": "Get the index of the headers row",
- "lineNumber": 2208,
+ "description": "Get the index of the last row",
+ "lineNumber": 2220,
"params": [],
"return": {
"nullable": null,
@@ -19902,56 +19922,12 @@
"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": 2217,
- "params": [],
- "return": {
- "nullable": null,
- "types": [
- "Number"
- ],
- "spread": false,
- "description": ""
- },
- "generator": false
- },
- {
- "__docId__": 995,
- "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": 2225,
- "params": [],
- "return": {
- "nullable": null,
- "types": [
- "Number"
- ],
- "spread": false,
- "description": ""
- },
- "generator": false
- },
- {
- "__docId__": 996,
- "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": 2235,
+ "lineNumber": 2230,
"params": [
{
"nullable": null,
@@ -19975,7 +19951,7 @@
"generator": false
},
{
- "__docId__": 997,
+ "__docId__": 995,
"kind": "method",
"static": false,
"variation": null,
@@ -19984,7 +19960,7 @@
"longname": "src/tablefilter.js~TableFilter#getHeadersText",
"access": null,
"description": "Return the list of headers' text",
- "lineNumber": 2260,
+ "lineNumber": 2255,
"params": [
{
"nullable": null,
@@ -20008,7 +19984,7 @@
"generator": false
},
{
- "__docId__": 998,
+ "__docId__": 996,
"kind": "method",
"static": false,
"variation": null,
@@ -20017,7 +19993,7 @@
"longname": "src/tablefilter.js~TableFilter#getFilterType",
"access": null,
"description": "Return the filter type for a specified column",
- "lineNumber": 2280,
+ "lineNumber": 2275,
"params": [
{
"nullable": null,
@@ -20041,7 +20017,7 @@
"generator": false
},
{
- "__docId__": 999,
+ "__docId__": 997,
"kind": "method",
"static": false,
"variation": null,
@@ -20050,7 +20026,7 @@
"longname": "src/tablefilter.js~TableFilter#getFilterableRowsNb",
"access": null,
"description": "Get the total number of filterable rows",
- "lineNumber": 2289,
+ "lineNumber": 2284,
"params": [],
"return": {
"nullable": null,
@@ -20063,7 +20039,7 @@
"generator": false
},
{
- "__docId__": 1000,
+ "__docId__": 998,
"kind": "method",
"static": false,
"variation": null,
@@ -20072,7 +20048,7 @@
"longname": "src/tablefilter.js~TableFilter#getValidRowsNb",
"access": null,
"description": "Return the total number of valid rows",
- "lineNumber": 2298,
+ "lineNumber": 2293,
"unknown": [
{
"tagName": "@returns",
@@ -20104,7 +20080,7 @@
"generator": false
},
{
- "__docId__": 1001,
+ "__docId__": 999,
"kind": "method",
"static": false,
"variation": null,
@@ -20113,7 +20089,7 @@
"longname": "src/tablefilter.js~TableFilter#config",
"access": null,
"description": "Get the configuration object (literal object)",
- "lineNumber": 2306,
+ "lineNumber": 2301,
"params": [],
"return": {
"nullable": null,
@@ -20126,7 +20102,7 @@
"generator": false
},
{
- "__docId__": 1002,
+ "__docId__": 1000,
"kind": "file",
"static": true,
"variation": null,
@@ -20139,7 +20115,7 @@
"content": "\n/**\n * Types utilities\n */\n\nconst UNDEFINED = void 0;\n\n/**\n * Check passed argument is an object\n * @param {Object} obj\n * @return {Boolean}\n */\nexport const isObj =\n obj => Object.prototype.toString.call(obj) === '[object Object]';\n\n/**\n * Check passed argument is a function\n * @param {Function} obj\n * @return {Boolean}\n */\nexport const isFn =\n obj => Object.prototype.toString.call(obj) === '[object Function]';\n\n/**\n * Check passed argument is an array\n * @param {Array} obj\n * @return {Boolean}\n */\nexport const isArray =\n obj => Object.prototype.toString.call(obj) === '[object Array]';\n\n/**\n * Check passed argument is a string\n * @param {String} obj objue\n * @returns {Boolean}\n */\nexport const isString =\n obj => Object.prototype.toString.call(obj) === '[object String]';\n\n/**\n * Check passed argument is a number\n * @param {Number} obj\n * @returns {Boolean}\n */\nexport const isNumber =\n obj => Object.prototype.toString.call(obj) === '[object Number]';\n\n/**\n * Check passed argument is undefined\n * @param {Any} obj\n * @return {Boolean}\n */\nexport const isUndef = obj => obj === UNDEFINED;\n\n/**\n * Check passed argument is null\n * @param {Any} obj\n * @return {Boolean}\n */\nexport const isNull = obj => obj === null;\n\n/**\n * Check passed argument is empty (undefined, null or empty string)\n * @param {Any} obj\n * @return {Boolean}\n */\nexport const isEmpty = obj => isUndef(obj) || isNull(obj) || obj.length === 0;\n"
},
{
- "__docId__": 1003,
+ "__docId__": 1001,
"kind": "variable",
"static": true,
"variation": null,
@@ -20159,7 +20135,7 @@
}
},
{
- "__docId__": 1004,
+ "__docId__": 1002,
"kind": "variable",
"static": true,
"variation": null,
@@ -20199,7 +20175,7 @@
}
},
{
- "__docId__": 1005,
+ "__docId__": 1003,
"kind": "variable",
"static": true,
"variation": null,
@@ -20239,7 +20215,7 @@
}
},
{
- "__docId__": 1006,
+ "__docId__": 1004,
"kind": "variable",
"static": true,
"variation": null,
@@ -20279,7 +20255,7 @@
}
},
{
- "__docId__": 1007,
+ "__docId__": 1005,
"kind": "variable",
"static": true,
"variation": null,
@@ -20325,7 +20301,7 @@
}
},
{
- "__docId__": 1008,
+ "__docId__": 1006,
"kind": "variable",
"static": true,
"variation": null,
@@ -20371,7 +20347,7 @@
}
},
{
- "__docId__": 1009,
+ "__docId__": 1007,
"kind": "variable",
"static": true,
"variation": null,
@@ -20411,7 +20387,7 @@
}
},
{
- "__docId__": 1010,
+ "__docId__": 1008,
"kind": "variable",
"static": true,
"variation": null,
@@ -20451,7 +20427,7 @@
}
},
{
- "__docId__": 1011,
+ "__docId__": 1009,
"kind": "variable",
"static": true,
"variation": null,
@@ -20491,7 +20467,7 @@
}
},
{
- "__docId__": 1013,
+ "__docId__": 1011,
"kind": "external",
"static": true,
"variation": null,
@@ -20504,7 +20480,7 @@
"builtinExternal": true
},
{
- "__docId__": 1014,
+ "__docId__": 1012,
"kind": "external",
"static": true,
"variation": null,
@@ -20517,7 +20493,7 @@
"builtinExternal": true
},
{
- "__docId__": 1015,
+ "__docId__": 1013,
"kind": "external",
"static": true,
"variation": null,
@@ -20530,7 +20506,7 @@
"builtinExternal": true
},
{
- "__docId__": 1016,
+ "__docId__": 1014,
"kind": "external",
"static": true,
"variation": null,
@@ -20543,7 +20519,7 @@
"builtinExternal": true
},
{
- "__docId__": 1017,
+ "__docId__": 1015,
"kind": "external",
"static": true,
"variation": null,
@@ -20556,7 +20532,7 @@
"builtinExternal": true
},
{
- "__docId__": 1018,
+ "__docId__": 1016,
"kind": "external",
"static": true,
"variation": null,
@@ -20569,7 +20545,7 @@
"builtinExternal": true
},
{
- "__docId__": 1019,
+ "__docId__": 1017,
"kind": "external",
"static": true,
"variation": null,
@@ -20582,7 +20558,7 @@
"builtinExternal": true
},
{
- "__docId__": 1020,
+ "__docId__": 1018,
"kind": "external",
"static": true,
"variation": null,
@@ -20595,7 +20571,7 @@
"builtinExternal": true
},
{
- "__docId__": 1021,
+ "__docId__": 1019,
"kind": "external",
"static": true,
"variation": null,
@@ -20608,7 +20584,7 @@
"builtinExternal": true
},
{
- "__docId__": 1022,
+ "__docId__": 1020,
"kind": "external",
"static": true,
"variation": null,
@@ -20621,7 +20597,7 @@
"builtinExternal": true
},
{
- "__docId__": 1023,
+ "__docId__": 1021,
"kind": "external",
"static": true,
"variation": null,
@@ -20634,7 +20610,7 @@
"builtinExternal": true
},
{
- "__docId__": 1024,
+ "__docId__": 1022,
"kind": "external",
"static": true,
"variation": null,
@@ -20647,7 +20623,7 @@
"builtinExternal": true
},
{
- "__docId__": 1025,
+ "__docId__": 1023,
"kind": "external",
"static": true,
"variation": null,
@@ -20660,7 +20636,7 @@
"builtinExternal": true
},
{
- "__docId__": 1026,
+ "__docId__": 1024,
"kind": "external",
"static": true,
"variation": null,
@@ -20673,7 +20649,7 @@
"builtinExternal": true
},
{
- "__docId__": 1027,
+ "__docId__": 1025,
"kind": "external",
"static": true,
"variation": null,
@@ -20686,7 +20662,7 @@
"builtinExternal": true
},
{
- "__docId__": 1028,
+ "__docId__": 1026,
"kind": "external",
"static": true,
"variation": null,
@@ -20699,7 +20675,7 @@
"builtinExternal": true
},
{
- "__docId__": 1029,
+ "__docId__": 1027,
"kind": "external",
"static": true,
"variation": null,
@@ -20712,7 +20688,7 @@
"builtinExternal": true
},
{
- "__docId__": 1030,
+ "__docId__": 1028,
"kind": "external",
"static": true,
"variation": null,
@@ -20725,7 +20701,7 @@
"builtinExternal": true
},
{
- "__docId__": 1031,
+ "__docId__": 1029,
"kind": "external",
"static": true,
"variation": null,
@@ -20738,7 +20714,7 @@
"builtinExternal": true
},
{
- "__docId__": 1032,
+ "__docId__": 1030,
"kind": "external",
"static": true,
"variation": null,
@@ -20751,7 +20727,7 @@
"builtinExternal": true
},
{
- "__docId__": 1033,
+ "__docId__": 1031,
"kind": "external",
"static": true,
"variation": null,
@@ -20764,7 +20740,7 @@
"builtinExternal": true
},
{
- "__docId__": 1034,
+ "__docId__": 1032,
"kind": "external",
"static": true,
"variation": null,
@@ -20777,7 +20753,7 @@
"builtinExternal": true
},
{
- "__docId__": 1035,
+ "__docId__": 1033,
"kind": "external",
"static": true,
"variation": null,
@@ -20790,7 +20766,7 @@
"builtinExternal": true
},
{
- "__docId__": 1036,
+ "__docId__": 1034,
"kind": "external",
"static": true,
"variation": null,
@@ -20803,7 +20779,7 @@
"builtinExternal": true
},
{
- "__docId__": 1037,
+ "__docId__": 1035,
"kind": "external",
"static": true,
"variation": null,
@@ -20816,7 +20792,7 @@
"builtinExternal": true
},
{
- "__docId__": 1038,
+ "__docId__": 1036,
"kind": "external",
"static": true,
"variation": null,
@@ -20829,7 +20805,7 @@
"builtinExternal": true
},
{
- "__docId__": 1039,
+ "__docId__": 1037,
"kind": "external",
"static": true,
"variation": null,
@@ -20842,7 +20818,7 @@
"builtinExternal": true
},
{
- "__docId__": 1040,
+ "__docId__": 1038,
"kind": "external",
"static": true,
"variation": null,
@@ -20855,7 +20831,7 @@
"builtinExternal": true
},
{
- "__docId__": 1041,
+ "__docId__": 1039,
"kind": "external",
"static": true,
"variation": null,
@@ -20868,7 +20844,7 @@
"builtinExternal": true
},
{
- "__docId__": 1042,
+ "__docId__": 1040,
"kind": "external",
"static": true,
"variation": null,
@@ -20881,7 +20857,7 @@
"builtinExternal": true
},
{
- "__docId__": 1043,
+ "__docId__": 1041,
"kind": "external",
"static": true,
"variation": null,
@@ -20894,7 +20870,7 @@
"builtinExternal": true
},
{
- "__docId__": 1044,
+ "__docId__": 1042,
"kind": "external",
"static": true,
"variation": null,
@@ -20907,7 +20883,7 @@
"builtinExternal": true
},
{
- "__docId__": 1045,
+ "__docId__": 1043,
"kind": "external",
"static": true,
"variation": null,
@@ -20920,7 +20896,7 @@
"builtinExternal": true
},
{
- "__docId__": 1046,
+ "__docId__": 1044,
"kind": "external",
"static": true,
"variation": null,
@@ -20933,7 +20909,7 @@
"builtinExternal": true
},
{
- "__docId__": 1047,
+ "__docId__": 1045,
"kind": "external",
"static": true,
"variation": null,
@@ -20946,7 +20922,7 @@
"builtinExternal": true
},
{
- "__docId__": 1048,
+ "__docId__": 1046,
"kind": "external",
"static": true,
"variation": null,
@@ -20959,7 +20935,7 @@
"builtinExternal": true
},
{
- "__docId__": 1049,
+ "__docId__": 1047,
"kind": "external",
"static": true,
"variation": null,
@@ -20972,7 +20948,7 @@
"builtinExternal": true
},
{
- "__docId__": 1050,
+ "__docId__": 1048,
"kind": "external",
"static": true,
"variation": null,
@@ -20985,7 +20961,7 @@
"builtinExternal": true
},
{
- "__docId__": 1051,
+ "__docId__": 1049,
"kind": "external",
"static": true,
"variation": null,
@@ -20998,7 +20974,7 @@
"builtinExternal": true
},
{
- "__docId__": 1052,
+ "__docId__": 1050,
"kind": "external",
"static": true,
"variation": null,
@@ -21011,7 +20987,7 @@
"builtinExternal": true
},
{
- "__docId__": 1053,
+ "__docId__": 1051,
"kind": "external",
"static": true,
"variation": null,
@@ -21024,7 +21000,7 @@
"builtinExternal": true
},
{
- "__docId__": 1054,
+ "__docId__": 1052,
"kind": "external",
"static": true,
"variation": null,
@@ -21037,7 +21013,7 @@
"builtinExternal": true
},
{
- "__docId__": 1055,
+ "__docId__": 1053,
"kind": "external",
"static": true,
"variation": null,
@@ -21050,7 +21026,7 @@
"builtinExternal": true
},
{
- "__docId__": 1056,
+ "__docId__": 1054,
"kind": "external",
"static": true,
"variation": null,
@@ -21063,7 +21039,7 @@
"builtinExternal": true
},
{
- "__docId__": 1057,
+ "__docId__": 1055,
"kind": "external",
"static": true,
"variation": null,
@@ -21076,7 +21052,7 @@
"builtinExternal": true
},
{
- "__docId__": 1058,
+ "__docId__": 1056,
"kind": "external",
"static": true,
"variation": null,
@@ -21089,7 +21065,7 @@
"builtinExternal": true
},
{
- "__docId__": 1059,
+ "__docId__": 1057,
"kind": "external",
"static": true,
"variation": null,
@@ -21102,7 +21078,7 @@
"builtinExternal": true
},
{
- "__docId__": 1061,
+ "__docId__": 1059,
"kind": "external",
"static": true,
"variation": null,
@@ -21115,7 +21091,7 @@
"builtinExternal": true
},
{
- "__docId__": 1062,
+ "__docId__": 1060,
"kind": "external",
"static": true,
"variation": null,
@@ -21128,7 +21104,7 @@
"builtinExternal": true
},
{
- "__docId__": 1063,
+ "__docId__": 1061,
"kind": "external",
"static": true,
"variation": null,
@@ -21141,7 +21117,7 @@
"builtinExternal": true
},
{
- "__docId__": 1064,
+ "__docId__": 1062,
"kind": "external",
"static": true,
"variation": null,
@@ -21154,7 +21130,7 @@
"builtinExternal": true
},
{
- "__docId__": 1065,
+ "__docId__": 1063,
"kind": "external",
"static": true,
"variation": null,
@@ -21167,7 +21143,7 @@
"builtinExternal": true
},
{
- "__docId__": 1066,
+ "__docId__": 1064,
"kind": "external",
"static": true,
"variation": null,
@@ -21180,7 +21156,7 @@
"builtinExternal": true
},
{
- "__docId__": 1067,
+ "__docId__": 1065,
"kind": "external",
"static": true,
"variation": null,
@@ -21193,7 +21169,7 @@
"builtinExternal": true
},
{
- "__docId__": 1068,
+ "__docId__": 1066,
"kind": "external",
"static": true,
"variation": null,
diff --git a/docs/file/src/array.js.html b/docs/file/src/array.js.html
index a5c80a4c..1f526e42 100644
--- a/docs/file/src/array.js.html
+++ b/docs/file/src/array.js.html
@@ -3,7 +3,7 @@
- src/array.js | tablefilter v0.2.33 API Document
+ src/array.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/const.js.html b/docs/file/src/const.js.html
index 403ce36c..e9c8aced 100644
--- a/docs/file/src/const.js.html
+++ b/docs/file/src/const.js.html
@@ -3,7 +3,7 @@
- src/const.js | tablefilter v0.2.33 API Document
+ src/const.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/cookie.js.html b/docs/file/src/cookie.js.html
index 6056e6fe..81eed3eb 100644
--- a/docs/file/src/cookie.js.html
+++ b/docs/file/src/cookie.js.html
@@ -3,7 +3,7 @@
- src/cookie.js | tablefilter v0.2.33 API Document
+ src/cookie.js | tablefilter v0.2.34 API Document
@@ -109,31 +109,35 @@
src/cookie.js
- /**
+import {root} from './root';
+
+/**
* Cookie utilities
*/
+const doc = root.document;
+
export default {
- write(name, value, hours){
+ write(name, value, hours) {
let expire = '';
- if(hours){
+ if (hours) {
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = '; expires=' + expire.toGMTString();
}
- document.cookie = name + '=' + escape(value) + expire;
+ doc.cookie = name + '=' + escape(value) + expire;
},
- read(name){
+ read(name) {
let cookieValue = '',
search = name + '=';
- if(document.cookie.length > 0){
- let cookie = document.cookie,
+ if (doc.cookie.length > 0) {
+ let cookie = doc.cookie,
offset = cookie.indexOf(search);
- if(offset !== -1){
+ if (offset !== -1) {
offset += search.length;
let end = cookie.indexOf(';', offset);
- if(end === -1){
+ if (end === -1) {
end = cookie.length;
}
cookieValue = unescape(cookie.substring(offset, end));
@@ -142,12 +146,12 @@ export default {
return cookieValue;
},
- remove(name){
+ remove(name) {
this.write(name, '', -1);
},
- valueToArray(name, separator){
- if(!separator){
+ valueToArray(name, separator) {
+ if (!separator) {
separator = ',';
}
//reads the cookie
@@ -157,8 +161,8 @@ export default {
return arr;
},
- getValueByIndex(name, index, separator){
- if(!separator){
+ getValueByIndex(name, index, separator) {
+ if (!separator) {
separator = ',';
}
//reads the cookie
diff --git a/docs/file/src/date.js.html b/docs/file/src/date.js.html
index 0ed98ffe..5415b172 100644
--- a/docs/file/src/date.js.html
+++ b/docs/file/src/date.js.html
@@ -3,7 +3,7 @@
- src/date.js | tablefilter v0.2.33 API Document
+ src/date.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/dom.js.html b/docs/file/src/dom.js.html
index 1eb30203..569c290d 100644
--- a/docs/file/src/dom.js.html
+++ b/docs/file/src/dom.js.html
@@ -3,7 +3,7 @@
- src/dom.js | tablefilter v0.2.33 API Document
+ src/dom.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/emitter.js.html b/docs/file/src/emitter.js.html
index 616671cc..24bbe2f9 100644
--- a/docs/file/src/emitter.js.html
+++ b/docs/file/src/emitter.js.html
@@ -3,7 +3,7 @@
- src/emitter.js | tablefilter v0.2.33 API Document
+ src/emitter.js | tablefilter v0.2.34 API Document
@@ -113,6 +113,9 @@
* Event emitter class
*/
export class Emitter {
+ /**
+ * Creates an instance of Emitter.
+ */
constructor() {
/**
* Events object
@@ -127,7 +130,7 @@ export class Emitter {
* @param {Function} fn Function invoked when event is emitted
*/
on(evts, fn) {
- evts.forEach((evt)=> {
+ evts.forEach((evt) => {
this.events[evt] = this.events[evt] || [];
this.events[evt].push(fn);
});
@@ -139,8 +142,8 @@ export class Emitter {
* @param {Function} fn Function invoked when event is emitted
*/
off(evts, fn) {
- evts.forEach((evt)=> {
- if(evt in this.events) {
+ evts.forEach((evt) => {
+ if (evt in this.events) {
this.events[evt].splice(this.events[evt].indexOf(fn), 1);
}
});
@@ -152,8 +155,8 @@ export class Emitter {
* the invoked function
*/
emit(evt /*, args...*/) {
- if(evt in this.events) {
- for(let i = 0; i < this.events[evt].length; i++) {
+ if (evt in this.events) {
+ for (let i = 0; i < this.events[evt].length; i++) {
this.events[evt][i].apply(this, [].slice.call(arguments, 1));
}
}
diff --git a/docs/file/src/event.js.html b/docs/file/src/event.js.html
index 6307bec7..ab25a51c 100644
--- a/docs/file/src/event.js.html
+++ b/docs/file/src/event.js.html
@@ -3,7 +3,7 @@
- src/event.js | tablefilter v0.2.33 API Document
+ src/event.js | tablefilter v0.2.34 API Document
@@ -116,52 +116,96 @@
*/
export default {
- add(obj, type, func, capture){
- if(obj.addEventListener){
+ /**
+ * Add event handler for specified event on passed element
+ *
+ * @param {DOMElement} obj Element
+ * @param {String} type Event type
+ * @param {Function} Handler
+ * @param {Boolean} capture Specifiy whether the event should be executed in
+ * the capturing or in the bubbling phase
+ */
+ add(obj, type, func, capture) {
+ if (obj.addEventListener) {
obj.addEventListener(type, func, capture);
}
- else if(obj.attachEvent){
- obj.attachEvent('on'+type, func);
+ else if (obj.attachEvent) {
+ obj.attachEvent('on' + type, func);
} else {
- obj['on'+type] = func;
+ obj['on' + type] = func;
}
},
- remove(obj, type, func, capture){
- if(obj.detachEvent){
- obj.detachEvent('on'+type,func);
+ /**
+ * Remove event handler for specified event on passed element
+ *
+ * @param {DOMElement} obj Element
+ * @param {String} type Event type
+ * @param {Function} Handler
+ * @param {Boolean} capture Specifiy whether the event should be executed in
+ * the capturing or in the bubbling phase
+ */
+ remove(obj, type, func, capture) {
+ if (obj.detachEvent) {
+ obj.detachEvent('on' + type, func);
}
- else if(obj.removeEventListener){
+ else if (obj.removeEventListener) {
obj.removeEventListener(type, func, capture);
} else {
- obj['on'+type] = null;
+ obj['on' + type] = null;
}
},
- stop(evt){
- if(!evt){
+ /**
+ * Prevents further propagation of the current event in the bubbling phase
+ *
+ * @param {Event} evt Event on the DOM
+ */
+ stop(evt) {
+ if (!evt) {
evt = root.event;
}
- if(evt.stopPropagation){
+ if (evt.stopPropagation) {
evt.stopPropagation();
} else {
evt.cancelBubble = true;
}
},
- cancel(evt){
- if(!evt){
+ /**
+ * Cancels the event if it is cancelable, without stopping further
+ * propagation of the event.
+ *
+ * @param {Event} evt Event on the DOM
+ */
+ cancel(evt) {
+ if (!evt) {
evt = root.event;
}
- if(evt.preventDefault) {
+ if (evt.preventDefault) {
evt.preventDefault();
} else {
evt.returnValue = false;
}
},
- target(evt){
- return (evt && evt.target) || (root.event && root.event.srcElement);
+ /**
+ * Reference to the object that dispatched the event
+ *
+ * @param {Event} evt Event on the DOM
+ * @returns {DOMElement}
+ */
+ target(evt) {
+ if (!evt) {
+ evt = root.event;
+ }
+ return evt.target || evt.srcElement;
},
- keyCode(evt){
+ /**
+ * Returns the Unicode value of pressed key
+ *
+ * @param {Event} evt Event on the DOM
+ * @returns {Number}
+ */
+ keyCode(evt) {
return evt.charCode ? evt.charCode :
- (evt.keyCode ? evt.keyCode: (evt.which ? evt.which : 0));
+ (evt.keyCode ? evt.keyCode : (evt.which ? evt.which : 0));
}
};
diff --git a/docs/file/src/extensions/advancedGrid/adapterEzEditTable.js.html b/docs/file/src/extensions/advancedGrid/adapterEzEditTable.js.html
index 658e7e29..b1179a39 100644
--- a/docs/file/src/extensions/advancedGrid/adapterEzEditTable.js.html
+++ b/docs/file/src/extensions/advancedGrid/adapterEzEditTable.js.html
@@ -3,7 +3,7 @@
- src/extensions/advancedGrid/adapterEzEditTable.js | tablefilter v0.2.33 API Document
+ src/extensions/advancedGrid/adapterEzEditTable.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/extensions/advancedGrid/advancedGrid.js.html b/docs/file/src/extensions/advancedGrid/advancedGrid.js.html
index de1d90c6..e3160182 100644
--- a/docs/file/src/extensions/advancedGrid/advancedGrid.js.html
+++ b/docs/file/src/extensions/advancedGrid/advancedGrid.js.html
@@ -3,7 +3,7 @@
- src/extensions/advancedGrid/advancedGrid.js | tablefilter v0.2.33 API Document
+ src/extensions/advancedGrid/advancedGrid.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/extensions/colOps/colOps.js.html b/docs/file/src/extensions/colOps/colOps.js.html
index d74e587f..d9554ae6 100644
--- a/docs/file/src/extensions/colOps/colOps.js.html
+++ b/docs/file/src/extensions/colOps/colOps.js.html
@@ -3,7 +3,7 @@
- src/extensions/colOps/colOps.js | tablefilter v0.2.33 API Document
+ src/extensions/colOps/colOps.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/extensions/colsVisibility/colsVisibility.js.html b/docs/file/src/extensions/colsVisibility/colsVisibility.js.html
index dbe844be..fed07446 100644
--- a/docs/file/src/extensions/colsVisibility/colsVisibility.js.html
+++ b/docs/file/src/extensions/colsVisibility/colsVisibility.js.html
@@ -3,7 +3,7 @@
- src/extensions/colsVisibility/colsVisibility.js | tablefilter v0.2.33 API Document
+ src/extensions/colsVisibility/colsVisibility.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/extensions/filtersVisibility/filtersVisibility.js.html b/docs/file/src/extensions/filtersVisibility/filtersVisibility.js.html
index be1b8976..9204628b 100644
--- a/docs/file/src/extensions/filtersVisibility/filtersVisibility.js.html
+++ b/docs/file/src/extensions/filtersVisibility/filtersVisibility.js.html
@@ -3,7 +3,7 @@
- src/extensions/filtersVisibility/filtersVisibility.js | tablefilter v0.2.33 API Document
+ src/extensions/filtersVisibility/filtersVisibility.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/extensions/sort/adapterSortabletable.js.html b/docs/file/src/extensions/sort/adapterSortabletable.js.html
index 4d55eff4..4a7d046c 100644
--- a/docs/file/src/extensions/sort/adapterSortabletable.js.html
+++ b/docs/file/src/extensions/sort/adapterSortabletable.js.html
@@ -3,7 +3,7 @@
- src/extensions/sort/adapterSortabletable.js | tablefilter v0.2.33 API Document
+ src/extensions/sort/adapterSortabletable.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/extensions/sort/sort.js.html b/docs/file/src/extensions/sort/sort.js.html
index cb58923c..62309a74 100644
--- a/docs/file/src/extensions/sort/sort.js.html
+++ b/docs/file/src/extensions/sort/sort.js.html
@@ -3,7 +3,7 @@
- src/extensions/sort/sort.js | tablefilter v0.2.33 API Document
+ src/extensions/sort/sort.js | tablefilter v0.2.34 API Document
@@ -112,7 +112,7 @@
import AdapterSortableTable from './adapterSortabletable';
import {root} from '../../root';
-if(!root.SortableTable){
+if (!root.SortableTable) {
require('script!sortabletable');
}
diff --git a/docs/file/src/feature.js.html b/docs/file/src/feature.js.html
index fe4aa16c..cf2aa5ec 100644
--- a/docs/file/src/feature.js.html
+++ b/docs/file/src/feature.js.html
@@ -3,7 +3,7 @@
- src/feature.js | tablefilter v0.2.33 API Document
+ src/feature.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/helpers.js.html b/docs/file/src/helpers.js.html
index 5089f6be..6e6c2467 100644
--- a/docs/file/src/helpers.js.html
+++ b/docs/file/src/helpers.js.html
@@ -3,7 +3,7 @@
- src/helpers.js | tablefilter v0.2.33 API Document
+ src/helpers.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/alternateRows.js.html b/docs/file/src/modules/alternateRows.js.html
index 0fc2e935..c9eb4e9f 100644
--- a/docs/file/src/modules/alternateRows.js.html
+++ b/docs/file/src/modules/alternateRows.js.html
@@ -3,7 +3,7 @@
- src/modules/alternateRows.js | tablefilter v0.2.33 API Document
+ src/modules/alternateRows.js | tablefilter v0.2.34 API Document
@@ -112,16 +112,20 @@
import {Feature} from '../feature';
import {addClass, removeClass} from '../dom';
+/**
+ * Rows with alternating background color for improved readability
+ */
export class AlternateRows extends Feature {
/**
- * Alternating rows color
+ * Creates an instance of AlternateRows.
+ *
* @param {Object} tf TableFilter instance
*/
constructor(tf) {
super(tf, 'alternateRows');
- var config = this.config;
+ let config = this.config;
//defines css class for even rows
this.evenCss = config.even_row_css_class || 'even';
//defines css class for odd rows
@@ -147,24 +151,21 @@ export class AlternateRows extends Feature {
this.initialized = true;
}
+ /**
+ * Apply background to all valid rows
+ */
processAll() {
if (!this.isEnabled()) {
return;
}
- var tf = this.tf;
- var validRowsIndex = tf.getValidRows(true);
- var noValidRowsIndex = validRowsIndex.length === 0;
- //1st index
- var beginIndex = noValidRowsIndex ? tf.refRow : 0;
- // nb indexes
- var indexLen = noValidRowsIndex ?
- tf.nbFilterableRows + beginIndex :
- validRowsIndex.length;
- var idx = 0;
+ let tf = this.tf;
+ let validRowsIndex = tf.getValidRows(true);
+ let indexLen = validRowsIndex.length;
+ let idx = 0;
//alternates bg color
- for (var j = beginIndex; j < indexLen; j++) {
- var rowIdx = noValidRowsIndex ? j : validRowsIndex[j];
+ for (let j = 0; j < indexLen; j++) {
+ let rowIdx = validRowsIndex[j];
this.setRowBg(rowIdx, idx);
idx++;
}
@@ -194,8 +195,8 @@ export class AlternateRows extends Feature {
if (!this.isEnabled() || isNaN(rowIdx)) {
return;
}
- var rows = this.tf.tbl.rows;
- var i = isNaN(idx) ? rowIdx : idx;
+ let rows = this.tf.tbl.rows;
+ let i = isNaN(idx) ? rowIdx : idx;
this.removeRowBg(rowIdx);
addClass(rows[rowIdx], (i % 2) ? this.evenCss : this.oddCss);
@@ -209,7 +210,7 @@ export class AlternateRows extends Feature {
if (isNaN(idx)) {
return;
}
- var rows = this.tf.tbl.rows;
+ let rows = this.tf.tbl.rows;
removeClass(rows[idx], this.oddCss);
removeClass(rows[idx], this.evenCss);
}
@@ -222,7 +223,7 @@ export class AlternateRows extends Feature {
return;
}
let nbRows = this.tf.getRowsNb(true);
- for (var i = 0; i < nbRows; i++) {
+ for (let i = 0; i < nbRows; i++) {
this.removeRowBg(i);
}
diff --git a/docs/file/src/modules/checkList.js.html b/docs/file/src/modules/checkList.js.html
index d5e24962..10b77c95 100644
--- a/docs/file/src/modules/checkList.js.html
+++ b/docs/file/src/modules/checkList.js.html
@@ -3,7 +3,7 @@
- src/modules/checkList.js | tablefilter v0.2.33 API Document
+ src/modules/checkList.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/clearButton.js.html b/docs/file/src/modules/clearButton.js.html
index 2122f8e4..db73846e 100644
--- a/docs/file/src/modules/clearButton.js.html
+++ b/docs/file/src/modules/clearButton.js.html
@@ -3,7 +3,7 @@
- src/modules/clearButton.js | tablefilter v0.2.33 API Document
+ src/modules/clearButton.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/dropdown.js.html b/docs/file/src/modules/dropdown.js.html
index 8f46911c..21a85314 100644
--- a/docs/file/src/modules/dropdown.js.html
+++ b/docs/file/src/modules/dropdown.js.html
@@ -3,7 +3,7 @@
- src/modules/dropdown.js | tablefilter v0.2.33 API Document
+ src/modules/dropdown.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/gridLayout.js.html b/docs/file/src/modules/gridLayout.js.html
index 3626e8ea..39af6bb7 100644
--- a/docs/file/src/modules/gridLayout.js.html
+++ b/docs/file/src/modules/gridLayout.js.html
@@ -3,7 +3,7 @@
- src/modules/gridLayout.js | tablefilter v0.2.33 API Document
+ src/modules/gridLayout.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/hash.js.html b/docs/file/src/modules/hash.js.html
index a15bfbc2..f3150682 100644
--- a/docs/file/src/modules/hash.js.html
+++ b/docs/file/src/modules/hash.js.html
@@ -3,7 +3,7 @@
- src/modules/hash.js | tablefilter v0.2.33 API Document
+ src/modules/hash.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/help.js.html b/docs/file/src/modules/help.js.html
index 9dbf97f6..0752ecb0 100644
--- a/docs/file/src/modules/help.js.html
+++ b/docs/file/src/modules/help.js.html
@@ -3,7 +3,7 @@
- src/modules/help.js | tablefilter v0.2.33 API Document
+ src/modules/help.js | tablefilter v0.2.34 API Document
@@ -115,16 +115,16 @@ import Event from '../event';
import {NONE} from '../const';
const WIKI_URL = 'https://github.com/koalyptus/TableFilter/wiki/' +
- '4.-Filter-operators';
+ '4.-Filter-operators';
const WEBSITE_URL = 'http://koalyptus.github.io/TableFilter/';
-export class Help extends Feature{
+export class Help extends Feature {
/**
* Help UI component
* @param {Object} tf TableFilter instance
*/
- constructor(tf){
+ constructor(tf) {
super(tf, 'help');
var f = this.config;
@@ -142,7 +142,7 @@ export class Help extends Feature{
'operators: <br /><b><</b>, <b><=</b>, <b>></b>, ' +
'<b>>=</b>, <b>=</b>, <b>*</b>, <b>!</b>, <b>{</b>, <b>}</b>, ' +
'<b>||</b>,<b>&&</b>, <b>[empty]</b>, <b>[nonempty]</b>, ' +
- '<b>rgx:</b><br/><a href="'+ WIKI_URL +'" target="_blank">' +
+ '<b>rgx:</b><br/><a href="' + WIKI_URL + '" target="_blank">' +
'Learn more</a><hr/>';
//defines help innerHtml
this.instrHtml = f.help_instructions_html || null;
@@ -157,12 +157,12 @@ export class Help extends Feature{
'helpCont';
//help button element
this.btn = null;
- //help content div
+ //help content div
this.cont = null;
this.defaultHtml = '<div class="helpFooter"><h4>TableFilter ' +
- 'v'+ tf.version +'</h4>' +
- '<a href="'+ WEBSITE_URL +'" target="_blank">'+ WEBSITE_URL +'</a>'+
- '<br/><span>©2015-'+ tf.year +' {AUTHOR}</span>' +
+ 'v' + tf.version + '</h4>' + '<a href="' + WEBSITE_URL +
+ '" target="_blank">' + WEBSITE_URL + '</a>' +
+ '<br/><span>©2015-' + tf.year + ' {AUTHOR}</span>' +
'<div align="center" style="margin-top:8px;">' +
'<a href="javascript:void(0);" class="close">Close</a></div></div>';
@@ -171,21 +171,26 @@ export class Help extends Feature{
//id prefix for help elements
this.prfxHelpDiv = 'helpDiv_';
- this.emitter.on(['init-help'], ()=> this.init());
+ this.emitter.on(['init-help'], () => this.init());
}
- init(){
- if(this.initialized){
+ /**
+ * Initialise Help instance
+ *
+ * @returns (description)
+ */
+ init() {
+ if (this.initialized) {
return;
}
var tf = this.tf;
- var helpspan = createElm('span', ['id', this.prfxHelpSpan+tf.id]);
- var helpdiv = createElm('div', ['id', this.prfxHelpDiv+tf.id]);
+ var helpspan = createElm('span', ['id', this.prfxHelpSpan + tf.id]);
+ var helpdiv = createElm('div', ['id', this.prfxHelpDiv + tf.id]);
//help button is added to defined element
- if(!this.tgtId){
+ if (!this.tgtId) {
tf.setToolbar();
}
var targetEl = !this.tgtId ? tf.rDiv : elm(this.tgtId);
@@ -193,7 +198,7 @@ export class Help extends Feature{
var divContainer = !this.contTgtId ? helpspan : elm(this.contTgtId);
- if(!this.btnHtml){
+ if (!this.btnHtml) {
divContainer.appendChild(helpdiv);
var helplink = createElm('a', ['href', 'javascript:void(0);']);
helplink.className = this.btnCssClass;
@@ -207,16 +212,16 @@ export class Help extends Feature{
divContainer.appendChild(helpdiv);
}
- if(!this.instrHtml){
+ if (!this.instrHtml) {
helpdiv.innerHTML = this.instrText;
helpdiv.className = this.contCssClass;
Event.add(helpdiv, 'dblclick', () => this.toggle());
} else {
- if(this.contTgtId){
+ if (this.contTgtId) {
divContainer.appendChild(helpdiv);
}
helpdiv.innerHTML = this.instrHtml;
- if(!this.contTgtId){
+ if (!this.contTgtId) {
helpdiv.className = this.contCssClass;
Event.add(helpdiv, 'dblclick', () => this.toggle());
}
@@ -232,14 +237,14 @@ export class Help extends Feature{
/**
* Toggle help pop-up
*/
- toggle(){
+ toggle() {
// check only if explicitily set to false as in this case undefined
// signifies the help feature is enabled by default
- if(this.enabled === false){
+ if (this.enabled === false) {
return;
}
var divDisplay = this.cont.style.display;
- if(divDisplay === '' || divDisplay === NONE){
+ if (divDisplay === '' || divDisplay === NONE) {
this.cont.style.display = 'inline';
} else {
this.cont.style.display = NONE;
@@ -249,13 +254,13 @@ export class Help extends Feature{
/**
* Remove help UI
*/
- destroy(){
- if(!this.initialized){
+ destroy() {
+ if (!this.initialized) {
return;
}
removeElm(this.btn);
this.btn = null;
- if(!this.cont){
+ if (!this.cont) {
return;
}
removeElm(this.cont);
diff --git a/docs/file/src/modules/highlightKeywords.js.html b/docs/file/src/modules/highlightKeywords.js.html
index 33d0b6d9..a5f1bd19 100644
--- a/docs/file/src/modules/highlightKeywords.js.html
+++ b/docs/file/src/modules/highlightKeywords.js.html
@@ -3,7 +3,7 @@
- src/modules/highlightKeywords.js | tablefilter v0.2.33 API Document
+ src/modules/highlightKeywords.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/loader.js.html b/docs/file/src/modules/loader.js.html
index ae6a8c94..f6d463a3 100644
--- a/docs/file/src/modules/loader.js.html
+++ b/docs/file/src/modules/loader.js.html
@@ -3,7 +3,7 @@
- src/modules/loader.js | tablefilter v0.2.33 API Document
+ src/modules/loader.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/noResults.js.html b/docs/file/src/modules/noResults.js.html
index ebf06aa5..965f4391 100644
--- a/docs/file/src/modules/noResults.js.html
+++ b/docs/file/src/modules/noResults.js.html
@@ -3,7 +3,7 @@
- src/modules/noResults.js | tablefilter v0.2.33 API Document
+ src/modules/noResults.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/paging.js.html b/docs/file/src/modules/paging.js.html
index 53ce3c1b..40f91cba 100644
--- a/docs/file/src/modules/paging.js.html
+++ b/docs/file/src/modules/paging.js.html
@@ -3,7 +3,7 @@
- src/modules/paging.js | tablefilter v0.2.33 API Document
+ src/modules/paging.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/popupFilter.js.html b/docs/file/src/modules/popupFilter.js.html
index 4ee7ffd4..437cb696 100644
--- a/docs/file/src/modules/popupFilter.js.html
+++ b/docs/file/src/modules/popupFilter.js.html
@@ -3,7 +3,7 @@
- src/modules/popupFilter.js | tablefilter v0.2.33 API Document
+ src/modules/popupFilter.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/rowsCounter.js.html b/docs/file/src/modules/rowsCounter.js.html
index b259ae8b..ec9fc875 100644
--- a/docs/file/src/modules/rowsCounter.js.html
+++ b/docs/file/src/modules/rowsCounter.js.html
@@ -3,7 +3,7 @@
- src/modules/rowsCounter.js | tablefilter v0.2.33 API Document
+ src/modules/rowsCounter.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/state.js.html b/docs/file/src/modules/state.js.html
index 27d00c56..0eb7cd0f 100644
--- a/docs/file/src/modules/state.js.html
+++ b/docs/file/src/modules/state.js.html
@@ -3,7 +3,7 @@
- src/modules/state.js | tablefilter v0.2.33 API Document
+ src/modules/state.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/statusBar.js.html b/docs/file/src/modules/statusBar.js.html
index 55a69280..9ccc9af2 100644
--- a/docs/file/src/modules/statusBar.js.html
+++ b/docs/file/src/modules/statusBar.js.html
@@ -3,7 +3,7 @@
- src/modules/statusBar.js | tablefilter v0.2.33 API Document
+ src/modules/statusBar.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/modules/storage.js.html b/docs/file/src/modules/storage.js.html
index c712bae0..c3125270 100644
--- a/docs/file/src/modules/storage.js.html
+++ b/docs/file/src/modules/storage.js.html
@@ -3,7 +3,7 @@
- src/modules/storage.js | tablefilter v0.2.33 API Document
+ src/modules/storage.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/root.js.html b/docs/file/src/root.js.html
index 075b6f83..a4cabe5d 100644
--- a/docs/file/src/root.js.html
+++ b/docs/file/src/root.js.html
@@ -3,7 +3,7 @@
- src/root.js | tablefilter v0.2.33 API Document
+ src/root.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/sort.js.html b/docs/file/src/sort.js.html
index 1015aa3c..35d6e29c 100644
--- a/docs/file/src/sort.js.html
+++ b/docs/file/src/sort.js.html
@@ -3,7 +3,7 @@
- src/sort.js | tablefilter v0.2.33 API Document
+ src/sort.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/string.js.html b/docs/file/src/string.js.html
index 216e1029..6b3d3791 100644
--- a/docs/file/src/string.js.html
+++ b/docs/file/src/string.js.html
@@ -3,7 +3,7 @@
- src/string.js | tablefilter v0.2.33 API Document
+ src/string.js | tablefilter v0.2.34 API Document
diff --git a/docs/file/src/tablefilter.js.html b/docs/file/src/tablefilter.js.html
index a796a85a..9c06c0c7 100644
--- a/docs/file/src/tablefilter.js.html
+++ b/docs/file/src/tablefilter.js.html
@@ -3,7 +3,7 @@
- src/tablefilter.js | tablefilter v0.2.33 API Document
+ src/tablefilter.js | tablefilter v0.2.34 API Document
@@ -220,12 +220,8 @@ export class TableFilter {
//stores filters ids
this.fltIds = [];
- //stores filters DOM elements
- this.fltElms = [];
//stores valid rows indexes (rows visible upon filtering)
this.validRowsIndex = [];
- //stores filters row element
- this.fltGridEl = null;
//container div for paging elements, reset btn etc.
this.infDiv = null;
//div for rows counter
@@ -1031,9 +1027,9 @@ export class TableFilter {
if (!this.initialized) {
return;
}
- let rows = this.tbl.rows,
- Mod = this.Mod,
- emitter = this.emitter;
+
+ let Mod = this.Mod;
+ let emitter = this.emitter;
if (this.isExternalFlt && !this.popupFilters) {
this.removeExternalFlts();
@@ -1054,7 +1050,6 @@ export class TableFilter {
this.validateAllRows();
if (this.fltGrid && !this.gridLayout) {
- this.fltGridEl = rows[this.filtersRowIndex];
this.tbl.deleteRow(this.filtersRowIndex);
}
diff --git a/docs/file/src/types.js.html b/docs/file/src/types.js.html
index b7f80324..497c3b72 100644
--- a/docs/file/src/types.js.html
+++ b/docs/file/src/types.js.html
@@ -3,7 +3,7 @@
- src/types.js | tablefilter v0.2.33 API Document
+ src/types.js | tablefilter v0.2.34 API Document
diff --git a/docs/identifiers.html b/docs/identifiers.html
index 9bdce390..6d0d5eea 100644
--- a/docs/identifiers.html
+++ b/docs/identifiers.html
@@ -3,7 +3,7 @@
- Index | tablefilter v0.2.33 API Document
+ Index | tablefilter v0.2.34 API Document
@@ -180,7 +180,8 @@
-
+ Rows with alternating background color for improved readability
+
|
diff --git a/docs/index.html b/docs/index.html
index 4c620312..2a1887c4 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -3,7 +3,7 @@
- tablefilter v0.2.33 API Document
+ tablefilter v0.2.34 API Document
diff --git a/docs/package.json b/docs/package.json
index 7bafb0ab..5f51541f 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -1,6 +1,6 @@
{
"name": "tablefilter",
- "version": "0.2.33",
+ "version": "0.2.34",
"description": "A Javascript library making HTML tables filterable and a bit more",
"license": "MIT",
"author": {
@@ -28,7 +28,7 @@
"tag": "next"
},
"devDependencies": {
- "babel-core": "^6.9.0",
+ "babel-core": "^6.9.1",
"babel-eslint": "6.0.4",
"babel-loader": "^6.0.1",
"babel-preset-es2015": "^6.9.0",
diff --git a/docs/script/search_index.js b/docs/script/search_index.js
index 3495d9c2..4542269a 100644
--- a/docs/script/search_index.js
+++ b/docs/script/search_index.js
@@ -4367,24 +4367,12 @@ window.esdocSearchIndex = [
"src/tablefilter.js~TableFilter#fltCssClass",
"member"
],
- [
- "src/tablefilter.js~tablefilter#fltelms",
- "class/src/tablefilter.js~TableFilter.html#instance-member-fltElms",
- "src/tablefilter.js~TableFilter#fltElms",
- "member"
- ],
[
"src/tablefilter.js~tablefilter#fltgrid",
"class/src/tablefilter.js~TableFilter.html#instance-member-fltGrid",
"src/tablefilter.js~TableFilter#fltGrid",
"member"
],
- [
- "src/tablefilter.js~tablefilter#fltgridel",
- "class/src/tablefilter.js~TableFilter.html#instance-member-fltGridEl",
- "src/tablefilter.js~TableFilter#fltGridEl",
- "member"
- ],
[
"src/tablefilter.js~tablefilter#fltids",
"class/src/tablefilter.js~TableFilter.html#instance-member-fltIds",
diff --git a/docs/source.html b/docs/source.html
index 0707766a..1aaa89f4 100644
--- a/docs/source.html
+++ b/docs/source.html
@@ -3,7 +3,7 @@
- Source | tablefilter v0.2.33 API Document
+ Source | tablefilter v0.2.34 API Document
@@ -108,7 +108,7 @@
-Source 238/787
+ Source 242/785
@@ -129,7 +129,7 @@
| 100 %1/1 |
545 byte |
22 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/const.js |
@@ -149,15 +149,15 @@
30 %4/13 |
507 byte |
28 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/cookie.js |
- |
- |
- 1455 byte |
- 58 |
- 2016-05-03 06:48:36 (UTC) |
+ 1515 byte |
+ 62 |
+ 2016-05-03 10:16:10 (UTC) |
| src/date.js |
@@ -166,7 +166,7 @@
100 %2/2 |
5770 byte |
183 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/dom.js |
@@ -185,23 +185,23 @@
100 %12/12 |
4787 byte |
191 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
- | src/emitter.js |
+ src/emitter.js |
Emitter |
- 83 %5/6 |
- 1263 byte |
- 50 |
- 2016-05-03 06:48:36 (UTC) |
+ 100 %6/6 |
+ 1323 byte |
+ 53 |
+ 2016-05-03 10:16:10 (UTC) |
| src/event.js |
- |
- |
- 1321 byte |
- 55 |
- 2016-05-03 06:48:36 (UTC) |
+ 2637 byte |
+ 99 |
+ 2016-05-03 10:16:10 (UTC) |
| src/extensions/advancedGrid/adapterEzEditTable.js |
@@ -209,7 +209,7 @@
35 %5/14 |
18234 byte |
458 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/extensions/advancedGrid/advancedGrid.js |
@@ -217,7 +217,7 @@
- |
90 byte |
2 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/extensions/colOps/colOps.js |
@@ -225,7 +225,7 @@
22 %2/9 |
12868 byte |
329 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/extensions/colsVisibility/colsVisibility.js |
@@ -233,7 +233,7 @@
17 %10/57 |
18085 byte |
546 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/extensions/filtersVisibility/filtersVisibility.js |
@@ -241,7 +241,7 @@
18 %6/33 |
6337 byte |
202 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/extensions/sort/adapterSortabletable.js |
@@ -249,15 +249,15 @@
11 %3/26 |
14069 byte |
428 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/extensions/sort/sort.js |
- |
- |
- 195 byte |
+ 197 byte |
8 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/feature.js |
@@ -265,7 +265,7 @@
0 %0/14 |
649 byte |
38 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/helpers.js |
@@ -273,15 +273,15 @@
100 %1/1 |
528 byte |
25 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
- | src/modules/alternateRows.js |
+ src/modules/alternateRows.js |
AlternateRows |
- 54 %6/11 |
- 3443 byte |
- 127 |
- 2016-05-03 06:48:36 (UTC) |
+ 72 %8/11 |
+ 3327 byte |
+ 128 |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/checkList.js |
@@ -289,7 +289,7 @@
29 %8/27 |
17102 byte |
488 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/clearButton.js |
@@ -297,7 +297,7 @@
25 %3/12 |
2671 byte |
93 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/dropdown.js |
@@ -305,7 +305,7 @@
35 %7/20 |
13043 byte |
391 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/gridLayout.js |
@@ -313,7 +313,7 @@
10 %3/29 |
12216 byte |
350 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/hash.js |
@@ -322,15 +322,15 @@
63 %7/11 |
2408 byte |
100 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
- | src/modules/help.js |
+ src/modules/help.js |
Help |
- 15 %3/19 |
- 5398 byte |
- 155 |
- 2016-05-03 06:48:36 (UTC) |
+ 21 %4/19 |
+ 5507 byte |
+ 160 |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/highlightKeywords.js |
@@ -338,7 +338,7 @@
40 %4/10 |
4011 byte |
122 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/loader.js |
@@ -346,7 +346,7 @@
6 %1/15 |
4565 byte |
155 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/noResults.js |
@@ -354,7 +354,7 @@
5 %1/20 |
3735 byte |
136 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/paging.js |
@@ -362,7 +362,7 @@
23 %15/63 |
26261 byte |
757 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/popupFilter.js |
@@ -370,7 +370,7 @@
35 %10/28 |
9087 byte |
276 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/rowsCounter.js |
@@ -378,7 +378,7 @@
5 %1/18 |
5009 byte |
149 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/state.js |
@@ -386,7 +386,7 @@
35 %13/37 |
12252 byte |
413 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/statusBar.js |
@@ -394,7 +394,7 @@
3 %1/29 |
7663 byte |
222 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/modules/storage.js |
@@ -403,7 +403,7 @@
56 %9/16 |
2860 byte |
123 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/root.js |
@@ -411,7 +411,7 @@
100 %1/1 |
235 byte |
6 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/sort.js |
@@ -421,7 +421,7 @@
100 %3/3 |
930 byte |
33 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
| src/string.js |
@@ -433,15 +433,15 @@
100 %5/5 |
1854 byte |
69 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
- | src/tablefilter.js |
+ src/tablefilter.js |
TableFilter |
- 35 %78/217 |
- 78278 byte |
- 2309 |
- 2016-05-03 06:48:36 (UTC) |
+ 36 %78/215 |
+ 78055 byte |
+ 2304 |
+ 2016-05-03 10:16:10 (UTC) |
| src/types.js |
@@ -456,7 +456,7 @@
100 %8/8 |
1451 byte |
67 |
- 2016-05-03 06:48:36 (UTC) |
+ 2016-05-03 10:16:10 (UTC) |
diff --git a/docs/variable/index.html b/docs/variable/index.html
index 07be2d3b..3df7de15 100644
--- a/docs/variable/index.html
+++ b/docs/variable/index.html
@@ -3,7 +3,7 @@
- Variable | tablefilter v0.2.33 API Document
+ Variable | tablefilter v0.2.34 API Document
| |