Skip to content

Commit

Permalink
Merge branch '13.1.x' into dkamburov/add-gitattributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChronosSF authored Mar 21, 2022
2 parents 2025062 + 74b697f commit dc3f34a
Show file tree
Hide file tree
Showing 63 changed files with 1,183 additions and 462 deletions.
2 changes: 1 addition & 1 deletion projects/igniteui-angular/src/lib/combo/combo.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class IgxComboAPIService {

public set_selected_item(itemID: any, event?: Event): void {
const selected = this.combo.isItemSelected(itemID);
if (itemID === null || itemID === undefined) {
if (!itemID && itemID !== 0) {
return;
}
if (!selected) {
Expand Down
4 changes: 3 additions & 1 deletion projects/igniteui-angular/src/lib/combo/combo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { IgxDropDownModule } from '../drop-down/public_api';
import { IgxInputGroupModule } from '../input-group/input-group.component';
import { IgxComboItemComponent } from './combo-item.component';
import { IgxComboDropDownComponent } from './combo-dropdown.component';
import { IgxComboFilteringPipe, IgxComboGroupingPipe } from './combo.pipes';
import { IgxComboCleanPipe, IgxComboFilteringPipe, IgxComboGroupingPipe } from './combo.pipes';
import { DisplayDensityToken, IDisplayDensityOptions } from '../core/density';
import { IGX_COMBO_COMPONENT, IgxComboBaseDirective } from './combo.common';
import { IgxComboAddItemComponent } from './combo-add-item.component';
Expand Down Expand Up @@ -448,6 +448,7 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
IgxComboDropDownComponent,
IgxComboEmptyDirective,
IgxComboFilteringPipe,
IgxComboCleanPipe,
IgxComboFooterDirective,
IgxComboGroupingPipe,
IgxComboHeaderDirective,
Expand All @@ -464,6 +465,7 @@ export class IgxComboComponent extends IgxComboBaseDirective implements AfterVie
IgxComboDropDownComponent,
IgxComboEmptyDirective,
IgxComboFilteringPipe,
IgxComboCleanPipe,
IgxComboFooterDirective,
IgxComboGroupingPipe,
IgxComboHeaderDirective,
Expand Down
21 changes: 13 additions & 8 deletions projects/igniteui-angular/src/lib/combo/combo.pipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ import { IGX_COMBO_COMPONENT, IgxComboBase } from './combo.common';
import { DefaultSortingStrategy, SortingDirection } from '../data-operations/sorting-strategy';
import { IComboFilteringOptions } from './combo.component';

/** @hidden */
@Pipe({
name: 'comboClean'
})
export class IgxComboCleanPipe implements PipeTransform {
public transform(collection: any[]) {
return collection.filter(e => !!e);
}
}

/**
* @hidden
*/
/** @hidden */
@Pipe({
name: 'comboFiltering'
})
Expand All @@ -23,8 +30,8 @@ export class IgxComboFilteringPipe implements PipeTransform {
} else {
const searchTerm = filteringOptions.caseSensitive ? searchValue.trim() : searchValue.toLowerCase().trim();
if (displayKey != null) {
return collection.filter(e => filteringOptions.caseSensitive ? e[displayKey].includes(searchTerm) :
e[displayKey].toString().toLowerCase().includes(searchTerm));
return collection.filter(e => filteringOptions.caseSensitive ? e[displayKey]?.includes(searchTerm) :
e[displayKey]?.toString().toLowerCase().includes(searchTerm));
} else {
return collection.filter(e => filteringOptions.caseSensitive ? e.includes(searchTerm) :
e.toString().toLowerCase().includes(searchTerm));
Expand All @@ -33,9 +40,7 @@ export class IgxComboFilteringPipe implements PipeTransform {
}
}

/**
* @hidden
*/
/** @hidden */
@Pipe({ name: 'comboGrouping' })
export class IgxComboGroupingPipe implements PipeTransform {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
/// @param {Color} $fill-color [null] - The checked border and fill colors.
/// @param {Color} $tick-color [null] - The checked mark color.
/// @param {Color} $disabled-color [null] - The disabled border and fill colors.
/// @param {Color} $disabled-indeterminate-color [null] - The disabled border and fill colors in indeterminate state.
/// @param {Color} $disabled-color-label [null] - The disabled label color.
/// @param {border-radius} $border-radius [null] - The border radius used for checkbox component.
/// @param {border-radius} $border-radius-ripple [null] - The border radius used for checkbox ripple.
/// @param {Color} $focus-outline-color [null] - TThe focus outlined color.
/// @param {Color} $focus-outline-color [null] - The focus outlined color.
/// Set to light when the surrounding area is dark.
///
/// @requires $default-palette
Expand All @@ -46,6 +47,7 @@
$fill-color: null,
$tick-color: null,
$disabled-color: null,
$disabled-indeterminate-color: null,
$disabled-color-label: null,
$border-radius-ripple: null,
$focus-outline-color: null
Expand Down Expand Up @@ -77,6 +79,7 @@
fill-color: $fill-color,
tick-color: $tick-color,
disabled-color: $disabled-color,
disabled-indeterminate-color: $disabled-indeterminate-color,
disabled-color-label: $disabled-color-label,
border-radius: $border-radius,
border-radius-ripple: $border-radius-ripple,
Expand All @@ -103,7 +106,7 @@
// If updating the WIDTH of the checkbox here, please update it in the grid theme as well.
// It is under the name of $cbx-size
$size: em(20px);
$size-bs: em(14px);
$size-bs: em(16px);
$checkbox-radius: math.div($size, 2);

$variant: map.get($theme, variant);
Expand Down Expand Up @@ -135,7 +138,7 @@
$mark-stroke: map.get((
material: 3,
fluent: 1,
bootstrap: 2,
bootstrap: 3,
indigo-design: 3,
), $variant);

Expand Down Expand Up @@ -229,31 +232,19 @@
background: transparent;

@if $bootstrap-theme {
%cbx-composite-mark {
stroke: var-get($theme, 'empty-color');
}
border-color: var-get($theme, 'disabled-color-label');
}
}

%cbx-composite--x--disabled {
@if $bootstrap-theme {
background: transparent;
} @else {
background: var-get($theme, 'disabled-color');
}
background: var-get($theme, 'disabled-color');

&::after {
@if $bootstrap-theme {
background: transparent;
} @else {
background: var-get($theme, 'disabled-color');
}
background: var-get($theme, 'disabled-color');
}

@if $bootstrap-theme {
%cbx-composite-mark--x {
stroke: var-get($theme, 'empty-color');
}
border-color: var-get($theme, 'disabled-color');
}
}

Expand All @@ -279,6 +270,16 @@
top: $mark-offset;
left: $mark-offset;
}

@if $variant == 'material' {
%cbx-composite--x--disabled {
border: var-get($theme, 'disabled-indeterminate-color');

&::after {
background: var-get($theme, 'disabled-indeterminate-color');
}
}
}
}

%cbx-composite-mark--x {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,6 @@
@include e(textarea) {
@extend %form-group-textarea--cosy !optional;
}

@include e(hint) {
@extend %form-group-hint--cosy !optional;
}
}

@include m(compact) {
Expand All @@ -285,10 +281,6 @@
@include e(textarea) {
@extend %form-group-textarea--compact !optional;
}

@include e(hint) {
@extend %form-group-hint--compact !optional;
}
}

@include m(box) {
Expand Down Expand Up @@ -614,6 +606,7 @@
@include e(bundle) {
@extend %form-group-bundle--focus !optional;

&:focus-within,
&:hover {
@extend %form-group-bundle--fluent--focus !optional;
}
Expand All @@ -634,6 +627,7 @@
@include e(bundle) {
@extend %form-group-bundle-success--fluent !optional;

&:focus-within,
&:hover {
@extend %form-group-bundle-success--fluent--hover !optional;
}
Expand All @@ -648,6 +642,7 @@
@include e(bundle) {
@extend %form-group-bundle-error--fluent !optional;

&:focus-within,
&:hover {
@extend %form-group-bundle-error--fluent--hover !optional;
}
Expand Down Expand Up @@ -889,10 +884,6 @@
@extend %form-group-display--disabled-bootstrap !optional;
}

@include e(label) {
@extend %bootstrap-label--disabled !optional;
}

@include e(input) {
@extend %bootstrap-input--disabled !optional;
}
Expand Down
Loading

0 comments on commit dc3f34a

Please sign in to comment.