From 5f70de9a826755ee1290cede56388bcf3678408b Mon Sep 17 00:00:00 2001 From: Icebob Date: Wed, 11 May 2016 15:30:10 +0200 Subject: [PATCH] :pencil2: docs: Remove from project --- docs/README.md | 1 - docs/SUMMARY.md | 1 - docs/book.json | 19 ------------- docs/fields/index.md | 68 -------------------------------------------- docs/fields/text.md | 40 -------------------------- docs/main.md | 47 ------------------------------ docs/schema.md | 22 -------------- 7 files changed, 198 deletions(-) delete mode 100644 docs/README.md delete mode 100644 docs/SUMMARY.md delete mode 100644 docs/book.json delete mode 100644 docs/fields/index.md delete mode 100644 docs/fields/text.md delete mode 100644 docs/main.md delete mode 100644 docs/schema.md diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index be589062..00000000 --- a/docs/README.md +++ /dev/null @@ -1 +0,0 @@ -# vue-form-generator \ No newline at end of file diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md deleted file mode 100644 index ac9323cb..00000000 --- a/docs/SUMMARY.md +++ /dev/null @@ -1 +0,0 @@ -# Summary diff --git a/docs/book.json b/docs/book.json deleted file mode 100644 index 3063f30c..00000000 --- a/docs/book.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "gitbook": "2.x.x", - "plugins": ["edit-link", "github", "advanced-emoji"], - "pluginsConfig": { - "edit-link": { - "base": "https://github.com/icebob/vue-form-generator/tree/master/docs", - "label": "Edit This Page" - }, - "github": { - "url": "https://github.com/icebob/vue-form-generator/" - } - }, - "links": { - "sharing": { - "facebook": false, - "twitter": false - } - } -} \ No newline at end of file diff --git a/docs/fields/index.md b/docs/fields/index.md deleted file mode 100644 index baa90758..00000000 --- a/docs/fields/index.md +++ /dev/null @@ -1,68 +0,0 @@ -# Available fields - -## Built-in fields - -For this fields there is no need 3rd party libraries - -- [`text`](text.md) - Simple text input field -- `email` - E-mail address input field -- `password` - Password input field -- `number` - Number input field -- `textArea` - Text area field -- `checkbox` - Checkbox for boolean values -- `select` - Select list -- `color` - Color picker (built-in HTML5 control) -- `checklist` - Checkbox list to select multiple values -- `range` - Range slider (built-in HTML5 control) -- `image` - Image select field (URL or upload in base64 string) -- `label` - Static text (e.g. timestamp, creation time...etc) - -## Optional fields - -For this fields needs 3rd party libraries - -- `selectEx` - select list with the bootstrap-select component -- `dateTime` - datetime picker with bootstrap-datetimepicker component -- `masked` - Masked text input field with maskedinput component -- `slider` - pretty range slider with ion.rangeSlider component -- `spectrum` - Color picker with "The No Hassle" Spectrum jQuery Colorpicker component - -## Common properties of field - -Property | Type | Description ---------------- | ------------- | ----------- -type | `String` | Type of field -label | `String` | Label of field -model | `String` | Name of property in the model -featured | `boolean` | is it a featured (bold) field? -disabled | `boolean` | if true, disable this field -required | `boolean` | if true, must be fill this field -default | any | Default value of the field (for create a new model) -validator | `Function` or `Array` | Validator for value. It can be array of functions too. -onChanged | `Function` | Event if this field value is changed. `onChanged(model, newVal, oldVal, field) { ... }` -onValidated | `Function` | Event if validation executed. `onValidated(model, errors, field) { ... }` - -## Example - -```js -{ - type: "text", - label: "Name", - model: "name", - readonly: false, - featured: true, - disabled: false, - required: true, - default: "Anonymous", - validator: validators.string, - - onChanged(model, newVal, oldVal, field) { - console.log(`Model's name changed from ${oldVal} to ${newVal}. Model:`, model); - }, - - onValidated(model, errors, field) { - if (errors.length > 0) - console.warn("Validation error in Name field! Errors:", errors); - } -} -``` \ No newline at end of file diff --git a/docs/fields/text.md b/docs/fields/text.md deleted file mode 100644 index 863ca886..00000000 --- a/docs/fields/text.md +++ /dev/null @@ -1,40 +0,0 @@ -# `text` field - -## Special properties of field - -Property | Type | Description ---------------- | ------------- | ----------- -readonly | `boolean` | If true, the input field is read-only -placeholder | `String` | Placeholder text for input field -min | `Number` | Minimum length of value (need use `validators.string`) -max | `Number` | Maximum length of value (need use `validators.string`) - -## Usage -A featured and required name input field, where the length of name must be between 3 and 50 characters - -```js -{ - type: "text", - label: "Name", - model: "name", - featured: true, - min: 3, - max: 50, - required: true, - placeholder: "User's full name", - validator: validators.string -} -``` -Text field for website address with url & string validator -```js -{ - type: "text", - label: "Website", - model: "web", - max: 255, - validator: [ - validators.string - validators.url - ] -} -``` diff --git a/docs/main.md b/docs/main.md deleted file mode 100644 index ea3449aa..00000000 --- a/docs/main.md +++ /dev/null @@ -1,47 +0,0 @@ -# VueFormGenerator component - -## Component properties - -Property | Type | Description --------- | ---- | ----------- -[schema](schema.md)| `Object` | Schema object with fields -[options](options.md) | `Object` | form options -model | `Object` | Model/target object -multiple | `boolean` | Is it a multiple merged model? We only show `multi: true` fields -isNewModel | `boolean` | If model is new/empty, we won't validate after it load - -## Usage -```html - - - -``` \ No newline at end of file diff --git a/docs/schema.md b/docs/schema.md deleted file mode 100644 index 9c29ef56..00000000 --- a/docs/schema.md +++ /dev/null @@ -1,22 +0,0 @@ -# Schema -The schema contains the fields of the form - -## Sample -```js -{ - fields: [ - { - type: "text", - label: "Name", - model: "name" - }, - { - type: "number", - label: "Age", - model: "age" - } - ] -} -``` - -[Available field types](fields/index.md) \ No newline at end of file