Skip to content

Commit 221de47

Browse files
Merge branch '17.2.x' into ganastasov/fix-14650-17.2.x
2 parents acd7f38 + b75e999 commit 221de47

22 files changed

+332
-64
lines changed

projects/igniteui-angular/src/lib/core/styles/components/input/_input-group-theme.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -910,10 +910,14 @@
910910
}
911911
}
912912

913-
%form-group-label--float {
914-
--floating-label-position: -73%;
915-
transform: translateY(var(--floating-label-position));
916-
font-size: rem(12px);
913+
@if $variant == 'material' {
914+
%form-group-label--float {
915+
--floating-label-position: -73%;
916+
917+
@include type-style('caption');
918+
919+
transform: translateY(var(--floating-label-position));
920+
}
917921
}
918922

919923
%form-group-label--focused-border,
@@ -972,8 +976,8 @@
972976

973977
%form-group-label--float-border {
974978
--label-position: #{sizable(18px, 22px, 26px)};
979+
975980
transform: translateY(calc(var(--label-position) * -1));
976-
font-size: rem(12px);
977981
margin-top: 0;
978982
overflow: hidden;
979983
will-change: font-size, color, transform;
@@ -1718,8 +1722,6 @@
17181722
// Label
17191723
%fluent-label {
17201724
display: block;
1721-
font-size: rem(14px);
1722-
font-weight: 600;
17231725
position: static;
17241726
transform: translateY(0);
17251727
transform-origin: top left;
@@ -1939,13 +1941,11 @@
19391941
display: block;
19401942
color: var-get($theme, 'idle-secondary-color');
19411943
padding: 0;
1942-
line-height: rem(24px);
19431944
transform: translateY(0);
19441945
transform-origin: top left;
19451946
margin-block-start: 0 !important;
19461947
margin-block-end: rem(4px);
19471948
height: auto;
1948-
font-size: rem(16px);
19491949

19501950
[dir='rtl'] & {
19511951
transform-origin: top right;

projects/igniteui-angular/src/lib/core/styles/components/label/_label-theme.scss

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,33 @@
5050
color: var-get($theme, 'color');
5151
max-width: 100%;
5252
line-height: normal;
53-
font-size: rem(16px);
5453

5554
[dir='rtl'] & {
5655
transform-origin: top right;
5756
}
5857

59-
@if $variant == 'fluent' or $variant == 'indigo-design' {
60-
font-size: rem(14px);
61-
font-weight: 600;
58+
@if $variant != 'material' {
6259
height: auto;
6360
}
61+
}
62+
}
6463

65-
@if $variant == 'bootstrap' {
66-
line-height: rem(24px);
67-
height: auto;
64+
/// Adds typography styles for the igx-label component.
65+
/// Uses the 'caption'
66+
/// category from the typographic scale.
67+
/// @group typography
68+
/// @param {Map} $categories [(label: 'caption')] - The categories from the typographic scale used for type styles.
69+
@mixin label-typography(
70+
$categories: (
71+
label: 'subtitle-1',
72+
)
73+
) {
74+
$label: map.get($categories, 'label');
75+
76+
%label-base {
77+
@include type-style($label) {
78+
margin: 0;
6879
}
6980
}
7081
}
82+

projects/igniteui-angular/src/lib/core/styles/typography/_bootstrap.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
@use '../components/toast/toast-theme' as *;
3131
@use '../components/tooltip/tooltip-theme' as *;
3232
@use '../components/tree/tree-theme' as *;
33+
@use '../components/label/label-theme' as *;
3334

3435
@mixin typography($type-scale) {
3536
@include badge-typography();
@@ -108,4 +109,7 @@
108109
@include toast-typography();
109110
@include tooltip-typography();
110111
@include tree-typography();
112+
@include label-typography($categories: (
113+
label: 'body-1'
114+
));
111115
}

projects/igniteui-angular/src/lib/core/styles/typography/_fluent.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
@use '../components/toast/toast-theme' as *;
3030
@use '../components/tooltip/tooltip-theme' as *;
3131
@use '../components/tree/tree-theme' as *;
32+
@use '../components/label/label-theme' as *;
3233

3334
@mixin typography() {
3435
@include badge-typography();
@@ -104,4 +105,7 @@
104105
));
105106
@include tooltip-typography();
106107
@include tree-typography();
108+
@include label-typography($categories: (
109+
label: 'subtitle-2'
110+
));
107111
}

projects/igniteui-angular/src/lib/core/styles/typography/_indigo.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
@use '../components/toast/toast-theme' as *;
3030
@use '../components/tooltip/tooltip-theme' as *;
3131
@use '../components/tree/tree-theme' as *;
32+
@use '../components/label/label-theme' as *;
3233

3334
@mixin typography() {
3435
@include badge-typography($categories: (
@@ -109,4 +110,7 @@
109110
@include toast-typography();
110111
@include tooltip-typography();
111112
@include tree-typography();
113+
@include label-typography($categories: (
114+
label: 'caption'
115+
));
112116
}

projects/igniteui-angular/src/lib/core/styles/typography/_material.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
@use '../components/toast/toast-theme' as *;
3030
@use '../components/tooltip/tooltip-theme' as *;
3131
@use '../components/tree/tree-theme' as *;
32+
@use '../components/label/label-theme' as *;
3233

3334
@mixin typography() {
3435
@include badge-typography();
@@ -62,4 +63,5 @@
6263
@include toast-typography();
6364
@include tooltip-typography();
6465
@include tree-typography();
66+
@include label-typography();
6567
}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,15 @@ export class IgxDateFilteringOperand extends IgxBaseDateTimeFilteringOperand {
387387
}
388388
}].concat(this.operations);
389389
}
390+
391+
protected override findValueInSet(target: any, searchVal: Set<any>) {
392+
if (!target) {
393+
return false;
394+
}
395+
396+
target = target.toDateString();
397+
return searchVal.has(target);
398+
}
390399
}
391400

392401
export class IgxDateTimeFilteringOperand extends IgxBaseDateTimeFilteringOperand {

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-filtering.component.ts

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -533,37 +533,34 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
533533
}
534534

535535
private renderValues() {
536-
this.filterValues = this.generateFilterValues(this.column.dataType === GridColumnDataType.Date || this.column.dataType === GridColumnDataType.DateTime);
536+
this.filterValues = this.generateFilterValues();
537537
this.generateListData();
538538
}
539539

540-
private generateFilterValues(isDateColumn = false) {
541-
let filterValues;
540+
private generateFilterValues() {
541+
const formatValue = (value: any): any => {
542+
if (!value) return value;
542543

543-
if (isDateColumn) {
544-
filterValues = new Set<any>(this.expressionsList.reduce((arr, e) => {
545-
if (e.expression.condition.name === 'in') {
546-
return [...arr, ...Array.from((e.expression.searchVal as Set<any>).values()).map(v =>
547-
new Date(v).toISOString())];
548-
}
549-
return [...arr, ...[e.expression.searchVal ? e.expression.searchVal.toISOString() : e.expression.searchVal]];
550-
}, []));
551-
} else if (this.column.dataType === GridColumnDataType.Time) {
552-
filterValues = new Set<any>(this.expressionsList.reduce((arr, e) => {
553-
if (e.expression.condition.name === 'in') {
554-
return [...arr, ...Array.from((e.expression.searchVal as Set<any>).values()).map(v =>
555-
typeof v === 'string' ? v : new Date(v).toLocaleTimeString())];
556-
}
557-
return [...arr, ...[e.expression.searchVal ? e.expression.searchVal.toLocaleTimeString() : e.expression.searchVal]];
558-
}, []));
559-
} else {
560-
filterValues = new Set<any>(this.expressionsList.reduce((arr, e) => {
561-
if (e.expression.condition.name === 'in') {
562-
return [...arr, ...Array.from((e.expression.searchVal as Set<any>).values())];
563-
}
564-
return [...arr, ...[e.expression.searchVal]];
565-
}, []));
566-
}
544+
switch (this.column.dataType) {
545+
case GridColumnDataType.Date:
546+
return new Date(value).toDateString();
547+
case GridColumnDataType.DateTime:
548+
return new Date(value).toISOString();
549+
case GridColumnDataType.Time:
550+
return typeof value === 'string' ? value : new Date(value).toLocaleTimeString();
551+
default:
552+
return value;
553+
}
554+
};
555+
556+
const processExpression = (arr: any[], e: any): any[] => {
557+
if (e.expression.condition.name === 'in') {
558+
return [...arr, ...Array.from((e.expression.searchVal as Set<any>).values()).map(v => formatValue(v))];
559+
}
560+
return [...arr, formatValue(e.expression.searchVal)];
561+
};
562+
563+
const filterValues = new Set<any>(this.expressionsList.reduce(processExpression, []));
567564

568565
return filterValues;
569566
}
@@ -761,7 +758,7 @@ export class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent
761758

762759
private getExpressionValue(value: any): string {
763760
if (this.column.dataType === GridColumnDataType.Date) {
764-
value = value ? new Date(value).toISOString() : value;
761+
value = value ? new Date(value).toDateString() : value;
765762
} else if (this.column.dataType === GridColumnDataType.DateTime) {
766763
value = value ? new Date(value).toISOString() : value;
767764
} else if (this.column.dataType === GridColumnDataType.Time) {

projects/igniteui-angular/src/lib/grids/filtering/excel-style/excel-style-search.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,15 @@ export class IgxExcelStyleSearchComponent implements AfterViewInit, OnDestroy {
585585
condition: this.createCondition('in'),
586586
fieldName: this.esf.column.field,
587587
ignoreCase: this.esf.column.filteringIgnoreCase,
588-
searchVal: new Set(this.esf.column.dataType === GridColumnDataType.Date ||
588+
searchVal: new Set(
589+
this.esf.column.dataType === GridColumnDataType.Date ?
590+
selectedItems.map(d => d.value.toDateString()) :
589591
this.esf.column.dataType === GridColumnDataType.DateTime ?
590-
selectedItems.map(d => d.value.toISOString()) : this.esf.column.dataType === GridColumnDataType.Time ?
592+
selectedItems.map(d => d.value.toISOString()) :
593+
this.esf.column.dataType === GridColumnDataType.Time ?
591594
selectedItems.map(e => e.value.toLocaleTimeString()) :
592-
selectedItems.map(e => e.value))
595+
selectedItems.map(e => e.value)
596+
)
593597
});
594598

595599
if (blanksItem) {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ import { IgxGridCellComponent } from './cell.component';
178178
import { IgxGridValidationService } from './grid/grid-validation.service';
179179
import { getCurrentResourceStrings } from '../core/i18n/resources';
180180

181-
/*@__PURE__*/IgcTrialWatermark.register();
182-
183181
interface IMatchInfoCache {
184182
row: any;
185183
index: number;
@@ -3335,6 +3333,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
33353333
this._transactions = this.transactionFactory.create(TRANSACTION_TYPE.None);
33363334
this._transactions.cloneStrategy = this.dataCloneStrategy;
33373335
this.cdr.detach();
3336+
IgcTrialWatermark.register();
33383337
}
33393338

33403339
/**

0 commit comments

Comments
 (0)