mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-15815] Create Data Table widget (#8801)
* [AAE-15815] Create Data Table widget * [AAE-15815] Add check for corectness of column schema * fix mock name typo * improve method name * fix testing module config
This commit is contained in:
@@ -46,6 +46,7 @@ export class FormFieldTypes {
|
||||
static VIEWER: string = 'base-viewer';
|
||||
static DISPLAY_RICH_TEXT: string = 'display-rich-text';
|
||||
static JSON: string = 'json';
|
||||
static DATA_TABLE: string = 'data-table';
|
||||
|
||||
static READONLY_TYPES: string[] = [
|
||||
FormFieldTypes.HYPERLINK,
|
||||
|
@@ -28,6 +28,7 @@ import { FormFieldRule } from './form-field-rule';
|
||||
import { ProcessFormModel } from './process-form-model.interface';
|
||||
import { isNumberValue } from './form-field-utils';
|
||||
import { VariableConfig } from './form-field-variable-options';
|
||||
import { DataColumn } from '../../../../datatable/data/data-column.model';
|
||||
|
||||
// Maps to FormFieldRepresentation
|
||||
export class FormFieldModel extends FormWidgetModel {
|
||||
@@ -83,6 +84,7 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
groupsRestriction: string[];
|
||||
leftLabels: boolean = false;
|
||||
variableConfig: VariableConfig;
|
||||
schemaDefinition: DataColumn[];
|
||||
|
||||
// container model members
|
||||
numberOfColumns: number = 1;
|
||||
@@ -197,6 +199,7 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
this.selectLoggedUser = json.selectLoggedUser;
|
||||
this.groupsRestriction = json.groupsRestriction?.groups;
|
||||
this.variableConfig = json.variableConfig;
|
||||
this.schemaDefinition = json.schemaDefinition;
|
||||
|
||||
if (json.placeholder && json.placeholder !== '' && json.placeholder !== 'null') {
|
||||
this.placeholder = json.placeholder;
|
||||
|
@@ -47,6 +47,7 @@
|
||||
"REQUIRED": "This is a required field",
|
||||
"REST_API_FAILED": "The server `{{ hostname }}` is not reachable",
|
||||
"VARIABLE_DROPDOWN_OPTIONS_FAILED": "There was a problem loading dropdown elements. Please contact administrator.",
|
||||
"DATA_TABLE_LOAD_FAILED": "There was a problem loading table elements. Please contact administrator.",
|
||||
"FILE_NAME": "File Name",
|
||||
"NO_FILE_ATTACHED": "No file attached",
|
||||
"VALIDATOR": {
|
||||
|
Reference in New Issue
Block a user