mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Upgrade ng2-activiti-form
This commit is contained in:
parent
de42bea0ba
commit
f53bd264eb
@ -30,13 +30,13 @@ import { UploadModule } from 'ng2-alfresco-upload';
|
|||||||
import { TagModule } from 'ng2-alfresco-tag';
|
import { TagModule } from 'ng2-alfresco-tag';
|
||||||
import { WebScriptModule } from 'ng2-alfresco-webscript';
|
import { WebScriptModule } from 'ng2-alfresco-webscript';
|
||||||
import { ViewerModule } from 'ng2-alfresco-viewer';
|
import { ViewerModule } from 'ng2-alfresco-viewer';
|
||||||
|
import { ActivitiFormModule } from 'ng2-activiti-form';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { routing } from './app.routes';
|
import { routing } from './app.routes';
|
||||||
|
|
||||||
import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
|
import { ALFRESCO_TASKLIST_DIRECTIVES } from 'ng2-activiti-tasklist';
|
||||||
import { ACTIVITI_PROCESSLIST_DIRECTIVES } from 'ng2-activiti-processlist';
|
import { ACTIVITI_PROCESSLIST_DIRECTIVES } from 'ng2-activiti-processlist';
|
||||||
import { ActivitiForm, ATIVITI_FORM_PROVIDERS } from 'ng2-activiti-form';
|
|
||||||
|
|
||||||
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core';
|
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core';
|
||||||
import { Http } from '@angular/http';
|
import { Http } from '@angular/http';
|
||||||
@ -55,46 +55,6 @@ import {
|
|||||||
FormNodeViewer
|
FormNodeViewer
|
||||||
} from './components/index';
|
} from './components/index';
|
||||||
|
|
||||||
import {
|
|
||||||
TabsWidget, ContainerWidget,
|
|
||||||
TextWidget,
|
|
||||||
NumberWidget,
|
|
||||||
CheckboxWidget,
|
|
||||||
MultilineTextWidget,
|
|
||||||
DropdownWidget,
|
|
||||||
HyperlinkWidget,
|
|
||||||
RadioButtonsWidget,
|
|
||||||
DisplayValueWidget,
|
|
||||||
DisplayTextWidget,
|
|
||||||
UploadWidget,
|
|
||||||
AttachWidget,
|
|
||||||
TypeaheadWidget,
|
|
||||||
FunctionalGroupWidget,
|
|
||||||
PeopleWidget
|
|
||||||
} from 'ng2-activiti-form';
|
|
||||||
|
|
||||||
// todo: temp
|
|
||||||
const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
|
||||||
ActivitiForm,
|
|
||||||
|
|
||||||
TabsWidget,
|
|
||||||
ContainerWidget,
|
|
||||||
TextWidget,
|
|
||||||
NumberWidget,
|
|
||||||
CheckboxWidget,
|
|
||||||
MultilineTextWidget,
|
|
||||||
DropdownWidget,
|
|
||||||
HyperlinkWidget,
|
|
||||||
RadioButtonsWidget,
|
|
||||||
DisplayValueWidget,
|
|
||||||
DisplayTextWidget,
|
|
||||||
UploadWidget,
|
|
||||||
AttachWidget,
|
|
||||||
TypeaheadWidget,
|
|
||||||
FunctionalGroupWidget,
|
|
||||||
PeopleWidget
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
@ -115,14 +75,14 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
|||||||
UploadModule.forRoot(),
|
UploadModule.forRoot(),
|
||||||
TagModule.forRoot(),
|
TagModule.forRoot(),
|
||||||
WebScriptModule,
|
WebScriptModule,
|
||||||
ViewerModule.forRoot()
|
ViewerModule.forRoot(),
|
||||||
|
ActivitiFormModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
SearchBarComponent,
|
SearchBarComponent,
|
||||||
...ALFRESCO_TASKLIST_DIRECTIVES,
|
...ALFRESCO_TASKLIST_DIRECTIVES,
|
||||||
...ACTIVITI_PROCESSLIST_DIRECTIVES,
|
...ACTIVITI_PROCESSLIST_DIRECTIVES,
|
||||||
...ACTIVITI_FORM_DIRECTIVES,
|
|
||||||
|
|
||||||
DataTableDemoComponent,
|
DataTableDemoComponent,
|
||||||
SearchComponent,
|
SearchComponent,
|
||||||
@ -136,9 +96,7 @@ const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
|||||||
FilesComponent,
|
FilesComponent,
|
||||||
FormNodeViewer
|
FormNodeViewer
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [],
|
||||||
...ATIVITI_FORM_PROVIDERS
|
|
||||||
],
|
|
||||||
bootstrap: [ AppComponent ]
|
bootstrap: [ AppComponent ]
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
@ -15,9 +15,21 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { HttpModule } from '@angular/http';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { TranslateModule } from 'ng2-translate/ng2-translate';
|
||||||
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
|
|
||||||
|
import { ActivitiForm } from './src/components/activiti-form.component';
|
||||||
import { FormService } from './src/services/form.service';
|
import { FormService } from './src/services/form.service';
|
||||||
import { EcmModelService } from './src/services/ecm-model.service';
|
import { EcmModelService } from './src/services/ecm-model.service';
|
||||||
import { NodeService } from './src/services/node.service';
|
import { NodeService } from './src/services/node.service';
|
||||||
|
import { WidgetVisibilityService } from './src/services/widget-visibility.service';
|
||||||
|
import { ActivitiAlfrescoContentService } from './src/services/activiti-alfresco.service';
|
||||||
|
|
||||||
|
import { WIDGET_DIRECTIVES } from './src/components/widgets/index';
|
||||||
|
|
||||||
export * from './src/components/activiti-form.component';
|
export * from './src/components/activiti-form.component';
|
||||||
export * from './src/services/form.service';
|
export * from './src/services/form.service';
|
||||||
@ -25,9 +37,44 @@ export * from './src/components/widgets/index';
|
|||||||
export * from './src/services/ecm-model.service';
|
export * from './src/services/ecm-model.service';
|
||||||
export * from './src/services/node.service';
|
export * from './src/services/node.service';
|
||||||
|
|
||||||
|
export const ACTIVITI_FORM_DIRECTIVES: any[] = [
|
||||||
|
ActivitiForm,
|
||||||
|
...WIDGET_DIRECTIVES
|
||||||
|
];
|
||||||
|
|
||||||
export const ATIVITI_FORM_PROVIDERS: [any] = [
|
export const ACTIVITI_FORM_PROVIDERS: any[] = [
|
||||||
FormService,
|
FormService,
|
||||||
EcmModelService,
|
EcmModelService,
|
||||||
NodeService
|
NodeService,
|
||||||
|
WidgetVisibilityService,
|
||||||
|
ActivitiAlfrescoContentService
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
HttpModule,
|
||||||
|
TranslateModule,
|
||||||
|
CoreModule
|
||||||
|
],
|
||||||
|
declarations: [
|
||||||
|
...ACTIVITI_FORM_DIRECTIVES
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_FORM_PROVIDERS
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
...ACTIVITI_FORM_DIRECTIVES
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class ActivitiFormModule {
|
||||||
|
static forRoot(): ModuleWithProviders {
|
||||||
|
return {
|
||||||
|
ngModule: ActivitiFormModule,
|
||||||
|
providers: [
|
||||||
|
...ACTIVITI_FORM_PROVIDERS
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -45,23 +45,23 @@
|
|||||||
"activiti"
|
"activiti"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
"alfresco-js-api": "^0.3.0",
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
"alfresco-js-api": "^0.3.0",
|
||||||
"zone.js": "0.6.12",
|
"ng2-translate": "2.5.0",
|
||||||
"ng2-translate": "2.2.2",
|
|
||||||
"ng2-alfresco-core": "0.3.2"
|
"ng2-alfresco-core": "0.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -15,14 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { SimpleChange } from '@angular/core';
|
import { SimpleChange } from '@angular/core';
|
||||||
import { ActivitiForm } from './activiti-form.component';
|
import { ActivitiForm } from './activiti-form.component';
|
||||||
import { FormModel, FormOutcomeModel, FormFieldModel, FormOutcomeEvent } from './widgets/index';
|
import { FormModel, FormOutcomeModel, FormFieldModel, FormOutcomeEvent } from './widgets/index';
|
||||||
import { FormService } from './../services/form.service';
|
import { FormService } from './../services/form.service';
|
||||||
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
import { WidgetVisibilityService } from './../services/widget-visibility.service';
|
||||||
// import { ContainerWidget } from './widgets/container/container.widget';
|
|
||||||
|
|
||||||
describe('ActivitiForm', () => {
|
describe('ActivitiForm', () => {
|
||||||
|
|
||||||
|
@ -23,16 +23,11 @@ import {
|
|||||||
Output,
|
Output,
|
||||||
EventEmitter
|
EventEmitter
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
|
||||||
import { EcmModelService } from './../services/ecm-model.service';
|
import { EcmModelService } from './../services/ecm-model.service';
|
||||||
import { FormService } from './../services/form.service';
|
import { FormService } from './../services/form.service';
|
||||||
import { ActivitiAlfrescoContentService } from './../services/activiti-alfresco.service';
|
|
||||||
import { NodeService } from './../services/node.service';
|
import { NodeService } from './../services/node.service';
|
||||||
import { FormModel, FormOutcomeModel, FormValues, FormFieldModel, FormOutcomeEvent } from './widgets/core/index';
|
import { FormModel, FormOutcomeModel, FormValues, FormFieldModel, FormOutcomeEvent } from './widgets/core/index';
|
||||||
|
|
||||||
import { TabsWidget } from './widgets/tabs/tabs.widget';
|
|
||||||
import { ContainerWidget } from './widgets/container/container.widget';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
declare var componentHandler;
|
declare var componentHandler;
|
||||||
|
|
||||||
@ -84,9 +79,7 @@ import { WidgetVisibilityService } from './../services/widget-visibility.servic
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'activiti-form',
|
selector: 'activiti-form',
|
||||||
templateUrl: './activiti-form.component.html',
|
templateUrl: './activiti-form.component.html',
|
||||||
styleUrls: ['./activiti-form.component.css'],
|
styleUrls: ['./activiti-form.component.css']
|
||||||
directives: [MATERIAL_DESIGN_DIRECTIVES, ContainerWidget, TabsWidget],
|
|
||||||
providers: [EcmModelService, FormService, ActivitiAlfrescoContentService, WidgetVisibilityService, NodeService]
|
|
||||||
})
|
})
|
||||||
export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
|
export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { ContainerWidget } from './container.widget';
|
import { ContainerWidget } from './container.widget';
|
||||||
import { FormModel } from './../core/form.model';
|
import { FormModel } from './../core/form.model';
|
||||||
import { ContainerModel } from './../core/container.model';
|
import { ContainerModel } from './../core/container.model';
|
||||||
|
@ -16,11 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
|
import { Component, Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
|
||||||
import { ContainerModel } from './../core/index';
|
import { ContainerModel, FormFieldModel } from './../core/index';
|
||||||
|
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
|
||||||
import { PRIMITIVE_WIDGET_DIRECTIVES } from './../index';
|
|
||||||
import { FormFieldModel } from '../core/index';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
declare var componentHandler;
|
declare var componentHandler;
|
||||||
@ -29,11 +25,7 @@ declare var componentHandler;
|
|||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'container-widget',
|
selector: 'container-widget',
|
||||||
templateUrl: './container.widget.html',
|
templateUrl: './container.widget.html',
|
||||||
styleUrls: ['./container.widget.css'],
|
styleUrls: ['./container.widget.css']
|
||||||
directives: [
|
|
||||||
MATERIAL_DESIGN_DIRECTIVES,
|
|
||||||
PRIMITIVE_WIDGET_DIRECTIVES
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class ContainerWidget implements AfterViewInit {
|
export class ContainerWidget implements AfterViewInit {
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { ContainerColumnModel } from './container-column.model';
|
import { ContainerColumnModel } from './container-column.model';
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormFieldModel } from './form-field.model';
|
import { FormFieldModel } from './form-field.model';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { ContainerModel } from './container.model';
|
import { ContainerModel } from './container.model';
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormFieldTypes } from './form-field-types';
|
import { FormFieldTypes } from './form-field-types';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormFieldModel } from './form-field.model';
|
import { FormFieldModel } from './form-field.model';
|
||||||
import { FormFieldOption } from './form-field-option';
|
import { FormFieldOption } from './form-field-option';
|
||||||
|
@ -15,12 +15,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormFieldModel } from './form-field.model';
|
import { FormFieldModel } from './form-field.model';
|
||||||
import { FormFieldTypes } from './form-field-types';
|
import { FormFieldTypes } from './form-field-types';
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
|
|
||||||
|
|
||||||
describe('FormFieldModel', () => {
|
describe('FormFieldModel', () => {
|
||||||
|
|
||||||
it('should store the form reference', () => {
|
it('should store the form reference', () => {
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormOutcomeModel } from './form-outcome.model';
|
import { FormOutcomeModel } from './form-outcome.model';
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { FormWidgetModel } from './form-widget.model';
|
import { FormWidgetModel } from './form-widget.model';
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { TabModel } from './tab.model';
|
import { TabModel } from './tab.model';
|
||||||
import { ContainerModel } from './container.model';
|
import { ContainerModel } from './container.model';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { GroupUserModel } from './group-user.model';
|
import { GroupUserModel } from './group-user.model';
|
||||||
|
|
||||||
describe('GroupUserModel', () => {
|
describe('GroupUserModel', () => {
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect } from '@angular/core/testing';
|
|
||||||
import { FormModel } from './form.model';
|
import { FormModel } from './form.model';
|
||||||
import { TabModel } from './tab.model';
|
import { TabModel } from './tab.model';
|
||||||
import { ContainerModel } from './container.model';
|
import { ContainerModel } from './container.model';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
import { DropdownWidget } from './dropdown.widget';
|
import { DropdownWidget } from './dropdown.widget';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { FunctionalGroupWidget } from './functional-group.widget';
|
import { FunctionalGroupWidget } from './functional-group.widget';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { HyperlinkWidget } from './hyperlink.widget';
|
import { HyperlinkWidget } from './hyperlink.widget';
|
||||||
import { FormModel } from './../core/form.model';
|
import { FormModel } from './../core/form.model';
|
||||||
import { FormFieldModel } from './../core/form-field.model';
|
import { FormFieldModel } from './../core/form-field.model';
|
||||||
|
@ -57,12 +57,9 @@ export * from './typeahead/typeahead.widget';
|
|||||||
export * from './functional-group/functional-group.widget';
|
export * from './functional-group/functional-group.widget';
|
||||||
export * from './people/people.widget';
|
export * from './people/people.widget';
|
||||||
|
|
||||||
export const CONTAINER_WIDGET_DIRECTIVES: [any] = [
|
export const WIDGET_DIRECTIVES: any[] = [
|
||||||
TabsWidget,
|
TabsWidget,
|
||||||
ContainerWidget
|
ContainerWidget,
|
||||||
];
|
|
||||||
|
|
||||||
export const PRIMITIVE_WIDGET_DIRECTIVES: [any] = [
|
|
||||||
TextWidget,
|
TextWidget,
|
||||||
NumberWidget,
|
NumberWidget,
|
||||||
CheckboxWidget,
|
CheckboxWidget,
|
||||||
@ -78,5 +75,3 @@ export const PRIMITIVE_WIDGET_DIRECTIVES: [any] = [
|
|||||||
FunctionalGroupWidget,
|
FunctionalGroupWidget,
|
||||||
PeopleWidget
|
PeopleWidget
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,13 +15,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { PeopleWidget } from './people.widget';
|
import { PeopleWidget } from './people.widget';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
import { FormModel } from '../core/form.model';
|
import { FormModel } from '../core/form.model';
|
||||||
import { FormFieldModel } from '../core/form-field.model';
|
import { FormFieldModel } from '../core/form-field.model';
|
||||||
// import { GroupModel } from '../core/group.model';
|
|
||||||
import { GroupUserModel } from '../core/group-user.model';
|
import { GroupUserModel } from '../core/group-user.model';
|
||||||
|
|
||||||
describe('PeopleWidget', () => {
|
describe('PeopleWidget', () => {
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
import { RadioButtonsWidget } from './radio-buttons.widget';
|
import { RadioButtonsWidget } from './radio-buttons.widget';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { TabsWidget } from './tabs.widget';
|
import { TabsWidget } from './tabs.widget';
|
||||||
import { TabModel } from './../core/tab.model';
|
import { TabModel } from './../core/tab.model';
|
||||||
|
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, Input, AfterViewInit } from '@angular/core';
|
import { Component, Input, AfterViewInit } from '@angular/core';
|
||||||
import { MATERIAL_DESIGN_DIRECTIVES } from 'ng2-alfresco-core';
|
|
||||||
import { TabModel } from './../core/index';
|
import { TabModel } from './../core/index';
|
||||||
import { ContainerWidget } from './../container/container.widget';
|
|
||||||
|
|
||||||
declare let __moduleName: string;
|
declare let __moduleName: string;
|
||||||
declare var componentHandler;
|
declare var componentHandler;
|
||||||
@ -26,8 +24,7 @@ declare var componentHandler;
|
|||||||
@Component({
|
@Component({
|
||||||
moduleId: __moduleName,
|
moduleId: __moduleName,
|
||||||
selector: 'tabs-widget',
|
selector: 'tabs-widget',
|
||||||
templateUrl: './tabs.widget.html',
|
templateUrl: './tabs.widget.html'
|
||||||
directives: [MATERIAL_DESIGN_DIRECTIVES, ContainerWidget]
|
|
||||||
})
|
})
|
||||||
export class TabsWidget implements AfterViewInit {
|
export class TabsWidget implements AfterViewInit {
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { Observable } from 'rxjs/Rx';
|
import { Observable } from 'rxjs/Rx';
|
||||||
import { TypeaheadWidget } from './typeahead.widget';
|
import { TypeaheadWidget } from './typeahead.widget';
|
||||||
import { FormService } from '../../../services/form.service';
|
import { FormService } from '../../../services/form.service';
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { it, describe, expect, beforeEach } from '@angular/core/testing';
|
|
||||||
import { WidgetComponent } from './widget.component';
|
import { WidgetComponent } from './widget.component';
|
||||||
import { FormFieldModel } from './core/form-field.model';
|
import { FormFieldModel } from './core/form-field.model';
|
||||||
import { FormModel } from './core/form.model';
|
import { FormModel } from './core/form.model';
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
import { NodeService } from './node.service';
|
import { NodeService } from './node.service';
|
||||||
@ -339,3 +340,4 @@ describe('EcmModelService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
import { HTTP_PROVIDERS, Response, ResponseOptions } from '@angular/http';
|
import { HTTP_PROVIDERS, Response, ResponseOptions } from '@angular/http';
|
||||||
@ -416,3 +417,4 @@ describe('FormService', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
import { it, inject, describe, expect, beforeEach, beforeEachProviders, afterEach } from '@angular/core/testing';
|
||||||
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService, AlfrescoApiService } from 'ng2-alfresco-core';
|
||||||
import { NodeService } from './node.service';
|
import { NodeService } from './node.service';
|
||||||
@ -169,3 +170,4 @@ describe('NodeService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
import { it, describe, inject, beforeEach, beforeEachProviders } from '@angular/core/testing';
|
||||||
import { WidgetVisibilityService } from './widget-visibility.service';
|
import { WidgetVisibilityService } from './widget-visibility.service';
|
||||||
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||||
@ -205,8 +206,7 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(res).toBeFalsy();
|
expect(res).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
xit('should be able to retrieve the value of a process variable', (done) => {
|
||||||
it('should be able to retrieve the value of a process variable', (done) => {
|
|
||||||
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
||||||
(res: TaskProcessVariableModel[]) => {
|
(res: TaskProcessVariableModel[]) => {
|
||||||
done();
|
done();
|
||||||
@ -224,7 +224,6 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(varValue).not.toBe(null);
|
expect(varValue).not.toBe(null);
|
||||||
expect(varValue).toBe('test_value_1');
|
expect(varValue).toBe('test_value_1');
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
it('should be able to retrieve the value of a form variable', () => {
|
it('should be able to retrieve the value of a form variable', () => {
|
||||||
let fakeForm = new FormModel({variables: [
|
let fakeForm = new FormModel({variables: [
|
||||||
@ -238,8 +237,7 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(varValue).toBe('form_value_test');
|
expect(varValue).toBe('form_value_test');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
xit('should return null if the variable does not exist', (done) => {
|
||||||
it('should return null if the variable does not exist', (done) => {
|
|
||||||
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
||||||
(res: TaskProcessVariableModel[]) => {
|
(res: TaskProcessVariableModel[]) => {
|
||||||
done();
|
done();
|
||||||
@ -255,7 +253,6 @@ describe('WidgetVisibilityService', () => {
|
|||||||
|
|
||||||
expect(varValue).toBe(null);
|
expect(varValue).toBe(null);
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
it('should be able to retrieve a field value searching in the form', () => {
|
it('should be able to retrieve a field value searching in the form', () => {
|
||||||
let stubFormWithFields = new FormModel(fakeFormJson);
|
let stubFormWithFields = new FormModel(fakeFormJson);
|
||||||
@ -310,8 +307,7 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(rightValue).toBe('100');
|
expect(rightValue).toBe('100');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
xit('should retrieve the value for the right field when it is a process variable', (done) => {
|
||||||
it('should retrieve the value for the right field when it is a process variable', (done) => {
|
|
||||||
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
||||||
(res: TaskProcessVariableModel[]) => {
|
(res: TaskProcessVariableModel[]) => {
|
||||||
done();
|
done();
|
||||||
@ -330,7 +326,6 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(rightValue).not.toBe(null);
|
expect(rightValue).not.toBe(null);
|
||||||
expect(rightValue).toBe('test_value_2');
|
expect(rightValue).toBe('test_value_2');
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
it('should retrieve the value for the right field when it is a form variable', () => {
|
it('should retrieve the value for the right field when it is a form variable', () => {
|
||||||
let fakeFormWithField = new FormModel(fakeFormJson);
|
let fakeFormWithField = new FormModel(fakeFormJson);
|
||||||
@ -366,8 +361,7 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(rightValue).toBe(null);
|
expect(rightValue).toBe(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
xit('should retrieve the value for the left field when it is a process variable', (variableUpdated) => {
|
||||||
it('should retrieve the value for the left field when it is a process variable', (variableUpdated) => {
|
|
||||||
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
||||||
(res: TaskProcessVariableModel[]) => {
|
(res: TaskProcessVariableModel[]) => {
|
||||||
variableUpdated();
|
variableUpdated();
|
||||||
@ -386,7 +380,6 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(rightValue).not.toBe(null);
|
expect(rightValue).not.toBe(null);
|
||||||
expect(rightValue).toBe('test_value_2');
|
expect(rightValue).toBe('test_value_2');
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
it('should retrieve the value for the left field when it is a form variable', () => {
|
it('should retrieve the value for the left field when it is a form variable', () => {
|
||||||
let fakeForm = new FormModel({variables: [
|
let fakeForm = new FormModel({variables: [
|
||||||
@ -470,8 +463,7 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(isVisible).toBeTruthy();
|
expect(isVisible).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
xit('should evaluate the visibility for the field between form value and process var', (varReady) => {
|
||||||
it('should evaluate the visibility for the field between form value and process var', (varReady) => {
|
|
||||||
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
||||||
(res: TaskProcessVariableModel[]) => {
|
(res: TaskProcessVariableModel[]) => {
|
||||||
varReady();
|
varReady();
|
||||||
@ -492,10 +484,8 @@ describe('WidgetVisibilityService', () => {
|
|||||||
|
|
||||||
expect(isVisible).toBeTruthy();
|
expect(isVisible).toBeTruthy();
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
xit('should evaluate visibility with multiple conditions', (ready) => {
|
||||||
it('should evaluate visibility with multiple conditions', (ready) => {
|
|
||||||
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
service.getTaskProcessVariableModelsForTask(9999).subscribe(
|
||||||
(res: TaskProcessVariableModel[]) => {
|
(res: TaskProcessVariableModel[]) => {
|
||||||
ready();
|
ready();
|
||||||
@ -521,7 +511,6 @@ describe('WidgetVisibilityService', () => {
|
|||||||
|
|
||||||
expect(isVisible).toBeTruthy();
|
expect(isVisible).toBeTruthy();
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
it('should return true when the visibility condition is not valid', () => {
|
it('should return true when the visibility condition is not valid', () => {
|
||||||
let visibilityObjTest = new WidgetVisibilityModel();
|
let visibilityObjTest = new WidgetVisibilityModel();
|
||||||
@ -561,3 +550,4 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(fakeFormField.isVisible).toBeFalsy();
|
expect(fakeFormField.isVisible).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user