Skip to content

Commit a5fcaa9

Browse files
authored
Merge branch '10.0.x' into astaev/fixDocsVersionOrder-10.0.x
2 parents 7e00d5c + 5f4923a commit a5fcaa9

35 files changed

+510
-330
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes for each version of this project will be documented in this
55
## 10.1.0
66

77
### New Features
8+
- `IgxCalendar` and `IgxMonthPicker`
9+
- `viewDateChanged` emitted after the month/year presented in the view is changed after user interaction.
10+
- `activeViewChanged` event emitted after the active view (DEFAULT, YEAR, DECADE) is changed after user interaction.
11+
- `viewDate` day value is always 1.
12+
- `activeView` setter is now available as an input property.
13+
- `IgxGridState` directive
14+
- Added support for expansion states, column selection and row pinning.
15+
- Added support for `IgxTreeGrid` and `IgxHierarchicalGrid` (including child grids)
816
- `IgxColumn`
917
- Added `byHeader` parameter to the `autosize` method which specifies if the autosizing should be based only on the header content width.
1018
- `IgxToast`

gulpfile.js

+18-5
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
}

package-lock.json

+6-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@
5757
"@types/source-map": "0.5.2",
5858
"classlist.js": "^1.1.20150312",
5959
"core-js": "^2.6.11",
60+
"core-js-pure": "^3.6.5",
6061
"hammerjs": "^2.0.8",
6162
"igniteui-trial-watermark": "^1.0.3",
6263
"jszip": "^3.4.0",
6364
"resize-observer-polyfill": "^1.5.1",
6465
"rxjs": "^6.5.4",
6566
"tslib": "^2.0.0",
67+
"setimmediate": "^1.0.5",
6668
"web-animations-js": "^2.3.2",
6769
"zone.js": "~0.10.3"
6870
},

projects/igniteui-angular/ng-package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"whitelistedNonPeerDependencies": [
99
"@types/hammerjs",
1010
"@types/jszip",
11+
"core-js-pure",
1112
"hammerjs",
1213
"jszip",
1314
"resize-observer-polyfill",

projects/igniteui-angular/ng-package.prod.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"whitelistedNonPeerDependencies": [
1111
"@types/hammerjs",
1212
"@types/jszip",
13+
"core-js-pure",
1314
"hammerjs",
1415
"jszip",
1516
"resize-observer-polyfill",

projects/igniteui-angular/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"dependencies": {
6969
"@types/hammerjs": "^2.0.36",
7070
"@types/jszip": "^3.1.7",
71+
"core-js-pure": "^3.6.5",
7172
"hammerjs": "^2.0.8",
7273
"jszip": "^3.3.0",
7374
"tslib": "^2.0.0",

projects/igniteui-angular/schematics/utils/dependency-handler.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const DEPENDENCIES_MAP: PackageEntry[] = [
3030
{ name: '@types/hammerjs', target: PackageTarget.DEV },
3131
{ name: '@types/jszip', target: PackageTarget.DEV },
3232
{ name: 'igniteui-trial-watermark', target: PackageTarget.NONE },
33+
{ name: 'core-js-pure', target: PackageTarget.NONE },
3334
// peerDependencies
3435
{ name: '@angular/forms', target: PackageTarget.NONE },
3536
{ name: '@angular/common', target: PackageTarget.NONE },

projects/igniteui-angular/src/lib/calendar/README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ The calendar header will not be rendered when the selection is either `multi` or
133133

134134
- `viewDate: Date`
135135

136-
Controls the year/month that will be presented in the default view when the calendar renders. By default it is the current year/month.
136+
Controls the year/month that will be presented in the default view when the calendar renders. By default it is the first day of the current year/month.
137137

138138
- `value: Date | Date[]`
139139

@@ -173,7 +173,17 @@ Controls the visibility of the dates that do not belong to the current month.
173173
- `onSelection(): Date | Date[]`
174174

175175
Event fired when a value is selected through UI interaction.
176-
Returns the selected value (depending on the type of selection).
176+
Emits the selected value (depending on the type of selection).
177+
178+
- `viewDateChanged(): IViewDateChangeEventArgs`
179+
180+
Event fired after the month/year presented in the view is changed.
181+
Emits an object containing the previous and current value of the `viewDate` property.
182+
183+
- `activeViewChanged(): CalendarView`
184+
185+
Event fired after the active view is changed.
186+
Emits an CalendarView enum, indicating the `activeView` property value.
177187

178188

179189
### Methods

projects/igniteui-angular/src/lib/calendar/calendar-base.ts

+36-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ControlValueAccessor } from '@angular/forms';
44
import { DateRangeDescriptor } from '../core/dates';
55
import { Subject } from 'rxjs';
66
import { isDate } from '../core/utils';
7+
import { CalendarView } from './month-picker-base';
78

89
/**
910
* Sets the selction type - single, multi or range.
@@ -20,6 +21,11 @@ export enum ScrollMonth {
2021
NONE = 'none'
2122
}
2223

24+
export interface IViewDateChangeEventArgs {
25+
previousValue: Date;
26+
currentValue: Date;
27+
}
28+
2329
/** @hidden @internal */
2430
@Directive({
2531
selector: '[igxCalendarBase]',
@@ -168,7 +174,8 @@ export class IgxCalendarBaseDirective implements ControlValueAccessor {
168174
* Sets the date that will be presented in the default view when the component renders.
169175
*/
170176
public set viewDate(value: Date) {
171-
this._viewDate = this.getDateOnly(value);
177+
const date = this.getDateOnly(value).setDate(1);
178+
this._viewDate = new Date(date);
172179
}
173180

174181
/**
@@ -240,6 +247,34 @@ export class IgxCalendarBaseDirective implements ControlValueAccessor {
240247
@Output()
241248
public onSelection = new EventEmitter<Date | Date[]>();
242249

250+
/**
251+
* Emits an event when the month in view is changed.
252+
* ```html
253+
* <igx-calendar (viewDateChanged)="viewDateChanged($event)"></igx-calendar>
254+
* ```
255+
* ```typescript
256+
* public viewDateChanged(event: IViewDateChangeEventArgs) {
257+
* let viewDate = event.currentValue;
258+
* }
259+
* ```
260+
*/
261+
@Output()
262+
public viewDateChanged = new EventEmitter<IViewDateChangeEventArgs>();
263+
264+
/**
265+
* Emits an event when the active view is changed.
266+
* ```html
267+
* <igx-calendar (activeViewChanged)="activeViewChanged($event)"></igx-calendar>
268+
* ```
269+
* ```typescript
270+
* public activeViewChanged(event: CalendarView) {
271+
* let activeView = event;
272+
* }
273+
* ```
274+
*/
275+
@Output()
276+
public activeViewChanged = new EventEmitter<CalendarView>();
277+
243278
/**
244279
* @hidden
245280
*/

projects/igniteui-angular/src/lib/calendar/calendar.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2 class="igx-calendar__header-date">
2222
</h2>
2323
</div>
2424

25-
<div *ngIf="isDefaultView" class="igx-calendar__body" [@animateView]="activeView" (swiperight)="previousMonth()"
25+
<div *ngIf="isDefaultView" class="igx-calendar__body" [@animateView]="activeView" (@animateView.done)="viewRendered($event)" (swiperight)="previousMonth()"
2626
(swipeleft)="nextMonth()">
2727
<div class="igx-calendar-picker">
2828
<div tabindex="0" class="igx-calendar-picker__prev" #prevMonthBtn
@@ -63,15 +63,15 @@ <h2 class="igx-calendar__header-date">
6363
</div>
6464
</div>
6565

66-
<igx-months-view *ngIf="isYearView" [@animateView]="activeView" #months
66+
<igx-months-view *ngIf="isYearView" [@animateView]="activeView" #months (@animateView.done)="viewRendered($event)"
6767
[date]="viewDate"
6868
[locale]="locale"
6969
[formatView]="formatViews.month"
7070
[monthFormat]="formatOptions.month"
7171
(onSelection)="changeMonth($event)">
7272
</igx-months-view>
7373

74-
<igx-years-view *ngIf="isDecadeView" [@animateView]="activeView" #decade
74+
<igx-years-view *ngIf="isDecadeView" [@animateView]="activeView" #decade (@animateView.done)="viewRendered($event)"
7575
[date]="viewDate"
7676
[locale]="locale"
7777
[formatView]="formatViews.year"

0 commit comments

Comments
 (0)