diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e766af922c5..91fc17a1c32 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,6 +19,7 @@ repos: name: eslint entry: npm run eslint:fix language: system + files: arches/app/src - id: typescript name: typescript entry: npm run ts:check diff --git a/arches/app/media/js/utils/create-vue-application.js b/arches/app/media/js/utils/create-vue-application.js index e00923d9554..9fbc526a43b 100644 --- a/arches/app/media/js/utils/create-vue-application.js +++ b/arches/app/media/js/utils/create-vue-application.js @@ -6,26 +6,12 @@ import FocusTrap from 'primevue/focustrap'; import StyleClass from 'primevue/styleclass'; import ToastService from 'primevue/toastservice'; import Tooltip from 'primevue/tooltip'; - -import Aura from 'primevue/themes/aura'; +import arches from 'arches'; import { createApp } from 'vue'; import { createGettext } from "vue3-gettext"; -import arches from 'arches'; - -const DEFAULT_THEME = { - theme: { - preset: Aura, - options: { - prefix: 'p', - darkModeSelector: 'system', - cssLayer: false - } - } -}; - -export default async function createVueApplication(vueComponent, themeConfiguration) { +export default async function createVueApplication(vueComponent){ /** * This wrapper allows us to maintain a level of control inside arches-core * over Vue apps. For instance this allows us to abstract i18n setup/config @@ -33,18 +19,18 @@ export default async function createVueApplication(vueComponent, themeConfigurat * we'd like to use across the Arches ecosystem will be available. This also * Vue apps more easily extensible if we choose to add plugins or logic in * the future. - **/ + **/ /** * TODO: cbyrd #10501 - we should add an event listener that will re-fetch i18n data * and rebuild the app when a specific event is fired from the LanguageSwitcher component. - **/ - return fetch(arches.urls.api_get_frontend_i18n_data).then(function(resp) { + **/ + return fetch(arches.urls.api_get_frontend_i18n_data).then(resp => { if (!resp.ok) { throw new Error(resp.statusText); } return resp.json(); - }).then(function(respJSON) { + }).then(respJSON => { const gettext = createGettext({ availableLanguages: respJSON['enabled_languages'], defaultLanguage: respJSON['language'], @@ -52,8 +38,7 @@ export default async function createVueApplication(vueComponent, themeConfigurat }); const app = createApp(vueComponent); - - app.use(PrimeVue, themeConfiguration || DEFAULT_THEME); + app.use(PrimeVue); app.use(gettext); app.use(ConfirmationService); app.use(DialogService); diff --git a/arches/app/media/js/views/plugin-standalone.js b/arches/app/media/js/views/plugin-standalone.js index 04502ea6aa5..f9eab8d3560 100644 --- a/arches/app/media/js/views/plugin-standalone.js +++ b/arches/app/media/js/views/plugin-standalone.js @@ -1,7 +1,7 @@ import { defineAsyncComponent } from 'vue'; import createVueApplication from 'utils/create-vue-application'; -import pluginData from 'views/plugin-data'; +const pluginData = require('views/plugin-data'); // workaround for webpack failures surrounding dynamic imports const vuePluginPath = pluginData['component'].replace('src/', '').replace('.vue', ''); diff --git a/arches/app/templates/base.htm b/arches/app/templates/base.htm index 6060af4393c..da7e9edeb2f 100644 --- a/arches/app/templates/base.htm +++ b/arches/app/templates/base.htm @@ -46,6 +46,8 @@ {% block css %} + + {% render_bundle 'css/arches' 'css' %} {% render_bundle 'css/core' 'css' %} diff --git a/arches/app/templates/views/plugin-standalone.htm b/arches/app/templates/views/plugin-standalone.htm index 22d7a13f605..b42c016d1ed 100644 --- a/arches/app/templates/views/plugin-standalone.htm +++ b/arches/app/templates/views/plugin-standalone.htm @@ -43,6 +43,8 @@ {% block css %} + + {% endblock css %} diff --git a/package.json b/package.json index e3bd7d75e57..34599f6b2ca 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "moment": "^2.29.4", "nouislider": "11.0.3", "numeral": "^2.0.6", - "primevue": "4.0.0-beta.3", + "primevue": "^3.51.0", "proj4": "^2.3.15", "regenerator-runtime": "^0.14.1", "requirejs": "~2.3.2",