@stencil/vue-output-target
Advanced tools
Comparing version 0.2.5-1 to 0.2.5-2
@@ -21,11 +21,6 @@ import { dashToPascalCase } from './utils'; | ||
} | ||
let options = {}; | ||
const findModel = componentModelConfig && componentModelConfig.find(config => config.elements.includes(cmpMeta.tagName)); | ||
if (findModel) { | ||
options.modelProp = findModel.targetAttr; | ||
options.modelUpdateEvent = findModel.event; | ||
} | ||
if (Object.keys(options).length > 0) { | ||
templateString += `,\n`; | ||
templateString += JSON.stringify(options, null, 2); | ||
templateString += `'${findModel.targetAttr}', '${findModel.event}'`; | ||
} | ||
@@ -32,0 +27,0 @@ templateString += `);\n`; |
@@ -109,11 +109,6 @@ 'use strict'; | ||
} | ||
let options = {}; | ||
const findModel = componentModelConfig && componentModelConfig.find(config => config.elements.includes(cmpMeta.tagName)); | ||
if (findModel) { | ||
options.modelProp = findModel.targetAttr; | ||
options.modelUpdateEvent = findModel.event; | ||
} | ||
if (Object.keys(options).length > 0) { | ||
templateString += `,\n`; | ||
templateString += JSON.stringify(options, null, 2); | ||
templateString += `'${findModel.targetAttr}', '${findModel.event}'`; | ||
} | ||
@@ -120,0 +115,0 @@ templateString += `);\n`; |
@@ -100,11 +100,6 @@ import path from 'path'; | ||
} | ||
let options = {}; | ||
const findModel = componentModelConfig && componentModelConfig.find(config => config.elements.includes(cmpMeta.tagName)); | ||
if (findModel) { | ||
options.modelProp = findModel.targetAttr; | ||
options.modelUpdateEvent = findModel.event; | ||
} | ||
if (Object.keys(options).length > 0) { | ||
templateString += `,\n`; | ||
templateString += JSON.stringify(options, null, 2); | ||
templateString += `'${findModel.targetAttr}', '${findModel.event}'`; | ||
} | ||
@@ -111,0 +106,0 @@ templateString += `);\n`; |
@@ -10,6 +10,2 @@ export interface OutputTargetVue { | ||
} | ||
export interface ComponentOptions { | ||
modelProp?: string; | ||
modelUpdateEvent?: string; | ||
} | ||
export interface ComponentModelConfig { | ||
@@ -16,0 +12,0 @@ elements: string | string[]; |
{ | ||
"name": "@stencil/vue-output-target", | ||
"version": "0.2.5-1", | ||
"version": "0.2.5-2", | ||
"description": "Vue output target for @stencil/core components.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -17,7 +17,2 @@ import { VNode, defineComponent, getCurrentInstance, h, inject, ref, Ref } from 'vue'; | ||
interface ComponentOptions { | ||
modelProp?: string; | ||
modelUpdateEvent?: string; | ||
} | ||
const getComponentClasses = (classes: unknown) => { | ||
@@ -39,9 +34,6 @@ return (classes as string)?.split(' ') || []; | ||
* in each component's TSX file. | ||
* @prop componentOptions - An object that defines additional | ||
* options for the component such as router or v-model | ||
* integrations. | ||
* @prop modelProp - The prop that v-model binds to (i.e. value) | ||
* @prop modelUpdateEvent - The event that is fired when the value changes (i.e. ionChange) | ||
*/ | ||
export const defineContainer = <Props>(name: string, componentProps: string[] = [], componentOptions: ComponentOptions = {}) => { | ||
const { modelProp, modelUpdateEvent } = componentOptions; | ||
export const defineContainer = <Props>(name: string, componentProps: string[] = [], modelProp?: string, modelUpdateEvent?: string) => { | ||
/** | ||
@@ -48,0 +40,0 @@ * Create a Vue component wrapper around a Web Component. |
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
37583
802