From b152e2dbcff688666e0512a819a46391530ec102 Mon Sep 17 00:00:00 2001 From: Fagner Lima Date: Thu, 21 Sep 2017 17:41:39 -0300 Subject: [PATCH 1/5] Adds isPristine and isDirty methods --- demo/demo.component.ts | 20 ++++++++++++++++---- src/angular-forms.component.ts | 8 ++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/demo/demo.component.ts b/demo/demo.component.ts index 57711ff..ba140ec 100644 --- a/demo/demo.component.ts +++ b/demo/demo.component.ts @@ -9,10 +9,14 @@ import { AngularFormsComponent } from '../src';

AngularForms

- - - - + + + + + + + +
`, providers: [DemoService] @@ -33,6 +37,14 @@ export class DemoComponent implements OnInit { console.log(this.angularForms.getForm()); } + public isPristine(): void { + console.log(this.angularForms.isPristine()); + } + + public isDirty(): void { + console.log(this.angularForms.isDirty()); + } + public isValid(): void { console.log(this.angularForms.isValid()); } diff --git a/src/angular-forms.component.ts b/src/angular-forms.component.ts index a4ca40a..a7a383b 100644 --- a/src/angular-forms.component.ts +++ b/src/angular-forms.component.ts @@ -209,6 +209,14 @@ export class AngularFormsComponent implements OnInit, AfterViewChecked { return { valid: this.isValid(), value: this.getAnswersGroups() }; } + public isPristine(): boolean { + return this.formGroup.pristine; + } + + public isDirty(): boolean { + return this.formGroup.dirty; + } + public isValid(): boolean { return this.formGroup.valid; } From 038cb46384b5fd83c41f64381601c3fefc625ff7 Mon Sep 17 00:00:00 2001 From: Fagner Lima Date: Thu, 21 Sep 2017 17:49:01 -0300 Subject: [PATCH 2/5] Updates tests --- test/angular-forms.component.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/angular-forms.component.spec.ts b/test/angular-forms.component.spec.ts index f5b8631..d8717f7 100644 --- a/test/angular-forms.component.spec.ts +++ b/test/angular-forms.component.spec.ts @@ -55,6 +55,18 @@ describe('AngularFormsComponent', () => { component.onChangeOptionSelect(htmlFormControl, formControl, question); }); + it('should call isValid method', () => { + component.isValid(); + }); + + it('should call isPristine method', () => { + component.isPristine(); + }); + + it('should call isDirty method', () => { + component.isDirty(); + }); + it('should call submit method', () => { component.submit(); }); From 9867f020c6612b0de47eeafb6fcb0ab42fd11e94 Mon Sep 17 00:00:00 2001 From: Fagner Lima Date: Fri, 22 Sep 2017 09:02:10 -0300 Subject: [PATCH 3/5] Updates README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1c95095..811fb1a 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,8 @@ Example output: | Method | Function | |-|-| | **isValid()** | Returns the status of form. | +| **isPristine()** | Returns if the user has not yet changed some value in the form. | +| **isDirty()** | Returns if the user has changed some value in the form. | | **getAnswersGroups()** | Returns only the answers grouped in yours respective Groups. | | **getAnswers()** | Returns only the answers of simple Questions and of DataTables (that is considered a Question). | | **getForm()** | Returns an object with two attributes: **valid** (return of **isValid** method) and **value** (return of **getAnswersGroups** method. | From 0a0c9201db444c65170965597ed7141ef97a01c1 Mon Sep 17 00:00:00 2001 From: Fagner Lima Date: Fri, 22 Sep 2017 09:02:21 -0300 Subject: [PATCH 4/5] Updates version and dependencies --- CHANGELOG.md | 7 +++++++ package-lock.json | 51 +++++++++++++++++++++++------------------------ package.json | 11 +++++----- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69db0f5..b5b4619 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.2.0](https://github.com/robust-team/angular-forms/compare/v1.1.0...v1.2.0) (2017-09-22) + +### Features + +* Addition of **isPristine** and **isDirty** methods. + ## [1.1.0](https://github.com/robust-team/angular-forms/compare/v1.0.1...v1.1.0) (2017-09-21) diff --git a/package-lock.json b/package-lock.json index f909c38..1c5f56f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@robust-team/angular-forms", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -82,19 +82,18 @@ } }, "@compodoc/compodoc": { - "version": "1.0.0-beta.14", - "resolved": "https://registry.npmjs.org/@compodoc/compodoc/-/compodoc-1.0.0-beta.14.tgz", - "integrity": "sha512-Ea8jmHmCR5Jb9yFhIElfhn+rnlTEBEKK3lIf+fxQFxY2kHp8QeygCxB15t50yr6TZeNbtV7RGPIpCq1Rk3EmgQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@compodoc/compodoc/-/compodoc-1.0.1.tgz", + "integrity": "sha512-+hXITPup4tL4Jh3lo52YojXvshjcna95IzFm5FxEBM3vpXK4D+e1y6v7uUsVW2UopXfxv16uXBKm6b3GiaPTaQ==", "dev": true, "requires": { - "@compodoc/ngd-core": "2.0.0-alpha.3", "@compodoc/ngd-transformer": "2.0.0-alpha.5", "cheerio": "1.0.0-rc.2", "chokidar": "1.7.0", "colors": "1.1.2", "commander": "2.11.0", "findit": "2.0.0", - "fs-extra": "4.0.1", + "fs-extra": "4.0.2", "glob": "7.1.2", "gulp-util": "3.0.8", "handlebars": "4.0.10", @@ -106,13 +105,13 @@ "marked": "0.3.6", "os-name": "2.0.1", "shelljs": "0.7.8", - "typescript": "2.4.2" + "typescript": "2.5.2" }, "dependencies": { "typescript": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz", - "integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz", + "integrity": "sha1-A4qV99m7tCCxvzW6MdTFwd0//jQ=", "dev": true } } @@ -124,13 +123,13 @@ "dev": true, "requires": { "gulp-util": "3.0.8", - "typescript": "2.4.2" + "typescript": "2.5.2" }, "dependencies": { "typescript": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz", - "integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz", + "integrity": "sha1-A4qV99m7tCCxvzW6MdTFwd0//jQ=", "dev": true } } @@ -143,7 +142,7 @@ "requires": { "@compodoc/ngd-core": "2.0.0-alpha.3", "dot": "1.1.2", - "fs-extra": "4.0.1", + "fs-extra": "4.0.2", "viz.js": "1.8.0" } }, @@ -2202,9 +2201,9 @@ "dev": true }, "dateformat": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", - "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", "dev": true }, "debug": { @@ -3212,13 +3211,13 @@ } }, "fs-extra": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz", - "integrity": "sha1-f8DGyJV/mD9X8waiTlud3Y0N2IA=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", + "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", "dev": true, "requires": { "graceful-fs": "4.1.11", - "jsonfile": "3.0.1", + "jsonfile": "4.0.0", "universalify": "0.1.1" } }, @@ -3481,7 +3480,7 @@ "array-uniq": "1.0.3", "beeper": "1.1.1", "chalk": "1.1.3", - "dateformat": "2.0.0", + "dateformat": "2.2.0", "fancy-log": "1.3.0", "gulplog": "1.0.0", "has-gulplog": "0.1.0", @@ -4482,9 +4481,9 @@ "dev": true }, "jsonfile": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", - "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { "graceful-fs": "4.1.11" diff --git a/package.json b/package.json index f532fd0..bf1d424 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@robust-team/angular-forms", - "version": "1.1.0", + "version": "1.2.0", "license": "MIT", "description": "A Simple Angular Forms Generator", "main": "./bundles/angular-forms.umd.js", @@ -11,18 +11,17 @@ "build:demo": "webpack -p", "build:umd": "webpack --config webpack.config.umd.ts", "build:ngc": "ngc -p tsconfig-ngc.json", - "build:copyfiles": "copyfiles assets/**/*.css dist", - "build:dist": "npm run build:umd && npm run build:ngc && npm run build:copyfiles", + "build:dist": "npm run build:umd && npm run build:ngc && npm run copyfiles", "build:clean": "del-cli dist", "test": "karma start --single-run && npm run build:dist && npm run build:clean", "test-ci": "karma start --single-run --browsers PhantomJS", "test:watch": "karma start --auto-watch", "compodoc": "compodoc -p tsconfig-compodoc.json -d docs --disableGraph --disableCoverage --disablePrivateOrInternalSupport", "gh-pages": "git checkout gh-pages && git merge master --no-edit --no-ff && npm run build:demo && npm run compodoc && git add . && git commit -m \"chore: build demo and docs\" && git push && git checkout master", - "copyfiles": "copyfiles package.json LICENSE README.md CHANGELOG.md dist", + "copyfiles": "copyfiles assets/**/*.css package.json LICENSE README.md CHANGELOG.md dist", "prerelease": "npm test", "release:git": "git add package.json && git commit -m \"chore: bump version number\" && standard-version --first-release && git push --follow-tags origin master", - "release:npm": "npm run build:dist && npm run copyfiles && npm publish dist", + "release:npm": "npm run build:dist && npm publish dist", "release": "npm run release:git && npm run release:npm", "postrelease": "npm run build:clean && npm run gh-pages", "codecov": "cat coverage/lcov.info | codecov" @@ -55,7 +54,7 @@ "@angular/language-service": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", - "@compodoc/compodoc": "^1.0.0-beta.3", + "@compodoc/compodoc": "^1.0.1", "@types/chai": "^4.0.0", "@types/html-webpack-plugin": "^2.11.2", "@types/mocha": "^2.2.41", From 0ddaf2de72fe80d6124982791872b1adaed82c81 Mon Sep 17 00:00:00 2001 From: Fagner Lima Date: Fri, 22 Sep 2017 09:13:22 -0300 Subject: [PATCH 5/5] Updates docs --- docs/changelog.html | 6 + docs/classes/AngularForms.html | 35 ++- docs/classes/AngularFormsTranslateLoader.html | 33 ++- docs/classes/Checkbox.html | 121 ++++++++- docs/classes/Choice.html | 112 +++++++- docs/classes/DataTable.html | 71 ++++- docs/classes/DataTableBuilder.html | 87 +++++- docs/classes/Dependency.html | 58 +++- docs/classes/DependencyService.html | 42 ++- docs/classes/Email.html | 28 ++ docs/classes/EmailValidator.html | 33 ++- docs/classes/Fieldset.html | 54 +++- docs/classes/FieldsetBuilder.html | 74 +++++- docs/classes/Group.html | 58 +++- docs/classes/GroupBuilder.html | 80 +++++- docs/classes/Max.html | 41 ++- docs/classes/MaxLength.html | 41 ++- docs/classes/MaxLengthValidator.html | 33 ++- docs/classes/MaxValidator.html | 33 ++- docs/classes/Min.html | 41 ++- docs/classes/MinLength.html | 41 ++- docs/classes/MinLengthValidator.html | 33 ++- docs/classes/MinValidator.html | 33 ++- docs/classes/Pattern.html | 50 +++- docs/classes/PatternValidator.html | 33 ++- docs/classes/Question.html | 120 +++++++-- docs/classes/QuestionFactory.html | 68 ++++- docs/classes/Radio.html | 126 ++++++++- docs/classes/ReactiveFormsFactory.html | 147 ++++++++++- docs/classes/Required.html | 41 ++- docs/classes/RequiredValidator.html | 33 ++- docs/classes/Select.html | 152 ++++++++++- docs/classes/SelectService.html | 51 +++- docs/classes/StringUtils.html | 33 ++- docs/classes/Text.html | 134 +++++++++- docs/classes/TextArea.html | 121 ++++++++- docs/classes/Validation.html | 49 +++- docs/classes/ValidationFactory.html | 68 ++++- docs/classes/ValidationTypeNotFoundError.html | 36 ++- docs/classes/ValidatorFactory.html | 56 +++- docs/classes/ValidatorFactoryHandler.html | 66 ++++- docs/components/AngularFormsComponent.html | 248 ++++++++++++++++-- docs/components/DataTableComponent.html | 205 +++++++++++++-- docs/components/DemoComponent.html | 174 ++++++++++-- .../ValidationMessageComponent.html | 4 +- docs/index.html | 8 + docs/injectables/DemoService.html | 4 +- docs/interfaces/Option.html | 5 +- docs/js/libs/tablesort.min.js | 5 + docs/js/libs/tablesort.number.min.js | 5 + docs/js/search/search_index.js | 4 +- docs/miscellaneous/enumerations.html | 70 +++-- docs/miscellaneous/variables.html | 63 +++-- docs/modules.html | 80 +++--- docs/modules/AngularFormsModule.html | 6 +- docs/modules/DataTableModule.html | 6 +- docs/modules/DemoModule.html | 4 +- docs/modules/ValidationMessageModule.html | 4 +- docs/styles/compodoc.css | 21 ++ docs/styles/style.css | 1 + docs/styles/tablesort.css | 33 +++ 61 files changed, 3172 insertions(+), 350 deletions(-) create mode 100644 docs/js/libs/tablesort.min.js create mode 100644 docs/js/libs/tablesort.number.min.js create mode 100644 docs/styles/tablesort.css diff --git a/docs/changelog.html b/docs/changelog.html index b9f2fd7..82635f7 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -631,6 +631,12 @@

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

+

+

1.2.0 (2017-09-22)

+

Features

+
    +
  • Addition of isPristine and isDirty methods.
  • +

1.1.0 (2017-09-21)

Features

diff --git a/docs/classes/AngularForms.html b/docs/classes/AngularForms.html index e173f2d..53be300 100644 --- a/docs/classes/AngularForms.html +++ b/docs/classes/AngularForms.html @@ -698,13 +698,13 @@

- Public fromJson + Public fromJson - - fromJson(jsonGroups: []) + + fromJson(jsonGroups: Group[]) @@ -718,10 +718,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
jsonGroups + Group[] + +
+
+
+
Returns : []
+
+ +
diff --git a/docs/classes/AngularFormsTranslateLoader.html b/docs/classes/AngularFormsTranslateLoader.html index 69a6c6b..a8fb3e4 100644 --- a/docs/classes/AngularFormsTranslateLoader.html +++ b/docs/classes/AngularFormsTranslateLoader.html @@ -704,12 +704,12 @@

- Public getTranslation + Public getTranslation - + getTranslation(lang: string) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
lang + string + +
+
+
+
Returns : Observable<any>
+
+ +
diff --git a/docs/classes/Checkbox.html b/docs/classes/Checkbox.html index 083bd30..268c5b7 100644 --- a/docs/classes/Checkbox.html +++ b/docs/classes/Checkbox.html @@ -713,7 +713,7 @@

Constructor

- constructor(name: string, description: string, dependencies: [], answer: boolean, validations: [], disabled: boolean, _defaultOption: boolean) + constructor(name: string, description: string, dependencies: Dependency[], answer: boolean, validations: Validation[], disabled: boolean, _defaultOption: boolean) @@ -722,6 +722,88 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
name + string + +
description + string + +
dependencies + Dependency[] + +
answer + boolean + +
validations + Validation[] + +
disabled + boolean + +
_defaultOption + boolean + +
+
+ + @@ -736,12 +818,12 @@

- Public fromJson + Public fromJson - + fromJson(question: Checkbox) @@ -756,10 +838,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Checkbox + +
+
+
+
Returns : Checkbox
+
+ +
@@ -777,12 +888,12 @@

- Public defaultOption + Public defaultOption - defaultOption: boolean + defaultOption: boolean diff --git a/docs/classes/Choice.html b/docs/classes/Choice.html index 695df24..1da0237 100644 --- a/docs/classes/Choice.html +++ b/docs/classes/Choice.html @@ -702,7 +702,7 @@

Constructor

- constructor(name: string, description: string, type: QuestionType, dependencies: [], answer: string, validations: [], disabled: boolean, _options: []|[], _defaultOption: string) + constructor(name: string, description: string, type: QuestionType, dependencies: Dependency[], answer: string, validations: Validation[], disabled: boolean, _options: [] | [], _defaultOption: string) @@ -711,6 +711,106 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
name + string + +
description + string + +
type + QuestionType + +
dependencies + Dependency[] + +
answer + string + +
validations + Validation[] + +
disabled + boolean + +
_options + [] | [] + +
_defaultOption + string + +
+
+ + @@ -727,12 +827,12 @@

- Public defaultOption + Public defaultOption - defaultOption: string + defaultOption: string @@ -756,18 +856,18 @@

- Public options + Public options - options: []|[] + options: [] | [] - Type : []|[] + Type : [] | [] diff --git a/docs/classes/DataTable.html b/docs/classes/DataTable.html index 8d48c52..106908f 100644 --- a/docs/classes/DataTable.html +++ b/docs/classes/DataTable.html @@ -716,7 +716,7 @@

Constructor

- constructor(code: string, description: string, _questions: [][], _validations: []) + constructor(code: string, description: string, _questions: [][], _validations: Validation[]) @@ -725,6 +725,61 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
code + string + +
description + string + +
_questions + [][] + +
_validations + Validation[] + +
+
+ + @@ -739,12 +794,12 @@

- Public isRequired + Public isRequired - + isRequired() @@ -780,12 +835,12 @@

- Public questions + Public questions - questions: [][] + questions: [][] @@ -809,18 +864,18 @@

- Public validations + Public validations - validations: [] + validations: Validation[] - Type : [] + Type : Validation[] diff --git a/docs/classes/DataTableBuilder.html b/docs/classes/DataTableBuilder.html index e0d9341..b9012fe 100644 --- a/docs/classes/DataTableBuilder.html +++ b/docs/classes/DataTableBuilder.html @@ -702,7 +702,7 @@

Constructor

- constructor(code: string, description: string, validations: []) + constructor(code: string, description: string, validations: Validation[]) @@ -711,6 +711,52 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
code + string + +
description + string + +
validations + Validation[] + +
+
+ + @@ -725,13 +771,13 @@

- Public addQuestion + Public addQuestion - - addQuestion(question: []) + + addQuestion(question: Question[]) @@ -745,10 +791,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Question[] + +
+
+
+
Returns : void
+
+ +
@@ -758,12 +833,12 @@

- Public build + Public build - + build() diff --git a/docs/classes/Dependency.html b/docs/classes/Dependency.html index 304bae6..e317645 100644 --- a/docs/classes/Dependency.html +++ b/docs/classes/Dependency.html @@ -708,6 +708,52 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
_code + string + +
_criteria + DependencyCriteria + +
_expectedAnswer + string + +
+
+ + @@ -724,12 +770,12 @@

- Public code + Public code - code: string + code: string @@ -753,12 +799,12 @@

- Public criteria + Public criteria - criteria: DependencyCriteria + criteria: DependencyCriteria @@ -782,12 +828,12 @@

- Public expectedAnswer + Public expectedAnswer - expectedAnswer: string + expectedAnswer: string diff --git a/docs/classes/DependencyService.html b/docs/classes/DependencyService.html index 4744bf3..1902a37 100644 --- a/docs/classes/DependencyService.html +++ b/docs/classes/DependencyService.html @@ -698,12 +698,12 @@

- Public hideQuestion + Public hideQuestion - + hideQuestion(question: Question, formGroup: FormGroup) @@ -718,10 +718,48 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Question<any> + +
formGroup + FormGroup + +
+
+
+
Returns : boolean
+
+ +
diff --git a/docs/classes/Email.html b/docs/classes/Email.html index 825cd6a..2727ebb 100644 --- a/docs/classes/Email.html +++ b/docs/classes/Email.html @@ -687,6 +687,34 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
message + string + +
+
+ + diff --git a/docs/classes/EmailValidator.html b/docs/classes/EmailValidator.html index 14640a8..60b6003 100644 --- a/docs/classes/EmailValidator.html +++ b/docs/classes/EmailValidator.html @@ -704,12 +704,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/classes/Fieldset.html b/docs/classes/Fieldset.html index 5979866..577f78b 100644 --- a/docs/classes/Fieldset.html +++ b/docs/classes/Fieldset.html @@ -699,7 +699,7 @@

Constructor

- constructor(code: string, description: string, _questions: []) + constructor(code: string, description: string, _questions: Question[]) @@ -708,6 +708,52 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
code + string + +
description + string + +
_questions + Question[] + +
+
+ + @@ -724,18 +770,18 @@

- Public questions + Public questions - questions: [] + questions: Question[] - Type : [] + Type : Question[] diff --git a/docs/classes/FieldsetBuilder.html b/docs/classes/FieldsetBuilder.html index 3e228c2..202c551 100644 --- a/docs/classes/FieldsetBuilder.html +++ b/docs/classes/FieldsetBuilder.html @@ -711,6 +711,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
code + string + +
description + string + +
+
+ + @@ -725,12 +762,12 @@

- Public addQuestion + Public addQuestion - + addQuestion(question: Question) @@ -745,10 +782,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Question<any> + +
+
+
+
Returns : void
+
+ +
@@ -758,12 +824,12 @@

- Public build + Public build - + build() diff --git a/docs/classes/Group.html b/docs/classes/Group.html index 814bce5..ec41f70 100644 --- a/docs/classes/Group.html +++ b/docs/classes/Group.html @@ -708,6 +708,52 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
_code + string + +
_description + string + +
_type + GroupType + +
+
+ + @@ -724,12 +770,12 @@

- Public code + Public code - code: string + code: string @@ -753,12 +799,12 @@

- Public description + Public description - description: string + description: string @@ -782,12 +828,12 @@

- Public type + Public type - type: GroupType + type: GroupType diff --git a/docs/classes/GroupBuilder.html b/docs/classes/GroupBuilder.html index d27b025..9a1e476 100644 --- a/docs/classes/GroupBuilder.html +++ b/docs/classes/GroupBuilder.html @@ -719,6 +719,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
code + string + +
description + string + +
+
+ + @@ -733,12 +770,12 @@

- Public addQuestion + Public addQuestion - + addQuestion(question: QuestionListType) @@ -753,10 +790,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + QuestionListType + +
+
+
+
Returns : void
+
+ +
@@ -766,12 +832,12 @@

- Public build + Public build - + build() @@ -807,18 +873,18 @@

- Protected questions + Protected questions - questions: [] + questions: QuestionListType[] - Type : [] + Type : QuestionListType[] diff --git a/docs/classes/Max.html b/docs/classes/Max.html index 57bd065..d586110 100644 --- a/docs/classes/Max.html +++ b/docs/classes/Max.html @@ -708,6 +708,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
message + string + +
_value + number + +
+
+ + @@ -724,12 +761,12 @@

- Public value + Public value - value: number + value: number diff --git a/docs/classes/MaxLength.html b/docs/classes/MaxLength.html index 7c6c61d..e7bb766 100644 --- a/docs/classes/MaxLength.html +++ b/docs/classes/MaxLength.html @@ -708,6 +708,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
message + string + +
_value + number + +
+
+ + @@ -724,12 +761,12 @@

- Public value + Public value - value: number + value: number diff --git a/docs/classes/MaxLengthValidator.html b/docs/classes/MaxLengthValidator.html index 7548408..68b26d3 100644 --- a/docs/classes/MaxLengthValidator.html +++ b/docs/classes/MaxLengthValidator.html @@ -704,12 +704,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/classes/MaxValidator.html b/docs/classes/MaxValidator.html index fb14019..e1bb47d 100644 --- a/docs/classes/MaxValidator.html +++ b/docs/classes/MaxValidator.html @@ -704,12 +704,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/classes/Min.html b/docs/classes/Min.html index 22e56c1..5f7e85b 100644 --- a/docs/classes/Min.html +++ b/docs/classes/Min.html @@ -708,6 +708,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
message + string + +
_value + number + +
+
+ + @@ -724,12 +761,12 @@

- Public value + Public value - value: number + value: number diff --git a/docs/classes/MinLength.html b/docs/classes/MinLength.html index a8e186c..6ebd1ba 100644 --- a/docs/classes/MinLength.html +++ b/docs/classes/MinLength.html @@ -708,6 +708,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
message + string + +
_value + number + +
+
+ + @@ -724,12 +761,12 @@

- Public value + Public value - value: number + value: number diff --git a/docs/classes/MinLengthValidator.html b/docs/classes/MinLengthValidator.html index a8923ec..d463f98 100644 --- a/docs/classes/MinLengthValidator.html +++ b/docs/classes/MinLengthValidator.html @@ -704,12 +704,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/classes/MinValidator.html b/docs/classes/MinValidator.html index d205c1a..9faa80c 100644 --- a/docs/classes/MinValidator.html +++ b/docs/classes/MinValidator.html @@ -704,12 +704,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/classes/Pattern.html b/docs/classes/Pattern.html index 304e481..c36984e 100644 --- a/docs/classes/Pattern.html +++ b/docs/classes/Pattern.html @@ -722,6 +722,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
message + string + +
_value + string + +
+
+ + @@ -736,12 +773,12 @@

- Public isRequired + Public isRequired - + isRequired() @@ -756,15 +793,10 @@

-
-
Returns : boolean
-
- -
@@ -782,12 +814,12 @@

- Public value + Public value - value: string + value: string diff --git a/docs/classes/PatternValidator.html b/docs/classes/PatternValidator.html index 954f470..e8d85b3 100644 --- a/docs/classes/PatternValidator.html +++ b/docs/classes/PatternValidator.html @@ -704,12 +704,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/classes/Question.html b/docs/classes/Question.html index 989aa67..f558c0e 100644 --- a/docs/classes/Question.html +++ b/docs/classes/Question.html @@ -725,7 +725,7 @@

Constructor

- constructor(_name: string, _description: string, _type: QuestionType, _dependencies: [], _answer: Answer, _validations: [], _disabled: boolean) + constructor(_name: string, _description: string, _type: QuestionType, _dependencies: Dependency[], _answer: Answer, _validations: Validation[], _disabled: boolean) @@ -734,6 +734,88 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
_name + string + +
_description + string + +
_type + QuestionType + +
_dependencies + Dependency[] + +
_answer + Answer + +
_validations + Validation[] + +
_disabled + boolean + +
+
+ + @@ -748,12 +830,12 @@

- Public isRequired + Public isRequired - + isRequired() @@ -789,12 +871,12 @@

- Public answer + Public answer - answer: Answer + answer: Answer @@ -818,18 +900,18 @@

- Public dependencies + Public dependencies - dependencies: [] + dependencies: Dependency[] - Type : [] + Type : Dependency[] @@ -847,12 +929,12 @@

- Public description + Public description - description: string + description: string @@ -876,12 +958,12 @@

- Public disabled + Public disabled - disabled: boolean + disabled: boolean @@ -905,12 +987,12 @@

- Public name + Public name - name: string + name: string @@ -934,12 +1016,12 @@

- Public type + Public type - type: QuestionType + type: QuestionType @@ -963,18 +1045,18 @@

- Public validations + Public validations - validations: [] + validations: Validation[] - Type : [] + Type : Validation[] diff --git a/docs/classes/QuestionFactory.html b/docs/classes/QuestionFactory.html index 32bd96a..f084fa8 100644 --- a/docs/classes/QuestionFactory.html +++ b/docs/classes/QuestionFactory.html @@ -701,12 +701,12 @@

- Public createQuestion + Public createQuestion - + createQuestion(question: Question) @@ -721,10 +721,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Question<any> + +
+
+
+
Returns : Question<any>
+
+ +
@@ -734,13 +763,13 @@

- Public createQuestionList + Public createQuestionList - - createQuestionList(questionList: []) + + createQuestionList(questionList: Question[]) @@ -754,10 +783,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
questionList + Question[] + +
+
+
+
Returns : []
+
+ +
diff --git a/docs/classes/Radio.html b/docs/classes/Radio.html index 860e9c8..2232a39 100644 --- a/docs/classes/Radio.html +++ b/docs/classes/Radio.html @@ -699,7 +699,7 @@

Constructor

- constructor(name: string, description: string, dependencies: [], answer: string, validations: [], disabled: boolean, options: []|[], defaultOption: string) + constructor(name: string, description: string, dependencies: Dependency[], answer: string, validations: Validation[], disabled: boolean, options: [] | [], defaultOption: string) @@ -708,6 +708,97 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
name + string + +
description + string + +
dependencies + Dependency[] + +
answer + string + +
validations + Validation[] + +
disabled + boolean + +
options + [] | [] + +
defaultOption + string + +
+
+ + @@ -722,12 +813,12 @@

- Public fromJson + Public fromJson - + fromJson(question: Radio) @@ -742,10 +833,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Radio + +
+
+
+
Returns : Radio
+
+ +
diff --git a/docs/classes/ReactiveFormsFactory.html b/docs/classes/ReactiveFormsFactory.html index 08f114b..323954a 100644 --- a/docs/classes/ReactiveFormsFactory.html +++ b/docs/classes/ReactiveFormsFactory.html @@ -707,12 +707,12 @@

- Public createFormArrayFromQuestions + Public createFormArrayFromQuestions - + createFormArrayFromQuestions(questions: [][]) @@ -727,10 +727,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
questions + [][] + +
+
+
+
Returns : FormArray
+
+ +
@@ -740,13 +769,13 @@

- Public createFormGroupFromGroups + Public createFormGroupFromGroups - - createFormGroupFromGroups(groups: []) + + createFormGroupFromGroups(groups: Group[]) @@ -760,10 +789,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
groups + Group[] + +
+
+
+
Returns : FormGroup
+
+ +
@@ -773,13 +831,13 @@

- Public createFormGroupFromQuestions + Public createFormGroupFromQuestions - - createFormGroupFromQuestions(questions: [], checkDisabledQuestions: boolean) + + createFormGroupFromQuestions(questions: Question[], checkDisabledQuestions: boolean) @@ -793,10 +851,48 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
questions + Question[] + +
checkDisabledQuestions + boolean + +
+
+
+
Returns : FormGroup
+
+ +
@@ -806,13 +902,13 @@

- Public createValidators + Public createValidators - - createValidators(validations: []) + + createValidators(validations: Validation[]) @@ -826,10 +922,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validations + Validation[] + +
+
+
+
Returns : []
+
+ +
diff --git a/docs/classes/Required.html b/docs/classes/Required.html index b7c9ceb..2da5362 100644 --- a/docs/classes/Required.html +++ b/docs/classes/Required.html @@ -708,6 +708,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
message + string + +
_requiredTrue + boolean + +
+
+ + @@ -724,12 +761,12 @@

- Public requiredTrue + Public requiredTrue - requiredTrue: boolean + requiredTrue: boolean diff --git a/docs/classes/RequiredValidator.html b/docs/classes/RequiredValidator.html index db3e5f4..fe63f96 100644 --- a/docs/classes/RequiredValidator.html +++ b/docs/classes/RequiredValidator.html @@ -704,12 +704,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -724,10 +724,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/classes/Select.html b/docs/classes/Select.html index 5dfece9..a54039a 100644 --- a/docs/classes/Select.html +++ b/docs/classes/Select.html @@ -716,7 +716,7 @@

Constructor

- constructor(name: string, description: string, dependencies: [], answer: string, validations: [], disabled: boolean, options: []|[], defaultOption: string, _editableOption: string, _placeholder: string) + constructor(name: string, description: string, dependencies: Dependency[], answer: string, validations: Validation[], disabled: boolean, options: [] | [], defaultOption: string, _editableOption: string, _placeholder: string) @@ -725,6 +725,115 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
name + string + +
description + string + +
dependencies + Dependency[] + +
answer + string + +
validations + Validation[] + +
disabled + boolean + +
options + [] | [] + +
defaultOption + string + +
_editableOption + string + +
_placeholder + string + +
+
+ + @@ -739,12 +848,12 @@

- Public fromJson + Public fromJson - + fromJson(question: Select) @@ -759,10 +868,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Select + +
+
+
+
Returns : Select
+
+ +
@@ -780,12 +918,12 @@

- Public editableOption + Public editableOption - editableOption: string + editableOption: string @@ -809,12 +947,12 @@

- Public placeholder + Public placeholder - placeholder: string + placeholder: string diff --git a/docs/classes/SelectService.html b/docs/classes/SelectService.html index fc54a2c..8bed61a 100644 --- a/docs/classes/SelectService.html +++ b/docs/classes/SelectService.html @@ -698,12 +698,12 @@

- Public onChangeOption + Public onChangeOption - + onChangeOption(htmlFormControl: HTMLInputElement, formControl: FormControl, question: Select) @@ -718,10 +718,57 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
htmlFormControl + HTMLInputElement + +
formControl + FormControl + +
question + Select + +
+
+
+
Returns : void
+
+ +
diff --git a/docs/classes/StringUtils.html b/docs/classes/StringUtils.html index 6085d8e..9488ab7 100644 --- a/docs/classes/StringUtils.html +++ b/docs/classes/StringUtils.html @@ -698,12 +698,12 @@

- Public convertToString + Public convertToString - + convertToString(value: any) @@ -718,10 +718,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
value + any + +
+
+
+
Returns : string
+
+ +
diff --git a/docs/classes/Text.html b/docs/classes/Text.html index 5fec71f..78238d1 100644 --- a/docs/classes/Text.html +++ b/docs/classes/Text.html @@ -716,7 +716,7 @@

Constructor

- constructor(name: string, description: string, dependencies: [], answer: string, validations: [], disabled: boolean, _mask: string, _placeholder: string) + constructor(name: string, description: string, dependencies: Dependency[], answer: string, validations: Validation[], disabled: boolean, _mask: string, _placeholder: string) @@ -725,6 +725,97 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
name + string + +
description + string + +
dependencies + Dependency[] + +
answer + string + +
validations + Validation[] + +
disabled + boolean + +
_mask + string + +
_placeholder + string + +
+
+ + @@ -739,12 +830,12 @@

- Public fromJson + Public fromJson - + fromJson(question: Text) @@ -759,10 +850,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + Text + +
+
+
+
Returns : Text
+
+ +
@@ -780,12 +900,12 @@

- Public mask + Public mask - mask: string + mask: string @@ -809,12 +929,12 @@

- Public placeholder + Public placeholder - placeholder: string + placeholder: string diff --git a/docs/classes/TextArea.html b/docs/classes/TextArea.html index d7dccb1..8710021 100644 --- a/docs/classes/TextArea.html +++ b/docs/classes/TextArea.html @@ -713,7 +713,7 @@

Constructor

- constructor(name: string, description: string, dependencies: [], answer: string, validations: [], disabled: boolean, _placeholder: string) + constructor(name: string, description: string, dependencies: Dependency[], answer: string, validations: Validation[], disabled: boolean, _placeholder: string) @@ -722,6 +722,88 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
name + string + +
description + string + +
dependencies + Dependency[] + +
answer + string + +
validations + Validation[] + +
disabled + boolean + +
_placeholder + string + +
+
+ + @@ -736,12 +818,12 @@

- Public fromJson + Public fromJson - + fromJson(question: TextArea) @@ -756,10 +838,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
question + TextArea + +
+
+
+
Returns : TextArea
+
+ +
@@ -777,12 +888,12 @@

- Public placeholder + Public placeholder - placeholder: string + placeholder: string diff --git a/docs/classes/Validation.html b/docs/classes/Validation.html index 6e3c3b7..ce410e1 100644 --- a/docs/classes/Validation.html +++ b/docs/classes/Validation.html @@ -719,6 +719,43 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
_type + ValidationType + +
_message + string + +
+
+ + @@ -733,12 +770,12 @@

- Public isRequired + Public isRequired - + isRequired() @@ -774,12 +811,12 @@

- Public message + Public message - message: string + message: string @@ -803,12 +840,12 @@

- Public type + Public type - type: ValidationType + type: ValidationType diff --git a/docs/classes/ValidationFactory.html b/docs/classes/ValidationFactory.html index 4551a22..6fcce99 100644 --- a/docs/classes/ValidationFactory.html +++ b/docs/classes/ValidationFactory.html @@ -701,12 +701,12 @@

- Public createValidation + Public createValidation - + createValidation(validation: Validation) @@ -721,10 +721,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : Validation
+
+ +
@@ -734,13 +763,13 @@

- Public createValidationList + Public createValidationList - - createValidationList(validationList: []) + + createValidationList(validationList: Validation[]) @@ -754,10 +783,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validationList + Validation[] + +
+
+
+
Returns : []
+
+ +
diff --git a/docs/classes/ValidationTypeNotFoundError.html b/docs/classes/ValidationTypeNotFoundError.html index f14a9c8..765b9fa 100644 --- a/docs/classes/ValidationTypeNotFoundError.html +++ b/docs/classes/ValidationTypeNotFoundError.html @@ -711,6 +711,34 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
_message + string + +
+
+ + @@ -727,12 +755,12 @@

- Public message + Public message - message: string + message: string @@ -756,12 +784,12 @@

- Public name + Public name - name: string + name: string diff --git a/docs/classes/ValidatorFactory.html b/docs/classes/ValidatorFactory.html index a001ed4..02ef573 100644 --- a/docs/classes/ValidatorFactory.html +++ b/docs/classes/ValidatorFactory.html @@ -720,6 +720,34 @@

Constructor

+ + +
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+ + @@ -734,12 +762,12 @@

- Public createEmailValidator + Public createEmailValidator - + createEmailValidator() @@ -767,12 +795,12 @@

- Public createMaxLengthValidator + Public createMaxLengthValidator - + createMaxLengthValidator() @@ -800,12 +828,12 @@

- Public createMaxValidator + Public createMaxValidator - + createMaxValidator() @@ -833,12 +861,12 @@

- Public createMinLengthValidator + Public createMinLengthValidator - + createMinLengthValidator() @@ -866,12 +894,12 @@

- Public createMinValidator + Public createMinValidator - + createMinValidator() @@ -899,12 +927,12 @@

- Public createPatternValidator + Public createPatternValidator - + createPatternValidator() @@ -932,12 +960,12 @@

- Public createRequiredValidator + Public createRequiredValidator - + createRequiredValidator() diff --git a/docs/classes/ValidatorFactoryHandler.html b/docs/classes/ValidatorFactoryHandler.html index b285f8c..afa18de 100644 --- a/docs/classes/ValidatorFactoryHandler.html +++ b/docs/classes/ValidatorFactoryHandler.html @@ -701,12 +701,12 @@

- Public append + Public append - + append(handler: ValidatorFactoryHandler) @@ -721,10 +721,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
handler + ValidatorFactoryHandler + +
+
+
+
+
+ +
@@ -734,12 +763,12 @@

- Public handle + Public handle - + handle(validation: Validation) @@ -754,10 +783,39 @@

+
+ Parameters : + + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
validation + Validation + +
+
+
+
Returns : ValidatorFn
+
+ +
diff --git a/docs/components/AngularFormsComponent.html b/docs/components/AngularFormsComponent.html index 21ef41a..156988d 100644 --- a/docs/components/AngularFormsComponent.html +++ b/docs/components/AngularFormsComponent.html @@ -901,6 +901,12 @@

Methods
  • Public hideQuestion
  • +
  • + Public isDirty +
  • +
  • + Public isPristine +
  • Public isValid
  • @@ -952,6 +958,43 @@

    Constructor

    + + +
    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    changeDetectorRef + ChangeDetectorRef + +
    translateService + TranslateService + +
    +
    + + @@ -967,7 +1010,7 @@

    Inputs

    - Type: [] + Type: Group[]

    @@ -1030,6 +1073,8 @@

    Inputs

    + +

    @@ -1040,12 +1085,12 @@

    - Public getAnswers + Public getAnswers - + getAnswers() @@ -1053,7 +1098,7 @@

    - + @@ -1073,12 +1118,12 @@

    - Public getAnswersGroups + Public getAnswersGroups - + getAnswersGroups() @@ -1086,7 +1131,7 @@

    - + @@ -1106,12 +1151,12 @@

    - Public getForm + Public getForm - + getForm() @@ -1139,12 +1184,12 @@

    - Public hideQuestion + Public hideQuestion - + hideQuestion(question: Question, formGroup: FormGroup) @@ -1156,6 +1201,110 @@

    + + + +
    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    question + Question<any> + +
    formGroup + FormGroup + +
    +
    +
    +
    +
    + Returns : boolean + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + Public isDirty +
    + + isDirty() +
    + +
    + +
    + Returns : boolean + +
    +
    + + + + + + + + + + + + + + @@ -1185,7 +1334,7 @@

    @@ -1205,12 +1354,12 @@

    @@ -1225,10 +1374,57 @@

    @@ -1238,12 +1434,12 @@

    @@ -1278,12 +1474,12 @@

    @@ -1307,12 +1503,12 @@

    @@ -1552,6 +1748,14 @@

    return { valid: this.isValid(), value: this.getAnswersGroups() }; } + public isPristine(): boolean { + return this.formGroup.pristine; + } + + public isDirty(): boolean { + return this.formGroup.dirty; + } + public isValid(): boolean { return this.formGroup.valid; } diff --git a/docs/components/DataTableComponent.html b/docs/components/DataTableComponent.html index 74daae6..0b83ca0 100644 --- a/docs/components/DataTableComponent.html +++ b/docs/components/DataTableComponent.html @@ -1016,6 +1016,8 @@

    Inputs

    + +

    @@ -1026,12 +1028,12 @@

    @@ -1059,12 +1061,12 @@

    @@ -1079,10 +1081,39 @@

    @@ -1092,12 +1123,12 @@

    @@ -1112,10 +1143,39 @@

    @@ -1125,12 +1185,12 @@

    @@ -1145,10 +1205,39 @@

    @@ -1158,12 +1247,12 @@

    @@ -1178,10 +1267,57 @@

    @@ -1191,12 +1327,12 @@

    @@ -1211,10 +1347,39 @@

    @@ -1224,12 +1389,12 @@

    @@ -1264,12 +1429,12 @@

    @@ -1293,12 +1458,12 @@

    @@ -1322,12 +1487,12 @@

    diff --git a/docs/components/DemoComponent.html b/docs/components/DemoComponent.html index bbf6490..8731bef 100644 --- a/docs/components/DemoComponent.html +++ b/docs/components/DemoComponent.html @@ -705,10 +705,14 @@

    Metadata

    @@ -757,6 +761,12 @@
    Methods
  • Public getForm
  • +
  • + Public isDirty +
  • +
  • + Public isPristine +
  • Public isValid
  • @@ -778,16 +788,46 @@

    Constructor

    + + +
    + + Public isPristine +
    + + isPristine() +
    + +
    @@ -1172,12 +1321,12 @@

    - Public isValid + Public isValid
    - + isValid()
    - +
    - Public onChangeOptionSelect + Public onChangeOptionSelect
    - + onChangeOptionSelect(htmlFormControl: HTMLInputElement, formControl: FormControl, question: Select)
    +
    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    htmlFormControl + HTMLInputElement + +
    formControl + FormControl + +
    question + Select + +
    +
    +
    +
    Returns : void
    +
    + +
    - Public submit + Public submit
    - + submit()
    - Public formGroup + Public formGroup
    - formGroup: FormGroup + formGroup: FormGroup
    - Public submitted + Public submitted
    - submitted: boolean + submitted: boolean
    - Public addData + Public addData
    - + addData()
    - Public getKeysFromObject + Public getKeysFromObject
    - + getKeysFromObject(object: Object)
    +
    + Parameters : + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    object + Object + +
    +
    +
    +
    Returns : string[]
    +
    + +
    - Public getQuestionByName + Public getQuestionByName
    - + getQuestionByName(name: string)
    +
    + Parameters : + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    name + string + +
    +
    +
    +
    Returns : Question<any>
    +
    + +
    - Public isCheckbox + Public isCheckbox
    - + isCheckbox(question: Question)
    +
    + Parameters : + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    question + Question<any> + +
    +
    +
    +
    Returns : boolean
    +
    + +
    - Public onChangeOptionSelect + Public onChangeOptionSelect
    - + onChangeOptionSelect(htmlFormControl: HTMLInputElement, formControl: FormControl, question: Select)
    +
    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    htmlFormControl + HTMLInputElement + +
    formControl + FormControl + +
    question + Select + +
    +
    +
    +
    Returns : void
    +
    + +
    - Public removeData + Public removeData
    - + removeData(index: number)
    +
    + Parameters : + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    index + number + +
    +
    +
    +
    Returns : void
    +
    + +
    - Public resetForms + Public resetForms
    - + resetForms()
    - Public formArray + Public formArray
    - formArray: FormArray + formArray: FormArray
    - Public newFormGroup + Public newFormGroup
    - newFormGroup: FormGroup + newFormGroup: FormGroup
    - Public submitted + Public submitted
    - submitted: boolean + submitted: boolean
    <div class='container'>
       <h1>AngularForms</h1>
       <rb-angular-forms #angularForms [groups]="customForm" [readOnly]="false" lang="pt-BR"></rb-angular-forms>
    -  <button class="btn btn-primary" (click)="angularForms.submit(); getForm()">getForm()</button>
    -  <button class="btn btn-primary" (click)="angularForms.submit(); isValid()">isValid()</button>
    -  <button class="btn btn-primary" (click)="angularForms.submit(); getAnswersGroups()">getAnswersGroups()</button>
    -  <button class="btn btn-primary" (click)="angularForms.submit(); getAnswers()">getAnswers()</button>
    +  <button class="btn btn-primary" (click)="angularForms.submit()">submit()</button>
    +  <button class="btn btn-primary" (click)="isPristine()">isPristine()</button>
    +  <button class="btn btn-primary" (click)="isDirty()">isDirty()</button>
    +  <button class="btn btn-primary" (click)="isValid()">isValid()</button>
    +  <button class="btn btn-primary" (click)="getForm()">getForm()</button>
    +  <button class="btn btn-primary" (click)="isValid()">isValid()</button>
    +  <button class="btn btn-primary" (click)="getAnswersGroups()">getAnswersGroups()</button>
    +  <button class="btn btn-primary" (click)="getAnswers()">getAnswers()</button>
     </div>
     
    - +
    +
    + Parameters : + + + + + + + + + + + + + + + + + +
    NameTypeOptionalDescription
    demoService + DemoService + +
    +
    +

    + +

    @@ -798,12 +838,12 @@

    - Public getAnswers + Public getAnswers - + getAnswers() @@ -811,7 +851,7 @@

    - + @@ -831,12 +871,12 @@

    - Public getAnswersGroups + Public getAnswersGroups - + getAnswersGroups() @@ -844,7 +884,7 @@

    - + @@ -864,12 +904,12 @@

    - Public getForm + Public getForm - + getForm() @@ -877,7 +917,73 @@

    - + + + + + + + +
    + Returns : void + +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + Public isDirty +
    + + isDirty() +
    + +
    + +
    + Returns : void + +
    +
    + + + + + + + + + + + + @@ -897,12 +1003,12 @@

    @@ -910,7 +1016,7 @@

    @@ -937,12 +1043,12 @@

    @@ -959,7 +1065,7 @@

    @@ -971,12 +1077,12 @@

    @@ -988,7 +1094,7 @@

    @@ -1011,10 +1117,14 @@

    <div class='container'> <h1>AngularForms</h1> <rb-angular-forms #angularForms [groups]="customForm" [readOnly]="false" lang="pt-BR"></rb-angular-forms> - <button class="btn btn-primary" (click)="angularForms.submit(); getForm()">getForm()</button> - <button class="btn btn-primary" (click)="angularForms.submit(); isValid()">isValid()</button> - <button class="btn btn-primary" (click)="angularForms.submit(); getAnswersGroups()">getAnswersGroups()</button> - <button class="btn btn-primary" (click)="angularForms.submit(); getAnswers()">getAnswers()</button> + <button class="btn btn-primary" (click)="angularForms.submit()">submit()</button> + <button class="btn btn-primary" (click)="isPristine()">isPristine()</button> + <button class="btn btn-primary" (click)="isDirty()">isDirty()</button> + <button class="btn btn-primary" (click)="isValid()">isValid()</button> + <button class="btn btn-primary" (click)="getForm()">getForm()</button> + <button class="btn btn-primary" (click)="isValid()">isValid()</button> + <button class="btn btn-primary" (click)="getAnswersGroups()">getAnswersGroups()</button> + <button class="btn btn-primary" (click)="getAnswers()">getAnswers()</button> </div> `, providers: [DemoService] @@ -1035,6 +1145,14 @@

    console.log(this.angularForms.getForm()); } + public isPristine(): void { + console.log(this.angularForms.isPristine()); + } + + public isDirty(): void { + console.log(this.angularForms.isDirty()); + } + public isValid(): void { console.log(this.angularForms.isValid()); } @@ -1074,7 +1192,7 @@

    + + Public isPristine +
    + + isPristine() +
    +
    - Public isValid + Public isValid
    - + isValid()
    - +
    - Public angularForms + Public angularForms
    - angularForms: AngularFormsComponent + angularForms: AngularFormsComponent
    - +
    - Public customForm + Public customForm
    - customForm: any[] + customForm: any[]
    - +