suyiScreen/public/htWeb/lib/plugin/ht-quickfinder.js

1 line
1.8 KiB
JavaScript

!function(E,T){"use strict";var m="ht",Q=E[m],Y=function(z){return(/ble$/.test(z)||/ed$/.test(z)||Q.IsGetter[z]?"is":"get")+z.charAt(0).toUpperCase()+z.slice(1)};Q.QuickFinder=function(W,z,Q,J,e){var E=this;E.$9j={},E.$1j=W,E.$2j=z,E.$3j=Q,E.$4j=J||E.getValue,E.$5j=e||E.$5j,W.each(E.$7j,E),W.mm(E.$11j,E,!0),W.md(E.$12j,E,!0)},Q.Default.def(Q.QuickFinder,T,{$6j:"__ht__null__",getValueFunc:function(){return this.$4j},getFilterFunc:function(){return this.$5j},$11j:function(s){"add"===s.kind?this.$7j(s.data):"remove"===s.kind?this.$8j(s.data):"clear"===s.kind&&(this.$9j={})},$12j:function(Z){var H=this,m=H.$3j,J=H.$2j;if(H.$5j(Z.data)){if(null==m&&J===Z.property);else if("style"===m&&"s:"+J===Z.property);else if("attr"!==m||"a:"+J!==Z.property)return;var r=H.$10j(Z.oldValue);r&&r.remove(Z.data),H.$7j(Z.data)}},$10j:function(P){return P=null==P?this.$6j:P,this.$9j[P]},find:function(V){var $=this.$10j(V);return $?$.toList():new Q.List},findFirst:function(Y){var b=this.$10j(Y);return!b||b.isEmpty()?null:b.get(0)},$7j:function($){var G=this;if(G.$5j($)){var u=G.$4j($),W=G.$10j(u);W||(W=new Q.List,u=null==u?G.$6j:u,G.$9j[u]=W),W.add($)}},$8j:function(r){var u=this;if(u.$5j(r)){var Q=u.$4j(r),b=u.$10j(Q);b&&(b.remove(r),b.isEmpty()&&(Q=null==Q?u.$6j:Q,delete u.$9j[Q]))}},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(T){return null!=this.$3j||this.$4j!==this.getValue||T[Y(this.$2j)]?!0:!1},getValue:function(w){var L=this,n=L.$3j,T=L.$2j;return null==n?w[Y(T)]():"style"===n?w.s(T):"attr"===n?w.a(T):void 0}})}("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:(0,eval)("this"),Object);