-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b9a99e
commit ce13b06
Showing
6 changed files
with
70 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
export const formSchema = { | ||
"fields":[ | ||
{ "type": "text", "name": "username", "label": "Username", "placeholder": "Enter username", "required": true }, | ||
{ "type": "date", "name": "dob", "label": "Date of Birth", "required": true }, | ||
{ "type": "checkbox", "name": "subscribe", "label": "Subscribe", "required": false }, | ||
{ "type": "radio", "name": "gender", "label": "Gender", "options": [{ "label": "Male", "value": "male" }, { "label": "Female", "value": "female" }], "required": true }, | ||
{ "type": "select", "name": "country", "label": "Country", "options": [{ "label": "USA", "value": "usa" }, { "label": "India", "value": "india" }], "required": true }, | ||
{ | ||
"type": "array", | ||
"name": "experiences", | ||
"label": "Work Experiences", | ||
"required": false, | ||
"items": [ | ||
{ | ||
"type": "text", | ||
"name": "companyName", | ||
"label": "Company Name", | ||
"required": true | ||
}, | ||
{ | ||
"type": "date", | ||
"name": "startDate", | ||
"label": "Start Date", | ||
"required": true | ||
}, | ||
{ | ||
"type": "date", | ||
"name": "endDate", | ||
"label": "End Date", | ||
"required": true | ||
}, | ||
{ | ||
"type": "select", | ||
"name": "role", | ||
"label": "Role", | ||
"options": [ | ||
{ "label": "Developer", "value": "developer" }, | ||
{ "label": "Designer", "value": "designer" }, | ||
{ "label": "Manager", "value": "manager" } | ||
], | ||
"required": true | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "date", | ||
"name": "Proposaldate", | ||
"label": "Proposal Date", | ||
"required": true | ||
}, | ||
{ "type": "radio", "name": "insurance", "label": "Global insurance companies", "options": [{ "label": "Liberty Mutual", "value": "Liberty Mutual" }, { "label": "All States", "value": "All States" },{ "label": "Farmers", "value": "Farmers" }], "required": true }, | ||
|
||
{ "type": "textarea", "name": "comments", "label": "Comments", "placeholder": "Write your comments here...","maxLength": 200, "minLength": 0, "errorMessage": "Comments must be between 0 and 200 characters.", "conditionalOn": { "field": "gender", "value": "female" } }, | ||
{ "type": "combo-box", "name": "favoriteFruit", "label": "Favorite Fruit", "placeholder": "Type or select a fruit...", "required": true, "options": [ { "label": "Apple", "value": "apple" }, { "label": "Banana", "value": "banana" }, { "label": "Cherry", "value": "cherry" } ]}, | ||
{ "type": "my-rich-text-editor", "name": "bio", "label": "Bio", "placeholder": "Write your biography..."} | ||
]} |
12 changes: 1 addition & 11 deletions
12
src/app/library-components/library-components.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
<p>library-components works!</p> | ||
<h1>from 'stenciljs-components' npm package</h1> | ||
<my-card user-name="CodingLocker"></my-card> | ||
<json-schema-form [schema]= "formSchema | json"></json-schema-form> | ||
<my-pie-chart data='[{"tag":"height","value":180},{"tag":"weight","value":75},{"tag":"age","value":30},{"tag":"score","value":95},{"tag":"yearsExperience","value":5}]'></my-pie-chart> | ||
<my-rich-text-editor initial-value="this is initial value" placeholder="angular placeholder" font-family="Arial" font-size="26pt"></my-rich-text-editor> | ||
<my-progress-bar value="2" max="10"></my-progress-bar> | ||
<my-progress-ring percentage="30"></my-progress-ring> | ||
<test-button button-id="test-button">Click me!</test-button> | ||
<test-counter>Number: </test-counter> | ||
<search-world search-text="bmw"> </search-world> | ||
<my-payment-gateway></my-payment-gateway> | ||
<my-component first="Sanjeet" last="Kumar"></my-component> | ||
<combo-box [allowInput]="true"></combo-box> | ||
<custom-form></custom-form> | ||
<custom-text-input name="my-custom-input" form-associated></custom-text-input> | ||
<my-button text="Angular Button" (myEvent)="buttonClick($event)"><h5>Hello World</h5></my-button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters