refactor(picker): rename internal picker components to ion-picker and ion-picker-column (#28589)

This commit is contained in:
Shawn Taylor
2023-11-28 16:17:28 -05:00
committed by GitHub
parent cc45e2220b
commit 5e47412e1f
69 changed files with 439 additions and 294 deletions

View File

@@ -51,6 +51,8 @@ export const DIRECTIVES = [
d.IonMenuToggle,
d.IonNavLink,
d.IonNote,
d.IonPicker,
d.IonPickerColumn,
d.IonPickerLegacy,
d.IonProgressBar,
d.IonRadio,

View File

@@ -1417,6 +1417,64 @@ export class IonNote {
export declare interface IonNote extends Components.IonNote {}
@ProxyCmp({
inputs: ['mode']
})
@Component({
selector: 'ion-picker',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['mode'],
})
export class IonPicker {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['ionInputModeChange']);
}
}
import type { PickerChangeEventDetail as IIonPickerPickerChangeEventDetail } from '@ionic/core';
export declare interface IonPicker extends Components.IonPicker {
ionInputModeChange: EventEmitter<CustomEvent<IIonPickerPickerChangeEventDetail>>;
}
@ProxyCmp({
inputs: ['color', 'disabled', 'items', 'mode', 'value']
})
@Component({
selector: 'ion-picker-column',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['color', 'disabled', 'items', 'mode', 'value'],
})
export class IonPickerColumn {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['ionChange']);
}
}
import type { PickerColumnItem as IIonPickerColumnPickerColumnItem } from '@ionic/core';
export declare interface IonPickerColumn extends Components.IonPickerColumn {
/**
* Emitted when the value has changed.
*/
ionChange: EventEmitter<CustomEvent<IIonPickerColumnPickerColumnItem>>;
}
@ProxyCmp({
inputs: ['animated', 'backdropDismiss', 'buttons', 'columns', 'cssClass', 'duration', 'enterAnimation', 'htmlAttributes', 'isOpen', 'keyboardClose', 'leaveAnimation', 'mode', 'showBackdrop', 'trigger'],
methods: ['present', 'dismiss', 'onDidDismiss', 'onWillDismiss', 'getColumn']