{"id":15537496,"url":"https://github.com/nullvoxpopuli/ember-spicy-forms","last_synced_at":"2025-04-23T14:36:06.888Z","repository":{"id":56668327,"uuid":"207887152","full_name":"NullVoxPopuli/ember-spicy-forms","owner":"NullVoxPopuli","description":"Form library that lets you handle the presentation","archived":false,"fork":false,"pushed_at":"2024-10-31T01:17:38.000Z","size":425,"stargazers_count":5,"open_issues_count":19,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T00:31:41.937Z","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/NullVoxPopuli.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":"2019-09-11T19:08:38.000Z","updated_at":"2020-03-03T03:01:54.000Z","dependencies_parsed_at":"2023-12-22T05:25:35.724Z","dependency_job_id":"d0f3a672-d7b1-4f8d-b248-72c24d8c7fb5","html_url":"https://github.com/NullVoxPopuli/ember-spicy-forms","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-spicy-forms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-spicy-forms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-spicy-forms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullVoxPopuli%2Fember-spicy-forms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NullVoxPopuli","download_url":"https://codeload.github.com/NullVoxPopuli/ember-spicy-forms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250453372,"owners_count":21433188,"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:57:44.859Z","updated_at":"2025-04-23T14:36:06.858Z","avatar_url":"https://github.com/NullVoxPopuli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ember-spicy-forms\n==============================================================================\n\nHelpers for universal form control.\n\nNotes:\n - https://www.npmjs.com/package/validated-proxy\n - https://github.com/ololabs/principled-forms\n - https://github.com/gossi/spomoda/blob/master/web/app/utils/changeset.ts\n   - https://github.com/gossi/spomoda/blob/master/web/app/ui/components/skill-form/template.hbs\n\nGoals:\n - integration with validation libraries\n - able to be given some object that knows how to persistent state (to maybe local storage in case of browser refresh, or computer crash)\n - can be given a pojo\n - provide helpers for decoupling UI from the from.\n - let the user decide when and how to validate?\n\nMaybe Goals:\n - store history of change sets (would allow for undo)\n - multi stage forms?\n\nAPI Ideas\n\n```hbs\n\u003cSpicyForm\n  @onSubmit={{this.doTheSubmit}}\n  @data={{this.somePojo}}\n  @validator={{this.yupValidator}}\nas |form|\u003e\n  {{#form.helpersFor 'firstName' as |firstName|}}\n\n    {{#if firstName.hasError}}\n      {{firstName.error}}\n    {{/if}}\n\n    \u003clabel for={{firstName.fieldId}}\u003eFirst name\u003c/label\u003e\n    \u003cinput\n      id={{firstName.fieldId}}\n      value={{firstName.value}}\n      {{on 'input' firstName.onInput}}\n    \u003e\n\n  {{/form.helpersFor}}\n\n  {{#form.helpersFor 'hasNotifications' as |hasNotifications|}}\n\n    \u003clabel for={{hasNotifications.fieldId}}\u003eEnable Notifications?\u003c/label\u003e\n\n    \u003cinput\n      type='checkbox'\n      id={{hasNotifications.fieldId}}\n      checked={{hasNotifications.checked}}\n      {{on 'change' (pipe\n        this.requestPermission\n        (hasNotifications.withChangeset (perform this.doWork))\n      ) }}\n    \u003e\n\n  {{/form.helpersFor}}\n\u003c/SpicyForm\u003e\n```\n\nMaybe if/when we get hash-splatting, \"splashes\"?:\n```hbs\n\u003cSpicyForm\n  @onSubmit={{this.doTheSubmit}}\n  @data={{this.somePojo}}\n  @validator={{this.yupValidator}}\nas |form|\u003e\n  {{#form.helpersFor 'firstName' as |firstName|}}\n\n    {{#if firstName.hasError}}\n      {{firstName.error}}\n    {{/if}}\n\n    \u003clabel for={{firstName.fieldId}}\u003eFirst name\u003c/label\u003e\n    \u003cinput ...firstName.inputAttributes\u003e\n\n  {{/form.helpersFor}}\n\n  {{#form.helpersFor 'hasNotifications' as |hasNotifications|}}\n\n    \u003clabel for={{hasNotifications.fieldId}}\u003eEnable Notifications?\u003c/label\u003e\n    \u003cinput type='checkbox' ...hasNotifications.inputAttributes\u003e\n\n  {{/form.helpersFor}}\n\u003c/SpicyForm\u003e\n```\n\nCompatibility\n------------------------------------------------------------------------------\n\n* Ember.js v3.12 or above\n* Ember CLI v3.12 or above\n* Node.js v8 or above\n\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install ember-spicy-forms\n```\n\n\nUsage\n------------------------------------------------------------------------------\n\n[Longer description of how to use the addon in apps.]\n\n\nContributing\n------------------------------------------------------------------------------\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\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%2Fnullvoxpopuli%2Fember-spicy-forms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnullvoxpopuli%2Fember-spicy-forms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnullvoxpopuli%2Fember-spicy-forms/lists"}