- Introduction of eveai-listview (to select objects) that is sortable, filterable, ...
- npm build does now also include building css files. - Source javascript and css are now defined in the source directories (eveai_app or eveai_chat_client), and automatically built for use with nginx - eveai.css is now split into several more manageable files (per control type)
This commit is contained in:
@@ -1,50 +1,89 @@
|
||||
// Importeer de bibliotheken die je wilt bundelen.
|
||||
// Parcel zal deze vinden in je node_modules map.
|
||||
// CSS imports - ALLEMAAL hier importeren, niet in main.css!
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import 'tabulator-tables/dist/css/tabulator_bootstrap5.min.css';
|
||||
import 'select2/dist/css/select2.min.css';
|
||||
import 'vanilla-jsoneditor/themes/jse-theme-dark.css';
|
||||
import 'prismjs/themes/prism.css';
|
||||
import 'highlight.js/styles/default.css';
|
||||
import 'nouislider/dist/nouislider.css';
|
||||
|
||||
// Lokale CSS files
|
||||
// Material Kit Pro
|
||||
import '../../../eveai_app/static/assets/css/material-kit-pro.css';
|
||||
import '../../../eveai_app/static/assets/css/nucleo-icons.css';
|
||||
import '../../../eveai_app/static/assets/css/nucleo-svg.css';
|
||||
// Eveai customisations
|
||||
import '../../../eveai_app/static/assets/css/eveai.css';
|
||||
import '../../../eveai_app/static/assets/css/eveai-chat-session-view.css';
|
||||
import '../../../eveai_app/static/assets/css/eveai-forms.css'
|
||||
import '../../../eveai_app/static/assets/css/eveai-json-editor.css'
|
||||
import '../../../eveai_app/static/assets/css/eveai-markdown.css'
|
||||
import '../../../eveai_app/static/assets/css/eveai-select2.css'
|
||||
import '../../../eveai_app/static/assets/css/eveai-tabulator.css'
|
||||
import '../../../eveai_app/static/assets/css/eveai-responsive-table.css'
|
||||
|
||||
// Javascript Libraries
|
||||
|
||||
// jQuery
|
||||
import $ from 'jquery';
|
||||
// Maak jQuery globaal beschikbaar als window.jQuery en window.$
|
||||
// Dit is vaak nodig als oudere scripts of plugins dit verwachten.
|
||||
window.jQuery = $;
|
||||
window.$ = $;
|
||||
|
||||
// Popper.js (noodzakelijk voor Bootstrap 5 dropdowns, tooltips, popovers)
|
||||
// Controleer je package.json. Als je Bootstrap 5 gebruikt, heb je waarschijnlijk '@popperjs/core' nodig.
|
||||
// Als 'popper.js' in je package.json staat, is dat v1, en moet je mogelijk de import aanpassen
|
||||
// of Bootstrap's eigen gebundelde Popper gebruiken (indien aanwezig).
|
||||
import * as Popper from '@popperjs/core';
|
||||
window.Popper = Popper; // Maak het globaal beschikbaar als Bootstrap het extern verwacht.
|
||||
window.Popper = Popper;
|
||||
|
||||
// Bootstrap JavaScript
|
||||
import * as bootstrap from 'bootstrap'; // Importeer Bootstrap als object
|
||||
window.bootstrap = bootstrap; // Maak bootstrap globaal beschikbaar
|
||||
|
||||
// Bootstrap's JS koppelt zichzelf meestal aan jQuery en gebruikt Popper.
|
||||
// Als je 'bootstrap' als object nodig hebt (bijv. voor new bootstrap.Modal()), importeer het dan als:
|
||||
// import * as bootstrap from 'bootstrap';
|
||||
// window.bootstrap = bootstrap;
|
||||
|
||||
// DataTables.net Core
|
||||
import DataTable from 'datatables.net';
|
||||
// Maak DataTable globaal beschikbaar
|
||||
window.DataTable = DataTable;
|
||||
|
||||
// Select2
|
||||
// Select2 is een jQuery plugin, dus het moet na jQuery geïmporteerd worden.
|
||||
// Het zou zichzelf moeten koppelen aan de jQuery instance.
|
||||
import 'select2';
|
||||
|
||||
// vanilla-jsoneditor
|
||||
// De import hieronder is voor recentere versies van vanilla-jsoneditor.
|
||||
// Controleer of de versie in je package.json ('^0.5.0') hiermee compatibel is.
|
||||
// Mogelijk moet je vanilla-jsoneditor updaten in package.json
|
||||
// of een andere import/initialisatie gebruiken voor v0.5.0.
|
||||
import { createJSONEditor } from 'vanilla-jsoneditor';
|
||||
// import { createJSONEditor } from 'vanilla-jsoneditor/standalone.js' staat in de documentatie
|
||||
// Maak de factory functie globaal beschikbaar als je dit elders in je code gebruikt.
|
||||
window.createJSONEditor = createJSONEditor;
|
||||
|
||||
import './tabulator-setup.js';
|
||||
|
||||
import { createApp } from 'vue';
|
||||
window.Vue = { createApp };
|
||||
|
||||
import { marked } from 'marked';
|
||||
window.marked = marked;
|
||||
|
||||
import Typed from 'typed.js';
|
||||
window.Typed = Typed;
|
||||
|
||||
import Prism from 'prismjs';
|
||||
import 'prismjs/components/prism-javascript';
|
||||
import 'prismjs/components/prism-json';
|
||||
import 'prismjs/components/prism-python';
|
||||
import 'prismjs/components/prism-bash';
|
||||
window.Prism = Prism;
|
||||
|
||||
import hljs from 'highlight.js';
|
||||
window.hljs = hljs;
|
||||
|
||||
import * as anime from 'animejs';
|
||||
window.anime = anime;
|
||||
|
||||
import noUiSlider from 'nouislider';
|
||||
window.noUiSlider = noUiSlider;
|
||||
|
||||
// Material Kit Pro main script (blijft local file)
|
||||
import '../../../eveai_app/static/assets/js/material-kit-pro.js';
|
||||
|
||||
// Conditioneel laden van chat client code
|
||||
// if (document.querySelector('.chat-container') ||
|
||||
// window.location.pathname.includes('/chat') ||
|
||||
// document.body.classList.contains('chat-page')) {
|
||||
//
|
||||
// import('./chat-client.js').then(() => {
|
||||
// console.log('Chat client modules dynamisch geladen.');
|
||||
// }).catch(error => {
|
||||
// console.error('Fout bij laden chat client modules:', error);
|
||||
// });
|
||||
// }
|
||||
|
||||
// Eventueel een log om te bevestigen dat de bundel is geladen
|
||||
console.log('JavaScript bibliotheken gebundeld en geladen via main.js.');
|
||||
console.log('JavaScript en CSS bibliotheken gebundeld en geladen via main.js.');
|
||||
|
||||
Reference in New Issue
Block a user