├── .all-contributorsrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .github ├── actions │ └── node-setup │ │ └── action.yml ├── issue_template.md ├── pull_request_template.md └── workflows │ └── ci.yml ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .prettierignore ├── .vscode └── extensions.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── apps └── playground │ ├── .eslintrc.json │ ├── karma.conf.js │ ├── project.json │ ├── src │ ├── app │ │ ├── app.component.html │ │ ├── app.component.scss │ │ ├── app.component.ts │ │ ├── reset-location-dialog.component.ts │ │ └── test-dialog.component.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.svg │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ └── test.ts │ ├── tsconfig.app.json │ └── tsconfig.spec.json ├── changelog.config.js ├── commitlint.config.js ├── karma.conf.js ├── libs └── dialog │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── project.json │ ├── src │ ├── lib │ │ ├── close-all-dialogs.directive.ts │ │ ├── dialog-close.directive.ts │ │ ├── dialog-ref.ts │ │ ├── dialog.component.scss │ │ ├── dialog.component.ts │ │ ├── dialog.service.ts │ │ ├── dialog.utils.ts │ │ ├── draggable.directive.ts │ │ ├── providers.ts │ │ ├── specs │ │ │ ├── dialog-close.directive.spec.ts │ │ │ ├── dialog.component.spec.ts │ │ │ ├── dialog.service.spec.ts │ │ │ ├── dialog.spec.ts │ │ │ └── types.spec.ts │ │ └── types.ts │ ├── public-api.ts │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ └── tsconfig.spec.json ├── logo.svg ├── migrations.json ├── nx.json ├── package-lock.json ├── package.json ├── prettier.config.js ├── scripts ├── post-build.js └── pre-commit.js ├── tools ├── generators │ └── .gitkeep └── tsconfig.tools.json └── tsconfig.base.json /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "dialog", 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": "tonivj5", 15 | "name": "Toni Villena", 16 | "avatar_url": "https://avatars2.githubusercontent.com/u/7110786?v=4", 17 | "profile": "https://github.com/tonivj5", 18 | "contributions": [ 19 | "code", 20 | "infra", 21 | "test" 22 | ] 23 | }, 24 | { 25 | "login": "NetanelBasal", 26 | "name": "Netanel Basal", 27 | "avatar_url": "https://avatars1.githubusercontent.com/u/6745730?v=4", 28 | "profile": "https://www.netbasal.com/", 29 | "contributions": [ 30 | "doc", 31 | "ideas", 32 | "code" 33 | ] 34 | }, 35 | { 36 | "login": "theblushingcrow", 37 | "name": "Inbal Sinai", 38 | "avatar_url": "https://avatars3.githubusercontent.com/u/638818?v=4", 39 | "profile": "https://github.com/theblushingcrow", 40 | "contributions": [ 41 | "doc" 42 | ] 43 | }, 44 | { 45 | "login": "shaharkazaz", 46 | "name": "Shahar Kazaz", 47 | "avatar_url": "https://avatars2.githubusercontent.com/u/17194830?v=4", 48 | "profile": "https://github.com/shaharkazaz", 49 | "contributions": [ 50 | "code", 51 | "doc" 52 | ] 53 | }, 54 | { 55 | "login": "beeman", 56 | "name": "beeman", 57 | "avatar_url": "https://avatars3.githubusercontent.com/u/36491?v=4", 58 | "profile": "https://github.com/beeman", 59 | "contributions": [ 60 | "code" 61 | ] 62 | }, 63 | { 64 | "login": "rhutchison", 65 | "name": "Ryan Hutchison", 66 | "avatar_url": "https://avatars.githubusercontent.com/u/1460261?v=4", 67 | "profile": "https://github.com/rhutchison", 68 | "contributions": [ 69 | "code", 70 | "ideas" 71 | ] 72 | }, 73 | { 74 | "login": "Langstra", 75 | "name": "Wybren Kortstra", 76 | "avatar_url": "https://avatars.githubusercontent.com/u/1962982?v=4", 77 | "profile": "https://riskchallenger.nl/", 78 | "contributions": [ 79 | "code" 80 | ] 81 | } 82 | ], 83 | "contributorsPerLine": 7 84 | } 85 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://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 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": ["**/*"], 4 | "plugins": ["@nx"], 5 | "settings": { 6 | "import/resolver": { 7 | "typescript": { 8 | "project": ["libs/*/tsconfig.json", "tsconfig.base.json"] 9 | } 10 | } 11 | }, 12 | "overrides": [ 13 | { 14 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 15 | "rules": { 16 | "@nx/enforce-module-boundaries": [ 17 | "error", 18 | { 19 | "enforceBuildableLibDependency": true, 20 | "allow": [], 21 | "depConstraints": [ 22 | { 23 | "sourceTag": "*", 24 | "onlyDependOnLibsWithTags": ["*"] 25 | } 26 | ] 27 | } 28 | ] 29 | } 30 | }, 31 | { 32 | "files": ["*.ts", "*.tsx"], 33 | "extends": ["plugin:@nx/typescript", "plugin:import/recommended", "plugin:import/typescript"], 34 | "rules": { 35 | "import/order": [ 36 | "error", 37 | { 38 | "groups": ["builtin", "external", "internal", "parent", "sibling"], 39 | "newlines-between": "always" 40 | } 41 | ] 42 | } 43 | }, 44 | { 45 | "files": ["*.js", "*.jsx"], 46 | "extends": ["plugin:@nx/javascript"], 47 | "rules": {} 48 | }, 49 | { 50 | "files": ["**/*.spec.ts", "**/mocks.ts", "**/test-setup.ts"], 51 | "rules": { 52 | "@typescript-eslint/no-explicit-any": "off", 53 | "@angular-eslint/component-class-suffix": "off", 54 | "@typescript-eslint/no-empty-function": "off", 55 | "@typescript-eslint/no-non-null-assertion": "off" 56 | } 57 | }, 58 | { 59 | "files": ["**/types.ts", "**/helpers.ts"], 60 | "rules": { 61 | "@typescript-eslint/no-explicit-any": "off" 62 | } 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /.github/actions/node-setup/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup Node and install dependencies' 2 | description: 'Setup Node and install dependencies' 3 | 4 | runs: 5 | using: 'composite' 6 | steps: 7 | - uses: actions/setup-node@v3 8 | with: 9 | node-version: 18.17.0 10 | cache: 'npm' 11 | 12 | - name: Install dependencies 13 | run: npm ci 14 | shell: bash 15 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | ## I'm submitting a... 8 | 9 | 10 |

11 | [ ] Regression (a behavior that used to work and stopped working in a new release)
12 | [ ] Bug report  
13 | [ ] Performance issue
14 | [ ] Feature request
15 | [ ] Documentation issue or request
16 | [ ] Support request
17 | [ ] Other... Please describe:
18 | 
19 | 20 | ## Current behavior 21 | 22 | 23 | 24 | ## Expected behavior 25 | 26 | 27 | 28 | ## Minimal reproduction of the problem with instructions 29 | 30 | ## What is the motivation / use case for changing the behavior? 31 | 32 | 33 | 34 | ## Environment 35 | 36 |

37 | Angular version: X.Y.Z
38 | 
39 | 
40 | Browser:
41 | - [ ] Chrome (desktop) version XX
42 | - [ ] Chrome (Android) version XX
43 | - [ ] Chrome (iOS) version XX
44 | - [ ] Firefox version XX
45 | - [ ] Safari (desktop) version XX
46 | - [ ] Safari (iOS) version XX
47 | - [ ] IE version XX
48 | - [ ] Edge version XX
49 |  
50 | For Tooling issues:
51 | - Node version: XX  
52 | - Platform:  
53 | 
54 | Others:
55 | 
56 | 
57 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## PR Checklist 2 | 3 | Please check if your PR fulfills the following requirements: 4 | 5 | - [ ] The commit message follows our guidelines: CONTRIBUTING.md#commit 6 | - [ ] Tests for the changes have been added (for bug fixes / features) 7 | - [ ] Docs have been added / updated (for bug fixes / features) 8 | 9 | ## PR Type 10 | 11 | What kind of change does this PR introduce? 12 | 13 | 14 | 15 | ``` 16 | [ ] Bugfix 17 | [ ] Feature 18 | [ ] Code style update (formatting, local variables) 19 | [ ] Refactoring (no functional changes, no api changes) 20 | [ ] Build related changes 21 | [ ] CI related changes 22 | [ ] Documentation content changes 23 | [ ] Other... Please describe: 24 | ``` 25 | 26 | ## What is the current behavior? 27 | 28 | 29 | 30 | Issue Number: N/A 31 | 32 | ## What is the new behavior? 33 | 34 | ## Does this PR introduce a breaking change? 35 | 36 | ``` 37 | [ ] Yes 38 | [ ] No 39 | ``` 40 | 41 | 42 | 43 | ## Other information 44 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | 8 | jobs: 9 | build-lib: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: Setup node 16 | uses: ./.github/actions/node-setup 17 | 18 | - name: Build 19 | run: npm run build:lib 20 | 21 | build-playground: 22 | runs-on: ubuntu-latest 23 | 24 | steps: 25 | - uses: actions/checkout@v3 26 | 27 | - name: Setup node 28 | uses: ./.github/actions/node-setup 29 | 30 | - name: Build playground 31 | run: npm run build 32 | 33 | test: 34 | runs-on: ubuntu-latest 35 | 36 | steps: 37 | - uses: actions/checkout@v3 38 | 39 | - name: Setup node 40 | uses: ./.github/actions/node-setup 41 | 42 | - name: Run tests 43 | run: npm run ci:test 44 | 45 | lint: 46 | runs-on: ubuntu-latest 47 | 48 | steps: 49 | - uses: actions/checkout@v3 50 | 51 | - name: Setup node 52 | uses: ./.github/actions/node-setup 53 | 54 | - name: Run tests 55 | run: npm run ci:lint 56 | -------------------------------------------------------------------------------- /.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 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | yarn-error.log 34 | testem.log 35 | /typings 36 | 37 | # System Files 38 | .DS_Store 39 | Thumbs.db 40 | 41 | .angular 42 | .nx 43 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit $1 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run hooks:pre-commit && npx lint-staged 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | /dist 3 | /coverage 4 | /.nx/cache -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["nrwl.angular-console", "angular.ng-template", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /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 Dialog 2 | 3 | 🙏 We would ❤️ for you to contribute to Dialog 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 run test:lib 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 Dialog 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 |