@eqproject/eqp-dynamic-module 0.0.3 → 0.0.5
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/README.md +43 -24
- package/bundles/eqproject-eqp-dynamic-module.umd.js +1166 -334
- package/bundles/eqproject-eqp-dynamic-module.umd.js.map +1 -1
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js +2 -2
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js.map +1 -1
- package/eqproject-eqp-dynamic-module.d.ts +2 -1
- package/eqproject-eqp-dynamic-module.metadata.json +1 -1
- package/esm2015/eqproject-eqp-dynamic-module.js +3 -2
- package/esm2015/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +198 -22
- package/esm2015/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +124 -9
- package/esm2015/lib/components/private/add-form-field/add-form-field.component.js +107 -16
- package/esm2015/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +10 -21
- package/esm2015/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/date-field-template/date-field-template.component.js +2 -2
- package/esm2015/lib/components/private/field-templates/image-field-template/image-field-template.component.js +148 -6
- package/esm2015/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +21 -24
- package/esm2015/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +10 -2
- package/esm2015/lib/components/private/field-templates/text-field-template/text-field-template.component.js +18 -2
- package/esm2015/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +2 -2
- package/esm2015/lib/components/private/form-records/add-form-record/add-form-record.component.js +2 -2
- package/esm2015/lib/components/private/form-records/list-form-record/list-form-record.component.js +2 -18
- package/esm2015/lib/components/private/spinner/spinner.component.js +23 -0
- package/esm2015/lib/eqp-dynamic-module.module.js +6 -2
- package/esm2015/lib/models/endPointConfiguration.model.js +23 -0
- package/esm2015/lib/models/fields/dateField.model.js +1 -1
- package/esm2015/lib/models/fields/imageField.model.js +5 -1
- package/esm2015/lib/models/fields/listValueField.model.js +3 -1
- package/esm2015/lib/models/fields/numericField.model.js +1 -1
- package/esm2015/lib/models/fields/textField.model.js +10 -1
- package/esm2015/lib/models/form.model.js +1 -1
- package/esm2015/lib/models/record.model.js +6 -1
- package/esm2015/lib/services/eqp-dynamic-module-dialog.service.js +10 -1
- package/esm2015/lib/services/spinner.service.js +43 -0
- package/esm2015/lib/services/utilityHelper.services.js +180 -13
- package/esm2015/public-api.js +3 -1
- package/esm5/eqproject-eqp-dynamic-module.js +3 -2
- package/esm5/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +204 -22
- package/esm5/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +126 -8
- package/esm5/lib/components/private/add-form-field/add-form-field.component.js +107 -16
- package/esm5/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +2 -2
- package/esm5/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +10 -21
- package/esm5/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +2 -2
- package/esm5/lib/components/private/field-templates/date-field-template/date-field-template.component.js +2 -2
- package/esm5/lib/components/private/field-templates/image-field-template/image-field-template.component.js +157 -6
- package/esm5/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +22 -24
- package/esm5/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +10 -2
- package/esm5/lib/components/private/field-templates/text-field-template/text-field-template.component.js +18 -2
- package/esm5/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +2 -2
- package/esm5/lib/components/private/form-records/add-form-record/add-form-record.component.js +2 -2
- package/esm5/lib/components/private/form-records/list-form-record/list-form-record.component.js +2 -18
- package/esm5/lib/components/private/spinner/spinner.component.js +24 -0
- package/esm5/lib/eqp-dynamic-module.module.js +6 -2
- package/esm5/lib/models/endPointConfiguration.model.js +33 -0
- package/esm5/lib/models/fields/dateField.model.js +1 -1
- package/esm5/lib/models/fields/imageField.model.js +9 -1
- package/esm5/lib/models/fields/listValueField.model.js +7 -1
- package/esm5/lib/models/fields/numericField.model.js +1 -1
- package/esm5/lib/models/fields/textField.model.js +10 -1
- package/esm5/lib/models/form.model.js +1 -1
- package/esm5/lib/models/record.model.js +8 -1
- package/esm5/lib/services/eqp-dynamic-module-dialog.service.js +11 -1
- package/esm5/lib/services/spinner.service.js +46 -0
- package/esm5/lib/services/utilityHelper.services.js +182 -11
- package/esm5/public-api.js +3 -1
- package/fesm2015/eqproject-eqp-dynamic-module.js +1021 -239
- package/fesm2015/eqproject-eqp-dynamic-module.js.map +1 -1
- package/fesm5/eqproject-eqp-dynamic-module.js +1160 -335
- package/fesm5/eqproject-eqp-dynamic-module.js.map +1 -1
- package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +78 -4
- package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +51 -2
- package/lib/components/private/add-form-field/add-form-field.component.d.ts +42 -3
- package/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.d.ts +1 -17
- package/lib/components/private/field-templates/image-field-template/image-field-template.component.d.ts +51 -2
- package/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.d.ts +3 -11
- package/lib/components/private/field-templates/text-field-template/text-field-template.component.d.ts +3 -1
- package/lib/components/private/spinner/spinner.component.d.ts +9 -0
- package/lib/models/endPointConfiguration.model.d.ts +35 -0
- package/lib/models/fields/dateField.model.d.ts +1 -0
- package/lib/models/fields/imageField.model.d.ts +10 -4
- package/lib/models/fields/listValueField.model.d.ts +17 -0
- package/lib/models/fields/numericField.model.d.ts +3 -1
- package/lib/models/fields/textField.model.d.ts +9 -1
- package/lib/models/form.model.d.ts +1 -0
- package/lib/models/record.model.d.ts +8 -0
- package/lib/services/eqp-dynamic-module-dialog.service.d.ts +6 -0
- package/lib/services/spinner.service.d.ts +15 -0
- package/lib/services/utilityHelper.services.d.ts +30 -1
- package/package.json +5 -3
- package/public-api.d.ts +2 -0
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
1
2
|
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
2
3
|
import { BaseField } from "../models/baseField.model";
|
|
3
4
|
import { Context } from "../models/context.model";
|
|
5
|
+
import { EndPointConfiguration, EndPointData, EndPointDataParams } from "../models/endPointConfiguration.model";
|
|
6
|
+
import { TextField } from "../models/fields/textField.model";
|
|
7
|
+
import { Form } from "../models/form.model";
|
|
4
8
|
import { Record } from "../models/record.model";
|
|
9
|
+
import { SpinnerService } from "./spinner.service";
|
|
5
10
|
export declare class UtilityHelperService {
|
|
6
11
|
private formBuilder;
|
|
12
|
+
private http;
|
|
13
|
+
private spinnerService;
|
|
7
14
|
static context: Context;
|
|
8
|
-
constructor(formBuilder: FormBuilder);
|
|
15
|
+
constructor(formBuilder: FormBuilder, http: HttpClient, spinnerService: SpinnerService);
|
|
9
16
|
static EvaluateFieldFormula(formula: string, rec: Record, ctx: any): any;
|
|
10
17
|
static SetContext(ctx: Context): void;
|
|
18
|
+
static GetFieldType(field: BaseField): TextField;
|
|
11
19
|
/**
|
|
12
20
|
* Metodo per impostare i valori da suggerire nell'autocomplete per i campi in cui l'utente deve scrivere comandi javascript.
|
|
13
21
|
* In base all'ultimo carattere digitato viene impostato un elenco di oggetti o proprietà che l'utente ha a disposizione in quel momento.
|
|
@@ -45,4 +53,25 @@ export declare class UtilityHelperService {
|
|
|
45
53
|
* @param field BaseField per cui creare il FormControl da inserire nel FormGroup dela form.
|
|
46
54
|
*/
|
|
47
55
|
private createFieldFormControl;
|
|
56
|
+
/**
|
|
57
|
+
* Metodo per configurare gli endpoint da usare di default a partire dall'url base del server
|
|
58
|
+
* a cui si deve connettere e al token da passare per autenticarsi.
|
|
59
|
+
* @param baseServerUrl Stringa dell'url base del server (es: "http://localhost:5000").
|
|
60
|
+
* @param userToken Token dell'utente loggato da usare per autenticarsi se necessario.
|
|
61
|
+
* @returns Resituisce la configurazione completa degli endPoint da usare di default.
|
|
62
|
+
*/
|
|
63
|
+
ConfigureDefaultEndPoints(baseServerUrl: string, userToken: string): EndPointConfiguration;
|
|
64
|
+
/**
|
|
65
|
+
* Metodo che data la configurazione di un endpoint costruisce l'url da chiamare, gli eventuali parametri
|
|
66
|
+
* da passare (nel body o nella rotta) ed effettua la chiamata. Al termine della chiamata esegue le eventuali
|
|
67
|
+
* funzioni di callback (sia in caso di successo che in caso di errore) passate in input.
|
|
68
|
+
* @param endPointData Cofigurazione dell'endpoint da chiamare.
|
|
69
|
+
* @param dynamicModuleParams Array dei parametri aggiunti dal modulo dinamico a quelli già configurati
|
|
70
|
+
* (ad esempio il record o la form da salvare oppure l'ID per recuperare una particolare entità).
|
|
71
|
+
* @param callback Metodo da eseguire in caso di successo dopo la chiamata http.
|
|
72
|
+
* NOTA: in input viene passata la risposta della chiamata stessa.
|
|
73
|
+
* @param errorCallBack Metodo da eseguire in caso di errore dopo la chiamata http.
|
|
74
|
+
* NOTA: in input viene passato l'errore generato della chiamata stessa.
|
|
75
|
+
*/
|
|
76
|
+
RunEndPointCall(endPointData: EndPointData, dynamicModuleParams?: Array<EndPointDataParams>, callback?: (e: Form | Record | Array<Record>) => void, errorCallBack?: (err: unknown) => void): void;
|
|
48
77
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "EqProject"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.0.
|
|
7
|
+
"version": "0.0.5",
|
|
8
8
|
"peerDependencies": {
|
|
9
9
|
"@angular/common": "^9.0.7",
|
|
10
10
|
"@angular/core": "^9.0.7",
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
"sweetalert2": "^9.10.9"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@eqproject/eqp-attachments": "^0.1.
|
|
19
|
-
"@eqproject/eqp-datetimepicker": "^0.0.
|
|
18
|
+
"@eqproject/eqp-attachments": "^0.1.16",
|
|
19
|
+
"@eqproject/eqp-datetimepicker": "^0.0.19",
|
|
20
20
|
"@eqproject/eqp-filters": "^0.1.6",
|
|
21
|
+
"@eqproject/eqp-img-drawing": "0.0.2",
|
|
21
22
|
"@eqproject/eqp-numeric": "^0.0.1",
|
|
22
23
|
"@eqproject/eqp-select": "^0.4.7",
|
|
23
24
|
"@eqproject/eqp-table": "^0.8.5",
|
|
24
25
|
"browser-image-compression": "^1.0.15",
|
|
26
|
+
"fabric": "^3.6.2",
|
|
25
27
|
"ngx-image-cropper": "^3.3.5",
|
|
26
28
|
"ngx-mat-select-search": "^3.3.0",
|
|
27
29
|
"tslib": "^1.10.0"
|
package/public-api.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './lib/interfaces/iRootObject.interface';
|
|
|
18
18
|
export * from './lib/models/baseField.model';
|
|
19
19
|
export * from './lib/models/baseObj.model';
|
|
20
20
|
export * from './lib/models/context.model';
|
|
21
|
+
export * from './lib/models/endPointConfiguration.model';
|
|
21
22
|
export * from './lib/models/entity.model';
|
|
22
23
|
export * from './lib/models/form.model';
|
|
23
24
|
export * from './lib/models/record.model';
|
|
@@ -32,4 +33,5 @@ export * from './lib/models/fields/testareaField.model';
|
|
|
32
33
|
export * from './lib/models/fields/textField.model';
|
|
33
34
|
export * from './lib/services/custom-form-validators.service';
|
|
34
35
|
export * from './lib/services/eqp-dynamic-module-dialog.service';
|
|
36
|
+
export * from './lib/services/spinner.service';
|
|
35
37
|
export * from './lib/services/utilityHelper.services';
|