npm audit fix + bump to vue 3

This commit is contained in:
Jérémy Munsch 2024-01-23 09:35:41 +01:00
parent 3bd069183d
commit 5ef75ebd30
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
6 changed files with 2707 additions and 9510 deletions

12163
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -10,27 +10,24 @@
"production": "mix --production" "production": "mix --production"
}, },
"devDependencies": { "devDependencies": {
"axios": "^0.21", "animate.css": "^4.1.1",
"axios": "^1.6.5",
"bootstrap": "^5.1.3", "bootstrap": "^5.1.3",
"clean-webpack-plugin": "^3.0.0", "clean-webpack-plugin": "^3.0.0",
"jquery": "^3.6", "jquery": "^3.6",
"laravel-mix": "^6.0.6", "laravel-mix": "^6.0.6",
"laravel-mix-polyfill": "^3.0.1", "laravel-mix-polyfill": "^3.0.1",
"lodash": "^4.17.19", "lodash": "^4.17.19",
"mini-css-extract-plugin": "^1.6.2",
"popper.js": "^1.16.1", "popper.js": "^1.16.1",
"postcss": "^8.1.14", "postcss": "^8.1.14",
"resolve-url-loader": "^4.0.0", "resolve-url-loader": "^5.0.0",
"sass": "^1.32.11", "sass": "^1.32.11",
"sass-loader": "^11.0.1", "sass-loader": "^12.6.0",
"ui": "^0.2.4", "ui": "^0.2.4",
"vue-loader": "^15.9.8", "vue": "^3.3.12",
"vue-select": "^3.16.0", "vue-loader": "^17.4.2",
"vue-template-compiler": "^2.6.14", "vue-select": "^4.0.0-beta.6",
"webpack": "^5.64.4" "vue-template-compiler": "^2.7.16"
},
"dependencies": {
"animate.css": "^4.1.1",
"mini-css-extract-plugin": "^1.6.2",
"vue": "^2.6.14"
} }
} }

View file

@ -31,8 +31,9 @@
</template> </template>
<script> <script>
import { defineComponent } from "vue";
export default { export default defineComponent({
mounted() { mounted() {
this.pictos = JSON.parse(this.dbpictos); this.pictos = JSON.parse(this.dbpictos);
if (this.pictos.length === 0){ if (this.pictos.length === 0){
@ -133,7 +134,7 @@ export default {
this.updateCount(); this.updateCount();
} }
} }
} });
</script> </script>
<style> <style>

View file

@ -22,7 +22,9 @@
</template> </template>
<script> <script>
export default { import { defineComponent } from "vue";
export default defineComponent({
mounted() { mounted() {
this.range = JSON.parse(this.dbRange); this.range = JSON.parse(this.dbRange);
this.range.label = this.range.name + ' - ' + this.range.type; this.range.label = this.range.name + ' - ' + this.range.type;
@ -78,5 +80,5 @@ export default {
} }
} }
} }
} });
</script> </script>

20
resources/js/vuejs.js vendored
View file

@ -1,13 +1,23 @@
window.Vue = require('vue').default; import Vue, { createApp } from "vue";
import ProductsPictos from "./components/backend/ProductsPictos.vue";
Vue.component('products-pictos', require('./components/backend/ProductsPictos.vue').default); const setupApp = (app) => {
Vue.component('ranges-sub-ranges', require('./components/backend/RangesSubRanges.vue').default); app.config.globalProperties.window = window;
app.config.globalProperties.document = document;
};
/** /**
* Next, we will create a fresh Vue application instance and attach it to * Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application * the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs. * or customize the JavaScript scaffolding to fit your unique needs.
*/ */
for (let el of document.getElementsByClassName('vueComponent')) { for (let el of document.getElementsByClassName("products-pictos")) {
new Vue({ el: el }); const app = createApp(ProductsPictos);
setupApp(app);
app.mount(el);
}
for (let el of document.getElementsByClassName("ranges-sub-ranges")) {
const app = createApp(RangesSubRanges);
setupApp(app);
app.mount(el);
} }

View file

@ -2,4 +2,4 @@
@import "layouts/backend/top_nav"; @import "layouts/backend/top_nav";
@import "vue-select/src/scss/vue-select.scss"; @import "vue-select/dist/vue-select.css";