tablefilter 0.7.14 → 0.7.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/starter.html +2 -2
- package/dist/tablefilter/tablefilter.js +2 -2
- package/dist/tablefilter/tf-1-60eb0f2b8401971cc1f1.js +1 -0
- package/dist/tablefilter/tf-1-70311571af6ba702e050.js +1 -0
- package/dist/tablefilter.cjs.js +245 -35
- package/dist/tablefilter.esm.js +245 -35
- package/dist/tablefilter.umd.js +245 -35
- package/package.json +1 -1
- package/src/components/tf-popup-filter.js +415 -0
- package/src/modules/popupFilter.js +346 -35
- package/dist/tablefilter/tf-1-8fd757943bbcb7f745f1.js +0 -1
- package/dist/tablefilter/tf-1-c602f0c7f884cadf2080.js +0 -1
package/dist/tablefilter.umd.js
CHANGED
|
@@ -15048,7 +15048,7 @@
|
|
|
15048
15048
|
//#endregion
|
|
15049
15049
|
//#region src/modules/help.js
|
|
15050
15050
|
var DEFAULT_INSTR_HTML = "Use the filters above each column to filter and limit table data. Advanced searches can be performed by using the following 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=\"https://github.com/koalyptus/TableFilter/wiki/4.-Filter-operators\" target=\"_blank\">Learn more</a><hr/>";
|
|
15051
|
-
var FOCUSABLE_TRIGGER = "button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
15051
|
+
var FOCUSABLE_TRIGGER$1 = "button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
15052
15052
|
/**
|
|
15053
15053
|
* Help UI component
|
|
15054
15054
|
*/
|
|
@@ -15216,7 +15216,7 @@
|
|
|
15216
15216
|
if (this.btnHtml) {
|
|
15217
15217
|
const trigger = createElm("span");
|
|
15218
15218
|
trigger.innerHTML = sanitizeHtml(this.btnHtml);
|
|
15219
|
-
if (!trigger.firstChild) {} else if (trigger.querySelector(FOCUSABLE_TRIGGER)) while (trigger.firstChild) {
|
|
15219
|
+
if (!trigger.firstChild) {} else if (trigger.querySelector(FOCUSABLE_TRIGGER$1)) while (trigger.firstChild) {
|
|
15220
15220
|
const node = trigger.firstChild;
|
|
15221
15221
|
if (node.nodeType === 1) {
|
|
15222
15222
|
node.slot = "trigger";
|
|
@@ -15263,7 +15263,7 @@
|
|
|
15263
15263
|
*/
|
|
15264
15264
|
applyTriggerLabel(node) {
|
|
15265
15265
|
if (!this.label) return;
|
|
15266
|
-
const target = node.matches(FOCUSABLE_TRIGGER) ? node : node.querySelector(FOCUSABLE_TRIGGER) || node;
|
|
15266
|
+
const target = node.matches(FOCUSABLE_TRIGGER$1) ? node : node.querySelector(FOCUSABLE_TRIGGER$1) || node;
|
|
15267
15267
|
if (!target.hasAttribute("aria-label")) target.setAttribute("aria-label", this.label);
|
|
15268
15268
|
}
|
|
15269
15269
|
/**
|
|
@@ -16688,6 +16688,8 @@
|
|
|
16688
16688
|
};
|
|
16689
16689
|
//#endregion
|
|
16690
16690
|
//#region src/modules/popupFilter.js
|
|
16691
|
+
var FOCUSABLE_TRIGGER = "button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
16692
|
+
var FILTER_TRIGGER_TEXT = "Filter";
|
|
16691
16693
|
/**
|
|
16692
16694
|
* Pop-up filter component
|
|
16693
16695
|
* @export
|
|
@@ -16794,6 +16796,37 @@
|
|
|
16794
16796
|
* @private
|
|
16795
16797
|
*/
|
|
16796
16798
|
this.activeFilterIdx = -1;
|
|
16799
|
+
/**
|
|
16800
|
+
* `<tf-popup-filter>` hosts, keyed by column index
|
|
16801
|
+
* @type {Array}
|
|
16802
|
+
* @private
|
|
16803
|
+
*/
|
|
16804
|
+
this.hosts = [];
|
|
16805
|
+
/**
|
|
16806
|
+
* Bound element `open-change` handlers, keyed by column index
|
|
16807
|
+
* @type {Array}
|
|
16808
|
+
* @private
|
|
16809
|
+
*/
|
|
16810
|
+
this.ceEvt = [];
|
|
16811
|
+
/**
|
|
16812
|
+
* Whether the bridge is applying an open state to an element
|
|
16813
|
+
* @type {Boolean}
|
|
16814
|
+
* @private
|
|
16815
|
+
*/
|
|
16816
|
+
this.syncingCEOpen = false;
|
|
16817
|
+
/**
|
|
16818
|
+
* Stable handlers for emitter and document subscriptions
|
|
16819
|
+
* @private
|
|
16820
|
+
*/
|
|
16821
|
+
this.boundHandlers = {
|
|
16822
|
+
mouseup: (event) => this.onMouseup(event),
|
|
16823
|
+
containerClick: (event) => stopEvt(event),
|
|
16824
|
+
beforeFiltering: () => this.setIconsState(),
|
|
16825
|
+
afterFiltering: () => this.closeAll(),
|
|
16826
|
+
cellProcessed: (tf, cellIndex) => this.changeState(cellIndex, true),
|
|
16827
|
+
filtersRowInserted: () => this.buildIcons(),
|
|
16828
|
+
beforeFilterInit: (tf, colIndex) => this.build(colIndex)
|
|
16829
|
+
};
|
|
16797
16830
|
}
|
|
16798
16831
|
/**
|
|
16799
16832
|
* Click event handler for pop-up filter icon
|
|
@@ -16836,11 +16869,11 @@
|
|
|
16836
16869
|
tf.headersRow--;
|
|
16837
16870
|
this.buildIcons();
|
|
16838
16871
|
}
|
|
16839
|
-
this.emitter.on(["before-filtering"],
|
|
16840
|
-
this.emitter.on(["after-filtering"],
|
|
16841
|
-
this.emitter.on(["cell-processed"],
|
|
16842
|
-
this.emitter.on(["filters-row-inserted"],
|
|
16843
|
-
this.emitter.on(["before-filter-init"],
|
|
16872
|
+
this.emitter.on(["before-filtering"], this.boundHandlers.beforeFiltering);
|
|
16873
|
+
this.emitter.on(["after-filtering"], this.boundHandlers.afterFiltering);
|
|
16874
|
+
this.emitter.on(["cell-processed"], this.boundHandlers.cellProcessed);
|
|
16875
|
+
this.emitter.on(["filters-row-inserted"], this.boundHandlers.filtersRowInserted);
|
|
16876
|
+
this.emitter.on(["before-filter-init"], this.boundHandlers.beforeFilterInit);
|
|
16844
16877
|
/** @inherited */
|
|
16845
16878
|
this.initialized = true;
|
|
16846
16879
|
}
|
|
@@ -16850,25 +16883,147 @@
|
|
|
16850
16883
|
reset() {
|
|
16851
16884
|
this.enable();
|
|
16852
16885
|
this.init();
|
|
16853
|
-
this.buildIcons();
|
|
16886
|
+
if (!this.tf.gridLayout) this.buildIcons();
|
|
16854
16887
|
this.buildAll();
|
|
16855
16888
|
}
|
|
16856
16889
|
/**
|
|
16890
|
+
* Whether the feature renders through `<tf-popup-filter>`.
|
|
16891
|
+
* A definition is accepted when it exposes the bridge methods and the
|
|
16892
|
+
* shadow parts the bridge projects into.
|
|
16893
|
+
* @returns {Boolean} True when the bridge renders through the element
|
|
16894
|
+
* @private
|
|
16895
|
+
*/
|
|
16896
|
+
canUseCE() {
|
|
16897
|
+
const PopupFilterElement = typeof customElements === "undefined" ? null : customElements.get("tf-popup-filter");
|
|
16898
|
+
if (!PopupFilterElement || typeof PopupFilterElement.prototype.setOpen !== "function" || typeof PopupFilterElement.prototype.setPopupLabel !== "function" || typeof PopupFilterElement.prototype.setLabel !== "function" || typeof PopupFilterElement.prototype.setText !== "function") return false;
|
|
16899
|
+
let probe;
|
|
16900
|
+
try {
|
|
16901
|
+
probe = document.createElement("tf-popup-filter");
|
|
16902
|
+
} catch (e) {
|
|
16903
|
+
return false;
|
|
16904
|
+
}
|
|
16905
|
+
const shadow = probe.shadowRoot;
|
|
16906
|
+
return Boolean(shadow && shadow.querySelector("slot[name=\"trigger\"]") && shadow.querySelector("[part=\"trigger\"]") && shadow.querySelector("[part=\"popup\"]") && shadow.querySelector("slot[part=\"content-slot\"]"));
|
|
16907
|
+
}
|
|
16908
|
+
/**
|
|
16857
16909
|
* Build all filters icons
|
|
16858
16910
|
*/
|
|
16859
16911
|
buildIcons() {
|
|
16860
16912
|
let tf = this.tf;
|
|
16913
|
+
const useCE = this.canUseCE();
|
|
16861
16914
|
tf.headersRow++;
|
|
16862
16915
|
tf.eachCol((i) => {
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
tf.getHeaderElement(i).appendChild(icon);
|
|
16866
|
-
addEvt(icon, "click", (evt) => this.onClick(evt));
|
|
16867
|
-
this.fltSpans[i] = icon;
|
|
16868
|
-
this.fltIcons[i] = icon.firstChild;
|
|
16916
|
+
if (useCE) this.buildIconCE(i);
|
|
16917
|
+
else this.buildIconLegacy(i);
|
|
16869
16918
|
}, (i) => tf.getFilterType(i) === NONE);
|
|
16870
16919
|
}
|
|
16871
16920
|
/**
|
|
16921
|
+
* Build a filter trigger using <tf-popup-filter>
|
|
16922
|
+
* @param {Number} colIndex Column index
|
|
16923
|
+
* @private
|
|
16924
|
+
*/
|
|
16925
|
+
buildIconCE(colIndex) {
|
|
16926
|
+
const existing = this.hosts[colIndex];
|
|
16927
|
+
if (existing && existing.parentNode) return;
|
|
16928
|
+
const host = document.createElement("tf-popup-filter");
|
|
16929
|
+
host.className = this.placeholderCssClass;
|
|
16930
|
+
host.setText(FILTER_TRIGGER_TEXT);
|
|
16931
|
+
host.setLabel(FILTER_TRIGGER_TEXT);
|
|
16932
|
+
const label = this.appendTrigger(host);
|
|
16933
|
+
host.setPopupLabel(label || FILTER_TRIGGER_TEXT);
|
|
16934
|
+
const handler = (event) => this.onCEOpenChange(colIndex, event);
|
|
16935
|
+
this.ceEvt[colIndex] = handler;
|
|
16936
|
+
addEvt(host, "open-change", handler);
|
|
16937
|
+
this.tf.getHeaderElement(colIndex).appendChild(host);
|
|
16938
|
+
this.hosts[colIndex] = host;
|
|
16939
|
+
this.fltIcons[colIndex] = host.querySelector("[slot=\"trigger\"] img[src]");
|
|
16940
|
+
}
|
|
16941
|
+
/**
|
|
16942
|
+
* Append the sanitised `image_html` to the trigger slot
|
|
16943
|
+
* @param {DOMElement} host `<tf-popup-filter>` host
|
|
16944
|
+
* @returns {String} Accessible name of the projected trigger
|
|
16945
|
+
* @private
|
|
16946
|
+
*/
|
|
16947
|
+
appendTrigger(host) {
|
|
16948
|
+
const wrapper = createElm("span");
|
|
16949
|
+
wrapper.innerHTML = sanitizeHtml(this.iconHtml);
|
|
16950
|
+
const nodes = [];
|
|
16951
|
+
while (wrapper.firstChild) nodes.push(wrapper.removeChild(wrapper.firstChild));
|
|
16952
|
+
if (!nodes.length) return "";
|
|
16953
|
+
if (!nodes.some((node) => node.nodeType === 1 && (node.matches(FOCUSABLE_TRIGGER) || node.querySelector(FOCUSABLE_TRIGGER)))) {
|
|
16954
|
+
const button = createElm("button");
|
|
16955
|
+
button.type = "button";
|
|
16956
|
+
button.slot = "trigger";
|
|
16957
|
+
nodes.forEach((node) => button.appendChild(node));
|
|
16958
|
+
host.appendChild(button);
|
|
16959
|
+
} else nodes.forEach((node) => {
|
|
16960
|
+
if (node.nodeType === 1) {
|
|
16961
|
+
node.slot = "trigger";
|
|
16962
|
+
host.appendChild(node);
|
|
16963
|
+
} else if (node.nodeType === 3 && node.textContent.trim()) {
|
|
16964
|
+
const text = createElm("span");
|
|
16965
|
+
text.slot = "trigger";
|
|
16966
|
+
text.appendChild(node);
|
|
16967
|
+
host.appendChild(text);
|
|
16968
|
+
}
|
|
16969
|
+
});
|
|
16970
|
+
const label = this.triggerName(host);
|
|
16971
|
+
if (!label) this.applyTriggerLabel(host);
|
|
16972
|
+
return label;
|
|
16973
|
+
}
|
|
16974
|
+
/**
|
|
16975
|
+
* Name the first slotted trigger without an accessible name
|
|
16976
|
+
* @param {DOMElement} host `<tf-popup-filter>` host
|
|
16977
|
+
* @private
|
|
16978
|
+
*/
|
|
16979
|
+
applyTriggerLabel(host) {
|
|
16980
|
+
const triggers = host.querySelectorAll("[slot=\"trigger\"]");
|
|
16981
|
+
for (let i = 0; i < triggers.length; i++) {
|
|
16982
|
+
const el = triggers[i];
|
|
16983
|
+
const target = el.matches(FOCUSABLE_TRIGGER) ? el : el.querySelector(FOCUSABLE_TRIGGER);
|
|
16984
|
+
if (target && !target.hasAttribute("aria-label")) {
|
|
16985
|
+
target.setAttribute("aria-label", FILTER_TRIGGER_TEXT);
|
|
16986
|
+
return;
|
|
16987
|
+
}
|
|
16988
|
+
}
|
|
16989
|
+
}
|
|
16990
|
+
/**
|
|
16991
|
+
* Read the accessible name of the first slotted trigger
|
|
16992
|
+
* @param {DOMElement} host `<tf-popup-filter>` host
|
|
16993
|
+
* @returns {String} Trigger name, or an empty string
|
|
16994
|
+
* @private
|
|
16995
|
+
*/
|
|
16996
|
+
triggerName(host) {
|
|
16997
|
+
const triggers = host.querySelectorAll("[slot=\"trigger\"]");
|
|
16998
|
+
for (let i = 0; i < triggers.length; i++) {
|
|
16999
|
+
const el = triggers[i];
|
|
17000
|
+
const label = (el.getAttribute("aria-label") || "").trim();
|
|
17001
|
+
if (label) return label;
|
|
17002
|
+
const text = (el.textContent || "").trim();
|
|
17003
|
+
if (text) return text;
|
|
17004
|
+
const image = el.querySelector("img[alt]") || (el.matches("img[alt]") ? el : null);
|
|
17005
|
+
const alt = image ? (image.getAttribute("alt") || "").trim() : "";
|
|
17006
|
+
if (alt) return alt;
|
|
17007
|
+
}
|
|
17008
|
+
return "";
|
|
17009
|
+
}
|
|
17010
|
+
/**
|
|
17011
|
+
* Append the legacy icon to the header
|
|
17012
|
+
* @param {Number} colIndex Column index
|
|
17013
|
+
* @private
|
|
17014
|
+
*/
|
|
17015
|
+
buildIconLegacy(colIndex) {
|
|
17016
|
+
const existing = this.fltSpans[colIndex];
|
|
17017
|
+
if (existing && existing.parentNode) return;
|
|
17018
|
+
let tf = this.tf;
|
|
17019
|
+
let icon = createElm("span", ["ci", colIndex]);
|
|
17020
|
+
icon.innerHTML = sanitizeHtml(this.iconHtml);
|
|
17021
|
+
tf.getHeaderElement(colIndex).appendChild(icon);
|
|
17022
|
+
addEvt(icon, "click", (evt) => this.onClick(evt));
|
|
17023
|
+
this.fltSpans[colIndex] = icon;
|
|
17024
|
+
this.fltIcons[colIndex] = icon.firstChild;
|
|
17025
|
+
}
|
|
17026
|
+
/**
|
|
16872
17027
|
* Build all pop-up filters elements
|
|
16873
17028
|
*/
|
|
16874
17029
|
buildAll() {
|
|
@@ -16882,13 +17037,19 @@
|
|
|
16882
17037
|
build(colIndex, div) {
|
|
16883
17038
|
let tf = this.tf;
|
|
16884
17039
|
let contId = `${this.prfxDiv}${tf.id}_${colIndex}`;
|
|
16885
|
-
let placeholder = createElm("div", ["class", this.placeholderCssClass]);
|
|
16886
17040
|
let cont = div || createElm("div", ["id", contId], ["class", this.containerCssClass]);
|
|
16887
17041
|
tf.externalFltIds[colIndex] = cont.id;
|
|
17042
|
+
addEvt(cont, "click", this.boundHandlers.containerClick);
|
|
17043
|
+
const host = this.hosts[colIndex];
|
|
17044
|
+
if (host) {
|
|
17045
|
+
host.appendChild(cont);
|
|
17046
|
+
this.fltElms[colIndex] = cont;
|
|
17047
|
+
return;
|
|
17048
|
+
}
|
|
17049
|
+
let placeholder = createElm("div", ["class", this.placeholderCssClass]);
|
|
16888
17050
|
placeholder.appendChild(cont);
|
|
16889
17051
|
let header = tf.getHeaderElement(colIndex);
|
|
16890
17052
|
header.insertBefore(placeholder, header.firstChild);
|
|
16891
|
-
addEvt(cont, "click", (evt) => stopEvt(evt));
|
|
16892
17053
|
this.fltElms[colIndex] = cont;
|
|
16893
17054
|
}
|
|
16894
17055
|
/**
|
|
@@ -16904,14 +17065,24 @@
|
|
|
16904
17065
|
* @param {Number} colIndex Column index
|
|
16905
17066
|
*/
|
|
16906
17067
|
open(colIndex) {
|
|
16907
|
-
let tf = this.tf, container = this.fltElms[colIndex];
|
|
17068
|
+
let tf = this.tf, container = this.fltElms[colIndex], host = this.hosts[colIndex];
|
|
17069
|
+
if (!container) return;
|
|
16908
17070
|
this.onBeforeOpen(this, container, colIndex);
|
|
16909
17071
|
container.style.display = "block";
|
|
17072
|
+
if (host) {
|
|
17073
|
+
this.setCEOpen(host, true);
|
|
17074
|
+
if (this.adjustToContainer) {
|
|
17075
|
+
let header = tf.getHeaderElement(colIndex);
|
|
17076
|
+
host.style.width = parseInt(header.clientWidth * .95, 10) + "px";
|
|
17077
|
+
}
|
|
17078
|
+
}
|
|
16910
17079
|
this.activeFilterIdx = colIndex;
|
|
16911
|
-
|
|
16912
|
-
|
|
16913
|
-
|
|
16914
|
-
|
|
17080
|
+
if (!host) {
|
|
17081
|
+
addEvt(root, "mouseup", this.boundHandlers.mouseup);
|
|
17082
|
+
if (tf.getFilterType(colIndex) === "input") {
|
|
17083
|
+
let flt = tf.getFilterElement(colIndex);
|
|
17084
|
+
if (flt) flt.focus();
|
|
17085
|
+
}
|
|
16915
17086
|
}
|
|
16916
17087
|
this.onAfterOpen(this, container, colIndex);
|
|
16917
17088
|
}
|
|
@@ -16920,19 +17091,48 @@
|
|
|
16920
17091
|
* @param {Number} colIndex Column index
|
|
16921
17092
|
*/
|
|
16922
17093
|
close(colIndex) {
|
|
16923
|
-
let container = this.fltElms[colIndex];
|
|
17094
|
+
let container = this.fltElms[colIndex], host = this.hosts[colIndex];
|
|
17095
|
+
if (!container) return;
|
|
16924
17096
|
this.onBeforeClose(this, container, colIndex);
|
|
17097
|
+
if (host) this.setCEOpen(host, false);
|
|
16925
17098
|
container.style.display = NONE;
|
|
16926
17099
|
if (this.activeFilterIdx === colIndex) this.activeFilterIdx = -1;
|
|
16927
|
-
removeEvt(root, "mouseup",
|
|
17100
|
+
if (!host) removeEvt(root, "mouseup", this.boundHandlers.mouseup);
|
|
16928
17101
|
this.onAfterClose(this, container, colIndex);
|
|
16929
17102
|
}
|
|
16930
17103
|
/**
|
|
17104
|
+
* Apply an open state to `<tf-popup-filter>` without replaying the
|
|
17105
|
+
* bridge callbacks for its `open-change` event
|
|
17106
|
+
* @param {DOMElement} host `<tf-popup-filter>` host
|
|
17107
|
+
* @param {Boolean} open Whether the popup is open
|
|
17108
|
+
* @private
|
|
17109
|
+
*/
|
|
17110
|
+
setCEOpen(host, open) {
|
|
17111
|
+
this.syncingCEOpen = true;
|
|
17112
|
+
host.setOpen(open);
|
|
17113
|
+
this.syncingCEOpen = false;
|
|
17114
|
+
}
|
|
17115
|
+
/**
|
|
17116
|
+
* Drive the bridge from `<tf-popup-filter>` state changes
|
|
17117
|
+
* @param {Number} colIndex Column index
|
|
17118
|
+
* @param {CustomEvent} event Element `open-change` event
|
|
17119
|
+
* @private
|
|
17120
|
+
*/
|
|
17121
|
+
onCEOpenChange(colIndex, event) {
|
|
17122
|
+
if (this.syncingCEOpen || !event.detail) return;
|
|
17123
|
+
if (event.detail.open) {
|
|
17124
|
+
this.closeAll(colIndex);
|
|
17125
|
+
this.open(colIndex);
|
|
17126
|
+
} else this.close(colIndex);
|
|
17127
|
+
}
|
|
17128
|
+
/**
|
|
16931
17129
|
* Check if popup filter for specified column is open
|
|
16932
17130
|
* @param {Number} colIndex Column index
|
|
16933
17131
|
* @returns {Boolean}
|
|
16934
17132
|
*/
|
|
16935
17133
|
isOpen(colIndex) {
|
|
17134
|
+
const host = this.hosts[colIndex];
|
|
17135
|
+
if (host) return host.hasAttribute("open");
|
|
16936
17136
|
return this.fltElms[colIndex].style.display === "block";
|
|
16937
17137
|
}
|
|
16938
17138
|
/**
|
|
@@ -16969,28 +17169,38 @@
|
|
|
16969
17169
|
if (!this.initialized) return;
|
|
16970
17170
|
this.filtersCache = [];
|
|
16971
17171
|
for (let i = 0; i < this.fltElms.length; i++) {
|
|
16972
|
-
let container = this.fltElms[i], placeholder = container.parentNode, icon = this.fltSpans[i], iconImg = this.fltIcons[i];
|
|
17172
|
+
let container = this.fltElms[i], host = this.hosts[i], placeholder = container && container.parentNode, icon = this.fltSpans[i], iconImg = this.fltIcons[i];
|
|
16973
17173
|
if (container) {
|
|
16974
|
-
|
|
17174
|
+
removeEvt(container, "click", this.boundHandlers.containerClick);
|
|
17175
|
+
if (container.parentNode) removeElm(container);
|
|
16975
17176
|
this.filtersCache[i] = container;
|
|
16976
17177
|
}
|
|
16977
17178
|
container = null;
|
|
16978
|
-
if (placeholder) removeElm(placeholder);
|
|
17179
|
+
if (placeholder && placeholder !== host && placeholder.parentNode) removeElm(placeholder);
|
|
16979
17180
|
placeholder = null;
|
|
16980
|
-
if (
|
|
17181
|
+
if (host) {
|
|
17182
|
+
if (this.ceEvt[i]) removeEvt(host, "open-change", this.ceEvt[i]);
|
|
17183
|
+
if (host.parentNode) removeElm(host);
|
|
17184
|
+
}
|
|
17185
|
+
if (icon && icon.parentNode) removeElm(icon);
|
|
16981
17186
|
icon = null;
|
|
16982
|
-
if (iconImg) removeElm(iconImg);
|
|
17187
|
+
if (iconImg && iconImg.parentNode) removeElm(iconImg);
|
|
16983
17188
|
iconImg = null;
|
|
16984
17189
|
}
|
|
16985
17190
|
this.fltElms = [];
|
|
16986
17191
|
this.fltSpans = [];
|
|
16987
17192
|
this.fltIcons = [];
|
|
17193
|
+
this.hosts = [];
|
|
17194
|
+
this.ceEvt = [];
|
|
17195
|
+
this.syncingCEOpen = false;
|
|
17196
|
+
this.activeFilterIdx = -1;
|
|
17197
|
+
removeEvt(root, "mouseup", this.boundHandlers.mouseup);
|
|
16988
17198
|
this.tf.externalFltIds = [];
|
|
16989
|
-
this.emitter.off(["before-filtering"],
|
|
16990
|
-
this.emitter.off(["after-filtering"],
|
|
16991
|
-
this.emitter.off(["cell-processed"],
|
|
16992
|
-
this.emitter.off(["filters-row-inserted"],
|
|
16993
|
-
this.emitter.off(["before-filter-init"],
|
|
17199
|
+
this.emitter.off(["before-filtering"], this.boundHandlers.beforeFiltering);
|
|
17200
|
+
this.emitter.off(["after-filtering"], this.boundHandlers.afterFiltering);
|
|
17201
|
+
this.emitter.off(["cell-processed"], this.boundHandlers.cellProcessed);
|
|
17202
|
+
this.emitter.off(["filters-row-inserted"], this.boundHandlers.filtersRowInserted);
|
|
17203
|
+
this.emitter.off(["before-filter-init"], this.boundHandlers.beforeFilterInit);
|
|
16994
17204
|
this.initialized = false;
|
|
16995
17205
|
}
|
|
16996
17206
|
};
|
|
@@ -18785,7 +18995,7 @@
|
|
|
18785
18995
|
* Current version
|
|
18786
18996
|
* @type {String}
|
|
18787
18997
|
*/
|
|
18788
|
-
this.version = "0.7.
|
|
18998
|
+
this.version = "0.7.15";
|
|
18789
18999
|
/**
|
|
18790
19000
|
* Current year
|
|
18791
19001
|
* @type {Number}
|