{"id":15508480,"url":"https://github.com/anthonynahas/ngx-long-press2","last_synced_at":"2025-07-20T12:33:24.730Z","repository":{"id":37583478,"uuid":"298691344","full_name":"AnthonyNahas/ngx-long-press2","owner":"AnthonyNahas","description":"Angular Library to handle long mouse clicks event for desktop and long touch events for mobile and tablets","archived":false,"fork":false,"pushed_at":"2024-04-03T20:54:41.000Z","size":3759,"stargazers_count":4,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-13T03:38:49.972Z","etag":null,"topics":["angular","click","library","mouse","ng","ngx","pressing"],"latest_commit_sha":null,"homepage":"https://anthonynahas.github.io/ngx-long-press2/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnthonyNahas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"anthonynahas","patreon":null,"open_collective":null,"ko_fi":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-09-25T22:25:01.000Z","updated_at":"2025-04-29T09:01:41.000Z","dependencies_parsed_at":"2024-04-23T07:22:06.100Z","dependency_job_id":"0887ec5b-9f06-40de-bfbe-b7942f351d39","html_url":"https://github.com/AnthonyNahas/ngx-long-press2","commit_stats":{"total_commits":73,"total_committers":2,"mean_commits":36.5,"dds":0.1095890410958904,"last_synced_commit":"88d29f8c9317d1b95b4f02ab50474b07b6728ada"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/AnthonyNahas/ngx-long-press2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnthonyNahas%2Fngx-long-press2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnthonyNahas%2Fngx-long-press2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnthonyNahas%2Fngx-long-press2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnthonyNahas%2Fngx-long-press2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnthonyNahas","download_url":"https://codeload.github.com/AnthonyNahas/ngx-long-press2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnthonyNahas%2Fngx-long-press2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266127212,"owners_count":23880420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","click","library","mouse","ng","ngx","pressing"],"created_at":"2024-10-02T09:38:47.282Z","updated_at":"2025-07-20T12:33:24.713Z","avatar_url":"https://github.com/AnthonyNahas.png","language":"HTML","funding_links":["https://github.com/sponsors/anthonynahas"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"angular-material-extensions's logo\"\n   height=\"256px\" width=\"256px\" style=\"text-align: center;\" \n   src=\"https://cdn.jsdelivr.net/gh/angular-material-extensions/select-country@master/assets/angular-material-extensions-logo.svg\"\u003e\n\u003c/p\u003e\n\n# ngx-long-press2 - Angular Library to handle long mouse clicks event for desktop and long touch events for mobile and tablets\n\n[![npm version](https://badge.fury.io/js/ngx-long-press2.svg)](https://badge.fury.io/js/ngx-long-press2)\n[![npm demo](https://img.shields.io/badge/demo-online-ed1c46.svg)](https://anthonynahas.github.io/ngx-long-press2)\n[![docs: typedoc](https://img.shields.io/badge/docs-typedoc-4D0080.svg)](https://anthonynahas.github.io/ngx-long-press2/doc/index.html)\n[![Join the chat at https://gitter.im/angular-material-extensions/Lobby](https://badges.gitter.im/angular-material-extensions/Lobby.svg)](https://gitter.im/angular-material-extensions/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"@angular-material-extensions/select-country demonstration\" style=\"text-align: center;\"\n   src=\"https://raw.githubusercontent.com/anthonynahas/ngx-long-press2/HEAD/assets/v1.0.0/demo.gif\"\u003e\n\u003c/p\u003e\n\n\n\n## Built by and for developers :heart:\nDo you have any question or suggestion ? Please do not hesitate to contact us!\nAlternatively, provide a PR | open an appropriate issue [here](https://github.com/angular-material-extensions/select-country/issues)\n\nIf you like this project, support [angular-material-extensions](https://github.com/angular-material-extensions) \nby starring :star: and sharing it :loudspeaker:\n\n## Table of Contents\n- [Demo](#demo)\n- [Dependencies](#dependencies)\n- [Installation](#installation)\n- [API](#api)\n- [Usage](#usage)\n- [Run Demo App Locally](#run-demo-app-locally)\n- [Other Angular Libraries](#other-angular-libraries)\n- [Support](#support)\n- [License](#license)\n\n\u003ca name=\"demo\"/\u003e\n\n## [Demo](https://anthonynahas.github.io/ngx-long-press2)\n\nView all the directives and components in action at [https://anthonynahass.github.io/ngx-long-press2](https://anthonynahass.github.io/ngx-long-press2)\n\n\u003ca name=\"directives\"/\u003e\n\n## Library's directive\n- `ngxLongPress2` \n\n---\n\n\u003ca name=\"dependencies\"/\u003e\n\n## Dependencies\n* [Angular](https://angular.io) developed and tested with `16.x`\n\n---\n\n\u003ca name=\"installation\"/\u003e\n\n##  [Installation](https://anthonynahas.github.io/ngx-long-press2/getting-started)\n\n\n## Install via *npm*.  \n\nInstall peer dependencies \n```shell\nnpm i -s ngx-long-press2\n```\n\n\n### Import the library\n\n\n```typescript\nimport { NgxLongPress2Module } from 'ngx-long-press2'; \n\n@NgModule({\n  declarations: [AppComponent, ...],\n  imports: [NgxLongPress2Module, ...],  \n  bootstrap: [AppComponent]\n})\nexport class AppModule {\n}\n```\n\nOther modules in your application like for lazy loading import ` NgxLongPress2Module ` into your feature module:\n\n\n\u003ca name=\"api\"/\u003e\n\n## API\n\n\n| option | bind  |  type  |   default    | description  |\n|:-------------------|:--------:|:------:|:------------:|:-------------------------------------------------------------------------------------------------|    \n| minTime      | `Input()`  | `number`    | `500` |  the minimum time to fire  onLongPress event (in ms)\n| maxTime      | `Input()`  | `number`    | `2000` |  the maximum time to fire  onReleasePressing event (in ms)\n| onLongPress  | `Output()` | `EventEmitter\u003cvoid\u003e`    | - | emits when the minTime is exceeded \n| onLongPressing  | `Output()` | `EventEmitter\u003cnumber\u003e`    | - | emits when the user is pressing and the time lapsed in ms will be emitted \n| onReleasePressing  | `Output()` | `EventEmitter\u003cvoid\u003e`    | - | emits when the maxTime is exceeded or  touchend, mouseup and mouseleave haven been emitted\n\n\n\n\n\u003ca name=\"usage\"/\u003e\n\n## [Usage](https://anthonynahas.github.io/ngx-long-press2)\n\n```html\n  \u003cbutton mat-raised-button\n          ngxLongPress2\n          [color]=\"this.timeLapsed1 \u003e 1000? 'primary' : 'warn'\"\n          (onLongPress)=\"onLongPress()\"\n          (onLongPressing)=\"onLongPressing($event)\"\n          (onReleasePressing)=\"onReleasePressing()\"\u003e\n  {{ this.timeLapsed1 \u003e 0 ? this.timeLapsed1 + ' ms' : 'PRESS ME'}}\n\u003c/button\u003e\n```\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"@angular-material-extensions/select-country demonstration\" style=\"text-align: center;\"\n   src=\"https://raw.githubusercontent.com/anthonynahas/ngx-long-press2/HEAD/assets/v1.0.0/demo_full2.png\"\u003e\n\u003c/p\u003e\n\n```html\n\u003cbutton ngxLongPress2\u003e\u003c/button\u003e\n```\n\nimages\n\n\n\n\n\u003ca name=\"run-demo-app-locally\"/\u003e\n\n###  Run Demo App Locally after cloning the github project\n\n\nBuild the library\n\n```bash\n$ npm run build:lib\n```\n\nServe the demo app\n\n```bash\n$ npm start\n```\n\n\n\n## Other Angular Libraries\n- [ngx-auth-firebaseui](https://github.com/AnthonyNahas/ngx-auth-firebaseui)\n- [ngx-linkifyjs](https://github.com/AnthonyNahas/ngx-linkifyjs)\n- [@angular-material-extensions/password-strength](https://github.com/angular-material-extensions/password-strength)\n- [@angular-material-extensions/google-maps-autocomplete](https://github.com/angular-material-extensions/google-maps-autocomplete)\n- [@angular-material-extensions/select-country](https://github.com/angular-material-extensions/select-country)\n- [@angular-material-extensions/link-preview](https://github.com/angular-material-extensions/link-preview)\n- [@angular-material-extensions/fab-menu](https://github.com/angular-material-extensions/fab-menu)\n- [@angular-material-extensions/pages](https://github.com/angular-material-extensions/pages)\n- [@angular-material-extensions/contacts](https://github.com/angular-material-extensions/contacts)\n---\n\n\u003ca name=\"support\"/\u003e\n\n## Support\n+ Drop an email to: [Anthony Nahas](mailto:anthony.na@hotmail.de)\n+ or open an appropriate [issue](https://github.com/AnthonyNahas/ngx-long-press2/issues)\n+ let us chat on [Gitter](https://gitter.im/angular-material-extensions/Lobby)\n \n Built by and for developers :heart: we will help you :punch:\n\n---\n\n---\n\n\n## Who is using ngx-long-press2? Awesome apps?\n\n1. [Nahaus.de](https://nahaus.de)\n\n\nAre you missing your project or you app? PR me to publish it on the README\n\n---\n\n![jetbrains logo](https://raw.githubusercontent.com/angular-material-extensions/select-country/HEAD/assets/jetbrains-variant-4_logos/jetbrains-variant-4.png)\n\nThis project is supported by [jetbrains](https://www.jetbrains.com/) with 1 ALL PRODUCTS PACK OS LICENSE incl. [webstorm](https://www.jetbrains.com/webstorm)\n\n---\n\n\u003ca name=\"license\"/\u003e\n\n## License\n\nCopyright (c) 2023 [Anthony Nahas](https://github.com/AnthonyNahas). Licensed under the MIT License (MIT) \u003cp align=\"center\"\u003e\n                                                                                                            \u003cimg alt=\"angular-material-extensions's logo\"\n                                                                                                             height=\"92px\" width=\"92px\" style=\"text-align: center;\" \n                                                                                                             src=\"https://cdn.jsdelivr.net/gh/angular-material-extensions/select-country@master/assets/badge_made-in-germany.svg\"\u003e\n                                                                                                          \u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonynahas%2Fngx-long-press2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonynahas%2Fngx-long-press2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonynahas%2Fngx-long-press2/lists"}