Skip to content

Commit 59e4e2c

Browse files
committed
Merge remote-tracking branch 'origin/development' into development
2 parents cbdcdef + 8b6b008 commit 59e4e2c

File tree

9 files changed

+84
-65
lines changed

9 files changed

+84
-65
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
Only include sections relevant to your issue.
3+
4+
If you have not read docs/support.md and followed its guidance you may be ignored or closed without response.
5+
6+
Please use PREVIEW before you submit!!
7+
-->
8+
#### Enhancement
9+
As a user/developer, when I ... I should be able to ...
10+
11+
#### Expected behaviour
12+
I expected ...
13+
14+
#### Actual behaviour
15+
It actually ...
16+
17+
#### Gist/Plunker/Demo
18+
[Description](url)
19+
20+
#### Related issues
21+
This is/maybe related to ...
22+
23+
@json-schema-form/angular-schema-form-lead

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
####Description
2+
3+
Add your description here
4+
5+
####Fixes Related issues
6+
- add related
7+
- issues here
8+
9+
####Checklist
10+
- [ ] I have read and understand the CONTRIBUTIONS.md file
11+
- [ ] I have searched for and linked related issues
12+
- [ ] I have created test cases to ensure quick resolution of the PR is easier
13+
- [ ] I am NOT targeting main branch
14+
- [ ] I did NOT include the dist folder in my PR
15+
16+
@json-schema-form/angular-schema-form-lead

README.md

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -9,71 +9,14 @@ Angular Schema Form
99

1010
Generate forms from JSON schemas using AngularJS!
1111

12-
Recent developments
13-
===================
14-
First, as there has been a rather intensive period of planning and change for this project, there have been important new developments for the project.
15-
Lets get into those first(the normal front page continues below):
16-
17-
The json-schema-form standard
18-
-----------------------------
19-
A standard, json-schema-form, is being created.
20-
21-
The concept of combining data, JSON Schema and a form definition, is something that isn't just usable in a JavaScript Angular web application, but in any framework, on any platform.
22-
Current ports are [angular-schema-form](https://github.com/json-schema-form/angular-schema-form) and [react-schema-form](https://github.com/networknt/react-schema-form), but delphi-schema-form and laravel-schema-form are planned as well.
23-
To make these ports easier to do, and for everything to work in harmony, a common ground has to be established, a [standard](https://github.com/json-schema-form/json-schema-form).
24-
25-
Organisational
26-
--------------
27-
1. ASF has changed into using a more open governance model. This basically means that ASF is now governed by more people.
28-
2. An umbrella organisaton, json-schema-form, has been formed. As you can see, this repo is now a part of that Github organisation, not Textalk.
29-
30-
Projects
31-
--------
32-
After a phase of planning, the following list of projects has been decided upon:
33-
https://github.com/json-schema-form/json-schema-form/wiki/Current-projects
34-
35-
Release 1.0
36-
-----------
37-
The next major release of ASF will be 1.0.
38-
39-
The goal for that version is to include the breaking changes that is needed for future developments, like *Of and local $refs:
40-
41-
* Break out the non-framework specific parts of ASF into a vanilla ES6 module
42-
* Remove the built-in bootstrap decorator, and in doing that require that users wanting to use that load that separately. The reason obviously being the material decorator.
43-
44-
The reason for the core break out is for all javascript-based ports of the json-schema-form concept to be able to share the same central code base.
45-
Work in that direction is being done in the [json-schema-form-core](https://github.com/json-schema-form/json-schema-form-core) repository.
46-
47-
Schema builder UI
48-
-----------------
49-
There is now a UI for building schemas and forms being developed at [json-schema-builder repository](https://github.com/json-schema-form/json-schema-builder).
50-
51-
Ralphael Owino (main author), has a [demo up already](http://ralphowino.github.io/schema-form-builder/#/builder).
52-
53-
Schema and form repository
54-
--------------------------
55-
This is now a [repository with template schemas and forms](https://github.com/json-schema-form/json-schema-form-repository).
56-
So far all the [schema.org types](http://schema.org/docs/full.html) has been converted to JSON schema approximations, and also some has been further resolved and had (huge) forms generated. Schema.org is *big*.
57-
58-
Documentation
59-
-------------
60-
The documentation is evolving, and it is happening mostly on the wiki:
61-
* [The ASF wiki](https://github.com/json-schema-form/angular-schema-form/wiki)
62-
* [The wiki of the json-schema-form organisation](https://github.com/json-schema-form/json-schema-form/wiki)
63-
64-
New Gitter rooms
65-
----------------
66-
These are just started.
67-
* Discussions on the [general json-schema-form projects being carried out](https://gitter.im/json-schema-form/json-schema-form-projects)
68-
* Discussions on the [angular-specific ASF projects](https://gitter.im/json-schema-form/angular-schema-form-projects)
69-
70-
7112
The Blog / The Web Site / The Twitter / The Movie
7213
=================================================
7314
[medium.com/@SchemaFormIO](https://medium.com/@SchemaFormIO) / [schemaform.io](http://schemaform.io) / [@SchemaFormIO](http://twitter.com/SchemaFormIO) / [Movie](https://www.youtube.com/watch?v=duBFMipRq2o)
7415

7516
If you use ASF in your project/company please let us know! We'd love to feature you on the site.
7617

18+
There has been some recent developments in this project that you might want to [read about](https://github.com/json-schema-form/angular-schema-form/wiki/Recent-developments).
19+
7720
Demo Time!
7821
==========
7922
[Try out the example page](http://schemaform.io/examples/bootstrap-example.html). Try editing the schema or form definition and see what comes out!

docs/support.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Support
2+
=============
3+
4+
### Creating an issue
5+
- We are an **open source project** and our members devote their **personal time** to try to help. As it could be time spent doing development **please try not to waste their time** with poorly written issues.
6+
- Please search for related issues and reference anything that may be related to help us resolve your issue.
7+
- Be sure you have properly read the documentation and understand the main concepts of ASF: https://github.com/json-schema-form/angular-schema-form/blob/development/docs/index.md
8+
- Remember that you can **test** schemas and forms at http://schemaform.io/examples/bootstrap-example.html
9+
- If applicable, **always provide a running example**, like a gist or a plunker, do not put code into the issue unless it is really basic and not more than a few lines formatted using markdown code blocks.
10+
- **You can create a Gist from the example page.** It helps us to help you!
11+
- You will not get a constructive response if the question is poorly described and not formatted to be readable.
12+
- Items tagged as needing something "need: ..." will be closed unless we get a response within 2 weeks so please check back even if you don't get a notification email.
13+
- You are always welcome to re-open a closed issue, we prefer that to opening a new one for the same thing.
14+
15+
### Gitter
16+
All of our projects have Gitter, please ensure you discuss your problem in the apprpriate Gitter or you may not get a quick response to your problem.
17+
18+
We are **NOT** available for basic JavaScript support, please use Stack Overflow or similar support sites for basic support.
19+
20+

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262
"licenses": [
6363
{
6464
"type": "MIT",
65-
"url": "https://raw.githubusercontent.com/Textalk/angular-schema-form/master/LICENSE"
65+
"url": "https://raw.githubusercontent.com/json-schema-form/angular-schema-form/master/LICENSE"
6666
}
6767
],
6868
"autoupdate": {
6969
"source": "git",
70-
"target": "git://github.com/Textalk/angular-schema-form.git",
70+
"target": "git://github.com/json-schema-form/angular-schema-form.git",
7171
"basePath": "/dist/",
7272
"files": [
7373
"schema-form.min.js",

src/directives/field.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,20 @@ angular.module('schemaForm').directive('sfField',
161161
// It looks better with dot notation.
162162
scope.$on(
163163
'schemaForm.error.' + form.key.join('.'),
164-
function(event, error, validationMessage, validity) {
164+
function(event, error, validationMessage, validity, formName) {
165+
// validationMessage and validity are mutually exclusive
166+
formName = validity;
165167
if (validationMessage === true || validationMessage === false) {
166168
validity = validationMessage;
167169
validationMessage = undefined;
168170
}
169171

172+
// If we have specified a form name, and this model is not within
173+
// that form, then leave things be.
174+
if(formName != undefined && scope.ngModel.$$parentForm.$name !== formName) {
175+
return;
176+
}
177+
170178
if (scope.ngModel && error) {
171179
if (scope.ngModel.$setDirty) {
172180
scope.ngModel.$setDirty();

src/services/builder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ angular.module('schemaForm').provider('sfBuilder', ['sfPathProvider', function(s
133133
var items = args.fieldFrag.querySelector('[schema-form-array-items]');
134134
if (items) {
135135
state = angular.copy(args.state);
136-
state.keyRedaction = state.keyRedaction || 0;
136+
state.keyRedaction = 0;
137137
state.keyRedaction += args.form.key.length + 1;
138138

139139
// Special case, an array with just one item in it that is not an object.

src/services/decorators.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,20 @@ angular.module('schemaForm').provider('schemaFormDecorators',
229229
// It looks better with dot notation.
230230
scope.$on(
231231
'schemaForm.error.' + form.key.join('.'),
232-
function(event, error, validationMessage, validity) {
232+
function(event, error, validationMessage, validity, formName) {
233+
// validationMessage and validity are mutually exclusive
234+
formName = validity;
233235
if (validationMessage === true || validationMessage === false) {
234236
validity = validationMessage;
235237
validationMessage = undefined;
236238
}
237239

240+
// If we have specified a form name, and this model is not within
241+
// that form, then leave things be.
242+
if(formName != undefined && scope.ngModel.$$parentForm.$name !== formName) {
243+
return;
244+
}
245+
238246
if (scope.ngModel && error) {
239247
if (scope.ngModel.$setDirty) {
240248
scope.ngModel.$setDirty();

src/services/schema-form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ angular.module('schemaForm').provider('schemaForm',
168168
if (stripNullType(schema.type) === 'object') {
169169
var f = stdFormObj(name, schema, options);
170170
f.type = 'fieldset';
171+
f.key = options.path;
171172
f.items = [];
172173
options.lookup[sfPathProvider.stringify(options.path)] = f;
173174

@@ -386,7 +387,7 @@ angular.module('schemaForm').provider('schemaForm',
386387
if (obj.type === 'checkbox' && angular.isUndefined(obj.schema['default'])) {
387388
obj.schema['default'] = false;
388389
}
389-
390+
390391
// Special case: template type with tempplateUrl that's needs to be loaded before rendering
391392
// TODO: this is not a clean solution. Maybe something cleaner can be made when $ref support
392393
// is introduced since we need to go async then anyway

0 commit comments

Comments
 (0)