Files
doneit-web/_platforms/browser/www/592-es5.f0e538689ad44d5f1419.js
T

1 line
16 KiB
JavaScript
Raw Normal View History

2021-08-18 18:58:02 +01:00
!function(){function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(i,r)}function n(e){return function(){var n=this,i=arguments;return new Promise(function(r,o){var a=e.apply(n,i);function s(e){t(a,r,o,s,l,"next",e)}function l(e){t(a,r,o,s,l,"throw",e)}s(void 0)})}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[592],{20592:function(t,r,a){"use strict";a.r(r),a.d(r,{ion_select:function(){return h},ion_select_option:function(){return w},ion_select_popover:function(){return O}});var s=a(31667),l=a(36177),c=a(13772),u=a(46331),d=a(61269),p=function(e,t){if(1===e.nodeType)return(e.tagName===t.toUpperCase()?[e]:Array.from(e.querySelectorAll(t))).find(function(t){return t.value===e.value})},h=function(){function t(e){var n=this;i(this,t),(0,s.r)(this,e),this.ionChange=(0,s.e)(this,"ionChange",7),this.ionCancel=(0,s.e)(this,"ionCancel",7),this.ionFocus=(0,s.e)(this,"ionFocus",7),this.ionBlur=(0,s.e)(this,"ionBlur",7),this.ionStyle=(0,s.e)(this,"ionStyle",7),this.inputId="ion-sel-"+x++,this.didInit=!1,this.isExpanded=!1,this.disabled=!1,this.cancelText="Cancel",this.okText="OK",this.name=this.inputId,this.multiple=!1,this.interface="alert",this.interfaceOptions={},this.onClick=function(e){n.setFocus(),n.open(e)},this.onFocus=function(){n.ionFocus.emit()},this.onBlur=function(){n.ionBlur.emit()}}var r,a,h,b,y;return o(t,[{key:"disabledChanged",value:function(){this.emitStyle()}},{key:"valueChanged",value:function(){this.emitStyle(),this.didInit&&this.ionChange.emit({value:this.value})}},{key:"connectedCallback",value:(y=n(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.updateOverlayOptions(),this.emitStyle(),this.mutationO=function(e,t,n){if("undefined"!=typeof MutationObserver){var i=new MutationObserver(function(e){n(function(e,t){var n;e.forEach(function(e){for(var t=0;t<e.addedNodes.length;t++)n=p(e.addedNodes[t],"ion-select-option")||n})}(e))});return i.observe(e,{childList:!0,subtree:!0}),i}}(this.el,0,n(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.updateOverlayOptions();case 1:case"end":return e.stop()}},e)})));case 1:case"end":return e.stop()}},e,this)})),function(){return y.apply(this,arguments)})},{key:"disconnectedCallback",value:function(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0)}},{key:"componentDidLoad",value:function(){this.didInit=!0}},{key:"open",value:(b=n(regeneratorRuntime.mark(function e(t){var n,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.disabled&&!this.isExpanded){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.createOverlay(t);case 4:return n=this.overlay=e.sent,this.isExpanded=!0,n.onDidDismiss().then(function(){i.overlay=void 0,i.isExpanded=!1,i.setFocus()}),e.next=9,n.present();case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}},e,this)})),function(e){return b.apply(this,arguments)})},{key:"createOverlay",value:function(e){var t=this.interface;return"action-sheet"!==t&&"popover"!==t||!this.multiple||(console.warn('Select interface cannot be "'.concat(t,'" with a multi-value select. Using the "alert" interface instead.')),t="alert"),"popover"!==t||e||(console.warn('Select interface cannot be a "popover" without passing an event. Using the "alert" interface instead.'),t="alert"),"popover"===t?this.openPopover(e):"action-sheet"===t?this.openActionSheet():this.openAlert()}},{key:"updateOverlayOptions",value:function