Skip to content

Commit ef6a2e5

Browse files
committed
Merge remote-tracking branch 'origin/master' into sstoychev/update-to-20
2 parents 93fdef2 + 22dad59 commit ef6a2e5

File tree

203 files changed

+1519
-1058
lines changed

Some content is hidden

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

203 files changed

+1519
-1058
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master, 19.1.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
16+
branches: [ master, 19.2.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master, 19.1.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
19+
branches: [ master, 19.2.x, 18.2.x, 17.2.x, 16.1.x, 15.1.x ]
2020
schedule:
2121
- cron: '33 4 * * 4'
2222

angular.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,17 @@
191191
"zone.js/testing",
192192
"hammerjs"
193193
],
194+
"styles": [
195+
"src/styles/styles.scss"
196+
],
197+
"assets": [
198+
"projects/igniteui-angular/src/assets"
199+
],
200+
"stylePreprocessorOptions": {
201+
"includePaths": [
202+
"node_modules"
203+
]
204+
},
194205
"tsConfig": "projects/igniteui-angular/tsconfig.spec.json",
195206
"karmaConfig": "projects/igniteui-angular/karma.conf.js"
196207
}

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@types/source-map": "0.5.2",
7575
"express": "^4.21.1",
7676
"fflate": "^0.8.1",
77-
"igniteui-theming": "^17.2.0",
77+
"igniteui-theming": "^18.0.1",
7878
"igniteui-trial-watermark": "^3.0.2",
7979
"lodash-es": "^4.17.21",
8080
"rxjs": "^7.8.2",
@@ -135,7 +135,7 @@
135135
"postcss": "^8.5.1",
136136
"postcss-scss": "^4.0.6",
137137
"prettier": "^3.3.3",
138-
"puppeteer": "^24.4.0",
138+
"puppeteer": "^24.5.0",
139139
"sass-embedded": "^1.83.4",
140140
"sass-true": "^8.1.0",
141141
"sassdoc": "^2.7.4",

projects/igniteui-angular-elements/src/analyzer/elements.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ export var registerConfig = [
447447
{
448448
component: IgxGridToolbarAdvancedFilteringComponent,
449449
selector: "igc-grid-toolbar-advanced-filtering",
450-
parents: [IgxGridToolbarComponent],
450+
parents: [IgxGridToolbarComponent, IgxGridToolbarActionsComponent],
451451
contentQueries: [],
452452
additionalProperties: [],
453453
methods: [],
@@ -472,7 +472,7 @@ export var registerConfig = [
472472
{
473473
component: IgxGridToolbarExporterComponent,
474474
selector: "igc-grid-toolbar-exporter",
475-
parents: [IgxGridToolbarComponent],
475+
parents: [IgxGridToolbarComponent, IgxGridToolbarActionsComponent],
476476
contentQueries: [],
477477
additionalProperties: [],
478478
methods: ["export"],
@@ -481,7 +481,7 @@ export var registerConfig = [
481481
{
482482
component: IgxGridToolbarHidingComponent,
483483
selector: "igc-grid-toolbar-hiding",
484-
parents: [IgxGridToolbarComponent],
484+
parents: [IgxGridToolbarComponent, IgxGridToolbarActionsComponent],
485485
contentQueries: [],
486486
additionalProperties: [],
487487
methods: ["checkAll", "uncheckAll"],
@@ -491,7 +491,7 @@ export var registerConfig = [
491491
{
492492
component: IgxGridToolbarPinningComponent,
493493
selector: "igc-grid-toolbar-pinning",
494-
parents: [IgxGridToolbarComponent],
494+
parents: [IgxGridToolbarComponent, IgxGridToolbarActionsComponent],
495495
contentQueries: [],
496496
additionalProperties: [],
497497
methods: ["checkAll", "uncheckAll"],

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

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { IgxColumnComponent, IgxGridComponent, IgxHierarchicalGridComponent } from 'igniteui-angular';
2+
import { html } from 'lit-html';
23
import { firstValueFrom, fromEvent, skip, timer } from 'rxjs';
34
import { ComponentRefKey, IgcNgElement } from './custom-strategy';
45
import hgridData from '../assets/data/projects-hgrid.js';
@@ -51,6 +52,47 @@ describe('Elements: ', () => {
5152
const gridComponent = (await gridEl.ngElementStrategy[ComponentRefKey]).instance as IgxGridComponent;
5253
const columnComponent = (await columnEl.ngElementStrategy[ComponentRefKey]).instance as IgxColumnComponent;
5354
expect(gridComponent.columnList.toArray()).toContain(columnComponent);
55+
56+
columnEl.remove();
57+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY: DESTROY + QUERY */ * 3));
58+
expect(gridComponent.columnList.toArray()).toEqual([]);
59+
});
60+
61+
it(`should keep IgcNgElement instance in template of another IgcNgElement #15678`, async () => {
62+
const gridEl = document.createElement("igc-grid");
63+
testContainer.appendChild(gridEl);
64+
const columnEl = document.createElement("igc-column") as IgcNgElement;
65+
gridEl.appendChild(columnEl);
66+
gridEl.primaryKey = 'id';
67+
gridEl.data = [{ id: '1' }];
68+
(gridEl as any).detailTemplate = (ctx) => {
69+
return html`<div>
70+
<igc-grid id="child${ctx.implicit.id}"></igc-grid>
71+
</div>`;
72+
}
73+
74+
// TODO: Better way to wait - potentially expose the queue or observable for update on the strategy
75+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 2));
76+
77+
// sigh (。﹏。*)
78+
(gridEl as any).toggleRow('1');
79+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 2));
80+
81+
let detailGrid = document.querySelector<IgcNgElement>('#child1');
82+
expect(detailGrid).toBeDefined();
83+
let detailGridComponent = (await detailGrid?.ngElementStrategy[ComponentRefKey])?.instance as IgxGridComponent;
84+
expect(detailGridComponent).toBeDefined();
85+
86+
// close and re-expand row detail:
87+
(gridEl as any).toggleRow('1');
88+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 2));
89+
(gridEl as any).toggleRow('1');
90+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 2));
91+
92+
detailGrid = document.querySelector<IgcNgElement>('#child1');
93+
expect(detailGrid).toBeDefined();
94+
detailGridComponent = (await detailGrid?.ngElementStrategy[ComponentRefKey])?.instance as IgxGridComponent;
95+
expect(detailGridComponent).toBeDefined("Detail child grid was destroyed on re-expand");
5496
});
5597
});
5698

@@ -103,6 +145,29 @@ describe('Elements: ', () => {
103145
expect(paginator.totalRecords).toEqual(gridEl.data.length);
104146
});
105147

148+
it(`should correctly apply column template when set through event`, async () => {
149+
const gridEl = document.createElement("igc-grid");
150+
151+
const columnID = document.createElement("igc-column");
152+
columnID.setAttribute("field", "ProductID");
153+
gridEl.appendChild(columnID);
154+
const columnName = document.createElement("igc-column");
155+
columnName.setAttribute("field", "ProductName");
156+
gridEl.appendChild(columnName);
157+
158+
gridEl.data = SampleTestData.foodProductData();
159+
gridEl.addEventListener("columnInit", (args: CustomEvent<any>) => {
160+
args.detail.headerTemplate = (ctx) => html`<span>Templated ${args.detail.field}</span>`;
161+
});
162+
testContainer.appendChild(gridEl);
163+
164+
// TODO: Better way to wait - potentially expose the queue or observable for update on the strategy
165+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 2));
166+
167+
const header = document.getElementsByTagName("igx-grid-header").item(0) as HTMLElement;
168+
expect(header.innerText).toEqual('Templated ProductID');
169+
});
170+
106171
it(`should initialize pivot grid with state persistence component`, async () => {
107172
const gridEl = document.createElement("igc-pivot-grid");
108173

0 commit comments

Comments
 (0)