Skip to content

Commit a965714

Browse files
authored
Merge pull request #34 from robust-team/developer
v1.2.0
2 parents a66d3de + 0ddaf2d commit a965714

68 files changed

Lines changed: 3247 additions & 386 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
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.
44

5+
<a name="1.2.0"></a>
6+
## [1.2.0](https://github.com/robust-team/angular-forms/compare/v1.1.0...v1.2.0) (2017-09-22)
7+
8+
### Features
9+
10+
* Addition of **isPristine** and **isDirty** methods.
11+
512
<a name="1.1.0"></a>
613
## [1.1.0](https://github.com/robust-team/angular-forms/compare/v1.0.1...v1.1.0) (2017-09-21)
714

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ Example output:
238238
| Method | Function |
239239
|-|-|
240240
| **isValid()** | Returns the status of form. |
241+
| **isPristine()** | Returns if the user has not yet changed some value in the form. |
242+
| **isDirty()** | Returns if the user has changed some value in the form. |
241243
| **getAnswersGroups()** | Returns only the answers grouped in yours respective Groups. |
242244
| **getAnswers()** | Returns only the answers of simple Questions and of DataTables (that is considered a Question). |
243245
| **getForm()** | Returns an object with two attributes: **valid** (return of **isValid** method) and **value** (return of **getAnswersGroups** method. |

demo/demo.component.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ import { AngularFormsComponent } from '../src';
99
<div class='container'>
1010
<h1>AngularForms</h1>
1111
<rb-angular-forms #angularForms [groups]="customForm" [readOnly]="false" lang="pt-BR"></rb-angular-forms>
12-
<button class="btn btn-primary" (click)="angularForms.submit(); getForm()">getForm()</button>
13-
<button class="btn btn-primary" (click)="angularForms.submit(); isValid()">isValid()</button>
14-
<button class="btn btn-primary" (click)="angularForms.submit(); getAnswersGroups()">getAnswersGroups()</button>
15-
<button class="btn btn-primary" (click)="angularForms.submit(); getAnswers()">getAnswers()</button>
12+
<button class="btn btn-primary" (click)="angularForms.submit()">submit()</button>
13+
<button class="btn btn-primary" (click)="isPristine()">isPristine()</button>
14+
<button class="btn btn-primary" (click)="isDirty()">isDirty()</button>
15+
<button class="btn btn-primary" (click)="isValid()">isValid()</button>
16+
<button class="btn btn-primary" (click)="getForm()">getForm()</button>
17+
<button class="btn btn-primary" (click)="isValid()">isValid()</button>
18+
<button class="btn btn-primary" (click)="getAnswersGroups()">getAnswersGroups()</button>
19+
<button class="btn btn-primary" (click)="getAnswers()">getAnswers()</button>
1620
</div>
1721
`,
1822
providers: [DemoService]
@@ -33,6 +37,14 @@ export class DemoComponent implements OnInit {
3337
console.log(this.angularForms.getForm());
3438
}
3539

40+
public isPristine(): void {
41+
console.log(this.angularForms.isPristine());
42+
}
43+
44+
public isDirty(): void {
45+
console.log(this.angularForms.isDirty());
46+
}
47+
3648
public isValid(): void {
3749
console.log(this.angularForms.isValid());
3850
}

docs/changelog.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,12 @@
631631

632632
<h1 id="change-log">Change Log</h1>
633633
<p>All notable changes to this project will be documented in this file. See <a href="https://github.com/conventional-changelog/standard-version">standard-version</a> for commit guidelines.</p>
634+
<p><a name="1.2.0"></a></p>
635+
<h2 id="-1-2-0-https-github-com-robust-team-angular-forms-compare-v1-1-0-v1-2-0-2017-09-22-"><a href="https://github.com/robust-team/angular-forms/compare/v1.1.0...v1.2.0">1.2.0</a> (2017-09-22)</h2>
636+
<h3 id="features">Features</h3>
637+
<ul>
638+
<li>Addition of <strong>isPristine</strong> and <strong>isDirty</strong> methods.</li>
639+
</ul>
634640
<p><a name="1.1.0"></a></p>
635641
<h2 id="-1-1-0-https-github-com-robust-team-angular-forms-compare-v1-0-1-v1-1-0-2017-09-21-"><a href="https://github.com/robust-team/angular-forms/compare/v1.0.1...v1.1.0">1.1.0</a> (2017-09-21)</h2>
636642
<h3 id="features">Features</h3>

docs/classes/AngularForms.html

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,13 +698,13 @@ <h3 id="methods">
698698
<tr>
699699
<td class="col-md-4">
700700
<a name="fromJson"></a>
701-
<b><span class="modifier">Public</span> fromJson</b>
701+
<span class="name"><b><span class="modifier">Public</span> fromJson</b><a href="#fromJson"><span class="fa fa-link"></span></a></span>
702702
</td>
703703
</tr>
704704
<tr>
705705
<td class="col-md-4">
706-
<span class="modifier-icon method fa fa-play "></span>
707-
<code>fromJson(jsonGroups: [])</code>
706+
<span class="modifier-icon fa fa-reset"></span>
707+
<code>fromJson(jsonGroups: <a href="../classes/Group.html">Group[]</a>)</code>
708708
</td>
709709
</tr>
710710

@@ -718,10 +718,39 @@ <h3 id="methods">
718718
<tr>
719719
<td class="col-md-4">
720720

721+
<div class="io-description">
722+
<b>Parameters :</b>
723+
<table class="params">
724+
<thead>
725+
<tr>
726+
<td>Name</td>
727+
<td>Type</td>
728+
<td>Optional</td>
729+
<td>Description</td>
730+
</tr>
731+
</thead>
732+
<tbody>
733+
<tr>
734+
<td>jsonGroups</td>
735+
<td>
736+
<code><a href="../classes/Group.html" target="_self" >Group[]</a></code>
737+
</td>
738+
<td>
739+
</td>
740+
<td></td>
741+
</tr>
742+
</tbody>
743+
</table>
744+
</div>
745+
<div>
746+
</div>
721747
<div class="io-description">
722748
<b>Returns : </b> <code>[]</code>
723749

724750
</div>
751+
<div class="io-description">
752+
753+
</div>
725754
</td>
726755
</tr>
727756
</tbody>

docs/classes/AngularFormsTranslateLoader.html

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,12 +704,12 @@ <h3 id="methods">
704704
<tr>
705705
<td class="col-md-4">
706706
<a name="getTranslation"></a>
707-
<b><span class="modifier">Public</span> getTranslation</b>
707+
<span class="name"><b><span class="modifier">Public</span> getTranslation</b><a href="#getTranslation"><span class="fa fa-link"></span></a></span>
708708
</td>
709709
</tr>
710710
<tr>
711711
<td class="col-md-4">
712-
<span class="modifier-icon method fa fa-play "></span>
712+
<span class="modifier-icon fa fa-reset"></span>
713713
<code>getTranslation(lang: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>)</code>
714714
</td>
715715
</tr>
@@ -724,10 +724,39 @@ <h3 id="methods">
724724
<tr>
725725
<td class="col-md-4">
726726

727+
<div class="io-description">
728+
<b>Parameters :</b>
729+
<table class="params">
730+
<thead>
731+
<tr>
732+
<td>Name</td>
733+
<td>Type</td>
734+
<td>Optional</td>
735+
<td>Description</td>
736+
</tr>
737+
</thead>
738+
<tbody>
739+
<tr>
740+
<td>lang</td>
741+
<td>
742+
<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
743+
</td>
744+
<td>
745+
</td>
746+
<td></td>
747+
</tr>
748+
</tbody>
749+
</table>
750+
</div>
751+
<div>
752+
</div>
727753
<div class="io-description">
728754
<b>Returns : </b> <code>Observable&lt;any&gt;</code>
729755

730756
</div>
757+
<div class="io-description">
758+
759+
</div>
731760
</td>
732761
</tr>
733762
</tbody>

0 commit comments

Comments
 (0)