Skip to content

Commit 45c25e7

Browse files
committed
Merge master into ddavidkov/treegrid
2 parents a560e02 + 2b4de73 commit 45c25e7

File tree

101 files changed

+4844
-3955
lines changed

Some content is hidden

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

101 files changed

+4844
-3955
lines changed

.stylelintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"plugins": ["stylelint-scss"],
3-
"ignoreFiles": ["projects/igniteui-angular/src/lib/core/styles/*.md"],
3+
"ignoreFiles": ["projects/igniteui-angular/src/lib/core/styles/**/*.md"],
44
"rules": {
55
"at-rule-blacklist": ["debug", {
66
"severity": "warning"

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33
All notable changes for each version of this project will be documented in this file.
44

55
## 6.2.0
6+
- `igx-datePicker` selector is deprecated. Use `igx-date-picker` selector instead.
67
- `igxOverlay`: `OverlaySettings` now also accepts an optional `outlet` to specify the container where the overlay should be attached.
78
- `igxToggleAction` new `outlet` input controls the target overlay element should be attached. Provides a shortcut for `overlaySettings.outlet`.
89
- `IgxOverlayOutlet` directive introducedto mark an element as an `igxOverlay` outlet container. [ReadMe](https://github.com/IgniteUI/igniteui-angular/blob/master/projects/igniteui-angular/src/lib/directives/toggle/README.md)
910
- `igxButtonGroup`
1011
- Added the ability to define buttons directly in the template
12+
- `igx-time-picker`:
13+
- `igxTimePickerTemplate` - new directive which should be applied on the child `<ng-template>` element when `IgxTimePickerComponent`'s input group is retemplated.
14+
- `igx-datePicker`:
15+
- `igxDatePickerTemplate` - new directive which should be applied on the child `<ng-template>` element when `IgxDatePickerComponent`'s input group is retemplated.
1116
- `IgxTextHighlightDirective`: The `highlight` method now has a new optional parameter called `exactMatch` (defaults to false).
1217
- If its value is false, all occurrences of the search text will be highlighted in the group's value.
1318
- If its value is true, the entire group's value should equals the search text in order to be highlighted (caseSensitive argument is respected as well).

ROADMAP.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@
5353

5454
## Milestone 3 (by July 6th, 2018)
5555

56-
1. **[DONE]**Grouping
57-
2. **[DONE]**Grid Multi-column Headers [issue](https://github.com/IgniteUI/igniteui-angular/issues/488)
58-
3. **[DONE]**Combo
59-
4. **[DONE]**Column Hiding UI
60-
5. **[DONE]**Operations UI - column chooser
61-
6. **[DONE]**Advanced Filtering
62-
7. **[DONE]**Column Moving
56+
1. **[DONE]** Grouping
57+
2. **[DONE]** Grid Multi-column Headers [issue](https://github.com/IgniteUI/igniteui-angular/issues/488)
58+
3. **[DONE]** Combo
59+
4. **[DONE]** Column Hiding UI
60+
5. **[DONE]** Operations UI - column chooser
61+
6. **[DONE]** Advanced Filtering
62+
7. **[DONE]** Column Moving
6363
8. **[DONE]** Update to Angular 6
6464
9. **[DONE]** Design: Release Updated Design System (Sketch UI kits, UI patterns, screens, documentation)
65-
10.**[DONE]**Design: Data dense theme for data grid
65+
10.**[DONE]** Design: Data dense theme for data grid
6666

6767

6868
# Postponed

projects/igniteui-angular/migrations/migration-collection.json

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"version": "6.1.0",
2121
"description": "Updates Ignite UI for Angular from v6.0.x to v6.1.0",
2222
"factory": "./update-6_1"
23+
},
24+
"migration-05": {
25+
"version": "6.2.0",
26+
"description": "Updates Ignite UI for Angular from v6.1.x to v6.2.0",
27+
"factory": "./update-6_2"
2328
}
2429
}
2530
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "../../common/schema/selector.schema.json",
3+
"changes": [
4+
{
5+
"type": "component",
6+
"selector": "igx-datePicker",
7+
"replaceWith": "igx-date-picker"
8+
}
9+
]
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import * as path from 'path';
2+
3+
// tslint:disable:no-implicit-dependencies
4+
import { virtualFs } from '@angular-devkit/core';
5+
import { EmptyTree } from '@angular-devkit/schematics';
6+
// tslint:disable-next-line:no-submodule-imports
7+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
8+
9+
describe('Update 6.2.0', () => {
10+
let appTree: UnitTestTree;
11+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
12+
const configJson = {
13+
defaultProject: 'testProj',
14+
projects: {
15+
testProj: {
16+
sourceRoot: '/testSrc'
17+
}
18+
},
19+
schematics: {
20+
'@schematics/angular:component': {
21+
prefix: 'appPrefix'
22+
}
23+
}
24+
};
25+
26+
beforeEach(() => {
27+
appTree = new UnitTestTree(new EmptyTree());
28+
appTree.create('/angular.json', JSON.stringify(configJson));
29+
});
30+
31+
it('should update igxDatePicker selector', done => {
32+
appTree.create(
33+
'/testSrc/appPrefix/component/test.component.html',
34+
`<igx-datePicker></igx-datePicker>`
35+
);
36+
const tree = schematicRunner.runSchematic('migration-05', {}, appTree);
37+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.html'))
38+
.toEqual(`<igx-date-picker></igx-date-picker>`);
39+
done();
40+
});
41+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import * as path from 'path';
2+
3+
// tslint:disable:no-implicit-dependencies
4+
import { normalize } from '@angular-devkit/core';
5+
import {
6+
chain,
7+
Rule,
8+
SchematicContext,
9+
SchematicsException,
10+
Tree
11+
} from '@angular-devkit/schematics';
12+
import { filterSourceDirs } from '../common/filterSourceDirs';
13+
import { getImportModulePositions } from '../common/tsUtils';
14+
import { UpdateChanges } from '../common/UpdateChanges';
15+
16+
const version = '6.2.0';
17+
18+
export default function(): Rule {
19+
return (host: Tree, context: SchematicContext) => {
20+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
21+
22+
const update = new UpdateChanges(__dirname, host, context);
23+
update.applyChanges();
24+
};
25+
}

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -1628,37 +1628,37 @@ describe('igxCombo', () => {
16281628
tick();
16291629
fix.detectChanges();
16301630
expect(combo.collapsed).toBeFalsy();
1631-
// NOTE: Minimum itemHeight is 2 rem, per Material Design Guidelines
1631+
// NOTE: Minimum itemHeight is 2 rem, per Material Design Guidelines (for mobile only)
16321632
expect(combo.itemHeight).toEqual(32); // Default value for itemHeight
16331633
expect(combo.itemsMaxHeight).toEqual(320); // Default value for itemsMaxHeight
16341634
const dropdownItems = fix.debugElement.queryAll(By.css('.' + CSS_CLASS_DROPDOWNLISTITEM));
16351635
const dropdownList = fix.debugElement.query(By.css('.' + CSS_CLASS_CONTENT));
16361636
expect(dropdownList.nativeElement.clientHeight).toEqual(320);
1637-
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(32);
1637+
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(48);
16381638

1639-
combo.itemHeight = 47;
1639+
combo.itemHeight = 48;
16401640
tick();
16411641
fix.detectChanges();
1642-
expect(combo.itemHeight).toEqual(47);
1642+
expect(combo.itemHeight).toEqual(48);
16431643
expect(combo.itemsMaxHeight).toEqual(320);
16441644
expect(dropdownList.nativeElement.clientHeight).toEqual(320);
1645-
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(47);
1645+
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(48);
16461646

16471647
combo.itemsMaxHeight = 438;
16481648
tick();
16491649
fix.detectChanges();
1650-
expect(combo.itemHeight).toEqual(47);
1650+
expect(combo.itemHeight).toEqual(48);
16511651
expect(combo.itemsMaxHeight).toEqual(438);
16521652
expect(dropdownList.nativeElement.clientHeight).toEqual(438);
1653-
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(47);
1653+
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(48);
16541654

16551655
combo.itemsMaxHeight = 1171;
16561656
tick();
16571657
fix.detectChanges();
1658-
expect(combo.itemHeight).toEqual(47);
1658+
expect(combo.itemHeight).toEqual(48);
16591659
expect(combo.itemsMaxHeight).toEqual(1171);
16601660
expect(dropdownList.nativeElement.clientHeight).toEqual(1171);
1661-
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(47);
1661+
expect(dropdownItems[0].nativeElement.clientHeight).toEqual(48);
16621662

16631663
combo.itemHeight = 83;
16641664
tick();

projects/igniteui-angular/src/lib/core/styles/base/utilities/_mixins.scss

+37
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,40 @@
245245
@mixin igx-css-vars($theme) {
246246
@include css-vars-from-theme($theme);
247247
}
248+
249+
/// Scopes CSS rules to a predefined top-level parent selector.
250+
/// Respects specificity and selector scopes.
251+
/// @access private
252+
/// @param {String} $parent - The selector to be used as top level scope.
253+
/// @example scss Apply mixin style rules only when '.igx-typography' selector is present.
254+
/// @mixin igx-card-typography {
255+
/// @include igx-scope('.igx-typography') {
256+
/// // style rules...
257+
/// }
258+
/// }
259+
///
260+
/// // Later
261+
/// .my-selector {
262+
/// @include igx-card-typography();
263+
/// }
264+
///
265+
/// // Generated CSS
266+
/// // .igx-typography .my-selector {
267+
/// // ...styles rules as output by igx-card-typography mixin
268+
/// // }
269+
@mixin igx-scope($parent) {
270+
@each $selector in & {
271+
$len: length($selector);
272+
@if $len == null {
273+
$parent: $parent;
274+
} @else {
275+
@for $i from 1 through $len {
276+
$parent: append($parent, nth($selector, $i));
277+
}
278+
}
279+
280+
@at-root #{$parent} {
281+
@content;
282+
}
283+
}
284+
}

projects/igniteui-angular/src/lib/core/styles/components/bottom-nav/_bottom-nav-theme.scss

+17-6
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474
$item-max-width: 168px;
7575
$item-padding: 0 rem(12px, 16px);
7676

77-
$label-font-size: rem(12px, 16px);
78-
$label-line-height: rem(12px, 16px);
79-
80-
8177
%igx-tab-panel {
8278
display: none;
8379
}
@@ -142,8 +138,6 @@
142138
%igx-tab-label {
143139
@include ellipsis();
144140
padding-top: 4px;
145-
font-size: $label-font-size;
146-
line-height: $label-line-height;
147141
max-width: 100%;
148142
text-align: center;
149143
transform: translateZ(0);
@@ -179,3 +173,20 @@
179173
transform: translateY(-2px) scale(1.166667);
180174
}
181175
}
176+
177+
/// Adds typography styles for the igx-bottom-nav component.
178+
/// Uses the 'caption'
179+
/// category from the typographic scale.
180+
/// @group typography
181+
/// @param {Map} $type-scale - A typographic scale as produced by igx-type-scale.
182+
/// @param {Map} $categories [(label: 'caption')] - The categories from the typographic scale used for type styles.
183+
/// @requires {mixin} igx-type-style
184+
@mixin igx-bottom-nav-typography($type-scale, $categories: (label: 'caption')) {
185+
$label: map-get($categories, 'label');
186+
187+
@include igx-scope('.igx-typography') {
188+
%igx-tab-label {
189+
@include igx-type-style($type-scale, $label);
190+
}
191+
}
192+
}

projects/igniteui-angular/src/lib/core/styles/components/button/_button-theme.scss

+19-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/// @group themes
33
/// @access public
44
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
5+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
56
////
67

78
/// If only background color is specified, text/icon color
@@ -221,9 +222,6 @@
221222
@include igx-root-css-vars($theme);
222223

223224
$button-border: none;
224-
$button-font-size: rem(14px, 16px);
225-
$button-line-height: 1;
226-
$button-font-weight: 600;
227225
$button-width: rem(88px);
228226
$button-height: rem(36px);
229227
$button-padding: 0 rem(16px, 16px);
@@ -247,20 +245,15 @@
247245
$button-icon-padding: 0;
248246

249247
%igx-button-display {
248+
position: relative;
250249
display: inline-flex;
251250
align-items: center;
252251
justify-content: center;
253-
position: relative;
254252
min-width: $button-width;
255253
height: $button-height;
256254
padding: $button-padding;
257-
font-size: $button-font-size;
258-
font-weight: $button-font-weight;
259-
line-height: $button-line-height;
260-
text-align: center;
261255
border: $button-border;
262256
border-radius: --var($theme, 'button-roundness');
263-
text-transform: uppercase;
264257
cursor: pointer;
265258
user-select: none;
266259
outline: none;
@@ -375,3 +368,20 @@
375368
}
376369
}
377370

371+
/// Adds typography styles for the igx-button component.
372+
/// Uses the 'button' category from the typographic scale.
373+
/// @group typography
374+
/// @param {Map} $type-scale - A typographic scale as produced by igx-type-scale.
375+
/// @param {String} $categories [(text: 'button')] - The category from the typographic scale used for type styles.
376+
/// @requires {mixin} igx-type-style
377+
@mixin igx-button-typography($type-scale, $categories: (text: 'button')) {
378+
$text: map-get($categories, 'text');
379+
380+
@include igx-scope('.igx-typography') {
381+
%igx-button-display {
382+
@include igx-type-style($type-scale, $text) {
383+
text-align: center
384+
}
385+
}
386+
}
387+
}

0 commit comments

Comments
 (0)