mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
ACS-8610: cleanup demo shell protractor tests (#10148)
This commit is contained in:
@@ -1,285 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export const checkboxVisibilityFormJson = {
|
||||
formRepresentation: {
|
||||
id: 'form-fb9245f6-1132-47bd-b0b3-823bb85002da',
|
||||
name: 'test',
|
||||
description: '',
|
||||
version: 0,
|
||||
standalone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: 'f3445185-b9af-41f7-a836-3b5712abeb0f',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'CheckboxFieldField',
|
||||
name: 'CheckboxFieldField',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'textOne',
|
||||
operator: '==',
|
||||
rightValue: 'textTwo',
|
||||
rightType: 'field',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxFieldVariable',
|
||||
name: 'CheckboxFieldVariable',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'textOne',
|
||||
operator: '==',
|
||||
rightValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||
rightType: 'variable',
|
||||
nextConditionOperator: ''
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxFieldValue',
|
||||
name: 'CheckboxFieldValue',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'textOne',
|
||||
operator: '==',
|
||||
rightValue: 'showCheckbox',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxVariableValue',
|
||||
name: 'CheckboxVariableValue',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'variable',
|
||||
leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||
operator: '==',
|
||||
rightValue: 'showCheckbox',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxVariableVariable',
|
||||
name: 'CheckboxVariableVariable',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'variable',
|
||||
leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||
operator: '==',
|
||||
rightValue: '0e67eb99-46f7-424e-9a78-6df0faa5844d',
|
||||
rightType: 'variable',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxVariableField',
|
||||
name: 'CheckboxVariableField',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'variable',
|
||||
leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||
operator: '==',
|
||||
rightValue: 'textOne',
|
||||
rightType: 'field',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: [
|
||||
{
|
||||
id: 'textOne',
|
||||
name: 'textOne',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'textTwo',
|
||||
name: 'textTwo',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||
name: 'varString1',
|
||||
type: 'string',
|
||||
value: 'showCheckbox'
|
||||
},
|
||||
{
|
||||
id: '0e67eb99-46f7-424e-9a78-6df0faa5844d',
|
||||
name: 'varString2',
|
||||
type: 'string',
|
||||
value: 'showCheckbox'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const multipleCheckboxVisibilityFormJson = {
|
||||
formRepresentation: {
|
||||
id: 'form-589a5b5d-da10-4af7-a5be-7dad2482dc19',
|
||||
name: 'newtestform',
|
||||
description: '',
|
||||
version: 0,
|
||||
standalone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: '438a9089-2641-498d-8e84-ffad51ea8379',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'Checkbox1',
|
||||
name: 'Checkbox1',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'Checkbox2',
|
||||
operator: '!=',
|
||||
rightValue: 'Checkbox3',
|
||||
rightType: 'field',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Checkbox2',
|
||||
name: 'Checkbox2',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Checkbox3',
|
||||
name: 'Checkbox3',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,179 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export const displayValueTextJson = {
|
||||
formRepresentation : {
|
||||
id : 'form-340a2672-429b-454f-9bb1-7b4d7362bb89' ,
|
||||
name : 'display-one' ,
|
||||
description : '',
|
||||
version : 0,
|
||||
standAlone : true,
|
||||
formDefinition : {
|
||||
tabs : [],
|
||||
fields : [
|
||||
{
|
||||
id : 'ce6459d8-08c8-4424-af02-6117a20548c9' ,
|
||||
name : 'Label' ,
|
||||
type : 'container' ,
|
||||
tab : null,
|
||||
numberOfColumns : 2,
|
||||
fields : {
|
||||
1 : [
|
||||
{
|
||||
id : 'TextOne' ,
|
||||
name : 'TextOne' ,
|
||||
type : 'text' ,
|
||||
required : false,
|
||||
colspan : 1,
|
||||
placeholder : null,
|
||||
minLength : 0,
|
||||
maxLength : 0,
|
||||
regexPattern : null,
|
||||
visibilityCondition : null,
|
||||
params : {
|
||||
existingColspan : 1,
|
||||
maxColspan : 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'TextTwo' ,
|
||||
name : 'TextTwo' ,
|
||||
type : 'text',
|
||||
required : false,
|
||||
colspan : 1,
|
||||
placeholder : null,
|
||||
minLength : 0,
|
||||
maxLength : 0,
|
||||
regexPattern : null,
|
||||
visibilityCondition : null,
|
||||
params : {
|
||||
existingColspan : 1,
|
||||
maxColspan : 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'DisplayValueNoCondition' ,
|
||||
name : 'Display value - NoCondition' ,
|
||||
type : 'readonly' ,
|
||||
value : 'No cats' ,
|
||||
colspan : 1,
|
||||
visibilityCondition : null,
|
||||
params : {
|
||||
existingColspan : 1,
|
||||
maxColspan : 2,
|
||||
field : {
|
||||
id : '12f8a718-1e79-4b1d-96f2-7f1a9b15a477',
|
||||
name : 'NoCondition',
|
||||
type : 'string'
|
||||
},
|
||||
responseVariable : true
|
||||
}
|
||||
}
|
||||
],
|
||||
2 : [
|
||||
{
|
||||
id : 'DisplayValueSingleCondition' ,
|
||||
name : 'Display value - SingleCondition' ,
|
||||
type : 'readonly' ,
|
||||
value : 'cat' ,
|
||||
colspan : 1,
|
||||
visibilityCondition : {
|
||||
leftType : 'field',
|
||||
leftValue : 'TextOne' ,
|
||||
operator : '==',
|
||||
rightValue : 'cat' ,
|
||||
rightType : 'value',
|
||||
nextConditionOperator : '' ,
|
||||
nextCondition : null
|
||||
},
|
||||
params : {
|
||||
existingColspan : 1,
|
||||
maxColspan : 2,
|
||||
field : {
|
||||
id : '928c5dce-0ee4-4de3-8775-975eda5a4543' ,
|
||||
name : 'StringTextDisplayed' ,
|
||||
type : 'string'
|
||||
},
|
||||
responseVariable : true
|
||||
}
|
||||
},
|
||||
{
|
||||
id : 'DisplayValueMultipleCondition' ,
|
||||
name : 'Display value - MultipleConditions' ,
|
||||
type : 'readonly' ,
|
||||
value : 'more cats' ,
|
||||
colspan : 1,
|
||||
visibilityCondition : {
|
||||
leftType : 'field',
|
||||
leftValue : 'TextOne',
|
||||
operator : '==',
|
||||
rightValue : 'cat',
|
||||
rightType : 'value' ,
|
||||
nextConditionOperator : 'and' ,
|
||||
nextCondition : {
|
||||
leftType : 'field' ,
|
||||
leftValue : 'TextTwo' ,
|
||||
operator : '!=',
|
||||
rightValue : 'cat' ,
|
||||
rightType : 'value' ,
|
||||
nextConditionOperator :'',
|
||||
nextCondition : null
|
||||
}
|
||||
},
|
||||
params : {
|
||||
existingColspan : 1,
|
||||
maxColspan : 2,
|
||||
field : {
|
||||
id : 'c74e945f-80dd-4adf-8393-fd644772b4a4' ,
|
||||
name : 'MultipleConditions' ,
|
||||
type : 'string'
|
||||
},
|
||||
responseVariable : true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes : [],
|
||||
metadata : {},
|
||||
variables : [
|
||||
{
|
||||
id : '928c5dce-0ee4-4de3-8775-975eda5a4543' ,
|
||||
name : 'SingleCondition' ,
|
||||
type : 'string',
|
||||
value : 'cat'
|
||||
},
|
||||
{
|
||||
id : 'c74e945f-80dd-4adf-8393-fd644772b4a4',
|
||||
name : 'MultipleConditions',
|
||||
type : 'string',
|
||||
value : 'more cats'
|
||||
},
|
||||
{
|
||||
id : '12f8a718-1e79-4b1d-96f2-7f1a9b15a477',
|
||||
name : 'NoCondition',
|
||||
type : 'string',
|
||||
value : 'No cats'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,253 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export const dropdownVisibilityFormFieldJson = {
|
||||
formRepresentation: {
|
||||
id: 'form-3070ee8d-34d3-4c5a-9dd0-6b244f65d300',
|
||||
name: 'DropDownWidgetForm1',
|
||||
description: 'Simple dropdown',
|
||||
version: 0,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [{
|
||||
id: '5e180610-1478-4f80-ad80-e4c57a18fbff',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [{
|
||||
id: 'textFour',
|
||||
name: 'textFour',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'numberOne',
|
||||
name: 'numberOne',
|
||||
type: 'integer',
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minValue: null,
|
||||
maxValue: null,
|
||||
required: false,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'amountOne',
|
||||
name: 'amountOne',
|
||||
type: 'amount',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: '123',
|
||||
minValue: null,
|
||||
maxValue: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
},
|
||||
enableFractions: false,
|
||||
currency: '$'
|
||||
}
|
||||
],
|
||||
2: [{
|
||||
id: 'dropdownOne',
|
||||
name: 'dropdownOne',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'manual',
|
||||
options: [{
|
||||
id: 'empty',
|
||||
name: 'Choose one...'
|
||||
},
|
||||
{
|
||||
id: 'option_2',
|
||||
name: '1'
|
||||
},
|
||||
{
|
||||
id: 'option_3',
|
||||
name: '2'
|
||||
}
|
||||
],
|
||||
restUrl: null,
|
||||
restResponsePath: null,
|
||||
restIdProperty: null,
|
||||
restLabelProperty: null,
|
||||
visibilityCondition: {
|
||||
leftFormFieldId: 'textFour',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: 'text1',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'numberOne',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: '11',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'amountOne',
|
||||
leftRestResponseId: '',
|
||||
operator: '!=',
|
||||
rightValue: 90,
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}]
|
||||
}
|
||||
}],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const dropdownVisibilityFormVariableJson = {
|
||||
formRepresentation: {
|
||||
id: 'form-8fe70790-ba51-4c46-8ef0-efc9044ed51c',
|
||||
name: 'SampleDropdown',
|
||||
description: '',
|
||||
version: 0,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [{
|
||||
id: 'fde2c0bd-dbd6-4946-945e-4ab20aa1633a',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [{
|
||||
id: 'dropdownOne',
|
||||
name: 'Dropdown',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'manual',
|
||||
options: [{
|
||||
id: 'empty',
|
||||
name: 'Choose one...'
|
||||
}, {
|
||||
id: 'option_2',
|
||||
name: '1'
|
||||
}, {
|
||||
id: 'option_3',
|
||||
name: '2'
|
||||
}],
|
||||
restUrl: null,
|
||||
restResponsePath: null,
|
||||
restIdProperty: null,
|
||||
restLabelProperty: null,
|
||||
visibilityCondition: {
|
||||
leftType: 'variable',
|
||||
leftValue: 'name',
|
||||
operator: '==',
|
||||
rightValue: 'value1',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftType: 'variable',
|
||||
leftValue: 'number',
|
||||
operator: '==',
|
||||
rightValue: 11,
|
||||
rightType: 'value',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftType: 'variable',
|
||||
leftValue: 'yesOrNo',
|
||||
operator: '==',
|
||||
rightValue: 'true',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftType: 'variable',
|
||||
leftValue: 'today',
|
||||
operator: '!=',
|
||||
rightValue: '2019-08-06',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}],
|
||||
2: []
|
||||
}
|
||||
}],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [{
|
||||
id: '74cdd5d3-120b-4926-995e-89e929a16c8f',
|
||||
name: 'name',
|
||||
type: 'string',
|
||||
value: 'value1'
|
||||
}, {
|
||||
id: '4a46531a-c217-4c08-99bb-c510b7c18e63',
|
||||
name: 'number',
|
||||
type: 'integer',
|
||||
value: 11
|
||||
}, {
|
||||
id: 'c469fbce-4039-4817-9d1c-5102ccc2bd26',
|
||||
name: 'yesOrNo',
|
||||
type: 'boolean',
|
||||
value: true
|
||||
}, {
|
||||
id: '36aa1031-3bbe-48f2-9d5d-465bf4158cb9',
|
||||
name: 'today',
|
||||
type: 'date',
|
||||
value: '2019-05-13'
|
||||
}]
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,592 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export const multipleVisibilityFormJson = {
|
||||
formRepresentation: {
|
||||
id: 'form-417ec60f-59ec-4990-a3b4-674f2c90af8a',
|
||||
name: 'testtesttest',
|
||||
description: '',
|
||||
version: 0,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: '693934b1-fb52-45db-8ec0-f0d0f0accbed',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 6,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'CheckboxReq',
|
||||
name: 'CheckboxReq',
|
||||
type: 'boolean',
|
||||
required: true,
|
||||
colspan: 1,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxNotReq',
|
||||
name: 'CheckboxNotReq',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxColspan',
|
||||
name: 'CheckboxColspan',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 2,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxBasicFieldValue',
|
||||
name: 'CheckboxBasicFieldValue',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'textone',
|
||||
operator: '==',
|
||||
rightValue: 'aaa',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: 'and-not',
|
||||
nextCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'texttwo',
|
||||
operator: '==',
|
||||
rightValue: 'aaa',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxBasicFieldVariable',
|
||||
name: 'CheckboxBasicFieldVariable',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftFormFieldId: 'textOne',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxBasicVariableField',
|
||||
name: 'CheckboxBasicVariableField',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftFormFieldId: '',
|
||||
leftRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||
operator: '==',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: 'textOne',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'CheckboxMultiple',
|
||||
name: 'CheckboxMultiple',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftFormFieldId: 'textOne',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: 'aaa',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textTwo',
|
||||
leftRestResponseId: '',
|
||||
operator: '!=',
|
||||
rightValue: 'aaa',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'checkboxone',
|
||||
name: 'CheckboxOne',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftFormFieldId: 'textOne',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: 'aaa',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textTwo',
|
||||
leftRestResponseId: '',
|
||||
operator: '!=',
|
||||
rightValue: 'aaa',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'and-not',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textThree',
|
||||
leftRestResponseId: '',
|
||||
operator: 'empty',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'or',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textfour',
|
||||
leftRestResponseId: '',
|
||||
operator: '!empty',
|
||||
rightValue: 'aaa',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'or-not',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textfive',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: 'aaa',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'checkboxtworeq',
|
||||
name: 'CheckboxTwoReq',
|
||||
type: 'boolean',
|
||||
required: true,
|
||||
colspan: 2,
|
||||
visibilityCondition: {
|
||||
leftFormFieldId: '',
|
||||
leftRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||
operator: '==',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: 'textTwo',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftFormFieldId: '',
|
||||
leftRestResponseId: '08f66ebb-1e5c-4ae4-a8cc-ec9c674d1e40',
|
||||
operator: '!=',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: 'textOne',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'and-not',
|
||||
nextCondition: {
|
||||
leftFormFieldId: '',
|
||||
leftRestResponseId: '888786b1-e948-4e7a-9caa-deb2583d222f',
|
||||
operator: '!=',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: 'textThree',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'or',
|
||||
nextCondition: {
|
||||
leftFormFieldId: '',
|
||||
leftRestResponseId: '5007cf47-aa68-42c0-b1ab-a98f0dff6bdc',
|
||||
operator: '!=',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: 'textfour',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: 'or-not',
|
||||
nextCondition: {
|
||||
leftFormFieldId: '',
|
||||
leftRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||
operator: '==',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: 'textfive',
|
||||
rightRestResponseId: '',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'checkboxthree',
|
||||
name: 'CheckboxThree',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
visibilityCondition: {
|
||||
leftFormFieldId: 'textOne',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||
nextConditionOperator: 'and',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textTwo',
|
||||
leftRestResponseId: '',
|
||||
operator: '!=',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '08f66ebb-1e5c-4ae4-a8cc-ec9c674d1e40',
|
||||
nextConditionOperator: 'and-not',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textThree',
|
||||
leftRestResponseId: '',
|
||||
operator: '!=',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '888786b1-e948-4e7a-9caa-deb2583d222f',
|
||||
nextConditionOperator: 'or',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textfour',
|
||||
leftRestResponseId: '',
|
||||
operator: '!=',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '5007cf47-aa68-42c0-b1ab-a98f0dff6bdc',
|
||||
nextConditionOperator: 'or-not',
|
||||
nextCondition: {
|
||||
leftFormFieldId: 'textfive',
|
||||
leftRestResponseId: '',
|
||||
operator: '==',
|
||||
rightValue: '',
|
||||
rightType: null,
|
||||
rightFormFieldId: '',
|
||||
rightRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: [
|
||||
{
|
||||
id: 'textOne',
|
||||
name: 'TextOne',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
3: [
|
||||
{
|
||||
id: 'textTwo',
|
||||
name: 'TextTwo',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
4: [
|
||||
{
|
||||
id: 'textThree',
|
||||
name: 'TextThree',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
5: [
|
||||
{
|
||||
id: 'textfour',
|
||||
name: 'TextFour',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
6: [
|
||||
{
|
||||
id: 'textfive',
|
||||
name: 'TextFive',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||
name: 'vstring',
|
||||
type: 'string',
|
||||
value: 'aaa'
|
||||
},
|
||||
{
|
||||
id: '08f66ebb-1e5c-4ae4-a8cc-ec9c674d1e40',
|
||||
name: 'vint',
|
||||
type: 'integer',
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
id: '888786b1-e948-4e7a-9caa-deb2583d222f',
|
||||
name: 'vbool',
|
||||
type: 'boolean',
|
||||
value: true
|
||||
},
|
||||
{
|
||||
id: '5007cf47-aa68-42c0-b1ab-a98f0dff6bdc',
|
||||
name: 'vdate',
|
||||
type: 'date',
|
||||
value: '2019-05-10'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const multipleTextVisibilityFormJson = {
|
||||
formRepresentation: {
|
||||
id: 'form-1fc64874-5fa9-4eb0-be06-61abd51abef7',
|
||||
name: 'form2',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: 'e6071f44-50cf-4b51-8b69-651df3ca4509',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'textOne',
|
||||
name: 'Text1',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'textTwo',
|
||||
operator: '!=',
|
||||
rightValue: 'test',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: 'or-not',
|
||||
nextCondition: {
|
||||
leftType: 'field',
|
||||
leftValue: 'textThree',
|
||||
operator: '==',
|
||||
rightValue: 'test',
|
||||
rightType: 'value',
|
||||
nextConditionOperator: '',
|
||||
nextCondition: null
|
||||
}
|
||||
},
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: [
|
||||
{
|
||||
id: 'textTwo',
|
||||
name: 'Text2',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
id: '4f086395-6f63-47c7-aeda-f315ae5b3891',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'textThree',
|
||||
name: 'Text3',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,417 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
export const peopleSingleModeFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-d74a4136-af83-4333-ac37-a6a74ac7aa84',
|
||||
name: 'singlepeople',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: '7c9ea025-4ae6-4a5a-9184-da8f7d5c5543',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'PeopleSingleMode',
|
||||
name: 'People',
|
||||
type: 'people',
|
||||
readOnly: false,
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'single',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const peopleMultipleModeFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-0fec4293-a33a-4408-923c-ba2d0645459c',
|
||||
name: 'people',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: '44e485d4-c286-425a-b488-3fda1707d319',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'PeopleMultipleMode',
|
||||
name: 'People',
|
||||
type: 'people',
|
||||
readOnly: false,
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'multiple',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||
name: 'people',
|
||||
type: 'string',
|
||||
value: 'user1'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const peopleRequiredFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-0fec4293-a33a-4408-923c-ba2d0645459c',
|
||||
name: 'people',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: '44e485d4-c286-425a-b488-3fda1707d319',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'PeopleRequired',
|
||||
name: 'People',
|
||||
type: 'people',
|
||||
readOnly: false,
|
||||
required: true,
|
||||
colspan: 1,
|
||||
optionType: 'single',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||
name: 'people',
|
||||
type: 'string',
|
||||
value: 'user1'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const groupSingleModeFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-0fec4293-a33a-4408-923c-ba2d0645459c',
|
||||
name: 'people',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: 'abccf2c9-b526-45c7-abd4-b969bdf8ce15',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'GroupSingleMode',
|
||||
name: 'Group of people',
|
||||
type: 'functional-group',
|
||||
readOnly: false,
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'single',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||
name: 'people',
|
||||
type: 'string',
|
||||
value: 'user1'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const groupMultipleModeFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-0fec4293-a33a-4408-923c-ba2d0645459c',
|
||||
name: 'people',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: 'abccf2c9-b526-45c7-abd4-b969bdf8ce15',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'GroupMultipleMode',
|
||||
name: 'Group of people',
|
||||
type: 'functional-group',
|
||||
readOnly: false,
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'multiple',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||
name: 'people',
|
||||
type: 'string',
|
||||
value: 'user1'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const groupRequiredFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-0fec4293-a33a-4408-923c-ba2d0645459c',
|
||||
name: 'people',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: 'abccf2c9-b526-45c7-abd4-b969bdf8ce15',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'GroupRequired',
|
||||
name: 'Group of people',
|
||||
type: 'functional-group',
|
||||
readOnly: false,
|
||||
required: true,
|
||||
colspan: 1,
|
||||
optionType: 'single',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||
name: 'people',
|
||||
type: 'string',
|
||||
value: 'user1'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const peopleReadOnlyFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-0fec4293-a33a-4408-923c-ba2d0645459c',
|
||||
name: 'people',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: '44e485d4-c286-425a-b488-3fda1707d319',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'PeopleReadOnly',
|
||||
name: 'People',
|
||||
type: 'people',
|
||||
readOnly: true,
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'single',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||
name: 'people',
|
||||
type: 'string',
|
||||
value: 'user1'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const groupReadOnlyFormMock = {
|
||||
formRepresentation: {
|
||||
id: 'form-0fec4293-a33a-4408-923c-ba2d0645459c',
|
||||
name: 'people',
|
||||
description: '',
|
||||
version: 0,
|
||||
standAlone: true,
|
||||
formDefinition: {
|
||||
tabs: [],
|
||||
fields: [
|
||||
{
|
||||
id: 'abccf2c9-b526-45c7-abd4-b969bdf8ce15',
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: null,
|
||||
numberOfColumns: 2,
|
||||
fields: {
|
||||
1: [
|
||||
{
|
||||
id: 'GroupReadOnly',
|
||||
name: 'Group of people',
|
||||
type: 'functional-group',
|
||||
readOnly: true,
|
||||
required: false,
|
||||
colspan: 1,
|
||||
optionType: 'single',
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
}
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables: [
|
||||
{
|
||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||
name: 'people',
|
||||
type: 'string',
|
||||
value: 'user1'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1,242 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
const createField = (id = 'TextTwo', name = 'TextTwo') => ({
|
||||
id,
|
||||
name,
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
});
|
||||
|
||||
const createFieldDefinition = (
|
||||
id = 'dcde7e13-2444-48bc-ab30-32902cea549e',
|
||||
tabName = '71da814d-5580-4f1f-972a-8089253aeded',
|
||||
fields = {
|
||||
1: [createField()],
|
||||
2: []
|
||||
}
|
||||
) => ({
|
||||
id,
|
||||
name: 'Label',
|
||||
type: 'container',
|
||||
tab: tabName,
|
||||
numberOfColumns: 2,
|
||||
fields
|
||||
});
|
||||
|
||||
const fieldDefinition1 = createFieldDefinition();
|
||||
const fieldDefinition2 = createFieldDefinition('1308e433-08ce-4448-a62a-0accc1187d15', '0e538a28-f8d6-4cb8-ae93-dbfb2efdf3b1', {
|
||||
1: [createField('TextOne', 'TextOne')],
|
||||
2: []
|
||||
});
|
||||
const fieldDefinition3 = createFieldDefinition('df452297-d0e8-4406-b9d3-10842033549d', '442eea0b-65f9-484e-b37f-f5a91d5e1f21', {
|
||||
1: [createField('TextOne', 'TextOne')],
|
||||
2: [createField('TextThree', 'TextThree')]
|
||||
});
|
||||
|
||||
const fieldsDefinitions1 = [fieldDefinition1, fieldDefinition2];
|
||||
const fieldsDefinitions2 = [fieldDefinition1, fieldDefinition3];
|
||||
|
||||
const createVisibilityCondition = (
|
||||
leftType = 'field',
|
||||
leftValue = 'TextOne',
|
||||
nextCondition?: any,
|
||||
rightValue = 'showTab',
|
||||
rightType = 'value',
|
||||
operator = '=='
|
||||
) => ({
|
||||
leftType,
|
||||
leftValue,
|
||||
operator,
|
||||
rightValue,
|
||||
rightType,
|
||||
nextConditionOperator: nextCondition ? 'and' : '',
|
||||
nextCondition
|
||||
});
|
||||
|
||||
const createTab = (
|
||||
id = '71da814d-5580-4f1f-972a-8089253aeded',
|
||||
title = 'tabBasicFieldValue',
|
||||
visibilityCondition = createVisibilityCondition('field', 'TextOne', null)
|
||||
) => ({
|
||||
id,
|
||||
title,
|
||||
visibilityCondition
|
||||
});
|
||||
|
||||
const createTabVisibilityJson = (
|
||||
tabs = [createTab(), createTab('442eea0b-65f9-484e-b37f-f5a91d5e1f21', 'tabWithFields', null)],
|
||||
fields = [
|
||||
createFieldDefinition(),
|
||||
createFieldDefinition('df452297-d0e8-4406-b9d3-10842033549d', '442eea0b-65f9-484e-b37f-f5a91d5e1f21', {
|
||||
1: [
|
||||
{
|
||||
id: 'TextOne',
|
||||
name: 'TextOne',
|
||||
type: 'text',
|
||||
required: false,
|
||||
colspan: 1,
|
||||
placeholder: null,
|
||||
minLength: 0,
|
||||
maxLength: 0,
|
||||
regexPattern: null,
|
||||
visibilityCondition: null,
|
||||
params: {
|
||||
existingColspan: 1,
|
||||
maxColspan: 2
|
||||
}
|
||||
}
|
||||
],
|
||||
2: []
|
||||
})
|
||||
],
|
||||
variables = []
|
||||
) => ({
|
||||
formRepresentation: {
|
||||
id: 'form-3aff57d3-62af-4adf-9b14-1d8f44a28077',
|
||||
name: 'tabvisibility',
|
||||
description: '',
|
||||
version: 0,
|
||||
standalone: true,
|
||||
formDefinition: {
|
||||
tabs,
|
||||
fields,
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
variables
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export const tabFieldValueVisibilityJson = createTabVisibilityJson();
|
||||
|
||||
export const tabVarValueVisibilityJson = createTabVisibilityJson(
|
||||
[createTab('71da814d-5580-4f1f-972a-8089253aeded', 'tabBasicVarValue', createVisibilityCondition('variable', 'stringVar'))],
|
||||
[fieldDefinition1],
|
||||
[
|
||||
{
|
||||
id: '803269e6-a568-40e2-aec3-75ad2f411688',
|
||||
name: 'stringVar',
|
||||
type: 'string',
|
||||
value: 'showTab'
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
export const tabVarFieldVisibilityJson = createTabVisibilityJson(
|
||||
[
|
||||
createTab(
|
||||
'71da814d-5580-4f1f-972a-8089253aeded',
|
||||
'tabBasicVarField',
|
||||
createVisibilityCondition('variable', 'stringVar', undefined, 'TextOne', 'field')
|
||||
),
|
||||
createTab('0e538a28-f8d6-4cb8-ae93-dbfb2efdf3b1', 'tabWithFields', null)
|
||||
],
|
||||
fieldsDefinitions1,
|
||||
[
|
||||
{
|
||||
id: '803269e6-a568-40e2-aec3-75ad2f411688',
|
||||
name: 'stringVar',
|
||||
type: 'string',
|
||||
value: 'showTab'
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
export const tabFieldFieldVisibilityJson = createTabVisibilityJson(
|
||||
[
|
||||
createTab(
|
||||
'71da814d-5580-4f1f-972a-8089253aeded',
|
||||
'tabBasicFieldField',
|
||||
createVisibilityCondition('field', 'TextThree', undefined, 'TextOne', 'field')
|
||||
),
|
||||
createTab('442eea0b-65f9-484e-b37f-f5a91d5e1f21', 'tabWithFields', null)
|
||||
],
|
||||
fieldsDefinitions2
|
||||
);
|
||||
|
||||
export const tabFieldVarVisibilityJson = createTabVisibilityJson(
|
||||
[
|
||||
createTab(
|
||||
'71da814d-5580-4f1f-972a-8089253aeded',
|
||||
'tabBasicVarField',
|
||||
createVisibilityCondition('field', 'TextOne', undefined, 'stringVar', 'variable')
|
||||
),
|
||||
createTab('0e538a28-f8d6-4cb8-ae93-dbfb2efdf3b1', 'tabWithFields', null)
|
||||
],
|
||||
fieldsDefinitions1,
|
||||
[
|
||||
{
|
||||
id: '803269e6-a568-40e2-aec3-75ad2f411688',
|
||||
name: 'stringVar',
|
||||
type: 'string',
|
||||
value: 'showTab'
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
export const tabVarVarVisibilityJson = createTabVisibilityJson(
|
||||
[
|
||||
createTab(
|
||||
'ef512cb3-0c41-4d12-84ef-a7ef8f0b111a',
|
||||
'tabBasicVarVar',
|
||||
createVisibilityCondition('variable', 'showTabOne', undefined, 'showTabTwo', 'variable')
|
||||
)
|
||||
],
|
||||
[
|
||||
createFieldDefinition('6eeb9e54-e51d-44f3-9557-503308f07361', 'ef512cb3-0c41-4d12-84ef-a7ef8f0b111a', {
|
||||
1: [createField('TextOne', 'TextOne')],
|
||||
2: []
|
||||
})
|
||||
],
|
||||
[
|
||||
{
|
||||
id: 'b116df99-f6b5-45f8-b48c-15b74f7f1c92',
|
||||
name: 'showTabOne',
|
||||
type: 'string',
|
||||
value: 'showTab'
|
||||
},
|
||||
{
|
||||
id: '6e3e88ab-848c-4f48-8326-a404d1427f60',
|
||||
name: 'showTabTwo',
|
||||
type: 'string',
|
||||
value: 'showTab'
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
export const tabNextOperatorsVisibilityJson = createTabVisibilityJson(
|
||||
[
|
||||
createTab(
|
||||
'71da814d-5580-4f1f-972a-8089253aeded',
|
||||
'tabNextOperators',
|
||||
createVisibilityCondition('field', 'TextOne', createVisibilityCondition('field', 'TextThree', null, 'showTab', 'value', '!='))
|
||||
),
|
||||
createTab('442eea0b-65f9-484e-b37f-f5a91d5e1f21', 'tabWithFields', null)
|
||||
],
|
||||
fieldsDefinitions2
|
||||
);
|
||||
Reference in New Issue
Block a user