From 37af655990b1bb3ad7187a21528a236a7f55ee2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr>
Date: Tue, 26 Mar 2024 16:22:37 +0100
Subject: [PATCH] =?UTF-8?q?-=20Mise=20=C3=A0=20niveau=20des=20versions=20d?=
 =?UTF-8?q?es=20d=C3=A9pendances=20-=20Int=C3=A9gration=20de=20BootstrapVu?=
 =?UTF-8?q?eNext?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 CHANGELOG.md                       |  7 +++++++
 README.md                          | 12 +++++++++++-
 doc/doc.md                         |  3 ++-
 js/Client/main.js                  |  2 ++
 js/Server/index.js                 | 10 +++++-----
 package.json                       | 17 +++++++++--------
 src/View/Helper/ViteViewHelper.php |  2 +-
 7 files changed, 37 insertions(+), 16 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 147a4b7..6589dd0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,13 @@
 CHANGELOG
 =========
 
+6.2.0 (26/03/2024)
+------------------
+
+- Mise à niveau des versions des dépendances
+- Intégration de BootstrapVueNext
+
+
 6.1.2 (22/02/2024)
 ------------------
 
diff --git a/README.md b/README.md
index cdf9565..ba52fa6 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@ et intégrer le tout à l'écosystème Unicaen.
 
 - PHP 8
 - Bootstrap 5
+- BootstrapVueNext
 - Node.js (sur les machines de développement uniquement : pas en production)
 - Laminas
 
@@ -29,7 +30,7 @@ qu'elles soient simples ou complexes.
 
 ### [Vite](https://vitejs.dev)
 
-Version 4
+Version 5
 
 Vite est un outil de construction qui vise à fournir une expérience de développement plus rapide et plus épurée 
 pour les projets web modernes. Il se compose de deux parties majeures :
@@ -48,3 +49,12 @@ Version 1
 Axios est un client HTTP basé sur les promesses. 
 Côté serveur, un plugin de contrôleur est proposé ainsi qu'un système permettant de construire des arborescences JSON 
 et côté client (navigateur) il utilise les XMLHttpRequests.
+
+### [BootstrapVueNext](https://bootstrap-vue-next.github.io/bootstrap-vue-next/docs)
+
+Version alpha
+
+Wrapper Bootstrap prêt pour Vue.js.
+Avec BootstrapVue, vous pouvez construire des projets réactifs, mobiles-first et accessibles ARIA sur le web en utilisant Vue.js et la bibliothèque CSS front-end la plus populaire au monde.
+
+BootstrapVueNext est une tentative d'avoir les composants BootstrapVue dans Vue 3, Bootstrap 5 et TypeScript. Un autre objectif est d'écrire les composants de manière simple et lisible pour offrir une meilleure expérience aux développeurs.
\ No newline at end of file
diff --git a/doc/doc.md b/doc/doc.md
index 906d53d..6bfdcc3 100644
--- a/doc/doc.md
+++ b/doc/doc.md
@@ -16,4 +16,5 @@ Sites officiels :
 
 - [Vue.js](https://vuejs.org/)
 - [Vite](https://vitejs.dev)
-- [Axios](https://axios-http.com/)
\ No newline at end of file
+- [Axios](https://axios-http.com/)
+- [BootstrapVueNext](https://bootstrap-vue-next.github.io/bootstrap-vue-next/docs)
\ No newline at end of file
diff --git a/js/Client/main.js b/js/Client/main.js
index b3e9597..b1dda1c 100644
--- a/js/Client/main.js
+++ b/js/Client/main.js
@@ -1,4 +1,5 @@
 import {createApp} from 'vue';
+import {createBootstrap} from 'bootstrap-vue-next';
 
 // on met en place le client d'UnicaenVue
 import unicaenVue from './unicaenVue';
@@ -39,6 +40,7 @@ function init(vues, options)
             }
         }
 
+        app.use(createBootstrap({components: true, directives: true}))
         app.mount(el);
 
         if (undefined !== options.afterMount){
diff --git a/js/Server/index.js b/js/Server/index.js
index 452275f..dcc69f8 100644
--- a/js/Server/index.js
+++ b/js/Server/index.js
@@ -124,12 +124,9 @@ function defineConfig(projectConfig) {
     const vite = require('vite');
     const liveReload = require('vite-plugin-live-reload');
     const Components = require('unplugin-vue-components/vite');
-
-
     const componentsDir = path.resolve(__dirname, '../../components');
     const components = findComponents(componentsDir);
-    //const resolvers = require('unplugin-vue-components/resolvers');
-
+    const resolvers = require('unplugin-vue-components/resolvers');
 
     const root = projectConfig.root ? projectConfig.root : 'root';
 
@@ -158,7 +155,9 @@ function defineConfig(projectConfig) {
             // fichier de démarrage
             rollupOptions: {
                 input: path.resolve(projectDir(), root, 'main.js'),
-            }
+            },
+            // chunkSizeWarningLimit augmenté : le vendor peut faire 1Mo (1024Ko)
+            chunkSizeWarningLimit: 1024
         },
         server: {
             // specs pour le serveur Node
@@ -177,6 +176,7 @@ function defineConfig(projectConfig) {
                     return components[componentName];
                 }
             },
+            resolvers.BootstrapVueNextResolver()
         ],
     };
 
diff --git a/package.json b/package.json
index 909bba7..187d5f3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "unicaen-vue",
-  "version": "1.0.0",
+  "version": "6.2.0",
   "description": "Intégration de Vue.js à l'écosystème Unicaen",
   "main": "./js/Server/index.js",
   "directories": {
@@ -10,12 +10,13 @@
   "license": "ISC",
   "private": true,
   "dependencies": {
-    "vue": "^3.2.45",
-    "@vitejs/plugin-vue": "^4.0.0",
-    "@vue/compiler-sfc": "^3.2.45",
-    "unplugin-vue-components": "^0.24.1",
-    "vite": "^4.0.0",
-    "vite-plugin-live-reload": "^3.0.1",
-    "axios": "^1.3.4"
+    "vue": "3.4.21",
+    "@vitejs/plugin-vue": "5.0.4",
+    "@vue/compiler-sfc": "3.4.21",
+    "unplugin-vue-components": "0.25.2",
+    "vite": "5.2.6",
+    "vite-plugin-live-reload": "3.0.3",
+    "axios": "1.6.8",
+    "bootstrap-vue-next": "0.16.6"
   }
 }
diff --git a/src/View/Helper/ViteViewHelper.php b/src/View/Helper/ViteViewHelper.php
index 5844bf1..4e38708 100755
--- a/src/View/Helper/ViteViewHelper.php
+++ b/src/View/Helper/ViteViewHelper.php
@@ -175,7 +175,7 @@ class ViteViewHelper extends AbstractHtmlElement
 
     protected function getManifest(): array
     {
-        $content = file_get_contents(getcwd() . '/' . $this->config['dist-path'] . '/manifest.json');
+        $content = file_get_contents(getcwd() . '/' . $this->config['dist-path'] . '/.vite/manifest.json');
 
         return json_decode($content, true);
     }
-- 
GitLab