From be867b0c0c4a51cf186ca16e98ac2d44707a1b42 Mon Sep 17 00:00:00 2001 From: Silviu Popa Date: Fri, 30 Aug 2019 21:31:12 +0300 Subject: [PATCH] [ADF-4848] Form - fix tab visibility (#5021) * [ADF-4848] - fix tab visibility * add unit test --- .../form/components/widgets/core/tab.model.ts | 2 +- .../widget-visibility.service.spec.ts | 16 +- .../form/widget-visibility.service.mock.ts | 1686 +++++++++-------- 3 files changed, 930 insertions(+), 774 deletions(-) diff --git a/lib/core/form/components/widgets/core/tab.model.ts b/lib/core/form/components/widgets/core/tab.model.ts index e9a855025e..9baa584602 100644 --- a/lib/core/form/components/widgets/core/tab.model.ts +++ b/lib/core/form/components/widgets/core/tab.model.ts @@ -38,7 +38,7 @@ export class TabModel extends FormWidgetModel { if (json) { this.title = json.title; - this.visibilityCondition = json.visibilityCondition; + this.visibilityCondition = new WidgetVisibilityModel(json.visibilityCondition); } } } diff --git a/lib/core/form/services/widget-visibility.service.spec.ts b/lib/core/form/services/widget-visibility.service.spec.ts index f4dccaa8a9..3adb788fc1 100644 --- a/lib/core/form/services/widget-visibility.service.spec.ts +++ b/lib/core/form/services/widget-visibility.service.spec.ts @@ -34,7 +34,7 @@ import { AlfrescoApiServiceMock } from '../../mock/alfresco-api.service.mock'; import { fakeTaskProcessVariableModels, fakeFormJson, formTest, formValues, complexVisibilityJsonVisible, - complexVisibilityJsonNotVisible } from 'core/mock/form/widget-visibility.service.mock'; + complexVisibilityJsonNotVisible, tabVisibilityJsonMock } from 'core/mock/form/widget-visibility.service.mock'; declare let jasmine: any; @@ -929,6 +929,7 @@ describe('WidgetVisibilityService', () => { describe('Visibility based on form variables', () => { let fakeFormWithVariables = new FormModel(fakeFormJson); + const fakeTabVisibilityModel = new FormModel(tabVisibilityJsonMock); const complexVisibilityModel = new FormModel(complexVisibilityJsonVisible); const complexVisibilityJsonNotVisibleModel = new FormModel(complexVisibilityJsonNotVisible); let visibilityObjTest: WidgetVisibilityModel; @@ -1014,5 +1015,18 @@ describe('WidgetVisibilityService', () => { expect(isVisible).toBeTruthy(); }); + it('should validate visiblity for multiple tabs', () => { + visibilityObjTest.leftFormFieldId = 'label'; + visibilityObjTest.operator = '=='; + visibilityObjTest.rightValue = 'text'; + + service.refreshVisibility(fakeTabVisibilityModel); + expect(fakeTabVisibilityModel.tabs[1].isVisible).toBeFalsy(); + + fakeTabVisibilityModel.getFieldById('label').value = 'text'; + service.refreshVisibility(fakeTabVisibilityModel); + expect(fakeTabVisibilityModel.tabs[1].isVisible).toBeTruthy(); + }); + }); }); diff --git a/lib/core/mock/form/widget-visibility.service.mock.ts b/lib/core/mock/form/widget-visibility.service.mock.ts index 3dddbf21d0..086d8fa070 100644 --- a/lib/core/mock/form/widget-visibility.service.mock.ts +++ b/lib/core/mock/form/widget-visibility.service.mock.ts @@ -14,462 +14,463 @@ * 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 = { - '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 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: [ + 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: '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_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: '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 + fieldType: 'FormFieldRepresentation', + id: 'LEFT_FORM_FIELD_ID', + name: 'LEFT_FORM_FIELD_NAME', + type: 'text', + value: 'LEFT_FORM_FIELD_VALUE', + visibilityCondition: null, + isVisible: true } ], - 2: [ + 2: [ { - fieldType: 'FormFieldRepresentation', - id: 'RIGHT_FORM_FIELD_ID', - name: 'RIGHT_FORM_FIELD_NAME', - type: 'text', - value: 'RIGHT_FORM_FIELD_VALUE', - visibilityCondition: null, - isVisible: true + fieldType: 'FormFieldRepresentation', + id: 'RIGHT_FORM_FIELD_ID', + name: 'RIGHT_FORM_FIELD_NAME', + type: 'text', + value: 'RIGHT_FORM_FIELD_VALUE', + visibilityCondition: null, + isVisible: true } ] } } ], - variables: [ + variables: [ { - 'id': 'e621e8ff-42a6-499c-8121-33c7c35d8641', - 'name': 'age', - 'type': 'integer', - 'value': 11 + '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': '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' + '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 + '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 + '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 + '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 + '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 + '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 + '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 } } } @@ -477,368 +478,368 @@ export let complexVisibilityJsonVisible = { }] } }], - 'outcomes': [], - 'javascriptEvents': [], - 'className': '', - 'style': '', - 'customFieldTemplates': {}, - 'metadata': {}, - 'variables': [], - 'customFieldsValueInfo': {}, - 'gridsterForm': false + '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 + '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 + '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 + '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 + '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 + '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', - 'rightFormFieldId': '', - 'rightRestResponseId': '', - 'nextConditionOperator': 'and', - 'nextCondition': { - 'leftFormFieldId': 'label1', - 'leftRestResponseId': null, - 'operator': '!=', - 'rightValue': 'aaa', - 'rightFormFieldId': '', - 'rightRestResponseId': '', - 'nextConditionOperator': 'and', - 'nextCondition': { - 'leftFormFieldId': 'label2', - 'leftRestResponseId': null, - 'operator': '!empty', - 'rightValue': null, - 'rightFormFieldId': '', - 'rightRestResponseId': '', - 'nextConditionOperator': 'or', - 'nextCondition': { - 'leftFormFieldId': 'label3', - 'leftRestResponseId': null, - 'operator': 'empty', - 'rightValue': null, - 'rightFormFieldId': '', - 'rightRestResponseId': '', - 'nextConditionOperator': null, - 'nextCondition': 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', + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'and', + 'nextCondition': { + 'leftFormFieldId': 'label1', + 'leftRestResponseId': null, + 'operator': '!=', + 'rightValue': 'aaa', + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'and', + 'nextCondition': { + 'leftFormFieldId': 'label2', + 'leftRestResponseId': null, + 'operator': '!empty', + 'rightValue': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': 'or', + 'nextCondition': { + 'leftFormFieldId': 'label3', + 'leftRestResponseId': null, + 'operator': 'empty', + 'rightValue': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': null, + 'nextCondition': null } } } @@ -846,14 +847,155 @@ export let complexVisibilityJsonNotVisible = { }] } }], - 'outcomes': [], - 'javascriptEvents': [], - 'className': '', - 'style': '', - 'customFieldTemplates': {}, - 'metadata': {}, - 'variables': [], - 'customFieldsValueInfo': {}, - 'gridsterForm': false + 'outcomes': [], + 'javascriptEvents': [], + 'className': '', + 'style': '', + 'customFieldTemplates': {}, + 'metadata': {}, + 'variables': [], + 'customFieldsValueInfo': {}, + 'gridsterForm': false } }; + +export let tabVisibilityJsonMock = { + 'id': 45231, + 'name': 'visibility-form', + 'description': '', + 'version': 2, + 'lastUpdatedBy': 4255, + 'lastUpdatedByFullName': 'first last', + 'lastUpdated': '2019-08-26T08: 04: 02.091+0000', + 'stencilSetId': null, + 'referenceId': null, + 'tabs': [ + { + 'id': 'tab1', + 'title': 'tab1', + 'visibilityCondition': null + }, + { + 'id': 'tab2', + 'title': 'Tab2', + 'visibilityCondition': { + 'leftFormFieldId': 'label', + 'leftRestResponseId': null, + 'operator': '==', + 'rightValue': 'text', + 'rightType': null, + 'rightFormFieldId': '', + 'rightRestResponseId': '', + 'nextConditionOperator': '', + 'nextCondition': null + } + } + ], + 'formDefinition': { + 'fields': [ + { + 'fieldType': 'ContainerRepresentation', + 'id': '1566806229182', + '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': 'tab1', + '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': 'tab1', + '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': [ + + ] + } + } + ], + 'outcomes': [ + + ], + 'javascriptEvents': [ + + ], + 'className': '', + 'style': '', + 'customFieldTemplates': { + + }, + 'metadata': { + + }, + 'variables': [ + + ], + 'customFieldsValueInfo': { + + }, + 'gridsterForm': false + } + };