ngx-mat-input-tel 21.4.2 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.angulardoc.json +4 -0
- package/.editorconfig +13 -0
- package/.github/FUNDING.yml +13 -0
- package/.github/instructions/copilot-instructions.md +58 -0
- package/.github/workflows/ci.yml +27 -0
- package/.github/workflows/publish.yml +41 -0
- package/.github/workflows/test.yml +39 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +1 -0
- package/.prettierrc +15 -0
- package/angular.json +170 -0
- package/commitlint.config.ts +3 -0
- package/eslint.config.js +43 -0
- package/example-1.png +0 -0
- package/package.json +84 -55
- package/pnpm-workspace.yaml +19 -0
- package/projects/demo/eslint.config.js +3 -0
- package/projects/demo/karma.conf.js +31 -0
- package/projects/demo/src/app/app.html +123 -0
- package/projects/demo/src/app/app.scss +16 -0
- package/projects/demo/src/app/app.spec.ts +35 -0
- package/projects/demo/src/app/app.ts +100 -0
- package/projects/demo/src/app/dialog/dialog.html +12 -0
- package/projects/demo/src/app/dialog/dialog.ts +31 -0
- package/projects/demo/src/environments/environment.prod.ts +3 -0
- package/projects/demo/src/environments/environment.ts +3 -0
- package/projects/demo/src/favicon.ico +0 -0
- package/projects/demo/src/index.html +21 -0
- package/projects/demo/src/main.ts +16 -0
- package/projects/demo/src/styles.scss +32 -0
- package/projects/demo/tsconfig.app.json +17 -0
- package/projects/demo/tsconfig.spec.json +17 -0
- package/projects/ngx-mat-input-tel/eslint.config.js +3 -0
- package/projects/ngx-mat-input-tel/karma.conf.js +31 -0
- package/projects/ngx-mat-input-tel/ng-package.json +8 -0
- package/projects/ngx-mat-input-tel/package.json +48 -0
- package/projects/ngx-mat-input-tel/src/lib/assets/arrow_drop_down_grey600_18dp.png +0 -0
- package/projects/ngx-mat-input-tel/src/lib/assets/flags_sprite_2x.png +0 -0
- package/projects/ngx-mat-input-tel/src/lib/data/country-code.const.ts +792 -0
- package/projects/ngx-mat-input-tel/src/lib/model/country.model.ts +12 -0
- package/projects/ngx-mat-input-tel/src/lib/model/phone-number-format.model.ts +1 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel-dialog/ngx-mat-input-tel.dialog.html +82 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel-dialog/ngx-mat-input-tel.dialog.scss +91 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel-dialog/ngx-mat-input-tel.dialog.ts +136 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel-flag/ngx-mat-input-tel-flag.scss +319 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel-flag/ngx-mat-input-tel-flag.ts +72 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.html +42 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.scss +122 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.spec.ts +318 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.ts +625 -0
- package/projects/ngx-mat-input-tel/src/lib/ngx-mat-input-tel.validator.ts +35 -0
- package/projects/ngx-mat-input-tel/src/lib/remove-iso.pipe.ts +13 -0
- package/projects/ngx-mat-input-tel/src/public-api.ts +7 -0
- package/projects/ngx-mat-input-tel/src/test.ts +10 -0
- package/projects/ngx-mat-input-tel/tsconfig.lib.json +25 -0
- package/projects/ngx-mat-input-tel/tsconfig.lib.prod.json +15 -0
- package/projects/ngx-mat-input-tel/tsconfig.spec.json +16 -0
- package/tsconfig.json +28 -0
- package/fesm2022/ngx-mat-input-tel.mjs +0 -1603
- package/fesm2022/ngx-mat-input-tel.mjs.map +0 -1
- package/types/ngx-mat-input-tel.d.ts +0 -162
package/.angulardoc.json
ADDED
package/.editorconfig
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
[*.md]
|
|
12
|
+
max_line_length = off
|
|
13
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: rbalet
|
|
4
|
+
# patreon: RaphaelBalet
|
|
5
|
+
# open_collective: # Replace with a single Open Collective username
|
|
6
|
+
# ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
# liberapay: # Replace with a single Liberapay username
|
|
10
|
+
# issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
# otechie: # Replace with a single Otechie username
|
|
12
|
+
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
+
custom: https://www.buymeacoffee.com/widness
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Copilot Instructions for ngx-mat-input-tel
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
|
|
5
|
+
- This is an Angular Material library for international telephone input, with country flag dropdown, validation, and formatting using `libphonenumber-js`.
|
|
6
|
+
- Main library code is in `projects/ngx-mat-input-tel/src/lib/`.
|
|
7
|
+
- Demo/test app is in `projects/demo/`.
|
|
8
|
+
- Country data and phone formats are in `src/lib/data/country-code.const.ts`.
|
|
9
|
+
|
|
10
|
+
## Key Components & Data Flow
|
|
11
|
+
|
|
12
|
+
- `NgxMatInputTelComponent` is the core input component, using Angular signals and forms.
|
|
13
|
+
- Country selection, phone formatting, and validation are handled in the component, with country data from `ALL_COUNTRIES` and examples from `EXAMPLES`.
|
|
14
|
+
- Country flags are rendered via `NgxMatInputTelFlagComponent` and assets in `src/lib/assets/`.
|
|
15
|
+
- Validation uses a custom validator: `ngxMatInputTelValidator`.
|
|
16
|
+
|
|
17
|
+
## Developer Workflows
|
|
18
|
+
|
|
19
|
+
- **Build library:** `npm run build_lib`
|
|
20
|
+
- **Build + package:** `npm run package`
|
|
21
|
+
- **Test:** Use Angular's default test commands in the tester app.
|
|
22
|
+
- **Local usage:** Build and package, then install `.tgz` in another project.
|
|
23
|
+
- **Demo:** Run the tester app for live examples.
|
|
24
|
+
|
|
25
|
+
## Project-Specific Patterns
|
|
26
|
+
|
|
27
|
+
- Country data is stored as arrays; see `ALL_COUNTRIES` for structure.
|
|
28
|
+
- Inputs use Angular's new signals API and template syntax (`@if`, `@for`).
|
|
29
|
+
- Boolean inputs can be passed as attributes (e.g., `enablePlaceholder`) or with `[enablePlaceholder]="true"`.
|
|
30
|
+
- Preferred and only countries are filtered via input arrays.
|
|
31
|
+
- Custom CSS variables control flag/placeholder display.
|
|
32
|
+
|
|
33
|
+
## Integration Points
|
|
34
|
+
|
|
35
|
+
- Relies on `libphonenumber-js` for phone parsing/validation.
|
|
36
|
+
- Angular Material modules are imported directly in component decorators.
|
|
37
|
+
- Country data and phone examples are tightly coupled to input logic.
|
|
38
|
+
|
|
39
|
+
## Conventions
|
|
40
|
+
|
|
41
|
+
- All country codes are lowercase ISO2 (e.g., `us`, `gb`).
|
|
42
|
+
- Country data arrays: `[name, iso2, dialCode, priority?, areaCodes?]`.
|
|
43
|
+
- Use signals for reactive state in components.
|
|
44
|
+
- Use `mat-hint` and `mat-error` for displaying validation and placeholders.
|
|
45
|
+
|
|
46
|
+
## Example: Adding a Country
|
|
47
|
+
|
|
48
|
+
- Update `ALL_COUNTRIES` in `country-code.const.ts`.
|
|
49
|
+
- Add example number to `EXAMPLES`.
|
|
50
|
+
- Ensure flag asset exists if needed.
|
|
51
|
+
|
|
52
|
+
## Key Files
|
|
53
|
+
|
|
54
|
+
- `src/lib/ngx-mat-input-tel.ts` (main logic)
|
|
55
|
+
- `src/lib/data/country-code.const.ts` (country data)
|
|
56
|
+
- `src/lib/ngx-mat-input-tel.validator.ts` (validation)
|
|
57
|
+
- `src/lib/ngx-mat-input-tel-flag/ngx-mat-input-tel-flag.ts` (flag rendering)
|
|
58
|
+
- `projects/demo/src/app/app.html` (usage examples)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref_name }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
uses: ./.github/workflows/test.yml
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
secrets: inherit
|
|
18
|
+
|
|
19
|
+
publish:
|
|
20
|
+
needs: test
|
|
21
|
+
uses: ./.github/workflows/publish.yml
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write # to be able to publish a GitHub release
|
|
24
|
+
issues: write # to be able to comment on released issues
|
|
25
|
+
pull-requests: write # to be able to comment on released pull requests
|
|
26
|
+
id-token: write # to enable use of OIDC for npm provenance
|
|
27
|
+
secrets: inherit
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
publish:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write # to be able to publish a GitHub release
|
|
11
|
+
issues: write # to be able to comment on released issues
|
|
12
|
+
pull-requests: write # to be able to comment on released pull requests
|
|
13
|
+
id-token: write # to enable use of OIDC for npm provenance
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: ⬇️ Get latest code
|
|
17
|
+
uses: actions/checkout@v6
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: ⬇️ Install pnpm
|
|
22
|
+
uses: pnpm/action-setup@v6
|
|
23
|
+
|
|
24
|
+
- name: ⬇️ Get Node.js
|
|
25
|
+
uses: actions/setup-node@v6
|
|
26
|
+
with:
|
|
27
|
+
node-version: 24
|
|
28
|
+
cache: "pnpm"
|
|
29
|
+
|
|
30
|
+
- name: 📦 Install dependencies
|
|
31
|
+
run: pnpm install
|
|
32
|
+
|
|
33
|
+
- name: 🏗️ Build
|
|
34
|
+
run: pnpm run build && pnpm run copy-files
|
|
35
|
+
|
|
36
|
+
- name: 🚀 release
|
|
37
|
+
run: pnpm exec semantic-release --branches main
|
|
38
|
+
env:
|
|
39
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
40
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
41
|
+
NPM_CONFIG_PROVENANCE: true
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_call:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
steps:
|
|
15
|
+
- name: ⬇️ Get latest code
|
|
16
|
+
uses: actions/checkout@v6
|
|
17
|
+
|
|
18
|
+
- name: ⬇️ Install pnpm
|
|
19
|
+
uses: pnpm/action-setup@v6
|
|
20
|
+
|
|
21
|
+
- name: ⬇️ Get Node.js
|
|
22
|
+
uses: actions/setup-node@v6
|
|
23
|
+
with:
|
|
24
|
+
node-version: 24
|
|
25
|
+
cache: "pnpm"
|
|
26
|
+
|
|
27
|
+
- name: 📦 Install dependencies
|
|
28
|
+
run: pnpm install
|
|
29
|
+
|
|
30
|
+
- name: 🧪 Run tests
|
|
31
|
+
run: pnpm run test:ci
|
|
32
|
+
|
|
33
|
+
- name: 📊 Upload coverage to Codecov
|
|
34
|
+
uses: codecov/codecov-action@v6
|
|
35
|
+
with:
|
|
36
|
+
files: ./coverage/ngx-back-button/lcov.info
|
|
37
|
+
flags: unittests
|
|
38
|
+
name: ngx-back-button-coverage
|
|
39
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx lint-staged
|
package/.prettierrc
ADDED
package/angular.json
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"ngx-mat-input-tel": {
|
|
7
|
+
"root": "projects/ngx-mat-input-tel",
|
|
8
|
+
"sourceRoot": "projects/ngx-mat-input-tel/src",
|
|
9
|
+
"projectType": "library",
|
|
10
|
+
"prefix": "lib",
|
|
11
|
+
"schematics": {
|
|
12
|
+
"@schematics/angular:component": {
|
|
13
|
+
"style": "scss",
|
|
14
|
+
"standalone": true
|
|
15
|
+
},
|
|
16
|
+
"@schematics/angular:application": {
|
|
17
|
+
"strict": true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"architect": {
|
|
21
|
+
"build": {
|
|
22
|
+
"builder": "@angular/build:ng-packagr",
|
|
23
|
+
"options": {
|
|
24
|
+
"tsConfig": "projects/ngx-mat-input-tel/tsconfig.lib.json",
|
|
25
|
+
"project": "projects/ngx-mat-input-tel/ng-package.json"
|
|
26
|
+
},
|
|
27
|
+
"configurations": {
|
|
28
|
+
"production": {
|
|
29
|
+
"tsConfig": "projects/ngx-mat-input-tel/tsconfig.lib.prod.json"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"test": {
|
|
34
|
+
"builder": "@angular/build:unit-test",
|
|
35
|
+
"options": {
|
|
36
|
+
"buildTarget": "ngx-mat-input-tel:build",
|
|
37
|
+
"tsConfig": "projects/ngx-mat-input-tel/tsconfig.spec.json",
|
|
38
|
+
"runner": "vitest",
|
|
39
|
+
"coverageReporters": ["lcov", "text-summary"]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"lint": {
|
|
43
|
+
"builder": "@angular-eslint/builder:lint",
|
|
44
|
+
"options": {
|
|
45
|
+
"lintFilePatterns": [
|
|
46
|
+
"projects/ngx-mat-input-tel/**/*.ts",
|
|
47
|
+
"projects/ngx-mat-input-tel/**/*.html"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"demo": {
|
|
54
|
+
"root": "projects/demo/",
|
|
55
|
+
"sourceRoot": "projects/demo/src",
|
|
56
|
+
"projectType": "application",
|
|
57
|
+
"prefix": "app",
|
|
58
|
+
"schematics": {},
|
|
59
|
+
"architect": {
|
|
60
|
+
"build": {
|
|
61
|
+
"builder": "@angular/build:application",
|
|
62
|
+
"options": {
|
|
63
|
+
"aot": true,
|
|
64
|
+
"outputPath": {
|
|
65
|
+
"base": "dist/demo"
|
|
66
|
+
},
|
|
67
|
+
"index": "projects/demo/src/index.html",
|
|
68
|
+
"tsConfig": "projects/demo/tsconfig.app.json",
|
|
69
|
+
"assets": ["projects/demo/src/favicon.ico", "projects/demo/src/assets"],
|
|
70
|
+
"styles": [
|
|
71
|
+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
|
72
|
+
"projects/demo/src/styles.scss"
|
|
73
|
+
],
|
|
74
|
+
"scripts": [],
|
|
75
|
+
"browser": "projects/demo/src/main.ts"
|
|
76
|
+
},
|
|
77
|
+
"configurations": {
|
|
78
|
+
"production": {
|
|
79
|
+
"fileReplacements": [
|
|
80
|
+
{
|
|
81
|
+
"replace": "projects/demo/src/environments/environment.ts",
|
|
82
|
+
"with": "projects/demo/src/environments/environment.prod.ts"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"optimization": true,
|
|
86
|
+
"outputHashing": "all",
|
|
87
|
+
"namedChunks": false,
|
|
88
|
+
"aot": true,
|
|
89
|
+
"extractLicenses": true,
|
|
90
|
+
"budgets": [
|
|
91
|
+
{
|
|
92
|
+
"type": "initial",
|
|
93
|
+
"maximumWarning": "2mb",
|
|
94
|
+
"maximumError": "5mb"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "anyComponentStyle",
|
|
98
|
+
"maximumWarning": "6kb"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"testing": {
|
|
103
|
+
"aot": false,
|
|
104
|
+
"optimization": false,
|
|
105
|
+
"extractLicenses": false,
|
|
106
|
+
"styles": ["projects/demo/src/styles.scss"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"serve": {
|
|
111
|
+
"builder": "@angular/build:dev-server",
|
|
112
|
+
"options": {
|
|
113
|
+
"buildTarget": "demo:build"
|
|
114
|
+
},
|
|
115
|
+
"configurations": {
|
|
116
|
+
"production": {
|
|
117
|
+
"buildTarget": "demo:build:production"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"test": {
|
|
122
|
+
"builder": "@angular/build:unit-test",
|
|
123
|
+
"options": {
|
|
124
|
+
"tsConfig": "projects/demo/tsconfig.spec.json",
|
|
125
|
+
"reporters": ["default"],
|
|
126
|
+
"setupFiles": ["projects/demo/src/test.ts"],
|
|
127
|
+
"buildTarget": ":build:testing",
|
|
128
|
+
"runner": "vitest"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"lint": {
|
|
132
|
+
"builder": "@angular-eslint/builder:lint",
|
|
133
|
+
"options": {
|
|
134
|
+
"lintFilePatterns": ["projects/demo//**/*.ts", "projects/demo//**/*.html"]
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"cli": {
|
|
141
|
+
"schematicCollections": ["@angular-eslint/schematics"],
|
|
142
|
+
"analytics": false
|
|
143
|
+
},
|
|
144
|
+
"schematics": {
|
|
145
|
+
"@schematics/angular:component": {
|
|
146
|
+
"type": "component"
|
|
147
|
+
},
|
|
148
|
+
"@schematics/angular:directive": {
|
|
149
|
+
"type": "directive"
|
|
150
|
+
},
|
|
151
|
+
"@schematics/angular:service": {
|
|
152
|
+
"type": "service"
|
|
153
|
+
},
|
|
154
|
+
"@schematics/angular:guard": {
|
|
155
|
+
"typeSeparator": "."
|
|
156
|
+
},
|
|
157
|
+
"@schematics/angular:interceptor": {
|
|
158
|
+
"typeSeparator": "."
|
|
159
|
+
},
|
|
160
|
+
"@schematics/angular:module": {
|
|
161
|
+
"typeSeparator": "."
|
|
162
|
+
},
|
|
163
|
+
"@schematics/angular:pipe": {
|
|
164
|
+
"typeSeparator": "."
|
|
165
|
+
},
|
|
166
|
+
"@schematics/angular:resolver": {
|
|
167
|
+
"typeSeparator": "."
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
const eslint = require("@eslint/js");
|
|
3
|
+
const tseslint = require("typescript-eslint");
|
|
4
|
+
const angular = require("angular-eslint");
|
|
5
|
+
|
|
6
|
+
module.exports = tseslint.config(
|
|
7
|
+
{
|
|
8
|
+
files: ["**/*.ts"],
|
|
9
|
+
extends: [
|
|
10
|
+
eslint.configs.recommended,
|
|
11
|
+
...tseslint.configs.recommended,
|
|
12
|
+
...tseslint.configs.stylistic,
|
|
13
|
+
...angular.configs.tsRecommended,
|
|
14
|
+
],
|
|
15
|
+
processor: angular.processInlineTemplates,
|
|
16
|
+
rules: {
|
|
17
|
+
"@angular-eslint/directive-selector": [
|
|
18
|
+
"error",
|
|
19
|
+
{
|
|
20
|
+
type: "attribute",
|
|
21
|
+
prefix: "ngx",
|
|
22
|
+
style: "camelCase",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
"@angular-eslint/component-selector": [
|
|
26
|
+
"error",
|
|
27
|
+
{
|
|
28
|
+
type: "element",
|
|
29
|
+
prefix: "ngx",
|
|
30
|
+
style: "kebab-case",
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
34
|
+
"@angular-eslint/prefer-inject": "off",
|
|
35
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
36
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
files: ["**/*.html"],
|
|
41
|
+
extends: [...angular.configs.templateRecommended, ...angular.configs.templateAccessibility],
|
|
42
|
+
},
|
|
43
|
+
);
|
package/example-1.png
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,61 +1,90 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-mat-input-tel",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"@angular/
|
|
13
|
-
"@angular/
|
|
14
|
-
"@angular/
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
3
|
+
"version": "22.0.0",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@angular/animations": "22.0.0",
|
|
6
|
+
"@angular/cdk": "22.0.0",
|
|
7
|
+
"@angular/common": "22.0.0",
|
|
8
|
+
"@angular/compiler": "22.0.0",
|
|
9
|
+
"@angular/core": "22.0.0",
|
|
10
|
+
"@angular/forms": "22.0.0",
|
|
11
|
+
"@angular/material": "22.0.0",
|
|
12
|
+
"@angular/platform-browser": "22.0.0",
|
|
13
|
+
"@angular/platform-browser-dynamic": "22.0.0",
|
|
14
|
+
"@angular/router": "22.0.0",
|
|
15
|
+
"libphonenumber-js": "1.13.6",
|
|
16
|
+
"rxjs": "7.8.2",
|
|
17
|
+
"tslib": "2.8.1"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@angular-devkit/core": "22.0.0",
|
|
21
|
+
"@angular-devkit/schematics": "22.0.0",
|
|
22
|
+
"@angular/build": "^22.0.0",
|
|
23
|
+
"@angular/cli": "22.0.0",
|
|
24
|
+
"@angular/compiler-cli": "22.0.0",
|
|
25
|
+
"@angular/language-service": "22.0.0",
|
|
26
|
+
"@commitlint/cli": "21.0.2",
|
|
27
|
+
"@commitlint/config-conventional": "21.0.2",
|
|
28
|
+
"@semantic-release/commit-analyzer": "13.0.1",
|
|
29
|
+
"@semantic-release/git": "10.0.1",
|
|
30
|
+
"@semantic-release/github": "12.0.8",
|
|
31
|
+
"@semantic-release/npm": "13.1.5",
|
|
32
|
+
"@semantic-release/release-notes-generator": "14.1.1",
|
|
33
|
+
"@types/jasmine": "5.1.15",
|
|
34
|
+
"@types/jasminewd2": "2.0.13",
|
|
35
|
+
"@types/node": "24.13.1",
|
|
36
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
37
|
+
"angular-eslint": "22.0.0",
|
|
38
|
+
"eslint": "9.39.4",
|
|
39
|
+
"eslint-config-prettier": "10.1.8",
|
|
40
|
+
"husky": "9.1.7",
|
|
41
|
+
"istanbul-lib-instrument": "^6.0.3",
|
|
42
|
+
"jasmine-core": "5.13.0",
|
|
43
|
+
"jasmine-spec-reporter": "7.0.0",
|
|
44
|
+
"jsdom": "29.1.1",
|
|
45
|
+
"karma": "6.4.4",
|
|
46
|
+
"karma-chrome-launcher": "3.2.0",
|
|
47
|
+
"karma-coverage-istanbul-reporter": "3.0.3",
|
|
48
|
+
"karma-jasmine": "5.1.0",
|
|
49
|
+
"karma-jasmine-html-reporter": "2.2.0",
|
|
50
|
+
"lint-staged": "17.0.7",
|
|
51
|
+
"ng-packagr": "22.0.0",
|
|
52
|
+
"prettier": "3.8.4",
|
|
53
|
+
"semantic-release": "25.0.5",
|
|
54
|
+
"ts-node": "10.9.2",
|
|
55
|
+
"typescript": "6.0.3",
|
|
56
|
+
"typescript-eslint": "8.61.0",
|
|
57
|
+
"vitest": "4.1.8"
|
|
22
58
|
},
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"ng15",
|
|
27
|
-
"ng16",
|
|
28
|
-
"ngx-mat-intl-tel-input",
|
|
29
|
-
"intl-tel-input",
|
|
30
|
-
"ng-intl-tel-input",
|
|
31
|
-
"phone number",
|
|
32
|
-
"phone",
|
|
33
|
-
"validation",
|
|
34
|
-
"international",
|
|
35
|
-
"i18n",
|
|
36
|
-
"country",
|
|
37
|
-
"dial",
|
|
38
|
-
"code",
|
|
39
|
-
"telephone",
|
|
40
|
-
"mobile",
|
|
41
|
-
"input",
|
|
42
|
-
"flag"
|
|
43
|
-
],
|
|
44
|
-
"license": "MIT",
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"tslib": "^2.x"
|
|
59
|
+
"lint-staged": {
|
|
60
|
+
"*.js": "eslint --cache --fix",
|
|
61
|
+
"*.{js,css,md}": "prettier --write"
|
|
47
62
|
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
"release": {
|
|
64
|
+
"branches": [
|
|
65
|
+
"main"
|
|
66
|
+
],
|
|
67
|
+
"plugins": [
|
|
68
|
+
"@semantic-release/commit-analyzer",
|
|
69
|
+
"@semantic-release/release-notes-generator",
|
|
70
|
+
[
|
|
71
|
+
"@semantic-release/npm",
|
|
72
|
+
{
|
|
73
|
+
"pkgRoot": "dist/ngx-mat-input-tel",
|
|
74
|
+
"access": "public"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"@semantic-release/github"
|
|
78
|
+
]
|
|
58
79
|
},
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
80
|
+
"scripts": {
|
|
81
|
+
"ng": "ng",
|
|
82
|
+
"dev": "ng serve",
|
|
83
|
+
"build": "ng build ngx-mat-input-tel --configuration production",
|
|
84
|
+
"test": "ng test ngx-mat-input-tel --watch=false",
|
|
85
|
+
"test:ci": "ng test ngx-mat-input-tel --watch=false --coverage",
|
|
86
|
+
"lint": "ng lint",
|
|
87
|
+
"copy-files": "cp README.md dist/ngx-mat-input-tel && cp LICENSE dist/ngx-mat-input-tel",
|
|
88
|
+
"format": "prettier --write ."
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
packages:
|
|
2
|
+
- "projects/*"
|
|
3
|
+
|
|
4
|
+
allowBuilds:
|
|
5
|
+
"@parcel/watcher": true
|
|
6
|
+
esbuild: true
|
|
7
|
+
lmdb: true
|
|
8
|
+
msgpackr-extract: true
|
|
9
|
+
minimumReleaseAgeExclude:
|
|
10
|
+
- "@vitest/coverage-v8@4.1.8"
|
|
11
|
+
- "@vitest/expect@4.1.8"
|
|
12
|
+
- "@vitest/mocker@4.1.8"
|
|
13
|
+
- "@vitest/pretty-format@4.1.8"
|
|
14
|
+
- "@vitest/runner@4.1.8"
|
|
15
|
+
- "@vitest/snapshot@4.1.8"
|
|
16
|
+
- "@vitest/spy@4.1.8"
|
|
17
|
+
- "@vitest/utils@4.1.8"
|
|
18
|
+
- vitest@4.1.8
|
|
19
|
+
- semantic-release@25.0.5
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
module.exports = function (config) {
|
|
5
|
+
config.set({
|
|
6
|
+
basePath: "",
|
|
7
|
+
frameworks: ["jasmine", "@angular-devkit/build-angular"],
|
|
8
|
+
plugins: [
|
|
9
|
+
require("karma-jasmine"),
|
|
10
|
+
require("karma-chrome-launcher"),
|
|
11
|
+
require("karma-jasmine-html-reporter"),
|
|
12
|
+
require("karma-coverage-istanbul-reporter"),
|
|
13
|
+
],
|
|
14
|
+
client: {
|
|
15
|
+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
|
|
16
|
+
},
|
|
17
|
+
coverageIstanbulReporter: {
|
|
18
|
+
dir: require("path").join(__dirname, "../../coverage/demo"),
|
|
19
|
+
reports: ["html", "lcovonly", "text-summary"],
|
|
20
|
+
fixWebpackSourcePaths: true,
|
|
21
|
+
},
|
|
22
|
+
reporters: ["progress", "kjhtml"],
|
|
23
|
+
port: 9876,
|
|
24
|
+
colors: true,
|
|
25
|
+
logLevel: config.LOG_INFO,
|
|
26
|
+
autoWatch: true,
|
|
27
|
+
browsers: ["Chrome"],
|
|
28
|
+
singleRun: false,
|
|
29
|
+
restartOnFileChange: true,
|
|
30
|
+
});
|
|
31
|
+
};
|