Fix: Run NPM build.
This commit is contained in:
51
static/dist/js/main.bundle.js
vendored
51
static/dist/js/main.bundle.js
vendored
@@ -763,8 +763,6 @@ function dom_createClass(e, r, t) { return r && dom_defineProperties(e.prototype
|
||||
function dom_toPropertyKey(t) { var i = dom_toPrimitive(t, "string"); return "symbol" == dom_typeof(i) ? i : i + ""; }
|
||||
function dom_toPrimitive(t, r) { if ("object" != dom_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != dom_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
|
||||
|
||||
// Module for DOM manipulation
|
||||
var DOM = /*#__PURE__*/function () {
|
||||
function DOM() {
|
||||
dom_classCallCheck(this, DOM);
|
||||
@@ -1576,8 +1574,6 @@ function api_createClass(e, r, t) { return r && api_defineProperties(e.prototype
|
||||
function api_toPropertyKey(t) { var i = api_toPrimitive(t, "string"); return "symbol" == api_typeof(i) ? i : i + ""; }
|
||||
function api_toPrimitive(t, r) { if ("object" != api_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != api_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
|
||||
|
||||
// Module for API calls
|
||||
var API = /*#__PURE__*/function () {
|
||||
function API() {
|
||||
api_classCallCheck(this, API);
|
||||
@@ -1934,7 +1930,6 @@ var API = /*#__PURE__*/function () {
|
||||
const api = new API();
|
||||
export default api;
|
||||
|
||||
Example of using the API
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initializeApp();
|
||||
setupEventListeners();
|
||||
@@ -2049,24 +2044,6 @@ function router_toPrimitive(t, r) { if ("object" != router_typeof(t) || !t) retu
|
||||
|
||||
|
||||
|
||||
|
||||
// Create a context for the pages
|
||||
// const pagesContext = require.context('./pages', true, /\.js$/);
|
||||
|
||||
/*
|
||||
const pageModules = {
|
||||
// Core
|
||||
[hashPageHome]: () => import('./pages/core/home.js'),
|
||||
[hashPageContact]: () => import('./pages/core/contact.js'),
|
||||
[hashPageServices]: () => import('./pages/core/services.js'),
|
||||
[hashPageAdminHome]: () => import('./pages/core/admin_home.js'),
|
||||
// Legal
|
||||
[hashPageAccessibilityStatement]: () => import('./pages/legal/accessibility_statement.js'),
|
||||
[hashPageLicense]: () => import('./pages/legal/license.js'),
|
||||
// User
|
||||
// Add other pages here...
|
||||
};
|
||||
*/
|
||||
var Router = /*#__PURE__*/function () {
|
||||
function Router() {
|
||||
var _this = this;
|
||||
@@ -2241,12 +2218,10 @@ var Router = /*#__PURE__*/function () {
|
||||
DOM.loadPageBody(response.data);
|
||||
}
|
||||
}]);
|
||||
}(); // Create and export a singleton instance
|
||||
}();
|
||||
|
||||
var router = new Router();
|
||||
// import this for navigation
|
||||
|
||||
// Usage example (you can put this in your main.js or app.js)
|
||||
/*
|
||||
router.addRoute('/', () => {
|
||||
console.log('Home page');
|
||||
@@ -2258,7 +2233,6 @@ router.addRoute('/about', () => {
|
||||
// Load about page content
|
||||
});
|
||||
|
||||
// Example of how to use the router in other parts of your application
|
||||
export function setupNavigationEvents() {
|
||||
document.querySelectorAll('a[data-nav]').forEach(link => {
|
||||
link.addEventListener('click', (e) => {
|
||||
@@ -2270,10 +2244,8 @@ export function setupNavigationEvents() {
|
||||
}
|
||||
*/
|
||||
;// ./static/js/app.js
|
||||
// Main entry point for the application
|
||||
|
||||
|
||||
// import API from './api.js';
|
||||
function app_typeof(o) { "@babel/helpers - typeof"; return app_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, app_typeof(o); }
|
||||
function app_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
function app_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, app_toPropertyKey(o.key), o); } }
|
||||
@@ -2297,35 +2269,24 @@ var App = /*#__PURE__*/function () {
|
||||
}, {
|
||||
key: "setupEventListeners",
|
||||
value: function setupEventListeners() {
|
||||
// Global event listeners
|
||||
// document.addEventListener('click', this.handleGlobalClick.bind(this));
|
||||
// Add more global event listeners as needed
|
||||
}
|
||||
}, {
|
||||
key: "handleGlobalClick",
|
||||
value: function handleGlobalClick(event) {
|
||||
// Handle global click events
|
||||
}
|
||||
value: function handleGlobalClick(event) {}
|
||||
}, {
|
||||
key: "start",
|
||||
value: function start() {
|
||||
// Additional startup logic
|
||||
this.initPageCurrent();
|
||||
}
|
||||
}, {
|
||||
key: "initPageCurrent",
|
||||
value: function initPageCurrent() {
|
||||
/*
|
||||
_pageCurrent = Router.getPageCurrent();
|
||||
_pageCurrent.initialize();
|
||||
*/
|
||||
this.router.loadPageCurrent();
|
||||
}
|
||||
}]);
|
||||
}(); // Application instance
|
||||
}();
|
||||
var app = new App();
|
||||
|
||||
// DOM ready handler
|
||||
function domReady(fn) {
|
||||
if (document.readyState !== 'loading') {
|
||||
fn();
|
||||
@@ -2333,16 +2294,10 @@ function domReady(fn) {
|
||||
document.addEventListener('DOMContentLoaded', fn);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize and start the app when DOM is ready
|
||||
domReady(function () {
|
||||
app.initialize();
|
||||
});
|
||||
|
||||
// Expose app to window for debugging (optional)
|
||||
window.app = app;
|
||||
|
||||
// Export app if using modules
|
||||
/* harmony default export */ const js_app = ((/* unused pure expression or super */ null && (app)));
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user