mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(react): fix test app navigation and routing
This commit is contained in:
@@ -36,6 +36,7 @@ import { defineCustomElement as defineIonHeader } from '@ionic/core/components/i
|
||||
import { defineCustomElement as defineIonImg } from '@ionic/core/components/ion-img.js';
|
||||
import { defineCustomElement as defineIonInfiniteScroll } from '@ionic/core/components/ion-infinite-scroll.js';
|
||||
import { defineCustomElement as defineIonInfiniteScrollContent } from '@ionic/core/components/ion-infinite-scroll-content.js';
|
||||
import { defineCustomElement as defineIonInputOtp } from '@ionic/core/components/ion-input-otp.js';
|
||||
import { defineCustomElement as defineIonInputPasswordToggle } from '@ionic/core/components/ion-input-password-toggle.js';
|
||||
import { defineCustomElement as defineIonItem } from '@ionic/core/components/ion-item.js';
|
||||
import { defineCustomElement as defineIonItemDivider } from '@ionic/core/components/ion-item-divider.js';
|
||||
@@ -981,6 +982,71 @@ export class IonInfiniteScrollContent {
|
||||
export declare interface IonInfiniteScrollContent extends Components.IonInfiniteScrollContent {}
|
||||
|
||||
|
||||
@ProxyCmp({
|
||||
defineCustomElementFn: defineIonInputOtp,
|
||||
inputs: ['autocapitalize', 'color', 'disabled', 'fill', 'inputmode', 'length', 'pattern', 'readonly', 'separators', 'shape', 'size', 'type', 'value'],
|
||||
methods: ['setFocus']
|
||||
})
|
||||
@Component({
|
||||
selector: 'ion-input-otp',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: '<ng-content></ng-content>',
|
||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
||||
inputs: ['autocapitalize', 'color', 'disabled', 'fill', 'inputmode', 'length', 'pattern', 'readonly', 'separators', 'shape', 'size', 'type', 'value'],
|
||||
standalone: true
|
||||
})
|
||||
export class IonInputOtp {
|
||||
protected el: HTMLIonInputOtpElement;
|
||||
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
||||
c.detach();
|
||||
this.el = r.nativeElement;
|
||||
proxyOutputs(this, this.el, ['ionInput', 'ionChange', 'ionComplete', 'ionBlur', 'ionFocus']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
import type { InputOtpInputEventDetail as IIonInputOtpInputOtpInputEventDetail } from '@ionic/core/components';
|
||||
import type { InputOtpChangeEventDetail as IIonInputOtpInputOtpChangeEventDetail } from '@ionic/core/components';
|
||||
import type { InputOtpCompleteEventDetail as IIonInputOtpInputOtpCompleteEventDetail } from '@ionic/core/components';
|
||||
|
||||
export declare interface IonInputOtp extends Components.IonInputOtp {
|
||||
/**
|
||||
* The `ionInput` event is fired each time the user modifies the input's value.
|
||||
Unlike the `ionChange` event, the `ionInput` event is fired for each alteration
|
||||
to the input's value. This typically happens for each keystroke as the user types.
|
||||
|
||||
For elements that accept text input (`type=text`, `type=tel`, etc.), the interface
|
||||
is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,
|
||||
the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If
|
||||
the input is cleared on edit, the type is `null`.
|
||||
*/
|
||||
ionInput: EventEmitter<CustomEvent<IIonInputOtpInputOtpInputEventDetail>>;
|
||||
/**
|
||||
* The `ionChange` event is fired when the user modifies the input's value.
|
||||
Unlike the `ionInput` event, the `ionChange` event is only fired when changes
|
||||
are committed, not as the user types.
|
||||
|
||||
The `ionChange` event fires when the `<ion-input-otp>` component loses
|
||||
focus after its value has changed.
|
||||
|
||||
This event will not emit when programmatically setting the `value` property.
|
||||
*/
|
||||
ionChange: EventEmitter<CustomEvent<IIonInputOtpInputOtpChangeEventDetail>>;
|
||||
/**
|
||||
* Emitted when all input boxes have been filled with valid values.
|
||||
*/
|
||||
ionComplete: EventEmitter<CustomEvent<IIonInputOtpInputOtpCompleteEventDetail>>;
|
||||
/**
|
||||
* Emitted when the input group loses focus.
|
||||
*/
|
||||
ionBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
||||
/**
|
||||
* Emitted when the input group has focus.
|
||||
*/
|
||||
ionFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
||||
}
|
||||
|
||||
|
||||
@ProxyCmp({
|
||||
defineCustomElementFn: defineIonInputPasswordToggle,
|
||||
inputs: ['color', 'hideIcon', 'mode', 'showIcon']
|
||||
|
||||
Reference in New Issue
Block a user