{"id":15678084,"url":"https://github.com/tagazok/algolia-angular-components","last_synced_at":"2025-05-07T02:23:11.325Z","repository":{"id":57164323,"uuid":"80353536","full_name":"tagazok/algolia-angular-components","owner":"tagazok","description":"Library of Angular components for Angolia","archived":false,"fork":false,"pushed_at":"2017-02-27T16:40:09.000Z","size":56,"stargazers_count":12,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T23:25:02.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tagazok.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}},"created_at":"2017-01-29T15:25:13.000Z","updated_at":"2022-04-07T23:25:03.000Z","dependencies_parsed_at":"2022-09-12T14:03:31.059Z","dependency_job_id":null,"html_url":"https://github.com/tagazok/algolia-angular-components","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagazok%2Falgolia-angular-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagazok%2Falgolia-angular-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagazok%2Falgolia-angular-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tagazok%2Falgolia-angular-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tagazok","download_url":"https://codeload.github.com/tagazok/algolia-angular-components/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252799490,"owners_count":21806000,"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":[],"created_at":"2024-10-03T16:16:23.290Z","updated_at":"2025-05-07T02:23:11.286Z","avatar_url":"https://github.com/tagazok.png","language":"TypeScript","funding_links":[],"categories":["Community libraries"],"sub_categories":[],"readme":"## Algolia components library for Angular\n\nLibrary of components for Algolia on angular.\n\n  \u003ch2 align=\"center\"\u003eWARNING: THIS IS A WIP\u003c/h2\u003e\n\nSo :\n* Components may change, appear from nowhere or disapear in a black hole (it happens)\n* Documentation may not be accurate and no up to date\n\n### Installation\n```sh\nnpm install -save @tagazok/algolia-angular-components\n```\n\n### Usage\nImport the AlgoliaModule and the AlgoliaService in your app\n```javascript\nimport { AlgoliaModule, AlgoliaService } from '@tagazok/algolia-angular-components'\n```  \n  \nLoad the module into your app passing\n\n```javascript\n@NgModule({\n  ...,\n  imports: [\n    AlgoliaModule.forRoot({appId: 'YOUR_APP_ID', apiKey: 'YOUR_APP_KEY'}),\n  ],\n  ...\n})\nexport class AppModule { }\n```\nYou are now ready to use the components in your app \\o/\n\n### List of components\n\n#### Search\nDisplays a search bar that triggers a live search\n```html\n\u003capp-algolia-search [index]=\"'ikea'\" [hitsPerPage]=\"16\" [placeHolder]=\"Enter text...\"\u003e\u003c/app-algolia-search\u003e\n```\nParameters :\n* index : The algolia index\n* hitsPerPage : The maximum number of results you want the research to return (default is 12)\n* placeHolder : The placeholder of the input (default is \"Search\")\n\n\n#### Results\nDisplays the results of your research in a custom template\n```html\n\u003capp-algolia-results\u003e\n  \u003ctemplate let-item=\"item\"\u003e\n    \u003c!-- The html template of a single result item --\u003e\n  \u003c/template\u003e\n\u003c/app-algolia-result\u003e\n```\n\n### Facets\nDisplays facet and manage filters on click.\n```html\n\u003capp-algolia-facets [attribute]=\"'materials'\"[label]=\"'Material'\" [limit]=\"'10'\" [selectedcssclass]=\"'selected-filter'\"\u003e\n  \u003ctemplate let-item=\"item\"\u003e\n     \u003c!-- The html of a single result item --\u003e\n    \u003c!-- ex : {{item.key}} \u003cspan class=\"facet-val\"\u003e({{item.val}})\u003c/span\u003e --\u003e\n    \u003c!-- ex : \u003cdiv class=\"facet-color\" [attr.data-facet-value]=\"item.key\"\u003e\u0026nbsp;\u003c/div\u003e --\u003e\n  \u003c/template\u003e\n\u003c/app-algolia-facets\u003e\n```\nParameters :\n* attribute : The attribute of which you want the facet\n* label : The label of the List (may be removed in future release... not sure yet)\n* limit : The maximum number of results per facets\n* selectedcssclass : The class to apply when a facet value is selected for filtering the query\n\n\n#### Stats\nSimply displays the stats of the result of the research\n```html\n\u003capp-algolia-stats\u003e\u003c/app-algolia-stats\u003e\n```\n\u003c!--Parameters :--\u003e\n\n#### Sort (early WIP)\nAllows you to specify how you want your result to be sorted.\n```html\n\u003capp-algolia-sort [indices]=\"sortIndices\" [label]=\"'Sort by'\"\u003e\u003c/app-algolia-sort\u003e\n```\nParameters :\n* label : The placeholder/title of the search field (will be removed in future release as md- has been removed)\n* indices : List of items to sort with. Exemple :\n```javascript\nconst sortIndices = [\n      {value: 'ikea', label: 'Featured'},\n      {value: 'ikea_price_asc', label: 'Price asc.'},\n      {value: 'ikea_price_desc', label: 'Price desc.'}\n    ];\n```\n\n#### Pagination\nAdd pagination to navigate in your results\n```html\n\u003capp-algolia-pagination [padding]=\"2\"\u003e\u003c/app-algolia-pagination\u003e\n```\nParameters :\n* padding : See +/- n page numbers (default is 3 if not specified)\n\n#### Stars \nDisplay Stars, usefull for ratings\n```html\n\u003capp-algolia-stars [value]=\"3\" [min]=\"1\" [max]=\"5\"\u003e\u003c/app-algolia-stars\u003e\n```\nParameters :\nmin: The minimum value (default is 0);\nmax: The maximum value to display empty stars\nvalue : The number of plain stars\n\nTODO :\n* See what we can do with css customisation \n* [DONE] Better algolia-result customisation (row / card / column views)\n* manage OR request for filters.\n* In algolia-stats. Add attribute to choose which stat to display (# and time)\n* Add prev / new arrow on pagination\n* \"Filter\" by component\n* Automatic routes change when whanging page or filter, etc\n\n## Example\nThis app has been built with the components of this library with the idea of \u003ca href=\"https://community.algolia.com/instantsearch.js/examples/e-commerce/\"\u003eAlgolia e-commerce demo app\u003c/a\u003e  \n*To be published very soon on github :)*\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://oleplus.free.fr/screenshots/algolia-computer-full.png\" alt=\"Screenshot\" /\u003e\n  View on Chrome (see \u003ca href=\"http://oleplus.free.fr/screenshots/algolia-ipad.png\" title=\"Ipad\" target=\"_blank\"\u003eIpad\u003c/a\u003e and \u003ca href=\"http://oleplus.free.fr/screenshots/algolia-android.png\" title=\"Nexus 5X\" target=\"_blank\"\u003eNexus 5X\u003c/a\u003e screenshots)\n\u003c/p\u003e\n\n\n## Thanks\nCreated using https://github.com/manekinekko/angular-library-starter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftagazok%2Falgolia-angular-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftagazok%2Falgolia-angular-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftagazok%2Falgolia-angular-components/lists"}