diff --git a/CHANGELOG.md b/CHANGELOG.md
index cfd9fbc0edd..076082feca1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,10 @@ All notable changes for each version of this project will be documented in this
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
- **Behavioral Change** - Pinning columns is no longer automatically prevented when the pinning area would exceed the size of the grid.
+- `IgxCarousel`:
+ - **Breaking Changes** -The carousel slides are no longer array, they are changed to QueryList.
+ - **Behavioural change** - When slides are more than 5, a label is shown instead of the indicators. The count limit of visible indicators can be changed with the input `maximumIndicatorsCount`
+
### New Features
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`:
@@ -25,11 +29,31 @@ All notable changes for each version of this project will be documented in this
- `sortingExpressionsChange` event emitter is added, which is fired whenever a change to the sorting expressions has occurred (prior to performing the actual sorting).
- `filteringExpressionsTreeChange` event emitter is added, which is fired whenever a change to the filtering expressions has occurred (prior to performing the actual filtering).
- `advancedFilteringExpressionsTreeChange` event emitter is added, which is fired whenever a change to the advanced filtering expressions has occurred (prior to performing the actual filtering).
-- `IgxGridExcelStyleFilteringComponent` and `IgxAdvancedFilteringDialogComponent` can now be hosted outside of the grid in order to provide the same experience as the built-in filtering UI.
-- `IgxOverlayService`:
- - `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
-- `IgxToggleDirective`:
- - `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
+ - `IgxGridExcelStyleFilteringComponent` and `IgxAdvancedFilteringDialogComponent` can now be hosted outside of the grid in order to provide the same experience as the built-in filtering UI.
+ - `IgxOverlayService`:
+ - `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
+ - `IgxToggleDirective`:
+ - `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
+ - `IgxRowDragGhost` directive is added. It allows providing a custom template for the drag ghost when dragging a row.
+ ```html
+
+
+
+
+
+
+ Moving {{data.ProductName}}!
+
+
+
+ ```
+ - `IgxCarousel`:
+ - `keyboardSupport` input is added, which can be used to enable and disable keyboard navigation
+ - `maximumIndicatorsCount` input is added, which can be used to set the number of visible indicators
+ - `indicatorsOrientation` input is added, which can be used to set the position of indicators it can be top or bottom
+ - `animationType` input is added, which can be used to set animation when changing slides
+ - `indicatorTemplate` directive is added, which can be used to provide a custom indicator for carousel. If this property is not provided, a default indicator template will be used instead.
## 8.2.6
diff --git a/projects/igniteui-angular/migrations/update-8_2_6/index.spec.ts b/projects/igniteui-angular/migrations/update-8_2_6/index.spec.ts
index 715d533783d..dee101fa865 100644
--- a/projects/igniteui-angular/migrations/update-8_2_6/index.spec.ts
+++ b/projects/igniteui-angular/migrations/update-8_2_6/index.spec.ts
@@ -67,7 +67,9 @@ describe('Update 8.2.6', () => {
it('should update igx-grid-paginator-theme', done => {
appTree.create(
'/testSrc/appPrefix/component/test.component.scss',
- `$dark-grid-paginator: igx-grid-paginator-theme($color: black);
+ `@import '~igniteui-angular/lib/core/styles/components/grid-paginator/grid-paginator-component';
+ @import '~igniteui-angular/lib/core/styles/components/grid-paginator/grid-paginator-theme';
+ $dark-grid-paginator: igx-grid-paginator-theme($color: black);
@include igx-grid-paginator($dark-grid-paginator);
.igx-grid-paginator__pager {
@include igx-button($dark-button);
@@ -77,7 +79,9 @@ describe('Update 8.2.6', () => {
const tree = schematicRunner.runSchematic('migration-12', {}, appTree);
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss'))
.toEqual(
- `$dark-grid-paginator: igx-paginator-theme($color: black);
+ `@import '~igniteui-angular/lib/core/styles/components/paginator/paginator-component';
+ @import '~igniteui-angular/lib/core/styles/components/paginator/paginator-theme';
+ $dark-grid-paginator: igx-paginator-theme($color: black);
@include igx-paginator($dark-grid-paginator);
.igx-grid-paginator__pager {
@include igx-button($dark-button);
diff --git a/projects/igniteui-angular/migrations/update-8_2_6/index.ts b/projects/igniteui-angular/migrations/update-8_2_6/index.ts
index 918b80e432d..e125b5c4c70 100644
--- a/projects/igniteui-angular/migrations/update-8_2_6/index.ts
+++ b/projects/igniteui-angular/migrations/update-8_2_6/index.ts
@@ -29,11 +29,17 @@ export default function(): Rule {
'$_square-shape-pagination'];
let globalStyleExt: string;
+ const gridPaginatorComponentImport = '~igniteui-angular/lib/core/styles/components/grid-paginator/grid-paginator-component';
+ const gridPaginatorThemeImport = '~igniteui-angular/lib/core/styles/components/grid-paginator/grid-paginator-theme';
+ const paginatorComponentImport = '~igniteui-angular/lib/core/styles/components/paginator/paginator-component';
+ const paginatorThemeImport = '~igniteui-angular/lib/core/styles/components/paginator/paginator-theme';
const config = getWorkspace(host);
const projects = getProjects(config);
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
+ const update = new UpdateChanges(__dirname, host, context);
+
if (config.schematics && config.schematics['@schematics/angular:component']) {
// updated projects have global prefix rather than per-project:
globalStyleExt = config.schematics['@schematics/angular:component'].styleext;
@@ -56,12 +62,19 @@ export default function(): Rule {
content = content.split(n).join(newThemes[i]);
}
});
+ if (content.indexOf(gridPaginatorComponentImport) !== -1) {
+ content = content.replace(gridPaginatorComponentImport, paginatorComponentImport);
+ host.overwrite(path, content);
+ }
+ if (content.indexOf(gridPaginatorThemeImport) !== -1) {
+ content = content.replace(gridPaginatorThemeImport, paginatorThemeImport);
+ host.overwrite(path, content);
+ }
host.overwrite(path, content);
}
});
}
- const update = new UpdateChanges(__dirname, host, context);
update.applyChanges();
};
}
diff --git a/projects/igniteui-angular/migrations/update-9_0_0/changes/theme-props.json b/projects/igniteui-angular/migrations/update-9_0_0/changes/theme-props.json
deleted file mode 100644
index ad0ae3cfe31..00000000000
--- a/projects/igniteui-angular/migrations/update-9_0_0/changes/theme-props.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "$schema": "../../common/schema/theme-props.schema.json",
- "changes": [
- {
- "name": "$button-background",
- "remove": true,
- "owner": "igx-grid-toolbar-theme"
- },
- {
- "name": "$button-text-color",
- "remove": true,
- "owner": "igx-grid-toolbar-theme"
- },
- {
- "name": "$button-hover-background",
- "remove": true,
- "owner": "igx-grid-toolbar-theme"
- },
- {
- "name": "$button-hover-text-color",
- "remove": true,
- "owner": "igx-grid-toolbar-theme"
- },
- {
- "name": "$button-focus-background",
- "remove": true,
- "owner": "igx-grid-toolbar-theme"
- },
- {
- "name": "$button-focus-text-color",
- "remove": true,
- "owner": "igx-grid-toolbar-theme"
- }
- ]
-}
diff --git a/projects/igniteui-angular/schematics/ng-add/index.spec.ts b/projects/igniteui-angular/schematics/ng-add/index.spec.ts
index 9b5938bfec1..46f48922c56 100644
--- a/projects/igniteui-angular/schematics/ng-add/index.spec.ts
+++ b/projects/igniteui-angular/schematics/ng-add/index.spec.ts
@@ -9,17 +9,19 @@ describe('ng-add schematics', () => {
const collectionPath = path.join(__dirname, '../collection.json');
const runner: SchematicTestRunner = new SchematicTestRunner('cli-schematics', collectionPath);
let tree: UnitTestTree;
+ const sourceRoot = 'testSrc';
const ngJsonConfig = {
defaultProject: 'testProj',
projects: {
testProj: {
- sourceRoot: 'src',
+ sourceRoot: sourceRoot,
projectType: ProjectType.Application,
architect: {
serve: {},
build: {
options: {
- main: 'src/main.ts',
+ main: `${sourceRoot}/main.ts`,
+ polyfills: `${sourceRoot}/polyfills.ts`,
scripts: []
}
}
@@ -42,7 +44,7 @@ describe('ng-add schematics', () => {
tree = new UnitTestTree(new EmptyTree());
tree.create('/angular.json', JSON.stringify(ngJsonConfig));
tree.create('/package.json', JSON.stringify(pkgJsonConfig));
- tree.create('src/main.ts', '// test comment');
+ tree.create(`${sourceRoot}/main.ts`, '// test comment');
});
it('should create the needed files correctly', () => {
@@ -71,7 +73,7 @@ describe('ng-add schematics', () => {
it('should add hammer.js to the main.ts file', () => {
runner.runSchematic('ng-add', { normalizeCss: false }, tree);
- const mainTs = tree.read('src/main.ts').toString();
+ const mainTs = tree.read(`${sourceRoot}/main.ts`).toString();
expect(mainTs).toContain('import \'hammerjs\';');
});
@@ -82,12 +84,12 @@ describe('ng-add schematics', () => {
tree.overwrite('angular.json', JSON.stringify(workspace));
runner.runSchematic('ng-add', { normalizeCss: false }, tree);
- const newContent = tree.read('src/main.ts').toString();
+ const newContent = tree.read(`${sourceRoot}/main.ts`).toString();
expect(newContent.split('import \'hammerjs\';\n// test comment').length).toEqual(1);
});
it('should not add hammer.js if it exists in main.ts', () => {
- const mainTsPath = 'src/main.ts';
+ const mainTsPath = `${sourceRoot}/main.ts`;
const content = tree.read(mainTsPath).toString();
tree.overwrite(mainTsPath, 'import \'hammerjs\';\n' + content);
runner.runSchematic('ng-add', { normalizeCss: false }, tree);
@@ -138,54 +140,54 @@ import 'core-js/es6/set';
import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
`;
- tree.create('src/polyfills.ts', polyfills);
+ tree.create(`${sourceRoot}/polyfills.ts`, polyfills);
runner.runSchematic('ng-add', { polyfills: true, normalizeCss: false }, tree);
- expect(tree.readContent('src/polyfills.ts').replace(/\r\n/g, '\n')).toEqual(result.replace(/\r\n/g, '\n'));
+ expect(tree.readContent(`${sourceRoot}/polyfills.ts`).replace(/\r\n/g, '\n')).toEqual(result.replace(/\r\n/g, '\n'));
});
it('should properly add css reset', () => {
- tree.create('src/styles.scss', '');
+ tree.create(`${sourceRoot}/styles.scss`, '');
runner.runSchematic('ng-add', { normalizeCss: true }, tree);
let pkgJsonData = JSON.parse(tree.readContent('/package.json'));
- expect(tree.readContent('src/styles.scss')).toEqual(scssImport);
+ expect(tree.readContent(`${sourceRoot}/styles.scss`)).toEqual(scssImport);
expect(pkgJsonData.dependencies['minireset.css']).toBeTruthy();
resetJsonConfigs(tree);
- tree.delete('src/styles.scss');
+ tree.delete(`${sourceRoot}/styles.scss`);
- tree.create('src/styles.sass', '');
+ tree.create(`${sourceRoot}/styles.sass`, '');
runner.runSchematic('ng-add', { normalizeCss: true }, tree);
pkgJsonData = JSON.parse(tree.readContent('/package.json'));
- expect(tree.readContent('src/styles.sass')).toEqual(scssImport);
+ expect(tree.readContent(`${sourceRoot}/styles.sass`)).toEqual(scssImport);
expect(pkgJsonData.dependencies['minireset.css']).toBeTruthy();
resetJsonConfigs(tree);
- tree.delete('src/styles.sass');
+ tree.delete(`${sourceRoot}/styles.sass`);
- tree.create('src/styles.css', '');
+ tree.create(`${sourceRoot}/styles.css`, '');
runner.runSchematic('ng-add', { normalizeCss: true }, tree);
pkgJsonData = JSON.parse(tree.readContent('/package.json'));
- expect(tree.readContent('src/styles.css')).toBe('');
+ expect(tree.readContent(`${sourceRoot}/styles.css`)).toBe('');
expect(pkgJsonData.dependencies['minireset.css']).toBeTruthy();
expect(JSON.parse(tree.readContent('/angular.json')).projects['testProj'].architect.build.options.styles).toContain(cssImport);
resetJsonConfigs(tree);
- tree.delete('src/styles.css');
+ tree.delete(`${sourceRoot}/styles.css`);
- tree.create('src/styles.less', '');
+ tree.create(`${sourceRoot}/styles.less`, '');
runner.runSchematic('ng-add', { normalizeCss: true }, tree);
pkgJsonData = JSON.parse(tree.readContent('/package.json'));
- expect(tree.readContent('src/styles.less')).toBe('');
+ expect(tree.readContent(`${sourceRoot}/styles.less`)).toBe('');
expect(pkgJsonData.dependencies['minireset.css']).toBeTruthy();
expect(JSON.parse(tree.readContent('/angular.json')).projects['testProj'].architect.build.options.styles).toContain(cssImport);
resetJsonConfigs(tree);
- tree.delete('src/styles.less');
+ tree.delete(`${sourceRoot}/styles.less`);
- tree.create('src/styles.styl', '');
+ tree.create(`${sourceRoot}/styles.styl`, '');
runner.runSchematic('ng-add', { normalizeCss: true }, tree);
pkgJsonData = JSON.parse(tree.readContent('/package.json'));
- expect(tree.readContent('src/styles.styl')).toBe('');
+ expect(tree.readContent(`${sourceRoot}/styles.styl`)).toBe('');
expect(pkgJsonData.dependencies['minireset.css']).toBeTruthy();
expect(JSON.parse(tree.readContent('/angular.json')).projects['testProj'].architect.build.options.styles).toContain(cssImport);
resetJsonConfigs(tree);
- tree.delete('src/styles.styl');
+ tree.delete(`${sourceRoot}/styles.styl`);
});
it('should properly add web animations', () => {
@@ -202,7 +204,7 @@ import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
* that is built with AngularCLI v7.3 or above. All else are considered below v7.3.
*/
it('should enable es5BrowserSupport on projects with ng cli version >= 7.3', () => {
- tree.create('src/polyfills.ts', '');
+ tree.create(`${sourceRoot}/polyfills.ts`, '');
const newJson: any = JSON.parse(tree.read('/angular.json').toString());
newJson.projects['testProj'].architect.build.options['es5BrowserSupport'] = false;
tree.overwrite('/angular.json', JSON.stringify(newJson));
@@ -226,11 +228,11 @@ import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
`;
- tree.create('src/polyfills.ts', polyfills);
+ tree.create(`${sourceRoot}/polyfills.ts`, polyfills);
const newJson: any = JSON.parse(tree.read('/angular.json').toString());
newJson.projects['testProj'].architect.build.options['es5BrowserSupport'] = false;
tree.overwrite('/angular.json', JSON.stringify(newJson));
runner.runSchematic('ng-add', { polyfills: true }, tree);
- expect(tree.readContent('src/polyfills.ts').replace(/\r\n/g, '\n')).toEqual(result.replace(/\r\n/g, '\n'));
+ expect(tree.readContent(`${sourceRoot}/polyfills.ts`).replace(/\r\n/g, '\n')).toEqual(result.replace(/\r\n/g, '\n'));
});
});
diff --git a/projects/igniteui-angular/schematics/ng-add/index.ts b/projects/igniteui-angular/schematics/ng-add/index.ts
index 8b1d8aabdc3..1c98738aa59 100644
--- a/projects/igniteui-angular/schematics/ng-add/index.ts
+++ b/projects/igniteui-angular/schematics/ng-add/index.ts
@@ -1,10 +1,11 @@
import { chain, Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
import { Options } from '../interfaces/options';
import { installPackageJsonDependencies } from '../utils/package-handler';
-import { logSuccess, addDependencies, overwriteJsonFile, getPropertyFromWorkspace } from '../utils/dependency-handler';
+import { logSuccess, addDependencies, overwriteJsonFile,
+ getPropertyFromWorkspace, getConfigFile } from '../utils/dependency-handler';
import { addResetCss } from './add-normalize';
-import { getWorkspace } from '@schematics/angular/utility/config';
+import { getWorkspace, getConfig } from '@schematics/angular/utility/config';
import { WorkspaceSchema } from '@schematics/angular/utility/workspace-models';
@@ -17,7 +18,9 @@ function propertyExistsInWorkspace(targetProp: string, workspace: WorkspaceSchem
}
function enablePolyfills(tree: Tree, context: SchematicContext): string {
- const targetFile = 'src/polyfills.ts';
+ const workspace = getWorkspace(tree);
+ const project = workspace.projects[workspace.defaultProject];
+ const targetFile = getConfigFile(project, 'polyfills');
if (!tree.exists(targetFile)) {
context.logger.warn(`${targetFile} not found. You may need to update polyfills.ts manually.`);
return;
@@ -50,7 +53,8 @@ function readInput(options: Options): Rule {
if (options.polyfills) {
const workspace = getWorkspace(tree);
const targetProperty = 'es5BrowserSupport';
- const polyfillsFile = 'src/polyfills.ts';
+ const project = workspace.projects[workspace.defaultProject];
+ const polyfillsFile = getConfigFile(project, 'polyfills');
const propertyExists = propertyExistsInWorkspace(targetProperty, workspace);
let polyfillsData = tree.read(polyfillsFile).toString();
if (propertyExists) {
diff --git a/projects/igniteui-angular/schematics/utils/dependency-handler.ts b/projects/igniteui-angular/schematics/utils/dependency-handler.ts
index d7c945a1ba4..c981bcfb3b8 100644
--- a/projects/igniteui-angular/schematics/utils/dependency-handler.ts
+++ b/projects/igniteui-angular/schematics/utils/dependency-handler.ts
@@ -26,14 +26,14 @@ function getTargetedProjectOptions(project: WorkspaceProject, targe
throw new SchematicsException(`Cannot determine the project's configuration for: ${target}`);
}
-function getMainFile(project: WorkspaceProject): string {
+export function getConfigFile(project: WorkspaceProject, option: string): string {
const buildOptions = getTargetedProjectOptions(project, 'build');
- if (!buildOptions.main) {
- throw new SchematicsException(`Could not find the project main file inside of the ` +
+ if (!buildOptions[option]) {
+ throw new SchematicsException(`Could not find the project ${option} file inside of the ` +
`workspace config (${project.sourceRoot})`);
}
- return buildOptions.main;
+ return buildOptions[option];
}
export function overwriteJsonFile(tree: Tree, targetFile: string, data: any) {
@@ -113,7 +113,7 @@ function includeDependencies(pkgJson: any, context: SchematicContext, tree: Tree
const workspace = getWorkspace(tree);
const project = workspace.projects[workspace.defaultProject];
const projectOptions = getTargetedProjectOptions(project, 'build');
- const mainTsPath = getMainFile(project);
+ const mainTsPath = getConfigFile(project, 'main');
const hammerImport = 'import \'hammerjs\';\n';
const mainTsContent = tree.read(mainTsPath).toString();
// if there are no elements in the architect.build.options.scripts array that contain hammerjs
diff --git a/projects/igniteui-angular/src/lib/calendar/calendar.component.html b/projects/igniteui-angular/src/lib/calendar/calendar.component.html
index d1d8781ed75..e76fc64c6ae 100644
--- a/projects/igniteui-angular/src/lib/calendar/calendar.component.html
+++ b/projects/igniteui-angular/src/lib/calendar/calendar.component.html
@@ -47,13 +47,13 @@