Skip to content

Commit 9ba5365

Browse files
committed
Add validator-class, validation-error, validation-result, black-list-func, contains-func, custom-validator-func, ends-with-func, is-lpha-func components
1 parent 2a5a4e4 commit 9ba5365

33 files changed

Lines changed: 1089 additions & 15 deletions
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
<a [routerLink]="post.route" routerLinkActive="active" class="nav-link">
2-
{{post.title}}
2+
<ng-container *ngIf="post.isCode; else nonCode">
3+
<span><code>{{post.title}}</code></span>
4+
</ng-container>
5+
<ng-template #nonCode>{{post.title}}</ng-template>
36
</a>

src/app/shared/data/versions.data.ts

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,131 @@ export const Versions: IVersion[] = [
111111
]
112112
}
113113
]
114+
},
115+
{
116+
title: "Validation",
117+
posts: [
118+
{
119+
id: "black-list-func",
120+
title: ".BlackList()",
121+
isCode: true,
122+
route: resolveRoute(VERSIONS["1.0.0"], "black-list-func"),
123+
sections: [
124+
{
125+
id: "definition",
126+
title: "Definition"
127+
},
128+
{
129+
id: "examples",
130+
title: "Examples"
131+
},
132+
{
133+
id: "example1",
134+
title: "Example 1"
135+
},
136+
{
137+
id: "example2",
138+
title: "Example 2"
139+
}
140+
]
141+
},
142+
{
143+
id: "contains-func",
144+
title: ".Contains()",
145+
isCode: true,
146+
route: resolveRoute(VERSIONS["1.0.0"], "contains-func"),
147+
sections: [
148+
{
149+
id: "definitions",
150+
title: "Definitions"
151+
},
152+
{
153+
id: "examples",
154+
title: "Examples"
155+
},
156+
{
157+
id: "example1",
158+
title: "Example 1"
159+
},
160+
{
161+
id: "example2",
162+
title: "Example 2"
163+
}
164+
]
165+
},
166+
{
167+
id: "custom-validator-func",
168+
title: ".CustomValidator()",
169+
isCode: true,
170+
route: resolveRoute(VERSIONS["1.0.0"], "custom-validator-func"),
171+
sections: [
172+
{
173+
id: "definitions",
174+
title: "Definitions"
175+
},
176+
{
177+
id: "examples",
178+
title: "Examples"
179+
},
180+
{
181+
id: "example1",
182+
title: "Example 1"
183+
},
184+
{
185+
id: "example2",
186+
title: "Example 2"
187+
}
188+
]
189+
},
190+
{
191+
id: "ends-with-func",
192+
title: ".EndsWith()",
193+
isCode: true,
194+
route: resolveRoute(VERSIONS["1.0.0"], "ends-with-func"),
195+
sections: [
196+
{
197+
id: "definition",
198+
title: "Definition"
199+
},
200+
{
201+
id: "examples",
202+
title: "Examples"
203+
},
204+
{
205+
id: "example1",
206+
title: "Example 1"
207+
},
208+
{
209+
id: "example2",
210+
title: "Example 2"
211+
}
212+
]
213+
},
214+
{
215+
id: "is-alpha-func",
216+
title: ".IsAlpha()",
217+
isCode: true,
218+
route: resolveRoute(VERSIONS["1.0.0"], "is-alpha-func"),
219+
sections: [
220+
{
221+
id: "definition",
222+
title: "Definition"
223+
},
224+
{
225+
id: "examples",
226+
title: "Examples"
227+
},
228+
{
229+
id: "example1",
230+
title: "Example 1"
231+
},
232+
{
233+
id: "example2",
234+
title: "Example 2"
235+
}
236+
]
237+
},
238+
]
114239
}
115240
]
116241
}

src/app/shared/models/post-section-item.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface IPostSectionItem {
1515
title: string;
1616

1717
/**
18-
* Indicates whether is the title property is a code or not
18+
* Indicates whether is the title property is a code or not.
1919
*/
2020
isCode?: boolean;
2121
}

src/app/shared/models/post.model.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ export interface IPost {
1414
*/
1515
title: string;
1616

17+
/**
18+
* Indicates whether is the title property is a code or not.
19+
*/
20+
isCode?: boolean;
21+
1722
/**
1823
* The full route of the post.
1924
*/
Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,43 @@
1-
import {GettingStartedComponent} from "./getting-started/getting-started.component";
2-
import {ValidatorClassComponent} from "./validator-class/validator-class.component";
3-
import {ValidationErrorClassComponent} from "./validation-error-class/validation-error-class.component";
4-
import {ValidationResultClassComponent} from "./validation-result-class/validation-result-class.component";
1+
/* Introduction */
2+
import {GettingStartedComponent} from "./introduction/getting-started/getting-started.component";
53

6-
export * from "./getting-started/getting-started.component";
7-
export * from "./validator-class/validator-class.component";
8-
export * from "./validation-error-class/validation-error-class.component";
9-
export * from "./validation-result-class/validation-result-class.component";
4+
/* Name-Space */
5+
import {ValidatorClassComponent} from "./name-space/validator-class/validator-class.component";
6+
import {ValidationErrorClassComponent} from "./name-space/validation-error-class/validation-error-class.component";
7+
import {ValidationResultClassComponent} from "./name-space/validation-result-class/validation-result-class.component";
8+
9+
/* Validation */
10+
import {BlackListFuncComponent} from "./validation/black-list-func/black-list-func.component";
11+
import {ContainsFuncComponent} from "./validation/contains-func/contains-func.component";
12+
import {CustomValidatorFuncComponent} from "./validation/custom-validator-func/custom-validator-func.component";
13+
import {EndsWithFuncComponent} from "./validation/ends-with-func/ends-with-func.component";
14+
import {IsAlphaFuncComponent} from "./validation/is-alpha-func/is-alpha-func.component";
15+
16+
/* Introduction */
17+
export * from "./introduction/getting-started/getting-started.component";
18+
19+
/* Name-Space */
20+
export * from "./name-space/validator-class/validator-class.component";
21+
export * from "./name-space/validation-error-class/validation-error-class.component";
22+
export * from "./name-space/validation-result-class/validation-result-class.component";
23+
24+
/* Validation */
25+
export * from "./validation/black-list-func/black-list-func.component";
26+
export * from "./validation/contains-func/contains-func.component";
27+
export * from "./validation/custom-validator-func/custom-validator-func.component";
28+
export * from "./validation/ends-with-func/ends-with-func.component";
29+
export * from "./validation/is-alpha-func/is-alpha-func.component";
1030

1131
export const COMPONENTS: any[] = [
1232
GettingStartedComponent,
33+
1334
ValidatorClassComponent,
1435
ValidationErrorClassComponent,
15-
ValidationResultClassComponent
36+
ValidationResultClassComponent,
37+
38+
BlackListFuncComponent,
39+
ContainsFuncComponent,
40+
CustomValidatorFuncComponent,
41+
EndsWithFuncComponent,
42+
IsAlphaFuncComponent
1643
];

src/app/version1.0.0/components/getting-started/getting-started.component.html renamed to src/app/version1.0.0/components/introduction/getting-started/getting-started.component.html

File renamed without changes.

src/app/version1.0.0/components/getting-started/getting-started.component.sass renamed to src/app/version1.0.0/components/introduction/getting-started/getting-started.component.sass

File renamed without changes.

src/app/version1.0.0/components/getting-started/getting-started.component.ts renamed to src/app/version1.0.0/components/introduction/getting-started/getting-started.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Component, OnInit} from "@angular/core";
2-
import {IPost, DocService} from "../../../shared";
2+
import {IPost, DocService} from "../../../../shared";
33

44
@Component({
55
selector: "app-getting-started",

src/app/version1.0.0/components/validation-error-class/validation-error-class.component.html renamed to src/app/version1.0.0/components/name-space/validation-error-class/validation-error-class.component.html

File renamed without changes.

src/app/version1.0.0/components/validation-error-class/validation-error-class.component.sass renamed to src/app/version1.0.0/components/name-space/validation-error-class/validation-error-class.component.sass

File renamed without changes.

0 commit comments

Comments
 (0)