@universis/forms
TypeScript icon, indicating that this package has built-in type declarations

1.1.10 • Public • Published

@universis/forms

Implementation of angular-formio for Universis client applications.

Usage

npm i @universis/forms

Import AdvancedFormsModule:

    @NgModule({
    declarations: [
        ...
    ],
    imports: [
        CommonModule,
        BrowserModule,
        BrowserAnimationsModule,
        HttpClientModule,
        TranslateModule.forRoot(),
        SharedModule.forRoot(),
        ...,
        AdvancedFormsModule.forRoot(),
        ...
    ],
    bootstrap: [AppComponent]
    })
    export class AppModule {
      constructor() {
          ...
      }
    }

and start using AdvancedFormComponent:

<advanced-form-edit formName="Courses/edit" [(data)]="model">
</advanced-form-edit>

or

<advanced-form-edit [(data)]="model" (customEvent)="onCustomEvent($event)" 
[formConfig]="formConfiguration" ></advanced-form-edit>

Development

Import @universis/forms as submodule in any angular cli project by replacing newProjectRoot as already configured in your angular.json

git submodule add https://gitlab.com/universis/forms.git <newProjectRoot>/forms

e.g.

git submodule add https://gitlab.com/universis/forms.git projects/forms

Add the following entries to tsconfig.app.json#compilerOptions.paths:

{
    "compilerOptions": {
        "paths": {
            "@universis/forms": [
                "<newProjectRoot>/forms/src/public_api"
            ]
            ...
        }
    }
}  

If you want to include @universis/forms as an angular cli project, include the following section in angular.json under projects:

"projects": {
  "forms": {
    "root": "<newProjectRoot>/forms",
    "sourceRoot": "<newProjectRoot>/forms/src",
    "projectType": "library",
    "prefix": "lib",
    "architect": {
      "build": {
        "builder": "@angular-devkit/build-ng-packagr:build",
        "options": {
          "tsConfig": "<newProjectRoot>/forms/tsconfig.lib.json",
          "project": "<newProjectRoot>/forms/ng-package.json"
        }
      },
      "test": {
        "builder": "@angular-devkit/build-angular:karma",
        "options": {
          "main": "<newProjectRoot>/forms/src/test.ts",
          "polyfills": "<newProjectRoot>/forms/src/polyfills.ts",
          "tsConfig": "<newProjectRoot>/forms/tsconfig.spec.json",
          "karmaConfig": "<newProjectRoot>/forms/karma.conf.js",
          "watch": false,
          "codeCoverage": true,
          "scripts": []
        }
      },
      "lint": {
        "builder": "@angular-devkit/build-angular:tslint",
        "options": {
          "tsConfig": [
            "<newProjectRoot>/forms/tsconfig.lib.json",
            "<newProjectRoot>/forms/tsconfig.spec.json"
          ],
          "exclude": [
            "**/node_modules/**"
          ]
        }
      }
    }
  },
  ...
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.5.7-next.00next
1.1.101latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.101
1.1.91
1.1.80
1.1.70
1.1.60
1.1.50
15.2.10
1.1.40
15.2.03
1.1.31
1.1.10
15.1.03
1.0.120
1.0.110
1.0.100
1.0.90
1.0.81
1.0.70
1.0.60
1.0.51
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.5.140
0.5.130
0.5.120
0.5.110
0.5.100
0.5.90
0.5.80
0.5.70
0.5.7-next.00
0.5.60
0.5.50
0.5.20
0.5.00

Package Sidebar

Install

npm i @universis/forms

Weekly Downloads

11

Version

1.1.10

License

LGPL-3.0-or-later

Unpacked Size

1.52 MB

Total Files

54

Last publish

Collaborators

  • universis