mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(overlays): OverlayController interface
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, Listen, Method } from '@stencil/core';
|
||||
import { ActionSheetOptions, OverlayController } from '../../index';
|
||||
import { createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
import { ActionSheetOptions } from '../../index';
|
||||
import { OverlayController, createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
|
||||
@Component({
|
||||
tag: 'ion-action-sheet-controller'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Listen, Method } from '@stencil/core';
|
||||
import { AlertOptions, OverlayController } from '../../index';
|
||||
import { createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
import { AlertOptions } from '../../index';
|
||||
import { OverlayController, createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
|
||||
@Component({
|
||||
tag: 'ion-alert-controller'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Listen, Method } from '@stencil/core';
|
||||
import { LoadingOptions, OverlayController } from '../../index';
|
||||
import { createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
import { LoadingOptions } from '../../index';
|
||||
import { OverlayController, createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -19,7 +19,6 @@ import mdLeaveAnimation from './animations/md.leave';
|
||||
theme: 'loading'
|
||||
}
|
||||
})
|
||||
|
||||
export class Loading implements OverlayInterface {
|
||||
|
||||
private durationTimeout: any;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Listen, Method } from '@stencil/core';
|
||||
import { ModalOptions, OverlayController } from '../../index';
|
||||
import { createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
import { ModalOptions } from '../../index';
|
||||
import { OverlayController, createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Listen, Method } from '@stencil/core';
|
||||
import { OverlayController, PickerOptions } from '../../index';
|
||||
import { createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
import { PickerOptions } from '../../index';
|
||||
import { OverlayController, createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Listen, Method } from '@stencil/core';
|
||||
import { OverlayController, PopoverOptions } from '../../index';
|
||||
import { createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
import { PopoverOptions } from '../../index';
|
||||
import { OverlayController, createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
|
||||
@Component({
|
||||
tag: 'ion-popover-controller'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, Listen, Method } from '@stencil/core';
|
||||
import { OverlayController, ToastOptions } from '../../index';
|
||||
import { createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
import { ToastOptions } from '../../index';
|
||||
import { OverlayController, createOverlay, dismissOverlay, getTopOverlay, removeLastOverlay } from '../../utils/overlays';
|
||||
|
||||
|
||||
@Component({
|
||||
|
||||
5
core/src/index.d.ts
vendored
5
core/src/index.d.ts
vendored
@@ -110,6 +110,7 @@ export * from './components';
|
||||
|
||||
export { DomController, RafCallback } from './global/dom-controller';
|
||||
export { FrameworkDelegate, FrameworkMountingData } from './utils/dom-framework-delegate';
|
||||
export { OverlayEventDetail } from './utils/overlays';
|
||||
|
||||
export interface Config {
|
||||
get: (key: string, fallback?: any) => any;
|
||||
@@ -157,7 +158,3 @@ declare global {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface OverlayController {
|
||||
getTop(): HTMLElement;
|
||||
}
|
||||
|
||||
@@ -200,6 +200,12 @@ export interface OverlayInterface {
|
||||
dismiss(data?: any, role?: string): Promise<void>;
|
||||
}
|
||||
|
||||
export interface OverlayController {
|
||||
create(opts?: any): Promise<HTMLElement>;
|
||||
dismiss(data?: any, role?: string, alertId?: number): Promise<void>;
|
||||
getTop(): HTMLElement;
|
||||
}
|
||||
|
||||
export interface HTMLIonOverlayElement extends HTMLStencilElement, OverlayInterface {}
|
||||
|
||||
export type OverlayMap = Map<number, HTMLIonOverlayElement>;
|
||||
|
||||
Reference in New Issue
Block a user