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

@amsom-habitat/amsom-upload-file

v1.0.0

Published

Ce package propose un composant d'envoie de fichier.

Downloads

58

Readme

AMSOM UploadFile

Ce package propose un composant d'envoie de fichier.

Installation

npm i @amsom-habitat/upload-file

Développment

Après avoir fait vos dev, veillez à bien tenir à jour le changelog.md ainsi que la version du package.json puis faites :

git add .
git commit -m '<commentaire'
git push origin <branch>

Tests

Les tests sont réalisé de manière automatique sur les branches main et dev mais peuvent être fait localement, notemment pour voir l'evolution du développement via la commande :

npm run storybook

Le valideur devra, si des changements sont observés, aller sur la pipeline pour valider les différences à l'aide de chromatic, sans cela aucun merge-request ne sera possible. Si un merge est effectué, une double verification sera necessaire.

Déploiement

Après avoir merge les dev sur la branche main, exécutez :

make publish

Cette commande vérifie la version, le changelog et publie le tout

Utilisation

Props

  • name : Nom de l'input
  • pjName : Nom de la pj à afficher
  • fileName : Nom du fichier à stocker
  • subText : Indication complementaire
  • title : Titre une fois le fichier chargé
  • required : Indique si le fichier est requis
  • label : Label si il est différent de pjName pour l'input
  • modelValue : Objet contenant les valeurs du fichier
  • gedFile : Objet contenant le fichier ged le cas echeant
  • readStatus : Indique l'etat de lecture du fichier
  • readOnly : Indique si le champ est en lecture seule
  • rejectStatus : Indique si le fichier a été rejeté
  • clickFileHandler : Surcharge de la fonction à appeler lors du click sur le fichier

Emits

  • delete-file : Quand le fichier est supprimé
  • file-loading : Quand le chargement change de status

Example complet

<tempate>
    <span v-if="fileLoadingCount > 0">Chargement en cours...</span>
    <amsom-upload-file
      v-model="individu.pjCMI"
      required
      name="cmi"
      pj-name="Carte Mobilité Inclusion"
      label="Carte Mobilité Inclusion recto/verso *"
      fileName="TOTO Dupont - Carte mobilité inclusion"
      title="Pièce(s) justificative(s)"
      @delete-file="delete individu.pjCMI"
      @file-loading="updateFileLoading"
    />
</template>

<script>
import {AmsomUploadFile} from '@amsom-habitat/upload-file'

  export default {
    name: 'TestPage',
    components: {
      AmsomUploadFile,
    },
    data() {
        return {
            individu: {
              id: 1,
              nom: 'Dupont',
              prenom: 'Toto'
            },
            fileLoadingCount: 0
        }
    },
    methods: {
      updateFileLoading(isLoading) {
          if (isLoading) this.fileLoadingCount++;
          else this.fileLoadingCount--;
      }
    }
}
</script>