diff --git a/audit-info-3.2.1.md b/audit-info-3.2.1.md deleted file mode 100644 index a1721fb6c0..0000000000 --- a/audit-info-3.2.1.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -Title: License info, Alfresco Angular components 3.2.1 ---- - -# License information for Alfresco Angular components 3.2.1 - -This page lists all third party libraries that ADF 3.2.1 depends on. - -## Risks - -- Critical risk dependencies 0 -- High risk dependencies 0 -- Moderate risk dependencies 4 -- Low risk dependencies 1 - -Dependencies analyzed 64984 - -## Libraries - - -| Severity | Vulnerable versions | Module | -| --- | --- | --- | -|low | "<4.17.5" | lodash | -|moderate | "<4.17.11" | lodash | -|moderate | ">=0.3.14 <0.6.2" | marked | -|moderate | "<0.18.1" | axios | - diff --git a/lib/cli/README.md b/lib/cli/README.md index 06a2edf971..a04494c408 100644 --- a/lib/cli/README.md +++ b/lib/cli/README.md @@ -10,7 +10,7 @@ The ADF CLI manages, builds , doc and test your ADF Application projects. To get started follow these instructions: `` -npm install adf-cli -g +npm install @alfresco/adf-cli -g `` ### License Check @@ -18,6 +18,8 @@ npm install adf-cli -g Move in the folder where you have your package.json and run the command: ```bash +npm install + adf-license ``` ### Audit Check @@ -25,5 +27,7 @@ adf-license Move in the folder where you have your package.json and run the command: ```bash +npm install + adf-audit ``` diff --git a/lib/cli/package.json b/lib/cli/package.json index 1e68a13f65..b0a192bfa3 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -19,7 +19,8 @@ "license-checker": "^25.0.1", "npm-registry-fetch": "^3.9.0", "shelljs": "^0.8.3", - "spdx-license-list": "^5.0.0" + "spdx-license-list": "^5.0.0", + "ejs": "^2.6.1" }, "keywords": [ "alfresco-component" diff --git a/lib/core/form/services/widget-visibility.service.spec.ts b/lib/core/form/services/widget-visibility.service.spec.ts index 03dad8d494..7449dd9776 100644 --- a/lib/core/form/services/widget-visibility.service.spec.ts +++ b/lib/core/form/services/widget-visibility.service.spec.ts @@ -16,11 +16,19 @@ */ import { TestBed } from '@angular/core/testing'; -import { ContainerModel, FormFieldModel, FormFieldTypes, FormModel, TabModel } from './../components/widgets/core/index'; +import { + ContainerModel, + FormFieldModel, + FormFieldTypes, + FormModel, + TabModel +} from './../components/widgets/core/index'; import { TaskProcessVariableModel } from './../models/task-process-variable.model'; import { WidgetVisibilityModel } from './../models/widget-visibility.model'; import { fakeFormJson, + complexVisibilityJsonVisible, + complexVisibilityJsonNotVisible, fakeTaskProcessVariableModels, formTest, formValues @@ -358,7 +366,7 @@ describe('WidgetVisibilityService', () => { jsonFieldFake.visibilityCondition = visibilityObjTest; }); - afterEach( () => { + afterEach(() => { service.cleanProcessVariable(); }); @@ -647,7 +655,11 @@ describe('WidgetVisibilityService', () => { visibilityObjTest.leftFormFieldId = 'FIELD_TEST'; visibilityObjTest.operator = '!='; visibilityObjTest.rightFormFieldId = 'RIGHT_FORM_FIELD_ID'; - const tab = new TabModel(fakeFormWithField, { id: 'fake-tab-id', title: 'fake-tab-title', isVisible: true }); + const tab = new TabModel(fakeFormWithField, { + id: 'fake-tab-id', + title: 'fake-tab-title', + isVisible: true + }); tab.visibilityCondition = visibilityObjTest; fakeFormWithField.tabs.push(tab); service.refreshVisibility(fakeFormWithField); @@ -719,7 +731,7 @@ describe('WidgetVisibilityService', () => { jasmine.Ajax.requests.mostRecent().respondWith({ status: 200, contentType: 'json', - responseText: [{id: 'FIELD_FORM_EMPTY', type: 'string', value: 'PROCESS_RIGHT_FORM_FIELD_VALUE'}] + responseText: [{ id: 'FIELD_FORM_EMPTY', type: 'string', value: 'PROCESS_RIGHT_FORM_FIELD_VALUE' }] }); }); @@ -785,7 +797,7 @@ describe('WidgetVisibilityService', () => { jasmine.Ajax.requests.mostRecent().respondWith({ status: 200, contentType: 'json', - responseText: [{id: 'FIELD_FORM_EMPTY', type: 'string', value: 'PROCESS_RIGHT_FORM_FIELD_VALUE'}] + responseText: [{ id: 'FIELD_FORM_EMPTY', type: 'string', value: 'PROCESS_RIGHT_FORM_FIELD_VALUE' }] }); }); @@ -851,7 +863,7 @@ describe('WidgetVisibilityService', () => { jasmine.Ajax.requests.mostRecent().respondWith({ status: 200, contentType: 'json', - responseText: [{id: 'FIELD_FORM_EMPTY', type: 'string', value: 'PROCESS_RIGHT_FORM_FIELD_VALUE'}] + responseText: [{ id: 'FIELD_FORM_EMPTY', type: 'string', value: 'PROCESS_RIGHT_FORM_FIELD_VALUE' }] }); }); @@ -859,7 +871,11 @@ describe('WidgetVisibilityService', () => { visibilityObjTest.leftFormFieldId = 'FIELD_TEST'; visibilityObjTest.operator = '!='; visibilityObjTest.rightFormFieldId = 'RIGHT_FORM_FIELD_ID'; - const tab = new TabModel(fakeFormWithField, { id: 'fake-tab-id', title: 'fake-tab-title', isVisible: true }); + const tab = new TabModel(fakeFormWithField, { + id: 'fake-tab-id', + title: 'fake-tab-title', + isVisible: true + }); tab.visibilityCondition = visibilityObjTest; service.refreshEntityVisibility(tab); @@ -902,6 +918,8 @@ describe('WidgetVisibilityService', () => { describe('Visibility based on form variables', () => { const fakeFormWithVariables = new FormModel(fakeFormJson); + const complexVisibilityModel = new FormModel(complexVisibilityJsonVisible); + const complexVisibilityJsonNotVisibleModel = new FormModel(complexVisibilityJsonNotVisible); let visibilityObjTest: WidgetVisibilityModel; beforeEach(() => { @@ -917,6 +935,20 @@ describe('WidgetVisibilityService', () => { expect(isVisible).toBeTruthy(); }); + it('should be able to analyze a complex visibility JSON truthy', () => { + const isVisible = service.isFieldVisible(complexVisibilityModel, + complexVisibilityJsonVisible.formDefinition.fields[2].fields[2][0].visibilityCondition); + + expect(isVisible).toBe(true); + }); + + it('should be able to analyze a complex visibility JSON false', () => { + const isVisible = service.isFieldVisible(complexVisibilityJsonNotVisibleModel, + complexVisibilityJsonNotVisible.formDefinition.fields[2].fields[2][0].visibilityCondition); + + expect(isVisible).toBe(false); + }); + it('should set visibility to false when validation for string variables fails', () => { visibilityObjTest.leftRestResponseId = 'name'; visibilityObjTest.operator = '=='; diff --git a/lib/core/form/services/widget-visibility.service.ts b/lib/core/form/services/widget-visibility.service.ts index 45a015030f..48773eb8f2 100644 --- a/lib/core/form/services/widget-visibility.service.ts +++ b/lib/core/form/services/widget-visibility.service.ts @@ -52,7 +52,7 @@ export class WidgetVisibilityService { } evaluateVisibility(form: FormModel, visibilityObj: WidgetVisibilityModel): boolean { - const isLeftFieldPresent = visibilityObj && ( visibilityObj.leftFormFieldId || visibilityObj.leftRestResponseId ); + const isLeftFieldPresent = visibilityObj && (visibilityObj.leftFormFieldId || visibilityObj.leftRestResponseId); if (!isLeftFieldPresent || isLeftFieldPresent === 'null') { return true; } else { @@ -60,19 +60,28 @@ export class WidgetVisibilityService { } } - isFieldVisible(form: FormModel, visibilityObj: WidgetVisibilityModel): boolean { + isFieldVisible(form: FormModel, visibilityObj: WidgetVisibilityModel, accumulator: any[] = [], result: boolean = false): boolean { const leftValue = this.getLeftValue(form, visibilityObj); const rightValue = this.getRightValue(form, visibilityObj); const actualResult = this.evaluateCondition(leftValue, rightValue, visibilityObj.operator); + + accumulator.push({ value: actualResult, operator: visibilityObj.nextConditionOperator }); if (visibilityObj.nextCondition) { - return this.evaluateLogicalOperation( - visibilityObj.nextConditionOperator, - actualResult, - this.isFieldVisible(form, visibilityObj.nextCondition) - ); + result = this.isFieldVisible(form, visibilityObj.nextCondition, accumulator); } else { - return actualResult; + result = accumulator[0].value; + + for (let i = 1; i < accumulator.length; i++) { + result = this.evaluateLogicalOperation( + accumulator[i - 1].operator, + result, + accumulator[i].value + ); + } } + + return result; + } getLeftValue(form: FormModel, visibilityObj: WidgetVisibilityModel): string { diff --git a/lib/core/mock/form/widget-visibility.service.mock.ts b/lib/core/mock/form/widget-visibility.service.mock.ts index 4a4844193c..7beaf9787a 100644 --- a/lib/core/mock/form/widget-visibility.service.mock.ts +++ b/lib/core/mock/form/widget-visibility.service.mock.ts @@ -15,14 +15,31 @@ * 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'} + { 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 = { @@ -31,7 +48,7 @@ export let formValues: FormValues = { 'test_3': 'value_1', 'test_4': 'dropdown_id', 'test_5': 'dropdown_label', - 'dropdown': {'id': 'dropdown_id', 'name': 'dropdown_label'} + 'dropdown': { 'id': 'dropdown_id', 'name': 'dropdown_label' } }; export let fakeFormJson = { @@ -115,3 +132,750 @@ export let fakeFormJson = { } ] }; + +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': { + 'leftFormFieldId': 'label', + 'leftRestResponseId': null, + 'operator': '==', + 'rightValue': 'aaa', + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'and', + 'nextCondition': { + 'leftFormFieldId': 'label1', + 'leftRestResponseId': null, + 'operator': '!=', + 'rightValue': 'aaa', + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'and', + 'nextCondition': { + 'leftFormFieldId': 'label2', + 'leftRestResponseId': null, + 'operator': '!empty', + 'rightValue': null, + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'or', + 'nextCondition': { + 'leftFormFieldId': 'label3', + 'leftRestResponseId': null, + 'operator': 'empty', + 'rightValue': null, + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + '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': { + 'leftFormFieldId': 'label', + 'leftRestResponseId': null, + 'operator': '==', + 'rightValue': 'aaa', + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'and', + 'nextCondition': { + 'leftFormFieldId': 'label1', + 'leftRestResponseId': null, + 'operator': '!=', + 'rightValue': 'aaa', + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'and', + 'nextCondition': { + 'leftFormFieldId': 'label2', + 'leftRestResponseId': null, + 'operator': '!empty', + 'rightValue': null, + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'or', + 'nextCondition': { + 'leftFormFieldId': 'label3', + 'leftRestResponseId': null, + 'operator': 'empty', + 'rightValue': null, + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': null, + 'nextCondition': null + } + } + } + } + }] + } + }], + 'outcomes': [], + 'javascriptEvents': [], + 'className': '', + 'style': '', + 'customFieldTemplates': {}, + 'metadata': {}, + 'variables': [], + 'customFieldsValueInfo': {}, + 'gridsterForm': false + } +};