├── .all-contributorsrc ├── .editorconfig ├── .gitignore ├── .prettierignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── LICENSE ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── angular.json ├── commitlint.config.js ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.e2e.json ├── logo.png ├── package-lock.json ├── package.json ├── prettier.config.js ├── projects └── ngneat │ └── forms-manager │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── src │ ├── lib │ │ ├── builders.ts │ │ ├── config.ts │ │ ├── forms-manager.spec.ts │ │ ├── forms-manager.store.ts │ │ ├── forms-manager.ts │ │ ├── injection-tokens.spec.ts │ │ ├── injection-tokens.ts │ │ ├── isEqual.ts │ │ ├── test-types.ts │ │ ├── types.ts │ │ ├── utils.ts │ │ └── validators.ts │ ├── public_api.ts │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ ├── tsconfig.spec.json │ └── tslint.json ├── src ├── .browserslistrc ├── app │ ├── app-routing.module.ts │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.ts │ ├── app.module.ts │ ├── demo │ │ └── demo.component.ts │ ├── home │ │ ├── home.component.html │ │ ├── home.component.scss │ │ ├── home.component.spec.ts │ │ └── home.component.ts │ ├── step-one │ │ ├── step-one.component.ts │ │ └── step-one.d.ts │ └── step-two │ │ ├── step-two.component.ts │ │ └── step-two.d.ts ├── assets │ └── .gitkeep ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── karma.conf.js ├── main.ts ├── polyfills.ts ├── styles.scss ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json └── tslint.json ├── tsconfig.json ├── tslint.json └── yarn.lock /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "forms-manager", 3 | "projectOwner": "ngneat", 4 | "repoType": "github", 5 | "repoHost": "https://github.com", 6 | "files": [ 7 | "README.md" 8 | ], 9 | "imageSize": 100, 10 | "commit": true, 11 | "commitConvention": "angular", 12 | "contributors": [ 13 | { 14 | "login": "NetanelBasal", 15 | "name": "Netanel Basal", 16 | "avatar_url": "https://avatars1.githubusercontent.com/u/6745730?v=4", 17 | "profile": "https://www.netbasal.com", 18 | "contributions": [ 19 | "code", 20 | "doc", 21 | "ideas" 22 | ] 23 | }, 24 | { 25 | "login": "Coly010", 26 | "name": "Colum Ferry", 27 | "avatar_url": "https://avatars2.githubusercontent.com/u/12140467?v=4", 28 | "profile": "https://github.com/Coly010", 29 | "contributions": [ 30 | "code", 31 | "doc" 32 | ] 33 | }, 34 | { 35 | "login": "mehmet-erim", 36 | "name": "Mehmet Erim", 37 | "avatar_url": "https://avatars0.githubusercontent.com/u/34455572?v=4", 38 | "profile": "https://github.com/mehmet-erim", 39 | "contributions": [ 40 | "doc" 41 | ] 42 | }, 43 | { 44 | "login": "dspeirs7", 45 | "name": "David Speirs", 46 | "avatar_url": "https://avatars2.githubusercontent.com/u/739058?v=4", 47 | "profile": "https://github.com/dspeirs7", 48 | "contributions": [ 49 | "code", 50 | "doc" 51 | ] 52 | }, 53 | { 54 | "login": "manudss", 55 | "name": "Emmanuel De Saint Steban", 56 | "avatar_url": "https://avatars3.githubusercontent.com/u/1046806?v=4", 57 | "profile": "https://github.com/manudss", 58 | "contributions": [ 59 | "code", 60 | "doc" 61 | ] 62 | }, 63 | { 64 | "login": "adrianriepl", 65 | "name": "Adrian Riepl", 66 | "avatar_url": "https://avatars2.githubusercontent.com/u/11076678?v=4", 67 | "profile": "https://github.com/adrianriepl", 68 | "contributions": [ 69 | "code", 70 | "doc" 71 | ] 72 | } 73 | ], 74 | "contributorsPerLine": 7 75 | } 76 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # Codespaces 28 | /.devcontainer 29 | 30 | # misc 31 | /.sass-cache 32 | /connect.lock 33 | /coverage 34 | /libpeerconnection.log 35 | npm-debug.log 36 | yarn-error.log 37 | testem.log 38 | /typings 39 | 40 | # System Files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | dist -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 | 5 | ## [2.5.0](https://github.com/ngneat/forms-manager/compare/v2.4.0...v2.5.0) (2021-10-18) 6 | 7 | 8 | ### Features 9 | 10 | * **forms-manager:** add support for configurable browser storage ([f468036](https://github.com/ngneat/forms-manager/commit/f468036ceca4a34b1f9e5d636853943c17f07dfe)) 11 | * **forms-manager:** add support for configurable browser storage ([07073ee](https://github.com/ngneat/forms-manager/commit/07073ee679bc16205c41b58a8fb304db24914c24)) 12 | * **forms-manager:** add support for session storage ([e87ff6f](https://github.com/ngneat/forms-manager/commit/e87ff6f34392ca890d7efc5ef1a1466e40727175)) 13 | 14 | ## [2.4.0](https://github.com/ngneat/forms-manager/compare/v2.3.0...v2.4.0) (2021-06-27) 15 | 16 | ### Features 17 | 18 | - **forms-mananger:** added reset proxy ([091723e](https://github.com/ngneat/forms-manager/commit/091723edc05350cb7aa8bce2b3afb95dd0c9a291)) 19 | 20 | ### Bug Fixes 21 | 22 | - 🐛 clear all initial values when clearing complete store ([fb642a5](https://github.com/ngneat/forms-manager/commit/fb642a5e5358b694be16b4e3f17c2a4faab80c6c)), closes [#29](https://github.com/ngneat/forms-manager/issues/29) 23 | 24 | ## [2.3.0](https://github.com/ngneat/forms-manager/compare/v2.2.0...v2.3.0) (2020-10-21) 25 | 26 | ### Features 27 | 28 | - **lib:** add property untouched to type Control ([5ad73f6](https://github.com/ngneat/forms-manager/commit/5ad73f621703a03f27c338b1e3242da2474711fa)) 29 | - **lib:** support for mark\* methods ([f622d25](https://github.com/ngneat/forms-manager/commit/f622d2546b69859109a1d4e5299103465fbae6fe)) 30 | 31 | ## [2.2.0](https://github.com/ngneat/forms-manager/compare/v2.1.2...v2.2.0) (2020-09-27) 32 | 33 | ### Features 34 | 35 | - **lib:** add getInitialValue() function ([c7b134f](https://github.com/ngneat/forms-manager/commit/c7b134f2a1472680dd99ce0855e1eb11a77f01e8)), closes [#15](https://github.com/ngneat/forms-manager/issues/15) 36 | 37 | ### Bug Fixes 38 | 39 | - add unit tests ([a5fcdbd](https://github.com/ngneat/forms-manager/commit/a5fcdbda41bd470c411d192b06c297c85eed0e38)) 40 | - do not debounce for update on blur ([edd5fb0](https://github.com/ngneat/forms-manager/commit/edd5fb07274ddc23e1585acd281c4dd9c06e86aa)) 41 | 42 | ### [2.1.2](https://github.com/ngneat/forms-manager/compare/v2.1.0...v2.1.2) (2020-06-15) 43 | 44 | ### Bug Fixes 45 | 46 | - do not use spread operator on valid dates ([b68419d](https://github.com/ngneat/forms-manager/commit/b68419d121d66b38880dda276bfebd1ccb35d0a7)), closes [#7](https://github.com/ngneat/forms-manager/issues/7) 47 | 48 | ### [2.1.1](https://github.com/ngneat/forms-manager/compare/v2.1.0...v2.1.1) (2020-06-15) 49 | 50 | ### Bug Fixes 51 | 52 | - do not use spread operator on valid dates ([b68419d](https://github.com/ngneat/forms-manager/commit/b68419d121d66b38880dda276bfebd1ccb35d0a7)), closes [#7](https://github.com/ngneat/forms-manager/issues/7) 53 | 54 | ## [2.1.0](https://github.com/ngneat/forms-manager/compare/v2.0.0...v2.1.0) (2019-12-22) 55 | 56 | ### Features 57 | 58 | - **lib:** add dirty functionality ([701ccef](https://github.com/ngneat/forms-manager/commit/701ccef119afa9690510d385138d5016dda55bbb)) 59 | 60 | ## [1.1.0](https://github.com/ngneat/forms-manager/compare/v1.0.2...v1.1.0) (2019-12-17) 61 | 62 | ### Features 63 | 64 | - **api:** change the api to be more angularish ([adbe550](https://github.com/ngneat/forms-manager/commit/adbe550e57235a0d33d78c17295b1719c5b0f303)) 65 | 66 | ### [1.0.2](https://github.com/ngneat/forms-manager/compare/v1.0.1...v1.0.2) (2019-12-13) 67 | 68 | ### Bug Fixes 69 | 70 | - **storage:** should merge the object ([01ce2e5](https://github.com/ngneat/forms-manager/commit/01ce2e51c9eb509b49d9fa415d12536e9c817549)) 71 | 72 | ### [1.0.1](https://github.com/ngneat/forms-manager/compare/v1.0.0...v1.0.1) (2019-12-12) 73 | 74 | ### Bug Fixes 75 | 76 | - **selectvalue:** should be typed ([a196e96](https://github.com/ngneat/forms-manager/commit/a196e9625d57bddbcff7d8b471fc0a5a0dcf059a)) 77 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | - Using welcoming and inclusive language 12 | - Being respectful of differing viewpoints and experiences 13 | - Gracefully accepting constructive criticism 14 | - Focusing on what is best for the community 15 | - Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | - Trolling, insulting/derogatory comments, and personal or political attacks 21 | - Public or private harassment 22 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | - Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at netanel7799@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Forms Manager 2 | 3 | 🙏 We would ❤️ for you to contribute to Forms Manager and help make it even better than it is today! 4 | 5 | # Developing 6 | 7 | Start by installing all dependencies: 8 | 9 | ```bash 10 | npm i 11 | ``` 12 | 13 | Run the tests: 14 | 15 | ```bash 16 | npm test 17 | ``` 18 | 19 | Run the playground app: 20 | 21 | ```bash 22 | npm start 23 | ``` 24 | 25 | ## Building 26 | 27 | ```bash 28 | npm run build 29 | ``` 30 | 31 | ## Coding Rules 32 | 33 | To ensure consistency throughout the source code, keep these rules in mind as you are working: 34 | 35 | - All features or bug fixes **must be tested** by one or more specs (unit-tests). 36 | - All public API methods **must be documented**. 37 | 38 | ## Commit Message Guidelines 39 | 40 | We have very precise rules over how our git commit messages can be formatted. This leads to **more 41 | readable messages** that are easy to follow when looking through the **project history**. But also, 42 | we use the git commit messages to **generate the Forms Manager changelog**. 43 | 44 | ### Commit Message Format 45 | 46 | Each commit message consists of a **header**, a **body** and a **footer**. The header has a special 47 | format that includes a **type**, a **scope** and a **subject**: 48 | 49 | ``` 50 | (): 51 | 52 | 53 | 54 |