tuain-ng-forms-lib 14.0.2 → 14.0.4
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.
- package/esm2020/lib/classes/forms/action.mjs +35 -0
- package/esm2020/lib/classes/forms/element.mjs +76 -0
- package/esm2020/lib/classes/forms/field.mjs +321 -0
- package/esm2020/lib/classes/forms/form.constants.mjs +26 -0
- package/esm2020/lib/classes/forms/form.mjs +434 -0
- package/esm2020/lib/classes/forms/section.mjs +132 -0
- package/esm2020/lib/classes/forms/subsection.mjs +70 -0
- package/esm2020/lib/classes/forms/table/action.mjs +22 -0
- package/esm2020/lib/classes/forms/table/column.mjs +61 -0
- package/esm2020/lib/classes/forms/table/row-data.mjs +111 -0
- package/esm2020/lib/classes/forms/table/table.mjs +372 -0
- package/esm2020/lib/components/elements/action.component.mjs +58 -0
- package/esm2020/lib/components/elements/field.component.mjs +90 -0
- package/esm2020/lib/components/elements/layout/element.component.mjs +31 -0
- package/esm2020/lib/components/elements/layout/form-error.component.mjs +20 -0
- package/esm2020/lib/components/elements/layout/form-header.component.mjs +30 -0
- package/esm2020/lib/components/elements/layout/section.component.mjs +22 -0
- package/esm2020/lib/components/elements/layout/sub-section.component.mjs +24 -0
- package/esm2020/lib/components/elements/tables/table-record-action.component.mjs +40 -0
- package/esm2020/lib/components/elements/tables/table-record-field.component.mjs +25 -0
- package/esm2020/lib/components/elements/tables/table.component.mjs +95 -0
- package/esm2020/lib/components/forms/basic-form.mjs +1425 -0
- package/esm2020/lib/services/event-manager.service.mjs +18 -0
- package/esm2020/lib/services/file-manager.service.mjs +6 -0
- package/esm2020/lib/services/form-manager.service.mjs +80 -0
- package/esm2020/lib/tuain-ng-forms-lib.module.mjs +71 -0
- package/esm2020/public-api.mjs +19 -0
- package/esm2020/tuain-ng-forms-lib.mjs +5 -0
- package/fesm2015/tuain-ng-forms-lib.mjs +3816 -0
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -0
- package/fesm2020/tuain-ng-forms-lib.mjs +3646 -0
- package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -0
- package/lib/classes/forms/action.d.ts +22 -0
- package/lib/classes/forms/element.d.ts +41 -0
- package/lib/classes/forms/field.d.ts +109 -0
- package/lib/classes/forms/form.constants.d.ts +25 -0
- package/lib/classes/forms/form.d.ts +134 -0
- package/lib/classes/forms/section.d.ts +39 -0
- package/lib/classes/forms/subsection.d.ts +26 -0
- package/lib/classes/forms/table/action.d.ts +20 -0
- package/lib/classes/forms/table/column.d.ts +33 -0
- package/lib/classes/forms/table/row-data.d.ts +14 -0
- package/lib/classes/forms/table/table.d.ts +100 -0
- package/lib/components/elements/action.component.d.ts +21 -0
- package/lib/components/elements/field.component.d.ts +43 -0
- package/lib/components/elements/layout/element.component.d.ts +14 -0
- package/lib/components/elements/layout/form-error.component.d.ts +8 -0
- package/lib/components/elements/layout/form-header.component.d.ts +12 -0
- package/lib/components/elements/layout/section.component.d.ts +10 -0
- package/lib/components/elements/layout/sub-section.component.d.ts +11 -0
- package/lib/components/elements/tables/table-record-action.component.d.ts +15 -0
- package/lib/components/elements/tables/table-record-field.component.d.ts +11 -0
- package/lib/components/elements/tables/table.component.d.ts +47 -0
- package/lib/components/forms/basic-form.d.ts +307 -0
- package/lib/services/event-manager.service.d.ts +9 -0
- package/lib/services/file-manager.service.d.ts +5 -0
- package/lib/services/form-manager.service.d.ts +28 -0
- package/lib/tuain-ng-forms-lib.module.d.ts +20 -0
- package/package.json +22 -2
- package/{src/public-api.ts → public-api.d.ts} +0 -5
- package/tuain-ng-forms-lib.d.ts +5 -0
- package/.browserslistrc +0 -16
- package/.yarn/cache/nanoid-npm-4.0.0-924f5c6312-7d5946df5c.zip +0 -0
- package/.yarn/cache/tslib-npm-2.4.0-9cb6dc5030-8c4aa6a3c5.zip +0 -0
- package/.yarn/cache/yn-npm-5.0.0-b001dab23c-f0ec7710d3.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -11
- package/src/lib/classes/forms/action.ts +0 -55
- package/src/lib/classes/forms/element.ts +0 -98
- package/src/lib/classes/forms/field.ts +0 -408
- package/src/lib/classes/forms/form.constants.ts +0 -28
- package/src/lib/classes/forms/form.ts +0 -495
- package/src/lib/classes/forms/section.ts +0 -154
- package/src/lib/classes/forms/subsection.ts +0 -91
- package/src/lib/classes/forms/table/action.ts +0 -41
- package/src/lib/classes/forms/table/column.ts +0 -91
- package/src/lib/classes/forms/table/row-data.ts +0 -118
- package/src/lib/classes/forms/table/table.ts +0 -438
- package/src/lib/components/elements/action.component.ts +0 -53
- package/src/lib/components/elements/field.component.ts +0 -118
- package/src/lib/components/elements/layout/element.component.ts +0 -28
- package/src/lib/components/elements/layout/form-error.component.ts +0 -11
- package/src/lib/components/elements/layout/form-header.component.ts +0 -17
- package/src/lib/components/elements/layout/section.component.ts +0 -16
- package/src/lib/components/elements/layout/sub-section.component.ts +0 -17
- package/src/lib/components/elements/tables/table-record-action.component.ts +0 -37
- package/src/lib/components/elements/tables/table-record-field.component.ts +0 -19
- package/src/lib/components/elements/tables/table.component.ts +0 -102
- package/src/lib/components/forms/basic-form.ts +0 -1496
- package/src/lib/services/event-manager.service.ts +0 -21
- package/src/lib/services/file-manager.service.ts +0 -6
- package/src/lib/services/form-manager.service.ts +0 -89
- package/src/lib/services/icon-dictionary.service.ts +0 -159
- package/src/lib/tuain-ng-forms-lib.module.ts +0 -40
- package/src/test.ts +0 -27
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { FormElement } from './element';
|
|
3
|
+
export declare class FormAction extends FormElement {
|
|
4
|
+
private readonly _actionActivated;
|
|
5
|
+
inProgress: boolean;
|
|
6
|
+
newState: string;
|
|
7
|
+
backend: boolean;
|
|
8
|
+
actionCode: string;
|
|
9
|
+
actionName: string;
|
|
10
|
+
iconName: string;
|
|
11
|
+
restrictedOnField: string;
|
|
12
|
+
restrictedOnOperator: string;
|
|
13
|
+
restrictedOnValue: string;
|
|
14
|
+
customValidation: any;
|
|
15
|
+
constructor(actionDefinition: any, formConfig: any);
|
|
16
|
+
get actionActivated(): Subject<string>;
|
|
17
|
+
start(): void;
|
|
18
|
+
stop(): void;
|
|
19
|
+
notifyActivation(): void;
|
|
20
|
+
updateFromServer(receivedAction: any): void;
|
|
21
|
+
setCustomValidation(callback: any): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare class FormElement {
|
|
2
|
+
protected _visible: boolean;
|
|
3
|
+
protected _visibleForced: boolean;
|
|
4
|
+
protected _isForced: boolean;
|
|
5
|
+
_formConfig: any;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
visibleStates: string[];
|
|
8
|
+
enabledStates: string[];
|
|
9
|
+
elementType: string;
|
|
10
|
+
customAttributes: any;
|
|
11
|
+
constructor(elementDefinition: any, formConfig: any);
|
|
12
|
+
getCustomAttribute(name: string): any;
|
|
13
|
+
setCustomAttribute(name: string, value: any): void;
|
|
14
|
+
matchAttribute(name: string, value: string): boolean;
|
|
15
|
+
isField(): boolean;
|
|
16
|
+
isAction(): boolean;
|
|
17
|
+
isTable(): boolean;
|
|
18
|
+
setVisibleStates(newStates: any): void;
|
|
19
|
+
setEnabledStates(newStates: any): void;
|
|
20
|
+
viewOnState(state: string): boolean;
|
|
21
|
+
enabledOnState(state: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Utilizar viewOnState
|
|
24
|
+
*/
|
|
25
|
+
supportState(state: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Utilizar viewOnState
|
|
28
|
+
*/
|
|
29
|
+
supportMode(state: string): boolean;
|
|
30
|
+
get visible(): boolean;
|
|
31
|
+
set visible(visible: boolean);
|
|
32
|
+
visibleOn(state: string): boolean;
|
|
33
|
+
enabledOn(state: string): boolean;
|
|
34
|
+
setVisibility(visible: boolean, forced?: boolean): void;
|
|
35
|
+
show(forced?: boolean): void;
|
|
36
|
+
hide(forced?: boolean): void;
|
|
37
|
+
enable(): void;
|
|
38
|
+
disable(): void;
|
|
39
|
+
get enabled(): boolean;
|
|
40
|
+
get editable(): boolean;
|
|
41
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { FormElement } from './element';
|
|
3
|
+
export interface DetailEvent {
|
|
4
|
+
code: string;
|
|
5
|
+
detail: any;
|
|
6
|
+
}
|
|
7
|
+
export interface FieldOption {
|
|
8
|
+
fieldOptionValue: string;
|
|
9
|
+
fieldOptionId: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class FieldDescriptor extends FormElement {
|
|
12
|
+
private readonly _editionFinish;
|
|
13
|
+
private readonly _editionPartial;
|
|
14
|
+
private readonly _detailRequest;
|
|
15
|
+
private readonly _attributeChange;
|
|
16
|
+
private validateOnServer;
|
|
17
|
+
private _value;
|
|
18
|
+
private _focus;
|
|
19
|
+
private _minValue;
|
|
20
|
+
private _maxValue;
|
|
21
|
+
private _maxLength;
|
|
22
|
+
_onValidation: boolean;
|
|
23
|
+
_intrinsicErrorMessage: string;
|
|
24
|
+
fieldCode: string;
|
|
25
|
+
fieldInfo: string;
|
|
26
|
+
defaultValue: string;
|
|
27
|
+
defaultEditable: boolean;
|
|
28
|
+
visibleLabel: boolean;
|
|
29
|
+
fieldRequired: boolean;
|
|
30
|
+
hasChanged: boolean;
|
|
31
|
+
outputOnly: boolean;
|
|
32
|
+
captureType: string;
|
|
33
|
+
fieldTitle: string;
|
|
34
|
+
fieldType: string;
|
|
35
|
+
fieldAlignment: string;
|
|
36
|
+
fieldFormat: RegExp;
|
|
37
|
+
externalValue: any;
|
|
38
|
+
tooltipText: string;
|
|
39
|
+
errorType: string;
|
|
40
|
+
errorCode: string;
|
|
41
|
+
errorMessage: string;
|
|
42
|
+
fieldOptions: FieldOption[];
|
|
43
|
+
constructor(inputFieldReceived: any, formConfig: any);
|
|
44
|
+
get name(): string;
|
|
45
|
+
get editionFinish(): Subject<any>;
|
|
46
|
+
get attributeChange(): Subject<any>;
|
|
47
|
+
get editionPartial(): Subject<any>;
|
|
48
|
+
get detailRequest(): Subject<DetailEvent>;
|
|
49
|
+
get info(): string;
|
|
50
|
+
get validating(): boolean;
|
|
51
|
+
set validating(isValidating: boolean);
|
|
52
|
+
focus(): void;
|
|
53
|
+
setIntrinsicErrorMessage(message: string): void;
|
|
54
|
+
set intrinsicErrorMessage(message: string);
|
|
55
|
+
get fieldValue(): any;
|
|
56
|
+
getRequired(): boolean;
|
|
57
|
+
setRequired(required: boolean): void;
|
|
58
|
+
get required(): boolean;
|
|
59
|
+
set required(required: boolean);
|
|
60
|
+
get maxLength(): any;
|
|
61
|
+
set maxLength(requiredMaxLength: any);
|
|
62
|
+
get value(): any;
|
|
63
|
+
set value(newValue: any);
|
|
64
|
+
notifyEditionPartial(): void;
|
|
65
|
+
notifyEditionFinish(): void;
|
|
66
|
+
setAttr(name: string, value: any): void;
|
|
67
|
+
notifyEditionDetailRequest(detail: any): void;
|
|
68
|
+
setVisibleLabel(visibleLabel: boolean): void;
|
|
69
|
+
showLabel(): void;
|
|
70
|
+
hideLabel(): void;
|
|
71
|
+
setChanged(hasChanged: boolean): void;
|
|
72
|
+
changed(): void;
|
|
73
|
+
setLabel(label: any): void;
|
|
74
|
+
clean(): void;
|
|
75
|
+
get backend(): boolean;
|
|
76
|
+
setEditable(editable?: boolean): void;
|
|
77
|
+
hasError(): boolean;
|
|
78
|
+
resetError(): void;
|
|
79
|
+
setError(code: any, message: any, type?: string): void;
|
|
80
|
+
getError(): {
|
|
81
|
+
type: string;
|
|
82
|
+
code: string;
|
|
83
|
+
message: string;
|
|
84
|
+
};
|
|
85
|
+
get error(): {
|
|
86
|
+
type: string;
|
|
87
|
+
code: string;
|
|
88
|
+
message: string;
|
|
89
|
+
};
|
|
90
|
+
set error(errorObj: {
|
|
91
|
+
type: string;
|
|
92
|
+
code: string;
|
|
93
|
+
message: string;
|
|
94
|
+
});
|
|
95
|
+
getErrorCode(): string;
|
|
96
|
+
setErrorCode(code: any): void;
|
|
97
|
+
getErrorMessage(): string;
|
|
98
|
+
setErrorMessage(msg: any): void;
|
|
99
|
+
get empty(): boolean;
|
|
100
|
+
isEmpty(): boolean;
|
|
101
|
+
getValue(): any;
|
|
102
|
+
getOptionText(): string;
|
|
103
|
+
updateFromServer(fld: any): void;
|
|
104
|
+
setMinValue(inputMinValue: any): void;
|
|
105
|
+
setMaxValue(inputMaxValue: any): void;
|
|
106
|
+
getFieldOptions(): FieldOption[];
|
|
107
|
+
setFieldOptions(newOptions: any): void;
|
|
108
|
+
setValue(newValue: any, widgetUpdate?: boolean): boolean;
|
|
109
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const NO_ERROR = "00";
|
|
2
|
+
export declare const HEADER = "HEADER";
|
|
3
|
+
export declare const elementTypes: {
|
|
4
|
+
action: string;
|
|
5
|
+
field: string;
|
|
6
|
+
table: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const formActions: {
|
|
9
|
+
tableAction: string;
|
|
10
|
+
getData: string;
|
|
11
|
+
getTableData: string;
|
|
12
|
+
validate: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const operators: {
|
|
15
|
+
G: string;
|
|
16
|
+
L: string;
|
|
17
|
+
GE: string;
|
|
18
|
+
LE: string;
|
|
19
|
+
EQ: string;
|
|
20
|
+
NEQ: string;
|
|
21
|
+
HAS: string;
|
|
22
|
+
NOTHAS: string;
|
|
23
|
+
BETWEEN: string;
|
|
24
|
+
IN: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { FormAction } from './action';
|
|
2
|
+
import { FieldDescriptor, FieldOption } from './field';
|
|
3
|
+
import { RecordTable } from './table/table';
|
|
4
|
+
import { RecordFormSection } from './section';
|
|
5
|
+
import { RecordFormSubSection } from './subsection';
|
|
6
|
+
import { TableRecordData } from './table/row-data';
|
|
7
|
+
export interface FieldPayload {
|
|
8
|
+
fieldCode: string;
|
|
9
|
+
fieldValue: any;
|
|
10
|
+
editable: boolean;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
required: boolean;
|
|
13
|
+
fieldOptions: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TablePayload {
|
|
16
|
+
tableCode: string;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
currentPage: number;
|
|
19
|
+
requestedPage: number;
|
|
20
|
+
recordsPerPage: number;
|
|
21
|
+
currentFilter: any;
|
|
22
|
+
sortingColumn: string;
|
|
23
|
+
sortingDirection: string;
|
|
24
|
+
}
|
|
25
|
+
export declare class FormStructureAndData {
|
|
26
|
+
state: string;
|
|
27
|
+
_name: string;
|
|
28
|
+
_formConfig: any;
|
|
29
|
+
private _title;
|
|
30
|
+
private _stateFlow;
|
|
31
|
+
private _fieldArray;
|
|
32
|
+
private _fields;
|
|
33
|
+
private _actionArray;
|
|
34
|
+
private _actions;
|
|
35
|
+
private _tableArray;
|
|
36
|
+
private _tables;
|
|
37
|
+
private _sectionArray;
|
|
38
|
+
private _sections;
|
|
39
|
+
private _immutableData;
|
|
40
|
+
private _extraInfo;
|
|
41
|
+
private _exclusiveSectionsByAttr;
|
|
42
|
+
constructor(definitionReceived: any, formConfig: any);
|
|
43
|
+
getTitle(): string;
|
|
44
|
+
setTitle(title: string): void;
|
|
45
|
+
get name(): string;
|
|
46
|
+
set name(name: string);
|
|
47
|
+
get defaultState(): string;
|
|
48
|
+
supportState(state: string): boolean;
|
|
49
|
+
supportMode(state: string): boolean;
|
|
50
|
+
get states(): any[];
|
|
51
|
+
getCurrentState(): string;
|
|
52
|
+
changeState(newState: string): boolean;
|
|
53
|
+
setStateFlow(states?: any, transitions?: any, defaultState?: string): void;
|
|
54
|
+
getImmutableElement(name: string): any;
|
|
55
|
+
set immutableData(immutableData: any);
|
|
56
|
+
get immutableData(): any;
|
|
57
|
+
getExtraInfo(name: string): any;
|
|
58
|
+
set extraInfo(extraInfo: any);
|
|
59
|
+
get extraInfo(): any;
|
|
60
|
+
get fields(): any;
|
|
61
|
+
get fieldNames(): string[];
|
|
62
|
+
getFields(): FieldDescriptor[];
|
|
63
|
+
getFieldNames(): string[];
|
|
64
|
+
getField(code: string): FieldDescriptor;
|
|
65
|
+
enableField(code: string): void;
|
|
66
|
+
disableField(code: string): void;
|
|
67
|
+
getFieldValue(code: string): any;
|
|
68
|
+
getFieldOptionText(code: string): any;
|
|
69
|
+
getFieldOptions(code: string): FieldOption[];
|
|
70
|
+
setFieldValue(code: string, value: any): any;
|
|
71
|
+
setFieldError(code: string, errorCode: string, message: string, type?: string): any;
|
|
72
|
+
setFieldIntrinsicErrorMessage(code: string, message: string): any;
|
|
73
|
+
setFieldRequired(inputCodes: string[] | string | null, required: boolean): any;
|
|
74
|
+
setFieldErrorMessage(code: string, message: string): any;
|
|
75
|
+
setFieldOptions(code: string, optionsArray: any[], idAttribute: string, nameAttribute: string): any;
|
|
76
|
+
getFieldSet(filter: any, inputCodes: string[] | string | null, secCode?: string | null, subCode?: string | null): string[];
|
|
77
|
+
applyOnFields(processFunc: any, inputCodes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
78
|
+
enableFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
79
|
+
showFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
80
|
+
hideFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
81
|
+
showLabelFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
82
|
+
hideLabelFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
83
|
+
disableFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
84
|
+
cleanFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
85
|
+
tagFieldsWithError(message: string, codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
86
|
+
cleanErrorFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
87
|
+
tagEmptyRequiredFields(message: string, codes?: any, secCode?: string, subCode?: string): boolean;
|
|
88
|
+
getRequiredFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
89
|
+
getRequiredEmptyFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
90
|
+
getChangedFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
91
|
+
getFieldsWithValidationIssues(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
92
|
+
getFieldsValues(inputCodes?: string[] | string | null, secCode?: string, subCode?: string): any;
|
|
93
|
+
get actions(): {};
|
|
94
|
+
getActionsByAttribute(name: string, value: any): FormAction[];
|
|
95
|
+
getActions(): FormAction[];
|
|
96
|
+
getAction(code: string): FormAction;
|
|
97
|
+
showActions(codes: string[] | string): void;
|
|
98
|
+
hideActions(codes: string[] | string): void;
|
|
99
|
+
enableActions(codes: string[] | string): void;
|
|
100
|
+
disableActions(codes: string[] | string): void;
|
|
101
|
+
execOnActions(codes: string[] | string | null, functionName: string): void;
|
|
102
|
+
get tables(): any;
|
|
103
|
+
getTables(): RecordTable[];
|
|
104
|
+
getTable(code: string): RecordTable;
|
|
105
|
+
getTableRecord(code: string, id: string): TableRecordData;
|
|
106
|
+
enableTables(codes: string[] | string): void;
|
|
107
|
+
disableTables(codes: string[] | string): void;
|
|
108
|
+
showTables(codes: string[] | string): void;
|
|
109
|
+
hideTables(codes: string[] | string): void;
|
|
110
|
+
cleanTables(codes: string[] | string): void;
|
|
111
|
+
execOnTables(codes: string[] | string | null, functionName: string): void;
|
|
112
|
+
get sections(): any;
|
|
113
|
+
getSections(): RecordFormSection[];
|
|
114
|
+
getSectionsByAttribute(name: any, value: any): RecordFormSection[];
|
|
115
|
+
get sectionTitles(): string[];
|
|
116
|
+
get visibleSections(): RecordFormSection[];
|
|
117
|
+
getSection(code: string): RecordFormSection;
|
|
118
|
+
showSections(codes: string[] | string): void;
|
|
119
|
+
hideSections(codes: string[] | string): void;
|
|
120
|
+
activeSection(): string;
|
|
121
|
+
getSubSection(code: string, subCode: any): RecordFormSubSection;
|
|
122
|
+
showSubSections(code: string, subCodes: string[] | string): void;
|
|
123
|
+
hideSubSections(code: string, subCodes: string[] | string): void;
|
|
124
|
+
getSectionActions(code: any): FormAction[];
|
|
125
|
+
getSectionActionNames(code: any): string[];
|
|
126
|
+
activateSection(code: string): void;
|
|
127
|
+
execOnSections(codes: string[] | string | null, functionName: string): void;
|
|
128
|
+
execOnSubSections(code: string, subNames: string[] | string | null, functionName: string): void;
|
|
129
|
+
/**
|
|
130
|
+
* Métodos propios de gestión del formulario
|
|
131
|
+
*/
|
|
132
|
+
cleanData(): void;
|
|
133
|
+
getPayload(): any;
|
|
134
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { FormAction } from './action';
|
|
3
|
+
import { RecordFormSubSection } from './subsection';
|
|
4
|
+
export declare class RecordFormSection {
|
|
5
|
+
private readonly _activation;
|
|
6
|
+
private readonly _inactivation;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
visibleStates: string[];
|
|
9
|
+
active: boolean;
|
|
10
|
+
sectionId: string;
|
|
11
|
+
sectionCode: string;
|
|
12
|
+
sectionTitle: string;
|
|
13
|
+
customAttributes: any;
|
|
14
|
+
subSections: RecordFormSubSection[];
|
|
15
|
+
subSectionsObj: any;
|
|
16
|
+
constructor(sectionReceived: any, formObject: any);
|
|
17
|
+
getCustomAttribute(name: any): any;
|
|
18
|
+
setCustomAttribute(name: any, value: any): any;
|
|
19
|
+
matchAttribute(name: any, value: any): boolean;
|
|
20
|
+
get code(): string;
|
|
21
|
+
get activation(): Subject<string>;
|
|
22
|
+
get inactivation(): Subject<string>;
|
|
23
|
+
activate(): void;
|
|
24
|
+
inactivate(): void;
|
|
25
|
+
show(): void;
|
|
26
|
+
hide(): void;
|
|
27
|
+
get title(): string;
|
|
28
|
+
set title(title: string);
|
|
29
|
+
getVisibleSubsections(state: any): RecordFormSubSection[];
|
|
30
|
+
getSubsection(subSectionCode: any): any;
|
|
31
|
+
getFields(): any[];
|
|
32
|
+
getActions(): FormAction[];
|
|
33
|
+
getActionNames(): string[];
|
|
34
|
+
getFieldNames(): any[];
|
|
35
|
+
getField(name: any): any;
|
|
36
|
+
supportState(state: any): boolean;
|
|
37
|
+
viewOnState(state: any): boolean;
|
|
38
|
+
supportMode(state: any): boolean;
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FormAction } from './action';
|
|
2
|
+
export declare class RecordFormSubSection {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
_customRender: string;
|
|
5
|
+
subsectionId: string;
|
|
6
|
+
subsectionCode: string;
|
|
7
|
+
subsectionTitle: string;
|
|
8
|
+
visibleStates: string[];
|
|
9
|
+
subSectionElements: any[];
|
|
10
|
+
subSectionFields: any[];
|
|
11
|
+
subSectionTables: any[];
|
|
12
|
+
subSectionActions: any[];
|
|
13
|
+
elementsArray: any;
|
|
14
|
+
constructor(subsectionReceived: any, formObject: any);
|
|
15
|
+
show(): void;
|
|
16
|
+
hide(): void;
|
|
17
|
+
get customRender(): string;
|
|
18
|
+
set customRender(customRenderName: string);
|
|
19
|
+
getField(name: any): any;
|
|
20
|
+
getFields(): any[];
|
|
21
|
+
getFieldNames(): any[];
|
|
22
|
+
getActions(): FormAction[];
|
|
23
|
+
getActionNames(): string[];
|
|
24
|
+
viewOnState(state: any): boolean;
|
|
25
|
+
supportMode(state: any): boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class TableAction {
|
|
2
|
+
visibleStates: string[];
|
|
3
|
+
enabledStates: string[];
|
|
4
|
+
newState: string;
|
|
5
|
+
actionCode: string;
|
|
6
|
+
actionTitle: string;
|
|
7
|
+
iconName: string;
|
|
8
|
+
actionType: string;
|
|
9
|
+
actionClass: string;
|
|
10
|
+
stateField: string;
|
|
11
|
+
backend: boolean;
|
|
12
|
+
restrictedOnField: string;
|
|
13
|
+
restrictedOnValue: string;
|
|
14
|
+
restrictedOnOperator: string;
|
|
15
|
+
customAttributes: any;
|
|
16
|
+
constructor(actionDefinition: any);
|
|
17
|
+
supportMode(state: any): boolean;
|
|
18
|
+
viewOnState(state: any): boolean;
|
|
19
|
+
enabledOnState(state: any): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface FilterDef {
|
|
2
|
+
operators: string[];
|
|
3
|
+
options: any[];
|
|
4
|
+
}
|
|
5
|
+
export interface FilterSetup {
|
|
6
|
+
fieldCode: string;
|
|
7
|
+
operator: string;
|
|
8
|
+
values: any[];
|
|
9
|
+
}
|
|
10
|
+
export declare class RecordTableColumn {
|
|
11
|
+
_formConfig: any;
|
|
12
|
+
fieldCode: string;
|
|
13
|
+
fieldTitle: string;
|
|
14
|
+
fieldType: string;
|
|
15
|
+
fieldAlignment: string;
|
|
16
|
+
fieldFormat: string;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
sortable: boolean;
|
|
19
|
+
sortDirections: string[];
|
|
20
|
+
customAttributes: any;
|
|
21
|
+
filterVisible: boolean;
|
|
22
|
+
filterDef: FilterDef;
|
|
23
|
+
filterSetup: FilterSetup;
|
|
24
|
+
constructor(recTableColReceived: any, formConfig: any);
|
|
25
|
+
hideFilter(): void;
|
|
26
|
+
addFilterDefinition(filterDefinition: any): void;
|
|
27
|
+
get filterDefinition(): FilterDef;
|
|
28
|
+
addFilter(columnValues: any, operator: any): void;
|
|
29
|
+
get filter(): FilterSetup;
|
|
30
|
+
removeFilter(): void;
|
|
31
|
+
get options(): any[];
|
|
32
|
+
serSortDirections(ascend: boolean, descend: boolean): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RecordTableColumn } from './column';
|
|
2
|
+
export declare class TableRecordData {
|
|
3
|
+
recordId: string;
|
|
4
|
+
selected: boolean;
|
|
5
|
+
recordData: any;
|
|
6
|
+
constructor(recordReceived: any, recordDefinition: RecordTableColumn[], selectionFieldName?: any);
|
|
7
|
+
toggleSelect(): void;
|
|
8
|
+
select(): void;
|
|
9
|
+
unselect(): void;
|
|
10
|
+
get recordIdKey(): string;
|
|
11
|
+
getFieldValue(fieldCode: any): any;
|
|
12
|
+
hasPattern(words: any, columnObj: any): boolean;
|
|
13
|
+
hasCondition(columnFilters: any): boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { FormElement } from '../element';
|
|
3
|
+
import { RecordTableColumn } from './column';
|
|
4
|
+
import { TableAction } from './action';
|
|
5
|
+
import { TableRecordData } from './row-data';
|
|
6
|
+
export interface TableActionEvent {
|
|
7
|
+
actionCode: string;
|
|
8
|
+
recordId: any;
|
|
9
|
+
recordData: any;
|
|
10
|
+
}
|
|
11
|
+
export interface TableEvent {
|
|
12
|
+
tableCode: string;
|
|
13
|
+
actionCode: string;
|
|
14
|
+
actionDetail: any;
|
|
15
|
+
}
|
|
16
|
+
export declare class RecordTable extends FormElement {
|
|
17
|
+
private readonly _inlineActionTrigger;
|
|
18
|
+
private readonly _globalActionTrigger;
|
|
19
|
+
private readonly _recordSelectionTrigger;
|
|
20
|
+
private readonly _selectionActionTrigger;
|
|
21
|
+
private readonly _getDataTrigger;
|
|
22
|
+
private readonly _attributeChange;
|
|
23
|
+
private _tableColumnObj;
|
|
24
|
+
private _appendPages;
|
|
25
|
+
private _actions;
|
|
26
|
+
private _actionsObj;
|
|
27
|
+
private globalFilterStrings;
|
|
28
|
+
private selectedRecords;
|
|
29
|
+
private globalSearch;
|
|
30
|
+
private restrictedId;
|
|
31
|
+
private layout;
|
|
32
|
+
tableRecords: TableRecordData[];
|
|
33
|
+
tableRecordObj: {};
|
|
34
|
+
visibleRecords: TableRecordData[];
|
|
35
|
+
columns: RecordTableColumn[];
|
|
36
|
+
selectable: boolean;
|
|
37
|
+
selectionBackend: boolean;
|
|
38
|
+
selectionField: string;
|
|
39
|
+
allSelected: boolean;
|
|
40
|
+
tableCode: string;
|
|
41
|
+
tableTitle: string;
|
|
42
|
+
currentPage: number;
|
|
43
|
+
totalPages: number;
|
|
44
|
+
requestedPage: number;
|
|
45
|
+
recordsPerPage: number;
|
|
46
|
+
totalRecordsNumber: number;
|
|
47
|
+
recordsNumber: number;
|
|
48
|
+
sorting: any;
|
|
49
|
+
waiting: boolean;
|
|
50
|
+
clientPaging: boolean;
|
|
51
|
+
sortable: boolean;
|
|
52
|
+
constructor(tableReceived: any, formConfig: any);
|
|
53
|
+
get columnNames(): string[];
|
|
54
|
+
get inlineActionTrigger(): Subject<TableEvent>;
|
|
55
|
+
get globalActionTrigger(): Subject<TableEvent>;
|
|
56
|
+
get selectionActionTrigger(): Subject<TableEvent>;
|
|
57
|
+
get recordSelectionTrigger(): Subject<TableEvent>;
|
|
58
|
+
get getDataTrigger(): Subject<TableEvent>;
|
|
59
|
+
get attributeChange(): Subject<any>;
|
|
60
|
+
getLayout(): string;
|
|
61
|
+
setLayout(layout: any): void;
|
|
62
|
+
hasActions(): boolean;
|
|
63
|
+
getSelectedRecords(): string[];
|
|
64
|
+
activateGlobalSearch(): void;
|
|
65
|
+
inactivateGlobalSearch(): void;
|
|
66
|
+
columnDefinition(fieldCode: any): any;
|
|
67
|
+
putOnWait(): void;
|
|
68
|
+
freeWaiting(): void;
|
|
69
|
+
setAttr(name: string, value: any): void;
|
|
70
|
+
notifyGlobalAction(actionCode: any): void;
|
|
71
|
+
notifyInlineAction(tableActionEvent: TableActionEvent): void;
|
|
72
|
+
notifyRecordSelection(recordId: any): void;
|
|
73
|
+
notifySelectionAction(actionCode: any): void;
|
|
74
|
+
notifyGetDataAction(requestedPage?: any): any;
|
|
75
|
+
clean(): void;
|
|
76
|
+
selectAll(): boolean;
|
|
77
|
+
unSelectAll(): boolean;
|
|
78
|
+
setTableRecords(tableRecords: any, append: any): void;
|
|
79
|
+
appendRecords(records: any): void;
|
|
80
|
+
replaceRecords(records: any): void;
|
|
81
|
+
changePage(requestedPage: any): void;
|
|
82
|
+
updateVisibleRecords(): void;
|
|
83
|
+
updateFromServer(tableReceived: any): void;
|
|
84
|
+
getTableRecord(recordId: any): any;
|
|
85
|
+
getAction(actionCode: any): any;
|
|
86
|
+
getActions(actionClass?: string, actionTypes?: string[]): TableAction[];
|
|
87
|
+
setFilterById(id: any): void;
|
|
88
|
+
cleanIdFilter(): void;
|
|
89
|
+
setGlobalFilterString(text: any): void;
|
|
90
|
+
addFilterDefinition(columnName: any, filterDefinition: any): void;
|
|
91
|
+
getFilteredRecords(): TableRecordData[];
|
|
92
|
+
getColumnFilter(columnName: string): any;
|
|
93
|
+
addColumnFilter(columnName: string, columnValues: any | any[], operator?: string): any;
|
|
94
|
+
removeColumnFilter(columnName: string): void;
|
|
95
|
+
get currentFilter(): any;
|
|
96
|
+
sort(columnName: any, direction: any): void;
|
|
97
|
+
setRequiredOrder(columnField: any, direction?: any): void;
|
|
98
|
+
localSortData(): void;
|
|
99
|
+
recordCompare(recordA: TableRecordData, recordB: TableRecordData, columnCompare: any, direction: any): number;
|
|
100
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormAction } from '../../classes/forms/action';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ActionComponent implements OnInit {
|
|
5
|
+
formConfig: any;
|
|
6
|
+
inProgress: boolean;
|
|
7
|
+
action: FormAction;
|
|
8
|
+
busy: any;
|
|
9
|
+
relatedField: any;
|
|
10
|
+
state: any;
|
|
11
|
+
style: string;
|
|
12
|
+
showLabel: boolean;
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
start(): void;
|
|
15
|
+
activate(): void;
|
|
16
|
+
visibleOnRestriction(): boolean;
|
|
17
|
+
get visible(): boolean;
|
|
18
|
+
get disabled(): boolean;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionComponent, "lib-action", never, { "action": "action"; "busy": "busy"; "relatedField": "relatedField"; "state": "state"; "style": "style"; "showLabel": "showLabel"; }, {}, never, ["*"], false>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FieldDescriptor } from '../../classes/forms/field';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FieldComponent implements OnInit {
|
|
5
|
+
formConfig: any;
|
|
6
|
+
code: string;
|
|
7
|
+
value: any;
|
|
8
|
+
fieldInfo: string;
|
|
9
|
+
fieldAlignment: string;
|
|
10
|
+
tooltipText: string;
|
|
11
|
+
maxLength: any;
|
|
12
|
+
minValue: any;
|
|
13
|
+
maxValue: any;
|
|
14
|
+
onValidation: any;
|
|
15
|
+
captureType: any;
|
|
16
|
+
title: any;
|
|
17
|
+
type: any;
|
|
18
|
+
visibleLabel: any;
|
|
19
|
+
required: any;
|
|
20
|
+
options: any;
|
|
21
|
+
errorType: any;
|
|
22
|
+
errorCode: any;
|
|
23
|
+
errorMessage: any;
|
|
24
|
+
field: FieldDescriptor;
|
|
25
|
+
state: any;
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
dafaultProcessFieldChange(attribute: string, value?: any): void;
|
|
28
|
+
processFieldChange(attribute: string, value?: any): void;
|
|
29
|
+
start(): void;
|
|
30
|
+
focus(): void;
|
|
31
|
+
updateObject(): void;
|
|
32
|
+
inputChanged(): void;
|
|
33
|
+
inputTyped(): void;
|
|
34
|
+
updateValue(): void;
|
|
35
|
+
onInputChange(): void;
|
|
36
|
+
onChangeContent(): void;
|
|
37
|
+
onShowInfo(detail?: any): void;
|
|
38
|
+
numberInputValidation(event: any): boolean;
|
|
39
|
+
get visible(): boolean;
|
|
40
|
+
get disabled(): boolean;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "lib-field", never, { "field": "field"; "state": "state"; }, {}, never, ["*"], false>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ElementComponent implements OnInit {
|
|
4
|
+
formConfig: any;
|
|
5
|
+
element: any;
|
|
6
|
+
form: any;
|
|
7
|
+
state: any;
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
start(): void;
|
|
10
|
+
get visible(): any;
|
|
11
|
+
get disabled(): boolean;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ElementComponent, "lib-element", never, { "element": "element"; "form": "form"; "state": "state"; }, {}, never, ["*"], false>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class FormErrorComponent {
|
|
3
|
+
errorTitle: any;
|
|
4
|
+
errorMessage: any;
|
|
5
|
+
errorType: any;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormErrorComponent, "lib-form-error", never, { "errorTitle": "errorTitle"; "errorMessage": "errorMessage"; "errorType": "errorType"; }, {}, never, ["*"], false>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FormHeaderComponent {
|
|
4
|
+
formManager: any;
|
|
5
|
+
goBackAction: boolean;
|
|
6
|
+
showTitle: any;
|
|
7
|
+
headerActions: any;
|
|
8
|
+
goBackEvent: EventEmitter<object>;
|
|
9
|
+
goBackForm(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormHeaderComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormHeaderComponent, "lib-form-header", never, { "formManager": "formManager"; "goBackAction": "goBackAction"; "showTitle": "showTitle"; "headerActions": "headerActions"; }, { "goBackEvent": "goBackEvent"; }, never, ["*"], false>;
|
|
12
|
+
}
|