Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
}
),
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 }
});
}
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,
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')
})
];
}
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
});
}
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
}
),
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')]
});
}
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'},