diff --git a/live-editing/configs/IconButtonConfigGenerator.ts b/live-editing/configs/IconButtonConfigGenerator.ts new file mode 100644 index 0000000000..3b6fcbe843 --- /dev/null +++ b/live-editing/configs/IconButtonConfigGenerator.ts @@ -0,0 +1,101 @@ +import {IgxButtonGroupModule, + IgxButtonModule, + IgxIconButtonDirective, + IgxIconModule, + IgxRippleModule} from 'igniteui-angular'; +import {AppModuleConfig, Config, IConfigGenerator} from 'igniteui-live-editing' +export class IconButtonConfigGenerator implements IConfigGenerator { + public generateConfigs(): Config[] { + const configs = new Array(); + + // icon button overview + configs.push(new Config({ + component: 'IconButtonOverviewComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonOverviewComponent'], + ngDeclarations: ['IconButtonOverviewComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // flat icon button + configs.push(new Config({ + component: 'FlatIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'FlatIconButtonComponent'], + ngDeclarations: ['FlatIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // contained icon button + configs.push(new Config({ + component: 'ContainedIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'ContainedIconButtonComponent'], + ngDeclarations: ['ContainedIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // outlined icon button + configs.push(new Config({ + component: 'OutlinedIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'OutlinedIconButtonComponent'], + ngDeclarations: ['OutlinedIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // disabled icon button + configs.push(new Config({ + component: 'DisabledIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'DisabledIconButtonComponent'], + ngDeclarations: ['DisabledIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // SVG icon button + configs.push(new Config({ + component: 'SVGIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'SVGIconButtonComponent'], + ngDeclarations: ['SVGIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // icon button styling + configs.push(new Config({ + component: 'IconButtonStylingComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonStylingComponent'], + ngDeclarations: ['IconButtonStylingComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // icon button size + configs.push(new Config({ + component: 'IconButtonSizeComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonSizeComponent'], + ngDeclarations: ['IconButtonSizeComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + return configs; + } +} diff --git a/live-editing/generators/ConfigGenerators.ts b/live-editing/generators/ConfigGenerators.ts index 15dc53e453..1c8e2d4ed9 100644 --- a/live-editing/generators/ConfigGenerators.ts +++ b/live-editing/generators/ConfigGenerators.ts @@ -28,6 +28,7 @@ import { ForConfigGenerator } from '../configs/ForConfigGenerator'; import { GridConfigGenerator } from '../configs/GridConfigGenerator'; import { HierarchicalGridConfigGenerator } from '../configs/HierarchicalGridConfigGenerator'; import { IconConfigGenerator } from '../configs/IconConfigGenerator'; +import { IconButtonConfigGenerator } from '../configs/IconButtonConfigGenerator'; import { InputGroupConfigGenerator } from '../configs/InputGroupConfigGenerator'; import { LayoutConfigGenerator } from '../configs/LayoutConfigGenerator'; import { LinearProgressbarConfigGenerator } from '../configs/LinearProgressbarConfigGenerator'; @@ -99,6 +100,7 @@ export const CONFIG_GENERATORS = DateRangePickerConfigGenerator, DateTimeEditorConfigGenerator, DropDownConfigGenerator, + IconButtonConfigGenerator, InputGroupConfigGenerator, MaskConfigGenerator, MonthPickerConfigGenerator, diff --git a/projects/app-crm/src/app/app.module.ts b/projects/app-crm/src/app/app.module.ts index 8cdfc77ddd..20a199aa65 100644 --- a/projects/app-crm/src/app/app.module.ts +++ b/projects/app-crm/src/app/app.module.ts @@ -4,7 +4,7 @@ import { BrowserModule, HammerModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { IgxAutocompleteModule, IgxButtonModule, IgxIconModule, IgxInputGroupModule, IgxLayoutModule, - IgxRippleModule, IgxGridModule, IgxAvatarModule, IgxProgressBarModule + IgxRippleModule, IgxGridModule, IgxAvatarModule, IgxProgressBarModule, IgxIconButtonDirective } from 'igniteui-angular'; import { IgxPreventDocumentScrollModule } from '../../../../src/app/directives/prevent-scroll.directive'; import { AppComponent } from './app.component'; @@ -33,7 +33,8 @@ import { SEOService } from '../../../app-lob/src/app/seo.service'; IgxProgressBarModule, FormsModule, IgxPreventDocumentScrollModule, - HammerModule + HammerModule, + IgxIconButtonDirective ], providers: [SEOService] }) diff --git a/projects/app-lob/src/app/app.module.ts b/projects/app-lob/src/app/app.module.ts index 40261e4148..624be0f764 100644 --- a/projects/app-lob/src/app/app.module.ts +++ b/projects/app-lob/src/app/app.module.ts @@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms'; import { BrowserModule, HammerModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { - IgxButtonModule, IgxFocusModule, IgxIconModule, IgxInputGroupModule, + IgxButtonModule, IgxFocusModule, IgxIconButtonDirective, IgxIconModule, IgxInputGroupModule, IgxLayoutModule, IgxNavbarModule, IgxNavigationDrawerModule, IgxRippleModule, IgxToggleModule } from 'igniteui-angular'; import { IgxExtrasModule } from 'igniteui-angular-extras'; @@ -38,7 +38,8 @@ import { SEOService } from './seo.service'; HammerModule, IgxExtrasModule, IgxFocusModule, - IgxToggleModule + IgxToggleModule, + IgxIconButtonDirective ], providers: [ SEOService diff --git a/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html b/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html index 1818dd2978..189321d008 100644 --- a/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html +++ b/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html @@ -95,7 +95,7 @@