@stencil/vue-output-target
Advanced tools
Comparing version 0.8.0 to 0.8.1-dev.1680184182
@@ -12,5 +12,7 @@ import { dashToPascalCase } from './utils'; | ||
} | ||
const componentType = `${importTypes}.${tagNameAsPascal}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
const modelType = findModel !== undefined ? `, ${componentType}.${findModel.targetAttr}` : ''; | ||
let templateString = ` | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`; | ||
if (props.length > 0) { | ||
@@ -22,3 +24,3 @@ templateString += `, [ | ||
* If there are no props, | ||
* but but v-model is stil used, | ||
* but but v-model is still used, | ||
* make sure we pass in an empty array | ||
@@ -25,0 +27,0 @@ * otherwise all of the defineContainer properties |
@@ -100,5 +100,7 @@ 'use strict'; | ||
} | ||
const componentType = `${importTypes}.${tagNameAsPascal}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
const modelType = findModel !== undefined ? `, ${componentType}.${findModel.targetAttr}` : ''; | ||
let templateString = ` | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`; | ||
if (props.length > 0) { | ||
@@ -110,3 +112,3 @@ templateString += `, [ | ||
* If there are no props, | ||
* but but v-model is stil used, | ||
* but but v-model is still used, | ||
* make sure we pass in an empty array | ||
@@ -113,0 +115,0 @@ * otherwise all of the defineContainer properties |
@@ -91,5 +91,7 @@ import path from 'path'; | ||
} | ||
const componentType = `${importTypes}.${tagNameAsPascal}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
const modelType = findModel !== undefined ? `, ${componentType}.${findModel.targetAttr}` : ''; | ||
let templateString = ` | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${importTypes}.${tagNameAsPascal}>('${cmpMeta.tagName}', ${importAs}`; | ||
const findModel = componentModelConfig && componentModelConfig.find((config) => config.elements.includes(cmpMeta.tagName)); | ||
export const ${tagNameAsPascal} = /*@__PURE__*/ defineContainer<${componentType}${modelType}>('${cmpMeta.tagName}', ${importAs}`; | ||
if (props.length > 0) { | ||
@@ -101,3 +103,3 @@ templateString += `, [ | ||
* If there are no props, | ||
* but but v-model is stil used, | ||
* but but v-model is still used, | ||
* make sure we pass in an empty array | ||
@@ -104,0 +106,0 @@ * otherwise all of the defineContainer properties |
{ | ||
"name": "@stencil/vue-output-target", | ||
"version": "0.8.0", | ||
"version": "0.8.1-dev.1680184182", | ||
"description": "Vue output target for @stencil/core components.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -57,3 +57,3 @@ import { VNode, defineComponent, getCurrentInstance, h, inject, ref, Ref } from 'vue'; | ||
*/ | ||
export const defineContainer = <Props, VModelType = string | number | boolean>( | ||
export const defineContainer = <Props, VModelType = any>( | ||
name: string, | ||
@@ -60,0 +60,0 @@ defineCustomElement: any, |
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
54960
994
158
1
4
1
41