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

cordova-plugin-fancyalert

v0.2.2

Published

a Cordova plugin based on ColorDialog

Downloads

5

Readme

Cordova FancyAlertPlugin

Based On : Color Dialog : https://github.com/andyxialm/ColorDialog

Cordova plugin : Fancy Alerts This plugin is available on NPM on https://www.npmjs.com/package/cordova-plugin-fancyalert .

Platforms available : android

install :

1 ) run cordova plugin add https://github.com/moda20/FancyAlertPlugin.git

2 ) use directly from the window available cordova object.

Usage

Example :

window.cordova.plugins.FancyAlertPlugin.prompt(['Message Message Message Message',"TITLE","sucess","Okey"],
        function(res){
            console.log(res);
        },
        function(e){
            console.log(e);
            alert("Errored");
        })
        
        
window.cordova.plugins.FancyAlertPlugin.dialog(['Message Message Message Message', "TITLE", "#c60808", "Okey"],
            function (args) {
                console.log(args);
            },
            function (e) {
                console.log(e);
                alert("Errored")
            })

Docs :

The `FancyAlertPlugin` has only Two method : `prompt` and `dialog`. `prompt`takes 3 arguments only the first is mandatory.



- FancyAlertPlugin.prompt(Args,SuccessCallback,ErrorCallback)

    Args : Array of STRINGS: [ 'PROMPT_MESSAGE', 'PROMPT_TITLE', 'PROMPT_TYPE', 'PROMPT_BUTTON_TEXT' ]

        - PROMPT_TYPE can only be one of : 'sucess' => Sucess Prompt
                                     'info' => Info Prompt
                                     'help' => Help Prompt
                                     'error' => Error Prompt
                                     'warning' => Warning Prompt
                                     
        if PROMPT_TYPE is passed as any other type or value, the plugin will send back an error.
        
        - PROMPT_TITLE is the title of the prompt.
        - PROMPT_MESSAGE is the long message displayed by the prompt.
        - PROMPT_BUTTON_TEXT is the text on the button.
    
    SuccessCallback and ErrorCallback are regular callbacks, see the example above.
    

- FancyAlertPlugin.dialog(Args,SuccessCallback,ErrorCallback)

    Args : Array of STRINGS: [ 'DIALOG_MESSAGE', 'DIALOG_TITLE', 'DIALOG_COLOR', 'DIALOG_BUTTON_TEXT' ]
    
        - DIALOG_MESSAGE is the dialog's message.
        - DIALOG_TITLE is the dialog's title.
        - DIALOG_COLOR is the the background color of the dialog. MUST BE A HEX STRING.  e.g. : "#c60808".
        - DIALOG_BUTTON_TEXT is the text on the dialog's single button.
    
    SuccessCallback and ErrorCallback are regular callbacks, see the example above.
Plugin.xml :

You may have to change the com.android.support:appcompat-v7:27.1.1 to a certain version.
Note that this version needs to be unique with all components in your app, so make sure you have it fixed.

ChangeLog

  • V 0.1.2 :

    • Added prompt function argument validation.
    • Dismissing the prompt with the button tap will result in a success callback with the message `"dismissed"
  • V 0.2.0 :

    • Added Colored Dialog feature, see docs.
  • V 0.2.1 :

    • Fixed Compiling Bug when using android studio build.
    • Added Dialog Argument Validation.
  • V 0.2.1 :

    • README fix.
    • Plugin Version fix.

Licence

MIT