@eqproject/eqp-dynamic-module v2.6.54
EqpDynamicModule
Progetto effettivo del modulo dinamico
Struttura del codice
Nella cartella exported ci sono i componenti pubblici utilizzabili dall'esterno
Nella cartella private ci sono i componenti privati del progetto non utilizzabili dall'esterno
Componenti pubblici
I componenti pubblici sono due: 1. eqp-dynamic-module : visualizza la form dinamica; 2. eqp-dynamic-module-configuration: permette la configurazione delle form dinamiche
eqp-dynamic-module
Componente che visualizza la form dinamica.
Input | Input | obbligatorio/default | descrizione | ----- | ----------- | ----------- | ----------- | | configurations: dynamicModuleGeneralConfig | obbligatorio | configurazioni generiche per la connessione al DB | formID: string | obbligatorio | ID del form da compilare, visualizzare, | starterViewMode: EndPointConfiguration | LIST | | userID: string | 0 | Set user id for save | | showTitle | boolean | true | Show/Hide module name in COMPILE | | userMode | boolean | false | Show/Hide the buttons for "save" and "back" | | showSaveButton | true | boolean | Show/Hide form save button when userMode is true | | values: Record[] | null | | FormJSON: string | "" |
DynamicModuleConfig Outputs
Output | Event Arguments | Required | Description |
---|---|---|---|
saveRecord | EventEmitter | - | Evento emesso quando si salva un record se non è stato specificato un endpoint da chiamare. |
afterSaveRecord | EventEmitter | - | Evento emesso DOPO aver eseguito una chiamata al server per il salvataggio di un record all'endpoint specificato. |
deleteRecord | EventEmitter | - | Evento emesso quando si elimina un record se non è stato specificato un endpoint da chiamare. |
afterDeleteRecord | EventEmitter | - | Evento emesso DOPO aver eseguito una chiamata al server per il l'eliminazione di un record all'endpoint specificato. |
duplicateRecord | EventEmitter | - | Evento emesso quando si duplica un record se non è stato specificato un endpoint da chiamare. |
afterDuplicateRecord | EventEmitter | - | Evento emesso DOPO aver eseguito una chiamata al server per la duplicazione di un record all'endpoint specificato. |
SaveJSON | EventEmitter | - | Evento emesso quando si |
eqp-dynamic-module-configurator
Componente che permette la configurazione delle form dinamiche
4 modalità d'uso:
Nuovo Modulo:
let specific: DynamicModuleConfiguratorSpecificConfig = new DynamicModuleConfiguratorSpecificConfig();
specific.UserID = this.currentUser.ID
specific.orgaID = this.currentOrga.ID;
let general: DynamicModuleGeneralConfig = new DynamicModuleGeneralConfig(this.baseServerUrl, "", this.context, null)
this.config = new DynamicModuleConfiguratorConfig(general, specific)
this.loader=true;
<eqp-dynamic-module-configurator
*ngIf="loader"
[configurations] = "config"
(saveFormEvent)="onSaveForm($event)">
</eqp-dynamic-module-configurator>
Modifica di un modulo esistente:
let specific: DynamicModuleConfiguratorSpecificConfig = new DynamicModuleConfiguratorSpecificConfig();
specific.UserID = this.currentOrga.ID
specific.orgaID = "2";
let general: DynamicModuleGeneralConfig = new DynamicModuleGeneralConfig(this.baseServerUrl, "", this.context, null)
this.config = new DynamicModuleConfiguratorConfig(general, specific)
this.formID = "xxxxxx-xxxxxx-xxxxxx";
this.loader=true;
<eqp-dynamic-module-configurator
*ngIf="loader"
[configurations] = "config"
[formID]="formID"
(saveFormEvent)="onSaveForm($event)">
</eqp-dynamic-module-configurator>
Esportazione di un modulo dato l'ID:
let specific: DynamicModuleConfiguratorSpecificConfig = new DynamicModuleConfiguratorSpecificConfig();
specific.UserID = this.currentOrga.ID
specific.orgaID = "2";
let general: DynamicModuleGeneralConfig = new DynamicModuleGeneralConfig(this.baseServerUrl, "", this.context, null)
this.config = new DynamicModuleConfiguratorConfig(general, specific)
this.formID = "xxxxxx-xxxxxx-xxxxxx";
this.loader=true;
<eqp-dynamic-module-configurator
*ngIf="loader"
[configurations] = "config"
[formID]="formID"
[viewMode] = "'Export'"
(saveFormEvent)="onSaveForm($event)">
</eqp-dynamic-module-configurator>
importazione di un modulo dato il JSON:
let specific: DynamicModuleConfiguratorSpecificConfig = new DynamicModuleConfiguratorSpecificConfig();
specific.UserID = this.currentOrga.ID
specific.orgaID = "2";
specific.form = JSON.parse(this.stringForm)
let general: DynamicModuleGeneralConfig = new DynamicModuleGeneralConfig(this.baseServerUrl, "", this.context, null)
this.config = new DynamicModuleConfiguratorConfig(general, specific)
this.formID = null;
this.loader=true;
<eqp-dynamic-module-configurator
*ngIf="loader"
[configurations] = "config"
[formID]="formID"
[viewMode] = "'Export'"
(saveFormEvent)="onSaveForm($event)">
</eqp-dynamic-module-configurator>
Input | Descrizione | |
---|---|---|
configurations: DynamicModuleConfiguratorConfig | an object that is a configurations container. It holds 2 objects: dynamicModuleGeneralConfig, DynamicModuleConfiguratorSpecificConfig | |
formID: string | obbligatorio | ID del form da compilare, visualizzare, |
DynamicModuleConfiguratorConfig Outputs
Output | Event Arguments | Required | Description |
---|---|---|---|
(saveFormEvent) | EventEmitter<Form> | - | Evento emesso quando si salva una form e non è stato specificato un endpoint da chiamare. |
(afterSaveFormEvent) | EventEmitter<Form> | - | Evento emesso DOPO aver eseguito una chiamata al server per il salvataggiodi una form all'endpoint specificato. |
Models used
DynamicModuleConfiguratorConfig
Property | Type | Description | Examples |
---|---|---|---|
dynamicModuleGeneralConfig | dynamicModuleGeneralConfig | contiene le informazioni generali comuni per la visualizzazione | |
DynamicModuleConfiguratorSpecificConfig | dynamicModuleGeneralConfig | contiene le informazioni generali comuni per la visualizzazione |
DynamicModuleConfig
Property | Type | Description | Examples |
---|---|---|---|
dynamicModuleGeneralConfig | dynamicModuleGeneralConfig | contiene le informazioni generali comuni per la visualizzazione | |
dynamicModuleCompileConfig | dynamicModuleCompileConfig | contiene le informazioni specifiche per la visualizzazione della risposta | |
dynamicModuleListConfig | dynamicModuleListConfig | contiene le informazioni specifiche per la visualizzazione della lista di risposte | |
dynamicModuleRepairConfig | dynamicModuleRepairConfig | contiene le configurazioni specifiche per la modalità repair |
DynamicModuleConfiguratorSpecificConfig | contiene le informazioni generali comuni per la visualizzazione
Property | Type | Description | Examples |
---|---|---|---|
form | Form | ||
orgaID | string | ||
UserID | number | ||
innerFormManagment | boolean | ||
innerFormRef | MatDialogRef<TemplateRef> |
dynamicModuleGeneralConfig | contiene le informazioni generali comuni per la visualizzazione
Property | Type | Description | Examples |
---|---|---|---|
baseServerUrl | string | server Url to call for API | "http://localhost:5015/api" |
userToken | string | Token dell'utente | |
endPointConfiguration | EndPointConfiguration | Configurazione degli endpoint da chiamare per recuperare o salvare i dati. Può essere definita dall'utente oppure lasciata null, viene popolata con dei valori di default se viene valorizzata la proprietà "baseServerUrl" altrimenti viene lasciata null e non viene eseguita nessuna chiamata al server. | |
context | Context | Contesto |
Note:
- se non viene fornita una configurazione degli EndPoint si utilizza la configurazione standard
dynamicModuleCompileConfig | contiene le informazioni specifiche per la visualizzazione della risposta
Property | Type | Description | Examples |
---|---|---|---|
showTitle | boolean | Show/Hide module name in COMPILE | |
userMode | boolean | Show/Hide the buttons for "save" and "back" | |
showSaveButton | boolean | Show/Hide form save button when userMode is true | |
userID | string | Set user id for save |
dynamicModuleListConfig | contiene le informazioni specifiche per la visualizzazione della lista di risposte
Property | Type | Description | Examples |
---|---|---|---|
showTitle | boolean | Show/Hide module name in LIST | |
defaultListActions | dynamicModuleListFormRecordActionsDefault | Lista delle azioni di default da mostrare per visualizzare/modificare/duplicare/eliminare in LIST MODE | |
values | Array | Lista dei record da mostrare in LIST MODE |
dynamicModuleRepairConfig | contiene le configurazioni specifiche per la modalità repair
Property | Type | Description | Examples |
---|---|---|---|
FormJSON | string | stringa rappresentante il json del form da revisionare in REPAIR MODE |
EndPointConfiguration
example
export class EndPointConfiguration {
Records: {
GetByFormIDEndPoint?: EndPointData;
GetAllByEntAndUserIDEndPoint?: EndPointData;
GetByIDEndPoint?: EndPointData;
SaveEndPoint?: EndPointData;
DuplicateEndPoint?: EndPointData;
DeleteEndPoint?: EndPointData;
RepairEndPoint?: EndPointData;
};
Forms: {
GetByIDEndPoint: EndPointData;
GetByIDAndVersionEndPoint: EndPointData;
SaveEndPoint: EndPointData;
}
}
EndPointData
export class EndPointData { Url: string; Token?: string; RequestMethod: RequestMethodEnum; Params?: EndPointDataParams[]; }
EndPointDataParams
export class EndPointDataParams { ParamName: string; ParamValue: any = null; ParamType: ParamTypeEnum; }
ParamTypeEnum
export enum ParamTypeEnum {
"Query param" = 1,
"In route" = 2,
"In Body" = 3
}
RequestMethodEnum
export enum RequestMethodEnum {
GET = 'GET',
POST = 'POST',
PUT = 'PUT',
DELETE = 'DELETE'
}
Componenti privati
7 months ago
7 months ago
8 months ago
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
11 months ago
12 months ago
12 months ago
12 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
9 months ago
11 months ago
11 months ago
11 months ago
10 months ago
8 months ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago