[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:
Tomasz Gnyp
2023-08-09 01:31:39 +02:00
committed by GitHub
parent 4f2b3bce3c
commit 1f96c3452c
11 changed files with 592 additions and 1 deletions

View File

@@ -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,

View File

@@ -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;

View File

@@ -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": {