Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components like bp-input or bp-password failed with an error message (lit) #261

Closed
amiceli opened this issue Oct 4, 2023 · 5 comments · Fixed by #263
Closed

Components like bp-input or bp-password failed with an error message (lit) #261

amiceli opened this issue Oct 4, 2023 · 5 comments · Fixed by #263
Assignees
Labels
bug dependencies Pull requests that update a dependency file released

Comments

@amiceli
Copy link

amiceli commented Oct 4, 2023

Currently I'm working on a side project use Vue 3.
I've installed @blueprintui/components, version 1.18.1.

I import component in main.ts :

import '@blueprintui/components/include/button'
import '@blueprintui/components/include/header'
import '@blueprintui/components/include/dialog'
import '@blueprintui/components/include/forms'
import '@blueprintui/components/include/input'

Button, header, switch, etc works except input or password.

I've following error in console :

[The following properties on element bp-range will not trigger updates as expected because they are set using class fields: name. Native class fields and some compiled output will overwrite accessors used for detecting ](rror: The following properties on element bp-range will not trigger updates as expected because they are set using class fields: name. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.)

An example of my Vue component :

<template>
    <div>
        <bp-button
            @click="showDialog()"
            status="accent"
        >
            Ajouter
        </bp-button>

        <bp-field>
            <label>label</label>
            <bp-input></bp-input>
            <bp-password></bp-password>
            <bp-range></bp-range>
            <bp-switch checked></bp-switch>
        </bp-field>
    </div>
</template>

<script setup lang="ts">
    import { onMounted, onUpdated, ref } from 'vue'

    onMounted(() => {
        showDialog()
    })

    function showDialog () {
        // 
    }
</script>

Button works but all other components inside bp-field and bp-field itself failed.

I tries to install another versions by I still have that error.

Thanks for your help.

@coryrylan
Copy link
Member

I'm looking into this. I was able to create a reproduction with stackblitz. I'm guessing this has something to do with TS versions https://stackblitz.com/edit/blueprintui-vue-deqeh6?file=src%2FApp.vue

@coryrylan coryrylan added bug dependencies Pull requests that update a dependency file labels Oct 5, 2023
@coryrylan coryrylan self-assigned this Oct 5, 2023
@amiceli
Copy link
Author

amiceli commented Oct 8, 2023

Maybe it can help you, I replaced import '@blueprintui/components/include/input' in main.ts file with :

<script type="module">
    import 'https://cdn.jsdelivr.net/npm/@blueprintui/components/include/input.js/+esm';
</script>

In index.htmk and it works. I see bp-input and error message is not sent.

Before that, I tried to have same Typescript version.
In my project I used 5.1.6, I tries 5.0.4 like Blueprint. But it does nothing.

coryrylan added a commit that referenced this issue Oct 10, 2023
- lit 3.0.0-pre.1
- typescript 5.2.2

fixes #261

Signed-off-by: Cory Rylan <cory@coryrylan.com>
@amiceli
Copy link
Author

amiceli commented Oct 10, 2023

If you've published a beta version, I can try on my project if you want ;)

coryrylan added a commit that referenced this issue Oct 11, 2023
- lit 3.0.0-pre.1
- typescript 5.2.2

fixes #261

Signed-off-by: Cory Rylan <cory@coryrylan.com>
coryrylan added a commit that referenced this issue Oct 11, 2023
- lit 3.0.0-pre.1
- typescript 5.2.2

fixes #261

Signed-off-by: Cory Rylan <cory@coryrylan.com>
coryrylan added a commit that referenced this issue Oct 12, 2023
- lit 3.0.0
- typescript 5.2.2

fixes #261

Signed-off-by: Cory Rylan <cory@coryrylan.com>
coryrylan added a commit that referenced this issue Oct 12, 2023
- lit 3.0.0
- typescript 5.2.2

fixes #261

Signed-off-by: Cory Rylan <cory@coryrylan.com>
github-actions bot pushed a commit that referenced this issue Oct 12, 2023
## [1.18.2](v1.18.1...v1.18.2) (2023-10-12)

### Bug Fixes

* **build:** commit lint ([f161d36](f161d36))
* **build:** commit lint rule ([4f54895](4f54895))
* **deps:** update lit and typescript ([316e406](316e406)), closes [#261](#261)
@github-actions
Copy link

🎉 This issue has been resolved in version 1.18.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@amiceli
Copy link
Author

amiceli commented Oct 13, 2023

Thanks @coryrylan, I try on my project everything is ok ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants