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 14426 additions and 9916 deletions

View File

@@ -17,7 +17,7 @@ export class LoadingController implements ComponentInterface, OverlayController
*/
@Method()
create(options?: LoadingOptions): Promise<HTMLIonLoadingElement> {
return createOverlay(this.doc.createElement('ion-loading'), options);
return createOverlay('ion-loading', options);
}
/**
@@ -32,7 +32,7 @@ export class LoadingController implements ComponentInterface, OverlayController
*/
@Method()
dismiss(data?: any, role?: string, id?: string) {
return dismissOverlay(this.doc, data, role, 'ion-loading', id);
return dismissOverlay(document, data, role, 'ion-loading', id);
}
/**
@@ -40,6 +40,6 @@ export class LoadingController implements ComponentInterface, OverlayController
*/
@Method()
async getTop(): Promise<HTMLIonLoadingElement | undefined> {
return getOverlay(this.doc, 'ion-loading') as HTMLIonLoadingElement;
return getOverlay(document, 'ion-loading') as HTMLIonLoadingElement;
}
}

View File

@@ -34,12 +34,6 @@ async function presentLoading() {
Create a loading overlay with loading options.
#### Parameters
| Name | Type | Description |
| --------- | ----------------------------- | ----------------------------------------- |
| `options` | `LoadingOptions \| undefined` | The options to use to create the loading. |
#### Returns
Type: `Promise<HTMLIonLoadingElement>`
@@ -50,14 +44,6 @@ Type: `Promise<HTMLIonLoadingElement>`
Dismiss the open loading overlay.
#### Parameters
| Name | Type | Description |
| ------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | `any` | Any data to emit in the dismiss events. |
| `role` | `string \| undefined` | 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"`. |
| `id` | `string \| undefined` | The id of the loading to dismiss. If an id is not provided, it will dismiss the most recently opened loading. |
#### Returns
Type: `Promise<boolean>`