Skip to content

Commit

Permalink
feat(material/form-builder): add support for table fields
Browse files Browse the repository at this point in the history
  • Loading branch information
trik committed Mar 31, 2022
1 parent c020118 commit 662d6a1
Show file tree
Hide file tree
Showing 14 changed files with 310 additions and 1,067 deletions.
1 change: 1 addition & 0 deletions projects/core/forms/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export * from './utils/fields/is-custom-field-with-choices';
export * from './utils/fields/is-field-with-choices';
export * from './utils/fields/is-number-field';
export * from './utils/fields/is-range-field';
export * from './utils/fields/is-table-field';
export * from './utils/fields-instances/create-field-instance';
export * from './utils/fields-instances/create-field-with-choices-instance';
export * from './utils/forms/build-form-string-identifier';
Expand Down
3 changes: 2 additions & 1 deletion projects/core/forms/src/utils/fields/is-number-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
*/

import {AjfField} from '../../interface/fields/field';
import {AjfNumberField} from '../../interface/fields/number-field';
import {AjfFieldType} from '../../interface/fields/field-type';

/**
* It is true if the field type is Number.
*/
export function isNumberField(field: AjfField): boolean {
export function isNumberField(field: AjfField): field is AjfNumberField {
return field.fieldType === AjfFieldType.Number;
}
3 changes: 2 additions & 1 deletion projects/core/forms/src/utils/fields/is-table-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
*/

import {AjfField} from '../../interface/fields/field';
import {AjfTableField} from '../../interface/fields/table-field';
import {AjfFieldType} from '../../interface/fields/field-type';

/**
* It is true if the field type is Table.
*/
export function isTableField(field: AjfField): boolean {
export function isTableField(field: AjfField): field is AjfTableField {
return field.fieldType === AjfFieldType.Table;
}
2 changes: 2 additions & 0 deletions projects/core/transloco/src/eng.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,6 @@ export const ENG: Translation = {
'Choose type of Chart': 'Choose type of Chart',
'Labels': 'Labels',
'Border width': 'Border width',
'Hide empty rows': 'Hide empty rows',
'Table definition': 'Table definition',
};
2 changes: 2 additions & 0 deletions projects/core/transloco/src/esp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,6 @@ export const ESP: Translation = {
'Choose type of Chart': 'Elija el tipo de gráfico',
'Labels': 'Etiquetas',
'Border width': 'Ancho del borde',
'Hide empty rows': 'Ocultar filas vacías',
'Table definition': 'Definición de la tabla',
};
2 changes: 2 additions & 0 deletions projects/core/transloco/src/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,6 @@ export const ETH: Translation = {
'Choose type of Chart': 'የመጀመሪያ7',
'Labels': 'የመጀመሪያ8',
'Border width': 'የመጀመሪያ9',
'Hide empty rows': 'ባዶ ረድፎችን ደብቅ',
'Table definition': 'የሠንጠረዥ ትርጉም',
};
2 changes: 2 additions & 0 deletions projects/core/transloco/src/fra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,6 @@ export const FRA: Translation = {
'Choose type of Chart': 'Choisissez le type de graphique',
'Labels': 'Étiquettes',
'Border width': 'Largeur de la bordure',
'Hide empty rows': 'Masquer les lignes vides',
'Table definition': 'Définition du tableau',
};
2 changes: 2 additions & 0 deletions projects/core/transloco/src/ita.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,6 @@ export const ITA: Translation = {
'Choose type of Chart': 'Scegli il tipo di grafico',
'Labels': 'etichette',
'Border width': 'Larghezza del bordo',
'Hide empty rows': 'Nascondi righe vuote',
'Table definition': 'Definizione della tabella',
};
2 changes: 2 additions & 0 deletions projects/core/transloco/src/prt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,6 @@ export const PRT: Translation = {
'Choose type of Chart': 'Escolha o tipo de gráfico',
'Labels': 'Etiquetas',
'Border width': 'Border width',
'Hide empty rows': 'Ocultar linhas vazias',
'Table definition': 'Definição da tabela',
};

0 comments on commit 662d6a1

Please sign in to comment.