Skip to content

Commit e127404

Browse files
authored
Indigo: Add Updates for Navdrawer, Navbar, and Switch (#14231)
1 parent 9e7b005 commit e127404

23 files changed

+501
-158
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@types/source-map": "0.5.2",
7171
"express": "^4.19.2",
7272
"fflate": "^0.8.1",
73-
"igniteui-theming": "^6.2.0",
73+
"igniteui-theming": "^6.3.0",
7474
"igniteui-trial-watermark": "^3.0.2",
7575
"lodash-es": "^4.17.21",
7676
"rxjs": "^7.8.0",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@
181181
"version": "17.2.2",
182182
"description": "Updates Ignite UI for Angular from v17.2.0 to v17.2.2",
183183
"factory": "./update-17_2_2"
184+
},
185+
"migration-37": {
186+
"version": "17.2.3",
187+
"description": "Updates Ignite UI for Angular from v17.2.2 to v17.2.3",
188+
"factory": "./update-17_2_3"
184189
}
185190
}
186191
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "../../common/schema/theme-changes.schema.json",
3+
"changes": [
4+
{
5+
"name": "$idle-item-color",
6+
"replaceWith": "$label-color",
7+
"owner": "bottom-nav-theme",
8+
"type": "property"
9+
},
10+
{
11+
"name": "$selected-item-color",
12+
"replaceWith": "$label-selected-color",
13+
"owner": "bottom-nav-theme",
14+
"type": "property"
15+
}
16+
]
17+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 = '17.2.3';
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+
projects: {
14+
testProj: {
15+
root: '/',
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+
const migrationName = 'migration-37';
32+
33+
it('should rename the $idle-item-color property to the $label-color', async () => {
34+
appTree.create(
35+
`/testSrc/appPrefix/component/test.component.scss`,
36+
`$custom-bottom-nav: bottom-nav-theme($idle-item-color: red);`
37+
);
38+
39+
const tree = await schematicRunner.runSchematic(migrationName, { shouldInvokeLS: false }, appTree);
40+
41+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
42+
`$custom-bottom-nav: bottom-nav-theme($label-color: red);`
43+
);
44+
});
45+
46+
it('should rename the $selected-item-color property to the $label-selected-color', async () => {
47+
appTree.create(
48+
`/testSrc/appPrefix/component/test.component.scss`,
49+
`$custom-bottom-nav: bottom-nav-theme($selected-item-color: red);`
50+
);
51+
52+
const tree = await schematicRunner.runSchematic(migrationName, { shouldInvokeLS: false }, appTree);
53+
54+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
55+
`$custom-bottom-nav: bottom-nav-theme($label-selected-color: red);`
56+
);
57+
});
58+
});
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Rule, SchematicContext, Tree } from "@angular-devkit/schematics";
2+
import { BoundPropertyObject, InputPropertyType, UpdateChanges } from "../common/UpdateChanges";
3+
4+
const version = "17.2.3";
5+
6+
export default (): Rule => async (host: Tree, context: SchematicContext) => {
7+
context.logger.info(
8+
`Applying migration for Ignite UI for Angular to version ${version}`,
9+
);
10+
const update = new UpdateChanges(__dirname, host, context);
11+
12+
update.addValueTransform('vertical_to_orientation', (args: BoundPropertyObject): void => {
13+
args.bindingType = InputPropertyType.STRING;
14+
15+
switch (args.value) {
16+
case 'true':
17+
args.value = 'vertical';
18+
break;
19+
case 'false':
20+
args.value = 'horizontal';
21+
break;
22+
default:
23+
args.value += ` ? 'vertical' : 'horizontal' `;
24+
}
25+
});
26+
27+
update.applyChanges();
28+
};

projects/igniteui-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"igniteui-trial-watermark": "^3.0.2",
7575
"lodash-es": "^4.17.21",
7676
"uuid": "^9.0.0",
77-
"igniteui-theming": "^6.2.0",
77+
"igniteui-theming": "^6.3.0",
7878
"@igniteui/material-icons-extended": "^3.0.0"
7979
},
8080
"peerDependencies": {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@
6262

6363
[igxBottomNavHeaderIcon] {
6464
@extend %igx-tab-icon !optional;
65+
@extend %igx-tab-icon--disabled !optional;
6566
}
6667

6768
[igxBottomNavHeaderLabel] {
6869
@extend %igx-tab-label !optional;
70+
@extend %igx-tab-label--disabled !optional;
6971
}
7072
}
7173
}

0 commit comments

Comments
 (0)