[ACS-3576] Map aspect actions with the aspect picker dropdown (#2713)

* rebased

* rebased

* unit tests

* linting

* publicApiCall

* renamed method formatAspects to parseAspectsToSelectOptions

* added getter cardViewStyle

* removing business logic from the ui component

* moved 'loadAspects()' to actions.service.ts

* preview fix

* removed duplicate
This commit is contained in:
Nikita Maliarchuk
2022-10-18 16:49:20 +02:00
committed by GitHub
parent 2d6375aad1
commit 77c5ac0c96
17 changed files with 162 additions and 63 deletions

View File

@@ -51,6 +51,12 @@ export const actionDefListMock: ActionDefinitionList = {
type: 'd:boolean',
multiValued: false,
mandatory: false
},
{
name: 'aspect-name',
type: 'd:qname',
multiValued: false,
mandatory: false
}
],
name: 'mock-action-1-definition',
@@ -85,6 +91,14 @@ const actionParam2TransformedMock: ActionParameterDefinitionTransformed = {
displayLabel: 'mock-action-parameter-boolean'
};
const actionParam3TransformedMock: ActionParameterDefinitionTransformed = {
name: 'aspect-name',
type: 'd:qname',
multiValued: false,
mandatory: false,
displayLabel: 'aspect-name'
};
const action1TransformedMock: ActionDefinitionTransformed = {
id: 'mock-action-1-definition',
name: 'mock-action-1-definition',
@@ -92,7 +106,7 @@ const action1TransformedMock: ActionDefinitionTransformed = {
title: 'Action 1 title',
applicableTypes: [],
trackStatus: false,
parameterDefinitions: [actionParam1TransformedMock, actionParam2TransformedMock]
parameterDefinitions: [actionParam1TransformedMock, actionParam2TransformedMock, actionParam3TransformedMock]
};
const action2TransformedMock: ActionDefinitionTransformed = {

View File

@@ -0,0 +1,41 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2020 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { Aspect } from '../model/aspect.model';
export const dummyAspects: Aspect[] = [
{
value: 'cm:aspect1',
label: 'Label 1'
},
{
value: 'cm:aspect2',
label: 'Label 2'
},
{
value: 'cm:aspect3',
label: 'Label 3'
}
];