npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@actindo/core-ui

v0.0.56

Published

Core-UI library exported as Node.js module

Downloads

368

Readme

CORE_UI package

Core-UI library exported as Node.js module

Installation

Have NodeJS and NPM installed on your machine and clone this repository.

Using npm:

npm i --save @actindo/core-ui

Peer dependencies:

  • vue
npm i --save vue
  • vue-i18n
npm i --save vue-i18n
  • vue-router
npm i --save vue-router
  • vuetify
npm i --save vuetify
  • pinia
npm i --save pinia
  • @vuelidate/core
npm i --save @vuelidate/core
  • @vuelidate/validators
npm i --save @vuelidate/validators

Initial configuration

Prepare plugin initialization

// Styles
import "@mdi/font/css/materialdesignicons.css";
import "material-design-icons-iconfont/dist/material-design-icons.css";
import "@actindo/core-ui/styles";

// Locales
import en from "@/locales/en.json";
import de from "@/locales/de.json";

import { createApp } from "vue";
import { routerKey, routeLocationKey, viewDepthKey } from "vue-router";
import { createPinia } from "pinia";
import { createCoreUi } from "@actindo/core-ui";
import router from "./router";
import App from "./App.vue";

const pinia = createPinia();

const app = createApp(App)
  .use(createCoreUi, {
    integration: { pinia, routerKey, routeLocationKey, viewDepthKey },
    i18n: { messages: { en, de } },
  })
  .use(pinia)
  .use(router);

app.mount("#app");

Usage

Import needed components

<script setup lang="ts">
import { NotFound, ABtn } from "@actindo/core-ui";
</script>

<template>
  <NotFound code="" description="common.needAuthorization">
    <ABtn color="primary" size="large" :text="$t('common.openAccountPage')" />
  </NotFound>
</template>

<script setup lang="ts">
import { TabsNavigation, useNavigationTabs } from "@actindo/core-ui";
import { taxesRoutes } from "@/router/topBarRoutes";

const tabs = useNavigationTabs(taxesRoutes);
</script>

<template>
  <div class="d-flex flex-column h-100 overflow-hidden">
    <TabsNavigation class="taxes-view ma-2" :tabs="tabs" />
  </div>
</template>

<style lang="scss">
.taxes-view {
  .a-data-table {
    background-color: rgb(var(--v-theme-background_2));
  }
}
</style>

Import functions and types

import type { IDataTableQuery, IDataFetcherResponse } from "@actindo/core-ui";
import { httpClient } from "@actindo/core-ui";

import { BASE_API } from "../base";

const MODULE_BASE_API = `${BASE_API}Country.`;

export const mockApi = {
  async getCountries(
    query: IDataTableQuery,
  ): Promise<IDataFetcherResponse<any>> {
    return httpClient.post(`${MODULE_BASE_API}getCountries`, query);
  },
};

Externally defined components

  1. To make the components available for download and external use, it is necessary:
  • in the external-lib.vite.config.ts file
    • in the build.lib.entry section, add the path to the components
    • the path to the build results is determined by the LIB_FOLDER constant (dist-components by default )
  • build them vite build -c external-lib.vite.config.ts
  • deploy build artifacts
  1. To use externally defined component
import { getExternalComponent } from "@actindo/core-ui";

const AComponent = getExternalComponent({
  name: "component-name",
  url: "https://..../component.mjs",
});