Skip to content

Commit

Permalink
deploy: f244f0d
Browse files Browse the repository at this point in the history
  • Loading branch information
zahmo committed Aug 15, 2023
0 parents commit ffa2429
Show file tree
Hide file tree
Showing 93 changed files with 4,465 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
606 changes: 606 additions & 0 deletions 3rdpartylicenses.txt

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions assets/example-schemas/asf-array.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"schema": {
"title": "Comment",
"type": "object",
"required": [ "comments" ],
"properties": {
"comments": {
"type": "array",
"maxItems": 2,
"items": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"email": {
"title": "Email",
"type": "string",
"pattern": "^\\S+@\\S+$",
"description": "Email will be used for evil."
},
"spam": {
"title": "Spam",
"type": "boolean",
"default": true
},
"comment": {
"title": "Comment",
"type": "string",
"maxLength": 20,
"validationMessage": "Don't be greedy!"
}
},
"required": [ "name", "comment" ]
}
}
}
},
"form": [
{ "type": "help",
"helpvalue": "<h4>Array Example</h4><p>Try adding a couple of forms, reorder by drag'n'drop.</p>"
},
{ "key": "comments",
"add": "New",
"style": { "add": "btn-success" },
"items": [
"comments[].name",
"comments[].email",
{ "title": "Yes I want spam.",
"type": "checkbox",
"key": "comments[].spam",
"condition": "model.comments[arrayIndex].email"
},
{ "type": "textarea",
"key": "comments[].comment"
}
]
},
{ "title": "OK",
"type": "submit",
"style": "btn-info"
}
]
}
24 changes: 24 additions & 0 deletions assets/example-schemas/asf-basic-json-schema-type.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schema": {
"type": "object",
"title": "Types",
"properties": {
"string": {
"type": "string",
"minLength": 3
},
"integer": {
"type": "integer"
},
"number": {
"type": "number"
},
"boolean": {
"type": "boolean"
}
},
"required": [
"number"
]
}
}
65 changes: 65 additions & 0 deletions assets/example-schemas/asf-bootstrap-grid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"schema": {
"type": "object",
"title": "Comment",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"email": {
"title": "Email",
"type": "string",
"pattern": "^\\S+@\\S+$",
"description": "Email will be used for evil."
},
"comment": {
"title": "Comment",
"type": "string",
"maxLength": 20,
"validationMessage": "Don't be greedy!"
}
},
"required": [
"name",
"email",
"comment"
]
},
"form": [
{
"type": "help",
"helpvalue": "<div class=\"alert alert-info\">Grid it up with bootstrap</div>"
},
{
"type": "section",
"htmlClass": "row",
"items": [
{
"type": "section",
"htmlClass": "col-xs-6",
"items": [
"name"
]
},
{
"type": "section",
"htmlClass": "col-xs-6",
"items": [
"email"
]
}
]
},
{
"key": "comment",
"type": "textarea",
"placeholder": "Make a comment"
},
{
"type": "submit",
"style": "btn-info",
"title": "OK"
}
]
}
53 changes: 53 additions & 0 deletions assets/example-schemas/asf-complex-key-support.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"schema": {
"type": "object",
"title": "Complex Key Support",
"properties": {
"a[\"b\"].c": { "type": "string" },
"simple": {
"type": "object",
"properties": {
"prøp": {
"title": "UTF8 in both dot and bracket notation",
"type": "string"
}
}
},
"array-key": {
"type": "array",
"items": {
"type": "object",
"properties": {
"a'rr[\"l": {
"title": "Control Characters",
"type": "string"
},
"˙∆∂∞˚¬": { "type": "string" }
},
"required": [ "a'rr[\"l", "˙∆∂∞˚¬" ]
}
}
}
},
"form": [
{
"type": "help",
"helpvalue": "Complex keys are supported in Angular 2+."
},
"['a[\"b\"].c']",
{
"key": "array-key",
"items": [
"['array-key'][]['a'rr[\"l']",
{
"key": "['array-key'][]['˙∆∂∞˚¬']",
"title": "Unicode Characters"
}
]
},
{
"key": "simple",
"items": [ "simple.prøp" ]
}
]
}
41 changes: 41 additions & 0 deletions assets/example-schemas/asf-hack-conditional-required.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"schema": {
"type": "object",
"properties": {
"switch": {
"title": "Spam me, please",
"type": "boolean"
},
"email": {
"title": "Email",
"type": "string",
"pattern": "^\\S+@\\S+$",
"description": "Email will be used for evil."
}
},
"required": [
"switch"
]
},
"form": [
{
"type": "help",
"helpvalue": "<p>Schema Form does not support oneOf (yet), but you can do a workaround and simulate certain scenarios with 'condition' and 'required' (and/or 'readonly') in the form.</p>"
},
"switch",
{
"key": "email",
"condition": "model.switch",
"required": true
},
{
"key": "email",
"condition": "!model.switch"
},
{
"type": "submit",
"style": "btn-info",
"title": "OK"
}
]
}
Loading

0 comments on commit ffa2429

Please sign in to comment.