{"_id":"@bmoulia/angular-mentions","name":"@bmoulia/angular-mentions","dist-tags":{"latest":"1.4.0"},"versions":{"1.4.0":{"name":"@bmoulia/angular-mentions","version":"1.4.0","description":"Angular mentions for text fields.","keywords":["angular","mention","autocomplete"],"repository":{"type":"git","url":"git+https://github.com/dmacfarlane/angular-mentions.git"},"author":{"name":"Dan MacFarlane"},"license":"MIT","dependencies":{"tslib":"^2.0.0"},"peerDependencies":{"@angular/common":">=7.2.0","@angular/core":">=7.2.0"},"module":"fesm2015/angular-mentions.mjs","es2020":"fesm2020/angular-mentions.mjs","esm2020":"esm2020/angular-mentions.mjs","fesm2020":"fesm2020/angular-mentions.mjs","fesm2015":"fesm2015/angular-mentions.mjs","typings":"angular-mentions.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./angular-mentions.d.ts","esm2020":"./esm2020/angular-mentions.mjs","es2020":"./fesm2020/angular-mentions.mjs","es2015":"./fesm2015/angular-mentions.mjs","node":"./fesm2015/angular-mentions.mjs","default":"./fesm2020/angular-mentions.mjs"}},"sideEffects":false,"gitHead":"426ebf3313aedc760adaeff0a378de1690510d63","bugs":{"url":"https://github.com/dmacfarlane/angular-mentions/issues"},"homepage":"https://github.com/dmacfarlane/angular-mentions#readme","_id":"@bmoulia/angular-mentions@1.4.0","_nodeVersion":"16.14.1","_npmVersion":"8.5.0","dist":{"integrity":"sha512-t+ji/aWyeXx6IM55nKJXHOW/5TNtRniSPjagj0X+ytpY5icsGQ9c64ejBnWn4p97swGqLhVHVw2oywFcM2l/AA==","shasum":"96f44e1752b53553703c67aef4a9486c532d8c2f","tarball":"https://registry.npmjs.org/@bmoulia/angular-mentions/-/angular-mentions-1.4.0.tgz","fileCount":22,"unpackedSize":332881,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBC7dE0WECU5YEyifuSRTZ1kIuxdjXC2EgFGGxVRA05wIgSM7KeggcJBY4+GwSNI55RlVrTb4r4LjV68LY/uXd+UY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYsdNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmozBw/7BBYjaFiteAfNK6wn7FtqfIhOYreVyllFKtS0Xqy9V6luDbHI\r\n6Eww+qGGBixJ1tmaYrxlaFnx89Qf2BwgFcU8nNub2fOrlqh7XUr9flK1s68H\r\nZHNT8uU/w+KjU8U8cEZg/jBXNK662zeJaeE2Hjf9IcZLBj2KCzpFmxxuml8a\r\nHMJYaAstYFRzVBYOE3GbwQWh9GYS5ZkMy4ZvnrA2zJglHT+6YGAgrKiG+rUt\r\n5L2/3roObyzaHv+STC+6k5IcfvgYwN1A/musS2iK1GIDYbbEIw53gCJGTe7U\r\nGl2k2Y3Twx7t2xU5IkG2BVyA8qqiyOWpiGxw3+xDRRwFDMBEq3LJiqQR9wsI\r\nhBbpyoxCLLVmRZsCLJDAtp0a+v1HZ2foUZNXvsxvNawxVkl0I0JLg0AFLG1R\r\nqJnSKKyzfTCTX+zh44c0V2dFfmgj4dEDlCpAM5aqKORotlX6wgJF3AHz4lj9\r\nVoFSJ7GrqBbY+nob9jaZktRGPD+NwLp8wgN1c5eK1XFYC+hbwK+TvcfjtIV8\r\nuLNQTwEq2CQFYFf5/jGdqS0jrHra0M3mne4LOiHBfqEx2i58qkGa9FCZNhgz\r\nqw9GTHpVXU5cXwt0fENrZ7RFNslZ7x0aUQ42xbdwEVUUAZVC2emfV/wVUSOm\r\nGohbcf1hXb4pK2krSk+U6b47zydZm2NxD/4=\r\n=gUow\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bastienmoulia","email":"bmoulia@gmail.com"},"directories":{},"maintainers":[{"name":"bastienmoulia","email":"bmoulia@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/angular-mentions_1.4.0_1650640717054_0.9849756629729414"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-22T15:18:36.922Z","1.4.0":"2022-04-22T15:18:37.300Z","modified":"2022-04-22T15:18:37.570Z"},"maintainers":[{"name":"bastienmoulia","email":"bmoulia@gmail.com"}],"description":"Angular mentions for text fields.","homepage":"https://github.com/dmacfarlane/angular-mentions#readme","keywords":["angular","mention","autocomplete"],"repository":{"type":"git","url":"git+https://github.com/dmacfarlane/angular-mentions.git"},"author":{"name":"Dan MacFarlane"},"bugs":{"url":"https://github.com/dmacfarlane/angular-mentions/issues"},"license":"MIT","readme":"# Angular Mentions\n\nSimple Angular mentions inspired by [Ment.io](https://github.com/jeff-collins/ment.io).\n\n[Click here for a Demo](http://dmacfarlane.github.io/angular-mentions/)\n\nProvides auto-complete suggestions for @mentions in text input fields, text areas,\nand content editable fields.\n\nTo install and start the demo application:\n\n    git clone https://github.com/dmacfarlane/angular-mentions.git\n    cd angular-mentions\n    npm install\n    ng serve\n\n### Usage\n\nAdd the package as a dependency to your project using:\n\n    npm install angular-mentions\n\nAdd the module to your app.module imports:\n\n```typescript\nimport { MentionModule } from 'angular-mentions';\n...\n\n@NgModule({\n    imports: [ MentionModule ],\n    ...\n})\n```\n\nAdd the `[mention]` directive to your input element:\n\n```html\n<input type=\"text\" [mention]=\"items\">\n```\n\nWhere `items` is a string array of the items to suggest. For example:\n\n```typescript\nitems: string[] = [\"Noah\", \"Liam\", \"Mason\", \"Jacob\", ...\n```\n\n#### Configuration Options\n\nThe following optional configuration items can be used.\n\n| Option        | Default  | Description |\n| ---           | ---      | ---         |\n| items         |          | An array of strings or objects to suggest. |\n| triggerChar   | @        | The character that will trigger the menu behavior. |\n| labelKey      | label    | The field to be used as the item label (when the items are objects). |\n| disableSort   | false    | Disable sorting of suggested items. |\n| disableSearch | false    | Disable internal filtering (only useful if async search is used). |\n| dropUp        | false    | Show the menu above the cursor instead of below. |\n| maxItems      | ∞        | Limit the number of items shown in the text. The default is no limit. |\n| mentionSelect |          | A function to format the selected item before inserting the text. |\n| allowSpace    | false    | Allow spaces while mentioning. |\n| returnTrigger | false    | Include the trigger char in the searchTerm event. |\n\nFor Example: \n\n```html\n<input type=\"text\" [mention]=\"items\" [mentionConfig]=\"{triggerChar:'#',maxItems:10,labelKey:'name'}\">\n```\n\n#### Output Events\n\nThe following output events can be used.\n\n| Output        | Description |\n| ---           | ---         |\n| `@Output() serchTerm EventEmitter<string>` | Event that is emitted whenever the search term changes. Can be used to trigger async search.\n| `@Output() opened EventEmitter<void>`  | Event that is emitted when the mentions panel is opened.\n| `@Output() closed EventEmitter<void>`  | Event that is emitted when the mentions panel is closed.\n\n### Alternative Usage\n\nThe component can also be used by only specifying the mentionConfig object:\n\n```html\n<input type=\"text\" [mentionConfig]=\"mentionConfig\">\n```\n\nWith the following structure:\n\n```javascript\nlet mentionConfig = {\n    items: [ \"Noah\", \"Liam\", \"Mason\", \"Jacob\", ... ],\n    triggerChar: \"@\",\n    ...\n}\n```\n\nIn this way, multiple config objects can be used:\n\n```javascript\nlet mentionConfig = {\n    mentions: [\n        {\n            items: [ \"Noah\", \"Liam\", \"Mason\", \"Jacob\", ... ],\n            triggerChar: '@'\n        },\n        {\n            items: [ \"Red\", \"Yellow\", \"Green\", ... ],\n            triggerChar: '#'\n        },\n    }]\n}\n```\nThis allows different lists and trigger characters to be configured.\n\nNote that becuase objects are mutable, changes to the items within the config will not be picked up unless a new mentionConfig object is created.\n","readmeFilename":"README.md"}