Skip to content

Commit 459652f

Browse files
committed
Merge for alpha release
2 parents 52a3011 + 064e9d2 commit 459652f

Some content is hidden

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

47 files changed

+1857
-488
lines changed

.gitignore

+102
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,105 @@
1+
# Created by https://www.gitignore.io/api/osx,windows,phpstorm
2+
3+
### OSX ###
4+
.DS_Store
5+
.AppleDouble
6+
.LSOverride
7+
8+
# Icon must end with two \r
9+
Icon
10+
11+
12+
# Thumbnails
13+
._*
14+
15+
# Files that might appear in the root of a volume
16+
.DocumentRevisions-V100
17+
.fseventsd
18+
.Spotlight-V100
19+
.TemporaryItems
20+
.Trashes
21+
.VolumeIcon.icns
22+
23+
# Directories potentially created on remote AFP share
24+
.AppleDB
25+
.AppleDesktop
26+
Network Trash Folder
27+
Temporary Items
28+
.apdisk
29+
30+
31+
### Windows ###
32+
# Windows image file caches
33+
Thumbs.db
34+
ehthumbs.db
35+
36+
# Folder config file
37+
Desktop.ini
38+
39+
# Recycle Bin used on file shares
40+
$RECYCLE.BIN/
41+
42+
# Windows Installer files
43+
*.cab
44+
*.msi
45+
*.msm
46+
*.msp
47+
48+
# Windows shortcuts
49+
*.lnk
50+
51+
52+
### PhpStorm ###
53+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
54+
55+
*.iml
56+
57+
## Directory-based project format:
58+
.idea/
59+
# if you remove the above rule, at least ignore the following:
60+
61+
# User-specific stuff:
62+
# .idea/workspace.xml
63+
# .idea/tasks.xml
64+
# .idea/dictionaries
65+
66+
# Sensitive or high-churn files:
67+
# .idea/dataSources.ids
68+
# .idea/dataSources.xml
69+
# .idea/sqlDataSources.xml
70+
# .idea/dynamic.xml
71+
# .idea/uiDesigner.xml
72+
73+
# Gradle:
74+
# .idea/gradle.xml
75+
# .idea/libraries
76+
77+
# Mongo Explorer plugin:
78+
# .idea/mongoSettings.xml
79+
80+
## File-based project format:
81+
*.ipr
82+
*.iws
83+
84+
## Plugin-specific files:
85+
86+
# IntelliJ
87+
/out/
88+
89+
# mpeltonen/sbt-idea plugin
90+
.idea_modules/
91+
92+
# JIRA plugin
93+
atlassian-ide-plugin.xml
94+
95+
# Crashlytics plugin (for Android Studio and IntelliJ)
96+
com_crashlytics_export_strings.xml
97+
crashlytics.properties
98+
crashlytics-build.properties
99+
100+
1101
bower_components
2102
node_modules
3103

104+
material-decorator.js
105+
material-decorator.min.js

.jscsrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"preset": "google",
3+
"disallowSpacesInsideObjectBrackets": null,
4+
"requireSpacesInsideObjectBrackets": {
5+
"allExcept": [ "[", "]", "{", "}" ]
6+
},
7+
"disallowSpacesInsideArrayBrackets": null,
8+
"requireSpacesInsideArrayBrackets": {
9+
"allExcept": [ "[", "]", "{", "}" ]
10+
},
11+
"disallowKeywordsOnNewLine": [ ],
12+
"disallowMultipleVarDecl": null,
13+
"maximumLineLength": 120,
14+
"requireSemicolons": true
15+
}

CONTRIBUTING.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Contributing
2+
------------
3+
We love contributions!
4+
5+
Contact @davidlgj or @Anthropic to ensure you don't work on something already in progress!
6+
7+
A few things to note:
8+
* Error messages are not handled in the standard Angular Material way due to ASF behaviour.
9+
To add messages to a template add **sf-messages** to the **parent** you want messages to be the last child of.
10+
* Look at the API page for the Angular Material component you are looking at, there are possibly a few attributes
11+
not used in the demo that may be useful. Please try to add as many useful attributes as you can, we can discuss the
12+
best way to implement them in the ASF form data.
13+
14+
As an example, if the template requires a remote titleMap, consider adding optionData as a variable in the form definition that can contain a text string reference to a variable on the sf-form $scope.
15+
16+
**Please base any merge request on the *development* branch instead of *master*.**
17+
18+
The reason for this is that we're only really using *development* for now but will eventually start trying to use
19+
[git flow](http://danielkummer.github.io/git-flow-cheatsheet/), and it makes merging your pull
20+
request a heck of a lot easier for us.
21+
22+
Please **avoid including the material-decorator.js or material-decorator.min.js** as that can make merging harder, and we
23+
will always generate these files when we make a new release.
24+
25+
With new features we love to see updates to the docs as well as tests, that makes it super
26+
easy and fast for us to merge it!
27+
28+
Also consider running any code through the **JavaScript Code Style** checker [jscs](https://github.com/mdevils/node-jscs)
29+
(or even better use it in your editor) using the .jscsrc file in the repo root, which should be picked up by the IDE. You can also us `gulp jscs` to
30+
check your code.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 JSON Schema Form
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+36-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
Angular Material Decorator
22
==========================
33

4-
For https://github.com/Textalk/angular-schema-form
4+
[![Join the chat at https://gitter.im/json-schema-form/angular-schema-form-material](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/json-schema-form/angular-schema-form-material?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
55

6+
For https://github.com/json-schema-form/angular-schema-form
67

7-
Very very very much work in progress.
8+
Work In Progress
9+
----------------
10+
As Angular Material has not reached 1.0.0 yet, this decorator is progressing very cautiously until that project hits it's stable milestone.
811

12+
Meaning that it is **very** much a **work in progress**.
13+
14+
Testing
15+
------------
916
To test clone repo and:
1017
```
1118
npm install
@@ -20,7 +27,30 @@ There is also a `gulp watch` task that minifys on change.
2027

2128
Known Issues
2229
------------
23-
* Almost nothing work
24-
* Only inputs and textare are implemented
25-
* No angular material "theme". Looks like an issue with us using $compile in the link function of
26-
our directives.
30+
* Almost nothing works if the schema uses bootstrap decorator features, it does not have array or complex keys yet and many other features are still missing or have no equivalent.
31+
* Needs development branch of angular schema form.
32+
* Only basic support for inputs, textarea, radios, radiobuttons, checkboxes, datepicker and tabs are implemented.
33+
* Angular material theme only works when `$mdThemingProvider.alwaysWatchTheme(true);` is used.
34+
* Until Angular Material hits 1.0.0 there is still chances that features may break again.
35+
36+
Contributing
37+
------------
38+
Contributions are welcome! Please see [Contributing.md](CONTRIBUTING.md) for more info.
39+
40+
Future
41+
------
42+
Using the new builder opens up for a lot of optimization. Primarily we can get rid of a lot of small
43+
watches by using build helpers. For instance, slapping on a `sf-changed` directive *only* if the
44+
form definition has an `onChange` option.
45+
46+
47+
Testing
48+
-------
49+
```
50+
npm install -g protractor
51+
protractor test/protractor/conf.js
52+
```
53+
54+
change baseurl in test/protractor/conf.js to match ur local environment.
55+
56+
Copyright (c) 2016 Marcel John Bennett, David Jensen

bower.json

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
{
22
"name": "angular-schema-form-material",
3-
"version": "1.0.0",
3+
"version": "1.0.0-alpha.1",
44
"authors": [
5-
"David Jensen <david.lgj@gmail.com>"
5+
"Marcel Bennett <iamanthropic@gmail.com>"
66
],
77
"description": "Angular Material decorator for Angular Schema Form",
8-
"main": "material-decorator.min.js",
8+
"main": "material-decorator.js",
99
"keywords": [
10-
"angular-schema-form-decorator"
10+
"angular-schema-form-decorator",
11+
"angular material",
12+
"material design",
13+
"json-schema-form"
1114
],
1215
"license": "MIT",
13-
"homepage": "schemaform.io",
16+
"homepage": "https://github.com/json-schema-form/angular-schema-form-material",
1417
"ignore": [
1518
"**/.*",
1619
"node_modules",
@@ -19,16 +22,18 @@
1922
"tests"
2023
],
2124
"dependencies": {
22-
"angular-schema-form": "~0.8.2",
23-
"angular": "1.4",
24-
"angular-material": "master",
25+
"angular-schema-form": ">=0.8.13",
26+
"angular": "1.5.5",
27+
"angular-material": "1.0.7",
2528
"angular-animate": "1.4",
2629
"angular-sanitize": "1.4"
2730
},
28-
"resolutions": {
29-
"angular": "^1.3.0 || >1.4.0-beta.0"
30-
},
3131
"devDependencies": {
32-
"angular-ui-ace": "~0.2.3"
32+
"angular-ui-ace": "~0.2.3",
33+
"moment": "~2.10.6"
34+
},
35+
"resolutions": {
36+
"angular-material": "^1.0.7",
37+
"angular": "^1.5.5"
3338
}
3439
}

examples/data/autocomplete.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"schema": {
3+
"type": "object",
4+
"title": "Arnold Schwarzenegger",
5+
"properties": {
6+
"first": {
7+
"title": "What is your favourite Schwarzenegger movie?",
8+
"type": "object"
9+
},
10+
"second": {
11+
"title": "What is your favourite Schwarzenegger movie?",
12+
"type": "object"
13+
}
14+
}
15+
},
16+
"form": [
17+
{
18+
"key": "first",
19+
"type": "autocomplete",
20+
"optionFilter": "querySearch"
21+
},
22+
{
23+
"type": "help",
24+
"helpvalue": "I only need at least 1 character"
25+
},
26+
{
27+
"title": "What is your second favourite Schwarzenegger movie?",
28+
"key": "second",
29+
"type": "autocomplete",
30+
"optionFilter": "querySearch",
31+
"minLength": 4
32+
},
33+
{
34+
"type": "help",
35+
"helpvalue": "I need at least 4 non-space characters"
36+
},
37+
{
38+
"type": "submit",
39+
"style": "btn-info",
40+
"title": "OK"
41+
}
42+
]
43+
}

0 commit comments

Comments
 (0)