Skip to content

Commit ab80b3f

Browse files
authored
Merge branch 'master' into mkirkova/feat-12522
2 parents 0e48452 + 8910e4a commit ab80b3f

29 files changed

+753
-232
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ All notable changes for each version of this project will be documented in this
1515
- `igxPivotGrid`
1616
- Adding `aggregatorName` for pivot value configuration as an alternative to setting `aggregator` function. If both are set `aggregatorName` takes precedent. If none are set an error is thrown.
1717
- `IgxSimpleCombo`
18-
- **Behavioral Change** - Keyboard navigation `ArrowUp` - when the combo is opened `ArrowUp` will close the dropdown if the search input is focused. If the active item is the first one in the list, the focus will be moved back to the search input while also selecting all of the text in the input. Otherwise `ArrowUp` will move to the previous list item.
18+
- **Behavioral Change**
19+
- When the user clicks on the combo's input, the dropdown opens up.
20+
- Keyboard navigation `ArrowUp` - when the combo is opened `ArrowUp` will close the dropdown if the search input is focused. If the active item is the first one in the list, the focus will be moved back to the search input while also selecting all of the text in the input. Otherwise `ArrowUp` will move to the previous list item.
1921

2022
## 15.0.0
2123

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const STYLES = {
3434
const DOCS_OUTPUT_PATH = slash(path.join(__dirname, 'dist', 'igniteui-angular', 'docs'));
3535

3636
const TYPEDOC_THEME = {
37-
SRC: slash(path.join(__dirname, 'node_modules', 'igniteui-typedoc-theme', 'src')),
37+
SRC: slash(path.join(__dirname, 'node_modules', 'ig-typedoc-theme', 'dist')),
3838
OUTPUT: slash(path.join(DOCS_OUTPUT_PATH, 'typescript'))
3939
};
4040

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"test": "ng test igniteui-angular",
99
"lint": "ng lint",
1010
"e2e": "ng e2e",
11-
"test:lib": "ng test igniteui-angular --watch=false --no-progress --code-coverage",
11+
"test:lib": "ng test igniteui-angular --watch=false --no-progress --code-coverage --source-map=false",
1212
"test:lib:perf": "ng test igniteui-angular --watch=false --no-progress --karma-config=./projects/igniteui-angular/karma.test-perf.conf.js",
13-
"test:lib:azure": "ng test igniteui-angular --watch=false --no-progress --code-coverage --karma-config=./projects/igniteui-angular/karma.azure.conf.js",
13+
"test:lib:azure": "ng test igniteui-angular --watch=false --no-progress --code-coverage --source-map=false --karma-config=./projects/igniteui-angular/karma.azure.conf.js",
1414
"test:lib:grid": "ng test igniteui-angular --watch=false --no-progress --code-coverage --karma-config=./projects/igniteui-angular/karma.grid.conf.js",
1515
"test:lib:tgrid": "ng test igniteui-angular --watch=false --no-progress --code-coverage --karma-config=./projects/igniteui-angular/karma.tree-grid.conf.js",
1616
"test:lib:hgrid": "ng test igniteui-angular --watch=false --no-progress --code-coverage --karma-config=./projects/igniteui-angular/karma.hierarchical-grid.conf.js",
@@ -67,7 +67,7 @@
6767
"core-js": "^3.27.1",
6868
"fflate": "^0.7.3",
6969
"hammerjs": "^2.0.8",
70-
"igniteui-theming": "^1.2.0",
70+
"igniteui-theming": "^1.4.1",
7171
"igniteui-trial-watermark": "^1.0.3",
7272
"karma-junit-reporter": "^2.0.1",
7373
"lodash-es": "^4.17.21",
@@ -110,7 +110,7 @@
110110
"gulp-postcss": "^9.0.1",
111111
"gulp-sass": "^5.1.0",
112112
"gulp-shell": "^0.6.5",
113-
"gulp-sourcemaps": "^2.6.4",
113+
"gulp-sourcemaps": "^3.0.0",
114114
"gulp-typescript": "^5.0.1",
115115
"gulp-uglify": "^3.0.1",
116116
"hammer-simulator": "0.0.1",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@
135135
"version": "15.0.4",
136136
"description": "Updates Ignite UI for Angular from v15.0.x to v15.0.4",
137137
"factory": "./update-15_0_4"
138+
},
139+
"migration-28": {
140+
"version": "15.0.11",
141+
"description": "Updates Ignite UI for Angular from v15.0.x to v15.0.11",
142+
"factory": "./update-15_0_11"
138143
}
139144
}
140145
}
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
import * as path from 'path';
2+
3+
import { EmptyTree } from '@angular-devkit/schematics';
4+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
5+
6+
const version = '15.0.11';
7+
8+
describe(`Update to ${version}`, () => {
9+
let appTree: UnitTestTree;
10+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
11+
12+
const configJson = {
13+
defaultProject: 'testProj',
14+
projects: {
15+
testProj: {
16+
root: '/',
17+
sourceRoot: '/testSrc'
18+
}
19+
},
20+
schematics: {
21+
'@schematics/angular:component': {
22+
prefix: 'appPrefix'
23+
}
24+
}
25+
};
26+
27+
beforeEach(() => {
28+
appTree = new UnitTestTree(new EmptyTree());
29+
appTree.create('/angular.json', JSON.stringify(configJson));
30+
});
31+
32+
const migrationName = 'migration-28';
33+
34+
it('should replace CSS $grays parameters', async () => {
35+
appTree.create(
36+
`/testSrc/appPrefix/component/test.component.scss`,
37+
`$my-palette: palette(
38+
$primary: #09f,
39+
$secondary: #e41c77,
40+
$grays: #000
41+
);
42+
$my-palette: palette(
43+
$primary: #09f,
44+
$secondary: #e41c77,
45+
$grays: #000123
46+
);`
47+
);
48+
49+
const tree = await schematicRunner
50+
.runSchematicAsync(migrationName, {}, appTree)
51+
.toPromise();
52+
53+
expect(
54+
tree.readContent('/testSrc/appPrefix/component/test.component.scss')
55+
).toEqual(
56+
`$my-palette: palette(
57+
$primary: #09f,
58+
$secondary: #e41c77,
59+
$gray: #000
60+
);
61+
$my-palette: palette(
62+
$primary: #09f,
63+
$secondary: #e41c77,
64+
$gray: #000123
65+
);`
66+
);
67+
});
68+
69+
it('should replace CSS $grays parameters variations', async () => {
70+
appTree.create(
71+
`/testSrc/appPrefix/component/test.component.scss`,
72+
`$my-palette: palette(
73+
$grays: red,
74+
$grays: rgb(204, 102, 153),
75+
$grays: rgba(107, 113, 127, 0.8),
76+
$grays: hsl(228, 7%, 86%),
77+
$grays: hsla(20, 20%, 85%, 0.7),
78+
);
79+
$my-palette: palette(
80+
$grays: red,
81+
$grays: rgb(204, 102, 153),
82+
$grays: rgba(107, 113, 127, 0.8),
83+
$grays: hsl(228, 7%, 86%),
84+
$grays: hsla(20, 20%, 85%, 0.7),
85+
);`
86+
);
87+
88+
const tree = await schematicRunner
89+
.runSchematicAsync(migrationName, {}, appTree)
90+
.toPromise();
91+
92+
expect(
93+
tree.readContent('/testSrc/appPrefix/component/test.component.scss')
94+
).toEqual(
95+
`$my-palette: palette(
96+
$gray: red,
97+
$gray: rgb(204, 102, 153),
98+
$gray: rgba(107, 113, 127, 0.8),
99+
$gray: hsl(228, 7%, 86%),
100+
$gray: hsla(20, 20%, 85%, 0.7),
101+
);
102+
$my-palette: palette(
103+
$gray: red,
104+
$gray: rgb(204, 102, 153),
105+
$gray: rgba(107, 113, 127, 0.8),
106+
$gray: hsl(228, 7%, 86%),
107+
$gray: hsla(20, 20%, 85%, 0.7),
108+
);`
109+
);
110+
});
111+
112+
it('should NOT replace $grays as custom var', async () => {
113+
appTree.create(
114+
`/testSrc/appPrefix/component/test.component.scss`,
115+
`$grays: #FFFFFF;`
116+
);
117+
118+
const tree = await schematicRunner
119+
.runSchematicAsync(migrationName, {}, appTree)
120+
.toPromise();
121+
122+
expect(
123+
tree.readContent('/testSrc/appPrefix/component/test.component.scss')
124+
).toEqual(
125+
`$grays: #FFFFFF;`
126+
);
127+
});
128+
129+
it('should replace grays as value', async () => {
130+
appTree.create(
131+
`/testSrc/appPrefix/component/test.component.scss`,
132+
`.my-class {
133+
color: contrast-color($color: 'grays', $variant: 300);
134+
}`
135+
);
136+
137+
const tree = await schematicRunner
138+
.runSchematicAsync(migrationName, {}, appTree)
139+
.toPromise();
140+
141+
expect(
142+
tree.readContent('/testSrc/appPrefix/component/test.component.scss')
143+
).toEqual(
144+
`.my-class {
145+
color: contrast-color($color: 'gray', $variant: 300);
146+
}`
147+
);
148+
});
149+
150+
it('should replace .igx-typography with .ig-typography as style', async () => {
151+
appTree.create(
152+
`/testSrc/appPrefix/component/test.component.scss`,
153+
`.igx-typography {
154+
h1, h2, h3, h4, h5, h6, p, .igx-typography__body-1 {
155+
margin: 0;
156+
}
157+
}`);
158+
159+
const tree = await schematicRunner
160+
.runSchematicAsync(migrationName, {}, appTree)
161+
.toPromise();
162+
163+
expect(
164+
tree.readContent('/testSrc/appPrefix/component/test.component.scss')
165+
).toEqual(
166+
`.ig-typography {
167+
h1, h2, h3, h4, h5, h6, p, .ig-typography__body-1 {
168+
margin: 0;
169+
}
170+
}`
171+
);
172+
});
173+
174+
it('should replace igx-typography & igx-scrollbar from template', async () => {
175+
appTree.create(
176+
`/testSrc/appPrefix/component/test.component.html`,
177+
`<body class="igx-typography igx-scrollbar">
178+
<app-root></app-root>
179+
</body>`
180+
);
181+
182+
const tree = await schematicRunner
183+
.runSchematicAsync(migrationName, {}, appTree)
184+
.toPromise();
185+
186+
expect(
187+
tree.readContent('/testSrc/appPrefix/component/test.component.html')
188+
).toEqual(
189+
`<body class="ig-typography ig-scrollbar">
190+
<app-root></app-root>
191+
</body>`
192+
);
193+
});
194+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '15.0.11';
9+
10+
export default (): Rule => async (host: Tree, context: SchematicContext) => {
11+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
12+
const update = new UpdateChanges(__dirname, host, context);
13+
update.applyChanges();
14+
15+
const updateTypographyAndScrollbar = (content: string) => {
16+
const typography = /igx-typography/g,
17+
scrollbar = /igx-scrollbar/g;
18+
return content
19+
.replace(typography, 'ig-typography')
20+
.replace(scrollbar, 'ig-scrollbar');
21+
};
22+
23+
const indexPath = '/src/index.html';
24+
if (host.exists(indexPath)) {
25+
host.overwrite(indexPath, updateTypographyAndScrollbar(host.read(indexPath).toString()));
26+
}
27+
28+
update.templateFiles.forEach(path =>
29+
host.overwrite(path, updateTypographyAndScrollbar(host.read(path).toString()))
30+
);
31+
32+
const graysVar = /\$grays:\s*(.+)(\r\n|\r|\n|,)/,
33+
graysString = /'grays'/g,
34+
graysTarget = `'gray'`;
35+
update.sassFiles.forEach(path => {
36+
let content = host.read(path).toString();
37+
const matches = content.matchAll(new RegExp(graysVar, 'g'));
38+
for (const match of matches) {
39+
content = content.replace(graysVar, `$gray: ${match[1]}${match[2]}`);
40+
}
41+
42+
if (graysString.test(content)) {
43+
content = content.replace(graysString, graysTarget);
44+
}
45+
46+
host.overwrite(path, updateTypographyAndScrollbar(content));
47+
});
48+
};

projects/igniteui-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"igniteui-trial-watermark": "^1.0.3",
7777
"lodash-es": "^4.17.21",
7878
"uuid": "^8.3.0",
79-
"igniteui-theming": "^1.2.0",
79+
"igniteui-theming": "^1.4.1",
8080
"@igniteui/material-icons-extended": "^2.10.0"
8181
},
8282
"peerDependencies": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/// The global component registry map.
88
/// @type List
9-
$components: (palette: 'palette', elevations: 'elevations') !default;
9+
$components: () !default;
1010

1111
/// Stores a list of dropped component themes.
1212
$dropped-themes: () !default;

projects/igniteui-angular/src/lib/core/styles/components/combo/_combo-component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
igx-checkbox,
1212
igx-drop-down,
1313
igx-input-group,
14-
igx-icon
14+
igx-icon,
1515
)
1616
);
1717

0 commit comments

Comments
 (0)