vue-hotel-datepicker icon indicating copy to clipboard operation
vue-hotel-datepicker copied to clipboard

Vue 3 compatibility

Open mariusa opened this issue 5 years ago • 39 comments

Description

Would like to use this component in a Vue 3 project generated by https://github.com/vitejs/vite

Note, this is just about being usable, not porting the component to Vue 3 composition APIs.

Steps to Reproduce

$ npm init vite-app <project-name>
$ cd <project-name>
$ npm install
$ npm install vue-hotel-datepicker --save
$ npm run dev

Add component to App.vue as noted in https://github.com/krystalcampioni/vue-hotel-datepicker

Expected behavior: [What you expected to happen]

component to work

Actual behavior: [What actually happened]

Error in browser console:

vue.js:1228 TypeError: Cannot read property '_c' of undefined
    at Proxy.a (vue-hotel-datepicker.js:22)
    at renderComponentRoot (vue.js:1481)
    at componentEffect (vue.js:4317)
    at reactiveEffect (vue.js:295)
    at effect (vue.js:270)
    at setupRenderEffect (vue.js:4309)
    at mountComponent (vue.js:4267)
    at processComponent (vue.js:4223)
    at patch (vue.js:3883)
    at mountChildren (vue.js:4039)

Datepicker Version

3.0.10

mariusa avatar Jul 01 '20 10:07 mariusa

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 01 '20 04:08 stale[bot]

Check v4.0.0-beta.2

matiasperrone avatar Aug 27 '20 04:08 matiasperrone

Would you please publish to npm so we can start using it? https://www.npmjs.com/package/vue-hotel-datepicker

Also, the README here points to another repo with an old version, very confusing: https://github.com/krystalcampioni/vue-hotel-datepicker/tree/v4.0.0-dev

mariusa avatar Aug 27 '20 04:08 mariusa

I rewrite the Readme so... check that out

matiasperrone avatar Sep 09 '20 13:09 matiasperrone

Please check the v4 version, we are deprecating the v3 version.

matiasperrone avatar Sep 16 '20 18:09 matiasperrone

V4 version doesn't work with vue3. https://github.com/vuejs/vue-next

mariusa avatar Sep 16 '20 19:09 mariusa

I think what's best would be:

  • Make the minimum adjustments for v4.y to be compatible with Vue 3 (not a priority, so probably in a minor version, as Vue 3 isn't ready nor is the ecosystem)
  • Plan a full rewrite for an upcoming major version where we could use Composition API and make the components way more maintainable.

If @matiasperrone agrees I'll reopen this one and we'll work on it as soon as Vue 3 lands (maybe before depending on how complicated the changes are).

superbiche avatar Sep 17 '20 15:09 superbiche

Vue 3 just landed... 😅

matiasperrone avatar Sep 19 '20 04:09 matiasperrone

Yup, saw that. They are playing with my nerves :sweat_smile: . I'll try to give it some time next week

superbiche avatar Sep 21 '20 10:09 superbiche

@mariusa Thank you very much for the feedback!! It's very important!!

matiasperrone avatar Sep 21 '20 15:09 matiasperrone

Can we give v3 support on 4.1? and close this issue?

matiasperrone avatar Sep 23 '20 14:09 matiasperrone

Can we give v3 support on 4.1?

That's a good plan.

and close this issue?

After it's done :)

mariusa avatar Sep 23 '20 14:09 mariusa

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 09 '20 06:11 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 12 '20 21:12 stale[bot]

v4.1 is now live! Soon v5.... I don't know when...

matiasperrone avatar Jan 18 '21 14:01 matiasperrone

Hi, Does 4.1 includes vue 3 support?

thx, Filip.

bzd2000 avatar Feb 03 '21 14:02 bzd2000

@matiasperrone , an idea when vue 3 will be supported? It is not to put pressure, but just to have an idea if it will be in coming days, weeks or months.

bzd2000 avatar Feb 17 '21 10:02 bzd2000

Still don't know, in the next few days I am going to start checking the changes needed, but there are many improvements to be made to the code. I will focus on this from now on. Think more in one month or more, the other collaborators are occupied.

matiasperrone avatar Feb 17 '21 13:02 matiasperrone

@matiasperrone , I'm available if you need help

bzd2000 avatar Feb 17 '21 14:02 bzd2000

Sure! I just created the v5 branch so we may start working on the code. There are several not very good practices (not my fault) within... I would say that we should fix that before start. Also we should separate the javascript with different responsabilities: Month, Day, DatePicker, to make the maintance easier.

matiasperrone avatar Feb 17 '21 15:02 matiasperrone

@matiasperrone ,

When I run the unit tests it fails:

vue-hotel-datepicker git:(v5) ✗ npm run test:unit

> [email protected] test:unit /Users/filipdelperdange/Projects/stuff/cotly/vue-hotel-datepicker
> vue-cli-service test:unit

 FAIL  tests/unit/datepickerDay.spec.js
  ● Test suite failed to run

    Cannot find module '@/DatePicker/components/Day.vue' from 'datepickerDay.spec.js'

      2 | import { expect } from 'chai'
      3 | 
    > 4 | import Day from '@/DatePicker/components/Day.vue'
        | ^
      5 | 
      6 | describe('Datepicker Day', () => {
      7 |   let wrapper

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
      at Object.<anonymous> (tests/unit/datepickerDay.spec.js:4:1)

 FAIL  tests/unit/datepicker.spec.js
  ● Test suite failed to run

    Cannot find module '@/DatePicker/HotelDatePicker.vue' from 'datepicker.spec.js'

      2 | import { mount } from '@vue/test-utils'
      3 | 
    > 4 | import Datepicker from '@/DatePicker/HotelDatePicker.vue'
        | ^
      5 | 
      6 | describe('Datepicker Calendar', () => {
      7 |   const wrapper = mount(Datepicker)

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:259:17)
      at Object.<anonymous> (tests/unit/datepicker.spec.js:4:1)

 PASS  tests/unit/datepickerHelpers.spec.js

Test Suites: 2 failed, 1 passed, 3 total
Tests:       9 passed, 9 total
Snapshots:   0 total
Time:        2.688s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:unit: `vue-cli-service test:unit`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/filipdelperdange/.npm/_logs/2021-02-18T08_00_00_526Z-debug.log

Is there a build procedure I should follow?

Thx, Filip.

bzd2000 avatar Feb 18 '21 08:02 bzd2000

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 22 '21 17:06 stale[bot]

I use "vue": "^3.0.0", "vue-hotel-datepicker": "^4.4.2"

and still found error runtime-core.esm-bundler.js?5c40:218 Uncaught TypeError: Cannot read property '_c' of undefined at Proxy.render (vueHotelDatepicker.common.js?ffea:1473) at renderComponentRoot (runtime-core.esm-bundler.js?5c40:1168) at componentEffect (runtime-core.esm-bundler.js?5c40:5214) at reactiveEffect (reactivity.esm-bundler.js?a1e9:42) at effect (reactivity.esm-bundler.js?a1e9:17) at setupRenderEffect (runtime-core.esm-bundler.js?5c40:5167) at mountComponent (runtime-core.esm-bundler.js?5c40:5126) at processComponent (runtime-core.esm-bundler.js?5c40:5084) at patch (runtime-core.esm-bundler.js?5c40:4690) at componentEffect (runtime-core.esm-bundler.js?5c40:5221)

newbie2005 avatar Jul 18 '21 05:07 newbie2005

We don't support Vue3 at the moment...

matiasperrone avatar Jul 21 '21 00:07 matiasperrone

I'll be actively working on this in two months, it probably will take 2 weeks or maybe more. We are committed to this package so rest assure that this year will be resolved

matiasperrone avatar Jul 21 '21 00:07 matiasperrone

@matiasperrone, Any news?

bzd2000 avatar Sep 18 '21 07:09 bzd2000

Hi, sorry not yet. I may be working on this feature along with the rewrite by the end of 2021, I least is what I hope for. @superbiche you?

matiasperrone avatar Sep 20 '21 14:09 matiasperrone

Hi guys and gals! (and others! why not?) I am going to move this project to a different namespace for the v3... more new I hope soon...

My current day job and some topics in my personal life didn't allow me to pursue the Vue 3 development and the team is a little bit offline now... so I hope to push it to 2022 with some hardwork.

I'll be searching for devs to push this to the next level, so I'll be asking those who help me to help once again to be part of something bigger that yourselves.

matiasperrone avatar Dec 28 '21 15:12 matiasperrone

any news

ahmedshaheen201400721 avatar Jan 19 '22 09:01 ahmedshaheen201400721

No news on this. Do you want to help me building the Vue3 version in a new repo?

matiasperrone avatar Jan 19 '22 16:01 matiasperrone