@ionic/core 8.2.2-nightly.20240611 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ion-refresher.js +28 -1
- package/dist/cjs/ion-refresher_2.cjs.entry.js +28 -1
- package/dist/collection/components/refresher/refresher.js +28 -1
- package/dist/collection/components/refresher/test/fullscreen/refresher.e2e.js +77 -0
- package/dist/docs.json +1 -1
- package/dist/esm/ion-refresher_2.entry.js +28 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-1e2b2b60.entry.js +4 -0
- package/dist/ionic/{p-44f6a3e4.system.entry.js → p-68f01c55.system.entry.js} +1 -1
- package/dist/ionic/p-c1859486.system.js +1 -1
- package/dist/types/components/refresher/refresher.d.ts +1 -0
- package/hydrate/index.js +28 -1
- package/package.json +4 -2
- package/dist/ionic/p-0471d705.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -25613,6 +25613,7 @@ class Refresher {
|
|
|
25613
25613
|
this.pointerDown = false;
|
|
25614
25614
|
this.needsCompletion = false;
|
|
25615
25615
|
this.didRefresh = false;
|
|
25616
|
+
this.contentFullscreen = false;
|
|
25616
25617
|
this.lastVelocityY = 0;
|
|
25617
25618
|
this.animations = [];
|
|
25618
25619
|
this.nativeRefresher = false;
|
|
@@ -25907,6 +25908,12 @@ class Refresher {
|
|
|
25907
25908
|
* Query the background content element from the host ion-content element directly.
|
|
25908
25909
|
*/
|
|
25909
25910
|
this.backgroundContentEl = await contentEl.getBackgroundElement();
|
|
25911
|
+
/**
|
|
25912
|
+
* Check if the content element is fullscreen to apply the correct styles
|
|
25913
|
+
* when the refresher is refreshing. Otherwise, the refresher will be
|
|
25914
|
+
* hidden because it is positioned behind the background content element.
|
|
25915
|
+
*/
|
|
25916
|
+
this.contentFullscreen = contentEl.fullscreen;
|
|
25910
25917
|
if (await shouldUseNativeRefresher(this.el, getIonMode$1(this))) {
|
|
25911
25918
|
this.setupNativeRefresher(contentEl);
|
|
25912
25919
|
}
|
|
@@ -26000,6 +26007,14 @@ class Refresher {
|
|
|
26000
26007
|
this.progress = 0;
|
|
26001
26008
|
this.state = 1 /* RefresherState.Inactive */;
|
|
26002
26009
|
this.memoizeOverflowStyle();
|
|
26010
|
+
/**
|
|
26011
|
+
* If the content is fullscreen, then we need to
|
|
26012
|
+
* set the offset-top style on the background content
|
|
26013
|
+
* element to ensure that the refresher is shown.
|
|
26014
|
+
*/
|
|
26015
|
+
if (this.contentFullscreen && this.backgroundContentEl) {
|
|
26016
|
+
this.backgroundContentEl.style.setProperty('--offset-top', '0px');
|
|
26017
|
+
}
|
|
26003
26018
|
}
|
|
26004
26019
|
onMove(detail) {
|
|
26005
26020
|
if (!this.scrollEl) {
|
|
@@ -26127,6 +26142,7 @@ class Refresher {
|
|
|
26127
26142
|
close(state, delay) {
|
|
26128
26143
|
// create fallback timer incase something goes wrong with transitionEnd event
|
|
26129
26144
|
setTimeout(() => {
|
|
26145
|
+
var _a;
|
|
26130
26146
|
this.state = 1 /* RefresherState.Inactive */;
|
|
26131
26147
|
this.progress = 0;
|
|
26132
26148
|
this.didStart = false;
|
|
@@ -26135,6 +26151,17 @@ class Refresher {
|
|
|
26135
26151
|
* user can scroll again.
|
|
26136
26152
|
*/
|
|
26137
26153
|
this.setCss(0, '0ms', false, '', true);
|
|
26154
|
+
/**
|
|
26155
|
+
* Reset the offset-top style on the background content
|
|
26156
|
+
* when the refresher is no longer refreshing and the
|
|
26157
|
+
* content is fullscreen.
|
|
26158
|
+
*
|
|
26159
|
+
* This ensures that the behavior of background content
|
|
26160
|
+
* does not change when refreshing is complete.
|
|
26161
|
+
*/
|
|
26162
|
+
if (this.contentFullscreen && this.backgroundContentEl) {
|
|
26163
|
+
(_a = this.backgroundContentEl) === null || _a === void 0 ? void 0 : _a.style.removeProperty('--offset-top');
|
|
26164
|
+
}
|
|
26138
26165
|
}, 600);
|
|
26139
26166
|
// reset the styles on the scroll element
|
|
26140
26167
|
// set that the refresh is actively cancelling/completing
|
|
@@ -26188,7 +26215,7 @@ class Refresher {
|
|
|
26188
26215
|
}
|
|
26189
26216
|
render() {
|
|
26190
26217
|
const mode = getIonMode$1(this);
|
|
26191
|
-
return (hAsync(Host, { key: '
|
|
26218
|
+
return (hAsync(Host, { key: '3270f181a5141e7d886ec554a3e892974446b90e', slot: "fixed", class: {
|
|
26192
26219
|
[mode]: true,
|
|
26193
26220
|
// Used internally for styling
|
|
26194
26221
|
[`refresher-${mode}`]: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/core",
|
|
3
|
-
"version": "8.2.2
|
|
3
|
+
"version": "8.2.2",
|
|
4
4
|
"description": "Base components for Ionic",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ionic",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"@capacitor/haptics": "^6.0.0",
|
|
42
42
|
"@capacitor/keyboard": "^6.0.0",
|
|
43
43
|
"@capacitor/status-bar": "^6.0.0",
|
|
44
|
+
"@clack/prompts": "^0.7.0",
|
|
44
45
|
"@ionic/eslint-config": "^0.3.0",
|
|
45
46
|
"@ionic/prettier-config": "^2.0.0",
|
|
46
47
|
"@playwright/test": "^1.39.0",
|
|
@@ -99,7 +100,8 @@
|
|
|
99
100
|
"docker.build": "docker build -t ionic-playwright .",
|
|
100
101
|
"test.e2e.docker": "npm run docker.build && node ./scripts/docker.mjs",
|
|
101
102
|
"test.e2e.docker.update-snapshots": "npm run test.e2e.docker -- --update-snapshots",
|
|
102
|
-
"test.e2e.docker.ci": "npm run docker.build && CI=true node ./scripts/docker.mjs"
|
|
103
|
+
"test.e2e.docker.ci": "npm run docker.build && CI=true node ./scripts/docker.mjs",
|
|
104
|
+
"test.e2e.script": "node scripts/testing/e2e-script.mjs"
|
|
103
105
|
},
|
|
104
106
|
"author": "Ionic Team",
|
|
105
107
|
"license": "MIT",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{w as e,r,d as i,e as s,h as t,i as n,f as o}from"./p-e6964b3a.js";import{g as h}from"./p-2408c236.js";import{I as a,b as f,p as l,g as c}from"./p-06e58c4e.js";import{t as d,c as p,j as g,g as m,r as u}from"./p-b51e4004.js";import{d as b,I as x}from"./p-89b61afc.js";import{b as v,c as y}from"./p-9f5f3485.js";import{c as k}from"./p-c7e16491.js";import{E as w,a as j}from"./p-41d5544e.js";import{h as S,i as E}from"./p-da2b833b.js";import{S as M}from"./p-f0c2a614.js";import"./p-06fee233.js";import"./p-c61cc894.js";import"./p-7b30edcc.js";const Y=e=>{const r=e.querySelector("ion-spinner"),i=r.shadowRoot.querySelector("circle"),s=e.querySelector(".spinner-arrow-container"),t=e.querySelector(".arrow-container"),n=t?t.querySelector("ion-icon"):null,o=k().duration(1e3).easing("ease-out"),h=k().addElement(s).keyframes([{offset:0,opacity:"0.3"},{offset:.45,opacity:"0.3"},{offset:.55,opacity:"1"},{offset:1,opacity:"1"}]),a=k().addElement(i).keyframes([{offset:0,strokeDasharray:"1px, 200px"},{offset:.2,strokeDasharray:"1px, 200px"},{offset:.55,strokeDasharray:"100px, 200px"},{offset:1,strokeDasharray:"100px, 200px"}]),f=k().addElement(r).keyframes([{offset:0,transform:"rotate(-90deg)"},{offset:1,transform:"rotate(210deg)"}]);if(t&&n){const e=k().addElement(t).keyframes([{offset:0,transform:"rotate(0deg)"},{offset:.3,transform:"rotate(0deg)"},{offset:.55,transform:"rotate(280deg)"},{offset:1,transform:"rotate(400deg)"}]),r=k().addElement(n).keyframes([{offset:0,transform:"translateX(2px) scale(0)"},{offset:.3,transform:"translateX(2px) scale(0)"},{offset:.55,transform:"translateX(-1.5px) scale(1)"},{offset:1,transform:"translateX(-1.5px) scale(1)"}]);o.addAnimation([e,r])}return o.addAnimation([h,a,f])},z=(r,i,s=200)=>{if(!r)return Promise.resolve();const t=d(r,s);return e((()=>{r.style.setProperty("transition",`${s}ms all ease-out`),void 0===i?r.style.removeProperty("transform"):r.style.setProperty("transform",`translate3d(0px, ${i}, 0px)`)})),t},N=()=>navigator.maxTouchPoints>0&&CSS.supports("background: -webkit-named-image(apple-pay-logo-black)"),T=async(e,r)=>{const i=e.querySelector("ion-refresher-content");if(!i)return Promise.resolve(!1);await new Promise((e=>p(i,e)));const s=e.querySelector("ion-refresher-content .refresher-pulling ion-spinner"),t=e.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");return null!==s&&null!==t&&("ios"===r&&N()||"md"===r)},P=class{constructor(e){r(this,e),this.ionRefresh=i(this,"ionRefresh",7),this.ionPull=i(this,"ionPull",7),this.ionStart=i(this,"ionStart",7),this.appliedStyles=!1,this.didStart=!1,this.progress=0,this.pointerDown=!1,this.needsCompletion=!1,this.didRefresh=!1,this.lastVelocityY=0,this.animations=[],this.nativeRefresher=!1,this.state=1,this.pullMin=60,this.pullMax=this.pullMin+60,this.closeDuration="280ms",this.snapbackDuration="280ms",this.pullFactor=1,this.disabled=!1}disabledChanged(){this.gesture&&this.gesture.enable(!this.disabled)}async checkNativeRefresher(){const e=await T(this.el,v(this));if(e&&!this.nativeRefresher){const e=this.el.closest("ion-content");this.setupNativeRefresher(e)}else e||this.destroyNativeRefresher()}destroyNativeRefresher(){this.scrollEl&&this.scrollListenerCallback&&(this.scrollEl.removeEventListener("scroll",this.scrollListenerCallback),this.scrollListenerCallback=void 0),this.nativeRefresher=!1}async resetNativeRefresher(e,r){this.state=r,"ios"===v(this)?await z(e,void 0,300):await d(this.el.querySelector(".refresher-refreshing-icon"),200),this.didRefresh=!1,this.needsCompletion=!1,this.pointerDown=!1,this.animations.forEach((e=>e.destroy())),this.animations=[],this.progress=0,this.state=1}async setupiOSNativeRefresher(r,i){this.elementToTransform=this.scrollEl;const t=r.shadowRoot.querySelectorAll("svg");let n=.16*this.scrollEl.clientHeight;const o=t.length;e((()=>t.forEach((e=>e.style.setProperty("animation","none"))))),this.scrollListenerCallback=()=>{(this.pointerDown||1!==this.state)&&s((()=>{const r=this.scrollEl.scrollTop,s=this.el.clientHeight;if(r>0){if(8===this.state){const t=g(0,r/(.5*s),1);return void e((()=>{i.style.setProperty("opacity",(1-t).toString())}))}return}this.pointerDown&&(this.didStart||(this.didStart=!0,this.ionStart.emit()),this.pointerDown&&this.ionPull.emit());const h=this.didStart?30:0,a=this.progress=g(0,(Math.abs(r)-h)/n,1);var f,l;8===this.state||1===a?(this.pointerDown&&(f=i,l=this.lastVelocityY,e((()=>{f.style.setProperty("--refreshing-rotation-duration",l>=1?"0.5s":"2s"),f.style.setProperty("opacity","1")}))),this.didRefresh||(this.beginRefresh(),this.didRefresh=!0,b({style:x.Light}),this.pointerDown||z(this.elementToTransform,`${s}px`))):(this.state=2,((r,i,s)=>{e((()=>{r.forEach(((e,r)=>{const t=r*(1/i),n=g(0,(s-t)/(1-t),1);e.style.setProperty("opacity",n.toString())}))}))})(t,o,a))}))},this.scrollEl.addEventListener("scroll",this.scrollListenerCallback),this.gesture=(await import("./p-8ededb41.js")).createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,onStart:()=>{this.pointerDown=!0,this.didRefresh||z(this.elementToTransform,"0px"),0===n&&(n=.16*this.scrollEl.clientHeight)},onMove:e=>{this.lastVelocityY=e.velocityY},onEnd:()=>{this.pointerDown=!1,this.didStart=!1,this.needsCompletion?(this.resetNativeRefresher(this.elementToTransform,32),this.needsCompletion=!1):this.didRefresh&&s((()=>z(this.elementToTransform,`${this.el.clientHeight}px`)))}}),this.disabledChanged()}async setupMDNativeRefresher(r,i,s){const t=m(i).querySelector("circle"),n=this.el.querySelector("ion-refresher-content .refresher-pulling-icon"),o=m(s).querySelector("circle");null!==t&&null!==o&&e((()=>{t.style.setProperty("animation","none"),s.style.setProperty("animation-delay","-655ms"),o.style.setProperty("animation-delay","-655ms")})),this.gesture=(await import("./p-8ededb41.js")).createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,canStart:()=>8!==this.state&&32!==this.state&&0===this.scrollEl.scrollTop,onStart:e=>{this.progress=0,e.data={animation:void 0,didStart:!1,cancelled:!1}},onMove:i=>{if(i.velocityY<0&&0===this.progress&&!i.data.didStart||i.data.cancelled)i.data.cancelled=!0;else{if(!i.data.didStart){i.data.didStart=!0,this.state=2;const{scrollEl:s}=this,t=s.matches(a)?"overflow":"--overflow";e((()=>s.style.setProperty(t,"hidden")));const o=(e=>{const r=e.previousElementSibling;return null!==r&&"ION-HEADER"===r.tagName?"translate":"scale"})(r),h=((e,r,i)=>"scale"===e?((e,r)=>{const i=r.clientHeight,s=k().addElement(e).keyframes([{offset:0,transform:`scale(0) translateY(-${i}px)`},{offset:1,transform:"scale(1) translateY(100px)"}]);return Y(e).addAnimation([s])})(r,i):((e,r)=>{const i=r.clientHeight,s=k().addElement(e).keyframes([{offset:0,transform:`translateY(-${i}px)`},{offset:1,transform:"translateY(100px)"}]);return Y(e).addAnimation([s])})(r,i))(o,n,this.el);return i.data.animation=h,h.progressStart(!1,0),this.ionStart.emit(),void this.animations.push(h)}this.progress=g(0,i.deltaY/180*.5,1),i.data.animation.progressStep(this.progress),this.ionPull.emit()}},onEnd:r=>{if(!r.data.didStart)return;this.gesture.enable(!1);const{scrollEl:i}=this,s=i.matches(a)?"overflow":"--overflow";if(e((()=>i.style.removeProperty(s))),this.progress<=.4)return void r.data.animation.progressEnd(0,this.progress,500).onFinish((()=>{this.animations.forEach((e=>e.destroy())),this.animations=[],this.gesture.enable(!0),this.state=1}));const t=h([0,0],[0,0],[1,1],[1,1],this.progress)[0],o=(e=>k().duration(125).addElement(e).fromTo("transform","translateY(var(--ion-pulling-refresher-translate, 100px))","translateY(0px)"))(n);this.animations.push(o),e((async()=>{n.style.setProperty("--ion-pulling-refresher-translate",100*t+"px"),r.data.animation.progressEnd(),await o.play(),this.beginRefresh(),r.data.animation.destroy(),this.gesture.enable(!0)}))}}),this.disabledChanged()}async setupNativeRefresher(e){if(this.scrollListenerCallback||!e||this.nativeRefresher||!this.scrollEl)return;this.setCss(0,"",!1,""),this.nativeRefresher=!0;const r=this.el.querySelector("ion-refresher-content .refresher-pulling ion-spinner"),i=this.el.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");"ios"===v(this)?this.setupiOSNativeRefresher(r,i):this.setupMDNativeRefresher(e,r,i)}componentDidUpdate(){this.checkNativeRefresher()}async connectedCallback(){if("fixed"!==this.el.getAttribute("slot"))return void console.error('Make sure you use: <ion-refresher slot="fixed">');const e=this.el.closest(f);e?p(e,(async()=>{const r=e.querySelector(a);this.scrollEl=await c(null!=r?r:e),this.backgroundContentEl=await e.getBackgroundElement(),await T(this.el,v(this))?this.setupNativeRefresher(e):(this.gesture=(await import("./p-8ededb41.js")).createGesture({el:e,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:20,passive:!1,canStart:()=>this.canStart(),onStart:()=>this.onStart(),onMove:e=>this.onMove(e),onEnd:()=>this.onEnd()}),this.disabledChanged())})):l(this.el)}disconnectedCallback(){this.destroyNativeRefresher(),this.scrollEl=void 0,this.gesture&&(this.gesture.destroy(),this.gesture=void 0)}async complete(){this.nativeRefresher?(this.needsCompletion=!0,this.pointerDown||u((()=>u((()=>this.resetNativeRefresher(this.elementToTransform,32)))))):this.close(32,"120ms")}async cancel(){this.nativeRefresher?this.pointerDown||u((()=>u((()=>this.resetNativeRefresher(this.elementToTransform,16))))):this.close(16,"")}getProgress(){return Promise.resolve(this.progress)}canStart(){return!(!this.scrollEl||1!==this.state||this.scrollEl.scrollTop>0)}onStart(){this.progress=0,this.state=1,this.memoizeOverflowStyle()}onMove(e){if(!this.scrollEl)return;const r=e.event;if(void 0!==r.touches&&r.touches.length>1)return;if(56&this.state)return;const i=Number.isNaN(this.pullFactor)||this.pullFactor<0?1:this.pullFactor,s=e.deltaY*i;if(s<=0)return this.progress=0,this.state=1,this.appliedStyles?void this.setCss(0,"",!1,""):void 0;if(1===this.state){if(this.scrollEl.scrollTop>0)return void(this.progress=0);this.state=2}if(r.cancelable&&r.preventDefault(),this.setCss(s,"0ms",!0,""),0===s)return void(this.progress=0);const t=this.pullMin;this.progress=s/t,this.didStart||(this.didStart=!0,this.ionStart.emit()),this.ionPull.emit(),s<t?this.state=2:s>this.pullMax?this.beginRefresh():this.state=4}onEnd(){4===this.state?this.beginRefresh():2===this.state?this.cancel():1===this.state&&this.restoreOverflowStyle()}beginRefresh(){this.state=8,this.setCss(this.pullMin,this.snapbackDuration,!0,""),this.ionRefresh.emit({complete:this.complete.bind(this)})}close(e,r){setTimeout((()=>{this.state=1,this.progress=0,this.didStart=!1,this.setCss(0,"0ms",!1,"",!0)}),600),this.state=e,this.setCss(0,this.closeDuration,!0,r)}setCss(r,i,s,t,n=!1){this.nativeRefresher||(this.appliedStyles=r>0,e((()=>{if(this.scrollEl&&this.backgroundContentEl){const e=this.scrollEl.style,n=this.backgroundContentEl.style;e.transform=n.transform=r>0?`translateY(${r}px) translateZ(0px)`:"",e.transitionDuration=n.transitionDuration=i,e.transitionDelay=n.transitionDelay=t,e.overflow=s?"hidden":""}n&&this.restoreOverflowStyle()})))}memoizeOverflowStyle(){if(this.scrollEl){const{overflow:e,overflowX:r,overflowY:i}=this.scrollEl.style;this.overflowStyles={overflow:null!=e?e:"",overflowX:null!=r?r:"",overflowY:null!=i?i:""}}}restoreOverflowStyle(){if(void 0!==this.overflowStyles&&void 0!==this.scrollEl){const{overflow:e,overflowX:r,overflowY:i}=this.overflowStyles;this.scrollEl.style.overflow=e,this.scrollEl.style.overflowX=r,this.scrollEl.style.overflowY=i,this.overflowStyles=void 0}}render(){const e=v(this);return t(o,{key:"1696f66f62d18c9075294f17cb24263325fcf35d",slot:"fixed",class:{[e]:!0,[`refresher-${e}`]:!0,"refresher-native":this.nativeRefresher,"refresher-active":1!==this.state,"refresher-pulling":2===this.state,"refresher-ready":4===this.state,"refresher-refreshing":8===this.state,"refresher-cancelling":16===this.state,"refresher-completing":32===this.state}})}get el(){return n(this)}static get watchers(){return{disabled:["disabledChanged"]}}};P.style={ios:"ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}ion-refresher{inset-inline-start:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-ios .refresher-pulling-icon,.refresher-ios .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-ios .refresher-pulling-text,.refresher-ios .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-lines-ios line,.refresher-ios .refresher-refreshing .spinner-lines-small-ios line,.refresher-ios .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-bubbles circle,.refresher-ios .refresher-refreshing .spinner-circles circle,.refresher-ios .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}.refresher-native .refresher-refreshing ion-spinner{--refreshing-rotation-duration:2s;display:none;-webkit-animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards;animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards}.refresher-native .refresher-refreshing{display:none;-webkit-animation:250ms linear refresher-pop forwards;animation:250ms linear refresher-pop forwards}.refresher-native ion-spinner{width:32px;height:32px;color:var(--ion-color-step-450, var(--ion-background-color-step-450, #747577))}.refresher-native.refresher-refreshing .refresher-pulling ion-spinner,.refresher-native.refresher-completing .refresher-pulling ion-spinner{display:none}.refresher-native.refresher-refreshing .refresher-refreshing ion-spinner,.refresher-native.refresher-completing .refresher-refreshing ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-pulling ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-refreshing ion-spinner{display:none}.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0) rotate(180deg);transform:scale(0) rotate(180deg);-webkit-transition:300ms;transition:300ms}@-webkit-keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}",md:"ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}ion-refresher{inset-inline-start:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-md .refresher-pulling-icon,.refresher-md .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-md .refresher-pulling-text,.refresher-md .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-lines-md line,.refresher-md .refresher-refreshing .spinner-lines-small-md line,.refresher-md .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-bubbles circle,.refresher-md .refresher-refreshing .spinner-circles circle,.refresher-md .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;width:24px;height:24px;color:var(--ion-color-primary, #0054e9)}ion-refresher.refresher-native .spinner-arrow-container{display:inherit}ion-refresher.refresher-native .arrow-container{display:block;position:absolute;width:24px;height:24px}ion-refresher.refresher-native .arrow-container ion-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;left:0;right:0;bottom:-4px;position:absolute;color:var(--ion-color-primary, #0054e9);font-size:12px}ion-refresher.refresher-native.refresher-pulling ion-refresher-content .refresher-pulling,ion-refresher.refresher-native.refresher-ready ion-refresher-content .refresher-pulling{display:-ms-flexbox;display:flex}ion-refresher.refresher-native.refresher-refreshing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-cancelling ion-refresher-content .refresher-refreshing{display:-ms-flexbox;display:flex}ion-refresher.refresher-native .refresher-pulling-icon{-webkit-transform:translateY(calc(-100% - 10px));transform:translateY(calc(-100% - 10px))}ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;border-radius:100%;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;display:-ms-flexbox;display:flex;border:1px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #ececec));background:var(--ion-color-step-250, var(--ion-background-color-step-250, #ffffff));-webkit-box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1);box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1)}"};const R=class{constructor(e){r(this,e),this.customHTMLEnabled=y.get("innerHTMLTemplatesEnabled",w),this.pullingIcon=void 0,this.pullingText=void 0,this.refreshingSpinner=void 0,this.refreshingText=void 0}componentWillLoad(){if(void 0===this.pullingIcon){const e=N(),r=v(this);this.pullingIcon=y.get("refreshingIcon","ios"===r&&e?y.get("spinner",e?"lines":E):"circular")}if(void 0===this.refreshingSpinner){const e=v(this);this.refreshingSpinner=y.get("refreshingSpinner",y.get("spinner","ios"===e?"lines":"circular"))}}renderPullingText(){const{customHTMLEnabled:e,pullingText:r}=this;return e?t("div",{class:"refresher-pulling-text",innerHTML:j(r)}):t("div",{class:"refresher-pulling-text"},r)}renderRefreshingText(){const{customHTMLEnabled:e,refreshingText:r}=this;return e?t("div",{class:"refresher-refreshing-text",innerHTML:j(r)}):t("div",{class:"refresher-refreshing-text"},r)}render(){const e=this.pullingIcon,r=null!=e&&void 0!==M[e],i=v(this);return t(o,{key:"1bec5b4da221c69d856f3f5ddf40f2e03ebf2a4c",class:i},t("div",{key:"4fcc526c4f1881e9368d9cd16bd7030919bd3841",class:"refresher-pulling"},this.pullingIcon&&r&&t("div",{key:"a4e9e2e12c2d7faefc8303ec8c021f999ddf308e",class:"refresher-pulling-icon"},t("div",{key:"5a2d215feb7fb4b64d540d3a65c0f24b415a2433",class:"spinner-arrow-container"},t("ion-spinner",{key:"abef2621d671ac6ff0abac43a702cbd825b7f127",name:this.pullingIcon,paused:!0}),"md"===i&&"circular"===this.pullingIcon&&t("div",{key:"30087d672c3780672a05874cd93cd099b2855462",class:"arrow-container"},t("ion-icon",{key:"5e30333dee469aec0d8efc8c4e6dabb619c6f363",icon:S,"aria-hidden":"true"})))),this.pullingIcon&&!r&&t("div",{key:"48fe72b5ce8ded633c6ee799cebb520b9c8be528",class:"refresher-pulling-icon"},t("ion-icon",{key:"d8dfd5d42056b1c0a436c5006affb255407816c0",icon:this.pullingIcon,lazy:!1,"aria-hidden":"true"})),void 0!==this.pullingText&&this.renderPullingText()),t("div",{key:"c2cbfb94f157c82601ffe7bb815ff82ebc7c0a49",class:"refresher-refreshing"},this.refreshingSpinner&&t("div",{key:"17f3ebe6a31768d5e389f45a2c12f68600185db9",class:"refresher-refreshing-icon"},t("ion-spinner",{key:"e8e61f8d7189c9939bba184201c9509d1d5b0fad",name:this.refreshingSpinner})),void 0!==this.refreshingText&&this.renderRefreshingText()))}get el(){return n(this)}};export{P as ion_refresher,R as ion_refresher_content}
|