tuain-ng-forms-lib 12.0.24 → 12.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,28 +10,28 @@ export declare class FormElement {
10
10
  elementType: string;
11
11
  customAttributes: any;
12
12
  constructor(elementDefinition: any, formConfig: any);
13
- getCustomAttribute(name: any): any;
14
- setCustomAttribute(name: any, value: any): any;
15
- matchAttribute(name: any, value: any): boolean;
13
+ getCustomAttribute(name: string): string;
14
+ setCustomAttribute(name: string, value: string): void;
15
+ matchAttribute(name: string, value: string): boolean;
16
16
  isField(): boolean;
17
17
  isAction(): boolean;
18
18
  isTable(): boolean;
19
19
  setVisibleStates(newStates: any): void;
20
20
  setEnabledStates(newStates: any): void;
21
- viewOnState(state: any): boolean;
22
- enabledOnState(state: any): boolean;
21
+ viewOnState(state: string): boolean;
22
+ enabledOnState(state: string): boolean;
23
23
  /**
24
24
  * @deprecated Utilizar viewOnState
25
25
  */
26
- supportState(state: any): boolean;
26
+ supportState(state: string): boolean;
27
27
  /**
28
28
  * @deprecated Utilizar viewOnState
29
29
  */
30
- supportMode(state: any): boolean;
30
+ supportMode(state: string): boolean;
31
31
  get visible(): boolean;
32
32
  set visible(visible: boolean);
33
- visibleOn(state: any): boolean;
34
- enabledOn(state: any): boolean;
33
+ visibleOn(state: string): boolean;
34
+ enabledOn(state: string): boolean;
35
35
  setVisibility(visible: boolean, forced?: boolean): void;
36
36
  show(forced?: boolean): void;
37
37
  hide(forced?: boolean): void;
@@ -40,11 +40,14 @@ export declare class FieldDescriptor extends FormElement {
40
40
  get attributeChange(): Subject<any>;
41
41
  get editionPartial(): Subject<any>;
42
42
  get detailRequest(): Subject<string>;
43
+ get info(): string;
43
44
  get validating(): boolean;
44
45
  set validating(isValidating: boolean);
45
46
  setIntrinsicErrorMessage(message: string): void;
46
47
  set intrinsicErrorMessage(message: string);
47
48
  get fieldValue(): any;
49
+ getRequired(): boolean;
50
+ setRequired(required: boolean): void;
48
51
  get required(): boolean;
49
52
  set required(required: boolean);
50
53
  get maxLength(): any;
@@ -87,6 +90,7 @@ export declare class FieldDescriptor extends FormElement {
87
90
  setErrorCode(code: any): void;
88
91
  getErrorMessage(): string;
89
92
  setErrorMessage(msg: any): void;
93
+ get empty(): boolean;
90
94
  isEmpty(): boolean;
91
95
  getValue(): any;
92
96
  updateFromServer(fld: any): void;
@@ -1,7 +1,26 @@
1
- import { RecordFormSection } from './section';
2
1
  import { FormAction } from './action';
3
2
  import { FieldDescriptor } from './field';
4
3
  import { RecordTable } from './table/table';
4
+ import { RecordFormSection } from './section';
5
+ import { RecordFormSubSection } from './subsection';
6
+ export interface FieldPayload {
7
+ fieldCode: string;
8
+ fieldValue: any;
9
+ editable: boolean;
10
+ visible: boolean;
11
+ required: boolean;
12
+ fieldOptions: string;
13
+ }
14
+ export interface TablePayload {
15
+ tableCode: string;
16
+ visible: boolean;
17
+ currentPage: number;
18
+ requestedPage: number;
19
+ recordsPerPage: number;
20
+ currentFilter: any;
21
+ sortingColumn: string;
22
+ sortingDirection: string;
23
+ }
5
24
  export declare class FormStructureAndData {
6
25
  state: string;
7
26
  _name: string;
@@ -21,95 +40,91 @@ export declare class FormStructureAndData {
21
40
  private _exclusiveSectionsByAttr;
22
41
  constructor(definitionReceived: any, formConfig: any);
23
42
  getTitle(): string;
24
- setTitle(title: any): void;
43
+ setTitle(title: string): void;
25
44
  get name(): string;
26
45
  set name(name: string);
27
46
  get defaultState(): string;
28
- supportState(state: any): boolean;
29
- supportMode(state: any): boolean;
30
- get states(): string[];
47
+ supportState(state: string): boolean;
48
+ supportMode(state: string): boolean;
49
+ get states(): any[];
31
50
  getCurrentState(): string;
32
- changeState(newState: any): boolean;
33
- setStateFlow(states?: any, transitions?: any, defaultState?: any): void;
34
- getImmutableElement(name: any): any;
51
+ changeState(newState: string): boolean;
52
+ setStateFlow(states?: any, transitions?: any, defaultState?: string): void;
53
+ getImmutableElement(name: string): any;
35
54
  set immutableData(immutableData: any);
36
55
  get immutableData(): any;
37
- getExtraInfo(name: any): any;
56
+ getExtraInfo(name: string): any;
38
57
  set extraInfo(extraInfo: any);
39
58
  get extraInfo(): any;
59
+ get fields(): {};
60
+ get fieldNames(): string[];
40
61
  getFields(): FieldDescriptor[];
41
62
  getFieldNames(): string[];
42
- getField(elementId: any): any;
43
- get fields(): {};
44
- enableField(fieldCode: any): any;
45
- disableField(fieldCode: any): any;
46
- getFieldValue(fieldCode: any): any;
47
- getFieldsValues(fieldCodesArray: any): {};
48
- getFieldOptions(fieldCode: any): any;
49
- setFieldValue(fieldCode: any, fieldValue: any): any;
50
- setFieldError(code: any, message: any, type?: string): any;
51
- setFieldIntrinsicErrorMessage(code: any, message: any): any;
52
- setFieldRequired(fieldCode: any, required: any): any;
53
- setFieldErrorMessage(fieldCode: any, errorMessage: any): any;
54
- setFieldOptions(fieldCode: any, optionsArray: any, idAttribute: any, nameAttribute: any): void;
55
- getFieldSet(filterFunc: any, fieldArray?: any, sectionCode?: any, subSectionCode?: any): any;
56
- applyProcessToFieldSet(processFunc: any, fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
57
- showFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
58
- hideFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
59
- showLabelFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
60
- hideLabelFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
61
- enableEditFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
62
- disableEditFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
63
- enableFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
64
- disableFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
65
- cleanFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
66
- getRequiredFields(fieldArray: any, sectionCode?: any, subSectionCode?: any): any;
67
- getRequiredEmptyFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): any;
68
- getChangedFields(fieldArray: any, sectionCode?: any, subSectionCode?: any): any;
69
- getFieldsWithValidationIssues(fieldArray: any, sectionCode?: any, subSectionCode?: any): any;
70
- tagFieldsWithError(errorMessage: any, fieldArray?: any, sectionCode?: any, subSectionCode?: any): number;
71
- cleanErrorFields(fieldArray?: any, sectionCode?: any, subSectionCode?: any): void;
72
- tagEmptyRequiredFields(errorMessage: any, fieldArray?: any, sectionCode?: any, subSectionCode?: any): boolean;
63
+ getField(code: string): FieldDescriptor;
64
+ enableField(code: string): void;
65
+ disableField(code: string): void;
66
+ getFieldValue(code: string): any;
67
+ getFieldOptions(code: string): void;
68
+ setFieldValue(code: string, value: any): void;
69
+ setFieldError(code: string, message: string, type?: string): void;
70
+ setFieldIntrinsicErrorMessage(code: string, message: string): void;
71
+ setFieldRequired(code: string, required: boolean): void;
72
+ setFieldErrorMessage(code: string, message: string): void;
73
+ setFieldOptions(code: string, optionsArray: any[], idAttribute: string, nameAttribute: string): void;
74
+ getFieldSet(filter: any, inputCodes: string[] | string, secCode?: string, subCode?: string): any;
75
+ applyOnFields(processFunc: any, inputCodes?: string[] | string, secCode?: string, subCode?: string): number;
76
+ enableFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
77
+ showFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
78
+ hideFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
79
+ showLabelFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
80
+ hideLabelFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
81
+ disableFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
82
+ cleanFields(codes?: string[] | string, secCode?: string, subCode?: string): number;
83
+ tagFieldsWithError(message: any, codes?: string[] | string, secCode?: string, subCode?: string): number;
84
+ cleanErrorFields(codes?: string[] | string, secCode?: string, subCode?: string): void;
85
+ tagEmptyRequiredFields(message: any, codes?: any, secCode?: string, subCode?: string): boolean;
86
+ getRequiredFields(codes?: string[] | string, secCode?: string, subCode?: string): any;
87
+ getRequiredEmptyFields(codes?: string[] | string, secCode?: string, subCode?: string): any;
88
+ getChangedFields(codes?: string[] | string, secCode?: string, subCode?: string): any;
89
+ getFieldsWithValidationIssues(codes?: string[] | string, secCode?: string, subCode?: string): any;
90
+ getFieldsValues(inputCodes?: string[] | string, secCode?: string, subCode?: string): {};
73
91
  get actions(): {};
74
92
  getActionsByAttribute(name: string, value: any): FormAction[];
75
93
  getActions(): FormAction[];
76
94
  getAction(code: string): any;
77
- showActions(codes: any): void;
78
- hideActions(codes: any): void;
79
- enableActions(codes: any): void;
80
- disableActions(codes: any): void;
81
- execOnActions(codes: any, functionName: any): void;
82
- tables(): RecordTable[];
95
+ showActions(codes: string[] | string): void;
96
+ hideActions(codes: string[] | string): void;
97
+ enableActions(codes: string[] | string): void;
98
+ disableActions(codes: string[] | string): void;
99
+ execOnActions(codes: string[] | string, functionName: string): void;
100
+ get tables(): any;
83
101
  getTables(): RecordTable[];
84
- getTable(code: any): any;
85
- enableTables(codes: any): void;
86
- disableTables(codes: any): void;
87
- showTables(codes: any): void;
88
- hideTables(codes: any): void;
89
- cleanTables(codes: any): void;
90
- execOnTables(codes: any, functionName: any): void;
91
- getTableRecord(tableCode: any, recordId: any): any;
102
+ getTable(code: string): any;
103
+ getTableRecord(code: string, id: string): any;
104
+ enableTables(codes: string[] | string): void;
105
+ disableTables(codes: string[] | string): void;
106
+ showTables(codes: string[] | string): void;
107
+ hideTables(codes: string[] | string): void;
108
+ cleanTables(codes: string[] | string): void;
109
+ execOnTables(codes: string[] | string, functionName: string): void;
92
110
  get sections(): RecordFormSection[];
111
+ getSections(): RecordFormSection[];
93
112
  getSectionsByAttribute(name: any, value: any): RecordFormSection[];
94
113
  get sectionTitles(): string[];
95
114
  get visibleSections(): RecordFormSection[];
96
- getSection(code: any): any;
97
- showSections(names: any): void;
98
- hideSections(names: any): void;
99
- activeSection(): any;
100
- getSubSection(code: any, subCode: any): any;
101
- showSubSections(code: any, subCodes: any): void;
102
- hideSubSections(code: any, subCodes: any): void;
103
- activateSection(code: any): void;
104
- execOnSections(codes: any, functionName: any): void;
105
- execOnSubSections(code: any, subNames: any, functionName: any): void;
115
+ getSection(code: string): RecordFormSection;
116
+ showSections(codes: string[] | string): void;
117
+ hideSections(codes: string[] | string): void;
118
+ activeSection(): string;
119
+ getSubSection(code: string, subCode: any): RecordFormSubSection;
120
+ showSubSections(code: string, subCodes: string[] | string): void;
121
+ hideSubSections(code: string, subCodes: string[] | string): void;
122
+ activateSection(code: string): void;
123
+ execOnSections(codes: string[] | string, functionName: string): void;
124
+ execOnSubSections(code: string, subNames: string[] | string, functionName: string): void;
106
125
  /**
107
126
  * Métodos propios de gestión del formulario
108
127
  */
109
128
  cleanData(): void;
110
- /** payload para servicios Tuain */
111
- getPayload(): {
112
- fields: any[];
113
- tables: any[];
114
- };
129
+ getPayload(): any;
115
130
  }