@glance-project/fence-vue
| Install | |
|---|---|
npm install @glance-project/fence-vue@1.4.5 |
|
| Latest Version: | 1.4.5 |
| Vue: | 2 |
| Last Updated: | Sep 30, 2026 |
| Links: | Repository · npm |
fence-vue
Fence components library built with Vue
Documentation
Documentation can be found at https://cern.ch/fence-vue
Bug report
Errors should be reported at JIRA. You can also find there open, in progress and closed issues.
Keycloak authentication
main({ auth: { sso: 'keycloak', clientId, refreshInterval } }) signs the user
in with keycloak-js 24 or later. CERN's Keycloak only puts the nonce claim
in the ID token, and older adapters also expected it in the access and refresh
tokens, which made them discard every login and loop back to the SSO page.
keycloak-js 24+ ships optional chaining, which the webpack 4 parser used by
Vue CLI 4 cannot read. Applications built with Vue CLI 4 must transpile it in
vue.config.js:
module.exports = {
transpileDependencies: ['vuetify', 'keycloak-js'],
};
Styles
src/assets/style/main.scss is the global stylesheet (fence-vue styles and
Bootstrap): import it once per application, for instance from main.js.
src/assets/style/variables.scss only holds variables, functions and mixins
(fence-vue's $default-* values, Bootstrap's variables and mixins) and emits
no CSS. It is the file to inject into component style blocks, for instance
with sass-loader's additionalData in vue.config.js:
module.exports = {
css: {
loaderOptions: {
scss: {
additionalData: '@import "@glance-project/fence-vue/src/assets/style/variables";',
},
},
},
};
Injecting main.scss instead compiles Bootstrap once per component and ships
a copy of it in every component's CSS.
Icons
FenceIcon renders Font Awesome icons registered with registerIcons.
fence-vue registers the icons its own components use; an application
registers the icons it uses once, before the first render:
import { faPlus, faTrashAlt } from '@fortawesome/free-solid-svg-icons';
import { registerIcons } from '@glance-project/fence-vue';
registerIcons(faPlus, faTrashAlt);
An icon that is not registered renders as a question mark and logs a warning
outside production. Up to 0.19, FenceIcon loaded any icon on demand with a
dynamic import(), which made webpack bundle the whole icon set (1000+
modules and chunks) in every application.
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.4.5 | ^2.6.11 | ||
| 1.4.4 | ^2.6.11 | ||
| 1.4.3 | ^2.6.11 | ||
| 1.4.2 | ^2.6.11 | ||
| 1.4.1 | ^2.6.11 | ||
| 1.3.0 | ^2.6.11 | ||
| 1.2.0 | ^2.6.11 | ||
| 1.1.0 | ^2.6.11 | ||
| 1.0.0 | ^2.6.11 | ||
| 0.20.0 | ^2.6.10 | ||
| 0.19.1 | ^2.6.10 | ||
| 0.19.0 | ^2.6.10 | ||
| 0.18.3 | ^2.6.10 | ||
| 0.18.2 | ^2.6.10 | ||
| 0.18.1 | ^2.6.10 | ||
| 0.18.0 | ^2.6.10 | ||
| 0.17.4 | ^2.6.10 | ||
| 0.17.3 | ^2.6.10 | ||
| 0.17.2 | ^2.6.10 | ||
| 0.17.1 | ^2.6.10 | ||
| 0.17.0 | ^2.6.10 | ||
| 0.16.0 | ^2.6.10 | ||
| 0.15.0 | ^2.6.10 | ||
| 0.14.5 | ^2.6.10 | ||
| 0.14.4 | ^2.6.10 | ||
| 0.14.3 | ^2.6.10 | ||
| 0.14.2 | ^2.6.10 | ||
| 0.14.1 | ^2.6.10 | ||
| 0.14.0 | ^2.6.10 | ||
| 0.13.2 | ^2.6.10 |
Showing the latest 30 of 55. See every release on npm
Pre-releases (8)
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.0-alpha.15 | ^2.6.11 | ||
| 1.0.0-alpha.14 | ^2.6.11 | ||
| 1.0.0-alpha.12 | ^2.6.11 | ||
| 1.0.0-alpha.11 | ^2.6.11 | ||
| 1.0.0-alpha.10 | ^2.6.11 | ||
| 1.0.0-alpha.9 | ^2.6.11 | ||
| 1.0.0-alpha.8 | ^2.6.11 | ||
| 1.0.0-aplha.13 | ^2.6.11 |