Skip to content

Commit 276ac3d

Browse files
committed
Merge branch 'master' into ibarakov/fix-8247-master
# Conflicts: # projects/igniteui-angular/src/lib/grids/cell.component.html # projects/igniteui-angular/src/lib/grids/tree-grid/tree-cell.component.html
2 parents 8bba383 + 555db7d commit 276ac3d

File tree

142 files changed

+3267
-994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+3267
-994
lines changed

CHANGELOG.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,25 @@ All notable changes for each version of this project will be documented in this
3030
- `onOpening` and `onClosing` events are emitting now arguments of `ToggleViewCancelableEventArgs` type.
3131
- `IgxSelect`
3232
- Added `aria-labelledby` property for the items list container(marked as `role="listbox"`). This will ensure the users of assistive technologies will also know what the list items container is used for, upon opening.
33-
- `IgxDatePicker`
33+
- `IgxDatePicker`
3434
- **Breaking Change** - Deprecated the `label` property.
3535
- Added `aria-labelledby` property for the input field. This will ensure the users of assistive technologies will also know what component is used for, upon input focus.
3636
- `igxNavigationDrawer`
3737
- Added `disableAnimation` property which enables/disables the animation, when toggling the drawer. Set to `false` by default.
3838
- `igxTabs`
3939
- Added `disableAnimation` property which enables/disables the transition animation of the tabs' content. Set to `false` by default.
4040
- `IgxExpansionPanel`
41-
- `IExpansionPanelEventArgs.panel` - Deprecated. Usе `owner` property to get a reference to the panel.
41+
- `IExpansionPanelEventArgs.panel` - Deprecated. Usе `owner` property to get a reference to the panel.
42+
- `IgxCalendarComponent`, `IgxMonthsViewComponent` and `IgxYearsViewComponent`
43+
- `tabIndex` property was removed in order to improve on page navigation and to be compliant with W3 accessability recommendations; Also the date grid in the calendar is now only one tab stop, the same approach is applied and in the `IgxMonthsViewComponent` and `IgxYearsViewComponent`;
4244

4345
### New Features
4446
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
4547
- When triggering an export of the grid via the toolbar and the export takes more than 500 milliseconds, the export button becomes disabled and an indeterminate progress bar is shown at the bottom of the toolbar until the export is finished.
4648
- `cellEditExit` is a new event that fires when cell exits edit mode
4749
- `rowEditExit` is a new event that fires when row exits edit mode
4850
- Added *getRowData(rowSelector)* method that returns an object that represents the data that is contained in the specified row component.
49-
- Added ability to spawn row adding UI through exoposed methods. Note that rowEditing should be enabled.
51+
- Added ability to spawn row adding UI through exposed methods. Note that rowEditing should be enabled.
5052
- `beginAddRow` method which starts the adding row UI.
5153
- `beginAddChild` method which starts the adding child UI.
5254
```typescript
@@ -61,6 +63,22 @@ All notable changes for each version of this project will be documented in this
6163
</igx-action-strip>
6264
</igx-tree-grid>
6365
```
66+
- A new `locale` and `pipeArgs` parameters are introduced in the `operate` method exposed by the `IgxNumberSummaryOperand` and `IgxDateSummaryOperand`, which exposes the grid locale. Use the `locale` parameter to get localized summary data (as per the grid locale. If not passed, `locale` defaults to `'en-US'`). Use the `pipeArgs` parameter only if you want to customize the format of the date and numeric values that will be returned.
67+
```typescript
68+
class MySummary extends IgxDateSummaryOperand {
69+
operate(columnData: any[], allData = [], fieldName, locale: string, pipeArgs: IColumnPipeArgs): IgxSummaryResult[] {
70+
const pipeArgs: IColumnPipeArgs = {
71+
format: 'longDate',
72+
timezone: 'UTC',
73+
digitsInfo: '1.1-2'
74+
}
75+
const result = super.operate(columnData, allData, fieldName, locale, pipeArgs);
76+
return result;
77+
}
78+
}
79+
```
80+
- A new `pipeArgs` input property is exposed by the `IgxColumnComponent`, which is used to pass arguments to the Angular `DatePipe` and `DecimalPipe`, to format the display for date and numeric columns.
81+
```typescript
6482
- ` IGX_INPUT_GROUP_TYPE` injection token
6583
- Allows for setting an input group `type` on a global level, so all input-group instances, including components using such an instance as a template will have their input group type set to the one specified by the token. It can be overridden on a component level by explicitly setting a `type`.
6684
- ` IgxExcelExporterService`
@@ -73,6 +91,19 @@ All notable changes for each version of this project will be documented in this
7391
- `IgxOverlay`
7492
- The `PositionSettings` `target` property has been deprecated and moved to `OverlaySettings`.
7593
- An optional Point/HTML Element parameter `target` has been added to the `position()` method
94+
- Added `createAbsoluteOverlaySettings` and `createRelativeOverlaySettings` methods which create non-modal `OverlaySettings` based on predefined `PositionSettings`. The methods are exposed off the `IgxOverlayService`.
95+
- `createAbsoluteOverlaySettings` creates non-modal `OverlaySettings` with `GlobalPositionStrategy` or `ContainerPositionStrategy` if an outlet is provided. Accepts `AbsolutePosition` enumeration, which could be `Center`, `Top` and `Bottom`. Default is `Center`.
96+
```typescript
97+
const globalOverlaySettings = IgxOverlayService.createAbsoluteOverlaySettings(AbsolutePosition.Top);
98+
```
99+
- `createRelativeOverlaySettings` creates `OverlaySettings` with `AutoPositionStrategy`, `ConnectedPositioningStrategy` or `ElasticPositionStrategy`. Accepts target, strategy and position. The `target` is the attaching point or element for the component to show. The position strategy is a `RelativePositionStrategy` enumeration, which defaults to `Auto`. The position is a `RelativePosition` enumeration. Possible values are `Above`, `Below`, `Before`, `After` and `Default`. The default option is `Default`, which positions the element below the target, left aligned.
100+
```typescript
101+
const targetElement = this.button.nativeElement;
102+
const connectedOverlaySettings = IgxOverlayService.createRelativeOverlaySettings(
103+
targetElement,
104+
RelativePositionStrategy.Connected,
105+
RelativePosition.Above);
106+
```
76107
- `IgxToast`
77108
- The component now utilizes the `IgxOverlayService` to position itself in the DOM.
78109
- An additional input property `outlet` has been added to allow users to specify custom Overlay Outlets using the `IgxOverlayOutletDirective`;

package-lock.json

Lines changed: 46 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@angular/platform-browser": "^10.1.0",
5353
"@angular/platform-browser-dynamic": "^10.1.0",
5454
"@angular/router": "^10.1.0",
55-
"@igniteui/material-icons-extended": "^2.3.0",
55+
"@igniteui/material-icons-extended": "^2.4.0",
5656
"@types/hammerjs": "^2.0.36",
5757
"@types/source-map": "0.5.2",
5858
"classlist.js": "^1.1.20150312",
@@ -61,6 +61,7 @@
6161
"igniteui-trial-watermark": "^1.0.3",
6262
"jszip": "^3.5.0",
6363
"lodash.merge": "^4.6.2",
64+
"uuid": "^8.3.0",
6465
"resize-observer-polyfill": "^1.5.1",
6566
"rxjs": "^6.6.3",
6667
"setimmediate": "^1.0.5",

projects/igniteui-angular/migrations/common/UpdateChanges.ts

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
import { SchematicContext, Tree, FileVisitor } from '@angular-devkit/schematics';
2-
import { WorkspaceSchema } from '@schematics/angular/utility/workspace-models';
3-
41
import * as fs from 'fs';
52
import * as path from 'path';
3+
import * as ts from 'typescript';
64
import * as tss from 'typescript/lib/tsserverlibrary';
5+
import { SchematicContext, Tree, FileVisitor } from '@angular-devkit/schematics';
6+
import { WorkspaceSchema } from '@schematics/angular/utility/workspace-models';
77
import {
88
ClassChanges, BindingChanges, SelectorChange,
99
SelectorChanges, ThemePropertyChanges, ImportsChanges, MemberChanges
1010
} from './schema';
1111
import {
1212
getLanguageService, getRenamePositions, findMatches,
13-
replaceMatch, createProjectService, isMemberIgniteUI
13+
replaceMatch, createProjectService, isMemberIgniteUI, NG_LANG_SERVICE_PACKAGE_NAME
1414
} from './tsUtils';
15-
import { getProjectPaths, getWorkspace, getProjects, escapeRegExp } from './util';
15+
import {
16+
getProjectPaths, getWorkspace, getProjects, escapeRegExp,
17+
getPackageManager, canResolvePackage, tryInstallPackage, tryUninstallPackage
18+
} from './util';
1619
import { ServerHost } from './ServerHost';
1720

1821
export enum InputPropertyType {
@@ -82,14 +85,23 @@ export class UpdateChanges {
8285
return this._sassFiles;
8386
}
8487

85-
private _service: tss.LanguageService;
86-
public get service(): tss.LanguageService {
88+
private _service: ts.LanguageService;
89+
public get service(): ts.LanguageService {
8790
if (!this._service) {
8891
this._service = getLanguageService(this.tsFiles, this.host);
8992
}
9093
return this._service;
9194
}
9295

96+
private _packageManager: 'npm' | 'yarn';
97+
private get packageManager(): 'npm' | 'yarn' {
98+
if (!this._packageManager) {
99+
this._packageManager = getPackageManager(this.host);
100+
}
101+
102+
return this._packageManager;
103+
}
104+
93105
/**
94106
* Create a new base schematic to apply changes
95107
* @param rootPath Root folder for the schematic to read configs, pass __dirname
@@ -111,16 +123,27 @@ export class UpdateChanges {
111123

112124
/** Apply configured changes to the Host Tree */
113125
public applyChanges() {
126+
const shouldInstallPkg = this.membersChanges && this.membersChanges.changes.length
127+
&& !canResolvePackage(NG_LANG_SERVICE_PACKAGE_NAME);
128+
if (shouldInstallPkg) {
129+
this.context.logger.info(`Installing temporary migration dependencies via ${this.packageManager}.`);
130+
tryInstallPackage(this.context, this.packageManager, NG_LANG_SERVICE_PACKAGE_NAME);
131+
}
132+
114133
this.updateTemplateFiles();
115134
this.updateTsFiles();
116135
this.updateMembers();
117-
118136
/** Sass files */
119137
if (this.themePropsChanges && this.themePropsChanges.changes.length) {
120138
for (const entryPath of this.sassFiles) {
121139
this.updateThemeProps(entryPath);
122140
}
123141
}
142+
143+
if (shouldInstallPkg) {
144+
this.context.logger.info(`Cleaning up temporary migration dependencies.`);
145+
tryUninstallPackage(this.context, this.packageManager, NG_LANG_SERVICE_PACKAGE_NAME);
146+
}
124147
}
125148

126149
/** Add condition function. */

0 commit comments

Comments
 (0)