Skip to content

Commit ba433f2

Browse files
committed
feat(NcSelect): use @nextcloud/vue-select 4.0.0
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
1 parent 77a263d commit ba433f2

4 files changed

Lines changed: 26 additions & 19 deletions

File tree

package-lock.json

Lines changed: 14 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"@nextcloud/logger": "^3.0.3",
8888
"@nextcloud/router": "^3.1.0",
8989
"@nextcloud/sharing": "^0.4.0",
90+
"@nextcloud/vue-select": "^4.0.0",
9091
"@vuepic/vue-datepicker": "^11.0.3",
9192
"@vueuse/components": "^14.2.1",
9293
"@vueuse/core": "^14.2.1",
@@ -117,8 +118,7 @@
117118
"unist-builder": "^4.0.0",
118119
"unist-util-visit": "^5.1.0",
119120
"vue": "^3.5.18",
120-
"vue-router": "^5.0.4",
121-
"vue-select": "^4.0.0-beta.6"
121+
"vue-router": "^5.0.4"
122122
},
123123
"devDependencies": {
124124
"@babel/plugin-syntax-import-assertions": "^7.28.6",

src/components/NcSelect/NcSelect.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ import {
395395
offset,
396396
shift,
397397
} from '@floating-ui/dom'
398+
import { VueSelect } from '@nextcloud/vue-select'
398399
import { h, warn } from 'vue'
399-
import VueSelect from 'vue-select'
400400
import ChevronDown from 'vue-material-design-icons/ChevronDown.vue'
401401
import Close from 'vue-material-design-icons/Close.vue'
402402
import NcEllipsisedOption from '../NcEllipsisedOption/NcEllipsisedOption.vue'
@@ -405,11 +405,6 @@ import { t } from '../../l10n.ts'
405405
import { createElementId } from '../../utils/createElementId.ts'
406406
import { isLegacy } from '../../utils/legacy.ts'
407407
408-
// TODO: Use @nextcloud/vue-select once a vue 3 version is available.
409-
// Until then, all @nextcloud/vue-select specific improvements won't be available.
410-
// E.g. the `limit` prop has no effect, currently.
411-
import 'vue-select/dist/vue-select.css'
412-
413408
export default {
414409
name: 'NcSelect',
415410

vitest.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ export default async (env) => {
2828
'node_modules/**',
2929
'docs/**',
3030
],
31+
// @nextcloud/vue-select's ESM bundle imports its own CSS inline
32+
// (`import './assets/*.css'` at the top of dist/index.mjs). Routing
33+
// it through Vite's transform pipeline lets the CSS import be
34+
// handled instead of reaching Node's native ESM loader.
35+
server: {
36+
deps: {
37+
inline: ['@nextcloud/vue-select'],
38+
},
39+
},
3140
},
3241
})
3342
}

0 commit comments

Comments
 (0)