{"id":15536213,"url":"https://github.com/kellyselden/ember-async-action-container","last_synced_at":"2026-06-13T20:03:18.352Z","repository":{"id":57222990,"uuid":"130800479","full_name":"kellyselden/ember-async-action-container","owner":"kellyselden","description":"An async state wrapper","archived":false,"fork":false,"pushed_at":"2018-04-25T21:44:03.000Z","size":282,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T03:16:08.600Z","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/kellyselden.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}},"created_at":"2018-04-24T05:25:54.000Z","updated_at":"2018-04-25T21:44:08.000Z","dependencies_parsed_at":"2022-08-25T12:22:20.839Z","dependency_job_id":null,"html_url":"https://github.com/kellyselden/ember-async-action-container","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellyselden%2Fember-async-action-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellyselden%2Fember-async-action-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellyselden%2Fember-async-action-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kellyselden%2Fember-async-action-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kellyselden","download_url":"https://codeload.github.com/kellyselden/ember-async-action-container/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240093148,"owners_count":19746777,"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-02T11:50:28.025Z","updated_at":"2026-05-06T03:30:19.160Z","avatar_url":"https://github.com/kellyselden.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ember-async-action-container\n==============================================================================\n\n[![npm version](https://badge.fury.io/js/ember-async-action-container.svg)](https://badge.fury.io/js/ember-async-action-container)\n[![Build Status](https://travis-ci.org/kellyselden/ember-async-action-container.svg?branch=master)](https://travis-ci.org/kellyselden/ember-async-action-container)\n\nAn async state wrapper\n\nInspired by https://github.com/DockYard/ember-async-button\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install ember-async-action-container\n```\n\n\nUsage\n------------------------------------------------------------------------------\n\n```hbs\n{{#async-action-container\n  action=(action \"myAction\")\n  as |action promise|\n}}\n  \u003cbutton\n    disabled={{promise.isPending}}\n    {{action action}}\n  \u003e\n    {{#if promise.isPending}}\n      Submitting\n    {{else}}\n      Submit\n    {{/if}}\n  \u003c/button\u003e\n{{/async-action-container}}\n```\n\nIf you want reset state:\n\n```hbs\n{{#async-action-container\n  action=(action \"myAction\")\n  callback=(action (mut myPromise))\n  promise=myPromise\n  as |action promise|\n}}\n  \u003cbutton\n    disabled={{or\n      promise.isPending\n      promise.isFulfilled\n    }}\n    {{action action}}\n  \u003e\n    {{#if promise.isPending}}\n      Submitting\n    {{else if promise.isRejected}}\n      Submit again\n    {{else if promise.isFulfilled}}\n      Submitted\n    {{else}}\n      Submit\n    {{/if}}\n  \u003c/button\u003e\n{{/async-action-container}}\n```\n\nThen\n\n```js\nthis.set('myPromise', null);\n```\n\nto reset.\n\nThe CSS classes exposed are `default`, `pending`, `settled`, `rejected`, and `fulfilled`.\n\n\nContributing\n------------------------------------------------------------------------------\n\n### Installation\n\n* `git clone \u003crepository-url\u003e`\n* `cd ember-async-action-container`\n* `npm install`\n\n### Linting\n\n* `npm run lint:js`\n* `npm run lint:js -- --fix`\n\n### Running tests\n\n* `ember test` – Runs the test suite on the current Ember version\n* `ember test --server` – Runs the test suite in \"watch mode\"\n* `ember try:each` – Runs the test suite against multiple Ember versions\n\n### Running the dummy application\n\n* `ember serve`\n* Visit the dummy application at [http://localhost:4200](http://localhost:4200).\n\nFor more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).\n\nLicense\n------------------------------------------------------------------------------\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellyselden%2Fember-async-action-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkellyselden%2Fember-async-action-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkellyselden%2Fember-async-action-container/lists"}