tuain-ng-forms-lib 15.2.12 → 17.1.0
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/esm2022/lib/classes/forms/action.mjs +104 -0
- package/esm2022/lib/classes/forms/element.mjs +23 -0
- package/esm2022/lib/classes/forms/field.mjs +468 -0
- package/esm2022/lib/classes/forms/form.mjs +581 -0
- package/esm2022/lib/classes/forms/piece-propagate.mjs +39 -0
- package/esm2022/lib/classes/forms/piece.mjs +126 -0
- package/esm2022/lib/classes/forms/section.mjs +151 -0
- package/esm2022/lib/classes/forms/subsection.mjs +99 -0
- package/esm2022/lib/classes/forms/table/action.mjs +38 -0
- package/esm2022/lib/classes/forms/table/column.mjs +74 -0
- package/esm2022/lib/classes/forms/table/row-data.mjs +116 -0
- package/esm2022/lib/classes/forms/table/table.mjs +523 -0
- package/esm2022/lib/components/elements/action.component.mjs +62 -0
- package/esm2022/lib/components/elements/field.component.mjs +99 -0
- package/esm2022/lib/components/elements/layout/element.component.mjs +21 -0
- package/esm2022/lib/components/elements/layout/form-error.component.mjs +23 -0
- package/esm2022/lib/components/elements/layout/form-header.component.mjs +23 -0
- package/esm2022/lib/components/elements/layout/piece.component.mjs +64 -0
- package/esm2022/lib/components/elements/layout/section.component.mjs +48 -0
- package/esm2022/lib/components/elements/layout/sub-section.component.mjs +48 -0
- package/esm2022/lib/components/elements/tables/table-record-action.component.mjs +72 -0
- package/esm2022/lib/components/elements/tables/table-record-field.component.mjs +31 -0
- package/esm2022/lib/components/elements/tables/table.component.mjs +98 -0
- package/esm2022/lib/components/forms/basic-form.mjs +1314 -0
- package/esm2022/lib/services/event-manager.service.mjs +43 -0
- package/esm2022/lib/services/form-manager.service.mjs +81 -0
- package/{esm2020 → esm2022}/lib/tuain-ng-forms-lib.module.mjs +29 -29
- package/{fesm2020 → fesm2022}/tuain-ng-forms-lib.mjs +832 -603
- package/fesm2022/tuain-ng-forms-lib.mjs.map +1 -0
- package/lib/classes/forms/action.d.ts +30 -14
- package/lib/classes/forms/field.d.ts +9 -4
- package/lib/classes/forms/section.d.ts +18 -6
- package/lib/classes/forms/subsection.d.ts +28 -10
- package/lib/classes/forms/table/table.d.ts +63 -21
- package/lib/components/elements/action.component.d.ts +9 -2
- package/lib/components/elements/field.component.d.ts +22 -16
- package/lib/components/elements/layout/element.component.d.ts +1 -1
- package/lib/components/elements/layout/form-error.component.d.ts +1 -1
- package/lib/components/elements/layout/form-header.component.d.ts +1 -1
- package/lib/components/elements/layout/piece.component.d.ts +9 -5
- package/lib/components/elements/layout/section.component.d.ts +2 -1
- package/lib/components/elements/layout/sub-section.component.d.ts +2 -1
- package/lib/components/elements/tables/table-record-action.component.d.ts +2 -1
- package/lib/components/elements/tables/table-record-field.component.d.ts +1 -1
- package/lib/components/elements/tables/table.component.d.ts +12 -5
- package/lib/components/forms/basic-form.d.ts +1 -1
- package/package.json +7 -13
- package/esm2020/lib/classes/forms/action.mjs +0 -72
- package/esm2020/lib/classes/forms/element.mjs +0 -18
- package/esm2020/lib/classes/forms/field.mjs +0 -454
- package/esm2020/lib/classes/forms/form.mjs +0 -574
- package/esm2020/lib/classes/forms/piece-propagate.mjs +0 -38
- package/esm2020/lib/classes/forms/piece.mjs +0 -123
- package/esm2020/lib/classes/forms/section.mjs +0 -138
- package/esm2020/lib/classes/forms/subsection.mjs +0 -81
- package/esm2020/lib/classes/forms/table/action.mjs +0 -30
- package/esm2020/lib/classes/forms/table/column.mjs +0 -74
- package/esm2020/lib/classes/forms/table/row-data.mjs +0 -116
- package/esm2020/lib/classes/forms/table/table.mjs +0 -464
- package/esm2020/lib/components/elements/action.component.mjs +0 -55
- package/esm2020/lib/components/elements/field.component.mjs +0 -99
- package/esm2020/lib/components/elements/layout/element.component.mjs +0 -20
- package/esm2020/lib/components/elements/layout/form-error.component.mjs +0 -20
- package/esm2020/lib/components/elements/layout/form-header.component.mjs +0 -24
- package/esm2020/lib/components/elements/layout/piece.component.mjs +0 -40
- package/esm2020/lib/components/elements/layout/section.component.mjs +0 -39
- package/esm2020/lib/components/elements/layout/sub-section.component.mjs +0 -39
- package/esm2020/lib/components/elements/tables/table-record-action.component.mjs +0 -67
- package/esm2020/lib/components/elements/tables/table-record-field.component.mjs +0 -30
- package/esm2020/lib/components/elements/tables/table.component.mjs +0 -92
- package/esm2020/lib/components/forms/basic-form.mjs +0 -1310
- package/esm2020/lib/services/event-manager.service.mjs +0 -43
- package/esm2020/lib/services/form-manager.service.mjs +0 -80
- package/fesm2015/tuain-ng-forms-lib.mjs +0 -4305
- package/fesm2015/tuain-ng-forms-lib.mjs.map +0 -1
- package/fesm2020/tuain-ng-forms-lib.mjs.map +0 -1
- /package/{esm2020 → esm2022}/lib/classes/forms/form.constants.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/file-manager.service.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/tuain-ng-forms-lib.mjs +0 -0
- /package/{tuain-ng-forms-lib.d.ts → index.d.ts} +0 -0
|
@@ -2,24 +2,40 @@ import { Subject } from 'rxjs';
|
|
|
2
2
|
import { FormElement } from './element';
|
|
3
3
|
export declare class FormAction extends FormElement {
|
|
4
4
|
private readonly _actionActivated;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
customValidation: any;
|
|
5
|
+
private _actionCode;
|
|
6
|
+
private _actionName;
|
|
7
|
+
private _iconName;
|
|
8
|
+
private _inProgress;
|
|
9
|
+
private _newState;
|
|
10
|
+
private _backend;
|
|
11
|
+
private _restrictedOnField;
|
|
12
|
+
private _restrictedOnOperator;
|
|
13
|
+
private _restrictedOnValue;
|
|
15
14
|
constructor(actionDefinition: any, formConfig: any);
|
|
15
|
+
get actionCode(): string;
|
|
16
|
+
get actionName(): string;
|
|
17
|
+
get iconName(): string;
|
|
18
|
+
get inProgress(): boolean;
|
|
19
|
+
get newState(): string;
|
|
20
|
+
get backend(): boolean;
|
|
21
|
+
get restrictedOnField(): string;
|
|
22
|
+
get restrictedOnOperator(): string;
|
|
23
|
+
get restrictedOnValue(): string;
|
|
24
|
+
set actionCode(actionCode: string);
|
|
25
|
+
set actionName(actionName: string);
|
|
26
|
+
set iconName(iconName: string);
|
|
27
|
+
set inProgress(inProgress: boolean);
|
|
28
|
+
set newState(newState: string);
|
|
29
|
+
set backend(backend: boolean);
|
|
30
|
+
set restrictedOnField(restrictedOnField: string);
|
|
31
|
+
set restrictedOnOperator(restrictedOnOperator: string);
|
|
32
|
+
set restrictedOnValue(restrictedOnValue: string);
|
|
33
|
+
start(): void;
|
|
34
|
+
stop(): void;
|
|
16
35
|
connectWithParentForm(form: any, formChangeSubject: any): void;
|
|
17
|
-
updateRestrictedVisibility(): void;
|
|
36
|
+
updateRestrictedVisibility(event: any): void;
|
|
18
37
|
viewOnState(state: string): boolean;
|
|
19
38
|
get actionActivated(): Subject<string>;
|
|
20
|
-
start(): void;
|
|
21
|
-
stop(): void;
|
|
22
39
|
notifyActivation(): void;
|
|
23
40
|
updateFromServer(receivedAction: any): void;
|
|
24
|
-
setCustomValidation(callback: any): void;
|
|
25
41
|
}
|
|
@@ -39,8 +39,8 @@ export declare class FieldDescriptor extends FormElement {
|
|
|
39
39
|
private _outputOnly;
|
|
40
40
|
private _tooltipText;
|
|
41
41
|
private _placeholder;
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
private _fieldCode;
|
|
43
|
+
private _fieldOptions;
|
|
44
44
|
constructor(inputFieldReceived: any, formConfig: any);
|
|
45
45
|
get alignment(): string;
|
|
46
46
|
set alignment(alignment: string);
|
|
@@ -50,8 +50,8 @@ export declare class FieldDescriptor extends FormElement {
|
|
|
50
50
|
get placeholder(): string;
|
|
51
51
|
set placeholder(placeholder: string);
|
|
52
52
|
get code(): string;
|
|
53
|
-
get defaultValue():
|
|
54
|
-
set defaultValue(defaultValue:
|
|
53
|
+
get defaultValue(): any;
|
|
54
|
+
set defaultValue(defaultValue: any);
|
|
55
55
|
get defaultEditable(): boolean;
|
|
56
56
|
set defaultEditable(editable: boolean);
|
|
57
57
|
get detailRequest(): Subject<DetailEvent>;
|
|
@@ -103,6 +103,7 @@ export declare class FieldDescriptor extends FormElement {
|
|
|
103
103
|
set tooltip(tooltip: string);
|
|
104
104
|
get type(): string;
|
|
105
105
|
set type(fieldType: string);
|
|
106
|
+
get onValidation(): boolean;
|
|
106
107
|
get validating(): boolean;
|
|
107
108
|
set validating(isValidating: boolean);
|
|
108
109
|
get value(): any;
|
|
@@ -134,6 +135,10 @@ export declare class FieldDescriptor extends FormElement {
|
|
|
134
135
|
setEditable(editable?: boolean): void;
|
|
135
136
|
setValue(newValue: any, widgetUpdate?: boolean): void;
|
|
136
137
|
showLabel(): void;
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated Use code
|
|
140
|
+
*/
|
|
141
|
+
get fieldCode(): string;
|
|
137
142
|
/**
|
|
138
143
|
* @deprecated Use title
|
|
139
144
|
*/
|
|
@@ -5,17 +5,29 @@ import { RecordFormSubSection } from './subsection';
|
|
|
5
5
|
export declare class RecordFormSection extends FormPiecePropagate {
|
|
6
6
|
private readonly _activation;
|
|
7
7
|
private readonly _inactivation;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
private _active;
|
|
9
|
+
private _sectionId;
|
|
10
|
+
private _sectionCode;
|
|
11
|
+
private _sectionTitle;
|
|
12
|
+
private _subSections;
|
|
13
|
+
private _subSectionsObj;
|
|
14
14
|
private _exclusiveSubSectionsByAttr;
|
|
15
15
|
constructor(sectionReceived: any, formObject: any, formConfig: any);
|
|
16
16
|
get code(): string;
|
|
17
17
|
get activation(): Subject<string>;
|
|
18
18
|
get inactivation(): Subject<string>;
|
|
19
|
+
get active(): boolean;
|
|
20
|
+
get sectionId(): string;
|
|
21
|
+
get sectionCode(): string;
|
|
22
|
+
get sectionTitle(): string;
|
|
23
|
+
get subSections(): RecordFormSubSection[];
|
|
24
|
+
get subSectionsObj(): any;
|
|
25
|
+
set active(active: boolean);
|
|
26
|
+
set sectionId(sectionId: string);
|
|
27
|
+
set sectionCode(sectionCode: string);
|
|
28
|
+
set sectionTitle(sectionTitle: string);
|
|
29
|
+
set subSections(subSections: RecordFormSubSection[]);
|
|
30
|
+
set subSectionsObj(subSectionsObj: any);
|
|
19
31
|
activate(): void;
|
|
20
32
|
inactivate(): void;
|
|
21
33
|
get title(): string;
|
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
import { FormPiecePropagate } from './piece-propagate';
|
|
2
2
|
import { FormAction } from './action';
|
|
3
3
|
export declare class RecordFormSubSection extends FormPiecePropagate {
|
|
4
|
-
_customRender
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
private _customRender;
|
|
5
|
+
private _subsectionId;
|
|
6
|
+
private _subsectionCode;
|
|
7
|
+
private _subsectionTitle;
|
|
8
|
+
private _subSectionElements;
|
|
9
|
+
private _subSectionFields;
|
|
10
|
+
private _subSectionTables;
|
|
11
|
+
private _subSectionActions;
|
|
12
|
+
private _elementsArray;
|
|
13
|
+
private _active;
|
|
14
14
|
constructor(subsectionReceived: any, formObject: any, formConfig: any);
|
|
15
15
|
get customRender(): string;
|
|
16
16
|
set customRender(customRenderName: string);
|
|
17
|
+
get subsectionId(): string;
|
|
18
|
+
get subsectionCode(): string;
|
|
19
|
+
get subsectionTitle(): string;
|
|
20
|
+
get subSectionElements(): any[];
|
|
21
|
+
get subSectionFields(): any[];
|
|
22
|
+
get subSectionTables(): any[];
|
|
23
|
+
get subSectionActions(): any[];
|
|
24
|
+
get elementsArray(): any;
|
|
25
|
+
get active(): boolean;
|
|
26
|
+
set subsectionId(subsectionId: string);
|
|
27
|
+
set subsectionCode(subsectionCode: string);
|
|
28
|
+
set subsectionTitle(subsectionTitle: string);
|
|
29
|
+
set subSectionElements(subSectionElements: any[]);
|
|
30
|
+
set subSectionFields(subSectionFields: any[]);
|
|
31
|
+
set subSectionTables(subSectionTables: any[]);
|
|
32
|
+
set subSectionActions(subSectionActions: any[]);
|
|
33
|
+
set elementsArray(elementsArray: any);
|
|
34
|
+
set active(active: boolean);
|
|
17
35
|
getField(name: any): any;
|
|
18
36
|
getFields(): any[];
|
|
19
37
|
getFieldNames(): any[];
|
|
@@ -28,27 +28,27 @@ export declare class RecordTable extends FormElement {
|
|
|
28
28
|
private selectedRecords;
|
|
29
29
|
private restrictedId;
|
|
30
30
|
private layout;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
52
|
constructor(tableReceived: any, formConfig: any);
|
|
53
53
|
get columnNames(): string[];
|
|
54
54
|
get inlineActionTrigger(): Subject<TableEvent>;
|
|
@@ -56,6 +56,48 @@ export declare class RecordTable extends FormElement {
|
|
|
56
56
|
get selectionActionTrigger(): Subject<TableEvent>;
|
|
57
57
|
get recordSelectionTrigger(): Subject<TableEvent>;
|
|
58
58
|
get getDataTrigger(): Subject<TableEvent>;
|
|
59
|
+
get globalSearch(): boolean;
|
|
60
|
+
get tableRecords(): TableRecordData[];
|
|
61
|
+
get tableRecordObj(): {};
|
|
62
|
+
get visibleRecords(): TableRecordData[];
|
|
63
|
+
get columns(): RecordTableColumn[];
|
|
64
|
+
get selectable(): boolean;
|
|
65
|
+
get selectionBackend(): boolean;
|
|
66
|
+
get selectionField(): string;
|
|
67
|
+
get allSelected(): boolean;
|
|
68
|
+
get tableCode(): string;
|
|
69
|
+
get tableTitle(): string;
|
|
70
|
+
get currentPage(): number;
|
|
71
|
+
get totalPages(): number;
|
|
72
|
+
get requestedPage(): number;
|
|
73
|
+
get recordsPerPage(): number;
|
|
74
|
+
get totalRecordsNumber(): number;
|
|
75
|
+
get recordsNumber(): number;
|
|
76
|
+
get sorting(): any;
|
|
77
|
+
get waiting(): boolean;
|
|
78
|
+
get clientPaging(): boolean;
|
|
79
|
+
get sortable(): boolean;
|
|
80
|
+
set globalSearch(globalSearch: boolean);
|
|
81
|
+
set tableRecords(tableRecords: TableRecordData[]);
|
|
82
|
+
set tableRecordObj(tableRecordObj: {});
|
|
83
|
+
set visibleRecords(visibleRecords: TableRecordData[]);
|
|
84
|
+
set columns(columns: RecordTableColumn[]);
|
|
85
|
+
set selectable(selectable: boolean);
|
|
86
|
+
set selectionBackend(selectionBackend: boolean);
|
|
87
|
+
set selectionField(selectionField: string);
|
|
88
|
+
set allSelected(allSelected: boolean);
|
|
89
|
+
set tableCode(tableCode: string);
|
|
90
|
+
set tableTitle(tableTitle: string);
|
|
91
|
+
set currentPage(currentPage: number);
|
|
92
|
+
set totalPages(totalPages: number);
|
|
93
|
+
set requestedPage(requestedPage: number);
|
|
94
|
+
set recordsPerPage(recordsPerPage: number);
|
|
95
|
+
set totalRecordsNumber(totalRecordsNumber: number);
|
|
96
|
+
set recordsNumber(recordsNumber: number);
|
|
97
|
+
set sorting(sorting: any);
|
|
98
|
+
set waiting(waiting: boolean);
|
|
99
|
+
set clientPaging(clientPaging: boolean);
|
|
100
|
+
set sortable(sortable: boolean);
|
|
59
101
|
getLayout(): string;
|
|
60
102
|
setLayout(layout: any): void;
|
|
61
103
|
hasActions(): boolean;
|
|
@@ -3,11 +3,18 @@ import { FormAction } from '../../classes/forms/action';
|
|
|
3
3
|
import { ElementComponent } from './layout/element.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ActionComponent extends ElementComponent implements OnInit {
|
|
6
|
-
|
|
6
|
+
actionCode: any;
|
|
7
|
+
actionName: any;
|
|
8
|
+
iconName: any;
|
|
9
|
+
inProgress: any;
|
|
10
|
+
restrictedOnField: any;
|
|
11
|
+
restrictedOnOperator: any;
|
|
12
|
+
restrictedOnValue: any;
|
|
7
13
|
action: FormAction | null;
|
|
14
|
+
updatePropagatedAttributes(): void;
|
|
8
15
|
ngOnInit(): void;
|
|
9
16
|
start(): void;
|
|
10
17
|
activate(): void;
|
|
11
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActionComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ActionComponent, "lib-action", never, { "action": "action"; }, {}, never, ["*"], false>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionComponent, "lib-action", never, { "action": { "alias": "action"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
13
20
|
}
|
|
@@ -3,28 +3,35 @@ import { FieldDescriptor } from '../../classes/forms/field';
|
|
|
3
3
|
import { ElementComponent } from './layout/element.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FieldComponent extends ElementComponent implements OnInit {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
captureType: any;
|
|
7
|
+
errorCode: any;
|
|
8
|
+
errorMessage: any;
|
|
9
|
+
errorType: any;
|
|
10
|
+
defaultValue: any;
|
|
11
|
+
defaultEditable: any;
|
|
12
|
+
alignment: any;
|
|
13
|
+
code: any;
|
|
14
|
+
info: any;
|
|
15
|
+
required: any;
|
|
16
|
+
title: any;
|
|
17
|
+
type: any;
|
|
18
|
+
format: any;
|
|
19
|
+
options: any;
|
|
20
|
+
hasChanged: any;
|
|
11
21
|
minLength: any;
|
|
12
22
|
maxLength: any;
|
|
13
23
|
minValue: any;
|
|
14
24
|
maxValue: any;
|
|
15
25
|
onValidation: any;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
outputOnly: any;
|
|
27
|
+
placeholder: any;
|
|
28
|
+
tooltip: any;
|
|
29
|
+
validateOnServer: any;
|
|
19
30
|
visibleLabel: any;
|
|
20
|
-
|
|
21
|
-
options: any;
|
|
22
|
-
errorType: any;
|
|
23
|
-
errorCode: any;
|
|
24
|
-
errorMessage: any;
|
|
31
|
+
value: any;
|
|
25
32
|
field: FieldDescriptor | null;
|
|
33
|
+
updatePropagatedAttributes(): void;
|
|
26
34
|
ngOnInit(): void;
|
|
27
|
-
defaultProcessAttributeChange(attribute: string, value?: any): boolean;
|
|
28
35
|
updateValue(): void;
|
|
29
36
|
onInputChange(): void;
|
|
30
37
|
onChangeContent(): void;
|
|
@@ -33,7 +40,6 @@ export declare class FieldComponent extends ElementComponent implements OnInit {
|
|
|
33
40
|
updateObject(widgetUpdate?: boolean): void;
|
|
34
41
|
inputChanged(): void;
|
|
35
42
|
inputTyped(): void;
|
|
36
|
-
numberInputValidation(event: any): boolean;
|
|
37
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "lib-field", never, { "field": "field"; }, {}, never, ["*"], false>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "lib-field", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
39
45
|
}
|
|
@@ -4,5 +4,5 @@ export declare class ElementComponent extends PieceComponent {
|
|
|
4
4
|
element: any;
|
|
5
5
|
start(): void;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElementComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ElementComponent, "lib-element", never, { "element": "element"; }, {}, never, ["*"], false>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ElementComponent, "lib-element", never, { "element": { "alias": "element"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
8
8
|
}
|
|
@@ -4,5 +4,5 @@ export declare class FormErrorComponent {
|
|
|
4
4
|
errorMessage: any;
|
|
5
5
|
errorType: any;
|
|
6
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>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormErrorComponent, "lib-form-error", never, { "errorTitle": { "alias": "errorTitle"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "errorType": { "alias": "errorType"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
8
8
|
}
|
|
@@ -5,5 +5,5 @@ export declare class FormHeaderComponent {
|
|
|
5
5
|
goBackEvent: EventEmitter<void>;
|
|
6
6
|
goBackForm(): void;
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormHeaderComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormHeaderComponent, "lib-form-header", never, { "form": "form"; }, { "goBackEvent": "goBackEvent"; }, never, ["*"], false>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormHeaderComponent, "lib-form-header", never, { "form": { "alias": "form"; "required": false; }; }, { "goBackEvent": "goBackEvent"; }, never, ["*"], false, never>;
|
|
9
9
|
}
|
|
@@ -2,13 +2,17 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class PieceComponent {
|
|
3
3
|
form: any;
|
|
4
4
|
formConfig: any;
|
|
5
|
-
visible:
|
|
6
|
-
disabled:
|
|
5
|
+
visible: any;
|
|
6
|
+
disabled: any;
|
|
7
|
+
enabled: any;
|
|
7
8
|
customAttributes: any;
|
|
8
9
|
setForm(form: any): void;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
propagatedAttributeChange(attribute: string, value?: any): void;
|
|
11
|
+
updatePieceAttribute(signaledAttributes: any, signaledAttribute: any, value: any): void;
|
|
12
|
+
updatePieceAttributes(piece: any, signaledAttributes: any): void;
|
|
11
13
|
customAttributeChange(subAttribute: string, value?: any): void;
|
|
14
|
+
updateCustomAttribute(attrName: any, attrValue: any): void;
|
|
15
|
+
replaceCustomAttributes(customAttributes: any): void;
|
|
12
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<PieceComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PieceComponent, "lib-piece", never, {}, {}, never, ["*"], false>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PieceComponent, "lib-piece", never, {}, {}, never, ["*"], false, never>;
|
|
14
18
|
}
|
|
@@ -3,8 +3,9 @@ import { PieceComponent } from './piece.component';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SectionComponent extends PieceComponent implements OnInit {
|
|
5
5
|
section: any;
|
|
6
|
+
updatePropagatedAttributes(): void;
|
|
6
7
|
ngOnInit(): void;
|
|
7
8
|
start(): void;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SectionComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SectionComponent, "lib-section", never, { "section": "section"; }, {}, never, ["*"], false>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionComponent, "lib-section", never, { "section": { "alias": "section"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
10
11
|
}
|
|
@@ -3,8 +3,9 @@ import { PieceComponent } from './piece.component';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SubSectionComponent extends PieceComponent implements OnInit {
|
|
5
5
|
subSection: any;
|
|
6
|
+
updatePropagatedAttributes(): void;
|
|
6
7
|
ngOnInit(): void;
|
|
7
8
|
start(): void;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubSectionComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SubSectionComponent, "lib-subsection", never, { "subSection": "subSection"; }, {}, never, ["*"], false>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubSectionComponent, "lib-subsection", never, { "subSection": { "alias": "subSection"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
10
11
|
}
|
|
@@ -9,10 +9,11 @@ export declare class LibTableRecordActionComponent extends PieceComponent implem
|
|
|
9
9
|
recordData: any;
|
|
10
10
|
action: TableAction | undefined;
|
|
11
11
|
actionSelected: EventEmitter<TableActionEvent>;
|
|
12
|
+
updatePropagatedAttributes(): void;
|
|
12
13
|
ngOnInit(): void;
|
|
13
14
|
start(): void;
|
|
14
15
|
onActivate(): void;
|
|
15
16
|
class(): void;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibTableRecordActionComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LibTableRecordActionComponent, "lib-table-record-action", never, { "recordId": "recordId"; "recordData": "recordData"; "action": "action"; }, { "actionSelected": "actionSelected"; }, never, ["*"], false>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibTableRecordActionComponent, "lib-table-record-action", never, { "recordId": { "alias": "recordId"; "required": false; }; "recordData": { "alias": "recordData"; "required": false; }; "action": { "alias": "action"; "required": false; }; }, { "actionSelected": "actionSelected"; }, never, ["*"], false, never>;
|
|
18
19
|
}
|
|
@@ -8,5 +8,5 @@ export declare class LibTableRecordFieldComponent implements OnInit {
|
|
|
8
8
|
ngOnInit(): void;
|
|
9
9
|
start(): void;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibTableRecordFieldComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LibTableRecordFieldComponent, "lib-table-record-field", never, { "fieldCode": "fieldCode"; "fieldType": "fieldType"; "fieldValue": "fieldValue"; "column": "column"; }, {}, never, ["*"], false>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibTableRecordFieldComponent, "lib-table-record-field", never, { "fieldCode": { "alias": "fieldCode"; "required": false; }; "fieldType": { "alias": "fieldType"; "required": false; }; "fieldValue": { "alias": "fieldValue"; "required": false; }; "column": { "alias": "column"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
12
12
|
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { TableRecordData } from '../../../classes/forms/table/row-data';
|
|
3
2
|
import { TableActionEvent } from '../../../classes/forms/table/table';
|
|
4
3
|
import { RecordTable } from '../../../classes/forms/table/table';
|
|
5
4
|
import { ElementComponent } from '../layout/element.component';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class LibTableComponent extends ElementComponent implements OnInit {
|
|
7
|
+
allSelected: any;
|
|
8
8
|
code: any;
|
|
9
|
-
|
|
9
|
+
globalSearch: any;
|
|
10
|
+
globalFilterString: any;
|
|
11
|
+
recordsPerPage: any;
|
|
12
|
+
layout: any;
|
|
13
|
+
columns: any;
|
|
14
|
+
selectedRecords: any;
|
|
15
|
+
currentPage: any;
|
|
16
|
+
totalRecordsNumber: any;
|
|
17
|
+
visibleRecords: any;
|
|
10
18
|
tableFieldStyles: any;
|
|
11
19
|
loaded: boolean;
|
|
12
20
|
selectable: boolean;
|
|
@@ -15,9 +23,9 @@ export declare class LibTableComponent extends ElementComponent implements OnIni
|
|
|
15
23
|
globalActions: any;
|
|
16
24
|
selectionActions: any;
|
|
17
25
|
table: RecordTable | null;
|
|
18
|
-
visibleRecords: TableRecordData[];
|
|
19
26
|
waiting: boolean;
|
|
20
27
|
ngOnInit(): void;
|
|
28
|
+
updatePropagatedAttributes(): void;
|
|
21
29
|
updateTableData(): void;
|
|
22
30
|
tableGlobalAction(actionCode: string): void;
|
|
23
31
|
tableSelectionAction(actionCode: string): void;
|
|
@@ -28,8 +36,7 @@ export declare class LibTableComponent extends ElementComponent implements OnIni
|
|
|
28
36
|
changePage(requestedPage: number): void;
|
|
29
37
|
tableColumnSort(columnName: string, direction?: any): void;
|
|
30
38
|
globalFilterChanged(): void;
|
|
31
|
-
defaultProcessAttributeChange(attribute: string, value?: any): boolean;
|
|
32
39
|
filterHasChanged(column: any, values: any): void;
|
|
33
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibTableComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LibTableComponent, "lib-table", never, { "table": "table"; "
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibTableComponent, "lib-table", never, { "table": { "alias": "table"; "required": false; }; "waiting": { "alias": "waiting"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
35
42
|
}
|
|
@@ -237,5 +237,5 @@ export declare class BasicFormComponent extends FormStructureAndData {
|
|
|
237
237
|
*/
|
|
238
238
|
addTableGetDataFinish(code: string, callback: any, properties?: any): void;
|
|
239
239
|
static ɵfac: i0.ɵɵFactoryDeclaration<BasicFormComponent, never>;
|
|
240
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BasicFormComponent, "ng-component", never, {}, {}, never, ["*"], false>;
|
|
240
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BasicFormComponent, "ng-component", never, {}, {}, never, ["*"], false, never>;
|
|
241
241
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tuain-ng-forms-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"description": "Componentes y Clases Angular para la gestión de formularios TUAIN",
|
|
5
5
|
"author": "Mauricio Méndez, Imix Consulting",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,23 +23,17 @@
|
|
|
23
23
|
"tslib": "^2.4.0",
|
|
24
24
|
"yn": "^5.0.0"
|
|
25
25
|
},
|
|
26
|
-
"module": "
|
|
27
|
-
"
|
|
28
|
-
"esm2020": "esm2020/tuain-ng-forms-lib.mjs",
|
|
29
|
-
"fesm2020": "fesm2020/tuain-ng-forms-lib.mjs",
|
|
30
|
-
"fesm2015": "fesm2015/tuain-ng-forms-lib.mjs",
|
|
31
|
-
"typings": "tuain-ng-forms-lib.d.ts",
|
|
26
|
+
"module": "fesm2022/tuain-ng-forms-lib.mjs",
|
|
27
|
+
"typings": "index.d.ts",
|
|
32
28
|
"exports": {
|
|
33
29
|
"./package.json": {
|
|
34
30
|
"default": "./package.json"
|
|
35
31
|
},
|
|
36
32
|
".": {
|
|
37
|
-
"types": "./
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"node": "./fesm2015/tuain-ng-forms-lib.mjs",
|
|
42
|
-
"default": "./fesm2020/tuain-ng-forms-lib.mjs"
|
|
33
|
+
"types": "./index.d.ts",
|
|
34
|
+
"esm2022": "./esm2022/tuain-ng-forms-lib.mjs",
|
|
35
|
+
"esm": "./esm2022/tuain-ng-forms-lib.mjs",
|
|
36
|
+
"default": "./fesm2022/tuain-ng-forms-lib.mjs"
|
|
43
37
|
}
|
|
44
38
|
},
|
|
45
39
|
"sideEffects": false
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Subject } from 'rxjs';
|
|
2
|
-
import { elementTypes } from './form.constants';
|
|
3
|
-
import { FormElement } from './element';
|
|
4
|
-
const HEADER = 'HEADER';
|
|
5
|
-
export class FormAction extends FormElement {
|
|
6
|
-
constructor(actionDefinition, formConfig) {
|
|
7
|
-
super(actionDefinition, formConfig);
|
|
8
|
-
this._actionActivated = new Subject();
|
|
9
|
-
this.inProgress = false;
|
|
10
|
-
this.restrictedOnField = null;
|
|
11
|
-
this.restrictedOnOperator = null;
|
|
12
|
-
this.restrictedOnValue = null;
|
|
13
|
-
this.propagationCustomAttributes = this._formConfig?.propagationCustomAttributes?.actions ?? [];
|
|
14
|
-
this.elementType = elementTypes.action;
|
|
15
|
-
this.actionCode = actionDefinition.actionCode ? actionDefinition.actionCode.toString() : '';
|
|
16
|
-
this.actionName = actionDefinition.actionTitle;
|
|
17
|
-
this.iconName = actionDefinition.iconName || this.actionCode;
|
|
18
|
-
this.setCustomAttribute('location', actionDefinition.position || HEADER);
|
|
19
|
-
this.backend = actionDefinition?.serverAction ?? false;
|
|
20
|
-
this.newState = actionDefinition?.newState;
|
|
21
|
-
this.restrictedOnField = actionDefinition.fieldRestrictedCode?.toString() ?? null;
|
|
22
|
-
if (this.restrictedOnField) {
|
|
23
|
-
this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
|
|
24
|
-
this.restrictedOnValue = actionDefinition.valueRestricted ?? '';
|
|
25
|
-
}
|
|
26
|
-
this.customValidation = () => true;
|
|
27
|
-
}
|
|
28
|
-
connectWithParentForm(form, formChangeSubject) {
|
|
29
|
-
super.connectWithParentForm(form, formChangeSubject);
|
|
30
|
-
if (this.restrictedOnField) {
|
|
31
|
-
const relatedField = this._form.fields?.[this.restrictedOnField];
|
|
32
|
-
if (relatedField) {
|
|
33
|
-
relatedField.editionFinish.subscribe(event => this.updateRestrictedVisibility());
|
|
34
|
-
relatedField.editionPartial.subscribe(event => this.updateRestrictedVisibility());
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
updateRestrictedVisibility() {
|
|
39
|
-
const lastVisible = this._visible;
|
|
40
|
-
const newVisible = this._absoluteVisible && this.viewOnState(this._formState);
|
|
41
|
-
if (lastVisible !== newVisible) {
|
|
42
|
-
this.setVisibility(newVisible);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
viewOnState(state) {
|
|
46
|
-
const actionVisible = (this.visibleStates && state) ? this.visibleStates.includes(state) : false;
|
|
47
|
-
if (actionVisible && this._form && this.restrictedOnField) {
|
|
48
|
-
const relatedField = this._form.fields?.[this.restrictedOnField];
|
|
49
|
-
if (relatedField) {
|
|
50
|
-
const fieldValue = relatedField.value;
|
|
51
|
-
if ((this.restrictedOnOperator === '==' && fieldValue !== this.restrictedOnValue)
|
|
52
|
-
|| (this.restrictedOnOperator === '!=' && fieldValue === this.restrictedOnValue)) {
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return actionVisible;
|
|
58
|
-
}
|
|
59
|
-
get actionActivated() { return this._actionActivated; }
|
|
60
|
-
start() { this.inProgress = true; }
|
|
61
|
-
stop() { this.inProgress = false; }
|
|
62
|
-
notifyActivation() { this._actionActivated.next(this.actionCode); }
|
|
63
|
-
updateFromServer(receivedAction) {
|
|
64
|
-
for (const propertyName in receivedAction) {
|
|
65
|
-
if (propertyName !== 'actionCode' && propertyName !== 'actionId') {
|
|
66
|
-
this[propertyName] = receivedAction[propertyName];
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
setCustomValidation(callback) { this.customValidation = () => callback(); }
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHVhaW4tbmctZm9ybXMtbGliL3NyYy9saWIvY2xhc3Nlcy9mb3Jt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