-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path21-es2015.f8694e54e21e7ffd5c71.js
1 lines (1 loc) · 8.69 KB
/
21-es2015.f8694e54e21e7ffd5c71.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{utt2:function(t,e,i){"use strict";i.r(e),i.d(e,"ion_action_sheet",(function(){return h}));var n=i("dSyh"),o=(i("AfW+"),i("aiEM"),i("+4pY")),a=i("pori"),s=i("Dl6n");const r=t=>{const e=Object(o.a)(),i=Object(o.a)(),n=Object(o.a)();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,.4),n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)"),e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([i,n])},c=t=>{const e=Object(o.a)(),i=Object(o.a)(),n=Object(o.a)();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.4,0),n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)"),e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([i,n])},d=t=>{const e=Object(o.a)(),i=Object(o.a)(),n=Object(o.a)();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.01,.32),n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(100%)","translateY(0%)"),e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation([i,n])},l=t=>{const e=Object(o.a)(),i=Object(o.a)(),n=Object(o.a)();return i.addElement(t.querySelector("ion-backdrop")).fromTo("opacity",.32,0),n.addElement(t.querySelector(".action-sheet-wrapper")).fromTo("transform","translateY(0%)","translateY(100%)"),e.addElement(t).easing("cubic-bezier(.36,.66,.04,1)").duration(450).addAnimation([i,n])},h=class{constructor(t){Object(n.l)(this,t),this.presented=!1,this.mode=Object(n.e)(this),this.keyboardClose=!0,this.buttons=[],this.backdropDismiss=!0,this.translucent=!1,this.animated=!0,this.onBackdropTap=()=>{this.dismiss(void 0,a.a)},this.dispatchCancelHandler=t=>{const e=t.detail.role;if(Object(a.j)(e)){const t=this.getButtons().find(t=>"cancel"===t.role);this.callButtonHandler(t)}},Object(a.e)(this.el),this.didPresent=Object(n.d)(this,"ionActionSheetDidPresent",7),this.willPresent=Object(n.d)(this,"ionActionSheetWillPresent",7),this.willDismiss=Object(n.d)(this,"ionActionSheetWillDismiss",7),this.didDismiss=Object(n.d)(this,"ionActionSheetDidDismiss",7)}present(){return Object(a.f)(this,"actionSheetEnter",r,d)}dismiss(t,e){return Object(a.g)(this,t,e,"actionSheetLeave",c,l)}onDidDismiss(){return Object(a.h)(this.el,"ionActionSheetDidDismiss")}onWillDismiss(){return Object(a.h)(this.el,"ionActionSheetWillDismiss")}async buttonClick(t){const e=t.role;return Object(a.j)(e)?this.dismiss(void 0,e):await this.callButtonHandler(t)?this.dismiss(void 0,t.role):Promise.resolve()}async callButtonHandler(t){return!t||!1!==await Object(a.p)(t.handler)}getButtons(){return this.buttons.map(t=>"string"==typeof t?{text:t}:t)}render(){const t=Object(n.e)(this),e=this.getButtons(),i=e.find(t=>"cancel"===t.role),o=e.filter(t=>"cancel"!==t.role);return Object(n.i)(n.a,{role:"dialog","aria-modal":"true",style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign(Object.assign({[t]:!0},Object(s.b)(this.cssClass)),{"action-sheet-translucent":this.translucent}),onIonActionSheetWillDismiss:this.dispatchCancelHandler,onIonBackdropTap:this.onBackdropTap},Object(n.i)("ion-backdrop",{tappable:this.backdropDismiss}),Object(n.i)("div",{class:"action-sheet-wrapper",role:"dialog"},Object(n.i)("div",{class:"action-sheet-container"},Object(n.i)("div",{class:"action-sheet-group"},void 0!==this.header&&Object(n.i)("div",{class:"action-sheet-title"},this.header,this.subHeader&&Object(n.i)("div",{class:"action-sheet-sub-title"},this.subHeader)),o.map(e=>Object(n.i)("button",{type:"button","ion-activatable":!0,class:m(e),onClick:()=>this.buttonClick(e)},Object(n.i)("span",{class:"action-sheet-button-inner"},e.icon&&Object(n.i)("ion-icon",{icon:e.icon,lazy:!1,class:"action-sheet-icon"}),e.text),"md"===t&&Object(n.i)("ion-ripple-effect",null)))),i&&Object(n.i)("div",{class:"action-sheet-group action-sheet-group-cancel"},Object(n.i)("button",{type:"button",class:m(i),onClick:()=>this.buttonClick(i)},Object(n.i)("span",{class:"action-sheet-button-inner"},i.icon&&Object(n.i)("ion-icon",{icon:i.icon,lazy:!1,class:"action-sheet-icon"}),i.text))))))}get el(){return Object(n.f)(this)}static get style(){return".sc-ion-action-sheet-md-h{--color:initial;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;font-family:var(--ion-font-family,inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-md-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-md{left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-wrapper.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-button.sc-ion-action-sheet-md{display:block;width:100%;border:0;outline:none;font-family:inherit}.action-sheet-button.activated.sc-ion-action-sheet-md{background:var(--background-activated)}.action-sheet-button-inner.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.action-sheet-container.sc-ion-action-sheet-md{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-md{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-md::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-md{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-selected.sc-ion-action-sheet-md{background:var(--background-selected)}.sc-ion-action-sheet-md-h{--background:var(--ion-overlay-background-color,var(--ion-background-color,#fff));--background-selected:var(--background,);--background-activated:var(--background)}.action-sheet-title.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:20px;padding-bottom:17px;height:60px;color:var(--color,rgba(var(--ion-text-color-rgb,0,0,0),.54));font-size:16px;text-align:start}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-title.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-sub-title.sc-ion-action-sheet-md{padding-left:0;padding-right:0;padding-top:16px;padding-bottom:0;font-size:14px}.action-sheet-group.sc-ion-action-sheet-md:first-child{padding-top:0}.action-sheet-group.sc-ion-action-sheet-md:last-child{padding-bottom:0}.action-sheet-button.sc-ion-action-sheet-md{padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:0;position:relative;height:52px;background:transparent;color:var(--color,var(--ion-color-step-850,#262626));font-size:16px;text-align:start;contain:strict;overflow:hidden}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-button.sc-ion-action-sheet-md{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.action-sheet-icon.sc-ion-action-sheet-md{padding-bottom:4px;margin-left:0;margin-right:32px;margin-top:0;margin-bottom:0;color:var(--color,rgba(var(--ion-text-color-rgb,0,0,0),.54));font-size:24px}@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-icon.sc-ion-action-sheet-md{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:32px;margin-inline-end:32px}}.action-sheet-button-inner.sc-ion-action-sheet-md{-ms-flex-pack:start;justify-content:flex-start}.action-sheet-selected.sc-ion-action-sheet-md{font-weight:700}"}},m=t=>Object.assign({"action-sheet-button":!0,"ion-activatable":!0,[`action-sheet-${t.role}`]:void 0!==t.role},Object(s.b)(t.cssClass))}}]);