adrema-form/src/main.js

21 lines
829 B
JavaScript
Raw Normal View History

2024-02-03 20:41:28 +01:00
import {defineCustomElement} from 'vue';
import classes from './style.css?inline';
import carousel from 'vue3-carousel/dist/carousel.css?inline';
import carouselStyle from './carousel.css?inline';
import Eventindex from './Eventindex.ce.vue';
import Eventform from './Eventform.ce.vue';
2023-12-24 02:24:48 +01:00
2024-02-03 20:41:28 +01:00
import axios from 'axios';
2023-12-31 14:20:32 +01:00
window.axios = axios;
2024-02-03 20:41:28 +01:00
axios.defaults.baseURL = window.document.querySelector('[name="adrema_base_url"]').content;
2023-12-31 14:20:32 +01:00
2023-12-24 22:25:17 +01:00
window.hasKeys = function (object, expected) {
2024-02-03 20:41:28 +01:00
return typeof object === 'object' && JSON.stringify(Object.keys(object).sort()) === JSON.stringify(expected.sort());
2023-12-24 22:25:17 +01:00
};
2023-12-24 17:36:34 +01:00
Eventform.styles = [classes, carousel, carouselStyle];
Eventindex.styles = [classes];
2023-12-24 02:24:48 +01:00
2024-02-03 20:41:28 +01:00
customElements.define('event-form', defineCustomElement(Eventform));
customElements.define('event-index', defineCustomElement(Eventindex));