diff --git a/package.json b/package.json index 96e343cede2bbdd7f2f95d8db4bb8c7155063f7b..9887aa7a3c174321002daa0a0e5745afd630dd8e 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "rollup-plugin-node-polyfills": "^0.2.1", "rollup-plugin-polyfill-node": "^0.9.0", "typescript": "^4.5.4", - "unplugin-vue-components": "0.17.11", + "unplugin-vue-components": "^0.19.6", "vite": "^2.8.6", "vite-plugin-vue2": "^1.9.3", "vite-plugin-windicss": "^1.8.3", diff --git a/src/components.d.ts b/src/components.d.ts index f78d7de5e69936bcff351cc62dea825602d31ab5..3e6c56844e222a62ff176b88666ae62f46b3062a 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -1,10 +1,68 @@ // generated by unplugin-vue-components // We suggest you to commit this file into source control // Read more: https://github.com/vuejs/vue-next/pull/3399 +import "@vue/runtime-core"; -declare module "vue" { +declare module "@vue/runtime-core" { export interface GlobalComponents { + BAlert: typeof import("bootstrap-vue")["BAlert"]; + BBadge: typeof import("bootstrap-vue")["BBadge"]; + BBreadcrumb: typeof import("bootstrap-vue")["BBreadcrumb"]; + BBreadcrumbItem: typeof import("bootstrap-vue")["BBreadcrumbItem"]; + BButton: typeof import("bootstrap-vue")["BButton"]; + BButtonGroup: typeof import("bootstrap-vue")["BButtonGroup"]; + BCard: typeof import("bootstrap-vue")["BCard"]; + BCardBody: typeof import("bootstrap-vue")["BCardBody"]; + BCardGroup: typeof import("bootstrap-vue")["BCardGroup"]; + BCardText: typeof import("bootstrap-vue")["BCardText"]; + BCol: typeof import("bootstrap-vue")["BCol"]; + BCollapse: typeof import("bootstrap-vue")["BCollapse"]; + BContainer: typeof import("bootstrap-vue")["BContainer"]; + BDropdown: typeof import("bootstrap-vue")["BDropdown"]; + BDropdownDivider: typeof import("bootstrap-vue")["BDropdownDivider"]; + BDropdownItem: typeof import("bootstrap-vue")["BDropdownItem"]; + BForm: typeof import("bootstrap-vue")["BForm"]; + BFormCheckbox: typeof import("bootstrap-vue")["BFormCheckbox"]; + BFormDatepicker: typeof import("bootstrap-vue")["BFormDatepicker"]; + BFormFile: typeof import("bootstrap-vue")["BFormFile"]; + BFormGroup: typeof import("bootstrap-vue")["BFormGroup"]; + BFormInput: typeof import("bootstrap-vue")["BFormInput"]; + BFormRadioGroup: typeof import("bootstrap-vue")["BFormRadioGroup"]; + BFormSelect: typeof import("bootstrap-vue")["BFormSelect"]; + BFormSelectOption: typeof import("bootstrap-vue")["BFormSelectOption"]; + BFormTag: typeof import("bootstrap-vue")["BFormTag"]; + BFormTags: typeof import("bootstrap-vue")["BFormTags"]; + BFormText: typeof import("bootstrap-vue")["BFormText"]; + BFormTextarea: typeof import("bootstrap-vue")["BFormTextarea"]; + BIcon: typeof import("bootstrap-vue")["BIcon"]; + BIconLink45deg: typeof import("bootstrap-vue")["BIconLink45deg"]; + BInputGroup: typeof import("bootstrap-vue")["BInputGroup"]; + BInputGroupAppend: typeof import("bootstrap-vue")["BInputGroupAppend"]; + BLink: typeof import("bootstrap-vue")["BLink"]; + BModal: typeof import("bootstrap-vue")["BModal"]; + BNavbar: typeof import("bootstrap-vue")["BNavbar"]; + BNavbarBrand: typeof import("bootstrap-vue")["BNavbarBrand"]; + BNavbarNav: typeof import("bootstrap-vue")["BNavbarNav"]; + BNavbarToggle: typeof import("bootstrap-vue")["BNavbarToggle"]; + BNavForm: typeof import("bootstrap-vue")["BNavForm"]; + BNavItem: typeof import("bootstrap-vue")["BNavItem"]; + BNavItemDropdown: typeof import("bootstrap-vue")["BNavItemDropdown"]; + BOverlay: typeof import("bootstrap-vue")["BOverlay"]; + BPagination: typeof import("bootstrap-vue")["BPagination"]; + BPopover: typeof import("bootstrap-vue")["BPopover"]; + BProgress: typeof import("bootstrap-vue")["BProgress"]; + BProgressBar: typeof import("bootstrap-vue")["BProgressBar"]; BreadCrumbs: typeof import("./components/elements/BreadCrumbs.vue")["default"]; + BRow: typeof import("bootstrap-vue")["BRow"]; + BSkeleton: typeof import("bootstrap-vue")["BSkeleton"]; + BSkeletonTable: typeof import("bootstrap-vue")["BSkeletonTable"]; + BSkeletonWrapper: typeof import("bootstrap-vue")["BSkeletonWrapper"]; + BSpinner: typeof import("bootstrap-vue")["BSpinner"]; + BTab: typeof import("bootstrap-vue")["BTab"]; + BTable: typeof import("bootstrap-vue")["BTable"]; + BTabs: typeof import("bootstrap-vue")["BTabs"]; + BToast: typeof import("bootstrap-vue")["BToast"]; + BTooltip: typeof import("bootstrap-vue")["BTooltip"]; CoscineCard: typeof import("./components/coscine/CoscineCard.vue")["default"]; CoscineFormGroup: typeof import("./components/coscine/CoscineFormGroup.vue")["default"]; CoscineHeadline: typeof import("./components/coscine/CoscineHeadline.vue")["default"]; diff --git a/src/modules/resource/components/create-resource/Configuration.vue b/src/modules/resource/components/create-resource/Configuration.vue index aed60555c50029f54fae70ce9b4c5d31f53154ae..568abc3a68c805b3f1ac296c552b9778191cd86c 100644 --- a/src/modules/resource/components/create-resource/Configuration.vue +++ b/src/modules/resource/components/create-resource/Configuration.vue @@ -51,7 +51,7 @@ </multiselect> <!-- Resource Text Field (see condition) --> - <b-input + <b-form-input v-else-if="resourceTypes.length === 1" id="ResourceType" v-model="selectedResourceType.iDisplayName" diff --git a/src/plugins/bootstrap-vue.ts b/src/plugins/bootstrap-vue.ts index 8cfcd1d7e1a41015ae08a45545b8865e732debb1..ba5ef15694d25d83ae919b2d1a122ac752f3a898 100644 --- a/src/plugins/bootstrap-vue.ts +++ b/src/plugins/bootstrap-vue.ts @@ -1,8 +1,7 @@ import Vue from "vue"; -import { BootstrapVue, BootstrapVueIcons } from "bootstrap-vue"; +import { IconsPlugin } from "bootstrap-vue"; -import "bootstrap/dist/css/bootstrap.css"; -import "bootstrap-vue/dist/bootstrap-vue.css"; +import "bootstrap/dist/css/bootstrap.min.css"; +import "bootstrap-vue/dist/bootstrap-vue.min.css"; -Vue.use(BootstrapVue); -Vue.use(BootstrapVueIcons); +Vue.use(IconsPlugin); diff --git a/src/util/bootstrap-vue-resolver.ts b/src/util/bootstrap-vue-resolver.ts new file mode 100644 index 0000000000000000000000000000000000000000..afc4e1dd9702e1cd045e884a62760ce2fe335bf7 --- /dev/null +++ b/src/util/bootstrap-vue-resolver.ts @@ -0,0 +1,15 @@ +import type { ComponentResolver } from "unplugin-vue-components/types"; + +/** + * Resolver for BootstrapVue + * + * @link https://github.com/bootstrap-vue/bootstrap-vue + */ +export function BootstrapVueResolver(): ComponentResolver { + return { + type: "component", + resolve: (name: string) => { + if (name.match(/^B[A-Z]/)) return { name, from: "bootstrap-vue" }; + }, + }; +} diff --git a/vite.config.js b/vite.config.js index 99943f65df93994d6e66e9b3eb2fb0ab2eb1b018..56ee32f7905e82fce15d97b7c68390f2010248fa 100644 --- a/vite.config.js +++ b/vite.config.js @@ -12,6 +12,8 @@ import replace from '@rollup/plugin-replace'; import WindiCSS from "vite-plugin-windicss"; import Components from "unplugin-vue-components/vite"; +import { BootstrapVueResolver } from "./src/util/bootstrap-vue-resolver"; + const config = defineConfig({ resolve: { alias: { @@ -111,6 +113,9 @@ const config = defineConfig({ dts: 'src/components.d.ts', include: [/\.vue$/, /\.vue\?vue/], exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/], + resolvers: [ + BootstrapVueResolver() + ], }), ], diff --git a/yarn.lock-workspace b/yarn.lock-workspace index 6b5d253ebb19c2c2eff13ff8f0809e60a2c517c4..eb61074a904f4798ebc8425b135dda9cc15ad657 100644 --- a/yarn.lock-workspace +++ b/yarn.lock-workspace @@ -14,15 +14,6 @@ __metadata: languageName: node linkType: hard -"@antfu/utils@npm:^0.3.0": - version: 0.3.0 - resolution: "@antfu/utils@npm:0.3.0" - dependencies: - "@types/throttle-debounce": ^2.1.0 - checksum: 1f42790560e1768e16d05e302c9f1a69e64c3e048ab5a79d2d9f5c0d92d350e910f54c097475a0ed702a576ce0d306a6af68c7b0c53335df109358cf13f0cd0c - languageName: node - linkType: hard - "@antfu/utils@npm:^0.5.0": version: 0.5.0 resolution: "@antfu/utils@npm:0.5.0" @@ -30,6 +21,13 @@ __metadata: languageName: node linkType: hard +"@antfu/utils@npm:^0.5.1": + version: 0.5.2 + resolution: "@antfu/utils@npm:0.5.2" + checksum: 9b91446b2dbb823abeeba1cc33d6ebf701a462923408ad4751fbe162da46ae0669c774c2b5435fc77691dc207ce5de5945e693d5163e07d6ef42e376b04c7af4 + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.16.7": version: 7.16.7 resolution: "@babel/code-frame@npm:7.16.7" @@ -1727,6 +1725,16 @@ __metadata: languageName: node linkType: hard +"@rollup/pluginutils@npm:^4.2.1": + version: 4.2.1 + resolution: "@rollup/pluginutils@npm:4.2.1" + dependencies: + estree-walker: ^2.0.1 + picomatch: ^2.2.2 + checksum: 6bc41f22b1a0f1efec3043899e4d3b6b1497b3dea4d94292d8f83b4cf07a1073ecbaedd562a22d11913ff7659f459677b01b09e9598a98936e746780ecc93a12 + languageName: node + linkType: hard + "@semantic-release/commit-analyzer@npm:^9.0.2": version: 9.0.2 resolution: "@semantic-release/commit-analyzer@npm:9.0.2" @@ -2156,13 +2164,6 @@ __metadata: languageName: node linkType: hard -"@types/throttle-debounce@npm:^2.1.0": - version: 2.1.0 - resolution: "@types/throttle-debounce@npm:2.1.0" - checksum: 70e219d000595108fce0dc624c8296e37cdb174b528e09c939da18e619da1c6df86b088659f5eb93cb146bd5fe2954597823c2e1f0849dc8f6585d87cbbf71b7 - languageName: node - linkType: hard - "@types/uuid@npm:^8.3.4": version: 8.3.4 resolution: "@types/uuid@npm:8.3.4" @@ -3989,7 +3990,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.4.1, chokidar@npm:^3.5.2": +"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.4.1, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -4779,6 +4780,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.4": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + "debuglog@npm:^1.0.1": version: 1.0.1 resolution: "debuglog@npm:1.0.1" @@ -6056,7 +6069,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9": version: 3.2.11 resolution: "fast-glob@npm:3.2.11" dependencies: @@ -8453,7 +8466,7 @@ __metadata: languageName: node linkType: hard -"local-pkg@npm:^0.4.0": +"local-pkg@npm:^0.4.1": version: 0.4.1 resolution: "local-pkg@npm:0.4.1" checksum: 4ab3b4853ffbc3b292a3ae2e22618dbc348418a2ebf60ada55fdcc5a8583f9167c89fc7977194ffa39d0a4c5078f9c421d246afdd252fea7a840f7a8f3b5f96b @@ -8658,6 +8671,15 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:^0.26.1": + version: 0.26.2 + resolution: "magic-string@npm:0.26.2" + dependencies: + sourcemap-codec: ^1.4.8 + checksum: b4db4e2b370ac8d9ffc6443a2b591b75364bf1fc9121b5a4068d5b89804abff6709d1fa4a0e0c2d54f2e61e0e44db83efdfe219a5ab0ba6d25ee1f2b51fbed55 + languageName: node + linkType: hard + "make-dir@npm:^2.0.0": version: 2.1.0 resolution: "make-dir@npm:2.1.0" @@ -12984,7 +13006,7 @@ __metadata: semantic-release: ^19.0.2 stream-to-string: ^1.2.0 typescript: ^4.5.4 - unplugin-vue-components: 0.17.11 + unplugin-vue-components: ^0.19.6 uuid: ^8.3.2 vite: ^2.8.6 vite-aliases: ^0.9.1 @@ -13066,20 +13088,20 @@ __metadata: languageName: node linkType: hard -"unplugin-vue-components@npm:0.17.11": - version: 0.17.11 - resolution: "unplugin-vue-components@npm:0.17.11" +"unplugin-vue-components@npm:^0.19.6": + version: 0.19.6 + resolution: "unplugin-vue-components@npm:0.19.6" dependencies: - "@antfu/utils": ^0.3.0 - "@rollup/pluginutils": ^4.1.1 - chokidar: ^3.5.2 - debug: ^4.3.2 - fast-glob: ^3.2.7 - local-pkg: ^0.4.0 - magic-string: ^0.25.7 - minimatch: ^3.0.4 - resolve: ^1.20.0 - unplugin: ^0.2.21 + "@antfu/utils": ^0.5.1 + "@rollup/pluginutils": ^4.2.1 + chokidar: ^3.5.3 + debug: ^4.3.4 + fast-glob: ^3.2.11 + local-pkg: ^0.4.1 + magic-string: ^0.26.1 + minimatch: ^5.0.1 + resolve: ^1.22.0 + unplugin: ^0.6.3 peerDependencies: "@babel/parser": ^7.15.8 "@babel/traverse": ^7.15.4 @@ -13089,27 +13111,32 @@ __metadata: optional: true "@babel/traverse": optional: true - checksum: 469ddce824b83be7d0a21e8ed076b18ecf3880cbd397f40ff6d9e4f6bc0cfbc076556b65076a15021d72fbe550fb96c74fcf69e55680a8375d5d6f412650888a + checksum: 05ad70451e85dfdd6777b41be2d58aadf5689a5f32321c187d8741f45084c6945617dc633f6356f61deff398f90ee8e722c2f12f063e18fc6a1a3dfd0071040d languageName: node linkType: hard -"unplugin@npm:^0.2.21": - version: 0.2.21 - resolution: "unplugin@npm:0.2.21" +"unplugin@npm:^0.6.3": + version: 0.6.3 + resolution: "unplugin@npm:0.6.3" dependencies: + chokidar: ^3.5.3 + webpack-sources: ^3.2.3 webpack-virtual-modules: ^0.4.3 peerDependencies: + esbuild: ">=0.13" rollup: ^2.50.0 vite: ^2.3.0 webpack: 4 || 5 peerDependenciesMeta: + esbuild: + optional: true rollup: optional: true vite: optional: true webpack: optional: true - checksum: 8f04d3939c0c8fa53e44b942650d1886034af3d74396b57fd7e9ba24774e75ff67036fcfc29531ae0669414f2a301a299168c2505278a48d8aec3281aac99393 + checksum: 14e1f9c941e87e97fdda3efc745183e027de7d8b88eed8be5fa0708c2ec5dd114cc10e569c4b9dd2dafc89ba84d8bf90935d01e02cef510b7faedaa8af2b081f languageName: node linkType: hard @@ -13587,6 +13614,13 @@ __metadata: languageName: node linkType: hard +"webpack-sources@npm:^3.2.3": + version: 3.2.3 + resolution: "webpack-sources@npm:3.2.3" + checksum: 989e401b9fe3536529e2a99dac8c1bdc50e3a0a2c8669cbafad31271eadd994bc9405f88a3039cd2e29db5e6d9d0926ceb7a1a4e7409ece021fe79c37d9c4607 + languageName: node + linkType: hard + "webpack-virtual-modules@npm:^0.4.3": version: 0.4.3 resolution: "webpack-virtual-modules@npm:0.4.3"