Giter Site home page Giter Site logo

framework7io / framework7-plugin-keypad Goto Github PK

View Code? Open in Web Editor NEW
74.0 11.0 43.0 2.83 MB

Keypad plugin extends Framework7 with additional custom keyboards

Home Page: http://framework7.io/plugins/

License: MIT License

JavaScript 80.35% Less 19.65%
framework7 keypad custom-keyboard plugin cordova app mobile

framework7-plugin-keypad's People

Contributors

dann2012 avatar ionas avatar ju2ender avatar nolimits4web avatar shastox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framework7-plugin-keypad's Issues

Адаптация плагина для 4й версии F7

Этот замечательный плагин не работает нормально в 4й версии:
если на телефоне (именно на телефоне) набирать быстро цифры, то будут огромные задержки. Решается включением отключенного Fast Click:

    touch: {
        fastClicks: true,
    },

В 5й версии, с выпиленным fast click, я так понимаю плагин вообще не совместим. Если можно, было бы здорово его адаптировать под 5ку :)

Adding Keypad plugin to ember project

I already added Framework7 to my Ember cli project. But I can not make Keypad works. My initialize file:

export function initialize(container, application) {
  var f7 = new window.Framework7();

  application.register('f7:main', f7, { instantiate: false });
  application.inject('route', 'f7', 'f7:main');
  application.inject('controller', 'f7', 'f7:main');
  application.inject('component', 'f7', 'f7:main');
  application.inject('view', 'f7', 'f7:main');
}

export default {
  name: 'framework7-service',
  initialize: initialize
};

I included Keypad js and css file in Brocfile.js:

app.import({
  development: 'bower_components/framework7-keypad/dist/framework7.keypad.css',
  production: 'bower_components/framework7-keypad/dist/framework7.keypad.min.css'
});

app.import({
  development: 'bower_components/framework7-keypad/dist/framework7.keypad.js',
  production: 'bower_components/framework7-keypad/dist/framework7.keypad.min.js'
});

When I use <input type="numpad"> it's not working, nothing happen.
I figure out that when running the code: var f7 = new window.Framework7();, the plugin is not found(or hooked)

custom keys - full keyboard

I'd need a full keyboard and supplied all keys as props, but only the first 12 keys are rendered, because the layout is fix. What's the point in supplying custom keys, if you assume keypad?

Framework7 Keypad events listener not working

I have a keypad

var keypad = app.keypad.create({
    inputEl: '#input',
    on: {
        change: function (keypad, value) {
            console.log(keypad, value);
        }
    }
});

change event is NOT called when value is changed (this is same for all other events like open close etc…)

Tried

keypad .on("change",  (keypad, value) {
        console.log(keypad, value);
})

i get Uncaught (in promise) Error: TypeError: Cannot read property 'change' of undefined

Any Ideas?

Needs a caret

The cursor position is not accounted, nor displayed (the "input-focused" class is removed from the input even when inputReadOnly is set to false), for this widget e.g.
"12|34"
then press delete on the keypad should result in
"1|34" rather than "123"

In the iOS version the user cannot tell which input is active. In Android it's more clear but still needs a caret for more user feedback.

Bower issue

When install the package using bower (bower install framework7-keypad --save), The name of the package in bower.js file should be "Framework7-Keypad": "framework7-keypad#^1.0.3". I'm having a problem because bower automacally generate the name: "Framework7 Keypad": "framework7-keypad#^1.0.3" (no dash), so that i can not update the package using bower update.

Unable to Reset Value

Could you please share the code snippet to reset the textbox value programmatically? Actually, i am using type "numpad" in html to create keypad.

Thanks

Cannot read property 'name' of undefined

Hi
I am trying to use kepad for v5 as follows:

import Framework7 , {Template7} from 'framework7/framework7.esm.bundle.js';
Framework7.use(Framework7Keypad);

var app = new Framework7({
......

but app won't start and always gives:

class.js:150 Uncaught TypeError: Cannot read property 'name' of undefined
    at Function.installModule (class.js:150)

What could be the reason ?
thanks

Framework7 keypad + swipe incompatibility

As title, when a keypad is within a swipe it won't work, any ideas?

<div class="swiper-container">
    <div class="swiper-wrapper">
        <div class="swiper-slide" style="text-align:center">
            <h3>Product name</h3>
            <div class="range-slider"><input type="range" min="0" value="" step="1" onchange="$$(this).parent().parent().find('span').html(this.value);" oninput="$$(this).parent().parent().find('input').val(this.value);"></div>
            <div class="list-block">
                <ul>
                    <li><div class="item-content">
                        <div class="item-inner">
                            <div class="item-title label">Qtd</div>
                            <div class="item-input">
                                <input type="text" class="kpNumpad">
                            </div>
                        </div>
                    </div></li>
                </ul>
            </div>
            <img  src="img/temp/img01-mobile-md.jpg" style="max-height: 45vh;">
        </div>
    </div>
    <div class="swiper-button-prev"></div>
    <div class="swiper-button-next"></div>
</div>
myApp.keypad({ 'input': '.kpNumpad', 'dotButton': true, 'toolbarCloseText': 'Fechar', 'toolbarTemplate': '' });

myApp.swiper('.swiper-container',{
    'onlyExternal': true,
    'nextButton': '.swiper-button-next',
    'prevButton': '.swiper-button-prev',
    'speed':  600,
    'loop': true,
    'effect': 'slide' //-- slide, coverflow, flip
});

No matter the order if swiper or keypad is called first, none of them work, debugging inside a browser, the div of keypad is created but don't show, and input becomes unclicable.

Module Import issue with vite

On the latest f7 Vite is the only bundler available and throws this error while build:

node_modules/vite/dist/node/chunks/dep-36bf480c.js:43807:10: error: [plugin: vite:dep-scan] Failed to resolve entry for package "framework7-plugin-keypad". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "framework7-plugin-keypad". The package may have incorrect main/module/exports specified in its package.json.

Upon Inspect I came to this stacktrace:
src/js/app.js:4:29: note: The plugin "vite:dep-scan" was triggered by this import 4 │ import Framework7Keypad from 'framework7-plugin-keypad';

I checked the package.json file for the plugin and everything looks ok to me. Any suggestions?

Request: Ability to disable a button based on current value

I would like to disable buttons programmatically depending on the current value. For example, on the calculator, some of the operations should be disabled when there is no left-value. Or for another example, I would like to only accept inputs between 1-37, and so when the user inputs 3, I would like to disable buttons 8 and 9.

Numeric only 1,2,3 on Android devices

Hi,

I know it is probably not supported, but maybe there's a quick fix for this. On Android devices, only the numbers 1,2,3 are visible when using numeric. They are fully functional, but i miss the other 6 buttons. Tried to change some z-index values in the css file, but none helps. Maybe you know how this could be fixed.

Thanks!

Click sound support?

Viewing the demo there doesn't appear to be click sounds when pressing the keypad buttons. Is there a way to enable this?

The delete key should have an auto-repeat capability to delete long numbers quickly

The delete key in the keypad should have an auto-repeat capability to allow the user to efficiently delete a long number quickly and efficiently. It should behave while the key is being pressed and after a delay.

The native delete key on iOS will delete the first character on the initial press and then start repeating the delete after an initial delay of about 100ms. Each character is deleted at a rate of about 50ms. These numbers are just ballpark and would have to be tweaked.

Do you support react?

Maybe this is obvious, but any way to make it work with React framework7 plugin?

Thanks,
Serkan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.