mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
merge release-6.5.0
Release 6.5.0
This commit is contained in:
13
CHANGELOG.md
13
CHANGELOG.md
@ -3,6 +3,19 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [6.5.0](https://github.com/ionic-team/ionic-framework/compare/v6.4.3...v6.5.0) (2023-01-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **deps:** update ionicons to 6.1.0 ([#26617](https://github.com/ionic-team/ionic-framework/issues/26617)) ([ccd2a92](https://github.com/ionic-team/ionic-framework/commit/ccd2a9224e018ad0d67903d44ec312934c3b35ec))
|
||||
* **deps:** update ionicons to 6.1.1 ([#26626](https://github.com/ionic-team/ionic-framework/issues/26626)) ([90405eb](https://github.com/ionic-team/ionic-framework/commit/90405eb0af69ce04faf5855189449d0b7518288c))
|
||||
* **router:** export hook interfaces ([#26551](https://github.com/ionic-team/ionic-framework/issues/26551)) ([2752702](https://github.com/ionic-team/ionic-framework/commit/27527025e4588f43f9f79640f0929e7c7d0618ee))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.4.3](https://github.com/ionic-team/ionic-framework/compare/v6.4.2...v6.4.3) (2023-01-18)
|
||||
|
||||
|
||||
|
@ -3,6 +3,18 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [6.5.0](https://github.com/ionic-team/ionic/compare/v6.4.3...v6.5.0) (2023-01-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **deps:** update ionicons to 6.1.0 ([#26617](https://github.com/ionic-team/ionic/issues/26617)) ([ccd2a92](https://github.com/ionic-team/ionic/commit/ccd2a9224e018ad0d67903d44ec312934c3b35ec))
|
||||
* **deps:** update ionicons to 6.1.1 ([#26626](https://github.com/ionic-team/ionic/issues/26626)) ([90405eb](https://github.com/ionic-team/ionic/commit/90405eb0af69ce04faf5855189449d0b7518288c))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.4.3](https://github.com/ionic-team/ionic/compare/v6.4.2...v6.4.3) (2023-01-18)
|
||||
|
||||
**Note:** Version bump only for package @ionic/angular
|
||||
|
36
angular/package-lock.json
generated
36
angular/package-lock.json
generated
@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "@ionic/angular",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ionic/angular",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.4.3",
|
||||
"ionicons": "^6.0.4",
|
||||
"@ionic/core": "^6.5.0",
|
||||
"ionicons": "^6.1.1",
|
||||
"jsonc-parser": "^3.0.0",
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
@ -1024,12 +1024,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@ionic/core": {
|
||||
"version": "6.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.4.3.tgz",
|
||||
"integrity": "sha512-CBtDO2kbFzwB3UcmOsp6hizK2Wm/FuhfQhvqPz4D8cv2TotNHZ1oOvF224g6dw8Djw+v5baebDzS1h2ckYx+kw==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.5.0.tgz",
|
||||
"integrity": "sha512-vefrnd1WYZJnjSXwsY1sn3HJpBDKPGnwtO2US55Qrjz0d9HyUwocHgVvkvLAAKZG+LGErJbVeV8aTmdYEydRgg==",
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.4",
|
||||
"ionicons": "^6.1.1",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
@ -3558,9 +3558,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ionicons": {
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
|
||||
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.1.tgz",
|
||||
"integrity": "sha512-Qe6mx25DFNwA9UL1rhewI5StI3uD4+BqB2KdvLjyWhtvoUXwyAsmfHLZuDANAHQowIKtTt6BZCt5/g5NIQ635Q==",
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.18.0"
|
||||
}
|
||||
@ -7940,12 +7940,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"@ionic/core": {
|
||||
"version": "6.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.4.3.tgz",
|
||||
"integrity": "sha512-CBtDO2kbFzwB3UcmOsp6hizK2Wm/FuhfQhvqPz4D8cv2TotNHZ1oOvF224g6dw8Djw+v5baebDzS1h2ckYx+kw==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.5.0.tgz",
|
||||
"integrity": "sha512-vefrnd1WYZJnjSXwsY1sn3HJpBDKPGnwtO2US55Qrjz0d9HyUwocHgVvkvLAAKZG+LGErJbVeV8aTmdYEydRgg==",
|
||||
"requires": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.4",
|
||||
"ionicons": "^6.1.1",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
@ -9800,9 +9800,9 @@
|
||||
}
|
||||
},
|
||||
"ionicons": {
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
|
||||
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.1.tgz",
|
||||
"integrity": "sha512-Qe6mx25DFNwA9UL1rhewI5StI3uD4+BqB2KdvLjyWhtvoUXwyAsmfHLZuDANAHQowIKtTt6BZCt5/g5NIQ635Q==",
|
||||
"requires": {
|
||||
"@stencil/core": "^2.18.0"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/angular",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"description": "Angular specific wrappers for @ionic/core",
|
||||
"keywords": [
|
||||
"ionic",
|
||||
@ -42,8 +42,8 @@
|
||||
"validate": "npm i && npm run lint && npm run test && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ionic/core": "^6.4.3",
|
||||
"ionicons": "^6.0.4",
|
||||
"@ionic/core": "^6.5.0",
|
||||
"ionicons": "^6.1.1",
|
||||
"jsonc-parser": "^3.0.0",
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
|
@ -6,6 +6,8 @@ import { Config } from './providers/config';
|
||||
import { IonicWindow } from './types/interfaces';
|
||||
import { raf } from './util/util';
|
||||
|
||||
// TODO(FW-2827): types
|
||||
|
||||
export const appInitialize = (config: Config, doc: Document, zone: NgZone) => {
|
||||
return (): any => {
|
||||
const win: IonicWindow | undefined = doc.defaultView as any;
|
||||
|
@ -18,13 +18,13 @@ export class BooleanValueAccessorDirective extends ValueAccessor {
|
||||
super(injector, el);
|
||||
}
|
||||
|
||||
writeValue(value: any): void {
|
||||
writeValue(value: boolean): void {
|
||||
this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
|
||||
setIonicClasses(this.el);
|
||||
}
|
||||
|
||||
@HostListener('ionChange', ['$event.target'])
|
||||
_handleIonChange(el: any): void {
|
||||
_handleIonChange(el: HTMLIonCheckboxElement | HTMLIonToggleElement): void {
|
||||
this.handleChangeEvent(el, el.checked);
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ export class RadioValueAccessorDirective extends ValueAccessor {
|
||||
super(injector, el);
|
||||
}
|
||||
|
||||
// TODO(FW-2827): type (HTMLIonRadioElement and HTMLElement are both missing `checked`)
|
||||
@HostListener('ionSelect', ['$event.target'])
|
||||
_handleIonSelect(el: any): void {
|
||||
this.handleChangeEvent(el, el.checked);
|
||||
|
@ -20,7 +20,14 @@ export class SelectValueAccessorDirective extends ValueAccessor {
|
||||
}
|
||||
|
||||
@HostListener('ionChange', ['$event.target'])
|
||||
_handleChangeEvent(el: any): void {
|
||||
_handleChangeEvent(
|
||||
el:
|
||||
| HTMLIonRangeElement
|
||||
| HTMLIonSelectElement
|
||||
| HTMLIonRadioGroupElement
|
||||
| HTMLIonSegmentElement
|
||||
| HTMLIonDatetimeElement
|
||||
): void {
|
||||
this.handleChangeEvent(el, el.value);
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ export class TextValueAccessorDirective extends ValueAccessor {
|
||||
}
|
||||
|
||||
@HostListener('ionChange', ['$event.target'])
|
||||
_handleInputEvent(el: any): void {
|
||||
_handleInputEvent(el: HTMLIonInputElement | HTMLIonTextareaElement | HTMLIonSearchbarElement): void {
|
||||
this.handleChangeEvent(el, el.value);
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import { Subscription } from 'rxjs';
|
||||
|
||||
import { raf } from '../../util/util';
|
||||
|
||||
// TODO(FW-2827): types
|
||||
|
||||
@Directive()
|
||||
export class ValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
||||
private onChange: (value: any) => void = () => {
|
||||
|
@ -30,6 +30,8 @@ import { isComponentFactoryResolver } from '../../util/util';
|
||||
import { StackController } from './stack-controller';
|
||||
import { RouteView, getUrl } from './stack-utils';
|
||||
|
||||
// TODO(FW-2827): types
|
||||
|
||||
@Directive({
|
||||
selector: 'ion-router-outlet',
|
||||
exportAs: 'outlet',
|
||||
|
@ -17,6 +17,8 @@ import {
|
||||
toSegments,
|
||||
} from './stack-utils';
|
||||
|
||||
// TODO(FW-2827): types
|
||||
|
||||
export class StackController {
|
||||
private views: RouteView[] = [];
|
||||
private runningTask?: Promise<any>;
|
||||
|
@ -86,6 +86,7 @@ export interface StackEvent {
|
||||
tabSwitch: boolean;
|
||||
}
|
||||
|
||||
// TODO(FW-2827): types
|
||||
export interface RouteView {
|
||||
id: number;
|
||||
url: string;
|
||||
|
@ -108,6 +108,7 @@ export declare interface IonModal extends Components.IonModal {
|
||||
],
|
||||
})
|
||||
export class IonModal {
|
||||
// TODO(FW-2827): type
|
||||
@ContentChild(TemplateRef, { static: false }) template: TemplateRef<any>;
|
||||
|
||||
isCmpOpen: boolean = false;
|
||||
|
@ -99,6 +99,7 @@ export declare interface IonPopover extends Components.IonPopover {
|
||||
],
|
||||
})
|
||||
export class IonPopover {
|
||||
// TODO(FW-2827): type
|
||||
@ContentChild(TemplateRef, { static: false }) template: TemplateRef<any>;
|
||||
|
||||
isCmpOpen: boolean = false;
|
||||
|
@ -21,6 +21,8 @@ import { EnvironmentInjector } from '../di/r3_injector';
|
||||
import { NavParams } from '../directives/navigation/nav-params';
|
||||
import { isComponentFactoryResolver } from '../util/util';
|
||||
|
||||
// TODO(FW-2827): types
|
||||
|
||||
@Injectable()
|
||||
export class AngularDelegate {
|
||||
constructor(private zone: NgZone, private appRef: ApplicationRef) {}
|
||||
|
@ -3,6 +3,8 @@ import { NgZone, Inject, Injectable } from '@angular/core';
|
||||
import { BackButtonEventDetail, KeyboardEventDetail, Platforms, getPlatforms, isPlatform } from '@ionic/core';
|
||||
import { Subscription, Subject } from 'rxjs';
|
||||
|
||||
// TODO(FW-2827): types
|
||||
|
||||
export interface BackButtonEmitter extends Subject<BackButtonEventDetail> {
|
||||
subscribeWithPriority(
|
||||
priority: number,
|
||||
|
@ -4,6 +4,8 @@ import { parse } from 'jsonc-parser';
|
||||
|
||||
const CONFIG_PATH = 'angular.json';
|
||||
|
||||
// TODO(FW-2827): types
|
||||
|
||||
export function readConfig(host: Tree): any {
|
||||
const sourceText = host.read(CONFIG_PATH)?.toString('utf-8');
|
||||
return JSON.parse(sourceText);
|
||||
|
@ -1,5 +1,5 @@
|
||||
export interface IonicGlobal {
|
||||
config?: any;
|
||||
config?: any; // TODO(FW-2827): type
|
||||
asyncQueue?: boolean;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
// TODO(FW-2827): types
|
||||
|
||||
interface ControllerShape<Opts, HTMLElm> {
|
||||
create(options: Opts): Promise<HTMLElm>;
|
||||
dismiss(data?: any, role?: string, id?: string): Promise<boolean>;
|
||||
|
@ -3,6 +3,19 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [6.5.0](https://github.com/ionic-team/ionic/compare/v6.4.3...v6.5.0) (2023-01-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **deps:** update ionicons to 6.1.0 ([#26617](https://github.com/ionic-team/ionic/issues/26617)) ([ccd2a92](https://github.com/ionic-team/ionic/commit/ccd2a9224e018ad0d67903d44ec312934c3b35ec))
|
||||
* **deps:** update ionicons to 6.1.1 ([#26626](https://github.com/ionic-team/ionic/issues/26626)) ([90405eb](https://github.com/ionic-team/ionic/commit/90405eb0af69ce04faf5855189449d0b7518288c))
|
||||
* **router:** export hook interfaces ([#26551](https://github.com/ionic-team/ionic/issues/26551)) ([2752702](https://github.com/ionic-team/ionic/commit/27527025e4588f43f9f79640f0929e7c7d0618ee))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.4.3](https://github.com/ionic-team/ionic/compare/v6.4.2...v6.4.3) (2023-01-18)
|
||||
|
||||
|
||||
|
18
core/package-lock.json
generated
18
core/package-lock.json
generated
@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "@ionic/core",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ionic/core",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.4",
|
||||
"ionicons": "^6.1.1",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -5316,9 +5316,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ionicons": {
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
|
||||
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.1.tgz",
|
||||
"integrity": "sha512-Qe6mx25DFNwA9UL1rhewI5StI3uD4+BqB2KdvLjyWhtvoUXwyAsmfHLZuDANAHQowIKtTt6BZCt5/g5NIQ635Q==",
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.18.0"
|
||||
}
|
||||
@ -14349,9 +14349,9 @@
|
||||
}
|
||||
},
|
||||
"ionicons": {
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.0.4.tgz",
|
||||
"integrity": "sha512-uDNOkBo0OVYV+kIhb51g9mb7r3Z0b+78GPZQBsjXuaetNmrB/mNTqN/uFtO+vxL/rQySKjzk8qeKJI5NWL9Ueg==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-6.1.1.tgz",
|
||||
"integrity": "sha512-Qe6mx25DFNwA9UL1rhewI5StI3uD4+BqB2KdvLjyWhtvoUXwyAsmfHLZuDANAHQowIKtTt6BZCt5/g5NIQ635Q==",
|
||||
"requires": {
|
||||
"@stencil/core": "^2.18.0"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/core",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"description": "Base components for Ionic",
|
||||
"keywords": [
|
||||
"ionic",
|
||||
@ -32,7 +32,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@stencil/core": "^2.18.0",
|
||||
"ionicons": "^6.0.4",
|
||||
"ionicons": "^6.1.1",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -30,7 +30,7 @@ export interface AlertInput {
|
||||
type?: TextFieldTypes | 'checkbox' | 'radio' | 'textarea';
|
||||
name?: string;
|
||||
placeholder?: string;
|
||||
value?: any;
|
||||
value?: any; // TODO(FW-2832): type
|
||||
label?: string;
|
||||
checked?: boolean;
|
||||
disabled?: boolean;
|
||||
@ -60,5 +60,6 @@ export interface AlertButton {
|
||||
role?: 'cancel' | 'destructive' | string;
|
||||
cssClass?: string | string[];
|
||||
id?: string;
|
||||
// TODO(FW-2832): type
|
||||
handler?: (value: any) => AlertButtonOverlayHandler | Promise<AlertButtonOverlayHandler>;
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ import { iosLeaveAnimation } from './animations/ios.leave';
|
||||
import { mdEnterAnimation } from './animations/md.enter';
|
||||
import { mdLeaveAnimation } from './animations/md.leave';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
|
@ -10,7 +10,7 @@ import { isPlatform } from '../../utils/platform';
|
||||
styleUrl: 'app.scss',
|
||||
})
|
||||
export class App implements ComponentInterface {
|
||||
private focusVisible?: any;
|
||||
private focusVisible?: any; // TODO(FW-2832): type
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
|
@ -114,7 +114,7 @@ export class Checkbox implements ComponentInterface {
|
||||
}
|
||||
}
|
||||
|
||||
private onClick = (ev: any) => {
|
||||
private onClick = (ev: Event) => {
|
||||
ev.preventDefault();
|
||||
|
||||
this.setFocus();
|
||||
|
@ -21,7 +21,7 @@ import { createColorClasses, hostContext } from '../../utils/theme';
|
||||
shadow: true,
|
||||
})
|
||||
export class Content implements ComponentInterface {
|
||||
private watchDog: any;
|
||||
private watchDog: ReturnType<typeof setInterval> | null = null;
|
||||
private isScrolling = false;
|
||||
private lastScroll = 0;
|
||||
private queued = false;
|
||||
@ -311,7 +311,7 @@ export class Content implements ComponentInterface {
|
||||
}
|
||||
|
||||
private onScrollEnd() {
|
||||
clearInterval(this.watchDog);
|
||||
if (this.watchDog) clearInterval(this.watchDog);
|
||||
this.watchDog = null;
|
||||
if (this.isScrolling) {
|
||||
this.isScrolling = false;
|
||||
|
@ -95,6 +95,7 @@ export class Datetime implements ComponentInterface {
|
||||
private destroyCalendarListener?: () => void;
|
||||
private destroyKeyboardMO?: () => void;
|
||||
|
||||
// TODO(FW-2832): types (DatetimeParts causes some errors that need untangling)
|
||||
private minParts?: any;
|
||||
private maxParts?: any;
|
||||
private todayParts!: DatetimeParts;
|
||||
|
@ -20,7 +20,7 @@ import { handleFooterFade } from './footer.utils';
|
||||
})
|
||||
export class Footer implements ComponentInterface {
|
||||
private scrollEl?: HTMLElement;
|
||||
private contentScrollCallback: any;
|
||||
private contentScrollCallback?: () => void;
|
||||
private keyboardCtrl: KeyboardController | null = null;
|
||||
|
||||
@State() private keyboardVisible = false;
|
||||
|
@ -29,8 +29,8 @@ import {
|
||||
})
|
||||
export class Header implements ComponentInterface {
|
||||
private scrollEl?: HTMLElement;
|
||||
private contentScrollCallback?: any;
|
||||
private intersectionObserver?: any;
|
||||
private contentScrollCallback?: () => void;
|
||||
private intersectionObserver?: IntersectionObserver;
|
||||
private collapsibleMainHeader?: HTMLElement;
|
||||
private inheritedAttributes: Attributes = {};
|
||||
|
||||
@ -153,9 +153,9 @@ export class Header implements ComponentInterface {
|
||||
this.scrollEl = await getScrollElement(contentEl);
|
||||
|
||||
const headers = pageEl.querySelectorAll('ion-header');
|
||||
this.collapsibleMainHeader = Array.from(headers).find((header: any) => header.collapse !== 'condense') as
|
||||
| HTMLElement
|
||||
| undefined;
|
||||
this.collapsibleMainHeader = Array.from(headers).find(
|
||||
(header: HTMLIonHeaderElement) => header.collapse !== 'condense'
|
||||
) as HTMLElement | undefined;
|
||||
|
||||
if (!this.collapsibleMainHeader) {
|
||||
return;
|
||||
@ -177,7 +177,7 @@ export class Header implements ComponentInterface {
|
||||
* as well as progressively showing/hiding the main header
|
||||
* border as the top-most toolbar collapses or expands.
|
||||
*/
|
||||
const toolbarIntersection = (ev: any) => {
|
||||
const toolbarIntersection = (ev: IntersectionObserverEntry[]) => {
|
||||
handleToolbarIntersection(ev, mainHeaderIndex, scrollHeaderIndex, this.scrollEl!);
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,7 @@ export const createHeaderIndex = (headerEl: HTMLElement | undefined): HeaderInde
|
||||
|
||||
return {
|
||||
el: headerEl,
|
||||
toolbars: Array.from(toolbars).map((toolbar: any) => {
|
||||
toolbars: Array.from(toolbars).map((toolbar: HTMLIonToolbarElement) => {
|
||||
const ionTitleEl = toolbar.querySelector('ion-title');
|
||||
return {
|
||||
el: toolbar,
|
||||
@ -86,7 +86,11 @@ export const setToolbarBackgroundOpacity = (headerEl: HTMLIonHeaderElement, opac
|
||||
}
|
||||
};
|
||||
|
||||
const handleToolbarBorderIntersection = (ev: any, mainHeaderIndex: HeaderIndex, scrollTop: number) => {
|
||||
const handleToolbarBorderIntersection = (
|
||||
ev: IntersectionObserverEntry[],
|
||||
mainHeaderIndex: HeaderIndex,
|
||||
scrollTop: number
|
||||
) => {
|
||||
if (!ev[0].isIntersecting) {
|
||||
return;
|
||||
}
|
||||
@ -113,7 +117,7 @@ const handleToolbarBorderIntersection = (ev: any, mainHeaderIndex: HeaderIndex,
|
||||
* hide the primary toolbar content and show the scrollable toolbar content
|
||||
*/
|
||||
export const handleToolbarIntersection = (
|
||||
ev: any,
|
||||
ev: any, // TODO(FW-2832): type (IntersectionObserverEntry[] triggers errors which should be sorted)
|
||||
mainHeaderIndex: HeaderIndex,
|
||||
scrollHeaderIndex: HeaderIndex,
|
||||
scrollEl: HTMLElement
|
||||
|
@ -24,7 +24,7 @@ export class ItemOptions implements ComponentInterface {
|
||||
/**
|
||||
* Emitted when the item has been fully swiped.
|
||||
*/
|
||||
@Event() ionSwipe!: EventEmitter<any>;
|
||||
@Event() ionSwipe!: EventEmitter<any>; // TODO(FW-2832): type
|
||||
|
||||
/** @internal */
|
||||
@Method()
|
||||
|
@ -39,7 +39,7 @@ export class ItemSliding implements ComponentInterface {
|
||||
private optsWidthRightSide = 0;
|
||||
private optsWidthLeftSide = 0;
|
||||
private sides = ItemSide.None;
|
||||
private tmr: number | undefined;
|
||||
private tmr?: ReturnType<typeof setTimeout>;
|
||||
private leftOptions?: HTMLIonItemOptionsElement;
|
||||
private rightOptions?: HTMLIonItemOptionsElement;
|
||||
private optsDirty = true;
|
||||
@ -418,7 +418,7 @@ export class ItemSliding implements ComponentInterface {
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(!this.disabled);
|
||||
}
|
||||
}, 600) as any;
|
||||
}, 600);
|
||||
|
||||
openSlidingItem = undefined;
|
||||
style.transform = '';
|
||||
|
@ -177,7 +177,7 @@ export class Item implements ComponentInterface, AnchorInterface, ButtonInterfac
|
||||
|
||||
const tagName = (ev.target as HTMLElement).tagName;
|
||||
const updatedStyles = ev.detail;
|
||||
const newStyles = {} as any;
|
||||
const newStyles = {} as CssClassMap;
|
||||
const childStyles = this.itemStyles.get(tagName) || {};
|
||||
|
||||
let hasStyleChange = false;
|
||||
@ -364,7 +364,7 @@ export class Item implements ComponentInterface, AnchorInterface, ButtonInterfac
|
||||
routerDirection,
|
||||
inheritedAriaAttributes,
|
||||
} = this;
|
||||
const childStyles = {} as any;
|
||||
const childStyles = {} as StyleEventDetail;
|
||||
const mode = getIonMode(this);
|
||||
const clickable = this.isClickable();
|
||||
const canActivate = this.canActivate();
|
||||
|
@ -20,6 +20,8 @@ import { iosLeaveAnimation } from './animations/ios.leave';
|
||||
import { mdEnterAnimation } from './animations/md.enter';
|
||||
import { mdLeaveAnimation } from './animations/md.leave';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@ -32,7 +34,7 @@ import { mdLeaveAnimation } from './animations/md.leave';
|
||||
scoped: true,
|
||||
})
|
||||
export class Loading implements ComponentInterface, OverlayInterface {
|
||||
private durationTimeout: any;
|
||||
private durationTimeout?: ReturnType<typeof setTimeout>;
|
||||
|
||||
presented = false;
|
||||
lastFocus?: HTMLElement;
|
||||
|
@ -31,7 +31,7 @@ const focusableQueryString =
|
||||
shadow: true,
|
||||
})
|
||||
export class Menu implements ComponentInterface, MenuI {
|
||||
private animation?: any;
|
||||
private animation?: any; // TODO(FW-2832): type
|
||||
private lastOnEnd = 0;
|
||||
private gesture?: Gesture;
|
||||
private blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });
|
||||
@ -257,6 +257,7 @@ export class Menu implements ComponentInterface, MenuI {
|
||||
|
||||
@Listen('click', { capture: true })
|
||||
onBackdropClick(ev: any) {
|
||||
// TODO(FW-2832): type (CustomEvent triggers errors which should be sorted)
|
||||
if (this._isOpen && this.lastOnEnd < ev.timeStamp - 100) {
|
||||
const shouldClose = ev.composedPath ? !ev.composedPath().includes(this.menuInnerEl) : false;
|
||||
|
||||
|
@ -44,6 +44,8 @@ import { createSheetGesture } from './gestures/sheet';
|
||||
import { createSwipeToCloseGesture } from './gestures/swipe-to-close';
|
||||
import { setCardStatusBarDark, setCardStatusBarDefault } from './utils';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
|
@ -9,6 +9,8 @@ import type {
|
||||
|
||||
import { ViewController } from './view-controller';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export type NavDirection = 'back' | 'forward';
|
||||
|
||||
export type NavComponent = ComponentRef | ViewController;
|
||||
|
@ -6,6 +6,8 @@ export const VIEW_STATE_NEW = 1;
|
||||
export const VIEW_STATE_ATTACHED = 2;
|
||||
export const VIEW_STATE_DESTROYED = 3;
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export class ViewController {
|
||||
state = VIEW_STATE_NEW;
|
||||
nav?: any;
|
||||
|
@ -113,6 +113,7 @@ export class PickerColumnInternal implements ComponentInterface {
|
||||
|
||||
const parentEl = (this.parentEl = this.el.closest('ion-picker-internal') as HTMLIonPickerInternalElement | null);
|
||||
if (parentEl !== null) {
|
||||
// TODO(FW-2832): type
|
||||
parentEl.addEventListener('ionInputModeChange', (ev: any) => this.inputModeChange(ev));
|
||||
}
|
||||
}
|
||||
@ -241,7 +242,7 @@ export class PickerColumnInternal implements ComponentInterface {
|
||||
private initializeScrollListener = () => {
|
||||
const { el } = this;
|
||||
|
||||
let timeout: any;
|
||||
let timeout: ReturnType<typeof setTimeout> | undefined;
|
||||
let activeEl: HTMLElement | null = this.activeItem;
|
||||
|
||||
const scrollCallback = () => {
|
||||
|
@ -28,8 +28,8 @@ export class PickerColumnCmp implements ComponentInterface {
|
||||
private y = 0;
|
||||
private optsEl?: HTMLElement;
|
||||
private gesture?: Gesture;
|
||||
private rafId: any;
|
||||
private tmrId: any;
|
||||
private rafId?: ReturnType<typeof requestAnimationFrame>;
|
||||
private tmrId?: ReturnType<typeof setTimeout>;
|
||||
private noAnimate = true;
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
@ -90,8 +90,8 @@ export class PickerColumnCmp implements ComponentInterface {
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
cancelAnimationFrame(this.rafId);
|
||||
clearTimeout(this.tmrId);
|
||||
if (this.rafId !== undefined) cancelAnimationFrame(this.rafId);
|
||||
if (this.tmrId) clearTimeout(this.tmrId);
|
||||
if (this.gesture) {
|
||||
this.gesture.destroy();
|
||||
this.gesture = undefined;
|
||||
@ -110,7 +110,7 @@ export class PickerColumnCmp implements ComponentInterface {
|
||||
this.velocity = 0;
|
||||
|
||||
// set what y position we're at
|
||||
cancelAnimationFrame(this.rafId);
|
||||
if (this.rafId !== undefined) cancelAnimationFrame(this.rafId);
|
||||
this.update(y, duration, true);
|
||||
|
||||
this.emitColChange();
|
||||
@ -251,7 +251,7 @@ export class PickerColumnCmp implements ComponentInterface {
|
||||
hapticSelectionStart();
|
||||
|
||||
// reset everything
|
||||
cancelAnimationFrame(this.rafId);
|
||||
if (this.rafId !== undefined) cancelAnimationFrame(this.rafId);
|
||||
const options = this.col.options;
|
||||
let minY = options.length - 1;
|
||||
let maxY = 0;
|
||||
|
@ -24,7 +24,7 @@ export class PickerInternal implements ComponentInterface {
|
||||
private highlightEl?: HTMLElement;
|
||||
private actionOnClick?: () => void;
|
||||
private destroyKeypressListener?: () => void;
|
||||
private singleColumnSearchTimeout?: any;
|
||||
private singleColumnSearchTimeout?: ReturnType<typeof setTimeout>;
|
||||
|
||||
@Element() el!: HTMLIonPickerInternalElement;
|
||||
|
||||
@ -76,6 +76,7 @@ export class PickerInternal implements ComponentInterface {
|
||||
* that focused means we are still in input mode.
|
||||
*/
|
||||
private onFocusOut = (ev: any) => {
|
||||
// TODO(FW-2832): type
|
||||
const { relatedTarget } = ev;
|
||||
|
||||
if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN-INTERNAL' && relatedTarget !== this.inputEl)) {
|
||||
@ -89,6 +90,7 @@ export class PickerInternal implements ComponentInterface {
|
||||
* whether to enter/exit input mode.
|
||||
*/
|
||||
private onFocusIn = (ev: any) => {
|
||||
// TODO(FW-2832): type
|
||||
const { target } = ev;
|
||||
|
||||
/**
|
||||
|
@ -17,6 +17,8 @@ import { getClassMap } from '../../utils/theme';
|
||||
import { iosEnterAnimation } from './animations/ios.enter';
|
||||
import { iosLeaveAnimation } from './animations/ios.leave';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@ -29,7 +31,7 @@ import { iosLeaveAnimation } from './animations/ios.leave';
|
||||
scoped: true,
|
||||
})
|
||||
export class Picker implements ComponentInterface, OverlayInterface {
|
||||
private durationTimeout: any;
|
||||
private durationTimeout?: ReturnType<typeof setTimeout>;
|
||||
lastFocus?: HTMLElement;
|
||||
|
||||
@Element() el!: HTMLIonPickerElement;
|
||||
|
@ -14,6 +14,7 @@ const POPOVER_IOS_BODY_PADDING = 5;
|
||||
/**
|
||||
* iOS Popover Enter Animation
|
||||
*/
|
||||
// TODO(FW-2832): types
|
||||
export const iosEnterAnimation = (baseEl: HTMLElement, opts?: any): Animation => {
|
||||
const { event: ev, size, trigger, reference, side, align } = opts;
|
||||
const doc = baseEl.ownerDocument as any;
|
||||
|
@ -8,6 +8,7 @@ const POPOVER_MD_BODY_PADDING = 12;
|
||||
/**
|
||||
* Md Popover Enter Animation
|
||||
*/
|
||||
// TODO(FW-2832): types
|
||||
export const mdEnterAnimation = (baseEl: HTMLElement, opts?: any): Animation => {
|
||||
const { event: ev, size, trigger, reference, side, align } = opts;
|
||||
const doc = baseEl.ownerDocument as any;
|
||||
|
@ -29,6 +29,8 @@ import { mdEnterAnimation } from './animations/md.enter';
|
||||
import { mdLeaveAnimation } from './animations/md.leave';
|
||||
import { configureDismissInteraction, configureKeyboardInteraction, configureTriggerInteraction } from './utils';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
|
@ -3,7 +3,7 @@ import { getElementRoot, raf } from '../../utils/helpers';
|
||||
|
||||
interface InteractionCallback {
|
||||
eventName: string;
|
||||
callback: (ev: any) => void;
|
||||
callback: (ev: any) => void; // TODO(FW-2832): type
|
||||
}
|
||||
|
||||
export interface ReferenceCoordinates {
|
||||
@ -169,7 +169,7 @@ export const configureTriggerInteraction = (
|
||||
*/
|
||||
switch (triggerAction) {
|
||||
case 'hover':
|
||||
let hoverTimeout: any;
|
||||
let hoverTimeout: ReturnType<typeof setTimeout> | undefined;
|
||||
|
||||
triggerCallbacks = [
|
||||
{
|
||||
|
@ -105,6 +105,7 @@ export class RadioGroup implements ComponentInterface {
|
||||
|
||||
@Listen('keydown', { target: 'document' })
|
||||
onKeydown(ev: any) {
|
||||
// TODO(FW-2832): type
|
||||
const inSelectPopover = !!this.el.closest('ion-select-popover');
|
||||
|
||||
if (ev.target && !this.el.contains(ev.target)) {
|
||||
|
@ -79,6 +79,7 @@ export class Radio implements ComponentInterface {
|
||||
/** @internal */
|
||||
@Method()
|
||||
async setFocus(ev: any) {
|
||||
// TODO(FW-2832): type (using Event triggers a build error due to conflict with Stencil Event import)
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
||||
|
@ -22,6 +22,8 @@ import { createColorClasses, hostContext } from '../../utils/theme';
|
||||
|
||||
import type { PinFormatter } from './range-interface';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
|
@ -37,7 +37,7 @@ export class Refresher implements ComponentInterface {
|
||||
private progress = 0;
|
||||
private scrollEl?: HTMLElement;
|
||||
private backgroundContentEl?: HTMLElement;
|
||||
private scrollListenerCallback?: any;
|
||||
private scrollListenerCallback?: () => void;
|
||||
private gesture?: Gesture;
|
||||
|
||||
private pointerDown = false;
|
||||
|
@ -26,6 +26,7 @@ export const createPullingAnimation = (
|
||||
};
|
||||
|
||||
const createBaseAnimation = (pullingRefresherIcon: HTMLElement) => {
|
||||
// TODO(FW-2832): add types/re-evaluate asserting so many things
|
||||
const spinner = pullingRefresherIcon.querySelector('ion-spinner') as HTMLElement;
|
||||
const circle = spinner!.shadowRoot!.querySelector('circle') as any;
|
||||
const spinnerArrowContainer = pullingRefresherIcon.querySelector('.spinner-arrow-container') as HTMLElement;
|
||||
|
@ -7,6 +7,8 @@ import { findClosestIonContent, getScrollElement } from '../../utils/content';
|
||||
import { raf } from '../../utils/helpers';
|
||||
import { hapticSelectionChanged, hapticSelectionEnd, hapticSelectionStart } from '../../utils/native/haptic';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
const enum ReorderGroupState {
|
||||
Idle = 0,
|
||||
Active = 1,
|
||||
|
@ -3,6 +3,8 @@ import { Component, Event, Prop, Watch } from '@stencil/core';
|
||||
|
||||
import type { NavigationHookCallback } from './route-interface';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
@Component({
|
||||
tag: 'ion-route',
|
||||
})
|
||||
|
@ -29,6 +29,7 @@ import { transition } from '../../utils/transition';
|
||||
})
|
||||
export class RouterOutlet implements ComponentInterface, NavOutlet {
|
||||
private activeEl: HTMLElement | undefined;
|
||||
// TODO(FW-2832): types
|
||||
private activeComponent: any;
|
||||
private activeParams: any;
|
||||
private waitPromise?: Promise<void>;
|
||||
|
@ -26,7 +26,7 @@ export class Segment implements ComponentInterface {
|
||||
private checked?: HTMLIonSegmentButtonElement;
|
||||
|
||||
// Value to be emitted when gesture ends
|
||||
private valueAfterGesture?: any;
|
||||
private valueAfterGesture?: string;
|
||||
|
||||
@Element() el!: HTMLIonSegmentElement;
|
||||
|
||||
|
@ -6,6 +6,8 @@ import type { SelectPopoverOption } from '../../interface';
|
||||
import { safeCall } from '../../utils/overlays';
|
||||
import { getClassMap } from '../../utils/theme';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
@ -22,6 +22,8 @@ import { watchForOptions } from '../../utils/watch-options';
|
||||
|
||||
import type { SelectCompareFn } from './select-interface';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
|
@ -18,7 +18,7 @@ export interface SpinnerData {
|
||||
y2?: number;
|
||||
cx?: number;
|
||||
cy?: number;
|
||||
style: any;
|
||||
style: any; // TODO(FW-2832): type
|
||||
viewBox?: string;
|
||||
transform?: string;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ export class Spinner implements ComponentInterface {
|
||||
const spinnerName = self.getName();
|
||||
const spinner = SPINNERS[spinnerName] ?? SPINNERS['lines'];
|
||||
const duration = typeof self.duration === 'number' && self.duration > 10 ? self.duration : spinner.dur;
|
||||
const svgs: any[] = [];
|
||||
const svgs: any[] = []; // TODO(FW-2832): type
|
||||
|
||||
if (spinner.circles !== undefined) {
|
||||
for (let i = 0; i < spinner.circles; i++) {
|
||||
|
@ -3,6 +3,8 @@ import { Build, Component, Element, Event, Host, Prop, State, Watch, h } from '@
|
||||
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
const SPLIT_PANE_MAIN = 'split-pane-main';
|
||||
const SPLIT_PANE_SIDE = 'split-pane-side';
|
||||
const QUERY: { [key: string]: string } = {
|
||||
|
@ -22,6 +22,8 @@ import { mdEnterAnimation } from './animations/md.enter';
|
||||
import { mdLeaveAnimation } from './animations/md.leave';
|
||||
import type { ToastAttributes, ToastPosition } from './toast-interface';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
@ -40,7 +42,7 @@ import type { ToastAttributes, ToastPosition } from './toast-interface';
|
||||
shadow: true,
|
||||
})
|
||||
export class Toast implements ComponentInterface, OverlayInterface {
|
||||
private durationTimeout: any;
|
||||
private durationTimeout?: ReturnType<typeof setTimeout>;
|
||||
|
||||
presented = false;
|
||||
|
||||
|
@ -60,7 +60,7 @@ export class Toolbar implements ComponentInterface {
|
||||
|
||||
const tagName = (ev.target as HTMLElement).tagName;
|
||||
const updatedStyles = ev.detail;
|
||||
const newStyles = {} as any;
|
||||
const newStyles = {} as CssClassMap;
|
||||
const childStyles = this.childrenStyles.get(tagName) || {};
|
||||
|
||||
let hasStyleChange = false;
|
||||
|
@ -1,3 +1,5 @@
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export interface Cell {
|
||||
i: number;
|
||||
index: number;
|
||||
|
@ -42,6 +42,8 @@ import {
|
||||
updateVDom,
|
||||
} from './virtual-scroll-utils';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
@Component({
|
||||
tag: 'ion-virtual-scroll',
|
||||
styleUrl: 'virtual-scroll.scss',
|
||||
|
@ -1,5 +1,7 @@
|
||||
import type { IonicConfig } from '../interface';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export class Config {
|
||||
private m = new Map<keyof IonicConfig, any>();
|
||||
|
||||
|
@ -5,6 +5,8 @@ import { isPlatform, setupPlatforms } from '../utils/platform';
|
||||
|
||||
import { config, configFromSession, configFromURL, saveConfig } from './config';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
declare const Context: any;
|
||||
|
||||
let defaultMode: Mode;
|
||||
|
1
core/src/interface.d.ts
vendored
1
core/src/interface.d.ts
vendored
@ -22,6 +22,7 @@ export * from './components/picker/picker-interface';
|
||||
export * from './components/popover/popover-interface';
|
||||
export * from './components/radio-group/radio-group-interface';
|
||||
export * from './components/range/range-interface';
|
||||
export * from './components/route/route-interface';
|
||||
export * from './components/router/utils/interface';
|
||||
export * from './components/refresher/refresher-interface';
|
||||
export * from './components/reorder-group/reorder-group-interface';
|
||||
|
@ -1,3 +1,5 @@
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export interface Animation {
|
||||
parentAnimation: Animation | undefined;
|
||||
elements: HTMLElement[];
|
||||
|
@ -38,8 +38,8 @@ const convertCamelCaseToHypen = (str: string) => {
|
||||
|
||||
export const getAnimationPrefix = (el: HTMLElement): string => {
|
||||
if (animationPrefix === undefined) {
|
||||
const supportsUnprefixed = (el.style as any).animationName !== undefined;
|
||||
const supportsWebkitPrefix = (el.style as any).webkitAnimationName !== undefined;
|
||||
const supportsUnprefixed = el.style.animationName !== undefined;
|
||||
const supportsWebkitPrefix = el.style.webkitAnimationName !== undefined;
|
||||
animationPrefix = !supportsUnprefixed && supportsWebkitPrefix ? '-webkit-' : '';
|
||||
}
|
||||
return animationPrefix;
|
||||
@ -57,7 +57,7 @@ export const removeStyleProperty = (element: HTMLElement, propertyName: string)
|
||||
|
||||
export const animationEnd = (el: HTMLElement | null, callback: (ev?: TransitionEvent) => void) => {
|
||||
let unRegTrans: (() => void) | undefined;
|
||||
const opts: any = { passive: true };
|
||||
const opts: AddEventListenerOptions = { passive: true };
|
||||
|
||||
const unregister = () => {
|
||||
if (unRegTrans) {
|
||||
@ -85,6 +85,7 @@ export const animationEnd = (el: HTMLElement | null, callback: (ev?: TransitionE
|
||||
return unregister;
|
||||
};
|
||||
|
||||
// TODO(FW-2832): type
|
||||
export const generateKeyframeRules = (keyframes: any[] = []) => {
|
||||
return keyframes
|
||||
.map((keyframe) => {
|
||||
@ -115,6 +116,7 @@ export const generateKeyframeName = (keyframeRules: string) => {
|
||||
|
||||
export const getStyleContainer = (element: HTMLElement) => {
|
||||
// getRootNode is not always available in SSR environments.
|
||||
// TODO(FW-2832): types
|
||||
const rootNode = element.getRootNode !== undefined ? (element.getRootNode() as any) : element;
|
||||
return rootNode.head || rootNode;
|
||||
};
|
||||
|
@ -23,6 +23,8 @@ import {
|
||||
setStyleProperty,
|
||||
} from './animation-utils';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
interface AnimationOnFinishCallback {
|
||||
c: AnimationLifecycle;
|
||||
o?: AnimationCallbackOptions;
|
||||
|
@ -201,6 +201,7 @@ export interface IonicConfig {
|
||||
hideCaretOnScroll?: boolean;
|
||||
|
||||
// INTERNAL configs
|
||||
// TODO(FW-2832): types
|
||||
persistConfig?: boolean;
|
||||
_forceStatusbarPadding?: boolean;
|
||||
_testing?: boolean;
|
||||
|
@ -62,6 +62,7 @@ export const findClosestIonContent = (el: Element) => {
|
||||
* Scrolls to the top of the element. If an `ion-content` is found, it will scroll
|
||||
* using the public API `scrollToTop` with a duration.
|
||||
*/
|
||||
// TODO(FW-2832): type
|
||||
export const scrollToTop = (el: HTMLElement, durationMs: number): Promise<any> => {
|
||||
if (isIonContent(el)) {
|
||||
const content = el as HTMLIonContentElement;
|
||||
|
@ -32,8 +32,8 @@ export const startFocusVisible = (rootEl?: HTMLElement) => {
|
||||
setFocus([]);
|
||||
};
|
||||
|
||||
const onKeydown = (ev: any) => {
|
||||
keyboardMode = FOCUS_KEYS.includes(ev.key);
|
||||
const onKeydown = (ev: Event) => {
|
||||
keyboardMode = FOCUS_KEYS.includes((ev as KeyboardEvent).key);
|
||||
if (!keyboardMode) {
|
||||
setFocus([]);
|
||||
}
|
||||
@ -41,6 +41,7 @@ export const startFocusVisible = (rootEl?: HTMLElement) => {
|
||||
const onFocusin = (ev: Event) => {
|
||||
if (keyboardMode && ev.composedPath !== undefined) {
|
||||
const toFocus = ev.composedPath().filter((el: any) => {
|
||||
// TODO(FW-2832): type
|
||||
if (el.classList) {
|
||||
return el.classList.contains(ION_FOCUSABLE);
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ import type { ComponentRef, FrameworkDelegate } from '../interface';
|
||||
|
||||
import { componentOnReady } from './helpers';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export const attachComponent = async (
|
||||
delegate: FrameworkDelegate | undefined,
|
||||
container: Element,
|
||||
|
@ -2,6 +2,8 @@ import { GESTURE_CONTROLLER } from './gesture-controller';
|
||||
import { createPointerEvents } from './pointer-events';
|
||||
import { createPanRecognizer } from './recognizers';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export const createGesture = (config: GestureConfig): Gesture => {
|
||||
let hasCapturedPan = false;
|
||||
let hasStartedPan = false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
export const addEventListener = (
|
||||
el: any,
|
||||
el: any, // TODO(FW-2832): type
|
||||
eventName: string,
|
||||
callback: EventListenerOrEventListenerObject,
|
||||
opts: {
|
||||
|
@ -2,6 +2,7 @@ import { addEventListener } from './listener';
|
||||
|
||||
const MOUSE_WAIT = 2000;
|
||||
|
||||
// TODO(FW-2832): types
|
||||
export const createPointerEvents = (
|
||||
el: Node,
|
||||
pointerDown: any,
|
||||
|
@ -1,5 +1,6 @@
|
||||
import type { BackButtonEvent } from '../interface';
|
||||
|
||||
// TODO(FW-2832): type
|
||||
type Handler = (processNextHandler: () => void) => Promise<any> | void | null;
|
||||
|
||||
interface HandlerRegister {
|
||||
|
@ -2,6 +2,8 @@ import type { EventEmitter } from '@stencil/core';
|
||||
|
||||
import type { Side } from '../interface';
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
declare const __zone_symbol__requestAnimationFrame: any;
|
||||
declare const requestAnimationFrame: any;
|
||||
|
||||
|
@ -18,6 +18,7 @@ export const relocateInput = (
|
||||
}
|
||||
};
|
||||
|
||||
// TODO(FW-2832): type
|
||||
export const isFocused = (input: HTMLInputElement | HTMLTextAreaElement): boolean => {
|
||||
return input === (input as any).getRootNode().activeElement;
|
||||
};
|
||||
|
@ -15,7 +15,7 @@ export const enableInputBlurring = () => {
|
||||
focused = true;
|
||||
};
|
||||
|
||||
const onTouchend = (ev: any) => {
|
||||
const onTouchend = (ev: TouchEvent) => {
|
||||
// if app did scroll return early
|
||||
if (didScroll) {
|
||||
didScroll = false;
|
||||
|
@ -12,7 +12,7 @@ export const enableScrollAssist = (
|
||||
keyboardHeight: number,
|
||||
disableClonedInput = false
|
||||
) => {
|
||||
let coord: any;
|
||||
let coord: { x: number; y: number } | undefined;
|
||||
const touchStart = (ev: Event) => {
|
||||
coord = pointerCoord(ev);
|
||||
};
|
||||
@ -75,7 +75,7 @@ const jsSetFocus = async (
|
||||
raf(() => componentEl.click());
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
let scrollContentTimeout: any;
|
||||
let scrollContentTimeout: ReturnType<typeof setTimeout>;
|
||||
const scrollContent = async () => {
|
||||
// clean up listeners and timeouts
|
||||
if (scrollContentTimeout !== undefined) {
|
||||
|
@ -13,7 +13,7 @@ export const getScrollData = (componentEl: HTMLElement, contentEl: HTMLElement,
|
||||
itemEl.getBoundingClientRect(),
|
||||
contentEl.getBoundingClientRect(),
|
||||
keyboardHeight,
|
||||
(componentEl as any).ownerDocument.defaultView.innerHeight
|
||||
(componentEl as any).ownerDocument.defaultView.innerHeight // TODO(FW-2832): type
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -5,6 +5,7 @@ const PADDING_TIMER_KEY = '$ionPaddingTimer';
|
||||
export const enableScrollPadding = (keyboardHeight: number) => {
|
||||
const doc = document;
|
||||
|
||||
// TODO(FW-2832): types
|
||||
const onFocusin = (ev: any) => {
|
||||
setScrollPadding(ev.target, keyboardHeight);
|
||||
};
|
||||
|
@ -101,6 +101,8 @@ export const startInputShims = (config: Config, platform: 'ios' | 'android') =>
|
||||
registerInput(input);
|
||||
}
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
doc.addEventListener('ionInputDidLoad', ((ev: InputEvent) => {
|
||||
registerInput(ev.detail);
|
||||
}) as any);
|
||||
|
@ -2,6 +2,8 @@ export const KEYBOARD_DID_OPEN = 'ionKeyboardDidShow';
|
||||
export const KEYBOARD_DID_CLOSE = 'ionKeyboardDidHide';
|
||||
const KEYBOARD_THRESHOLD = 150;
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
let previousVisualViewport: any = {};
|
||||
let currentVisualViewport: any = {};
|
||||
|
||||
|
@ -166,7 +166,7 @@ const createMenuController = () => {
|
||||
};
|
||||
|
||||
const _createAnimation = (type: string, menuCmp: MenuI) => {
|
||||
const animationBuilder = menuAnimations.get(type) as any;
|
||||
const animationBuilder = menuAnimations.get(type) as any; // TODO(FW-2832): type
|
||||
if (!animationBuilder) {
|
||||
throw new Error('animation not registered');
|
||||
}
|
||||
@ -209,6 +209,7 @@ const createMenuController = () => {
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
document.addEventListener('ionBackButton', (ev: any) => {
|
||||
// TODO(FW-2832): type
|
||||
const openMenu = _getOpenSync();
|
||||
if (openMenu) {
|
||||
(ev as BackButtonEvent).detail.register(MENU_BACK_BUTTON_PRIORITY, () => {
|
||||
|
@ -2,6 +2,8 @@ import { config } from '../global/config';
|
||||
|
||||
export type Platforms = keyof typeof PLATFORMS_MAP;
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
interface IsPlatformSignature {
|
||||
(plt: Platforms): boolean;
|
||||
(win: Window, plt: Platforms): boolean;
|
||||
|
@ -82,6 +82,7 @@ export const sanitizeDOMString = (untrustedString: IonicSafeString | string | un
|
||||
* and then recursively dig down into any child elements to
|
||||
* clean those up as well
|
||||
*/
|
||||
// TODO(FW-2832): type (using Element triggers other type errors as well)
|
||||
const sanitizeElement = (element: any) => {
|
||||
// IE uses childNodes, so ignore nodes that are not elements
|
||||
if (element.nodeType && element.nodeType !== 1) {
|
||||
@ -123,6 +124,7 @@ const sanitizeElement = (element: any) => {
|
||||
* IE doesn't always support .children
|
||||
* so we revert to .childNodes instead
|
||||
*/
|
||||
// TODO(FW-2832): type
|
||||
const getElementChildren = (el: any) => {
|
||||
return el.children != null ? el.children : el.childNodes;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@ export const startTapClick = (config: Config) => {
|
||||
|
||||
let activatableEle: HTMLElement | undefined;
|
||||
let activeRipple: Promise<() => void> | undefined;
|
||||
let activeDefer: any;
|
||||
let activeDefer: ReturnType<typeof setTimeout> | undefined;
|
||||
|
||||
const useRippleEffect = config.getBoolean('animated', true) && config.getBoolean('rippleEffect', true);
|
||||
const clearDefers = new WeakMap<HTMLElement, any>();
|
||||
@ -43,7 +43,7 @@ export const startTapClick = (config: Config) => {
|
||||
};
|
||||
|
||||
const cancelActive = () => {
|
||||
clearTimeout(activeDefer);
|
||||
if (activeDefer) clearTimeout(activeDefer);
|
||||
activeDefer = undefined;
|
||||
if (activatableEle) {
|
||||
removeActivated(false);
|
||||
@ -67,7 +67,7 @@ export const startTapClick = (config: Config) => {
|
||||
if (el && el === activatableEle) {
|
||||
return;
|
||||
}
|
||||
clearTimeout(activeDefer);
|
||||
if (activeDefer) clearTimeout(activeDefer);
|
||||
activeDefer = undefined;
|
||||
|
||||
const { x, y } = pointerCoord(ev);
|
||||
@ -163,6 +163,7 @@ export const startTapClick = (config: Config) => {
|
||||
doc.addEventListener('mouseup', onMouseUp, true);
|
||||
};
|
||||
|
||||
// TODO(FW-2832): type
|
||||
const getActivatableTarget = (ev: UIEvent): any => {
|
||||
if (ev.composedPath !== undefined) {
|
||||
/**
|
||||
|
@ -12,6 +12,8 @@ import { componentOnReady, raf } from '../helpers';
|
||||
const iosTransitionAnimation = () => import('./ios.transition');
|
||||
const mdTransitionAnimation = () => import('./md.transition');
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export const transition = (opts: TransitionOptions): Promise<TransitionResult> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
writeTask(() => {
|
||||
|
@ -5,6 +5,8 @@ import { getIonPageElement } from '../transition';
|
||||
|
||||
const DURATION = 540;
|
||||
|
||||
// TODO(FW-2832): types
|
||||
|
||||
const getClonedElement = (tagName: string): any => {
|
||||
return document.querySelector(`${tagName}.ion-cloned-element`) as any;
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
// TODO(FW-2832): types
|
||||
|
||||
export const watchForOptions = <T extends HTMLElement>(
|
||||
containerEl: HTMLElement,
|
||||
tagName: string,
|
||||
|
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [6.5.0](https://github.com/ionic-team/ionic-docs/compare/v6.4.3...v6.5.0) (2023-01-18)
|
||||
|
||||
**Note:** Version bump only for package @ionic/docs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.4.3](https://github.com/ionic-team/ionic-docs/compare/v6.4.2...v6.4.3) (2023-01-18)
|
||||
|
||||
**Note:** Version bump only for package @ionic/docs
|
||||
|
4
docs/package-lock.json
generated
4
docs/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@ionic/docs",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@ionic/docs",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/docs",
|
||||
"version": "6.4.3",
|
||||
"version": "6.5.0",
|
||||
"description": "Pre-packaged API documentation for the Ionic docs.",
|
||||
"main": "core.json",
|
||||
"types": "core.d.ts",
|
||||
|
@ -5,5 +5,5 @@
|
||||
"angular",
|
||||
"packages/*"
|
||||
],
|
||||
"version": "6.4.3"
|
||||
"version": "6.5.0"
|
||||
}
|
||||
|
@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [6.5.0](https://github.com/ionic-team/ionic/compare/v6.4.3...v6.5.0) (2023-01-18)
|
||||
|
||||
**Note:** Version bump only for package @ionic/angular-server
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.4.3](https://github.com/ionic-team/ionic/compare/v6.4.2...v6.4.3) (2023-01-18)
|
||||
|
||||
**Note:** Version bump only for package @ionic/angular-server
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user