{"id":19059338,"url":"https://github.com/sezmars/ngx-scan-detect","last_synced_at":"2025-04-24T06:15:24.734Z","repository":{"id":39473367,"uuid":"196234000","full_name":"sezmars/ngx-scan-detect","owner":"sezmars","description":"Detects barcode or qr code scanning on document and emits the scanned code.","archived":false,"fork":false,"pushed_at":"2025-04-04T15:32:48.000Z","size":11965,"stargazers_count":14,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T14:44:24.705Z","etag":null,"topics":["angular","angular16","barcode-scanner","barcode-to-pc","code-scanner","lodash","ngx-barcodeput","ngx-scan-detect","qrcode-scanner","rxjs"],"latest_commit_sha":null,"homepage":"https://sezmars.github.io/ngx-scan-detect","language":"TypeScript","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/sezmars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-10T15:48:26.000Z","updated_at":"2025-02-07T12:29:36.000Z","dependencies_parsed_at":"2023-08-26T08:29:59.802Z","dependency_job_id":"7fc68e72-fdd4-4d15-990f-997cf170a78d","html_url":"https://github.com/sezmars/ngx-scan-detect","commit_stats":{"total_commits":74,"total_committers":3,"mean_commits":"24.666666666666668","dds":0.4864864864864865,"last_synced_commit":"2c78b4ed45e661fe4e58da3f6cd616205e3f1e12"},"previous_names":["sezmars/ngx-barcodeput","sezmars/ngx-scan-detect","sezmars/barcode-scanner-input-detect"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sezmars%2Fngx-scan-detect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sezmars%2Fngx-scan-detect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sezmars%2Fngx-scan-detect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sezmars%2Fngx-scan-detect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sezmars","download_url":"https://codeload.github.com/sezmars/ngx-scan-detect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250541005,"owners_count":21447427,"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","angular16","barcode-scanner","barcode-to-pc","code-scanner","lodash","ngx-barcodeput","ngx-scan-detect","qrcode-scanner","rxjs"],"created_at":"2024-11-09T00:08:07.531Z","updated_at":"2025-04-24T06:15:24.715Z","avatar_url":"https://github.com/sezmars.png","language":"TypeScript","funding_links":[],"categories":["Third Party Components"],"sub_categories":["QR Codes"],"readme":"# ngx-scan-detect \n\n**[Demo](https://sezmars.github.io/ngx-scan-detect/)** | \u003ca href=\"https://github.com/sezmars/ngx-scan-detect/blob/main/demo.mp4\" target=\"_blank\"\u003eVideo Demo\u003c/a\u003e\n\nDetects barcode or qr code scanning on document and emits the scanned barcode.\n\n[![NPM version](https://img.shields.io/npm/v/ngx-scan-detect.svg?style=flat)](https://www.npmjs.com/package/ngx-scan-detect) [![NPM monthly downloads](https://img.shields.io/npm/dm/ngx-scan-detect.svg?style=flat)](https://npmjs.org/package/ngx-scan-detect)  [![NPM total downloads](https://img.shields.io/npm/dt/ngx-scan-detect.svg?style=flat)](https://npmjs.org/package/ngx-scan-detect) [![Made with Angular](https://img.shields.io/badge/Made%20with-Angular-E13137.svg)](https://angular.io)\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.2.2.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n### OR\n\nGo to [ngx-scan-detect](https://github.com/sezmars/ngx-scan-detect).\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).\n\n\n# ngx-scan-detect\n\n[![NPM](https://nodei.co/npm/ngx-scan-detect.png?compact=true)](https://nodei.co/npm/ngx-scan-detect/)\n\n**[Demo](https://sezmars.github.io/ngx-scan-detect/)**\n\nAngular directive for handling input events. Useful for determine input using a barcode-scanner.\n\nLike binding to a regular `type` event in a template, you can do something like this:\n\n```HTML\n\u003cinput ngxBarCodePut\n       (detected)=\"onDetected($event)\"\u003e\n```\n\n\n## Installation\n\n```shell\nnpm install --save ngx-scan-detect\n```\n\n\n## Usage\n\nYou can then use the directive in your templates:\n\n```typescript\n@Component({\n  selector: 'app-ngx-scan-detect',\n  templateUrl: './ngx-scan-detect.component.html',\n  styleUrls: ['./ngx-scan-detect.component.scss'],\n  standalone: true,\n  imports: [CommonModule, NgxBarCodePutDirective],\n})\n\nexport class AppComponent {\n  public onDetected(event: IDetect) {\n    console.info(event); \n    /* {event: KeyboardEvent, value: \"sezmars\", time: 0.07083499999716878, type: \"scanner\"} */\n    /* {event: KeyboardEvent, value: \"3333333\", time: 0.17083499999716878, type: \"keyboard\"} */\n  }\n\n  public onDelete(event: IDelete) {\n    console.info(event);\n    /* {event: KeyboardEvent, value: \"3333333\", type: \"delete\"} */\n  }\n}\n```\n\n### Options\n\n| Property name | Type   | Default | Description                                                                                                                                    |\n|---------------|--------| ------ |------------------------------------------------------------------------------------------------------------------------------------------------|\n| `debounce`    | number | `0` | This property is necessary for scenarios such as type-ahead where the rate of user input must be controlled.                                   |\n| `workMode`    | string | `manual` | This property controls the automatic clearing of the input field.                                                                              |\n| `skipStart`   | number | `0` | Allows you to ignore the first values of the length of the input data. The search begins after entering the first character if the value is 0. |\n| `detected`    | event  | `empty` | Returns object with keyboard event, input value, data entry time and device type: ` keyboard or scanner`.                                      |\n| `delete`      | event  | `empty` | Returns an object with input value, keyboard event, and type.                                                                                  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsezmars%2Fngx-scan-detect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsezmars%2Fngx-scan-detect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsezmars%2Fngx-scan-detect/lists"}