{"id":21638128,"url":"https://github.com/purecloudlabs/ember-multi-faceted-search","last_synced_at":"2026-05-08T08:33:10.375Z","repository":{"id":15035380,"uuid":"77467366","full_name":"purecloudlabs/ember-multi-faceted-search","owner":"purecloudlabs","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-03T06:34:03.000Z","size":1318,"stargazers_count":0,"open_issues_count":17,"forks_count":2,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-11-13T09:29:06.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/purecloudlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-12-27T16:09:03.000Z","updated_at":"2025-01-03T06:34:07.000Z","dependencies_parsed_at":"2024-09-25T10:49:11.174Z","dependency_job_id":"b387adac-657a-459d-b429-16cec45c7b0b","html_url":"https://github.com/purecloudlabs/ember-multi-faceted-search","commit_stats":null,"previous_names":["mypurecloud/ember-cli-multi-faceted-search","mypurecloud/ember-multi-faceted-search"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/purecloudlabs/ember-multi-faceted-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purecloudlabs%2Fember-multi-faceted-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purecloudlabs%2Fember-multi-faceted-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purecloudlabs%2Fember-multi-faceted-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purecloudlabs%2Fember-multi-faceted-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purecloudlabs","download_url":"https://codeload.github.com/purecloudlabs/ember-multi-faceted-search/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purecloudlabs%2Fember-multi-faceted-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32773040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-25T04:08:18.343Z","updated_at":"2026-05-08T08:33:10.341Z","avatar_url":"https://github.com/purecloudlabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ember Multi-Faceted Search\n\nThis addon provides a view for managing a [faceted search](https://en.wikipedia.org/wiki/Faceted_search) alongside data.  You provide an array of filters with terms, and the addon will allow a user to add and remove these terms while notifying your app - which allows you to handle the data end of things.\n\n## Installation\n\nFrom your project / app, run\n```\nember install ember-multi-faceted-search\n```\n\nThis addon creates a new component that you can use to wrap your data display: `{{multi-faceted-search}}`\n\nAlthough styles can be customized, using [Bootstrap 3](http://getbootstrap.com/getting-started/) in your project is recommended for the [collapsing behavior](http://getbootstrap.com/javascript/#collapse).\n\n## Using this addon\n\n### The Component\n```\n{{#multi-faceted-search facets=yourFacetsArray addFacet=(action 'yourAddFacetAction') removeFacet=(action 'yourRemoveFacetAction')}}\n// Your data goes here!  In any format, try a \u003ctable\u003e or a \u003cul\u003e or a smiley face!\n{{/multi-faceted-search}}\n```\n\n### The Facet Array\n\nIn your app, where you handle the data, add :\n\n```\nimport Facet from 'ember-multi-faceted-search/components/multi-faceted-search/facet';\n```\n\nThis is a custom `Ember.Object` that looks like:\n\n```\n{\n  category: \"LabelForFacet\",\n  type: \"checkbox\", // or \"link\"\n  terms: [] // each term should be an object with at least : { value: \"stringToDisplay\", selected: boolean } also optional properties 'display' and 'count',\n  emptyMessage: \"Message when no facets to display\",\n  ...\n}\n```\n\nMassage your data to be an array of Facet objects.  Feed this array into the above component as `facets=yourFacetsArray`.\n\n### Add and Remove Actions\n\nDefine actions that will modify your data based on actions taken by the user ( `addFacet` / `removeFacet` below ).\n\n```\n{{#multi-faceted-search facets=facets addFacet=(action \"addFacet\") removeFacet=(action \"removeFacet\")}}\n```\n\nThe Facet object from above includes a `selected` property that returns the currently selected terms.  If your facets change based on selected terms, you need to handle refreshing and setting already selected terms, or editing the existing object.  An example of the former : \n\n```\nfacets: [],\nyourURL: \"http...\",\n\nactions: {\n  yourAddFacetAction() {\n    let oldFacets = this.get('facets'),\n        query = \"?\",\n        newFacets = [];\n\n    // building URL query params from selected facets\n    oldFacets.forEach( (facet) =\u003e {\n      let selectedTerms = facet.get('selectedValues');\n      if (selectedTerms.length)\n        selectedTerms = selectedTerms.replace(/\\s+/g, ''); // \"term1, term2\" =\u003e \"term1,term2\"\n        query = query + facet.get('category') + \"=\" + selectedTerms + \"\u0026\"\n    });\n\n    // JSON example - let's say our service returns : { facets: [ { facet1: ['term1', 'term2'] }, { facet2: ... } ] }\n    // so we build the new array of Facets from this\n    $.getJSON(this.get(\"yourURL\") + query).then( (rtn) =\u003e {\n      Object.keys(rtn.facets).forEach( (category) =\u003e {\n        newFacets.push(Facet.create({ category: category, type: \"checkbox\", terms: rtn.facets[category] }));\n      });\n      this.set(\"facets\", newFacets);\n    });\n  }\n}\n```\n\n### Search\n\nAdding search is simple!\n\n```\n{{#multi-faceted-search facets=facets search=query searchAction=(action 'searching')}}\n...\n{{/multi-faceted-search}}\n```\n\nDefining a two-way bound `search` parameter and adding a `searchAction` will generate a search box and notify you when the user initiates a search.  Currently, search is initiated by submitting the search input (ie hitting ENTER or clicking the attached button).\n\n### Options\n\nThis addon allows you to manipulate text and css via a passed in configuration object:\n\n```\n{{#multi-faceted-search options=options ...}}\n...\n```\n\nCheck the options object in `multi-faceted-search/component.js` for available options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurecloudlabs%2Fember-multi-faceted-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurecloudlabs%2Fember-multi-faceted-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurecloudlabs%2Fember-multi-faceted-search/lists"}