Files
doneit-web/_platforms/browser/www/3122-es5.90da7f5c511774c99adf.js
T

1 line
6.8 KiB
JavaScript
Raw Normal View History

2021-08-18 18:58:02 +01:00
!function(){function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t,r,n,i,o,s){try{var l=e[o](s),a=l.value}catch(c){return void r(c)}l.done?t(a):Promise.resolve(a).then(n,i)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[3122],{83122:function(n,o,s){"use strict";s.r(o),s.d(o,{ion_reorder:function(){return h},ion_reorder_group:function(){return u}});var l=s(31667),a=s(36177),c=s(52954),h=function(){function e(t){r(this,e),(0,l.r)(this,t)}return i(e,[{key:"onClick",value:function(e){var t=this.el.closest("ion-reorder-group");e.preventDefault(),t&&t.disabled||e.stopImmediatePropagation()}},{key:"render",value:function(){var e=(0,a.b)(this);return(0,l.h)(l.H,{class:e},(0,l.h)("slot",null,(0,l.h)("ion-icon",{name:"ios"===e?"reorder-three-outline":"reorder-two-sharp",lazy:!1,class:"reorder-icon",part:"icon"})))}},{key:"el",get:function(){return(0,l.i)(this)}}]),e}();h.style={ios:":host([slot]){display:none;line-height:0;z-index:100}.reorder-icon{display:block;font-size:22px}.reorder-icon{font-size:34px;opacity:0.4}",md:":host([slot]){display:none;line-height:0;z-index:100}.reorder-icon{display:block;font-size:22px}.reorder-icon{font-size:31px;opacity:0.3}"};var u=function(){function n(e){r(this,n),(0,l.r)(this,e),this.ionItemReorder=(0,l.e)(this,"ionItemReorder",7),this.lastToIndex=-1,this.cachedHeights=[],this.scrollElTop=0,this.scrollElBottom=0,this.scrollElInitial=0,this.containerTop=0,this.containerBottom=0,this.state=0,this.disabled=!0}var o,h;return i(n,[{key:"disabledChanged",value:function(){this.gesture&&this.gesture.enable(!this.disabled)}},{key:"connectedCallback",value:(o=regeneratorRuntime.mark(function e(){var t,r=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.el.closest("ion-content"),e.t0=t,!e.t0){e.next=6;break}return e.next=5,t.getScrollElement();case 5:this.scrollEl=e.sent;case 6:return e.next=8,Promise.resolve().then(s.bind(s,97279));case 8:this.gesture=e.sent.createGesture({el:this.el,gestureName:"reorder",gesturePriority:110,threshold:0,direction:"y",passive:!1,canStart:function(e){return r.canStart(e)},onStart:function(e){return r.onStart(e)},onMove:function(e){return r.onMove(e)},onEnd:function(){return r.onEnd()}}),this.disabledChanged();case 10:case"end":return e.stop()}},e,this)}),h=function(){var e=this,r=arguments;return new Promise(function(n,i){var s=o.apply(e,r);function l(e){t(s,n,i,l,a,"next",e)}function a(e){t(s,n,i,l,a,"throw",e)}l(void 0)})},function(){return h.apply(this,arguments)})},{key:"disconnectedCallback",value:function(){this.onEnd(),this.gesture&&(this.gesture.destroy(),this.gesture=void 0)}},{key:"complete",value:function(e){return Promise.resolve(this.completeSync(e))}},{key:"canStart",value:function(e){if(this.selectedItemEl||0!==this.state)return!1;var t=e.event.target.closest("ion-reorder");if(!t)return!1;var r=f(t,this.el);return!!r&&(e.data=r,!0)}},{key:"onStart",value:function(e){e.event.preventDefault();var t=this.selectedItemEl=e.data,r=this.cachedHeights;r.length=0;var n=this.el,i=n.children;if(i&&0!==i.length){for(var o=0,s=0;s<i.length;s++){var l=i[s];o+=l.offsetHeight,r.push(o),l.$ionIndex=s}var a=n.getBoundingClientRect();if(this.containerTop=a.top,this.containerBottom=a.bottom,this.scrollEl){var h=this.scrollEl.getBoundingClientRect();this.scrollElInitial=this.scrollEl.scrollTop,this.scrollElTop=h.top+v,this.scrollElBottom=h.bottom-v}else this.scrollElInitial=0,this.scrollElTop=0,this.scrollElBottom=0;this.lastToIndex=d(t),this.selectedItemHeight=t.offsetHeight,this.state=1,t.classList.add(p),(0,c.a)()}}},{key:"onMove",value:function(e){var t=this.selectedItemEl;if(t){var r=this.autoscroll(e.curr