fx-form-builder-wrapper 0.0.100 → 1.0.2
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/components/dynamic-table/dynamic-table.component.mjs +178 -12
- package/esm2022/lib/components/toggle-button/toggle-button.component.mjs +3 -3
- package/esm2022/lib/components/uploader-checkbox/uploader-checkbox.component.mjs +2 -2
- package/esm2022/lib/panel/configuration-panel/configuration-panel.component.mjs +116 -10
- package/fesm2022/fx-form-builder-wrapper.mjs +291 -22
- package/fesm2022/fx-form-builder-wrapper.mjs.map +1 -1
- package/lib/components/dynamic-table/dynamic-table.component.d.ts +13 -2
- package/lib/panel/configuration-panel/configuration-panel.component.d.ts +5 -0
- package/package.json +1 -1
- /package/src/assets/icons/{cross.svg.svg → cross.svg} +0 -0
|
@@ -2,10 +2,11 @@ import { AfterViewInit, ChangeDetectorRef, OnDestroy, OnInit } from '@angular/co
|
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { FxBaseComponent, FxMode, FxSetting, FxValidation } from '@instantsys-labs/fx';
|
|
4
4
|
import { FxBuilderWrapperService } from '../../fx-builder-wrapper.service';
|
|
5
|
+
import { ConfirmationService, MessageService } from 'primeng/api';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export interface TableColumnConfig {
|
|
7
8
|
header: string;
|
|
8
|
-
cellType: 'text' | 'input-text' | 'input-number' | 'dropdown' | 'smart-dropdown' | 'checkbox' | 'radio' | 'radio-group' | 'file-upload' | 'textarea';
|
|
9
|
+
cellType: 'text' | 'input-text' | 'input-number' | 'dropdown' | 'smart-dropdown' | 'checkbox' | 'radio' | 'radio-group' | 'file-upload' | 'textarea' | 'action';
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
options?: string[];
|
|
11
12
|
apiUrl?: string;
|
|
@@ -18,6 +19,7 @@ export interface TableColumnConfig {
|
|
|
18
19
|
checkBoxLabel?: string;
|
|
19
20
|
isRequired?: boolean;
|
|
20
21
|
errorMessage?: string;
|
|
22
|
+
action: string[];
|
|
21
23
|
}
|
|
22
24
|
export interface TableConfig {
|
|
23
25
|
columns: TableColumnConfig[];
|
|
@@ -26,6 +28,8 @@ export interface TableConfig {
|
|
|
26
28
|
export declare class DynamicTableComponent extends FxBaseComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
27
29
|
private cdr;
|
|
28
30
|
private fxBuilderWrapperService;
|
|
31
|
+
private messageService;
|
|
32
|
+
private confirmationService;
|
|
29
33
|
tableRows: Array<any>;
|
|
30
34
|
previewType: FxMode;
|
|
31
35
|
tableConfig: any;
|
|
@@ -35,6 +39,9 @@ export declare class DynamicTableComponent extends FxBaseComponent implements On
|
|
|
35
39
|
file: File | null;
|
|
36
40
|
}>>;
|
|
37
41
|
generalValues: any;
|
|
42
|
+
selectedAction: any;
|
|
43
|
+
selectedRow: any;
|
|
44
|
+
displayConfirmationDialog: boolean;
|
|
38
45
|
tableFormControl: FormControl<any>;
|
|
39
46
|
smartDropdownOptions: {
|
|
40
47
|
[key: string]: Array<{
|
|
@@ -43,7 +50,7 @@ export declare class DynamicTableComponent extends FxBaseComponent implements On
|
|
|
43
50
|
}>;
|
|
44
51
|
};
|
|
45
52
|
private http;
|
|
46
|
-
constructor(cdr: ChangeDetectorRef, fxBuilderWrapperService: FxBuilderWrapperService);
|
|
53
|
+
constructor(cdr: ChangeDetectorRef, fxBuilderWrapperService: FxBuilderWrapperService, messageService: MessageService, confirmationService: ConfirmationService);
|
|
47
54
|
ngOnInit(): void;
|
|
48
55
|
ngAfterViewInit(): void;
|
|
49
56
|
protected fetchSmartDropdownData(): void;
|
|
@@ -58,6 +65,10 @@ export declare class DynamicTableComponent extends FxBaseComponent implements On
|
|
|
58
65
|
parseUrls(urls: string[], rowIndex: number, columns: any): void;
|
|
59
66
|
onCheckboxChange(event: Event, row: any, column: any): void;
|
|
60
67
|
initializeCheckboxDefaults(tableData: any): void;
|
|
68
|
+
handleAction(row: any, action: any): void;
|
|
69
|
+
confirmAction(): void;
|
|
70
|
+
cancelAction(): void;
|
|
71
|
+
executeAction(row: any, action: any): void;
|
|
61
72
|
ngOnDestroy(): void;
|
|
62
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicTableComponent, never>;
|
|
63
74
|
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicTableComponent, "fx-dynamic-table", never, { "tableRows": { "alias": "tableRows"; "required": false; }; "previewType": { "alias": "previewType"; "required": false; }; "tableConfig": { "alias": "tableConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -26,6 +26,11 @@ export declare class ConfigurationPanelComponent implements OnInit, OnChanges {
|
|
|
26
26
|
saveConfiguration(): void;
|
|
27
27
|
onSubmit(): void;
|
|
28
28
|
patchData(): void;
|
|
29
|
+
getActions(columnIndex: number): FormArray;
|
|
30
|
+
addActionToColumn(columnIndex: number): void;
|
|
31
|
+
removeActionFromColumn(columnIndex: number, actionIndex: number): void;
|
|
32
|
+
getPayloadOptions(columnIndex: number, actionIndex: number): FormArray;
|
|
33
|
+
addPayloadOption(columnIndex: number, actionIndex: number): void;
|
|
29
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationPanelComponent, never>;
|
|
30
35
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigurationPanelComponent, "fx-configuration-panel", never, { "visible": { "alias": "visible"; "required": false; }; "configs": { "alias": "configs"; "required": false; }; "tableConfigData": { "alias": "tableConfigData"; "required": false; }; }, { "isVisible": "isVisible"; "configuration": "configuration"; }, never, never, true, never>;
|
|
31
36
|
}
|
package/package.json
CHANGED
|
File without changes
|