mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-08-07 17:48:27 +00:00
[ACS-3859] Action parameter constraints into dropdown box (#2773)
* [ACS-3859] - functionality implementation * [ACS-3859] - unit tests * [ACS-3859] - small fix
This commit is contained in:
committed by
GitHub
parent
5ce4835e4c
commit
854fb28374
@@ -23,19 +23,43 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Aspect } from '../model/aspect.model';
|
||||
import { ActionParameterConstraint } from '../model/action-parameter-constraint.model';
|
||||
|
||||
export const dummyAspects: Aspect[] = [
|
||||
export const dummyConstraints: ActionParameterConstraint[] = [
|
||||
{
|
||||
value: 'cm:aspect1',
|
||||
label: 'Label 1'
|
||||
},
|
||||
{
|
||||
value: 'cm:aspect2',
|
||||
label: 'Label 2'
|
||||
},
|
||||
{
|
||||
value: 'cm:aspect3',
|
||||
label: 'Label 3'
|
||||
name: 'aspect-name',
|
||||
constraints: [
|
||||
{
|
||||
value: 'cm:aspect1',
|
||||
label: 'Label 1'
|
||||
},
|
||||
{
|
||||
value: 'cm:aspect2',
|
||||
label: 'Label 2'
|
||||
},
|
||||
{
|
||||
value: 'cm:aspect3',
|
||||
label: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
export const rawConstraints = {
|
||||
entry: {
|
||||
constraintValues: [
|
||||
{
|
||||
value: 'cm:aspect1',
|
||||
label: 'Label 1'
|
||||
},
|
||||
{
|
||||
value: 'cm:aspect2',
|
||||
label: 'Label 2'
|
||||
},
|
||||
{
|
||||
value: 'cm:aspect3'
|
||||
}
|
||||
],
|
||||
constraintName: 'ac-aspects'
|
||||
}
|
||||
};
|
@@ -23,10 +23,9 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ActionDefinitionList } from '@alfresco/js-api';
|
||||
import { ActionDefinitionTransformed, ActionParameterDefinitionTransformed, RuleAction } from '../model/rule-action.model';
|
||||
|
||||
export const actionDefListMock: ActionDefinitionList = {
|
||||
export const actionDefListMock = {
|
||||
list: {
|
||||
pagination: {
|
||||
count: 2,
|
||||
@@ -56,7 +55,8 @@ export const actionDefListMock: ActionDefinitionList = {
|
||||
name: 'aspect-name',
|
||||
type: 'd:qname',
|
||||
multiValued: false,
|
||||
mandatory: false
|
||||
mandatory: false,
|
||||
parameterConstraintName: 'ac-aspects'
|
||||
}
|
||||
],
|
||||
name: 'mock-action-1-definition',
|
||||
@@ -80,7 +80,8 @@ const actionParam1TransformedMock: ActionParameterDefinitionTransformed = {
|
||||
type: 'd:text',
|
||||
multiValued: false,
|
||||
mandatory: true,
|
||||
displayLabel: 'Mock action parameter text'
|
||||
displayLabel: 'Mock action parameter text',
|
||||
parameterConstraintName: ''
|
||||
};
|
||||
|
||||
const actionParam2TransformedMock: ActionParameterDefinitionTransformed = {
|
||||
@@ -88,7 +89,8 @@ const actionParam2TransformedMock: ActionParameterDefinitionTransformed = {
|
||||
type: 'd:boolean',
|
||||
multiValued: false,
|
||||
mandatory: false,
|
||||
displayLabel: 'mock-action-parameter-boolean'
|
||||
displayLabel: 'mock-action-parameter-boolean',
|
||||
parameterConstraintName: ''
|
||||
};
|
||||
|
||||
const actionParam3TransformedMock: ActionParameterDefinitionTransformed = {
|
||||
@@ -96,7 +98,8 @@ const actionParam3TransformedMock: ActionParameterDefinitionTransformed = {
|
||||
type: 'd:qname',
|
||||
multiValued: false,
|
||||
mandatory: false,
|
||||
displayLabel: 'aspect-name'
|
||||
displayLabel: 'aspect-name',
|
||||
parameterConstraintName: 'ac-aspects'
|
||||
};
|
||||
|
||||
const action1TransformedMock: ActionDefinitionTransformed = {
|
||||
|
Reference in New Issue
Block a user