├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── e2e ├── app.e2e-spec.ts ├── app.po.ts └── tsconfig.e2e.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── protractor.conf.js ├── src ├── app │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── auth │ │ ├── auth.module.spec.ts │ │ ├── auth.module.ts │ │ └── login │ │ │ ├── login.component.html │ │ │ ├── login.component.scss │ │ │ ├── login.component.spec.ts │ │ │ └── login.component.ts │ ├── components │ │ └── CheckMatrix.js │ ├── employee │ │ └── employee.module.ts │ ├── event │ │ ├── event-resource │ │ │ ├── event-resource.component.html │ │ │ ├── event-resource.component.scss │ │ │ ├── event-resource.component.spec.ts │ │ │ └── event-resource.component.ts │ │ ├── event-view │ │ │ ├── event-view.component.html │ │ │ ├── event-view.component.scss │ │ │ ├── event-view.component.spec.ts │ │ │ └── event-view.component.ts │ │ ├── event.module.ts │ │ └── participant │ │ │ └── participant.module.ts │ ├── form │ │ ├── form.module.spec.ts │ │ └── form.module.ts │ ├── header │ │ ├── header.component.html │ │ ├── header.component.sass │ │ ├── header.component.spec.ts │ │ └── header.component.ts │ ├── hero │ │ ├── hero.component.html │ │ ├── hero.component.scss │ │ ├── hero.component.spec.ts │ │ └── hero.component.ts │ └── home │ │ ├── home.component.html │ │ ├── home.component.sass │ │ ├── home.component.spec.ts │ │ └── home.component.ts ├── assets │ └── .gitkeep ├── config.ts ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── polyfills.ts ├── project.json ├── styles.scss ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json └── typings.d.ts ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | testem.log 34 | /typings 35 | 36 | # e2e 37 | /e2e/*.js 38 | /e2e/*.map 39 | 40 | # System Files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Form.io Angular Starter Application 2 | ==================================== 3 | This is a starter application that uses [Angular](https://angular.io), [Bootstrap 4](https://getbootstrap.com/), [Angular CLI](https://cli.angular.io), and [Form.io](https://form.io) to create a Serverless form-based application. 4 | 5 | Usage 6 | --------- 7 | This starterkit is based off of an [Angular CLI](https://cli.angular.io/) application. Because of this, you will need to install the CLI tool and launch this application using ```ng serve``` 8 | 9 | ``` 10 | npm install -g @angular/cli 11 | ng serve 12 | ``` 13 | 14 | This will launch an Angular application @ [http://localhost:4200](http://localhost:4200) in your browser. You can go there to try out the default application. 15 | 16 | Using your own Form.io Project 17 | --------- 18 | You can also use this application with your own Form.io project. This will use the API's provided by your project to host all of 19 | the data for this application. 20 | 21 | 1. First login or create an account @ [Form.io](https://portal.form.io) 22 | 2. Create a new project called "Event Manager" 23 | 3. Under Advanced Options, click on **Upload A Project Template**, then select the **```/src/project.json```** file from this repository. 24 | 25 | ![](https://monosnap.com/file/yITvSniWzfdYJPLdfhC4bWHZEd9LBq.png) 26 | 27 | 4. Click on **Create Project** button. 28 | 5. After the project is created, copy the API path of your project. It should look like https://yourproject.form.io 29 | 6. Make the following change to the **```src/config.ts```** file, and replace ```[PROJECT_API]``` with the api of your project. 30 | 31 | ```ts 32 | import { FormioAppConfig } from 'angular-formio'; 33 | import { FormioAuthConfig } from 'angular-formio/auth'; 34 | 35 | export const AppConfig: FormioAppConfig = { 36 | appUrl: '[PROJECT_API]', 37 | apiUrl: 'https://api.form.io', 38 | icons: 'fontawesome' 39 | }; 40 | 41 | export const AuthConfig: FormioAuthConfig = { 42 | login: { 43 | form: 'user/login' 44 | }, 45 | register: { 46 | form: 'user/register' 47 | } 48 | }; 49 | ``` 50 | 51 | 7. Launch the application using... 52 | 53 | ``` 54 | ng serve 55 | ``` 56 | 57 | You are now hosting all of the data from this application within your own Form.io project. 58 | 59 | Enjoy! 60 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "angular-app-starterkit": { 7 | "root": "", 8 | "sourceRoot": "src", 9 | "projectType": "application", 10 | "architect": { 11 | "build": { 12 | "builder": "@angular-devkit/build-angular:browser", 13 | "options": { 14 | "outputPath": "dist", 15 | "index": "src/index.html", 16 | "main": "src/main.ts", 17 | "tsConfig": "src/tsconfig.app.json", 18 | "preserveSymlinks": true, 19 | "polyfills": "src/polyfills.ts", 20 | "assets": [ 21 | "src/assets", 22 | "src/favicon.ico" 23 | ], 24 | "styles": [ 25 | "src/styles.scss" 26 | ], 27 | "scripts": [] 28 | }, 29 | "configurations": { 30 | "production": { 31 | "optimization": true, 32 | "outputHashing": "all", 33 | "sourceMap": false, 34 | "extractCss": true, 35 | "namedChunks": false, 36 | "aot": true, 37 | "extractLicenses": true, 38 | "vendorChunk": false, 39 | "buildOptimizer": true, 40 | "fileReplacements": [ 41 | { 42 | "replace": "src/environments/environment.ts", 43 | "with": "src/environments/environment.prod.ts" 44 | } 45 | ] 46 | } 47 | } 48 | }, 49 | "serve": { 50 | "builder": "@angular-devkit/build-angular:dev-server", 51 | "options": { 52 | "browserTarget": "angular-app-starterkit:build" 53 | }, 54 | "configurations": { 55 | "production": { 56 | "browserTarget": "angular-app-starterkit:build:production" 57 | } 58 | } 59 | }, 60 | "extract-i18n": { 61 | "builder": "@angular-devkit/build-angular:extract-i18n", 62 | "options": { 63 | "browserTarget": "angular-app-starterkit:build" 64 | } 65 | }, 66 | "test": { 67 | "builder": "@angular-devkit/build-angular:karma", 68 | "options": { 69 | "main": "src/test.ts", 70 | "karmaConfig": "./karma.conf.js", 71 | "polyfills": "src/polyfills.ts", 72 | "tsConfig": "src/tsconfig.spec.json", 73 | "scripts": [], 74 | "styles": [ 75 | "src/styles.scss" 76 | ], 77 | "assets": [ 78 | "src/assets", 79 | "src/favicon.ico" 80 | ] 81 | } 82 | }, 83 | "lint": { 84 | "builder": "@angular-devkit/build-angular:tslint", 85 | "options": { 86 | "tsConfig": [ 87 | "src/tsconfig.app.json", 88 | "src/tsconfig.spec.json" 89 | ], 90 | "exclude": [ 91 | "**/node_modules/**" 92 | ] 93 | } 94 | } 95 | } 96 | }, 97 | "angular-app-starterkit-e2e": { 98 | "root": "", 99 | "sourceRoot": "", 100 | "projectType": "application", 101 | "architect": { 102 | "e2e": { 103 | "builder": "@angular-devkit/build-angular:protractor", 104 | "options": { 105 | "protractorConfig": "./protractor.conf.js", 106 | "devServerTarget": "angular-app-starterkit:serve" 107 | } 108 | }, 109 | "lint": { 110 | "builder": "@angular-devkit/build-angular:tslint", 111 | "options": { 112 | "tsConfig": [ 113 | "e2e/tsconfig.e2e.json" 114 | ], 115 | "exclude": [ 116 | "**/node_modules/**" 117 | ] 118 | } 119 | } 120 | } 121 | } 122 | }, 123 | "defaultProject": "angular-app-starterkit", 124 | "schematics": { 125 | "@schematics/angular:component": { 126 | "prefix": "app", 127 | "styleext": "scss" 128 | }, 129 | "@schematics/angular:directive": { 130 | "prefix": "app" 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('angular-app-starterkit App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to app!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 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'), reports: [ 'html', 'lcovonly' ], 20 | fixWebpackSourcePaths: true 21 | }, 22 | angularCli: { 23 | environment: 'dev' 24 | }, 25 | reporters: ['progress', 'kjhtml'], 26 | port: 9876, 27 | colors: true, 28 | logLevel: config.LOG_INFO, 29 | autoWatch: true, 30 | browsers: ['Chrome'], 31 | singleRun: false 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@formio/angular-app-starterkit", 3 | "version": "1.8.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "ng": "ng", 7 | "start": "ng serve", 8 | "build": "ng build --prod", 9 | "test": "ng test", 10 | "lint": "ng lint", 11 | "e2e": "ng e2e", 12 | "deploy": "ng build --prod --base-href /angular-app-starterkit/; cd dist; git init; git remote add origin git@github.com:formio/angular-app-starterkit.git; git checkout -b gh-pages; git add -A; git commit -m 'Update demo application'; git push -f origin gh-pages;" 13 | }, 14 | "private": true, 15 | "dependencies": { 16 | "@angular/animations": "^12.0.0", 17 | "@angular/common": "^12.0.0", 18 | "@angular/compiler": "^12.0.0", 19 | "@angular/core": "^12.0.0", 20 | "@angular/elements": "^12.0.0", 21 | "@angular/forms": "^12.0.0", 22 | "@angular/platform-browser": "^12.0.0", 23 | "@angular/platform-browser-dynamic": "^12.0.0", 24 | "@angular/router": "^12.0.0", 25 | "@formio/angular": "^5.0.0", 26 | "bootstrap": "^4.5.3", 27 | "bootswatch": "^4.5.3", 28 | "core-js": "^3.8.1", 29 | "font-awesome": "^4.7.0", 30 | "formiojs": "^4.12.4", 31 | "jquery": "^3.5.1", 32 | "ngx-bootstrap": "^6.2.0", 33 | "prism-themes": "^1.5.0", 34 | "prismjs": "^1.22.0", 35 | "rxjs": "^6.6.3", 36 | "zone.js": "~0.11.4" 37 | }, 38 | "devDependencies": { 39 | "@angular-devkit/build-angular": "^12.0.0", 40 | "@angular/cli": "^12.0.0", 41 | "@angular/compiler-cli": "^12.0.0", 42 | "@angular/language-service": "^12.0.0", 43 | "@types/jasmine": "^3.6.2", 44 | "@types/jasminewd2": "^2.0.8", 45 | "@types/node": "^14.14.14", 46 | "codelyzer": "^6.0.1", 47 | "jasmine-core": "^3.6.0", 48 | "jasmine-spec-reporter": "^6.0.0", 49 | "karma": "^6.3.2", 50 | "karma-chrome-launcher": "~3.1.0", 51 | "karma-coverage-istanbul-reporter": "~3.0.2", 52 | "karma-jasmine": "~4.0.0", 53 | "karma-jasmine-html-reporter": "^1.5.0", 54 | "protractor": "~7.0.0", 55 | "ts-node": "^9.1.1", 56 | "tslint": "^6.1.3", 57 | "typescript": "~4.2.4" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './e2e/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: 'e2e/tsconfig.e2e.json' 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { FormioResources } from '@formio/angular/resource'; 4 | import { FormioAuthService } from '@formio/angular/auth'; 5 | 6 | @Component({ 7 | selector: 'app-root', 8 | templateUrl: './app.component.html', 9 | styleUrls: ['./app.component.scss'] 10 | }) 11 | export class AppComponent { 12 | title = 'app'; 13 | 14 | constructor( 15 | private auth: FormioAuthService, 16 | private router: Router, 17 | public resources: FormioResources 18 | ) { 19 | this.auth.onLogin.subscribe(() => { 20 | this.router.navigate(['/home']); 21 | }); 22 | 23 | this.auth.onLogout.subscribe(() => { 24 | this.router.navigate(['/auth/login']); 25 | }); 26 | 27 | this.auth.onRegister.subscribe(() => { 28 | this.router.navigate(['/home']); 29 | }); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | import { FormioModule, FormioAppConfig } from '@formio/angular'; 5 | import { FormManagerService, FormManagerConfig } from '@formio/angular/manager'; 6 | import { FormioAuthService, FormioAuthConfig } from '@formio/angular/auth'; 7 | import { FormioResources } from '@formio/angular/resource'; 8 | import { AuthConfig, AppConfig } from '../config'; 9 | 10 | import { AppComponent } from './app.component'; 11 | import { HomeComponent } from './home/home.component'; 12 | import { HeaderComponent } from './header/header.component'; 13 | import { HeroComponent } from './hero/hero.component'; 14 | 15 | // import './components/CheckMatrix'; 16 | 17 | @NgModule({ 18 | declarations: [ 19 | AppComponent, 20 | HomeComponent, 21 | HeaderComponent, 22 | HeroComponent 23 | ], 24 | imports: [ 25 | BrowserModule, 26 | FormioModule, 27 | RouterModule.forRoot([ 28 | { 29 | path: '', 30 | redirectTo: '/home', 31 | pathMatch: 'full' 32 | }, 33 | { 34 | path: 'home', 35 | component: HomeComponent 36 | }, 37 | { 38 | path: 'auth', 39 | loadChildren: () => import('./auth/auth.module').then(m => m.AuthModule) 40 | }, 41 | { 42 | path: 'form', 43 | loadChildren: () => import('./form/form.module').then(m => m.FormModule) 44 | }, 45 | { 46 | path: 'event', 47 | loadChildren: () => import('./event/event.module').then(m => m.EventModule) 48 | }, 49 | { 50 | path: 'employee', 51 | loadChildren: () => import('./employee/employee.module').then(m => m.EmployeeModule) 52 | } 53 | ], {useHash: true}) 54 | ], 55 | providers: [ 56 | FormioResources, 57 | FormioAuthService, 58 | FormManagerService, 59 | {provide: FormManagerConfig, useValue: { 60 | tag: 'common' 61 | }}, 62 | {provide: FormioAuthConfig, useValue: AuthConfig}, 63 | {provide: FormioAppConfig, useValue: AppConfig} 64 | ], 65 | bootstrap: [AppComponent] 66 | }) 67 | export class AppModule { } 68 | -------------------------------------------------------------------------------- /src/app/auth/auth.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { AuthModule } from './auth.module'; 2 | 3 | describe('AuthModule', () => { 4 | let authModule: AuthModule; 5 | 6 | beforeEach(() => { 7 | authModule = new AuthModule(); 8 | }); 9 | 10 | it('should create an instance', () => { 11 | expect(authModule).toBeTruthy(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /src/app/auth/auth.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule } from '@angular/router'; 3 | import { CommonModule } from '@angular/common'; 4 | import { LoginComponent } from './login/login.component'; 5 | import { FormioModule } from '@formio/angular'; 6 | import { FormioAuth, FormioAuthRoutes } from '@formio/angular/auth'; 7 | 8 | export const authRoutes = FormioAuthRoutes({ 9 | login: LoginComponent 10 | }); 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | FormioModule, 16 | FormioAuth, 17 | RouterModule.forChild(authRoutes) 18 | ], 19 | declarations: [LoginComponent] 20 | }) 21 | export class AuthModule { } 22 | -------------------------------------------------------------------------------- /src/app/auth/login/login.component.html: -------------------------------------------------------------------------------- 1 |
2 |

You can use the following to login.

3 | 7 |
8 | 9 | -------------------------------------------------------------------------------- /src/app/auth/login/login.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/formio/angular-app-starterkit/b391cefbc1a1c7a6e7880822e8852b82dbdce531/src/app/auth/login/login.component.scss -------------------------------------------------------------------------------- /src/app/auth/login/login.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { LoginComponent } from './login.component'; 4 | 5 | describe('LoginComponent', () => { 6 | let component: LoginComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ LoginComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(LoginComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/auth/login/login.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { FormioAuthLoginComponent } from '@formio/angular/auth'; 3 | @Component({ 4 | templateUrl: './login.component.html' 5 | }) 6 | export class LoginComponent extends FormioAuthLoginComponent {} 7 | -------------------------------------------------------------------------------- /src/app/components/CheckMatrix.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This file shows how to create a custom component and register that within an Angular application. 3 | * 4 | * Get the base component class by referencing Formio.Components.components map. 5 | */ 6 | import Base from 'formiojs/components/_classes/component/Component'; 7 | import editForm from 'formiojs/components/table/Table.form'; 8 | import Components from 'formiojs/components/Components'; 9 | 10 | /** 11 | * Create a new CheckMatrixComponent "class" using ES5 class inheritance notation. 12 | * https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Inheritance 13 | * 14 | * Here we will derive from the base component which all Form.io form components derive from. 15 | * 16 | * @param component 17 | * @param options 18 | * @param data 19 | * @constructor 20 | */ 21 | export default class CheckMatrix extends Base { 22 | constructor(component, options, data) { 23 | super(component, options, data); 24 | } 25 | 26 | static schema() { 27 | return Base.schema({ 28 | type: 'checkmatrix', 29 | numRows: 3, 30 | numCols: 3 31 | }); 32 | } 33 | 34 | static builderInfo = { 35 | title: 'Check Matrix', 36 | group: 'basic', 37 | icon: 'fa fa-table', 38 | weight: 70, 39 | documentation: 'http://help.form.io/userguide/#table', 40 | schema: CheckMatrix.schema() 41 | } 42 | 43 | static editForm = editForm 44 | 45 | /** 46 | * Render returns an html string of the fully rendered component. 47 | * 48 | * @param children - If this class is extendended, the sub string is passed as children. 49 | * @returns {string} 50 | */ 51 | render(children) { 52 | // To make this dynamic, we could call this.renderTemplate('templatename', {}). 53 | 54 | let tableClass = 'table '; 55 | ['striped', 'bordered', 'hover', 'condensed'].forEach((prop) => { 56 | if (this.component[prop]) { 57 | tableClass += `table-${prop} `; 58 | } 59 | }); 60 | 61 | let content = ''; 62 | 63 | for (let i = 0; i < this.component.numRows; i++) { 64 | let row = ''; 65 | for (let j = 0; j < this.component.numCols; j++) { 66 | let cell = ''; 67 | 68 | cell += this.renderTemplate('input', { 69 | input: { 70 | type: 'input', 71 | ref: `${this.component.key}-${i}`, 72 | attr: { 73 | id: `${this.component.key}-${i}-${j}`, 74 | class: 'form-control', 75 | type: 'checkbox', 76 | } 77 | } 78 | }); 79 | 80 | cell += ''; 81 | row += cell; 82 | } 83 | row += ''; 84 | content += row; 85 | } 86 | 87 | // Calling super.render will wrap it html as a component. 88 | return super.render(` 89 | 90 | 91 | ${content} 92 | 93 |
94 | `); 95 | } 96 | 97 | /** 98 | * After the html string has been mounted into the dom, the dom element is returned here. Use refs to find specific 99 | * elements to attach functionality to. 100 | * 101 | * @param element 102 | * @returns {Promise} 103 | */ 104 | attach(element) { 105 | const refs = {}; 106 | 107 | for (let i = 0; i < this.component.numRows; i++) { 108 | refs[`${this.component.key}-${i}`] = 'multiple'; 109 | } 110 | 111 | this.loadRefs(element, refs); 112 | 113 | this.checks = []; 114 | for (let i = 0; i < this.component.numRows; i++) { 115 | this.checks[i] = Array.prototype.slice.call(this.refs[`${this.component.key}-${i}`], 0); 116 | 117 | // Attach click events to each input in the row 118 | this.checks[i].forEach(input => { 119 | this.addEventListener(input, 'click', () => this.updateValue()) 120 | }); 121 | } 122 | 123 | // Allow basic component functionality to attach like field logic and tooltips. 124 | return super.attach(element); 125 | } 126 | 127 | /** 128 | * Get the value of the component from the dom elements. 129 | * 130 | * @returns {Array} 131 | */ 132 | getValue() { 133 | var value = []; 134 | for (var rowIndex in this.checks) { 135 | var row = this.checks[rowIndex]; 136 | value[rowIndex] = []; 137 | for (var colIndex in row) { 138 | var col = row[colIndex]; 139 | value[rowIndex][colIndex] = !!col.checked; 140 | } 141 | } 142 | return value; 143 | } 144 | 145 | /** 146 | * Set the value of the component into the dom elements. 147 | * 148 | * @param value 149 | * @returns {boolean} 150 | */ 151 | setValue(value) { 152 | if (!value) { 153 | return; 154 | } 155 | for (var rowIndex in this.checks) { 156 | var row = this.checks[rowIndex]; 157 | if (!value[rowIndex]) { 158 | break; 159 | } 160 | for (var colIndex in row) { 161 | var col = row[colIndex]; 162 | if (!value[rowIndex][colIndex]) { 163 | return false; 164 | } 165 | let checked = value[rowIndex][colIndex] ? 1 : 0; 166 | col.value = checked; 167 | col.checked = checked; 168 | } 169 | } 170 | } 171 | } 172 | 173 | // Use the table component edit form. 174 | CheckMatrix.editForm = editForm; 175 | 176 | // Register the component to the Formio.Components registry. 177 | Components.addComponent('checkmatrix', CheckMatrix); 178 | -------------------------------------------------------------------------------- /src/app/employee/employee.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { RouterModule } from '@angular/router'; 4 | import { 5 | FormioResource, 6 | FormioResourceConfig, 7 | FormioResourceRoutes, 8 | FormioResourceService 9 | } from '@formio/angular/resource'; 10 | 11 | @NgModule({ 12 | imports: [ 13 | CommonModule, 14 | FormioResource, 15 | RouterModule.forChild(FormioResourceRoutes()) 16 | ], 17 | declarations: [], 18 | providers: [ 19 | FormioResourceService, 20 | {provide: FormioResourceConfig, useValue: { 21 | name: 'employee', 22 | form: 'employee' 23 | }} 24 | ] 25 | }) 26 | export class EmployeeModule { } 27 | -------------------------------------------------------------------------------- /src/app/event/event-resource/event-resource.component.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /src/app/event/event-resource/event-resource.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/formio/angular-app-starterkit/b391cefbc1a1c7a6e7880822e8852b82dbdce531/src/app/event/event-resource/event-resource.component.scss -------------------------------------------------------------------------------- /src/app/event/event-resource/event-resource.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EventResourceComponent } from './event-resource.component'; 4 | 5 | describe('EventResourceComponent', () => { 6 | let component: EventResourceComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ EventResourceComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(EventResourceComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/event/event-resource/event-resource.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormioResourceComponent } from '@formio/angular/resource'; 3 | 4 | @Component({ 5 | selector: 'app-event-resource', 6 | templateUrl: './event-resource.component.html', 7 | styleUrls: ['./event-resource.component.scss'] 8 | }) 9 | export class EventResourceComponent extends FormioResourceComponent implements OnInit {} 10 | -------------------------------------------------------------------------------- /src/app/event/event-view/event-view.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | {{ service.resource?.data.start | date }} to {{ service.resource?.data.end | date }} 6 |
7 |
8 |

{{ service.resource?.data.title }}

9 |

10 |
11 |
12 |
13 |
14 |
15 |
16 |

Registration

17 |
18 |
19 | Register Now 20 |
21 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /src/app/event/event-view/event-view.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/formio/angular-app-starterkit/b391cefbc1a1c7a6e7880822e8852b82dbdce531/src/app/event/event-view/event-view.component.scss -------------------------------------------------------------------------------- /src/app/event/event-view/event-view.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EventViewComponent } from './event-view.component'; 4 | 5 | describe('EventViewComponent', () => { 6 | let component: EventViewComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ EventViewComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(EventViewComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/event/event-view/event-view.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { FormioResourceViewComponent } from '@formio/angular/resource'; 3 | 4 | @Component({ 5 | selector: 'app-event-view', 6 | templateUrl: './event-view.component.html', 7 | styleUrls: ['./event-view.component.scss'] 8 | }) 9 | export class EventViewComponent extends FormioResourceViewComponent {} 10 | -------------------------------------------------------------------------------- /src/app/event/event.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { RouterModule } from '@angular/router'; 4 | import { FormioModule } from '@formio/angular'; 5 | import { 6 | FormioResource, 7 | FormioResourceConfig, 8 | FormioResourceService, 9 | FormioResourceIndexComponent, 10 | FormioResourceCreateComponent, 11 | FormioResourceEditComponent, 12 | FormioResourceDeleteComponent 13 | } from '@formio/angular/resource'; 14 | import { EventViewComponent } from './event-view/event-view.component'; 15 | import { EventResourceComponent } from './event-resource/event-resource.component'; 16 | 17 | @NgModule({ 18 | imports: [ 19 | CommonModule, 20 | FormioModule, 21 | FormioResource, 22 | RouterModule.forChild([ 23 | { 24 | path: '', 25 | component: FormioResourceIndexComponent 26 | }, 27 | { 28 | path: 'new', 29 | component: FormioResourceCreateComponent 30 | }, 31 | { 32 | path: ':id', 33 | component: EventResourceComponent, 34 | children: [ 35 | { 36 | path: '', 37 | redirectTo: 'view', 38 | pathMatch: 'full' 39 | }, 40 | { 41 | path: 'view', 42 | component: EventViewComponent 43 | }, 44 | { 45 | path: 'edit', 46 | component: FormioResourceEditComponent 47 | }, 48 | { 49 | path: 'delete', 50 | component: FormioResourceDeleteComponent 51 | }, 52 | { 53 | path: 'participant', 54 | loadChildren: './participant/participant.module#ParticipantModule' 55 | } 56 | ] 57 | } 58 | ]) 59 | ], 60 | declarations: [EventViewComponent, EventResourceComponent], 61 | providers: [ 62 | FormioResourceService, 63 | { 64 | provide: FormioResourceConfig, 65 | useValue: { 66 | name: 'event', 67 | form: 'event' 68 | } 69 | } 70 | ] 71 | }) 72 | export class EventModule { } 73 | -------------------------------------------------------------------------------- /src/app/event/participant/participant.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { RouterModule } from '@angular/router'; 4 | import { FormioModule } from '@formio/angular'; 5 | import { 6 | FormioResource, 7 | FormioResourceRoutes, 8 | FormioResourceConfig, 9 | FormioResourceService 10 | } from '@formio/angular/resource'; 11 | 12 | @NgModule({ 13 | imports: [ 14 | CommonModule, 15 | FormioModule, 16 | FormioResource, 17 | RouterModule.forChild(FormioResourceRoutes()) 18 | ], 19 | declarations: [], 20 | providers: [ 21 | FormioResourceService, 22 | { 23 | provide: FormioResourceConfig, 24 | useValue: { 25 | name: 'participant', 26 | form: 'participant', 27 | parents: [ 28 | 'event', 29 | { 30 | field: 'user', 31 | resource: 'currentUser', 32 | filter: false 33 | } 34 | ] 35 | } 36 | } 37 | ] 38 | }) 39 | export class ParticipantModule { } 40 | -------------------------------------------------------------------------------- /src/app/form/form.module.spec.ts: -------------------------------------------------------------------------------- 1 | import { FormModule } from './form.module'; 2 | 3 | describe('FormModule', () => { 4 | let formModule: FormModule; 5 | 6 | beforeEach(() => { 7 | formModule = new FormModule(); 8 | }); 9 | 10 | it('should create an instance', () => { 11 | expect(formModule).toBeTruthy(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /src/app/form/form.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { RouterModule } from '@angular/router'; 4 | import { FormioGrid } from '@formio/angular/grid'; 5 | import { FormManagerModule, FormManagerRoutes, FormManagerService, FormManagerConfig } from '@formio/angular/manager'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | CommonModule, 10 | FormioGrid, 11 | FormManagerModule, 12 | RouterModule.forChild(FormManagerRoutes()) 13 | ], 14 | declarations: [], 15 | providers: [ 16 | FormManagerService, 17 | {provide: FormManagerConfig, useValue: { 18 | tag: 'common' 19 | }} 20 | ] 21 | }) 22 | export class FormModule { } 23 | -------------------------------------------------------------------------------- /src/app/header/header.component.html: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /src/app/header/header.component.sass: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/app/header/header.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HeaderComponent } from './header.component'; 4 | 5 | describe('HeaderComponent', () => { 6 | let component: HeaderComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ HeaderComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HeaderComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/header/header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormioAuthService } from '@formio/angular/auth'; 3 | 4 | @Component({ 5 | selector: 'app-header', 6 | templateUrl: './header.component.html', 7 | styleUrls: ['./header.component.sass'] 8 | }) 9 | export class HeaderComponent implements OnInit { 10 | 11 | constructor(public auth: FormioAuthService) {} 12 | 13 | ngOnInit() {} 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/hero/hero.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Welcome to your <form.io> + application!

3 |
4 |
5 |

6 | This is an example Event Registration application which illustrates how to build a Serverless Application using the Form.io Platform. 7 |

8 |

9 | You can easily embed your Forms and Resources into this application using. 10 |

11 |
12 |
<formio src="https://examples.form.io/example"></formio>
13 |
14 |

Need Help?

15 | Embedding 16 | Documentation 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /src/app/hero/hero.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/formio/angular-app-starterkit/b391cefbc1a1c7a6e7880822e8852b82dbdce531/src/app/hero/hero.component.scss -------------------------------------------------------------------------------- /src/app/hero/hero.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HeroComponent } from './hero.component'; 4 | 5 | describe('HeroComponent', () => { 6 | let component: HeroComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ HeroComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HeroComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/hero/hero.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-hero', 5 | templateUrl: './hero.component.html', 6 | styleUrls: ['./hero.component.scss'] 7 | }) 8 | export class HeroComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/home/home.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |

You are logged in as {{ auth.user.data.email }}!

6 |
7 |
8 | -------------------------------------------------------------------------------- /src/app/home/home.component.sass: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/formio/angular-app-starterkit/b391cefbc1a1c7a6e7880822e8852b82dbdce531/src/app/home/home.component.sass -------------------------------------------------------------------------------- /src/app/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HomeComponent } from './home.component'; 4 | 5 | describe('HomeComponent', () => { 6 | let component: HomeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ HomeComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HomeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { FormioAuthService } from '@formio/angular/auth'; 3 | 4 | @Component({ 5 | selector: 'app-home', 6 | templateUrl: './home.component.html', 7 | styleUrls: ['./home.component.sass'] 8 | }) 9 | export class HomeComponent implements OnInit { 10 | 11 | constructor(public auth: FormioAuthService) { } 12 | 13 | ngOnInit() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/formio/angular-app-starterkit/b391cefbc1a1c7a6e7880822e8852b82dbdce531/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | import { FormioAppConfig } from '@formio/angular'; 2 | import { FormioAuthConfig } from '@formio/angular/auth'; 3 | 4 | export const AppConfig: FormioAppConfig = { 5 | appUrl: 'https://example.form.io', 6 | apiUrl: 'https://api.form.io', 7 | icons: 'fontawesome' 8 | }; 9 | 10 | export const AuthConfig: FormioAuthConfig = { 11 | login: { 12 | form: 'user/login' 13 | }, 14 | register: { 15 | form: 'user/register' 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/formio/angular-app-starterkit/b391cefbc1a1c7a6e7880822e8852b82dbdce531/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularAppStarterkit 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/ 22 | // import 'core-js/es6/symbol'; 23 | // import 'core-js/es6/object'; 24 | // import 'core-js/es6/function'; 25 | // import 'core-js/es6/parse-int'; 26 | // import 'core-js/es6/parse-float'; 27 | // import 'core-js/es6/number'; 28 | // import 'core-js/es6/math'; 29 | // import 'core-js/es6/string'; 30 | // import 'core-js/es6/date'; 31 | // import 'core-js/es6/array'; 32 | // import 'core-js/es6/regexp'; 33 | // import 'core-js/es6/map'; 34 | // import 'core-js/es6/weak-map'; 35 | // import 'core-js/es6/set'; 36 | 37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 38 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 39 | 40 | /** IE10 and IE11 requires the following for the Reflect API. */ 41 | // import 'core-js/es6/reflect'; 42 | 43 | 44 | /** Evergreen browsers require these. **/ 45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. 46 | // import 'core-js/es/reflect'; 47 | 48 | 49 | /** 50 | * Required to support Web Animations `@angular/platform-browser/animations`. 51 | * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation 52 | **/ 53 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 54 | 55 | 56 | 57 | /*************************************************************************************************** 58 | * Zone JS is required by default for Angular itself. 59 | */ 60 | import 'zone.js/dist/zone'; // Included with Angular CLI. 61 | 62 | 63 | 64 | /*************************************************************************************************** 65 | * APPLICATION IMPORTS 66 | */ 67 | (window as any).global = window; 68 | -------------------------------------------------------------------------------- /src/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Event Management System", 3 | "version": "2.0.0", 4 | "description": "Provides a simple event management system for Angular.", 5 | "roles": { 6 | "administrator": { 7 | "title": "Administrator", 8 | "description": "A role for Administrative Users.", 9 | "admin": true, 10 | "default": false 11 | }, 12 | "authenticated": { 13 | "title": "Authenticated", 14 | "description": "A role for Authenticated Users.", 15 | "admin": false, 16 | "default": false 17 | }, 18 | "anonymous": { 19 | "title": "Anonymous", 20 | "description": "A role for Anonymous Users.", 21 | "admin": false, 22 | "default": true 23 | } 24 | }, 25 | "forms": { 26 | "userLogin": { 27 | "title": "User Login", 28 | "type": "form", 29 | "name": "userLogin", 30 | "path": "user/login", 31 | "tags": [], 32 | "components": [{ 33 | "input": true, 34 | "tableView": true, 35 | "inputType": "email", 36 | "label": "Email", 37 | "lockKey": true, 38 | "key": "email", 39 | "placeholder": "Enter your email address", 40 | "prefix": "", 41 | "suffix": "", 42 | "defaultValue": "", 43 | "protected": false, 44 | "unique": false, 45 | "persistent": true, 46 | "type": "email" 47 | }, { 48 | "input": true, 49 | "tableView": false, 50 | "inputType": "password", 51 | "label": "Password", 52 | "lockKey": true, 53 | "key": "password", 54 | "placeholder": "Enter your password.", 55 | "prefix": "", 56 | "suffix": "", 57 | "protected": true, 58 | "persistent": true, 59 | "type": "password" 60 | }, { 61 | "input": true, 62 | "label": "Submit", 63 | "tableView": false, 64 | "key": "submit", 65 | "size": "md", 66 | "leftIcon": "", 67 | "rightIcon": "", 68 | "block": false, 69 | "action": "submit", 70 | "disableOnInvalid": true, 71 | "theme": "primary", 72 | "type": "button" 73 | }], 74 | "access": [{ 75 | "type": "read_all", 76 | "roles": ["anonymous"] 77 | }], 78 | "submissionAccess": [{ 79 | "type": "create_own", 80 | "roles": ["anonymous"] 81 | }] 82 | }, 83 | "userRegister": { 84 | "title": "User Register", 85 | "type": "form", 86 | "name": "userRegister", 87 | "path": "user/register", 88 | "display": "form", 89 | "tags": [], 90 | "components": [{ 91 | "input": true, 92 | "tableView": true, 93 | "inputType": "text", 94 | "inputMask": "", 95 | "label": "First Name", 96 | "key": "firstName", 97 | "placeholder": "Enter your first name", 98 | "prefix": "", 99 | "suffix": "", 100 | "multiple": false, 101 | "defaultValue": "", 102 | "protected": false, 103 | "unique": false, 104 | "persistent": true, 105 | "hidden": false, 106 | "clearOnHide": true, 107 | "validate": { 108 | "required": false, 109 | "minLength": "", 110 | "maxLength": "", 111 | "pattern": "", 112 | "custom": "", 113 | "customPrivate": false 114 | }, 115 | "conditional": { 116 | "show": "", 117 | "when": null, 118 | "eq": "" 119 | }, 120 | "type": "textfield", 121 | "properties": {}, 122 | "tags": [], 123 | "labelPosition": "top", 124 | "lockKey": true, 125 | "hideLabel": false 126 | }, { 127 | "input": true, 128 | "tableView": true, 129 | "inputType": "text", 130 | "inputMask": "", 131 | "label": "Last Name", 132 | "key": "lastName", 133 | "placeholder": "Enter your last name", 134 | "prefix": "", 135 | "suffix": "", 136 | "multiple": false, 137 | "defaultValue": "", 138 | "protected": false, 139 | "unique": false, 140 | "persistent": true, 141 | "hidden": false, 142 | "clearOnHide": true, 143 | "validate": { 144 | "required": false, 145 | "minLength": "", 146 | "maxLength": "", 147 | "pattern": "", 148 | "custom": "", 149 | "customPrivate": false 150 | }, 151 | "conditional": { 152 | "show": "", 153 | "when": null, 154 | "eq": "" 155 | }, 156 | "type": "textfield", 157 | "properties": {}, 158 | "tags": [], 159 | "labelPosition": "top", 160 | "lockKey": true, 161 | "hideLabel": false 162 | }, { 163 | "type": "email", 164 | "persistent": true, 165 | "unique": false, 166 | "protected": false, 167 | "defaultValue": "", 168 | "suffix": "", 169 | "prefix": "", 170 | "placeholder": "Enter your email address", 171 | "key": "email", 172 | "lockKey": true, 173 | "label": "Email", 174 | "inputType": "email", 175 | "tableView": true, 176 | "input": true, 177 | "hidden": false, 178 | "clearOnHide": true, 179 | "kickbox": { 180 | "enabled": false 181 | }, 182 | "hideLabel": false 183 | }, { 184 | "type": "password", 185 | "persistent": true, 186 | "protected": true, 187 | "suffix": "", 188 | "prefix": "", 189 | "placeholder": "Enter your password.", 190 | "key": "password", 191 | "lockKey": true, 192 | "label": "Password", 193 | "inputType": "password", 194 | "tableView": false, 195 | "input": true, 196 | "hidden": false, 197 | "clearOnHide": true, 198 | "hideLabel": false 199 | }, { 200 | "theme": "primary", 201 | "disableOnInvalid": true, 202 | "action": "submit", 203 | "block": false, 204 | "rightIcon": "", 205 | "leftIcon": "", 206 | "size": "md", 207 | "key": "submit", 208 | "label": "Submit", 209 | "input": true, 210 | "type": "button", 211 | "tableView": false, 212 | "hideLabel": false 213 | }], 214 | "access": [{ 215 | "type": "read_all", 216 | "roles": ["anonymous"] 217 | }], 218 | "submissionAccess": [{ 219 | "type": "create_own", 220 | "roles": ["anonymous"] 221 | }] 222 | }, 223 | "adminLogin": { 224 | "title": "Admin Login", 225 | "type": "form", 226 | "name": "adminLogin", 227 | "path": "admin/login", 228 | "tags": [], 229 | "components": [{ 230 | "input": true, 231 | "tableView": true, 232 | "inputType": "email", 233 | "label": "Email", 234 | "lockKey": true, 235 | "key": "email", 236 | "placeholder": "Enter your email address", 237 | "prefix": "", 238 | "suffix": "", 239 | "defaultValue": "", 240 | "protected": false, 241 | "unique": false, 242 | "persistent": true, 243 | "type": "email" 244 | }, { 245 | "input": true, 246 | "tableView": false, 247 | "inputType": "password", 248 | "label": "Password", 249 | "lockKey": true, 250 | "key": "password", 251 | "placeholder": "Enter your password.", 252 | "prefix": "", 253 | "suffix": "", 254 | "protected": true, 255 | "persistent": true, 256 | "type": "password" 257 | }, { 258 | "input": true, 259 | "label": "Submit", 260 | "tableView": false, 261 | "key": "submit", 262 | "size": "md", 263 | "leftIcon": "", 264 | "rightIcon": "", 265 | "block": false, 266 | "action": "submit", 267 | "disableOnInvalid": true, 268 | "theme": "primary", 269 | "type": "button" 270 | }], 271 | "access": [{ 272 | "type": "read_all", 273 | "roles": ["anonymous"] 274 | }], 275 | "submissionAccess": [{ 276 | "type": "create_own", 277 | "roles": ["anonymous"] 278 | }] 279 | }, 280 | "register": { 281 | "title": "Register", 282 | "type": "form", 283 | "name": "register", 284 | "path": "register", 285 | "display": "form", 286 | "tags": [], 287 | "settings": {}, 288 | "components": [{ 289 | "properties": {}, 290 | "tags": [], 291 | "labelPosition": "top", 292 | "hideLabel": false, 293 | "type": "textfield", 294 | "conditional": { 295 | "show": "", 296 | "when": null, 297 | "eq": "" 298 | }, 299 | "validate": { 300 | "required": false, 301 | "minLength": "", 302 | "maxLength": "", 303 | "pattern": "", 304 | "custom": "", 305 | "customPrivate": false 306 | }, 307 | "clearOnHide": true, 308 | "hidden": false, 309 | "persistent": true, 310 | "unique": false, 311 | "protected": false, 312 | "defaultValue": "", 313 | "multiple": false, 314 | "suffix": "", 315 | "prefix": "", 316 | "placeholder": "", 317 | "key": "firstName", 318 | "label": "First Name", 319 | "inputMask": "", 320 | "inputType": "text", 321 | "tableView": true, 322 | "input": true 323 | }, { 324 | "properties": {}, 325 | "tags": [], 326 | "labelPosition": "top", 327 | "hideLabel": false, 328 | "type": "textfield", 329 | "conditional": { 330 | "show": "", 331 | "when": null, 332 | "eq": "" 333 | }, 334 | "validate": { 335 | "required": false, 336 | "minLength": "", 337 | "maxLength": "", 338 | "pattern": "", 339 | "custom": "", 340 | "customPrivate": false 341 | }, 342 | "clearOnHide": true, 343 | "hidden": false, 344 | "persistent": true, 345 | "unique": false, 346 | "protected": false, 347 | "defaultValue": "", 348 | "multiple": false, 349 | "suffix": "", 350 | "prefix": "", 351 | "placeholder": "", 352 | "key": "lastName", 353 | "label": "Last Name", 354 | "inputMask": "", 355 | "inputType": "text", 356 | "tableView": true, 357 | "input": true 358 | }, { 359 | "properties": {}, 360 | "conditional": { 361 | "show": "", 362 | "when": null, 363 | "eq": "" 364 | }, 365 | "tags": [], 366 | "labelPosition": "top", 367 | "hideLabel": false, 368 | "type": "email", 369 | "kickbox": { 370 | "enabled": false 371 | }, 372 | "clearOnHide": true, 373 | "hidden": false, 374 | "persistent": true, 375 | "unique": false, 376 | "protected": false, 377 | "defaultValue": "", 378 | "suffix": "", 379 | "prefix": "", 380 | "placeholder": "", 381 | "key": "email", 382 | "label": "Email", 383 | "inputType": "email", 384 | "tableView": true, 385 | "input": true 386 | }, { 387 | "properties": {}, 388 | "conditional": { 389 | "show": "", 390 | "when": null, 391 | "eq": "" 392 | }, 393 | "tags": [], 394 | "labelPosition": "top", 395 | "hideLabel": false, 396 | "type": "phoneNumber", 397 | "validate": { 398 | "required": false 399 | }, 400 | "clearOnHide": true, 401 | "defaultValue": "", 402 | "hidden": false, 403 | "persistent": true, 404 | "unique": false, 405 | "protected": false, 406 | "multiple": false, 407 | "suffix": "", 408 | "prefix": "", 409 | "placeholder": "", 410 | "key": "phoneNumber", 411 | "label": "Phone Number", 412 | "inputMask": "(999) 999-9999", 413 | "inputType": "tel", 414 | "tableView": true, 415 | "input": true 416 | }, { 417 | "hideLabel": false, 418 | "type": "button", 419 | "theme": "primary", 420 | "disableOnInvalid": false, 421 | "action": "submit", 422 | "block": false, 423 | "rightIcon": "", 424 | "leftIcon": "", 425 | "size": "md", 426 | "key": "submit", 427 | "tableView": false, 428 | "label": "Submit", 429 | "input": true 430 | }], 431 | "access": [{ 432 | "type": "create_own", 433 | "roles": [] 434 | }, { 435 | "type": "create_all", 436 | "roles": [] 437 | }, { 438 | "type": "read_own", 439 | "roles": [] 440 | }, { 441 | "type": "read_all", 442 | "roles": ["administrator", "authenticated", "anonymous"] 443 | }, { 444 | "type": "update_own", 445 | "roles": [] 446 | }, { 447 | "type": "update_all", 448 | "roles": [] 449 | }, { 450 | "type": "delete_own", 451 | "roles": [] 452 | }, { 453 | "type": "delete_all", 454 | "roles": [] 455 | }, { 456 | "type": "team_read", 457 | "roles": [] 458 | }, { 459 | "type": "team_write", 460 | "roles": [] 461 | }, { 462 | "type": "team_admin", 463 | "roles": [] 464 | }], 465 | "submissionAccess": [{ 466 | "type": "create_own", 467 | "roles": ["authenticated"] 468 | }, { 469 | "type": "create_all", 470 | "roles": [] 471 | }, { 472 | "type": "read_own", 473 | "roles": ["authenticated"] 474 | }, { 475 | "type": "read_all", 476 | "roles": [] 477 | }, { 478 | "type": "update_own", 479 | "roles": ["authenticated"] 480 | }, { 481 | "type": "update_all", 482 | "roles": [] 483 | }, { 484 | "type": "delete_own", 485 | "roles": ["authenticated"] 486 | }, { 487 | "type": "delete_all", 488 | "roles": [] 489 | }, { 490 | "type": "team_read", 491 | "roles": [] 492 | }, { 493 | "type": "team_write", 494 | "roles": [] 495 | }, { 496 | "type": "team_admin", 497 | "roles": [] 498 | }] 499 | } 500 | }, 501 | "actions": { 502 | "user:role": { 503 | "title": "Role Assignment", 504 | "name": "role", 505 | "form": "user", 506 | "settings": { 507 | "role": "authenticated", 508 | "type": "add", 509 | "association": "new" 510 | }, 511 | "priority": 1, 512 | "method": ["create"], 513 | "handler": ["after"] 514 | }, 515 | "user:save": { 516 | "title": "Save Submission", 517 | "name": "save", 518 | "form": "user", 519 | "priority": 10, 520 | "method": ["create", "update"], 521 | "handler": ["before"] 522 | }, 523 | "admin:role": { 524 | "title": "Role Assignment", 525 | "name": "role", 526 | "form": "admin", 527 | "settings": { 528 | "role": "administrator", 529 | "type": "add", 530 | "association": "new" 531 | }, 532 | "priority": 1, 533 | "method": ["create"], 534 | "handler": ["after"] 535 | }, 536 | "admin:save": { 537 | "title": "Save Submission", 538 | "name": "save", 539 | "form": "admin", 540 | "priority": 10, 541 | "method": ["create", "update"], 542 | "handler": ["before"] 543 | }, 544 | "userLogin:login": { 545 | "title": "Login", 546 | "name": "login", 547 | "form": "userLogin", 548 | "condition": {}, 549 | "settings": { 550 | "resources": ["user", "admin"], 551 | "username": "email", 552 | "password": "password", 553 | "allowedAttempts": 5, 554 | "attemptWindow": 30, 555 | "lockWait": 1800 556 | }, 557 | "priority": 2, 558 | "method": ["create"], 559 | "handler": ["before"] 560 | }, 561 | "userRegister:save": { 562 | "title": "Save Submission", 563 | "name": "save", 564 | "form": "userRegister", 565 | "condition": {}, 566 | "settings": { 567 | "resource": "user", 568 | "fields": { 569 | "email": "email", 570 | "password": "password", 571 | "firstName": "firstName", 572 | "lastName": "lastName" 573 | } 574 | }, 575 | "priority": 11, 576 | "method": ["create", "update"], 577 | "handler": ["before"] 578 | }, 579 | "userRegister:login": { 580 | "title": "Login", 581 | "name": "login", 582 | "form": "userRegister", 583 | "settings": { 584 | "password": "password", 585 | "username": "email", 586 | "resources": ["user"] 587 | }, 588 | "priority": 2, 589 | "method": ["create"], 590 | "handler": ["before"] 591 | }, 592 | "adminLogin:login": { 593 | "title": "Login", 594 | "name": "login", 595 | "form": "adminLogin", 596 | "settings": { 597 | "lockWait": 1800, 598 | "attemptWindow": 30, 599 | "allowedAttempts": 5, 600 | "password": "password", 601 | "username": "email", 602 | "resources": ["admin"] 603 | }, 604 | "priority": 2, 605 | "method": ["create"], 606 | "handler": ["before"] 607 | }, 608 | "event:save": { 609 | "title": "Save Submission", 610 | "name": "save", 611 | "form": "event", 612 | "priority": 10, 613 | "method": ["create", "update"], 614 | "handler": ["before"] 615 | }, 616 | "participant:save": { 617 | "title": "Save Submission", 618 | "name": "save", 619 | "form": "participant", 620 | "priority": 10, 621 | "method": ["create", "update"], 622 | "handler": ["before"] 623 | }, 624 | "register:save": { 625 | "title": "Save Submission", 626 | "name": "save", 627 | "form": "register", 628 | "priority": 10, 629 | "method": ["create", "update"], 630 | "handler": ["before"] 631 | } 632 | }, 633 | "resources": { 634 | "user": { 635 | "title": "User", 636 | "type": "resource", 637 | "name": "user", 638 | "path": "user", 639 | "display": "form", 640 | "tags": [], 641 | "components": [{ 642 | "input": true, 643 | "tableView": true, 644 | "inputType": "text", 645 | "inputMask": "", 646 | "label": "First Name", 647 | "key": "firstName", 648 | "placeholder": "Enter your first name", 649 | "prefix": "", 650 | "suffix": "", 651 | "multiple": false, 652 | "defaultValue": "", 653 | "protected": false, 654 | "unique": false, 655 | "persistent": true, 656 | "hidden": false, 657 | "clearOnHide": true, 658 | "validate": { 659 | "required": false, 660 | "minLength": "", 661 | "maxLength": "", 662 | "pattern": "", 663 | "custom": "", 664 | "customPrivate": false 665 | }, 666 | "conditional": { 667 | "show": "", 668 | "when": null, 669 | "eq": "" 670 | }, 671 | "type": "textfield", 672 | "hideLabel": false, 673 | "labelPosition": "top", 674 | "tags": [], 675 | "properties": {} 676 | }, { 677 | "input": true, 678 | "tableView": true, 679 | "inputType": "text", 680 | "inputMask": "", 681 | "label": "Last Name", 682 | "key": "lastName", 683 | "placeholder": "Enter your last name", 684 | "prefix": "", 685 | "suffix": "", 686 | "multiple": false, 687 | "defaultValue": "", 688 | "protected": false, 689 | "unique": false, 690 | "persistent": true, 691 | "hidden": false, 692 | "clearOnHide": true, 693 | "validate": { 694 | "required": false, 695 | "minLength": "", 696 | "maxLength": "", 697 | "pattern": "", 698 | "custom": "", 699 | "customPrivate": false 700 | }, 701 | "conditional": { 702 | "show": "", 703 | "when": null, 704 | "eq": "" 705 | }, 706 | "type": "textfield", 707 | "hideLabel": false, 708 | "labelPosition": "top", 709 | "tags": [], 710 | "properties": {} 711 | }, { 712 | "type": "email", 713 | "persistent": true, 714 | "unique": false, 715 | "protected": false, 716 | "defaultValue": "", 717 | "suffix": "", 718 | "prefix": "", 719 | "placeholder": "Enter your email address", 720 | "key": "email", 721 | "label": "Email", 722 | "inputType": "email", 723 | "tableView": true, 724 | "input": true, 725 | "hidden": false, 726 | "clearOnHide": true, 727 | "kickbox": { 728 | "enabled": false 729 | }, 730 | "hideLabel": false 731 | }, { 732 | "type": "password", 733 | "persistent": true, 734 | "protected": true, 735 | "suffix": "", 736 | "prefix": "", 737 | "placeholder": "Enter your password.", 738 | "key": "password", 739 | "label": "Password", 740 | "inputType": "password", 741 | "tableView": false, 742 | "input": true, 743 | "hidden": false, 744 | "clearOnHide": true, 745 | "hideLabel": false 746 | }, { 747 | "type": "button", 748 | "theme": "primary", 749 | "disableOnInvalid": true, 750 | "action": "submit", 751 | "block": false, 752 | "rightIcon": "", 753 | "leftIcon": "", 754 | "size": "md", 755 | "key": "submit", 756 | "tableView": false, 757 | "label": "Submit", 758 | "input": true, 759 | "hideLabel": false 760 | }], 761 | "access": [{ 762 | "type": "read_all", 763 | "roles": ["anonymous", "authenticated", "administrator"] 764 | }], 765 | "submissionAccess": [{ 766 | "type": "create_all", 767 | "roles": ["administrator"] 768 | }, { 769 | "type": "read_all", 770 | "roles": ["administrator"] 771 | }, { 772 | "type": "update_all", 773 | "roles": ["administrator"] 774 | }, { 775 | "type": "delete_all", 776 | "roles": ["administrator"] 777 | }, { 778 | "type": "create_own", 779 | "roles": [] 780 | }, { 781 | "type": "read_own", 782 | "roles": [] 783 | }, { 784 | "type": "update_own", 785 | "roles": [] 786 | }, { 787 | "type": "delete_own", 788 | "roles": [] 789 | }] 790 | }, 791 | "admin": { 792 | "title": "Admin", 793 | "type": "resource", 794 | "name": "admin", 795 | "path": "admin", 796 | "tags": [], 797 | "components": [{ 798 | "input": true, 799 | "tableView": true, 800 | "inputType": "email", 801 | "label": "Email", 802 | "key": "email", 803 | "placeholder": "Enter your email address", 804 | "prefix": "", 805 | "suffix": "", 806 | "defaultValue": "", 807 | "protected": false, 808 | "unique": false, 809 | "persistent": true, 810 | "type": "email" 811 | }, { 812 | "input": true, 813 | "tableView": false, 814 | "inputType": "password", 815 | "label": "Password", 816 | "key": "password", 817 | "placeholder": "Enter your password.", 818 | "prefix": "", 819 | "suffix": "", 820 | "protected": true, 821 | "persistent": true, 822 | "type": "password" 823 | }, { 824 | "input": true, 825 | "label": "Submit", 826 | "tableView": false, 827 | "key": "submit", 828 | "size": "md", 829 | "leftIcon": "", 830 | "rightIcon": "", 831 | "block": false, 832 | "action": "submit", 833 | "disableOnInvalid": true, 834 | "theme": "primary", 835 | "type": "button" 836 | }], 837 | "access": [{ 838 | "type": "read_all", 839 | "roles": ["anonymous", "authenticated", "administrator"] 840 | }], 841 | "submissionAccess": [{ 842 | "type": "create_all", 843 | "roles": ["administrator"] 844 | }, { 845 | "type": "read_all", 846 | "roles": ["administrator"] 847 | }, { 848 | "type": "update_all", 849 | "roles": ["administrator"] 850 | }, { 851 | "type": "delete_all", 852 | "roles": ["administrator"] 853 | }, { 854 | "type": "create_own", 855 | "roles": [] 856 | }, { 857 | "type": "read_own", 858 | "roles": [] 859 | }, { 860 | "type": "update_own", 861 | "roles": [] 862 | }, { 863 | "type": "delete_own", 864 | "roles": [] 865 | }] 866 | }, 867 | "event": { 868 | "title": "Event", 869 | "type": "resource", 870 | "name": "event", 871 | "path": "event", 872 | "display": "form", 873 | "tags": [], 874 | "settings": {}, 875 | "components": [{ 876 | "properties": {}, 877 | "tags": [], 878 | "labelPosition": "top", 879 | "hideLabel": false, 880 | "type": "textfield", 881 | "conditional": { 882 | "show": "", 883 | "when": null, 884 | "eq": "" 885 | }, 886 | "validate": { 887 | "required": false, 888 | "minLength": "", 889 | "maxLength": "", 890 | "pattern": "", 891 | "custom": "", 892 | "customPrivate": false 893 | }, 894 | "clearOnHide": true, 895 | "hidden": false, 896 | "persistent": true, 897 | "unique": false, 898 | "protected": false, 899 | "defaultValue": "", 900 | "multiple": false, 901 | "suffix": "", 902 | "prefix": "", 903 | "placeholder": "", 904 | "key": "title", 905 | "label": "Title", 906 | "inputMask": "", 907 | "inputType": "text", 908 | "tableView": true, 909 | "input": true 910 | }, { 911 | "properties": {}, 912 | "conditional": { 913 | "show": "", 914 | "when": null, 915 | "eq": "" 916 | }, 917 | "tags": [], 918 | "labelPosition": "top", 919 | "hideLabel": false, 920 | "type": "textarea", 921 | "validate": { 922 | "required": false, 923 | "minLength": "", 924 | "maxLength": "", 925 | "pattern": "", 926 | "custom": "" 927 | }, 928 | "clearOnHide": true, 929 | "wysiwyg": { 930 | "toolbarGroups": [{ 931 | "name": "basicstyles", 932 | "groups": ["basicstyles", "cleanup"] 933 | }, { 934 | "name": "paragraph", 935 | "groups": ["list", "indent", "blocks", "align", "bidi", "paragraph", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock"] 936 | }, { 937 | "name": "links", 938 | "groups": ["links"] 939 | }, { 940 | "name": "insert", 941 | "groups": ["insert"] 942 | }, "/", { 943 | "name": "styles", 944 | "groups": ["Styles", "Format", "Font", "FontSize"] 945 | }, { 946 | "name": "colors", 947 | "groups": ["colors"] 948 | }, { 949 | "name": "clipboard", 950 | "groups": ["clipboard", "undo"] 951 | }, { 952 | "name": "editing", 953 | "groups": ["find", "selection", "spellchecker", "editing"] 954 | }, { 955 | "name": "document", 956 | "groups": ["mode", "document", "doctools"] 957 | }, { 958 | "name": "others", 959 | "groups": ["others"] 960 | }, { 961 | "name": "tools", 962 | "groups": ["tools"] 963 | }], 964 | "extraPlugins": "justify,font", 965 | "removeButtons": "Cut,Copy,Paste,Underline,Subscript,Superscript,Scayt,About", 966 | "uiColor": "#eeeeee", 967 | "height": "400px", 968 | "width": "100%" 969 | }, 970 | "hidden": false, 971 | "persistent": true, 972 | "protected": false, 973 | "defaultValue": "", 974 | "multiple": false, 975 | "suffix": "", 976 | "prefix": "", 977 | "placeholder": "", 978 | "key": "description", 979 | "label": "Description", 980 | "tableView": true, 981 | "input": true, 982 | "rows": 10 983 | }, { 984 | "input": true, 985 | "tableView": false, 986 | "inputType": "text", 987 | "inputMask": "", 988 | "label": "Registration Form", 989 | "key": "registrationForm", 990 | "placeholder": "", 991 | "prefix": "", 992 | "suffix": "", 993 | "multiple": false, 994 | "defaultValue": "", 995 | "protected": false, 996 | "unique": false, 997 | "persistent": true, 998 | "hidden": false, 999 | "clearOnHide": true, 1000 | "validate": { 1001 | "required": false, 1002 | "minLength": "", 1003 | "maxLength": "", 1004 | "pattern": "", 1005 | "custom": "", 1006 | "customPrivate": false 1007 | }, 1008 | "conditional": { 1009 | "show": "", 1010 | "when": null, 1011 | "eq": "" 1012 | }, 1013 | "type": "textfield", 1014 | "hideLabel": false, 1015 | "labelPosition": "top", 1016 | "tags": [], 1017 | "properties": {} 1018 | }, { 1019 | "properties": {}, 1020 | "conditional": { 1021 | "show": "", 1022 | "when": null, 1023 | "eq": "" 1024 | }, 1025 | "tags": [], 1026 | "hideLabel": false, 1027 | "type": "columns", 1028 | "key": "columns", 1029 | "tableView": false, 1030 | "input": false, 1031 | "clearOnHide": false, 1032 | "columns": [{ 1033 | "components": [{ 1034 | "lockKey": true, 1035 | "properties": {}, 1036 | "conditional": { 1037 | "show": "", 1038 | "when": null, 1039 | "eq": "" 1040 | }, 1041 | "tags": [], 1042 | "labelPosition": "top", 1043 | "hideLabel": false, 1044 | "type": "datetime", 1045 | "validate": { 1046 | "required": false, 1047 | "custom": "" 1048 | }, 1049 | "clearOnHide": true, 1050 | "hidden": false, 1051 | "persistent": true, 1052 | "protected": false, 1053 | "timePicker": { 1054 | "hourStep": 1, 1055 | "minuteStep": 1, 1056 | "showMeridian": true, 1057 | "readonlyInput": false, 1058 | "mousewheel": true, 1059 | "arrowkeys": true 1060 | }, 1061 | "datePicker": { 1062 | "showWeeks": true, 1063 | "startingDay": 0, 1064 | "initDate": "", 1065 | "minMode": "day", 1066 | "maxMode": "year", 1067 | "yearRows": 4, 1068 | "yearColumns": 5, 1069 | "minDate": null, 1070 | "maxDate": null, 1071 | "datepickerMode": "day" 1072 | }, 1073 | "datepickerMode": "day", 1074 | "defaultDate": "", 1075 | "enableTime": true, 1076 | "enableDate": true, 1077 | "format": "yyyy-MM-dd hh:mm a", 1078 | "placeholder": "", 1079 | "key": "start", 1080 | "label": "Start", 1081 | "tableView": true, 1082 | "input": true 1083 | }], 1084 | "width": 6, 1085 | "offset": 0, 1086 | "push": 0, 1087 | "pull": 0 1088 | }, { 1089 | "components": [{ 1090 | "lockKey": true, 1091 | "properties": {}, 1092 | "conditional": { 1093 | "show": "", 1094 | "when": null, 1095 | "eq": "" 1096 | }, 1097 | "tags": [], 1098 | "labelPosition": "top", 1099 | "hideLabel": false, 1100 | "type": "datetime", 1101 | "validate": { 1102 | "required": false, 1103 | "custom": "" 1104 | }, 1105 | "clearOnHide": true, 1106 | "hidden": false, 1107 | "persistent": true, 1108 | "protected": false, 1109 | "timePicker": { 1110 | "hourStep": 1, 1111 | "minuteStep": 1, 1112 | "showMeridian": true, 1113 | "readonlyInput": false, 1114 | "mousewheel": true, 1115 | "arrowkeys": true 1116 | }, 1117 | "datePicker": { 1118 | "showWeeks": true, 1119 | "startingDay": 0, 1120 | "initDate": "", 1121 | "minMode": "day", 1122 | "maxMode": "year", 1123 | "yearRows": 4, 1124 | "yearColumns": 5, 1125 | "minDate": null, 1126 | "maxDate": null, 1127 | "datepickerMode": "day" 1128 | }, 1129 | "datepickerMode": "day", 1130 | "defaultDate": "", 1131 | "enableTime": true, 1132 | "enableDate": true, 1133 | "format": "yyyy-MM-dd hh:mm a", 1134 | "placeholder": "", 1135 | "key": "end", 1136 | "label": "End", 1137 | "tableView": true, 1138 | "input": true 1139 | }], 1140 | "width": 6, 1141 | "offset": 0, 1142 | "push": 0, 1143 | "pull": 0 1144 | }] 1145 | }, { 1146 | "hideLabel": false, 1147 | "type": "button", 1148 | "theme": "primary", 1149 | "disableOnInvalid": false, 1150 | "action": "submit", 1151 | "block": false, 1152 | "rightIcon": "", 1153 | "leftIcon": "", 1154 | "size": "md", 1155 | "key": "submit", 1156 | "tableView": false, 1157 | "label": "Submit", 1158 | "input": true 1159 | }], 1160 | "access": [{ 1161 | "type": "create_own", 1162 | "roles": [] 1163 | }, { 1164 | "type": "create_all", 1165 | "roles": [] 1166 | }, { 1167 | "type": "read_own", 1168 | "roles": [] 1169 | }, { 1170 | "type": "read_all", 1171 | "roles": ["administrator", "authenticated", "anonymous"] 1172 | }, { 1173 | "type": "update_own", 1174 | "roles": [] 1175 | }, { 1176 | "type": "update_all", 1177 | "roles": [] 1178 | }, { 1179 | "type": "delete_own", 1180 | "roles": [] 1181 | }, { 1182 | "type": "delete_all", 1183 | "roles": [] 1184 | }, { 1185 | "type": "team_read", 1186 | "roles": [] 1187 | }, { 1188 | "type": "team_write", 1189 | "roles": [] 1190 | }, { 1191 | "type": "team_admin", 1192 | "roles": [] 1193 | }], 1194 | "submissionAccess": [{ 1195 | "type": "create_own", 1196 | "roles": ["authenticated"] 1197 | }, { 1198 | "type": "create_all", 1199 | "roles": [] 1200 | }, { 1201 | "type": "read_own", 1202 | "roles": ["authenticated"] 1203 | }, { 1204 | "type": "read_all", 1205 | "roles": [] 1206 | }, { 1207 | "type": "update_own", 1208 | "roles": ["authenticated"] 1209 | }, { 1210 | "type": "update_all", 1211 | "roles": [] 1212 | }, { 1213 | "type": "delete_own", 1214 | "roles": ["authenticated"] 1215 | }, { 1216 | "type": "delete_all", 1217 | "roles": [] 1218 | }, { 1219 | "type": "team_read", 1220 | "roles": [] 1221 | }, { 1222 | "type": "team_write", 1223 | "roles": [] 1224 | }, { 1225 | "type": "team_admin", 1226 | "roles": [] 1227 | }] 1228 | }, 1229 | "participant": { 1230 | "title": "Participant", 1231 | "type": "resource", 1232 | "name": "participant", 1233 | "path": "participant", 1234 | "display": "form", 1235 | "tags": [], 1236 | "settings": {}, 1237 | "components": [{ 1238 | "properties": {}, 1239 | "conditional": { 1240 | "show": "", 1241 | "when": null, 1242 | "eq": "" 1243 | }, 1244 | "tags": [], 1245 | "labelPosition": "top", 1246 | "hideLabel": false, 1247 | "type": "resource", 1248 | "defaultPermission": "", 1249 | "validate": { 1250 | "required": false 1251 | }, 1252 | "clearOnHide": true, 1253 | "hidden": false, 1254 | "persistent": true, 1255 | "protected": false, 1256 | "multiple": false, 1257 | "searchFields": "", 1258 | "selectFields": "", 1259 | "template": "{{ item.data }}", 1260 | "defaultValue": "", 1261 | "project": "project", 1262 | "resource": "event", 1263 | "placeholder": "Select the event", 1264 | "key": "event", 1265 | "label": "Event", 1266 | "tableView": true, 1267 | "input": true 1268 | }, { 1269 | "properties": {}, 1270 | "conditional": { 1271 | "eq": "", 1272 | "when": null, 1273 | "show": "" 1274 | }, 1275 | "tags": [], 1276 | "labelPosition": "top", 1277 | "hideLabel": false, 1278 | "project": "project", 1279 | "type": "form", 1280 | "persistent": true, 1281 | "unique": false, 1282 | "protected": false, 1283 | "label": "Registration", 1284 | "path": "", 1285 | "form": "register", 1286 | "reference": true, 1287 | "src": "", 1288 | "key": "registration", 1289 | "tableView": true, 1290 | "input": true, 1291 | "clearOnHide": false 1292 | }, { 1293 | "hideLabel": false, 1294 | "type": "button", 1295 | "theme": "primary", 1296 | "disableOnInvalid": false, 1297 | "action": "submit", 1298 | "block": false, 1299 | "rightIcon": "", 1300 | "leftIcon": "", 1301 | "size": "md", 1302 | "key": "submit", 1303 | "tableView": false, 1304 | "label": "Submit", 1305 | "input": true 1306 | }], 1307 | "access": [{ 1308 | "type": "create_own", 1309 | "roles": [] 1310 | }, { 1311 | "type": "create_all", 1312 | "roles": [] 1313 | }, { 1314 | "type": "read_own", 1315 | "roles": [] 1316 | }, { 1317 | "type": "read_all", 1318 | "roles": ["administrator", "authenticated", "anonymous"] 1319 | }, { 1320 | "type": "update_own", 1321 | "roles": [] 1322 | }, { 1323 | "type": "update_all", 1324 | "roles": [] 1325 | }, { 1326 | "type": "delete_own", 1327 | "roles": [] 1328 | }, { 1329 | "type": "delete_all", 1330 | "roles": [] 1331 | }, { 1332 | "type": "team_read", 1333 | "roles": [] 1334 | }, { 1335 | "type": "team_write", 1336 | "roles": [] 1337 | }, { 1338 | "type": "team_admin", 1339 | "roles": [] 1340 | }], 1341 | "submissionAccess": [{ 1342 | "type": "create_own", 1343 | "roles": ["authenticated"] 1344 | }, { 1345 | "type": "create_all", 1346 | "roles": [] 1347 | }, { 1348 | "type": "read_own", 1349 | "roles": ["authenticated"] 1350 | }, { 1351 | "type": "read_all", 1352 | "roles": [] 1353 | }, { 1354 | "type": "update_own", 1355 | "roles": ["authenticated"] 1356 | }, { 1357 | "type": "update_all", 1358 | "roles": [] 1359 | }, { 1360 | "type": "delete_own", 1361 | "roles": ["authenticated"] 1362 | }, { 1363 | "type": "delete_all", 1364 | "roles": [] 1365 | }, { 1366 | "type": "team_read", 1367 | "roles": [] 1368 | }, { 1369 | "type": "team_write", 1370 | "roles": [] 1371 | }, { 1372 | "type": "team_admin", 1373 | "roles": [] 1374 | }] 1375 | } 1376 | }, 1377 | "access": [{ 1378 | "type": "create_all", 1379 | "roles": ["administrator"] 1380 | }, { 1381 | "type": "read_all", 1382 | "roles": ["administrator", "authenticated", "anonymous"] 1383 | }, { 1384 | "type": "update_all", 1385 | "roles": ["administrator"] 1386 | }, { 1387 | "type": "delete_all", 1388 | "roles": ["administrator"] 1389 | }] 1390 | } 1391 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | $white: #fff; 2 | $gray-100: #f8f9fa; 3 | $gray-200: #e9ecef; 4 | $gray-300: #dee2e6; 5 | $gray-400: #ced4da; 6 | $gray-500: #adb5bd; 7 | $gray-600: #868e96; 8 | $gray-700: #495057; 9 | $gray-800: #373a3c; 10 | $gray-900: #212529; 11 | $black: #000; 12 | 13 | $blue: #2780E3; 14 | $indigo: #6610f2; 15 | $purple: #613d7c; 16 | $pink: #e83e8c; 17 | $red: #FF0039; 18 | $orange: #F2661F; 19 | $yellow: #BED32B; 20 | $green: #3FB618; 21 | $teal: #20c997; 22 | $cyan: #9954BB; 23 | $lightblue: lighten($blue, 20%); 24 | 25 | $primary: $blue; 26 | $secondary: $orange; 27 | $success: $green; 28 | $info: $lightblue; 29 | $warning: $yellow; 30 | $danger: $red; 31 | $light: $gray-100; 32 | $dark: $gray-800; 33 | 34 | @import "~bootswatch/dist/cosmo/_variables.scss"; 35 | @import "~bootstrap/scss/bootstrap.scss"; 36 | @import "~bootswatch/dist/cosmo/_bootswatch.scss"; 37 | $fa-font-path: '~font-awesome/fonts'; 38 | @import '~font-awesome/scss/font-awesome'; 39 | 40 | .logo { 41 | height: 1.9em; 42 | } 43 | 44 | .text-blue { 45 | color: #127ABF; 46 | } 47 | 48 | .text-green { 49 | color: #449414; 50 | } 51 | 52 | .hero-image { 53 | display: inline; 54 | height: 2em; 55 | } 56 | 57 | #main { 58 | margin-top: 10px; 59 | } 60 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/long-stack-trace-zone'; 4 | import 'zone.js/dist/proxy.js'; 5 | import 'zone.js/dist/sync-test'; 6 | import 'zone.js/dist/jasmine-patch'; 7 | import 'zone.js/dist/async-test'; 8 | import 'zone.js/dist/fake-async-test'; 9 | import { getTestBed } from '@angular/core/testing'; 10 | import { 11 | BrowserDynamicTestingModule, 12 | platformBrowserDynamicTesting 13 | } from '@angular/platform-browser-dynamic/testing'; 14 | 15 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. 16 | declare const __karma__: any; 17 | declare const require: any; 18 | 19 | // Prevent Karma from running prematurely. 20 | __karma__.loaded = function () {}; 21 | 22 | // First, initialize the Angular testing environment. 23 | getTestBed().initTestEnvironment( 24 | BrowserDynamicTestingModule, 25 | platformBrowserDynamicTesting() 26 | ); 27 | // Then we find all the tests. 28 | const context = require.context('./', true, /\.spec\.ts$/); 29 | // And load the modules. 30 | context.keys().map(context); 31 | // Finally, start Karma to run the tests. 32 | __karma__.start(); 33 | -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["node"] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rulesDirectory": [ 3 | "node_modules/codelyzer" 4 | ], 5 | "rules": { 6 | "arrow-return-shorthand": true, 7 | "callable-types": true, 8 | "class-name": true, 9 | "comment-format": [ 10 | true, 11 | "check-space" 12 | ], 13 | "curly": true, 14 | "deprecation": { 15 | "severity": "warn" 16 | }, 17 | "eofline": true, 18 | "forin": true, 19 | "import-blacklist": [ 20 | true, 21 | "rxjs/Rx" 22 | ], 23 | "import-spacing": true, 24 | "indent": [ 25 | true, 26 | "spaces" 27 | ], 28 | "interface-over-type-literal": true, 29 | "label-position": true, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-arg": true, 47 | "no-bitwise": true, 48 | "no-console": [ 49 | true, 50 | "debug", 51 | "info", 52 | "time", 53 | "timeEnd", 54 | "trace" 55 | ], 56 | "no-construct": true, 57 | "no-debugger": true, 58 | "no-duplicate-super": true, 59 | "no-empty": false, 60 | "no-empty-interface": true, 61 | "no-eval": true, 62 | "no-inferrable-types": [ 63 | true, 64 | "ignore-params" 65 | ], 66 | "no-misused-new": true, 67 | "no-non-null-assertion": true, 68 | "no-shadowed-variable": true, 69 | "no-string-literal": false, 70 | "no-string-throw": true, 71 | "no-switch-case-fall-through": true, 72 | "no-trailing-whitespace": true, 73 | "no-unnecessary-initializer": true, 74 | "no-unused-expression": true, 75 | "no-use-before-declare": true, 76 | "no-var-keyword": true, 77 | "object-literal-sort-keys": false, 78 | "one-line": [ 79 | true, 80 | "check-open-brace", 81 | "check-catch", 82 | "check-else", 83 | "check-whitespace" 84 | ], 85 | "prefer-const": true, 86 | "quotemark": [ 87 | true, 88 | "single" 89 | ], 90 | "radix": true, 91 | "semicolon": [ 92 | true, 93 | "always" 94 | ], 95 | "triple-equals": [ 96 | true, 97 | "allow-null-check" 98 | ], 99 | "typedef-whitespace": [ 100 | true, 101 | { 102 | "call-signature": "nospace", 103 | "index-signature": "nospace", 104 | "parameter": "nospace", 105 | "property-declaration": "nospace", 106 | "variable-declaration": "nospace" 107 | } 108 | ], 109 | "typeof-compare": true, 110 | "unified-signatures": true, 111 | "variable-name": false, 112 | "whitespace": [ 113 | true, 114 | "check-branch", 115 | "check-decl", 116 | "check-operator", 117 | "check-separator", 118 | "check-type" 119 | ], 120 | "directive-selector": [ 121 | true, 122 | "attribute", 123 | "app", 124 | "camelCase" 125 | ], 126 | "component-selector": [ 127 | true, 128 | "element", 129 | "app", 130 | "kebab-case" 131 | ], 132 | "no-output-on-prefix": true, 133 | "use-input-property-decorator": true, 134 | "use-output-property-decorator": true, 135 | "use-host-property-decorator": true, 136 | "no-input-rename": true, 137 | "no-output-rename": true, 138 | "use-life-cycle-interface": true, 139 | "use-pipe-transform-interface": true, 140 | "component-class-suffix": true, 141 | "directive-class-suffix": true 142 | } 143 | } 144 | --------------------------------------------------------------------------------