Skip to content

Commit e74215e

Browse files
authored
Merge branch 'master' into rivanova/fix-15020-master
2 parents c9832e2 + a7b6942 commit e74215e

File tree

13 files changed

+179
-99
lines changed

13 files changed

+179
-99
lines changed

projects/igniteui-angular-elements/src/public_api.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ import { IgxPivotAggregate, IgxPivotDateAggregate, IgxPivotNumericAggregate, Igx
1111
import { IgxPivotDateDimension } from 'projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid-dimensions';
1212
import { PivotDimensionType } from 'projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.interface';
1313
import { IgxDateSummaryOperand, IgxNumberSummaryOperand, IgxSummaryOperand, IgxTimeSummaryOperand } from 'projects/igniteui-angular/src/lib/grids/summaries/grid-summary';
14+
import { HorizontalAlignment, VerticalAlignment } from 'projects/igniteui-angular/src/lib/services/overlay/utilities';
1415

1516

1617
/** Export Public API, TODO: reorganize, Generate all w/ renames? */
1718
export {
1819
//Grids API
1920
FilteringExpressionsTree as IgcFilteringExpressionsTree,
20-
FilteringLogic, // TODO: already exported by analyzer?
21+
FilteringLogic,
2122
FilteringExpressionsTreeType,
2223
IgxFilteringOperand as IgcFilteringOperand,
2324
IgxBooleanFilteringOperand as IgcBooleanFilteringOperand,
@@ -48,5 +49,9 @@ export {
4849
RowPinningPosition,
4950
GridPagingMode,
5051
DropPosition,
51-
PivotDimensionType
52+
PivotDimensionType,
53+
54+
// overlay position settings (used in grids, paginator, toolbar)
55+
HorizontalAlignment,
56+
VerticalAlignment,
5257
}

projects/igniteui-angular/src/lib/core/styles/components/calendar/_calendar-theme.scss

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@
11581158
display: flex;
11591159
justify-content: space-between;
11601160

1161-
@if $variant != 'indigo' {
1161+
@if $variant == 'bootstrap' {
11621162
&:nth-child(2) {
11631163
%date-inner-week-number {
11641164
border-start-start-radius: var-get($theme, 'week-number-border-radius');
@@ -1222,28 +1222,6 @@
12221222
}
12231223
}
12241224

1225-
%date-inner-week-number {
1226-
min-width: auto;
1227-
width: $date-size;
1228-
color: var-get($theme, 'week-number-foreground');
1229-
background: var-get($theme, 'week-number-background');
1230-
1231-
&::after {
1232-
display: none !important;
1233-
}
1234-
1235-
&::before {
1236-
content: '';
1237-
position: absolute;
1238-
background: var-get($theme, 'week-number-background');
1239-
//border-inline: rem(1px) solid var-get($theme, 'week-number-background');
1240-
inset-inline-start: rem(-1px);
1241-
inset-block-start: 100%;
1242-
height: calc($date-size / 2);
1243-
width: $date-size;
1244-
}
1245-
}
1246-
12471225
%label-week-number {
12481226
text-align: center;
12491227

@@ -1272,9 +1250,8 @@
12721250
position: absolute;
12731251
background: var-get($theme, 'week-number-background');
12741252
border-inline: rem(1px) solid var-get($theme, 'week-number-background');
1275-
inset-inline-start: rem(-1px);
12761253
inset-block-start: 100%;
1277-
height: 100%;
1254+
height: calc(#{$date-view-row-gap} + #{rem(if($variant == 'indigo', 0px, 2px))});
12781255
width: $date-size;
12791256
}
12801257
}
@@ -1507,6 +1484,29 @@
15071484
height: $date-size;
15081485
}
15091486
}
1487+
1488+
&%date-inner-week-number {
1489+
min-width: auto;
1490+
width: $date-size;
1491+
color: var-get($theme, 'week-number-foreground');
1492+
background: var-get($theme, 'week-number-background');
1493+
1494+
// This is not an actual date and should not change it's border when changing the date border
1495+
border-color: var-get($theme, 'week-number-background');
1496+
1497+
&::after {
1498+
display: none !important;
1499+
}
1500+
1501+
&::before {
1502+
content: '';
1503+
position: absolute;
1504+
background: var-get($theme, 'week-number-background');
1505+
inset-block-start: 100%;
1506+
height: calc(#{$date-view-row-gap} + #{rem(if($variant == 'indigo', 0, 2px))});
1507+
width: $date-size;
1508+
}
1509+
}
15101510
}
15111511

15121512
%date-weekend {

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3500,6 +3500,17 @@
35003500
}
35013501
}
35023502

3503+
.igx-pivot-grid-row-filler__wrapper {
3504+
.igx-grid-thead__wrapper {
3505+
height: 100%;
3506+
border-bottom: initial;
3507+
3508+
.igx-grid-th {
3509+
height: 100%;
3510+
}
3511+
}
3512+
}
3513+
35033514
%igx-grid__tbody-pivot-mrl-dimension {
35043515
.igx-grid-th {
35053516
border-bottom: none;

projects/igniteui-angular/src/lib/data-operations/filtering-condition.ts

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ export class IgxFilteringOperand {
4848
* Returns an array of names of the conditions which are visible in the filtering UI
4949
*/
5050
public conditionList(): string[] {
51-
return this.operations.filter(f => !f.hidden && !f.isNestedQuery).map((element) => element.name);
51+
return this.operations.filter(f => !f.hidden && !f.isNestedQuery).map((element) => element.name);
5252
}
5353

5454
/**
5555
* Returns an array of names of the conditions which are visible in the UI, including "In" and "Not In", allowing the creation of sub-queries.
56+
* @hidden @internal
5657
*/
5758
public extendedConditionList(): string[] {
5859
return this.operations.filter(f => !f.hidden).map((element) => element.name);
@@ -76,10 +77,7 @@ export class IgxFilteringOperand {
7677
this.operations.push(operation);
7778
}
7879

79-
/**
80-
* @hidden
81-
*/
82-
public findValueInSet(target: any, searchVal: Set<any>) {
80+
protected findValueInSet(target: any, searchVal: Set<any>) {
8381
return searchVal.has(target);
8482
}
8583
}
@@ -119,7 +117,7 @@ export class IgxBooleanFilteringOperand extends IgxFilteringOperand {
119117
iconName: 'filter_not_empty',
120118
logic: (target: boolean) => target !== null && target !== undefined
121119
}];
122-
120+
123121
this.operations = newOperations.concat(this.operations);
124122
}
125123
}
@@ -143,7 +141,7 @@ class IgxBaseDateTimeFilteringOperand extends IgxFilteringOperand {
143141
iconName: 'filter_not_empty',
144142
logic: (target: Date) => target !== null && target !== undefined
145143
}];
146-
144+
147145
this.operations = newOperations.concat(this.operations);
148146
}
149147

@@ -189,10 +187,7 @@ class IgxBaseDateTimeFilteringOperand extends IgxFilteringOperand {
189187
return res;
190188
}
191189

192-
/**
193-
* @hidden
194-
*/
195-
public override findValueInSet(target: any, searchVal: Set<any>) {
190+
protected override findValueInSet(target: any, searchVal: Set<any>) {
196191
if (!target) {
197192
return false;
198193
}
@@ -416,11 +411,11 @@ export class IgxDateFilteringOperand extends IgxBaseDateTimeFilteringOperand {
416411
return d.year === now.year + 1;
417412
}
418413
}];
419-
414+
420415
this.operations = newOperations.concat(this.operations);
421416
}
422417

423-
public override findValueInSet(target: any, searchVal: Set<any>) {
418+
protected override findValueInSet(target: any, searchVal: Set<any>) {
424419
if (!target) {
425420
return false;
426421
}
@@ -637,7 +632,7 @@ export class IgxDateTimeFilteringOperand extends IgxBaseDateTimeFilteringOperand
637632
return d.year === now.year + 1;
638633
}
639634
}];
640-
635+
641636
this.operations = newOperations.concat(this.operations);
642637
}
643638
}
@@ -741,14 +736,11 @@ export class IgxTimeFilteringOperand extends IgxBaseDateTimeFilteringOperand {
741736
true : targetn.hours === search.hours && targetn.minutes === search.minutes && targetn.seconds > search.seconds;
742737
}
743738
}];
744-
739+
745740
this.operations = newOperations.concat(this.operations);
746741
}
747742

748-
/**
749-
* @hidden
750-
*/
751-
public override findValueInSet(target: any, searchVal: Set<any>) {
743+
protected override findValueInSet(target: any, searchVal: Set<any>) {
752744
if (!target) {
753745
return false;
754746
}
@@ -806,7 +798,7 @@ export class IgxNumberFilteringOperand extends IgxFilteringOperand {
806798
iconName: 'filter_not_empty',
807799
logic: (target: number) => target !== null && target !== undefined && !isNaN(target)
808800
}];
809-
801+
810802
this.operations = newOperations.concat(this.operations);
811803
}
812804
}
@@ -885,7 +877,7 @@ export class IgxStringFilteringOperand extends IgxFilteringOperand {
885877
iconName: 'filter_not_empty',
886878
logic: (target: string) => target !== null && target !== undefined && target.length > 0
887879
}];
888-
880+
889881
this.operations = newOperations.concat(this.operations);
890882
}
891883

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid-base.directive.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export abstract class IgxHierarchicalGridBaseDirective extends IgxGridBaseDirect
166166
viewRef: ViewContainerRef,
167167
injector: Injector,
168168
envInjector: EnvironmentInjector,
169-
navigation: IgxHierarchicalGridNavigationService,
169+
public override navigation: IgxHierarchicalGridNavigationService,
170170
filteringService: IgxFilteringService,
171171
textHighlightService: IgxTextHighlightService,
172172
@Inject(IgxOverlayService) overlayService: IgxOverlayService,
@@ -200,8 +200,6 @@ export abstract class IgxHierarchicalGridBaseDirective extends IgxGridBaseDirect
200200
);
201201
}
202202

203-
public override navigation: IgxHierarchicalGridNavigationService;
204-
205203
/**
206204
* @hidden
207205
*/

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.html

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
[width]="rowDimensionWidthToPixels(dim)">
158158
</igx-pivot-row-dimension-content>
159159
</ng-template>
160+
<ng-container *ngTemplateOutlet="emptyRowDimensionFill; context: { $implicit: this, widthPx: rowDimensionWidthToPixels(dim) }"></ng-container>
160161
</div>
161162
}
162163
</ng-template>
@@ -175,20 +176,22 @@
175176
<igx-pivot-row-dimension-mrl-row [rowIndex]="rowIndex" [rowGroup]="rowGroup" [groupedData]="groupedData" [style.height.px]="renderedRowHeight * rowGroup.length"></igx-pivot-row-dimension-mrl-row>
176177
</ng-template>
177178
}
179+
<ng-container *ngTemplateOutlet="emptyRowDimensionFill; context: { $implicit: this, widthPx: pivotRowWidths }"></ng-container>
178180
</div>
179181
</ng-template>
180182

181183
<ng-template #emptyRowDimensionsTemplate>
182-
@if (columnDimensions.length > 0 || values.length > 0) {
183-
<div tabindex="0" #rowDimensionContainer role="rowgroup" class="igx-grid__tbody-pivot-dimension" (focus)="navigation.focusTbody($event)" (keydown)="navigation.handleNavigation($event)">
184+
<div tabindex="0" #rowDimensionContainer role="rowgroup" class="igx-grid__tbody-pivot-dimension" (focus)="navigation.focusTbody($event)" (keydown)="navigation.handleNavigation($event)">
185+
@if ((columnDimensions.length > 0 || values.length > 0) && data.length > 0) {
184186
<igx-pivot-row-dimension-content role="row" class="igx-grid-thead" [grid]="this"
185187
[dimension]="emptyRowDimension"
186188
[rootDimension]="emptyRowDimension"
187189
[rowIndex]="0" [rowData]="dataView[0]"
188190
[width]="rowDimensionWidthToPixels(emptyRowDimension)">
189191
</igx-pivot-row-dimension-content>
190-
</div>
191-
}
192+
}
193+
<ng-container *ngTemplateOutlet="emptyRowDimensionFill; context: { $implicit: this, widthPx: rowDimensionWidthToPixels(emptyRowDimension) }"></ng-container>
194+
</div>
192195
</ng-template>
193196

194197
<ng-template #emptyPivotGridTemplate>
@@ -197,6 +200,17 @@
197200
</span>
198201
</ng-template>
199202

203+
<ng-template #emptyRowDimensionFill let-width="widthPx">
204+
@if (emptyBottomSize > 0) {
205+
<div class="igx-pivot-grid-row-filler__wrapper" [style.height.px]="emptyBottomSize" [style.width.px]="width">
206+
<!-- Reuse header styles to keep visuals consistent -->
207+
<div class="igx-grid-thead__wrapper">
208+
<div class="igx-grid-th"></div>
209+
</div>
210+
</div>
211+
}
212+
</ng-template>
213+
200214
<div [hidden]="true">
201215
<igx-grid-excel-style-filtering [maxHeight]="excelStyleFilterMaxHeight" [minHeight]="excelStyleFilterMinHeight">
202216
<div igxExcelStyleColumnOperations [hidden]="true"></div>

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
10221022
viewRef: ViewContainerRef,
10231023
injector: Injector,
10241024
envInjector: EnvironmentInjector,
1025-
navigation: IgxPivotGridNavigationService,
1025+
public override navigation: IgxPivotGridNavigationService,
10261026
filteringService: IgxFilteringService,
10271027
textHighlightService: IgxTextHighlightService,
10281028
@Inject(IgxOverlayService) overlayService: IgxOverlayService,
@@ -1055,8 +1055,6 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
10551055
_diTransactions);
10561056
}
10571057

1058-
public override navigation: IgxPivotGridNavigationService;
1059-
10601058
/**
10611059
* @hidden
10621060
*/
@@ -1150,6 +1148,10 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
11501148
return false;
11511149
}
11521150

1151+
protected get emptyBottomSize() {
1152+
return this.totalHeight - (<any>this.verticalScroll).scrollComponent.size;
1153+
}
1154+
11531155
/** @hidden @internal */
11541156
public createFilterESF(dropdown: any, column: ColumnType, options: OverlaySettings, shouldReatach: boolean) {
11551157
options.outlet = this.outlet;
@@ -1288,8 +1290,12 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
12881290

12891291
/** @hidden @internal */
12901292
public get pivotContentCalcWidth() {
1291-
const totalDimWidth = this.rowDimensions.length > 0 ?
1292-
this.rowDimensions.map((dim) => this.rowDimensionWidthToPixels(dim)).reduce((prev, cur) => prev + cur) :
1293+
if (!this.visibleRowDimensions.length) {
1294+
return Math.max(0, this.calcWidth - this.pivotRowWidths);
1295+
}
1296+
1297+
const totalDimWidth = this.visibleRowDimensions.length > 0 ?
1298+
this.visibleRowDimensions.map((dim) => this.rowDimensionWidthToPixels(dim)).reduce((prev, cur) => prev + cur) :
12931299
0;
12941300
return this.calcWidth - totalDimWidth;
12951301
}

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-header-row.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
</div>
248248
}
249249

250-
@if (grid.pivotUI.showRowHeaders && grid.visibleRowDimensions.length > 0) {
250+
@if (grid.pivotUI.showRowHeaders && grid.rowDimensions.length > 0) {
251251
<div class="igx-grid__tr igx-grid__tr-header-row" role="row" [style.width.px]="grid.pivotRowWidths - 1">
252252
@for (dim of grid.visibleRowDimensions; track dim; let colIndex = $index; let isLast = $last) {
253253
@if (getRowDimensionColumn(dim); as dimCol) {
@@ -277,20 +277,20 @@
277277
</igx-grid-header-group>
278278
}
279279
}
280-
<div class="igx-grid-thead--virtualizationWrapper" [style.max-height.px]='maxContainerHeight' (click)="grid.navigation.focusOutRowHeader($event)">
280+
<div class="igx-grid-thead--virtualizationWrapper" [style.max-height.px]="maxContainerHeight" (click)="grid.navigation.focusOutRowHeader($event)">
281281
@for (dimLevelColumns of columnDimensionsByLevel; track $index; let i = $index) {
282-
<div class="igx-grid-thead__group igx-grid-thead--virtualizationContainer" [style.height.px]='totalDepth > 1 ? grid.rowHeight : undefined' [style.width.px]='grid.unpinnedWidth'>
282+
<div class="igx-grid-thead__group igx-grid-thead--virtualizationContainer" [style.height.px]="totalDepth > 1 ? grid.rowHeight : undefined" [style.width.px]="grid.unpinnedWidth">
283283
<ng-template igxGridFor #headerVirtualContainer let-column
284-
[igxGridForOf]="dimLevelColumns" [igxGridForOfUniqueSizeCache] = 'true' [igxForScrollContainer]="grid.parentVirtDir"
284+
[igxGridForOf]="dimLevelColumns" [igxGridForOfUniqueSizeCache]="true" [igxForScrollContainer]="grid.parentVirtDir"
285285
[igxForContainerSize]="grid.unpinnedWidth" [igxForTrackBy]="grid.trackColumnChanges"
286286
[igxForSizePropName]="'calcPixelWidth'" [igxForScrollOrientation]="'horizontal'">
287287
<igx-grid-header-group [ngClass]="column.headerGroupClasses"
288-
[style.height.px]='totalDepth > 1 ? calcHeight(column, i) : undefined'
288+
[style.height.px]="totalDepth > 1 ? calcHeight(column, i) : undefined"
289289
[ngStyle]="column.headerGroupStyles |igxHeaderGroupStyle:column:grid.pipeTrigger" [column]="column"
290290
[style.min-width]="column.resolvedWidth | igxHeaderGroupWidth:grid.defaultHeaderGroupMinWidth:hasMRL"
291291
[style.flex-basis]="column.resolvedWidth | igxHeaderGroupWidth:grid.defaultHeaderGroupMinWidth:hasMRL"
292-
[class.igx-grid__tr-pivot--columnDimensionLeaf] = 'isDuplicateOfExistingParent(column, i)'
293-
[class.igx-grid__tr-pivot--columnMultiRowSpan] = 'isMultiRow(column, i)'
292+
[class.igx-grid__tr-pivot--columnDimensionLeaf]="isDuplicateOfExistingParent(column, i)"
293+
[class.igx-grid__tr-pivot--columnMultiRowSpan]="isMultiRow(column, i)"
294294
>
295295
</igx-grid-header-group>
296296
</ng-template>

0 commit comments

Comments
 (0)