2.6.54 • Published 10 months ago

@eqproject/eqp-dynamic-module v2.6.54

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

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

OutputEvent ArgumentsRequiredDescription
saveRecordEventEmitter-Evento emesso quando si salva un record se non è stato specificato un endpoint da chiamare.
afterSaveRecordEventEmitter-Evento emesso DOPO aver eseguito una chiamata al server per il salvataggio di un record all'endpoint specificato.
deleteRecordEventEmitter-Evento emesso quando si elimina un record se non è stato specificato un endpoint da chiamare.
afterDeleteRecordEventEmitter-Evento emesso DOPO aver eseguito una chiamata al server per il l'eliminazione di un record all'endpoint specificato.
duplicateRecordEventEmitter-Evento emesso quando si duplica un record se non è stato specificato un endpoint da chiamare.
afterDuplicateRecordEventEmitter-Evento emesso DOPO aver eseguito una chiamata al server per la duplicazione di un record all'endpoint specificato.
SaveJSONEventEmitter-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>
InputDescrizione
configurations: DynamicModuleConfiguratorConfigan object that is a configurations container. It holds 2 objects: dynamicModuleGeneralConfig, DynamicModuleConfiguratorSpecificConfig
formID: stringobbligatorioID del form da compilare, visualizzare,

DynamicModuleConfiguratorConfig Outputs

OutputEvent ArgumentsRequiredDescription
(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

PropertyTypeDescriptionExamples
dynamicModuleGeneralConfigdynamicModuleGeneralConfigcontiene le informazioni generali comuni per la visualizzazione
DynamicModuleConfiguratorSpecificConfigdynamicModuleGeneralConfigcontiene le informazioni generali comuni per la visualizzazione

DynamicModuleConfig

PropertyTypeDescriptionExamples
dynamicModuleGeneralConfigdynamicModuleGeneralConfigcontiene le informazioni generali comuni per la visualizzazione
dynamicModuleCompileConfigdynamicModuleCompileConfigcontiene le informazioni specifiche per la visualizzazione della risposta
dynamicModuleListConfigdynamicModuleListConfigcontiene le informazioni specifiche per la visualizzazione della lista di risposte
dynamicModuleRepairConfigdynamicModuleRepairConfigcontiene le configurazioni specifiche per la modalità repair

DynamicModuleConfiguratorSpecificConfig | contiene le informazioni generali comuni per la visualizzazione

PropertyTypeDescriptionExamples
formForm
orgaIDstring
UserIDnumber
innerFormManagmentboolean
innerFormRefMatDialogRef<TemplateRef>

dynamicModuleGeneralConfig | contiene le informazioni generali comuni per la visualizzazione

PropertyTypeDescriptionExamples
baseServerUrlstringserver Url to call for API"http://localhost:5015/api"
userTokenstringToken dell'utente
endPointConfigurationEndPointConfigurationConfigurazione 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.
contextContextContesto

Note:

  • se non viene fornita una configurazione degli EndPoint si utilizza la configurazione standard

dynamicModuleCompileConfig | contiene le informazioni specifiche per la visualizzazione della risposta

PropertyTypeDescriptionExamples
showTitlebooleanShow/Hide module name in COMPILE
userModebooleanShow/Hide the buttons for "save" and "back"
showSaveButtonbooleanShow/Hide form save button when userMode is true
userIDstringSet user id for save

dynamicModuleListConfig | contiene le informazioni specifiche per la visualizzazione della lista di risposte

PropertyTypeDescriptionExamples
showTitlebooleanShow/Hide module name in LIST
defaultListActionsdynamicModuleListFormRecordActionsDefaultLista delle azioni di default da mostrare per visualizzare/modificare/duplicare/eliminare in LIST MODE
valuesArrayLista dei record da mostrare in LIST MODE

dynamicModuleRepairConfig | contiene le configurazioni specifiche per la modalità repair

PropertyTypeDescriptionExamples
FormJSONstringstringa 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

2.6.53

10 months ago

2.6.54

10 months ago

2.6.51

10 months ago

2.6.52

10 months ago

2.5.6

1 year ago

2.5.5

1 year ago

2.5.8

1 year ago

2.5.7

1 year ago

2.4.18

1 year ago

2.4.17

1 year ago

2.4.19

1 year ago

2.4.29

1 year ago

2.4.28

1 year ago

2.4.25

1 year ago

2.4.24

1 year ago

2.4.27

1 year ago

2.4.26

1 year ago

2.4.21

1 year ago

2.4.20

1 year ago

2.4.23

1 year ago

2.4.22

1 year ago

2.4.39

1 year ago

2.4.36

1 year ago

2.4.35

1 year ago

2.4.38

1 year ago

2.4.37

1 year ago

2.4.32

1 year ago

2.4.31

1 year ago

2.4.34

1 year ago

2.4.33

1 year ago

2.4.30

1 year ago

2.4.47

1 year ago

2.4.43

1 year ago

2.4.42

1 year ago

2.4.45

1 year ago

2.4.44

1 year ago

2.4.41

1 year ago

2.4.40

1 year ago

2.6.19

1 year ago

2.6.15

1 year ago

2.6.16

1 year ago

2.6.17

1 year ago

2.6.18

1 year ago

2.6.11

1 year ago

2.6.12

1 year ago

2.6.13

1 year ago

2.6.14

1 year ago

2.6.10

1 year ago

2.6.26

1 year ago

2.6.27

1 year ago

2.6.28

1 year ago

2.6.29

1 year ago

2.6.22

1 year ago

2.6.23

1 year ago

2.6.24

1 year ago

2.6.25

1 year ago

2.6.20

1 year ago

2.6.21

1 year ago

2.6.37

1 year ago

2.6.38

1 year ago

2.6.33

1 year ago

2.6.34

1 year ago

2.6.35

1 year ago

2.6.36

1 year ago

2.6.30

1 year ago

2.6.31

1 year ago

2.6.32

1 year ago

2.6.48

10 months ago

2.6.49

10 months ago

2.6.44

12 months ago

2.6.45

12 months ago

2.6.46

12 months ago

2.6.47

12 months ago

2.6.40

1 year ago

2.6.41

1 year ago

2.6.42

1 year ago

2.6.43

1 year ago

2.6.50

10 months ago

2.6.1

1 year ago

2.6.0

1 year ago

2.6.3

1 year ago

2.6.2

1 year ago

2.5.0

1 year ago

2.5.2

1 year ago

2.5.1

1 year ago

2.5.4

1 year ago

2.5.3

1 year ago

2.6.5

1 year ago

2.6.4

1 year ago

2.6.7

1 year ago

2.6.6

1 year ago

2.6.9

1 year ago

2.6.8

1 year ago

2.4.16

1 year ago

2.4.15

1 year ago

2.4.14

1 year ago

2.4.13

1 year ago

2.4.12

1 year ago

2.4.11

1 year ago

2.4.10

1 year ago

2.4.9

1 year ago

2.4.7

1 year ago

2.4.6

1 year ago

2.4.8

1 year ago

2.4.5

1 year ago

2.4.4

1 year ago

2.4.3

1 year ago

2.4.1

1 year ago

2.4.2

1 year ago

2.3.43

1 year ago

2.3.42

1 year ago

2.3.41

1 year ago

2.3.39

1 year ago

2.3.40

1 year ago

2.3.38

1 year ago

2.3.37

1 year ago

2.3.35

1 year ago

2.3.36

1 year ago

2.3.28

1 year ago

2.3.27

1 year ago

2.3.29

1 year ago

2.3.26

1 year ago

2.3.25

1 year ago

2.3.34

1 year ago

2.3.31

1 year ago

2.3.30

1 year ago

2.3.33

1 year ago

2.3.32

1 year ago

2.3.24

1 year ago

2.3.23

1 year ago

2.3.22

1 year ago

2.3.21

1 year ago

2.3.20

1 year ago

2.3.19

1 year ago

2.3.18

1 year ago

2.3.17

1 year ago

2.3.16

2 years ago

2.3.15

2 years ago

2.3.14

2 years ago

2.3.13

2 years ago

2.3.12

2 years ago

2.3.11

2 years ago

2.3.8

2 years ago

2.3.9

2 years ago

2.3.10

2 years ago

2.3.7

2 years ago

2.3.4

2 years ago

2.3.6

2 years ago

2.3.5

2 years ago

2.3.2

2 years ago

2.3.3

2 years ago

2.3.1

2 years ago

2.2.21

2 years ago

2.3.0

2 years ago

2.2.18

2 years ago

2.2.17

2 years ago

2.2.16

2 years ago

2.2.15

2 years ago

2.2.14

2 years ago

2.2.13

2 years ago

2.2.3

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.11

2 years ago

2.2.7

2 years ago

2.2.12

2 years ago

2.2.6

2 years ago

2.2.10

2 years ago

2.2.9

2 years ago

2.2.8

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.0.15

2 years ago

2.0.13

2 years ago

2.0.14

2 years ago

2.0.12

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.11

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.9

3 years ago

2.0.10

3 years ago

2.0.8

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.9

3 years ago

1.0.10

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago