@eqproject/eqp-dynamic-module 1.0.10 → 1.1.1
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/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.mjs +19 -5
- package/esm2020/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.mjs +24 -3
- package/esm2020/lib/components/private/add-form-field/add-form-field.component.mjs +47 -31
- package/esm2020/lib/components/private/add-formula-field/add-formula-field.component.mjs +42 -77
- package/esm2020/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.mjs +1 -2
- package/esm2020/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.mjs +15 -6
- package/esm2020/lib/components/private/form-records/repair-form-fields/repair-form-fields.component.mjs +34 -0
- package/esm2020/lib/eqp-dynamic-module.module.mjs +9 -4
- package/esm2020/lib/models/endPointConfiguration.model.mjs +1 -1
- package/esm2020/lib/models/fields/numericField.model.mjs +1 -1
- package/esm2020/lib/models/form.model.mjs +1 -1
- package/esm2020/lib/services/utilityHelper.services.mjs +31 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +209 -122
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +209 -122
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +5 -1
- package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +4 -1
- package/lib/components/private/add-form-field/add-form-field.component.d.ts +6 -1
- package/lib/components/private/add-formula-field/add-formula-field.component.d.ts +9 -19
- package/lib/components/private/form-records/repair-form-fields/repair-form-fields.component.d.ts +13 -0
- package/lib/eqp-dynamic-module.module.d.ts +13 -12
- package/lib/models/endPointConfiguration.model.d.ts +1 -0
- package/lib/models/fields/numericField.model.d.ts +1 -0
- package/lib/models/form.model.d.ts +4 -0
- package/lib/services/utilityHelper.services.d.ts +6 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -9,10 +9,12 @@ export declare class EqpDynamicModuleComponent implements OnInit {
|
|
|
9
9
|
private utilityHelperService;
|
|
10
10
|
context: Context;
|
|
11
11
|
formID: string;
|
|
12
|
+
repairMode: boolean;
|
|
12
13
|
values: Array<Record>;
|
|
13
14
|
showButtons: boolean;
|
|
14
15
|
showTitle: boolean;
|
|
15
16
|
viewMode: FormTypeEnum;
|
|
17
|
+
FormJSON: string;
|
|
16
18
|
/**
|
|
17
19
|
* Url del server da chiamare per recuperare, salvare o eliminare i record.
|
|
18
20
|
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
@@ -37,6 +39,7 @@ export declare class EqpDynamicModuleComponent implements OnInit {
|
|
|
37
39
|
saveRecord: EventEmitter<Record>;
|
|
38
40
|
deleteRecord: EventEmitter<Record>;
|
|
39
41
|
duplicateRecord: EventEmitter<Record>;
|
|
42
|
+
SaveJSON: EventEmitter<string>;
|
|
40
43
|
/**
|
|
41
44
|
* Eventi emessi DOPO aver eseguito una chiamata al server per il salvataggio,
|
|
42
45
|
* l'eliminazione o la duplicazione di un record all'endpoint specificato.
|
|
@@ -99,6 +102,7 @@ export declare class EqpDynamicModuleComponent implements OnInit {
|
|
|
99
102
|
* @param record Oggetto di tipo Record da duplicare.
|
|
100
103
|
*/
|
|
101
104
|
onDeleteRecord(record: Record): void;
|
|
105
|
+
onSaveJson(record: string): void;
|
|
102
106
|
static ɵfac: i0.ɵɵFactoryDeclaration<EqpDynamicModuleComponent, never>;
|
|
103
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EqpDynamicModuleComponent, "eqp-dynamic-module", never, { "context": "context"; "formID": "formID"; "values": "values"; "showButtons": "showButtons"; "showTitle": "showTitle"; "viewMode": "viewMode"; "baseServerUrl": "baseServerUrl"; "userToken": "userToken"; "endPointConfiguration": "endPointConfiguration"; }, { "saveRecord": "saveRecord"; "deleteRecord": "deleteRecord"; "duplicateRecord": "duplicateRecord"; "afterSaveRecord": "afterSaveRecord"; "afterDeleteRecord": "afterDeleteRecord"; "afterDuplicateRecord": "afterDuplicateRecord"; }, never, never, false>;
|
|
107
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EqpDynamicModuleComponent, "eqp-dynamic-module", never, { "context": "context"; "formID": "formID"; "repairMode": "repairMode"; "values": "values"; "showButtons": "showButtons"; "showTitle": "showTitle"; "viewMode": "viewMode"; "FormJSON": "FormJSON"; "baseServerUrl": "baseServerUrl"; "userToken": "userToken"; "endPointConfiguration": "endPointConfiguration"; }, { "saveRecord": "saveRecord"; "deleteRecord": "deleteRecord"; "duplicateRecord": "duplicateRecord"; "SaveJSON": "SaveJSON"; "afterSaveRecord": "afterSaveRecord"; "afterDeleteRecord": "afterDeleteRecord"; "afterDuplicateRecord": "afterDuplicateRecord"; }, never, never, false>;
|
|
104
108
|
}
|
|
@@ -18,6 +18,7 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
|
|
|
18
18
|
innerFormManagment: boolean;
|
|
19
19
|
orgaID: string;
|
|
20
20
|
innerFormRef: MatDialogRef<TemplateRef<any>>;
|
|
21
|
+
UserID: number;
|
|
21
22
|
/**
|
|
22
23
|
* Url del server da chiamare per recuerare, salvare o eliminare i record.
|
|
23
24
|
* Usato per creare la configurazione di default degli endpoint da chiamare.
|
|
@@ -80,6 +81,8 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
|
|
|
80
81
|
* non viene eseguita nessuna chiamata http per recuperare/salvare i dati.
|
|
81
82
|
*/
|
|
82
83
|
configureDefaultEndPoints(): void;
|
|
84
|
+
stringSanitizer(value: any): void;
|
|
85
|
+
omit_special_char(event: any): boolean;
|
|
83
86
|
/**
|
|
84
87
|
* Metodo per recuperare tutti i record salvati per una particolare Form.
|
|
85
88
|
* La chiamata viene effettuata solo se è stato configurato l'endPoint da usare.
|
|
@@ -238,5 +241,5 @@ export declare class EqpDynamicModuleConfiguratorComponent implements OnInit {
|
|
|
238
241
|
*/
|
|
239
242
|
private reloadActionsOnRecordTable;
|
|
240
243
|
static ɵfac: i0.ɵɵFactoryDeclaration<EqpDynamicModuleConfiguratorComponent, never>;
|
|
241
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EqpDynamicModuleConfiguratorComponent, "eqp-dynamic-module-configurator", never, { "context": "context"; "form": "form"; "formID": "formID"; "innerFormManagment": "innerFormManagment"; "orgaID": "orgaID"; "innerFormRef": "innerFormRef"; "baseServerUrl": "baseServerUrl"; "userToken": "userToken"; "endPointConfiguration": "endPointConfiguration"; }, { "saveFormEvent": "saveFormEvent"; "afterSaveFormEvent": "afterSaveFormEvent"; }, never, never, false>;
|
|
244
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EqpDynamicModuleConfiguratorComponent, "eqp-dynamic-module-configurator", never, { "context": "context"; "form": "form"; "formID": "formID"; "innerFormManagment": "innerFormManagment"; "orgaID": "orgaID"; "innerFormRef": "innerFormRef"; "UserID": "UserID"; "baseServerUrl": "baseServerUrl"; "userToken": "userToken"; "endPointConfiguration": "endPointConfiguration"; }, { "saveFormEvent": "saveFormEvent"; "afterSaveFormEvent": "afterSaveFormEvent"; }, never, never, false>;
|
|
242
245
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
2
|
+
import { FormControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
|
3
3
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
4
4
|
import { AttachmentType, EqpAttachmentsComponent, IAttachmentDTO } from '@eqproject/eqp-attachments';
|
|
5
5
|
import { PickerModeEnum } from '@eqproject/eqp-datetimepicker';
|
|
@@ -81,11 +81,15 @@ export declare class AddFormFieldComponent implements OnInit {
|
|
|
81
81
|
*/
|
|
82
82
|
setFormulaAutocompleteOptions(keyboardEvent: KeyboardEvent): void;
|
|
83
83
|
setVisibleIfAutocompleteOptions(keyboardEvent: KeyboardEvent): void;
|
|
84
|
+
omit_special_char(event: any): boolean;
|
|
84
85
|
/**
|
|
85
86
|
* Crea il FormGroup per l'aggiunta di un nuovo campo all'interno della form.
|
|
86
87
|
* Metodo richiamato ogni volta che cambia il tipo del campo scelto o viene aggiunto/modificato un Field
|
|
87
88
|
*/
|
|
88
89
|
createFieldForm(): void;
|
|
90
|
+
questionPoll(control: FormControl): {
|
|
91
|
+
[s: string]: boolean;
|
|
92
|
+
};
|
|
89
93
|
/**
|
|
90
94
|
* Metodo chiamato quando cambia il FieldType del BaseField che si sta aggiungendo/modificando.
|
|
91
95
|
* Ricrea l'oggetto field popolando solo le proprietà del BaseField inserite dall'utente
|
|
@@ -163,6 +167,7 @@ export declare class AddFormFieldComponent implements OnInit {
|
|
|
163
167
|
* @param metadata Metadata da modificare, se null allora ne sto creando uno nuovo.
|
|
164
168
|
*/
|
|
165
169
|
openFormulaDialog(): void;
|
|
170
|
+
stringSanitizer(value: any): void;
|
|
166
171
|
/**
|
|
167
172
|
* Metodo invocato dall'output dal dialog per aggiungere/modificare un metadata
|
|
168
173
|
* nei campi di tipo Allegato o Immagine. Prima di aggiungere il metadata nell'elenco
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnInit, OnChanges, SimpleChanges, ElementRef } from '@angular/core';
|
|
2
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
3
|
import { Formula } from '../../../modules/formula.model';
|
|
3
4
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
4
5
|
import { BaseField } from '../../../models/baseField.model';
|
|
@@ -6,17 +7,19 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
export declare class AddFormulaComponent implements OnInit, OnChanges {
|
|
7
8
|
data: any;
|
|
8
9
|
dialogRef: MatDialogRef<AddFormulaComponent>;
|
|
10
|
+
dialog: MatDialog;
|
|
9
11
|
formulaTextArea: ElementRef<HTMLTextAreaElement>;
|
|
10
12
|
caretPosition: number;
|
|
11
13
|
fieldNull: boolean;
|
|
12
14
|
formula: Formula;
|
|
13
15
|
stringaFormula: string;
|
|
14
16
|
Fields: Array<BaseField>;
|
|
15
|
-
constructor(data: any, dialogRef: MatDialogRef<AddFormulaComponent
|
|
17
|
+
constructor(data: any, dialogRef: MatDialogRef<AddFormulaComponent>, dialog: MatDialog);
|
|
16
18
|
ngOnInit(): void;
|
|
17
19
|
clear(): any;
|
|
18
20
|
ngOnChanges(changes: SimpleChanges): void;
|
|
19
21
|
lostFocus(textArea: any): void;
|
|
22
|
+
back(): void;
|
|
20
23
|
addSymbol(value: string): void;
|
|
21
24
|
addNumber(value: string): void;
|
|
22
25
|
save(): void;
|
|
@@ -27,24 +30,11 @@ export declare class AddFormulaComponent implements OnInit, OnChanges {
|
|
|
27
30
|
dragstart_handler(event: any): void;
|
|
28
31
|
drop_handler(event: any): void;
|
|
29
32
|
dragover_handler(event: any): void;
|
|
30
|
-
addBracket(value: string): void;
|
|
31
|
-
getFormula(): string;
|
|
32
|
-
setRadians(): boolean;
|
|
33
|
-
secondScreen(): boolean;
|
|
34
|
-
getScreen(): boolean;
|
|
35
|
-
getRadians(): boolean;
|
|
36
|
-
sumToMemory(): void;
|
|
37
|
-
deductToMemory(): void;
|
|
38
|
-
clearMemory(): void;
|
|
39
|
-
readMemory(): string;
|
|
40
|
-
statusMemory(): boolean;
|
|
41
|
-
valueMemory(): number;
|
|
42
|
-
getOperand(): string;
|
|
43
|
-
resetOperand(): void;
|
|
44
|
-
singleton(operand: string, data: any): number;
|
|
45
|
-
setOperation(operand: string): void;
|
|
46
|
-
removeSymbol(): void;
|
|
47
|
-
calculate(): string;
|
|
48
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<AddFormulaComponent, never>;
|
|
49
34
|
static ɵcmp: i0.ɵɵComponentDeclaration<AddFormulaComponent, "eqp-dynamic-module-add-formula-component", never, {}, {}, never, never, false>;
|
|
50
35
|
}
|
|
36
|
+
export declare class DialogDataExampleDialog {
|
|
37
|
+
constructor();
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogDataExampleDialog, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogDataExampleDialog, "dialog-data-example", never, {}, {}, never, never, false>;
|
|
40
|
+
}
|
package/lib/components/private/form-records/repair-form-fields/repair-form-fields.component.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnInit, EventEmitter, ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RepairFormFieldsComponent implements OnInit {
|
|
4
|
+
FormJSON: string;
|
|
5
|
+
onSaveJson: EventEmitter<string>;
|
|
6
|
+
formulaTextArea: ElementRef<HTMLTextAreaElement>;
|
|
7
|
+
constructor();
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
printTheJSONInPrettyFormat(): void;
|
|
10
|
+
saveJson(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RepairFormFieldsComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RepairFormFieldsComponent, "repair-form-fields", never, { "FormJSON": "FormJSON"; }, { "onSaveJson": "onSaveJson"; }, never, never, false>;
|
|
13
|
+
}
|
|
@@ -16,19 +16,20 @@ import * as i14 from "./components/private/dynamic-module-field/dynamic-module-f
|
|
|
16
16
|
import * as i15 from "./components/private/dynamic-module-field-fix/dynamic-module-field.component";
|
|
17
17
|
import * as i16 from "./components/private/spinner/spinner.component";
|
|
18
18
|
import * as i17 from "./components/private/add-formula-field/add-formula-field.component";
|
|
19
|
-
import * as i18 from "./
|
|
20
|
-
import * as i19 from "
|
|
21
|
-
import * as i20 from "@angular/
|
|
22
|
-
import * as i21 from "@
|
|
23
|
-
import * as i22 from "@eqproject/eqp-
|
|
24
|
-
import * as i23 from "@eqproject/eqp-
|
|
25
|
-
import * as i24 from "@eqproject/eqp-
|
|
26
|
-
import * as i25 from "@eqproject/eqp-
|
|
27
|
-
import * as i26 from "@eqproject/eqp-
|
|
28
|
-
import * as i27 from "@eqproject/eqp-
|
|
29
|
-
import * as i28 from "@
|
|
19
|
+
import * as i18 from "./components/private/form-records/repair-form-fields/repair-form-fields.component";
|
|
20
|
+
import * as i19 from "./modules/material.module";
|
|
21
|
+
import * as i20 from "@angular/forms";
|
|
22
|
+
import * as i21 from "@angular/common";
|
|
23
|
+
import * as i22 from "@eqproject/eqp-table";
|
|
24
|
+
import * as i23 from "@eqproject/eqp-attachments";
|
|
25
|
+
import * as i24 from "@eqproject/eqp-select";
|
|
26
|
+
import * as i25 from "@eqproject/eqp-datetimepicker";
|
|
27
|
+
import * as i26 from "@eqproject/eqp-filters";
|
|
28
|
+
import * as i27 from "@eqproject/eqp-numeric";
|
|
29
|
+
import * as i28 from "@eqproject/eqp-img-drawing";
|
|
30
|
+
import * as i29 from "@angular/platform-browser";
|
|
30
31
|
export declare class EqpDynamicModuleModule {
|
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<EqpDynamicModuleModule, never>;
|
|
32
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EqpDynamicModuleModule, [typeof i1.EqpDynamicModuleComponent, typeof i2.EqpDynamicModuleConfiguratorComponent, typeof i3.AddFormFieldComponent, typeof i4.TextFieldTemplateComponent, typeof i5.BooleanFieldTemplateComponent, typeof i6.DateFieldTemplateComponent, typeof i7.TextareaFieldTemplateComponent, typeof i8.NumericFieldTemplateComponent, typeof i9.ListValueFieldTemplateComponent, typeof i10.AttachmentFieldTemplateComponent, typeof i11.ImageFieldTemplateComponent, typeof i12.ListFormRecordComponent, typeof i13.AddFormRecordComponent, typeof i14.DynamicModuleFieldComponent, typeof i15.DynamicModuleFieldFixComponent, typeof i16.SpinnerComponent, typeof i17.AddFormulaComponent], [typeof
|
|
33
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EqpDynamicModuleModule, [typeof i1.EqpDynamicModuleComponent, typeof i2.EqpDynamicModuleConfiguratorComponent, typeof i3.AddFormFieldComponent, typeof i4.TextFieldTemplateComponent, typeof i5.BooleanFieldTemplateComponent, typeof i6.DateFieldTemplateComponent, typeof i7.TextareaFieldTemplateComponent, typeof i8.NumericFieldTemplateComponent, typeof i9.ListValueFieldTemplateComponent, typeof i10.AttachmentFieldTemplateComponent, typeof i11.ImageFieldTemplateComponent, typeof i12.ListFormRecordComponent, typeof i13.AddFormRecordComponent, typeof i14.DynamicModuleFieldComponent, typeof i15.DynamicModuleFieldFixComponent, typeof i16.SpinnerComponent, typeof i17.AddFormulaComponent, typeof i17.DialogDataExampleDialog, typeof i18.RepairFormFieldsComponent], [typeof i19.MaterialModule, typeof i20.FormsModule, typeof i21.CommonModule, typeof i20.ReactiveFormsModule, typeof i22.EqpTableModule, typeof i23.EqpAttachmentsModule, typeof i24.EqpSelectModule, typeof i25.EqpDatetimepickerModule, typeof i26.EqpFiltersModule, typeof i27.EqpNumericModule, typeof i28.EqpImgDrawingModule, typeof i29.BrowserModule], [typeof i1.EqpDynamicModuleComponent, typeof i2.EqpDynamicModuleConfiguratorComponent]>;
|
|
33
34
|
static ɵinj: i0.ɵɵInjectorDeclaration<EqpDynamicModuleModule>;
|
|
34
35
|
}
|
|
@@ -21,6 +21,10 @@ export declare class Form extends BaseObj implements IRootObject {
|
|
|
21
21
|
* dettaglio
|
|
22
22
|
*/
|
|
23
23
|
InnerForms: Array<Form>;
|
|
24
|
+
CreationDate: Date;
|
|
25
|
+
CreationUser: number;
|
|
26
|
+
ModifyDate: Date;
|
|
27
|
+
ModifyUser: number;
|
|
24
28
|
RootEntityID: string;
|
|
25
29
|
OldName?: string;
|
|
26
30
|
ObjectFields: any[];
|
|
@@ -64,6 +64,12 @@ export declare class UtilityHelperService {
|
|
|
64
64
|
* @returns Resituisce la configurazione completa degli endPoint da usare di default.
|
|
65
65
|
*/
|
|
66
66
|
ConfigureDefaultEndPoints(baseServerUrl: string, userToken: string): EndPointConfiguration;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @param expression prende una stringa in input e verifica che ogni parentesi aperta venga anche chiusa
|
|
70
|
+
* @returns true se le parentesi sono pari e ogni parentesi chiude se stessa, false se mancano parentesi o non vengono chiuse
|
|
71
|
+
*/
|
|
72
|
+
static stringSanitizer(expression: any, required?: boolean): boolean;
|
|
67
73
|
/**
|
|
68
74
|
* Metodo che data la configurazione di un endpoint costruisce l'url da chiamare, gli eventuali parametri
|
|
69
75
|
* da passare (nel body o nella rotta) ed effettua la chiamata. Al termine della chiamata esegue le eventuali
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './lib/components/private/field-templates/numeric-field-template/n
|
|
|
12
12
|
export * from './lib/components/private/field-templates/text-field-template/text-field-template.component';
|
|
13
13
|
export * from './lib/components/private/field-templates/textarea-field-template/textarea-field-template.component';
|
|
14
14
|
export * from './lib/components/private/form-records/add-form-record/add-form-record.component';
|
|
15
|
+
export * from './lib/components/private/form-records/repair-form-fields/repair-form-fields.component';
|
|
15
16
|
export * from './lib/components/private/form-records/list-form-record/list-form-record.component';
|
|
16
17
|
export * from './lib/interfaces/iBaseFieldComponent.interface';
|
|
17
18
|
export * from './lib/interfaces/iRootObject.interface';
|