tuain-ng-forms-lib 17.0.0 → 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.
Files changed (28) hide show
  1. package/esm2022/lib/classes/forms/action.mjs +66 -40
  2. package/esm2022/lib/classes/forms/element.mjs +8 -3
  3. package/esm2022/lib/classes/forms/field.mjs +81 -71
  4. package/esm2022/lib/classes/forms/section.mjs +51 -39
  5. package/esm2022/lib/classes/forms/subsection.mjs +45 -27
  6. package/esm2022/lib/classes/forms/table/table.mjs +124 -82
  7. package/esm2022/lib/components/elements/action.component.mjs +29 -19
  8. package/esm2022/lib/components/elements/field.component.mjs +56 -69
  9. package/esm2022/lib/components/elements/layout/piece.component.mjs +43 -19
  10. package/esm2022/lib/components/elements/layout/section.component.mjs +21 -13
  11. package/esm2022/lib/components/elements/layout/sub-section.component.mjs +21 -13
  12. package/esm2022/lib/components/elements/tables/table-record-action.component.mjs +13 -8
  13. package/esm2022/lib/components/elements/tables/table.component.mjs +38 -35
  14. package/fesm2022/tuain-ng-forms-lib.mjs +581 -423
  15. package/fesm2022/tuain-ng-forms-lib.mjs.map +1 -1
  16. package/lib/classes/forms/action.d.ts +30 -14
  17. package/lib/classes/forms/field.d.ts +9 -4
  18. package/lib/classes/forms/section.d.ts +18 -6
  19. package/lib/classes/forms/subsection.d.ts +28 -10
  20. package/lib/classes/forms/table/table.d.ts +63 -21
  21. package/lib/components/elements/action.component.d.ts +8 -1
  22. package/lib/components/elements/field.component.d.ts +21 -15
  23. package/lib/components/elements/layout/piece.component.d.ts +8 -4
  24. package/lib/components/elements/layout/section.component.d.ts +1 -0
  25. package/lib/components/elements/layout/sub-section.component.d.ts +1 -0
  26. package/lib/components/elements/tables/table-record-action.component.d.ts +1 -0
  27. package/lib/components/elements/tables/table.component.d.ts +12 -5
  28. package/package.json +1 -1
@@ -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
- actionCode: string;
6
- actionName: string;
7
- iconName: string;
8
- inProgress: boolean;
9
- newState: string;
10
- backend: boolean;
11
- restrictedOnField: string | null;
12
- restrictedOnOperator: string | null;
13
- restrictedOnValue: string | null;
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
- fieldCode: string;
43
- fieldOptions: FieldOption[] | null;
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(): string;
54
- set defaultValue(defaultValue: string);
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
- active: boolean;
9
- sectionId: string | null;
10
- sectionCode: string | null;
11
- sectionTitle: string | null;
12
- subSections: RecordFormSubSection[];
13
- subSectionsObj: any;
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: 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;
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
- 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;
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,8 +3,15 @@ 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
- inProgress: boolean;
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;
@@ -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
- code: string;
7
- value: any;
8
- info: string;
9
- alignment: string;
10
- tooltip: string;
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
- captureType: any;
17
- title: any;
18
- type: any;
26
+ outputOnly: any;
27
+ placeholder: any;
28
+ tooltip: any;
29
+ validateOnServer: any;
19
30
  visibleLabel: any;
20
- required: any;
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
44
  static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "lib-field", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, ["*"], false, never>;
39
45
  }
@@ -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: boolean;
6
- disabled: boolean;
5
+ visible: any;
6
+ disabled: any;
7
+ enabled: any;
7
8
  customAttributes: any;
8
9
  setForm(form: any): void;
9
- defaultProcessAttributeChange(attribute: string, value?: any): boolean;
10
- customProcessAttributeChange(attribute: string, value?: any): void;
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
17
  static ɵcmp: i0.ɵɵComponentDeclaration<PieceComponent, "lib-piece", never, {}, {}, never, ["*"], false, never>;
14
18
  }
@@ -3,6 +3,7 @@ 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>;
@@ -3,6 +3,7 @@ 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,6 +9,7 @@ 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;
@@ -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
- globalFilterString: string;
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": { "alias": "table"; "required": false; }; "visibleRecords": { "alias": "visibleRecords"; "required": false; }; "waiting": { "alias": "waiting"; "required": false; }; }, {}, never, ["*"], false, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibTableComponent, "lib-table", never, { "table": { "alias": "table"; "required": false; }; "waiting": { "alias": "waiting"; "required": false; }; }, {}, never, ["*"], false, never>;
35
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuain-ng-forms-lib",
3
- "version": "17.0.0",
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",