Skip to content

Commit b9324d6

Browse files
authored
Merge branch 'master' into nalipiev/schema-update
2 parents 47d05fc + 66bb654 commit b9324d6

38 files changed

+196
-141
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5+
## 20.0.0
6+
7+
### General
8+
- **Angular 20 Compatibility** - Ignite UI for Angular now plays nice with Angular 20! Upgrade your apps and enjoy the latest features.
9+
- `IgxActionStrip`
10+
- **Behavioral Changes** - When using the Action Strip standalone, outside of Grid, scenarios the component is no longer initially visible and the `hidden` property now defaults to `true`.
11+
- `IgxChip`
12+
- **Behavioral Change** The `variant` is now strictly typed with the union of supported options and no longer accepts invalid values for the default state, provide no value (nullish) instead is needed.
13+
514
## 19.2.0
615

716
### General

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
IgcColumnComponent,
1212
IgcPaginatorComponent,
1313
IgcGridStateComponent,
14+
IgcColumnLayoutComponent,
1415
} from './components';
1516
import { defineComponents } from '../utils/register';
1617

@@ -23,6 +24,7 @@ describe('Elements: ', () => {
2324
IgcHierarchicalGridComponent,
2425
IgcPivotGridComponent,
2526
IgcColumnComponent,
27+
IgcColumnLayoutComponent,
2628
IgcPaginatorComponent,
2729
IgcGridStateComponent,
2830
);
@@ -181,5 +183,52 @@ describe('Elements: ', () => {
181183
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 2));
182184
expect(() => stateComponent.getStateAsString()).not.toThrow();
183185
});
186+
187+
it(`should allow manipulating projected columns through the DOM`, async () => {
188+
const innerHtml = `
189+
<igc-grid id="testGrid" primary-key="ProductID">
190+
<igc-column-layout header="Product ID">
191+
<igc-column row-start="1" col-start="1" row-end="3" field="ProductID" header="Product ID" width="25%"></igc-column>
192+
</igc-column-layout>
193+
<igc-column-layout header="Product Details">
194+
<igc-column row-start="1" col-start="1" col-end="3" field="ProductName" header="Product Name"></igc-column>
195+
<igc-column row-start="2" col-start="1" col-end="2" field="CategoryName" header="Category Name" groupable="true"></igc-column>
196+
<igc-column row-start="2" col-start="2" col-end="3" field="ImageUrl"></igc-column>
197+
</igc-column-layout>
198+
<igc-column-layout header="Product Stock">
199+
<igc-column row-start="1" col-start="1" col-end="3" field="InStock" header="In Stock" width="25%"></igc-column>
200+
</igc-column-layout>
201+
</igc-grid>`;
202+
testContainer.innerHTML = innerHtml;
203+
204+
// TODO: Better way to wait - potentially expose the queue or observable for update on the strategy
205+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 3));
206+
207+
const grid = document.querySelector<IgcNgElement & InstanceType<typeof IgcGridComponent>>('#testGrid');
208+
const thirdGroup = document.querySelector<IgcNgElement>('igc-column-layout[header="Product Stock"]');
209+
const secondGroup = document.querySelector<IgcNgElement>('igc-column-layout[header="Product Details"]');
210+
211+
expect(grid.columns.length).toEqual(8);
212+
expect(grid.getColumnByName('ProductID')).toBeTruthy();
213+
expect(grid.getColumnByVisibleIndex(1).field).toEqual('ProductName');
214+
215+
grid.removeChild(secondGroup);
216+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 3));
217+
218+
expect(grid.columns.length).toEqual(4);
219+
expect(grid.getColumnByName('ProductID')).toBeTruthy();
220+
expect(grid.getColumnByVisibleIndex(1).field).toEqual('InStock');
221+
222+
// TODO: secondGroup can't be re-used
223+
const newGroup = document.createElement('igc-column-layout');
224+
const newColumn = document.createElement('igc-column');
225+
newColumn.setAttribute('field', 'ProductName');
226+
newGroup.appendChild(newColumn);
227+
grid.insertBefore(newGroup, thirdGroup);
228+
await firstValueFrom(timer(10 /* SCHEDULE_DELAY */ * 3));
229+
230+
expect(grid.columns.length).toEqual(6);
231+
expect(grid.getColumnByVisibleIndex(1).field).toEqual('ProductName');
232+
});
184233
});
185234
});

projects/igniteui-angular-elements/src/lib/state.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export interface IGridStateInfo {
4646
@Component({
4747
selector: 'igx-grid-state',
4848
template: ``,
49+
styles: `:host { display: none }`,
4950
standalone: true
5051
})
5152
export class IgxGridStateComponent extends IgxGridStateBaseDirective {

projects/igniteui-angular/src/lib/action-strip/action-strip.component.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ describe('igxActionStrip', () => {
3434
fixture = TestBed.createComponent(IgxActionStripComponent);
3535
actionStrip = fixture.componentInstance as IgxActionStripComponent;
3636
fixture.detectChanges();
37+
expect(actionStrip.hidden).toBeTruthy();
3738

3839
const el = document.createElement('div');
3940
fixture.debugElement.nativeElement.appendChild(el);
@@ -162,7 +163,7 @@ describe('igxActionStrip', () => {
162163
Lorem ipsum dolor sit
163164
</p>
164165
</div>
165-
<igx-action-strip #actionStrip>
166+
<igx-action-strip #actionStrip [hidden]="false">
166167
<igx-icon class="asIcon" (click)="onIconClick()">alarm</igx-icon>
167168
</igx-action-strip>
168169
</div>
@@ -197,7 +198,7 @@ class IgxActionStripTestingComponent {
197198
Lorem ipsum dolor sit
198199
</p>
199200
</div>
200-
<igx-action-strip #actionStrip>
201+
<igx-action-strip #actionStrip [hidden]="false">
201202
<span *igxActionStripMenuItem>Mark</span>
202203
<span *igxActionStripMenuItem>Favorite</span>
203204
<span *igxActionStripMenuItem>Download</span>
@@ -219,7 +220,7 @@ class IgxActionStripMenuTestingComponent {
219220
Lorem ipsum dolor sit
220221
</p>
221222
</div>
222-
<igx-action-strip #actionStrip>
223+
<igx-action-strip #actionStrip [hidden]="false">
223224
<span>Mark</span>
224225
<span *igxActionStripMenuItem>Favorite</span>
225226
<span *igxActionStripMenuItem>Download</span>

projects/igniteui-angular/src/lib/action-strip/action-strip.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class IgxActionStripComponent implements IgxActionStripToken, AfterConten
134134
* ```
135135
*/
136136
@Input({ transform: booleanAttribute })
137-
public hidden = false;
137+
public hidden = true;
138138

139139

140140
/**

projects/igniteui-angular/src/lib/avatar/avatar.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ import {
99
ViewChild
1010
} from '@angular/core';
1111

12-
import { mkenum, normalizeURI } from '../core/utils';
12+
import { normalizeURI } from '../core/utils';
1313
import { IgxIconComponent } from '../icon/icon.component';
1414

1515
let NEXT_ID = 0;
16-
export const IgxAvatarSize = /*@__PURE__*/mkenum({
16+
export const IgxAvatarSize = {
1717
SMALL: 'small',
1818
MEDIUM: 'medium',
1919
LARGE: 'large'
20-
});
20+
} as const;
2121
export type IgxAvatarSize = (typeof IgxAvatarSize)[keyof typeof IgxAvatarSize];
2222

23-
export const IgxAvatarType = /*@__PURE__*/mkenum({
23+
export const IgxAvatarType = {
2424
INITIALS: 'initials',
2525
IMAGE: 'image',
2626
ICON: 'icon',
2727
CUSTOM: 'custom'
28-
});
28+
} as const;
2929
export type IgxAvatarType = (typeof IgxAvatarType)[keyof typeof IgxAvatarType];
3030

3131
/**

projects/igniteui-angular/src/lib/badge/badge.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import { booleanAttribute, Component, HostBinding, Input } from '@angular/core';
2-
import { mkenum } from '../core/utils';
32
import { IgxIconComponent } from '../icon/icon.component';
43

54
let NEXT_ID = 0;
65

76
/**
87
* Determines the igxBadge type
98
*/
10-
export const IgxBadgeType = /*@__PURE__*/mkenum({
9+
export const IgxBadgeType = {
1110
PRIMARY: 'primary',
1211
INFO: 'info',
1312
SUCCESS: 'success',
1413
WARNING: 'warning',
1514
ERROR: 'error'
16-
});
15+
} as const;
1716
export type IgxBadgeType = (typeof IgxBadgeType)[keyof typeof IgxBadgeType];
1817
/**
1918
* Badge provides visual notifications used to decorate avatars, menus, etc.

projects/igniteui-angular/src/lib/buttonGroup/buttonGroup.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@ import { IgxRippleDirective } from '../directives/ripple/ripple.directive';
2020

2121
import { takeUntil } from 'rxjs/operators';
2222
import { IBaseEventArgs } from '../core/utils';
23-
import { mkenum } from '../core/utils';
2423
import { IgxIconComponent } from '../icon/icon.component';
2524

2625
/**
2726
* Determines the Button Group alignment
2827
*/
29-
export const ButtonGroupAlignment = mkenum({
28+
export const ButtonGroupAlignment = {
3029
horizontal: 'horizontal',
3130
vertical: 'vertical'
32-
});
31+
} as const;
3332
export type ButtonGroupAlignment = typeof ButtonGroupAlignment[keyof typeof ButtonGroupAlignment];
3433

3534
let NEXT_ID = 0;

projects/igniteui-angular/src/lib/calendar/calendar.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import { mkenum } from '../core/utils';
21

32
/**
43
* Sets the selection type - single, multi or range.
54
*/
6-
export const CalendarSelection = /*@__PURE__*/mkenum({
5+
export const CalendarSelection = {
76
SINGLE: 'single',
87
MULTI: 'multi',
98
RANGE: 'range'
10-
});
9+
} as const;
1110
export type CalendarSelection = (typeof CalendarSelection)[keyof typeof CalendarSelection];
1211

1312
export const enum ScrollDirection {
@@ -21,11 +20,11 @@ export interface IViewDateChangeEventArgs {
2120
currentValue: Date;
2221
}
2322

24-
export const IgxCalendarView = /*@__PURE__*/mkenum({
23+
export const IgxCalendarView = {
2524
Month: 'month',
2625
Year: 'year',
2726
Decade: 'decade'
28-
});
27+
} as const;
2928

3029
/**
3130
* Determines the Calendar active view - days, months or years.

projects/igniteui-angular/src/lib/card/card.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import {
1111
booleanAttribute
1212
} from '@angular/core';
1313

14-
import { mkenum } from '../core/utils';
15-
1614
let NEXT_ID = 0;
1715

1816
/**
@@ -269,10 +267,10 @@ export class IgxCardComponent {
269267
public horizontal = false;
270268
}
271269

272-
export const IgxCardActionsLayout = /*@__PURE__*/mkenum({
270+
export const IgxCardActionsLayout = {
273271
START: 'start',
274272
JUSTIFY: 'justify'
275-
});
273+
} as const;
276274
export type IgxCardActionsLayout = (typeof IgxCardActionsLayout)[keyof typeof IgxCardActionsLayout];
277275

278276
/**

0 commit comments

Comments
 (0)