Skip to content

Commit 9e72e34

Browse files
authored
Merge branch 'master' into mkirova/fix-7698-master
2 parents fe5ebd7 + f5e6fec commit 9e72e34

27 files changed

+2827
-1143
lines changed

CHANGELOG.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,22 @@ All notable changes for each version of this project will be documented in this
44

55
## 10.1.0
66

7+
### General
8+
- `igxCombo`
9+
- **Behavioral Change** - Change default positioning strategy from `ConnectedPositioningStrategy` to `AutoPositionStrategy`. The [`Auto`](https://www.infragistics.com/products/ignite-ui-angular/angular/components/overlay_position.html#auto) strategy will initially try to show the element like the Connected strategy does. If the element goes out of the viewport Auto will flip the starting point and the direction, i.e. if the direction is 'bottom', it will switch it to 'top' and so on. If after flipping direction the content goes out of the view, auto strategy will revert to initial start point and direction and will push the content into the view. Note after pushing the content it may hide the combo's input.
10+
711
### New Features
8-
- `IgxColumn`
12+
- `IgxGridState` directive
13+
- Added support for expansion states, column selection and row pinning.
14+
- Added support for `IgxTreeGrid` and `IgxHierarchicalGrid` (including child grids)
15+
- `IgxColumn`
916
- Added `byHeader` parameter to the `autosize` method which specifies if the autosizing should be based only on the header content width.
17+
- `IgxToast`
18+
- `message` property has been deprecated. You can place the *message text* in the toast content or pass it as parameter to `show` method instead.
19+
- An optional string parameter `message` has been added to `show()` method.
20+
- `IgxSnackbar`
21+
- `message` property has been deprecated. You can place the *message text* in the snackbar content or pass it as parameter to `show` method instead.
22+
- An optional string parameter `message` has been added to `show()` method.
1023

1124
## 10.0.0
1225

@@ -16,9 +29,9 @@ All notable changes for each version of this project will be documented in this
1629
- `igx-select`, `igx-combo`, `igx-drop-down`
1730
- **Behavioral Change** - The select, combo, and dropdown items now have display block and text-overflow ellipsis enabled by default.
1831
- `IgxTransaction` - The `onStateUpdate` now emits with information of its origin. The emitted value is of type `StateUpdateEvent`, which has two properties:
19-
- `origin` - it can vary within the values of the `TransactionEventOrigin` interface;
32+
- `origin` - it can vary within the values of the `TransactionEventOrigin` interface;
2033
- `actions` - contains information about the transactions, that caused the emission of the event.
21-
- `IgxPaginator` - The input `overlaySettings` was introduced, which allows applying custom overlay settings for the component.
34+
- `IgxPaginator` - The input `overlaySettings` was introduced, which allows applying custom overlay settings for the component.
2235

2336
### New Features
2437
- `IgxGrid`
@@ -41,6 +54,7 @@ All notable changes for each version of this project will be documented in this
4154
- `IgxHierarchicalGrid`
4255
- `onGridInitialized` - New output has been exposed. Emitted after a grid is being initialized for the corresponding row island.
4356
- **Behavioral Change** - When moving a column `DropPosition.None` is now acting like `DropPosition.AfterDropTarget`.
57+
4458
## 9.1.0
4559

4660
### General
@@ -162,9 +176,9 @@ All notable changes for each version of this project will be documented in this
162176
```typescript
163177
public pinningConfiguration: IPinningConfig = { columns: ColumnPinningPosition.End };
164178
```
165-
- Added new properties for paging:
166-
- `totalRecords` set to alter the pages count based on total remote records. Keep in mind that If you are using paging and all the data is passed to the grid, the value of totalRecords property will be set by default to the length of the provided data source. If totalRecords is set, it will take precedent over the default length based on the data source.
167-
- `pagingMode` - accepts `GridPagingMode` enumeration. If the paging mode is set to remote the grid will not paginate the passed data source, if the paging mode is set to local (which is the default value) the grid will paginate the data source based on the page, perPage and totalRecords values.
179+
- Added new properties for paging:
180+
- `totalRecords` set to alter the pages count based on total remote records. Keep in mind that If you are using paging and all the data is passed to the grid, the value of totalRecords property will be set by default to the length of the provided data source. If totalRecords is set, it will take precedent over the default length based on the data source.
181+
- `pagingMode` - accepts `GridPagingMode` enumeration. If the paging mode is set to remote the grid will not paginate the passed data source, if the paging mode is set to local (which is the default value) the grid will paginate the data source based on the page, perPage and totalRecords values.
168182
- Added functionality for column selection.
169183
- `columnSelection` property has been added. It accepts GridSelection mode enumeration. Grid selection mode could be none, single or multiple.
170184
- `selected` property has been added to the IgxColumnComponent; Allows you to set whether the column is selected.

gulpfile.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ module.exports.copySchematics = (cb) => {
137137
const typedocBuildTheme = (cb) => {
138138
spawnSync(`typedoc`, [TYPEDOC.PROJECT_PATH,
139139
"--tsconfig",
140-
"tsconfig.base.json"], { stdio: 'inherit', shell: true });
140+
path.join(__dirname,"tsconfig.base.json")], { stdio: 'inherit', shell: true });
141141
cb();
142142
};
143143
typedocBuildTheme.displayName = 'typedoc-build:theme';
@@ -180,13 +180,26 @@ const TYPEDOC = {
180180
};
181181

182182
function typedocBuildExportFn(cb) {
183-
spawnSync('typedoc', [TYPEDOC.PROJECT_PATH, "--generate-json", TYPEDOC.EXPORT_JSON_PATH, "--tags", "--params"],
183+
spawnSync('typedoc', [
184+
TYPEDOC.PROJECT_PATH,
185+
"--generate-json",
186+
TYPEDOC.EXPORT_JSON_PATH,
187+
"--tags",
188+
"--params",
189+
"--tsconfig",
190+
path.join(__dirname,"tsconfig.base.json")],
184191
{ stdio: 'inherit', shell: true });
185192
cb();
186193
}
187194

188195
function typedocImportJsonFn(cb) {
189-
spawnSync('typedoc', [TYPEDOC.PROJECT_PATH, "--generate-from-json", TYPEDOC.EXPORT_JSON_PATH, "--warns"],
196+
spawnSync('typedoc', [
197+
TYPEDOC.PROJECT_PATH,
198+
"--generate-from-json",
199+
TYPEDOC.EXPORT_JSON_PATH,
200+
"--warns",
201+
"--tsconfig",
202+
path.join(__dirname,"tsconfig.base.json")],
190203
{ stdio: 'inherit', shell: true});
191204
cb();
192205
}
@@ -212,7 +225,7 @@ function typedocBuildDocsJA (cb) {
212225
'--localize',
213226
'jp',
214227
"--tsconfig",
215-
"tsconfig.base.json"], { stdio: 'inherit', shell: true });
228+
path.join(__dirname,"tsconfig.base.json")], { stdio: 'inherit', shell: true });
216229

217230
cb();
218231
}
@@ -223,7 +236,7 @@ function typedocBuildDocsEN (cb) {
223236
'--localize',
224237
'en',
225238
"--tsconfig",
226-
"tsconfig.base.json"], { stdio: 'inherit', shell: true});
239+
path.join(__dirname,"tsconfig.base.json")], { stdio: 'inherit', shell: true});
227240

228241
cb();
229242
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { ConnectedPositioningStrategy } from './../services/overlay/position/connected-positioning-strategy';
21
import { CommonModule } from '@angular/common';
32
import {
43
AfterViewInit, ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, HostBinding, HostListener,
@@ -30,7 +29,7 @@ import { IgxInputGroupModule, IgxInputGroupComponent } from '../input-group/inpu
3029
import { IgxComboItemComponent } from './combo-item.component';
3130
import { IgxComboDropDownComponent } from './combo-dropdown.component';
3231
import { IgxComboFilteringPipe, IgxComboGroupingPipe } from './combo.pipes';
33-
import { OverlaySettings, AbsoluteScrollStrategy } from '../services/public_api';
32+
import { OverlaySettings, AbsoluteScrollStrategy, AutoPositionStrategy } from '../services/public_api';
3433
import { Subject } from 'rxjs';
3534
import { takeUntil } from 'rxjs/operators';
3635
import { DisplayDensityBase, DisplayDensityToken, IDisplayDensityOptions } from '../core/density';
@@ -156,7 +155,7 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
156155
private _onTouchedCallback: () => void = noop;
157156
private _overlaySettings: OverlaySettings = {
158157
scrollStrategy: new AbsoluteScrollStrategy(),
159-
positionStrategy: new ConnectedPositioningStrategy(),
158+
positionStrategy: new AutoPositionStrategy(),
160159
modal: false,
161160
closeOnOutsideClick: true,
162161
excludePositionTarget: true

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,44 @@ export class IgxColumnComponent implements AfterContentInit {
439439
@WatchColumnChanges()
440440
@Input()
441441
public maxWidth: string;
442+
443+
/**
444+
* @hidden
445+
*/
446+
get maxWidthPx() {
447+
const gridAvailableSize = this.grid.calcWidth;
448+
const isPercentageWidth = this.maxWidth && typeof this.maxWidth === 'string' && this.maxWidth.indexOf('%') !== -1;
449+
return isPercentageWidth ? parseFloat(this.maxWidth) / 100 * gridAvailableSize : parseFloat(this.maxWidth);
450+
}
451+
452+
/**
453+
* @hidden
454+
*/
455+
get maxWidthPercent() {
456+
const gridAvailableSize = this.grid.calcWidth;
457+
const isPercentageWidth = this.maxWidth && typeof this.maxWidth === 'string' && this.maxWidth.indexOf('%') !== -1;
458+
return isPercentageWidth ? parseFloat(this.maxWidth) : parseFloat(this.maxWidth) / gridAvailableSize * 100;
459+
}
460+
461+
/**
462+
* @hidden
463+
*/
464+
get minWidthPx() {
465+
const gridAvailableSize = this.grid.calcWidth;
466+
const isPercentageWidth = this.minWidth && typeof this.minWidth === 'string' && this.minWidth.indexOf('%') !== -1;
467+
return isPercentageWidth ? parseFloat(this.minWidth) / 100 * gridAvailableSize : parseFloat(this.minWidth);
468+
}
469+
470+
/**
471+
* @hidden
472+
*/
473+
get minWidthPercent() {
474+
const gridAvailableSize = this.grid.calcWidth;
475+
const isPercentageWidth = this.minWidth && typeof this.minWidth === 'string' && this.minWidth.indexOf('%') !== -1;
476+
return isPercentageWidth ? parseFloat(this.minWidth) : parseFloat(this.minWidth) / gridAvailableSize * 100;
477+
}
478+
479+
442480
/**
443481
* Sets/gets the minimum `width` of the column.
444482
* Default value is `88`;
@@ -1754,12 +1792,30 @@ export class IgxColumnComponent implements AfterContentInit {
17541792
*/
17551793
public autosize(byHeader = false) {
17561794
if (!this.columnGroup) {
1757-
this.width = !byHeader ? this.getLargestCellWidth() :
1758-
(Object.values(this.getHeaderCellWidths()).reduce((a, b) => a + b) + 'px');
1795+
const size = this.getAutoSize(byHeader);
1796+
this.width = size;
17591797
this.grid.reflow();
17601798
}
17611799
}
17621800

1801+
/**
1802+
* @hidden
1803+
*/
1804+
public getAutoSize(byHeader = false) {
1805+
const size = !byHeader ? this.getLargestCellWidth() :
1806+
(Object.values(this.getHeaderCellWidths()).reduce((a, b) => a + b) + 'px');
1807+
const gridAvailableSize = this.grid.calcWidth;
1808+
let newWidth;
1809+
const isPercentageWidth = this.width && typeof this.width === 'string' && this.width.indexOf('%') !== -1;
1810+
if (isPercentageWidth) {
1811+
const percentageSize = parseFloat(size) / gridAvailableSize * 100;
1812+
newWidth = percentageSize + '%';
1813+
} else {
1814+
newWidth = size;
1815+
}
1816+
return newWidth;
1817+
}
1818+
17631819
/**
17641820
* @hidden
17651821
*/
@@ -1880,14 +1936,14 @@ export class IgxColumnComponent implements AfterContentInit {
18801936
const colWidth = this.width;
18811937
const isPercentageWidth = colWidth && typeof colWidth === 'string' && colWidth.indexOf('%') !== -1;
18821938
if (isPercentageWidth) {
1883-
this._calcWidth = parseInt(colWidth, 10) / 100 * grid.calcWidth;
1939+
this._calcWidth = parseFloat(colWidth) / 100 * grid.calcWidth;
18841940
} else if (!colWidth) {
18851941
// no width
18861942
this._calcWidth = this.defaultWidth || grid.getPossibleColumnWidth();
18871943
} else {
18881944
this._calcWidth = this.width;
18891945
}
1890-
this.calcPixelWidth = parseInt(this._calcWidth, 10);
1946+
this.calcPixelWidth = parseFloat(this._calcWidth);
18911947
}
18921948

18931949
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3552,7 +3552,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
35523552
if (this.hasColumnLayouts) {
35533553
return '';
35543554
}
3555-
const colWidth = parseInt(column.calcWidth, 10);
3555+
const colWidth = parseFloat(column.calcWidth);
35563556
const minWidth = this.defaultHeaderGroupMinWidth;
35573557

35583558
if (colWidth < minWidth) {

0 commit comments

Comments
 (0)