fix(): update to Stencil One 🎉🎊

This commit is contained in:
Manu MA
2019-06-19 21:33:50 +02:00
committed by GitHub
parent 7f1829eb21
commit b40f7d36d5
572 changed files with 14833 additions and 10323 deletions

View File

@ -1,6 +1,7 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Method, Prop, QueueApi, State, Watch } from '@stencil/core';
import { Gesture, GestureDetail, Mode, RefresherEventDetail } from '../../interface';
import { getIonMode } from '../../global/ionic-global';
import { Gesture, GestureDetail, RefresherEventDetail } from '../../interface';
@Component({
tag: 'ion-refresher',
@ -17,8 +18,6 @@ export class Refresher implements ComponentInterface {
private scrollEl?: HTMLElement;
private gesture?: Gesture;
mode!: Mode;
@Element() el!: HTMLElement;
@Prop({ context: 'queue' }) queue!: QueueApi;
@ -115,7 +114,6 @@ export class Refresher implements ComponentInterface {
this.gesture = (await import('../../utils/gesture')).createGesture({
el: this.el.closest('ion-content') as any,
queue: this.queue,
gestureName: 'refresher',
gesturePriority: 10,
direction: 'y',
@ -148,7 +146,7 @@ export class Refresher implements ComponentInterface {
* `refreshing` to `completing`.
*/
@Method()
complete() {
async complete() {
this.close(RefresherState.Completing, '120ms');
}
@ -156,7 +154,7 @@ export class Refresher implements ComponentInterface {
* Changes the refresher's state from `refreshing` to `cancelling`.
*/
@Method()
cancel() {
async cancel() {
this.close(RefresherState.Cancelling, '');
}
@ -360,13 +358,14 @@ export class Refresher implements ComponentInterface {
}
hostData() {
const mode = getIonMode(this);
return {
slot: 'fixed',
class: {
[`${this.mode}`]: true,
[`${mode}`]: true,
// Used internally for styling
[`refresher-${this.mode}`]: true,
[`refresher-${mode}`]: true,
'refresher-active': this.state !== RefresherState.Inactive,
'refresher-pulling': this.state === RefresherState.Pulling,