mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Mobile first
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths"></meta-data>
|
||||
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_launcher" />
|
||||
</provider>
|
||||
</application>
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -33,78 +33,78 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-a635a2fc.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-54fe0237.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _gesture_controller_89173521_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./gesture-controller-89173521.js */
|
||||
"./node_modules/@ionic/core/dist/esm/gesture-controller-89173521.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_eea61379_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js");
|
||||
var _index_f49d994d_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-7b6ede21.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-4a6b37fb.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./overlays-7c699579.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./overlays-12c20431.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./haptic-7b8ba70a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-7b8ba70a.js");
|
||||
var _haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./haptic-27b3f981.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-27b3f981.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _button_active_0d5784f9_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
||||
/*! ./button-active-0d5784f9.js */
|
||||
"./node_modules/@ionic/core/dist/esm/button-active-0d5784f9.js");
|
||||
var _button_active_a6787d69_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
||||
/*! ./button-active-a6787d69.js */
|
||||
"./node_modules/@ionic/core/dist/esm/button-active-a6787d69.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
/**
|
||||
* iOS Action Sheet Enter Animation
|
||||
*/
|
||||
|
||||
|
||||
var iosEnterAnimation = function iosEnterAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -117,9 +117,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var iosLeaveAnimation = function iosLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper')).fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
||||
return baseAnimation.addElement(baseEl).easing('cubic-bezier(.36,.66,.04,1)').duration(450).addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
@@ -130,9 +130,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var mdEnterAnimation = function mdEnterAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -145,9 +145,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var mdLeaveAnimation = function mdLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.action-sheet-wrapper')).fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
||||
return baseAnimation.addElement(baseEl).easing('cubic-bezier(.36,.66,.04,1)').duration(450).addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
@@ -162,11 +162,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, ActionSheet);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetDidDismiss", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionActionSheetDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
@@ -197,13 +197,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.animated = true;
|
||||
|
||||
this.onBackdropTap = function () {
|
||||
_this.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["B"]);
|
||||
_this.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["B"]);
|
||||
};
|
||||
|
||||
this.dispatchCancelHandler = function (ev) {
|
||||
var role = ev.detail.role;
|
||||
|
||||
if (Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["i"])(role)) {
|
||||
if (Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["i"])(role)) {
|
||||
var cancelButton = _this.getButtons().find(function (b) {
|
||||
return b.role === 'cancel';
|
||||
});
|
||||
@@ -220,12 +220,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(ActionSheet, [{
|
||||
key: "present",
|
||||
value: function present() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["d"])(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["d"])(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);
|
||||
}
|
||||
}, {
|
||||
key: "connectedCallback",
|
||||
value: function connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["e"])(this.el);
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["e"])(this.el);
|
||||
}
|
||||
/**
|
||||
* Dismiss the action sheet overlay after it has been presented.
|
||||
@@ -240,7 +240,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "dismiss",
|
||||
value: function dismiss(data, role) {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["f"])(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["f"])(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the action sheet did dismiss.
|
||||
@@ -249,7 +249,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onDidDismiss",
|
||||
value: function onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.el, 'ionActionSheetDidDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.el, 'ionActionSheetDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the action sheet will dismiss.
|
||||
@@ -259,7 +259,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onWillDismiss",
|
||||
value: function onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.el, 'ionActionSheetWillDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.el, 'ionActionSheetWillDismiss');
|
||||
}
|
||||
}, {
|
||||
key: "buttonClick",
|
||||
@@ -272,7 +272,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
case 0:
|
||||
role = button.role;
|
||||
|
||||
if (!Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["i"])(role)) {
|
||||
if (!Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["i"])(role)) {
|
||||
_context.next = 3;
|
||||
break;
|
||||
}
|
||||
@@ -325,7 +325,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
_context2.next = 3;
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_7__["s"])(button.handler);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_7__["s"])(button.handler);
|
||||
|
||||
case 3:
|
||||
rtn = _context2.sent;
|
||||
@@ -364,8 +364,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "componentDidUnload",
|
||||
value: function componentDidUnload() {
|
||||
key: "disconnectedCallback",
|
||||
value: function disconnectedCallback() {
|
||||
if (this.gesture) {
|
||||
this.gesture.destroy();
|
||||
this.gesture = undefined;
|
||||
@@ -385,15 +385,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var groupEl = this.groupEl,
|
||||
wrapperEl = this.wrapperEl;
|
||||
|
||||
if (this.gesture || Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) === 'md' || !wrapperEl || !groupEl) {
|
||||
if (this.gesture || Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) === 'md' || !wrapperEl || !groupEl) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
var isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
|
||||
|
||||
if (!isScrollable) {
|
||||
_this2.gesture = Object(_button_active_0d5784f9_js__WEBPACK_IMPORTED_MODULE_9__["c"])(wrapperEl, function (refEl) {
|
||||
_this2.gesture = Object(_button_active_a6787d69_js__WEBPACK_IMPORTED_MODULE_9__["c"])(wrapperEl, function (refEl) {
|
||||
return refEl.classList.contains('action-sheet-button');
|
||||
});
|
||||
|
||||
@@ -406,7 +406,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _this3 = this;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var allButtons = this.getButtons();
|
||||
var cancelButton = allButtons.find(function (b) {
|
||||
return b.role === 'cancel';
|
||||
@@ -414,75 +414,75 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var buttons = allButtons.filter(function (b) {
|
||||
return b.role !== 'cancel';
|
||||
});
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
role: "dialog",
|
||||
"aria-modal": "true",
|
||||
tabindex: "-1",
|
||||
style: {
|
||||
zIndex: "".concat(20000 + this.overlayIndex)
|
||||
},
|
||||
"class": Object.assign(Object.assign(_defineProperty({}, mode, true), Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_10__["g"])(this.cssClass)), {
|
||||
"class": Object.assign(Object.assign(_defineProperty({}, mode, true), Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_10__["g"])(this.cssClass)), {
|
||||
'action-sheet-translucent': this.translucent
|
||||
}),
|
||||
onIonActionSheetWillDismiss: this.dispatchCancelHandler,
|
||||
onIonBackdropTap: this.onBackdropTap
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
tappable: this.backdropDismiss
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "action-sheet-wrapper ion-overlay-wrapper",
|
||||
role: "dialog",
|
||||
ref: function ref(el) {
|
||||
return _this3.wrapperEl = el;
|
||||
}
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "action-sheet-container"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "action-sheet-group",
|
||||
ref: function ref(el) {
|
||||
return _this3.groupEl = el;
|
||||
}
|
||||
}, this.header !== undefined && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, this.header !== undefined && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "action-sheet-title"
|
||||
}, this.header, this.subHeader && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, this.header, this.subHeader && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "action-sheet-sub-title"
|
||||
}, this.subHeader)), buttons.map(function (b) {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
type: "button",
|
||||
"class": buttonClass(b),
|
||||
onClick: function onClick() {
|
||||
return _this3.buttonClick(b);
|
||||
}
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
"class": "action-sheet-button-inner"
|
||||
}, b.icon && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
}, b.icon && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
icon: b.icon,
|
||||
lazy: false,
|
||||
"class": "action-sheet-icon"
|
||||
}), b.text), mode === 'md' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null));
|
||||
})), cancelButton && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), b.text), mode === 'md' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null));
|
||||
})), cancelButton && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "action-sheet-group action-sheet-group-cancel"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
type: "button",
|
||||
"class": buttonClass(cancelButton),
|
||||
onClick: function onClick() {
|
||||
return _this3.buttonClick(cancelButton);
|
||||
}
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
"class": "action-sheet-button-inner"
|
||||
}, cancelButton.icon && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
}, cancelButton.icon && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
icon: cancelButton.icon,
|
||||
lazy: false,
|
||||
"class": "action-sheet-icon"
|
||||
}), cancelButton.text), mode === 'md' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null))))), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), cancelButton.text), mode === 'md' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null))))), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -494,7 +494,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
'action-sheet-button': true,
|
||||
'ion-activatable': true,
|
||||
'ion-focusable': true
|
||||
}, "action-sheet-".concat(button.role), button.role !== undefined), Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_10__["g"])(button.cssClass));
|
||||
}, "action-sheet-".concat(button.role), button.role !== undefined), Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_10__["g"])(button.cssClass));
|
||||
};
|
||||
|
||||
ActionSheet.style = {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -12,30 +12,30 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_col", function() { return Col; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_grid", function() { return Grid; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_row", function() { return Row; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
|
||||
|
||||
|
||||
const SIZE_TO_MEDIA = {
|
||||
'xs': '(min-width: 0px)',
|
||||
'sm': '(min-width: 576px)',
|
||||
'md': '(min-width: 768px)',
|
||||
'lg': '(min-width: 992px)',
|
||||
'xl': '(min-width: 1200px)',
|
||||
'xs': '(min-width: 0px)',
|
||||
'sm': '(min-width: 576px)',
|
||||
'md': '(min-width: 768px)',
|
||||
'lg': '(min-width: 992px)',
|
||||
'xl': '(min-width: 1200px)',
|
||||
};
|
||||
// Check if the window matches the media query
|
||||
// at the breakpoint passed
|
||||
// e.g. matchBreakpoint('sm') => true if screen width exceeds 576px
|
||||
const matchBreakpoint = (breakpoint) => {
|
||||
if (breakpoint === undefined || breakpoint === '') {
|
||||
return true;
|
||||
}
|
||||
if (window.matchMedia) {
|
||||
const mediaQuery = SIZE_TO_MEDIA[breakpoint];
|
||||
return window.matchMedia(mediaQuery).matches;
|
||||
}
|
||||
return false;
|
||||
if (breakpoint === undefined || breakpoint === '') {
|
||||
return true;
|
||||
}
|
||||
if (window.matchMedia) {
|
||||
const mediaQuery = SIZE_TO_MEDIA[breakpoint];
|
||||
return window.matchMedia(mediaQuery).matches;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const colCss = ":host{padding-left:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));padding-right:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));padding-top:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));padding-bottom:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;width:100%;max-width:100%;min-height:1px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));padding-inline-start:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));-webkit-padding-end:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px));padding-inline-end:var(--ion-grid-column-padding-xs, var(--ion-grid-column-padding, 5px))}}@media (min-width: 576px){:host{padding-left:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));padding-right:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));padding-top:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));padding-bottom:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));padding-inline-start:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));-webkit-padding-end:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px));padding-inline-end:var(--ion-grid-column-padding-sm, var(--ion-grid-column-padding, 5px))}}}@media (min-width: 768px){:host{padding-left:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));padding-right:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));padding-top:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));padding-bottom:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));padding-inline-start:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));-webkit-padding-end:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px));padding-inline-end:var(--ion-grid-column-padding-md, var(--ion-grid-column-padding, 5px))}}}@media (min-width: 992px){:host{padding-left:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));padding-right:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));padding-top:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));padding-bottom:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));padding-inline-start:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));-webkit-padding-end:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px));padding-inline-end:var(--ion-grid-column-padding-lg, var(--ion-grid-column-padding, 5px))}}}@media (min-width: 1200px){:host{padding-left:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));padding-right:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));padding-top:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));padding-bottom:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));padding-inline-start:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));-webkit-padding-end:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px));padding-inline-end:var(--ion-grid-column-padding-xl, var(--ion-grid-column-padding, 5px))}}}";
|
||||
@@ -44,118 +44,118 @@ const win = window;
|
||||
const SUPPORTS_VARS = !!(win.CSS && win.CSS.supports && win.CSS.supports('--a: 0'));
|
||||
const BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl'];
|
||||
const Col = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
onResize() {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["j"])(this);
|
||||
}
|
||||
// Loop through all of the breakpoints to see if the media query
|
||||
// matches and grab the column value from the relevant prop if so
|
||||
getColumns(property) {
|
||||
let matched;
|
||||
for (const breakpoint of BREAKPOINTS) {
|
||||
const matches = matchBreakpoint(breakpoint);
|
||||
// Grab the value of the property, if it exists and our
|
||||
// media query matches we return the value
|
||||
const columns = this[property + breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1)];
|
||||
if (matches && columns !== undefined) {
|
||||
matched = columns;
|
||||
}
|
||||
}
|
||||
onResize() {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["j"])(this);
|
||||
// Return the last matched columns since the breakpoints
|
||||
// increase in size and we want to return the largest match
|
||||
return matched;
|
||||
}
|
||||
calculateSize() {
|
||||
const columns = this.getColumns('size');
|
||||
// If size wasn't set for any breakpoint
|
||||
// or if the user set the size without a value
|
||||
// it means we need to stick with the default and return
|
||||
// e.g. <ion-col size-md>
|
||||
if (!columns || columns === '') {
|
||||
return;
|
||||
}
|
||||
// Loop through all of the breakpoints to see if the media query
|
||||
// matches and grab the column value from the relevant prop if so
|
||||
getColumns(property) {
|
||||
let matched;
|
||||
for (const breakpoint of BREAKPOINTS) {
|
||||
const matches = matchBreakpoint(breakpoint);
|
||||
// Grab the value of the property, if it exists and our
|
||||
// media query matches we return the value
|
||||
const columns = this[property + breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1)];
|
||||
if (matches && columns !== undefined) {
|
||||
matched = columns;
|
||||
}
|
||||
}
|
||||
// Return the last matched columns since the breakpoints
|
||||
// increase in size and we want to return the largest match
|
||||
return matched;
|
||||
}
|
||||
calculateSize() {
|
||||
const columns = this.getColumns('size');
|
||||
// If size wasn't set for any breakpoint
|
||||
// or if the user set the size without a value
|
||||
// it means we need to stick with the default and return
|
||||
// e.g. <ion-col size-md>
|
||||
if (!columns || columns === '') {
|
||||
return;
|
||||
}
|
||||
// If the size is set to auto then don't calculate a size
|
||||
const colSize = (columns === 'auto')
|
||||
? 'auto'
|
||||
// If CSS supports variables we should use the grid columns var
|
||||
: SUPPORTS_VARS ? `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`
|
||||
// Convert the columns to a percentage by dividing by the total number
|
||||
// of columns (12) and then multiplying by 100
|
||||
: ((columns / 12) * 100) + '%';
|
||||
return {
|
||||
'flex': `0 0 ${colSize}`,
|
||||
'width': `${colSize}`,
|
||||
'max-width': `${colSize}`
|
||||
};
|
||||
}
|
||||
// Called by push, pull, and offset since they use the same calculations
|
||||
calculatePosition(property, modifier) {
|
||||
const columns = this.getColumns(property);
|
||||
if (!columns) {
|
||||
return;
|
||||
}
|
||||
// If the number of columns passed are greater than 0 and less than
|
||||
// 12 we can position the column, else default to auto
|
||||
const amount = SUPPORTS_VARS
|
||||
// If CSS supports variables we should use the grid columns var
|
||||
? `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`
|
||||
// Convert the columns to a percentage by dividing by the total number
|
||||
// of columns (12) and then multiplying by 100
|
||||
: (columns > 0 && columns < 12) ? (columns / 12 * 100) + '%' : 'auto';
|
||||
return {
|
||||
[modifier]: amount
|
||||
};
|
||||
}
|
||||
calculateOffset(isRTL) {
|
||||
return this.calculatePosition('offset', isRTL ? 'margin-right' : 'margin-left');
|
||||
}
|
||||
calculatePull(isRTL) {
|
||||
return this.calculatePosition('pull', isRTL ? 'left' : 'right');
|
||||
}
|
||||
calculatePush(isRTL) {
|
||||
return this.calculatePosition('push', isRTL ? 'right' : 'left');
|
||||
}
|
||||
render() {
|
||||
const isRTL = document.dir === 'rtl';
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true
|
||||
}, style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize()) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
// If the size is set to auto then don't calculate a size
|
||||
const colSize = (columns === 'auto')
|
||||
? 'auto'
|
||||
// If CSS supports variables we should use the grid columns var
|
||||
: SUPPORTS_VARS ? `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`
|
||||
// Convert the columns to a percentage by dividing by the total number
|
||||
// of columns (12) and then multiplying by 100
|
||||
: ((columns / 12) * 100) + '%';
|
||||
return {
|
||||
'flex': `0 0 ${colSize}`,
|
||||
'width': `${colSize}`,
|
||||
'max-width': `${colSize}`
|
||||
};
|
||||
}
|
||||
// Called by push, pull, and offset since they use the same calculations
|
||||
calculatePosition(property, modifier) {
|
||||
const columns = this.getColumns(property);
|
||||
if (!columns) {
|
||||
return;
|
||||
}
|
||||
// If the number of columns passed are greater than 0 and less than
|
||||
// 12 we can position the column, else default to auto
|
||||
const amount = SUPPORTS_VARS
|
||||
// If CSS supports variables we should use the grid columns var
|
||||
? `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`
|
||||
// Convert the columns to a percentage by dividing by the total number
|
||||
// of columns (12) and then multiplying by 100
|
||||
: (columns > 0 && columns < 12) ? (columns / 12 * 100) + '%' : 'auto';
|
||||
return {
|
||||
[modifier]: amount
|
||||
};
|
||||
}
|
||||
calculateOffset(isRTL) {
|
||||
return this.calculatePosition('offset', isRTL ? 'margin-right' : 'margin-left');
|
||||
}
|
||||
calculatePull(isRTL) {
|
||||
return this.calculatePosition('pull', isRTL ? 'left' : 'right');
|
||||
}
|
||||
calculatePush(isRTL) {
|
||||
return this.calculatePosition('push', isRTL ? 'right' : 'left');
|
||||
}
|
||||
render() {
|
||||
const isRTL = document.dir === 'rtl';
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true
|
||||
}, style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize()) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
};
|
||||
Col.style = colCss;
|
||||
|
||||
const gridCss = ":host{padding-left:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px));padding-right:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px));padding-top:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px));padding-bottom:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px));margin-left:auto;margin-right:auto;display:block;-ms-flex:1;flex:1}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px));padding-inline-start:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px));-webkit-padding-end:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px));padding-inline-end:var(--ion-grid-padding-xs, var(--ion-grid-padding, 5px))}}@media (min-width: 576px){:host{padding-left:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px));padding-right:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px));padding-top:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px));padding-bottom:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px));padding-inline-start:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px));-webkit-padding-end:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px));padding-inline-end:var(--ion-grid-padding-sm, var(--ion-grid-padding, 5px))}}}@media (min-width: 768px){:host{padding-left:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px));padding-right:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px));padding-top:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px));padding-bottom:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px));padding-inline-start:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px));-webkit-padding-end:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px));padding-inline-end:var(--ion-grid-padding-md, var(--ion-grid-padding, 5px))}}}@media (min-width: 992px){:host{padding-left:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px));padding-right:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px));padding-top:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px));padding-bottom:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px));padding-inline-start:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px));-webkit-padding-end:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px));padding-inline-end:var(--ion-grid-padding-lg, var(--ion-grid-padding, 5px))}}}@media (min-width: 1200px){:host{padding-left:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px));padding-right:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px));padding-top:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px));padding-bottom:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px));padding-inline-start:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px));-webkit-padding-end:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px));padding-inline-end:var(--ion-grid-padding-xl, var(--ion-grid-padding, 5px))}}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.grid-fixed){width:var(--ion-grid-width-xs, var(--ion-grid-width, 100%));max-width:100%}@media (min-width: 576px){:host(.grid-fixed){width:var(--ion-grid-width-sm, var(--ion-grid-width, 540px))}}@media (min-width: 768px){:host(.grid-fixed){width:var(--ion-grid-width-md, var(--ion-grid-width, 720px))}}@media (min-width: 992px){:host(.grid-fixed){width:var(--ion-grid-width-lg, var(--ion-grid-width, 960px))}}@media (min-width: 1200px){:host(.grid-fixed){width:var(--ion-grid-width-xl, var(--ion-grid-width, 1140px))}}:host(.ion-no-padding){--ion-grid-column-padding:0;--ion-grid-column-padding-xs:0;--ion-grid-column-padding-sm:0;--ion-grid-column-padding-md:0;--ion-grid-column-padding-lg:0;--ion-grid-column-padding-xl:0}";
|
||||
|
||||
const Grid = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the grid will have a fixed width based on the screen size.
|
||||
*/
|
||||
this.fixed = false;
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'grid-fixed': this.fixed
|
||||
} }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the grid will have a fixed width based on the screen size.
|
||||
*/
|
||||
this.fixed = false;
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'grid-fixed': this.fixed
|
||||
} }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
};
|
||||
Grid.style = gridCss;
|
||||
|
||||
const rowCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
||||
|
||||
const Row = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
};
|
||||
Row.style = rowCss;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -47,15 +47,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
|
||||
var SIZE_TO_MEDIA = {
|
||||
'xs': '(min-width: 0px)',
|
||||
@@ -89,13 +89,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Col(hostRef) {
|
||||
_classCallCheck(this, Col);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(Col, [{
|
||||
key: "onResize",
|
||||
value: function onResize() {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["j"])(this);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["j"])(this);
|
||||
} // Loop through all of the breakpoints to see if the media query
|
||||
// matches and grab the column value from the relevant prop if so
|
||||
|
||||
@@ -189,11 +189,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var isRTL = document.dir === 'rtl';
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": _defineProperty({}, mode, true),
|
||||
style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize())
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -207,7 +207,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Grid(hostRef) {
|
||||
_classCallCheck(this, Grid);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the grid will have a fixed width based on the screen size.
|
||||
*/
|
||||
@@ -220,10 +220,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class2;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class2 = {}, _defineProperty(_class2, mode, true), _defineProperty(_class2, 'grid-fixed', this.fixed), _class2)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -237,15 +237,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Row(hostRef) {
|
||||
_classCallCheck(this, Row);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(Row, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -59,51 +59,51 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-a635a2fc.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-54fe0237.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-7b6ede21.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-4a6b37fb.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./overlays-7c699579.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./overlays-12c20431.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./haptic-7b8ba70a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-7b8ba70a.js");
|
||||
var _haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./haptic-27b3f981.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-27b3f981.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
/**
|
||||
* Gets a date value given a format
|
||||
* Defaults to the current date if
|
||||
@@ -115,6 +115,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var getValue = getValueFromFormat(date, format);
|
||||
|
||||
if (getValue !== undefined) {
|
||||
if (format === FORMAT_A || format === FORMAT_a) {
|
||||
date.ampm = getValue;
|
||||
}
|
||||
|
||||
return getValue;
|
||||
}
|
||||
|
||||
@@ -414,10 +418,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return true;
|
||||
}
|
||||
} else if (newData.year || newData.hour || newData.month || newData.day || newData.minute || newData.second) {
|
||||
// newData is from of a datetime picker's selected values
|
||||
// update the existing DatetimeData data with the new values
|
||||
// do some magic for 12-hour values
|
||||
if (newData.ampm && newData.hour) {
|
||||
// newData is from the datetime picker's selected values
|
||||
// update the existing datetimeValue with the new values
|
||||
if (newData.ampm !== undefined && newData.hour !== undefined) {
|
||||
// change the value of the hour based on whether or not it is am or pm
|
||||
// if the meridiem is pm and equal to 12, it remains 12
|
||||
// otherwise we add 12 to the hour value
|
||||
// if the meridiem is am and equal to 12, we change it to 0
|
||||
// otherwise we use its current hour value
|
||||
// for example: 8 pm becomes 20, 12 am becomes 0, 4 am becomes 4
|
||||
newData.hour.value = newData.ampm.value === 'pm' ? newData.hour.value === 12 ? 12 : newData.hour.value + 12 : newData.hour.value === 12 ? 0 : newData.hour.value;
|
||||
} // merge new values from the picker's selection
|
||||
// to the existing DatetimeData values
|
||||
@@ -437,6 +446,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: newData.hour ? newData.hour.value : newData.ampm.value === 'pm' ? existingData.hour < 12 ? existingData.hour + 12 : existingData.hour : existingData.hour >= 12 ? existingData.hour - 12 : existingData.hour
|
||||
};
|
||||
existingData['hour'] = newData['hour'].value;
|
||||
existingData['ampm'] = newData['ampm'].value;
|
||||
return true;
|
||||
} // eww, invalid data
|
||||
|
||||
@@ -729,12 +739,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Datetime);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionCancel = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionCancel", 7);
|
||||
this.ionChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.ionFocus = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.ionStyle = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionCancel = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionCancel", 7);
|
||||
this.ionChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.ionFocus = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.ionStyle = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.inputId = "ion-dt-".concat(datetimeIds++);
|
||||
this.locale = {};
|
||||
this.datetimeMin = {};
|
||||
@@ -850,7 +860,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
case 2:
|
||||
pickerOptions = this.generatePickerOptions();
|
||||
_context2.next = 5;
|
||||
return _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["p"].create(pickerOptions);
|
||||
return _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["p"].create(pickerOptions);
|
||||
|
||||
case 5:
|
||||
picker = _context2.sent;
|
||||
@@ -860,7 +870,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_this2.setFocus();
|
||||
});
|
||||
picker.addEventListener('ionPickerColChange', /*#__PURE__*/function () {
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["a"])(picker, 'ionPickerColChange', /*#__PURE__*/function () {
|
||||
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(event) {
|
||||
var data, colSelectedIndex, colOptions, changeData;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
@@ -875,11 +885,17 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: colOptions[colSelectedIndex].value
|
||||
};
|
||||
|
||||
if (data.name !== 'ampm' && _this2.datetimeValue.ampm !== undefined) {
|
||||
changeData['ampm'] = {
|
||||
value: _this2.datetimeValue.ampm
|
||||
};
|
||||
}
|
||||
|
||||
_this2.updateDatetimeValue(changeData);
|
||||
|
||||
picker.columns = _this2.generateColumns();
|
||||
|
||||
case 7:
|
||||
case 8:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
@@ -929,7 +945,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function generatePickerOptions() {
|
||||
var _this3 = this;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.locale = {
|
||||
monthNames: convertToArrayOfStrings(this.monthNames, 'monthNames'),
|
||||
monthShortNames: convertToArrayOfStrings(this.monthShortNames, 'monthShortNames'),
|
||||
@@ -1170,7 +1186,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
}
|
||||
|
||||
var selectedIndex = column.selectedIndex = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(indexMin, column.selectedIndex, indexMax);
|
||||
var selectedIndex = column.selectedIndex = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(indexMin, column.selectedIndex, indexMax);
|
||||
var opt = column.options[selectedIndex];
|
||||
|
||||
if (opt) {
|
||||
@@ -1179,6 +1195,18 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
return 0;
|
||||
}
|
||||
}, {
|
||||
key: "text",
|
||||
get: function get() {
|
||||
// create the text of the formatted data
|
||||
var template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT;
|
||||
|
||||
if (this.value === undefined || this.value === null || this.value.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
return renderDatetime(template, this.datetimeValue, this.locale);
|
||||
}
|
||||
}, {
|
||||
key: "hasValue",
|
||||
value: function hasValue() {
|
||||
@@ -1204,9 +1232,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
isExpanded = this.isExpanded,
|
||||
el = this.el,
|
||||
placeholder = this.placeholder;
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var labelId = inputId + '-lbl';
|
||||
var label = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["f"])(el);
|
||||
var label = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["f"])(el);
|
||||
var addPlaceholderClass = text === undefined && placeholder != null ? true : false; // If selected text has been passed in, use that first
|
||||
// otherwise use the placeholder
|
||||
|
||||
@@ -1217,18 +1245,18 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
label.id = labelId;
|
||||
}
|
||||
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["a"])(true, el, this.name, this.value, this.disabled);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["d"])(true, el, this.name, this.value, this.disabled);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onClick: this.onClick,
|
||||
"aria-disabled": disabled ? 'true' : null,
|
||||
"aria-expanded": "".concat(isExpanded),
|
||||
"aria-haspopup": "true",
|
||||
"aria-labelledby": labelId,
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, 'datetime-disabled', disabled), _defineProperty(_class, 'datetime-readonly', readonly), _defineProperty(_class, 'datetime-placeholder', addPlaceholderClass), _defineProperty(_class, 'in-item', Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__["h"])('ion-item', el)), _class)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, 'datetime-disabled', disabled), _defineProperty(_class, 'datetime-readonly', readonly), _defineProperty(_class, 'datetime-placeholder', addPlaceholderClass), _defineProperty(_class, 'in-item', Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__["h"])('ion-item', el)), _class)
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "datetime-text",
|
||||
part: datetimeTextPart
|
||||
}, datetimeText), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
}, datetimeText), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
type: "button",
|
||||
onFocus: this.onFocus,
|
||||
onBlur: this.onBlur,
|
||||
@@ -1238,22 +1266,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
}));
|
||||
}
|
||||
}, {
|
||||
key: "text",
|
||||
get: function get() {
|
||||
// create the text of the formatted data
|
||||
var template = this.displayFormat || this.pickerFormat || DEFAULT_FORMAT;
|
||||
|
||||
if (this.value === undefined || this.value === null || this.value.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
return renderDatetime(template, this.datetimeValue, this.locale);
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
@@ -1323,9 +1339,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
*/
|
||||
|
||||
var iosEnterAnimation = function iosEnterAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -1338,9 +1354,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var iosLeaveAnimation = function iosLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.picker-wrapper')).fromTo('transform', 'translateY(0%)', 'translateY(100%)');
|
||||
return baseAnimation.addElement(baseEl).easing('cubic-bezier(.36,.66,.04,1)').duration(400).addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
@@ -1355,11 +1371,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Picker);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerDidDismiss", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
@@ -1398,13 +1414,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.animated = true;
|
||||
|
||||
this.onBackdropTap = function () {
|
||||
_this6.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["B"]);
|
||||
_this6.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["B"]);
|
||||
};
|
||||
|
||||
this.dispatchCancelHandler = function (ev) {
|
||||
var role = ev.detail.role;
|
||||
|
||||
if (Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["i"])(role)) {
|
||||
if (Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["i"])(role)) {
|
||||
var cancelButton = _this6.buttons.find(function (b) {
|
||||
return b.role === 'cancel';
|
||||
});
|
||||
@@ -1417,7 +1433,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(Picker, [{
|
||||
key: "connectedCallback",
|
||||
value: function connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["e"])(this.el);
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["e"])(this.el);
|
||||
}
|
||||
/**
|
||||
* Present the picker overlay after it has been created.
|
||||
@@ -1434,7 +1450,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
_context3.next = 2;
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["d"])(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["d"])(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
|
||||
|
||||
case 2:
|
||||
if (this.duration > 0) {
|
||||
@@ -1474,7 +1490,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
clearTimeout(this.durationTimeout);
|
||||
}
|
||||
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["f"])(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["f"])(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the picker did dismiss.
|
||||
@@ -1483,7 +1499,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onDidDismiss",
|
||||
value: function onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["g"])(this.el, 'ionPickerDidDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["g"])(this.el, 'ionPickerDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the picker will dismiss.
|
||||
@@ -1492,7 +1508,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onWillDismiss",
|
||||
value: function onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["g"])(this.el, 'ionPickerWillDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["g"])(this.el, 'ionPickerWillDismiss');
|
||||
}
|
||||
/**
|
||||
* Get the column that matches the specified name.
|
||||
@@ -1518,7 +1534,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
case 0:
|
||||
role = button.role;
|
||||
|
||||
if (!Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["i"])(role)) {
|
||||
if (!Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["i"])(role)) {
|
||||
_context4.next = 3;
|
||||
break;
|
||||
}
|
||||
@@ -1571,7 +1587,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
_context5.next = 3;
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_5__["s"])(button.handler, this.getSelected());
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_5__["s"])(button.handler, this.getSelected());
|
||||
|
||||
case 3:
|
||||
rtn = _context5.sent;
|
||||
@@ -1620,54 +1636,54 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var _Object$assign,
|
||||
_this8 = this;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"aria-modal": "true",
|
||||
tabindex: "-1",
|
||||
"class": Object.assign((_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, "picker-".concat(mode), true), _Object$assign), Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)),
|
||||
"class": Object.assign((_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, "picker-".concat(mode), true), _Object$assign), Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)),
|
||||
style: {
|
||||
zIndex: "".concat(20000 + this.overlayIndex)
|
||||
},
|
||||
onIonBackdropTap: this.onBackdropTap,
|
||||
onIonPickerWillDismiss: this.dispatchCancelHandler
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
visible: this.showBackdrop,
|
||||
tappable: this.backdropDismiss
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-wrapper ion-overlay-wrapper",
|
||||
role: "dialog"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-toolbar"
|
||||
}, this.buttons.map(function (b) {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": buttonWrapperClass(b)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
type: "button",
|
||||
onClick: function onClick() {
|
||||
return _this8.buttonClick(b);
|
||||
},
|
||||
"class": buttonClass(b)
|
||||
}, b.text));
|
||||
})), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-columns"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-above-highlight"
|
||||
}), this.presented && this.columns.map(function (c) {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-picker-column", {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-picker-column", {
|
||||
col: c
|
||||
});
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-below-highlight"
|
||||
}))), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}))), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -1684,7 +1700,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return Object.assign({
|
||||
'picker-button': true,
|
||||
'ion-activatable': true
|
||||
}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__["g"])(button.cssClass));
|
||||
}, Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__["g"])(button.cssClass));
|
||||
};
|
||||
|
||||
Picker.style = {
|
||||
@@ -1698,8 +1714,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function PickerColumnCmp(hostRef) {
|
||||
_classCallCheck(this, PickerColumnCmp);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionPickerColChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerColChange", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionPickerColChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPickerColChange", 7);
|
||||
this.optHeight = 0;
|
||||
this.rotateFactor = 0;
|
||||
this.scaleFactor = 1;
|
||||
@@ -1726,7 +1742,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
case 0:
|
||||
pickerRotateFactor = 0;
|
||||
pickerScaleFactor = 0.81;
|
||||
mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
|
||||
if (mode === 'ios') {
|
||||
pickerRotateFactor = -0.46;
|
||||
@@ -1737,8 +1753,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.scaleFactor = pickerScaleFactor;
|
||||
_context6.next = 8;
|
||||
return Promise.resolve().then(__webpack_require__.bind(null,
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js"));
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js"));
|
||||
|
||||
case 8:
|
||||
this.gesture = _context6.sent.createGesture({
|
||||
@@ -1899,7 +1915,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
if (this.lastIndex !== selectedIndex) {
|
||||
// have not set a last index yet
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_6__["b"])();
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_6__["b"])();
|
||||
this.lastIndex = selectedIndex;
|
||||
}
|
||||
}
|
||||
@@ -1936,7 +1952,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
} else {
|
||||
this.velocity = 0;
|
||||
this.emitColChange();
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_6__["h"])();
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_6__["h"])();
|
||||
}
|
||||
} else if (this.y % this.optHeight !== 0) {
|
||||
// needs to still get locked into a position so options line up
|
||||
@@ -1958,9 +1974,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
// We have to prevent default in order to block scrolling under the picker
|
||||
// but we DO NOT have to stop propagation, since we still want
|
||||
// some "click" events to capture
|
||||
detail.event.preventDefault();
|
||||
if (detail.event.cancelable) {
|
||||
detail.event.preventDefault();
|
||||
}
|
||||
|
||||
detail.event.stopPropagation();
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_6__["a"])(); // reset everything
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_6__["a"])(); // reset everything
|
||||
|
||||
cancelAnimationFrame(this.rafId);
|
||||
var options = this.col.options;
|
||||
@@ -1980,7 +1999,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onMove",
|
||||
value: function onMove(detail) {
|
||||
detail.event.preventDefault();
|
||||
if (detail.event.cancelable) {
|
||||
detail.event.preventDefault();
|
||||
}
|
||||
|
||||
detail.event.stopPropagation(); // update the scroll position relative to pointer start position
|
||||
|
||||
var y = this.y + detail.deltaY;
|
||||
@@ -2014,7 +2036,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return;
|
||||
}
|
||||
|
||||
this.velocity = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
|
||||
this.velocity = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);
|
||||
|
||||
if (this.velocity === 0 && detail.deltaY === 0) {
|
||||
var opt = detail.event.target.closest('.picker-opt');
|
||||
@@ -2065,7 +2087,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return;
|
||||
}
|
||||
|
||||
var selectedIndex = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(min, this.col.selectedIndex || 0, max);
|
||||
var selectedIndex = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(min, this.col.selectedIndex || 0, max);
|
||||
|
||||
if (this.col.prevSelected !== selectedIndex || forceRefresh) {
|
||||
var y = selectedIndex * this.optHeight * -1;
|
||||
@@ -2081,18 +2103,18 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
var col = this.col;
|
||||
var Button = 'button';
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class2 = {}, _defineProperty(_class2, mode, true), _defineProperty(_class2, 'picker-col', true), _defineProperty(_class2, 'picker-opts-left', this.col.align === 'left'), _defineProperty(_class2, 'picker-opts-right', this.col.align === 'right'), _class2),
|
||||
style: {
|
||||
'max-width': this.col.columnWidth
|
||||
}
|
||||
}, col.prefix && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, col.prefix && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-prefix",
|
||||
style: {
|
||||
width: col.prefixWidth
|
||||
}
|
||||
}, col.prefix), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, col.prefix), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-opts",
|
||||
style: {
|
||||
maxWidth: col.optionsWidth
|
||||
@@ -2101,7 +2123,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return _this11.optsEl = el;
|
||||
}
|
||||
}, col.options.map(function (o, index) {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(Button, {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(Button, {
|
||||
type: "button",
|
||||
"class": {
|
||||
'picker-opt': true,
|
||||
@@ -2109,7 +2131,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
},
|
||||
"opt-index": index
|
||||
}, o.text);
|
||||
})), col.suffix && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})), col.suffix && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "picker-suffix",
|
||||
style: {
|
||||
width: col.suffixWidth
|
||||
@@ -2119,7 +2141,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -45,21 +45,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
var fabCss = ":host{position:absolute;z-index:999}:host(.fab-horizontal-center){left:50%;margin-left:-28px}:host-context([dir=rtl]):host(.fab-horizontal-center),:host-context([dir=rtl]).fab-horizontal-center{left:unset;right:unset;right:50%}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.fab-horizontal-center){margin-left:unset;-webkit-margin-start:-28px;margin-inline-start:-28px}}:host(.fab-horizontal-start){left:calc(10px + var(--ion-safe-area-left, 0px))}:host-context([dir=rtl]):host(.fab-horizontal-start),:host-context([dir=rtl]).fab-horizontal-start{left:unset;right:unset;right:calc(10px + var(--ion-safe-area-left, 0px))}:host(.fab-horizontal-end){right:calc(10px + var(--ion-safe-area-right, 0px))}:host-context([dir=rtl]):host(.fab-horizontal-end),:host-context([dir=rtl]).fab-horizontal-end{left:unset;right:unset;left:calc(10px + var(--ion-safe-area-right, 0px))}:host(.fab-vertical-top){top:10px}:host(.fab-vertical-top.fab-edge){top:-28px}:host(.fab-vertical-bottom){bottom:10px}:host(.fab-vertical-bottom.fab-edge){bottom:-28px}:host(.fab-vertical-center){margin-top:-28px;top:50%}";
|
||||
|
||||
@@ -69,7 +69,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Fab);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the fab will display on the edge of the header if
|
||||
* `vertical` is `"top"`, and on the edge of the footer if
|
||||
@@ -159,16 +159,16 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var horizontal = this.horizontal,
|
||||
vertical = this.vertical,
|
||||
edge = this.edge;
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onClick: this.onClick,
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, "fab-horizontal-".concat(horizontal), horizontal !== undefined), _defineProperty(_class, "fab-vertical-".concat(vertical), vertical !== undefined), _defineProperty(_class, 'fab-edge', edge), _class)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
@@ -192,9 +192,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, FabButton);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionFocus = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionFocus = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
/**
|
||||
* If `true`, the fab button will be show a close icon.
|
||||
*/
|
||||
@@ -248,7 +248,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(FabButton, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object$assign,
|
||||
var _Object,
|
||||
_this3 = this;
|
||||
|
||||
var el = this.el,
|
||||
@@ -259,8 +259,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
show = this.show,
|
||||
translucent = this.translucent,
|
||||
size = this.size;
|
||||
var inList = Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__["h"])('ion-fab-list', el);
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var inList = Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__["h"])('ion-fab-list', el);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var TagType = href === undefined ? 'button' : 'a';
|
||||
var attrs = TagType === 'button' ? {
|
||||
type: this.type
|
||||
@@ -270,31 +270,31 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
rel: this.rel,
|
||||
target: this.target
|
||||
};
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"aria-disabled": disabled ? 'true' : null,
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__["c"])(color)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'fab-button-in-list', inList), _defineProperty(_Object$assign, 'fab-button-translucent-in-list', inList && translucent), _defineProperty(_Object$assign, 'fab-button-close-active', activated), _defineProperty(_Object$assign, 'fab-button-show', show), _defineProperty(_Object$assign, 'fab-button-disabled', disabled), _defineProperty(_Object$assign, 'fab-button-translucent', translucent), _defineProperty(_Object$assign, 'ion-activatable', true), _defineProperty(_Object$assign, 'ion-focusable', true), _defineProperty(_Object$assign, "fab-button-".concat(size), size !== undefined), _Object$assign))
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(TagType, Object.assign({}, attrs, {
|
||||
"class": Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__["c"])(color, (_Object = {}, _defineProperty(_Object, mode, true), _defineProperty(_Object, 'fab-button-in-list', inList), _defineProperty(_Object, 'fab-button-translucent-in-list', inList && translucent), _defineProperty(_Object, 'fab-button-close-active', activated), _defineProperty(_Object, 'fab-button-show', show), _defineProperty(_Object, 'fab-button-disabled', disabled), _defineProperty(_Object, 'fab-button-translucent', translucent), _defineProperty(_Object, 'ion-activatable', true), _defineProperty(_Object, 'ion-focusable', true), _defineProperty(_Object, "fab-button-".concat(size), size !== undefined), _Object))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(TagType, Object.assign({}, attrs, {
|
||||
"class": "button-native",
|
||||
part: "native",
|
||||
disabled: disabled,
|
||||
onFocus: this.onFocus,
|
||||
onBlur: this.onBlur,
|
||||
onClick: function onClick(ev) {
|
||||
return Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__["o"])(href, ev, _this3.routerDirection, _this3.routerAnimation);
|
||||
return Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__["o"])(href, ev, _this3.routerDirection, _this3.routerAnimation);
|
||||
}
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
icon: this.closeIcon,
|
||||
part: "close-icon",
|
||||
"class": "close-icon",
|
||||
lazy: false
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
"class": "button-inner"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)), mode === 'md' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null)));
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)), mode === 'md' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null)));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -311,7 +311,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function FabList(hostRef) {
|
||||
_classCallCheck(this, FabList);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the fab list will show all fab buttons in the list.
|
||||
*/
|
||||
@@ -341,15 +341,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class2;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class2 = {}, _defineProperty(_class2, mode, true), _defineProperty(_class2, 'fab-list-active', this.activated), _defineProperty(_class2, "fab-list-side-".concat(this.side), true), _class2)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,75 +10,75 @@
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_img", function() { return Img; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
|
||||
|
||||
|
||||
const imgCss = ":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}";
|
||||
|
||||
const Img = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionImgWillLoad = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgWillLoad", 7);
|
||||
this.ionImgDidLoad = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgDidLoad", 7);
|
||||
this.ionError = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionError", 7);
|
||||
this.onLoad = () => {
|
||||
this.ionImgDidLoad.emit();
|
||||
};
|
||||
this.onError = () => {
|
||||
this.ionError.emit();
|
||||
};
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionImgWillLoad = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgWillLoad", 7);
|
||||
this.ionImgDidLoad = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgDidLoad", 7);
|
||||
this.ionError = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionError", 7);
|
||||
this.onLoad = () => {
|
||||
this.ionImgDidLoad.emit();
|
||||
};
|
||||
this.onError = () => {
|
||||
this.ionError.emit();
|
||||
};
|
||||
}
|
||||
srcChanged() {
|
||||
this.addIO();
|
||||
}
|
||||
componentDidLoad() {
|
||||
this.addIO();
|
||||
}
|
||||
addIO() {
|
||||
if (this.src === undefined) {
|
||||
return;
|
||||
}
|
||||
srcChanged() {
|
||||
this.addIO();
|
||||
}
|
||||
componentDidLoad() {
|
||||
this.addIO();
|
||||
}
|
||||
addIO() {
|
||||
if (this.src === undefined) {
|
||||
return;
|
||||
}
|
||||
if (typeof window !== 'undefined' &&
|
||||
'IntersectionObserver' in window &&
|
||||
'IntersectionObserverEntry' in window &&
|
||||
'isIntersecting' in window.IntersectionObserverEntry.prototype) {
|
||||
this.removeIO();
|
||||
this.io = new IntersectionObserver(data => {
|
||||
// because there will only ever be one instance
|
||||
// of the element we are observing
|
||||
// we can just use data[0]
|
||||
if (data[0].isIntersecting) {
|
||||
this.load();
|
||||
this.removeIO();
|
||||
}
|
||||
});
|
||||
this.io.observe(this.el);
|
||||
}
|
||||
else {
|
||||
// fall back to setTimeout for Safari and IE
|
||||
setTimeout(() => this.load(), 200);
|
||||
if (typeof window !== 'undefined' &&
|
||||
'IntersectionObserver' in window &&
|
||||
'IntersectionObserverEntry' in window &&
|
||||
'isIntersecting' in window.IntersectionObserverEntry.prototype) {
|
||||
this.removeIO();
|
||||
this.io = new IntersectionObserver(data => {
|
||||
// because there will only ever be one instance
|
||||
// of the element we are observing
|
||||
// we can just use data[0]
|
||||
if (data[0].isIntersecting) {
|
||||
this.load();
|
||||
this.removeIO();
|
||||
}
|
||||
});
|
||||
this.io.observe(this.el);
|
||||
}
|
||||
load() {
|
||||
this.loadError = this.onError;
|
||||
this.loadSrc = this.src;
|
||||
this.ionImgWillLoad.emit();
|
||||
else {
|
||||
// fall back to setTimeout for Safari and IE
|
||||
setTimeout(() => this.load(), 200);
|
||||
}
|
||||
removeIO() {
|
||||
if (this.io) {
|
||||
this.io.disconnect();
|
||||
this.io = undefined;
|
||||
}
|
||||
}
|
||||
load() {
|
||||
this.loadError = this.onError;
|
||||
this.loadSrc = this.src;
|
||||
this.ionImgWillLoad.emit();
|
||||
}
|
||||
removeIO() {
|
||||
if (this.io) {
|
||||
this.io.disconnect();
|
||||
this.io = undefined;
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("img", { decoding: "async", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: "image" })));
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"src": ["srcChanged"]
|
||||
}; }
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("img", { decoding: "async", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: "image" })));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"src": ["srcChanged"]
|
||||
}; }
|
||||
};
|
||||
Img.style = imgCss;
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAA6G;AAChD;;AAE7D,sBAAsB,cAAc,sBAAsB,mBAAmB,IAAI,cAAc,WAAW,YAAY,sBAAsB,mBAAmB,2BAA2B,wBAAwB;;AAElN;AACA;AACA,QAAQ,4DAAgB;AACxB,8BAA8B,4DAAW;AACzC,6BAA6B,4DAAW;AACxC,wBAAwB,4DAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4DAAC,CAAC,oDAAI,GAAG,QAAQ,mEAAU,QAAQ,EAAE,4DAAC,SAAS,mHAAmH;AAClL;AACA,cAAc,QAAQ,4DAAU,OAAO;AACvC,2BAA2B;AAC3B;AACA,MAAM;AACN;AACA;;AAE0B","file":"13-es2015.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-44bf8136.js';\nimport { b as getIonMode } from './ionic-global-837be8f3.js';\n\nconst imgCss = \":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}\";\n\nconst Img = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionImgWillLoad = createEvent(this, \"ionImgWillLoad\", 7);\n this.ionImgDidLoad = createEvent(this, \"ionImgDidLoad\", 7);\n this.ionError = createEvent(this, \"ionError\", 7);\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n }\n srcChanged() {\n this.addIO();\n }\n componentDidLoad() {\n this.addIO();\n }\n addIO() {\n if (this.src === undefined) {\n return;\n }\n if (typeof window !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype) {\n this.removeIO();\n this.io = new IntersectionObserver(data => {\n // because there will only ever be one instance\n // of the element we are observing\n // we can just use data[0]\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n this.io.observe(this.el);\n }\n else {\n // fall back to setTimeout for Safari and IE\n setTimeout(() => this.load(), 200);\n }\n }\n load() {\n this.loadError = this.onError;\n this.loadSrc = this.src;\n this.ionImgWillLoad.emit();\n }\n removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n render() {\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: \"image\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"],"sourceRoot":"webpack:///"}
|
||||
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAA6G;AAChD;;AAE7D,sBAAsB,cAAc,sBAAsB,mBAAmB,IAAI,cAAc,WAAW,YAAY,sBAAsB,mBAAmB,2BAA2B,wBAAwB;;AAElN;AACA;AACA,IAAI,4DAAgB;AACpB,0BAA0B,4DAAW;AACrC,yBAAyB,4DAAW;AACpC,oBAAoB,4DAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAC,CAAC,oDAAI,GAAG,QAAQ,mEAAU,QAAQ,EAAE,4DAAC,SAAS,mHAAmH;AAC9K;AACA,YAAY,QAAQ,4DAAU,OAAO;AACrC,yBAAyB;AACzB;AACA,IAAI;AACJ;AACA;;AAE0B","file":"13-es2015.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\n\nconst imgCss = \":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}\";\n\nconst Img = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionImgWillLoad = createEvent(this, \"ionImgWillLoad\", 7);\n this.ionImgDidLoad = createEvent(this, \"ionImgDidLoad\", 7);\n this.ionError = createEvent(this, \"ionError\", 7);\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n }\n srcChanged() {\n this.addIO();\n }\n componentDidLoad() {\n this.addIO();\n }\n addIO() {\n if (this.src === undefined) {\n return;\n }\n if (typeof window !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype) {\n this.removeIO();\n this.io = new IntersectionObserver(data => {\n // because there will only ever be one instance\n // of the element we are observing\n // we can just use data[0]\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n this.io.observe(this.el);\n }\n else {\n // fall back to setTimeout for Safari and IE\n setTimeout(() => this.load(), 200);\n }\n }\n load() {\n this.loadError = this.onError;\n this.loadSrc = this.src;\n this.ionImgWillLoad.emit();\n }\n removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n render() {\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: \"image\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"],"sourceRoot":"webpack:///"}
|
||||
@@ -27,15 +27,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
|
||||
var imgCss = ":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}";
|
||||
|
||||
@@ -45,10 +45,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Img);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionImgWillLoad = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgWillLoad", 7);
|
||||
this.ionImgDidLoad = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgDidLoad", 7);
|
||||
this.ionError = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionError", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionImgWillLoad = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgWillLoad", 7);
|
||||
this.ionImgDidLoad = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionImgDidLoad", 7);
|
||||
this.ionError = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionError", 7);
|
||||
|
||||
this.onLoad = function () {
|
||||
_this.ionImgDidLoad.emit();
|
||||
@@ -116,9 +116,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("img", {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("img", {
|
||||
decoding: "async",
|
||||
src: this.loadSrc,
|
||||
alt: this.alt,
|
||||
@@ -130,7 +130,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"names":["imgCss","Img","hostRef","ionImgWillLoad","ionImgDidLoad","ionError","onLoad","emit","onError","addIO","src","undefined","window","IntersectionObserverEntry","prototype","removeIO","io","IntersectionObserver","data","isIntersecting","load","observe","el","setTimeout","loadError","loadSrc","disconnect","decoding","alt","part","style"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAGA,QAAMA,MAAM,GAAG,oMAAf;;AAEA,QAAMC,GAAG;AACL,mBAAYC,OAAZ,EAAqB;AAAA;;AAAA;;AACjB,qEAAiB,IAAjB,EAAuBA,OAAvB;AACA,aAAKC,cAAL,GAAsB,6DAAY,IAAZ,EAAkB,gBAAlB,EAAoC,CAApC,CAAtB;AACA,aAAKC,aAAL,GAAqB,6DAAY,IAAZ,EAAkB,eAAlB,EAAmC,CAAnC,CAArB;AACA,aAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,UAAlB,EAA8B,CAA9B,CAAhB;;AACA,aAAKC,MAAL,GAAc,YAAM;AAChB,eAAI,CAACF,aAAL,CAAmBG,IAAnB;AACH,SAFD;;AAGA,aAAKC,OAAL,GAAe,YAAM;AACjB,eAAI,CAACH,QAAL,CAAcE,IAAd;AACH,SAFD;AAGH;;AAZI;AAAA;AAAA,qCAaQ;AACT,eAAKE,KAAL;AACH;AAfI;AAAA;AAAA,2CAgBc;AACf,eAAKA,KAAL;AACH;AAlBI;AAAA;AAAA,gCAmBG;AAAA;;AACJ,cAAI,KAAKC,GAAL,KAAaC,SAAjB,EAA4B;AACxB;AACH;;AACD,cAAI,OAAOC,MAAP,KAAkB,WAAlB,IACA,0BAA0BA,MAD1B,IAEA,+BAA+BA,MAF/B,IAGA,oBAAoBA,MAAM,CAACC,yBAAP,CAAiCC,SAHzD,EAGoE;AAChE,iBAAKC,QAAL;AACA,iBAAKC,EAAL,GAAU,IAAIC,oBAAJ,CAAyB,UAAAC,IAAI,EAAI;AACvC;AACA;AACA;AACA,kBAAIA,IAAI,CAAC,CAAD,CAAJ,CAAQC,cAAZ,EAA4B;AACxB,sBAAI,CAACC,IAAL;;AACA,sBAAI,CAACL,QAAL;AACH;AACJ,aARS,CAAV;AASA,iBAAKC,EAAL,CAAQK,OAAR,CAAgB,KAAKC,EAArB;AACH,WAfD,MAgBK;AACD;AACAC,sBAAU,CAAC;AAAA,qBAAM,MAAI,CAACH,IAAL,EAAN;AAAA,aAAD,EAAoB,GAApB,CAAV;AACH;AACJ;AA3CI;AAAA;AAAA,+BA4CE;AACH,eAAKI,SAAL,GAAiB,KAAKhB,OAAtB;AACA,eAAKiB,OAAL,GAAe,KAAKf,GAApB;AACA,eAAKP,cAAL,CAAoBI,IAApB;AACH;AAhDI;AAAA;AAAA,mCAiDM;AACP,cAAI,KAAKS,EAAT,EAAa;AACT,iBAAKA,EAAL,CAAQU,UAAR;AACA,iBAAKV,EAAL,GAAUL,SAAV;AACH;AACJ;AAtDI;AAAA;AAAA,iCAuDI;AACL,iBAAQ,6DAAE,oDAAF,EAAQ;AAAE,qBAAO,oEAAW,IAAX;AAAT,WAAR,EAAqC,6DAAE,KAAF,EAAS;AAAEgB,oBAAQ,EAAE,OAAZ;AAAqBjB,eAAG,EAAE,KAAKe,OAA/B;AAAwCG,eAAG,EAAE,KAAKA,GAAlD;AAAuDtB,kBAAM,EAAE,KAAKA,MAApE;AAA4EE,mBAAO,EAAE,KAAKgB,SAA1F;AAAqGK,gBAAI,EAAE;AAA3G,WAAT,CAArC,CAAR;AACH;AAzDI;AAAA;AAAA,4BA0DI;AAAE,iBAAO,6DAAW,IAAX,CAAP;AAA0B;AA1DhC;AAAA;AAAA,4BA2DiB;AAAE,iBAAO;AAC3B,mBAAO,CAAC,YAAD;AADoB,WAAP;AAEpB;AA7DC;;AAAA;AAAA,OAAT;;AA+DA5B,OAAG,CAAC6B,KAAJ,GAAY9B,MAAZ","file":"13-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-44bf8136.js';\nimport { b as getIonMode } from './ionic-global-837be8f3.js';\n\nconst imgCss = \":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}\";\n\nconst Img = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionImgWillLoad = createEvent(this, \"ionImgWillLoad\", 7);\n this.ionImgDidLoad = createEvent(this, \"ionImgDidLoad\", 7);\n this.ionError = createEvent(this, \"ionError\", 7);\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n }\n srcChanged() {\n this.addIO();\n }\n componentDidLoad() {\n this.addIO();\n }\n addIO() {\n if (this.src === undefined) {\n return;\n }\n if (typeof window !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype) {\n this.removeIO();\n this.io = new IntersectionObserver(data => {\n // because there will only ever be one instance\n // of the element we are observing\n // we can just use data[0]\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n this.io.observe(this.el);\n }\n else {\n // fall back to setTimeout for Safari and IE\n setTimeout(() => this.load(), 200);\n }\n }\n load() {\n this.loadError = this.onError;\n this.loadSrc = this.src;\n this.ionImgWillLoad.emit();\n }\n removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n render() {\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: \"image\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"]}
|
||||
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"names":["imgCss","Img","hostRef","ionImgWillLoad","ionImgDidLoad","ionError","onLoad","emit","onError","addIO","src","undefined","window","IntersectionObserverEntry","prototype","removeIO","io","IntersectionObserver","data","isIntersecting","load","observe","el","setTimeout","loadError","loadSrc","disconnect","decoding","alt","part","style"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAGA,QAAMA,MAAM,GAAG,oMAAf;;AAEA,QAAMC,GAAG;AACP,mBAAYC,OAAZ,EAAqB;AAAA;;AAAA;;AACnB,qEAAiB,IAAjB,EAAuBA,OAAvB;AACA,aAAKC,cAAL,GAAsB,6DAAY,IAAZ,EAAkB,gBAAlB,EAAoC,CAApC,CAAtB;AACA,aAAKC,aAAL,GAAqB,6DAAY,IAAZ,EAAkB,eAAlB,EAAmC,CAAnC,CAArB;AACA,aAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,UAAlB,EAA8B,CAA9B,CAAhB;;AACA,aAAKC,MAAL,GAAc,YAAM;AAClB,eAAI,CAACF,aAAL,CAAmBG,IAAnB;AACD,SAFD;;AAGA,aAAKC,OAAL,GAAe,YAAM;AACnB,eAAI,CAACH,QAAL,CAAcE,IAAd;AACD,SAFD;AAGD;;AAZM;AAAA;AAAA,eAaP,sBAAa;AACX,eAAKE,KAAL;AACD;AAfM;AAAA;AAAA,eAgBP,4BAAmB;AACjB,eAAKA,KAAL;AACD;AAlBM;AAAA;AAAA,eAmBP,iBAAQ;AAAA;;AACN,cAAI,KAAKC,GAAL,KAAaC,SAAjB,EAA4B;AAC1B;AACD;;AACD,cAAI,OAAOC,MAAP,KAAkB,WAAlB,IACF,0BAA0BA,MADxB,IAEF,+BAA+BA,MAF7B,IAGF,oBAAoBA,MAAM,CAACC,yBAAP,CAAiCC,SAHvD,EAGkE;AAChE,iBAAKC,QAAL;AACA,iBAAKC,EAAL,GAAU,IAAIC,oBAAJ,CAAyB,UAAAC,IAAI,EAAI;AACzC;AACA;AACA;AACA,kBAAIA,IAAI,CAAC,CAAD,CAAJ,CAAQC,cAAZ,EAA4B;AAC1B,sBAAI,CAACC,IAAL;;AACA,sBAAI,CAACL,QAAL;AACD;AACF,aARS,CAAV;AASA,iBAAKC,EAAL,CAAQK,OAAR,CAAgB,KAAKC,EAArB;AACD,WAfD,MAgBK;AACH;AACAC,sBAAU,CAAC;AAAA,qBAAM,MAAI,CAACH,IAAL,EAAN;AAAA,aAAD,EAAoB,GAApB,CAAV;AACD;AACF;AA3CM;AAAA;AAAA,eA4CP,gBAAO;AACL,eAAKI,SAAL,GAAiB,KAAKhB,OAAtB;AACA,eAAKiB,OAAL,GAAe,KAAKf,GAApB;AACA,eAAKP,cAAL,CAAoBI,IAApB;AACD;AAhDM;AAAA;AAAA,eAiDP,oBAAW;AACT,cAAI,KAAKS,EAAT,EAAa;AACX,iBAAKA,EAAL,CAAQU,UAAR;AACA,iBAAKV,EAAL,GAAUL,SAAV;AACD;AACF;AAtDM;AAAA;AAAA,eAuDP,kBAAS;AACP,iBAAQ,6DAAE,oDAAF,EAAQ;AAAE,qBAAO,oEAAW,IAAX;AAAT,WAAR,EAAqC,6DAAE,KAAF,EAAS;AAAEgB,oBAAQ,EAAE,OAAZ;AAAqBjB,eAAG,EAAE,KAAKe,OAA/B;AAAwCG,eAAG,EAAE,KAAKA,GAAlD;AAAuDtB,kBAAM,EAAE,KAAKA,MAApE;AAA4EE,mBAAO,EAAE,KAAKgB,SAA1F;AAAqGK,gBAAI,EAAE;AAA3G,WAAT,CAArC,CAAR;AACD;AAzDM;AAAA;AAAA,aA0DP,eAAS;AAAE,iBAAO,6DAAW,IAAX,CAAP;AAA0B;AA1D9B;AAAA;AAAA,aA2DP,eAAsB;AAAE,iBAAO;AAC7B,mBAAO,CAAC,YAAD;AADsB,WAAP;AAEpB;AA7DG;;AAAA;AAAA,OAAT;;AA+DA5B,OAAG,CAAC6B,KAAJ,GAAY9B,MAAZ","file":"13-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\n\nconst imgCss = \":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}\";\n\nconst Img = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionImgWillLoad = createEvent(this, \"ionImgWillLoad\", 7);\n this.ionImgDidLoad = createEvent(this, \"ionImgDidLoad\", 7);\n this.ionError = createEvent(this, \"ionError\", 7);\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n }\n srcChanged() {\n this.addIO();\n }\n componentDidLoad() {\n this.addIO();\n }\n addIO() {\n if (this.src === undefined) {\n return;\n }\n if (typeof window !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype) {\n this.removeIO();\n this.io = new IntersectionObserver(data => {\n // because there will only ever be one instance\n // of the element we are observing\n // we can just use data[0]\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n this.io.observe(this.el);\n }\n else {\n // fall back to setTimeout for Safari and IE\n setTimeout(() => this.load(), 200);\n }\n }\n load() {\n this.loadError = this.onError;\n this.loadSrc = this.src;\n this.ionImgWillLoad.emit();\n }\n removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n render() {\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: \"image\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"]}
|
||||
@@ -11,9 +11,9 @@
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_infinite_scroll", function() { return InfiniteScroll; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_infinite_scroll_content", function() { return InfiniteScrollContent; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index-79d74e0b.js */ "./node_modules/@ionic/core/dist/esm/index-79d74e0b.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index-9e3fe806.js */ "./node_modules/@ionic/core/dist/esm/index-9e3fe806.js");
|
||||
|
||||
|
||||
|
||||
@@ -21,198 +21,198 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const infiniteScrollCss = "ion-infinite-scroll{display:none;width:100%}.infinite-scroll-enabled{display:block}";
|
||||
|
||||
const InfiniteScroll = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInfinite = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInfinite", 7);
|
||||
this.thrPx = 0;
|
||||
this.thrPc = 0;
|
||||
this.didFire = false;
|
||||
this.isBusy = false;
|
||||
this.isLoading = false;
|
||||
/**
|
||||
* The threshold distance from the bottom
|
||||
* of the content to call the `infinite` output event when scrolled.
|
||||
* The threshold value can be either a percent, or
|
||||
* in pixels. For example, use the value of `10%` for the `infinite`
|
||||
* output event to get called when the user has scrolled 10%
|
||||
* from the bottom of the page. Use the value `100px` when the
|
||||
* scroll is within 100 pixels from the bottom of the page.
|
||||
*/
|
||||
this.threshold = '15%';
|
||||
/**
|
||||
* If `true`, the infinite scroll will be hidden and scroll event listeners
|
||||
* will be removed.
|
||||
*
|
||||
* Set this to true to disable the infinite scroll from actively
|
||||
* trying to receive new data while scrolling. This is useful
|
||||
* when it is known that there is no more data that can be added, and
|
||||
* the infinite scroll is no longer needed.
|
||||
*/
|
||||
this.disabled = false;
|
||||
/**
|
||||
* The position of the infinite scroll element.
|
||||
* The value can be either `top` or `bottom`.
|
||||
*/
|
||||
this.position = 'bottom';
|
||||
this.onScroll = () => {
|
||||
const scrollEl = this.scrollEl;
|
||||
if (!scrollEl || !this.canStart()) {
|
||||
return 1;
|
||||
}
|
||||
const infiniteHeight = this.el.offsetHeight;
|
||||
if (infiniteHeight === 0) {
|
||||
// if there is no height of this element then do nothing
|
||||
return 2;
|
||||
}
|
||||
const scrollTop = scrollEl.scrollTop;
|
||||
const scrollHeight = scrollEl.scrollHeight;
|
||||
const height = scrollEl.offsetHeight;
|
||||
const threshold = this.thrPc !== 0 ? (height * this.thrPc) : this.thrPx;
|
||||
const distanceFromInfinite = (this.position === 'bottom')
|
||||
? scrollHeight - infiniteHeight - scrollTop - threshold - height
|
||||
: scrollTop - infiniteHeight - threshold;
|
||||
if (distanceFromInfinite < 0) {
|
||||
if (!this.didFire) {
|
||||
this.isLoading = true;
|
||||
this.didFire = true;
|
||||
this.ionInfinite.emit();
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.didFire = false;
|
||||
}
|
||||
return 4;
|
||||
};
|
||||
}
|
||||
thresholdChanged() {
|
||||
const val = this.threshold;
|
||||
if (val.lastIndexOf('%') > -1) {
|
||||
this.thrPx = 0;
|
||||
this.thrPc = (parseFloat(val) / 100);
|
||||
}
|
||||
else {
|
||||
this.thrPx = parseFloat(val);
|
||||
this.thrPc = 0;
|
||||
}
|
||||
}
|
||||
disabledChanged() {
|
||||
const disabled = this.disabled;
|
||||
if (disabled) {
|
||||
this.isLoading = false;
|
||||
this.isBusy = false;
|
||||
}
|
||||
this.enableScrollEvents(!disabled);
|
||||
}
|
||||
async connectedCallback() {
|
||||
const contentEl = this.el.closest('ion-content');
|
||||
if (!contentEl) {
|
||||
console.error('<ion-infinite-scroll> must be used inside an <ion-content>');
|
||||
return;
|
||||
}
|
||||
this.scrollEl = await contentEl.getScrollElement();
|
||||
this.thresholdChanged();
|
||||
this.disabledChanged();
|
||||
if (this.position === 'top') {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => {
|
||||
if (this.scrollEl) {
|
||||
this.scrollEl.scrollTop = this.scrollEl.scrollHeight - this.scrollEl.clientHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
disconnectedCallback() {
|
||||
this.enableScrollEvents(false);
|
||||
this.scrollEl = undefined;
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInfinite = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInfinite", 7);
|
||||
this.thrPx = 0;
|
||||
this.thrPc = 0;
|
||||
this.didFire = false;
|
||||
this.isBusy = false;
|
||||
this.isLoading = false;
|
||||
/**
|
||||
* Call `complete()` within the `ionInfinite` output event handler when
|
||||
* your async operation has completed. For example, the `loading`
|
||||
* state is while the app is performing an asynchronous operation,
|
||||
* such as receiving more data from an AJAX request to add more items
|
||||
* to a data list. Once the data has been received and UI updated, you
|
||||
* then call this method to signify that the loading has completed.
|
||||
* This method will change the infinite scroll's state from `loading`
|
||||
* to `enabled`.
|
||||
* The threshold distance from the bottom
|
||||
* of the content to call the `infinite` output event when scrolled.
|
||||
* The threshold value can be either a percent, or
|
||||
* in pixels. For example, use the value of `10%` for the `infinite`
|
||||
* output event to get called when the user has scrolled 10%
|
||||
* from the bottom of the page. Use the value `100px` when the
|
||||
* scroll is within 100 pixels from the bottom of the page.
|
||||
*/
|
||||
async complete() {
|
||||
const scrollEl = this.scrollEl;
|
||||
if (!this.isLoading || !scrollEl) {
|
||||
return;
|
||||
}
|
||||
this.isLoading = false;
|
||||
if (this.position === 'top') {
|
||||
/**
|
||||
* New content is being added at the top, but the scrollTop position stays the same,
|
||||
* which causes a scroll jump visually. This algorithm makes sure to prevent this.
|
||||
* (Frame 1)
|
||||
* - complete() is called, but the UI hasn't had time to update yet.
|
||||
* - Save the current content dimensions.
|
||||
* - Wait for the next frame using _dom.read, so the UI will be updated.
|
||||
* (Frame 2)
|
||||
* - Read the new content dimensions.
|
||||
* - Calculate the height difference and the new scroll position.
|
||||
* - Delay the scroll position change until other possible dom reads are done using _dom.write to be performant.
|
||||
* (Still frame 2, if I'm correct)
|
||||
* - Change the scroll position (= visually maintain the scroll position).
|
||||
* - Change the state to re-enable the InfiniteScroll.
|
||||
* - This should be after changing the scroll position, or it could
|
||||
* cause the InfiniteScroll to be triggered again immediately.
|
||||
* (Frame 3)
|
||||
* Done.
|
||||
*/
|
||||
this.isBusy = true;
|
||||
// ******** DOM READ ****************
|
||||
// Save the current content dimensions before the UI updates
|
||||
const prev = scrollEl.scrollHeight - scrollEl.scrollTop;
|
||||
// ******** DOM READ ****************
|
||||
requestAnimationFrame(() => {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["f"])(() => {
|
||||
// UI has updated, save the new content dimensions
|
||||
const scrollHeight = scrollEl.scrollHeight;
|
||||
// New content was added on top, so the scroll position should be changed immediately to prevent it from jumping around
|
||||
const newScrollTop = scrollHeight - prev;
|
||||
// ******** DOM WRITE ****************
|
||||
requestAnimationFrame(() => {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => {
|
||||
scrollEl.scrollTop = newScrollTop;
|
||||
this.isBusy = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
this.threshold = '15%';
|
||||
/**
|
||||
* If `true`, the infinite scroll will be hidden and scroll event listeners
|
||||
* will be removed.
|
||||
*
|
||||
* Set this to true to disable the infinite scroll from actively
|
||||
* trying to receive new data while scrolling. This is useful
|
||||
* when it is known that there is no more data that can be added, and
|
||||
* the infinite scroll is no longer needed.
|
||||
*/
|
||||
this.disabled = false;
|
||||
/**
|
||||
* The position of the infinite scroll element.
|
||||
* The value can be either `top` or `bottom`.
|
||||
*/
|
||||
this.position = 'bottom';
|
||||
this.onScroll = () => {
|
||||
const scrollEl = this.scrollEl;
|
||||
if (!scrollEl || !this.canStart()) {
|
||||
return 1;
|
||||
}
|
||||
const infiniteHeight = this.el.offsetHeight;
|
||||
if (infiniteHeight === 0) {
|
||||
// if there is no height of this element then do nothing
|
||||
return 2;
|
||||
}
|
||||
const scrollTop = scrollEl.scrollTop;
|
||||
const scrollHeight = scrollEl.scrollHeight;
|
||||
const height = scrollEl.offsetHeight;
|
||||
const threshold = this.thrPc !== 0 ? (height * this.thrPc) : this.thrPx;
|
||||
const distanceFromInfinite = (this.position === 'bottom')
|
||||
? scrollHeight - infiniteHeight - scrollTop - threshold - height
|
||||
: scrollTop - infiniteHeight - threshold;
|
||||
if (distanceFromInfinite < 0) {
|
||||
if (!this.didFire) {
|
||||
this.isLoading = true;
|
||||
this.didFire = true;
|
||||
this.ionInfinite.emit();
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.didFire = false;
|
||||
}
|
||||
return 4;
|
||||
};
|
||||
}
|
||||
thresholdChanged() {
|
||||
const val = this.threshold;
|
||||
if (val.lastIndexOf('%') > -1) {
|
||||
this.thrPx = 0;
|
||||
this.thrPc = (parseFloat(val) / 100);
|
||||
}
|
||||
canStart() {
|
||||
return (!this.disabled &&
|
||||
!this.isBusy &&
|
||||
!!this.scrollEl &&
|
||||
!this.isLoading);
|
||||
else {
|
||||
this.thrPx = parseFloat(val);
|
||||
this.thrPc = 0;
|
||||
}
|
||||
enableScrollEvents(shouldListen) {
|
||||
}
|
||||
disabledChanged() {
|
||||
const disabled = this.disabled;
|
||||
if (disabled) {
|
||||
this.isLoading = false;
|
||||
this.isBusy = false;
|
||||
}
|
||||
this.enableScrollEvents(!disabled);
|
||||
}
|
||||
async connectedCallback() {
|
||||
const contentEl = this.el.closest('ion-content');
|
||||
if (!contentEl) {
|
||||
console.error('<ion-infinite-scroll> must be used inside an <ion-content>');
|
||||
return;
|
||||
}
|
||||
this.scrollEl = await contentEl.getScrollElement();
|
||||
this.thresholdChanged();
|
||||
this.disabledChanged();
|
||||
if (this.position === 'top') {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => {
|
||||
if (this.scrollEl) {
|
||||
if (shouldListen) {
|
||||
this.scrollEl.addEventListener('scroll', this.onScroll);
|
||||
}
|
||||
else {
|
||||
this.scrollEl.removeEventListener('scroll', this.onScroll);
|
||||
}
|
||||
this.scrollEl.scrollTop = this.scrollEl.scrollHeight - this.scrollEl.clientHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const disabled = this.disabled;
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'infinite-scroll-loading': this.isLoading,
|
||||
'infinite-scroll-enabled': !disabled
|
||||
} }));
|
||||
}
|
||||
disconnectedCallback() {
|
||||
this.enableScrollEvents(false);
|
||||
this.scrollEl = undefined;
|
||||
}
|
||||
/**
|
||||
* Call `complete()` within the `ionInfinite` output event handler when
|
||||
* your async operation has completed. For example, the `loading`
|
||||
* state is while the app is performing an asynchronous operation,
|
||||
* such as receiving more data from an AJAX request to add more items
|
||||
* to a data list. Once the data has been received and UI updated, you
|
||||
* then call this method to signify that the loading has completed.
|
||||
* This method will change the infinite scroll's state from `loading`
|
||||
* to `enabled`.
|
||||
*/
|
||||
async complete() {
|
||||
const scrollEl = this.scrollEl;
|
||||
if (!this.isLoading || !scrollEl) {
|
||||
return;
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"threshold": ["thresholdChanged"],
|
||||
"disabled": ["disabledChanged"]
|
||||
}; }
|
||||
this.isLoading = false;
|
||||
if (this.position === 'top') {
|
||||
/**
|
||||
* New content is being added at the top, but the scrollTop position stays the same,
|
||||
* which causes a scroll jump visually. This algorithm makes sure to prevent this.
|
||||
* (Frame 1)
|
||||
* - complete() is called, but the UI hasn't had time to update yet.
|
||||
* - Save the current content dimensions.
|
||||
* - Wait for the next frame using _dom.read, so the UI will be updated.
|
||||
* (Frame 2)
|
||||
* - Read the new content dimensions.
|
||||
* - Calculate the height difference and the new scroll position.
|
||||
* - Delay the scroll position change until other possible dom reads are done using _dom.write to be performant.
|
||||
* (Still frame 2, if I'm correct)
|
||||
* - Change the scroll position (= visually maintain the scroll position).
|
||||
* - Change the state to re-enable the InfiniteScroll.
|
||||
* - This should be after changing the scroll position, or it could
|
||||
* cause the InfiniteScroll to be triggered again immediately.
|
||||
* (Frame 3)
|
||||
* Done.
|
||||
*/
|
||||
this.isBusy = true;
|
||||
// ******** DOM READ ****************
|
||||
// Save the current content dimensions before the UI updates
|
||||
const prev = scrollEl.scrollHeight - scrollEl.scrollTop;
|
||||
// ******** DOM READ ****************
|
||||
requestAnimationFrame(() => {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["f"])(() => {
|
||||
// UI has updated, save the new content dimensions
|
||||
const scrollHeight = scrollEl.scrollHeight;
|
||||
// New content was added on top, so the scroll position should be changed immediately to prevent it from jumping around
|
||||
const newScrollTop = scrollHeight - prev;
|
||||
// ******** DOM WRITE ****************
|
||||
requestAnimationFrame(() => {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => {
|
||||
scrollEl.scrollTop = newScrollTop;
|
||||
this.isBusy = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
canStart() {
|
||||
return (!this.disabled &&
|
||||
!this.isBusy &&
|
||||
!!this.scrollEl &&
|
||||
!this.isLoading);
|
||||
}
|
||||
enableScrollEvents(shouldListen) {
|
||||
if (this.scrollEl) {
|
||||
if (shouldListen) {
|
||||
this.scrollEl.addEventListener('scroll', this.onScroll);
|
||||
}
|
||||
else {
|
||||
this.scrollEl.removeEventListener('scroll', this.onScroll);
|
||||
}
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const disabled = this.disabled;
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'infinite-scroll-loading': this.isLoading,
|
||||
'infinite-scroll-enabled': !disabled
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"threshold": ["thresholdChanged"],
|
||||
"disabled": ["disabledChanged"]
|
||||
}; }
|
||||
};
|
||||
InfiniteScroll.style = infiniteScrollCss;
|
||||
|
||||
@@ -221,27 +221,27 @@ const infiniteScrollContentIosCss = "ion-infinite-scroll-content{display:-ms-fle
|
||||
const infiniteScrollContentMdCss = "ion-infinite-scroll-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.infinite-loading{margin-left:0;margin-right:0;margin-top:0;margin-bottom:32px;display:none;width:100%}.infinite-loading-text{margin-left:32px;margin-right:32px;margin-top:4px;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.infinite-loading-text{margin-left:unset;margin-right:unset;-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px}}.infinite-scroll-loading ion-infinite-scroll-content>.infinite-loading{display:block}.infinite-scroll-content-md .infinite-loading-text{color:var(--ion-color-step-600, #666666)}.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-small-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-crescent circle{stroke:var(--ion-color-step-600, #666666)}.infinite-scroll-content-md .infinite-loading-spinner .spinner-bubbles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-circles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-dots circle{fill:var(--ion-color-step-600, #666666)}";
|
||||
|
||||
const InfiniteScrollContent = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
componentDidLoad() {
|
||||
if (this.loadingSpinner === undefined) {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.loadingSpinner = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('infiniteLoadingSpinner', _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
// Used internally for styling
|
||||
[`infinite-scroll-content-${mode}`]: true
|
||||
} }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "infinite-loading" }, this.loadingSpinner && (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "infinite-loading-spinner" }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", { name: this.loadingSpinner }))), this.loadingText && (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "infinite-loading-text", innerHTML: Object(_index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_2__["s"])(this.loadingText) })))));
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
componentDidLoad() {
|
||||
if (this.loadingSpinner === undefined) {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.loadingSpinner = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('infiniteLoadingSpinner', _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
// Used internally for styling
|
||||
[`infinite-scroll-content-${mode}`]: true
|
||||
} }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "infinite-loading" }, this.loadingSpinner && (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "infinite-loading-spinner" }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", { name: this.loadingSpinner }))), this.loadingText && (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "infinite-loading-text", innerHTML: Object(_index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_2__["s"])(this.loadingText) })))));
|
||||
}
|
||||
};
|
||||
InfiniteScrollContent.style = {
|
||||
ios: infiniteScrollContentIosCss,
|
||||
md: infiniteScrollContentMdCss
|
||||
ios: infiniteScrollContentIosCss,
|
||||
md: infiniteScrollContentMdCss
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -39,21 +39,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./index-79d74e0b.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-79d74e0b.js");
|
||||
var _index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./index-9e3fe806.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-9e3fe806.js");
|
||||
|
||||
var infiniteScrollCss = "ion-infinite-scroll{display:none;width:100%}.infinite-scroll-enabled{display:block}";
|
||||
|
||||
@@ -63,8 +63,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, InfiniteScroll);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInfinite = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInfinite", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInfinite = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInfinite", 7);
|
||||
this.thrPx = 0;
|
||||
this.thrPc = 0;
|
||||
this.didFire = false;
|
||||
@@ -192,7 +192,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.disabledChanged();
|
||||
|
||||
if (this.position === 'top') {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
if (_this2.scrollEl) {
|
||||
_this2.scrollEl.scrollTop = _this2.scrollEl.scrollHeight - _this2.scrollEl.clientHeight;
|
||||
}
|
||||
@@ -279,14 +279,14 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
prev = scrollEl.scrollHeight - scrollEl.scrollTop; // ******** DOM READ ****************
|
||||
|
||||
requestAnimationFrame(function () {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
// UI has updated, save the new content dimensions
|
||||
var scrollHeight = scrollEl.scrollHeight; // New content was added on top, so the scroll position should be changed immediately to prevent it from jumping around
|
||||
|
||||
var newScrollTop = scrollHeight - prev; // ******** DOM WRITE ****************
|
||||
|
||||
requestAnimationFrame(function () {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
scrollEl.scrollTop = newScrollTop;
|
||||
_this3.isBusy = false;
|
||||
});
|
||||
@@ -330,16 +330,16 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var disabled = this.disabled;
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, 'infinite-scroll-loading', this.isLoading), _defineProperty(_class, 'infinite-scroll-enabled', !disabled), _class)
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
@@ -362,15 +362,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function InfiniteScrollContent(hostRef) {
|
||||
_classCallCheck(this, InfiniteScrollContent);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(InfiniteScrollContent, [{
|
||||
key: "componentDidLoad",
|
||||
value: function componentDidLoad() {
|
||||
if (this.loadingSpinner === undefined) {
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.loadingSpinner = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('infiniteLoadingSpinner', _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.loadingSpinner = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('infiniteLoadingSpinner', _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -378,18 +378,18 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class2;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class2 = {}, _defineProperty(_class2, mode, true), _defineProperty(_class2, "infinite-scroll-content-".concat(mode), true), _class2)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "infinite-loading"
|
||||
}, this.loadingSpinner && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, this.loadingSpinner && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "infinite-loading-spinner"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
name: this.loadingSpinner
|
||||
})), this.loadingText && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})), this.loadingText && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "infinite-loading-text",
|
||||
innerHTML: Object(_index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_2__["s"])(this.loadingText)
|
||||
innerHTML: Object(_index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_2__["s"])(this.loadingText)
|
||||
})));
|
||||
}
|
||||
}]);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,10 +10,10 @@
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_input", function() { return Input; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-5c745fbd.js */ "./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
/* harmony import */ var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-3f0b0c04.js */ "./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-90f46169.js */ "./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */ var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-ff3fc52f.js */ "./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
|
||||
|
||||
@@ -24,224 +24,248 @@ const inputIosCss = ".sc-ion-input-ios-h{--placeholder-color:initial;--placehold
|
||||
const inputMdCss = ".sc-ion-input-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--background:transparent;--color:initial;display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;width:100%;padding:0 !important;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item.sc-ion-input-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-input-md-h{--padding-start:0}.ion-color.sc-ion-input-md-h{color:var(--ion-color-base)}.native-input.sc-ion-input-md{border-radius:var(--border-radius);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.native-input.sc-ion-input-md{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-input.sc-ion-input-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-md:invalid{-webkit-box-shadow:none;box-shadow:none}.native-input.sc-ion-input-md::-ms-clear{display:none}.native-input[disabled].sc-ion-input-md{opacity:0.4}.cloned-input.sc-ion-input-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-input-md .cloned-input.sc-ion-input-md,[dir=rtl].sc-ion-input-md-h .cloned-input.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h .cloned-input.sc-ion-input-md{left:unset;right:unset;right:0}.input-clear-icon.sc-ion-input-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;background-position:center;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;visibility:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.input-clear-icon.sc-ion-input-md:focus{opacity:0.5}.has-value.sc-ion-input-md-h .input-clear-icon.sc-ion-input-md{visibility:visible}.has-focus.sc-ion-input-md-h{pointer-events:none}.has-focus.sc-ion-input-md-h input.sc-ion-input-md,.has-focus.sc-ion-input-md-h a.sc-ion-input-md,.has-focus.sc-ion-input-md-h button.sc-ion-input-md{pointer-events:auto}.sc-ion-input-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:8px;font-size:inherit}.item-label-stacked.sc-ion-input-md-h,.item-label-stacked .sc-ion-input-md-h,.item-label-floating.sc-ion-input-md-h,.item-label-floating .sc-ion-input-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}.input-clear-icon.sc-ion-input-md{background-image:url(\"data:image/svg+xml;charset=utf-8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'><polygon%20fill='var(--ion-color-step-600,%20%23666666)'%20points='405,136.798%20375.202,107%20256,226.202%20136.798,107%20107,136.798%20226.202,256%20107,375.202%20136.798,405%20256,285.798%20375.202,405%20405,375.202%20285.798,256'/></svg>\");width:30px;height:30px;background-size:22px}";
|
||||
|
||||
const Input = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInput = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInput", 7);
|
||||
this.ionChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.ionBlur = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.ionFocus = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionStyle = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.inputId = `ion-input-${inputIds++}`;
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInput = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInput", 7);
|
||||
this.ionChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.ionBlur = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.ionFocus = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionStyle = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.inputId = `ion-input-${inputIds++}`;
|
||||
this.didBlurAfterEdit = false;
|
||||
this.inheritedAttributes = {};
|
||||
/**
|
||||
* This is required for a WebKit bug which requires us to
|
||||
* blur and focus an input to properly focus the input in
|
||||
* an item with delegatesFocus. It will no longer be needed
|
||||
* with iOS 14.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
this.fireFocusEvents = true;
|
||||
this.hasFocus = false;
|
||||
/**
|
||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
||||
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
||||
*/
|
||||
this.autocapitalize = 'off';
|
||||
/**
|
||||
* Indicates whether the value of the control can be automatically completed by the browser.
|
||||
*/
|
||||
this.autocomplete = 'off';
|
||||
/**
|
||||
* Whether auto correction should be enabled when the user is entering/editing the text value.
|
||||
*/
|
||||
this.autocorrect = 'off';
|
||||
/**
|
||||
* This Boolean attribute lets you specify that a form control should have input focus when the page loads.
|
||||
*/
|
||||
this.autofocus = false;
|
||||
/**
|
||||
* If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.
|
||||
*/
|
||||
this.clearInput = false;
|
||||
/**
|
||||
* Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
|
||||
*/
|
||||
this.debounce = 0;
|
||||
/**
|
||||
* If `true`, the user cannot interact with the input.
|
||||
*/
|
||||
this.disabled = false;
|
||||
/**
|
||||
* The name of the control, which is submitted with the form data.
|
||||
*/
|
||||
this.name = this.inputId;
|
||||
/**
|
||||
* If `true`, the user cannot modify the value.
|
||||
*/
|
||||
this.readonly = false;
|
||||
/**
|
||||
* If `true`, the user must fill in a value before submitting a form.
|
||||
*/
|
||||
this.required = false;
|
||||
/**
|
||||
* If `true`, the element will have its spelling and grammar checked.
|
||||
*/
|
||||
this.spellcheck = false;
|
||||
/**
|
||||
* The type of control to display. The default type is text.
|
||||
*/
|
||||
this.type = 'text';
|
||||
/**
|
||||
* The value of the input.
|
||||
*/
|
||||
this.value = '';
|
||||
this.onInput = (ev) => {
|
||||
const input = ev.target;
|
||||
if (input) {
|
||||
this.value = input.value || '';
|
||||
}
|
||||
this.ionInput.emit(ev);
|
||||
};
|
||||
this.onBlur = (ev) => {
|
||||
this.hasFocus = false;
|
||||
this.focusChanged();
|
||||
this.emitStyle();
|
||||
if (this.fireFocusEvents) {
|
||||
this.ionBlur.emit(ev);
|
||||
}
|
||||
};
|
||||
this.onFocus = (ev) => {
|
||||
this.hasFocus = true;
|
||||
this.focusChanged();
|
||||
this.emitStyle();
|
||||
if (this.fireFocusEvents) {
|
||||
this.ionFocus.emit(ev);
|
||||
}
|
||||
};
|
||||
this.onKeydown = (ev) => {
|
||||
if (this.shouldClearOnEdit()) {
|
||||
// Did the input value change after it was blurred and edited?
|
||||
// Do not clear if user is hitting Enter to submit form
|
||||
if (this.didBlurAfterEdit && this.hasValue() && ev.key !== 'Enter') {
|
||||
// Clear the input
|
||||
this.clearTextInput();
|
||||
}
|
||||
// Reset the flag
|
||||
this.didBlurAfterEdit = false;
|
||||
this.hasFocus = false;
|
||||
/**
|
||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
||||
*/
|
||||
this.autocapitalize = 'off';
|
||||
/**
|
||||
* Indicates whether the value of the control can be automatically completed by the browser.
|
||||
*/
|
||||
this.autocomplete = 'off';
|
||||
/**
|
||||
* Whether auto correction should be enabled when the user is entering/editing the text value.
|
||||
*/
|
||||
this.autocorrect = 'off';
|
||||
/**
|
||||
* This Boolean attribute lets you specify that a form control should have input focus when the page loads.
|
||||
*/
|
||||
this.autofocus = false;
|
||||
/**
|
||||
* If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.
|
||||
*/
|
||||
this.clearInput = false;
|
||||
/**
|
||||
* Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke.
|
||||
*/
|
||||
this.debounce = 0;
|
||||
/**
|
||||
* If `true`, the user cannot interact with the input.
|
||||
*/
|
||||
this.disabled = false;
|
||||
/**
|
||||
* The name of the control, which is submitted with the form data.
|
||||
*/
|
||||
this.name = this.inputId;
|
||||
/**
|
||||
* If `true`, the user cannot modify the value.
|
||||
*/
|
||||
this.readonly = false;
|
||||
/**
|
||||
* If `true`, the user must fill in a value before submitting a form.
|
||||
*/
|
||||
this.required = false;
|
||||
/**
|
||||
* If `true`, the element will have its spelling and grammar checked.
|
||||
*/
|
||||
this.spellcheck = false;
|
||||
/**
|
||||
* The type of control to display. The default type is text.
|
||||
*/
|
||||
this.type = 'text';
|
||||
/**
|
||||
* The value of the input.
|
||||
*/
|
||||
this.value = '';
|
||||
this.onInput = (ev) => {
|
||||
const input = ev.target;
|
||||
if (input) {
|
||||
this.value = input.value || '';
|
||||
}
|
||||
this.ionInput.emit(ev);
|
||||
};
|
||||
this.onBlur = (ev) => {
|
||||
this.hasFocus = false;
|
||||
this.focusChanged();
|
||||
this.emitStyle();
|
||||
this.ionBlur.emit(ev);
|
||||
};
|
||||
this.onFocus = (ev) => {
|
||||
this.hasFocus = true;
|
||||
this.focusChanged();
|
||||
this.emitStyle();
|
||||
this.ionFocus.emit(ev);
|
||||
};
|
||||
this.onKeydown = (ev) => {
|
||||
if (this.shouldClearOnEdit()) {
|
||||
// Did the input value change after it was blurred and edited?
|
||||
// Do not clear if user is hitting Enter to submit form
|
||||
if (this.didBlurAfterEdit && this.hasValue() && ev.key !== 'Enter') {
|
||||
// Clear the input
|
||||
this.clearTextInput();
|
||||
}
|
||||
// Reset the flag
|
||||
this.didBlurAfterEdit = false;
|
||||
}
|
||||
};
|
||||
this.clearTextOnEnter = (ev) => {
|
||||
if (ev.key === 'Enter') {
|
||||
this.clearTextInput(ev);
|
||||
}
|
||||
};
|
||||
this.clearTextInput = (ev) => {
|
||||
if (this.clearInput && !this.readonly && !this.disabled && ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
}
|
||||
this.value = '';
|
||||
/**
|
||||
* This is needed for clearOnEdit
|
||||
* Otherwise the value will not be cleared
|
||||
* if user is inside the input
|
||||
*/
|
||||
if (this.nativeInput) {
|
||||
this.nativeInput.value = '';
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
this.clearTextOnEnter = (ev) => {
|
||||
if (ev.key === 'Enter') {
|
||||
this.clearTextInput(ev);
|
||||
}
|
||||
};
|
||||
this.clearTextInput = (ev) => {
|
||||
if (this.clearInput && !this.readonly && !this.disabled && ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
// Attempt to focus input again after pressing clear button
|
||||
this.setFocus();
|
||||
}
|
||||
this.value = '';
|
||||
/**
|
||||
* This is needed for clearOnEdit
|
||||
* Otherwise the value will not be cleared
|
||||
* if user is inside the input
|
||||
*/
|
||||
if (this.nativeInput) {
|
||||
this.nativeInput.value = '';
|
||||
}
|
||||
};
|
||||
}
|
||||
debounceChanged() {
|
||||
this.ionChange = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["e"])(this.ionChange, this.debounce);
|
||||
}
|
||||
disabledChanged() {
|
||||
this.emitStyle();
|
||||
}
|
||||
/**
|
||||
* Update the native input element when the value changes
|
||||
*/
|
||||
valueChanged() {
|
||||
this.emitStyle();
|
||||
this.ionChange.emit({ value: this.value == null ? this.value : this.value.toString() });
|
||||
}
|
||||
componentWillLoad() {
|
||||
this.inheritedAttributes = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["i"])(this.el, ['tabindex', 'title']);
|
||||
}
|
||||
connectedCallback() {
|
||||
this.emitStyle();
|
||||
this.debounceChanged();
|
||||
{
|
||||
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
||||
detail: this.el
|
||||
}));
|
||||
}
|
||||
debounceChanged() {
|
||||
this.ionChange = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["d"])(this.ionChange, this.debounce);
|
||||
}
|
||||
disconnectedCallback() {
|
||||
{
|
||||
document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
|
||||
detail: this.el
|
||||
}));
|
||||
}
|
||||
disabledChanged() {
|
||||
this.emitStyle();
|
||||
}
|
||||
/**
|
||||
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global
|
||||
* `input.focus()`.
|
||||
*/
|
||||
async setFocus() {
|
||||
if (this.nativeInput) {
|
||||
this.nativeInput.focus();
|
||||
}
|
||||
/**
|
||||
* Update the native input element when the value changes
|
||||
*/
|
||||
valueChanged() {
|
||||
this.emitStyle();
|
||||
this.ionChange.emit({ value: this.value == null ? this.value : this.value.toString() });
|
||||
}
|
||||
/**
|
||||
* Sets blur on the native `input` in `ion-input`. Use this method instead of the global
|
||||
* `input.blur()`.
|
||||
* @internal
|
||||
*/
|
||||
async setBlur() {
|
||||
if (this.nativeInput) {
|
||||
this.nativeInput.blur();
|
||||
}
|
||||
componentWillLoad() {
|
||||
// If the ion-input has a tabindex attribute we get the value
|
||||
// and pass it down to the native input, then remove it from the
|
||||
// ion-input to avoid causing tabbing twice on the same element
|
||||
if (this.el.hasAttribute('tabindex')) {
|
||||
const tabindex = this.el.getAttribute('tabindex');
|
||||
this.tabindex = tabindex !== null ? tabindex : undefined;
|
||||
this.el.removeAttribute('tabindex');
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns the native `<input>` element used under the hood.
|
||||
*/
|
||||
getInputElement() {
|
||||
return Promise.resolve(this.nativeInput);
|
||||
}
|
||||
shouldClearOnEdit() {
|
||||
const { type, clearOnEdit } = this;
|
||||
return (clearOnEdit === undefined)
|
||||
? type === 'password'
|
||||
: clearOnEdit;
|
||||
}
|
||||
getValue() {
|
||||
return typeof this.value === 'number' ? this.value.toString() :
|
||||
(this.value || '').toString();
|
||||
}
|
||||
emitStyle() {
|
||||
this.ionStyle.emit({
|
||||
'interactive': true,
|
||||
'input': true,
|
||||
'has-placeholder': this.placeholder != null,
|
||||
'has-value': this.hasValue(),
|
||||
'has-focus': this.hasFocus,
|
||||
'interactive-disabled': this.disabled,
|
||||
});
|
||||
}
|
||||
focusChanged() {
|
||||
// If clearOnEdit is enabled and the input blurred but has a value, set a flag
|
||||
if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {
|
||||
this.didBlurAfterEdit = true;
|
||||
}
|
||||
connectedCallback() {
|
||||
this.emitStyle();
|
||||
this.debounceChanged();
|
||||
{
|
||||
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
||||
detail: this.el
|
||||
}));
|
||||
}
|
||||
}
|
||||
hasValue() {
|
||||
return this.getValue().length > 0;
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const value = this.getValue();
|
||||
const labelId = this.inputId + '-lbl';
|
||||
const label = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["f"])(this.el);
|
||||
if (label) {
|
||||
label.id = labelId;
|
||||
}
|
||||
disconnectedCallback() {
|
||||
{
|
||||
document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
|
||||
detail: this.el
|
||||
}));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Sets focus on the specified `ion-input`. Use this method instead of the global
|
||||
* `input.focus()`.
|
||||
*/
|
||||
async setFocus() {
|
||||
if (this.nativeInput) {
|
||||
this.nativeInput.focus();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns the native `<input>` element used under the hood.
|
||||
*/
|
||||
getInputElement() {
|
||||
return Promise.resolve(this.nativeInput);
|
||||
}
|
||||
shouldClearOnEdit() {
|
||||
const { type, clearOnEdit } = this;
|
||||
return (clearOnEdit === undefined)
|
||||
? type === 'password'
|
||||
: clearOnEdit;
|
||||
}
|
||||
getValue() {
|
||||
return typeof this.value === 'number' ? this.value.toString() :
|
||||
(this.value || '').toString();
|
||||
}
|
||||
emitStyle() {
|
||||
this.ionStyle.emit({
|
||||
'interactive': true,
|
||||
'input': true,
|
||||
'has-placeholder': this.placeholder != null,
|
||||
'has-value': this.hasValue(),
|
||||
'has-focus': this.hasFocus,
|
||||
'interactive-disabled': this.disabled,
|
||||
});
|
||||
}
|
||||
focusChanged() {
|
||||
// If clearOnEdit is enabled and the input blurred but has a value, set a flag
|
||||
if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {
|
||||
this.didBlurAfterEdit = true;
|
||||
}
|
||||
}
|
||||
hasValue() {
|
||||
return this.getValue().length > 0;
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const value = this.getValue();
|
||||
const labelId = this.inputId + '-lbl';
|
||||
const label = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["f"])(this.el);
|
||||
if (label) {
|
||||
label.id = labelId;
|
||||
}
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { "aria-disabled": this.disabled ? 'true' : null, class: Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color)), { [mode]: true, 'has-value': this.hasValue(), 'has-focus': this.hasFocus }) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", { class: "native-input", ref: input => this.nativeInput = input, "aria-labelledby": labelId, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, tabindex: this.tabindex, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }), (this.clearInput && !this.readonly && !this.disabled) && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", { "aria-label": "reset", type: "button", class: "input-clear-icon", onTouchStart: this.clearTextInput, onMouseDown: this.clearTextInput, onKeyDown: this.clearTextOnEnter })));
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"debounce": ["debounceChanged"],
|
||||
"disabled": ["disabledChanged"],
|
||||
"value": ["valueChanged"]
|
||||
}; }
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { "aria-disabled": this.disabled ? 'true' : null, class: Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color, {
|
||||
[mode]: true,
|
||||
'has-value': this.hasValue(),
|
||||
'has-focus': this.hasFocus
|
||||
}) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", Object.assign({ class: "native-input", ref: input => this.nativeInput = input, "aria-labelledby": labelId, disabled: this.disabled, accept: this.accept, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, size: this.size, type: this.type, value: value, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown }, this.inheritedAttributes)), (this.clearInput && !this.readonly && !this.disabled) && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", { "aria-label": "reset", type: "button", class: "input-clear-icon", onTouchStart: this.clearTextInput, onMouseDown: this.clearTextInput, onKeyDown: this.clearTextOnEnter })));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"debounce": ["debounceChanged"],
|
||||
"disabled": ["disabledChanged"],
|
||||
"value": ["valueChanged"]
|
||||
}; }
|
||||
};
|
||||
let inputIds = 0;
|
||||
Input.style = {
|
||||
ios: inputIosCss,
|
||||
md: inputMdCss
|
||||
ios: inputIosCss,
|
||||
md: inputMdCss
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,27 +33,27 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
var inputIosCss = ".sc-ion-input-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--background:transparent;--color:initial;display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;width:100%;padding:0 !important;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item.sc-ion-input-ios-h:not(.item-label),ion-item:not(.item-label) .sc-ion-input-ios-h{--padding-start:0}.ion-color.sc-ion-input-ios-h{color:var(--ion-color-base)}.native-input.sc-ion-input-ios{border-radius:var(--border-radius);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.native-input.sc-ion-input-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-input.sc-ion-input-ios::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-ios:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-ios:invalid{-webkit-box-shadow:none;box-shadow:none}.native-input.sc-ion-input-ios::-ms-clear{display:none}.native-input[disabled].sc-ion-input-ios{opacity:0.4}.cloned-input.sc-ion-input-ios{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-input-ios .cloned-input.sc-ion-input-ios,[dir=rtl].sc-ion-input-ios-h .cloned-input.sc-ion-input-ios,[dir=rtl] .sc-ion-input-ios-h .cloned-input.sc-ion-input-ios{left:unset;right:unset;right:0}.input-clear-icon.sc-ion-input-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;background-position:center;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;visibility:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.input-clear-icon.sc-ion-input-ios:focus{opacity:0.5}.has-value.sc-ion-input-ios-h .input-clear-icon.sc-ion-input-ios{visibility:visible}.has-focus.sc-ion-input-ios-h{pointer-events:none}.has-focus.sc-ion-input-ios-h input.sc-ion-input-ios,.has-focus.sc-ion-input-ios-h a.sc-ion-input-ios,.has-focus.sc-ion-input-ios-h button.sc-ion-input-ios{pointer-events:auto}.sc-ion-input-ios-h{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:0;font-size:inherit}.item-label-stacked.sc-ion-input-ios-h,.item-label-stacked .sc-ion-input-ios-h,.item-label-floating.sc-ion-input-ios-h,.item-label-floating .sc-ion-input-ios-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0px}.input-clear-icon.sc-ion-input-ios{background-image:url(\"data:image/svg+xml;charset=utf-8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'><path%20fill='var(--ion-color-step-600,%20%23666666)'%20d='M403.1,108.9c-81.2-81.2-212.9-81.2-294.2,0s-81.2,212.9,0,294.2c81.2,81.2,212.9,81.2,294.2,0S484.3,190.1,403.1,108.9z%20M352,340.2L340.2,352l-84.4-84.2l-84,83.8L160,339.8l84-83.8l-84-83.8l11.8-11.8l84,83.8l84.4-84.2l11.8,11.8L267.6,256L352,340.2z'/></svg>\");width:30px;height:30px;background-size:18px}";
|
||||
var inputMdCss = ".sc-ion-input-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--background:transparent;--color:initial;display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;width:100%;padding:0 !important;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);z-index:2}ion-item.sc-ion-input-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-input-md-h{--padding-start:0}.ion-color.sc-ion-input-md-h{color:var(--ion-color-base)}.native-input.sc-ion-input-md{border-radius:var(--border-radius);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:inline-block;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.native-input.sc-ion-input-md{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-input.sc-ion-input-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-input.sc-ion-input-md:-webkit-autofill{background-color:transparent}.native-input.sc-ion-input-md:invalid{-webkit-box-shadow:none;box-shadow:none}.native-input.sc-ion-input-md::-ms-clear{display:none}.native-input[disabled].sc-ion-input-md{opacity:0.4}.cloned-input.sc-ion-input-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-input-md .cloned-input.sc-ion-input-md,[dir=rtl].sc-ion-input-md-h .cloned-input.sc-ion-input-md,[dir=rtl] .sc-ion-input-md-h .cloned-input.sc-ion-input-md{left:unset;right:unset;right:0}.input-clear-icon.sc-ion-input-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;background-position:center;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;visibility:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}.input-clear-icon.sc-ion-input-md:focus{opacity:0.5}.has-value.sc-ion-input-md-h .input-clear-icon.sc-ion-input-md{visibility:visible}.has-focus.sc-ion-input-md-h{pointer-events:none}.has-focus.sc-ion-input-md-h input.sc-ion-input-md,.has-focus.sc-ion-input-md-h a.sc-ion-input-md,.has-focus.sc-ion-input-md-h button.sc-ion-input-md{pointer-events:auto}.sc-ion-input-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:10px;--padding-start:8px;font-size:inherit}.item-label-stacked.sc-ion-input-md-h,.item-label-stacked .sc-ion-input-md-h,.item-label-floating.sc-ion-input-md-h,.item-label-floating .sc-ion-input-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}.input-clear-icon.sc-ion-input-md{background-image:url(\"data:image/svg+xml;charset=utf-8,<svg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'><polygon%20fill='var(--ion-color-step-600,%20%23666666)'%20points='405,136.798%20375.202,107%20256,226.202%20136.798,107%20107,136.798%20226.202,256%20107,375.202%20136.798,405%20256,285.798%20375.202,405%20405,375.202%20285.798,256'/></svg>\");width:30px;height:30px;background-size:22px}";
|
||||
@@ -64,17 +64,29 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Input);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInput = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInput", 7);
|
||||
this.ionChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.ionBlur = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.ionFocus = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionStyle = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionInput = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionInput", 7);
|
||||
this.ionChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.ionBlur = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.ionFocus = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionStyle = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.inputId = "ion-input-".concat(inputIds++);
|
||||
this.didBlurAfterEdit = false;
|
||||
this.inheritedAttributes = {};
|
||||
/**
|
||||
* This is required for a WebKit bug which requires us to
|
||||
* blur and focus an input to properly focus the input in
|
||||
* an item with delegatesFocus. It will no longer be needed
|
||||
* with iOS 14.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
|
||||
this.fireFocusEvents = true;
|
||||
this.hasFocus = false;
|
||||
/**
|
||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
||||
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
||||
*/
|
||||
|
||||
this.autocapitalize = 'off';
|
||||
@@ -99,7 +111,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
this.clearInput = false;
|
||||
/**
|
||||
* Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke.
|
||||
* Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
|
||||
*/
|
||||
|
||||
this.debounce = 0;
|
||||
@@ -156,7 +168,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_this.emitStyle();
|
||||
|
||||
_this.ionBlur.emit(ev);
|
||||
if (_this.fireFocusEvents) {
|
||||
_this.ionBlur.emit(ev);
|
||||
}
|
||||
};
|
||||
|
||||
this.onFocus = function (ev) {
|
||||
@@ -166,7 +180,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_this.emitStyle();
|
||||
|
||||
_this.ionFocus.emit(ev);
|
||||
if (_this.fireFocusEvents) {
|
||||
_this.ionFocus.emit(ev);
|
||||
}
|
||||
};
|
||||
|
||||
this.onKeydown = function (ev) {
|
||||
@@ -192,7 +208,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.clearTextInput = function (ev) {
|
||||
if (_this.clearInput && !_this.readonly && !_this.disabled && ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
ev.stopPropagation(); // Attempt to focus input again after pressing clear button
|
||||
|
||||
_this.setFocus();
|
||||
}
|
||||
|
||||
_this.value = '';
|
||||
@@ -211,7 +229,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(Input, [{
|
||||
key: "debounceChanged",
|
||||
value: function debounceChanged() {
|
||||
this.ionChange = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["d"])(this.ionChange, this.debounce);
|
||||
this.ionChange = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["e"])(this.ionChange, this.debounce);
|
||||
}
|
||||
}, {
|
||||
key: "disabledChanged",
|
||||
@@ -233,14 +251,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "componentWillLoad",
|
||||
value: function componentWillLoad() {
|
||||
// If the ion-input has a tabindex attribute we get the value
|
||||
// and pass it down to the native input, then remove it from the
|
||||
// ion-input to avoid causing tabbing twice on the same element
|
||||
if (this.el.hasAttribute('tabindex')) {
|
||||
var tabindex = this.el.getAttribute('tabindex');
|
||||
this.tabindex = tabindex !== null ? tabindex : undefined;
|
||||
this.el.removeAttribute('tabindex');
|
||||
}
|
||||
this.inheritedAttributes = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["i"])(this.el, ['tabindex', 'title']);
|
||||
}
|
||||
}, {
|
||||
key: "connectedCallback",
|
||||
@@ -263,7 +274,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Sets focus on the specified `ion-input`. Use this method instead of the global
|
||||
* Sets focus on the native `input` in `ion-input`. Use this method instead of the global
|
||||
* `input.focus()`.
|
||||
*/
|
||||
|
||||
@@ -293,6 +304,38 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
return setFocus;
|
||||
}()
|
||||
/**
|
||||
* Sets blur on the native `input` in `ion-input`. Use this method instead of the global
|
||||
* `input.blur()`.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: "setBlur",
|
||||
value: function () {
|
||||
var _setBlur = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
if (this.nativeInput) {
|
||||
this.nativeInput.blur();
|
||||
}
|
||||
|
||||
case 1:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}));
|
||||
|
||||
function setBlur() {
|
||||
return _setBlur.apply(this, arguments);
|
||||
}
|
||||
|
||||
return setBlur;
|
||||
}()
|
||||
/**
|
||||
* Returns the native `<input>` element used under the hood.
|
||||
*/
|
||||
@@ -342,22 +385,22 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object$assign,
|
||||
var _Object,
|
||||
_this2 = this;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var value = this.getValue();
|
||||
var labelId = this.inputId + '-lbl';
|
||||
var label = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["f"])(this.el);
|
||||
var label = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["f"])(this.el);
|
||||
|
||||
if (label) {
|
||||
label.id = labelId;
|
||||
}
|
||||
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"aria-disabled": this.disabled ? 'true' : null,
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'has-value', this.hasValue()), _defineProperty(_Object$assign, 'has-focus', this.hasFocus), _Object$assign))
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", {
|
||||
"class": Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color, (_Object = {}, _defineProperty(_Object, mode, true), _defineProperty(_Object, 'has-value', this.hasValue()), _defineProperty(_Object, 'has-focus', this.hasFocus), _Object))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", Object.assign({
|
||||
"class": "native-input",
|
||||
ref: function ref(input) {
|
||||
return _this2.nativeInput = input;
|
||||
@@ -384,14 +427,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
spellcheck: this.spellcheck,
|
||||
step: this.step,
|
||||
size: this.size,
|
||||
tabindex: this.tabindex,
|
||||
type: this.type,
|
||||
value: value,
|
||||
onInput: this.onInput,
|
||||
onBlur: this.onBlur,
|
||||
onFocus: this.onFocus,
|
||||
onKeyDown: this.onKeydown
|
||||
}), this.clearInput && !this.readonly && !this.disabled && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
}, this.inheritedAttributes)), this.clearInput && !this.readonly && !this.disabled && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
"aria-label": "reset",
|
||||
type: "button",
|
||||
"class": "input-clear-icon",
|
||||
@@ -403,7 +445,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,10 +12,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_item_option", function() { return ItemOption; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_item_options", function() { return ItemOptions; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_item_sliding", function() { return ItemSliding; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-5c745fbd.js */ "./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
/* harmony import */ var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-3f0b0c04.js */ "./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-90f46169.js */ "./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */ var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-ff3fc52f.js */ "./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
|
||||
|
||||
@@ -26,45 +26,50 @@ const itemOptionIosCss = ":host{--background:var(--ion-color-primary, #3880ff);-
|
||||
const itemOptionMdCss = ":host{--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff);background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit)}:host(.in-list.item-options-end:last-child){padding-right:calc(.7em + var(--ion-safe-area-right))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-list.item-options-end:last-child){padding-right:unset;-webkit-padding-end:calc(.7em + var(--ion-safe-area-right));padding-inline-end:calc(.7em + var(--ion-safe-area-right))}}:host(.in-list.item-options-start:first-child){padding-left:calc(.7em + var(--ion-safe-area-left))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-list.item-options-start:first-child){padding-left:unset;-webkit-padding-start:calc(.7em + var(--ion-safe-area-left));padding-inline-start:calc(.7em + var(--ion-safe-area-left))}}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.button-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:0.7em;padding-right:0.7em;padding-top:0;padding-bottom:0;display:inline-block;position:relative;width:100%;height:100%;border:0;outline:none;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:0.7em;padding-inline-start:0.7em;-webkit-padding-end:0.7em;padding-inline-end:0.7em}}.button-inner{display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column 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%}.horizontal-wrapper{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%}::slotted(*){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]){margin-left:0;margin-right:5px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:5px;margin-inline-end:5px}}::slotted([slot=end]){margin-left:5px;margin-right:0;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:0;margin-inline-end:0}}::slotted([slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:10px;margin-right:10px;margin-top:0;margin-bottom:0;min-width:0.9em;font-size:1.8em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=icon-only]){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}:host(.item-option-expandable){-ms-flex-negative:0;flex-shrink:0;-webkit-transition-duration:0;transition-duration:0;-webkit-transition-property:none;transition-property:none;-webkit-transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1);transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1)}:host(.item-option-disabled){pointer-events:none}:host(.item-option-disabled) .button-native{cursor:default;opacity:0.5;pointer-events:none}:host{font-size:14px;font-weight:500;text-transform:uppercase}";
|
||||
|
||||
const ItemOption = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the user cannot interact with the item option.
|
||||
*/
|
||||
this.disabled = false;
|
||||
/**
|
||||
* If `true`, the option will expand to take up the available width and cover any other options.
|
||||
*/
|
||||
this.expandable = false;
|
||||
/**
|
||||
* The type of the button.
|
||||
*/
|
||||
this.type = 'button';
|
||||
this.onClick = (ev) => {
|
||||
const el = ev.target.closest('ion-item-option');
|
||||
if (el) {
|
||||
ev.preventDefault();
|
||||
}
|
||||
};
|
||||
}
|
||||
render() {
|
||||
const { disabled, expandable, href } = this;
|
||||
const TagType = href === undefined ? 'button' : 'a';
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const attrs = (TagType === 'button')
|
||||
? { type: this.type }
|
||||
: {
|
||||
download: this.download,
|
||||
href: this.href,
|
||||
target: this.target
|
||||
};
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { onClick: this.onClick, class: Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color)), { [mode]: true, 'item-option-disabled': disabled, 'item-option-expandable': expandable, 'ion-activatable': true }) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(TagType, Object.assign({}, attrs, { class: "button-native", part: "native", disabled: disabled }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", { class: "button-inner" }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "top" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "horizontal-wrapper" }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "start" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "icon-only" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "end" })), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "bottom" })), mode === 'md' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null))));
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the user cannot interact with the item option.
|
||||
*/
|
||||
this.disabled = false;
|
||||
/**
|
||||
* If `true`, the option will expand to take up the available width and cover any other options.
|
||||
*/
|
||||
this.expandable = false;
|
||||
/**
|
||||
* The type of the button.
|
||||
*/
|
||||
this.type = 'button';
|
||||
this.onClick = (ev) => {
|
||||
const el = ev.target.closest('ion-item-option');
|
||||
if (el) {
|
||||
ev.preventDefault();
|
||||
}
|
||||
};
|
||||
}
|
||||
render() {
|
||||
const { disabled, expandable, href } = this;
|
||||
const TagType = href === undefined ? 'button' : 'a';
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const attrs = (TagType === 'button')
|
||||
? { type: this.type }
|
||||
: {
|
||||
download: this.download,
|
||||
href: this.href,
|
||||
target: this.target
|
||||
};
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { onClick: this.onClick, class: Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color, {
|
||||
[mode]: true,
|
||||
'item-option-disabled': disabled,
|
||||
'item-option-expandable': expandable,
|
||||
'ion-activatable': true,
|
||||
}) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(TagType, Object.assign({}, attrs, { class: "button-native", part: "native", disabled: disabled }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", { class: "button-inner" }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "top" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "horizontal-wrapper" }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "start" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "icon-only" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "end" })), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", { name: "bottom" })), mode === 'md' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null))));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
};
|
||||
ItemOption.style = {
|
||||
ios: itemOptionIosCss,
|
||||
md: itemOptionMdCss
|
||||
ios: itemOptionIosCss,
|
||||
md: itemOptionMdCss
|
||||
};
|
||||
|
||||
const itemOptionsIosCss = "ion-item-options{top:0;right:0;-ms-flex-pack:end;justify-content:flex-end;display:none;position:absolute;height:100%;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}[dir=rtl] ion-item-options,:host-context([dir=rtl]) ion-item-options{-ms-flex-pack:start;justify-content:flex-start}[dir=rtl] ion-item-options:not(.item-options-end),:host-context([dir=rtl]) ion-item-options:not(.item-options-end){right:auto;left:0;-ms-flex-pack:end;justify-content:flex-end}.item-options-start{right:auto;left:0;-ms-flex-pack:start;justify-content:flex-start}[dir=rtl] .item-options-start,:host-context([dir=rtl]) .item-options-start{-ms-flex-pack:end;justify-content:flex-end}.item-options-start ion-item-option:first-child{padding-right:var(--ion-safe-area-left)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-options-start ion-item-option:first-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-left);padding-inline-end:var(--ion-safe-area-left)}}.item-options-end ion-item-option:last-child{padding-right:var(--ion-safe-area-right)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-options-end ion-item-option:last-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}[dir=rtl] .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end),:host-context([dir=rtl]) .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end){width:100%;visibility:visible}.item-sliding-active-slide ion-item-options{display:-ms-flexbox;display:flex;visibility:hidden}.item-sliding-active-slide.item-sliding-active-options-start .item-options-start,.item-sliding-active-slide.item-sliding-active-options-end ion-item-options:not(.item-options-start){width:100%;visibility:visible}.item-options-ios{border-bottom-width:0;border-bottom-style:solid;border-bottom-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)))}.item-options-ios.item-options-end{border-bottom-width:0.55px}.list-ios-lines-none .item-options-ios{border-bottom-width:0}.list-ios-lines-full .item-options-ios,.list-ios-lines-inset .item-options-ios.item-options-end{border-bottom-width:0.55px}";
|
||||
@@ -72,37 +77,37 @@ const itemOptionsIosCss = "ion-item-options{top:0;right:0;-ms-flex-pack:end;just
|
||||
const itemOptionsMdCss = "ion-item-options{top:0;right:0;-ms-flex-pack:end;justify-content:flex-end;display:none;position:absolute;height:100%;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}[dir=rtl] ion-item-options,:host-context([dir=rtl]) ion-item-options{-ms-flex-pack:start;justify-content:flex-start}[dir=rtl] ion-item-options:not(.item-options-end),:host-context([dir=rtl]) ion-item-options:not(.item-options-end){right:auto;left:0;-ms-flex-pack:end;justify-content:flex-end}.item-options-start{right:auto;left:0;-ms-flex-pack:start;justify-content:flex-start}[dir=rtl] .item-options-start,:host-context([dir=rtl]) .item-options-start{-ms-flex-pack:end;justify-content:flex-end}.item-options-start ion-item-option:first-child{padding-right:var(--ion-safe-area-left)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-options-start ion-item-option:first-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-left);padding-inline-end:var(--ion-safe-area-left)}}.item-options-end ion-item-option:last-child{padding-right:var(--ion-safe-area-right)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-options-end ion-item-option:last-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}[dir=rtl] .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end),:host-context([dir=rtl]) .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end){width:100%;visibility:visible}.item-sliding-active-slide ion-item-options{display:-ms-flexbox;display:flex;visibility:hidden}.item-sliding-active-slide.item-sliding-active-options-start .item-options-start,.item-sliding-active-slide.item-sliding-active-options-end ion-item-options:not(.item-options-start){width:100%;visibility:visible}.item-options-md{border-bottom-width:0;border-bottom-style:solid;border-bottom-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))))}.list-md-lines-none .item-options-md{border-bottom-width:0}.list-md-lines-full .item-options-md,.list-md-lines-inset .item-options-md.item-options-end{border-bottom-width:1px}";
|
||||
|
||||
const ItemOptions = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionSwipe = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionSwipe", 7);
|
||||
/**
|
||||
* The side the option button should be on. Possible values: `"start"` and `"end"`. If you have multiple `ion-item-options`, a side must be provided for each.
|
||||
*
|
||||
*/
|
||||
this.side = 'end';
|
||||
}
|
||||
/** @internal */
|
||||
async fireSwipeEvent() {
|
||||
this.ionSwipe.emit({
|
||||
side: this.side
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const isEnd = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["i"])(this.side);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
// Used internally for styling
|
||||
[`item-options-${mode}`]: true,
|
||||
'item-options-start': !isEnd,
|
||||
'item-options-end': isEnd
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionSwipe = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionSwipe", 7);
|
||||
/**
|
||||
* The side the option button should be on. Possible values: `"start"` and `"end"`. If you have multiple `ion-item-options`, a side must be provided for each.
|
||||
*
|
||||
*/
|
||||
this.side = 'end';
|
||||
}
|
||||
/** @internal */
|
||||
async fireSwipeEvent() {
|
||||
this.ionSwipe.emit({
|
||||
side: this.side
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const isEnd = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["l"])(this.side);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
// Used internally for styling
|
||||
[`item-options-${mode}`]: true,
|
||||
'item-options-start': !isEnd,
|
||||
'item-options-end': isEnd
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
};
|
||||
ItemOptions.style = {
|
||||
ios: itemOptionsIosCss,
|
||||
md: itemOptionsMdCss
|
||||
ios: itemOptionsIosCss,
|
||||
md: itemOptionsMdCss
|
||||
};
|
||||
|
||||
const itemSlidingCss = "ion-item-sliding{display:block;position:relative;width:100%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-item-sliding .item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.item-sliding-active-slide .item{position:relative;-webkit-transition:-webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:-webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1), -webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);opacity:1;z-index:2;pointer-events:none;will-change:transform}.item-sliding-active-swipe-end .item-options-end .item-option-expandable{padding-left:100%;-ms-flex-order:1;order:1;-webkit-transition-duration:0.6s;transition-duration:0.6s;-webkit-transition-property:padding-left;transition-property:padding-left}[dir=rtl] .item-sliding-active-swipe-end .item-options-end .item-option-expandable,:host-context([dir=rtl]) .item-sliding-active-swipe-end .item-options-end .item-option-expandable{-ms-flex-order:-1;order:-1}.item-sliding-active-swipe-start .item-options-start .item-option-expandable{padding-right:100%;-ms-flex-order:-1;order:-1;-webkit-transition-duration:0.6s;transition-duration:0.6s;-webkit-transition-property:padding-right;transition-property:padding-right}[dir=rtl] .item-sliding-active-swipe-start .item-options-start .item-option-expandable,:host-context([dir=rtl]) .item-sliding-active-swipe-start .item-options-start .item-option-expandable{-ms-flex-order:1;order:1}";
|
||||
@@ -111,347 +116,347 @@ const SWIPE_MARGIN = 30;
|
||||
const ELASTIC_FACTOR = 0.55;
|
||||
let openSlidingItem;
|
||||
const ItemSliding = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionDrag = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDrag", 7);
|
||||
this.item = null;
|
||||
this.openAmount = 0;
|
||||
this.initialOpenAmount = 0;
|
||||
this.optsWidthRightSide = 0;
|
||||
this.optsWidthLeftSide = 0;
|
||||
this.sides = 0 /* None */;
|
||||
this.optsDirty = true;
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionDrag = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDrag", 7);
|
||||
this.item = null;
|
||||
this.openAmount = 0;
|
||||
this.initialOpenAmount = 0;
|
||||
this.optsWidthRightSide = 0;
|
||||
this.optsWidthLeftSide = 0;
|
||||
this.sides = 0 /* None */;
|
||||
this.optsDirty = true;
|
||||
this.state = 2 /* Disabled */;
|
||||
/**
|
||||
* If `true`, the user cannot interact with the sliding item.
|
||||
*/
|
||||
this.disabled = false;
|
||||
}
|
||||
disabledChanged() {
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(!this.disabled);
|
||||
}
|
||||
}
|
||||
async connectedCallback() {
|
||||
this.item = this.el.querySelector('ion-item');
|
||||
await this.updateOptions();
|
||||
this.gesture = (await Promise.resolve(/*! import() */).then(__webpack_require__.bind(null, /*! ./index-f49d994d.js */ "./node_modules/@ionic/core/dist/esm/index-f49d994d.js"))).createGesture({
|
||||
el: this.el,
|
||||
gestureName: 'item-swipe',
|
||||
gesturePriority: 100,
|
||||
threshold: 5,
|
||||
canStart: ev => this.canStart(ev),
|
||||
onStart: () => this.onStart(),
|
||||
onMove: ev => this.onMove(ev),
|
||||
onEnd: ev => this.onEnd(ev),
|
||||
});
|
||||
this.disabledChanged();
|
||||
}
|
||||
disconnectedCallback() {
|
||||
if (this.gesture) {
|
||||
this.gesture.destroy();
|
||||
this.gesture = undefined;
|
||||
}
|
||||
this.item = null;
|
||||
this.leftOptions = this.rightOptions = undefined;
|
||||
if (openSlidingItem === this.el) {
|
||||
openSlidingItem = undefined;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get the amount the item is open in pixels.
|
||||
*/
|
||||
getOpenAmount() {
|
||||
return Promise.resolve(this.openAmount);
|
||||
}
|
||||
/**
|
||||
* Get the ratio of the open amount of the item compared to the width of the options.
|
||||
* If the number returned is positive, then the options on the right side are open.
|
||||
* If the number returned is negative, then the options on the left side are open.
|
||||
* If the absolute value of the number is greater than 1, the item is open more than
|
||||
* the width of the options.
|
||||
*/
|
||||
getSlidingRatio() {
|
||||
return Promise.resolve(this.getSlidingRatioSync());
|
||||
}
|
||||
/**
|
||||
* Open the sliding item.
|
||||
*
|
||||
* @param side The side of the options to open. If a side is not provided, it will open the first set of options it finds within the item.
|
||||
*/
|
||||
async open(side) {
|
||||
if (this.item === null) {
|
||||
return;
|
||||
}
|
||||
const optionsToOpen = this.getOptions(side);
|
||||
if (!optionsToOpen) {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* If side is not set, we need to infer the side
|
||||
* so we know which direction to move the options
|
||||
*/
|
||||
if (side === undefined) {
|
||||
side = (optionsToOpen === this.leftOptions) ? 'start' : 'end';
|
||||
}
|
||||
// In RTL we want to switch the sides
|
||||
side = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["l"])(side) ? 'end' : 'start';
|
||||
const isStartOpen = this.openAmount < 0;
|
||||
const isEndOpen = this.openAmount > 0;
|
||||
/**
|
||||
* If a side is open and a user tries to
|
||||
* re-open the same side, we should not do anything
|
||||
*/
|
||||
if (isStartOpen && optionsToOpen === this.leftOptions) {
|
||||
return;
|
||||
}
|
||||
if (isEndOpen && optionsToOpen === this.rightOptions) {
|
||||
return;
|
||||
}
|
||||
this.closeOpened();
|
||||
this.state = 4 /* Enabled */;
|
||||
requestAnimationFrame(() => {
|
||||
this.calculateOptsWidth();
|
||||
const width = (side === 'end') ? this.optsWidthRightSide : -this.optsWidthLeftSide;
|
||||
openSlidingItem = this.el;
|
||||
this.setOpenAmount(width, false);
|
||||
this.state = (side === 'end') ? 8 /* End */ : 16 /* Start */;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Close the sliding item. Items can also be closed from the [List](../list).
|
||||
*/
|
||||
async close() {
|
||||
this.setOpenAmount(0, true);
|
||||
}
|
||||
/**
|
||||
* Close all of the sliding items in the list. Items can also be closed from the [List](../list).
|
||||
*/
|
||||
async closeOpened() {
|
||||
if (openSlidingItem !== undefined) {
|
||||
openSlidingItem.close();
|
||||
openSlidingItem = undefined;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Given an optional side, return the ion-item-options element.
|
||||
*
|
||||
* @param side This side of the options to get. If a side is not provided it will
|
||||
* return the first one available.
|
||||
*/
|
||||
getOptions(side) {
|
||||
if (side === undefined) {
|
||||
return this.leftOptions || this.rightOptions;
|
||||
}
|
||||
else if (side === 'start') {
|
||||
return this.leftOptions;
|
||||
}
|
||||
else {
|
||||
return this.rightOptions;
|
||||
}
|
||||
}
|
||||
async updateOptions() {
|
||||
const options = this.el.querySelectorAll('ion-item-options');
|
||||
let sides = 0;
|
||||
// Reset left and right options in case they were removed
|
||||
this.leftOptions = this.rightOptions = undefined;
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
const option = await options.item(i).componentOnReady();
|
||||
const side = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["l"])(option.side) ? 'end' : 'start';
|
||||
if (side === 'start') {
|
||||
this.leftOptions = option;
|
||||
sides |= 1 /* Start */;
|
||||
}
|
||||
else {
|
||||
this.rightOptions = option;
|
||||
sides |= 2 /* End */;
|
||||
}
|
||||
}
|
||||
this.optsDirty = true;
|
||||
this.sides = sides;
|
||||
}
|
||||
canStart(gesture) {
|
||||
/**
|
||||
* If very close to start of the screen
|
||||
* do not open left side so swipe to go
|
||||
* back will still work.
|
||||
*/
|
||||
const rtl = document.dir === 'rtl';
|
||||
const atEdge = (rtl) ? (window.innerWidth - gesture.startX) < 15 : gesture.startX < 15;
|
||||
if (atEdge) {
|
||||
return false;
|
||||
}
|
||||
const selected = openSlidingItem;
|
||||
if (selected && selected !== this.el) {
|
||||
this.closeOpened();
|
||||
return false;
|
||||
}
|
||||
return !!(this.rightOptions || this.leftOptions);
|
||||
}
|
||||
onStart() {
|
||||
openSlidingItem = this.el;
|
||||
if (this.tmr !== undefined) {
|
||||
clearTimeout(this.tmr);
|
||||
this.tmr = undefined;
|
||||
}
|
||||
if (this.openAmount === 0) {
|
||||
this.optsDirty = true;
|
||||
this.state = 4 /* Enabled */;
|
||||
}
|
||||
this.initialOpenAmount = this.openAmount;
|
||||
if (this.item) {
|
||||
this.item.style.transition = 'none';
|
||||
}
|
||||
}
|
||||
onMove(gesture) {
|
||||
if (this.optsDirty) {
|
||||
this.calculateOptsWidth();
|
||||
}
|
||||
let openAmount = this.initialOpenAmount - gesture.deltaX;
|
||||
switch (this.sides) {
|
||||
case 2 /* End */:
|
||||
openAmount = Math.max(0, openAmount);
|
||||
break;
|
||||
case 1 /* Start */:
|
||||
openAmount = Math.min(0, openAmount);
|
||||
break;
|
||||
case 3 /* Both */: break;
|
||||
case 0 /* None */: return;
|
||||
default:
|
||||
console.warn('invalid ItemSideFlags value', this.sides);
|
||||
break;
|
||||
}
|
||||
let optsWidth;
|
||||
if (openAmount > this.optsWidthRightSide) {
|
||||
optsWidth = this.optsWidthRightSide;
|
||||
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
|
||||
}
|
||||
else if (openAmount < -this.optsWidthLeftSide) {
|
||||
optsWidth = -this.optsWidthLeftSide;
|
||||
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
|
||||
}
|
||||
this.setOpenAmount(openAmount, false);
|
||||
}
|
||||
onEnd(gesture) {
|
||||
const velocity = gesture.velocityX;
|
||||
let restingPoint = (this.openAmount > 0)
|
||||
? this.optsWidthRightSide
|
||||
: -this.optsWidthLeftSide;
|
||||
// Check if the drag didn't clear the buttons mid-point
|
||||
// and we aren't moving fast enough to swipe open
|
||||
const isResetDirection = (this.openAmount > 0) === !(velocity < 0);
|
||||
const isMovingFast = Math.abs(velocity) > 0.3;
|
||||
const isOnCloseZone = Math.abs(this.openAmount) < Math.abs(restingPoint / 2);
|
||||
if (swipeShouldReset(isResetDirection, isMovingFast, isOnCloseZone)) {
|
||||
restingPoint = 0;
|
||||
}
|
||||
const state = this.state;
|
||||
this.setOpenAmount(restingPoint, true);
|
||||
if ((state & 32 /* SwipeEnd */) !== 0 && this.rightOptions) {
|
||||
this.rightOptions.fireSwipeEvent();
|
||||
}
|
||||
else if ((state & 64 /* SwipeStart */) !== 0 && this.leftOptions) {
|
||||
this.leftOptions.fireSwipeEvent();
|
||||
}
|
||||
}
|
||||
calculateOptsWidth() {
|
||||
this.optsWidthRightSide = 0;
|
||||
if (this.rightOptions) {
|
||||
this.rightOptions.style.display = 'flex';
|
||||
this.optsWidthRightSide = this.rightOptions.offsetWidth;
|
||||
this.rightOptions.style.display = '';
|
||||
}
|
||||
this.optsWidthLeftSide = 0;
|
||||
if (this.leftOptions) {
|
||||
this.leftOptions.style.display = 'flex';
|
||||
this.optsWidthLeftSide = this.leftOptions.offsetWidth;
|
||||
this.leftOptions.style.display = '';
|
||||
}
|
||||
this.optsDirty = false;
|
||||
}
|
||||
setOpenAmount(openAmount, isFinal) {
|
||||
if (this.tmr !== undefined) {
|
||||
clearTimeout(this.tmr);
|
||||
this.tmr = undefined;
|
||||
}
|
||||
if (!this.item) {
|
||||
return;
|
||||
}
|
||||
const style = this.item.style;
|
||||
this.openAmount = openAmount;
|
||||
if (isFinal) {
|
||||
style.transition = '';
|
||||
}
|
||||
if (openAmount > 0) {
|
||||
this.state = (openAmount >= (this.optsWidthRightSide + SWIPE_MARGIN))
|
||||
? 8 /* End */ | 32 /* SwipeEnd */
|
||||
: 8 /* End */;
|
||||
}
|
||||
else if (openAmount < 0) {
|
||||
this.state = (openAmount <= (-this.optsWidthLeftSide - SWIPE_MARGIN))
|
||||
? 16 /* Start */ | 64 /* SwipeStart */
|
||||
: 16 /* Start */;
|
||||
}
|
||||
else {
|
||||
this.tmr = setTimeout(() => {
|
||||
this.state = 2 /* Disabled */;
|
||||
/**
|
||||
* If `true`, the user cannot interact with the sliding item.
|
||||
*/
|
||||
this.disabled = false;
|
||||
this.tmr = undefined;
|
||||
}, 600);
|
||||
openSlidingItem = undefined;
|
||||
style.transform = '';
|
||||
return;
|
||||
}
|
||||
disabledChanged() {
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(!this.disabled);
|
||||
}
|
||||
style.transform = `translate3d(${-openAmount}px,0,0)`;
|
||||
this.ionDrag.emit({
|
||||
amount: openAmount,
|
||||
ratio: this.getSlidingRatioSync()
|
||||
});
|
||||
}
|
||||
getSlidingRatioSync() {
|
||||
if (this.openAmount > 0) {
|
||||
return this.openAmount / this.optsWidthRightSide;
|
||||
}
|
||||
async connectedCallback() {
|
||||
this.item = this.el.querySelector('ion-item');
|
||||
await this.updateOptions();
|
||||
this.gesture = (await Promise.resolve(/*! import() */).then(__webpack_require__.bind(null, /*! ./index-eea61379.js */ "./node_modules/@ionic/core/dist/esm/index-eea61379.js"))).createGesture({
|
||||
el: this.el,
|
||||
gestureName: 'item-swipe',
|
||||
gesturePriority: 100,
|
||||
threshold: 5,
|
||||
canStart: ev => this.canStart(ev),
|
||||
onStart: () => this.onStart(),
|
||||
onMove: ev => this.onMove(ev),
|
||||
onEnd: ev => this.onEnd(ev),
|
||||
});
|
||||
this.disabledChanged();
|
||||
else if (this.openAmount < 0) {
|
||||
return this.openAmount / this.optsWidthLeftSide;
|
||||
}
|
||||
disconnectedCallback() {
|
||||
if (this.gesture) {
|
||||
this.gesture.destroy();
|
||||
this.gesture = undefined;
|
||||
}
|
||||
this.item = null;
|
||||
this.leftOptions = this.rightOptions = undefined;
|
||||
if (openSlidingItem === this.el) {
|
||||
openSlidingItem = undefined;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
* Get the amount the item is open in pixels.
|
||||
*/
|
||||
getOpenAmount() {
|
||||
return Promise.resolve(this.openAmount);
|
||||
}
|
||||
/**
|
||||
* Get the ratio of the open amount of the item compared to the width of the options.
|
||||
* If the number returned is positive, then the options on the right side are open.
|
||||
* If the number returned is negative, then the options on the left side are open.
|
||||
* If the absolute value of the number is greater than 1, the item is open more than
|
||||
* the width of the options.
|
||||
*/
|
||||
getSlidingRatio() {
|
||||
return Promise.resolve(this.getSlidingRatioSync());
|
||||
}
|
||||
/**
|
||||
* Open the sliding item.
|
||||
*
|
||||
* @param side The side of the options to open. If a side is not provided, it will open the first set of options it finds within the item.
|
||||
*/
|
||||
async open(side) {
|
||||
if (this.item === null) {
|
||||
return;
|
||||
}
|
||||
const optionsToOpen = this.getOptions(side);
|
||||
if (!optionsToOpen) {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* If side is not set, we need to infer the side
|
||||
* so we know which direction to move the options
|
||||
*/
|
||||
if (side === undefined) {
|
||||
side = (optionsToOpen === this.leftOptions) ? 'start' : 'end';
|
||||
}
|
||||
// In RTL we want to switch the sides
|
||||
side = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["i"])(side) ? 'end' : 'start';
|
||||
const isStartOpen = this.openAmount < 0;
|
||||
const isEndOpen = this.openAmount > 0;
|
||||
/**
|
||||
* If a side is open and a user tries to
|
||||
* re-open the same side, we should not do anything
|
||||
*/
|
||||
if (isStartOpen && optionsToOpen === this.leftOptions) {
|
||||
return;
|
||||
}
|
||||
if (isEndOpen && optionsToOpen === this.rightOptions) {
|
||||
return;
|
||||
}
|
||||
this.closeOpened();
|
||||
this.state = 4 /* Enabled */;
|
||||
requestAnimationFrame(() => {
|
||||
this.calculateOptsWidth();
|
||||
const width = (side === 'end') ? this.optsWidthRightSide : -this.optsWidthLeftSide;
|
||||
openSlidingItem = this.el;
|
||||
this.setOpenAmount(width, false);
|
||||
this.state = (side === 'end') ? 8 /* End */ : 16 /* Start */;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Close the sliding item. Items can also be closed from the [List](../list).
|
||||
*/
|
||||
async close() {
|
||||
this.setOpenAmount(0, true);
|
||||
}
|
||||
/**
|
||||
* Close all of the sliding items in the list. Items can also be closed from the [List](../list).
|
||||
*/
|
||||
async closeOpened() {
|
||||
if (openSlidingItem !== undefined) {
|
||||
openSlidingItem.close();
|
||||
openSlidingItem = undefined;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Given an optional side, return the ion-item-options element.
|
||||
*
|
||||
* @param side This side of the options to get. If a side is not provided it will
|
||||
* return the first one available.
|
||||
*/
|
||||
getOptions(side) {
|
||||
if (side === undefined) {
|
||||
return this.leftOptions || this.rightOptions;
|
||||
}
|
||||
else if (side === 'start') {
|
||||
return this.leftOptions;
|
||||
}
|
||||
else {
|
||||
return this.rightOptions;
|
||||
}
|
||||
}
|
||||
async updateOptions() {
|
||||
const options = this.el.querySelectorAll('ion-item-options');
|
||||
let sides = 0;
|
||||
// Reset left and right options in case they were removed
|
||||
this.leftOptions = this.rightOptions = undefined;
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
const option = await options.item(i).componentOnReady();
|
||||
const side = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["i"])(option.side) ? 'end' : 'start';
|
||||
if (side === 'start') {
|
||||
this.leftOptions = option;
|
||||
sides |= 1 /* Start */;
|
||||
}
|
||||
else {
|
||||
this.rightOptions = option;
|
||||
sides |= 2 /* End */;
|
||||
}
|
||||
}
|
||||
this.optsDirty = true;
|
||||
this.sides = sides;
|
||||
}
|
||||
canStart(gesture) {
|
||||
/**
|
||||
* If very close to start of the screen
|
||||
* do not open left side so swipe to go
|
||||
* back will still work.
|
||||
*/
|
||||
const rtl = document.dir === 'rtl';
|
||||
const atEdge = (rtl) ? (window.innerWidth - gesture.startX) < 15 : gesture.startX < 15;
|
||||
if (atEdge) {
|
||||
return false;
|
||||
}
|
||||
const selected = openSlidingItem;
|
||||
if (selected && selected !== this.el) {
|
||||
this.closeOpened();
|
||||
return false;
|
||||
}
|
||||
return !!(this.rightOptions || this.leftOptions);
|
||||
}
|
||||
onStart() {
|
||||
openSlidingItem = this.el;
|
||||
if (this.tmr !== undefined) {
|
||||
clearTimeout(this.tmr);
|
||||
this.tmr = undefined;
|
||||
}
|
||||
if (this.openAmount === 0) {
|
||||
this.optsDirty = true;
|
||||
this.state = 4 /* Enabled */;
|
||||
}
|
||||
this.initialOpenAmount = this.openAmount;
|
||||
if (this.item) {
|
||||
this.item.style.transition = 'none';
|
||||
}
|
||||
}
|
||||
onMove(gesture) {
|
||||
if (this.optsDirty) {
|
||||
this.calculateOptsWidth();
|
||||
}
|
||||
let openAmount = this.initialOpenAmount - gesture.deltaX;
|
||||
switch (this.sides) {
|
||||
case 2 /* End */:
|
||||
openAmount = Math.max(0, openAmount);
|
||||
break;
|
||||
case 1 /* Start */:
|
||||
openAmount = Math.min(0, openAmount);
|
||||
break;
|
||||
case 3 /* Both */: break;
|
||||
case 0 /* None */: return;
|
||||
default:
|
||||
console.warn('invalid ItemSideFlags value', this.sides);
|
||||
break;
|
||||
}
|
||||
let optsWidth;
|
||||
if (openAmount > this.optsWidthRightSide) {
|
||||
optsWidth = this.optsWidthRightSide;
|
||||
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
|
||||
}
|
||||
else if (openAmount < -this.optsWidthLeftSide) {
|
||||
optsWidth = -this.optsWidthLeftSide;
|
||||
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
|
||||
}
|
||||
this.setOpenAmount(openAmount, false);
|
||||
}
|
||||
onEnd(gesture) {
|
||||
const velocity = gesture.velocityX;
|
||||
let restingPoint = (this.openAmount > 0)
|
||||
? this.optsWidthRightSide
|
||||
: -this.optsWidthLeftSide;
|
||||
// Check if the drag didn't clear the buttons mid-point
|
||||
// and we aren't moving fast enough to swipe open
|
||||
const isResetDirection = (this.openAmount > 0) === !(velocity < 0);
|
||||
const isMovingFast = Math.abs(velocity) > 0.3;
|
||||
const isOnCloseZone = Math.abs(this.openAmount) < Math.abs(restingPoint / 2);
|
||||
if (swipeShouldReset(isResetDirection, isMovingFast, isOnCloseZone)) {
|
||||
restingPoint = 0;
|
||||
}
|
||||
const state = this.state;
|
||||
this.setOpenAmount(restingPoint, true);
|
||||
if ((state & 32 /* SwipeEnd */) !== 0 && this.rightOptions) {
|
||||
this.rightOptions.fireSwipeEvent();
|
||||
}
|
||||
else if ((state & 64 /* SwipeStart */) !== 0 && this.leftOptions) {
|
||||
this.leftOptions.fireSwipeEvent();
|
||||
}
|
||||
}
|
||||
calculateOptsWidth() {
|
||||
this.optsWidthRightSide = 0;
|
||||
if (this.rightOptions) {
|
||||
this.rightOptions.style.display = 'flex';
|
||||
this.optsWidthRightSide = this.rightOptions.offsetWidth;
|
||||
this.rightOptions.style.display = '';
|
||||
}
|
||||
this.optsWidthLeftSide = 0;
|
||||
if (this.leftOptions) {
|
||||
this.leftOptions.style.display = 'flex';
|
||||
this.optsWidthLeftSide = this.leftOptions.offsetWidth;
|
||||
this.leftOptions.style.display = '';
|
||||
}
|
||||
this.optsDirty = false;
|
||||
}
|
||||
setOpenAmount(openAmount, isFinal) {
|
||||
if (this.tmr !== undefined) {
|
||||
clearTimeout(this.tmr);
|
||||
this.tmr = undefined;
|
||||
}
|
||||
if (!this.item) {
|
||||
return;
|
||||
}
|
||||
const style = this.item.style;
|
||||
this.openAmount = openAmount;
|
||||
if (isFinal) {
|
||||
style.transition = '';
|
||||
}
|
||||
if (openAmount > 0) {
|
||||
this.state = (openAmount >= (this.optsWidthRightSide + SWIPE_MARGIN))
|
||||
? 8 /* End */ | 32 /* SwipeEnd */
|
||||
: 8 /* End */;
|
||||
}
|
||||
else if (openAmount < 0) {
|
||||
this.state = (openAmount <= (-this.optsWidthLeftSide - SWIPE_MARGIN))
|
||||
? 16 /* Start */ | 64 /* SwipeStart */
|
||||
: 16 /* Start */;
|
||||
}
|
||||
else {
|
||||
this.tmr = setTimeout(() => {
|
||||
this.state = 2 /* Disabled */;
|
||||
this.tmr = undefined;
|
||||
}, 600);
|
||||
openSlidingItem = undefined;
|
||||
style.transform = '';
|
||||
return;
|
||||
}
|
||||
style.transform = `translate3d(${-openAmount}px,0,0)`;
|
||||
this.ionDrag.emit({
|
||||
amount: openAmount,
|
||||
ratio: this.getSlidingRatioSync()
|
||||
});
|
||||
}
|
||||
getSlidingRatioSync() {
|
||||
if (this.openAmount > 0) {
|
||||
return this.openAmount / this.optsWidthRightSide;
|
||||
}
|
||||
else if (this.openAmount < 0) {
|
||||
return this.openAmount / this.optsWidthLeftSide;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'item-sliding-active-slide': (this.state !== 2 /* Disabled */),
|
||||
'item-sliding-active-options-end': (this.state & 8 /* End */) !== 0,
|
||||
'item-sliding-active-options-start': (this.state & 16 /* Start */) !== 0,
|
||||
'item-sliding-active-swipe-end': (this.state & 32 /* SwipeEnd */) !== 0,
|
||||
'item-sliding-active-swipe-start': (this.state & 64 /* SwipeStart */) !== 0
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"disabled": ["disabledChanged"]
|
||||
}; }
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'item-sliding-active-slide': (this.state !== 2 /* Disabled */),
|
||||
'item-sliding-active-options-end': (this.state & 8 /* End */) !== 0,
|
||||
'item-sliding-active-options-start': (this.state & 16 /* Start */) !== 0,
|
||||
'item-sliding-active-swipe-end': (this.state & 32 /* SwipeEnd */) !== 0,
|
||||
'item-sliding-active-swipe-start': (this.state & 64 /* SwipeStart */) !== 0
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"disabled": ["disabledChanged"]
|
||||
}; }
|
||||
};
|
||||
const swipeShouldReset = (isResetDirection, isMovingFast, isOnResetZone) => {
|
||||
// The logic required to know when the sliding item should close (openAmount=0)
|
||||
// depends on three booleans (isResetDirection, isMovingFast, isOnResetZone)
|
||||
// and it ended up being too complicated to be written manually without errors
|
||||
// so the truth table is attached below: (0=false, 1=true)
|
||||
// isResetDirection | isMovingFast | isOnResetZone || shouldClose
|
||||
// 0 | 0 | 0 || 0
|
||||
// 0 | 0 | 1 || 1
|
||||
// 0 | 1 | 0 || 0
|
||||
// 0 | 1 | 1 || 0
|
||||
// 1 | 0 | 0 || 0
|
||||
// 1 | 0 | 1 || 1
|
||||
// 1 | 1 | 0 || 1
|
||||
// 1 | 1 | 1 || 1
|
||||
// The resulting expression was generated by resolving the K-map (Karnaugh map):
|
||||
return (!isMovingFast && isOnResetZone) || (isResetDirection && isMovingFast);
|
||||
// The logic required to know when the sliding item should close (openAmount=0)
|
||||
// depends on three booleans (isResetDirection, isMovingFast, isOnResetZone)
|
||||
// and it ended up being too complicated to be written manually without errors
|
||||
// so the truth table is attached below: (0=false, 1=true)
|
||||
// isResetDirection | isMovingFast | isOnResetZone || shouldClose
|
||||
// 0 | 0 | 0 || 0
|
||||
// 0 | 0 | 1 || 1
|
||||
// 0 | 1 | 0 || 0
|
||||
// 0 | 1 | 1 || 0
|
||||
// 1 | 0 | 0 || 0
|
||||
// 1 | 0 | 1 || 1
|
||||
// 1 | 1 | 0 || 1
|
||||
// 1 | 1 | 1 || 1
|
||||
// The resulting expression was generated by resolving the K-map (Karnaugh map):
|
||||
return (!isMovingFast && isOnResetZone) || (isResetDirection && isMovingFast);
|
||||
};
|
||||
ItemSliding.style = itemSlidingCss;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -45,27 +45,27 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
var itemOptionIosCss = ":host{--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff);background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit)}:host(.in-list.item-options-end:last-child){padding-right:calc(.7em + var(--ion-safe-area-right))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-list.item-options-end:last-child){padding-right:unset;-webkit-padding-end:calc(.7em + var(--ion-safe-area-right));padding-inline-end:calc(.7em + var(--ion-safe-area-right))}}:host(.in-list.item-options-start:first-child){padding-left:calc(.7em + var(--ion-safe-area-left))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-list.item-options-start:first-child){padding-left:unset;-webkit-padding-start:calc(.7em + var(--ion-safe-area-left));padding-inline-start:calc(.7em + var(--ion-safe-area-left))}}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.button-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:0.7em;padding-right:0.7em;padding-top:0;padding-bottom:0;display:inline-block;position:relative;width:100%;height:100%;border:0;outline:none;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:0.7em;padding-inline-start:0.7em;-webkit-padding-end:0.7em;padding-inline-end:0.7em}}.button-inner{display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column 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%}.horizontal-wrapper{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%}::slotted(*){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]){margin-left:0;margin-right:5px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:5px;margin-inline-end:5px}}::slotted([slot=end]){margin-left:5px;margin-right:0;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:0;margin-inline-end:0}}::slotted([slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:10px;margin-right:10px;margin-top:0;margin-bottom:0;min-width:0.9em;font-size:1.8em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=icon-only]){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}:host(.item-option-expandable){-ms-flex-negative:0;flex-shrink:0;-webkit-transition-duration:0;transition-duration:0;-webkit-transition-property:none;transition-property:none;-webkit-transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1);transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1)}:host(.item-option-disabled){pointer-events:none}:host(.item-option-disabled) .button-native{cursor:default;opacity:0.5;pointer-events:none}:host{font-size:16px}:host(.ion-activated){background:var(--ion-color-primary-shade, #3171e0)}:host(.ion-color.ion-activated){background:var(--ion-color-shade)}";
|
||||
var itemOptionMdCss = ":host{--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff);background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit)}:host(.in-list.item-options-end:last-child){padding-right:calc(.7em + var(--ion-safe-area-right))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-list.item-options-end:last-child){padding-right:unset;-webkit-padding-end:calc(.7em + var(--ion-safe-area-right));padding-inline-end:calc(.7em + var(--ion-safe-area-right))}}:host(.in-list.item-options-start:first-child){padding-left:calc(.7em + var(--ion-safe-area-left))}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-list.item-options-start:first-child){padding-left:unset;-webkit-padding-start:calc(.7em + var(--ion-safe-area-left));padding-inline-start:calc(.7em + var(--ion-safe-area-left))}}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.button-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:0.7em;padding-right:0.7em;padding-top:0;padding-bottom:0;display:inline-block;position:relative;width:100%;height:100%;border:0;outline:none;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:0.7em;padding-inline-start:0.7em;-webkit-padding-end:0.7em;padding-inline-end:0.7em}}.button-inner{display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column 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%}.horizontal-wrapper{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%}::slotted(*){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]){margin-left:0;margin-right:5px;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:5px;margin-inline-end:5px}}::slotted([slot=end]){margin-left:5px;margin-right:0;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:0;margin-inline-end:0}}::slotted([slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:10px;margin-right:10px;margin-top:0;margin-bottom:0;min-width:0.9em;font-size:1.8em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted([slot=icon-only]){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}:host(.item-option-expandable){-ms-flex-negative:0;flex-shrink:0;-webkit-transition-duration:0;transition-duration:0;-webkit-transition-property:none;transition-property:none;-webkit-transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1);transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1)}:host(.item-option-disabled){pointer-events:none}:host(.item-option-disabled) .button-native{cursor:default;opacity:0.5;pointer-events:none}:host{font-size:14px;font-weight:500;text-transform:uppercase}";
|
||||
@@ -74,7 +74,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function ItemOption(hostRef) {
|
||||
_classCallCheck(this, ItemOption);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* If `true`, the user cannot interact with the item option.
|
||||
*/
|
||||
@@ -103,13 +103,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(ItemOption, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object$assign;
|
||||
var _Object;
|
||||
|
||||
var disabled = this.disabled,
|
||||
expandable = this.expandable,
|
||||
href = this.href;
|
||||
var TagType = href === undefined ? 'button' : 'a';
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var attrs = TagType === 'button' ? {
|
||||
type: this.type
|
||||
} : {
|
||||
@@ -117,33 +117,33 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
href: this.href,
|
||||
target: this.target
|
||||
};
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onClick: this.onClick,
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'item-option-disabled', disabled), _defineProperty(_Object$assign, 'item-option-expandable', expandable), _defineProperty(_Object$assign, 'ion-activatable', true), _Object$assign))
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(TagType, Object.assign({}, attrs, {
|
||||
"class": Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color, (_Object = {}, _defineProperty(_Object, mode, true), _defineProperty(_Object, 'item-option-disabled', disabled), _defineProperty(_Object, 'item-option-expandable', expandable), _defineProperty(_Object, 'ion-activatable', true), _Object))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(TagType, Object.assign({}, attrs, {
|
||||
"class": "button-native",
|
||||
part: "native",
|
||||
disabled: disabled
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
"class": "button-inner"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
name: "top"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "horizontal-wrapper"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
name: "start"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
name: "icon-only"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
name: "end"
|
||||
})), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
})), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
|
||||
name: "bottom"
|
||||
})), mode === 'md' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null)));
|
||||
})), mode === 'md' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", null)));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -161,8 +161,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function ItemOptions(hostRef) {
|
||||
_classCallCheck(this, ItemOptions);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionSwipe = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionSwipe", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionSwipe = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionSwipe", 7);
|
||||
/**
|
||||
* The side the option button should be on. Possible values: `"start"` and `"end"`. If you have multiple `ion-item-options`, a side must be provided for each.
|
||||
*
|
||||
@@ -204,16 +204,16 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var isEnd = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["i"])(this.side);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var isEnd = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["l"])(this.side);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, "item-options-".concat(mode), true), _defineProperty(_class, 'item-options-start', !isEnd), _defineProperty(_class, 'item-options-end', isEnd), _class)
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -233,8 +233,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function ItemSliding(hostRef) {
|
||||
_classCallCheck(this, ItemSliding);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionDrag = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDrag", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionDrag = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDrag", 7);
|
||||
this.item = null;
|
||||
this.openAmount = 0;
|
||||
this.initialOpenAmount = 0;
|
||||
@@ -278,8 +278,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
case 3:
|
||||
_context2.next = 5;
|
||||
return Promise.resolve().then(__webpack_require__.bind(null,
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js"));
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js"));
|
||||
|
||||
case 5:
|
||||
this.gesture = _context2.sent.createGesture({
|
||||
@@ -397,7 +397,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
} // In RTL we want to switch the sides
|
||||
|
||||
|
||||
side = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["i"])(side) ? 'end' : 'start';
|
||||
side = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["l"])(side) ? 'end' : 'start';
|
||||
isStartOpen = this.openAmount < 0;
|
||||
isEndOpen = this.openAmount > 0;
|
||||
/**
|
||||
@@ -564,7 +564,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
case 7:
|
||||
option = _context6.sent;
|
||||
side = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["i"])(option.side) ? 'end' : 'start';
|
||||
side = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["l"])(option.side) ? 'end' : 'start';
|
||||
|
||||
if (side === 'start') {
|
||||
this.leftOptions = option;
|
||||
@@ -817,8 +817,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class2;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class2 = {}, _defineProperty(_class2, mode, true), _defineProperty(_class2, 'item-sliding-active-slide', this.state !== 2
|
||||
/* Disabled */
|
||||
), _defineProperty(_class2, 'item-sliding-active-options-end', (this.state & 8
|
||||
@@ -835,7 +835,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -10,14 +10,14 @@
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_loading", function() { return Loading; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-5c745fbd.js */ "./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
/* harmony import */ var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./animation-a635a2fc.js */ "./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
/* harmony import */ var _index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-79d74e0b.js */ "./node_modules/@ionic/core/dist/esm/index-79d74e0b.js");
|
||||
/* harmony import */ var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hardware-back-button-7b6ede21.js */ "./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
/* harmony import */ var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./overlays-7c699579.js */ "./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
/* harmony import */ var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-3f0b0c04.js */ "./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-90f46169.js */ "./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */ var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./animation-54fe0237.js */ "./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */ var _index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-9e3fe806.js */ "./node_modules/@ionic/core/dist/esm/index-9e3fe806.js");
|
||||
/* harmony import */ var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hardware-back-button-4a6b37fb.js */ "./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */ var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./overlays-12c20431.js */ "./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */ var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-ff3fc52f.js */ "./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
|
||||
|
||||
@@ -31,100 +31,100 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* iOS Loading Enter Animation
|
||||
*/
|
||||
const iosEnterAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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 Loading Leave Animation
|
||||
*/
|
||||
const iosLeaveAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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 Loading Enter Animation
|
||||
*/
|
||||
const mdEnterAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Md Loading Leave Animation
|
||||
*/
|
||||
const mdLeaveAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.loading-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]);
|
||||
};
|
||||
|
||||
const loadingIosCss = ".sc-ion-loading-ios-h{--min-width:auto;--width:auto;--min-height:auto;--height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-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-loading-ios-h{display:none}.loading-wrapper.sc-ion-loading-ios{display:-ms-flexbox;display:flex;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;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);opacity:0;z-index:10}.spinner-lines.sc-ion-loading-ios,.spinner-lines-small.sc-ion-loading-ios,.spinner-bubbles.sc-ion-loading-ios,.spinner-circles.sc-ion-loading-ios,.spinner-crescent.sc-ion-loading-ios,.spinner-dots.sc-ion-loading-ios{color:var(--spinner-color)}.sc-ion-loading-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--max-width:270px;--max-height:90%;--spinner-color:var(--ion-color-step-600, #666666);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);color:var(--ion-text-color, #000);font-size:14px}.loading-wrapper.sc-ion-loading-ios{border-radius:8px;padding-left:34px;padding-right:34px;padding-top:24px;padding-bottom:24px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-wrapper.sc-ion-loading-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:34px;padding-inline-start:34px;-webkit-padding-end:34px;padding-inline-end:34px}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.loading-translucent.sc-ion-loading-ios-h .loading-wrapper.sc-ion-loading-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.loading-content.sc-ion-loading-ios{font-weight:bold}.loading-spinner.sc-ion-loading-ios+.loading-content.sc-ion-loading-ios{margin-left:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-spinner.sc-ion-loading-ios+.loading-content.sc-ion-loading-ios{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}";
|
||||
@@ -132,100 +132,100 @@ const loadingIosCss = ".sc-ion-loading-ios-h{--min-width:auto;--width:auto;--min
|
||||
const loadingMdCss = ".sc-ion-loading-md-h{--min-width:auto;--width:auto;--min-height:auto;--height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-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-loading-md-h{display:none}.loading-wrapper.sc-ion-loading-md{display:-ms-flexbox;display:flex;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;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);opacity:0;z-index:10}.spinner-lines.sc-ion-loading-md,.spinner-lines-small.sc-ion-loading-md,.spinner-bubbles.sc-ion-loading-md,.spinner-circles.sc-ion-loading-md,.spinner-crescent.sc-ion-loading-md,.spinner-dots.sc-ion-loading-md{color:var(--spinner-color)}.sc-ion-loading-md-h{--background:var(--ion-color-step-50, #f2f2f2);--max-width:280px;--max-height:90%;--spinner-color:var(--ion-color-primary, #3880ff);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);color:var(--ion-color-step-850, #262626);font-size:14px}.loading-wrapper.sc-ion-loading-md{border-radius:2px;padding-left:24px;padding-right:24px;padding-top:24px;padding-bottom:24px;-webkit-box-shadow:0 16px 20px rgba(0, 0, 0, 0.4);box-shadow:0 16px 20px rgba(0, 0, 0, 0.4)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-wrapper.sc-ion-loading-md{padding-left:unset;padding-right:unset;-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px}}.loading-spinner.sc-ion-loading-md+.loading-content.sc-ion-loading-md{margin-left:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-spinner.sc-ion-loading-md+.loading-content.sc-ion-loading-md{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}";
|
||||
|
||||
const Loading = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
*/
|
||||
this.keyboardClose = true;
|
||||
/**
|
||||
* Number of milliseconds to wait before dismissing the loading indicator.
|
||||
*/
|
||||
this.duration = 0;
|
||||
/**
|
||||
* If `true`, the loading indicator will be dismissed when the backdrop is clicked.
|
||||
*/
|
||||
this.backdropDismiss = false;
|
||||
/**
|
||||
* If `true`, a backdrop will be displayed behind the loading indicator.
|
||||
*/
|
||||
this.showBackdrop = true;
|
||||
/**
|
||||
* If `true`, the loading indicator 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 loading indicator will animate.
|
||||
*/
|
||||
this.animated = true;
|
||||
this.onBackdropTap = () => {
|
||||
this.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
}
|
||||
componentWillLoad() {
|
||||
if (this.spinner === undefined) {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.spinner = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('loadingSpinner', _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
}
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* Present the loading overlay after it has been created.
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
*/
|
||||
async present() {
|
||||
await Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, undefined);
|
||||
if (this.duration > 0) {
|
||||
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
|
||||
}
|
||||
}
|
||||
this.keyboardClose = true;
|
||||
/**
|
||||
* Dismiss the loading 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 loading.
|
||||
* This can be useful in a button handler for determining which button was
|
||||
* clicked to dismiss the loading.
|
||||
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
||||
* Number of milliseconds to wait before dismissing the loading indicator.
|
||||
*/
|
||||
dismiss(data, role) {
|
||||
if (this.durationTimeout) {
|
||||
clearTimeout(this.durationTimeout);
|
||||
}
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
|
||||
}
|
||||
this.duration = 0;
|
||||
/**
|
||||
* Returns a promise that resolves when the loading did dismiss.
|
||||
* If `true`, the loading indicator will be dismissed when the backdrop is clicked.
|
||||
*/
|
||||
onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingDidDismiss');
|
||||
}
|
||||
this.backdropDismiss = false;
|
||||
/**
|
||||
* Returns a promise that resolves when the loading will dismiss.
|
||||
* If `true`, a backdrop will be displayed behind the loading indicator.
|
||||
*/
|
||||
onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingWillDismiss');
|
||||
this.showBackdrop = true;
|
||||
/**
|
||||
* If `true`, the loading indicator 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 loading indicator will animate.
|
||||
*/
|
||||
this.animated = true;
|
||||
this.onBackdropTap = () => {
|
||||
this.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
}
|
||||
componentWillLoad() {
|
||||
if (this.spinner === undefined) {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.spinner = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('loadingSpinner', _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
}
|
||||
render() {
|
||||
const { message, spinner } = this;
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { onIonBackdropTap: this.onBackdropTap, tabindex: "-1", style: {
|
||||
zIndex: `${40000 + this.overlayIndex}`
|
||||
}, class: Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), { [mode]: true, 'loading-translucent': this.translucent }) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", { visible: this.showBackdrop, tappable: this.backdropDismiss }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "loading-wrapper ion-overlay-wrapper", role: "dialog" }, spinner && (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "loading-spinner" }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "loading-content", innerHTML: Object(_index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_4__["s"])(message) })), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" })));
|
||||
}
|
||||
/**
|
||||
* Present the loading overlay after it has been created.
|
||||
*/
|
||||
async present() {
|
||||
await Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, undefined);
|
||||
if (this.duration > 0) {
|
||||
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
}
|
||||
/**
|
||||
* Dismiss the loading 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 loading.
|
||||
* This can be useful in a button handler for determining which button was
|
||||
* clicked to dismiss the loading.
|
||||
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
||||
*/
|
||||
dismiss(data, role) {
|
||||
if (this.durationTimeout) {
|
||||
clearTimeout(this.durationTimeout);
|
||||
}
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the loading did dismiss.
|
||||
*/
|
||||
onDidDismiss() {
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the loading will dismiss.
|
||||
*/
|
||||
onWillDismiss() {
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingWillDismiss');
|
||||
}
|
||||
render() {
|
||||
const { message, spinner } = this;
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { onIonBackdropTap: this.onBackdropTap, tabindex: "-1", style: {
|
||||
zIndex: `${40000 + this.overlayIndex}`
|
||||
}, class: Object.assign(Object.assign({}, Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), { [mode]: true, 'loading-translucent': this.translucent }) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", { visible: this.showBackdrop, tappable: this.backdropDismiss }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "loading-wrapper ion-overlay-wrapper", role: "dialog" }, spinner && (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "loading-spinner" }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "loading-content", innerHTML: Object(_index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_4__["s"])(message) })), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" })));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
};
|
||||
Loading.style = {
|
||||
ios: loadingIosCss,
|
||||
md: loadingMdCss
|
||||
ios: loadingIosCss,
|
||||
md: loadingMdCss
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,60 +33,60 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-a635a2fc.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-54fe0237.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./index-79d74e0b.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-79d74e0b.js");
|
||||
var _index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./index-9e3fe806.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-9e3fe806.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-7b6ede21.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-4a6b37fb.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./overlays-7c699579.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./overlays-12c20431.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
/**
|
||||
* iOS Loading Enter Animation
|
||||
*/
|
||||
|
||||
|
||||
var iosEnterAnimation = function iosEnterAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -107,9 +107,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var iosLeaveAnimation = function iosLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([{
|
||||
offset: 0,
|
||||
@@ -128,9 +128,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var mdEnterAnimation = function mdEnterAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -151,9 +151,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var mdLeaveAnimation = function mdLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([{
|
||||
offset: 0,
|
||||
@@ -176,11 +176,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Loading);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidDismiss", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionLoadingDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
@@ -216,21 +216,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.animated = true;
|
||||
|
||||
this.onBackdropTap = function () {
|
||||
_this.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
_this.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
};
|
||||
}
|
||||
|
||||
_createClass(Loading, [{
|
||||
key: "connectedCallback",
|
||||
value: function connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
}
|
||||
}, {
|
||||
key: "componentWillLoad",
|
||||
value: function componentWillLoad() {
|
||||
if (this.spinner === undefined) {
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.spinner = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('loadingSpinner', _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.spinner = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('loadingSpinner', _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -248,7 +248,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, undefined);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, undefined);
|
||||
|
||||
case 2:
|
||||
if (this.duration > 0) {
|
||||
@@ -288,7 +288,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
clearTimeout(this.durationTimeout);
|
||||
}
|
||||
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the loading did dismiss.
|
||||
@@ -297,7 +297,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onDidDismiss",
|
||||
value: function onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingDidDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the loading will dismiss.
|
||||
@@ -306,7 +306,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onWillDismiss",
|
||||
value: function onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingWillDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionLoadingWillDismiss');
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
@@ -315,38 +315,38 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
var message = this.message,
|
||||
spinner = this.spinner;
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onIonBackdropTap: this.onBackdropTap,
|
||||
tabindex: "-1",
|
||||
style: {
|
||||
zIndex: "".concat(40000 + this.overlayIndex)
|
||||
},
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'loading-translucent', this.translucent), _Object$assign))
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'loading-translucent', this.translucent), _Object$assign))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
visible: this.showBackdrop,
|
||||
tappable: this.backdropDismiss
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "loading-wrapper ion-overlay-wrapper",
|
||||
role: "dialog"
|
||||
}, spinner && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, spinner && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "loading-spinner"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
name: spinner,
|
||||
"aria-hidden": "true"
|
||||
})), message && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})), message && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "loading-content",
|
||||
innerHTML: Object(_index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_4__["s"])(message)
|
||||
})), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
innerHTML: Object(_index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_4__["s"])(message)
|
||||
})), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -45,57 +45,57 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-a635a2fc.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-54fe0237.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-685f606a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-685f606a.js");
|
||||
var _cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-eea9a7a9.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-eea9a7a9.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _gesture_controller_89173521_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./gesture-controller-89173521.js */
|
||||
"./node_modules/@ionic/core/dist/esm/gesture-controller-89173521.js");
|
||||
var _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./gesture-controller-31cb6bb9.js */
|
||||
"./node_modules/@ionic/core/dist/esm/gesture-controller-31cb6bb9.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-7b6ede21.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-4a6b37fb.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./index-a8b25bef.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-a8b25bef.js");
|
||||
var _index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./index-3a75d1af.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-3a75d1af.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
var menuIosCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{left:0;right:auto;top:0;bottom:0;-webkit-transform:translate3d(-9999px, 0, 0);transform:translate3d(-9999px, 0, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;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:strict}[dir=rtl] .menu-inner,:host-context([dir=rtl]) .menu-inner{left:unset;right:unset;left:auto;right:0}[dir=rtl] .menu-inner,:host-context([dir=rtl]) .menu-inner{-webkit-transform:translate3d(calc(-1 * -9999px), 0, 0);transform:translate3d(calc(-1 * -9999px), 0, 0)}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;right:auto;left:0}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;right:0;left:auto;}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";
|
||||
var menuMdCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{left:0;right:auto;top:0;bottom:0;-webkit-transform:translate3d(-9999px, 0, 0);transform:translate3d(-9999px, 0, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;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:strict}[dir=rtl] .menu-inner,:host-context([dir=rtl]) .menu-inner{left:unset;right:unset;left:auto;right:0}[dir=rtl] .menu-inner,:host-context([dir=rtl]) .menu-inner{-webkit-transform:translate3d(calc(-1 * -9999px), 0, 0);transform:translate3d(calc(-1 * -9999px), 0, 0)}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;right:auto;left:0}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;right:0;left:auto;}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-overlay) .menu-inner{-webkit-box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18);box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18)}";
|
||||
@@ -108,14 +108,14 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Menu(hostRef) {
|
||||
_classCallCheck(this, Menu);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionWillOpen = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionWillOpen", 7);
|
||||
this.ionWillClose = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionWillClose", 7);
|
||||
this.ionDidOpen = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDidOpen", 7);
|
||||
this.ionDidClose = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDidClose", 7);
|
||||
this.ionMenuChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionMenuChange", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionWillOpen = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionWillOpen", 7);
|
||||
this.ionWillClose = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionWillClose", 7);
|
||||
this.ionDidOpen = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDidOpen", 7);
|
||||
this.ionDidClose = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionDidClose", 7);
|
||||
this.ionMenuChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionMenuChange", 7);
|
||||
this.lastOnEnd = 0;
|
||||
this.blocker = _gesture_controller_89173521_js__WEBPACK_IMPORTED_MODULE_5__["G"].createBlocker({
|
||||
this.blocker = _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_5__["G"].createBlocker({
|
||||
disableScroll: true
|
||||
});
|
||||
this.isAnimating = false;
|
||||
@@ -178,7 +178,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "sideChanged",
|
||||
value: function sideChanged() {
|
||||
this.isEndSide = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["i"])(this.side);
|
||||
this.isEndSide = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["l"])(this.side);
|
||||
}
|
||||
}, {
|
||||
key: "swipeGestureChanged",
|
||||
@@ -197,7 +197,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
if (this.type === undefined) {
|
||||
this.type = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('menuType', 'overlay');
|
||||
this.type = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('menuType', 'overlay');
|
||||
}
|
||||
|
||||
el = this.el;
|
||||
@@ -225,12 +225,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.typeChanged(this.type, undefined);
|
||||
this.sideChanged(); // register this menu with the app's menu controller
|
||||
|
||||
_index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"]._register(this);
|
||||
_index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"]._register(this);
|
||||
|
||||
_context.next = 15;
|
||||
return Promise.resolve().then(__webpack_require__.bind(null,
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js"));
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js"));
|
||||
|
||||
case 15:
|
||||
this.gesture = _context.sent.createGesture({
|
||||
@@ -304,7 +304,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function disconnectedCallback() {
|
||||
this.blocker.destroy();
|
||||
|
||||
_index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"]._unregister(this);
|
||||
_index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"]._unregister(this);
|
||||
|
||||
if (this.animation) {
|
||||
this.animation.destroy();
|
||||
@@ -400,7 +400,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
key: "setOpen",
|
||||
value: function setOpen(shouldOpen) {
|
||||
var animated = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
||||
return _index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"]._setOpen(this, shouldOpen, animated);
|
||||
return _index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"]._setOpen(this, shouldOpen, animated);
|
||||
}
|
||||
}, {
|
||||
key: "_setOpen",
|
||||
@@ -478,12 +478,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
_context4.next = 7;
|
||||
return _index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"]._createAnimation(this.type, this);
|
||||
return _index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"]._createAnimation(this.type, this);
|
||||
|
||||
case 7:
|
||||
this.animation = _context4.sent;
|
||||
|
||||
if (!_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].getBoolean('animated', true)) {
|
||||
if (!_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].getBoolean('animated', true)) {
|
||||
this.animation.duration(0);
|
||||
}
|
||||
|
||||
@@ -513,7 +513,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
switch (_context5.prev = _context5.next) {
|
||||
case 0:
|
||||
isReversed = !shouldOpen;
|
||||
mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
easing = mode === 'ios' ? iosEasing : mdEasing;
|
||||
easingReverse = mode === 'ios' ? iosEasingReverse : mdEasingReverse;
|
||||
ani = this.animation.direction(isReversed ? 'reverse' : 'normal').easing(isReversed ? easingReverse : easing).onFinish(function () {
|
||||
@@ -575,7 +575,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
if (this._isOpen) {
|
||||
return true; // TODO error
|
||||
} else if (_index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"]._getOpenSync()) {
|
||||
} else if (_index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"]._getOpenSync()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
key: "onStart",
|
||||
value: function onStart() {
|
||||
if (!this.isAnimating || !this.animation) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(false, 'isAnimating has to be true');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(false, 'isAnimating has to be true');
|
||||
return;
|
||||
} // the cloned animation should not use an easing curve during seek
|
||||
|
||||
@@ -602,7 +602,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
key: "onMove",
|
||||
value: function onMove(detail) {
|
||||
if (!this.isAnimating || !this.animation) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(false, 'isAnimating has to be true');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(false, 'isAnimating has to be true');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var _this2 = this;
|
||||
|
||||
if (!this.isAnimating || !this.animation) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(false, 'isAnimating has to be true');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(false, 'isAnimating has to be true');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -656,7 +656,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
* in terms of a linear curve.
|
||||
*/
|
||||
|
||||
newStepValue += Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [0.4, 0], [0.6, 1], [1, 1], Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0, adjustedStepValue, 0.9999))[0] || 0;
|
||||
newStepValue += Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [0.4, 0], [0.6, 1], [1, 1], Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0, adjustedStepValue, 0.9999))[0] || 0;
|
||||
var playTo = this._isOpen ? !shouldComplete : shouldComplete;
|
||||
this.animation.easing('cubic-bezier(0.4, 0.0, 0.6, 1)').onFinish(function () {
|
||||
return _this2.afterAnimation(shouldOpen);
|
||||
@@ -667,7 +667,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "beforeAnimation",
|
||||
value: function beforeAnimation(shouldOpen) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(!this.isAnimating, '_before() should not be called while animating'); // this places the menu into the correct location before it animates in
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(!this.isAnimating, '_before() should not be called while animating'); // this places the menu into the correct location before it animates in
|
||||
// this css class doesn't actually kick off any animations
|
||||
|
||||
this.el.classList.add(SHOW_MENU);
|
||||
@@ -688,7 +688,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "afterAnimation",
|
||||
value: function afterAnimation(isOpen) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(this.isAnimating, '_before() should be called while animating'); // keep opening/closing the menu disabled for a touch more yet
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(this.isAnimating, '_before() should be called while animating'); // keep opening/closing the menu disabled for a touch more yet
|
||||
// only add listeners/css if it's enabled and isOpen
|
||||
// and only remove listeners/css if it's not open
|
||||
// emit opened/closed events
|
||||
@@ -744,15 +744,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
if (!this.disabled) {
|
||||
_index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"]._setActiveMenu(this);
|
||||
_index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"]._setActiveMenu(this);
|
||||
}
|
||||
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(!this.isAnimating, 'can not be animating');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(!this.isAnimating, 'can not be animating');
|
||||
}
|
||||
}, {
|
||||
key: "forceClosing",
|
||||
value: function forceClosing() {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(this._isOpen, 'menu cannot be closed');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(this._isOpen, 'menu cannot be closed');
|
||||
this.isAnimating = true;
|
||||
var ani = this.animation.direction('reverse');
|
||||
ani.play({
|
||||
@@ -770,17 +770,17 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
type = this.type,
|
||||
disabled = this.disabled,
|
||||
isPaneVisible = this.isPaneVisible;
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
role: "navigation",
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, "menu-type-".concat(type), true), _defineProperty(_class, 'menu-enabled', !disabled), _defineProperty(_class, 'menu-side-end', isEndSide), _defineProperty(_class, 'menu-side-start', !isEndSide), _defineProperty(_class, 'menu-pane-visible', isPaneVisible), _class)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "menu-inner",
|
||||
part: "container",
|
||||
ref: function ref(el) {
|
||||
return _this3.menuInnerEl = el;
|
||||
}
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
ref: function ref(el) {
|
||||
return _this3.backdropEl = el;
|
||||
},
|
||||
@@ -793,7 +793,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
@@ -838,7 +838,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
switch (_context6.prev = _context6.next) {
|
||||
case 0:
|
||||
_context6.next = 2;
|
||||
return _index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"].get(menu);
|
||||
return _index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"].get(menu);
|
||||
|
||||
case 2:
|
||||
menuEl = _context6.sent;
|
||||
@@ -880,7 +880,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, MenuButton);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.visible = false;
|
||||
/**
|
||||
* If `true`, the user cannot interact with the menu button.
|
||||
@@ -902,7 +902,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
while (1) {
|
||||
switch (_context7.prev = _context7.next) {
|
||||
case 0:
|
||||
return _context7.abrupt("return", _index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"].toggle(_this4.menu));
|
||||
return _context7.abrupt("return", _index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"].toggle(_this4.menu));
|
||||
|
||||
case 1:
|
||||
case "end":
|
||||
@@ -949,50 +949,44 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object;
|
||||
|
||||
var color = this.color,
|
||||
disabled = this.disabled;
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
|
||||
var menuIcon = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('menuIcon', mode === 'ios' ? 'menu-outline' : 'menu-sharp');
|
||||
var menuIcon = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('menuIcon', mode === 'ios' ? 'menu-outline' : 'menu-sharp');
|
||||
|
||||
var hidden = this.autoHide && !this.visible;
|
||||
var attrs = {
|
||||
type: this.type
|
||||
};
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onClick: this.onClick,
|
||||
"aria-disabled": disabled ? 'true' : null,
|
||||
"aria-hidden": hidden ? 'true' : null,
|
||||
"class": Object.assign(Object.assign(_defineProperty({}, mode, true), Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_8__["c"])(color)), {
|
||||
'button': true,
|
||||
'menu-button-hidden': hidden,
|
||||
'menu-button-disabled': disabled,
|
||||
'in-toolbar': Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_8__["h"])('ion-toolbar', this.el),
|
||||
'in-toolbar-color': Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_8__["h"])('ion-toolbar[color]', this.el),
|
||||
'ion-activatable': true,
|
||||
'ion-focusable': true
|
||||
})
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", Object.assign({}, attrs, {
|
||||
"class": Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_8__["c"])(color, (_Object = {}, _defineProperty(_Object, mode, true), _defineProperty(_Object, 'button', true), _defineProperty(_Object, 'menu-button-hidden', hidden), _defineProperty(_Object, 'menu-button-disabled', disabled), _defineProperty(_Object, 'in-toolbar', Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_8__["h"])('ion-toolbar', this.el)), _defineProperty(_Object, 'in-toolbar-color', Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_8__["h"])('ion-toolbar[color]', this.el)), _defineProperty(_Object, 'ion-activatable', true), _defineProperty(_Object, 'ion-focusable', true), _Object))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", Object.assign({}, attrs, {
|
||||
disabled: disabled,
|
||||
"class": "button-native",
|
||||
part: "native",
|
||||
"aria-label": "menu"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
|
||||
"class": "button-inner"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
part: "icon",
|
||||
icon: menuIcon,
|
||||
mode: mode,
|
||||
lazy: false,
|
||||
"aria-hidden": "true"
|
||||
}))), mode === 'md' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", {
|
||||
}))), mode === 'md' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-ripple-effect", {
|
||||
type: "unbounded"
|
||||
})));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -1011,7 +1005,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, MenuToggle);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.visible = false;
|
||||
/**
|
||||
* Automatically hides the content when the corresponding menu is not active.
|
||||
@@ -1023,7 +1017,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.autoHide = true;
|
||||
|
||||
this.onClick = function () {
|
||||
return _index_a8b25bef_js__WEBPACK_IMPORTED_MODULE_7__["m"].toggle(_this5.menu);
|
||||
return _index_3a75d1af_js__WEBPACK_IMPORTED_MODULE_7__["m"].toggle(_this5.menu);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1065,13 +1059,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class2;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var hidden = this.autoHide && !this.visible;
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onClick: this.onClick,
|
||||
"aria-hidden": hidden ? 'true' : null,
|
||||
"class": (_class2 = {}, _defineProperty(_class2, mode, true), _defineProperty(_class2, 'menu-toggle-hidden', hidden), _class2)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -10,18 +10,18 @@
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_modal", function() { return Modal; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-5c745fbd.js */ "./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
/* harmony import */ var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./animation-a635a2fc.js */ "./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
/* harmony import */ var _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-37b50f53.js */ "./node_modules/@ionic/core/dist/esm/index-37b50f53.js");
|
||||
/* harmony import */ var _cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cubic-bezier-685f606a.js */ "./node_modules/@ionic/core/dist/esm/cubic-bezier-685f606a.js");
|
||||
/* harmony import */ var _gesture_controller_89173521_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./gesture-controller-89173521.js */ "./node_modules/@ionic/core/dist/esm/gesture-controller-89173521.js");
|
||||
/* harmony import */ var _index_eea61379_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index-eea61379.js */ "./node_modules/@ionic/core/dist/esm/index-eea61379.js");
|
||||
/* harmony import */ var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hardware-back-button-7b6ede21.js */ "./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
/* harmony import */ var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./overlays-7c699579.js */ "./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
/* harmony import */ var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./theme-3f0b0c04.js */ "./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
/* harmony import */ var _framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./framework-delegate-d1eb6504.js */ "./node_modules/@ionic/core/dist/esm/framework-delegate-d1eb6504.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-90f46169.js */ "./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */ var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./animation-54fe0237.js */ "./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */ var _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-d8cfb4a8.js */ "./node_modules/@ionic/core/dist/esm/index-d8cfb4a8.js");
|
||||
/* harmony import */ var _cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cubic-bezier-eea9a7a9.js */ "./node_modules/@ionic/core/dist/esm/cubic-bezier-eea9a7a9.js");
|
||||
/* harmony import */ var _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./gesture-controller-31cb6bb9.js */ "./node_modules/@ionic/core/dist/esm/gesture-controller-31cb6bb9.js");
|
||||
/* harmony import */ var _index_f49d994d_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index-f49d994d.js */ "./node_modules/@ionic/core/dist/esm/index-f49d994d.js");
|
||||
/* harmony import */ var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hardware-back-button-4a6b37fb.js */ "./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */ var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./overlays-12c20431.js */ "./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */ var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./theme-ff3fc52f.js */ "./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
/* harmony import */ var _framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./framework-delegate-4584ab5a.js */ "./node_modules/@ionic/core/dist/esm/framework-delegate-4584ab5a.js");
|
||||
|
||||
|
||||
|
||||
@@ -37,298 +37,298 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// Defaults for the card swipe animation
|
||||
const SwipeToCloseDefaults = {
|
||||
MIN_PRESENTING_SCALE: 0.93,
|
||||
MIN_PRESENTING_SCALE: 0.93,
|
||||
};
|
||||
const createSwipeToCloseGesture = (el, animation, onDismiss) => {
|
||||
const height = el.offsetHeight;
|
||||
let isOpen = false;
|
||||
const canStart = (detail) => {
|
||||
const target = detail.event.target;
|
||||
if (target === null ||
|
||||
!target.closest) {
|
||||
return true;
|
||||
}
|
||||
const content = target.closest('ion-content');
|
||||
if (content === null) {
|
||||
return true;
|
||||
}
|
||||
// Target is in the content so we don't start the gesture.
|
||||
// We could be more nuanced here and allow it for content that
|
||||
// does not need to scroll.
|
||||
return false;
|
||||
};
|
||||
const onStart = () => {
|
||||
animation.progressStart(true, (isOpen) ? 1 : 0);
|
||||
};
|
||||
const onMove = (detail) => {
|
||||
const step = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
animation.progressStep(step);
|
||||
};
|
||||
const onEnd = (detail) => {
|
||||
const velocity = detail.velocityY;
|
||||
const step = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
const threshold = (detail.deltaY + velocity * 1000) / height;
|
||||
const shouldComplete = threshold >= 0.5;
|
||||
let newStepValue = (shouldComplete) ? -0.001 : 0.001;
|
||||
if (!shouldComplete) {
|
||||
animation.easing('cubic-bezier(1, 0, 0.68, 0.28)');
|
||||
newStepValue += Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];
|
||||
}
|
||||
else {
|
||||
animation.easing('cubic-bezier(0.32, 0.72, 0, 1)');
|
||||
newStepValue += Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];
|
||||
}
|
||||
const duration = (shouldComplete) ? computeDuration(step * height, velocity) : computeDuration((1 - step) * height, velocity);
|
||||
isOpen = shouldComplete;
|
||||
gesture.enable(false);
|
||||
animation
|
||||
.onFinish(() => {
|
||||
if (!shouldComplete) {
|
||||
gesture.enable(true);
|
||||
}
|
||||
})
|
||||
.progressEnd((shouldComplete) ? 1 : 0, newStepValue, duration);
|
||||
if (shouldComplete) {
|
||||
onDismiss();
|
||||
}
|
||||
};
|
||||
const gesture = Object(_index_eea61379_js__WEBPACK_IMPORTED_MODULE_7__["createGesture"])({
|
||||
el,
|
||||
gestureName: 'modalSwipeToClose',
|
||||
gesturePriority: 40,
|
||||
direction: 'y',
|
||||
threshold: 10,
|
||||
canStart,
|
||||
onStart,
|
||||
onMove,
|
||||
onEnd
|
||||
});
|
||||
return gesture;
|
||||
const height = el.offsetHeight;
|
||||
let isOpen = false;
|
||||
const canStart = (detail) => {
|
||||
const target = detail.event.target;
|
||||
if (target === null ||
|
||||
!target.closest) {
|
||||
return true;
|
||||
}
|
||||
const content = target.closest('ion-content');
|
||||
if (content === null) {
|
||||
return true;
|
||||
}
|
||||
// Target is in the content so we don't start the gesture.
|
||||
// We could be more nuanced here and allow it for content that
|
||||
// does not need to scroll.
|
||||
return false;
|
||||
};
|
||||
const onStart = () => {
|
||||
animation.progressStart(true, (isOpen) ? 1 : 0);
|
||||
};
|
||||
const onMove = (detail) => {
|
||||
const step = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
animation.progressStep(step);
|
||||
};
|
||||
const onEnd = (detail) => {
|
||||
const velocity = detail.velocityY;
|
||||
const step = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
const threshold = (detail.deltaY + velocity * 1000) / height;
|
||||
const shouldComplete = threshold >= 0.5;
|
||||
let newStepValue = (shouldComplete) ? -0.001 : 0.001;
|
||||
if (!shouldComplete) {
|
||||
animation.easing('cubic-bezier(1, 0, 0.68, 0.28)');
|
||||
newStepValue += Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];
|
||||
}
|
||||
else {
|
||||
animation.easing('cubic-bezier(0.32, 0.72, 0, 1)');
|
||||
newStepValue += Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];
|
||||
}
|
||||
const duration = (shouldComplete) ? computeDuration(step * height, velocity) : computeDuration((1 - step) * height, velocity);
|
||||
isOpen = shouldComplete;
|
||||
gesture.enable(false);
|
||||
animation
|
||||
.onFinish(() => {
|
||||
if (!shouldComplete) {
|
||||
gesture.enable(true);
|
||||
}
|
||||
})
|
||||
.progressEnd((shouldComplete) ? 1 : 0, newStepValue, duration);
|
||||
if (shouldComplete) {
|
||||
onDismiss();
|
||||
}
|
||||
};
|
||||
const gesture = Object(_index_f49d994d_js__WEBPACK_IMPORTED_MODULE_7__["createGesture"])({
|
||||
el,
|
||||
gestureName: 'modalSwipeToClose',
|
||||
gesturePriority: 40,
|
||||
direction: 'y',
|
||||
threshold: 10,
|
||||
canStart,
|
||||
onStart,
|
||||
onMove,
|
||||
onEnd
|
||||
});
|
||||
return gesture;
|
||||
};
|
||||
const computeDuration = (remaining, velocity) => {
|
||||
return Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(400, remaining / Math.abs(velocity * 1.1), 500);
|
||||
return Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(400, remaining / Math.abs(velocity * 1.1), 500);
|
||||
};
|
||||
|
||||
/**
|
||||
* iOS Modal Enter Animation for the Card presentation style
|
||||
*/
|
||||
const iosEnterAnimation = (baseEl, presentingEl) => {
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow'))
|
||||
.beforeStyles({ 'opacity': 1 })
|
||||
.fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.32,0.72,0,1)')
|
||||
.duration(500)
|
||||
.addAnimation(wrapperAnimation);
|
||||
if (presentingEl) {
|
||||
const isMobile = window.innerWidth < 768;
|
||||
const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);
|
||||
const presentingAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.beforeStyles({
|
||||
'transform': 'translateY(0)',
|
||||
'transform-origin': 'top center',
|
||||
'overflow': 'hidden'
|
||||
});
|
||||
const bodyEl = document.body;
|
||||
if (isMobile) {
|
||||
/**
|
||||
* Fallback for browsers that does not support `max()` (ex: Firefox)
|
||||
* No need to worry about statusbar padding since engines like Gecko
|
||||
* are not used as the engine for standlone Cordova/Capacitor apps
|
||||
*/
|
||||
const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
||||
const modalTransform = hasCardModal ? '-10px' : transformOffset;
|
||||
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
||||
const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.afterStyles({
|
||||
'transform': finalTransform
|
||||
})
|
||||
.beforeAddWrite(() => bodyEl.style.setProperty('background-color', 'black'))
|
||||
.addElement(presentingEl)
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' },
|
||||
{ offset: 1, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' }
|
||||
]);
|
||||
baseAnimation.addAnimation(presentingAnimation);
|
||||
}
|
||||
else {
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
if (!hasCardModal) {
|
||||
wrapperAnimation.fromTo('opacity', '0', '1');
|
||||
}
|
||||
else {
|
||||
const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
|
||||
const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.afterStyles({
|
||||
'transform': finalTransform
|
||||
})
|
||||
.addElement(presentingEl.querySelector('.modal-wrapper'))
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' },
|
||||
{ offset: 1, filter: 'contrast(0.85)', transform: finalTransform }
|
||||
]);
|
||||
const shadowAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.afterStyles({
|
||||
'transform': finalTransform
|
||||
})
|
||||
.addElement(presentingEl.querySelector('.modal-shadow'))
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', transform: 'translateY(0) scale(1)' },
|
||||
{ offset: 1, opacity: '0', transform: finalTransform }
|
||||
]);
|
||||
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
||||
}
|
||||
}
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow'))
|
||||
.beforeStyles({ 'opacity': 1 })
|
||||
.fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.32,0.72,0,1)')
|
||||
.duration(500)
|
||||
.addAnimation(wrapperAnimation);
|
||||
if (presentingEl) {
|
||||
const isMobile = window.innerWidth < 768;
|
||||
const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);
|
||||
const presentingAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.beforeStyles({
|
||||
'transform': 'translateY(0)',
|
||||
'transform-origin': 'top center',
|
||||
'overflow': 'hidden'
|
||||
});
|
||||
const bodyEl = document.body;
|
||||
if (isMobile) {
|
||||
/**
|
||||
* Fallback for browsers that does not support `max()` (ex: Firefox)
|
||||
* No need to worry about statusbar padding since engines like Gecko
|
||||
* are not used as the engine for standlone Cordova/Capacitor apps
|
||||
*/
|
||||
const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
||||
const modalTransform = hasCardModal ? '-10px' : transformOffset;
|
||||
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
||||
const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.afterStyles({
|
||||
'transform': finalTransform
|
||||
})
|
||||
.beforeAddWrite(() => bodyEl.style.setProperty('background-color', 'black'))
|
||||
.addElement(presentingEl)
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' },
|
||||
{ offset: 1, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' }
|
||||
]);
|
||||
baseAnimation.addAnimation(presentingAnimation);
|
||||
}
|
||||
else {
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
if (!hasCardModal) {
|
||||
wrapperAnimation.fromTo('opacity', '0', '1');
|
||||
}
|
||||
else {
|
||||
const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
|
||||
const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.afterStyles({
|
||||
'transform': finalTransform
|
||||
})
|
||||
.addElement(presentingEl.querySelector('.modal-wrapper'))
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' },
|
||||
{ offset: 1, filter: 'contrast(0.85)', transform: finalTransform }
|
||||
]);
|
||||
const shadowAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.afterStyles({
|
||||
'transform': finalTransform
|
||||
})
|
||||
.addElement(presentingEl.querySelector('.modal-shadow'))
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '1', transform: 'translateY(0) scale(1)' },
|
||||
{ offset: 1, opacity: '0', transform: finalTransform }
|
||||
]);
|
||||
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
||||
}
|
||||
}
|
||||
return baseAnimation;
|
||||
}
|
||||
else {
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
}
|
||||
return baseAnimation;
|
||||
};
|
||||
|
||||
/**
|
||||
* iOS Modal Leave Animation
|
||||
*/
|
||||
const iosLeaveAnimation = (baseEl, presentingEl, duration = 500) => {
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0.0);
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow'))
|
||||
.beforeStyles({ 'opacity': 1 })
|
||||
.fromTo('transform', 'translateY(0vh)', 'translateY(100vh)');
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.32,0.72,0,1)')
|
||||
.duration(duration)
|
||||
.addAnimation(wrapperAnimation);
|
||||
if (presentingEl) {
|
||||
const isMobile = window.innerWidth < 768;
|
||||
const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);
|
||||
const presentingAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.beforeClearStyles(['transform'])
|
||||
.afterClearStyles(['transform'])
|
||||
.onFinish(currentStep => {
|
||||
// only reset background color if this is the last card-style modal
|
||||
if (currentStep !== 1) {
|
||||
return;
|
||||
}
|
||||
presentingEl.style.setProperty('overflow', '');
|
||||
const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter(m => m.presentingElement !== undefined).length;
|
||||
if (numModals <= 1) {
|
||||
bodyEl.style.setProperty('background-color', '');
|
||||
}
|
||||
});
|
||||
const bodyEl = document.body;
|
||||
if (isMobile) {
|
||||
const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
||||
const modalTransform = hasCardModal ? '-10px' : transformOffset;
|
||||
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
||||
const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.addElement(presentingEl)
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' },
|
||||
{ offset: 1, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' }
|
||||
]);
|
||||
baseAnimation.addAnimation(presentingAnimation);
|
||||
}
|
||||
else {
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
if (!hasCardModal) {
|
||||
wrapperAnimation.fromTo('opacity', '1', '0');
|
||||
}
|
||||
else {
|
||||
const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
|
||||
const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.addElement(presentingEl.querySelector('.modal-wrapper'))
|
||||
.afterStyles({
|
||||
'transform': 'translate3d(0, 0, 0)'
|
||||
})
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(0.85)', transform: finalTransform },
|
||||
{ offset: 1, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' }
|
||||
]);
|
||||
const shadowAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(presentingEl.querySelector('.modal-shadow'))
|
||||
.afterStyles({
|
||||
'transform': 'translateY(0) scale(1)'
|
||||
})
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '0', transform: finalTransform },
|
||||
{ offset: 1, opacity: '1', transform: 'translateY(0) scale(1)' }
|
||||
]);
|
||||
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
||||
}
|
||||
}
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0.0);
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow'))
|
||||
.beforeStyles({ 'opacity': 1 })
|
||||
.fromTo('transform', 'translateY(0vh)', 'translateY(100vh)');
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.32,0.72,0,1)')
|
||||
.duration(duration)
|
||||
.addAnimation(wrapperAnimation);
|
||||
if (presentingEl) {
|
||||
const isMobile = window.innerWidth < 768;
|
||||
const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);
|
||||
const presentingAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.beforeClearStyles(['transform'])
|
||||
.afterClearStyles(['transform'])
|
||||
.onFinish(currentStep => {
|
||||
// only reset background color if this is the last card-style modal
|
||||
if (currentStep !== 1) {
|
||||
return;
|
||||
}
|
||||
presentingEl.style.setProperty('overflow', '');
|
||||
const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter(m => m.presentingElement !== undefined).length;
|
||||
if (numModals <= 1) {
|
||||
bodyEl.style.setProperty('background-color', '');
|
||||
}
|
||||
});
|
||||
const bodyEl = document.body;
|
||||
if (isMobile) {
|
||||
const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';
|
||||
const modalTransform = hasCardModal ? '-10px' : transformOffset;
|
||||
const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
|
||||
const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.addElement(presentingEl)
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' },
|
||||
{ offset: 1, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' }
|
||||
]);
|
||||
baseAnimation.addAnimation(presentingAnimation);
|
||||
}
|
||||
else {
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
if (!hasCardModal) {
|
||||
wrapperAnimation.fromTo('opacity', '1', '0');
|
||||
}
|
||||
else {
|
||||
const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;
|
||||
const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;
|
||||
presentingAnimation
|
||||
.addElement(presentingEl.querySelector('.modal-wrapper'))
|
||||
.afterStyles({
|
||||
'transform': 'translate3d(0, 0, 0)'
|
||||
})
|
||||
.keyframes([
|
||||
{ offset: 0, filter: 'contrast(0.85)', transform: finalTransform },
|
||||
{ offset: 1, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' }
|
||||
]);
|
||||
const shadowAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])()
|
||||
.addElement(presentingEl.querySelector('.modal-shadow'))
|
||||
.afterStyles({
|
||||
'transform': 'translateY(0) scale(1)'
|
||||
})
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: '0', transform: finalTransform },
|
||||
{ offset: 1, opacity: '1', transform: 'translateY(0) scale(1)' }
|
||||
]);
|
||||
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
||||
}
|
||||
}
|
||||
return baseAnimation;
|
||||
}
|
||||
else {
|
||||
baseAnimation.addAnimation(backdropAnimation);
|
||||
}
|
||||
return baseAnimation;
|
||||
};
|
||||
|
||||
/**
|
||||
* Md Modal Enter Animation
|
||||
*/
|
||||
const mdEnterAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.modal-wrapper'))
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
|
||||
{ offset: 1, opacity: 1, transform: 'translateY(0px)' }
|
||||
]);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.36,0.66,0.04,1)')
|
||||
.duration(280)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.modal-wrapper'))
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
|
||||
{ offset: 1, opacity: 1, transform: 'translateY(0px)' }
|
||||
]);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.36,0.66,0.04,1)')
|
||||
.duration(280)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Md Modal Leave Animation
|
||||
*/
|
||||
const mdLeaveAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperEl = baseEl.querySelector('.modal-wrapper');
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0.0);
|
||||
wrapperAnimation
|
||||
.addElement(wrapperEl)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.99, transform: 'translateY(0px)' },
|
||||
{ offset: 1, opacity: 0, transform: 'translateY(40px)' }
|
||||
]);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.47,0,0.745,0.715)')
|
||||
.duration(200)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperEl = baseEl.querySelector('.modal-wrapper');
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0.0);
|
||||
wrapperAnimation
|
||||
.addElement(wrapperEl)
|
||||
.keyframes([
|
||||
{ offset: 0, opacity: 0.99, transform: 'translateY(0px)' },
|
||||
{ offset: 1, opacity: 0, transform: 'translateY(40px)' }
|
||||
]);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.47,0,0.745,0.715)')
|
||||
.duration(200)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
};
|
||||
|
||||
const modalIosCss = ".sc-ion-modal-ios-h{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;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;contain:strict}.overlay-hidden.sc-ion-modal-ios-h{display:none}.modal-wrapper.sc-ion-modal-ios,.modal-shadow.sc-ion-modal-ios{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow.sc-ion-modal-ios{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-ios-h{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){.sc-ion-modal-ios-h{--width:600px;--height:600px}}.sc-ion-modal-ios-h:first-of-type{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-ios-h{--border-radius:10px}}.modal-wrapper.sc-ion-modal-ios{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){.modal-card.sc-ion-modal-ios-h{--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){.modal-card.sc-ion-modal-ios-h{--height:calc(100% - 40px)}}.modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios{border-top-left-radius:10px;border-top-right-radius:10px;border-bottom-right-radius:0;border-bottom-left-radius:0}[dir=rtl].sc-ion-modal-ios-h -no-combinator.modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios,[dir=rtl] .sc-ion-modal-ios-h -no-combinator.modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios,[dir=rtl].modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios,[dir=rtl] .modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios{border-top-left-radius:10px;border-top-right-radius:10px;border-bottom-right-radius:0;border-bottom-left-radius:0}.modal-card.sc-ion-modal-ios-h{--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}.modal-card.sc-ion-modal-ios-h .modal-shadow.sc-ion-modal-ios{display:none}.modal-card.sc-ion-modal-ios-h ion-backdrop.sc-ion-modal-ios{pointer-events:none}}@media screen and (min-width: 768px){.modal-card.sc-ion-modal-ios-h{--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px}.modal-card.sc-ion-modal-ios-h{--backdrop-opacity:0;-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}.modal-card.sc-ion-modal-ios-h:first-of-type{--backdrop-opacity:0.18}.modal-card.sc-ion-modal-ios-h .modal-shadow.sc-ion-modal-ios{-webkit-box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1)}}";
|
||||
@@ -336,169 +336,169 @@ const modalIosCss = ".sc-ion-modal-ios-h{--width:100%;--min-width:auto;--max-wid
|
||||
const modalMdCss = ".sc-ion-modal-md-h{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;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;contain:strict}.overlay-hidden.sc-ion-modal-md-h{display:none}.modal-wrapper.sc-ion-modal-md,.modal-shadow.sc-ion-modal-md{border-radius:var(--border-radius);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);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow.sc-ion-modal-md{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-md-h{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){.sc-ion-modal-md-h{--width:600px;--height:600px}}.sc-ion-modal-md-h:first-of-type{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-md-h{--border-radius:2px}.sc-ion-modal-md-h:first-of-type{--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper.sc-ion-modal-md{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
|
||||
|
||||
const Modal = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidDismiss", 7);
|
||||
// Whether or not modal is being dismissed via gesture
|
||||
this.gestureAnimationDismissing = false;
|
||||
this.presented = false;
|
||||
/**
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
*/
|
||||
this.keyboardClose = true;
|
||||
/**
|
||||
* If `true`, the modal will be dismissed when the backdrop is clicked.
|
||||
*/
|
||||
this.backdropDismiss = true;
|
||||
/**
|
||||
* If `true`, a backdrop will be displayed behind the modal.
|
||||
*/
|
||||
this.showBackdrop = true;
|
||||
/**
|
||||
* If `true`, the modal will animate.
|
||||
*/
|
||||
this.animated = true;
|
||||
/**
|
||||
* If `true`, the modal can be swiped to dismiss. Only applies in iOS mode.
|
||||
*/
|
||||
this.swipeToClose = false;
|
||||
this.onBackdropTap = () => {
|
||||
this.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["B"]);
|
||||
};
|
||||
this.onDismiss = (ev) => {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
this.dismiss();
|
||||
};
|
||||
this.onLifecycle = (modalEvent) => {
|
||||
const el = this.usersElement;
|
||||
const name = LIFECYCLE_MAP[modalEvent.type];
|
||||
if (el && name) {
|
||||
const ev = new CustomEvent(name, {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
detail: modalEvent.detail
|
||||
});
|
||||
el.dispatchEvent(ev);
|
||||
}
|
||||
};
|
||||
}
|
||||
swipeToCloseChanged(enable) {
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(enable);
|
||||
}
|
||||
else if (enable) {
|
||||
this.initSwipeToClose();
|
||||
}
|
||||
}
|
||||
connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["e"])(this.el);
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidDismiss", 7);
|
||||
// Whether or not modal is being dismissed via gesture
|
||||
this.gestureAnimationDismissing = false;
|
||||
this.presented = false;
|
||||
/**
|
||||
* Present the modal overlay after it has been created.
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
*/
|
||||
async present() {
|
||||
if (this.presented) {
|
||||
return;
|
||||
}
|
||||
const container = this.el.querySelector(`.modal-wrapper`);
|
||||
if (!container) {
|
||||
throw new Error('container is undefined');
|
||||
}
|
||||
const componentProps = Object.assign(Object.assign({}, this.componentProps), { modal: this.el });
|
||||
this.usersElement = await Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_11__["a"])(this.delegate, container, this.component, ['ion-page'], componentProps);
|
||||
await Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => this.el.classList.add('show-modal'));
|
||||
await Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["d"])(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, this.presentingElement);
|
||||
if (this.swipeToClose) {
|
||||
this.initSwipeToClose();
|
||||
}
|
||||
}
|
||||
initSwipeToClose() {
|
||||
if (Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) !== 'ios') {
|
||||
return;
|
||||
}
|
||||
// All of the elements needed for the swipe gesture
|
||||
// should be in the DOM and referenced by now, except
|
||||
// for the presenting el
|
||||
const animationBuilder = this.leaveAnimation || _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('modalLeave', iosLeaveAnimation);
|
||||
const ani = this.animation = animationBuilder(this.el, this.presentingElement);
|
||||
this.gesture = createSwipeToCloseGesture(this.el, ani, () => {
|
||||
/**
|
||||
* While the gesture animation is finishing
|
||||
* it is possible for a user to tap the backdrop.
|
||||
* This would result in the dismiss animation
|
||||
* being played again. Typically this is avoided
|
||||
* by setting `presented = false` on the overlay
|
||||
* component; however, we cannot do that here as
|
||||
* that would prevent the element from being
|
||||
* removed from the DOM.
|
||||
*/
|
||||
this.gestureAnimationDismissing = true;
|
||||
this.animation.onFinish(async () => {
|
||||
await this.dismiss(undefined, 'gesture');
|
||||
this.gestureAnimationDismissing = false;
|
||||
});
|
||||
this.keyboardClose = true;
|
||||
/**
|
||||
* If `true`, the modal will be dismissed when the backdrop is clicked.
|
||||
*/
|
||||
this.backdropDismiss = true;
|
||||
/**
|
||||
* If `true`, a backdrop will be displayed behind the modal.
|
||||
*/
|
||||
this.showBackdrop = true;
|
||||
/**
|
||||
* If `true`, the modal will animate.
|
||||
*/
|
||||
this.animated = true;
|
||||
/**
|
||||
* If `true`, the modal can be swiped to dismiss. Only applies in iOS mode.
|
||||
*/
|
||||
this.swipeToClose = false;
|
||||
this.onBackdropTap = () => {
|
||||
this.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["B"]);
|
||||
};
|
||||
this.onDismiss = (ev) => {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
this.dismiss();
|
||||
};
|
||||
this.onLifecycle = (modalEvent) => {
|
||||
const el = this.usersElement;
|
||||
const name = LIFECYCLE_MAP[modalEvent.type];
|
||||
if (el && name) {
|
||||
const ev = new CustomEvent(name, {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
detail: modalEvent.detail
|
||||
});
|
||||
this.gesture.enable(true);
|
||||
el.dispatchEvent(ev);
|
||||
}
|
||||
};
|
||||
}
|
||||
swipeToCloseChanged(enable) {
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(enable);
|
||||
}
|
||||
/**
|
||||
* Dismiss the modal 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 modal. For example, 'cancel' or 'backdrop'.
|
||||
*/
|
||||
async dismiss(data, role) {
|
||||
if (this.gestureAnimationDismissing && role !== 'gesture') {
|
||||
return false;
|
||||
}
|
||||
const enteringAnimation = _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["h"].get(this) || [];
|
||||
const dismissed = await Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["f"])(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, this.presentingElement);
|
||||
if (dismissed) {
|
||||
await Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_11__["d"])(this.delegate, this.usersElement);
|
||||
if (this.animation) {
|
||||
this.animation.destroy();
|
||||
}
|
||||
enteringAnimation.forEach(ani => ani.destroy());
|
||||
}
|
||||
this.animation = undefined;
|
||||
return dismissed;
|
||||
else if (enable) {
|
||||
this.initSwipeToClose();
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the modal did dismiss.
|
||||
*/
|
||||
onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalDidDismiss');
|
||||
}
|
||||
connectedCallback() {
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["e"])(this.el);
|
||||
}
|
||||
/**
|
||||
* Present the modal overlay after it has been created.
|
||||
*/
|
||||
async present() {
|
||||
if (this.presented) {
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the modal will dismiss.
|
||||
*/
|
||||
onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalWillDismiss');
|
||||
const container = this.el.querySelector(`.modal-wrapper`);
|
||||
if (!container) {
|
||||
throw new Error('container is undefined');
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { "no-router": true, "aria-modal": "true", tabindex: "-1", class: Object.assign({ [mode]: true, [`modal-card`]: this.presentingElement !== undefined && mode === 'ios' }, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_10__["g"])(this.cssClass)), style: {
|
||||
zIndex: `${20000 + this.overlayIndex}`,
|
||||
}, onIonBackdropTap: this.onBackdropTap, onIonDismiss: this.onDismiss, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", { visible: this.showBackdrop, tappable: this.backdropDismiss }), mode === 'ios' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "modal-shadow" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { role: "dialog", class: "modal-wrapper ion-overlay-wrapper" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" })));
|
||||
const componentProps = Object.assign(Object.assign({}, this.componentProps), { modal: this.el });
|
||||
this.usersElement = await Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_11__["a"])(this.delegate, container, this.component, ['ion-page'], componentProps);
|
||||
await Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => this.el.classList.add('show-modal'));
|
||||
await Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["d"])(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, this.presentingElement);
|
||||
if (this.swipeToClose) {
|
||||
this.initSwipeToClose();
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"swipeToClose": ["swipeToCloseChanged"]
|
||||
}; }
|
||||
}
|
||||
initSwipeToClose() {
|
||||
if (Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) !== 'ios') {
|
||||
return;
|
||||
}
|
||||
// All of the elements needed for the swipe gesture
|
||||
// should be in the DOM and referenced by now, except
|
||||
// for the presenting el
|
||||
const animationBuilder = this.leaveAnimation || _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('modalLeave', iosLeaveAnimation);
|
||||
const ani = this.animation = animationBuilder(this.el, this.presentingElement);
|
||||
this.gesture = createSwipeToCloseGesture(this.el, ani, () => {
|
||||
/**
|
||||
* While the gesture animation is finishing
|
||||
* it is possible for a user to tap the backdrop.
|
||||
* This would result in the dismiss animation
|
||||
* being played again. Typically this is avoided
|
||||
* by setting `presented = false` on the overlay
|
||||
* component; however, we cannot do that here as
|
||||
* that would prevent the element from being
|
||||
* removed from the DOM.
|
||||
*/
|
||||
this.gestureAnimationDismissing = true;
|
||||
this.animation.onFinish(async () => {
|
||||
await this.dismiss(undefined, 'gesture');
|
||||
this.gestureAnimationDismissing = false;
|
||||
});
|
||||
});
|
||||
this.gesture.enable(true);
|
||||
}
|
||||
/**
|
||||
* Dismiss the modal 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 modal. For example, 'cancel' or 'backdrop'.
|
||||
*/
|
||||
async dismiss(data, role) {
|
||||
if (this.gestureAnimationDismissing && role !== 'gesture') {
|
||||
return false;
|
||||
}
|
||||
const enteringAnimation = _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["h"].get(this) || [];
|
||||
const dismissed = await Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["f"])(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, this.presentingElement);
|
||||
if (dismissed) {
|
||||
await Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_11__["d"])(this.delegate, this.usersElement);
|
||||
if (this.animation) {
|
||||
this.animation.destroy();
|
||||
}
|
||||
enteringAnimation.forEach(ani => ani.destroy());
|
||||
}
|
||||
this.animation = undefined;
|
||||
return dismissed;
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the modal did dismiss.
|
||||
*/
|
||||
onDidDismiss() {
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the modal will dismiss.
|
||||
*/
|
||||
onWillDismiss() {
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalWillDismiss');
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { "no-router": true, "aria-modal": "true", tabindex: "-1", class: Object.assign({ [mode]: true, [`modal-card`]: this.presentingElement !== undefined && mode === 'ios' }, Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_10__["g"])(this.cssClass)), style: {
|
||||
zIndex: `${20000 + this.overlayIndex}`,
|
||||
}, onIonBackdropTap: this.onBackdropTap, onIonDismiss: this.onDismiss, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", { visible: this.showBackdrop, tappable: this.backdropDismiss }), mode === 'ios' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "modal-shadow" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { role: "dialog", class: "modal-wrapper ion-overlay-wrapper" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" })));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"swipeToClose": ["swipeToCloseChanged"]
|
||||
}; }
|
||||
};
|
||||
const LIFECYCLE_MAP = {
|
||||
'ionModalDidPresent': 'ionViewDidEnter',
|
||||
'ionModalWillPresent': 'ionViewWillEnter',
|
||||
'ionModalWillDismiss': 'ionViewWillLeave',
|
||||
'ionModalDidDismiss': 'ionViewDidLeave',
|
||||
'ionModalDidPresent': 'ionViewDidEnter',
|
||||
'ionModalWillPresent': 'ionViewWillEnter',
|
||||
'ionModalWillDismiss': 'ionViewWillLeave',
|
||||
'ionModalDidDismiss': 'ionViewDidLeave',
|
||||
};
|
||||
Modal.style = {
|
||||
ios: modalIosCss,
|
||||
md: modalMdCss
|
||||
ios: modalIosCss,
|
||||
md: modalMdCss
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,75 +33,75 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-a635a2fc.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-54fe0237.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./index-37b50f53.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-37b50f53.js");
|
||||
var _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./index-d8cfb4a8.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-d8cfb4a8.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-685f606a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-685f606a.js");
|
||||
var _cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-eea9a7a9.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-eea9a7a9.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _gesture_controller_89173521_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./gesture-controller-89173521.js */
|
||||
"./node_modules/@ionic/core/dist/esm/gesture-controller-89173521.js");
|
||||
var _gesture_controller_31cb6bb9_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./gesture-controller-31cb6bb9.js */
|
||||
"./node_modules/@ionic/core/dist/esm/gesture-controller-31cb6bb9.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_eea61379_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js");
|
||||
var _index_f49d994d_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-7b6ede21.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-4a6b37fb.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
||||
/*! ./overlays-7c699579.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
||||
/*! ./overlays-12c20431.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
||||
/*! ./framework-delegate-d1eb6504.js */
|
||||
"./node_modules/@ionic/core/dist/esm/framework-delegate-d1eb6504.js"); // Defaults for the card swipe animation
|
||||
var _framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
||||
/*! ./framework-delegate-4584ab5a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/framework-delegate-4584ab5a.js"); // Defaults for the card swipe animation
|
||||
|
||||
|
||||
var SwipeToCloseDefaults = {
|
||||
@@ -136,23 +136,23 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
};
|
||||
|
||||
var onMove = function onMove(detail) {
|
||||
var step = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
var step = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
animation.progressStep(step);
|
||||
};
|
||||
|
||||
var onEnd = function onEnd(detail) {
|
||||
var velocity = detail.velocityY;
|
||||
var step = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
var step = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0.0001, detail.deltaY / height, 0.9999);
|
||||
var threshold = (detail.deltaY + velocity * 1000) / height;
|
||||
var shouldComplete = threshold >= 0.5;
|
||||
var newStepValue = shouldComplete ? -0.001 : 0.001;
|
||||
|
||||
if (!shouldComplete) {
|
||||
animation.easing('cubic-bezier(1, 0, 0.68, 0.28)');
|
||||
newStepValue += Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];
|
||||
newStepValue += Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];
|
||||
} else {
|
||||
animation.easing('cubic-bezier(0.32, 0.72, 0, 1)');
|
||||
newStepValue += Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];
|
||||
newStepValue += Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_5__["g"])([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];
|
||||
}
|
||||
|
||||
var duration = shouldComplete ? computeDuration(step * height, velocity) : computeDuration((1 - step) * height, velocity);
|
||||
@@ -169,7 +169,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
};
|
||||
|
||||
var gesture = Object(_index_eea61379_js__WEBPACK_IMPORTED_MODULE_7__["createGesture"])({
|
||||
var gesture = Object(_index_f49d994d_js__WEBPACK_IMPORTED_MODULE_7__["createGesture"])({
|
||||
el: el,
|
||||
gestureName: 'modalSwipeToClose',
|
||||
gesturePriority: 40,
|
||||
@@ -184,7 +184,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
};
|
||||
|
||||
var computeDuration = function computeDuration(remaining, velocity) {
|
||||
return Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(400, remaining / Math.abs(velocity * 1.1), 500);
|
||||
return Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(400, remaining / Math.abs(velocity * 1.1), 500);
|
||||
};
|
||||
/**
|
||||
* iOS Modal Enter Animation for the Card presentation style
|
||||
@@ -192,18 +192,18 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var iosEnterAnimation = function iosEnterAnimation(baseEl, presentingEl) {
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
var backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({
|
||||
var wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({
|
||||
'opacity': 1
|
||||
}).fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl).easing('cubic-bezier(0.32,0.72,0,1)').duration(500).addAnimation(wrapperAnimation);
|
||||
var baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl).easing('cubic-bezier(0.32,0.72,0,1)').duration(500).addAnimation(wrapperAnimation);
|
||||
|
||||
if (presentingEl) {
|
||||
var isMobile = window.innerWidth < 768;
|
||||
var hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
||||
var presentingAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().beforeStyles({
|
||||
var presentingAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().beforeStyles({
|
||||
'transform': 'translateY(0)',
|
||||
'transform-origin': 'top center',
|
||||
'overflow': 'hidden'
|
||||
@@ -257,7 +257,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
filter: 'contrast(0.85)',
|
||||
transform: _finalTransform
|
||||
}]);
|
||||
var shadowAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().afterStyles({
|
||||
var shadowAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().afterStyles({
|
||||
'transform': _finalTransform
|
||||
}).addElement(presentingEl.querySelector('.modal-shadow')).keyframes([{
|
||||
offset: 0,
|
||||
@@ -284,16 +284,16 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
var iosLeaveAnimation = function iosLeaveAnimation(baseEl, presentingEl) {
|
||||
var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 500;
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0.0);
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({
|
||||
var backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0.0);
|
||||
var wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({
|
||||
'opacity': 1
|
||||
}).fromTo('transform', 'translateY(0vh)', 'translateY(100vh)');
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl).easing('cubic-bezier(0.32,0.72,0,1)').duration(duration).addAnimation(wrapperAnimation);
|
||||
var baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(baseEl).easing('cubic-bezier(0.32,0.72,0,1)').duration(duration).addAnimation(wrapperAnimation);
|
||||
|
||||
if (presentingEl) {
|
||||
var isMobile = window.innerWidth < 768;
|
||||
var hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
||||
var presentingAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().beforeClearStyles(['transform']).afterClearStyles(['transform']).onFinish(function (currentStep) {
|
||||
var presentingAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().beforeClearStyles(['transform']).afterClearStyles(['transform']).onFinish(function (currentStep) {
|
||||
// only reset background color if this is the last card-style modal
|
||||
if (currentStep !== 1) {
|
||||
return;
|
||||
@@ -348,7 +348,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
filter: 'contrast(1)',
|
||||
transform: 'translateY(0) scale(1)'
|
||||
}]);
|
||||
var shadowAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(presentingEl.querySelector('.modal-shadow')).afterStyles({
|
||||
var shadowAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(presentingEl.querySelector('.modal-shadow')).afterStyles({
|
||||
'transform': 'translateY(0) scale(1)'
|
||||
}).keyframes([{
|
||||
offset: 0,
|
||||
@@ -374,9 +374,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var mdEnterAnimation = function mdEnterAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -397,9 +397,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var mdLeaveAnimation = function mdLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
var wrapperEl = baseEl.querySelector('.modal-wrapper');
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0.0);
|
||||
wrapperAnimation.addElement(wrapperEl).keyframes([{
|
||||
@@ -423,11 +423,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Modal);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidDismiss", 7); // Whether or not modal is being dismissed via gesture
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionModalDidDismiss", 7); // Whether or not modal is being dismissed via gesture
|
||||
|
||||
this.gestureAnimationDismissing = false;
|
||||
this.presented = false;
|
||||
@@ -458,7 +458,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.swipeToClose = false;
|
||||
|
||||
this.onBackdropTap = function () {
|
||||
_this.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["B"]);
|
||||
_this.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["B"]);
|
||||
};
|
||||
|
||||
this.onDismiss = function (ev) {
|
||||
@@ -495,7 +495,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "connectedCallback",
|
||||
value: function connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["e"])(this.el);
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["e"])(this.el);
|
||||
}
|
||||
/**
|
||||
* Present the modal overlay after it has been created.
|
||||
@@ -534,19 +534,19 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
modal: this.el
|
||||
});
|
||||
_context.next = 8;
|
||||
return Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_11__["a"])(this.delegate, container, this.component, ['ion-page'], componentProps);
|
||||
return Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_11__["a"])(this.delegate, container, this.component, ['ion-page'], componentProps);
|
||||
|
||||
case 8:
|
||||
this.usersElement = _context.sent;
|
||||
_context.next = 11;
|
||||
return Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
return Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
|
||||
case 11:
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
return _this2.el.classList.add('show-modal');
|
||||
});
|
||||
_context.next = 14;
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["d"])(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, this.presentingElement);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["d"])(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, this.presentingElement);
|
||||
|
||||
case 14:
|
||||
if (this.swipeToClose) {
|
||||
@@ -572,14 +572,14 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function initSwipeToClose() {
|
||||
var _this3 = this;
|
||||
|
||||
if (Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) !== 'ios') {
|
||||
if (Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) !== 'ios') {
|
||||
return;
|
||||
} // All of the elements needed for the swipe gesture
|
||||
// should be in the DOM and referenced by now, except
|
||||
// for the presenting el
|
||||
|
||||
|
||||
var animationBuilder = this.leaveAnimation || _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('modalLeave', iosLeaveAnimation);
|
||||
var animationBuilder = this.leaveAnimation || _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('modalLeave', iosLeaveAnimation);
|
||||
|
||||
var ani = this.animation = animationBuilder(this.el, this.presentingElement);
|
||||
this.gesture = createSwipeToCloseGesture(this.el, ani, function () {
|
||||
@@ -640,9 +640,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return _context3.abrupt("return", false);
|
||||
|
||||
case 2:
|
||||
enteringAnimation = _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["h"].get(this) || [];
|
||||
enteringAnimation = _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["h"].get(this) || [];
|
||||
_context3.next = 5;
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["f"])(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, this.presentingElement);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["f"])(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, this.presentingElement);
|
||||
|
||||
case 5:
|
||||
dismissed = _context3.sent;
|
||||
@@ -653,7 +653,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
_context3.next = 9;
|
||||
return Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_11__["d"])(this.delegate, this.usersElement);
|
||||
return Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_11__["d"])(this.delegate, this.usersElement);
|
||||
|
||||
case 9:
|
||||
if (this.animation) {
|
||||
@@ -689,7 +689,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onDidDismiss",
|
||||
value: function onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalDidDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the modal will dismiss.
|
||||
@@ -698,19 +698,19 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onWillDismiss",
|
||||
value: function onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalWillDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_9__["g"])(this.el, 'ionModalWillDismiss');
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object$assign;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"no-router": true,
|
||||
"aria-modal": "true",
|
||||
tabindex: "-1",
|
||||
"class": Object.assign((_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, "modal-card", this.presentingElement !== undefined && mode === 'ios'), _Object$assign), Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_10__["g"])(this.cssClass)),
|
||||
"class": Object.assign((_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, "modal-card", this.presentingElement !== undefined && mode === 'ios'), _Object$assign), Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_10__["g"])(this.cssClass)),
|
||||
style: {
|
||||
zIndex: "".concat(20000 + this.overlayIndex)
|
||||
},
|
||||
@@ -720,24 +720,24 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
onIonModalWillPresent: this.onLifecycle,
|
||||
onIonModalWillDismiss: this.onLifecycle,
|
||||
onIonModalDidDismiss: this.onLifecycle
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
visible: this.showBackdrop,
|
||||
tappable: this.backdropDismiss
|
||||
}), mode === 'ios' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), mode === 'ios' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "modal-shadow"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
role: "dialog",
|
||||
"class": "modal-wrapper ion-overlay-wrapper"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -43,39 +43,39 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./index-37b50f53.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-37b50f53.js");
|
||||
var _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./index-d8cfb4a8.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-d8cfb4a8.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-685f606a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-685f606a.js");
|
||||
var _cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-eea9a7a9.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-eea9a7a9.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./framework-delegate-d1eb6504.js */
|
||||
"./node_modules/@ionic/core/dist/esm/framework-delegate-d1eb6504.js");
|
||||
var _framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./framework-delegate-4584ab5a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/framework-delegate-4584ab5a.js");
|
||||
|
||||
var VIEW_STATE_NEW = 1;
|
||||
var VIEW_STATE_ATTACHED = 2;
|
||||
@@ -108,7 +108,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
component = this.component;
|
||||
_context.next = 5;
|
||||
return Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_5__["a"])(this.delegate, container, component, ['ion-page', 'ion-page-invisible'], this.params);
|
||||
return Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_5__["a"])(this.delegate, container, component, ['ion-page', 'ion-page-invisible'], this.params);
|
||||
|
||||
case 5:
|
||||
this.element = _context.sent;
|
||||
@@ -134,7 +134,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "_destroy",
|
||||
value: function _destroy() {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(this.state !== VIEW_STATE_DESTROYED, 'view state must be ATTACHED');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(this.state !== VIEW_STATE_DESTROYED, 'view state must be ATTACHED');
|
||||
var element = this.element;
|
||||
|
||||
if (element) {
|
||||
@@ -236,10 +236,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Nav(hostRef) {
|
||||
_classCallCheck(this, Nav);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionNavWillLoad = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionNavWillLoad", 7);
|
||||
this.ionNavWillChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionNavWillChange", 3);
|
||||
this.ionNavDidChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionNavDidChange", 3);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionNavWillLoad = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionNavWillLoad", 7);
|
||||
this.ionNavWillChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionNavWillChange", 3);
|
||||
this.ionNavDidChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionNavDidChange", 3);
|
||||
this.transInstr = [];
|
||||
this.animationEnabled = true;
|
||||
this.useRouter = false;
|
||||
@@ -275,8 +275,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.useRouter = !!document.querySelector('ion-router') && !this.el.closest('[no-router]');
|
||||
|
||||
if (this.swipeGesture === undefined) {
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.swipeGesture = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].getBoolean('swipeBackEnabled', mode === 'ios');
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
this.swipeGesture = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].getBoolean('swipeBackEnabled', mode === 'ios');
|
||||
}
|
||||
|
||||
this.ionNavWillLoad.emit();
|
||||
@@ -292,10 +292,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.rootChanged();
|
||||
_context2.next = 3;
|
||||
return __webpack_require__.e(
|
||||
/*! import() | swipe-back-0a6a44c8-js */
|
||||
"swipe-back-0a6a44c8-js").then(__webpack_require__.bind(null,
|
||||
/*! ./swipe-back-0a6a44c8.js */
|
||||
"./node_modules/@ionic/core/dist/esm/swipe-back-0a6a44c8.js"));
|
||||
/*! import() | swipe-back-2154c9a7-js */
|
||||
"swipe-back-2154c9a7-js").then(__webpack_require__.bind(null,
|
||||
/*! ./swipe-back-2154c9a7.js */
|
||||
"./node_modules/@ionic/core/dist/esm/swipe-back-2154c9a7.js"));
|
||||
|
||||
case 3:
|
||||
this.gesture = _context2.sent.createSwipeBackGesture(this.el, this.canStart.bind(this), this.onStart.bind(this), this.onMove.bind(this), this.onEnd.bind(this));
|
||||
@@ -316,15 +316,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return componentDidLoad;
|
||||
}()
|
||||
}, {
|
||||
key: "componentDidUnload",
|
||||
value: function componentDidUnload() {
|
||||
key: "disconnectedCallback",
|
||||
value: function disconnectedCallback() {
|
||||
var _iterator = _createForOfIteratorHelper(this.views),
|
||||
_step;
|
||||
|
||||
try {
|
||||
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||
var view = _step.value;
|
||||
Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["l"])(view.element, _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["d"]);
|
||||
Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["l"])(view.element, _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["d"]);
|
||||
|
||||
view._destroy();
|
||||
}
|
||||
@@ -1008,8 +1008,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
if (ti.removeView !== undefined) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(ti.removeStart !== undefined, 'removeView needs removeStart');
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(ti.removeCount !== undefined, 'removeView needs removeCount');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(ti.removeStart !== undefined, 'removeView needs removeStart');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(ti.removeCount !== undefined, 'removeView needs removeCount');
|
||||
var index = this.views.indexOf(ti.removeView);
|
||||
|
||||
if (index < 0) {
|
||||
@@ -1047,7 +1047,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return;
|
||||
}
|
||||
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(insertViews.length > 0, 'length can not be zero');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(insertViews.length > 0, 'length can not be zero');
|
||||
var viewControllers = convertToViews(insertViews);
|
||||
|
||||
if (viewControllers.length === 0) {
|
||||
@@ -1111,9 +1111,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "postViewInit",
|
||||
value: function postViewInit(enteringView, leavingView, ti) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(leavingView || enteringView, 'Both leavingView and enteringView are null');
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(ti.resolve, 'resolve must be valid');
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(ti.reject, 'reject must be valid');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(leavingView || enteringView, 'Both leavingView and enteringView are null');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(ti.resolve, 'resolve must be valid');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(ti.reject, 'reject must be valid');
|
||||
var opts = ti.opts;
|
||||
var insertViews = ti.insertViews;
|
||||
var removeStart = ti.removeStart;
|
||||
@@ -1121,8 +1121,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var destroyQueue; // there are views to remove
|
||||
|
||||
if (removeStart !== undefined && removeCount !== undefined) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(removeStart >= 0, 'removeStart can not be negative');
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(removeCount >= 0, 'removeCount can not be negative');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(removeStart >= 0, 'removeStart can not be negative');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(removeCount >= 0, 'removeCount can not be negative');
|
||||
destroyQueue = [];
|
||||
|
||||
for (var i = 0; i < removeCount; i++) {
|
||||
@@ -1138,7 +1138,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
var finalBalance = this.views.length + (insertViews !== undefined ? insertViews.length : 0) - (removeCount !== undefined ? removeCount : 0);
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(finalBalance >= 0, 'final balance can not be negative');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(finalBalance >= 0, 'final balance can not be negative');
|
||||
|
||||
if (finalBalance === 0) {
|
||||
console.warn("You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.", this, this.el);
|
||||
@@ -1184,9 +1184,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
try {
|
||||
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
||||
var _view2 = _step4.value;
|
||||
Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["l"])(_view2.element, _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["b"]);
|
||||
Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["l"])(_view2.element, _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["c"]);
|
||||
Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["l"])(_view2.element, _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["d"]);
|
||||
Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["l"])(_view2.element, _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["b"]);
|
||||
Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["l"])(_view2.element, _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["c"]);
|
||||
Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["l"])(_view2.element, _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["d"]);
|
||||
} // once all lifecycle events has been delivered, we can safely detroy the views
|
||||
|
||||
} catch (err) {
|
||||
@@ -1228,21 +1228,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
progressCallback = opts.progressAnimation ? function (ani) {
|
||||
return _this.sbAni = ani;
|
||||
} : undefined;
|
||||
mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
enteringEl = enteringView.element;
|
||||
leavingEl = leavingView && leavingView.element;
|
||||
animationOpts = Object.assign({
|
||||
mode: mode,
|
||||
showGoBack: this.canGoBackSync(enteringView),
|
||||
baseEl: this.el,
|
||||
animationBuilder: this.animation || opts.animationBuilder || _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('navAnimation'),
|
||||
animationBuilder: this.animation || opts.animationBuilder || _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('navAnimation'),
|
||||
progressCallback: progressCallback,
|
||||
animated: this.animated && _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].getBoolean('animated', true),
|
||||
animated: this.animated && _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].getBoolean('animated', true),
|
||||
enteringEl: enteringEl,
|
||||
leavingEl: leavingEl
|
||||
}, opts);
|
||||
_context7.next = 8;
|
||||
return Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["t"])(animationOpts);
|
||||
return Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["t"])(animationOpts);
|
||||
|
||||
case 8:
|
||||
_yield$Object = _context7.sent;
|
||||
@@ -1289,10 +1289,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
if (existingIndex > -1) {
|
||||
// this view is already in the stack!!
|
||||
// move it to its new location
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(view.nav === this, 'view is not part of the nav');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(view.nav === this, 'view is not part of the nav');
|
||||
views.splice(index, 0, views.splice(existingIndex, 1)[0]);
|
||||
} else {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(!view.nav, 'nav is used'); // this is a new view to add to the stack
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(!view.nav, 'nav is used'); // this is a new view to add to the stack
|
||||
// create the new entering view
|
||||
|
||||
view.nav = this; // insert the entering view into the correct index in the stack
|
||||
@@ -1303,10 +1303,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "removeView",
|
||||
value: function removeView(view) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(view.state === VIEW_STATE_ATTACHED || view.state === VIEW_STATE_DESTROYED, 'view state should be loaded or destroyed');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(view.state === VIEW_STATE_ATTACHED || view.state === VIEW_STATE_DESTROYED, 'view state should be loaded or destroyed');
|
||||
var views = this.views;
|
||||
var index = views.indexOf(view);
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["b"])(index > -1, 'view must be part of the stack');
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["k"])(index > -1, 'view must be part of the stack');
|
||||
|
||||
if (index >= 0) {
|
||||
views.splice(index, 1);
|
||||
@@ -1353,12 +1353,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
if (i > activeViewIndex) {
|
||||
// this view comes after the active view
|
||||
// let's unload it
|
||||
Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["l"])(element, _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["d"]);
|
||||
Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["l"])(element, _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["d"]);
|
||||
this.destroyView(view);
|
||||
} else if (i < activeViewIndex) {
|
||||
// this view comes before the active view
|
||||
// and it is not a portal then ensure it is hidden
|
||||
Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_3__["s"])(element, true);
|
||||
Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_3__["s"])(element, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1412,9 +1412,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
if (!shouldComplete) {
|
||||
this.sbAni.easing('cubic-bezier(1, 0, 0.68, 0.28)');
|
||||
newStepValue += Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [1, 0], [0.68, 0.28], [1, 1], stepValue)[0];
|
||||
newStepValue += Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [1, 0], [0.68, 0.28], [1, 1], stepValue)[0];
|
||||
} else {
|
||||
newStepValue += Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [0.32, 0.72], [0, 1], [1, 1], stepValue)[0];
|
||||
newStepValue += Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [0.32, 0.72], [0, 1], [1, 1], stepValue)[0];
|
||||
}
|
||||
|
||||
this.sbAni.progressEnd(shouldComplete ? 1 : 0, newStepValue, dur);
|
||||
@@ -1423,12 +1423,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null);
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
@@ -1480,7 +1480,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, NavLink);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* The transition direction when navigating to another page.
|
||||
*/
|
||||
@@ -1495,14 +1495,14 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(NavLink, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onClick: this.onClick
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,15 +10,15 @@
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_popover", function() { return Popover; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-5c745fbd.js */ "./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
/* harmony import */ var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./animation-a635a2fc.js */ "./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
/* harmony import */ var _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-37b50f53.js */ "./node_modules/@ionic/core/dist/esm/index-37b50f53.js");
|
||||
/* harmony import */ var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hardware-back-button-7b6ede21.js */ "./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
/* harmony import */ var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./overlays-7c699579.js */ "./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
/* harmony import */ var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-3f0b0c04.js */ "./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
/* harmony import */ var _framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./framework-delegate-d1eb6504.js */ "./node_modules/@ionic/core/dist/esm/framework-delegate-d1eb6504.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-90f46169.js */ "./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */ var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./animation-54fe0237.js */ "./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */ var _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-d8cfb4a8.js */ "./node_modules/@ionic/core/dist/esm/index-d8cfb4a8.js");
|
||||
/* harmony import */ var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hardware-back-button-4a6b37fb.js */ "./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */ var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./overlays-12c20431.js */ "./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */ var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-ff3fc52f.js */ "./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
/* harmony import */ var _framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./framework-delegate-4584ab5a.js */ "./node_modules/@ionic/core/dist/esm/framework-delegate-4584ab5a.js");
|
||||
|
||||
|
||||
|
||||
@@ -33,98 +33,98 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* iOS Popover Enter Animation
|
||||
*/
|
||||
const iosEnterAnimation = (baseEl, ev) => {
|
||||
let originY = 'top';
|
||||
let originX = 'left';
|
||||
const contentEl = baseEl.querySelector('.popover-content');
|
||||
const contentDimentions = contentEl.getBoundingClientRect();
|
||||
const contentWidth = contentDimentions.width;
|
||||
const contentHeight = contentDimentions.height;
|
||||
const bodyWidth = baseEl.ownerDocument.defaultView.innerWidth;
|
||||
const bodyHeight = baseEl.ownerDocument.defaultView.innerHeight;
|
||||
// If ev was passed, use that for target element
|
||||
const targetDim = ev && ev.target && ev.target.getBoundingClientRect();
|
||||
const targetTop = targetDim != null && 'top' in targetDim ? targetDim.top : bodyHeight / 2 - contentHeight / 2;
|
||||
const targetLeft = targetDim != null && 'left' in targetDim ? targetDim.left : bodyWidth / 2;
|
||||
const targetWidth = (targetDim && targetDim.width) || 0;
|
||||
const targetHeight = (targetDim && targetDim.height) || 0;
|
||||
const arrowEl = baseEl.querySelector('.popover-arrow');
|
||||
const arrowDim = arrowEl.getBoundingClientRect();
|
||||
const arrowWidth = arrowDim.width;
|
||||
const arrowHeight = arrowDim.height;
|
||||
if (targetDim == null) {
|
||||
arrowEl.style.display = 'none';
|
||||
}
|
||||
const arrowCSS = {
|
||||
top: targetTop + targetHeight,
|
||||
left: targetLeft + targetWidth / 2 - arrowWidth / 2
|
||||
};
|
||||
const popoverCSS = {
|
||||
top: targetTop + targetHeight + (arrowHeight - 1),
|
||||
left: targetLeft + targetWidth / 2 - contentWidth / 2
|
||||
};
|
||||
// If the popover left is less than the padding it is off screen
|
||||
// to the left so adjust it, else if the width of the popover
|
||||
// exceeds the body width it is off screen to the right so adjust
|
||||
//
|
||||
let checkSafeAreaLeft = false;
|
||||
let checkSafeAreaRight = false;
|
||||
// If the popover left is less than the padding it is off screen
|
||||
// to the left so adjust it, else if the width of the popover
|
||||
// exceeds the body width it is off screen to the right so adjust
|
||||
// 25 is a random/arbitrary number. It seems to work fine for ios11
|
||||
// and iPhoneX. Is it perfect? No. Does it work? Yes.
|
||||
if (popoverCSS.left < POPOVER_IOS_BODY_PADDING + 25) {
|
||||
checkSafeAreaLeft = true;
|
||||
popoverCSS.left = POPOVER_IOS_BODY_PADDING;
|
||||
}
|
||||
else if (contentWidth + POPOVER_IOS_BODY_PADDING + popoverCSS.left + 25 > bodyWidth) {
|
||||
// Ok, so we're on the right side of the screen,
|
||||
// but now we need to make sure we're still a bit further right
|
||||
// cus....notchurally... Again, 25 is random. It works tho
|
||||
checkSafeAreaRight = true;
|
||||
popoverCSS.left = bodyWidth - contentWidth - POPOVER_IOS_BODY_PADDING;
|
||||
originX = 'right';
|
||||
}
|
||||
// make it pop up if there's room above
|
||||
if (targetTop + targetHeight + contentHeight > bodyHeight && targetTop - contentHeight > 0) {
|
||||
arrowCSS.top = targetTop - (arrowHeight + 1);
|
||||
popoverCSS.top = targetTop - contentHeight - (arrowHeight - 1);
|
||||
baseEl.className = baseEl.className + ' popover-bottom';
|
||||
originY = 'bottom';
|
||||
// If there isn't room for it to pop up above the target cut it off
|
||||
}
|
||||
else if (targetTop + targetHeight + contentHeight > bodyHeight) {
|
||||
contentEl.style.bottom = POPOVER_IOS_BODY_PADDING + '%';
|
||||
}
|
||||
arrowEl.style.top = arrowCSS.top + 'px';
|
||||
arrowEl.style.left = arrowCSS.left + 'px';
|
||||
contentEl.style.top = popoverCSS.top + 'px';
|
||||
contentEl.style.left = popoverCSS.left + 'px';
|
||||
if (checkSafeAreaLeft) {
|
||||
contentEl.style.left = `calc(${popoverCSS.left}px + var(--ion-safe-area-left, 0px))`;
|
||||
}
|
||||
if (checkSafeAreaRight) {
|
||||
contentEl.style.left = `calc(${popoverCSS.left}px - var(--ion-safe-area-right, 0px))`;
|
||||
}
|
||||
contentEl.style.transformOrigin = originY + ' ' + originX;
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.01, 1);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease')
|
||||
.duration(100)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
let originY = 'top';
|
||||
let originX = 'left';
|
||||
const contentEl = baseEl.querySelector('.popover-content');
|
||||
const contentDimentions = contentEl.getBoundingClientRect();
|
||||
const contentWidth = contentDimentions.width;
|
||||
const contentHeight = contentDimentions.height;
|
||||
const bodyWidth = baseEl.ownerDocument.defaultView.innerWidth;
|
||||
const bodyHeight = baseEl.ownerDocument.defaultView.innerHeight;
|
||||
// If ev was passed, use that for target element
|
||||
const targetDim = ev && ev.target && ev.target.getBoundingClientRect();
|
||||
const targetTop = targetDim != null && 'top' in targetDim ? targetDim.top : bodyHeight / 2 - contentHeight / 2;
|
||||
const targetLeft = targetDim != null && 'left' in targetDim ? targetDim.left : bodyWidth / 2;
|
||||
const targetWidth = (targetDim && targetDim.width) || 0;
|
||||
const targetHeight = (targetDim && targetDim.height) || 0;
|
||||
const arrowEl = baseEl.querySelector('.popover-arrow');
|
||||
const arrowDim = arrowEl.getBoundingClientRect();
|
||||
const arrowWidth = arrowDim.width;
|
||||
const arrowHeight = arrowDim.height;
|
||||
if (targetDim == null) {
|
||||
arrowEl.style.display = 'none';
|
||||
}
|
||||
const arrowCSS = {
|
||||
top: targetTop + targetHeight,
|
||||
left: targetLeft + targetWidth / 2 - arrowWidth / 2
|
||||
};
|
||||
const popoverCSS = {
|
||||
top: targetTop + targetHeight + (arrowHeight - 1),
|
||||
left: targetLeft + targetWidth / 2 - contentWidth / 2
|
||||
};
|
||||
// If the popover left is less than the padding it is off screen
|
||||
// to the left so adjust it, else if the width of the popover
|
||||
// exceeds the body width it is off screen to the right so adjust
|
||||
//
|
||||
let checkSafeAreaLeft = false;
|
||||
let checkSafeAreaRight = false;
|
||||
// If the popover left is less than the padding it is off screen
|
||||
// to the left so adjust it, else if the width of the popover
|
||||
// exceeds the body width it is off screen to the right so adjust
|
||||
// 25 is a random/arbitrary number. It seems to work fine for ios11
|
||||
// and iPhoneX. Is it perfect? No. Does it work? Yes.
|
||||
if (popoverCSS.left < POPOVER_IOS_BODY_PADDING + 25) {
|
||||
checkSafeAreaLeft = true;
|
||||
popoverCSS.left = POPOVER_IOS_BODY_PADDING;
|
||||
}
|
||||
else if (contentWidth + POPOVER_IOS_BODY_PADDING + popoverCSS.left + 25 > bodyWidth) {
|
||||
// Ok, so we're on the right side of the screen,
|
||||
// but now we need to make sure we're still a bit further right
|
||||
// cus....notchurally... Again, 25 is random. It works tho
|
||||
checkSafeAreaRight = true;
|
||||
popoverCSS.left = bodyWidth - contentWidth - POPOVER_IOS_BODY_PADDING;
|
||||
originX = 'right';
|
||||
}
|
||||
// make it pop up if there's room above
|
||||
if (targetTop + targetHeight + contentHeight > bodyHeight && targetTop - contentHeight > 0) {
|
||||
arrowCSS.top = targetTop - (arrowHeight + 1);
|
||||
popoverCSS.top = targetTop - contentHeight - (arrowHeight - 1);
|
||||
baseEl.className = baseEl.className + ' popover-bottom';
|
||||
originY = 'bottom';
|
||||
// If there isn't room for it to pop up above the target cut it off
|
||||
}
|
||||
else if (targetTop + targetHeight + contentHeight > bodyHeight) {
|
||||
contentEl.style.bottom = POPOVER_IOS_BODY_PADDING + '%';
|
||||
}
|
||||
arrowEl.style.top = arrowCSS.top + 'px';
|
||||
arrowEl.style.left = arrowCSS.left + 'px';
|
||||
contentEl.style.top = popoverCSS.top + 'px';
|
||||
contentEl.style.left = popoverCSS.left + 'px';
|
||||
if (checkSafeAreaLeft) {
|
||||
contentEl.style.left = `calc(${popoverCSS.left}px + var(--ion-safe-area-left, 0px))`;
|
||||
}
|
||||
if (checkSafeAreaRight) {
|
||||
contentEl.style.left = `calc(${popoverCSS.left}px - var(--ion-safe-area-right, 0px))`;
|
||||
}
|
||||
contentEl.style.transformOrigin = originY + ' ' + originX;
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.01, 1);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease')
|
||||
.duration(100)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
};
|
||||
const POPOVER_IOS_BODY_PADDING = 5;
|
||||
|
||||
@@ -132,132 +132,132 @@ const POPOVER_IOS_BODY_PADDING = 5;
|
||||
* iOS Popover Leave Animation
|
||||
*/
|
||||
const iosLeaveAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.99, 0);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.99, 0);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Md Popover Enter Animation
|
||||
*/
|
||||
const mdEnterAnimation = (baseEl, ev) => {
|
||||
const POPOVER_MD_BODY_PADDING = 12;
|
||||
const doc = baseEl.ownerDocument;
|
||||
const isRTL = doc.dir === 'rtl';
|
||||
let originY = 'top';
|
||||
let originX = isRTL ? 'right' : 'left';
|
||||
const contentEl = baseEl.querySelector('.popover-content');
|
||||
const contentDimentions = contentEl.getBoundingClientRect();
|
||||
const contentWidth = contentDimentions.width;
|
||||
const contentHeight = contentDimentions.height;
|
||||
const bodyWidth = doc.defaultView.innerWidth;
|
||||
const bodyHeight = doc.defaultView.innerHeight;
|
||||
// If ev was passed, use that for target element
|
||||
const targetDim = ev && ev.target && ev.target.getBoundingClientRect();
|
||||
// As per MD spec, by default position the popover below the target (trigger) element
|
||||
const targetTop = targetDim != null && 'bottom' in targetDim
|
||||
? targetDim.bottom
|
||||
: bodyHeight / 2 - contentHeight / 2;
|
||||
const targetLeft = targetDim != null && 'left' in targetDim
|
||||
? isRTL
|
||||
? targetDim.left - contentWidth + targetDim.width
|
||||
: targetDim.left
|
||||
: bodyWidth / 2 - contentWidth / 2;
|
||||
const targetHeight = (targetDim && targetDim.height) || 0;
|
||||
const popoverCSS = {
|
||||
top: targetTop,
|
||||
left: targetLeft
|
||||
};
|
||||
// If the popover left is less than the padding it is off screen
|
||||
// to the left so adjust it, else if the width of the popover
|
||||
// exceeds the body width it is off screen to the right so adjust
|
||||
if (popoverCSS.left < POPOVER_MD_BODY_PADDING) {
|
||||
popoverCSS.left = POPOVER_MD_BODY_PADDING;
|
||||
// Same origin in this case for both LTR & RTL
|
||||
// Note: in LTR, originX is already 'left'
|
||||
originX = 'left';
|
||||
}
|
||||
else if (contentWidth + POPOVER_MD_BODY_PADDING + popoverCSS.left >
|
||||
bodyWidth) {
|
||||
popoverCSS.left = bodyWidth - contentWidth - POPOVER_MD_BODY_PADDING;
|
||||
// Same origin in this case for both LTR & RTL
|
||||
// Note: in RTL, originX is already 'right'
|
||||
originX = 'right';
|
||||
}
|
||||
// If the popover when popped down stretches past bottom of screen,
|
||||
// make it pop up if there's room above
|
||||
if (targetTop + targetHeight + contentHeight > bodyHeight &&
|
||||
targetTop - contentHeight > 0) {
|
||||
popoverCSS.top = targetTop - contentHeight - targetHeight;
|
||||
baseEl.className = baseEl.className + ' popover-bottom';
|
||||
originY = 'bottom';
|
||||
// If there isn't room for it to pop up above the target cut it off
|
||||
}
|
||||
else if (targetTop + targetHeight + contentHeight > bodyHeight) {
|
||||
contentEl.style.bottom = POPOVER_MD_BODY_PADDING + 'px';
|
||||
}
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const contentAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const viewportAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.01, 1);
|
||||
contentAnimation
|
||||
.addElement(contentEl)
|
||||
.beforeStyles({
|
||||
'top': `${popoverCSS.top}px`,
|
||||
'left': `${popoverCSS.left}px`,
|
||||
'transform-origin': `${originY} ${originX}`
|
||||
})
|
||||
.fromTo('transform', 'scale(0.001)', 'scale(1)');
|
||||
viewportAnimation
|
||||
.addElement(baseEl.querySelector('.popover-viewport'))
|
||||
.fromTo('opacity', 0.01, 1);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.36,0.66,0.04,1)')
|
||||
.duration(300)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation, contentAnimation, viewportAnimation]);
|
||||
const POPOVER_MD_BODY_PADDING = 12;
|
||||
const doc = baseEl.ownerDocument;
|
||||
const isRTL = doc.dir === 'rtl';
|
||||
let originY = 'top';
|
||||
let originX = isRTL ? 'right' : 'left';
|
||||
const contentEl = baseEl.querySelector('.popover-content');
|
||||
const contentDimentions = contentEl.getBoundingClientRect();
|
||||
const contentWidth = contentDimentions.width;
|
||||
const contentHeight = contentDimentions.height;
|
||||
const bodyWidth = doc.defaultView.innerWidth;
|
||||
const bodyHeight = doc.defaultView.innerHeight;
|
||||
// If ev was passed, use that for target element
|
||||
const targetDim = ev && ev.target && ev.target.getBoundingClientRect();
|
||||
// As per MD spec, by default position the popover below the target (trigger) element
|
||||
const targetTop = targetDim != null && 'bottom' in targetDim
|
||||
? targetDim.bottom
|
||||
: bodyHeight / 2 - contentHeight / 2;
|
||||
const targetLeft = targetDim != null && 'left' in targetDim
|
||||
? isRTL
|
||||
? targetDim.left - contentWidth + targetDim.width
|
||||
: targetDim.left
|
||||
: bodyWidth / 2 - contentWidth / 2;
|
||||
const targetHeight = (targetDim && targetDim.height) || 0;
|
||||
const popoverCSS = {
|
||||
top: targetTop,
|
||||
left: targetLeft
|
||||
};
|
||||
// If the popover left is less than the padding it is off screen
|
||||
// to the left so adjust it, else if the width of the popover
|
||||
// exceeds the body width it is off screen to the right so adjust
|
||||
if (popoverCSS.left < POPOVER_MD_BODY_PADDING) {
|
||||
popoverCSS.left = POPOVER_MD_BODY_PADDING;
|
||||
// Same origin in this case for both LTR & RTL
|
||||
// Note: in LTR, originX is already 'left'
|
||||
originX = 'left';
|
||||
}
|
||||
else if (contentWidth + POPOVER_MD_BODY_PADDING + popoverCSS.left >
|
||||
bodyWidth) {
|
||||
popoverCSS.left = bodyWidth - contentWidth - POPOVER_MD_BODY_PADDING;
|
||||
// Same origin in this case for both LTR & RTL
|
||||
// Note: in RTL, originX is already 'right'
|
||||
originX = 'right';
|
||||
}
|
||||
// If the popover when popped down stretches past bottom of screen,
|
||||
// make it pop up if there's room above
|
||||
if (targetTop + targetHeight + contentHeight > bodyHeight &&
|
||||
targetTop - contentHeight > 0) {
|
||||
popoverCSS.top = targetTop - contentHeight - targetHeight;
|
||||
baseEl.className = baseEl.className + ' popover-bottom';
|
||||
originY = 'bottom';
|
||||
// If there isn't room for it to pop up above the target cut it off
|
||||
}
|
||||
else if (targetTop + targetHeight + contentHeight > bodyHeight) {
|
||||
contentEl.style.bottom = POPOVER_MD_BODY_PADDING + 'px';
|
||||
}
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const contentAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const viewportAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
||||
.beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
})
|
||||
.afterClearStyles(['pointer-events']);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.01, 1);
|
||||
contentAnimation
|
||||
.addElement(contentEl)
|
||||
.beforeStyles({
|
||||
'top': `${popoverCSS.top}px`,
|
||||
'left': `${popoverCSS.left}px`,
|
||||
'transform-origin': `${originY} ${originX}`
|
||||
})
|
||||
.fromTo('transform', 'scale(0.001)', 'scale(1)');
|
||||
viewportAnimation
|
||||
.addElement(baseEl.querySelector('.popover-viewport'))
|
||||
.fromTo('opacity', 0.01, 1);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('cubic-bezier(0.36,0.66,0.04,1)')
|
||||
.duration(300)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation, contentAnimation, viewportAnimation]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Md Popover Leave Animation
|
||||
*/
|
||||
const mdLeaveAnimation = (baseEl) => {
|
||||
const baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.99, 0);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
const baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const backdropAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
const wrapperAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation
|
||||
.addElement(baseEl.querySelector('ion-backdrop'))
|
||||
.fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation
|
||||
.addElement(baseEl.querySelector('.popover-wrapper'))
|
||||
.fromTo('opacity', 0.99, 0);
|
||||
return baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease')
|
||||
.duration(500)
|
||||
.addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
};
|
||||
|
||||
const popoverIosCss = ".sc-ion-popover-ios-h{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}.overlay-hidden.sc-ion-popover-ios-h{display:none}.popover-wrapper.sc-ion-popover-ios{opacity:0;z-index:10}.popover-content.sc-ion-popover-ios{display:-ms-flexbox;display:flex;position:absolute;-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);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}.popover-viewport.sc-ion-popover-ios{--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px}.sc-ion-popover-ios-h{--width:200px;--max-height:90%;--box-shadow:none;--backdrop-opacity:var(--ion-backdrop-opacity, 0.08)}.popover-content.sc-ion-popover-ios{border-radius:10px}.popover-arrow.sc-ion-popover-ios{display:block;position:absolute;width:20px;height:10px;overflow:hidden}.popover-arrow.sc-ion-popover-ios::after{left:3px;top:3px;border-radius:3px;position:absolute;width:14px;height:14px;-webkit-transform:rotate(45deg);transform:rotate(45deg);background:var(--background);content:\"\";z-index:10}[dir=rtl].sc-ion-popover-ios .popover-arrow.sc-ion-popover-ios::after,[dir=rtl].sc-ion-popover-ios-h .popover-arrow.sc-ion-popover-ios::after,[dir=rtl] .sc-ion-popover-ios-h .popover-arrow.sc-ion-popover-ios::after{left:unset;right:unset;right:3px}.popover-bottom.sc-ion-popover-ios-h .popover-arrow.sc-ion-popover-ios{top:auto;bottom:-10px}.popover-bottom.sc-ion-popover-ios-h .popover-arrow.sc-ion-popover-ios::after{top:-6px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.popover-translucent.sc-ion-popover-ios-h .popover-content.sc-ion-popover-ios,.popover-translucent.sc-ion-popover-ios-h .popover-arrow.sc-ion-popover-ios::after{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}";
|
||||
@@ -265,118 +265,118 @@ const popoverIosCss = ".sc-ion-popover-ios-h{--background:var(--ion-background-c
|
||||
const popoverMdCss = ".sc-ion-popover-md-h{--background:var(--ion-background-color, #fff);--min-width:0;--min-height:0;--max-width:auto;--height:auto;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);z-index:1001}.overlay-hidden.sc-ion-popover-md-h{display:none}.popover-wrapper.sc-ion-popover-md{opacity:0;z-index:10}.popover-content.sc-ion-popover-md{display:-ms-flexbox;display:flex;position:absolute;-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);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:auto;z-index:10}.popover-viewport.sc-ion-popover-md{--ion-safe-area-top:0px;--ion-safe-area-right:0px;--ion-safe-area-bottom:0px;--ion-safe-area-left:0px}.sc-ion-popover-md-h{--width:250px;--max-height:90%;--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}.popover-content.sc-ion-popover-md{border-radius:4px;-webkit-transform-origin:left top;transform-origin:left top}[dir=rtl].sc-ion-popover-md .popover-content.sc-ion-popover-md,[dir=rtl].sc-ion-popover-md-h .popover-content.sc-ion-popover-md,[dir=rtl] .sc-ion-popover-md-h .popover-content.sc-ion-popover-md{-webkit-transform-origin:right top;transform-origin:right top}.popover-viewport.sc-ion-popover-md{-webkit-transition-delay:100ms;transition-delay:100ms}";
|
||||
|
||||
const Popover = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
*/
|
||||
this.keyboardClose = true;
|
||||
/**
|
||||
* If `true`, the popover will be dismissed when the backdrop is clicked.
|
||||
*/
|
||||
this.backdropDismiss = true;
|
||||
/**
|
||||
* If `true`, a backdrop will be displayed behind the popover.
|
||||
*/
|
||||
this.showBackdrop = true;
|
||||
/**
|
||||
* If `true`, the popover 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 popover will animate.
|
||||
*/
|
||||
this.animated = true;
|
||||
this.onDismiss = (ev) => {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
this.dismiss();
|
||||
};
|
||||
this.onBackdropTap = () => {
|
||||
this.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
};
|
||||
this.onLifecycle = (modalEvent) => {
|
||||
const el = this.usersElement;
|
||||
const name = LIFECYCLE_MAP[modalEvent.type];
|
||||
if (el && name) {
|
||||
const event = new CustomEvent(name, {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
detail: modalEvent.detail
|
||||
});
|
||||
el.dispatchEvent(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* Present the popover overlay after it has been created.
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
*/
|
||||
async present() {
|
||||
if (this.presented) {
|
||||
return;
|
||||
}
|
||||
const container = this.el.querySelector('.popover-content');
|
||||
if (!container) {
|
||||
throw new Error('container is undefined');
|
||||
}
|
||||
const data = Object.assign(Object.assign({}, this.componentProps), { popover: this.el });
|
||||
this.usersElement = await Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_8__["a"])(this.delegate, container, this.component, ['popover-viewport', this.el['s-sc']], data);
|
||||
await Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, this.event);
|
||||
}
|
||||
this.keyboardClose = true;
|
||||
/**
|
||||
* Dismiss the popover 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 popover. For example, 'cancel' or 'backdrop'.
|
||||
* If `true`, the popover will be dismissed when the backdrop is clicked.
|
||||
*/
|
||||
async dismiss(data, role) {
|
||||
const shouldDismiss = await Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
|
||||
if (shouldDismiss) {
|
||||
await Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_8__["d"])(this.delegate, this.usersElement);
|
||||
}
|
||||
return shouldDismiss;
|
||||
}
|
||||
this.backdropDismiss = true;
|
||||
/**
|
||||
* Returns a promise that resolves when the popover did dismiss.
|
||||
* If `true`, a backdrop will be displayed behind the popover.
|
||||
*/
|
||||
onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverDidDismiss');
|
||||
}
|
||||
this.showBackdrop = true;
|
||||
/**
|
||||
* Returns a promise that resolves when the popover will dismiss.
|
||||
* If `true`, the popover 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).
|
||||
*/
|
||||
onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverWillDismiss');
|
||||
this.translucent = false;
|
||||
/**
|
||||
* If `true`, the popover will animate.
|
||||
*/
|
||||
this.animated = true;
|
||||
this.onDismiss = (ev) => {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
this.dismiss();
|
||||
};
|
||||
this.onBackdropTap = () => {
|
||||
this.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
};
|
||||
this.onLifecycle = (modalEvent) => {
|
||||
const el = this.usersElement;
|
||||
const name = LIFECYCLE_MAP[modalEvent.type];
|
||||
if (el && name) {
|
||||
const event = new CustomEvent(name, {
|
||||
bubbles: false,
|
||||
cancelable: false,
|
||||
detail: modalEvent.detail
|
||||
});
|
||||
el.dispatchEvent(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
}
|
||||
/**
|
||||
* Present the popover overlay after it has been created.
|
||||
*/
|
||||
async present() {
|
||||
if (this.presented) {
|
||||
return;
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const { onLifecycle } = this;
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { "aria-modal": "true", "no-router": true, tabindex: "-1", style: {
|
||||
zIndex: `${20000 + this.overlayIndex}`,
|
||||
}, class: Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonDismiss: this.onDismiss, onIonBackdropTap: this.onBackdropTap }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "popover-wrapper ion-overlay-wrapper" }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "popover-arrow" }), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "popover-content" })), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" })));
|
||||
const container = this.el.querySelector('.popover-content');
|
||||
if (!container) {
|
||||
throw new Error('container is undefined');
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
const data = Object.assign(Object.assign({}, this.componentProps), { popover: this.el });
|
||||
this.usersElement = await Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_8__["a"])(this.delegate, container, this.component, ['popover-viewport', this.el['s-sc']], data);
|
||||
await Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, this.event);
|
||||
}
|
||||
/**
|
||||
* Dismiss the popover 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 popover. For example, 'cancel' or 'backdrop'.
|
||||
*/
|
||||
async dismiss(data, role) {
|
||||
const shouldDismiss = await Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
|
||||
if (shouldDismiss) {
|
||||
await Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_8__["d"])(this.delegate, this.usersElement);
|
||||
}
|
||||
return shouldDismiss;
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the popover did dismiss.
|
||||
*/
|
||||
onDidDismiss() {
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the popover will dismiss.
|
||||
*/
|
||||
onWillDismiss() {
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverWillDismiss');
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const { onLifecycle } = this;
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { "aria-modal": "true", "no-router": true, tabindex: "-1", style: {
|
||||
zIndex: `${20000 + this.overlayIndex}`,
|
||||
}, class: Object.assign(Object.assign({}, Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonDismiss: this.onDismiss, onIonBackdropTap: this.onBackdropTap }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "popover-wrapper ion-overlay-wrapper" }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "popover-arrow" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "popover-content" })), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { tabindex: "0" })));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
};
|
||||
const LIFECYCLE_MAP = {
|
||||
'ionPopoverDidPresent': 'ionViewDidEnter',
|
||||
'ionPopoverWillPresent': 'ionViewWillEnter',
|
||||
'ionPopoverWillDismiss': 'ionViewWillLeave',
|
||||
'ionPopoverDidDismiss': 'ionViewDidLeave',
|
||||
'ionPopoverDidPresent': 'ionViewDidEnter',
|
||||
'ionPopoverWillPresent': 'ionViewWillEnter',
|
||||
'ionPopoverWillDismiss': 'ionViewWillLeave',
|
||||
'ionPopoverDidDismiss': 'ionViewDidLeave',
|
||||
};
|
||||
Popover.style = {
|
||||
ios: popoverIosCss,
|
||||
md: popoverMdCss
|
||||
ios: popoverIosCss,
|
||||
md: popoverMdCss
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,57 +33,57 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-a635a2fc.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-54fe0237.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./index-37b50f53.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-37b50f53.js");
|
||||
var _index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./index-d8cfb4a8.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-d8cfb4a8.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _hardware_back_button_7b6ede21_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-7b6ede21.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-7b6ede21.js");
|
||||
var _hardware_back_button_4a6b37fb_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./hardware-back-button-4a6b37fb.js */
|
||||
"./node_modules/@ionic/core/dist/esm/hardware-back-button-4a6b37fb.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./overlays-7c699579.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-7c699579.js");
|
||||
var _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./overlays-12c20431.js */
|
||||
"./node_modules/@ionic/core/dist/esm/overlays-12c20431.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./framework-delegate-d1eb6504.js */
|
||||
"./node_modules/@ionic/core/dist/esm/framework-delegate-d1eb6504.js");
|
||||
var _framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
||||
/*! ./framework-delegate-4584ab5a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/framework-delegate-4584ab5a.js");
|
||||
/**
|
||||
* iOS Popover Enter Animation
|
||||
*/
|
||||
@@ -168,9 +168,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
contentEl.style.transformOrigin = originY + ' ' + originX;
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -184,9 +184,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
*/
|
||||
|
||||
var iosLeaveAnimation = function iosLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.popover-wrapper')).fromTo('opacity', 0.99, 0);
|
||||
return baseAnimation.addElement(baseEl).easing('ease').duration(500).addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
@@ -243,11 +243,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
contentEl.style.bottom = POPOVER_MD_BODY_PADDING + 'px';
|
||||
}
|
||||
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var contentAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var viewportAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
var contentAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var viewportAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
||||
'pointer-events': 'none'
|
||||
}).afterClearStyles(['pointer-events']);
|
||||
@@ -266,9 +266,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
|
||||
var mdLeaveAnimation = function mdLeaveAnimation(baseEl) {
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var backdropAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
var wrapperAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])();
|
||||
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"])();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.popover-wrapper')).fromTo('opacity', 0.99, 0);
|
||||
return baseAnimation.addElement(baseEl).easing('ease').duration(500).addAnimation([backdropAnimation, wrapperAnimation]);
|
||||
@@ -283,11 +283,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Popover);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidPresent", 7);
|
||||
this.willPresent = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillPresent", 7);
|
||||
this.willDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidDismiss", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.didPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidPresent", 7);
|
||||
this.willPresent = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillPresent", 7);
|
||||
this.willDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverWillDismiss", 7);
|
||||
this.didDismiss = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPopoverDidDismiss", 7);
|
||||
this.presented = false;
|
||||
/**
|
||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
||||
@@ -325,7 +325,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
};
|
||||
|
||||
this.onBackdropTap = function () {
|
||||
_this.dismiss(undefined, _overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
_this.dismiss(undefined, _overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["B"]);
|
||||
};
|
||||
|
||||
this.onLifecycle = function (modalEvent) {
|
||||
@@ -346,7 +346,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(Popover, [{
|
||||
key: "connectedCallback",
|
||||
value: function connectedCallback() {
|
||||
Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["e"])(this.el);
|
||||
}
|
||||
/**
|
||||
* Present the popover overlay after it has been created.
|
||||
@@ -383,15 +383,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
popover: this.el
|
||||
});
|
||||
_context.next = 8;
|
||||
return Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_8__["a"])(this.delegate, container, this.component, ['popover-viewport', this.el['s-sc']], data);
|
||||
return Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_8__["a"])(this.delegate, container, this.component, ['popover-viewport', this.el['s-sc']], data);
|
||||
|
||||
case 8:
|
||||
this.usersElement = _context.sent;
|
||||
_context.next = 11;
|
||||
return Object(_index_37b50f53_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
return Object(_index_d8cfb4a8_js__WEBPACK_IMPORTED_MODULE_4__["e"])(this.usersElement);
|
||||
|
||||
case 11:
|
||||
return _context.abrupt("return", Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, this.event));
|
||||
return _context.abrupt("return", Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["d"])(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, this.event));
|
||||
|
||||
case 12:
|
||||
case "end":
|
||||
@@ -424,7 +424,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["f"])(this, data, role, 'popoverLeave', iosLeaveAnimation, mdLeaveAnimation, this.event);
|
||||
|
||||
case 2:
|
||||
shouldDismiss = _context2.sent;
|
||||
@@ -435,7 +435,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
_context2.next = 6;
|
||||
return Object(_framework_delegate_d1eb6504_js__WEBPACK_IMPORTED_MODULE_8__["d"])(this.delegate, this.usersElement);
|
||||
return Object(_framework_delegate_4584ab5a_js__WEBPACK_IMPORTED_MODULE_8__["d"])(this.delegate, this.usersElement);
|
||||
|
||||
case 6:
|
||||
return _context2.abrupt("return", shouldDismiss);
|
||||
@@ -461,7 +461,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onDidDismiss",
|
||||
value: function onDidDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverDidDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverDidDismiss');
|
||||
}
|
||||
/**
|
||||
* Returns a promise that resolves when the popover will dismiss.
|
||||
@@ -470,48 +470,48 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "onWillDismiss",
|
||||
value: function onWillDismiss() {
|
||||
return Object(_overlays_7c699579_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverWillDismiss');
|
||||
return Object(_overlays_12c20431_js__WEBPACK_IMPORTED_MODULE_6__["g"])(this.el, 'ionPopoverWillDismiss');
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object$assign;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var onLifecycle = this.onLifecycle;
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"aria-modal": "true",
|
||||
"no-router": true,
|
||||
tabindex: "-1",
|
||||
style: {
|
||||
zIndex: "".concat(20000 + this.overlayIndex)
|
||||
},
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'popover-translucent', this.translucent), _Object$assign)),
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_7__["g"])(this.cssClass)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'popover-translucent', this.translucent), _Object$assign)),
|
||||
onIonPopoverDidPresent: onLifecycle,
|
||||
onIonPopoverWillPresent: onLifecycle,
|
||||
onIonPopoverWillDismiss: onLifecycle,
|
||||
onIonPopoverDidDismiss: onLifecycle,
|
||||
onIonDismiss: this.onDismiss,
|
||||
onIonBackdropTap: this.onBackdropTap
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-backdrop", {
|
||||
tappable: this.backdropDismiss,
|
||||
visible: this.showBackdrop
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "popover-wrapper ion-overlay-wrapper"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "popover-arrow"
|
||||
}), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "popover-content"
|
||||
})), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
tabindex: "0"
|
||||
}));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -11,150 +11,233 @@
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_radio", function() { return Radio; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_radio_group", function() { return RadioGroup; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-5c745fbd.js */ "./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
/* harmony import */ var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-3f0b0c04.js */ "./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-90f46169.js */ "./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */ var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./theme-ff3fc52f.js */ "./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--color-checked:var(--ion-color-primary, #3880ff);width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{margin-left:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-radio.item-ios ion-label{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-9px;top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}:host(.in-item){margin-left:10px;margin-right:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:11px;margin-inline-end:11px}}:host(.in-item[slot=start]){margin-left:3px;margin-right:21px;margin-top:8px;margin-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px}}";
|
||||
const radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host{--color-checked:var(--ion-color-primary, #3880ff);width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{margin-left:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-radio.item-ios ion-label{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-9px;top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}:host(.in-item){margin-left:10px;margin-right:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:11px;margin-inline-end:11px}}:host(.in-item[slot=start]){margin-left:3px;margin-right:21px;margin-top:8px;margin-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px}}";
|
||||
|
||||
const radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--color:var(--ion-color-step-400, #999999);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}";
|
||||
const radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host{--color:var(--ion-color-step-400, #999999);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}";
|
||||
|
||||
const Radio = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionStyle = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.ionFocus = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.inputId = `ion-rb-${radioButtonIds++}`;
|
||||
this.radioGroup = null;
|
||||
/**
|
||||
* If `true`, the radio is selected.
|
||||
*/
|
||||
this.checked = false;
|
||||
/**
|
||||
* The name of the control, which is submitted with the form data.
|
||||
*/
|
||||
this.name = this.inputId;
|
||||
/**
|
||||
* If `true`, the user cannot interact with the radio.
|
||||
*/
|
||||
this.disabled = false;
|
||||
this.updateState = () => {
|
||||
if (this.radioGroup) {
|
||||
this.checked = this.radioGroup.value === this.value;
|
||||
}
|
||||
};
|
||||
this.onFocus = () => {
|
||||
this.ionFocus.emit();
|
||||
};
|
||||
this.onBlur = () => {
|
||||
this.ionBlur.emit();
|
||||
};
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionStyle = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.ionFocus = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.inputId = `ion-rb-${radioButtonIds++}`;
|
||||
this.radioGroup = null;
|
||||
/**
|
||||
* If `true`, the radio is selected.
|
||||
*/
|
||||
this.checked = false;
|
||||
/**
|
||||
* The tabindex of the radio button.
|
||||
* @internal
|
||||
*/
|
||||
this.buttonTabindex = -1;
|
||||
/**
|
||||
* The name of the control, which is submitted with the form data.
|
||||
*/
|
||||
this.name = this.inputId;
|
||||
/**
|
||||
* If `true`, the user cannot interact with the radio.
|
||||
*/
|
||||
this.disabled = false;
|
||||
this.updateState = () => {
|
||||
if (this.radioGroup) {
|
||||
this.checked = this.radioGroup.value === this.value;
|
||||
}
|
||||
};
|
||||
this.onFocus = () => {
|
||||
this.ionFocus.emit();
|
||||
};
|
||||
this.onBlur = () => {
|
||||
this.ionBlur.emit();
|
||||
};
|
||||
}
|
||||
/** @internal */
|
||||
async setFocus(ev) {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
this.el.focus();
|
||||
}
|
||||
/** @internal */
|
||||
async setButtonTabindex(value) {
|
||||
this.buttonTabindex = value;
|
||||
}
|
||||
connectedCallback() {
|
||||
if (this.value === undefined) {
|
||||
this.value = this.inputId;
|
||||
}
|
||||
connectedCallback() {
|
||||
if (this.value === undefined) {
|
||||
this.value = this.inputId;
|
||||
}
|
||||
const radioGroup = this.radioGroup = this.el.closest('ion-radio-group');
|
||||
if (radioGroup) {
|
||||
this.updateState();
|
||||
radioGroup.addEventListener('ionChange', this.updateState);
|
||||
}
|
||||
const radioGroup = this.radioGroup = this.el.closest('ion-radio-group');
|
||||
if (radioGroup) {
|
||||
this.updateState();
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["a"])(radioGroup, 'ionChange', this.updateState);
|
||||
}
|
||||
disconnectedCallback() {
|
||||
const radioGroup = this.radioGroup;
|
||||
if (radioGroup) {
|
||||
radioGroup.removeEventListener('ionChange', this.updateState);
|
||||
this.radioGroup = null;
|
||||
}
|
||||
}
|
||||
disconnectedCallback() {
|
||||
const radioGroup = this.radioGroup;
|
||||
if (radioGroup) {
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["b"])(radioGroup, 'ionChange', this.updateState);
|
||||
this.radioGroup = null;
|
||||
}
|
||||
componentWillLoad() {
|
||||
this.emitStyle();
|
||||
}
|
||||
emitStyle() {
|
||||
this.ionStyle.emit({
|
||||
'radio-checked': this.checked,
|
||||
'interactive-disabled': this.disabled,
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const { inputId, disabled, checked, color, el } = this;
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const labelId = inputId + '-lbl';
|
||||
const label = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["f"])(el);
|
||||
if (label) {
|
||||
label.id = labelId;
|
||||
}
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { role: "radio", "aria-disabled": disabled ? 'true' : null, "aria-checked": `${checked}`, "aria-labelledby": labelId, class: Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["c"])(color)), { [mode]: true, 'in-item': Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["h"])('ion-item', el), 'interactive': true, 'radio-checked': checked, 'radio-disabled': disabled }) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "radio-icon", part: "container" }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "radio-inner", part: "mark" })), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", { type: "button", onFocus: this.onFocus, onBlur: this.onBlur, disabled: disabled })));
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"color": ["emitStyle"],
|
||||
"checked": ["emitStyle"],
|
||||
"disabled": ["emitStyle"]
|
||||
}; }
|
||||
}
|
||||
componentWillLoad() {
|
||||
this.emitStyle();
|
||||
}
|
||||
emitStyle() {
|
||||
this.ionStyle.emit({
|
||||
'radio-checked': this.checked,
|
||||
'interactive-disabled': this.disabled,
|
||||
});
|
||||
}
|
||||
render() {
|
||||
const { inputId, disabled, checked, color, el, buttonTabindex } = this;
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const { label, labelId, labelText } = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["c"])(el, inputId);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, "aria-labelledby": label ? labelId : null, role: "radio", tabindex: buttonTabindex, onFocus: this.onFocus, onBlur: this.onBlur, class: Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["c"])(color, {
|
||||
[mode]: true,
|
||||
'in-item': Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["h"])('ion-item', el),
|
||||
'interactive': true,
|
||||
'radio-checked': checked,
|
||||
'radio-disabled': disabled,
|
||||
}) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "radio-icon", part: "container" }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "radio-inner", part: "mark" }), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", { class: "radio-ripple" })), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("label", { htmlFor: inputId }, labelText), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", { type: "radio", checked: checked, disabled: disabled, tabindex: "-1", id: inputId })));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"color": ["emitStyle"],
|
||||
"checked": ["emitStyle"],
|
||||
"disabled": ["emitStyle"]
|
||||
}; }
|
||||
};
|
||||
let radioButtonIds = 0;
|
||||
Radio.style = {
|
||||
ios: radioIosCss,
|
||||
md: radioMdCss
|
||||
ios: radioIosCss,
|
||||
md: radioMdCss
|
||||
};
|
||||
|
||||
const RadioGroup = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.inputId = `ion-rg-${radioGroupIds++}`;
|
||||
this.labelId = `${this.inputId}-lbl`;
|
||||
/**
|
||||
* If `true`, the radios can be deselected.
|
||||
*/
|
||||
this.allowEmptySelection = false;
|
||||
/**
|
||||
* The name of the control, which is submitted with the form data.
|
||||
*/
|
||||
this.name = this.inputId;
|
||||
this.onClick = (ev) => {
|
||||
const selectedRadio = ev.target && ev.target.closest('ion-radio');
|
||||
if (selectedRadio) {
|
||||
const currentValue = this.value;
|
||||
const newValue = selectedRadio.value;
|
||||
if (newValue !== currentValue) {
|
||||
this.value = newValue;
|
||||
}
|
||||
else if (this.allowEmptySelection) {
|
||||
this.value = undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
valueChanged(value) {
|
||||
this.ionChange.emit({ value });
|
||||
}
|
||||
async connectedCallback() {
|
||||
// Get the list header if it exists and set the id
|
||||
// this is used to set aria-labelledby
|
||||
const el = this.el;
|
||||
const header = el.querySelector('ion-list-header') || el.querySelector('ion-item-divider');
|
||||
if (header) {
|
||||
const label = header.querySelector('ion-label');
|
||||
if (label) {
|
||||
this.labelId = label.id = this.name + '-lbl';
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.inputId = `ion-rg-${radioGroupIds++}`;
|
||||
this.labelId = `${this.inputId}-lbl`;
|
||||
/**
|
||||
* If `true`, the radios can be deselected.
|
||||
*/
|
||||
this.allowEmptySelection = false;
|
||||
/**
|
||||
* The name of the control, which is submitted with the form data.
|
||||
*/
|
||||
this.name = this.inputId;
|
||||
this.setRadioTabindex = (value) => {
|
||||
const radios = this.getRadios();
|
||||
// Get the first radio that is not disabled and the checked one
|
||||
const first = radios.find(radio => !radio.disabled);
|
||||
const checked = radios.find(radio => (radio.value === value && !radio.disabled));
|
||||
if (!first && !checked) {
|
||||
return;
|
||||
}
|
||||
// If an enabled checked radio exists, set it to be the focusable radio
|
||||
// otherwise we default to focus the first radio
|
||||
const focusable = checked || first;
|
||||
for (const radio of radios) {
|
||||
const tabindex = radio === focusable ? 0 : -1;
|
||||
radio.setButtonTabindex(tabindex);
|
||||
}
|
||||
};
|
||||
this.onClick = (ev) => {
|
||||
ev.preventDefault();
|
||||
const selectedRadio = ev.target && ev.target.closest('ion-radio');
|
||||
if (selectedRadio) {
|
||||
const currentValue = this.value;
|
||||
const newValue = selectedRadio.value;
|
||||
if (newValue !== currentValue) {
|
||||
this.value = newValue;
|
||||
}
|
||||
else if (this.allowEmptySelection) {
|
||||
this.value = undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
valueChanged(value) {
|
||||
this.setRadioTabindex(value);
|
||||
this.ionChange.emit({ value });
|
||||
}
|
||||
componentDidLoad() {
|
||||
this.setRadioTabindex(this.value);
|
||||
}
|
||||
async connectedCallback() {
|
||||
// Get the list header if it exists and set the id
|
||||
// this is used to set aria-labelledby
|
||||
const header = this.el.querySelector('ion-list-header') || this.el.querySelector('ion-item-divider');
|
||||
if (header) {
|
||||
const label = this.label = header.querySelector('ion-label');
|
||||
if (label) {
|
||||
this.labelId = label.id = this.name + '-lbl';
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { role: "radiogroup", "aria-labelledby": this.labelId, onClick: this.onClick, class: Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }));
|
||||
}
|
||||
getRadios() {
|
||||
return Array.from(this.el.querySelectorAll('ion-radio'));
|
||||
}
|
||||
onKeydown(ev) {
|
||||
const inSelectPopover = !!this.el.closest('ion-select-popover');
|
||||
if (ev.target && !this.el.contains(ev.target)) {
|
||||
return;
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"value": ["valueChanged"]
|
||||
}; }
|
||||
// Get all radios inside of the radio group and then
|
||||
// filter out disabled radios since we need to skip those
|
||||
const radios = Array.from(this.el.querySelectorAll('ion-radio')).filter(radio => !radio.disabled);
|
||||
// Only move the radio if the current focus is in the radio group
|
||||
if (ev.target && radios.includes(ev.target)) {
|
||||
const index = radios.findIndex(radio => radio === ev.target);
|
||||
const current = radios[index];
|
||||
let next;
|
||||
// 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)) {
|
||||
next = (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)) {
|
||||
next = (index === 0)
|
||||
? radios[radios.length - 1]
|
||||
: radios[index - 1];
|
||||
}
|
||||
if (next && radios.includes(next)) {
|
||||
next.setFocus(ev);
|
||||
if (!inSelectPopover) {
|
||||
this.value = next.value;
|
||||
}
|
||||
}
|
||||
// Update the radio group value when a user presses the
|
||||
// space bar on top of a selected radio (only applies
|
||||
// to radios in a select popover)
|
||||
if (['Space'].includes(ev.code)) {
|
||||
this.value = current.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { label, labelId } = this;
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode }));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"value": ["valueChanged"]
|
||||
}; }
|
||||
};
|
||||
let radioGroupIds = 0;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,9 +1,15 @@
|
||||
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 _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 asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||
|
||||
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 _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); } }
|
||||
@@ -39,30 +45,30 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
var radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--color-checked:var(--ion-color-primary, #3880ff);width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{margin-left:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-radio.item-ios ion-label{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-9px;top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}:host(.in-item){margin-left:10px;margin-right:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:11px;margin-inline-end:11px}}:host(.in-item[slot=start]){margin-left:3px;margin-right:21px;margin-top:8px;margin-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px}}";
|
||||
var radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--color:var(--ion-color-step-400, #999999);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}";
|
||||
var radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host{--color-checked:var(--ion-color-primary, #3880ff);width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{margin-left:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-radio.item-ios ion-label{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-9px;top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}:host(.in-item){margin-left:10px;margin-right:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:11px;margin-inline-end:11px}}:host(.in-item[slot=start]){margin-left:3px;margin-right:21px;margin-top:8px;margin-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px}}";
|
||||
var radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host{--color:var(--ion-color-step-400, #999999);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}";
|
||||
|
||||
var Radio = /*#__PURE__*/function () {
|
||||
function Radio(hostRef) {
|
||||
@@ -70,10 +76,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, Radio);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionStyle = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.ionFocus = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionStyle = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStyle", 7);
|
||||
this.ionFocus = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionFocus", 7);
|
||||
this.ionBlur = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionBlur", 7);
|
||||
this.inputId = "ion-rb-".concat(radioButtonIds++);
|
||||
this.radioGroup = null;
|
||||
/**
|
||||
@@ -81,6 +87,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
*/
|
||||
|
||||
this.checked = false;
|
||||
/**
|
||||
* The tabindex of the radio button.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
this.buttonTabindex = -1;
|
||||
/**
|
||||
* The name of the control, which is submitted with the form data.
|
||||
*/
|
||||
@@ -106,8 +118,62 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_this.ionBlur.emit();
|
||||
};
|
||||
}
|
||||
/** @internal */
|
||||
|
||||
|
||||
_createClass(Radio, [{
|
||||
key: "setFocus",
|
||||
value: function () {
|
||||
var _setFocus = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ev) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
this.el.focus();
|
||||
|
||||
case 3:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}));
|
||||
|
||||
function setFocus(_x) {
|
||||
return _setFocus.apply(this, arguments);
|
||||
}
|
||||
|
||||
return setFocus;
|
||||
}()
|
||||
/** @internal */
|
||||
|
||||
}, {
|
||||
key: "setButtonTabindex",
|
||||
value: function () {
|
||||
var _setButtonTabindex = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(value) {
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
this.buttonTabindex = value;
|
||||
|
||||
case 1:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}));
|
||||
|
||||
function setButtonTabindex(_x2) {
|
||||
return _setButtonTabindex.apply(this, arguments);
|
||||
}
|
||||
|
||||
return setButtonTabindex;
|
||||
}()
|
||||
}, {
|
||||
key: "connectedCallback",
|
||||
value: function connectedCallback() {
|
||||
if (this.value === undefined) {
|
||||
@@ -118,7 +184,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
if (radioGroup) {
|
||||
this.updateState();
|
||||
radioGroup.addEventListener('ionChange', this.updateState);
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["a"])(radioGroup, 'ionChange', this.updateState);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -127,7 +193,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var radioGroup = this.radioGroup;
|
||||
|
||||
if (radioGroup) {
|
||||
radioGroup.removeEventListener('ionChange', this.updateState);
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["b"])(radioGroup, 'ionChange', this.updateState);
|
||||
this.radioGroup = null;
|
||||
}
|
||||
}
|
||||
@@ -147,44 +213,52 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object$assign;
|
||||
var _Object2;
|
||||
|
||||
var inputId = this.inputId,
|
||||
disabled = this.disabled,
|
||||
checked = this.checked,
|
||||
color = this.color,
|
||||
el = this.el;
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var labelId = inputId + '-lbl';
|
||||
var label = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["f"])(el);
|
||||
el = this.el,
|
||||
buttonTabindex = this.buttonTabindex;
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
|
||||
if (label) {
|
||||
label.id = labelId;
|
||||
}
|
||||
var _Object = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["c"])(el, inputId),
|
||||
label = _Object.label,
|
||||
labelId = _Object.labelId,
|
||||
labelText = _Object.labelText;
|
||||
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
role: "radio",
|
||||
"aria-disabled": disabled ? 'true' : null,
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"aria-checked": "".concat(checked),
|
||||
"aria-labelledby": labelId,
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["c"])(color)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'in-item', Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["h"])('ion-item', el)), _defineProperty(_Object$assign, 'interactive', true), _defineProperty(_Object$assign, 'radio-checked', checked), _defineProperty(_Object$assign, 'radio-disabled', disabled), _Object$assign))
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "radio-icon",
|
||||
part: "container"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "radio-inner",
|
||||
part: "mark"
|
||||
})), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
|
||||
type: "button",
|
||||
"aria-hidden": disabled ? 'true' : null,
|
||||
"aria-labelledby": label ? labelId : null,
|
||||
role: "radio",
|
||||
tabindex: buttonTabindex,
|
||||
onFocus: this.onFocus,
|
||||
onBlur: this.onBlur,
|
||||
disabled: disabled
|
||||
"class": Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["c"])(color, (_Object2 = {}, _defineProperty(_Object2, mode, true), _defineProperty(_Object2, 'in-item', Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["h"])('ion-item', el)), _defineProperty(_Object2, 'interactive', true), _defineProperty(_Object2, 'radio-checked', checked), _defineProperty(_Object2, 'radio-disabled', disabled), _Object2))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "radio-icon",
|
||||
part: "container"
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "radio-inner",
|
||||
part: "mark"
|
||||
}), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "radio-ripple"
|
||||
})), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("label", {
|
||||
htmlFor: inputId
|
||||
}, labelText), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", {
|
||||
type: "radio",
|
||||
checked: checked,
|
||||
disabled: disabled,
|
||||
tabindex: "-1",
|
||||
id: inputId
|
||||
}));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
@@ -212,8 +286,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, RadioGroup);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionChange", 7);
|
||||
this.inputId = "ion-rg-".concat(radioGroupIds++);
|
||||
this.labelId = "".concat(this.inputId, "-lbl");
|
||||
/**
|
||||
@@ -227,7 +301,43 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
this.name = this.inputId;
|
||||
|
||||
this.setRadioTabindex = function (value) {
|
||||
var radios = _this2.getRadios(); // Get the first radio that is not disabled and the checked one
|
||||
|
||||
|
||||
var first = radios.find(function (radio) {
|
||||
return !radio.disabled;
|
||||
});
|
||||
var checked = radios.find(function (radio) {
|
||||
return radio.value === value && !radio.disabled;
|
||||
});
|
||||
|
||||
if (!first && !checked) {
|
||||
return;
|
||||
} // If an enabled checked radio exists, set it to be the focusable radio
|
||||
// otherwise we default to focus the first radio
|
||||
|
||||
|
||||
var focusable = checked || first;
|
||||
|
||||
var _iterator = _createForOfIteratorHelper(radios),
|
||||
_step;
|
||||
|
||||
try {
|
||||
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||
var radio = _step.value;
|
||||
var tabindex = radio === focusable ? 0 : -1;
|
||||
radio.setButtonTabindex(tabindex);
|
||||
}
|
||||
} catch (err) {
|
||||
_iterator.e(err);
|
||||
} finally {
|
||||
_iterator.f();
|
||||
}
|
||||
};
|
||||
|
||||
this.onClick = function (ev) {
|
||||
ev.preventDefault();
|
||||
var selectedRadio = ev.target && ev.target.closest('ion-radio');
|
||||
|
||||
if (selectedRadio) {
|
||||
@@ -246,38 +356,43 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_createClass(RadioGroup, [{
|
||||
key: "valueChanged",
|
||||
value: function valueChanged(value) {
|
||||
this.setRadioTabindex(value);
|
||||
this.ionChange.emit({
|
||||
value: value
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "componentDidLoad",
|
||||
value: function componentDidLoad() {
|
||||
this.setRadioTabindex(this.value);
|
||||
}
|
||||
}, {
|
||||
key: "connectedCallback",
|
||||
value: function () {
|
||||
var _connectedCallback = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
||||
var el, header, label;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
var _connectedCallback = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
||||
var header, label;
|
||||
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
// Get the list header if it exists and set the id
|
||||
// this is used to set aria-labelledby
|
||||
el = this.el;
|
||||
header = el.querySelector('ion-list-header') || el.querySelector('ion-item-divider');
|
||||
header = this.el.querySelector('ion-list-header') || this.el.querySelector('ion-item-divider');
|
||||
|
||||
if (header) {
|
||||
label = header.querySelector('ion-label');
|
||||
label = this.label = header.querySelector('ion-label');
|
||||
|
||||
if (label) {
|
||||
this.labelId = label.id = this.name + '-lbl';
|
||||
}
|
||||
}
|
||||
|
||||
case 3:
|
||||
case 2:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
return _context3.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}, _callee3, this);
|
||||
}));
|
||||
|
||||
function connectedCallback() {
|
||||
@@ -286,20 +401,77 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
return connectedCallback;
|
||||
}()
|
||||
}, {
|
||||
key: "getRadios",
|
||||
value: function getRadios() {
|
||||
return Array.from(this.el.querySelectorAll('ion-radio'));
|
||||
}
|
||||
}, {
|
||||
key: "onKeydown",
|
||||
value: function onKeydown(ev) {
|
||||
var inSelectPopover = !!this.el.closest('ion-select-popover');
|
||||
|
||||
if (ev.target && !this.el.contains(ev.target)) {
|
||||
return;
|
||||
} // Get all radios inside of the radio group and then
|
||||
// filter out disabled radios since we need to skip those
|
||||
|
||||
|
||||
var radios = Array.from(this.el.querySelectorAll('ion-radio')).filter(function (radio) {
|
||||
return !radio.disabled;
|
||||
}); // Only move the radio if the current focus is in the radio group
|
||||
|
||||
if (ev.target && radios.includes(ev.target)) {
|
||||
var index = radios.findIndex(function (radio) {
|
||||
return radio === ev.target;
|
||||
});
|
||||
var current = radios[index];
|
||||
var next; // 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)) {
|
||||
next = 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)) {
|
||||
next = index === 0 ? radios[radios.length - 1] : radios[index - 1];
|
||||
}
|
||||
|
||||
if (next && radios.includes(next)) {
|
||||
next.setFocus(ev);
|
||||
|
||||
if (!inSelectPopover) {
|
||||
this.value = next.value;
|
||||
}
|
||||
} // Update the radio group value when a user presses the
|
||||
// space bar on top of a selected radio (only applies
|
||||
// to radios in a select popover)
|
||||
|
||||
|
||||
if (['Space'].includes(ev.code)) {
|
||||
this.value = current.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var label = this.label,
|
||||
labelId = this.labelId;
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
role: "radiogroup",
|
||||
"aria-labelledby": this.labelId,
|
||||
"aria-labelledby": label ? labelId : null,
|
||||
onClick: this.onClick,
|
||||
"class": Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
"class": mode
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,15 +1,15 @@
|
||||
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 asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||
|
||||
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; }
|
||||
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||
|
||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[26], {
|
||||
/***/
|
||||
"./node_modules/@ionic/core/dist/esm/ion-refresher_2.entry.js":
|
||||
@@ -39,51 +39,51 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-a635a2fc.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-a635a2fc.js");
|
||||
var _animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./animation-54fe0237.js */
|
||||
"./node_modules/@ionic/core/dist/esm/animation-54fe0237.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-685f606a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-685f606a.js");
|
||||
var _cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
||||
/*! ./cubic-bezier-eea9a7a9.js */
|
||||
"./node_modules/@ionic/core/dist/esm/cubic-bezier-eea9a7a9.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./index-79d74e0b.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-79d74e0b.js");
|
||||
var _index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
||||
/*! ./index-9e3fe806.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-9e3fe806.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./haptic-7b8ba70a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-7b8ba70a.js");
|
||||
var _haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
||||
/*! ./haptic-27b3f981.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-27b3f981.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _spinner_configs_c78e170e_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./spinner-configs-c78e170e.js */
|
||||
"./node_modules/@ionic/core/dist/esm/spinner-configs-c78e170e.js");
|
||||
var _spinner_configs_cd7845af_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
||||
/*! ./spinner-configs-cd7845af.js */
|
||||
"./node_modules/@ionic/core/dist/esm/spinner-configs-cd7845af.js");
|
||||
|
||||
var getRefresherAnimationType = function getRefresherAnimationType(contentEl) {
|
||||
var previousSibling = contentEl.previousElementSibling;
|
||||
@@ -101,8 +101,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var spinnerArrowContainer = pullingRefresherIcon.querySelector('.spinner-arrow-container');
|
||||
var arrowContainer = pullingRefresherIcon.querySelector('.arrow-container');
|
||||
var arrow = arrowContainer ? arrowContainer.querySelector('ion-icon') : null;
|
||||
var baseAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().duration(1000).easing('ease-out');
|
||||
var spinnerArrowContainerAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(spinnerArrowContainer).keyframes([{
|
||||
var baseAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().duration(1000).easing('ease-out');
|
||||
var spinnerArrowContainerAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(spinnerArrowContainer).keyframes([{
|
||||
offset: 0,
|
||||
opacity: '0.3'
|
||||
}, {
|
||||
@@ -115,7 +115,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
offset: 1,
|
||||
opacity: '1'
|
||||
}]);
|
||||
var circleInnerAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(circle).keyframes([{
|
||||
var circleInnerAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(circle).keyframes([{
|
||||
offset: 0,
|
||||
strokeDasharray: '1px, 200px'
|
||||
}, {
|
||||
@@ -128,7 +128,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
offset: 1,
|
||||
strokeDasharray: '100px, 200px'
|
||||
}]);
|
||||
var circleOuterAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(spinner).keyframes([{
|
||||
var circleOuterAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(spinner).keyframes([{
|
||||
offset: 0,
|
||||
transform: 'rotate(-90deg)'
|
||||
}, {
|
||||
@@ -142,7 +142,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
*/
|
||||
|
||||
if (arrowContainer && arrow) {
|
||||
var arrowContainerAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(arrowContainer).keyframes([{
|
||||
var arrowContainerAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(arrowContainer).keyframes([{
|
||||
offset: 0,
|
||||
transform: 'rotate(0deg)'
|
||||
}, {
|
||||
@@ -155,7 +155,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
offset: 1,
|
||||
transform: 'rotate(400deg)'
|
||||
}]);
|
||||
var arrowAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(arrow).keyframes([{
|
||||
var arrowAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(arrow).keyframes([{
|
||||
offset: 0,
|
||||
transform: 'translateX(2px) scale(0)'
|
||||
}, {
|
||||
@@ -176,7 +176,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
var createScaleAnimation = function createScaleAnimation(pullingRefresherIcon) {
|
||||
var height = pullingRefresherIcon.clientHeight;
|
||||
var spinnerAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(pullingRefresherIcon).keyframes([{
|
||||
var spinnerAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(pullingRefresherIcon).keyframes([{
|
||||
offset: 0,
|
||||
transform: "scale(0) translateY(-".concat(height + 20, "px)")
|
||||
}, {
|
||||
@@ -188,7 +188,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
var createTranslateAnimation = function createTranslateAnimation(pullingRefresherIcon) {
|
||||
var height = pullingRefresherIcon.clientHeight;
|
||||
var spinnerAnimation = Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(pullingRefresherIcon).keyframes([{
|
||||
var spinnerAnimation = Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().addElement(pullingRefresherIcon).keyframes([{
|
||||
offset: 0,
|
||||
transform: "translateY(-".concat(height + 20, "px)")
|
||||
}, {
|
||||
@@ -199,7 +199,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
};
|
||||
|
||||
var createSnapBackAnimation = function createSnapBackAnimation(pullingRefresherIcon) {
|
||||
return Object(_animation_a635a2fc_js__WEBPACK_IMPORTED_MODULE_3__["c"])().duration(125).addElement(pullingRefresherIcon).fromTo('transform', 'translateY(var(--ion-pulling-refresher-translate, 100px))', 'translateY(0px)');
|
||||
return Object(_animation_54fe0237_js__WEBPACK_IMPORTED_MODULE_3__["c"])().duration(125).addElement(pullingRefresherIcon).fromTo('transform', 'translateY(var(--ion-pulling-refresher-translate, 100px))', 'translateY(0px)');
|
||||
}; // iOS Native Refresher
|
||||
// -----------------------------
|
||||
|
||||
@@ -209,7 +209,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
};
|
||||
|
||||
var handleScrollWhilePulling = function handleScrollWhilePulling(spinner, ticks, opacity, currentTickToShow) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
setSpinnerOpacity(spinner, opacity);
|
||||
ticks.forEach(function (el, i) {
|
||||
return el.style.setProperty('opacity', i <= currentTickToShow ? '0.99' : '0');
|
||||
@@ -218,7 +218,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
};
|
||||
|
||||
var handleScrollWhileRefreshing = function handleScrollWhileRefreshing(spinner, lastVelocityY) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
// If user pulls down quickly, the spinner should spin faster
|
||||
spinner.style.setProperty('--refreshing-rotation-duration', lastVelocityY >= 1.0 ? '0.5s' : '2s');
|
||||
spinner.style.setProperty('opacity', '1');
|
||||
@@ -231,7 +231,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
var trans = transitionEndAsync(el, 200);
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
el.style.setProperty('transition', '0.2s all ease-out');
|
||||
|
||||
if (value === undefined) {
|
||||
@@ -245,11 +245,43 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
// -----------------------------
|
||||
|
||||
|
||||
var shouldUseNativeRefresher = function shouldUseNativeRefresher(referenceEl, mode) {
|
||||
var pullingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-pulling ion-spinner');
|
||||
var refreshingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');
|
||||
return pullingSpinner !== null && refreshingSpinner !== null && (mode === 'ios' && Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["i"])('mobile') && referenceEl.style.webkitOverflowScrolling !== undefined || mode === 'md');
|
||||
};
|
||||
var shouldUseNativeRefresher = /*#__PURE__*/function () {
|
||||
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(referenceEl, mode) {
|
||||
var refresherContent, pullingSpinner, refreshingSpinner;
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
refresherContent = referenceEl.querySelector('ion-refresher-content');
|
||||
|
||||
if (refresherContent) {
|
||||
_context.next = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context.abrupt("return", Promise.resolve(false));
|
||||
|
||||
case 3:
|
||||
_context.next = 5;
|
||||
return refresherContent.componentOnReady();
|
||||
|
||||
case 5:
|
||||
pullingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-pulling ion-spinner');
|
||||
refreshingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');
|
||||
return _context.abrupt("return", pullingSpinner !== null && refreshingSpinner !== null && (mode === 'ios' && Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["i"])('mobile') && referenceEl.style.webkitOverflowScrolling !== undefined || mode === 'md'));
|
||||
|
||||
case 8:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
|
||||
return function shouldUseNativeRefresher(_x, _x2) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
|
||||
var transitionEndAsync = function transitionEndAsync(el) {
|
||||
var expectedDuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
||||
@@ -307,10 +339,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Refresher(hostRef) {
|
||||
_classCallCheck(this, Refresher);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRefresh = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRefresh", 7);
|
||||
this.ionPull = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPull", 7);
|
||||
this.ionStart = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStart", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRefresh = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRefresh", 7);
|
||||
this.ionPull = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionPull", 7);
|
||||
this.ionStart = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionStart", 7);
|
||||
this.appliedStyles = false;
|
||||
this.didStart = false;
|
||||
this.progress = 0;
|
||||
@@ -397,16 +429,40 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
}, {
|
||||
key: "checkNativeRefresher",
|
||||
value: function checkNativeRefresher() {
|
||||
var useNativeRefresher = shouldUseNativeRefresher(this.el, Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this));
|
||||
value: function () {
|
||||
var _checkNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
||||
var useNativeRefresher, contentEl;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return shouldUseNativeRefresher(this.el, Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this));
|
||||
|
||||
if (useNativeRefresher && !this.nativeRefresher) {
|
||||
var contentEl = this.el.closest('ion-content');
|
||||
this.setupNativeRefresher(contentEl);
|
||||
} else if (!useNativeRefresher) {
|
||||
this.destroyNativeRefresher();
|
||||
case 2:
|
||||
useNativeRefresher = _context2.sent;
|
||||
|
||||
if (useNativeRefresher && !this.nativeRefresher) {
|
||||
contentEl = this.el.closest('ion-content');
|
||||
this.setupNativeRefresher(contentEl);
|
||||
} else if (!useNativeRefresher) {
|
||||
this.destroyNativeRefresher();
|
||||
}
|
||||
|
||||
case 4:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}));
|
||||
|
||||
function checkNativeRefresher() {
|
||||
return _checkNativeRefresher.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
return checkNativeRefresher;
|
||||
}()
|
||||
}, {
|
||||
key: "destroyNativeRefresher",
|
||||
value: function destroyNativeRefresher() {
|
||||
@@ -420,27 +476,27 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "resetNativeRefresher",
|
||||
value: function () {
|
||||
var _resetNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(el, state) {
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
var _resetNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(el, state) {
|
||||
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
this.state = state;
|
||||
|
||||
if (!(Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) === 'ios')) {
|
||||
_context.next = 6;
|
||||
if (!(Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) === 'ios')) {
|
||||
_context3.next = 6;
|
||||
break;
|
||||
}
|
||||
|
||||
_context.next = 4;
|
||||
_context3.next = 4;
|
||||
return translateElement(el, undefined);
|
||||
|
||||
case 4:
|
||||
_context.next = 8;
|
||||
_context3.next = 8;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
_context.next = 8;
|
||||
_context3.next = 8;
|
||||
return transitionEndAsync(this.el.querySelector('.refresher-refreshing-icon'), 200);
|
||||
|
||||
case 8:
|
||||
@@ -458,13 +514,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
case 15:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
return _context3.stop();
|
||||
}
|
||||
}
|
||||
}, _callee, this);
|
||||
}, _callee3, this);
|
||||
}));
|
||||
|
||||
function resetNativeRefresher(_x, _x2) {
|
||||
function resetNativeRefresher(_x3, _x4) {
|
||||
return _resetNativeRefresher.apply(this, arguments);
|
||||
}
|
||||
|
||||
@@ -473,19 +529,19 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "setupiOSNativeRefresher",
|
||||
value: function () {
|
||||
var _setupiOSNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(pullingSpinner, refreshingSpinner) {
|
||||
var _setupiOSNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(pullingSpinner, refreshingSpinner) {
|
||||
var _this = this;
|
||||
|
||||
var ticks, MAX_PULL, NUM_TICKS;
|
||||
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
||||
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
||||
while (1) {
|
||||
switch (_context2.prev = _context2.next) {
|
||||
switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
this.elementToTransform = this.scrollEl;
|
||||
ticks = pullingSpinner.shadowRoot.querySelectorAll('svg');
|
||||
MAX_PULL = this.scrollEl.clientHeight * 0.16;
|
||||
NUM_TICKS = ticks.length;
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
return ticks.forEach(function (el) {
|
||||
return el.style.setProperty('animation', 'none');
|
||||
});
|
||||
@@ -499,7 +555,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return;
|
||||
}
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
// PTR should only be active when overflow scrolling at the top
|
||||
var scrollTop = _this.scrollEl.scrollTop;
|
||||
var refresherHeight = _this.el.clientHeight;
|
||||
@@ -512,14 +568,14 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
if (_this.state === 8
|
||||
/* Refreshing */
|
||||
) {
|
||||
var ratio = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0, scrollTop / (refresherHeight * 0.5), 1);
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
var ratio = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0, scrollTop / (refresherHeight * 0.5), 1);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
return setSpinnerOpacity(refreshingSpinner, 1 - ratio);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
return setSpinnerOpacity(pullingSpinner, 0);
|
||||
});
|
||||
return;
|
||||
@@ -539,9 +595,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
} // delay showing the next tick marks until user has pulled 30px
|
||||
|
||||
|
||||
var opacity = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0, Math.abs(scrollTop) / refresherHeight, 0.99);
|
||||
var pullAmount = _this.progress = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0, (Math.abs(scrollTop) - 30) / MAX_PULL, 1);
|
||||
var currentTickToShow = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0, Math.floor(pullAmount * NUM_TICKS), NUM_TICKS - 1);
|
||||
var opacity = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0, Math.abs(scrollTop) / refresherHeight, 0.99);
|
||||
var pullAmount = _this.progress = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0, (Math.abs(scrollTop) - 30) / MAX_PULL, 1);
|
||||
var currentTickToShow = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0, Math.floor(pullAmount * NUM_TICKS), NUM_TICKS - 1);
|
||||
var shouldShowRefreshingSpinner = _this.state === 8
|
||||
/* Refreshing */
|
||||
|| currentTickToShow === NUM_TICKS - 1;
|
||||
@@ -555,7 +611,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_this.beginRefresh();
|
||||
|
||||
_this.didRefresh = true;
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_6__["d"])({
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_6__["d"])({
|
||||
style: 'light'
|
||||
});
|
||||
/**
|
||||
@@ -577,16 +633,16 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
};
|
||||
|
||||
this.scrollEl.addEventListener('scroll', this.scrollListenerCallback);
|
||||
_context2.next = 9;
|
||||
_context4.next = 9;
|
||||
return Promise.resolve().then(__webpack_require__.bind(null,
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js"));
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js"));
|
||||
|
||||
case 9:
|
||||
this.gesture = _context2.sent.createGesture({
|
||||
this.gesture = _context4.sent.createGesture({
|
||||
el: this.scrollEl,
|
||||
gestureName: 'refresher',
|
||||
gesturePriority: 10,
|
||||
gesturePriority: 31,
|
||||
direction: 'y',
|
||||
threshold: 5,
|
||||
onStart: function onStart() {
|
||||
@@ -595,6 +651,19 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
if (!_this.didRefresh) {
|
||||
translateElement(_this.elementToTransform, '0px');
|
||||
}
|
||||
/**
|
||||
* If the content had `display: none` when
|
||||
* the refresher was initialized, its clientHeight
|
||||
* will be 0. When the gesture starts, the content
|
||||
* will be visible, so try to get the correct
|
||||
* client height again. This is most common when
|
||||
* using the refresher in an ion-menu.
|
||||
*/
|
||||
|
||||
|
||||
if (MAX_PULL === 0) {
|
||||
MAX_PULL = _this.scrollEl.clientHeight * 0.16;
|
||||
}
|
||||
},
|
||||
onMove: function onMove(ev) {
|
||||
_this.lastVelocityY = ev.velocityY;
|
||||
@@ -610,7 +679,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_this.needsCompletion = false;
|
||||
} else if (_this.didRefresh) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
return translateElement(_this.elementToTransform, "".concat(_this.el.clientHeight, "px"));
|
||||
});
|
||||
}
|
||||
@@ -620,13 +689,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
case 11:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
return _context4.stop();
|
||||
}
|
||||
}
|
||||
}, _callee2, this);
|
||||
}, _callee4, this);
|
||||
}));
|
||||
|
||||
function setupiOSNativeRefresher(_x3, _x4) {
|
||||
function setupiOSNativeRefresher(_x5, _x6) {
|
||||
return _setupiOSNativeRefresher.apply(this, arguments);
|
||||
}
|
||||
|
||||
@@ -635,20 +704,20 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "setupMDNativeRefresher",
|
||||
value: function () {
|
||||
var _setupMDNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(contentEl, pullingSpinner, refreshingSpinner) {
|
||||
var _setupMDNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(contentEl, pullingSpinner, refreshingSpinner) {
|
||||
var _this2 = this;
|
||||
|
||||
var circle, pullingRefresherIcon, refreshingCircle;
|
||||
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
||||
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
||||
while (1) {
|
||||
switch (_context4.prev = _context4.next) {
|
||||
switch (_context6.prev = _context6.next) {
|
||||
case 0:
|
||||
circle = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["g"])(pullingSpinner).querySelector('circle');
|
||||
circle = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["g"])(pullingSpinner).querySelector('circle');
|
||||
pullingRefresherIcon = this.el.querySelector('ion-refresher-content .refresher-pulling-icon');
|
||||
refreshingCircle = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["g"])(refreshingSpinner).querySelector('circle');
|
||||
refreshingCircle = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["g"])(refreshingSpinner).querySelector('circle');
|
||||
|
||||
if (circle !== null && refreshingCircle !== null) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
circle.style.setProperty('animation', 'none'); // This lines up the animation on the refreshing spinner with the pulling spinner
|
||||
|
||||
refreshingSpinner.style.setProperty('animation-delay', '-655ms');
|
||||
@@ -656,16 +725,16 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
});
|
||||
}
|
||||
|
||||
_context4.next = 6;
|
||||
_context6.next = 6;
|
||||
return Promise.resolve().then(__webpack_require__.bind(null,
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js"));
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js"));
|
||||
|
||||
case 6:
|
||||
this.gesture = _context4.sent.createGesture({
|
||||
this.gesture = _context6.sent.createGesture({
|
||||
el: this.scrollEl,
|
||||
gestureName: 'refresher',
|
||||
gesturePriority: 10,
|
||||
gesturePriority: 31,
|
||||
direction: 'y',
|
||||
threshold: 5,
|
||||
canStart: function canStart() {
|
||||
@@ -693,7 +762,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
_this2.state = 2
|
||||
/* Pulling */
|
||||
;
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
var animationType = getRefresherAnimationType(contentEl);
|
||||
var animation = createPullingAnimation(animationType, pullingRefresherIcon);
|
||||
ev.data.animation = animation;
|
||||
@@ -710,7 +779,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
} // Since we are using an easing curve, slow the gesture tracking down a bit
|
||||
|
||||
|
||||
_this2.progress = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["c"])(0, ev.deltaY / 180 * 0.5, 1);
|
||||
_this2.progress = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["h"])(0, ev.deltaY / 180 * 0.5, 1);
|
||||
ev.data.animation.progressStep(_this2.progress);
|
||||
|
||||
_this2.ionPull.emit();
|
||||
@@ -720,7 +789,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return;
|
||||
}
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
return _this2.scrollEl.style.removeProperty('--overflow');
|
||||
});
|
||||
|
||||
@@ -743,19 +812,19 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return;
|
||||
}
|
||||
|
||||
var progress = Object(_cubic_bezier_685f606a_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [0, 0], [1, 1], [1, 1], _this2.progress)[0];
|
||||
var progress = Object(_cubic_bezier_eea9a7a9_js__WEBPACK_IMPORTED_MODULE_4__["g"])([0, 0], [0, 0], [1, 1], [1, 1], _this2.progress)[0];
|
||||
var snapBackAnimation = createSnapBackAnimation(pullingRefresherIcon);
|
||||
|
||||
_this2.animations.push(snapBackAnimation);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
||||
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
||||
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
||||
while (1) {
|
||||
switch (_context3.prev = _context3.next) {
|
||||
switch (_context5.prev = _context5.next) {
|
||||
case 0:
|
||||
pullingRefresherIcon.style.setProperty('--ion-pulling-refresher-translate', "".concat(progress * 100, "px"));
|
||||
ev.data.animation.progressEnd();
|
||||
_context3.next = 4;
|
||||
_context5.next = 4;
|
||||
return snapBackAnimation.play();
|
||||
|
||||
case 4:
|
||||
@@ -765,10 +834,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
case 6:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
return _context5.stop();
|
||||
}
|
||||
}
|
||||
}, _callee3);
|
||||
}, _callee5);
|
||||
})));
|
||||
}
|
||||
});
|
||||
@@ -776,13 +845,13 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
case 8:
|
||||
case "end":
|
||||
return _context4.stop();
|
||||
return _context6.stop();
|
||||
}
|
||||
}
|
||||
}, _callee4, this);
|
||||
}, _callee6, this);
|
||||
}));
|
||||
|
||||
function setupMDNativeRefresher(_x5, _x6, _x7) {
|
||||
function setupMDNativeRefresher(_x7, _x8, _x9) {
|
||||
return _setupMDNativeRefresher.apply(this, arguments);
|
||||
}
|
||||
|
||||
@@ -791,42 +860,47 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "setupNativeRefresher",
|
||||
value: function () {
|
||||
var _setupNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(contentEl) {
|
||||
var _setupNativeRefresher = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(contentEl) {
|
||||
var pullingSpinner, refreshingSpinner;
|
||||
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
||||
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
||||
while (1) {
|
||||
switch (_context5.prev = _context5.next) {
|
||||
switch (_context7.prev = _context7.next) {
|
||||
case 0:
|
||||
if (!(this.scrollListenerCallback || !contentEl || this.nativeRefresher || !this.scrollEl)) {
|
||||
_context5.next = 2;
|
||||
_context7.next = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
return _context5.abrupt("return");
|
||||
return _context7.abrupt("return");
|
||||
|
||||
case 2:
|
||||
/**
|
||||
* If using non-native refresher before make sure
|
||||
* we clean up any old CSS. This can happen when
|
||||
* a user manually calls the refresh method in a
|
||||
* component create callback before the native
|
||||
* refresher is setup.
|
||||
*/
|
||||
this.setCss(0, '', false, '');
|
||||
this.nativeRefresher = true;
|
||||
pullingSpinner = this.el.querySelector('ion-refresher-content .refresher-pulling ion-spinner');
|
||||
refreshingSpinner = this.el.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');
|
||||
_context5.next = 7;
|
||||
return contentEl.componentOnReady();
|
||||
|
||||
case 7:
|
||||
if (Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) === 'ios') {
|
||||
if (Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) === 'ios') {
|
||||
this.setupiOSNativeRefresher(pullingSpinner, refreshingSpinner);
|
||||
} else {
|
||||
this.setupMDNativeRefresher(contentEl, pullingSpinner, refreshingSpinner);
|
||||
}
|
||||
|
||||
case 8:
|
||||
case 7:
|
||||
case "end":
|
||||
return _context5.stop();
|
||||
return _context7.stop();
|
||||
}
|
||||
}
|
||||
}, _callee5, this);
|
||||
}, _callee7, this);
|
||||
}));
|
||||
|
||||
function setupNativeRefresher(_x8) {
|
||||
function setupNativeRefresher(_x10) {
|
||||
return _setupNativeRefresher.apply(this, arguments);
|
||||
}
|
||||
|
||||
@@ -840,61 +914,68 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "connectedCallback",
|
||||
value: function () {
|
||||
var _connectedCallback = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
||||
var _connectedCallback = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
||||
var _this3 = this;
|
||||
|
||||
var contentEl;
|
||||
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
||||
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
||||
while (1) {
|
||||
switch (_context6.prev = _context6.next) {
|
||||
switch (_context8.prev = _context8.next) {
|
||||
case 0:
|
||||
if (!(this.el.getAttribute('slot') !== 'fixed')) {
|
||||
_context6.next = 3;
|
||||
_context8.next = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
console.error('Make sure you use: <ion-refresher slot="fixed">');
|
||||
return _context6.abrupt("return");
|
||||
return _context8.abrupt("return");
|
||||
|
||||
case 3:
|
||||
contentEl = this.el.closest('ion-content');
|
||||
|
||||
if (contentEl) {
|
||||
_context6.next = 7;
|
||||
_context8.next = 7;
|
||||
break;
|
||||
}
|
||||
|
||||
console.error('<ion-refresher> must be used inside an <ion-content>');
|
||||
return _context6.abrupt("return");
|
||||
return _context8.abrupt("return");
|
||||
|
||||
case 7:
|
||||
_context6.next = 9;
|
||||
return contentEl.getScrollElement();
|
||||
_context8.next = 9;
|
||||
return contentEl.componentOnReady();
|
||||
|
||||
case 9:
|
||||
this.scrollEl = _context6.sent;
|
||||
this.backgroundContentEl = Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["g"])(contentEl).querySelector('#background-content');
|
||||
_context8.next = 11;
|
||||
return contentEl.getScrollElement();
|
||||
|
||||
if (!shouldUseNativeRefresher(this.el, Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this))) {
|
||||
_context6.next = 15;
|
||||
case 11:
|
||||
this.scrollEl = _context8.sent;
|
||||
this.backgroundContentEl = Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["g"])(contentEl).querySelector('#background-content');
|
||||
_context8.next = 15;
|
||||
return shouldUseNativeRefresher(this.el, Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this));
|
||||
|
||||
case 15:
|
||||
if (!_context8.sent) {
|
||||
_context8.next = 19;
|
||||
break;
|
||||
}
|
||||
|
||||
this.setupNativeRefresher(contentEl);
|
||||
_context6.next = 19;
|
||||
_context8.next = 23;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
_context6.next = 17;
|
||||
case 19:
|
||||
_context8.next = 21;
|
||||
return Promise.resolve().then(__webpack_require__.bind(null,
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js"));
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js"));
|
||||
|
||||
case 17:
|
||||
this.gesture = _context6.sent.createGesture({
|
||||
case 21:
|
||||
this.gesture = _context8.sent.createGesture({
|
||||
el: contentEl,
|
||||
gestureName: 'refresher',
|
||||
gesturePriority: 10,
|
||||
gesturePriority: 31,
|
||||
direction: 'y',
|
||||
threshold: 20,
|
||||
passive: false,
|
||||
@@ -913,12 +994,12 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
});
|
||||
this.disabledChanged();
|
||||
|
||||
case 19:
|
||||
case 23:
|
||||
case "end":
|
||||
return _context6.stop();
|
||||
return _context8.stop();
|
||||
}
|
||||
}
|
||||
}, _callee6, this);
|
||||
}, _callee8, this);
|
||||
}));
|
||||
|
||||
function connectedCallback() {
|
||||
@@ -951,19 +1032,19 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "complete",
|
||||
value: function () {
|
||||
var _complete = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
||||
var _complete = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
||||
var _this4 = this;
|
||||
|
||||
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
||||
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
||||
while (1) {
|
||||
switch (_context7.prev = _context7.next) {
|
||||
switch (_context9.prev = _context9.next) {
|
||||
case 0:
|
||||
if (this.nativeRefresher) {
|
||||
this.needsCompletion = true; // Do not reset scroll el until user removes pointer from screen
|
||||
|
||||
if (!this.pointerDown) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
return Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
return Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
return _this4.resetNativeRefresher(_this4.elementToTransform, 32
|
||||
/* Completing */
|
||||
);
|
||||
@@ -978,10 +1059,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
case 1:
|
||||
case "end":
|
||||
return _context7.stop();
|
||||
return _context9.stop();
|
||||
}
|
||||
}
|
||||
}, _callee7, this);
|
||||
}, _callee9, this);
|
||||
}));
|
||||
|
||||
function complete() {
|
||||
@@ -997,18 +1078,18 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "cancel",
|
||||
value: function () {
|
||||
var _cancel = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
||||
var _cancel = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
||||
var _this5 = this;
|
||||
|
||||
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
||||
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
||||
while (1) {
|
||||
switch (_context8.prev = _context8.next) {
|
||||
switch (_context10.prev = _context10.next) {
|
||||
case 0:
|
||||
if (this.nativeRefresher) {
|
||||
// Do not reset scroll el until user removes pointer from screen
|
||||
if (!this.pointerDown) {
|
||||
Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
return Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
return Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["r"])(function () {
|
||||
return _this5.resetNativeRefresher(_this5.elementToTransform, 16
|
||||
/* Cancelling */
|
||||
);
|
||||
@@ -1023,10 +1104,10 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
case 1:
|
||||
case "end":
|
||||
return _context8.stop();
|
||||
return _context10.stop();
|
||||
}
|
||||
}
|
||||
}, _callee8, this);
|
||||
}, _callee10, this);
|
||||
}));
|
||||
|
||||
function cancel() {
|
||||
@@ -1259,7 +1340,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}
|
||||
|
||||
this.appliedStyles = y > 0;
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
if (_this7.scrollEl && _this7.backgroundContentEl) {
|
||||
var scrollStyle = _this7.scrollEl.style;
|
||||
var backgroundStyle = _this7.backgroundContentEl.style;
|
||||
@@ -1275,8 +1356,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
slot: "fixed",
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, "refresher-".concat(mode), true), _defineProperty(_class, 'refresher-native', this.nativeRefresher), _defineProperty(_class, 'refresher-active', this.state !== 1), _defineProperty(_class, 'refresher-pulling', this.state === 2), _defineProperty(_class, 'refresher-ready', this.state === 4), _defineProperty(_class, 'refresher-refreshing', this.state === 8), _defineProperty(_class, 'refresher-cancelling', this.state === 16), _defineProperty(_class, 'refresher-completing', this.state === 32), _class)
|
||||
});
|
||||
@@ -1284,7 +1365,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
@@ -1307,68 +1388,68 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function RefresherContent(hostRef) {
|
||||
_classCallCheck(this, RefresherContent);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(RefresherContent, [{
|
||||
key: "componentWillLoad",
|
||||
value: function componentWillLoad() {
|
||||
if (this.pullingIcon === undefined) {
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var overflowRefresher = this.el.style.webkitOverflowScrolling !== undefined ? 'lines' : 'arrow-down';
|
||||
this.pullingIcon = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('refreshingIcon', mode === 'ios' && Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["i"])('mobile') ? _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', overflowRefresher) : 'circular');
|
||||
this.pullingIcon = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('refreshingIcon', mode === 'ios' && Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["i"])('mobile') ? _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', overflowRefresher) : 'circular');
|
||||
}
|
||||
|
||||
if (this.refreshingSpinner === undefined) {
|
||||
var _mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var _mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
|
||||
this.refreshingSpinner = _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('refreshingSpinner', _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', _mode === 'ios' ? 'lines' : 'circular'));
|
||||
this.refreshingSpinner = _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('refreshingSpinner', _ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["c"].get('spinner', _mode === 'ios' ? 'lines' : 'circular'));
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var pullingIcon = this.pullingIcon;
|
||||
var hasSpinner = pullingIcon != null && _spinner_configs_c78e170e_js__WEBPACK_IMPORTED_MODULE_7__["S"][pullingIcon] !== undefined;
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var hasSpinner = pullingIcon != null && _spinner_configs_cd7845af_js__WEBPACK_IMPORTED_MODULE_7__["S"][pullingIcon] !== undefined;
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": mode
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "refresher-pulling"
|
||||
}, this.pullingIcon && hasSpinner && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, this.pullingIcon && hasSpinner && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "refresher-pulling-icon"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "spinner-arrow-container"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
name: this.pullingIcon,
|
||||
paused: true
|
||||
}), mode === 'md' && this.pullingIcon === 'circular' && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}), mode === 'md' && this.pullingIcon === 'circular' && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "arrow-container"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
name: "caret-back-sharp"
|
||||
})))), this.pullingIcon && !hasSpinner && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})))), this.pullingIcon && !hasSpinner && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "refresher-pulling-icon"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
icon: this.pullingIcon,
|
||||
lazy: false
|
||||
})), this.pullingText && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})), this.pullingText && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "refresher-pulling-text",
|
||||
innerHTML: Object(_index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_5__["s"])(this.pullingText)
|
||||
})), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
innerHTML: Object(_index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_5__["s"])(this.pullingText)
|
||||
})), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "refresher-refreshing"
|
||||
}, this.refreshingSpinner && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
}, this.refreshingSpinner && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "refresher-refreshing-icon"
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-spinner", {
|
||||
name: this.refreshingSpinner
|
||||
})), this.refreshingText && Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
})), this.refreshingText && Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
|
||||
"class": "refresher-refreshing-text",
|
||||
innerHTML: Object(_index_79d74e0b_js__WEBPACK_IMPORTED_MODULE_5__["s"])(this.refreshingText)
|
||||
innerHTML: Object(_index_9e3fe806_js__WEBPACK_IMPORTED_MODULE_5__["s"])(this.refreshingText)
|
||||
})));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -11,9 +11,9 @@
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_reorder", function() { return Reorder; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_reorder_group", function() { return ReorderGroup; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./haptic-7b8ba70a.js */ "./node_modules/@ionic/core/dist/esm/haptic-7b8ba70a.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./haptic-27b3f981.js */ "./node_modules/@ionic/core/dist/esm/haptic-27b3f981.js");
|
||||
|
||||
|
||||
|
||||
@@ -23,293 +23,299 @@ const reorderIosCss = ":host([slot]){display:none;line-height:0;z-index:100}.reo
|
||||
const reorderMdCss = ":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}";
|
||||
|
||||
const Reorder = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
onClick(ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopImmediatePropagation();
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const reorderIcon = mode === 'ios' ? 'reorder-three-outline' : 'reorder-two-sharp';
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: mode }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", { name: reorderIcon, lazy: false, class: "reorder-icon", part: "icon" }))));
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
onClick(ev) {
|
||||
const reorderGroup = this.el.closest('ion-reorder-group');
|
||||
ev.preventDefault();
|
||||
// Only stop event propagation if the reorder is inside of an enabled
|
||||
// reorder group. This allows interaction with clickable children components.
|
||||
if (!reorderGroup || !reorderGroup.disabled) {
|
||||
ev.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
const reorderIcon = mode === 'ios' ? 'reorder-three-outline' : 'reorder-two-sharp';
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: mode }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", { name: reorderIcon, lazy: false, class: "reorder-icon", part: "icon" }))));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
};
|
||||
Reorder.style = {
|
||||
ios: reorderIosCss,
|
||||
md: reorderMdCss
|
||||
ios: reorderIosCss,
|
||||
md: reorderMdCss
|
||||
};
|
||||
|
||||
const reorderGroupCss = ".reorder-list-active>*{-webkit-transition:-webkit-transform 300ms;transition:-webkit-transform 300ms;transition:transform 300ms;transition:transform 300ms, -webkit-transform 300ms;will-change:transform}.reorder-enabled{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-enabled ion-reorder{display:block;cursor:-webkit-grab;cursor:grab;pointer-events:all;-ms-touch-action:none;touch-action:none}.reorder-selected,.reorder-selected ion-reorder{cursor:-webkit-grabbing;cursor:grabbing}.reorder-selected{position:relative;-webkit-transition:none !important;transition:none !important;-webkit-box-shadow:0 0 10px rgba(0, 0, 0, 0.4);box-shadow:0 0 10px rgba(0, 0, 0, 0.4);opacity:0.8;z-index:100}.reorder-visible ion-reorder .reorder-icon{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}";
|
||||
|
||||
const ReorderGroup = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionItemReorder = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["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 /* Idle */;
|
||||
/**
|
||||
* If `true`, the reorder will be hidden.
|
||||
*/
|
||||
this.disabled = true;
|
||||
}
|
||||
disabledChanged() {
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(!this.disabled);
|
||||
}
|
||||
}
|
||||
async connectedCallback() {
|
||||
const contentEl = this.el.closest('ion-content');
|
||||
if (contentEl) {
|
||||
this.scrollEl = await contentEl.getScrollElement();
|
||||
}
|
||||
this.gesture = (await Promise.resolve(/*! import() */).then(__webpack_require__.bind(null, /*! ./index-eea61379.js */ "./node_modules/@ionic/core/dist/esm/index-eea61379.js"))).createGesture({
|
||||
el: this.el,
|
||||
gestureName: 'reorder',
|
||||
gesturePriority: 110,
|
||||
threshold: 0,
|
||||
direction: 'y',
|
||||
passive: false,
|
||||
canStart: detail => this.canStart(detail),
|
||||
onStart: ev => this.onStart(ev),
|
||||
onMove: ev => this.onMove(ev),
|
||||
onEnd: () => this.onEnd(),
|
||||
});
|
||||
this.disabledChanged();
|
||||
}
|
||||
disconnectedCallback() {
|
||||
this.onEnd();
|
||||
if (this.gesture) {
|
||||
this.gesture.destroy();
|
||||
this.gesture = undefined;
|
||||
}
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionItemReorder = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["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 /* Idle */;
|
||||
/**
|
||||
* Completes the reorder operation. Must be called by the `ionItemReorder` event.
|
||||
*
|
||||
* If a list of items is passed, the list will be reordered and returned in the
|
||||
* proper order.
|
||||
*
|
||||
* If no parameters are passed or if `true` is passed in, the reorder will complete
|
||||
* and the item will remain in the position it was dragged to. If `false` is passed,
|
||||
* the reorder will complete and the item will bounce back to its original position.
|
||||
*
|
||||
* @param listOrReorder A list of items to be sorted and returned in the new order or a
|
||||
* boolean of whether or not the reorder should reposition the item.
|
||||
* If `true`, the reorder will be hidden.
|
||||
*/
|
||||
complete(listOrReorder) {
|
||||
return Promise.resolve(this.completeSync(listOrReorder));
|
||||
this.disabled = true;
|
||||
}
|
||||
disabledChanged() {
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(!this.disabled);
|
||||
}
|
||||
canStart(ev) {
|
||||
if (this.selectedItemEl || this.state !== 0 /* Idle */) {
|
||||
return false;
|
||||
}
|
||||
const target = ev.event.target;
|
||||
const reorderEl = target.closest('ion-reorder');
|
||||
if (!reorderEl) {
|
||||
return false;
|
||||
}
|
||||
const item = findReorderItem(reorderEl, this.el);
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
ev.data = item;
|
||||
return true;
|
||||
}
|
||||
async connectedCallback() {
|
||||
const contentEl = this.el.closest('ion-content');
|
||||
if (contentEl) {
|
||||
this.scrollEl = await contentEl.getScrollElement();
|
||||
}
|
||||
onStart(ev) {
|
||||
ev.event.preventDefault();
|
||||
const item = this.selectedItemEl = ev.data;
|
||||
const heights = this.cachedHeights;
|
||||
heights.length = 0;
|
||||
const el = this.el;
|
||||
const children = el.children;
|
||||
if (!children || children.length === 0) {
|
||||
return;
|
||||
}
|
||||
let sum = 0;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
sum += child.offsetHeight;
|
||||
heights.push(sum);
|
||||
child.$ionIndex = i;
|
||||
}
|
||||
const box = el.getBoundingClientRect();
|
||||
this.containerTop = box.top;
|
||||
this.containerBottom = box.bottom;
|
||||
if (this.scrollEl) {
|
||||
const scrollBox = this.scrollEl.getBoundingClientRect();
|
||||
this.scrollElInitial = this.scrollEl.scrollTop;
|
||||
this.scrollElTop = scrollBox.top + AUTO_SCROLL_MARGIN;
|
||||
this.scrollElBottom = scrollBox.bottom - AUTO_SCROLL_MARGIN;
|
||||
}
|
||||
else {
|
||||
this.scrollElInitial = 0;
|
||||
this.scrollElTop = 0;
|
||||
this.scrollElBottom = 0;
|
||||
}
|
||||
this.lastToIndex = indexForItem(item);
|
||||
this.selectedItemHeight = item.offsetHeight;
|
||||
this.state = 1 /* Active */;
|
||||
item.classList.add(ITEM_REORDER_SELECTED);
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__["a"])();
|
||||
this.gesture = (await Promise.resolve(/*! import() */).then(__webpack_require__.bind(null, /*! ./index-f49d994d.js */ "./node_modules/@ionic/core/dist/esm/index-f49d994d.js"))).createGesture({
|
||||
el: this.el,
|
||||
gestureName: 'reorder',
|
||||
gesturePriority: 110,
|
||||
threshold: 0,
|
||||
direction: 'y',
|
||||
passive: false,
|
||||
canStart: detail => this.canStart(detail),
|
||||
onStart: ev => this.onStart(ev),
|
||||
onMove: ev => this.onMove(ev),
|
||||
onEnd: () => this.onEnd(),
|
||||
});
|
||||
this.disabledChanged();
|
||||
}
|
||||
disconnectedCallback() {
|
||||
this.onEnd();
|
||||
if (this.gesture) {
|
||||
this.gesture.destroy();
|
||||
this.gesture = undefined;
|
||||
}
|
||||
onMove(ev) {
|
||||
const selectedItem = this.selectedItemEl;
|
||||
if (!selectedItem) {
|
||||
return;
|
||||
}
|
||||
// Scroll if we reach the scroll margins
|
||||
const scroll = this.autoscroll(ev.currentY);
|
||||
// // Get coordinate
|
||||
const top = this.containerTop - scroll;
|
||||
const bottom = this.containerBottom - scroll;
|
||||
const currentY = Math.max(top, Math.min(ev.currentY, bottom));
|
||||
const deltaY = scroll + currentY - ev.startY;
|
||||
const normalizedY = currentY - top;
|
||||
const toIndex = this.itemIndexForTop(normalizedY);
|
||||
if (toIndex !== this.lastToIndex) {
|
||||
const fromIndex = indexForItem(selectedItem);
|
||||
this.lastToIndex = toIndex;
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__["b"])();
|
||||
this.reorderMove(fromIndex, toIndex);
|
||||
}
|
||||
// Update selected item position
|
||||
selectedItem.style.transform = `translateY(${deltaY}px)`;
|
||||
}
|
||||
/**
|
||||
* Completes the reorder operation. Must be called by the `ionItemReorder` event.
|
||||
*
|
||||
* If a list of items is passed, the list will be reordered and returned in the
|
||||
* proper order.
|
||||
*
|
||||
* If no parameters are passed or if `true` is passed in, the reorder will complete
|
||||
* and the item will remain in the position it was dragged to. If `false` is passed,
|
||||
* the reorder will complete and the item will bounce back to its original position.
|
||||
*
|
||||
* @param listOrReorder A list of items to be sorted and returned in the new order or a
|
||||
* boolean of whether or not the reorder should reposition the item.
|
||||
*/
|
||||
complete(listOrReorder) {
|
||||
return Promise.resolve(this.completeSync(listOrReorder));
|
||||
}
|
||||
canStart(ev) {
|
||||
if (this.selectedItemEl || this.state !== 0 /* Idle */) {
|
||||
return false;
|
||||
}
|
||||
onEnd() {
|
||||
const selectedItemEl = this.selectedItemEl;
|
||||
this.state = 2 /* Complete */;
|
||||
if (!selectedItemEl) {
|
||||
this.state = 0 /* Idle */;
|
||||
return;
|
||||
}
|
||||
const toIndex = this.lastToIndex;
|
||||
const fromIndex = indexForItem(selectedItemEl);
|
||||
if (toIndex === fromIndex) {
|
||||
this.completeSync();
|
||||
}
|
||||
else {
|
||||
this.ionItemReorder.emit({
|
||||
from: fromIndex,
|
||||
to: toIndex,
|
||||
complete: this.completeSync.bind(this)
|
||||
});
|
||||
}
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__["h"])();
|
||||
const target = ev.event.target;
|
||||
const reorderEl = target.closest('ion-reorder');
|
||||
if (!reorderEl) {
|
||||
return false;
|
||||
}
|
||||
completeSync(listOrReorder) {
|
||||
const selectedItemEl = this.selectedItemEl;
|
||||
if (selectedItemEl && this.state === 2 /* Complete */) {
|
||||
const children = this.el.children;
|
||||
const len = children.length;
|
||||
const toIndex = this.lastToIndex;
|
||||
const fromIndex = indexForItem(selectedItemEl);
|
||||
if (toIndex !== fromIndex && (listOrReorder === undefined || listOrReorder === true)) {
|
||||
const ref = (fromIndex < toIndex)
|
||||
? children[toIndex + 1]
|
||||
: children[toIndex];
|
||||
this.el.insertBefore(selectedItemEl, ref);
|
||||
}
|
||||
if (Array.isArray(listOrReorder)) {
|
||||
listOrReorder = reorderArray(listOrReorder, fromIndex, toIndex);
|
||||
}
|
||||
for (let i = 0; i < len; i++) {
|
||||
children[i].style['transform'] = '';
|
||||
}
|
||||
selectedItemEl.style.transition = '';
|
||||
selectedItemEl.classList.remove(ITEM_REORDER_SELECTED);
|
||||
this.selectedItemEl = undefined;
|
||||
this.state = 0 /* Idle */;
|
||||
}
|
||||
return listOrReorder;
|
||||
const item = findReorderItem(reorderEl, this.el);
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
itemIndexForTop(deltaY) {
|
||||
const heights = this.cachedHeights;
|
||||
let i = 0;
|
||||
// TODO: since heights is a sorted array of integers, we can do
|
||||
// speed up the search using binary search. Remember that linear-search is still
|
||||
// faster than binary-search for small arrays (<64) due CPU branch misprediction.
|
||||
for (i = 0; i < heights.length; i++) {
|
||||
if (heights[i] > deltaY) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
ev.data = item;
|
||||
return true;
|
||||
}
|
||||
onStart(ev) {
|
||||
ev.event.preventDefault();
|
||||
const item = this.selectedItemEl = ev.data;
|
||||
const heights = this.cachedHeights;
|
||||
heights.length = 0;
|
||||
const el = this.el;
|
||||
const children = el.children;
|
||||
if (!children || children.length === 0) {
|
||||
return;
|
||||
}
|
||||
/********* DOM WRITE ********* */
|
||||
reorderMove(fromIndex, toIndex) {
|
||||
const itemHeight = this.selectedItemHeight;
|
||||
const children = this.el.children;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const style = children[i].style;
|
||||
let value = '';
|
||||
if (i > fromIndex && i <= toIndex) {
|
||||
value = `translateY(${-itemHeight}px)`;
|
||||
}
|
||||
else if (i < fromIndex && i >= toIndex) {
|
||||
value = `translateY(${itemHeight}px)`;
|
||||
}
|
||||
style['transform'] = value;
|
||||
}
|
||||
let sum = 0;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const child = children[i];
|
||||
sum += child.offsetHeight;
|
||||
heights.push(sum);
|
||||
child.$ionIndex = i;
|
||||
}
|
||||
autoscroll(posY) {
|
||||
if (!this.scrollEl) {
|
||||
return 0;
|
||||
}
|
||||
let amount = 0;
|
||||
if (posY < this.scrollElTop) {
|
||||
amount = -SCROLL_JUMP;
|
||||
}
|
||||
else if (posY > this.scrollElBottom) {
|
||||
amount = SCROLL_JUMP;
|
||||
}
|
||||
if (amount !== 0) {
|
||||
this.scrollEl.scrollBy(0, amount);
|
||||
}
|
||||
return this.scrollEl.scrollTop - this.scrollElInitial;
|
||||
const box = el.getBoundingClientRect();
|
||||
this.containerTop = box.top;
|
||||
this.containerBottom = box.bottom;
|
||||
if (this.scrollEl) {
|
||||
const scrollBox = this.scrollEl.getBoundingClientRect();
|
||||
this.scrollElInitial = this.scrollEl.scrollTop;
|
||||
this.scrollElTop = scrollBox.top + AUTO_SCROLL_MARGIN;
|
||||
this.scrollElBottom = scrollBox.bottom - AUTO_SCROLL_MARGIN;
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'reorder-enabled': !this.disabled,
|
||||
'reorder-list-active': this.state !== 0 /* Idle */,
|
||||
} }));
|
||||
else {
|
||||
this.scrollElInitial = 0;
|
||||
this.scrollElTop = 0;
|
||||
this.scrollElBottom = 0;
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"disabled": ["disabledChanged"]
|
||||
}; }
|
||||
this.lastToIndex = indexForItem(item);
|
||||
this.selectedItemHeight = item.offsetHeight;
|
||||
this.state = 1 /* Active */;
|
||||
item.classList.add(ITEM_REORDER_SELECTED);
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__["a"])();
|
||||
}
|
||||
onMove(ev) {
|
||||
const selectedItem = this.selectedItemEl;
|
||||
if (!selectedItem) {
|
||||
return;
|
||||
}
|
||||
// Scroll if we reach the scroll margins
|
||||
const scroll = this.autoscroll(ev.currentY);
|
||||
// // Get coordinate
|
||||
const top = this.containerTop - scroll;
|
||||
const bottom = this.containerBottom - scroll;
|
||||
const currentY = Math.max(top, Math.min(ev.currentY, bottom));
|
||||
const deltaY = scroll + currentY - ev.startY;
|
||||
const normalizedY = currentY - top;
|
||||
const toIndex = this.itemIndexForTop(normalizedY);
|
||||
if (toIndex !== this.lastToIndex) {
|
||||
const fromIndex = indexForItem(selectedItem);
|
||||
this.lastToIndex = toIndex;
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__["b"])();
|
||||
this.reorderMove(fromIndex, toIndex);
|
||||
}
|
||||
// Update selected item position
|
||||
selectedItem.style.transform = `translateY(${deltaY}px)`;
|
||||
}
|
||||
onEnd() {
|
||||
const selectedItemEl = this.selectedItemEl;
|
||||
this.state = 2 /* Complete */;
|
||||
if (!selectedItemEl) {
|
||||
this.state = 0 /* Idle */;
|
||||
return;
|
||||
}
|
||||
const toIndex = this.lastToIndex;
|
||||
const fromIndex = indexForItem(selectedItemEl);
|
||||
if (toIndex === fromIndex) {
|
||||
this.completeSync();
|
||||
}
|
||||
else {
|
||||
this.ionItemReorder.emit({
|
||||
from: fromIndex,
|
||||
to: toIndex,
|
||||
complete: this.completeSync.bind(this)
|
||||
});
|
||||
}
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__["h"])();
|
||||
}
|
||||
completeSync(listOrReorder) {
|
||||
const selectedItemEl = this.selectedItemEl;
|
||||
if (selectedItemEl && this.state === 2 /* Complete */) {
|
||||
const children = this.el.children;
|
||||
const len = children.length;
|
||||
const toIndex = this.lastToIndex;
|
||||
const fromIndex = indexForItem(selectedItemEl);
|
||||
if (toIndex !== fromIndex && (listOrReorder === undefined || listOrReorder === true)) {
|
||||
const ref = (fromIndex < toIndex)
|
||||
? children[toIndex + 1]
|
||||
: children[toIndex];
|
||||
this.el.insertBefore(selectedItemEl, ref);
|
||||
}
|
||||
if (Array.isArray(listOrReorder)) {
|
||||
listOrReorder = reorderArray(listOrReorder, fromIndex, toIndex);
|
||||
}
|
||||
for (let i = 0; i < len; i++) {
|
||||
children[i].style['transform'] = '';
|
||||
}
|
||||
selectedItemEl.style.transition = '';
|
||||
selectedItemEl.classList.remove(ITEM_REORDER_SELECTED);
|
||||
this.selectedItemEl = undefined;
|
||||
this.state = 0 /* Idle */;
|
||||
}
|
||||
return listOrReorder;
|
||||
}
|
||||
itemIndexForTop(deltaY) {
|
||||
const heights = this.cachedHeights;
|
||||
let i = 0;
|
||||
// TODO: since heights is a sorted array of integers, we can do
|
||||
// speed up the search using binary search. Remember that linear-search is still
|
||||
// faster than binary-search for small arrays (<64) due CPU branch misprediction.
|
||||
for (i = 0; i < heights.length; i++) {
|
||||
if (heights[i] > deltaY) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
/********* DOM WRITE ********* */
|
||||
reorderMove(fromIndex, toIndex) {
|
||||
const itemHeight = this.selectedItemHeight;
|
||||
const children = this.el.children;
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const style = children[i].style;
|
||||
let value = '';
|
||||
if (i > fromIndex && i <= toIndex) {
|
||||
value = `translateY(${-itemHeight}px)`;
|
||||
}
|
||||
else if (i < fromIndex && i >= toIndex) {
|
||||
value = `translateY(${itemHeight}px)`;
|
||||
}
|
||||
style['transform'] = value;
|
||||
}
|
||||
}
|
||||
autoscroll(posY) {
|
||||
if (!this.scrollEl) {
|
||||
return 0;
|
||||
}
|
||||
let amount = 0;
|
||||
if (posY < this.scrollElTop) {
|
||||
amount = -SCROLL_JUMP;
|
||||
}
|
||||
else if (posY > this.scrollElBottom) {
|
||||
amount = SCROLL_JUMP;
|
||||
}
|
||||
if (amount !== 0) {
|
||||
this.scrollEl.scrollBy(0, amount);
|
||||
}
|
||||
return this.scrollEl.scrollTop - this.scrollElInitial;
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: {
|
||||
[mode]: true,
|
||||
'reorder-enabled': !this.disabled,
|
||||
'reorder-list-active': this.state !== 0 /* Idle */,
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
static get watchers() { return {
|
||||
"disabled": ["disabledChanged"]
|
||||
}; }
|
||||
};
|
||||
const indexForItem = (element) => {
|
||||
return element['$ionIndex'];
|
||||
return element['$ionIndex'];
|
||||
};
|
||||
const findReorderItem = (node, container) => {
|
||||
let parent;
|
||||
while (node) {
|
||||
parent = node.parentElement;
|
||||
if (parent === container) {
|
||||
return node;
|
||||
}
|
||||
node = parent;
|
||||
let parent;
|
||||
while (node) {
|
||||
parent = node.parentElement;
|
||||
if (parent === container) {
|
||||
return node;
|
||||
}
|
||||
return undefined;
|
||||
node = parent;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
const AUTO_SCROLL_MARGIN = 60;
|
||||
const SCROLL_JUMP = 10;
|
||||
const ITEM_REORDER_SELECTED = 'reorder-selected';
|
||||
const reorderArray = (array, from, to) => {
|
||||
const element = array[from];
|
||||
array.splice(from, 1);
|
||||
array.splice(to, 0, element);
|
||||
return array.slice();
|
||||
const element = array[from];
|
||||
array.splice(from, 1);
|
||||
array.splice(to, 0, element);
|
||||
return array.slice();
|
||||
};
|
||||
ReorderGroup.style = reorderGroupCss;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -39,21 +39,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./haptic-7b8ba70a.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-7b8ba70a.js");
|
||||
var _haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./haptic-27b3f981.js */
|
||||
"./node_modules/@ionic/core/dist/esm/haptic-27b3f981.js");
|
||||
|
||||
var reorderIosCss = ":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}";
|
||||
var reorderMdCss = ":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}";
|
||||
@@ -62,29 +62,39 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Reorder(hostRef) {
|
||||
_classCallCheck(this, Reorder);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(Reorder, [{
|
||||
key: "onClick",
|
||||
value: function onClick(ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopImmediatePropagation();
|
||||
var reorderGroup = this.el.closest('ion-reorder-group');
|
||||
ev.preventDefault(); // Only stop event propagation if the reorder is inside of an enabled
|
||||
// reorder group. This allows interaction with clickable children components.
|
||||
|
||||
if (!reorderGroup || !reorderGroup.disabled) {
|
||||
ev.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var reorderIcon = mode === 'ios' ? 'reorder-three-outline' : 'reorder-two-sharp';
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": mode
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("ion-icon", {
|
||||
name: reorderIcon,
|
||||
lazy: false,
|
||||
"class": "reorder-icon",
|
||||
part: "icon"
|
||||
})));
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
return Reorder;
|
||||
@@ -100,8 +110,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function ReorderGroup(hostRef) {
|
||||
_classCallCheck(this, ReorderGroup);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionItemReorder = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionItemReorder", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionItemReorder = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionItemReorder", 7);
|
||||
this.lastToIndex = -1;
|
||||
this.cachedHeights = [];
|
||||
this.scrollElTop = 0;
|
||||
@@ -153,8 +163,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
case 5:
|
||||
_context.next = 7;
|
||||
return Promise.resolve().then(__webpack_require__.bind(null,
|
||||
/*! ./index-eea61379.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-eea61379.js"));
|
||||
/*! ./index-f49d994d.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-f49d994d.js"));
|
||||
|
||||
case 7:
|
||||
this.gesture = _context.sent.createGesture({
|
||||
@@ -291,7 +301,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* Active */
|
||||
;
|
||||
item.classList.add(ITEM_REORDER_SELECTED);
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__["a"])();
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__["a"])();
|
||||
}
|
||||
}, {
|
||||
key: "onMove",
|
||||
@@ -315,7 +325,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
if (toIndex !== this.lastToIndex) {
|
||||
var fromIndex = indexForItem(selectedItem);
|
||||
this.lastToIndex = toIndex;
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__["b"])();
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__["b"])();
|
||||
this.reorderMove(fromIndex, toIndex);
|
||||
} // Update selected item position
|
||||
|
||||
@@ -350,7 +360,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
});
|
||||
}
|
||||
|
||||
Object(_haptic_7b8ba70a_js__WEBPACK_IMPORTED_MODULE_2__["h"])();
|
||||
Object(_haptic_27b3f981_js__WEBPACK_IMPORTED_MODULE_2__["h"])();
|
||||
}
|
||||
}, {
|
||||
key: "completeSync",
|
||||
@@ -451,15 +461,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
value: function render() {
|
||||
var _class;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, 'reorder-enabled', !this.disabled), _defineProperty(_class, 'reorder-list-active', this.state !== 0), _class)
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}], [{
|
||||
key: "watchers",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,91 +10,91 @@
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_ripple_effect", function() { return RippleEffect; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
|
||||
|
||||
|
||||
const rippleEffectCss = ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}";
|
||||
|
||||
const RippleEffect = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* Sets the type of ripple-effect:
|
||||
*
|
||||
* - `bounded`: the ripple effect expands from the user's click position
|
||||
* - `unbounded`: the ripple effect expands from the center of the button and overflows the container.
|
||||
*
|
||||
* NOTE: Surfaces for bounded ripples should have the overflow property set to hidden,
|
||||
* while surfaces for unbounded ripples should have it set to visible.
|
||||
*/
|
||||
this.type = 'bounded';
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* Adds the ripple effect to the parent element.
|
||||
* Sets the type of ripple-effect:
|
||||
*
|
||||
* @param x The horizontal coordinate of where the ripple should start.
|
||||
* @param y The vertical coordinate of where the ripple should start.
|
||||
* - `bounded`: the ripple effect expands from the user's click position
|
||||
* - `unbounded`: the ripple effect expands from the center of the button and overflows the container.
|
||||
*
|
||||
* NOTE: Surfaces for bounded ripples should have the overflow property set to hidden,
|
||||
* while surfaces for unbounded ripples should have it set to visible.
|
||||
*/
|
||||
async addRipple(x, y) {
|
||||
return new Promise(resolve => {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["f"])(() => {
|
||||
const rect = this.el.getBoundingClientRect();
|
||||
const width = rect.width;
|
||||
const height = rect.height;
|
||||
const hypotenuse = Math.sqrt(width * width + height * height);
|
||||
const maxDim = Math.max(height, width);
|
||||
const maxRadius = this.unbounded ? maxDim : hypotenuse + PADDING;
|
||||
const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);
|
||||
const finalScale = maxRadius / initialSize;
|
||||
let posX = x - rect.left;
|
||||
let posY = y - rect.top;
|
||||
if (this.unbounded) {
|
||||
posX = width * 0.5;
|
||||
posY = height * 0.5;
|
||||
}
|
||||
const styleX = posX - initialSize * 0.5;
|
||||
const styleY = posY - initialSize * 0.5;
|
||||
const moveX = width * 0.5 - posX;
|
||||
const moveY = height * 0.5 - posY;
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => {
|
||||
const div = document.createElement('div');
|
||||
div.classList.add('ripple-effect');
|
||||
const style = div.style;
|
||||
style.top = styleY + 'px';
|
||||
style.left = styleX + 'px';
|
||||
style.width = style.height = initialSize + 'px';
|
||||
style.setProperty('--final-scale', `${finalScale}`);
|
||||
style.setProperty('--translate-end', `${moveX}px, ${moveY}px`);
|
||||
const container = this.el.shadowRoot || this.el;
|
||||
container.appendChild(div);
|
||||
setTimeout(() => {
|
||||
resolve(() => {
|
||||
removeRipple(div);
|
||||
});
|
||||
}, 225 + 100);
|
||||
});
|
||||
this.type = 'bounded';
|
||||
}
|
||||
/**
|
||||
* Adds the ripple effect to the parent element.
|
||||
*
|
||||
* @param x The horizontal coordinate of where the ripple should start.
|
||||
* @param y The vertical coordinate of where the ripple should start.
|
||||
*/
|
||||
async addRipple(x, y) {
|
||||
return new Promise(resolve => {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["f"])(() => {
|
||||
const rect = this.el.getBoundingClientRect();
|
||||
const width = rect.width;
|
||||
const height = rect.height;
|
||||
const hypotenuse = Math.sqrt(width * width + height * height);
|
||||
const maxDim = Math.max(height, width);
|
||||
const maxRadius = this.unbounded ? maxDim : hypotenuse + PADDING;
|
||||
const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);
|
||||
const finalScale = maxRadius / initialSize;
|
||||
let posX = x - rect.left;
|
||||
let posY = y - rect.top;
|
||||
if (this.unbounded) {
|
||||
posX = width * 0.5;
|
||||
posY = height * 0.5;
|
||||
}
|
||||
const styleX = posX - initialSize * 0.5;
|
||||
const styleY = posY - initialSize * 0.5;
|
||||
const moveX = width * 0.5 - posX;
|
||||
const moveY = height * 0.5 - posY;
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(() => {
|
||||
const div = document.createElement('div');
|
||||
div.classList.add('ripple-effect');
|
||||
const style = div.style;
|
||||
style.top = styleY + 'px';
|
||||
style.left = styleX + 'px';
|
||||
style.width = style.height = initialSize + 'px';
|
||||
style.setProperty('--final-scale', `${finalScale}`);
|
||||
style.setProperty('--translate-end', `${moveX}px, ${moveY}px`);
|
||||
const container = this.el.shadowRoot || this.el;
|
||||
container.appendChild(div);
|
||||
setTimeout(() => {
|
||||
resolve(() => {
|
||||
removeRipple(div);
|
||||
});
|
||||
}, 225 + 100);
|
||||
});
|
||||
}
|
||||
get unbounded() {
|
||||
return this.type === 'unbounded';
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { role: "presentation", class: {
|
||||
[mode]: true,
|
||||
'unbounded': this.unbounded
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
});
|
||||
});
|
||||
}
|
||||
get unbounded() {
|
||||
return this.type === 'unbounded';
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { role: "presentation", class: {
|
||||
[mode]: true,
|
||||
'unbounded': this.unbounded
|
||||
} }));
|
||||
}
|
||||
get el() { return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this); }
|
||||
};
|
||||
const removeRipple = (ripple) => {
|
||||
ripple.classList.add('fade-out');
|
||||
setTimeout(() => {
|
||||
ripple.remove();
|
||||
}, 200);
|
||||
ripple.classList.add('fade-out');
|
||||
setTimeout(() => {
|
||||
ripple.remove();
|
||||
}, 200);
|
||||
};
|
||||
const PADDING = 10;
|
||||
const INITIAL_ORIGIN_SCALE = 0.5;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,15 +33,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
|
||||
var rippleEffectCss = ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}";
|
||||
|
||||
@@ -49,7 +49,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function RippleEffect(hostRef) {
|
||||
_classCallCheck(this, RippleEffect);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* Sets the type of ripple-effect:
|
||||
*
|
||||
@@ -81,7 +81,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
return _context.abrupt("return", new Promise(function (resolve) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["f"])(function () {
|
||||
var rect = _this.el.getBoundingClientRect();
|
||||
|
||||
var width = rect.width;
|
||||
@@ -103,7 +103,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
var styleY = posY - initialSize * 0.5;
|
||||
var moveX = width * 0.5 - posX;
|
||||
var moveY = height * 0.5 - posY;
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["c"])(function () {
|
||||
var div = document.createElement('div');
|
||||
div.classList.add('ripple-effect');
|
||||
var style = div.style;
|
||||
@@ -137,26 +137,26 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
return addRipple;
|
||||
}()
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _class;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
role: "presentation",
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, 'unbounded', this.unbounded), _class)
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "unbounded",
|
||||
get: function get() {
|
||||
return this.type === 'unbounded';
|
||||
}
|
||||
}, {
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _class;
|
||||
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
role: "presentation",
|
||||
"class": (_class = {}, _defineProperty(_class, mode, true), _defineProperty(_class, 'unbounded', this.unbounded), _class)
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -65,34 +65,34 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-5c745fbd.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-5c745fbd.js");
|
||||
var _helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./helpers-90f46169.js */
|
||||
"./node_modules/@ionic/core/dist/esm/helpers-90f46169.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
var Route = /*#__PURE__*/function () {
|
||||
function Route(hostRef) {
|
||||
_classCallCheck(this, Route);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRouteDataChanged = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteDataChanged", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRouteDataChanged = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteDataChanged", 7);
|
||||
/**
|
||||
* Relative path that needs to match in order for this route to apply.
|
||||
*
|
||||
@@ -164,8 +164,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function RouteRedirect(hostRef) {
|
||||
_classCallCheck(this, RouteRedirect);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRouteRedirectChanged = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteRedirectChanged", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRouteRedirectChanged = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteRedirectChanged", 7);
|
||||
}
|
||||
|
||||
_createClass(RouteRedirect, [{
|
||||
@@ -651,7 +651,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
return {
|
||||
id: route.id,
|
||||
path: route.path,
|
||||
params: mergeParams(route.params, allparams[i])
|
||||
params: mergeParams(route.params, allparams[i]),
|
||||
beforeEnter: route.beforeEnter,
|
||||
beforeLeave: route.beforeLeave
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -906,9 +908,9 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Router(hostRef) {
|
||||
_classCallCheck(this, Router);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRouteWillChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteWillChange", 7);
|
||||
this.ionRouteDidChange = Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteDidChange", 7);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
this.ionRouteWillChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteWillChange", 7);
|
||||
this.ionRouteDidChange = Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["e"])(this, "ionRouteDidChange", 7);
|
||||
this.previousPath = null;
|
||||
this.busy = false;
|
||||
this.state = 0;
|
||||
@@ -972,8 +974,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "componentDidLoad",
|
||||
value: function componentDidLoad() {
|
||||
window.addEventListener('ionRouteRedirectChanged', Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["e"])(this.onRedirectChanged.bind(this), 10));
|
||||
window.addEventListener('ionRouteDataChanged', Object(_helpers_5c745fbd_js__WEBPACK_IMPORTED_MODULE_2__["e"])(this.onRoutesChanged.bind(this), 100));
|
||||
window.addEventListener('ionRouteRedirectChanged', Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["m"])(this.onRedirectChanged.bind(this), 10));
|
||||
window.addEventListener('ionRouteDataChanged', Object(_helpers_90f46169_js__WEBPACK_IMPORTED_MODULE_2__["m"])(this.onRoutesChanged.bind(this), 100));
|
||||
}
|
||||
}, {
|
||||
key: "onPopState",
|
||||
@@ -1656,7 +1658,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
}, {
|
||||
key: "el",
|
||||
get: function get() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["i"])(this);
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -1671,7 +1673,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
|
||||
_classCallCheck(this, RouterLink);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
/**
|
||||
* When using a router, it specifies the transition direction when navigating to
|
||||
* another page using `href`.
|
||||
@@ -1680,25 +1682,25 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
this.routerDirection = 'forward';
|
||||
|
||||
this.onClick = function (ev) {
|
||||
Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["o"])(_this2.href, ev, _this2.routerDirection, _this2.routerAnimation);
|
||||
Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["o"])(_this2.href, ev, _this2.routerDirection, _this2.routerAnimation);
|
||||
};
|
||||
}
|
||||
|
||||
_createClass(RouterLink, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _Object$assign;
|
||||
var _Object;
|
||||
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
var attrs = {
|
||||
href: this.href,
|
||||
rel: this.rel,
|
||||
target: this.target
|
||||
};
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
onClick: this.onClick,
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color)), (_Object$assign = {}, _defineProperty(_Object$assign, mode, true), _defineProperty(_Object$assign, 'ion-activatable', true), _Object$assign))
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("a", Object.assign({}, attrs), Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
"class": Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_3__["c"])(this.color, (_Object = {}, _defineProperty(_Object, mode, true), _defineProperty(_Object, 'ion-activatable', true), _Object))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("a", Object.assign({}, attrs), Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,9 +12,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_avatar", function() { return Avatar; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_badge", function() { return Badge; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ion_thumbnail", function() { return Thumbnail; });
|
||||
/* harmony import */ var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-44bf8136.js */ "./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
/* harmony import */ var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-837be8f3.js */ "./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
/* harmony import */ var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme-3f0b0c04.js */ "./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
/* harmony import */ var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-e806d1f6.js */ "./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */ 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");
|
||||
/* harmony import */ var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme-ff3fc52f.js */ "./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
|
||||
|
||||
@@ -24,16 +24,16 @@ const avatarIosCss = ":host{border-radius:var(--border-radius);display:block}::s
|
||||
const avatarMdCss = ":host{border-radius:var(--border-radius);display:block}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}:host{--border-radius:50%;width:64px;height:64px}";
|
||||
|
||||
const Avatar = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
};
|
||||
Avatar.style = {
|
||||
ios: avatarIosCss,
|
||||
md: avatarMdCss
|
||||
ios: avatarIosCss,
|
||||
md: avatarMdCss
|
||||
};
|
||||
|
||||
const badgeIosCss = ":host{--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff);--padding-top:3px;--padding-end:8px;--padding-bottom:3px;--padding-start:8px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:inline-block;min-width:10px;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);font-size:13px;font-weight:bold;line-height:1;text-align:center;white-space:nowrap;contain:content;vertical-align:baseline}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(:empty){display:none}:host{border-radius:10px}";
|
||||
@@ -41,28 +41,30 @@ const badgeIosCss = ":host{--background:var(--ion-color-primary, #3880ff);--colo
|
||||
const badgeMdCss = ":host{--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff);--padding-top:3px;--padding-end:8px;--padding-bottom:3px;--padding-start:8px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:inline-block;min-width:10px;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);font-size:13px;font-weight:bold;line-height:1;text-align:center;white-space:nowrap;contain:content;vertical-align:baseline}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(:empty){display:none}:host{--padding-top:3px;--padding-end:4px;--padding-bottom:4px;--padding-start:4px;border-radius:4px}";
|
||||
|
||||
const Badge = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__["c"])(this.color)), { [mode]: true }) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
const mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__["c"])(this.color, {
|
||||
[mode]: true,
|
||||
}) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
};
|
||||
Badge.style = {
|
||||
ios: badgeIosCss,
|
||||
md: badgeMdCss
|
||||
ios: badgeIosCss,
|
||||
md: badgeMdCss
|
||||
};
|
||||
|
||||
const thumbnailCss = ":host{--size:48px;--border-radius:0;border-radius:var(--border-radius);display:block;width:var(--size);height:var(--size)}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}";
|
||||
|
||||
const Thumbnail = class {
|
||||
constructor(hostRef) {
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
constructor(hostRef) {
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
render() {
|
||||
return (Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], { class: Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this) }, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
|
||||
}
|
||||
};
|
||||
Thumbnail.style = thumbnailCss;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -41,21 +41,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-44bf8136.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-44bf8136.js");
|
||||
var _index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
||||
/*! ./index-e806d1f6.js */
|
||||
"./node_modules/@ionic/core/dist/esm/index-e806d1f6.js");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
||||
/*! ./ionic-global-837be8f3.js */
|
||||
"./node_modules/@ionic/core/dist/esm/ionic-global-837be8f3.js");
|
||||
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");
|
||||
/* harmony import */
|
||||
|
||||
|
||||
var _theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./theme-3f0b0c04.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-3f0b0c04.js");
|
||||
var _theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
||||
/*! ./theme-ff3fc52f.js */
|
||||
"./node_modules/@ionic/core/dist/esm/theme-ff3fc52f.js");
|
||||
|
||||
var avatarIosCss = ":host{border-radius:var(--border-radius);display:block}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}:host{--border-radius:50%;width:48px;height:48px}";
|
||||
var avatarMdCss = ":host{border-radius:var(--border-radius);display:block}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;-o-object-fit:cover;object-fit:cover;overflow:hidden}:host{--border-radius:50%;width:64px;height:64px}";
|
||||
@@ -64,15 +64,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Avatar(hostRef) {
|
||||
_classCallCheck(this, Avatar);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(Avatar, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -90,16 +90,16 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Badge(hostRef) {
|
||||
_classCallCheck(this, Badge);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(Badge, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var mode = Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object.assign(Object.assign({}, Object(_theme_3f0b0c04_js__WEBPACK_IMPORTED_MODULE_2__["c"])(this.color)), _defineProperty({}, mode, true))
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
var mode = Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this);
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_theme_ff3fc52f_js__WEBPACK_IMPORTED_MODULE_2__["c"])(this.color, _defineProperty({}, mode, true))
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}]);
|
||||
|
||||
@@ -116,15 +116,15 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
||||
function Thumbnail(hostRef) {
|
||||
_classCallCheck(this, Thumbnail);
|
||||
|
||||
Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
|
||||
}
|
||||
|
||||
_createClass(Thumbnail, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
return Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_837be8f3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_44bf8136_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
return Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
|
||||
"class": Object(_ionic_global_9d5c8ee3_js__WEBPACK_IMPORTED_MODULE_1__["b"])(this)
|
||||
}, Object(_index_e806d1f6_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user