Comparing version 0.3.3 to 0.3.4
@@ -119,5 +119,5 @@ import { resolve } from 'path'; | ||
var component = h(this.component.is, { | ||
attrs: this.$attrs, | ||
props: Object.assign({}, {wrapper: this.inner}, | ||
this.component.propsData) | ||
this.component.propsData, | ||
this.$attrs) | ||
}); | ||
@@ -537,2 +537,4 @@ | ||
this.component.propsData = moduleData.propsData || {}; | ||
if (!moduleData.componentOptions) { | ||
@@ -550,3 +552,2 @@ return | ||
this.component.is = available[0].pascal; | ||
this.component.propsData = moduleData.propsData || {}; | ||
}, | ||
@@ -553,0 +554,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
var Druxt=function(t,n){"use strict";function e(t,n,e,o,r,a,i,p,s,u){"boolean"!=typeof i&&(s=p,p=i,i=!1);var c,d="function"==typeof e?e.options:e;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),o&&(d._scopeId=o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,s(t)),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=c):n&&(c=i?function(t){n.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){n.call(this,p(t))}),c)if(d.functional){var f=d.render;d.render=function(t,n){return c.call(n),f(t,n)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,c):[c]}return e}var o=e({},undefined,{name:"Druxt",props:{inner:{type:[Object,Boolean],default:function(){return{component:"div",propsData:{}}}},module:{type:String,required:!0},propsData:{type:Object,default:function(){return{}}},wrapper:{type:[Object,Boolean],default:function(){return{component:"div",propsData:{}}}}},data:function(){return{component:{is:void 0,propsData:{}}}},created:function(){this.setModuleComponent()},methods:{setModuleComponent:function(){var t="Druxt"+this.module.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join("");this.$options.components[t]&&(this.component.is=t,this.component.propsData=this.propsData)}},render:function(t){var n=t(this.component.is,{attrs:this.$attrs,props:Object.assign({},{wrapper:this.inner},this.component.propsData)});return(this.wrapper||{}).component?t(this.wrapper.component,{props:this.wrapper.propsData},[n]):n}},undefined,undefined,undefined,!1,void 0,void 0,void 0),r=e({render:function(){var t=this,n=t.$createElement;return(t._self._c||n)("div",[t._t("default")],2)},staticRenderFns:[]},undefined,{name:"DruxtWrapper"},undefined,false,undefined,!1,void 0,void 0,void 0),a=function(){};a.prototype.getComponents=function(t,n,e,o){void 0===e&&(e=!1);var r=[],a={};return n.filter((function(t){return Array.isArray(t)})).map((function(n){var e=[];n.map((function(n){var r=e.length?[].concat(e[0].parts):[];r.push(n);var a=[].concat(r);"string"==typeof o||!1===o&&void 0!==o||!((t||{}).$options||{}).name||(o=t.$options.name.match(/[A-Z][a-z]+/g).map((function(t){return t.toLowerCase()})).join("-")),o&&a.unshift(o);var i=a.map((function(t){return t.toLowerCase().replace(/--|_/g,"-")})).join("-"),p=i.replace(/((\b|[^a-zA-Z0-9]+)[a-zA-Z0-9])/gi,(function(t,n,e){return t.toUpperCase().replace(e,"")})),s=!1;for(var u of[i,p])if(void 0!==(((t||{}).$options||{}).components||{})[u]){s=!0;break}e.unshift({global:s,kebab:i,parts:r,pascal:p,prefix:o})})),e.map((function(t){a[t.pascal]||(a[t.pascal]=!0,r.push(t))}))})),r.filter((function(t){return t.global||!!e})).sort((function(t,n){return n.parts.length-t.parts.length}))},a.prototype.getModuleData=async function(t){if("function"!=typeof((t||{}).$options||{}).druxt)return!1;var n=await t.$options.druxt({vm:t});return(t.$options||{}).name&&(n.name=t.$options.name.match(/[A-Z][a-z]+/g).map((function(t){return t.toLowerCase()})).join("-")),n};var i={components:{DruxtWrapper:r},data:function(){return{component:{is:"DruxtWrapper",options:[],propsData:{}}}},props:{wrapper:{type:Object,default:function(){return{component:"div",propsData:{}}}}},fetch:async function(){var t=new a,n=await t.getModuleData(this);if(n.componentOptions){var e=t.getComponents(this,n.componentOptions,!0);this.component.options=e.map((function(t){return t.pascal}));var o=e.filter((function(t){return t.global}));o.length&&(this.component.is=o[0].pascal,this.component.propsData=n.propsData||{})}}};return t.Druxt=o,t.DruxtClass=a,t.DruxtComponentMixin=i,t.DruxtWrapper=r,t.default=function(t){void 0===t&&(t={});var e=Object.assign({},t,(this.options||{}).druxt);this.addPlugin({src:n.resolve(__dirname,"../nuxt/plugin.js"),fileName:"druxt.js",options:e})},t}({},path); | ||
var Druxt=function(t,n){"use strict";function e(t,n,e,o,r,a,i,p,s,u){"boolean"!=typeof i&&(s=p,p=i,i=!1);var c,d="function"==typeof e?e.options:e;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),o&&(d._scopeId=o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,s(t)),t&&t._registeredComponents&&t._registeredComponents.add(a)},d._ssrRegister=c):n&&(c=i?function(t){n.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){n.call(this,p(t))}),c)if(d.functional){var f=d.render;d.render=function(t,n){return c.call(n),f(t,n)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,c):[c]}return e}var o=e({},undefined,{name:"Druxt",props:{inner:{type:[Object,Boolean],default:function(){return{component:"div",propsData:{}}}},module:{type:String,required:!0},propsData:{type:Object,default:function(){return{}}},wrapper:{type:[Object,Boolean],default:function(){return{component:"div",propsData:{}}}}},data:function(){return{component:{is:void 0,propsData:{}}}},created:function(){this.setModuleComponent()},methods:{setModuleComponent:function(){var t="Druxt"+this.module.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join("");this.$options.components[t]&&(this.component.is=t,this.component.propsData=this.propsData)}},render:function(t){var n=t(this.component.is,{props:Object.assign({},{wrapper:this.inner},this.component.propsData,this.$attrs)});return(this.wrapper||{}).component?t(this.wrapper.component,{props:this.wrapper.propsData},[n]):n}},undefined,undefined,undefined,!1,void 0,void 0,void 0),r=e({render:function(){var t=this,n=t.$createElement;return(t._self._c||n)("div",[t._t("default")],2)},staticRenderFns:[]},undefined,{name:"DruxtWrapper"},undefined,false,undefined,!1,void 0,void 0,void 0),a=function(){};a.prototype.getComponents=function(t,n,e,o){void 0===e&&(e=!1);var r=[],a={};return n.filter((function(t){return Array.isArray(t)})).map((function(n){var e=[];n.map((function(n){var r=e.length?[].concat(e[0].parts):[];r.push(n);var a=[].concat(r);"string"==typeof o||!1===o&&void 0!==o||!((t||{}).$options||{}).name||(o=t.$options.name.match(/[A-Z][a-z]+/g).map((function(t){return t.toLowerCase()})).join("-")),o&&a.unshift(o);var i=a.map((function(t){return t.toLowerCase().replace(/--|_/g,"-")})).join("-"),p=i.replace(/((\b|[^a-zA-Z0-9]+)[a-zA-Z0-9])/gi,(function(t,n,e){return t.toUpperCase().replace(e,"")})),s=!1;for(var u of[i,p])if(void 0!==(((t||{}).$options||{}).components||{})[u]){s=!0;break}e.unshift({global:s,kebab:i,parts:r,pascal:p,prefix:o})})),e.map((function(t){a[t.pascal]||(a[t.pascal]=!0,r.push(t))}))})),r.filter((function(t){return t.global||!!e})).sort((function(t,n){return n.parts.length-t.parts.length}))},a.prototype.getModuleData=async function(t){if("function"!=typeof((t||{}).$options||{}).druxt)return!1;var n=await t.$options.druxt({vm:t});return(t.$options||{}).name&&(n.name=t.$options.name.match(/[A-Z][a-z]+/g).map((function(t){return t.toLowerCase()})).join("-")),n};var i={components:{DruxtWrapper:r},data:function(){return{component:{is:"DruxtWrapper",options:[],propsData:{}}}},props:{wrapper:{type:Object,default:function(){return{component:"div",propsData:{}}}}},fetch:async function(){var t=new a,n=await t.getModuleData(this);if(this.component.propsData=n.propsData||{},n.componentOptions){var e=t.getComponents(this,n.componentOptions,!0);this.component.options=e.map((function(t){return t.pascal}));var o=e.filter((function(t){return t.global}));o.length&&(this.component.is=o[0].pascal)}}};return t.Druxt=o,t.DruxtClass=a,t.DruxtComponentMixin=i,t.DruxtWrapper=r,t.default=function(t){void 0===t&&(t={});var e=Object.assign({},t,(this.options||{}).druxt);this.addPlugin({src:n.resolve(__dirname,"../nuxt/plugin.js"),fileName:"druxt.js",options:e})},t}({},path); |
@@ -117,5 +117,5 @@ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var path=require('path');/** | ||
var component = h(this.component.is, { | ||
attrs: this.$attrs, | ||
props: Object.assign({}, {wrapper: this.inner}, | ||
this.component.propsData) | ||
this.component.propsData, | ||
this.$attrs) | ||
}); | ||
@@ -212,3 +212,3 @@ | ||
/* module identifier */ | ||
var __vue_module_identifier__ = "data-v-6a72074a"; | ||
var __vue_module_identifier__ = "data-v-0c990e16"; | ||
/* functional template */ | ||
@@ -522,2 +522,4 @@ var __vue_is_functional_template__ = undefined; | ||
this.component.propsData = moduleData.propsData || {}; | ||
if (!moduleData.componentOptions) { | ||
@@ -535,3 +537,2 @@ return | ||
this.component.is = available[0].pascal; | ||
this.component.propsData = moduleData.propsData || {}; | ||
}, | ||
@@ -538,0 +539,0 @@ }; |
{ | ||
"name": "druxt", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "A Bridge between frameworks, NuxtJS in the front, Drupal in the back.", | ||
@@ -46,15 +46,15 @@ "repository": { | ||
"dependencies": { | ||
"codecov": "^3.8.0", | ||
"vuex": "^3.5.1" | ||
"codecov": "^3.8.1", | ||
"vuex": "^3.6.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-transform-runtime": "^7.11.5", | ||
"@babel/preset-env": "^7.11.5", | ||
"@babel/plugin-transform-runtime": "^7.12.10", | ||
"@babel/preset-env": "^7.12.11", | ||
"@rollup/plugin-alias": "^2.2.0", | ||
"@rollup/plugin-buble": "^0.20.0", | ||
"@rollup/plugin-replace": "^2.2.1", | ||
"@vue/test-utils": "^1.1.0", | ||
"@rollup/plugin-replace": "^2.3.4", | ||
"@vue/test-utils": "^1.1.2", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-eslint": "^10.1.0", | ||
"bootstrap-vue": "^2.17.3", | ||
"bootstrap-vue": "^2.21.2", | ||
"cross-env": "^6.0.3", | ||
@@ -68,3 +68,3 @@ "eslint": "^6.7.2", | ||
"minimist": "^1.2.0", | ||
"nodemon": "^2.0.2", | ||
"nodemon": "^2.0.7", | ||
"rollup": "^1.26.3", | ||
@@ -71,0 +71,0 @@ "rollup-plugin-commonjs": "^10.1.0", |
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
39276
Updatedcodecov@^3.8.1
Updatedvuex@^3.6.0