Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 00b115a

Browse files
Merge branch 'webpack-babel' into develop
2 parents cdb0b81 + 7408170 commit 00b115a

Some content is hidden

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

42 files changed

+4771
-303
lines changed

‎.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

‎README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is the new Bootstrap Decorator! That means a Bootstrap 3 frontend for the A
77
project. The former Bootstrap decorator used to be included in the main repo, but has now moved
88
here.
99

10-
The big difference is that it now uses the new builder in, for more info on the builder see
10+
The big difference is that it now uses new builder methods, for more info on the builder see
1111
[our blog](https://medium.com/@SchemaFormIO/the-new-builder-pt-1-61fadde3c678).
1212

1313
The biggest change for users is that the form no longer contains any `<bootstrap-decorator>` tags
@@ -19,16 +19,24 @@ Install
1919
bower install angular-schema-form-bootstrap
2020
```
2121
or
22-
2322
```sh
2423
npm install angular-schema-form-bootstrap
2524
```
25+
And then include `angular-schema-form-bootstrap-bundled.min.js`. **Note that angular-schema-form >= 1.0.0-alpha.1 is needed**.
2626

27-
And then include `bootstrap-decorator.min.js`. Note that angular-schema-form >= 0.8.7 is needed.
28-
27+
You **DO NOT** need to include angular-schema-form with this version, it is now **embedded** within the above file. If you wish to include the files separately you can still use `angular-schema-form-bootstrap.min.js`
2928

3029
Future
3130
------
3231
Using the new builder opens up for a lot of optimization. Primarily we can get rid of a lot of small
3332
watches by using build helpers. For instance, slapping on a `sf-changed` directive *only* if the
3433
form definition has an `onChange` option.
34+
35+
Developer Install
36+
-----------------
37+
```sh
38+
bower install
39+
npm install
40+
```
41+
Then read package.json for the available scripts.
42+
**Note** templates are compiled so the templates script must be run after changes.

‎bootstrap-decorator.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

‎bootstrap-decorator.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎bower.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"name": "angular-schema-form-bootstrap",
3+
"version": "1.0.0-alpha.1",
34
"authors": [
4-
"David Jensen (Textalk) <david.lgj@gmail.com>"
5+
"David Jensen (Textalk) <david.lgj@gmail.com>",
6+
"Marcel Bennett <iamanthropic@gmail.com>"
57
],
68
"description": "Bootstrap 3 decorator for Angular Schema Form",
7-
"main": "bootstrap-decorator.js",
9+
"main": "dist/bootstrap-decorator.js",
810
"keywords": [
911
"angular-schema-form-decorator",
1012
"json-schema",
@@ -21,7 +23,7 @@
2123
"tests"
2224
],
2325
"dependencies": {
24-
"angular-schema-form": ">= 0.8.7"
26+
"angular-schema-form": "1.0.0-alpha.2"
2527
},
2628
"devDependencies": {
2729
"angular-ui-ace": "bower",

‎dist/angular-schema-form-bootstrap-bundled.js

Lines changed: 3825 additions & 0 deletions
Large diffs are not rendered by default.

‎dist/angular-schema-form-bootstrap-bundled.min.js

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/angular-schema-form-bootstrap.js

Lines changed: 387 additions & 0 deletions
Large diffs are not rendered by default.

‎dist/angular-schema-form-bootstrap.min.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples/data/array-deep.json

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
{
2+
"schema": {
3+
"type": "object",
4+
"properties": {
5+
"transportCategory": {
6+
"type": "array",
7+
"items": {
8+
"type": "object",
9+
"properties": {
10+
"mode": { "type": "string", "enum": ["Car", "Motorbike", "Horse"] },
11+
"transportOption": {
12+
"type": "array",
13+
"items": {
14+
"type": "object",
15+
"properties": {
16+
"name": { "type": "string" },
17+
"numberOfWheels": { "type": "number" },
18+
"forSale": { "type": "string", "enum": ["yes", "no"] },
19+
"price": { "type": "number" },
20+
"history": {
21+
"type": "object",
22+
"properties": {
23+
"historyKnown": { "type": "string", "enum": ["yes", "no"] },
24+
"previousOwners": {
25+
"type": "array",
26+
"items": {
27+
"type": "object",
28+
"properties": {
29+
"ownerName": { "type": "string" },
30+
"purchaseDate": { "type": "string" },
31+
"logBookProvided": { "type": "string", "enum": ["yes", "no"] },
32+
"logBookEntry": {
33+
"type": "array",
34+
"items": {
35+
"type": "object",
36+
"properties": {
37+
"entryId": { "type": "number" },
38+
"entryDate": { "type": "string" },
39+
"entryNote": { "type": "string" }
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
}
54+
}
55+
},
56+
"form": [
57+
{
58+
"key": "transportCategory",
59+
"type": "tabarray",
60+
"add": "New",
61+
"style": {
62+
"add": "btn-success"
63+
},
64+
"title": "{{ 'Tab '+$index + ' ' + value.mode + ' ' || 'Tab' + $index }}",
65+
"items": [
66+
"transportCategory[].mode",
67+
{
68+
"key": "transportCategory[].transportOption",
69+
"items": [
70+
"transportCategory[].transportOption[].name",
71+
{
72+
"key": "transportCategory[].transportOption[].numberOfWheels",
73+
"condition": "model.transportCategory[arrayIndices[0]].mode != 'Horse'"
74+
},
75+
"transportCategory[].transportOption[].forSale",
76+
{
77+
"key": "transportCategory[].transportOption[].price",
78+
"condition": "model.transportCategory[arrayIndices[0]].transportOption[arrayIndices[1]].forSale == 'yes'"
79+
},
80+
"transportCategory[].transportOption[].history.historyKnown",
81+
{
82+
"key": "transportCategory[].transportOption[].history.previousOwners",
83+
"condition": "model.transportCategory[arrayIndices[0]].transportOption[arrayIndices[1]].history.historyKnown == 'yes'",
84+
"items": [
85+
"transportCategory[].transportOption[].history.previousOwners[].ownerName",
86+
{
87+
"key": "transportCategory[].transportOption[].history.previousOwners[].purchaseDate",
88+
"condition": "model.transportCategory[arrayIndices[0]].transportOption[arrayIndices[1]].history.previousOwners[arrayIndices[2]].ownerName.length > 2"
89+
},
90+
{
91+
"key": "transportCategory[].transportOption[].history.previousOwners[].logBookProvided",
92+
"condition": "model.transportCategory[arrayIndices[0]].mode != 'Horse' && model.transportCategory[arrayIndices[0]].transportOption[arrayIndices[1]].history.previousOwners[arrayIndices[2]].ownerName.length > 2"
93+
},
94+
{
95+
"key": "transportCategory[].transportOption[].history.previousOwners[].logBookEntry",
96+
"condition": "model.transportCategory[arrayIndices[0]].transportOption[arrayIndices[1]].history.previousOwners[arrayIndices[2]].logBookProvided == 'yes'",
97+
"items": [
98+
"transportCategory[].transportOption[].history.previousOwners[].logBookEntry[].entryId",
99+
"transportCategory[].transportOption[].history.previousOwners[].logBookEntry[].entryDate",
100+
{
101+
"key": "transportCategory[].transportOption[].history.previousOwners[].logBookEntry[].entryNote",
102+
"condition": "model.transportCategory[arrayIndices[0]].transportOption[arrayIndices[1]].history.previousOwners[arrayIndices[2]].logBookEntry[arrayIndices[3]].entryDate.length > 2"
103+
}
104+
]
105+
}
106+
]
107+
}
108+
]
109+
}
110+
]
111+
}
112+
],
113+
"model": {
114+
"transportCategory": [
115+
{
116+
"mode": "Car",
117+
"transportOption": [
118+
{
119+
"name": "Bertie",
120+
"forSale": "yes",
121+
"price": 100,
122+
"history": {
123+
"historyKnown": "no"
124+
}
125+
},
126+
{
127+
"name": "Lightning McQueen",
128+
"forSale": "no",
129+
"history": {
130+
"historyKnown": "yes",
131+
"previousOwners": [
132+
{
133+
"ownerName": ""
134+
},
135+
{
136+
"ownerName": "Arlo",
137+
"logBookProvided": "yes",
138+
"logBookEntry": [
139+
{
140+
"entryId": 2,
141+
"entryDate": "2015年06月23日"
142+
},
143+
{
144+
"entryId": 4
145+
}
146+
]
147+
}
148+
]
149+
}
150+
}
151+
]
152+
},
153+
{
154+
"mode": "Horse",
155+
"transportOption": [
156+
{
157+
"name": "Phar Lap",
158+
"forSale": "no"
159+
},
160+
{
161+
"name": "Greyhound",
162+
"forSale": "yes",
163+
"price": 1000,
164+
"history": {
165+
"historyKnown": "yes",
166+
"previousOwners": [
167+
{
168+
"ownerName": "Tom"
169+
}
170+
]
171+
}
172+
}
173+
]
174+
}
175+
]
176+
}
177+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /