ht-quickfinder.js 1.8 KB

1
  1. !function(y,u){"use strict";var N="ht",T=y[N],o=function(w){return(/ble$/.test(w)||/ed$/.test(w)||T.IsGetter[w]?"is":"get")+w.charAt(0).toUpperCase()+w.slice(1)};T.QuickFinder=function(C,A,X,B,i){var f=this;f.$9j={},f.$1j=C,f.$2j=A,f.$3j=X,f.$4j=B||f.getValue,f.$5j=i||f.$5j,C.each(f.$7j,f),C.mm(f.$11j,f,!0),C.md(f.$12j,f,!0)},T.Default.def(T.QuickFinder,u,{$6j:"__ht__null__",getValueFunc:function(){return this.$4j},getFilterFunc:function(){return this.$5j},$11j:function(V){"add"===V.kind?this.$7j(V.data):"remove"===V.kind?this.$8j(V.data):"clear"===V.kind&&(this.$9j={})},$12j:function(f){var q=this,d=q.$3j,i=q.$2j;if(q.$5j(f.data)){if(null==d&&i===f.property);else if("style"===d&&"s:"+i===f.property);else if("attr"!==d||"a:"+i!==f.property)return;var e=q.$10j(f.oldValue);e&&e.remove(f.data),q.$7j(f.data)}},$10j:function(C){return C=null==C?this.$6j:C,this.$9j[C]},find:function(F){var s=this.$10j(F);return s?s.toList():new T.List},findFirst:function(F){var T=this.$10j(F);return!T||T.isEmpty()?null:T.get(0)},$7j:function(y){var W=this;if(W.$5j(y)){var u=W.$4j(y),h=W.$10j(u);h||(h=new T.List,u=null==u?W.$6j:u,W.$9j[u]=h),h.add(y)}},$8j:function($){var W=this;if(W.$5j($)){var l=W.$4j($),V=W.$10j(l);V&&(V.remove($),V.isEmpty()&&(l=null==l?W.$6j:l,delete W.$9j[l]))}},dispose:function(){this.$1j.umm(this.$11j,this),this.$1j.umd(this.$12j,this),delete this.$1j},getDataModel:function(){return this.$1j},getAccessType:function(){return this.$3j},getPropertyName:function(){return this.$2j},$5j:function(C){return null!=this.$3j||this.$4j!==this.getValue||C[o(this.$2j)]?!0:!1},getValue:function(v){var G=this,j=G.$3j,u=G.$2j;return null==j?v[o(u)]():"style"===j?v.s(u):"attr"===j?v.a(u):void 0}})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:this,Object);