{"id":15542981,"url":"https://github.com/onechiporenko/ember-bootstrap-context-menu","last_synced_at":"2026-03-06T05:12:48.461Z","repository":{"id":255822031,"uuid":"853455380","full_name":"onechiporenko/ember-bootstrap-context-menu","owner":"onechiporenko","description":"Context menu for ember-bootstrap","archived":false,"fork":false,"pushed_at":"2025-04-19T20:08:53.000Z","size":750,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T21:59:01.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://onechiporenko.github.io/ember-bootstrap-context-menu/#/demo","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/onechiporenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2024-09-06T17:33:02.000Z","updated_at":"2025-02-13T20:59:55.000Z","dependencies_parsed_at":"2024-10-23T06:17:13.329Z","dependency_job_id":"b9c7658d-a0f0-4755-a9b8-fbf68a47df01","html_url":"https://github.com/onechiporenko/ember-bootstrap-context-menu","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.03448275862068961,"last_synced_commit":"101a4ff12b2317acf5d200137ca5f5f60c256a81"},"previous_names":["onechiporenko/ember-bootstrap-context-menu"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onechiporenko%2Fember-bootstrap-context-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onechiporenko%2Fember-bootstrap-context-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onechiporenko%2Fember-bootstrap-context-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onechiporenko%2Fember-bootstrap-context-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onechiporenko","download_url":"https://codeload.github.com/onechiporenko/ember-bootstrap-context-menu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250477828,"owners_count":21437049,"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-02T12:25:05.075Z","updated_at":"2026-03-06T05:12:48.441Z","avatar_url":"https://github.com/onechiporenko.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-bootstrap-context-menu\n\n[![CI](https://github.com/onechiporenko/ember-bootstrap-context-menu/actions/workflows/ci.yml/badge.svg)](https://github.com/onechiporenko/ember-bootstrap-context-menu/actions/workflows/ci.yml)\n[![Ember Observer Score](https://emberobserver.com/badges/ember-bootstrap-context-menu.svg)](https://emberobserver.com/addons/ember-bootstrap-context-menu)\n[![npm version](https://badge.fury.io/js/ember-bootstrap-context-menu.png)](http://badge.fury.io/js/ember-bootstrap-context-menu)\n[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)\n[![Downloads](http://img.shields.io/npm/dm/ember-bootstrap-context-menu.svg)](https://www.npmjs.com/package/ember-bootstrap-context-menu)\n\n`ember-bootstrap-context-menu` is an Ember-addon that provides a simple mechanism for interaction with user using context menu. This addon is based on `ember-bootstrap`.\n\n## Installation\n\n`ember i ember-bootstrap-context-menu`\n\nAdd next to your `application.hbs`:\n\n```html\n\u003cContextMenuContainer /\u003e\n```\n\nAdd next to your `app.scss` (see [negative-margin docs](https://getbootstrap.com/docs/5.3/utilities/spacing/#negative-margin) for more details) if you want to use multi-level context menu:\n\n```scss\n$enable-negative-margins: true;\n```\n\nUsage:\n\n```typescript\nimport Controller from \"@ember/controller\";\nimport { action } from \"@ember/object\";\nimport { inject as service } from \"@ember/service\";\nimport ContextMenuManager from \"ember-bootstrap-context-menu/services/context-menu-manager\";\n\nexport default class ApplicationController extends Controller {\n  @service declare contextMenuManager: ContextMenuManager;\n\n  @action\n  showContextMenu(e: PointerEvent): void {\n    e.preventDefault();\n    e.stopPropagation();\n    this.contextMenuManager\n      .show(\n        [\n          { id: \"copy\", title: \"Copy\" },\n          { id: \"cut\", title: \"Cut\" },\n          { id: \"paste\", title: \"Paste\" },\n          { id: \"delete\", title: \"Delete\" },\n        ],\n        e.pageX,\n        e.pageY,\n      )\n      .then(({ id }) =\u003e {\n        if (id === \"delete\") {\n          // do delete\n          return;\n        }\n        if (id === \"copy\") {\n          // do copy\n          return;\n        }\n        if (id === \"cut\") {\n          // do cut\n          return;\n        }\n        if (id === \"paste\") {\n          // do paste\n          return;\n        }\n      });\n  }\n}\n```\n\n```hbs\n\u003cdiv {{on \"contextmenu\" this.showContextMenu}}\u003e\n  Right click me\n\u003c/div\u003e\n```\n\n## Compatibility\n\n- `ember-bootstrap@6`\n- `bootstrap@5`\n\n## Demo\n\nCheck [demo-page](https://onechiporenko.github.io/ember-bootstrap-context-menu/#/demo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonechiporenko%2Fember-bootstrap-context-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonechiporenko%2Fember-bootstrap-context-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonechiporenko%2Fember-bootstrap-context-menu/lists"}