mutt-forms-vue
Advanced tools
Comparing version 0.11.0 to 1.0.0
{ | ||
"name": "mutt-forms-vue", | ||
"description": "Mutt forms - VueJS integration", | ||
"version": "0.11.0", | ||
"version": "1.0.0", | ||
"author": "Bought By Many <dev@boughtbymany.com>", | ||
"license": "MIT", | ||
"main": "src/main.js", | ||
"module": "dist/mutt-forms-vue.es.js", | ||
"contributors": [ | ||
@@ -23,7 +24,3 @@ { | ||
"scripts": { | ||
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot", | ||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules", | ||
"lint": "eslint --ext .js,.vue src test/specs", | ||
"linter": "yarn run lint; exit 0", | ||
"test": "yarn run jest" | ||
"build": "rollup -c" | ||
}, | ||
@@ -39,5 +36,5 @@ "keywords": [ | ||
], | ||
"dependencies": { | ||
"mutt-forms": "^1.7.x", | ||
"string-format": "^0.5.0", | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"mutt-forms": ">= 1.8.0 < 2", | ||
"vue": "^2.5.x" | ||
@@ -49,31 +46,17 @@ }, | ||
"babel-loader": "^7.1.2", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"chai": "^3.5.0", | ||
"cross-env": "^3.0.0", | ||
"css-loader": "^0.25.0", | ||
"eslint": "^4.1.1", | ||
"eslint-config-standard": "^10.2.1", | ||
"eslint-friendly-formatter": "^3.0.0", | ||
"eslint-loader": "^1.9.0", | ||
"eslint-config-google": "^0.9.1", | ||
"eslint-plugin-html": "^3.0.0", | ||
"eslint-plugin-import": "^2.6.1", | ||
"eslint-plugin-node": "^5.1.0", | ||
"eslint-plugin-promise": "^3.5.0", | ||
"eslint-plugin-standard": "^3.0.1", | ||
"file-loader": "^0.9.0", | ||
"jest": "^21.2.1", | ||
"rollup": "^0.57.1", | ||
"rollup-plugin-babel": "^3.0.3", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-plugin-uglify": "^3.0.0", | ||
"rollup-plugin-vue": "^3.0.0", | ||
"vue-loader": "^12.2.1", | ||
"vue-template-compiler": "^2.5.x", | ||
"webpack": "^2.6.1", | ||
"webpack-dev-server": "^2.4.5" | ||
}, | ||
"babel": { | ||
"babelrc": false, | ||
"presets": [ | ||
"env", | ||
"stage-0" | ||
] | ||
"vue-template-compiler": "^2.5.x" | ||
} | ||
} |
@@ -5,5 +5,2 @@ /** | ||
import StringFormat from 'string-format' | ||
StringFormat.extend(String.prototype, {}) | ||
export default { | ||
@@ -27,13 +24,3 @@ datetime(value, options) { | ||
return `${options.prefix}${value}` | ||
}, | ||
template(value, options) { | ||
let outputTemplate = options.template | ||
if(outputTemplate) { | ||
return outputTemplate.format(value) | ||
} | ||
return value | ||
} | ||
} |
@@ -6,3 +6,3 @@ /** | ||
import Mutt, { widgets } from 'mutt-forms' | ||
import Mutt from 'mutt-forms' | ||
@@ -27,3 +27,3 @@ // Widgets | ||
*/ | ||
export class VueWidget extends widgets.Widget { | ||
class VueWidget extends Mutt.widgets.Widget { | ||
constructor(field, type, id, name, label, | ||
@@ -54,3 +54,3 @@ attribs = {}, options = {}, initial = null) { | ||
// We may in future want to extend the component list | ||
if(options && options.hasOwnProperty('plugins')) { | ||
if (options && options.hasOwnProperty('plugins')) { | ||
// Ensure that plugins allow for overriding core components | ||
@@ -65,3 +65,3 @@ components = { | ||
// be used to map field types back to widgets | ||
for(let component of Object.values(components)) { | ||
for (let component of Object.values(components)) { | ||
let name = component.name | ||
@@ -107,3 +107,3 @@ let type = name.replace('mutt-', '') | ||
let resolveWidget = (widget) => { | ||
if(typeof widget === 'function') { | ||
if (typeof widget === 'function') { | ||
if(widget.name === 'VueWidgetProxy') { | ||
@@ -118,3 +118,3 @@ return widget.getWidgetName() | ||
// If a widget is specified directly, we always use this | ||
if(this.widget) { | ||
if (this.widget) { | ||
return resolveWidget( | ||
@@ -126,3 +126,3 @@ Mutt.config.getWidget(this.widget) | ||
// Option overides take next priority | ||
if(this.field.options.hasOwnProperty('widget')) { | ||
if (this.field.options.hasOwnProperty('widget')) { | ||
return resolveWidget( | ||
@@ -135,3 +135,3 @@ Mutt.config.getWidget(this.field.options.widget) | ||
// a non-widget key | ||
if(this.field.options.hasOwnProperty('hidden')) { | ||
if (this.field.options.hasOwnProperty('hidden')) { | ||
if(this.field.options.hidden) { | ||
@@ -138,0 +138,0 @@ return resolveWidget(Mutt.config.getWidget('hidden')) |
@@ -116,9 +116,1 @@ /** | ||
export function capitalize(lower) { | ||
return lower.toLowerCase().replace( | ||
/(?:^|\s)\S/g, | ||
(letter) => { | ||
return letter.toUpperCase() | ||
} | ||
) | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
484405
2
17
44
523
1
1
- Removedmutt-forms@^1.7.x
- Removedstring-format@^0.5.0
- Removedvue@^2.5.x
- Removedstring-format@0.5.0(transitive)