@eqproject/eqp-dynamic-module 0.0.7 → 0.0.9
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/bundles/eqproject-eqp-dynamic-module.umd.js +3991 -0
- package/bundles/eqproject-eqp-dynamic-module.umd.js.map +1 -0
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js +17 -0
- package/bundles/eqproject-eqp-dynamic-module.umd.min.js.map +1 -0
- package/eqproject-eqp-dynamic-module.d.ts +6 -0
- package/eqproject-eqp-dynamic-module.metadata.json +1 -0
- package/esm2015/eqproject-eqp-dynamic-module.js +7 -0
- package/esm2015/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +262 -0
- package/esm2015/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +649 -0
- package/esm2015/lib/components/private/add-form-field/add-form-field.component.js +577 -0
- package/esm2015/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +127 -0
- package/esm2015/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +170 -0
- package/esm2015/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +56 -0
- package/esm2015/lib/components/private/field-templates/date-field-template/date-field-template.component.js +71 -0
- package/esm2015/lib/components/private/field-templates/image-field-template/image-field-template.component.js +196 -0
- package/esm2015/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +115 -0
- package/esm2015/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +71 -0
- package/esm2015/lib/components/private/field-templates/text-field-template/text-field-template.component.js +67 -0
- package/esm2015/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +51 -0
- package/esm2015/lib/components/private/form-records/add-form-record/add-form-record.component.js +130 -0
- package/esm2015/lib/components/private/form-records/list-form-record/list-form-record.component.js +216 -0
- package/esm2015/lib/components/private/spinner/spinner.component.js +23 -0
- package/esm2015/lib/eqp-dynamic-module.module.js +69 -0
- package/esm2015/lib/interfaces/iBaseFieldComponent.interface.js +1 -0
- package/esm2015/lib/interfaces/iRootObject.interface.js +1 -0
- package/esm2015/lib/models/baseField.model.js +36 -0
- package/esm2015/lib/models/baseObj.model.js +9 -0
- package/esm2015/lib/models/context.model.js +8 -0
- package/esm2015/lib/models/endPointConfiguration.model.js +23 -0
- package/esm2015/lib/models/entity.model.js +7 -0
- package/esm2015/lib/models/fields/attachmentField.model.js +22 -0
- package/esm2015/lib/models/fields/booleanField.model.js +12 -0
- package/esm2015/lib/models/fields/dateField.model.js +11 -0
- package/esm2015/lib/models/fields/imageField.model.js +8 -0
- package/esm2015/lib/models/fields/listValueField.model.js +14 -0
- package/esm2015/lib/models/fields/lookupField.model.js +5 -0
- package/esm2015/lib/models/fields/numericField.model.js +5 -0
- package/esm2015/lib/models/fields/testareaField.model.js +4 -0
- package/esm2015/lib/models/fields/textField.model.js +14 -0
- package/esm2015/lib/models/form.model.js +24 -0
- package/esm2015/lib/models/record.model.js +8 -0
- package/esm2015/lib/modules/material.module.js +108 -0
- package/esm2015/lib/services/custom-form-validators.service.js +19 -0
- package/esm2015/lib/services/eqp-dynamic-module-dialog.service.js +113 -0
- package/esm2015/lib/services/spinner.service.js +43 -0
- package/esm2015/lib/services/utilityHelper.services.js +387 -0
- package/esm2015/public-api.js +39 -0
- package/esm5/eqproject-eqp-dynamic-module.js +7 -0
- package/esm5/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.js +269 -0
- package/esm5/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.js +664 -0
- package/esm5/lib/components/private/add-form-field/add-form-field.component.js +588 -0
- package/esm5/lib/components/private/dynamic-module-field/dynamic-module-field.component.js +128 -0
- package/esm5/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.js +173 -0
- package/esm5/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.js +57 -0
- package/esm5/lib/components/private/field-templates/date-field-template/date-field-template.component.js +72 -0
- package/esm5/lib/components/private/field-templates/image-field-template/image-field-template.component.js +206 -0
- package/esm5/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.js +119 -0
- package/esm5/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.js +72 -0
- package/esm5/lib/components/private/field-templates/text-field-template/text-field-template.component.js +68 -0
- package/esm5/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.js +52 -0
- package/esm5/lib/components/private/form-records/add-form-record/add-form-record.component.js +133 -0
- package/esm5/lib/components/private/form-records/list-form-record/list-form-record.component.js +220 -0
- package/esm5/lib/components/private/spinner/spinner.component.js +24 -0
- package/esm5/lib/eqp-dynamic-module.module.js +72 -0
- package/esm5/lib/interfaces/iBaseFieldComponent.interface.js +1 -0
- package/esm5/lib/interfaces/iRootObject.interface.js +1 -0
- package/esm5/lib/models/baseField.model.js +43 -0
- package/esm5/lib/models/baseObj.model.js +13 -0
- package/esm5/lib/models/context.model.js +14 -0
- package/esm5/lib/models/endPointConfiguration.model.js +33 -0
- package/esm5/lib/models/entity.model.js +14 -0
- package/esm5/lib/models/fields/attachmentField.model.js +29 -0
- package/esm5/lib/models/fields/booleanField.model.js +19 -0
- package/esm5/lib/models/fields/dateField.model.js +18 -0
- package/esm5/lib/models/fields/imageField.model.js +19 -0
- package/esm5/lib/models/fields/listValueField.model.js +25 -0
- package/esm5/lib/models/fields/lookupField.model.js +12 -0
- package/esm5/lib/models/fields/numericField.model.js +12 -0
- package/esm5/lib/models/fields/testareaField.model.js +11 -0
- package/esm5/lib/models/fields/textField.model.js +21 -0
- package/esm5/lib/models/form.model.js +39 -0
- package/esm5/lib/models/record.model.js +14 -0
- package/esm5/lib/modules/material.module.js +111 -0
- package/esm5/lib/services/custom-form-validators.service.js +23 -0
- package/esm5/lib/services/eqp-dynamic-module-dialog.service.js +123 -0
- package/esm5/lib/services/spinner.service.js +46 -0
- package/esm5/lib/services/utilityHelper.services.js +396 -0
- package/esm5/public-api.js +39 -0
- package/fesm2015/eqproject-eqp-dynamic-module.js +3580 -0
- package/fesm2015/eqproject-eqp-dynamic-module.js.map +1 -0
- package/fesm5/eqproject-eqp-dynamic-module.js +3766 -0
- package/fesm5/eqproject-eqp-dynamic-module.js.map +1 -0
- package/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.d.ts +101 -0
- package/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.d.ts +235 -0
- package/lib/components/private/add-form-field/add-form-field.component.d.ts +199 -0
- package/lib/components/private/dynamic-module-field/dynamic-module-field.component.d.ts +55 -0
- package/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.d.ts +68 -0
- package/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.d.ts +21 -0
- package/lib/components/private/field-templates/date-field-template/date-field-template.component.d.ts +27 -0
- package/lib/components/private/field-templates/image-field-template/image-field-template.component.d.ts +65 -0
- package/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.d.ts +51 -0
- package/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.d.ts +26 -0
- package/lib/components/private/field-templates/text-field-template/text-field-template.component.d.ts +22 -0
- package/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.d.ts +20 -0
- package/lib/components/private/form-records/add-form-record/add-form-record.component.d.ts +52 -0
- package/lib/components/private/form-records/list-form-record/list-form-record.component.d.ts +64 -0
- package/lib/components/private/spinner/spinner.component.d.ts +9 -0
- package/lib/eqp-dynamic-module.module.d.ts +2 -0
- package/{src/lib/interfaces/iBaseFieldComponent.interface.ts → lib/interfaces/iBaseFieldComponent.interface.d.ts} +1 -1
- package/{src/lib/interfaces/iRootObject.interface.ts → lib/interfaces/iRootObject.interface.d.ts} +1 -1
- package/{src/lib/models/baseField.model.ts → lib/models/baseField.model.d.ts} +5 -14
- package/{src/lib/models/baseObj.model.ts → lib/models/baseObj.model.d.ts} +3 -3
- package/lib/models/context.model.d.ts +9 -0
- package/{src/lib/models/endPointConfiguration.model.ts → lib/models/endPointConfiguration.model.d.ts} +12 -16
- package/{src/lib/models/entity.model.ts → lib/models/entity.model.d.ts} +1 -2
- package/lib/models/fields/attachmentField.model.d.ts +17 -0
- package/{src/lib/models/fields/booleanField.model.ts → lib/models/fields/booleanField.model.d.ts} +4 -8
- package/{src/lib/models/fields/dateField.model.ts → lib/models/fields/dateField.model.d.ts} +3 -5
- package/{src/lib/models/fields/imageField.model.ts → lib/models/fields/imageField.model.d.ts} +3 -8
- package/{src/lib/models/fields/listValueField.model.ts → lib/models/fields/listValueField.model.d.ts} +8 -13
- package/{src/lib/models/fields/lookupField.model.ts → lib/models/fields/lookupField.model.d.ts} +2 -5
- package/{src/lib/models/fields/numericField.model.ts → lib/models/fields/numericField.model.d.ts} +2 -3
- package/{src/lib/models/fields/testareaField.model.ts → lib/models/fields/testareaField.model.d.ts} +2 -3
- package/lib/models/fields/textField.model.d.ts +15 -0
- package/{src/lib/models/form.model.ts → lib/models/form.model.d.ts} +12 -25
- package/{src/lib/models/record.model.ts → lib/models/record.model.d.ts} +5 -4
- package/lib/modules/material.module.d.ts +2 -0
- package/lib/services/custom-form-validators.service.d.ts +5 -0
- package/lib/services/eqp-dynamic-module-dialog.service.d.ts +34 -0
- package/lib/services/spinner.service.d.ts +15 -0
- package/lib/services/utilityHelper.services.d.ts +77 -0
- package/package.json +41 -31
- package/{src/public-api.ts → public-api.d.ts} +0 -3
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -18
- package/src/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.html +0 -10
- package/src/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.scss +0 -3
- package/src/lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component.ts +0 -228
- package/src/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.html +0 -212
- package/src/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.scss +0 -30
- package/src/lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component.ts +0 -692
- package/src/lib/components/private/add-form-field/add-form-field.component.html +0 -417
- package/src/lib/components/private/add-form-field/add-form-field.component.scss +0 -38
- package/src/lib/components/private/add-form-field/add-form-field.component.ts +0 -599
- package/src/lib/components/private/dynamic-module-field/dynamic-module-field.component.html +0 -42
- package/src/lib/components/private/dynamic-module-field/dynamic-module-field.component.scss +0 -0
- package/src/lib/components/private/dynamic-module-field/dynamic-module-field.component.ts +0 -125
- package/src/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.html +0 -25
- package/src/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.scss +0 -0
- package/src/lib/components/private/field-templates/attachment-field-template/attachment-field-template.component.ts +0 -172
- package/src/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.html +0 -32
- package/src/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.scss +0 -0
- package/src/lib/components/private/field-templates/boolean-field-template/boolean-field-template.component.ts +0 -53
- package/src/lib/components/private/field-templates/date-field-template/date-field-template.component.html +0 -6
- package/src/lib/components/private/field-templates/date-field-template/date-field-template.component.scss +0 -0
- package/src/lib/components/private/field-templates/date-field-template/date-field-template.component.ts +0 -70
- package/src/lib/components/private/field-templates/image-field-template/image-field-template.component.html +0 -57
- package/src/lib/components/private/field-templates/image-field-template/image-field-template.component.scss +0 -4
- package/src/lib/components/private/field-templates/image-field-template/image-field-template.component.ts +0 -203
- package/src/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.html +0 -46
- package/src/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.scss +0 -13
- package/src/lib/components/private/field-templates/list-value-field-template/list-value-field-template.component.ts +0 -114
- package/src/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.html +0 -6
- package/src/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.scss +0 -0
- package/src/lib/components/private/field-templates/numeric-field-template/numeric-field-template.component.ts +0 -70
- package/src/lib/components/private/field-templates/text-field-template/text-field-template.component.html +0 -5
- package/src/lib/components/private/field-templates/text-field-template/text-field-template.component.scss +0 -0
- package/src/lib/components/private/field-templates/text-field-template/text-field-template.component.ts +0 -65
- package/src/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.html +0 -5
- package/src/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.scss +0 -0
- package/src/lib/components/private/field-templates/textarea-field-template/textarea-field-template.component.ts +0 -48
- package/src/lib/components/private/form-records/add-form-record/add-form-record.component.html +0 -74
- package/src/lib/components/private/form-records/add-form-record/add-form-record.component.scss +0 -0
- package/src/lib/components/private/form-records/add-form-record/add-form-record.component.ts +0 -117
- package/src/lib/components/private/form-records/list-form-record/list-form-record.component.html +0 -14
- package/src/lib/components/private/form-records/list-form-record/list-form-record.component.scss +0 -7
- package/src/lib/components/private/form-records/list-form-record/list-form-record.component.ts +0 -213
- package/src/lib/components/private/spinner/spinner.component.html +0 -3
- package/src/lib/components/private/spinner/spinner.component.scss +0 -100
- package/src/lib/components/private/spinner/spinner.component.ts +0 -19
- package/src/lib/eqp-dynamic-module.module.ts +0 -65
- package/src/lib/models/context.model.ts +0 -10
- package/src/lib/models/fields/attachmentField.model.ts +0 -32
- package/src/lib/models/fields/textField.model.ts +0 -18
- package/src/lib/modules/material.module.ts +0 -104
- package/src/lib/services/custom-form-validators.service.ts +0 -21
- package/src/lib/services/eqp-dynamic-module-dialog.service.ts +0 -114
- package/src/lib/services/spinner.service.ts +0 -40
- package/src/lib/services/utilityHelper.services.ts +0 -413
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -23
- package/tsconfig.lib.prod.json +0 -6
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import { AttachmentType, IAttachmentDTO } from "@eqproject/eqp-attachments";
|
|
2
2
|
import { BaseField } from "../baseField.model";
|
|
3
|
-
|
|
4
3
|
/**Lista di valori */
|
|
5
|
-
export class ListValueField extends BaseField {
|
|
4
|
+
export declare class ListValueField extends BaseField {
|
|
6
5
|
/**
|
|
7
|
-
* Lista di valori ordinata. La parte "Value", viene utilizzata in modi diversi a seconda del tipo di presentazione, e/o
|
|
6
|
+
* Lista di valori ordinata. La parte "Value", viene utilizzata in modi diversi a seconda del tipo di presentazione, e/o
|
|
8
7
|
* come valore relazionato nelle formule
|
|
9
8
|
*/
|
|
10
|
-
ValuePairs: {
|
|
11
|
-
|
|
9
|
+
ValuePairs: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
12
|
/**Se true è l'utente può scegliere più di un valore */
|
|
13
13
|
IsMultiChoiche: boolean;
|
|
14
|
-
|
|
15
14
|
/**Modalità di presentazione */
|
|
16
15
|
PresentationMode: ListPresentationEnum;
|
|
17
|
-
|
|
18
16
|
/**Elenco delle immagini per la visualizzazione a immagini (ListPresentationEnum.Immagini) */
|
|
19
17
|
ButtonImageList: Array<ButtonImage>;
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
export class ButtonImage implements IAttachmentDTO {
|
|
19
|
+
export declare class ButtonImage implements IAttachmentDTO {
|
|
23
20
|
ButtonKey: string;
|
|
24
21
|
ButtonValue: string;
|
|
25
|
-
|
|
26
22
|
ID: string | number;
|
|
27
23
|
FileName?: string;
|
|
28
24
|
FileContentType?: string;
|
|
@@ -34,10 +30,9 @@ export class ButtonImage implements IAttachmentDTO {
|
|
|
34
30
|
FileThumbnailBase64?: string;
|
|
35
31
|
TrustedUrl?: any;
|
|
36
32
|
}
|
|
37
|
-
|
|
38
|
-
export enum ListPresentationEnum {
|
|
33
|
+
export declare enum ListPresentationEnum {
|
|
39
34
|
"Combo box" = 1,
|
|
40
35
|
"Radio button" = 2,
|
|
41
36
|
"Pulsante con testo" = 3,
|
|
42
37
|
"Immagini" = 4
|
|
43
|
-
}
|
|
38
|
+
}
|
package/{src/lib/models/fields/lookupField.model.ts → lib/models/fields/lookupField.model.d.ts}
RENAMED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { BaseField } from "../baseField.model";
|
|
2
|
-
|
|
3
2
|
/**Questo tipo di campo rappresenta una lookup ad altri valori */
|
|
4
|
-
export class LookupField extends BaseField {
|
|
3
|
+
export declare class LookupField extends BaseField {
|
|
5
4
|
/**Entità relazionata (il padre) */
|
|
6
5
|
EntitySourceName: string;
|
|
7
|
-
|
|
8
6
|
/**Elenco di campi ordinato che verrà visualizzato nella lookup */
|
|
9
7
|
FieldNames: string[];
|
|
10
|
-
|
|
11
8
|
/**Se true la lookup viene visualizzata in una modale per lo scegli scarta */
|
|
12
9
|
UseAsGetOrDiscard: boolean;
|
|
13
|
-
}
|
|
10
|
+
}
|
package/{src/lib/models/fields/numericField.model.ts → lib/models/fields/numericField.model.d.ts}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BaseField } from "../baseField.model";
|
|
2
|
-
|
|
3
2
|
/**Classe contiene la configurazione dei campi numerici */
|
|
4
|
-
export class NumericField extends BaseField {
|
|
3
|
+
export declare class NumericField extends BaseField {
|
|
5
4
|
IsInteger: boolean;
|
|
6
5
|
MinValue: number;
|
|
7
6
|
MaxValue: number;
|
|
@@ -9,4 +8,4 @@ export class NumericField extends BaseField {
|
|
|
9
8
|
DecimalPrecision: number;
|
|
10
9
|
ThousandsSeparator: string;
|
|
11
10
|
CurrencySymbol: string;
|
|
12
|
-
}
|
|
11
|
+
}
|
package/{src/lib/models/fields/testareaField.model.ts → lib/models/fields/testareaField.model.d.ts}
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BaseField } from "../baseField.model";
|
|
2
|
-
|
|
3
|
-
export class TextareaField extends BaseField {
|
|
2
|
+
export declare class TextareaField extends BaseField {
|
|
4
3
|
/**Numero di righe in altezza con cui viene rappresentata la text area */
|
|
5
4
|
Rows: number;
|
|
6
5
|
MaxLenght: number;
|
|
7
6
|
MinLenght: number;
|
|
8
|
-
}
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseField } from "../baseField.model";
|
|
2
|
+
/**Campo di testo */
|
|
3
|
+
export declare class TextField extends BaseField {
|
|
4
|
+
TextMask: TextMaskEnum;
|
|
5
|
+
MaxLenght: number;
|
|
6
|
+
MinLenght: number;
|
|
7
|
+
}
|
|
8
|
+
export declare enum TextMaskEnum {
|
|
9
|
+
'Password' = 1,
|
|
10
|
+
'Email' = 2,
|
|
11
|
+
'Telefono' = 3,
|
|
12
|
+
'Url' = 4
|
|
13
|
+
}
|
|
14
|
+
export declare const UrlRegex = "(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?";
|
|
15
|
+
export declare const TelRegex = "([+]?[0-9]{10,14})";
|
|
@@ -1,59 +1,46 @@
|
|
|
1
1
|
import { BaseObj } from "./baseObj.model";
|
|
2
2
|
import { IRootObject } from "../interfaces/iRootObject.interface";
|
|
3
3
|
import { BaseField } from "./baseField.model";
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Classe che rappresenta una Form completa.
|
|
7
6
|
* Si tratta dell'oggetto che viene rappresentato a video e con cui l'utente interagisce.
|
|
8
7
|
*/
|
|
9
|
-
export class Form extends BaseObj implements IRootObject {
|
|
8
|
+
export declare class Form extends BaseObj implements IRootObject {
|
|
10
9
|
Name: string;
|
|
11
10
|
OrgaID: string;
|
|
12
|
-
// FormType: FormTypeEnum;
|
|
13
11
|
FormScalarType: FormScalarTypeEnum;
|
|
14
12
|
FormFieldsGroups: Array<FormFieldGroup>;
|
|
15
|
-
|
|
16
13
|
/**
|
|
17
14
|
* Elenco dei campi rappresentati nella form
|
|
18
15
|
* possono appartenere ad una sola entità
|
|
19
16
|
*/
|
|
20
17
|
Fields: Array<BaseField>;
|
|
21
|
-
|
|
22
18
|
ActionsOnRecord: Array<ActionOnRecord>;
|
|
23
|
-
|
|
24
19
|
/**
|
|
25
20
|
* Elenco delle form contenute nella form base, ad esempio possono essere le varie form di
|
|
26
21
|
* dettaglio
|
|
27
22
|
*/
|
|
28
23
|
InnerForms: Array<Form>;
|
|
29
|
-
|
|
30
24
|
RootEntityID: string;
|
|
31
|
-
|
|
32
|
-
// Proprietà client
|
|
33
25
|
OldName?: string;
|
|
34
26
|
}
|
|
35
|
-
|
|
36
|
-
export class FormFieldGroup {
|
|
27
|
+
export declare class FormFieldGroup {
|
|
37
28
|
Name: string;
|
|
38
29
|
OrdinalPosition?: number;
|
|
39
30
|
}
|
|
40
|
-
|
|
41
|
-
export class ActionOnRecord {
|
|
31
|
+
export declare class ActionOnRecord {
|
|
42
32
|
Name: string;
|
|
43
33
|
Icon: string;
|
|
44
|
-
Action: string;
|
|
34
|
+
Action: string;
|
|
45
35
|
OrdinalPosition: number;
|
|
46
36
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
LIST = 2 /* form di tipo lista che viene rappresentata con molti record */
|
|
37
|
+
export declare enum FormTypeEnum {
|
|
38
|
+
SCALAR = 1,
|
|
39
|
+
LIST = 2
|
|
51
40
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"In
|
|
57
|
-
"In accordion" = 4 //GROUPED_BY_ACCORDION
|
|
41
|
+
export declare enum FormScalarTypeEnum {
|
|
42
|
+
"Semplice" = 1,
|
|
43
|
+
"A step" = 2,
|
|
44
|
+
"In tab" = 3,
|
|
45
|
+
"In accordion" = 4
|
|
58
46
|
}
|
|
59
|
-
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export class Record {
|
|
1
|
+
export declare class Record {
|
|
2
2
|
ID: string;
|
|
3
3
|
EntID: string;
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
export class DynRecord {
|
|
6
|
+
export declare class DynRecord {
|
|
8
7
|
ID: string;
|
|
9
8
|
EntID: string;
|
|
10
|
-
Values: {
|
|
9
|
+
Values: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
11
12
|
SerializedValues: string;
|
|
12
13
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ValidationErrors } from "@angular/forms";
|
|
2
|
+
export declare class ArrayValidators {
|
|
3
|
+
static minLenght(minLenght: number): (AbstractControl: any) => ValidationErrors | null;
|
|
4
|
+
static maxLenght(maxLenght: number): (AbstractControl: any) => ValidationErrors | null;
|
|
5
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare class EqpDynamicModuleDialogService {
|
|
2
|
+
constructor();
|
|
3
|
+
/**
|
|
4
|
+
* Mostra uno sweet alert di tipo SUCCESS con il messaggio passato come parametro.
|
|
5
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
6
|
+
* @param title Titolo dello sweetalert (di default mostra 'Operazione completata')
|
|
7
|
+
*/
|
|
8
|
+
static Success(message: string, title?: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Mostra uno sweet alert di tipo ERROR con il messaggio passato come parametro.
|
|
11
|
+
* @param message Messaggio d'errore da mostrare nello sweetalert
|
|
12
|
+
* @param title Titolo dello sweetalert (di default mostra 'Errore')
|
|
13
|
+
*/
|
|
14
|
+
static Error(message: string | string[], title?: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Mostra uno sweetalert di tipo CONFIRM con il messaggio passato come parametro e se viene premuto
|
|
17
|
+
* CONFERMA lancia la funzione di callback passata come parametro
|
|
18
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
19
|
+
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
20
|
+
*/
|
|
21
|
+
static Confirm(message: string | string[], confirmCallback: any, isWarning?: boolean, title?: string, customWidth?: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Mostra uno sweetalert di tipo INFO con il messaggio passato come parametro
|
|
24
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
25
|
+
* @param title Titolo dello sweetalert (di default mostra 'Info')
|
|
26
|
+
*/
|
|
27
|
+
static Info(message: string, title?: string, isToast?: boolean): void;
|
|
28
|
+
/**
|
|
29
|
+
* Mostra uno sweetalert di tipo WARNING con il messaggio passato come parametro
|
|
30
|
+
* @param message Messaggio da mostrare nello sweetalert
|
|
31
|
+
* @param title Titolo dello sweetalert (di default mostra 'Attenzione!')
|
|
32
|
+
*/
|
|
33
|
+
static Warning(message: string | string[], title?: string, isToast?: boolean): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
export declare class SpinnerService {
|
|
3
|
+
isLoading: Subject<boolean>;
|
|
4
|
+
private requestsCount;
|
|
5
|
+
/**
|
|
6
|
+
* Mostra lo spinner
|
|
7
|
+
*/
|
|
8
|
+
show(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Nasconde lo spinner
|
|
11
|
+
*/
|
|
12
|
+
hide(): void;
|
|
13
|
+
addRequestCounter(): void;
|
|
14
|
+
removeRequestCounter(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { FormBuilder, FormGroup } from "@angular/forms";
|
|
3
|
+
import { BaseField } from "../models/baseField.model";
|
|
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";
|
|
8
|
+
import { Record } from "../models/record.model";
|
|
9
|
+
import { SpinnerService } from "./spinner.service";
|
|
10
|
+
export declare class UtilityHelperService {
|
|
11
|
+
private formBuilder;
|
|
12
|
+
private http;
|
|
13
|
+
private spinnerService;
|
|
14
|
+
static context: Context;
|
|
15
|
+
constructor(formBuilder: FormBuilder, http: HttpClient, spinnerService: SpinnerService);
|
|
16
|
+
static EvaluateFieldFormula(formula: string, rec: Record, ctx: any): any;
|
|
17
|
+
static SetContext(ctx: Context): void;
|
|
18
|
+
static GetFieldType(field: BaseField): TextField;
|
|
19
|
+
/**
|
|
20
|
+
* Metodo per impostare i valori da suggerire nell'autocomplete per i campi in cui l'utente deve scrivere comandi javascript.
|
|
21
|
+
* In base all'ultimo carattere digitato viene impostato un elenco di oggetti o proprietà che l'utente ha a disposizione in quel momento.
|
|
22
|
+
* @param fields Array di BaseField aggiunti alla Form
|
|
23
|
+
* @param typedFormula Stringa digitata dall'utente
|
|
24
|
+
* @summary Il metodo imposta i suggerimenti basandosi su 3 casi:
|
|
25
|
+
* 1) l'utente non ha digitato nulla o la stringa digitata dall'utente finisce con uno spazio vuoto
|
|
26
|
+
* 2) la stringa digitata dall'utente finisce con un "."
|
|
27
|
+
* 3) la stringa digitata dall'utente non coincide con nessun altro caso sopra (finisce con un carattere qualunque)
|
|
28
|
+
*/
|
|
29
|
+
static GetAutocompleteOptions(fields: Array<BaseField>, typedFormula: string): Array<{
|
|
30
|
+
label: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Metodo invocato dall'html per impostare le classi css per visualizzare il campo all'interno della form.
|
|
35
|
+
* Se per il field sono state specificate delle classi allora vengono applcate quelle, altrimenti vengono usate
|
|
36
|
+
* delle classi di default.
|
|
37
|
+
* @param field BaseField da visualizzare.
|
|
38
|
+
* @returns Restituisce una stringa contenente le classi css da applicare.
|
|
39
|
+
*/
|
|
40
|
+
getFieldSyleClass(field: BaseField): string;
|
|
41
|
+
/**
|
|
42
|
+
* Metodo per creare il FormGroup che rappresenta una Form a partire dai suoi BaseField.
|
|
43
|
+
* @param formFields Lista dei BaseField che compongono la form.
|
|
44
|
+
* @param record Oggetto di tipo Record che contiene i valori dei campi.
|
|
45
|
+
* @param onlyView Se TRUE disabilita la form per renderla in sola lettura.
|
|
46
|
+
* @param includeCurrentFormInField Se TRUE popola la proprietà FormFormGroup all'interno di ogni BaseField con il FormGroup corrente.
|
|
47
|
+
* @returns Restituisce un FormGroup rappresentate la Form a cui appartengono i BaseField ricevuti in input.
|
|
48
|
+
*/
|
|
49
|
+
CreateFormFormGroup(formFields: Array<BaseField>, record: Record, onlyView?: boolean, includeCurrentFormInField?: boolean): FormGroup;
|
|
50
|
+
/**
|
|
51
|
+
* Funzione per creare e aggiungere al FormGroup rappresentante la form un nuovo FormControl a partire da un Field.
|
|
52
|
+
* In nuovo FormControl avrà il nome del campo passato e verranno impostati i Validators in base al tipo del campo stesso.
|
|
53
|
+
* @param field BaseField per cui creare il FormControl da inserire nel FormGroup dela form.
|
|
54
|
+
*/
|
|
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;
|
|
77
|
+
}
|
package/package.json
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@eqproject/eqp-dynamic-module",
|
|
3
|
-
"description": "Dynamic module component - Angular Material based",
|
|
4
|
-
"author": {
|
|
5
|
-
"name": "EqProject"
|
|
6
|
-
},
|
|
7
|
-
"version": "0.0.
|
|
8
|
-
"peerDependencies": {
|
|
9
|
-
"@angular/common": "^9.0.7",
|
|
10
|
-
"@angular/core": "^9.0.7",
|
|
11
|
-
"@angular/material": "^10.0.1",
|
|
12
|
-
"@angular-material-components/datetime-picker": "^2.0.4",
|
|
13
|
-
"@angular-material-components/moment-adapter": "^6.0.0",
|
|
14
|
-
"moment": "^2.29.1",
|
|
15
|
-
"sweetalert2": "^9.10.9"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"@eqproject/eqp-
|
|
20
|
-
"@eqproject/eqp-
|
|
21
|
-
"@eqproject/eqp-
|
|
22
|
-
"@eqproject/eqp-
|
|
23
|
-
"@eqproject/eqp-
|
|
24
|
-
"@eqproject/eqp-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"ngx-
|
|
29
|
-
"
|
|
30
|
-
}
|
|
31
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@eqproject/eqp-dynamic-module",
|
|
3
|
+
"description": "Dynamic module component - Angular Material based",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "EqProject"
|
|
6
|
+
},
|
|
7
|
+
"version": "0.0.9",
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"@angular/common": "^9.0.7",
|
|
10
|
+
"@angular/core": "^9.0.7",
|
|
11
|
+
"@angular/material": "^10.0.1",
|
|
12
|
+
"@angular-material-components/datetime-picker": "^2.0.4",
|
|
13
|
+
"@angular-material-components/moment-adapter": "^6.0.0",
|
|
14
|
+
"moment": "^2.29.1",
|
|
15
|
+
"sweetalert2": "^9.10.9"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@eqproject/eqp-attachments": "^0.1.16",
|
|
19
|
+
"@eqproject/eqp-datetimepicker": "^0.0.19",
|
|
20
|
+
"@eqproject/eqp-filters": "^0.1.6",
|
|
21
|
+
"@eqproject/eqp-img-drawing": "0.0.2",
|
|
22
|
+
"@eqproject/eqp-numeric": "^0.0.1",
|
|
23
|
+
"@eqproject/eqp-select": "^0.4.7",
|
|
24
|
+
"@eqproject/eqp-table": "^0.8.5",
|
|
25
|
+
"browser-image-compression": "^1.0.15",
|
|
26
|
+
"fabric": "^3.6.2",
|
|
27
|
+
"ngx-image-cropper": "^3.3.5",
|
|
28
|
+
"ngx-mat-select-search": "^3.3.0",
|
|
29
|
+
"tslib": "^1.10.0"
|
|
30
|
+
},
|
|
31
|
+
"main": "bundles/eqproject-eqp-dynamic-module.umd.js",
|
|
32
|
+
"module": "fesm5/eqproject-eqp-dynamic-module.js",
|
|
33
|
+
"es2015": "fesm2015/eqproject-eqp-dynamic-module.js",
|
|
34
|
+
"esm5": "esm5/eqproject-eqp-dynamic-module.js",
|
|
35
|
+
"esm2015": "esm2015/eqproject-eqp-dynamic-module.js",
|
|
36
|
+
"fesm5": "fesm5/eqproject-eqp-dynamic-module.js",
|
|
37
|
+
"fesm2015": "fesm2015/eqproject-eqp-dynamic-module.js",
|
|
38
|
+
"typings": "eqproject-eqp-dynamic-module.d.ts",
|
|
39
|
+
"metadata": "eqproject-eqp-dynamic-module.metadata.json",
|
|
40
|
+
"sideEffects": false
|
|
41
|
+
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of eqp-dynamic-module
|
|
3
|
-
*/
|
|
4
1
|
export * from './lib/eqp-dynamic-module.module';
|
|
5
2
|
export * from './lib/components/exported/eqp-dynamic-module/eqp-dynamic-module.component';
|
|
6
3
|
export * from './lib/components/exported/eqp-dynamic-module-configurator/eqp-dynamic-module-configurator.component';
|
package/karma.conf.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Karma configuration file, see link for more information
|
|
2
|
-
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
-
|
|
4
|
-
module.exports = function (config) {
|
|
5
|
-
config.set({
|
|
6
|
-
basePath: '',
|
|
7
|
-
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
-
plugins: [
|
|
9
|
-
require('karma-jasmine'),
|
|
10
|
-
require('karma-chrome-launcher'),
|
|
11
|
-
require('karma-jasmine-html-reporter'),
|
|
12
|
-
require('karma-coverage-istanbul-reporter'),
|
|
13
|
-
require('@angular-devkit/build-angular/plugins/karma')
|
|
14
|
-
],
|
|
15
|
-
client: {
|
|
16
|
-
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
17
|
-
},
|
|
18
|
-
coverageIstanbulReporter: {
|
|
19
|
-
dir: require('path').join(__dirname, '../../coverage/eqp-dynamic-module'),
|
|
20
|
-
reports: ['html', 'lcovonly', 'text-summary'],
|
|
21
|
-
fixWebpackSourcePaths: true
|
|
22
|
-
},
|
|
23
|
-
reporters: ['progress', 'kjhtml'],
|
|
24
|
-
port: 9876,
|
|
25
|
-
colors: true,
|
|
26
|
-
logLevel: config.LOG_INFO,
|
|
27
|
-
autoWatch: true,
|
|
28
|
-
browsers: ['Chrome'],
|
|
29
|
-
singleRun: false,
|
|
30
|
-
restartOnFileChange: true
|
|
31
|
-
});
|
|
32
|
-
};
|
package/ng-package.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
-
"dest": "../../dist/eqp-dynamic-module",
|
|
4
|
-
"lib": {
|
|
5
|
-
"entryFile": "src/public-api.ts"
|
|
6
|
-
},
|
|
7
|
-
"whitelistedNonPeerDependencies": [
|
|
8
|
-
"@eqproject/eqp-datetimepicker",
|
|
9
|
-
"@eqproject/eqp-select",
|
|
10
|
-
"@eqproject/eqp-table",
|
|
11
|
-
"@eqproject/eqp-attachments",
|
|
12
|
-
"@eqproject/eqp-numeric",
|
|
13
|
-
"@eqproject/eqp-filters",
|
|
14
|
-
"browser-image-compression",
|
|
15
|
-
"ngx-image-cropper",
|
|
16
|
-
"."
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<eqp-dynamic-module-spinner></eqp-dynamic-module-spinner>
|
|
2
|
-
|
|
3
|
-
<add-form-record *ngIf="viewMode == FormTypeEnum.SCALAR" [form]="form" [record]="selectedRecord"
|
|
4
|
-
[showButtons]="showButtons" [onlyView]="onlyView" (saveRecordEvent)="onSaveRecord($event)" [showTitle]="showTitle">
|
|
5
|
-
</add-form-record>
|
|
6
|
-
|
|
7
|
-
<list-form-record *ngIf="viewMode == FormTypeEnum.LIST && values" [form]="form" [values]="values"
|
|
8
|
-
(onAddViewEditRecord)="onAddViewEditRecord($event)" [showTitle]="showTitle"
|
|
9
|
-
(onDeleteRecord)="onDeleteRecord($event)" (onDuplicateRecord)="onDuplicateRecord($event)">
|
|
10
|
-
</list-form-record>
|