auto-views
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -21,2 +21,3 @@ | ||
| schemaRepo| SchemaRepo | empty SchemaRepo | No | a repository of the schemas to be used in constructing the view | | ||
| view | string | "edit" | No | the name of the view to request from the repo | | ||
| data | object| null | No | data for the form, needs to comply with schema | expanded/collapsed directly (search can do it) or traversed using keyboard, or selected. | | ||
@@ -38,8 +39,10 @@ | onChange | (ev:[AutoViewEvent](./auto-view-event.md))=>void | none | No| callback method for data change | | ||
* label | ||
* form-group - input and label container | ||
* ui-group - fields grouped together by schema | ||
* sub-form | ||
each of the internal parts also gets a data-field attribute with its respective field name | ||
each of the internal parts also gets a cssState with its respective field/group name | ||
```jsx | ||
<input data-field={fieldName} className="field"/> | ||
<input cssStates={{name:fieldName}} className="field"/> | ||
@@ -67,3 +70,3 @@ ``` | ||
.myForm::field["data-field"=title]:empty{ | ||
.myForm::field:name(title):empty{ | ||
background:blue; | ||
@@ -70,0 +73,0 @@ } |
{ | ||
"name": "auto-views", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Common, fully-tested, strictly-typed, Wix-styled, auto views library", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -41,6 +41,17 @@ # Auto-Views component family | ||
```jsx | ||
<AutoForm schemaId="http://example.com/user" view="view"/> | ||
``` | ||
![image](https://user-images.githubusercontent.com/2289769/27994043-55fb639e-64be-11e7-906f-be9703cdc6c1.png) | ||
the following editing view: | ||
```jsx | ||
<AutoForm schemaId="http://example.com/user" view="edit"/> | ||
``` | ||
![image](https://user-images.githubusercontent.com/2289769/27994053-88ffa818-64be-11e7-8301-b9387e721eab.png) | ||
@@ -50,8 +61,21 @@ | ||
```jsx | ||
<AutoGrid schemaId="http://example.com/user" view="edit"/> | ||
``` | ||
![image](https://user-images.githubusercontent.com/2289769/27994097-306a5b8e-64bf-11e7-8611-b50dcb275314.png) | ||
and the following list views: | ||
and the following list view: | ||
```jsx | ||
<AutoThumbnailForm schemaId="http://example.com/user" view="edit"/> | ||
``` | ||
![image](https://user-images.githubusercontent.com/2289769/27994085-ef35dd3c-64be-11e7-80b0-f4c91b1c1516.png) | ||
## exports | ||
@@ -61,5 +85,4 @@ | ||
* [auto-form](./docs/auto-form.md) - React component for generating a form view from a schema | ||
* [auto-view](./docs/auto-view.md) - React component for generating a display view from a schema | ||
* auto-thumb - TBD | ||
* auto-thumbnail-list-form- TBD | ||
* auto-thumbnail-form- TBD | ||
* auto-list-form- TBD | ||
@@ -66,0 +89,0 @@ * auto-grid-view - TBD |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192925
446