Skip to content

Commit ea9b332

Browse files
authored
Merge branch 'master' into mdragnev/fix-12189
2 parents 42d6e38 + 97367eb commit ea9b332

29 files changed

+3088
-3280
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
],
2727
"no-unused-vars": "off",
2828
"@typescript-eslint/no-unused-vars": [
29-
"warn",
29+
"error",
3030
{
3131
"varsIgnorePattern": "_",
3232
"argsIgnorePattern": "^_"

e2e/cypress/plugins/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Plugins enable you to tap into, modify, or extend the internal behavior of Cypress
22
// For more info, visit https://on.cypress.io/plugins-api
3-
module.exports = (on, config) => {}
3+
module.exports = (_on, _config) => {}

package-lock.json

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

package.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@
5353
},
5454
"private": true,
5555
"dependencies": {
56-
"@angular/animations": "^15.0.0",
57-
"@angular/common": "^15.0.0",
58-
"@angular/compiler": "^15.0.0",
59-
"@angular/core": "^15.0.0",
60-
"@angular/forms": "^15.0.0",
61-
"@angular/platform-browser": "^15.0.0",
62-
"@angular/platform-browser-dynamic": "^15.0.0",
63-
"@angular/router": "^15.0.0",
56+
"@angular/animations": "^15.1.0",
57+
"@angular/common": "^15.1.0",
58+
"@angular/compiler": "^15.1.0",
59+
"@angular/core": "^15.1.0",
60+
"@angular/forms": "^15.1.0",
61+
"@angular/platform-browser": "^15.1.0",
62+
"@angular/platform-browser-dynamic": "^15.1.0",
63+
"@angular/router": "^15.1.0",
6464
"@igniteui/material-icons-extended": "^2.10.0",
6565
"@types/hammerjs": "^2.0.40",
6666
"@types/source-map": "0.5.2",
67-
"core-js": "^3.26.1",
67+
"core-js": "^3.27.1",
6868
"fflate": "^0.7.3",
6969
"hammerjs": "^2.0.8",
7070
"igniteui-theming": "^1.2.0",
@@ -77,30 +77,30 @@
7777
"zone.js": "~0.12.0"
7878
},
7979
"devDependencies": {
80-
"@angular-devkit/build-angular": "^15.0.0",
81-
"@angular-devkit/schematics": "^15.0.0",
82-
"@angular-eslint/builder": "^15.1.0",
83-
"@angular-eslint/eslint-plugin": "^15.1.0",
84-
"@angular-eslint/eslint-plugin-template": "^15.1.0",
85-
"@angular-eslint/schematics": "^15.1.0",
86-
"@angular-eslint/template-parser": "^15.1.0",
87-
"@angular/cli": "^15.0.0",
88-
"@angular/compiler-cli": "^15.0.0",
89-
"@angular/language-service": "^15.0.0",
80+
"@angular-devkit/build-angular": "^15.1.1",
81+
"@angular-devkit/schematics": "^15.1.1",
82+
"@angular-eslint/builder": "^15.2.0",
83+
"@angular-eslint/eslint-plugin": "^15.2.0",
84+
"@angular-eslint/eslint-plugin-template": "^15.2.0",
85+
"@angular-eslint/schematics": "^15.2.0",
86+
"@angular-eslint/template-parser": "^15.2.0",
87+
"@angular/cli": "^15.1.1",
88+
"@angular/compiler-cli": "^15.1.0",
89+
"@angular/language-service": "^15.1.0",
9090
"@angularclass/hmr": "^3.0.0",
91-
"@cypress/schematic": "^2.3.0",
91+
"@cypress/schematic": "^2.4.0",
9292
"@types/estree": "^1.0.0",
93-
"@types/jasmine": "^4.3.0",
93+
"@types/jasmine": "^4.3.1",
9494
"@types/jasminewd2": "^2.0.10",
95-
"@types/node": "^18.11.0",
95+
"@types/node": "^18.11.18",
9696
"@types/sass-true": "^6.0.2",
9797
"@types/webpack-env": "^1.16.3",
98-
"@typescript-eslint/eslint-plugin": "^5.43.0",
99-
"@typescript-eslint/parser": "^5.43.0",
98+
"@typescript-eslint/eslint-plugin": "^5.48.1",
99+
"@typescript-eslint/parser": "^5.48.1",
100100
"browser-sync": "^2.27.11",
101-
"cypress": "latest",
101+
"cypress": "^12.3.0",
102102
"del": "^6.0.0",
103-
"eslint": "^8.28.0",
103+
"eslint": "^8.32.0",
104104
"eslint-plugin-import": "2.25.2",
105105
"eslint-plugin-jsdoc": "37.9.1",
106106
"eslint-plugin-prefer-arrow": "1.2.2",
@@ -116,7 +116,7 @@
116116
"hammer-simulator": "0.0.1",
117117
"ig-typedoc-theme": "^4.2.0",
118118
"igniteui-sassdoc-theme": "^1.1.4",
119-
"igniteui-webcomponents": "^4.0.0",
119+
"igniteui-webcomponents": "^4.1.1",
120120
"jasmine": "^4.5.0",
121121
"jasmine-core": "~4.5.0",
122122
"karma": "^6.3.11",
@@ -125,16 +125,16 @@
125125
"karma-jasmine": "~5.1.0",
126126
"karma-parallel": "^0.3.1",
127127
"karma-spec-reporter": "^0.0.34",
128-
"ng-packagr": "^15.0.0",
129-
"postcss-scss": "^4.0.3",
128+
"ng-packagr": "^15.1.1",
129+
"postcss-scss": "^4.0.6",
130130
"sass": "^1.56.0",
131131
"sass-true": "^6.0.1",
132132
"sassdoc": "^2.7.4",
133133
"sassdoc-plugin-localization": "^1.4.3",
134-
"stylelint": "^14.15.0",
134+
"stylelint": "^14.16.1",
135135
"stylelint-scss": "^4.1.0",
136136
"ts-node": "^10.8.1",
137-
"typedoc": "^0.23.21",
137+
"typedoc": "^0.23.24",
138138
"typedoc-plugin-localization": "^2.4.0",
139139
"typescript": "4.8.4"
140140
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Plugins enable you to tap into, modify, or extend the internal behavior of Cypress
22
// For more info, visit https://on.cypress.io/plugins-api
3-
module.exports = (on, config) => {}
3+
module.exports = (_on, _config) => {}

projects/igniteui-angular/migrations/update-15_0_4/index.spec.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as path from 'path';
22

33
import { EmptyTree } from '@angular-devkit/schematics';
44
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
5+
import { ProjectType } from '../../schematics/utils/util';
56

67
const version = '15.0.4';
78

@@ -24,18 +25,44 @@ describe(`Update to ${version}`, () => {
2425
},
2526
version: 1
2627
};
28+
const configJsonLib = {
29+
defaultProject: 'testProj',
30+
projects: {
31+
testProj: {
32+
root: '/',
33+
sourceRoot: '/testSrc',
34+
prefix: 'lib',
35+
projectType: ProjectType.Library,
36+
architect: {
37+
build: {
38+
options: {
39+
}
40+
}
41+
}
42+
}
43+
},
44+
version: 1
45+
};
2746

2847
beforeEach(() => {
2948
appTree = new UnitTestTree(new EmptyTree());
30-
appTree.create('/angular.json', JSON.stringify(configJson));
3149
});
3250

3351
const migrationName = 'migration-27';
3452

3553
it(`should add igniteui-theming to pacakage json and configure it`, async () => {
54+
appTree.create('/angular.json', JSON.stringify(configJson));
3655
const tree = await schematicRunner.runSchematicAsync(migrationName, {}, appTree)
3756
.toPromise();
3857

3958
expect(JSON.parse(JSON.stringify(tree.readContent('angular.json')))).toContain("stylePreprocessorOptions");
4059
});
60+
61+
it(`should not add igniteui-theming to library pacakage json and configure it`, async () => {
62+
appTree.create('/angular.json', JSON.stringify(configJsonLib));
63+
const tree = await schematicRunner.runSchematicAsync(migrationName, {}, appTree)
64+
.toPromise();
65+
66+
expect(JSON.parse(JSON.stringify(tree.readContent('angular.json')))).not.toContain("stylePreprocessorOptions");
67+
});
4168
});

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { workspaces } from '@angular-devkit/core';
22
import { SchematicContext, Rule, Tree } from '@angular-devkit/schematics';
33
import { Options } from '../interfaces/options';
4-
import { createHost } from './util';
4+
import { createHost, ProjectType } from './util';
55

66
export enum PackageTarget {
77
DEV = 'devDependencies',
@@ -158,8 +158,10 @@ const addHammerToConfig =
158158
};
159159

160160
export const includeStylePreprocessorOptions = async (workspaceHost: workspaces.WorkspaceHost, workspace: workspaces.WorkspaceDefinition, context: SchematicContext, tree: Tree): Promise<void> => {
161-
await Promise.all(Array.from(workspace.projects.values()).map(async (project) => {
161+
await Promise.all(Array.from(workspace.projects.values()).map(async (project: workspaces.ProjectDefinition) => {
162+
if (project.extensions['projectType'] === ProjectType.Library) return;
162163
await addStylePreprocessorOptions(project, tree, "build", context);
164+
await addStylePreprocessorOptions(project, tree, "server", context);
163165
await addStylePreprocessorOptions(project, tree, "test", context);
164166
}));
165167

projects/igniteui-angular/src/lib/action-strip/action-strip.component.spec.ts

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import { IgxActionStripComponent } from './action-strip.component';
22
import { Component, ViewChild, ElementRef, ViewContainerRef } from '@angular/core';
33
import { configureTestSuite } from '../test-utils/configure-suite';
44
import { IgxIconModule } from '../icon/public_api';
5-
import { TestBed, fakeAsync, waitForAsync } from '@angular/core/testing';
5+
import { TestBed } from '@angular/core/testing';
66
import { By } from '@angular/platform-browser';
77
import { wait } from '../test-utils/ui-interactions.spec';
88
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
99
import { IgxToggleModule } from '../directives/toggle/toggle.directive';
1010
import { IgxActionStripModule } from './action-strip.module';
11+
import { IgxDropDownModule } from '../drop-down/public_api';
1112

1213
const ACTION_STRIP_CONTAINER_CSS = 'igx-action-strip__actions';
1314
const DROP_DOWN_LIST = 'igx-drop-down__list';
@@ -20,33 +21,38 @@ describe('igxActionStrip', () => {
2021
let innerContainer: ViewContainerRef;
2122

2223
describe('Unit tests: ', () => {
23-
const mockViewContainerRef = jasmine.createSpyObj('ViewContainerRef', ['element']);
24-
const mockRenderer2 = jasmine.createSpyObj('Renderer2', ['appendChild', 'removeChild']);
25-
const mockContext = jasmine.createSpyObj('context', ['element']);
26-
const mockDisplayDensity = jasmine.createSpyObj('IDisplayDensityOptions', ['displayDensity']);
27-
const cdr = jasmine.createSpyObj('ChangeDetectorRef', ['detectChanges']);
28-
29-
it('should properly get/set hidden', () => {
30-
actionStrip = new IgxActionStripComponent(mockViewContainerRef, mockRenderer2, mockDisplayDensity, cdr);
31-
expect(actionStrip.hidden).toBeFalsy();
32-
actionStrip.hidden = true;
33-
expect(actionStrip.hidden).toBeTruthy();
24+
25+
configureTestSuite(() => {
26+
return TestBed.configureTestingModule({
27+
declarations: [
28+
IgxActionStripComponent
29+
],
30+
imports: [
31+
NoopAnimationsModule,
32+
IgxDropDownModule
33+
]
34+
});
3435
});
3536

3637
it('should properly show and hide using API', () => {
37-
actionStrip = new IgxActionStripComponent(mockViewContainerRef, mockRenderer2, mockDisplayDensity, cdr);
38-
actionStrip.show(mockContext);
38+
fixture = TestBed.createComponent(IgxActionStripComponent);
39+
actionStrip = fixture.componentInstance as IgxActionStripComponent;
40+
fixture.detectChanges();
41+
42+
const el = document.createElement('div');
43+
fixture.debugElement.nativeElement.appendChild(el);
44+
actionStrip.show(el);
3945
expect(actionStrip.hidden).toBeFalsy();
40-
expect(actionStrip.context).toBe(mockContext);
46+
expect(actionStrip.context).toBe(el);
4147
actionStrip.hide();
4248
expect(actionStrip.hidden).toBeTruthy();
49+
fixture.debugElement.nativeElement.removeChild(el);
4350
});
4451
});
4552

4653
describe('Initialization and rendering tests: ', () => {
47-
configureTestSuite();
48-
beforeAll(waitForAsync(() => {
49-
TestBed.configureTestingModule({
54+
configureTestSuite(() => {
55+
return TestBed.configureTestingModule({
5056
declarations: [
5157
IgxActionStripTestingComponent
5258
],
@@ -56,16 +62,18 @@ describe('igxActionStrip', () => {
5662
NoopAnimationsModule,
5763
IgxToggleModule
5864
]
59-
}).compileComponents();
60-
}));
61-
beforeEach(fakeAsync(() => {
65+
})
66+
});
67+
68+
beforeEach(() => {
6269
fixture = TestBed.createComponent(IgxActionStripTestingComponent);
6370
fixture.detectChanges();
6471
actionStrip = fixture.componentInstance.actionStrip;
6572
actionStripElement = fixture.componentInstance.actionStripElement;
6673
parentContainer = fixture.componentInstance.parentContainer;
6774
innerContainer = fixture.componentInstance.innerContainer;
68-
}));
75+
});
76+
6977
it('should be overlapping its parent container when no context is applied', () => {
7078
const parentBoundingRect = parentContainer.nativeElement.getBoundingClientRect();
7179
const actionStripBoundingRect = actionStripElement.nativeElement.getBoundingClientRect();
@@ -102,9 +110,8 @@ describe('igxActionStrip', () => {
102110
});
103111

104112
describe('render content as menu', () => {
105-
configureTestSuite();
106-
beforeAll(waitForAsync(() => {
107-
TestBed.configureTestingModule({
113+
configureTestSuite(() => {
114+
return TestBed.configureTestingModule({
108115
declarations: [
109116
IgxActionStripMenuTestingComponent,
110117
IgxActionStripCombinedMenuTestingComponent
@@ -115,8 +122,8 @@ describe('igxActionStrip', () => {
115122
NoopAnimationsModule,
116123
IgxToggleModule
117124
]
118-
}).compileComponents();
119-
}));
125+
});
126+
});
120127

121128
it('should render tree-dot button which toggles the content as menu', () => {
122129
fixture = TestBed.createComponent(IgxActionStripMenuTestingComponent);

projects/igniteui-angular/src/lib/core/selection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class IgxSelectionAPIService {
177177
* @param componentID ID of the component, which we add new items to.
178178
* @param itemIDs Array of IDs of the items to add to component selection.
179179
*/
180-
public deselect_items(componentID: string, itemID: any[], clearSelection?: boolean) {
180+
public deselect_items(componentID: string, itemID: any[], _clearSelection?: boolean) {
181181
this.set(componentID, this.delete_items(componentID, itemID));
182182
}
183183

projects/igniteui-angular/src/lib/core/touch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class HammerGesturesManager {
127127
* @param element The DOM element used to create the manager on.
128128
*/
129129
public getManagerForElement(element: EventTarget): HammerManager {
130-
const result = this._hammerManagers.filter((value, index, array) => value.element === element);
130+
const result = this._hammerManagers.filter(value => value.element === element);
131131
return result.length ? result[0].manager : null;
132132
}
133133

0 commit comments

Comments
 (0)