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

onpe-alert

v1.0.1

Published

Componente para mostrar mensajes de resultados.

Downloads

11

Readme

Alert

Componente para mostrar ventanas de resultados.

Requerimientos

  • AngularJS Material (y sus dependencias necesarias)

Instalación y uso

  • Instalar el componente utilizando npm:

      npm install onpe-alert
  • Agregar un link a la página

    <link rel="stylesheet" href="/node_modules/onpe-alert/onpe-alert.css"></script>
  • Agregar un <script> a la página

    <script src="/node_modules/onpe-alert/onpe-alert.js"></script>
  • Agregar el módulo onpe.alert al módulo principal del proyecto

      var app = angular.module("app", ['ngMaterial', 'onpe.alert'], function () {
      });
  • Agregar los servicios Alert y alertService al controlador respectivo

      app.controller('myctrl',function(Alert,alertService){
      });
  • Invocar a la función showAlert desde el controllador respectivo

      alertService.showAlert(argumentos...);
  • Los argumentos que recibe la función showAlert se detallan a continuación

    • Titulo (String - Obligatorio): Título del alert
    • Mensaje (String - Obligatorio): Contenido del alert
    • Tipo (Alert.TIPO - Obligatorio): Tipo de alert a mostrar (ALERT_SUCCESS,ALERT_ERROR,ALERT_WARNING,ALERT_MESSAGE)
    • TextoCancelar (String - Obligatorio): Texto que se mostrará en el botón cancelar del alert. Dejar vacío en caso no se quiera mostrar el botón
    • TextoAceptar (String - Obligatorio): Texto que se mostrará en el botón aceptar del alert. Dejar vacío en caso no se quiera mostrar el botón
    • callbackCancelar (Función - Obligatorio): Función a ejecutar cuando se elige la opción cancelar. Enviar null en caso no se requiera ninguna acción
    • callbackAceptar (Función - Obligatorio): Función a ejecutar cuando se elige la opción aceptar. Enviar null en caso no se requiera ninguna acción
    • mostrarCerrar (Opcional): Parámetro para indicar de que se desea mostrar la opción cerrar del alert. No enviar el parámetro en caso no se requiera mostrar la opción
  • Ejemplo de llamada a la función

      alertService.showAlert( "Título", "Hola mundo", Alert.TIPO.ALERT_SUCCESS, "Cancelar", "Aceptar", accionCancelar, accionAceptar);
    
      function accionAceptar(){
          console.log("accion aceptar");
      };
    
      function accionCancelar(){
          console.log("accion cancelar");
      };

Licencia

Copyright (c) 2018, Oficina Nacional de Procesos Electorales

Se concede por la presente el permiso para usar, copiar, modificar y/o distribuir este software para cualquier propósito con o sin cargo, siempre y cuando el aviso de copyright anterior y este aviso de permiso aparezcan en todas las copias.

EL SOFTWARE SE PROPORCIONA "TAL CUAL" Y EL AUTOR RECHAZA TODAS LAS GARANTÍAS CON RESPECTO A ESTE SOFTWARE, INCLUIDAS TODAS LAS GARANTÍAS IMPLÍCITAS DE COMERCIABILIDAD Y ADECUACIÓN. EN NINGÚN CASO EL AUTOR SERÁ RESPONSABLE POR CUALQUIER DAÑO ESPECIAL, DIRECTO, INDIRECTO O CONSECUENTE, O CUALQUIER DAÑO QUE RESULTE DE LA PÉRDIDA DE USO, DATOS O BENEFICIOS, YA SEA EN UNA ACCIÓN DE CONTRATO, NEGLIGENCIA U OTRA ACCIÓN EXTRACONTRACTUAL QUE SURJA DE O EN CONEXIÓN CON EL USO O RENDIMIENTO DE ESTE SOFTWARE.