Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@open-election-compass/ui
Advanced tools
Collection of Vue.js components for the OpenElectionCompass web interfaces.
Collection of Vue 3 components for the OpenElectionCompass web interfaces.
Use version <= 0.12.0 for Vue 2.
Components are documented using Storybook. 📗 Live-Components and Docs
Install the latest version of the OpenElectionCompass UI using your favourite package manager:
npm i @open-election-compass
import '@open-election-compass/ui/dist/style.css';
import {
AccordionList,
AsyncButton,
BaseButton,
FieldInput,
FieldSelect,
FieldSwitch,
FieldTextarea,
Icon,
Modal,
} from '@open-election-compass/ui';
// Install OpenElectionCompass UI
Vue.component('AccordionList', AccordionList);
Vue.component('AsyncButton', AsyncButton);
Vue.component('BaseButton', BaseButton);
Vue.component('FieldInput', FieldInput);
Vue.component('FieldSelect', FieldSelect);
Vue.component('FieldSwitch', FieldSwitch);
Vue.component('FieldTextarea', FieldTextarea);
Vue.component('Icon', Icon);
Vue.component('Modal', Modal);
OpenElectionCompass UI relies on common Vue.js packages you might have already installed in your application. To allow for maximum flexibility, you have to provide these yourself:
To use any of the Field components, you need to install VeeValidate and provide locales and rules of your choice:
import { defineRule } from 'vee-validate';
import { required, email, min } from '@vee-validate/rules';
defineRule('required', required);
defineRule('email', email);
defineRule('min', min);
VueI18n allows some components to come with their own translations, e.g. FieldSelect adds a 'Please choose' option:
import { createI18n } from 'vue-i18n';
import { deLocale, enLocale } from '@open-election-compass/ui';
const i18n = createI18n({
locale: 'en',
fallbackLocale: 'en',
messages: {
de: deLocale,
en: enLocale,
},
});
app.use(i18n);
The Modal component uses VueUse's ScrollLock to prevent scrolling of the body in the background, so VueUse is a peer dependency.
Many components use icons from FontAwesome 5. You can add your own selection of icons to the list or use a paid license. Make sure to include the icons listed here, though:
import { library } from '@fortawesome/fontawesome-svg-core';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import {
faAngleDown, faAngleLeft, faAngleRight, faAngleUp, faArrowRight, faBars, faCheck, faCircle, faChartBar, faExclamationCircle, faExternalLinkAlt, faFrown, faGrin, faLanguage, faMeh, faMehBlank, faMinus, faQuestion, faSlash, faSmile, faTimes, faUndo,
} from '@fortawesome/free-solid-svg-icons';
// Configure FontAwesome
Vue.component('FontAwesomeIcon', FontAwesomeIcon);
library.add(
faAngleDown, faAngleLeft, faAngleRight, faAngleUp, faArrowRight, faBars, faCheck, faCircle, faChartBar, faExclamationCircle, faExternalLinkAlt, faFrown, faGrin, faLanguage, faMeh, faMehBlank, faMinus, faQuestion, faSlash, faSmile, faTimes, faUndo,
);
We develop the components in this package in isolation using Storybook.
npm run dev
npm run test
npm run lint
npm run build
FAQs
Collection of Vue.js components for the OpenElectionCompass web interfaces.
The npm package @open-election-compass/ui receives a total of 1 weekly downloads. As such, @open-election-compass/ui popularity was classified as not popular.
We found that @open-election-compass/ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.