chore(): sync with main

This commit is contained in:
Liam DeBeasi
2023-02-01 09:37:33 -05:00
23 changed files with 271 additions and 46 deletions

View File

@ -3,8 +3,7 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [7.0.0-beta.0](https://github.com/ionic-team/ionic/compare/v6.5.1...v7.0.0-beta.0) (2023-01-25)
## [6.5.2](https://github.com/ionic-team/ionic/compare/v6.5.1...v6.5.2) (2023-02-01)
### Bug Fixes
@ -69,6 +68,12 @@ Angular:
* **checkbox:** `ionChange` is no longer emitted when the `checked` property of `ion-checkbox` is modified externally. `ionChange` is only emitted from user committed changes, such as clicking or tapping the checkbox.
* **accordion:** `ionChange` is no longer emitted when the `value` of `ion-accordion-group` is modified externally. `ionChange` is only emitted from user committed changes, such as clicking or tapping the accordion header.
# [7.0.0-beta.0](https://github.com/ionic-team/ionic/compare/v6.5.1...v7.0.0-beta.0) (2023-01-25)
### Bug Fixes
* **popover:** popover opens on chrome 109 ([#26672](https://github.com/ionic-team/ionic/issues/26672)) ([69d89ea](https://github.com/ionic-team/ionic/commit/69d89eae940ccd8b0cca379a961166c4592f34c7)), closes [#26643](https://github.com/ionic-team/ionic/issues/26643)

View File

@ -30,9 +30,17 @@ export class AngularDelegate {
create(
resolverOrInjector: ComponentFactoryResolver,
injector: Injector,
location?: ViewContainerRef
location?: ViewContainerRef,
elementReferenceKey?: string
): AngularFrameworkDelegate {
return new AngularFrameworkDelegate(resolverOrInjector, injector, location, this.appRef, this.zone);
return new AngularFrameworkDelegate(
resolverOrInjector,
injector,
location,
this.appRef,
this.zone,
elementReferenceKey
);
}
}
@ -45,12 +53,29 @@ export class AngularFrameworkDelegate implements FrameworkDelegate {
private injector: Injector,
private location: ViewContainerRef | undefined,
private appRef: ApplicationRef,
private zone: NgZone
private zone: NgZone,
private elementReferenceKey?: string
) {}
attachViewToDom(container: any, component: any, params?: any, cssClasses?: string[]): Promise<any> {
return this.zone.run(() => {
return new Promise((resolve) => {
const componentProps = {
...params,
};
/**
* Ionic Angular passes a reference to a modal
* or popover that can be accessed using a
* variable in the overlay component. If
* elementReferenceKey is defined, then we should
* pass a reference to the component using
* elementReferenceKey as the key.
*/
if (this.elementReferenceKey !== undefined) {
componentProps[this.elementReferenceKey] = container;
}
const el = attachView(
this.zone,
this.resolverOrInjector,
@ -61,7 +86,7 @@ export class AngularFrameworkDelegate implements FrameworkDelegate {
this.elEventsMap,
container,
component,
params,
componentProps,
cssClasses
);
resolve(el);

View File

@ -21,7 +21,12 @@ export class ModalController extends OverlayBaseController<ModalOptions, HTMLIon
create(opts: ModalOptions): Promise<HTMLIonModalElement> {
return super.create({
...opts,
delegate: this.angularDelegate.create(this.resolver ?? this.environmentInjector, this.injector),
delegate: this.angularDelegate.create(
this.resolver ?? this.environmentInjector,
this.injector,
undefined,
'modal'
),
});
}
}

View File

@ -21,7 +21,12 @@ export class PopoverController extends OverlayBaseController<PopoverOptions, HTM
create(opts: PopoverOptions): Promise<HTMLIonPopoverElement> {
return super.create({
...opts,
delegate: this.angularDelegate.create(this.resolver ?? this.environmentInjector, this.injector),
delegate: this.angularDelegate.create(
this.resolver ?? this.environmentInjector,
this.injector,
undefined,
'popover'
),
});
}
}