tuain-ng-forms-lib 14.4.93 → 14.4.95
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 +36 -0
- package/esm2020/lib/classes/forms/element.mjs +26 -0
- package/esm2020/lib/classes/forms/field.mjs +445 -0
- package/esm2020/lib/classes/forms/form.constants.mjs +26 -0
- package/esm2020/lib/classes/forms/form.mjs +431 -0
- package/esm2020/lib/classes/forms/piece-propagate.mjs +37 -0
- package/esm2020/lib/classes/forms/piece.mjs +95 -0
- package/esm2020/lib/classes/forms/section.mjs +138 -0
- package/esm2020/lib/classes/forms/subsection.mjs +81 -0
- package/esm2020/lib/classes/forms/table/action.mjs +18 -0
- package/esm2020/lib/classes/forms/table/column.mjs +74 -0
- package/esm2020/lib/classes/forms/table/row-data.mjs +116 -0
- package/esm2020/lib/classes/forms/table/table.mjs +416 -0
- package/esm2020/lib/components/elements/action.component.mjs +71 -0
- package/esm2020/lib/components/elements/field.component.mjs +81 -0
- package/esm2020/lib/components/elements/layout/element.component.mjs +20 -0
- package/esm2020/lib/components/elements/layout/form-error.component.mjs +20 -0
- package/esm2020/lib/components/elements/layout/form-header.component.mjs +31 -0
- package/esm2020/lib/components/elements/layout/piece.component.mjs +39 -0
- package/esm2020/lib/components/elements/layout/section.component.mjs +37 -0
- package/esm2020/lib/components/elements/layout/sub-section.component.mjs +37 -0
- package/esm2020/lib/components/elements/tables/table-record-action.component.mjs +56 -0
- package/esm2020/lib/components/elements/tables/table-record-field.component.mjs +30 -0
- package/esm2020/lib/components/elements/tables/table.component.mjs +89 -0
- package/esm2020/lib/components/forms/basic-form.mjs +1514 -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 +4259 -0
- package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -0
- package/fesm2020/tuain-ng-forms-lib.mjs +4074 -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 +17 -0
- package/lib/classes/forms/field.d.ts +205 -0
- package/lib/classes/forms/form.constants.d.ts +25 -0
- package/lib/classes/forms/form.d.ts +137 -0
- package/lib/classes/forms/piece-propagate.d.ts +13 -0
- package/lib/classes/forms/piece.d.ts +41 -0
- package/lib/classes/forms/section.d.ts +32 -0
- package/lib/classes/forms/subsection.d.ts +24 -0
- package/lib/classes/forms/table/action.d.ts +15 -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 +17 -0
- package/lib/components/elements/field.component.d.ts +38 -0
- package/lib/components/elements/layout/element.component.d.ts +9 -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/piece.component.d.ts +12 -0
- package/lib/components/elements/layout/section.component.d.ts +11 -0
- package/lib/components/elements/layout/sub-section.component.d.ts +11 -0
- package/lib/components/elements/tables/table-record-action.component.d.ts +16 -0
- package/lib/components/elements/tables/table-record-field.component.d.ts +12 -0
- package/lib/components/elements/tables/table.component.d.ts +35 -0
- package/lib/components/forms/basic-form.d.ts +353 -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 +24 -6
- 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.1-36f0ed04db-19480d6e03.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 -56
- package/src/lib/classes/forms/element.ts +0 -29
- package/src/lib/classes/forms/field.ts +0 -500
- package/src/lib/classes/forms/form.constants.ts +0 -28
- package/src/lib/classes/forms/form.ts +0 -508
- package/src/lib/classes/forms/piece-propagate.ts +0 -46
- package/src/lib/classes/forms/piece.ts +0 -122
- package/src/lib/classes/forms/section.ts +0 -152
- package/src/lib/classes/forms/subsection.ts +0 -90
- package/src/lib/classes/forms/table/action.ts +0 -32
- package/src/lib/classes/forms/table/column.ts +0 -94
- package/src/lib/classes/forms/table/row-data.ts +0 -121
- package/src/lib/classes/forms/table/table.ts +0 -478
- package/src/lib/components/elements/action.component.ts +0 -59
- package/src/lib/components/elements/field.component.ts +0 -92
- package/src/lib/components/elements/layout/element.component.ts +0 -13
- 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/piece.component.ts +0 -34
- package/src/lib/components/elements/layout/section.component.ts +0 -31
- package/src/lib/components/elements/layout/sub-section.component.ts +0 -31
- package/src/lib/components/elements/tables/table-record-action.component.ts +0 -50
- package/src/lib/components/elements/tables/table-record-field.component.ts +0 -20
- package/src/lib/components/elements/tables/table.component.ts +0 -86
- package/src/lib/components/forms/basic-form.ts +0 -1588
- 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,17 @@
|
|
|
1
|
+
import { FormPiecePropagate } from './piece-propagate';
|
|
2
|
+
export declare class FormElement extends FormPiecePropagate {
|
|
3
|
+
elementType: string | null;
|
|
4
|
+
constructor(elementDefinition: any, formConfig: any);
|
|
5
|
+
setAttr(attr: any, value: any): void;
|
|
6
|
+
isField(): boolean;
|
|
7
|
+
isAction(): boolean;
|
|
8
|
+
isTable(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Utilizar viewOnState
|
|
11
|
+
*/
|
|
12
|
+
supportState(state: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Utilizar viewOnState
|
|
15
|
+
*/
|
|
16
|
+
supportMode(state: string): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
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 _errorType;
|
|
16
|
+
private _errorCode;
|
|
17
|
+
private _errorMessage;
|
|
18
|
+
private _fieldCode;
|
|
19
|
+
private _intrinsicErrorMessage;
|
|
20
|
+
private _minValue;
|
|
21
|
+
private _maxValue;
|
|
22
|
+
private _maxLength;
|
|
23
|
+
private _minLength;
|
|
24
|
+
private _focus;
|
|
25
|
+
private _onValidation;
|
|
26
|
+
private _validateOnServer;
|
|
27
|
+
private _value;
|
|
28
|
+
private _visibleLabel;
|
|
29
|
+
private _captureType;
|
|
30
|
+
private _defaultValue;
|
|
31
|
+
private _defaultEditable;
|
|
32
|
+
private _externalValue;
|
|
33
|
+
private _fieldAlignment;
|
|
34
|
+
private _fieldInfo;
|
|
35
|
+
private _fieldRequired;
|
|
36
|
+
private _fieldTitle;
|
|
37
|
+
private _fieldType;
|
|
38
|
+
private _fieldFormat;
|
|
39
|
+
private _fieldOptions;
|
|
40
|
+
private _hasChanged;
|
|
41
|
+
private _outputOnly;
|
|
42
|
+
private _tooltipText;
|
|
43
|
+
constructor(inputFieldReceived: any, formConfig: any);
|
|
44
|
+
get alignment(): string;
|
|
45
|
+
set alignment(alignment: string);
|
|
46
|
+
get backend(): boolean;
|
|
47
|
+
get captureType(): string;
|
|
48
|
+
set captureType(captureType: string);
|
|
49
|
+
get code(): string;
|
|
50
|
+
get fieldCode(): string;
|
|
51
|
+
get defaultValue(): string;
|
|
52
|
+
set defaultValue(defaultValue: string);
|
|
53
|
+
get defaultEditable(): boolean;
|
|
54
|
+
set defaultEditable(editable: boolean);
|
|
55
|
+
get detailRequest(): Subject<DetailEvent>;
|
|
56
|
+
get editionFinish(): Subject<any>;
|
|
57
|
+
get editionPartial(): Subject<any>;
|
|
58
|
+
get empty(): boolean;
|
|
59
|
+
get error(): {
|
|
60
|
+
type: string;
|
|
61
|
+
code: string;
|
|
62
|
+
message: string;
|
|
63
|
+
};
|
|
64
|
+
set error(errorObj: {
|
|
65
|
+
type: string;
|
|
66
|
+
code: string;
|
|
67
|
+
message: string;
|
|
68
|
+
});
|
|
69
|
+
get errorCode(): string;
|
|
70
|
+
set errorCode(code: string);
|
|
71
|
+
get errorMessage(): string;
|
|
72
|
+
set errorMessage(msg: string);
|
|
73
|
+
get errorType(): string;
|
|
74
|
+
get externalValue(): any;
|
|
75
|
+
get format(): RegExp;
|
|
76
|
+
set format(format: RegExp);
|
|
77
|
+
get hasChanged(): boolean;
|
|
78
|
+
set hasChanged(hasChanged: boolean);
|
|
79
|
+
get info(): string;
|
|
80
|
+
set info(newInfo: string);
|
|
81
|
+
set intrinsicErrorMessage(message: string);
|
|
82
|
+
get maxLength(): any;
|
|
83
|
+
set maxLength(requiredMaxLength: any);
|
|
84
|
+
get maxValue(): any;
|
|
85
|
+
set maxValue(inputMaxValue: any);
|
|
86
|
+
get minLength(): number;
|
|
87
|
+
set minLength(requiredMinLength: number);
|
|
88
|
+
get minValue(): any;
|
|
89
|
+
set minValue(inputMinValue: any);
|
|
90
|
+
get name(): string;
|
|
91
|
+
get options(): FieldOption[] | null;
|
|
92
|
+
set options(newOptions: FieldOption[] | null);
|
|
93
|
+
get optionText(): string;
|
|
94
|
+
get outputOnly(): boolean;
|
|
95
|
+
set outputOnly(outputOnly: boolean);
|
|
96
|
+
get required(): boolean;
|
|
97
|
+
set required(required: boolean);
|
|
98
|
+
get title(): string;
|
|
99
|
+
set title(title: string);
|
|
100
|
+
get tooltip(): string;
|
|
101
|
+
set tooltip(tooltip: string);
|
|
102
|
+
get type(): string;
|
|
103
|
+
set type(fieldType: string);
|
|
104
|
+
get validating(): boolean;
|
|
105
|
+
set validating(isValidating: boolean);
|
|
106
|
+
get value(): any;
|
|
107
|
+
get validateOnServer(): boolean;
|
|
108
|
+
set validateOnServer(validateOnServer: boolean);
|
|
109
|
+
get serverAction(): boolean;
|
|
110
|
+
set serverAction(validateOnServer: boolean);
|
|
111
|
+
set value(newValue: any);
|
|
112
|
+
get visibleLabel(): boolean;
|
|
113
|
+
set visibleLabel(visibleLabel: boolean);
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated Use options
|
|
116
|
+
*/
|
|
117
|
+
get fieldOptions(): FieldOption[];
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated Use options
|
|
120
|
+
*/
|
|
121
|
+
set fieldOptions(options: FieldOption[]);
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated Use value
|
|
124
|
+
*/
|
|
125
|
+
get fieldValue(): any;
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated Use hasChanged
|
|
128
|
+
*/
|
|
129
|
+
changed(hasChanged?: boolean): void;
|
|
130
|
+
clean(): void;
|
|
131
|
+
focus(): void;
|
|
132
|
+
getErrorCode(): string;
|
|
133
|
+
setErrorCode(code: any): void;
|
|
134
|
+
getErrorMessage(): string;
|
|
135
|
+
setErrorMessage(msg: any): void;
|
|
136
|
+
getRequired(): boolean;
|
|
137
|
+
hasError(): boolean;
|
|
138
|
+
hideLabel(): void;
|
|
139
|
+
resetError(): void;
|
|
140
|
+
setEditable(editable?: boolean): void;
|
|
141
|
+
setValue(newValue: any, widgetUpdate?: boolean): void;
|
|
142
|
+
showLabel(): void;
|
|
143
|
+
/**
|
|
144
|
+
* @deprecated Use title
|
|
145
|
+
*/
|
|
146
|
+
setLabel(label: any): void;
|
|
147
|
+
/**
|
|
148
|
+
* @deprecated Use required
|
|
149
|
+
*/
|
|
150
|
+
setRequired(required: boolean): void;
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated Use changed
|
|
153
|
+
*/
|
|
154
|
+
setChanged(hasChanged: boolean): void;
|
|
155
|
+
/**
|
|
156
|
+
* @deprecated Use value
|
|
157
|
+
*/
|
|
158
|
+
getValue(): any;
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated Use empty
|
|
161
|
+
*/
|
|
162
|
+
isEmpty(): boolean;
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated Use error
|
|
165
|
+
*/
|
|
166
|
+
getError(): {
|
|
167
|
+
type: string;
|
|
168
|
+
code: string;
|
|
169
|
+
message: string;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* @deprecated Use optionText
|
|
173
|
+
*/
|
|
174
|
+
getOptionText(): string;
|
|
175
|
+
/**
|
|
176
|
+
* @deprecated Use options
|
|
177
|
+
*/
|
|
178
|
+
getFieldOptions(): FieldOption[];
|
|
179
|
+
/**
|
|
180
|
+
* @deprecated Use options
|
|
181
|
+
*/
|
|
182
|
+
setFieldOptions(newOptions: any): any;
|
|
183
|
+
/**
|
|
184
|
+
* @deprecated Use intrinsicErrorMessage
|
|
185
|
+
*/
|
|
186
|
+
setIntrinsicErrorMessage(message: string): void;
|
|
187
|
+
/**
|
|
188
|
+
* @deprecated Use maxValue
|
|
189
|
+
*/
|
|
190
|
+
setMaxValue(inputMaxValue: any): void;
|
|
191
|
+
/**
|
|
192
|
+
* @deprecated Use minValue
|
|
193
|
+
*/
|
|
194
|
+
setMinValue(inputMinValue: any): void;
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated Use showLabel
|
|
197
|
+
*/
|
|
198
|
+
setVisibleLabel(visibleLabel: boolean): void;
|
|
199
|
+
notifyEditionPartial(): void;
|
|
200
|
+
notifyEditionFinish(): void;
|
|
201
|
+
notifyEditionDetailRequest(detail: any): void;
|
|
202
|
+
setError(code: any, message: any, type?: string): void;
|
|
203
|
+
updateFromServer(fld: any): void;
|
|
204
|
+
private _setValue;
|
|
205
|
+
}
|
|
@@ -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,137 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { FormAction } from './action';
|
|
3
|
+
import { FieldDescriptor, FieldOption } from './field';
|
|
4
|
+
import { RecordTable } from './table/table';
|
|
5
|
+
import { RecordFormSection } from './section';
|
|
6
|
+
import { RecordFormSubSection } from './subsection';
|
|
7
|
+
import { TableRecordData } from './table/row-data';
|
|
8
|
+
export interface FieldPayload {
|
|
9
|
+
fieldCode: string;
|
|
10
|
+
fieldValue: any;
|
|
11
|
+
editable: boolean;
|
|
12
|
+
visible: boolean;
|
|
13
|
+
required: boolean;
|
|
14
|
+
fieldOptions: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TablePayload {
|
|
17
|
+
tableCode: string;
|
|
18
|
+
visible: boolean;
|
|
19
|
+
currentPage: number;
|
|
20
|
+
requestedPage: number;
|
|
21
|
+
recordsPerPage: number;
|
|
22
|
+
currentFilter: any;
|
|
23
|
+
sortingColumn: string;
|
|
24
|
+
sortingDirection: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class FormStructureAndData {
|
|
27
|
+
private readonly _stateChange;
|
|
28
|
+
state: string;
|
|
29
|
+
_name: string;
|
|
30
|
+
_formConfig: any;
|
|
31
|
+
private _title;
|
|
32
|
+
private _stateFlow;
|
|
33
|
+
private _fieldArray;
|
|
34
|
+
private _fields;
|
|
35
|
+
private _actionArray;
|
|
36
|
+
private _actions;
|
|
37
|
+
private _tableArray;
|
|
38
|
+
private _tables;
|
|
39
|
+
private _sectionArray;
|
|
40
|
+
private _sections;
|
|
41
|
+
private _immutableData;
|
|
42
|
+
private _extraInfo;
|
|
43
|
+
private _exclusiveSectionsByAttr;
|
|
44
|
+
constructor(definitionReceived: any, formConfig: any);
|
|
45
|
+
getTitle(): string;
|
|
46
|
+
setTitle(title: string): void;
|
|
47
|
+
get name(): string;
|
|
48
|
+
set name(name: string);
|
|
49
|
+
get defaultState(): string;
|
|
50
|
+
supportState(state: string): boolean;
|
|
51
|
+
supportMode(state: string): boolean;
|
|
52
|
+
get states(): any[];
|
|
53
|
+
getCurrentState(): string;
|
|
54
|
+
changeState(newState: string): boolean;
|
|
55
|
+
get stateChange(): Subject<any>;
|
|
56
|
+
setStateFlow(states?: any, transitions?: any, defaultState?: string): void;
|
|
57
|
+
getImmutableElement(name: string): any;
|
|
58
|
+
set immutableData(immutableData: any);
|
|
59
|
+
get immutableData(): any;
|
|
60
|
+
getExtraInfo(name: string): any;
|
|
61
|
+
set extraInfo(extraInfo: any);
|
|
62
|
+
get extraInfo(): any;
|
|
63
|
+
get fields(): any;
|
|
64
|
+
get fieldNames(): string[];
|
|
65
|
+
getFields(): FieldDescriptor[];
|
|
66
|
+
getFieldNames(): string[];
|
|
67
|
+
getField(code: string): FieldDescriptor;
|
|
68
|
+
enableField(code: string): void;
|
|
69
|
+
disableField(code: string): void;
|
|
70
|
+
getFieldValue(code: string): any;
|
|
71
|
+
getFieldOptionText(code: string): any;
|
|
72
|
+
getFieldOptions(code: string): FieldOption[] | null;
|
|
73
|
+
setFieldValue(code: string, value: any): any;
|
|
74
|
+
setFieldError(code: string, errorCode: string, message: string, type?: string): any;
|
|
75
|
+
setFieldIntrinsicErrorMessage(code: string, message: string): any;
|
|
76
|
+
setFieldRequired(inputCodes: string[] | string | null, required: boolean): any;
|
|
77
|
+
setFieldErrorMessage(code: string, message: string): any;
|
|
78
|
+
setFieldOptions(code: string, optionsArray: any[], idAttribute: string, nameAttribute: string): any;
|
|
79
|
+
getFieldSet(filter: any, inputCodes: string[] | string | null, secCode?: string | null, subCode?: string | null): string[];
|
|
80
|
+
applyOnFields(processFunc: any, inputCodes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
81
|
+
enableFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
82
|
+
showFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
83
|
+
hideFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
84
|
+
showLabelFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
85
|
+
hideLabelFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
86
|
+
disableFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
87
|
+
cleanFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
88
|
+
tagFieldsWithError(message: string, codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
89
|
+
cleanErrorFields(codes?: string[] | string | null, secCode?: string, subCode?: string): number;
|
|
90
|
+
tagEmptyRequiredFields(message: string, codes?: any, secCode?: string, subCode?: string): boolean;
|
|
91
|
+
getRequiredFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
92
|
+
getRequiredEmptyFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
93
|
+
getChangedFields(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
94
|
+
getFieldsWithValidationIssues(codes?: string[] | string | null, secCode?: string, subCode?: string): string[];
|
|
95
|
+
getFieldsValues(inputCodes?: string[] | string | null, secCode?: string, subCode?: string): any;
|
|
96
|
+
get actions(): {};
|
|
97
|
+
getActionsByAttribute(name: string, value: any): FormAction[];
|
|
98
|
+
getActions(): FormAction[];
|
|
99
|
+
getAction(code: string): FormAction;
|
|
100
|
+
showActions(codes: string[] | string): void;
|
|
101
|
+
hideActions(codes: string[] | string): void;
|
|
102
|
+
enableActions(codes: string[] | string): void;
|
|
103
|
+
disableActions(codes: string[] | string): void;
|
|
104
|
+
execOnActions(codes: string[] | string | null, functionName: string): void;
|
|
105
|
+
get tables(): any;
|
|
106
|
+
getTables(): RecordTable[];
|
|
107
|
+
getTable(code: string): RecordTable;
|
|
108
|
+
getTableRecord(code: string, id: string): TableRecordData;
|
|
109
|
+
enableTables(codes: string[] | string): void;
|
|
110
|
+
disableTables(codes: string[] | string): void;
|
|
111
|
+
showTables(codes: string[] | string): void;
|
|
112
|
+
hideTables(codes: string[] | string): void;
|
|
113
|
+
cleanTables(codes: string[] | string): void;
|
|
114
|
+
execOnTables(codes: string[] | string | null, functionName: string): void;
|
|
115
|
+
get sections(): any;
|
|
116
|
+
getSections(): RecordFormSection[];
|
|
117
|
+
getSectionsByAttribute(name: any, value: any): RecordFormSection[];
|
|
118
|
+
get sectionTitles(): string[];
|
|
119
|
+
get visibleSections(): RecordFormSection[];
|
|
120
|
+
getSection(code: string): RecordFormSection;
|
|
121
|
+
showSections(codes: string[] | string): void;
|
|
122
|
+
hideSections(codes: string[] | string): void;
|
|
123
|
+
activeSection(): string;
|
|
124
|
+
getSubSection(code: string, subCode: any): RecordFormSubSection;
|
|
125
|
+
showSubSections(code: string, subCodes: string[] | string): void;
|
|
126
|
+
hideSubSections(code: string, subCodes: string[] | string): void;
|
|
127
|
+
getSectionActions(code: any): FormAction[];
|
|
128
|
+
getSectionActionNames(code: any): string[];
|
|
129
|
+
activateSection(code: string): void;
|
|
130
|
+
execOnSections(codes: string[] | string | null, functionName: string): void;
|
|
131
|
+
execOnSubSections(code: string, subNames: string[] | string | null, functionName: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* Métodos propios de gestión del formulario
|
|
134
|
+
*/
|
|
135
|
+
cleanData(): void;
|
|
136
|
+
getPayload(): any;
|
|
137
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { FormPiece } from './piece';
|
|
3
|
+
export declare class FormPiecePropagate extends FormPiece {
|
|
4
|
+
protected propagationCustomAttributes: string[];
|
|
5
|
+
protected _attributeChange: BehaviorSubject<any>;
|
|
6
|
+
constructor(pieceDefinition: any, formConfig: any);
|
|
7
|
+
get attributeChange(): BehaviorSubject<any>;
|
|
8
|
+
propagateAttribute(name: any, value: any): void;
|
|
9
|
+
setCustomAttribute(name: string, value: any): void;
|
|
10
|
+
setVisibility(visible: boolean, forced?: boolean | null): void;
|
|
11
|
+
set enabled(enabled: any);
|
|
12
|
+
formStateChange(state: any): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare class FormPiece {
|
|
2
|
+
protected _formState: string;
|
|
3
|
+
protected _visibleForced: boolean;
|
|
4
|
+
protected _isForced: boolean;
|
|
5
|
+
protected _absoluteVisible: boolean;
|
|
6
|
+
protected _absoluteDisabled: boolean;
|
|
7
|
+
protected visibleStates: string[] | null;
|
|
8
|
+
protected enabledStates: string[] | null;
|
|
9
|
+
_formConfig: any;
|
|
10
|
+
_visible: boolean;
|
|
11
|
+
_disabled: boolean;
|
|
12
|
+
customAttributes: any;
|
|
13
|
+
constructor(pieceDefinition: any, formConfig: any);
|
|
14
|
+
getCustomAttribute(name: string): any;
|
|
15
|
+
setCustomAttribute(name: string, value: any): void;
|
|
16
|
+
setCustomAttributes(attributes: any): void;
|
|
17
|
+
matchAttribute(name: string, value: string): boolean;
|
|
18
|
+
setVisibleStates(newStates: any): void;
|
|
19
|
+
setEnabledStates(newStates: any): void;
|
|
20
|
+
viewOnState(state: string): boolean;
|
|
21
|
+
enabledOnState(state: string): boolean;
|
|
22
|
+
get absoluteVisible(): boolean;
|
|
23
|
+
get absoluteDisabled(): boolean;
|
|
24
|
+
get visible(): boolean;
|
|
25
|
+
set visible(visible: boolean);
|
|
26
|
+
visibleOn(state: string): boolean;
|
|
27
|
+
enabledOn(state: string): boolean;
|
|
28
|
+
setVisibility(visible: boolean, forced?: boolean | null): void;
|
|
29
|
+
show(forced?: boolean | null): void;
|
|
30
|
+
hide(forced?: boolean | null): void;
|
|
31
|
+
get enabled(): boolean;
|
|
32
|
+
set enabled(enabled: boolean);
|
|
33
|
+
get editable(): boolean;
|
|
34
|
+
get disabled(): boolean;
|
|
35
|
+
set disabled(disabled: boolean);
|
|
36
|
+
enable(): void;
|
|
37
|
+
disable(): void;
|
|
38
|
+
formStateChangeCustomSubscribe(formChangeSubject: any): void;
|
|
39
|
+
formStateChange(state: any): void;
|
|
40
|
+
subscribeFormStateChange(formChangeSubject: any): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { FormPiecePropagate } from './piece-propagate';
|
|
3
|
+
import { FormAction } from './action';
|
|
4
|
+
import { RecordFormSubSection } from './subsection';
|
|
5
|
+
export declare class RecordFormSection extends FormPiecePropagate {
|
|
6
|
+
private readonly _activation;
|
|
7
|
+
private readonly _inactivation;
|
|
8
|
+
active: boolean;
|
|
9
|
+
sectionId: string | null;
|
|
10
|
+
sectionCode: string | null;
|
|
11
|
+
sectionTitle: string | null;
|
|
12
|
+
subSections: RecordFormSubSection[];
|
|
13
|
+
subSectionsObj: any;
|
|
14
|
+
private _exclusiveSubSectionsByAttr;
|
|
15
|
+
constructor(sectionReceived: any, formObject: any, formConfig: any);
|
|
16
|
+
get code(): string;
|
|
17
|
+
get activation(): Subject<string>;
|
|
18
|
+
get inactivation(): Subject<string>;
|
|
19
|
+
activate(): void;
|
|
20
|
+
inactivate(): void;
|
|
21
|
+
get title(): string;
|
|
22
|
+
set title(title: string);
|
|
23
|
+
getVisibleSubsections(state: any): RecordFormSubSection[];
|
|
24
|
+
getSubsection(subSectionCode: any): any;
|
|
25
|
+
activateSubSection(subSectionCode: any): void;
|
|
26
|
+
getFields(): any[];
|
|
27
|
+
getActions(): FormAction[];
|
|
28
|
+
getActionNames(): string[];
|
|
29
|
+
getFieldNames(): string[];
|
|
30
|
+
getField(name: any): any;
|
|
31
|
+
formStateChangeCustomSubscribe(formChangeSubject: any): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FormPiecePropagate } from './piece-propagate';
|
|
2
|
+
import { FormAction } from './action';
|
|
3
|
+
export declare class RecordFormSubSection extends FormPiecePropagate {
|
|
4
|
+
_customRender: string | null;
|
|
5
|
+
subsectionId: string | null;
|
|
6
|
+
subsectionCode: string | null;
|
|
7
|
+
subsectionTitle: string | null;
|
|
8
|
+
subSectionElements: any[];
|
|
9
|
+
subSectionFields: any[];
|
|
10
|
+
subSectionTables: any[];
|
|
11
|
+
subSectionActions: any[];
|
|
12
|
+
elementsArray: any;
|
|
13
|
+
active: boolean;
|
|
14
|
+
constructor(subsectionReceived: any, formObject: any, formConfig: any);
|
|
15
|
+
get customRender(): string;
|
|
16
|
+
set customRender(customRenderName: string);
|
|
17
|
+
getField(name: any): any;
|
|
18
|
+
getFields(): any[];
|
|
19
|
+
getFieldNames(): any[];
|
|
20
|
+
getActions(): FormAction[];
|
|
21
|
+
getActionNames(): string[];
|
|
22
|
+
activate(): void;
|
|
23
|
+
inactivate(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormPiece } from '../piece';
|
|
2
|
+
export declare class TableAction extends FormPiece {
|
|
3
|
+
newState: string;
|
|
4
|
+
actionCode: string;
|
|
5
|
+
actionTitle: string;
|
|
6
|
+
iconName: string;
|
|
7
|
+
actionType: string;
|
|
8
|
+
actionClass: string;
|
|
9
|
+
stateField: string;
|
|
10
|
+
backend: boolean;
|
|
11
|
+
restrictedOnField: string;
|
|
12
|
+
restrictedOnValue: string;
|
|
13
|
+
restrictedOnOperator: string;
|
|
14
|
+
constructor(actionDefinition: any, formConfig: any);
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FormPiece } from '../piece';
|
|
2
|
+
export interface FilterDef {
|
|
3
|
+
operators: string[];
|
|
4
|
+
options: any[];
|
|
5
|
+
}
|
|
6
|
+
export interface FilterSetup {
|
|
7
|
+
fieldCode: string;
|
|
8
|
+
operator: string;
|
|
9
|
+
values: any[];
|
|
10
|
+
}
|
|
11
|
+
export declare class RecordTableColumn extends FormPiece {
|
|
12
|
+
fieldCode: string;
|
|
13
|
+
fieldTitle: string;
|
|
14
|
+
fieldType: string;
|
|
15
|
+
fieldAlignment: string;
|
|
16
|
+
fieldFormat: string;
|
|
17
|
+
sortable: boolean;
|
|
18
|
+
searchable: boolean;
|
|
19
|
+
sortDirections: string[];
|
|
20
|
+
filterVisible: boolean;
|
|
21
|
+
filterDef: FilterDef | null;
|
|
22
|
+
filterSetup: FilterSetup | null;
|
|
23
|
+
constructor(recTableColReceived: any, formConfig: any);
|
|
24
|
+
setSearchable(searchable?: boolean): void;
|
|
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 | null;
|
|
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 | null;
|
|
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 _tableColumnObj;
|
|
23
|
+
private _appendPages;
|
|
24
|
+
private _actions;
|
|
25
|
+
private _actionsObj;
|
|
26
|
+
private globalFilterString;
|
|
27
|
+
private globalFilterStrings;
|
|
28
|
+
private selectedRecords;
|
|
29
|
+
private restrictedId;
|
|
30
|
+
private layout;
|
|
31
|
+
globalSearch: boolean;
|
|
32
|
+
tableRecords: TableRecordData[];
|
|
33
|
+
tableRecordObj: {};
|
|
34
|
+
visibleRecords: TableRecordData[] | null;
|
|
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
|
+
getLayout(): string;
|
|
60
|
+
setLayout(layout: any): void;
|
|
61
|
+
hasActions(): boolean;
|
|
62
|
+
getSelectedRecords(): string[];
|
|
63
|
+
activateGlobalSearch(): void;
|
|
64
|
+
inactivateGlobalSearch(): void;
|
|
65
|
+
columnDefinition(fieldCode: any): RecordTableColumn;
|
|
66
|
+
putOnWait(): void;
|
|
67
|
+
freeWaiting(): void;
|
|
68
|
+
notifyGlobalAction(actionCode: any): void;
|
|
69
|
+
notifyInlineAction(tableActionEvent: TableActionEvent): void;
|
|
70
|
+
notifyRecordSelection(recordId: any): void;
|
|
71
|
+
notifySelectionAction(actionCode: any): void;
|
|
72
|
+
notifyGetDataAction(requestedPage?: any): any;
|
|
73
|
+
clean(): void;
|
|
74
|
+
selectAll(): boolean;
|
|
75
|
+
unSelectAll(): boolean;
|
|
76
|
+
setTableRecords(tableRecords: any, append: any): void;
|
|
77
|
+
appendRecords(records: any): void;
|
|
78
|
+
replaceRecords(records: any): void;
|
|
79
|
+
setTableAppend(append: boolean): void;
|
|
80
|
+
changePage(requestedPage: any): void;
|
|
81
|
+
updateVisibleRecords(): void;
|
|
82
|
+
updateFromServer(tableReceived: any): void;
|
|
83
|
+
getTableRecord(recordId: any): any;
|
|
84
|
+
getAction(actionCode: any): any;
|
|
85
|
+
getActions(actionClass?: string, actionTypes?: string[]): TableAction[];
|
|
86
|
+
setFilterById(id: any): void;
|
|
87
|
+
cleanIdFilter(): void;
|
|
88
|
+
setGlobalFilterString(text: any, notifyComponent?: boolean): void;
|
|
89
|
+
addFilterDefinition(columnName: any, filterDefinition: any): void;
|
|
90
|
+
getFilteredRecords(): TableRecordData[];
|
|
91
|
+
getColumnFilter(columnName: string): import("./column").FilterSetup;
|
|
92
|
+
addColumnFilter(columnName: string, columnValues: any | any[], operator?: string): void;
|
|
93
|
+
removeColumnFilter(columnName: string): void;
|
|
94
|
+
get currentFilter(): any;
|
|
95
|
+
sort(columnName: any, direction: any): void;
|
|
96
|
+
setRequiredOrder(columnField: any, direction?: any): void;
|
|
97
|
+
localSortData(): void;
|
|
98
|
+
recordCompare(recordA: TableRecordData, recordB: TableRecordData, columnCompare: any, direction: any): number;
|
|
99
|
+
formStateChangeCustomSubscribe(formChangeSubject: any): void;
|
|
100
|
+
}
|