Skip to content

Commit f91303f

Browse files
committed
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular into deps-update
2 parents ca361f6 + 49f15c2 commit f91303f

File tree

68 files changed

+331
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+331
-297
lines changed

package-lock.json

Lines changed: 16 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"@types/source-map": "0.5.2",
7676
"express": "^5.1.0",
7777
"fflate": "^0.8.1",
78-
"igniteui-theming": "^19.2.3",
78+
"igniteui-theming": "^19.3.1",
7979
"igniteui-trial-watermark": "^3.1.0",
8080
"lodash-es": "^4.17.21",
8181
"rxjs": "^7.8.2",
@@ -120,8 +120,8 @@
120120
"hammerjs": "^2.0.8",
121121
"ig-typedoc-theme": "^6.0.0",
122122
"igniteui-dockmanager": "^1.17.0",
123-
"igniteui-sassdoc-theme": "^2.0.1",
124-
"igniteui-webcomponents": "6.1.1",
123+
"igniteui-sassdoc-theme": "^2.0.2",
124+
"igniteui-webcomponents": "6.2.1",
125125
"jasmine": "^5.6.0",
126126
"jasmine-core": "^5.6.0",
127127
"karma": "^6.4.4",

projects/igniteui-angular-elements/src/app/custom-strategy.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { ApplicationRef, ChangeDetectorRef, ComponentFactory, ComponentRef, DestroyRef, EventEmitter, Injector, OnChanges, QueryList, Type, ViewContainerRef, reflectComponentType } from '@angular/core';
1+
import { ApplicationRef, ComponentFactory, ComponentRef, DestroyRef, EventEmitter, Injector, QueryList, Type, ViewContainerRef, reflectComponentType } from '@angular/core';
22
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
33
import { NgElement, NgElementStrategyEvent } from '@angular/elements';
44
import { fromEvent, Observable } from 'rxjs';
55
import { map, takeUntil } from 'rxjs/operators';
66
import { ComponentConfig, ContentQueryMeta } from './component-config';
77

8-
import { ComponentNgElementStrategy, ComponentNgElementStrategyFactory, extractProjectableNodes, isFunction } from './ng-element-strategy';
8+
import { ComponentNgElementStrategy, ComponentNgElementStrategyFactory, extractProjectableNodes } from './ng-element-strategy';
99
import { TemplateWrapperComponent } from './wrapper/wrapper.component';
1010

1111
export const ComponentRefKey = Symbol('ComponentRef');
@@ -61,8 +61,13 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
6161
return this._configSelectors;
6262
}
6363

64-
constructor(private _componentFactory: ComponentFactory<any>, private _injector: Injector, private config: ComponentConfig[]) {
65-
super(_componentFactory, _injector);
64+
constructor(
65+
private _componentFactory: ComponentFactory<any>,
66+
private _injector: Injector,
67+
private _inputMap: Map<string, string>,
68+
private config: ComponentConfig[],
69+
) {
70+
super(_componentFactory, _injector, _inputMap);
6671
}
6772

6873
protected override async initializeComponent(element: HTMLElement) {
@@ -146,9 +151,6 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
146151
);
147152
(this as any).componentRef = this._componentFactory.create(childInjector, projectableNodes, element);
148153
this.setComponentRef((this as any).componentRef);
149-
(this as any).viewChangeDetectorRef = (this as any).componentRef.injector.get(ChangeDetectorRef);
150-
151-
(this as any).implementsOnChanges = isFunction(((this as any).componentRef.instance as OnChanges).ngOnChanges);
152154

153155
//we need a name ref on the WC element to be copied down for the purposes of blazor.
154156
//alternatively we need to be able to hop back out to the WC element on demand.
@@ -161,7 +163,8 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
161163
this.initializeInputs();
162164
this.initializeOutputs((this as any).componentRef);
163165

164-
this.detectChanges();
166+
// TODO(D.P.): Temporary maintain pre-check for ngAfterViewInit handling on _init flag w/ ngDoCheck interaction of row island
167+
(this as any).componentRef.changeDetectorRef.detectChanges();
165168

166169
if (parentAnchor && parentInjector) {
167170
// attempt to attach the newly created ViewRef to the parents's instead of the App global
@@ -172,10 +175,10 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
172175
parentAnchor.insert((this as any).componentRef.hostView); //bad, moves in DOM, AND need to be in inner anchor :S
173176
//restore original DOM position
174177
domParent.insertBefore(element, nextSibling);
175-
this.detectChanges();
178+
(this as any).componentRef.hostView.detectChanges();
176179
} else if (!parentAnchor) {
177-
const applicationRef = this._injector.get<ApplicationRef>(ApplicationRef);
178-
applicationRef.attachView((this as any).componentRef.hostView);
180+
(this as any).appRef.attachView((this as any).componentRef.hostView);
181+
(this as any).componentRef.hostView.detectChanges();
179182
}
180183
/**
181184
* End modified copy of super.initializeComponent
@@ -224,7 +227,7 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
224227
});
225228
}
226229

227-
public override setInputValue(property: string, value: any, transform?: (value: any) => any): void {
230+
public override setInputValue(property: string, value: any): void {
228231
if ((this as any).componentRef === null ||
229232
!(this as any).componentRef.instance) {
230233
(this as any).initialInputValues.set(property, value);
@@ -271,7 +274,7 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
271274
if (componentConfig.selector === 'igc-pivot-data-selector' && property === 'grid' && value) {
272275
value = value.ngElementStrategy?.componentRef?.instance || value;
273276
}
274-
super.setInputValue(property, value, transform);
277+
super.setInputValue(property, value);
275278
}
276279

277280
public override getInputValue(property: string): any {
@@ -539,6 +542,6 @@ export class IgxCustomNgElementStrategyFactory extends ComponentNgElementStrateg
539542
}
540543

541544
public override create(injector: Injector) {
542-
return new IgxCustomNgElementStrategy(this.componentFactory, injector, this.config);
545+
return new IgxCustomNgElementStrategy(this.componentFactory, injector, this.inputMap, this.config);
543546
}
544547
}

0 commit comments

Comments
 (0)