npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@eqproject/eqp-dynamic-module

v2.4.16

Published

Dynamic module component - Angular Material based

Downloads

517

Readme

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