test-isc
Version:
An Ionic component similar to Ionic Select, that allows to search items, including async search, group, add, edit, delete items, and much more.
1 lines • 1.71 kB
JavaScript
System.register(["./p-901cf683.system.js","./p-efec1ef9.system.js"],(function(t){"use strict";var i,o,e,n,r,s;return{setters:[function(t){i=t.r;o=t.d;e=t.h;n=t.H;r=t.e},function(t){s=t.g}],execute:function(){var c=":host{display:block;-o-object-fit:contain;object-fit:contain}img{display:block;width:100%;height:100%;-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit}";var d=t("ion_img",function(){function t(t){var e=this;i(this,t);this.onLoad=function(){e.ionImgDidLoad.emit()};this.onError=function(){e.ionError.emit()};this.ionImgWillLoad=o(this,"ionImgWillLoad",7);this.ionImgDidLoad=o(this,"ionImgDidLoad",7);this.ionError=o(this,"ionError",7)}t.prototype.srcChanged=function(){this.addIO()};t.prototype.componentDidLoad=function(){this.addIO()};t.prototype.addIO=function(){var t=this;if(this.src===undefined){return}if("IntersectionObserver"in window){this.removeIO();this.io=new IntersectionObserver((function(i){if(i[0].isIntersecting){t.load();t.removeIO()}}));this.io.observe(this.el)}else{setTimeout((function(){return t.load()}),200)}};t.prototype.load=function(){this.loadError=this.onError;this.loadSrc=this.src;this.ionImgWillLoad.emit()};t.prototype.removeIO=function(){if(this.io){this.io.disconnect();this.io=undefined}};t.prototype.render=function(){return e(n,{class:s(this)},e("img",{decoding:"async",src:this.loadSrc,alt:this.alt,onLoad:this.onLoad,onError:this.loadError,part:"image"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:true,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{src:["srcChanged"]}},enumerable:true,configurable:true});return t}());d.style=c}}}));