├── src ├── assets │ └── .gitkeep ├── app │ ├── app.component.scss │ ├── landing │ │ ├── landing.component.scss │ │ ├── landing.component.ts │ │ └── landing.component.html │ ├── core-form │ │ ├── core-form.component.scss │ │ ├── core-form.component.ts │ │ └── core-form.component.html │ ├── simple-form │ │ ├── simple-form.component.scss │ │ ├── simple-form.component.ts │ │ └── simple-form.component.html │ ├── wizard-form │ │ ├── wizard-form.component.scss │ │ ├── wizard-form.component.html │ │ ├── wizard-form.component.ts │ │ └── steps.ts │ ├── platform-form │ │ ├── platform-form.component.scss │ │ ├── platform-form.component.html │ │ └── platform-form.component.ts │ ├── reactive-form │ │ ├── reactive-form.component.scss │ │ ├── reactive-form.component.ts │ │ └── reactive-form.component.html │ ├── app.component.html │ ├── simple-form-styles │ │ ├── simple-form-styles.component.scss │ │ ├── simple-form-styles.component.ts │ │ └── simple-form-styles.component.html │ ├── app.component.ts │ ├── app.component.spec.ts │ ├── app-routing.module.ts │ ├── app.module.ts │ └── services │ │ └── registration.service.ts ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── main.ts ├── index.html ├── test.ts ├── styles.scss ├── locale │ ├── ar │ │ └── messages.ar.xlf │ └── fr │ │ └── messages.fr.xlf └── polyfills.ts ├── .vscode ├── extensions.json ├── launch.json └── tasks.json ├── .editorconfig ├── tsconfig.app.json ├── tsconfig.spec.json ├── .github ├── workflows │ ├── greetings.yml │ ├── firebase-hosting-pull-request.yml │ └── firebase-hosting-merge.yml ├── in-solidarity.yml └── dependabot.yml ├── .browserslistrc ├── .gitignore ├── tsconfig.json ├── README.md ├── karma.conf.js ├── package.json ├── REUSE.toml ├── HTML-form └── index.html ├── angular.json ├── LICENSES └── Apache-2.0.txt └── LICENSE /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/landing/landing.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/core-form/core-form.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/simple-form/simple-form.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/wizard-form/wizard-form.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/platform-form/platform-form.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/reactive-form/reactive-form.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/fundamental-ngx-sample-apps/HEAD/src/favicon.ico -------------------------------------------------------------------------------- /src/app/simple-form-styles/simple-form-styles.component.scss: -------------------------------------------------------------------------------- 1 | :host{ 2 | font-family: "72", "72full", Arial, Helvetica, sans-serif; 3 | } -------------------------------------------------------------------------------- /src/app/wizard-form/wizard-form.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 3 | "recommendations": ["angular.ng-template"] 4 | } 5 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, } from '@angular/core'; 2 | @Component({ 3 | selector: 'app-root', 4 | templateUrl: './app.component.html', 5 | styleUrls: ['./app.component.scss'] 6 | }) 7 | export class AppComponent { 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/app/landing/landing.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'landing', 5 | templateUrl: './landing.component.html', 6 | styleUrls: ['./landing.component.scss'] 7 | }) 8 | export class LandingComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/app/simple-form/simple-form.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'simple-form', 5 | templateUrl: './simple-form.component.html', 6 | styleUrls: ['./simple-form.component.scss'] 7 | }) 8 | export class SimpleFormComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/app/simple-form-styles/simple-form-styles.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'simple-form-styles', 5 | templateUrl: './simple-form-styles.component.html', 6 | styleUrls: ['./simple-form-styles.component.scss'] 7 | }) 8 | export class SimpleFormStylesComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://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 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /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.error(err)); 13 | -------------------------------------------------------------------------------- /src/app/platform-form/platform-form.component.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 |
10 |
11 | 12 | 13 |
14 |
-------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Fundamental Library for Angular applications 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "ng serve", 7 | "type": "pwa-chrome", 8 | "request": "launch", 9 | "preLaunchTask": "npm: start", 10 | "url": "http://localhost:4200/" 11 | }, 12 | { 13 | "name": "ng test", 14 | "type": "chrome", 15 | "request": "launch", 16 | "preLaunchTask": "npm: test", 17 | "url": "http://localhost:9876/debug.html" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Greetings 2 | 3 | on: [pull_request, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: 'Hello, thank you for openinig the issue. Make sure to provide as much information as possible, so we can process the issue faster.' 16 | pr-message: 'Thank you for your PR! We ❤️ and appreciate each contribution! Give us some time to review your PR.' 17 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /.github/workflows/firebase-hosting-pull-request.yml: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by the Firebase CLI 2 | # https://github.com/firebase/firebase-tools 3 | 4 | name: Deploy to Firebase Hosting on PR 5 | 'on': pull_request 6 | jobs: 7 | build_and_preview: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - run: npm ci && npm run build --prod 12 | - uses: FirebaseExtended/action-hosting-deploy@v0 13 | with: 14 | repoToken: '${{ secrets.GITHUB_TOKEN }}' 15 | firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FUNDAMENTAL_DEMO_APP }}' 16 | projectId: fundamental-demo-app 17 | env: 18 | FIREBASE_CLI_PREVIEWS: hostingchannels 19 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /.github/workflows/firebase-hosting-merge.yml: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by the Firebase CLI 2 | # https://github.com/firebase/firebase-tools 3 | 4 | name: Deploy to Firebase Hosting on merge 5 | 'on': 6 | push: 7 | branches: 8 | - main 9 | jobs: 10 | build_and_deploy: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - run: npm ci && npm run build --prod 15 | - uses: FirebaseExtended/action-hosting-deploy@v0 16 | with: 17 | repoToken: '${{ secrets.GITHUB_TOKEN }}' 18 | firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FUNDAMENTAL_DEMO_APP }}' 19 | channelId: live 20 | projectId: fundamental-demo-app 21 | env: 22 | FIREBASE_CLI_PREVIEWS: hostingchannels 23 | -------------------------------------------------------------------------------- /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/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | (id: string): T; 13 | keys(): string[]; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting(), 21 | ); 22 | 23 | // Then we find all the tests. 24 | const context = require.context('./', true, /\.spec\.ts$/); 25 | // And load the modules. 26 | context.keys().map(context); 27 | -------------------------------------------------------------------------------- /.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 | src/assets/*.css 8 | # Only exists if Bazel was run 9 | /bazel-out 10 | 11 | # dependencies 12 | /node_modules 13 | 14 | # profiling files 15 | chrome-profiler-events.json 16 | speed-measure-plugin.json 17 | 18 | # IDEs and editors 19 | /.idea 20 | .project 21 | .classpath 22 | .c9/ 23 | *.launch 24 | .settings/ 25 | *.sublime-workspace 26 | 27 | # IDE - VSCode 28 | .vscode/* 29 | !.vscode/settings.json 30 | !.vscode/tasks.json 31 | !.vscode/launch.json 32 | !.vscode/extensions.json 33 | .history/* 34 | 35 | # misc 36 | /.angular/cache 37 | /.sass-cache 38 | /connect.lock 39 | /coverage 40 | /libpeerconnection.log 41 | npm-debug.log 42 | yarn-error.log 43 | testem.log 44 | /typings 45 | package-lock.json 46 | 47 | # System Files 48 | .DS_Store 49 | Thumbs.db 50 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitOverride": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "es2017", 20 | "module": "es2020", 21 | "lib": [ 22 | "es2020", 23 | "dom" 24 | ] 25 | }, 26 | "angularCompilerOptions": { 27 | "enableI18nLegacyMessageIdFormat": false, 28 | "strictInjectionParameters": true, 29 | "strictInputAccessModifiers": true, 30 | "strictTemplates": true 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 3 | "version": "2.0.0", 4 | "tasks": [ 5 | { 6 | "type": "npm", 7 | "script": "start", 8 | "isBackground": true, 9 | "problemMatcher": { 10 | "owner": "typescript", 11 | "pattern": "$tsc", 12 | "background": { 13 | "activeOnStart": true, 14 | "beginsPattern": { 15 | "regexp": "(.*?)" 16 | }, 17 | "endsPattern": { 18 | "regexp": "bundle generation complete" 19 | } 20 | } 21 | } 22 | }, 23 | { 24 | "type": "npm", 25 | "script": "test", 26 | "isBackground": true, 27 | "problemMatcher": { 28 | "owner": "typescript", 29 | "pattern": "$tsc", 30 | "background": { 31 | "activeOnStart": true, 32 | "beginsPattern": { 33 | "regexp": "(.*?)" 34 | }, 35 | "endsPattern": { 36 | "regexp": "bundle generation complete" 37 | } 38 | } 39 | } 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async () => { 7 | await TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | }); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'fundamental-ngx-sample-apps'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.componentInstance; 26 | expect(app.title).toEqual('fundamental-ngx-sample-apps'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.nativeElement as HTMLElement; 33 | expect(compiled.querySelector('.content span')?.textContent).toContain('fundamental-ngx-sample-apps app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /.github/in-solidarity.yml: -------------------------------------------------------------------------------- 1 | rules: 2 | master: 3 | regex: 4 | - /master/gi 5 | level: notice 6 | alternatives: 7 | - primary 8 | - main 9 | - leader 10 | - active 11 | - writer 12 | slave: 13 | regex: 14 | - /slave/gi 15 | level: failure 16 | alternatives: 17 | - secondary 18 | - node 19 | - worker 20 | - replica 21 | - passive 22 | whitelist: 23 | regex: 24 | - '/white[_-]*list/gi' 25 | level: failure 26 | alternatives: 27 | - include list 28 | - allow list 29 | blacklist: 30 | regex: 31 | - '/black[_-]*list/gi' 32 | level: failure 33 | alternatives: 34 | - exclude list 35 | - deny list 36 | grandfathered: 37 | regex: 38 | - /grandfathered/gi 39 | level: warning 40 | alternatives: 41 | - legacied 42 | - exempted 43 | sanity_check: 44 | regex: 45 | - '/sanity[_-]*check/gi' 46 | level: warning 47 | alternatives: 48 | - smoke test 49 | - confidence check 50 | man_hours: 51 | regex: 52 | - '/man[_-]*hours/gi' 53 | level: warning 54 | alternatives: 55 | - person-hours 56 | - human-hours 57 | ignore: 58 | - ".github/in-solidarity.yml" # default 59 | - "**/*.yml" 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/fundamental-ngx-sample-apps)](https://api.reuse.software/info/github.com/SAP-samples/fundamental-ngx-sample-apps) 2 | 3 | # App 4 | 5 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.4. 6 | 7 | ## Development server 8 | 9 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 10 | 11 | ## Code scaffolding 12 | 13 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 14 | 15 | ## Build 16 | 17 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 18 | 19 | ## Running unit tests 20 | 21 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 22 | 23 | ## Running end-to-end tests 24 | 25 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. 26 | 27 | ## Further help 28 | 29 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 30 | -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { SimpleFormComponent } from './simple-form/simple-form.component'; 4 | import { SimpleFormStylesComponent } from './simple-form-styles/simple-form-styles.component'; 5 | import { CoreFormComponent } from './core-form/core-form.component'; 6 | import { ReactiveFormComponent } from './reactive-form/reactive-form.component'; 7 | import { PlatformFormComponent } from './platform-form/platform-form.component'; 8 | import { LandingComponent } from './landing/landing.component'; 9 | import { WizardFormComponent} from './wizard-form/wizard-form.component'; 10 | 11 | const routes: Routes = [ 12 | { path: 'simple-form', component: SimpleFormComponent}, 13 | { path: 'simple-form-styles', component: SimpleFormStylesComponent}, 14 | { path: 'core-form', component: CoreFormComponent}, 15 | { path: 'reactive-form', component: ReactiveFormComponent}, 16 | {path: 'platform-form', component:PlatformFormComponent}, 17 | { path: 'main', component: LandingComponent}, 18 | {path: 'wizard-form', component:WizardFormComponent}, 19 | { path: '', redirectTo: '/main', pathMatch: 'full'} 20 | ]; 21 | 22 | @NgModule({ 23 | imports: [RouterModule.forRoot(routes)], 24 | exports: [RouterModule] 25 | }) 26 | export class AppRoutingModule { } 27 | -------------------------------------------------------------------------------- /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'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/fundamental-ngx-sample-apps'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /src/app/platform-form/platform-form.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | import { Validators } from '@angular/forms'; 3 | import { 4 | DatetimeAdapter, 5 | DATE_TIME_FORMATS, 6 | FdDate, 7 | FdDatetimeAdapter, 8 | FD_DATETIME_FORMATS 9 | } from '@fundamental-ngx/core/datetime'; 10 | import { DynamicFormItem, DynamicFormValue, FormGeneratorComponent } from '@fundamental-ngx/platform/form'; 11 | import { RegistrationService } from '../services/registration.service'; 12 | 13 | export const dummyAwaitablePromise = (timeout = 200): Promise => 14 | new Promise((resolve) => { 15 | setTimeout(() => { 16 | resolve(true); 17 | }, timeout); 18 | }); 19 | 20 | 21 | @Component({ 22 | selector: 'app-platform-form', 23 | templateUrl: './platform-form.component.html', 24 | providers: [ 25 | // Note that this is usually provided in the root of your application. 26 | // Due to the limit of this example we must provide it on this level. 27 | { 28 | provide: DatetimeAdapter, 29 | useClass: FdDatetimeAdapter 30 | }, 31 | { 32 | provide: DATE_TIME_FORMATS, 33 | useValue: FD_DATETIME_FORMATS 34 | } 35 | ] 36 | }) 37 | export class PlatformFormComponent { 38 | @ViewChild(FormGeneratorComponent) formGenerator!: FormGeneratorComponent; 39 | loading = false; 40 | 41 | formCreated = false; 42 | formValue!: DynamicFormValue; 43 | 44 | constructor( private registrationService: RegistrationService ){ 45 | 46 | this.questions = this.registrationService.getRegisrationData() 47 | } 48 | 49 | questions: DynamicFormItem[]; 50 | 51 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fundamental-ngx-sample-apps", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve --serve-path=/fundamental-ngx-sample-apps/", 7 | "build": "ng build --base-href=/fundamental-ngx-sample-apps/", 8 | "deploy": "ng deploy --base-href=/fundamental-ngx-sample-apps/", 9 | "watch": "ng build --watch --configuration development", 10 | "test": "ng test" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~13.2.0", 15 | "@angular/cdk": "^13.2.4", 16 | "@angular/common": "~13.2.0", 17 | "@angular/compiler": "~13.2.0", 18 | "@angular/core": "~13.2.0", 19 | "@angular/forms": "~13.2.0", 20 | "@angular/platform-browser": "~13.2.0", 21 | "@angular/platform-browser-dynamic": "~13.2.0", 22 | "@angular/router": "~13.2.0", 23 | "@fundamental-ngx/core": "^0.34.3-rc.45", 24 | "@fundamental-ngx/platform": "^0.34.3-rc.45", 25 | "@sap-theming/theming-base-content": "11.1.38", 26 | "fundamental-styles": "v0.24.0-rc.92", 27 | "rxjs": "~7.5.0", 28 | "tslib": "^2.3.0", 29 | "zone.js": "~0.11.4" 30 | }, 31 | "devDependencies": { 32 | "@angular-devkit/build-angular": "~13.2.4", 33 | "@angular/cli": "~13.2.4", 34 | "@angular/compiler-cli": "~13.2.0", 35 | "@angular/localize": "^13.2.4", 36 | "@types/jasmine": "~3.10.0", 37 | "@types/node": "^12.11.1", 38 | "angular-cli-ghpages": "^1.0.0", 39 | "jasmine-core": "~4.0.0", 40 | "karma": "~6.3.0", 41 | "karma-chrome-launcher": "~3.1.0", 42 | "karma-coverage": "~2.2.0", 43 | "karma-jasmine": "~4.0.0", 44 | "karma-jasmine-html-reporter": "~1.7.0", 45 | "typescript": "~4.5.2" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | @import '~fundamental-styles/dist/fundamental-styles'; 2 | @import '~@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/css_variables'; 3 | 4 | @font-face { 5 | font-family: '72'; 6 | src: url('~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Regular-full.woff') format('woff'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: '72'; 13 | src: url('~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Light.woff') format('woff'); 14 | font-weight: 300; 15 | font-style: normal; 16 | } 17 | 18 | @font-face { 19 | font-family: '72'; 20 | src: url('~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Bold.woff') format('woff'); 21 | font-weight: 700; 22 | font-style: normal; 23 | } 24 | 25 | @font-face { 26 | font-family: 'SAP-icons'; 27 | src: url('~@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/fonts/SAP-icons.woff') format('woff'); 28 | font-weight: normal; 29 | font-style: normal; 30 | } 31 | 32 | @font-face { 33 | font-family: 'BusinessSuiteInAppSymbols'; 34 | src: url('~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/BusinessSuiteInAppSymbols.woff') format('woff'); 35 | font-weight: normal; 36 | font-style: normal; 37 | } 38 | @font-face { 39 | font-family: 'SAP-icons-TNT'; 40 | src: url('~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/SAP-icons-TNT.woff') format('woff'); 41 | font-weight: normal; 42 | font-style: normal; 43 | } 44 | 45 | body{ 46 | background-color: var(--sapBackgroundColor); 47 | margin: 0; 48 | } 49 | 50 | 51 | /* You can add global styles to this file, and also import other style files */ 52 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | SPDX-PackageName = "fundamental-ngx-sample-apps" 3 | SPDX-PackageSupplier = "fundamental@sap.com" 4 | SPDX-PackageDownloadLocation = "https://github.com/SAP-samples/fundamental-ngx-sample-apps" 5 | SPDX-PackageComment = "The code in this project may include calls to APIs (“API Calls”) of\n SAP or third-party products or services developed outside of this project\n (“External Products”).\n “APIs” means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project’s code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third \n parties the right to use of access any SAP External Product, through API Calls." 6 | 7 | [[annotations]] 8 | path = "**" 9 | precedence = "aggregate" 10 | SPDX-FileCopyrightText = "2018-2024 SAP SE or an SAP affiliate company and Fundamental Ngx Sample Apps contributors" 11 | SPDX-License-Identifier = "Apache-2.0" 12 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { FormGroup, FormsModule,ReactiveFormsModule } from '@angular/forms'; 4 | 5 | import { AppRoutingModule } from './app-routing.module'; 6 | import { AppComponent } from './app.component'; 7 | import { SimpleFormComponent } from './simple-form/simple-form.component'; 8 | import { CoreFormComponent } from './core-form/core-form.component'; 9 | import { ReactiveFormComponent } from './reactive-form/reactive-form.component'; 10 | import { LandingComponent } from './landing/landing.component'; 11 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 12 | import { ButtonModule } from '@fundamental-ngx/core/button'; 13 | import { FundamentalNgxCoreModule } from '@fundamental-ngx/core'; 14 | import { FundamentalNgxPlatformModule } from '@fundamental-ngx/platform'; 15 | import { PlatformFormComponent } from './platform-form/platform-form.component'; 16 | import { HttpClientModule } from '@angular/common/http'; 17 | import { CdkTableModule } from '@angular/cdk/table'; 18 | import { DragDropModule } from '@angular/cdk/drag-drop'; 19 | import { RtlService } from '@fundamental-ngx/core/utils'; 20 | import { WizardFormComponent } from './wizard-form/wizard-form.component'; 21 | import { RegistrationService } from './services/registration.service' 22 | 23 | 24 | 25 | 26 | @NgModule({ 27 | declarations: [ 28 | AppComponent, 29 | SimpleFormComponent, 30 | LandingComponent, 31 | CoreFormComponent, 32 | ReactiveFormComponent, 33 | PlatformFormComponent, 34 | WizardFormComponent, 35 | ], 36 | imports: [ 37 | BrowserModule, 38 | AppRoutingModule, 39 | BrowserAnimationsModule, 40 | ButtonModule, 41 | FundamentalNgxPlatformModule, 42 | FundamentalNgxCoreModule, 43 | FormsModule, 44 | ReactiveFormsModule, 45 | HttpClientModule, 46 | CdkTableModule, 47 | DragDropModule, 48 | ], 49 | providers: [ RtlService, RegistrationService], 50 | bootstrap: [AppComponent] 51 | }) 52 | export class AppModule { } 53 | -------------------------------------------------------------------------------- /src/locale/ar/messages.ar.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | node_modules/@fundamental-ngx/platform/lib/components/form/text-area/text-area.component.d.ts 16 | 25 17 | 18 | The counter message for this textarea element 19 | textarea counter 20 | 21 | 22 | {VAR_PLURAL, plural, =1 {character {VAR_SELECT, select, excess {over the limit} remaining {remaining} } } other {characters {VAR_SELECT_1, select, excess {over the limit} remaining {remaining} } } } 23 | {VAR_PLURAL, plural, =1 {حرف {VAR_SELECT, select, excess {فوق الحد} remaining {المتبقي} } } other {الشخصيات {VAR_SELECT_1, select, excess {فوق الحد} remaining {المتبقي} } } } 24 | 25 | node_modules/@fundamental-ngx/platform/lib/components/form/text-area/text-area.component.d.ts 26 | 26 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/locale/fr/messages.fr.xlf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | node_modules/@fundamental-ngx/platform/lib/components/form/text-area/text-area.component.d.ts 16 | 25 17 | 18 | The counter message for this textarea element 19 | textarea counter 20 | 21 | 22 | {VAR_PLURAL, plural, =1 {character {VAR_SELECT, select, excess {over the limit} remaining {remaining} } } other {characters {VAR_SELECT_1, select, excess {over the limit} remaining {remaining} } } } 23 | {VAR_PLURAL, plural, =1 {caractère {VAR_SELECT, select, excess {au delà des limites} remaining {restant} } } other {caractères {VAR_SELECT_1, select, excess {au delà des limites} remaining {restant} } } } 24 | 25 | node_modules/@fundamental-ngx/platform/lib/components/form/text-area/text-area.component.d.ts 26 | 26 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "06:00" 8 | open-pull-requests-limit: 10 9 | reviewers: 10 | - droshev 11 | ignore: 12 | - dependency-name: "@types/node" 13 | versions: 14 | - 14.14.26 15 | - 14.14.30 16 | - 14.14.34 17 | - 14.14.39 18 | - 14.14.41 19 | - 15.0.0 20 | - dependency-name: "@angular/common" 21 | versions: 22 | - 11.2.10 23 | - 11.2.11 24 | - 11.2.5 25 | - 11.2.6 26 | - 11.2.7 27 | - 11.2.8 28 | - dependency-name: "@angular-devkit/build-angular" 29 | versions: 30 | - 0.1102.10 31 | - 0.1102.5 32 | - 0.1102.6 33 | - 0.1102.9 34 | - dependency-name: "@angular/language-service" 35 | versions: 36 | - 11.2.1 37 | - 11.2.10 38 | - 11.2.11 39 | - 11.2.6 40 | - 11.2.7 41 | - 11.2.8 42 | - dependency-name: "@angular/platform-browser" 43 | versions: 44 | - 11.2.10 45 | - 11.2.11 46 | - 11.2.5 47 | - 11.2.7 48 | - 11.2.8 49 | - dependency-name: "@angular/router" 50 | versions: 51 | - 11.2.11 52 | - 11.2.9 53 | - dependency-name: "@angular/forms" 54 | versions: 55 | - 11.2.9 56 | - dependency-name: "@angular/animations" 57 | versions: 58 | - 11.2.6 59 | - 11.2.8 60 | - 11.2.9 61 | - dependency-name: "@angular/cli" 62 | versions: 63 | - 11.2.3 64 | - 11.2.4 65 | - 11.2.5 66 | - 11.2.7 67 | - dependency-name: firebase 68 | versions: 69 | - 8.3.2 70 | - dependency-name: "@angular/cdk" 71 | versions: 72 | - 11.2.1 73 | - 11.2.4 74 | - 11.2.5 75 | - 11.2.6 76 | - 11.2.7 77 | - dependency-name: core-js 78 | versions: 79 | - 3.10.0 80 | - dependency-name: "@angular/core" 81 | versions: 82 | - 11.2.5 83 | - 11.2.6 84 | - 11.2.7 85 | - dependency-name: "@types/jest" 86 | versions: 87 | - 26.0.21 88 | - dependency-name: typescript 89 | versions: 90 | - 4.0.6 91 | - 4.2.3 92 | - dependency-name: "@fundamental-ngx/core" 93 | versions: 94 | - 0.27.0 95 | - 0.28.0 96 | -------------------------------------------------------------------------------- /src/app/wizard-form/wizard-form.component.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Component, OnDestroy } from '@angular/core'; 3 | import { Validators } from '@angular/forms'; 4 | import { Subject } from 'rxjs'; 5 | import { takeUntil } from 'rxjs/operators'; 6 | import { DynamicFormGroup, DynamicFormValue, FormGeneratorService } from '@fundamental-ngx/platform/form'; 7 | import { 8 | WizardDialogGeneratorService, 9 | WizardGeneratorFormsValue, 10 | WizardGeneratorItem, 11 | WizardTitle 12 | } from '@fundamental-ngx/platform/wizard-generator'; 13 | import { ChildrenOutletContexts } from '@angular/router'; 14 | import { DatePickerComponent, DatePickerModule, DatetimeAdapter, DATE_TIME_FORMATS, FdDatetimeAdapter, FD_DATETIME_FORMATS } from '@fundamental-ngx/core'; 15 | import { stepItems } from './steps'; 16 | 17 | @Component({ 18 | selector: 'app-wizard-form', 19 | templateUrl: './wizard-form.component.html', 20 | styleUrls: ['./wizard-form.component.scss'], 21 | providers: [FormGeneratorService, { 22 | provide: DatetimeAdapter, 23 | useClass: FdDatetimeAdapter 24 | }, 25 | { 26 | provide: DATE_TIME_FORMATS, 27 | useValue: FD_DATETIME_FORMATS 28 | } 29 | ] 30 | }) 31 | export class WizardFormComponent implements OnDestroy { 32 | 33 | wizardValue: WizardGeneratorFormsValue | undefined; 34 | wizardTitle: WizardTitle = { 35 | size: 2, 36 | text: 'Personal Information' 37 | }; 38 | stepItems: WizardGeneratorItem[] = stepItems; 39 | 40 | private readonly _onDestroy$: Subject = new Subject(); 41 | 42 | constructor( 43 | private _wizardDialogService: WizardDialogGeneratorService, 44 | private _formGeneratorService: FormGeneratorService 45 | ) { } 46 | 47 | ngOnDestroy(): void { 48 | this._onDestroy$.next(); 49 | this._onDestroy$.complete(); 50 | } 51 | 52 | openDialog(): void { 53 | this._wizardDialogService 54 | .open({ 55 | width: '100%', 56 | height: '100%', 57 | verticalPadding: false, 58 | data: { 59 | items: this.stepItems, 60 | appendToWizard: false, 61 | displaySummaryStep: true, 62 | responsivePaddings: true, 63 | title: this.wizardTitle 64 | } 65 | }) 66 | .afterClosed.pipe(takeUntil(this._onDestroy$)) 67 | .subscribe({next: ((wizardValue: WizardGeneratorFormsValue | undefined) => { 68 | this.wizardValue = wizardValue; 69 | }), error: () => {}}); 70 | } 71 | 72 | 73 | 74 | wizardFinished(wizardValue: WizardGeneratorFormsValue): void { 75 | this.wizardValue = wizardValue; 76 | } 77 | } -------------------------------------------------------------------------------- /src/app/core-form/core-form.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; 2 | import { 3 | FormsModule, 4 | FormGroup, 5 | FormControl, 6 | Validators, 7 | FormBuilder, 8 | NgForm 9 | } from '@angular/forms'; 10 | import { state } from '@angular/animations'; 11 | import { 12 | DatetimeAdapter, 13 | DateTimeFormats, 14 | DATE_TIME_FORMATS, 15 | FdDate, 16 | FdDatetimeAdapter, 17 | FD_DATETIME_FORMATS 18 | } from '@fundamental-ngx/core/datetime'; 19 | import { DateRange } from '@fundamental-ngx/core/calendar'; 20 | 21 | 22 | 23 | @Component({ 24 | selector: 'core-form', 25 | templateUrl: './core-form.component.html', 26 | styleUrls: ['./core-form.component.scss'], 27 | changeDetection: ChangeDetectionStrategy.OnPush, 28 | providers: [ 29 | { 30 | provide: DatetimeAdapter, 31 | useClass: FdDatetimeAdapter 32 | }, 33 | { 34 | provide: DATE_TIME_FORMATS, 35 | useValue: FD_DATETIME_FORMATS 36 | } 37 | ] 38 | 39 | 40 | }) 41 | export class CoreFormComponent implements OnInit { 42 | 43 | title = 'app_ngx'; 44 | optionThreeVariable = ""; 45 | //Drop down elements with their values 46 | selectedIndex!: number; 47 | reg: FormGroup | undefined; 48 | date = FdDate.getNow(); 49 | 50 | ngOnInit(){ 51 | this.reg = new FormGroup ({ 52 | 53 | }) 54 | 55 | 56 | } 57 | 58 | 59 | 60 | submit(register: any) { 61 | 62 | console.log("Form Submitted!", register); 63 | console.log("First Name is : " + register.value.firstName); 64 | console.log("Last Name is : " + register.value.lastName); 65 | console.log("Email is : " + register.value.email); 66 | console.log("Password is : " + register.value.password); 67 | console.log("Repeat Password is : " + register.value.repeat_password); 68 | console.log("Date of bith is : " + register.value.date); 69 | console.log("Country is : " + register.value.country); 70 | console.log("Gender is : " + register.value.gender); 71 | console.log("Short Bio is : " + register.value.bio); 72 | console.log("Ice cream flavor is : " + register.value.icecream); 73 | 74 | 75 | 76 | 77 | 78 | } 79 | 80 | 81 | dropdownValues = ['Albania', 'Australia', 'Canada', 'USA']; 82 | dropdownVal2 = ['Mint Chocolate Chip', 'Vanilla', 'Mango', 'Chocolate', 'Pistachio', 'Cookie Dough','Strawberry', 'Green Tea']; 83 | 84 | customFilter(content: any[], searchTerm: string): any[] { 85 | if (!searchTerm) { 86 | return content; 87 | } 88 | return content.filter((item) => item.startsWith(searchTerm)); 89 | 90 | } 91 | showLoad = { 92 | loading: false 93 | } 94 | } -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /*************************************************************************************************** 2 | * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. 3 | */ 4 | import '@angular/localize/init'; 5 | /** 6 | * This file includes polyfills needed by Angular and is loaded before the app. 7 | * You can add your own extra polyfills to this file. 8 | * 9 | * This file is divided into 2 sections: 10 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 11 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 12 | * file. 13 | * 14 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 15 | * automatically update themselves. This includes recent versions of Safari, Chrome (including 16 | * Opera), Edge on the desktop, and iOS and Chrome on mobile. 17 | * 18 | * Learn more in https://angular.io/guide/browser-support 19 | */ 20 | 21 | /*************************************************************************************************** 22 | * BROWSER POLYFILLS 23 | */ 24 | 25 | /** 26 | * By default, zone.js will patch all possible macroTask and DomEvents 27 | * user can disable parts of macroTask/DomEvents patch by setting following flags 28 | * because those flags need to be set before `zone.js` being loaded, and webpack 29 | * will put import in the top of bundle, so user need to create a separate file 30 | * in this directory (for example: zone-flags.ts), and put the following flags 31 | * into that file, and then add the following code before importing zone.js. 32 | * import './zone-flags'; 33 | * 34 | * The flags allowed in zone-flags.ts are listed here. 35 | * 36 | * The following flags will work for all browsers. 37 | * 38 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 39 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 40 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 41 | * 42 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 43 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 44 | * 45 | * (window as any).__Zone_enable_cross_context_check = true; 46 | * 47 | */ 48 | 49 | /*************************************************************************************************** 50 | * Zone JS is required by default for Angular itself. 51 | */ 52 | import 'zone.js'; // Included with Angular CLI. 53 | 54 | 55 | /*************************************************************************************************** 56 | * APPLICATION IMPORTS 57 | */ 58 | -------------------------------------------------------------------------------- /src/app/landing/landing.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 7 |
Fundamental Library for Angular Examples
8 |
9 |
10 |
11 | 14 |
15 |
16 | 19 |
20 |
21 | 24 |
25 |
26 |
27 |
28 |
29 |
HTML
30 |
31 |
Simple Form
32 |
Plain
33 |
34 |
35 |
36 |
HTML + CSS
37 |
38 |
Simple Form
39 |
Styled
40 |
41 |
42 |
43 |
NGX
44 |
45 |
Angular Form
46 |
Template Driven
47 |
48 |
49 |
50 |
NGX
51 |
52 |
Angular Form
53 |
Reactive
54 |
55 |
56 |
57 |
NGX + DX
58 |
59 |
Angular Form
60 |
Platform Form Generator
61 |
62 |
63 |
64 |
NGX + DX
65 |
66 |
Angular Form
67 |
Platform Wizard Generatordiv> 68 |
69 |
70 |
71 |
72 | -------------------------------------------------------------------------------- /src/app/reactive-form/reactive-form.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; 2 | import { 3 | ReactiveFormsModule, 4 | FormsModule, 5 | FormGroup, 6 | FormControl, 7 | Validators, 8 | FormBuilder, 9 | FormArray, 10 | AbstractControl, 11 | } from '@angular/forms'; 12 | import { state } from '@angular/animations'; 13 | import { 14 | DatetimeAdapter, 15 | DATE_TIME_FORMATS, 16 | FdDate, 17 | FdDatetimeAdapter, 18 | FD_DATETIME_FORMATS, 19 | } from '@fundamental-ngx/core/datetime'; 20 | import { DateRange } from '@fundamental-ngx/core/calendar'; 21 | import { ElementSchemaRegistry } from '@angular/compiler'; 22 | import { FormStates } from '@fundamental-ngx/core'; 23 | 24 | interface ComboboxItem { 25 | displayedValue: string; 26 | value: string; 27 | } 28 | 29 | @Component({ 30 | selector: 'reactive-form', 31 | templateUrl: './reactive-form.component.html', 32 | styleUrls: ['./reactive-form.component.scss'], 33 | providers: [ 34 | { 35 | provide: DatetimeAdapter, 36 | useClass: FdDatetimeAdapter, 37 | }, 38 | { 39 | provide: DATE_TIME_FORMATS, 40 | useValue: FD_DATETIME_FORMATS, 41 | }, 42 | ], 43 | }) 44 | export class ReactiveFormComponent implements OnInit { 45 | title = 'app_ngx'; 46 | optionThreeVariable = ''; 47 | //Drop down elements with their values 48 | selectedIndex!: number; 49 | reg!: FormGroup; 50 | 51 | vtest: boolean | undefined; 52 | 53 | ngOnInit() { 54 | this.vtest = undefined; 55 | this.reg = new FormGroup({ 56 | firstName: new FormControl('', Validators.required), 57 | lastName: new FormControl('', Validators.required), 58 | email: new FormControl( 59 | '', 60 | Validators.compose([Validators.required, Validators.email]) 61 | ), 62 | password: new FormControl('', Validators.required), 63 | repeat_password: new FormControl('', Validators.required), 64 | firstNameGroup: new FormControl('', Validators.required), 65 | date: new FormControl(FdDate.getToday()), 66 | radioInput: new FormControl(''), 67 | country: new FormControl(), 68 | textAreaControl: new FormControl(''), 69 | icecream: new FormControl(), 70 | }); 71 | console.log(this.reg); 72 | } 73 | constructor(private datetimeAdapter: DatetimeAdapter) {} 74 | today = FdDate.getToday(); 75 | isValid() { 76 | if (this.reg.get('date')?.value <= this.today) { 77 | return this.reg.get('date')?.valid; 78 | } else return false; 79 | } 80 | 81 | //loading button 82 | loading = false; 83 | Show() { 84 | //this.loading = true; 85 | } 86 | 87 | radioInput = { 88 | name: 'radio-input-form', 89 | formControlName: 'radioInput', 90 | values: ['Female', 'Male', 'Other'], 91 | }; 92 | get f() { 93 | return this.reg.controls; 94 | } 95 | 96 | submit(register: any) { 97 | console.log('Form Submitted!', register); 98 | } 99 | 100 | dropdownValues = ['Albania', 'Australia', 'Canada', 'USA']; 101 | dropdownValues2 = [ 102 | 'Mint Chocolate Chip', 103 | 'Vanilla', 104 | 'Mango', 105 | 'Chocolate', 106 | 'Pistachio', 107 | 'Cookie Dough', 108 | 'Strawberry', 109 | 'Green Tea', 110 | ]; 111 | 112 | customFilter(content: any[], searchTerm: string): any[] { 113 | if (!searchTerm) { 114 | return content; 115 | } 116 | return content.filter((item) => item.startsWith(searchTerm)); 117 | } 118 | 119 | getFieldState(formControl: AbstractControl, name: string = ''): FormStates | null { 120 | console.log(">>>", name, formControl.errors, "<> touched:", formControl.touched); 121 | return formControl.errors && formControl.touched ? 'error' : null; 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/app/simple-form/simple-form.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | Personal Information:
    5 |
    6 | 7 | 8 |
    9 |
    10 | 11 | 12 |
    13 |
    14 | 15 | 16 |
    17 |
    18 | 19 | 20 |
    21 |
    22 | 23 | 24 |
    25 |
    26 | 27 | 28 |
    29 |
    30 | 31 | 43 |
    44 |
    45 |
    46 | Sex: 47 | 48 | 49 | 50 | 51 | 52 | 53 |
    54 |
    55 |
    56 | 57 | 58 |
    59 |
    60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
    73 |
    74 | 75 | 76 |
    77 |
78 |
79 | 80 | 81 |
-------------------------------------------------------------------------------- /HTML-form/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Register Page 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

Register

22 | 23 |
24 |
25 | Personal Information:
    26 |
  • 27 | 28 | 29 |
  • 30 |
  • 31 | 32 | 33 |
  • 34 |
  • 35 | 36 | 37 |
  • 38 |
  • 39 | 40 | 41 |
  • 42 |
  • 43 | 44 | 45 |
  • 46 |
  • 47 | 48 | 49 |
  • 50 |
  • 51 | 52 | 58 |
  • 59 |
  • 60 | 61 | 62 | 63 | 64 | 65 | 66 |
  • 67 |
  • 68 | 69 | 70 |
  • 71 |
  • 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 |
  • 85 |
  • 86 | 87 | 88 |
  • 89 |
90 |
91 | 92 | 93 | 94 |
95 | 96 | 97 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "fundamental-ngx-sample-apps": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@schematics/angular:component": { 10 | "style": "scss" 11 | }, 12 | "@schematics/angular:application": { 13 | "strict": true 14 | } 15 | }, 16 | "root": "", 17 | "sourceRoot": "src", 18 | "prefix": "app", 19 | "architect": { 20 | "build": { 21 | "builder": "@angular-devkit/build-angular:browser", 22 | "options": { 23 | "outputPath": "dist/fundamental-ngx-sample-apps", 24 | "index": "src/index.html", 25 | "main": "src/main.ts", 26 | "polyfills": "src/polyfills.ts", 27 | "tsConfig": "tsconfig.app.json", 28 | "inlineStyleLanguage": "scss", 29 | "assets": [ 30 | "src/favicon.ico", 31 | "src/assets" 32 | 33 | ], 34 | "styles": [ 35 | "src/styles.scss", 36 | "node_modules/fundamental-styles/dist/theming/sap_fiori_3.css", 37 | "node_modules/fundamental-styles/dist/icon.css", 38 | "node_modules/fundamental-styles/dist/fundamental-styles.css", 39 | "node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/css_variables.css" 40 | ], 41 | "scripts": [] 42 | }, 43 | "configurations": { 44 | "production": { 45 | "budgets": [ 46 | { 47 | "type": "initial", 48 | "maximumWarning": "5mb", 49 | "maximumError": "5mb" 50 | }, 51 | { 52 | "type": "anyComponentStyle", 53 | "maximumWarning": "2kb", 54 | "maximumError": "4kb" 55 | } 56 | ], 57 | "fileReplacements": [ 58 | { 59 | "replace": "src/environments/environment.ts", 60 | "with": "src/environments/environment.prod.ts" 61 | } 62 | ], 63 | "outputHashing": "all" 64 | }, 65 | "development": { 66 | "buildOptimizer": false, 67 | "optimization": false, 68 | "vendorChunk": true, 69 | "extractLicenses": false, 70 | "sourceMap": true, 71 | "namedChunks": true 72 | }, 73 | "ar": { 74 | "aot": true, 75 | "outputPath": "dist/fundamental-ngx-sample-apps/locale/ar", 76 | "i18nFile": "src/locale/ar/messages.ar.xlf", 77 | "i18nFormat": "xlf", 78 | "i18nLocale": "ar", 79 | "i18nMissingTranslation": "error" 80 | }, 81 | "fr": { 82 | "aot": true, 83 | "outputPath": "dist/fundamental-ngx-sample-apps/locale/fr", 84 | "i18nFile": "src/locale/fr/messages.fr.xlf", 85 | "i18nFormat": "xlf", 86 | "i18nLocale": "fr", 87 | "i18nMissingTranslation": "error" 88 | } 89 | }, 90 | "defaultConfiguration": "production" 91 | }, 92 | "serve": { 93 | "builder": "@angular-devkit/build-angular:dev-server", 94 | "configurations": { 95 | "production": { 96 | "browserTarget": "fundamental-ngx-sample-apps:build:production" 97 | }, 98 | "development": { 99 | "browserTarget": "fundamental-ngx-sample-apps:build:development" 100 | }, 101 | "ar": { 102 | "browserTarget": "fundamental-ngx-sample-apps:build:ar" 103 | }, 104 | "fr": { 105 | "browserTarget": "fundamental-ngx-sample-apps:build:fr" 106 | } 107 | }, 108 | "defaultConfiguration": "development" 109 | }, 110 | "extract-i18n": { 111 | "builder": "@angular-devkit/build-angular:extract-i18n", 112 | "options": { 113 | "browserTarget": "fundamental-ngx-sample-apps:build" 114 | } 115 | }, 116 | "test": { 117 | "builder": "@angular-devkit/build-angular:karma", 118 | "options": { 119 | "main": "src/test.ts", 120 | "polyfills": "src/polyfills.ts", 121 | "tsConfig": "tsconfig.spec.json", 122 | "karmaConfig": "karma.conf.js", 123 | "inlineStyleLanguage": "scss", 124 | "assets": [ 125 | "src/favicon.ico", 126 | "src/assets" 127 | 128 | ], 129 | "styles": [ 130 | "src/styles.scss" 131 | ], 132 | "scripts": [] 133 | } 134 | }, 135 | "deploy": { 136 | "builder": "angular-cli-ghpages:deploy" 137 | } 138 | } 139 | } 140 | }, 141 | "defaultProject": "fundamental-ngx-sample-apps" 142 | } -------------------------------------------------------------------------------- /src/app/core-form/core-form.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 12 | 13 | 14 | First name is not correct. 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | Last name is not correct. 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 37 | Email is not correct. 38 | 39 | 40 | 41 | 42 |
43 | 44 | 46 | 47 |
48 |
49 | 50 | 51 |
52 | 53 | 55 | 56 |
57 |
58 | 59 | 60 |
61 | 62 | 63 | 64 |
65 | 66 |
67 | 68 | 70 | 71 | 72 |
73 | 74 |
75 | 76 |
77 | Gender 78 | 79 | 80 |
81 | 82 | 83 | 84 | Male 85 | 86 |
87 |
88 | 89 | Female 90 | 91 |
92 |
93 | 94 | Other 95 | 96 |
97 |
98 |
99 |
100 | 101 |
102 | 103 | 104 |
105 | 106 | 107 |
108 | 109 | 111 | 112 | 113 |
114 |
115 | Remember me 116 |
117 |
118 | 119 |
120 | 121 | 122 |
123 |
124 |
125 | 126 | 127 |
128 | 129 |
-------------------------------------------------------------------------------- /src/app/services/registration.service.ts: -------------------------------------------------------------------------------- 1 | import { DynamicFormItem } from '@fundamental-ngx/platform/form'; 2 | import { Validators } from '@angular/forms'; 3 | import { Injectable } from '@angular/core'; 4 | import { FdDate } from '@fundamental-ngx/core/datetime'; 5 | 6 | 7 | export const dummyAwaitablePromise = (timeout = 200): Promise => 8 | new Promise((resolve) => { 9 | setTimeout(() => { 10 | resolve(true); 11 | }, timeout); 12 | }); 13 | 14 | @Injectable({ 15 | providedIn: 'root' 16 | }) 17 | export class RegistrationService { 18 | private formData : DynamicFormItem[] = [ 19 | 20 | { 21 | type: 'multi-input', 22 | name: 'firstname', 23 | message: 'First Name', 24 | placeholder: 'Enter your First Name', 25 | validate: async (value) => { 26 | await dummyAwaitablePromise(); 27 | 28 | return value === ' ' ? null : 'Please enter a valid name'; 29 | }, 30 | transformer: async (value: any) => { 31 | await dummyAwaitablePromise(); 32 | return `${value}777`; 33 | }, 34 | validators: [Validators.required], 35 | guiOptions: { 36 | hint: "The first name should be a combination of letters only.", 37 | additionalData: { 38 | glyph: "account", 39 | glyphAriaLabel:"account" 40 | } 41 | } 42 | }, 43 | 44 | { 45 | type: 'input', 46 | name: 'lastname', 47 | message: 'Last Name', 48 | placeholder: 'Enter your last name', 49 | 50 | validate: async (value) => { 51 | await dummyAwaitablePromise(); 52 | 53 | return value === ' ' ? null : 'Please enter a valid name'; 54 | }, 55 | transformer: async (value: any) => { 56 | await dummyAwaitablePromise(); 57 | return `${value}777`; 58 | }, 59 | validators: [Validators.required], 60 | guiOptions: { 61 | hint: "The first name should be a combination of letters only." 62 | } 63 | }, 64 | { 65 | type: 'email', 66 | name: 'email', 67 | message: 'Email', 68 | placeholder: 'Enter your email', 69 | 70 | validate: async (value) => { 71 | await dummyAwaitablePromise(); 72 | 73 | return value === ' ' ? null : 'Please enter a valid email'; 74 | }, 75 | transformer: async (value: any) => { 76 | await dummyAwaitablePromise(); 77 | return `${value}777`; 78 | }, 79 | validators: [Validators.required] 80 | }, 81 | { 82 | type: 'password', 83 | controlType: 'password', 84 | name: 'password', 85 | message: 'Password', 86 | placeholder: 'Enter your password', 87 | validators: [Validators.required], 88 | validate: (value: string) => { 89 | const passwordPattern = new RegExp('^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\\w\\s]).{8,}$'); 90 | return passwordPattern.test(value) 91 | ? null 92 | : 'Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character'; 93 | }, 94 | 95 | guiOptions: { 96 | column: 1, 97 | additionalData: { 98 | glyph: "account", 99 | glyphAriaLabel:"account" 100 | } 101 | } 102 | }, 103 | { 104 | type: 'password', 105 | controlType: 'password', 106 | name: 'repeat_password', 107 | message: 'Repeat Password', 108 | placeholder: 'Repeat your password', 109 | validators: [Validators.required], 110 | validate: (value: string) => { 111 | const passwordPattern = new RegExp('^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\\w\\s]).{8,}$'); 112 | return passwordPattern.test(value) 113 | ? null 114 | : 'Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character'; 115 | }, 116 | guiOptions: { 117 | column: 1 118 | } 119 | }, 120 | { 121 | type: 'datepicker', 122 | name: 'birthday', 123 | message: 'Date of Birth', 124 | guiOptions: { 125 | column: 2 126 | }, 127 | validators: [Validators.required], 128 | validate: (value: FdDate) => 129 | value !== null && value.year < 2020 ? null : 'You need to be born before 2020', 130 | transformer: (value: FdDate) => value?.toDateString() 131 | }, 132 | 133 | { 134 | type: 'list', 135 | name: 'country', 136 | message: 'Country', 137 | validators: [Validators.required], 138 | choices: ['Australia','Albania', 'Bulgaria','Canada', 'USA'], 139 | guiOptions: { 140 | column: 2 141 | } 142 | }, 143 | { 144 | type: 'radio', 145 | name: 'gender', 146 | message: 'Gender', 147 | choices: ['Female', 'Male', 'Other'], 148 | 149 | 150 | guiOptions: { 151 | column: 2, 152 | inline: true, 153 | }, 154 | validate: (result: string) => (result === ' ' ? null : 'You should pick one') 155 | }, 156 | { 157 | type: 'editor', 158 | name: 'bio', 159 | message: 'Short Bio', 160 | guiOptions: { 161 | column: 2 162 | } 163 | }, 164 | { 165 | type: 'list', 166 | name: 'icecream', 167 | message: 'Ice Cream Flavours', 168 | choices: ['Mint Chocolate Chip','Vanilla', 'Mango','Chocolate', 'Pistachio','Cookie Dough','Strawberry', 'Green Tea'], 169 | guiOptions: { 170 | column: 2 171 | } 172 | }, 173 | 174 | { 175 | type: 'checkbox', 176 | name: 'rememberme', 177 | message:'', 178 | guiOptions: { 179 | inline: true, 180 | column: 2 181 | }, 182 | choices: () => ['Remember me'] 183 | 184 | } 185 | ]; 186 | 187 | constructor() {} 188 | 189 | getRegisrationData() { 190 | return this.formData; 191 | } 192 | } -------------------------------------------------------------------------------- /src/app/simple-form-styles/simple-form-styles.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | Personal Information 6 |
7 |
8 | 9 |
10 |
11 |
12 |
13 |

Primary Information

14 |
15 | 16 |
17 |
18 |
19 | 21 | 23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 | 31 | 33 |
34 |
35 |
36 | 37 |
38 |
39 |
40 | 41 | 42 |
43 |
44 |
45 | 46 |
47 |
48 |
49 | 50 | 51 |
52 |
53 |
54 | 55 |
56 |
57 |
58 | 60 | 62 |
63 |
64 |
65 |
66 |
67 | 68 |
69 |
70 |
71 |

Secondary Information

72 |
73 | 74 |
75 |
76 |
77 | 79 | 80 |
81 |
82 |
83 | 84 |
85 |
86 |
87 | 88 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
97 |
98 |
99 | 100 |
101 |
102 | Sex: 103 |
104 | 105 | 106 | 107 | 108 | 109 | 110 |
111 |
112 |
113 | 114 |
115 |
116 |
117 | 118 | 119 |
120 |
121 |
122 | 123 |
124 |
125 |
126 | 127 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 |
140 |
141 |
142 | 143 |
144 |
145 | 147 | 152 |
153 | 154 |
155 |
156 | 157 |
158 |
159 |
160 | 161 | 171 | 172 |
-------------------------------------------------------------------------------- /src/app/wizard-form/steps.ts: -------------------------------------------------------------------------------- 1 | import { Validators } from "@angular/forms"; 2 | import { DynamicFormValue } from "@fundamental-ngx/platform/form"; 3 | import { WizardGeneratorFormsValue, WizardGeneratorItem } from "@fundamental-ngx/platform/wizard-generator"; 4 | 5 | export const stepItems: WizardGeneratorItem[] = [ 6 | { 7 | name: 'Product type', 8 | id: 'productTypeStep', 9 | formGroups: [ 10 | { 11 | title: '1. Pastry', 12 | id: 'productType', 13 | formItems: [ 14 | { 15 | name: 'product', 16 | message: 'Choose your pastry', 17 | type: 'select', 18 | choices: ['Ice-cream', 'Cookies', 'Cake'], 19 | validators: [Validators.required], 20 | }, 21 | 22 | { 23 | name: 'cookies_flavour', 24 | message: 'What kind of cookie would you like?', 25 | type: 'select', 26 | choices: [ 27 | 'Chocolate chip', 28 | 'Lemon', 29 | 'Gingersnaps', 30 | 'Peanut Butter', 31 | 'Salted Caramel', 32 | ], 33 | validators: [Validators.required], 34 | when: (formValue: DynamicFormValue): boolean => 35 | formValue['product'] === 'Cookies', 36 | }, 37 | { 38 | name: 'cake_flavours', 39 | message: 'Which birthday cake would you like?', 40 | type: 'select', 41 | choices: [ 42 | 'Double Chocolate', 43 | 'Oreo', 44 | 'Cheesecake', 45 | 'Lemon yoghurt', 46 | ], 47 | validators: [Validators.required], 48 | when: (formValue: DynamicFormValue): boolean => 49 | formValue['product'] === 'Cake', 50 | }, 51 | ], 52 | }, 53 | { 54 | title: '1.1. Build your Ice-cream', 55 | id: 'ice_cream_flavour', 56 | dependencyFields: { 57 | productTypeStep: { 58 | productType: ['product'], 59 | }, 60 | }, 61 | when: ( 62 | completedSteps: string[], 63 | answers: WizardGeneratorFormsValue 64 | ) => { 65 | const value = 66 | answers['productTypeStep']?.['productType']?.['product']; 67 | return value !== undefined && value !== 'Cookies' && value !== 'Cake'; 68 | }, 69 | formItems: [ 70 | { 71 | name: 'build_icecream', 72 | message: 'Would you like cone or cup for base?', 73 | type: 'radio', 74 | choices: ['Cone', 'Cup'], 75 | validators: [Validators.required], 76 | }, 77 | { 78 | name: 'icecream_flavours', 79 | message: 'Select the ice-cream flavour', 80 | type: 'select', 81 | choices: [ 82 | 'Pistachio', 83 | 'Chocolate', 84 | 'Mint', 85 | 'Strawberry', 86 | 'Banana', 87 | 'Vanilla', 88 | ], 89 | validators: [Validators.required], 90 | when: (formValue: DynamicFormValue): boolean => 91 | formValue['build_icecream'] !== null, 92 | }, 93 | ], 94 | }, 95 | ], 96 | }, 97 | 98 | { 99 | name: 'Pick the shop', 100 | id: 'shop', 101 | formGroups: [ 102 | { 103 | title: 'Pastry', 104 | id: 'pastry', 105 | formItems: [ 106 | { 107 | name: 'pastry', 108 | message: 'Pick a pastry shop', 109 | type: 'radio', 110 | choices: [ 111 | 'Bake n Take', 112 | 'Nona Pastry', 113 | 'Cakey Bakey', 114 | 'Dangerously Delicious Pies', 115 | ], 116 | validators: [Validators.required], 117 | }, 118 | 119 | { 120 | name: 'pick_up', 121 | message: 'Would you like to pick the item(s) up?', 122 | type: 'switch', 123 | default: false, 124 | when: (formValue: DynamicFormValue): boolean => 125 | formValue['pastry'] === 'Bake n Take', 126 | }, 127 | ], 128 | }, 129 | ], 130 | }, 131 | { 132 | name: 'Customer information', 133 | id: 'customerInformationStep', 134 | formGroups: [ 135 | { 136 | title: '2. Customer Information', 137 | id: 'customerInformation', 138 | formItems: [ 139 | { 140 | name: 'firstname', 141 | message: 'First Name', 142 | type: 'input', 143 | validators: [Validators.required], 144 | }, 145 | { 146 | name: 'lastname', 147 | message: 'Last Name', 148 | type: 'input', 149 | validators: [Validators.required], 150 | }, 151 | { 152 | name: 'email', 153 | message: 'Email', 154 | type: 'email', 155 | validators: [Validators.required], 156 | }, 157 | { 158 | name: 'password', 159 | message: 'Password', 160 | type: 'password', 161 | controlType: 'password', 162 | validators: [Validators.required], 163 | }, 164 | { 165 | name: 'repeat_password', 166 | message: 'Repeat Password', 167 | type: 'password', 168 | controlType: 'password', 169 | validators: [Validators.required], 170 | }, 171 | { 172 | name: 'date', 173 | message: 'Date of Birth', 174 | type: 'datepicker', 175 | validators: [Validators.required], 176 | }, 177 | { 178 | name: 'country', 179 | message: 'Country', 180 | type: 'select', 181 | choices: ['Albania', 'Bulgaria', 'Canada', 'Ukraine', 'USA'], 182 | }, 183 | { 184 | name: 'gender', 185 | message: 'Gender', 186 | type: 'radio', 187 | choices: ['Female', 'Male', 'Other'], 188 | }, 189 | { 190 | name: 'bio', 191 | message: 'Short Bio', 192 | type: 'editor', 193 | }, 194 | ], 195 | }, 196 | ], 197 | }, 198 | { 199 | name: 'Payment method', 200 | id: 'paymentMethodStep', 201 | formGroups: [ 202 | { 203 | title: '3. Payment method', 204 | id: 'paymentMethodForm', 205 | formItems: [ 206 | { 207 | name: 'paymentMethod', 208 | message: 'Select appropriate payment method', 209 | type: 'select', 210 | choices: ['Credit Card', 'Bank Transfer'], 211 | validators: [Validators.required], 212 | }, 213 | ], 214 | }, 215 | ], 216 | }, 217 | { 218 | name: 'Credit Card Details', 219 | id: 'creditCardStep', 220 | when: (_completedSteps, answers) => 221 | answers['paymentMethodStep']?.['paymentMethodForm']?.['paymentMethod'] === 222 | 'Credit Card', 223 | dependencyFields: { 224 | paymentMethodStep: { 225 | paymentMethodForm: ['paymentMethod'], 226 | }, 227 | }, 228 | formGroups: [ 229 | { 230 | title: '4. Credit Card Details', 231 | id: 'cardPayment', 232 | formItems: [ 233 | { 234 | name: 'creditCardNumber', 235 | message: 'Enter your credit card details', 236 | type: 'input', 237 | validators: [Validators.required], 238 | }, 239 | ], 240 | }, 241 | ], 242 | }, 243 | { 244 | name: 'Bank Details', 245 | id: 'bankDetailsStep', 246 | when: (_completedSteps, answers) => 247 | answers['paymentMethodStep']?.['paymentMethodForm']?.['paymentMethod'] === 248 | 'Bank Transfer', 249 | dependencyFields: { 250 | paymentMethodStep: { 251 | paymentMethodForm: ['paymentMethod'], 252 | }, 253 | }, 254 | formGroups: [ 255 | { 256 | title: '4. Bank Details', 257 | id: 'bankDetailsForm', 258 | formItems: [ 259 | { 260 | name: 'bankDetails', 261 | message: 'Enter your bank details', 262 | type: 'input', 263 | validators: [Validators.required], 264 | }, 265 | ], 266 | }, 267 | ], 268 | }, 269 | { 270 | name: 'Discount', 271 | id: 'discountStep', 272 | when: (_completedSteps, answers) => 273 | answers['paymentMethodStep']?.['paymentMethodForm']?.['paymentMethod'] === 274 | 'Bank Transfer' || 275 | answers['paymentMethodStep']?.['paymentMethodForm']?.['paymentMethod'] === 276 | 'Credit Card', 277 | formGroups: [ 278 | { 279 | title: '5. Discount details', 280 | id: 'discountForm', 281 | formItems: [ 282 | { 283 | name: 'discount', 284 | message: 'Enter your discount coupon code', 285 | type: 'input', 286 | }, 287 | ], 288 | }, 289 | ], 290 | }, 291 | 292 | { 293 | name: 'Review your order', 294 | id: 'summary', 295 | summary: true, 296 | when: (_completedSteps, answers) => 297 | answers['paymentMethodStep']?.['paymentMethodForm']?.['paymentMethod'] === 298 | 'Bank Transfer' || 299 | answers['paymentMethodStep']?.['paymentMethodForm']?.['paymentMethod'] === 300 | 'Credit Card', 301 | }, 302 | ]; 303 | -------------------------------------------------------------------------------- /src/app/reactive-form/reactive-form.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 | Personal Information 8 |
9 |
10 | 11 |
12 |
13 |
14 | 20 | 21 | 28 | 32 | This field is required 33 | 34 | 35 |
36 |
37 |
38 | 39 |
40 |
41 |
42 | 48 | 49 | 59 | 63 | This field is required 64 | 65 | 66 |
67 |
68 |
69 | 70 |
71 |
72 |
73 | 79 | 80 | 90 | 91 | 95 | Enter a valid email 96 | 97 | 98 |
99 |
100 |
101 | 102 |
103 |
104 |
105 | 111 | 112 | 122 | 126 | Enter a valid password 127 | 128 | 129 |
130 |
131 |
132 | 133 |
134 |
135 |
136 | 144 | 145 | 155 | 159 | Enter a valid password 160 | 161 | 162 |
163 |
164 |
165 | 166 |
167 |
168 |
169 | 170 | 177 | 178 |
179 |
180 |
181 | 182 |
183 |
184 |
185 | 186 | 192 | 193 |
194 |
195 |
196 | 197 |
198 |
199 | 200 | 201 |
202 | 207 | {{ value }} 208 | 209 |
210 |
211 |
212 |
213 | 214 |
215 |
216 |
217 | 218 | 224 |
225 |
226 |
227 | 228 |
229 |
230 |
231 | 232 | 238 | 239 |
240 |
241 |
242 | 243 |
244 |
245 |
246 | Remember me 247 |
248 |
249 |
250 | 251 |
252 |
253 | 254 |
255 |
256 | 257 | 263 | 264 | 265 | 272 | 273 |
274 |
275 |
276 |
277 | 278 |
279 | -------------------------------------------------------------------------------- /LICENSES/Apache-2.0.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 10 | 11 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 12 | 13 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 14 | 15 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 16 | 17 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 18 | 19 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 20 | 21 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 22 | 23 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 24 | 25 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 26 | 27 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 28 | 29 | 2. Grant of Copyright License. 30 | 31 | Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 32 | 33 | 3. Grant of Patent License. 34 | 35 | Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 36 | 37 | 4. Redistribution. 38 | 39 | You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 40 | 41 | You must give any other recipients of the Work or Derivative Works a copy of this License; and 42 | You must cause any modified files to carry prominent notices stating that You changed the files; and 43 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 44 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 45 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 46 | 47 | 5. Submission of Contributions. 48 | 49 | Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 50 | 51 | 6. Trademarks. 52 | 53 | This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 54 | 55 | 7. Disclaimer of Warranty. 56 | 57 | Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 58 | 59 | 8. Limitation of Liability. 60 | 61 | In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 62 | 63 | 9. Accepting Warranty or Additional Liability. 64 | 65 | While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. 66 | 67 | END OF TERMS AND CONDITIONS 68 | 69 | APPENDIX: How to apply the Apache License to your work 70 | 71 | To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. 72 | 73 | Copyright [yyyy] [name of copyright owner] 74 | 75 | Licensed under the Apache License, Version 2.0 (the "License"); 76 | you may not use this file except in compliance with the License. 77 | You may obtain a copy of the License at 78 | 79 | http://www.apache.org/licenses/LICENSE-2.0 80 | 81 | Unless required by applicable law or agreed to in writing, software 82 | distributed under the License is distributed on an "AS IS" BASIS, 83 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 84 | See the License for the specific language governing permissions and 85 | limitations under the License. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------