RonaldJerez / vue-input-facade

A lightweight and dependency free input masking library created specific for Vue
https://ronaldjerez.github.io/vue-input-facade/latest/
183 stars 27 forks source link

Vue3 Support #44

Open dougalg opened 2 years ago

dougalg commented 2 years ago

Hi, I am wondering if there are any plans for vue3 support for this package? Thanks a lot

RonaldJerez commented 2 years ago

Hello, the current project I am using this on doesn’t have any plans to upgrade to vue 3 yet. It’s not in my immediate schedule but eventually I will.

andreasvirkus commented 2 years ago

What about now? 👀

kevinmelo commented 2 years ago

What i did was changing the methods inside directive.js to the new ones for Vue3, until this lib supports Vue3

RonaldJerez commented 2 years ago

I honestly don't have a need for it yet, which is why I haven't prioritize it, but I did look into it briefly last year and stopped because styleguidest did not support vue 3 yet, and the documentations page requires it. I created an issue to see if anyone wanted to contribute and help us move to storybook which does support vue 3.

I'm more than open to contributions, even under beta if anyone wants to create a PR with the necessary changes for vue3.

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 3.0.0-beta.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

iyerusad commented 1 year ago

"vue-input-facade": "version": "3.0.0-beta.2" "vue": "version": "3.2.47"

Vue3 seems like it wanted below, particularly filter was throwing errors. Vue3 main.js


import { createApp } from 'vue';
const app = createApp(App);

import { InputFacade, facade, filter } from 'vue-input-facade';
app.component('InputFacade', InputFacade);
app.directive('facade', facade);
app.config.globalProperties.$filters = {
  facade: filter
};
RonaldJerez commented 1 year ago

Ah yes, filters are not supported in vue3. That needs to be removed.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.0.0-beta.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

simonmaass commented 1 year ago

When using v3 and nuxt 3.6.5 i get the following error:

Named export 'facade' not found. The requested module 'vue-input-facade' is a CommonJS module, which may not support all module.exports as named exports.

I created a pugin as follows:

import { facade } from 'vue-input-facade'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.directive('facade', facade)
})
github-actions[bot] commented 10 months ago

:tada: This issue has been resolved in version 3.0.0-beta.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: