mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ADF-4710] - adapt visibility condition to the new schema (#4884)
* [ADF-4710] - adapt new visibility condition schema * [ADF-4710] - fix unit tests * [ADF-4710] - support visibility for APS1 and APS2
This commit is contained in:
parent
ffd4413335
commit
72b3a75a85
@ -136,7 +136,6 @@ export class FormFieldModel extends FormWidgetModel {
|
|||||||
|
|
||||||
constructor(form: FormModel, json?: any) {
|
constructor(form: FormModel, json?: any) {
|
||||||
super(form, json);
|
super(form, json);
|
||||||
|
|
||||||
if (json) {
|
if (json) {
|
||||||
this.fieldType = json.fieldType;
|
this.fieldType = json.fieldType;
|
||||||
this.id = json.id;
|
this.id = json.id;
|
||||||
@ -163,7 +162,7 @@ export class FormFieldModel extends FormWidgetModel {
|
|||||||
this.params = <FormFieldMetadata> json.params || {};
|
this.params = <FormFieldMetadata> json.params || {};
|
||||||
this.hyperlinkUrl = json.hyperlinkUrl;
|
this.hyperlinkUrl = json.hyperlinkUrl;
|
||||||
this.displayText = json.displayText;
|
this.displayText = json.displayText;
|
||||||
this.visibilityCondition = <WidgetVisibilityModel> json.visibilityCondition;
|
this.visibilityCondition = json.visibilityCondition ? new WidgetVisibilityModel(json.visibilityCondition) : undefined;
|
||||||
this.enableFractions = <boolean> json.enableFractions;
|
this.enableFractions = <boolean> json.enableFractions;
|
||||||
this.currency = json.currency;
|
this.currency = json.currency;
|
||||||
this.dateDisplayFormat = json.dateDisplayFormat || this.getDefaultDateFormat(json);
|
this.dateDisplayFormat = json.dateDisplayFormat || this.getDefaultDateFormat(json);
|
||||||
|
@ -16,13 +16,90 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export class WidgetVisibilityModel {
|
export class WidgetVisibilityModel {
|
||||||
leftFormFieldId: string;
|
rightRestResponseId?: string;
|
||||||
leftRestResponseId: string;
|
rightFormFieldId?: string;
|
||||||
|
leftRestResponseId?: string;
|
||||||
|
leftFormFieldId?: string;
|
||||||
|
operator: string;
|
||||||
nextCondition: WidgetVisibilityModel;
|
nextCondition: WidgetVisibilityModel;
|
||||||
nextConditionOperator: string;
|
nextConditionOperator: string;
|
||||||
operator: string;
|
|
||||||
rightFormFieldId: string;
|
constructor(private json?: any) {
|
||||||
rightRestResponseId: string;
|
if (json) {
|
||||||
rightType: string;
|
this.operator = json.operator;
|
||||||
rightValue: string;
|
this.nextCondition = new WidgetVisibilityModel(json.nextCondition);
|
||||||
|
this.nextConditionOperator = json.nextConditionOperator;
|
||||||
|
this.rightRestResponseId = json.rightRestResponseId;
|
||||||
|
this.rightFormFieldId = json.rightFormFieldId;
|
||||||
|
this.leftFormFieldId = json.leftFormFieldId;
|
||||||
|
this.leftRestResponseId = json.leftRestResponseId;
|
||||||
|
} else {
|
||||||
|
this.json = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set leftType(leftType: string) {
|
||||||
|
this.json.leftType = leftType;
|
||||||
|
}
|
||||||
|
|
||||||
|
set rightType(rightType: string) {
|
||||||
|
this.json.rightType = rightType;
|
||||||
|
}
|
||||||
|
|
||||||
|
set leftValue(leftValue: string) {
|
||||||
|
this.json.leftValue = leftValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
set rightValue(rightValue: string) {
|
||||||
|
this.json.rightValue = rightValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
get leftType() {
|
||||||
|
if (this.leftFormFieldId) {
|
||||||
|
return WidgetTypeEnum.field;
|
||||||
|
} else if (this.leftRestResponseId) {
|
||||||
|
return WidgetTypeEnum.variable;
|
||||||
|
} else if ( !!this.json.leftType) {
|
||||||
|
return this.json.leftType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get leftValue() {
|
||||||
|
if ( this.json.leftValue ) {
|
||||||
|
return this.json.leftValue;
|
||||||
|
} else if (this.leftFormFieldId) {
|
||||||
|
return this.leftFormFieldId;
|
||||||
|
} else {
|
||||||
|
return this.leftRestResponseId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get rightType() {
|
||||||
|
if ( !!this.json.rightType ) {
|
||||||
|
return this.json.rightType;
|
||||||
|
} else if (this.json.rightValue) {
|
||||||
|
return WidgetTypeEnum.value;
|
||||||
|
} else if (this.rightRestResponseId) {
|
||||||
|
return WidgetTypeEnum.variable;
|
||||||
|
} else if (this.rightFormFieldId) {
|
||||||
|
return WidgetTypeEnum.field;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get rightValue() {
|
||||||
|
if (this.json.rightValue) {
|
||||||
|
return this.json.rightValue;
|
||||||
|
} else if (this.rightFormFieldId) {
|
||||||
|
return this.rightFormFieldId;
|
||||||
|
} else {
|
||||||
|
return this.rightRestResponseId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum WidgetTypeEnum {
|
||||||
|
field = 'field',
|
||||||
|
variable = 'variable',
|
||||||
|
value = 'value'
|
||||||
}
|
}
|
||||||
|
1029
lib/core/form/services/widget-visibility-cloud.service.spec.ts
Normal file
1029
lib/core/form/services/widget-visibility-cloud.service.spec.ts
Normal file
File diff suppressed because it is too large
Load Diff
@ -25,20 +25,16 @@ import {
|
|||||||
} from './../components/widgets/core/index';
|
} from './../components/widgets/core/index';
|
||||||
import { TaskProcessVariableModel } from './../models/task-process-variable.model';
|
import { TaskProcessVariableModel } from './../models/task-process-variable.model';
|
||||||
import { WidgetVisibilityModel } from './../models/widget-visibility.model';
|
import { WidgetVisibilityModel } from './../models/widget-visibility.model';
|
||||||
import {
|
|
||||||
fakeFormJson,
|
|
||||||
complexVisibilityJsonVisible,
|
|
||||||
complexVisibilityJsonNotVisible,
|
|
||||||
fakeTaskProcessVariableModels,
|
|
||||||
formTest,
|
|
||||||
formValues
|
|
||||||
} from '../../mock';
|
|
||||||
import { WidgetVisibilityService } from './widget-visibility.service';
|
import { WidgetVisibilityService } from './widget-visibility.service';
|
||||||
import { setupTestBed } from '../../testing/setupTestBed';
|
import { setupTestBed } from '../../testing/setupTestBed';
|
||||||
import { CoreModule } from '../../core.module';
|
import { CoreModule } from '../../core.module';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
import { AlfrescoApiService } from '../../services/alfresco-api.service';
|
||||||
import { AlfrescoApiServiceMock } from '../../mock/alfresco-api.service.mock';
|
import { AlfrescoApiServiceMock } from '../../mock/alfresco-api.service.mock';
|
||||||
|
import { fakeTaskProcessVariableModels,
|
||||||
|
fakeFormJson, formTest,
|
||||||
|
formValues, complexVisibilityJsonVisible,
|
||||||
|
complexVisibilityJsonNotVisible } from 'core/mock/form/widget-visibility.service.mock';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@ -196,10 +192,10 @@ describe('WidgetVisibilityService', () => {
|
|||||||
describe('should retrieve the process variables', () => {
|
describe('should retrieve the process variables', () => {
|
||||||
const fakeFormWithField = new FormModel(fakeFormJson);
|
const fakeFormWithField = new FormModel(fakeFormJson);
|
||||||
let visibilityObjTest: WidgetVisibilityModel;
|
let visibilityObjTest: WidgetVisibilityModel;
|
||||||
const chainedVisibilityObj = new WidgetVisibilityModel();
|
const chainedVisibilityObj = new WidgetVisibilityModel({});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
visibilityObjTest = new WidgetVisibilityModel();
|
visibilityObjTest = new WidgetVisibilityModel({});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return the process variables for task', (done) => {
|
it('should return the process variables for task', (done) => {
|
||||||
@ -294,7 +290,7 @@ describe('WidgetVisibilityService', () => {
|
|||||||
visibilityObjTest.leftFormFieldId = 'LEFT_FORM_FIELD_ID';
|
visibilityObjTest.leftFormFieldId = 'LEFT_FORM_FIELD_ID';
|
||||||
visibilityObjTest.operator = '!=';
|
visibilityObjTest.operator = '!=';
|
||||||
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
|
visibilityObjTest.rightRestResponseId = 'TEST_VAR_2';
|
||||||
const isVisible = service.isFieldVisible(fakeFormWithField, visibilityObjTest);
|
const isVisible = service.isFieldVisible(fakeFormWithField, new WidgetVisibilityModel(visibilityObjTest));
|
||||||
|
|
||||||
expect(isVisible).toBeTruthy();
|
expect(isVisible).toBeTruthy();
|
||||||
done();
|
done();
|
||||||
@ -459,7 +455,7 @@ describe('WidgetVisibilityService', () => {
|
|||||||
expect(leftValue).toBe('value_2');
|
expect(leftValue).toBe('value_2');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return an empty string for a value that is not on variable or form', () => {
|
it('should return empty string for a value that is not on variable or form', () => {
|
||||||
const leftValue = service.getLeftValue(fakeFormWithField, visibilityObjTest);
|
const leftValue = service.getLeftValue(fakeFormWithField, visibilityObjTest);
|
||||||
|
|
||||||
expect(leftValue).toBe('');
|
expect(leftValue).toBe('');
|
||||||
@ -943,9 +939,8 @@ describe('WidgetVisibilityService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to analyze a complex visibility JSON false', () => {
|
it('should be able to analyze a complex visibility JSON false', () => {
|
||||||
const isVisible = service.isFieldVisible(complexVisibilityJsonNotVisibleModel,
|
const formField = new FormFieldModel(complexVisibilityJsonNotVisibleModel, complexVisibilityJsonNotVisible.formDefinition.fields[2].fields[2][0]);
|
||||||
complexVisibilityJsonNotVisible.formDefinition.fields[2].fields[2][0].visibilityCondition);
|
const isVisible = service.isFieldVisible(complexVisibilityJsonNotVisibleModel, new WidgetVisibilityModel(formField.visibilityCondition));
|
||||||
|
|
||||||
expect(isVisible).toBe(false);
|
expect(isVisible).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ import moment from 'moment-es6';
|
|||||||
import { Observable, from, throwError } from 'rxjs';
|
import { Observable, from, throwError } from 'rxjs';
|
||||||
import { FormFieldModel, FormModel, TabModel } from '../components/widgets/core/index';
|
import { FormFieldModel, FormModel, TabModel } from '../components/widgets/core/index';
|
||||||
import { TaskProcessVariableModel } from '../models/task-process-variable.model';
|
import { TaskProcessVariableModel } from '../models/task-process-variable.model';
|
||||||
import { WidgetVisibilityModel } from '../models/widget-visibility.model';
|
import { WidgetVisibilityModel, WidgetTypeEnum } from '../models/widget-visibility.model';
|
||||||
import { map, catchError } from 'rxjs/operators';
|
import { map, catchError } from 'rxjs/operators';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@ -52,7 +52,7 @@ export class WidgetVisibilityService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
evaluateVisibility(form: FormModel, visibilityObj: WidgetVisibilityModel): boolean {
|
evaluateVisibility(form: FormModel, visibilityObj: WidgetVisibilityModel): boolean {
|
||||||
const isLeftFieldPresent = visibilityObj && (visibilityObj.leftFormFieldId || visibilityObj.leftRestResponseId);
|
const isLeftFieldPresent = visibilityObj && (visibilityObj.leftType || visibilityObj.leftValue);
|
||||||
if (!isLeftFieldPresent || isLeftFieldPresent === 'null') {
|
if (!isLeftFieldPresent || isLeftFieldPresent === 'null') {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@ -64,14 +64,14 @@ export class WidgetVisibilityService {
|
|||||||
const leftValue = this.getLeftValue(form, visibilityObj);
|
const leftValue = this.getLeftValue(form, visibilityObj);
|
||||||
const rightValue = this.getRightValue(form, visibilityObj);
|
const rightValue = this.getRightValue(form, visibilityObj);
|
||||||
const actualResult = this.evaluateCondition(leftValue, rightValue, visibilityObj.operator);
|
const actualResult = this.evaluateCondition(leftValue, rightValue, visibilityObj.operator);
|
||||||
|
|
||||||
accumulator.push({ value: actualResult, operator: visibilityObj.nextConditionOperator });
|
accumulator.push({ value: actualResult, operator: visibilityObj.nextConditionOperator });
|
||||||
if (visibilityObj.nextCondition) {
|
if (visibilityObj.nextCondition) {
|
||||||
result = this.isFieldVisible(form, visibilityObj.nextCondition, accumulator);
|
result = this.isFieldVisible(form, visibilityObj.nextCondition, accumulator);
|
||||||
} else {
|
} else {
|
||||||
result = accumulator[0].value;
|
result = accumulator[0].value ? accumulator[0].value : result;
|
||||||
|
|
||||||
for (let i = 1; i < accumulator.length; i++) {
|
for (let i = 1; i < accumulator.length; i++) {
|
||||||
|
if (accumulator[i - 1].operator && accumulator[i].value) {
|
||||||
result = this.evaluateLogicalOperation(
|
result = this.evaluateLogicalOperation(
|
||||||
accumulator[i - 1].operator,
|
accumulator[i - 1].operator,
|
||||||
result,
|
result,
|
||||||
@ -79,28 +79,28 @@ export class WidgetVisibilityService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return !!result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getLeftValue(form: FormModel, visibilityObj: WidgetVisibilityModel): string {
|
getLeftValue(form: FormModel, visibilityObj: WidgetVisibilityModel): string {
|
||||||
let leftValue = '';
|
let leftValue = '';
|
||||||
if (visibilityObj.leftRestResponseId && visibilityObj.leftRestResponseId !== 'null') {
|
if (visibilityObj.leftType && visibilityObj.leftType === WidgetTypeEnum.variable) {
|
||||||
leftValue = this.getVariableValue(form, visibilityObj.leftRestResponseId, this.processVarList);
|
leftValue = this.getVariableValue(form, visibilityObj.leftValue, this.processVarList);
|
||||||
} else if (visibilityObj.leftFormFieldId) {
|
} else if (visibilityObj.leftType && visibilityObj.leftType === WidgetTypeEnum.field) {
|
||||||
leftValue = this.getFormValue(form, visibilityObj.leftFormFieldId);
|
leftValue = this.getFormValue(form, visibilityObj.leftValue);
|
||||||
leftValue = leftValue ? leftValue : this.getVariableValue(form, visibilityObj.leftFormFieldId, this.processVarList);
|
leftValue = leftValue ? leftValue : this.getVariableValue(form, visibilityObj.leftValue, this.processVarList);
|
||||||
}
|
}
|
||||||
return leftValue;
|
return leftValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
getRightValue(form: FormModel, visibilityObj: WidgetVisibilityModel): string {
|
getRightValue(form: FormModel, visibilityObj: WidgetVisibilityModel): string {
|
||||||
let valueFound = '';
|
let valueFound = '';
|
||||||
if (visibilityObj.rightRestResponseId) {
|
if (visibilityObj.rightType === WidgetTypeEnum.variable) {
|
||||||
valueFound = this.getVariableValue(form, visibilityObj.rightRestResponseId, this.processVarList);
|
valueFound = this.getVariableValue(form, visibilityObj.rightValue, this.processVarList);
|
||||||
} else if (visibilityObj.rightFormFieldId) {
|
} else if (visibilityObj.rightType === WidgetTypeEnum.field) {
|
||||||
valueFound = this.getFormValue(form, visibilityObj.rightFormFieldId);
|
valueFound = this.getFormValue(form, visibilityObj.rightValue);
|
||||||
} else {
|
} else {
|
||||||
if (moment(visibilityObj.rightValue, 'YYYY-MM-DD', true).isValid()) {
|
if (moment(visibilityObj.rightValue, 'YYYY-MM-DD', true).isValid()) {
|
||||||
valueFound = visibilityObj.rightValue + 'T00:00:00.000Z';
|
valueFound = visibilityObj.rightValue + 'T00:00:00.000Z';
|
||||||
@ -117,7 +117,6 @@ export class WidgetVisibilityService {
|
|||||||
if (!value) {
|
if (!value) {
|
||||||
value = this.searchValueInForm(form, fieldId);
|
value = this.searchValueInForm(form, fieldId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,16 +177,7 @@ export class WidgetVisibilityService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private isSearchedField(field: FormFieldModel, fieldToFind: string): boolean {
|
private isSearchedField(field: FormFieldModel, fieldToFind: string): boolean {
|
||||||
const formattedFieldName = this.removeLabel(field, fieldToFind);
|
return (field.id && fieldToFind) ? field.id.toUpperCase() === fieldToFind.toUpperCase() : false;
|
||||||
return field.id ? field.id.toUpperCase() === formattedFieldName.toUpperCase() : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private removeLabel(field: FormFieldModel, fieldToFind): string {
|
|
||||||
let formattedFieldName = fieldToFind || '';
|
|
||||||
if (field.fieldType === 'RestFieldRepresentation' && fieldToFind.indexOf('_LABEL') > 0) {
|
|
||||||
formattedFieldName = fieldToFind.substring(0, fieldToFind.length - 6);
|
|
||||||
}
|
|
||||||
return formattedFieldName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getVariableValue(form: FormModel, name: string, processVarList: TaskProcessVariableModel[]): string {
|
getVariableValue(form: FormModel, name: string, processVarList: TaskProcessVariableModel[]): string {
|
||||||
|
@ -110,11 +110,10 @@ export let formDefVisibilitiFieldDependsOnNextOne = {
|
|||||||
row: -1,
|
row: -1,
|
||||||
col: -1,
|
col: -1,
|
||||||
visibilityCondition: {
|
visibilityCondition: {
|
||||||
leftFormFieldId: 'name',
|
leftType: 'field',
|
||||||
leftRestResponseId: null,
|
leftValue: 'name',
|
||||||
operator: '==',
|
operator: '==',
|
||||||
rightValue: 'italy',
|
rightValue: 'italy',
|
||||||
rightType: null,
|
|
||||||
rightFormFieldId: '',
|
rightFormFieldId: '',
|
||||||
rightRestResponseId: '',
|
rightRestResponseId: '',
|
||||||
nextConditionOperator: '',
|
nextConditionOperator: '',
|
||||||
@ -320,11 +319,10 @@ export let formDefVisibilitiFieldDependsOnPreviousOne = {
|
|||||||
row: -1,
|
row: -1,
|
||||||
col: -1,
|
col: -1,
|
||||||
visibilityCondition: {
|
visibilityCondition: {
|
||||||
leftFormFieldId: 'name',
|
leftType: 'field',
|
||||||
leftRestResponseId: null,
|
leftValue: 'name',
|
||||||
operator: '==',
|
operator: '==',
|
||||||
rightValue: 'italy',
|
rightValue: 'italy',
|
||||||
rightType: null,
|
|
||||||
rightFormFieldId: '',
|
rightFormFieldId: '',
|
||||||
rightRestResponseId: '',
|
rightRestResponseId: '',
|
||||||
nextConditionOperator: '',
|
nextConditionOperator: '',
|
||||||
|
865
lib/core/mock/form/widget-visibility-cloud.service.mock.ts
Normal file
865
lib/core/mock/form/widget-visibility-cloud.service.mock.ts
Normal file
@ -0,0 +1,865 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 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 { FormModel, FormValues } from '../../form/components/widgets/core/index';
|
||||||
|
|
||||||
|
export let formTest = new FormModel({});
|
||||||
|
|
||||||
|
export let fakeTaskProcessVariableModels = [
|
||||||
|
{ id: 'TEST_VAR_1', type: 'string', value: 'test_value_1' },
|
||||||
|
{ id: 'TEST_VAR_2', type: 'string', value: 'test_value_2' },
|
||||||
|
{ id: 'TEST_VAR_3', type: 'string', value: 'test_value_3' }
|
||||||
|
];
|
||||||
|
|
||||||
|
export let formValues: FormValues = {
|
||||||
|
'test_1': 'value_1',
|
||||||
|
'test_2': 'value_2',
|
||||||
|
'test_3': 'value_1',
|
||||||
|
'test_4': 'dropdown_id',
|
||||||
|
'test_5': 'dropdown_label',
|
||||||
|
'dropdown': { 'id': 'dropdown_id', 'name': 'dropdown_label' }
|
||||||
|
};
|
||||||
|
|
||||||
|
export let fakeFormJson = {
|
||||||
|
id: '9999',
|
||||||
|
name: 'FORM_VISIBILITY',
|
||||||
|
processDefinitionId: 'PROCESS_TEST:9:9999',
|
||||||
|
processDefinitionName: 'PROCESS_TEST',
|
||||||
|
processDefinitionKey: 'PROCESS_TEST',
|
||||||
|
taskId: '999',
|
||||||
|
taskName: 'TEST',
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
fieldType: 'ContainerRepresentation',
|
||||||
|
id: '000000000000000000',
|
||||||
|
name: 'Label',
|
||||||
|
type: 'container',
|
||||||
|
value: null,
|
||||||
|
numberOfColumns: 2,
|
||||||
|
fields: {
|
||||||
|
1: [
|
||||||
|
{
|
||||||
|
fieldType: 'FormFieldRepresentation',
|
||||||
|
id: 'FIELD_TEST',
|
||||||
|
name: 'FIELD_TEST',
|
||||||
|
type: 'text',
|
||||||
|
value: 'RIGHT_FORM_FIELD_VALUE',
|
||||||
|
visibilityCondition: null,
|
||||||
|
isVisible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldType: 'FormFieldRepresentation',
|
||||||
|
id: 'FIELD_WITH_CONDITION',
|
||||||
|
name: 'FIELD_WITH_CONDITION',
|
||||||
|
type: 'text',
|
||||||
|
value: 'field_with_condition_value',
|
||||||
|
visibilityCondition: null,
|
||||||
|
isVisible: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldType: 'FormFieldRepresentation',
|
||||||
|
id: 'LEFT_FORM_FIELD_ID',
|
||||||
|
name: 'LEFT_FORM_FIELD_NAME',
|
||||||
|
type: 'text',
|
||||||
|
value: 'LEFT_FORM_FIELD_VALUE',
|
||||||
|
visibilityCondition: null,
|
||||||
|
isVisible: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
2: [
|
||||||
|
{
|
||||||
|
fieldType: 'FormFieldRepresentation',
|
||||||
|
id: 'RIGHT_FORM_FIELD_ID',
|
||||||
|
name: 'RIGHT_FORM_FIELD_NAME',
|
||||||
|
type: 'text',
|
||||||
|
value: 'RIGHT_FORM_FIELD_VALUE',
|
||||||
|
visibilityCondition: null,
|
||||||
|
isVisible: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
variables: [
|
||||||
|
{
|
||||||
|
'id': 'e621e8ff-42a6-499c-8121-33c7c35d8641',
|
||||||
|
'name': 'age',
|
||||||
|
'type': 'integer',
|
||||||
|
'value': 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': '4f8aa99e-8526-429c-9d99-809978489d96',
|
||||||
|
'name': 'name',
|
||||||
|
'type': 'string',
|
||||||
|
'value': 'abc'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': '0207b649-ff07-4f3a-a589-d10afa507b9b',
|
||||||
|
'name': 'dob',
|
||||||
|
'type': 'date',
|
||||||
|
'value': '2019-05-13'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
export let complexVisibilityJsonVisible = {
|
||||||
|
'id': 47591,
|
||||||
|
'name': 'Test-visibility',
|
||||||
|
'description': '',
|
||||||
|
'version': 4,
|
||||||
|
'lastUpdatedBy': 13,
|
||||||
|
'lastUpdatedByFullName': 'romano romano',
|
||||||
|
'lastUpdated': '2019-06-11T11:04:36.870+0000',
|
||||||
|
'stencilSetId': 0,
|
||||||
|
'referenceId': null,
|
||||||
|
'formDefinition': {
|
||||||
|
'tabs': [],
|
||||||
|
'fields': [{
|
||||||
|
'fieldType': 'ContainerRepresentation',
|
||||||
|
'id': '1560246123312',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'container',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': null,
|
||||||
|
'sizeX': 2,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null,
|
||||||
|
'numberOfColumns': 2,
|
||||||
|
'fields': {
|
||||||
|
'1': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 2 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}],
|
||||||
|
'2': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label1',
|
||||||
|
'name': 'Label1',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 1 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'fieldType': 'ContainerRepresentation',
|
||||||
|
'id': '1560246128696',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'container',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': null,
|
||||||
|
'sizeX': 2,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null,
|
||||||
|
'numberOfColumns': 2,
|
||||||
|
'fields': {
|
||||||
|
'1': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label4',
|
||||||
|
'name': 'Label4',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 2 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}],
|
||||||
|
'2': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label3',
|
||||||
|
'name': 'Label3',
|
||||||
|
'type': 'text',
|
||||||
|
'value': '',
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 1 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'fieldType': 'ContainerRepresentation',
|
||||||
|
'id': '1560246126964',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'container',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': null,
|
||||||
|
'sizeX': 2,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null,
|
||||||
|
'numberOfColumns': 2,
|
||||||
|
'fields': {
|
||||||
|
'1': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label2',
|
||||||
|
'name': 'Label2',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 2 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}],
|
||||||
|
'2': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label5',
|
||||||
|
'name': 'Label5',
|
||||||
|
'type': 'boolean',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 1 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': {
|
||||||
|
'leftType': 'label',
|
||||||
|
'leftValue': null,
|
||||||
|
'operator': '==',
|
||||||
|
'rightValue': 'aaa',
|
||||||
|
'rightType': null,
|
||||||
|
'nextConditionOperator': 'and',
|
||||||
|
'nextCondition': {
|
||||||
|
'leftType': 'label1',
|
||||||
|
'leftValue': null,
|
||||||
|
'operator': '!=',
|
||||||
|
'rightValue': 'aaa',
|
||||||
|
'rightType': null,
|
||||||
|
'nextConditionOperator': 'and',
|
||||||
|
'nextCondition': {
|
||||||
|
'leftType': 'label2',
|
||||||
|
'leftValue': null,
|
||||||
|
'operator': '!empty',
|
||||||
|
'rightValue': null,
|
||||||
|
'rightType': null,
|
||||||
|
'nextConditionOperator': 'or',
|
||||||
|
'nextCondition': {
|
||||||
|
'leftType': 'label3',
|
||||||
|
'leftValue': null,
|
||||||
|
'operator': 'empty',
|
||||||
|
'rightValue': null,
|
||||||
|
'rightType': null,
|
||||||
|
'nextConditionOperator': null,
|
||||||
|
'nextCondition': null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
'outcomes': [],
|
||||||
|
'javascriptEvents': [],
|
||||||
|
'className': '',
|
||||||
|
'style': '',
|
||||||
|
'customFieldTemplates': {},
|
||||||
|
'metadata': {},
|
||||||
|
'variables': [],
|
||||||
|
'customFieldsValueInfo': {},
|
||||||
|
'gridsterForm': false
|
||||||
|
}
|
||||||
|
};
|
||||||
|
export let complexVisibilityJsonNotVisible = {
|
||||||
|
'id': 47591,
|
||||||
|
'name': 'Test-visibility',
|
||||||
|
'description': '',
|
||||||
|
'version': 4,
|
||||||
|
'lastUpdatedBy': 13,
|
||||||
|
'lastUpdatedByFullName': 'romano romano',
|
||||||
|
'lastUpdated': '2019-06-11T11:04:36.870+0000',
|
||||||
|
'stencilSetId': 0,
|
||||||
|
'referenceId': null,
|
||||||
|
'formDefinition': {
|
||||||
|
'tabs': [],
|
||||||
|
'fields': [{
|
||||||
|
'fieldType': 'ContainerRepresentation',
|
||||||
|
'id': '1560246123312',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'container',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': null,
|
||||||
|
'sizeX': 2,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null,
|
||||||
|
'numberOfColumns': 2,
|
||||||
|
'fields': {
|
||||||
|
'1': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 2 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}],
|
||||||
|
'2': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label1',
|
||||||
|
'name': 'Label1',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 1 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'fieldType': 'ContainerRepresentation',
|
||||||
|
'id': '1560246128696',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'container',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': null,
|
||||||
|
'sizeX': 2,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null,
|
||||||
|
'numberOfColumns': 2,
|
||||||
|
'fields': {
|
||||||
|
'1': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label4',
|
||||||
|
'name': 'Label4',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 2 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}],
|
||||||
|
'2': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label3',
|
||||||
|
'name': 'Label3',
|
||||||
|
'type': 'text',
|
||||||
|
'value': 'OPSSS',
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 1 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
'fieldType': 'ContainerRepresentation',
|
||||||
|
'id': '1560246126964',
|
||||||
|
'name': 'Label',
|
||||||
|
'type': 'container',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': null,
|
||||||
|
'sizeX': 2,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null,
|
||||||
|
'numberOfColumns': 2,
|
||||||
|
'fields': {
|
||||||
|
'1': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label2',
|
||||||
|
'name': 'Label2',
|
||||||
|
'type': 'text',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 2 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': null
|
||||||
|
}],
|
||||||
|
'2': [{
|
||||||
|
'fieldType': 'FormFieldRepresentation',
|
||||||
|
'id': 'label5',
|
||||||
|
'name': 'Label5',
|
||||||
|
'type': 'boolean',
|
||||||
|
'value': null,
|
||||||
|
'required': false,
|
||||||
|
'readOnly': false,
|
||||||
|
'overrideId': false,
|
||||||
|
'colspan': 1,
|
||||||
|
'placeholder': null,
|
||||||
|
'minLength': 0,
|
||||||
|
'maxLength': 0,
|
||||||
|
'minValue': null,
|
||||||
|
'maxValue': null,
|
||||||
|
'regexPattern': null,
|
||||||
|
'optionType': null,
|
||||||
|
'hasEmptyValue': null,
|
||||||
|
'options': null,
|
||||||
|
'restUrl': null,
|
||||||
|
'restResponsePath': null,
|
||||||
|
'restIdProperty': null,
|
||||||
|
'restLabelProperty': null,
|
||||||
|
'tab': null,
|
||||||
|
'className': null,
|
||||||
|
'params': { 'existingColspan': 1, 'maxColspan': 1 },
|
||||||
|
'dateDisplayFormat': null,
|
||||||
|
'layout': { 'row': -1, 'column': -1, 'colspan': 1 },
|
||||||
|
'sizeX': 1,
|
||||||
|
'sizeY': 1,
|
||||||
|
'row': -1,
|
||||||
|
'col': -1,
|
||||||
|
'visibilityCondition': {
|
||||||
|
'leftType': 'label',
|
||||||
|
'leftValue': 'label',
|
||||||
|
'operator': '==',
|
||||||
|
'rightValue': 'aaa',
|
||||||
|
'rightType': 'variable',
|
||||||
|
'nextConditionOperator': 'and',
|
||||||
|
'nextCondition': {
|
||||||
|
'leftType': 'field',
|
||||||
|
'leftValue': 'label1',
|
||||||
|
'operator': '!=',
|
||||||
|
'rightValue': 'aaa',
|
||||||
|
'rightType': 'variable',
|
||||||
|
'nextConditionOperator': 'and',
|
||||||
|
'nextCondition': {
|
||||||
|
'leftType': 'field',
|
||||||
|
'leftValue': 'label2',
|
||||||
|
'operator': '!empty',
|
||||||
|
'rightValue': null,
|
||||||
|
'rightType': 'variable',
|
||||||
|
'nextConditionOperator': 'or',
|
||||||
|
'nextCondition': {
|
||||||
|
'leftType': 'field',
|
||||||
|
'leftValue': 'label3',
|
||||||
|
'operator': 'empty',
|
||||||
|
'rightValue': 'variable',
|
||||||
|
'rightType': null,
|
||||||
|
'nextConditionOperator': null,
|
||||||
|
'nextCondition': null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
'outcomes': [],
|
||||||
|
'javascriptEvents': [],
|
||||||
|
'className': '',
|
||||||
|
'style': '',
|
||||||
|
'customFieldTemplates': {},
|
||||||
|
'metadata': {},
|
||||||
|
'variables': [],
|
||||||
|
'customFieldsValueInfo': {},
|
||||||
|
'gridsterForm': false
|
||||||
|
}
|
||||||
|
};
|
@ -829,7 +829,6 @@ export let complexVisibilityJsonNotVisible = {
|
|||||||
'leftRestResponseId': null,
|
'leftRestResponseId': null,
|
||||||
'operator': '==',
|
'operator': '==',
|
||||||
'rightValue': 'aaa',
|
'rightValue': 'aaa',
|
||||||
'rightType': null,
|
|
||||||
'rightFormFieldId': '',
|
'rightFormFieldId': '',
|
||||||
'rightRestResponseId': '',
|
'rightRestResponseId': '',
|
||||||
'nextConditionOperator': 'and',
|
'nextConditionOperator': 'and',
|
||||||
@ -838,7 +837,6 @@ export let complexVisibilityJsonNotVisible = {
|
|||||||
'leftRestResponseId': null,
|
'leftRestResponseId': null,
|
||||||
'operator': '!=',
|
'operator': '!=',
|
||||||
'rightValue': 'aaa',
|
'rightValue': 'aaa',
|
||||||
'rightType': null,
|
|
||||||
'rightFormFieldId': '',
|
'rightFormFieldId': '',
|
||||||
'rightRestResponseId': '',
|
'rightRestResponseId': '',
|
||||||
'nextConditionOperator': 'and',
|
'nextConditionOperator': 'and',
|
||||||
@ -847,7 +845,6 @@ export let complexVisibilityJsonNotVisible = {
|
|||||||
'leftRestResponseId': null,
|
'leftRestResponseId': null,
|
||||||
'operator': '!empty',
|
'operator': '!empty',
|
||||||
'rightValue': null,
|
'rightValue': null,
|
||||||
'rightType': null,
|
|
||||||
'rightFormFieldId': '',
|
'rightFormFieldId': '',
|
||||||
'rightRestResponseId': '',
|
'rightRestResponseId': '',
|
||||||
'nextConditionOperator': 'or',
|
'nextConditionOperator': 'or',
|
||||||
@ -856,7 +853,6 @@ export let complexVisibilityJsonNotVisible = {
|
|||||||
'leftRestResponseId': null,
|
'leftRestResponseId': null,
|
||||||
'operator': 'empty',
|
'operator': 'empty',
|
||||||
'rightValue': null,
|
'rightValue': null,
|
||||||
'rightType': null,
|
|
||||||
'rightFormFieldId': '',
|
'rightFormFieldId': '',
|
||||||
'rightRestResponseId': '',
|
'rightRestResponseId': '',
|
||||||
'nextConditionOperator': null,
|
'nextConditionOperator': null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user