diff --git a/demo-shell-ng2/app/app.module.ts b/demo-shell-ng2/app/app.module.ts index e7d6029f49..adbddcb5b3 100644 --- a/demo-shell-ng2/app/app.module.ts +++ b/demo-shell-ng2/app/app.module.ts @@ -17,6 +17,7 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; +import { MdSlideToggleModule, MdInputModule } from '@angular/material'; import { CoreModule } from 'ng2-alfresco-core'; import { SearchModule } from 'ng2-alfresco-search'; @@ -37,7 +38,6 @@ import { AppComponent } from './app.component'; import { routing } from './app.routes'; import { CustomEditorsModule } from './components/activiti/custom-editor/custom-editor.component'; import { Editor3DModule } from 'ng2-3d-editor'; -import { MaterialModule } from '@angular/material'; import { ChartsModule } from 'ng2-charts'; import { @@ -62,7 +62,8 @@ import { imports: [ BrowserModule, routing, - MaterialModule.forRoot(), + MdInputModule, + MdSlideToggleModule, CoreModule.forRoot(), LoginModule.forRoot(), SearchModule.forRoot(), diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html index 7dfc786476..ab82dc8ce5 100644 --- a/demo-shell-ng2/app/components/files/files.component.html +++ b/demo-shell-ng2/app/components/files/files.component.html @@ -150,7 +150,7 @@
Upload
- +
@@ -193,9 +193,9 @@ [overlayMode]="true"> - + diff --git a/demo-shell-ng2/app/vendor.ts b/demo-shell-ng2/app/vendor.ts index 9883f4891e..fcca40422e 100644 --- a/demo-shell-ng2/app/vendor.ts +++ b/demo-shell-ng2/app/vendor.ts @@ -39,7 +39,7 @@ import 'dialog-polyfill/dialog-polyfill.css'; import 'flag-icon-css/css/flag-icon.min.css'; // Load the Angular Material 2 stylesheet -import '../public/css/angular-material.css'; +import '@angular/material/prebuilt-themes/indigo-pink.css'; // Google Material Design Lite import 'material-design-lite/material.js'; diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index 6bb16ed94c..1be23795c0 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -64,7 +64,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", "@angular/compiler-cli": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "core-js": "2.4.1", "reflect-metadata": "0.1.9", "rxjs": "5.1.0", diff --git a/ng2-components/config/assets/tslint.json b/ng2-components/config/assets/tslint.json index 611a015c7e..f5ca6283b5 100644 --- a/ng2-components/config/assets/tslint.json +++ b/ng2-components/config/assets/tslint.json @@ -59,7 +59,7 @@ "no-unused-variable": true, "no-use-before-declare": true, "no-var-keyword": true, - "no-var-requires": true, + "no-var-requires": false, "object-literal-sort-keys": false, "one-line": [ true, diff --git a/ng2-components/ng2-activiti-analytics/index.ts b/ng2-components/ng2-activiti-analytics/index.ts index 8eef12bc86..005386dc72 100644 --- a/ng2-components/ng2-activiti-analytics/index.ts +++ b/ng2-components/ng2-activiti-analytics/index.ts @@ -16,6 +16,7 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; +import { MdTooltipModule, MdButtonModule, MdIconModule } from '@angular/material'; import { CoreModule } from 'ng2-alfresco-core'; import { DiagramsModule } from 'ng2-activiti-diagrams'; @@ -53,7 +54,10 @@ export const ANALYTICS_PROVIDERS: any[] = [ imports: [ CoreModule, ChartsModule, - DiagramsModule + DiagramsModule, + MdTooltipModule, + MdButtonModule, + MdIconModule ], declarations: [ ...ANALYTICS_DIRECTIVES @@ -62,7 +66,10 @@ export const ANALYTICS_PROVIDERS: any[] = [ ...ANALYTICS_PROVIDERS ], exports: [ - ...ANALYTICS_DIRECTIVES + ...ANALYTICS_DIRECTIVES, + MdTooltipModule, + MdButtonModule, + MdIconModule ] }) export class AnalyticsModule { diff --git a/ng2-components/ng2-activiti-analytics/package.json b/ng2-components/ng2-activiti-analytics/package.json index 0260af0553..1cb0cae401 100644 --- a/ng2-components/ng2-activiti-analytics/package.json +++ b/ng2-components/ng2-activiti-analytics/package.json @@ -41,7 +41,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "chart.js": "2.5.0", "core-js": "2.4.1", diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts index 1d77731e12..19e5aa6ebc 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-generator.component.spec.ts @@ -17,6 +17,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing'; import { DebugElement } from '@angular/core'; +import { MdTooltipModule, MdButtonModule, MdIconModule } from '@angular/material'; import { Observable } from 'rxjs/Rx'; import { ChartsModule } from 'ng2-charts'; import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core'; @@ -59,7 +60,11 @@ describe('AnalyticsGeneratorComponent', () => { TestBed.configureTestingModule({ imports: [ CoreModule.forRoot(), + MdTooltipModule, + MdButtonModule, + MdIconModule, ChartsModule, + DiagramsModule.forRoot() ], declarations: [ diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts index bcc4e270ed..8df752614c 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-parameters.component.spec.ts @@ -17,6 +17,7 @@ import { ComponentFixture, TestBed, async } from '@angular/core/testing'; import { DebugElement, SimpleChange } from '@angular/core'; +import { MdTooltipModule, MdButtonModule, OVERLAY_PROVIDERS } from '@angular/material'; import { Observable } from 'rxjs/Rx'; import * as moment from 'moment'; import { CoreModule, AlfrescoTranslationService } from 'ng2-alfresco-core'; @@ -42,14 +43,17 @@ describe('AnalyticsReportParametersComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ - CoreModule.forRoot() + CoreModule.forRoot(), + MdTooltipModule, + MdButtonModule ], declarations: [ AnalyticsReportParametersComponent, ...WIDGET_DIRECTIVES ], providers: [ - AnalyticsService + AnalyticsService, + OVERLAY_PROVIDERS ] }).compileComponents(); diff --git a/ng2-components/ng2-activiti-diagrams/package.json b/ng2-components/ng2-activiti-diagrams/package.json index 2f7c44fe60..db53407630 100644 --- a/ng2-components/ng2-activiti-diagrams/package.json +++ b/ng2-components/ng2-activiti-diagrams/package.json @@ -37,7 +37,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-activiti-form/index.ts b/ng2-components/ng2-activiti-form/index.ts index 8ee90c9dd8..fb022bbd2c 100644 --- a/ng2-components/ng2-activiti-form/index.ts +++ b/ng2-components/ng2-activiti-form/index.ts @@ -16,6 +16,7 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; +import { MdCheckboxModule, MdTabsModule, MdCardModule, MdButtonModule, MdIconModule, MdSlideToggleModule } from '@angular/material'; import { CoreModule } from 'ng2-alfresco-core'; import { ActivitiForm } from './src/components/activiti-form.component'; @@ -64,7 +65,13 @@ export const ACTIVITI_FORM_PROVIDERS: any[] = [ @NgModule({ imports: [ CoreModule, - HttpModule + HttpModule, + MdCheckboxModule, + MdTabsModule, + MdCardModule, + MdButtonModule, + MdIconModule, + MdSlideToggleModule ], declarations: [ ...ACTIVITI_FORM_DIRECTIVES, @@ -77,7 +84,13 @@ export const ACTIVITI_FORM_PROVIDERS: any[] = [ ...ACTIVITI_FORM_PROVIDERS ], exports: [ - ...ACTIVITI_FORM_DIRECTIVES + ...ACTIVITI_FORM_DIRECTIVES, + MdCheckboxModule, + MdTabsModule, + MdCardModule, + MdButtonModule, + MdIconModule, + MdSlideToggleModule ] }) export class ActivitiFormModule { diff --git a/ng2-components/ng2-activiti-form/package.json b/ng2-components/ng2-activiti-form/package.json index a4e03ae0cf..bb6a11f03f 100644 --- a/ng2-components/ng2-activiti-form/package.json +++ b/ng2-components/ng2-activiti-form/package.json @@ -43,7 +43,7 @@ "@angular/platform-browser": "~4.0.0", "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-activiti-form/src/components/activiti-form.component.css b/ng2-components/ng2-activiti-form/src/components/activiti-form.component.css index 03d3d17084..f062d6a71f 100644 --- a/ng2-components/ng2-activiti-form/src/components/activiti-form.component.css +++ b/ng2-components/ng2-activiti-form/src/components/activiti-form.component.css @@ -21,12 +21,14 @@ font-weight: bold; } -.activiti-form-hide-button { - display: none; +.activiti-form-reload-button { + position: absolute; + right: 0; + top: 0; } -.activiti-debug-button { - float: right; +.activiti-form-hide-button { + display: none; } .activiti-task-title { diff --git a/ng2-components/ng2-activiti-form/src/components/activiti-form.component.html b/ng2-components/ng2-activiti-form/src/components/activiti-form.component.html index b9813ffa68..9f7e59c867 100644 --- a/ng2-components/ng2-activiti-form/src/components/activiti-form.component.html +++ b/ng2-components/ng2-activiti-form/src/components/activiti-form.component.html @@ -2,13 +2,23 @@

Please select a Task

-
-
-
- {{ form.isValid ? 'event_available' : 'event_busy' }} -

{{form.taskName}}

-
-
+
+ + + +

+
+ +
+ {{ form.isValid ? 'event_available' : 'event_busy' }} + {{form.taskName}} + +

+
+
+
@@ -18,40 +28,26 @@
-
-
+ + + -
-
- -
-
+ +
-
- -
- -
- +
+ Debug mode

Values

{{form.values | json}}
diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/tabs/tabs.widget.html b/ng2-components/ng2-activiti-form/src/components/widgets/tabs/tabs.widget.html index 799829fde4..439e9a3d78 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/tabs/tabs.widget.html +++ b/ng2-components/ng2-activiti-form/src/components/widgets/tabs/tabs.widget.html @@ -1,20 +1,9 @@
-
- -
-
+ + +
-
-
+ +
diff --git a/ng2-components/ng2-activiti-processlist/package.json b/ng2-components/ng2-activiti-processlist/package.json index 87925ff1b8..effcb594f5 100644 --- a/ng2-components/ng2-activiti-processlist/package.json +++ b/ng2-components/ng2-activiti-processlist/package.json @@ -43,7 +43,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-activiti-tasklist/index.ts b/ng2-components/ng2-activiti-tasklist/index.ts index e1716b5fb3..862d666d25 100644 --- a/ng2-components/ng2-activiti-tasklist/index.ts +++ b/ng2-components/ng2-activiti-tasklist/index.ts @@ -16,12 +16,12 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; +import { MdIconModule, MdButtonModule } from '@angular/material'; import { CoreModule } from 'ng2-alfresco-core'; import { DataTableModule } from 'ng2-alfresco-datatable'; import { ActivitiFormModule } from 'ng2-activiti-form'; import { ActivitiPeopleService } from './src/services/activiti-people.service'; import { ActivitiTaskListService } from './src/services/activiti-tasklist.service'; -import { MaterialModule } from '@angular/material'; import { ActivitiApps, @@ -67,7 +67,8 @@ export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [ CoreModule, DataTableModule, ActivitiFormModule, - MaterialModule + MdIconModule, + MdButtonModule ], declarations: [ ...ACTIVITI_TASKLIST_DIRECTIVES @@ -76,7 +77,9 @@ export const ACTIVITI_TASKLIST_PROVIDERS: any[] = [ ...ACTIVITI_TASKLIST_PROVIDERS ], exports: [ - ...ACTIVITI_TASKLIST_DIRECTIVES + ...ACTIVITI_TASKLIST_DIRECTIVES, + MdIconModule, + MdButtonModule ] }) export class ActivitiTaskListModule { diff --git a/ng2-components/ng2-activiti-tasklist/package.json b/ng2-components/ng2-activiti-tasklist/package.json index 794678407c..ca4e063482 100644 --- a/ng2-components/ng2-activiti-tasklist/package.json +++ b/ng2-components/ng2-activiti-tasklist/package.json @@ -47,7 +47,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html b/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html index 147f396b2a..ac7435e17b 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html +++ b/ng2-components/ng2-activiti-tasklist/src/components/activiti-task-details.component.html @@ -1,7 +1,7 @@
- +
{{ 'TASK_DETAILS.MESSAGES.NONE' | translate }}
diff --git a/ng2-components/ng2-alfresco-core/README.md b/ng2-components/ng2-alfresco-core/README.md index cb3d7fb468..064d4bb78a 100644 --- a/ng2-components/ng2-alfresco-core/README.md +++ b/ng2-components/ng2-alfresco-core/README.md @@ -47,11 +47,6 @@ npm install --save ng2-alfresco-core - Components - Context Menu directive - - Material Design directives - - [mdl] - - [alfresco-mdl-button] - - [alfresco-mdl-menu] - - [alfresco-mdl-tabs] - Directives - UploadDirective - Services diff --git a/ng2-components/ng2-alfresco-core/index.ts b/ng2-components/ng2-alfresco-core/index.ts index 7390836d3b..89f4c9aec1 100644 --- a/ng2-components/ng2-alfresco-core/index.ts +++ b/ng2-components/ng2-alfresco-core/index.ts @@ -16,12 +16,12 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; +import { MdSnackBarModule } from '@angular/material'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HttpModule, Http } from '@angular/http'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { TranslateModule, TranslateLoader } from 'ng2-translate/ng2-translate'; -import { MaterialModule } from '@angular/material'; import { AlfrescoAuthenticationService, @@ -88,12 +88,12 @@ export function createTranslateLoader(http: Http, logService: LogService) { ReactiveFormsModule, HttpModule, BrowserAnimationsModule, - MaterialModule.forRoot(), TranslateModule.forRoot({ provide: TranslateLoader, useFactory: (createTranslateLoader), deps: [Http, LogService] - }) + }), + MdSnackBarModule ], declarations: [ ...MATERIAL_DESIGN_DIRECTIVES, @@ -110,7 +110,6 @@ export function createTranslateLoader(http: Http, logService: LogService) { BrowserAnimationsModule, CommonModule, FormsModule, - MaterialModule, ReactiveFormsModule, HttpModule, TranslateModule, @@ -119,7 +118,8 @@ export function createTranslateLoader(http: Http, logService: LogService) { ...COLLAPSABLE_DIRECTIVES, UploadDirective, DataColumnComponent, - DataColumnListComponent + DataColumnListComponent, + MdSnackBarModule ] }) export class CoreModule { diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index 0728050424..84d5a2765d 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -52,7 +52,7 @@ "@angular/router": "~4.0.0", "@angular/compiler-cli": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "core-js": "2.4.1", "dialog-polyfill": "0.4.7", diff --git a/ng2-components/ng2-alfresco-core/src/components/material/index.ts b/ng2-components/ng2-alfresco-core/src/components/material/index.ts index 12bc3fab51..84b01337d1 100644 --- a/ng2-components/ng2-alfresco-core/src/components/material/index.ts +++ b/ng2-components/ng2-alfresco-core/src/components/material/index.ts @@ -18,19 +18,16 @@ import { MDL } from './mdl-upgrade-element.directive'; import { AlfrescoMdlButtonDirective } from './mdl-button.directive'; import { AlfrescoMdlMenuDirective } from './mdl-menu.directive'; -import { AlfrescoMdlTabsDirective } from './mdl-tabs.directive'; import { AlfrescoMdlTextFieldDirective } from './mdl-textfield.directive'; export * from './mdl-upgrade-element.directive'; export * from './mdl-button.directive'; export * from './mdl-menu.directive'; -export * from './mdl-tabs.directive'; export * from './mdl-textfield.directive'; export const MATERIAL_DESIGN_DIRECTIVES: [any] = [ MDL, AlfrescoMdlButtonDirective, AlfrescoMdlMenuDirective, - AlfrescoMdlTabsDirective, AlfrescoMdlTextFieldDirective ]; diff --git a/ng2-components/ng2-alfresco-core/src/components/material/mdl-tabs.directive.ts b/ng2-components/ng2-alfresco-core/src/components/material/mdl-tabs.directive.ts deleted file mode 100644 index f537ccadc4..0000000000 --- a/ng2-components/ng2-alfresco-core/src/components/material/mdl-tabs.directive.ts +++ /dev/null @@ -1,79 +0,0 @@ -/*! - * @license - * Copyright 2016 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - Directive, - ElementRef, - AfterViewInit, - OnDestroy -} from '@angular/core'; - -declare var componentHandler; - -@Directive({ - selector: '[alfresco-mdl-tabs]' -}) -export class AlfrescoMdlTabsDirective implements AfterViewInit, OnDestroy { - - private observer: MutationObserver; - - constructor(private element: ElementRef) {} - - ngAfterViewInit() { - if (componentHandler) { - let el = this.element.nativeElement; - - el.classList.add('mdl-tabs'); - el.classList.add('mdl-js-tabs'); - el.classList.add('mdl-js-ripple-effect'); - componentHandler.upgradeElement(el, 'MaterialTabs'); - - // watch widget DOM changes and re-upgrade MDL content - let tabBar = el.querySelector('.mdl-tabs__tab-bar'); - if (tabBar) { - this.observer = new MutationObserver((mutations: any[]) => { - let upgrade = false; - mutations.forEach((mutation: MutationRecord) => { - if (mutation.addedNodes && mutation.addedNodes.length > 0) { - upgrade = true; - } - - if (mutation.removedNodes && mutation.removedNodes.length > 0) { - upgrade = true; - } - }); - - if (upgrade) { - componentHandler.downgradeElements([el]); - componentHandler.upgradeElement(el); - } - }); - - this.observer.observe(tabBar, { - childList: true, - subtree: false - }); - } - } - } - - ngOnDestroy() { - if (this.observer) { - this.observer.disconnect(); - } - } -} diff --git a/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts b/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts index 767103a3d2..e65e1bac34 100644 --- a/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts +++ b/ng2-components/ng2-alfresco-core/src/services/notification.service.spec.ts @@ -14,11 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { Component } from '@angular/core'; import { NotificationService } from './notification.service'; -import { MdSnackBarModule } from '@angular/material'; +import { MdSnackBarModule, MdSnackBar, OverlayModule, OVERLAY_PROVIDERS, LiveAnnouncer } from '@angular/material'; describe('NotificationService', () => { let fixture: ComponentFixture; @@ -27,11 +28,15 @@ describe('NotificationService', () => { TestBed.configureTestingModule({ imports: [ BrowserAnimationsModule, - MdSnackBarModule.forRoot() + OverlayModule, + MdSnackBarModule ], declarations: [ComponentThatProvidesNotificationService], providers: [ - NotificationService + NotificationService, + MdSnackBar, + OVERLAY_PROVIDERS, + LiveAnnouncer ] }); @@ -43,33 +48,28 @@ describe('NotificationService', () => { fixture.detectChanges(); }); - describe('openSnackMessage', () => { - it('should open a message notification bar', (done) => { - let promise = fixture.componentInstance.sendMessage(); - promise.afterDismissed().subscribe(() => { - done(); - }); - - fixture.detectChanges(); - - expect(document.querySelector('snack-bar-container')).not.toBeNull(); + it('should open a message notification bar', (done) => { + let promise = fixture.componentInstance.sendMessage(); + promise.afterDismissed().subscribe(() => { + done(); }); + + fixture.detectChanges(); + + expect(document.querySelector('snack-bar-container')).not.toBeNull(); }); - describe('openSnackMessageAction', () => { - it('should open a message notification bar with action', (done) => { - let promise = fixture.componentInstance.sendMessageAction(); - promise.afterDismissed().subscribe(() => { - done(); - }); - - fixture.detectChanges(); - - expect(document.querySelector('snack-bar-container')).not.toBeNull(); - expect(document.querySelector('.md-simple-snackbar-action')).not.toBeNull(); + it('should open a message notification bar with action', (done) => { + let promise = fixture.componentInstance.sendMessageAction(); + promise.afterDismissed().subscribe(() => { + done(); }); + + fixture.detectChanges(); + + expect(document.querySelector('snack-bar-container')).not.toBeNull(); }); }); diff --git a/ng2-components/ng2-alfresco-datatable/index.ts b/ng2-components/ng2-alfresco-datatable/index.ts index 4ebed2eb97..9c599b0290 100644 --- a/ng2-components/ng2-alfresco-datatable/index.ts +++ b/ng2-components/ng2-alfresco-datatable/index.ts @@ -16,6 +16,7 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; +import { MdCheckboxModule, MdMenuModule, MdIconModule, MdButtonModule } from '@angular/material'; import { CoreModule } from 'ng2-alfresco-core'; export * from './src/data/index'; @@ -38,13 +39,21 @@ export const ALFRESCO_DATATABLE_DIRECTIVES: [any] = [ @NgModule({ imports: [ - CoreModule + CoreModule, + MdCheckboxModule, + MdMenuModule, + MdIconModule, + MdButtonModule ], declarations: [ ...ALFRESCO_DATATABLE_DIRECTIVES ], exports: [ - ...ALFRESCO_DATATABLE_DIRECTIVES + ...ALFRESCO_DATATABLE_DIRECTIVES, + MdCheckboxModule, + MdMenuModule, + MdIconModule, + MdButtonModule ] }) export class DataTableModule { diff --git a/ng2-components/ng2-alfresco-datatable/package.json b/ng2-components/ng2-alfresco-datatable/package.json index e7e5ea8d52..799ea27d0b 100644 --- a/ng2-components/ng2-alfresco-datatable/package.json +++ b/ng2-components/ng2-alfresco-datatable/package.json @@ -43,7 +43,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html index ce584aefc8..4a84a83f05 100644 --- a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html +++ b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html @@ -114,10 +114,10 @@ - + diff --git a/ng2-components/ng2-alfresco-documentlist/index.ts b/ng2-components/ng2-alfresco-documentlist/index.ts index aa35e266d2..6067118c71 100644 --- a/ng2-components/ng2-alfresco-documentlist/index.ts +++ b/ng2-components/ng2-alfresco-documentlist/index.ts @@ -16,6 +16,7 @@ */ import { NgModule, ModuleWithProviders } from '@angular/core'; +import { MdMenuModule, MdButtonModule, MdIconModule } from '@angular/material'; import { CoreModule } from 'ng2-alfresco-core'; import { DataTableModule } from 'ng2-alfresco-datatable'; @@ -75,7 +76,10 @@ export const DOCUMENT_LIST_PROVIDERS: any[] = [ @NgModule({ imports: [ CoreModule, - DataTableModule + DataTableModule, + MdMenuModule, + MdButtonModule, + MdIconModule ], declarations: [ ...DOCUMENT_LIST_DIRECTIVES @@ -85,7 +89,10 @@ export const DOCUMENT_LIST_PROVIDERS: any[] = [ ], exports: [ DataTableModule, - ...DOCUMENT_LIST_DIRECTIVES + ...DOCUMENT_LIST_DIRECTIVES, + MdMenuModule, + MdButtonModule, + MdIconModule ] }) export class DocumentListModule { diff --git a/ng2-components/ng2-alfresco-documentlist/package.json b/ng2-components/ng2-alfresco-documentlist/package.json index 98243c81a1..7aa1ae698d 100644 --- a/ng2-components/ng2-alfresco-documentlist/package.json +++ b/ng2-components/ng2-alfresco-documentlist/package.json @@ -51,7 +51,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "core-js": "2.4.1", "hammerjs": "2.0.8", diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.html b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.html index afc70dedb9..196a09e718 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.html +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.component.html @@ -20,14 +20,14 @@ (rowDblClick)="onRowDblClick($event)">
- +
diff --git a/ng2-components/ng2-alfresco-login/index.ts b/ng2-components/ng2-alfresco-login/index.ts index 01872db735..eee122fd3b 100644 --- a/ng2-components/ng2-alfresco-login/index.ts +++ b/ng2-components/ng2-alfresco-login/index.ts @@ -17,7 +17,7 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CoreModule } from 'ng2-alfresco-core'; -import { MaterialModule } from '@angular/material'; +import { MdInputModule, MdIconModule, MdCheckboxModule } from '@angular/material'; import { LoginHeaderDirective } from './src/directives/login-header.directive'; import { LoginFooterDirective } from './src/directives/login-footer.directive'; @@ -37,14 +37,19 @@ export const ALFRESCO_LOGIN_DIRECTIVES: any[] = [ @NgModule({ imports: [ CoreModule, - MaterialModule + MdInputModule, + MdIconModule, + MdCheckboxModule ], declarations: [ ...ALFRESCO_LOGIN_DIRECTIVES ], providers: [], exports: [ - ...ALFRESCO_LOGIN_DIRECTIVES + ...ALFRESCO_LOGIN_DIRECTIVES, + MdInputModule, + MdIconModule, + MdCheckboxModule ] }) export class LoginModule { diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index be99f6b6b5..b8b4c56b28 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -55,7 +55,7 @@ "@angular/platform-browser-dynamic": "~4.0.0", "@angular/router": "~4.0.0", - "@angular/material": "2.0.0-beta.1", + "@angular/material": "2.0.0-beta.6", "alfresco-js-api": "~1.5.0", "hammerjs": "2.0.8", "ng2-alfresco-core": "1.5.0", diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html index a9fa74f8c5..6aad3b8ff7 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.html @@ -4,10 +4,10 @@
@@ -22,7 +22,7 @@