diff --git a/ng2-components/ng2-alfresco-documentlist/README.md b/ng2-components/ng2-alfresco-documentlist/README.md index 4ed52c1afe..bd74e10e18 100644 --- a/ng2-components/ng2-alfresco-documentlist/README.md +++ b/ng2-components/ng2-alfresco-documentlist/README.md @@ -6,15 +6,6 @@ npm install --save ``` -## Build from sources - -Alternatively you can build component from sources with the following commands: - -```sh -npm install -npm run build -``` - ## Basic usage ```html @@ -346,3 +337,27 @@ export class MyView { Typically you may want populating all your custom actions at the application root level or by means of custom application service. + + +## Build from sources + +Alternatively you can build component from sources with the following commands: + +```sh +npm install +npm run build +``` + +## Running unit tests + +You can run test with the + +```sh +npm test +``` + +or alternatively if you want to enable watchers and live reload: + +```sh +npm run test:w +``` diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js index 2d782a4a00..5e675d5d0b 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js @@ -44,7 +44,7 @@ System.register(['angular2/core', './document-list'], function(exports_1, contex // so that content children can access it } ContentActionList.prototype.registerAction = function (action) { - if (action) { + if (this.documentList && action) { this.documentList.actions.push(action); } }; diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js.map index 3fda05607d..227c459bfc 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js.map +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js.map @@ -1 +1 @@ -{"version":3,"file":"content-action-list.js","sourceRoot":"","sources":["content-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,2BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,0CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC3C,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,iBAAiB;wBAC3B,QAAQ,EAAE,EAAE;qBACf,CAAC;;qCAAA;gBAYF,wBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,iDAWC,CAAA"} \ No newline at end of file +{"version":3,"file":"content-action-list.js","sourceRoot":"","sources":["content-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,2BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,0CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,MAAM,CAAC,CAAC,CAAC;wBAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC3C,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,iBAAiB;wBAC3B,QAAQ,EAAE,EAAE;qBACf,CAAC;;qCAAA;gBAYF,wBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,iDAWC,CAAA"} \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.ts index 6db6571894..169e2183ac 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.ts @@ -30,7 +30,7 @@ export class ContentActionList { } registerAction(action: ContentActionModel) { - if (action) { + if (this.documentList && action) { this.documentList.actions.push(action); } } diff --git a/ng2-components/ng2-alfresco-login/demo/app/app.component.js b/ng2-components/ng2-alfresco-login/demo/app/app.component.js index 27ac07a7ab..a42d4dbff2 100644 --- a/ng2-components/ng2-alfresco-login/demo/app/app.component.js +++ b/ng2-components/ng2-alfresco-login/demo/app/app.component.js @@ -65,9 +65,10 @@ System.register(['angular2/core', 'ng2-alfresco-login/ng2-alfresco-login', 'angu router_1.RouteConfig([ { path: '/', name: 'Login', component: ng2_alfresco_login_1.AlfrescoLoginComponent, useAsDefault: true } ]), - __metadata('design:paramtypes', [ng2_alfresco_login_2.AlfrescoAuthenticationService, router_1.Router, services_1.AlfrescoSettingsService]) + __metadata('design:paramtypes', [(typeof (_a = typeof ng2_alfresco_login_2.AlfrescoAuthenticationService !== 'undefined' && ng2_alfresco_login_2.AlfrescoAuthenticationService) === 'function' && _a) || Object, router_1.Router, (typeof (_b = typeof services_1.AlfrescoSettingsService !== 'undefined' && services_1.AlfrescoSettingsService) === 'function' && _b) || Object]) ], AppComponent); return AppComponent; + var _a, _b; }()); exports_1("AppComponent", AppComponent); } diff --git a/ng2-components/ng2-alfresco-login/demo/app/app.component.js.map b/ng2-components/ng2-alfresco-login/demo/app/app.component.js.map index b85f492b9f..e5f6ac0790 100644 --- a/ng2-components/ng2-alfresco-login/demo/app/app.component.js.map +++ b/ng2-components/ng2-alfresco-login/demo/app/app.component.js.map @@ -1 +1 @@ -{"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAkBH;gBAEI,sBAAmB,IAAkC,EAClC,MAAa,EACpB,uBAA+C;oBAFxC,SAAI,GAAJ,IAAI,CAA8B;oBAClC,WAAM,GAAN,MAAM,CAAO;oBAE5B,uBAAuB,CAAC,IAAI,GAAG,4BAA4B,CAAC;gBAEhE,CAAC;gBAED,sCAAe,GAAf,UAAgB,MAAM;oBAClB,OAAO,CAAC,GAAG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iB,EAAE,2CAAsB,CAAC;qBAC1D,CAAC;oBAED,oBAAW,CAAC;wBACT,EAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,2CAAsB,EAAE,YAAY,EAAE,IAAI,EAAC;qBACpF,CAAC;;gCAAA;gBAkBF,mBAAC;;YAAD,CAAC,AAjBD,IAiBC;YAjBD,uCAiBC,CAAA"} \ No newline at end of file