How to use the @alfresco/adf-core.CardViewTextItemModel function in @alfresco/adf-core

To help you get started, we’ve selected a few @alfresco/adf-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Alfresco / alfresco-ng2-components / lib / process-services-cloud / src / lib / task / task-header / components / task-header-cloud.component.ts View on Github external
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.PARENT_TASK_ID',
                    value: this.taskDetails.parentTaskId,
                    key: 'parentTaskId',
                    clickable: true
                }
            ),
            new CardViewDateItemModel(
                {
                    label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.END_DATE',
                    value: this.taskDetails.completedDate,
                    key: 'endDate',
                    format: this.dateFormat,
                    locale: this.dateLocale
                }
            ),
            new CardViewTextItemModel(
                {
                    label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.ID',
                    value: this.taskDetails.id,
                    key: 'id'
                }
            ),
            new CardViewTextItemModel(
                {
                    label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.DESCRIPTION',
                    value: this.taskDetails.description,
                    key: 'description',
                    default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.DESCRIPTION_DEFAULT'),
                    multiline: true,
                    editable: true
                }
            ),
github Activiti / activiti-modeling-app / src / app / process-editor / services / cardview-properties / assignee-cardview-property.ts View on Github external
export function createAssigneeProperty({ element }: FactoryProps) {
    return new CardViewTextItemModel({
        label: 'PROCESS_EDITOR.ELEMENT_PROPERTIES.ASSIGNEE',
        value: ElementHelper.getProperty(element, propertyName),
        key: propertyName,
        default: '',
        multiline: false,
        editable: true,
        data: { id: element.id }
    });
}
github Alfresco / alfresco-ng2-components / lib / content-services / src / lib / content-metadata / services / basic-properties.service.ts View on Github external
getProperties(node: Node) {

        const sizeInBytes = node.content ? node.content.sizeInBytes : '',
            mimeTypeName = node.content ? node.content.mimeTypeName : '',
            author = node.properties ? node.properties['cm:author'] : '',
            description = node.properties ? node.properties['cm:description'] : '',
            title = node.properties ? node.properties['cm:title'] : '';

        return [
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.NAME',
                value: node.name,
                key: 'name',
                editable: true
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.TITLE',
                value: title,
                key: 'properties.cm:title',
                editable: true
            }),
            new CardViewTextItemModel({
                label: 'CORE.METADATA.BASIC.CREATOR',
                value: node.createdByUser.displayName,
                key: 'createdByUser.displayName',
                editable: false
            }),
            new CardViewDateItemModel({
                label: 'CORE.METADATA.BASIC.CREATED_DATE',
                value: node.createdAt,
                key: 'createdAt',
                editable: false,
github Alfresco / alfresco-ng2-components / lib / process-services / src / lib / process-list / components / process-instance-header.component.ts View on Github external
default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.CREATED_BY_DEFAULT')
                }),
            new CardViewDateItemModel(
                {
                    label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED',
                    value: this.processInstance.started,
                    format: this.dateFormat,
                    locale: this.dateLocale,
                    key: 'created'
                }),
            new CardViewTextItemModel(
                {label: 'ADF_PROCESS_LIST.PROPERTIES.ID',
                value: this.processInstance.id,
                key: 'id'
            }),
            new CardViewTextItemModel(
                {label: 'ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION',
                value: this.processInstance.processDefinitionDescription,
                key: 'description',
                default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT')
            })
        ];
    }
github Activiti / activiti-modeling-app / src / app / process-editor / services / cardview-properties / id-cardview-property.ts View on Github external
export function createIdProperty({ element }: FactoryProps) {
    return new CardViewTextItemModel({
        label: 'PROCESS_EDITOR.ELEMENT_PROPERTIES.ID',
        value: ElementHelper.getProperty(element, propertyName),
        key: propertyName,
        default: '',
        multiline: false,
        editable: false
    });
}
github Alfresco / alfresco-ng2-components / lib / process-services / src / lib / task-list / components / task-header.component.ts View on Github external
key: 'priority',
                    editable: true
                }
            ),
            new CardViewDateItemModel(
                {
                    label: 'ADF_TASK_LIST.PROPERTIES.DUE_DATE',
                    value: this.taskDetails.dueDate,
                    key: 'dueDate',
                    default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.DUE_DATE_DEFAULT'),
                    editable: true,
                    format: this.dateFormat,
                    locale: this.dateLocale
                }
            ),
            new CardViewTextItemModel(
                {
                    label: 'ADF_TASK_LIST.PROPERTIES.CATEGORY',
                    value: this.taskDetails.category,
                    key: 'category',
                    default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.CATEGORY_DEFAULT')
                }
            ),
            new CardViewMapItemModel(
                {
                    label: 'ADF_TASK_LIST.PROPERTIES.PARENT_NAME',
                    value: parentInfoMap,
                    key: 'parentName',
                    default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.PARENT_NAME_DEFAULT'),
                    clickable: true
                }
            ),
github Activiti / activiti-modeling-app / src / app / process-editor / services / cardview-properties / process-name-cardview-property.ts View on Github external
export function createProcessNameProperty({ element }: FactoryProps) {
    return new CardViewTextItemModel({
        label: 'PROCESS_EDITOR.ELEMENT_PROPERTIES.NAME',
        value: sanitizeString(ElementHelper.getProperty(element, propertyName)),
        key: propertyName,
        default: '',
        multiline: false,
        editable: true,
        data: { id: element.id },
        validators: [new CardViewModelNameValidator('PROCESS_EDITOR.ELEMENT_PROPERTIES.INVALID_PROCESS_NAME')]
    });
}
github Alfresco / alfresco-ng2-components / demo-shell / src / app / components / card-view / card-view.component.ts View on Github external
editable: this.isEditable
            }),
            new CardViewSelectItemModel({
                label: 'CardView Select Item',
                value: 'one',
                options$: of([{ key: 'one', label: 'One' }, { key: 'two', label: 'Two' }]),
                key: 'select',
                editable: this.isEditable
            }),
            new CardViewMapItemModel({
                label: 'My map',
                value: new Map([['999', 'My Value']]),
                key: 'map',
                default: 'default map value'
            }),
            new CardViewTextItemModel({
                label: 'This is clickable ',
                value: 'click here',
                key: 'click',
                default: 'click here',
                editable: this.isEditable,
                clickable: true,
                clickCallBack: () => {
                    this.respondToCardClick();
                }
            }),
            new CardViewArrayItemModel({
                label: 'CardView Array of items',
                value: of([
                    { icon: 'directions_bike', value: 'Zlatan' },
                    { icon: 'directions_bike', value: 'Lionel Messi'},
                    { value: 'Mohamed', directions_bike: 'save'},