2021-01-15 15:31:43 +01:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
function _createForOfIteratorHelper ( o , allowArrayLike ) { var it ; if ( typeof Symbol === "undefined" || o [ Symbol . iterator ] == null ) { if ( Array . isArray ( o ) || ( it = _unsupportedIterableToArray ( o ) ) || allowArrayLike && o && typeof o . length === "number" ) { if ( it ) o = it ; var i = 0 ; var F = function F ( ) { } ; return { s : F , n : function n ( ) { if ( i >= o . length ) return { done : true } ; return { done : false , value : o [ i ++ ] } ; } , e : function e ( _e ) { throw _e ; } , f : F } ; } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ; } var normalCompletion = true , didErr = false , err ; return { s : function s ( ) { it = o [ Symbol . iterator ] ( ) ; } , n : function n ( ) { var step = it . next ( ) ; normalCompletion = step . done ; return step ; } , e : function e ( _e2 ) { didErr = true ; err = _e2 ; } , f : function f ( ) { try { if ( ! normalCompletion && it [ "return" ] != null ) it [ "return" ] ( ) ; } finally { if ( didErr ) throw err ; } } } ; }
function _unsupportedIterableToArray ( o , minLen ) { if ( ! o ) return ; if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ; var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ; if ( n === "Object" && o . constructor ) n = o . constructor . name ; if ( n === "Map" || n === "Set" ) return Array . from ( o ) ; if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ; }
function _arrayLikeToArray ( arr , len ) { if ( len == null || len > arr . length ) len = arr . length ; for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; }
function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( "Cannot call a class as a function" ) ; } }
function _defineProperties ( target , props ) { for ( var i = 0 ; i < props . length ; i ++ ) { var descriptor = props [ i ] ; descriptor . enumerable = descriptor . enumerable || false ; descriptor . configurable = true ; if ( "value" in descriptor ) descriptor . writable = true ; Object . defineProperty ( target , descriptor . key , descriptor ) ; } }
function _createClass ( Constructor , protoProps , staticProps ) { if ( protoProps ) _defineProperties ( Constructor . prototype , protoProps ) ; if ( staticProps ) _defineProperties ( Constructor , staticProps ) ; return Constructor ; }
( window [ "webpackJsonp" ] = window [ "webpackJsonp" ] || [ ] ) . push ( [ [ 1 ] , {
/***/
"./node_modules/@ionic/core/dist/esm/ion-alert.entry.js" :
/*!**************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/ion-alert.entry.js ***!
\**************************************************************/
/*! exports provided: ion_alert */
/***/
function node _modulesIonicCoreDistEsmIonAlertEntryJs ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ion_alert" , function ( ) {
return Alert ;
} ) ;
/* harmony import */
2021-02-24 10:42:01 +01:00
var _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ (
/*! ./index-e806d1f6.js */
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _ionic _global _9d5c8ee3 _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ (
/*! ./ionic-global-9d5c8ee3.js */
"./node_modules/@ionic/core/dist/esm/ionic-global-9d5c8ee3.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _helpers _90f46169 _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ (
/*! ./helpers-90f46169.js */
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ (
/*! ./animation-54fe0237.js */
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _gesture _controller _31cb6bb9 _js _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ (
/*! ./gesture-controller-31cb6bb9.js */
"./node_modules/@ionic/core/dist/esm/gesture-controller-31cb6bb9.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _index _f49d994d _js _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ (
/*! ./index-f49d994d.js */
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _index _9e3fe806 _js _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ (
/*! ./index-9e3fe806.js */
"./node_modules/@ionic/core/dist/esm/index-9e3fe806.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _hardware _back _button _4a6b37fb _js _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ (
/*! ./hardware-back-button-4a6b37fb.js */
"./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ (
/*! ./overlays-12c20431.js */
"./node_modules/@ionic/core/dist/esm/overlays-12c20431.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _haptic _27b3f981 _js _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ (
/*! ./haptic-27b3f981.js */
"./node_modules/@ionic/core/dist/esm/haptic-27b3f981.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _button _active _a6787d69 _js _ _WEBPACK _IMPORTED _MODULE _10 _ _ = _ _webpack _require _ _ (
/*! ./button-active-a6787d69.js */
"./node_modules/@ionic/core/dist/esm/button-active-a6787d69.js" ) ;
2021-01-15 15:31:43 +01:00
/* harmony import */
2021-02-24 10:42:01 +01:00
var _theme _ff3fc52f _js _ _WEBPACK _IMPORTED _MODULE _11 _ _ = _ _webpack _require _ _ (
/*! ./theme-ff3fc52f.js */
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js" ) ;
2021-01-15 15:31:43 +01:00
/**
* iOS Alert Enter Animation
*/
var iosEnterAnimation = function iosEnterAnimation ( baseEl ) {
2021-02-24 10:42:01 +01:00
var baseAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var backdropAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var wrapperAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
2021-01-15 15:31:43 +01:00
backdropAnimation . addElement ( baseEl . querySelector ( 'ion-backdrop' ) ) . fromTo ( 'opacity' , 0.01 , 'var(--backdrop-opacity)' ) . beforeStyles ( {
'pointer-events' : 'none'
} ) . afterClearStyles ( [ 'pointer-events' ] ) ;
wrapperAnimation . addElement ( baseEl . querySelector ( '.alert-wrapper' ) ) . keyframes ( [ {
offset : 0 ,
opacity : '0.01' ,
transform : 'scale(1.1)'
} , {
offset : 1 ,
opacity : '1' ,
transform : 'scale(1)'
} ] ) ;
return baseAnimation . addElement ( baseEl ) . easing ( 'ease-in-out' ) . duration ( 200 ) . addAnimation ( [ backdropAnimation , wrapperAnimation ] ) ;
} ;
/**
* iOS Alert Leave Animation
*/
var iosLeaveAnimation = function iosLeaveAnimation ( baseEl ) {
2021-02-24 10:42:01 +01:00
var baseAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var backdropAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var wrapperAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
2021-01-15 15:31:43 +01:00
backdropAnimation . addElement ( baseEl . querySelector ( 'ion-backdrop' ) ) . fromTo ( 'opacity' , 'var(--backdrop-opacity)' , 0 ) ;
wrapperAnimation . addElement ( baseEl . querySelector ( '.alert-wrapper' ) ) . keyframes ( [ {
offset : 0 ,
opacity : 0.99 ,
transform : 'scale(1)'
} , {
offset : 1 ,
opacity : 0 ,
transform : 'scale(0.9)'
} ] ) ;
return baseAnimation . addElement ( baseEl ) . easing ( 'ease-in-out' ) . duration ( 200 ) . addAnimation ( [ backdropAnimation , wrapperAnimation ] ) ;
} ;
/**
* Md Alert Enter Animation
*/
var mdEnterAnimation = function mdEnterAnimation ( baseEl ) {
2021-02-24 10:42:01 +01:00
var baseAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var backdropAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var wrapperAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
2021-01-15 15:31:43 +01:00
backdropAnimation . addElement ( baseEl . querySelector ( 'ion-backdrop' ) ) . fromTo ( 'opacity' , 0.01 , 'var(--backdrop-opacity)' ) . beforeStyles ( {
'pointer-events' : 'none'
} ) . afterClearStyles ( [ 'pointer-events' ] ) ;
wrapperAnimation . addElement ( baseEl . querySelector ( '.alert-wrapper' ) ) . keyframes ( [ {
offset : 0 ,
opacity : '0.01' ,
transform : 'scale(0.9)'
} , {
offset : 1 ,
opacity : '1' ,
transform : 'scale(1)'
} ] ) ;
return baseAnimation . addElement ( baseEl ) . easing ( 'ease-in-out' ) . duration ( 150 ) . addAnimation ( [ backdropAnimation , wrapperAnimation ] ) ;
} ;
/**
* Md Alert Leave Animation
*/
var mdLeaveAnimation = function mdLeaveAnimation ( baseEl ) {
2021-02-24 10:42:01 +01:00
var baseAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var backdropAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
var wrapperAnimation = Object ( _animation _54fe0237 _js _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "c" ] ) ( ) ;
2021-01-15 15:31:43 +01:00
backdropAnimation . addElement ( baseEl . querySelector ( 'ion-backdrop' ) ) . fromTo ( 'opacity' , 'var(--backdrop-opacity)' , 0 ) ;
wrapperAnimation . addElement ( baseEl . querySelector ( '.alert-wrapper' ) ) . fromTo ( 'opacity' , 0.99 , 0 ) ;
return baseAnimation . addElement ( baseEl ) . easing ( 'ease-in-out' ) . duration ( 150 ) . addAnimation ( [ backdropAnimation , wrapperAnimation ] ) ;
} ;
2021-02-24 10:42:01 +01:00
var alertIosCss = ".sc-ion-alert-ios-h{--min-width:250px;--width:auto;--min-height:auto;--height:auto;--max-height:90%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-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-alert-ios-h{display:none}.alert-top.sc-ion-alert-ios-h{padding-top:50px;-ms-flex-align:start;align-items:flex-start}.alert-wrapper.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;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);background:var(--background);contain:content;opacity:0;z-index:10}.alert-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}.alert-sub-title.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-weight:normal}.alert-message.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-y:auto;overscroll-behavior-y:contain}.alert-checkbox-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-radio-group.sc-ion-alert-ios::-webkit-scrollbar,.alert-message.sc-ion-alert-ios::-webkit-scrollbar{display:none}.alert-input.sc-ion-alert-ios{padding-left:0;padding-right:0;padding-top:10px;padding-bottom:10px;width:100%;border:0;background:inherit;font:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.alert-button-group.sc-ion-alert-ios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}.alert-button-group-vertical.sc-ion-alert-ios{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.alert-button.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;border:0;font-size:14px;line-height:20px;z-index:0}.alert-button.ion-focused.sc-ion-alert-ios,.alert-tappable.ion-focused.sc-ion-alert-ios{background:var(--ion-color-step-100, #e6e6e6)}.alert-button-inner.sc-ion-alert-ios{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%}.alert-input-disabled.sc-ion-alert-ios,.alert-checkbox-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios,.alert-radio-button-disabled.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{cursor:default;opacity:0.5;pointer-events:none}.alert-tappable.sc-ion-alert-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:-ms-flexbox;display:flex;width:100%;border:0;background:transparent;font-size:inherit;line-height:initial;text-align:start;-webkit-appearance:none;-moz-appearance:none;appearance:none;contain:strict}.alert-button.sc-ion-alert-ios,.alert-checkbox.sc-ion-alert-ios,.alert-input.sc-ion-alert-ios,.alert-radio.sc-ion-alert-ios{outline:none}.alert-radio-icon.sc-ion-alert-ios,.alert-checkbox-icon.sc-ion-alert-ios,.alert-checkbox-inner.sc-ion-alert-ios{-webkit-box-sizing:border-box;box-sizing:border-box}textarea.alert-input.sc-ion-alert-ios{min-height:37px;resize:none}.sc-ion-alert-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--max-width:270px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);font-size:14px}.alert-wrapper.sc-ion-alert-ios{border-radius:13px;-webkit-box-shadow:none;box-shadow:none;overflow:hidden}.alert-button.sc-ion-alert-ios .alert-button-inner.sc-ion-alert-ios{pointer-events:none}@supports ((-webkit-ba
var alertMdCss = " . sc - ion - alert - md - h { -- min - width : 250 px ; -- width : auto ; -- min - height : auto ; -- height : auto ; -- max - height : 90 % ; - moz - osx - font - smoothing : grayscale ; - webkit - font - smoothing : antialiased ; left : 0 ; right : 0 ; top : 0 ; bottom : 0 ; display : - ms - flexbox ; display : flex ; position : absolute ; - ms - flex - align : center ; align - items : center ; - ms - flex - pack : center ; justify - content : center ; outline : none ; font - family : var ( -- ion - font - family , inherit ) ; contain : strict ; - 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 - alert - md - h { display : none } . alert - top . sc - ion - alert - md - h { padding - top : 50 px ; - ms - flex - align : start ; align - items : flex - start } . alert - wrapper . sc - ion - alert - md { display : - ms - flexbox ; display : flex ; - ms - flex - direction : column ; flex - direction : column ; 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 ) ; background : var ( -- background ) ; contain : content ; opacity : 0 ; z - index : 10 } . alert - title . sc - ion - alert - md { margin - left : 0 ; margin - right : 0 ; margin - top : 0 ; margin - bottom : 0 ; padding - left : 0 ; padding - right : 0 ; padding - top : 0 ; padding - bottom : 0 } . alert - sub - title . sc - ion - alert - md { margin - left : 0 ; margin - right : 0 ; margin - top : 5 px ; margin - bottom : 0 ; padding - left : 0 ; padding - right : 0 ; padding - top : 0 ; padding - bottom : 0 ; font - weight : normal } . alert - message . sc - ion - alert - md { - webkit - box - sizing : border - box ; box - sizing : border - box ; - webkit - overflow - scrolling : touch ; overflow - y : auto ; overscroll - behavior - y : contain } . alert - checkbox - group . sc - ion - alert - md : : - webkit - scrollbar , . alert - radio - group . sc - ion - alert - md : : - webkit - scrollbar , . alert - message . sc - ion - alert - md : : - webkit - scrollbar { display : none } . alert - input . sc - ion - alert - md { padding - left : 0 ; padding - right : 0 ; padding - top : 10 px ; padding - bottom : 10 px ; width : 100 % ; border : 0 ; background : inherit ; font : inherit ; - webkit - box - sizing : border - box ; box - sizing : border - box } . alert - button - group . sc - ion - alert - md { display : - ms - flexbox ; display : flex ; - ms - flex - direction : row ; flex - direction : row ; width : 100 % } . alert - button - group - vertical . sc - ion - alert - md { - ms - flex - direction : column ; flex - direction : column ; - ms - flex - wrap : nowrap ; flex - wrap : nowrap } . alert - button . sc - ion - alert - md { margin - left : 0 ; margin - right : 0 ; margin - top : 0 ; margin - bottom : 0 ; display : block ; border : 0 ; font - size : 14 px ; line - height : 20 px ; z - index : 0 } . alert - button . ion - focused . sc - ion - alert - md , . alert - tappable . ion - focused . sc - ion - alert - md { background : var ( -- ion - color - step - 100 , # e6e6e6 ) } . alert - button - inner . sc - ion - alert - 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 % } . alert - input - disabled . sc - ion - alert - md , . alert - checkbox - button - disabled . sc - ion - alert - md . alert - button - inner . sc - ion - alert - md , . alert - radio - button - disabled . sc - ion - alert - md . alert - button - inner . sc - ion - alert - md { cursor : default ; opacity : 0.5 ; pointer - events : none } . alert - tappable . sc - ion - alert - md { margin - left : 0 ; margin - right : 0 ; margin - top : 0 ; margin - bottom : 0 ; padding - left : 0 ; padding - right : 0 ; padding - top : 0 ; padding - bottom : 0 ; display : - ms - flexbox ; display : flex ; width : 100 % ; border : 0 ; background : transparent ; font - size : inherit ; line - height : initial ; text - align : start ; - webkit - appearance : none ; - moz - appearance : none ; appearance : none ; contain : strict } . alert - button . sc - ion - alert - md , . alert - checkbox . sc - ion - alert - md , . alert - input . sc - ion - alert - md , . alert - radio . sc - ion - alert - md { outline : none } . alert - radio - icon . sc - ion - alert - md , . alert - checkbox - icon . sc - ion - alert - md , . alert - checkbox - inner . sc - ion - alert - md { - webkit - box - sizing : border - box ; box - sizing : border - box } textarea . alert - input . sc - ion - alert - md { min - height : 37 px ; resize : none } . sc - ion - alert - md - h { -- background : var ( -- ion - overlay - background - color , var ( -- ion - background - color , # fff ) ) ; -- max - width : 280 px ; -- backdrop - opacity : var ( -- ion - backdrop - opacity , 0.32 ) ; font - size : 14 px } . alert - wrapper . sc - ion - alert - md { border - radius : 4 px ; - webkit - box - shadow : 0 11 px 15 px - 7 px rgba ( 0 , 0 , 0 , 0.2 ) , 0 24 px 38 px 3 px rgba ( 0 , 0 , 0 , 0.14 ) , 0 9 px 46 px 8 px rgba ( 0 , 0 , 0 , 0.12 ) ; box - shadow : 0 11 px 15 px - 7 px rgba ( 0 , 0 , 0 , 0.2 ) , 0 24 px 38 px 3 px rgba ( 0 , 0
2021-01-15 15:31:43 +01:00
var Alert = /*#__PURE__*/ function ( ) {
function Alert ( hostRef ) {
var _this = this ;
_classCallCheck ( this , Alert ) ;
2021-02-24 10:42:01 +01:00
Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "r" ] ) ( this , hostRef ) ;
this . didPresent = Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "e" ] ) ( this , "ionAlertDidPresent" , 7 ) ;
this . willPresent = Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "e" ] ) ( this , "ionAlertWillPresent" , 7 ) ;
this . willDismiss = Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "e" ] ) ( this , "ionAlertWillDismiss" , 7 ) ;
this . didDismiss = Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "e" ] ) ( this , "ionAlertDidDismiss" , 7 ) ;
2021-01-15 15:31:43 +01:00
this . processedInputs = [ ] ;
this . processedButtons = [ ] ;
this . presented = false ;
/**
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
*/
this . keyboardClose = true ;
/**
* Array of buttons to be added to the alert.
*/
this . buttons = [ ] ;
/**
* Array of input to show in the alert.
*/
this . inputs = [ ] ;
/**
* If `true`, the alert will be dismissed when the backdrop is clicked.
*/
this . backdropDismiss = true ;
/**
* If `true`, the alert will be translucent.
* Only applies when the mode is `"ios"` and the device supports
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
*/
this . translucent = false ;
/**
* If `true`, the alert will animate.
*/
this . animated = true ;
this . onBackdropTap = function ( ) {
2021-02-24 10:42:01 +01:00
_this . dismiss ( undefined , _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "B" ] ) ;
2021-01-15 15:31:43 +01:00
} ;
this . dispatchCancelHandler = function ( ev ) {
var role = ev . detail . role ;
2021-02-24 10:42:01 +01:00
if ( Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "i" ] ) ( role ) ) {
2021-01-15 15:31:43 +01:00
var cancelButton = _this . processedButtons . find ( function ( b ) {
return b . role === 'cancel' ;
} ) ;
_this . callButtonHandler ( cancelButton ) ;
}
} ;
}
_createClass ( Alert , [ {
2021-02-24 10:42:01 +01:00
key : "onKeydown" ,
value : function onKeydown ( ev ) {
var inputTypes = new Set ( this . processedInputs . map ( function ( i ) {
return i . type ;
} ) ) ; // The only inputs we want to navigate between using arrow keys are the radios
// ignore the keydown event if it is not on a radio button
if ( ! inputTypes . has ( 'radio' ) || ev . target && ! this . el . contains ( ev . target ) || ev . target . classList . contains ( 'alert-button' ) ) {
return ;
} // Get all radios inside of the radio group and then
// filter out disabled radios since we need to skip those
var query = this . el . querySelectorAll ( '.alert-radio' ) ;
var radios = Array . from ( query ) . filter ( function ( radio ) {
return ! radio . disabled ;
} ) ; // The focused radio is the one that shares the same id as
// the event target
var index = radios . findIndex ( function ( radio ) {
return radio . id === ev . target . id ;
} ) ; // We need to know what the next radio element should
// be in order to change the focus
var nextEl ; // If hitting arrow down or arrow right, move to the next radio
// If we're on the last radio, move to the first radio
if ( [ 'ArrowDown' , 'ArrowRight' ] . includes ( ev . code ) ) {
nextEl = index === radios . length - 1 ? radios [ 0 ] : radios [ index + 1 ] ;
} // If hitting arrow up or arrow left, move to the previous radio
// If we're on the first radio, move to the last radio
if ( [ 'ArrowUp' , 'ArrowLeft' ] . includes ( ev . code ) ) {
nextEl = index === 0 ? radios [ radios . length - 1 ] : radios [ index - 1 ] ;
}
if ( nextEl && radios . includes ( nextEl ) ) {
var nextProcessed = this . processedInputs . find ( function ( input ) {
return input . id === ( nextEl === null || nextEl === void 0 ? void 0 : nextEl . id ) ;
} ) ;
if ( nextProcessed ) {
this . rbClick ( nextProcessed ) ;
nextEl . focus ( ) ;
}
}
}
} , {
2021-01-15 15:31:43 +01:00
key : "buttonsChanged" ,
value : function buttonsChanged ( ) {
var buttons = this . buttons ;
this . processedButtons = buttons . map ( function ( btn ) {
return typeof btn === 'string' ? {
text : btn ,
role : btn . toLowerCase ( ) === 'cancel' ? 'cancel' : undefined
} : btn ;
} ) ;
}
} , {
key : "inputsChanged" ,
value : function inputsChanged ( ) {
var _this2 = this ;
2021-02-24 10:42:01 +01:00
var inputs = this . inputs ; // Get the first input that is not disabled and the checked one
// If an enabled checked input exists, set it to be the focusable input
// otherwise we default to focus the first input
// This will only be used when the input is type radio
var first = inputs . find ( function ( input ) {
return ! input . disabled ;
} ) ;
var checked = inputs . find ( function ( input ) {
return input . checked && ! input . disabled ;
} ) ;
var focusable = checked || first ; // An alert can be created with several different inputs. Radios,
2021-01-15 15:31:43 +01:00
// checkboxes and inputs are all accepted, but they cannot be mixed.
var inputTypes = new Set ( inputs . map ( function ( i ) {
return i . type ;
} ) ) ;
if ( inputTypes . has ( 'checkbox' ) && inputTypes . has ( 'radio' ) ) {
console . warn ( "Alert cannot mix input types: " . concat ( Array . from ( inputTypes . values ( ) ) . join ( '/' ) , ". Please see alert docs for more info." ) ) ;
}
this . inputType = inputTypes . values ( ) . next ( ) . value ;
this . processedInputs = inputs . map ( function ( i , index ) {
return {
type : i . type || 'text' ,
name : i . name || "" . concat ( index ) ,
placeholder : i . placeholder || '' ,
value : i . value ,
label : i . label ,
checked : ! ! i . checked ,
disabled : ! ! i . disabled ,
id : i . id || "alert-input-" . concat ( _this2 . overlayIndex , "-" ) . concat ( index ) ,
handler : i . handler ,
min : i . min ,
max : i . max ,
cssClass : i . cssClass || '' ,
2021-02-24 10:42:01 +01:00
attributes : i . attributes || { } ,
tabindex : i . type === 'radio' && i !== focusable ? - 1 : 0
2021-01-15 15:31:43 +01:00
} ;
} ) ;
}
} , {
key : "connectedCallback" ,
value : function connectedCallback ( ) {
2021-02-24 10:42:01 +01:00
Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "e" ] ) ( this . el ) ;
2021-01-15 15:31:43 +01:00
}
} , {
key : "componentWillLoad" ,
value : function componentWillLoad ( ) {
this . inputsChanged ( ) ;
this . buttonsChanged ( ) ;
}
} , {
2021-02-24 10:42:01 +01:00
key : "disconnectedCallback" ,
value : function disconnectedCallback ( ) {
2021-01-15 15:31:43 +01:00
if ( this . gesture ) {
this . gesture . destroy ( ) ;
this . gesture = undefined ;
}
}
} , {
key : "componentDidLoad" ,
value : function componentDidLoad ( ) {
/**
* Do not create gesture if:
* 1. A gesture already exists
* 2. App is running in MD mode
* 3. A wrapper ref does not exist
*/
2021-02-24 10:42:01 +01:00
if ( this . gesture || Object ( _ionic _global _9d5c8ee3 _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "b" ] ) ( this ) === 'md' || ! this . wrapperEl ) {
2021-01-15 15:31:43 +01:00
return ;
}
2021-02-24 10:42:01 +01:00
this . gesture = Object ( _button _active _a6787d69 _js _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "c" ] ) ( this . wrapperEl , function ( refEl ) {
2021-01-15 15:31:43 +01:00
return refEl . classList . contains ( 'alert-button' ) ;
} ) ;
this . gesture . enable ( true ) ;
}
/**
* Present the alert overlay after it has been created.
*/
} , {
key : "present" ,
value : function present ( ) {
2021-02-24 10:42:01 +01:00
return Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "d" ] ) ( this , 'alertEnter' , iosEnterAnimation , mdEnterAnimation ) ;
2021-01-15 15:31:43 +01:00
}
/**
* Dismiss the alert overlay after it has been presented.
*
* @param data Any data to emit in the dismiss events.
* @param role The role of the element that is dismissing the alert.
* This can be useful in a button handler for determining which button was
* clicked to dismiss the alert.
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
*/
} , {
key : "dismiss" ,
value : function dismiss ( data , role ) {
2021-02-24 10:42:01 +01:00
return Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "f" ] ) ( this , data , role , 'alertLeave' , iosLeaveAnimation , mdLeaveAnimation ) ;
2021-01-15 15:31:43 +01:00
}
/**
* Returns a promise that resolves when the alert did dismiss.
*/
} , {
key : "onDidDismiss" ,
value : function onDidDismiss ( ) {
2021-02-24 10:42:01 +01:00
return Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "g" ] ) ( this . el , 'ionAlertDidDismiss' ) ;
2021-01-15 15:31:43 +01:00
}
/**
* Returns a promise that resolves when the alert will dismiss.
*/
} , {
key : "onWillDismiss" ,
value : function onWillDismiss ( ) {
2021-02-24 10:42:01 +01:00
return Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "g" ] ) ( this . el , 'ionAlertWillDismiss' ) ;
2021-01-15 15:31:43 +01:00
}
} , {
key : "rbClick" ,
value : function rbClick ( selectedInput ) {
var _iterator = _createForOfIteratorHelper ( this . processedInputs ) ,
_step ;
try {
for ( _iterator . s ( ) ; ! ( _step = _iterator . n ( ) ) . done ; ) {
var input = _step . value ;
input . checked = input === selectedInput ;
2021-02-24 10:42:01 +01:00
input . tabindex = input === selectedInput ? 0 : - 1 ;
2021-01-15 15:31:43 +01:00
}
} catch ( err ) {
_iterator . e ( err ) ;
} finally {
_iterator . f ( ) ;
}
this . activeId = selectedInput . id ;
2021-02-24 10:42:01 +01:00
Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "s" ] ) ( selectedInput . handler , selectedInput ) ;
Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "j" ] ) ( this ) ;
2021-01-15 15:31:43 +01:00
}
} , {
key : "cbClick" ,
value : function cbClick ( selectedInput ) {
selectedInput . checked = ! selectedInput . checked ;
2021-02-24 10:42:01 +01:00
Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "s" ] ) ( selectedInput . handler , selectedInput ) ;
Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "j" ] ) ( this ) ;
2021-01-15 15:31:43 +01:00
}
} , {
key : "buttonClick" ,
value : function buttonClick ( button ) {
var role = button . role ;
var values = this . getValues ( ) ;
2021-02-24 10:42:01 +01:00
if ( Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "i" ] ) ( role ) ) {
2021-01-15 15:31:43 +01:00
return this . dismiss ( {
values : values
} , role ) ;
}
var returnData = this . callButtonHandler ( button , values ) ;
if ( returnData !== false ) {
return this . dismiss ( Object . assign ( {
values : values
} , returnData ) , button . role ) ;
}
return Promise . resolve ( false ) ;
}
} , {
key : "callButtonHandler" ,
value : function callButtonHandler ( button , data ) {
if ( button && button . handler ) {
// a handler has been provided, execute it
// pass the handler the values from the inputs
2021-02-24 10:42:01 +01:00
var returnData = Object ( _overlays _12c20431 _js _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "s" ] ) ( button . handler , data ) ;
2021-01-15 15:31:43 +01:00
if ( returnData === false ) {
// if the return value of the handler is false then do not dismiss
return false ;
}
if ( typeof returnData === 'object' ) {
return returnData ;
}
}
return { } ;
}
} , {
key : "getValues" ,
value : function getValues ( ) {
if ( this . processedInputs . length === 0 ) {
// this is an alert without any options/inputs at all
return undefined ;
}
if ( this . inputType === 'radio' ) {
// this is an alert with radio buttons (single value select)
// return the one value which is checked, otherwise undefined
var checkedInput = this . processedInputs . find ( function ( i ) {
return ! ! i . checked ;
} ) ;
return checkedInput ? checkedInput . value : undefined ;
}
if ( this . inputType === 'checkbox' ) {
// this is an alert with checkboxes (multiple value select)
// return an array of all the checked values
return this . processedInputs . filter ( function ( i ) {
return i . checked ;
} ) . map ( function ( i ) {
return i . value ;
} ) ;
} // this is an alert with text inputs
// return an object of all the values with the input name as the key
var values = { } ;
this . processedInputs . forEach ( function ( i ) {
values [ i . name ] = i . value || '' ;
} ) ;
return values ;
}
} , {
key : "renderAlertInputs" ,
2021-02-24 10:42:01 +01:00
value : function renderAlertInputs ( ) {
2021-01-15 15:31:43 +01:00
switch ( this . inputType ) {
case 'checkbox' :
2021-02-24 10:42:01 +01:00
return this . renderCheckbox ( ) ;
2021-01-15 15:31:43 +01:00
case 'radio' :
2021-02-24 10:42:01 +01:00
return this . renderRadio ( ) ;
2021-01-15 15:31:43 +01:00
default :
2021-02-24 10:42:01 +01:00
return this . renderInput ( ) ;
2021-01-15 15:31:43 +01:00
}
}
} , {
key : "renderCheckbox" ,
2021-02-24 10:42:01 +01:00
value : function renderCheckbox ( ) {
2021-01-15 15:31:43 +01:00
var _this3 = this ;
var inputs = this . processedInputs ;
2021-02-24 10:42:01 +01:00
var mode = Object ( _ionic _global _9d5c8ee3 _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "b" ] ) ( this ) ;
2021-01-15 15:31:43 +01:00
if ( inputs . length === 0 ) {
return null ;
}
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
"class" : "alert-checkbox-group"
2021-01-15 15:31:43 +01:00
} , inputs . map ( function ( i ) {
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "button" , {
2021-01-15 15:31:43 +01:00
type : "button" ,
onClick : function onClick ( ) {
return _this3 . cbClick ( i ) ;
} ,
"aria-checked" : "" . concat ( i . checked ) ,
id : i . id ,
disabled : i . disabled ,
2021-02-24 10:42:01 +01:00
tabIndex : i . tabindex ,
2021-01-15 15:31:43 +01:00
role : "checkbox" ,
2021-02-24 10:42:01 +01:00
"class" : Object . assign ( Object . assign ( { } , Object ( _theme _ff3fc52f _js _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "g" ] ) ( i . cssClass ) ) , {
2021-01-15 15:31:43 +01:00
'alert-tappable' : true ,
'alert-checkbox' : true ,
'alert-checkbox-button' : true ,
'ion-focusable' : true ,
'alert-checkbox-button-disabled' : i . disabled || false
} )
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-button-inner"
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-checkbox-icon"
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-checkbox-inner"
2021-02-24 10:42:01 +01:00
} ) ) , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-checkbox-label"
2021-02-24 10:42:01 +01:00
} , i . label ) ) , mode === 'md' && Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "ion-ripple-effect" , null ) ) ;
2021-01-15 15:31:43 +01:00
} ) ) ;
}
} , {
key : "renderRadio" ,
2021-02-24 10:42:01 +01:00
value : function renderRadio ( ) {
2021-01-15 15:31:43 +01:00
var _this4 = this ;
var inputs = this . processedInputs ;
if ( inputs . length === 0 ) {
return null ;
}
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-radio-group" ,
role : "radiogroup" ,
"aria-activedescendant" : this . activeId
} , inputs . map ( function ( i ) {
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "button" , {
2021-01-15 15:31:43 +01:00
type : "button" ,
onClick : function onClick ( ) {
return _this4 . rbClick ( i ) ;
} ,
"aria-checked" : "" . concat ( i . checked ) ,
disabled : i . disabled ,
id : i . id ,
2021-02-24 10:42:01 +01:00
tabIndex : i . tabindex ,
"class" : Object . assign ( Object . assign ( { } , Object ( _theme _ff3fc52f _js _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "g" ] ) ( i . cssClass ) ) , {
2021-01-15 15:31:43 +01:00
'alert-radio-button' : true ,
'alert-tappable' : true ,
'alert-radio' : true ,
'ion-focusable' : true ,
'alert-radio-button-disabled' : i . disabled || false
} ) ,
role : "radio"
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-button-inner"
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-radio-icon"
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-radio-inner"
2021-02-24 10:42:01 +01:00
} ) ) , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-radio-label"
} , i . label ) ) ) ;
} ) ) ;
}
} , {
key : "renderInput" ,
2021-02-24 10:42:01 +01:00
value : function renderInput ( ) {
2021-01-15 15:31:43 +01:00
var inputs = this . processedInputs ;
if ( inputs . length === 0 ) {
return null ;
}
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
"class" : "alert-input-group"
2021-01-15 15:31:43 +01:00
} , inputs . map ( function ( i ) {
var _a , _b , _c , _d ;
if ( i . type === 'textarea' ) {
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-input-wrapper"
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "textarea" , Object . assign ( {
2021-01-15 15:31:43 +01:00
placeholder : i . placeholder ,
value : i . value ,
id : i . id ,
2021-02-24 10:42:01 +01:00
tabIndex : i . tabindex
2021-01-15 15:31:43 +01:00
} , i . attributes , {
disabled : ( _b = ( _a = i . attributes ) === null || _a === void 0 ? void 0 : _a . disabled ) !== null && _b !== void 0 ? _b : i . disabled ,
"class" : inputClass ( i ) ,
onInput : function onInput ( e ) {
var _a ;
i . value = e . target . value ;
if ( ( _a = i . attributes ) === null || _a === void 0 ? void 0 : _a . onInput ) {
i . attributes . onInput ( e ) ;
}
}
} ) ) ) ;
} else {
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-input-wrapper"
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "input" , Object . assign ( {
2021-01-15 15:31:43 +01:00
placeholder : i . placeholder ,
type : i . type ,
min : i . min ,
max : i . max ,
value : i . value ,
id : i . id ,
2021-02-24 10:42:01 +01:00
tabIndex : i . tabindex
2021-01-15 15:31:43 +01:00
} , i . attributes , {
disabled : ( _d = ( _c = i . attributes ) === null || _c === void 0 ? void 0 : _c . disabled ) !== null && _d !== void 0 ? _d : i . disabled ,
"class" : inputClass ( i ) ,
onInput : function onInput ( e ) {
var _a ;
i . value = e . target . value ;
if ( ( _a = i . attributes ) === null || _a === void 0 ? void 0 : _a . onInput ) {
i . attributes . onInput ( e ) ;
}
}
} ) ) ) ;
}
} ) ) ;
}
} , {
key : "renderAlertButtons" ,
value : function renderAlertButtons ( ) {
var _this5 = this ;
var buttons = this . processedButtons ;
2021-02-24 10:42:01 +01:00
var mode = Object ( _ionic _global _9d5c8ee3 _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "b" ] ) ( this ) ;
2021-01-15 15:31:43 +01:00
var alertButtonGroupClass = {
'alert-button-group' : true ,
'alert-button-group-vertical' : buttons . length > 2
} ;
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : alertButtonGroupClass
} , buttons . map ( function ( button ) {
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "button" , {
2021-01-15 15:31:43 +01:00
type : "button" ,
"class" : buttonClass ( button ) ,
tabIndex : 0 ,
onClick : function onClick ( ) {
return _this5 . buttonClick ( button ) ;
}
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "span" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-button-inner"
2021-02-24 10:42:01 +01:00
} , button . text ) , mode === 'md' && Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "ion-ripple-effect" , null ) ) ;
2021-01-15 15:31:43 +01:00
} ) ) ;
}
} , {
key : "render" ,
value : function render ( ) {
var _Object$assign ,
_this6 = this ;
var overlayIndex = this . overlayIndex ,
header = this . header ,
subHeader = this . subHeader ;
2021-02-24 10:42:01 +01:00
var mode = Object ( _ionic _global _9d5c8ee3 _js _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "b" ] ) ( this ) ;
2021-01-15 15:31:43 +01:00
var hdrId = "alert-" . concat ( overlayIndex , "-hdr" ) ;
var subHdrId = "alert-" . concat ( overlayIndex , "-sub-hdr" ) ;
var msgId = "alert-" . concat ( overlayIndex , "-msg" ) ;
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "H" ] , {
2021-01-15 15:31:43 +01:00
role : "dialog" ,
"aria-modal" : "true" ,
tabindex : "-1" ,
style : {
zIndex : "" . concat ( 20000 + overlayIndex )
} ,
2021-02-24 10:42:01 +01:00
"class" : Object . assign ( Object . assign ( { } , Object ( _theme _ff3fc52f _js _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "g" ] ) ( this . cssClass ) ) , ( _Object$assign = { } , _defineProperty ( _Object$assign , mode , true ) , _defineProperty ( _Object$assign , 'alert-translucent' , this . translucent ) , _Object$assign ) ) ,
2021-01-15 15:31:43 +01:00
onIonAlertWillDismiss : this . dispatchCancelHandler ,
onIonBackdropTap : this . onBackdropTap
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "ion-backdrop" , {
2021-01-15 15:31:43 +01:00
tappable : this . backdropDismiss
2021-02-24 10:42:01 +01:00
} ) , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
tabindex : "0"
2021-02-24 10:42:01 +01:00
} ) , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-wrapper ion-overlay-wrapper" ,
ref : function ref ( el ) {
return _this6 . wrapperEl = el ;
}
2021-02-24 10:42:01 +01:00
} , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
"class" : "alert-head"
2021-02-24 10:42:01 +01:00
} , header && Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "h2" , {
2021-01-15 15:31:43 +01:00
id : hdrId ,
"class" : "alert-title"
2021-02-24 10:42:01 +01:00
} , header ) , subHeader && Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "h2" , {
2021-01-15 15:31:43 +01:00
id : subHdrId ,
"class" : "alert-sub-title"
2021-02-24 10:42:01 +01:00
} , subHeader ) ) , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
id : msgId ,
"class" : "alert-message" ,
2021-02-24 10:42:01 +01:00
innerHTML : Object ( _index _9e3fe806 _js _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "s" ] ) ( this . message )
} ) , this . renderAlertInputs ( ) , this . renderAlertButtons ( ) ) , Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "h" ] ) ( "div" , {
2021-01-15 15:31:43 +01:00
tabindex : "0"
} ) ) ;
}
} , {
key : "el" ,
get : function get ( ) {
2021-02-24 10:42:01 +01:00
return Object ( _index _e806d1f6 _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "i" ] ) ( this ) ;
2021-01-15 15:31:43 +01:00
}
} ] , [ {
key : "watchers" ,
get : function get ( ) {
return {
"buttons" : [ "buttonsChanged" ] ,
"inputs" : [ "inputsChanged" ]
} ;
}
} ] ) ;
return Alert ;
} ( ) ;
var inputClass = function inputClass ( input ) {
var _a , _b , _c ;
return Object . assign ( Object . assign ( {
'alert-input' : true ,
'alert-input-disabled' : ( ( _b = ( _a = input . attributes ) === null || _a === void 0 ? void 0 : _a . disabled ) !== null && _b !== void 0 ? _b : input . disabled ) || false
2021-02-24 10:42:01 +01:00
} , Object ( _theme _ff3fc52f _js _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "g" ] ) ( input . cssClass ) ) , Object ( _theme _ff3fc52f _js _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "g" ] ) ( input . attributes ? ( _c = input . attributes [ "class" ] ) === null || _c === void 0 ? void 0 : _c . toString ( ) : '' ) ) ;
2021-01-15 15:31:43 +01:00
} ;
var buttonClass = function buttonClass ( button ) {
return Object . assign ( _defineProperty ( {
'alert-button' : true ,
'ion-focusable' : true ,
'ion-activatable' : true
2021-02-24 10:42:01 +01:00
} , "alert-button-role-" . concat ( button . role ) , button . role !== undefined ) , Object ( _theme _ff3fc52f _js _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "g" ] ) ( button . cssClass ) ) ;
2021-01-15 15:31:43 +01:00
} ;
Alert . style = {
ios : alertIosCss ,
md : alertMdCss
} ;
/***/
}
} ] ) ;
//# sourceMappingURL=1-es5.js.map