Skip to content

Commit

Permalink
Merge pull request #9058 from IgniteUI/dTsvetkov/fix-lint-warnings-co…
Browse files Browse the repository at this point in the history
…lumn

fix(lint): Column lint warnings
  • Loading branch information
kdinev committed Apr 7, 2021
2 parents 4848aa3 + af95648 commit 5896af7
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 43 deletions.
15 changes: 6 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ All notable changes for each version of this project will be documented in this
- **Breaking Change** - The `locale` and `pipeArgs` parameters are removed from the `operate` method exposed by the `IgxNumberSummaryOperand`, `IgxDateSummaryOperand`, `IgxCurrencySummaryOperand` and `IgxPercentSummaryOperand`. They are now set in the `igx-grid-summary-cell` template. To change the locale and format setting of the `igx-grid-summary-cell` the user can use the new `summaryFormatter` property of the `IgxColumnComponent`.
- `IgxTabs`, `IgxBottomNav`
- **Breaking Change** - `IgxTabs` and `IgxBottomNav` components were completely refactored in order to provide more flexible and descriptive way to define tab headers and contents. Please make sure to update via `ng update` in order to migrate the existing `igx-tabs` and `igx-bottom-nav` definitions to the new ones.
- **Breaking Change** - `IgxHierarchicalGrid` and `igxRowIsland` events are renamed as follows:
- `IgxColumnComponent`
- **Breaking Change** - The `onColumnChange` output is renamed to `columnChange`.
- **Breaking Change** - `IgxHierarchicalGrid` and `igxRowIsland` events are renamed as follows:
- `onGridCreated` -> `gridCreated`
- `onGridInitialized` -> `gridInitialized`
- `onDataPreLoad` -> `dataPreLoad`
Expand Down Expand Up @@ -51,7 +53,9 @@ All notable changes for each version of this project will be documented in this
- The `igx-tab-header` supports `igx-prefix` and `igx-suffix` directives in its `ng-content`.
- `IgxBottomNav`
- The `IgxBottomNav` component exposes `disableAnimations` property which determines whether the contents should animate when switching the selected item. The property is set to `true` by default which means that the animations are disabled.

- `IgxOverlayService`
- `detach` and `detachAll` methods are added to `IgxOverlayService`. Calling `detach` will remove all the elements generated for the related overlay, as well as clean up all related resources. Calling `detachAll` will remove all elements generated by any call to `IgxOverlay` `attach`, and will clean up all related resources. _Note: calling `hide` or `hideAll` will not clean generated by the service elements and will not clean up related resources._

### Themes:
- Breaking Changes:
- `IgxButton` theme has been simplified. The number of theme params (`igx-button-theme`) has been reduced significantly and no longer includes prefixed parameters (`flat-*`, `raised-*`, etc.). See the migration guide to update existing button themes. Updates performed with `ng update` will migrate existing button themes but some additional tweaking may be required to account for the abscense of prefixed params.
Expand All @@ -64,13 +68,6 @@ All notable changes for each version of this project will be documented in this
```




### New Features
- `IgxOverlayService`
- `detach` and `detachAll` methods are added to `IgxOverlayService`. Calling `detach` will remove all the elements generated for the related overlay, as well as clean up all related resources. Calling `detachAll` will remove all elements generated by any call to `IgxOverlay` `attach`, and will clean up all related resources. _Note: calling `hide` or `hideAll` will not clean generated by the service elements and will not clean up related resources._


## 11.1.1

### New Features
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "../../common/schema/members-changes.schema.json",
"changes": [
{
"member": "onColumnChange",
"replaceWith": "columnChange",
"definedIn": [
"IgxColumnComponent"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { flatten } from '../../core/utils';
export class IgxColumnGroupComponent extends IgxColumnComponent implements AfterContentInit {

@ContentChildren(IgxColumnComponent, { read: IgxColumnComponent })
children = new QueryList<IgxColumnComponent>();
public children = new QueryList<IgxColumnComponent>();

/**
* Set if the column group is collapsible.
Expand Down Expand Up @@ -157,13 +157,13 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
get bodyTemplate(): TemplateRef<any> {
public get bodyTemplate(): TemplateRef<any> {
return this._bodyTemplate;
}
/**
* @hidden
*/
set bodyTemplate(template: TemplateRef<any>) { }
public set bodyTemplate(template: TemplateRef<any>) { }

/**
* Allows you to define a custom template for expand/collapse indicator
Expand All @@ -181,13 +181,13 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
get inlineEditorTemplate(): TemplateRef<any> {
public get inlineEditorTemplate(): TemplateRef<any> {
return this._inlineEditorTemplate;
}
/**
* @hidden
*/
set inlineEditorTemplate(template: TemplateRef<any>) { }
public set inlineEditorTemplate(template: TemplateRef<any>) { }
/**
* Gets the column group cells.
* ```typescript
Expand All @@ -196,7 +196,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
get cells(): IgxGridCellComponent[] {
public get cells(): IgxGridCellComponent[] {
return [];
}
/**
Expand All @@ -208,7 +208,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
* @memberof IgxColumnGroupComponent
*/
@Input()
get hidden() {
public get hidden() {
return this.allChildren.every(c => c.hidden);
}
/**
Expand All @@ -224,7 +224,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
set hidden(value: boolean) {
public set hidden(value: boolean) {
this._hidden = value;
this.hiddenChange.emit(this._hidden);
if (this._hidden || !this.collapsible) {
Expand All @@ -247,7 +247,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
get selected(): boolean {
public get selected(): boolean {
const selectableChildren = this.allChildren.filter(c => !c.columnGroup && c.selectable && !c.hidden);
return selectableChildren.length > 0 && selectableChildren.every(c => c.selected);
}
Expand All @@ -260,7 +260,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
set selected(value: boolean) {
public set selected(value: boolean) {
if (this.selectable) {
this.children.forEach(c => {
c.selected = value;
Expand All @@ -277,7 +277,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
/**
* @hidden
*/
ngAfterContentInit() {
public ngAfterContentInit() {
/*
@ContentChildren with descendants still returns the `parent`
component in the query list.
Expand Down Expand Up @@ -308,7 +308,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
get allChildren(): IgxColumnComponent[] {
public get allChildren(): IgxColumnComponent[] {
return flatten(this.children.toArray());
}
/**
Expand All @@ -319,7 +319,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
get columnGroup() {
public get columnGroup() {
return true;
}
/**
Expand All @@ -330,7 +330,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnComponent
*/
get columnLayout() {
public get columnLayout() {
return false;
}
/**
Expand All @@ -341,7 +341,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
*
* @memberof IgxColumnGroupComponent
*/
get width() {
public get width() {
const width = `${this.children.reduce((acc, val) => {
if (val.hidden) {
return acc;
Expand All @@ -351,7 +351,7 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
return width + 'px';
}

set width(val) { }
public set width(val) { }

/**
* @hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
*
* @memberof IgxColumnGroupComponent
*/
get width(): any {
public get width(): any {
const width = this.getFilledChildColumnSizes(this.children).reduce((acc, val) => acc + parseInt(val, 10), 0);
return width;
}

set width(val: any) { }
public set width(val: any) { }

get columnLayout() {
public get columnLayout() {
return true;
}

Expand All @@ -59,7 +59,7 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
*
* @memberof IgxColumnComponent
*/
get visibleIndex(): number {
public get visibleIndex(): number {
if (!isNaN(this._vIndex)) {
return this._vIndex;
}
Expand All @@ -86,7 +86,7 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
* @memberof IgxColumnGroupComponent
*/
@Input()
get hidden() {
public get hidden() {
return this._hidden;
}

Expand All @@ -98,7 +98,7 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
*
* @memberof IgxColumnGroupComponent
*/
set hidden(value: boolean) {
public set hidden(value: boolean) {
this._hidden = value;
this.children.forEach(child => child.hidden = value);
if (this.grid && this.grid.columns && this.grid.columns.length > 0) {
Expand All @@ -115,7 +115,7 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
/**
* @hidden
*/
ngAfterContentInit() {
public ngAfterContentInit() {
super.ngAfterContentInit();
if (!this.hidden) {
this.hidden = this.allChildren.some(x => x.hidden);
Expand All @@ -135,7 +135,7 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
* ```
* @memberof IgxColumnLayoutComponent
*/
get hasLastPinnedChildColumn() {
public get hasLastPinnedChildColumn() {
return this.children.some(child => child.isLastPinned);
}

Expand All @@ -146,7 +146,7 @@ export class IgxColumnLayoutComponent extends IgxColumnGroupComponent implements
* ```
* @memberof IgxColumnLayoutComponent
*/
get hasFirstPinnedChildColumn() {
public get hasFirstPinnedChildColumn() {
return this.children.some(child => child.isFirstPinned);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -886,12 +886,12 @@ export class ResizableColumnsComponent {
export class LargePinnedColGridComponent implements OnInit {
@ViewChild(IgxGridComponent, { static: true }) public grid: IgxGridComponent;

timeGenerator: Calendar = new Calendar();
today: Date = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 0, 0, 0);
data = [];
value: any;
public timeGenerator: Calendar = new Calendar();
public today: Date = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 0, 0, 0);
public data = [];
public value: any;

ngOnInit() {
public ngOnInit() {
this.data = SampleTestData.generateProductData(75);
}

Expand Down Expand Up @@ -952,9 +952,9 @@ export class NullColumnsComponent implements OnInit {
export class ColGridComponent implements OnInit {
@ViewChild(IgxGridComponent, { static: true }) public grid: IgxGridComponent;

data = [];
public data = [];

ngOnInit() {
public ngOnInit() {
this.data = SampleTestData.generateProductData(10);
}
}
Expand All @@ -970,9 +970,9 @@ export class ColGridComponent implements OnInit {
export class ColPercentageGridComponent implements OnInit {
@ViewChild(IgxGridComponent, { static: true }) public grid: IgxGridComponent;

data = [];
public data = [];

ngOnInit() {
public ngOnInit() {
this.data = SampleTestData.generateProductData(10);
}
}

0 comments on commit 5896af7

Please sign in to comment.