ngx-print 22.0.0 → 22.1.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/.editorconfig +13 -0
- package/.eslintrc.json +50 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/dependabot.yml +17 -0
- package/.github/workflows/PullRequest.yml +32 -0
- package/.github/workflows/stale.yml +25 -0
- package/.prettierignore +42 -0
- package/.prettierrc.json +14 -0
- package/CHANGELOG.md +126 -0
- package/README.md +11 -0
- package/_config.yml +1 -0
- package/angular.json +132 -0
- package/eslint.config.js +32 -0
- package/ng-package.json +7 -0
- package/package.json +60 -44
- package/projects/demo/public/favicon.ico +0 -0
- package/projects/demo/src/app/app.config.ts +11 -0
- package/projects/demo/src/app/app.routes.ts +3 -0
- package/projects/demo/src/app/demo.component.html +83 -0
- package/projects/demo/src/app/demo.component.scss +54 -0
- package/projects/demo/src/app/demo.component.ts +73 -0
- package/projects/demo/src/index.html +13 -0
- package/projects/demo/src/main.ts +5 -0
- package/projects/demo/src/styles.scss +1 -0
- package/projects/demo/tsconfig.app.json +19 -0
- package/projects/demo/tsconfig.spec.json +15 -0
- package/src/lib/ngx-print.base.ts +381 -0
- package/src/lib/ngx-print.directive.spec.ts +232 -0
- package/src/lib/ngx-print.directive.ts +72 -0
- package/src/lib/ngx-print.module.ts +8 -0
- package/src/lib/ngx-print.service.spec.ts +276 -0
- package/src/lib/ngx-print.service.ts +50 -0
- package/src/lib/print-options.ts +16 -0
- package/src/public_api.ts +8 -0
- package/tsconfig.json +38 -0
- package/tsconfig.lib.json +19 -0
- package/tsconfig.spec.json +10 -0
- package/tslint.json +17 -0
- package/fesm2022/ngx-print.mjs +0 -543
- package/fesm2022/ngx-print.mjs.map +0 -1
- package/types/ngx-print.d.ts +0 -222
- package/types/ngx-print.d.ts.map +0 -1
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
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"ignorePatterns": ["projects/**/*"],
|
|
4
|
+
"overrides": [
|
|
5
|
+
{
|
|
6
|
+
"files": ["*.ts"],
|
|
7
|
+
"extends": [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:@typescript-eslint/recommended",
|
|
10
|
+
"plugin:@angular-eslint/recommended",
|
|
11
|
+
"plugin:@angular-eslint/template/process-inline-templates",
|
|
12
|
+
"plugin:prettier/recommended"
|
|
13
|
+
],
|
|
14
|
+
"rules": {
|
|
15
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
16
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
17
|
+
"@typescript-eslint/no-unused-expressions": "off",
|
|
18
|
+
"@angular-eslint/directive-selector": [
|
|
19
|
+
"off",
|
|
20
|
+
{
|
|
21
|
+
"type": "attribute",
|
|
22
|
+
"prefix": "app",
|
|
23
|
+
"style": "camelCase"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"@angular-eslint/component-selector": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
"type": "element",
|
|
30
|
+
"prefix": "app",
|
|
31
|
+
"style": "kebab-case"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"files": ["*.html"],
|
|
38
|
+
"excludedFiles": ["*inline-template-*.component.html"],
|
|
39
|
+
"extends": ["plugin:@angular-eslint/template/recommended", "plugin:prettier/recommended"],
|
|
40
|
+
"rules": {
|
|
41
|
+
"prettier/prettier": [
|
|
42
|
+
"error",
|
|
43
|
+
{
|
|
44
|
+
"parser": "angular"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the bug**
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**To Reproduce**
|
|
13
|
+
Steps to reproduce the behavior.
|
|
14
|
+
|
|
15
|
+
**Expected behavior**
|
|
16
|
+
A clear and concise description of what you expected to happen.
|
|
17
|
+
|
|
18
|
+
**Screenshots**
|
|
19
|
+
If applicable, add screenshots to help explain your problem.
|
|
20
|
+
|
|
21
|
+
**Ngx-Print Version**
|
|
22
|
+
Include the current affected version.
|
|
23
|
+
|
|
24
|
+
**Desktop (please complete the following information):**
|
|
25
|
+
|
|
26
|
+
- OS: [e.g. iOS]
|
|
27
|
+
- Browser [e.g. chrome, safari]
|
|
28
|
+
- Version [e.g. 22]
|
|
29
|
+
|
|
30
|
+
**Additional context**
|
|
31
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Is your feature request related to a problem? Please describe.**
|
|
10
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
11
|
+
|
|
12
|
+
**Describe the solution you'd like**
|
|
13
|
+
A clear and concise description of what you want to happen.
|
|
14
|
+
|
|
15
|
+
**Describe alternatives you've considered**
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
**Additional context**
|
|
19
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: 'npm'
|
|
4
|
+
directory: '/'
|
|
5
|
+
schedule:
|
|
6
|
+
interval: 'weekly'
|
|
7
|
+
day: 'monday'
|
|
8
|
+
time: '10:00'
|
|
9
|
+
timezone: 'America/New_York'
|
|
10
|
+
open-pull-requests-limit: 5
|
|
11
|
+
groups:
|
|
12
|
+
npm-dependencies:
|
|
13
|
+
patterns:
|
|
14
|
+
- '*'
|
|
15
|
+
ignore:
|
|
16
|
+
- dependency-name: '*'
|
|
17
|
+
update-types: ['version-update:semver-major']
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Pull Request Checker
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{github.repository_id}}-${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-npm:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: 24.17.0
|
|
23
|
+
|
|
24
|
+
- name: Install npm dependencies
|
|
25
|
+
run: npm ci
|
|
26
|
+
|
|
27
|
+
# Run linting
|
|
28
|
+
- name: Run lint
|
|
29
|
+
run: npm run lint
|
|
30
|
+
|
|
31
|
+
- name: Run tests
|
|
32
|
+
run: npm run test
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Mark stale issues and pull requests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 2 * * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
issues: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
stale:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/stale@v9
|
|
17
|
+
with:
|
|
18
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
+
stale-issue-message: 'This issue has been automatically marked as stale due to inactivity. Please comment if you want to keep it open.'
|
|
20
|
+
stale-pr-message: 'This pull request has been automatically marked as stale due to inactivity.'
|
|
21
|
+
close-issue-message: 'Closing this issue due to prolonged inactivity.'
|
|
22
|
+
close-pr-message: 'Closing this pull request due to inactivity.'
|
|
23
|
+
days-before-stale: 30
|
|
24
|
+
days-before-close: 7
|
|
25
|
+
exempt-issue-labels: 'inspecting'
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/bazel-out
|
|
8
|
+
|
|
9
|
+
# Node
|
|
10
|
+
/node_modules
|
|
11
|
+
npm-debug.log
|
|
12
|
+
yarn-error.log
|
|
13
|
+
|
|
14
|
+
# IDEs and editors
|
|
15
|
+
.idea/
|
|
16
|
+
.project
|
|
17
|
+
.classpath
|
|
18
|
+
.c9/
|
|
19
|
+
*.launch
|
|
20
|
+
.settings/
|
|
21
|
+
*.sublime-workspace
|
|
22
|
+
|
|
23
|
+
# Visual Studio Code
|
|
24
|
+
.vscode/*
|
|
25
|
+
!.vscode/settings.json
|
|
26
|
+
!.vscode/tasks.json
|
|
27
|
+
!.vscode/launch.json
|
|
28
|
+
!.vscode/extensions.json
|
|
29
|
+
.history/*
|
|
30
|
+
|
|
31
|
+
# Miscellaneous
|
|
32
|
+
/.angular/cache
|
|
33
|
+
.sass-cache/
|
|
34
|
+
/connect.lock
|
|
35
|
+
/coverage
|
|
36
|
+
/libpeerconnection.log
|
|
37
|
+
testem.log
|
|
38
|
+
/typings
|
|
39
|
+
|
|
40
|
+
# System files
|
|
41
|
+
.DS_Store
|
|
42
|
+
Thumbs.db
|
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tabWidth": 2,
|
|
3
|
+
"useTabs": false,
|
|
4
|
+
"singleQuote": true,
|
|
5
|
+
"semi": true,
|
|
6
|
+
"bracketSpacing": true,
|
|
7
|
+
"arrowParens": "avoid",
|
|
8
|
+
"trailingComma": "es5",
|
|
9
|
+
"bracketSameLine": true,
|
|
10
|
+
"printWidth": 150,
|
|
11
|
+
"endOfLine": "auto",
|
|
12
|
+
"htmlWhitespaceSensitivity": "ignore",
|
|
13
|
+
"quoteProps": "preserve"
|
|
14
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# 22.0.0 (2026-06-22)
|
|
2
|
+
|
|
3
|
+
- Support for Angular 22.
|
|
4
|
+
|
|
5
|
+
# 21.1.0 (2026-01-07)
|
|
6
|
+
|
|
7
|
+
### New features
|
|
8
|
+
|
|
9
|
+
- iFrame printing
|
|
10
|
+
|
|
11
|
+
### New features
|
|
12
|
+
|
|
13
|
+
- Support for Angular 21.
|
|
14
|
+
|
|
15
|
+
### Bug fixes
|
|
16
|
+
|
|
17
|
+
- nullpointer defaultSelected
|
|
18
|
+
|
|
19
|
+
# 20.1.0 (2025-09-01)
|
|
20
|
+
|
|
21
|
+
### New features
|
|
22
|
+
|
|
23
|
+
- Can now use `ngx-print` without nonces for inline script.
|
|
24
|
+
|
|
25
|
+
### Maintenance
|
|
26
|
+
|
|
27
|
+
- Updated npm dependencies (multiple Dependabot updates).
|
|
28
|
+
- Removed unsafe inline script.
|
|
29
|
+
|
|
30
|
+
# 20.0.0 (2025-07-15)
|
|
31
|
+
|
|
32
|
+
### New features
|
|
33
|
+
|
|
34
|
+
- Support for Angular 20.
|
|
35
|
+
- Aligned major versions with Angular release versions (library major matches Angular major).
|
|
36
|
+
|
|
37
|
+
### Maintenance
|
|
38
|
+
|
|
39
|
+
- Implemented various feature requests and updated npm dependencies.
|
|
40
|
+
|
|
41
|
+
# 3.1.0 (2025-06-12)
|
|
42
|
+
|
|
43
|
+
### New features
|
|
44
|
+
|
|
45
|
+
- Now supports printing on any HTML element, not only button elements.
|
|
46
|
+
- Replaced `document.write` usage with DOM manipulation for rendering print content.
|
|
47
|
+
|
|
48
|
+
### Bug fixes
|
|
49
|
+
|
|
50
|
+
- Fixed issues related to printing from specific button elements.
|
|
51
|
+
|
|
52
|
+
# 3.0.0 (2025-05-21)
|
|
53
|
+
|
|
54
|
+
### New features
|
|
55
|
+
|
|
56
|
+
- Support for Angular 19.
|
|
57
|
+
|
|
58
|
+
# 2.0.0 (2024-12-04)
|
|
59
|
+
|
|
60
|
+
### New features
|
|
61
|
+
|
|
62
|
+
- Added support for Content-Security-Policy via nonce injection.
|
|
63
|
+
- Support for Angular 18.
|
|
64
|
+
|
|
65
|
+
### Contributors
|
|
66
|
+
|
|
67
|
+
- Contributions by EpicVoyage and Core121.
|
|
68
|
+
|
|
69
|
+
# 1.5.1 (2024-01-05)
|
|
70
|
+
|
|
71
|
+
### New features
|
|
72
|
+
|
|
73
|
+
- Added support for printing canvas contents.
|
|
74
|
+
- Added option to open the print view in a new tab.
|
|
75
|
+
|
|
76
|
+
### Bug fixes
|
|
77
|
+
|
|
78
|
+
- Fixed `printTitle` property issue.
|
|
79
|
+
|
|
80
|
+
### Maintenance
|
|
81
|
+
|
|
82
|
+
- Documentation updates.
|
|
83
|
+
|
|
84
|
+
# 1.5.0 (2023-12-03)
|
|
85
|
+
|
|
86
|
+
- Now supports Angular 17.
|
|
87
|
+
- Added printService.
|
|
88
|
+
|
|
89
|
+
# 1.4.0 (2023-12-03)
|
|
90
|
+
|
|
91
|
+
- Now supports Angular 16.
|
|
92
|
+
- Added functionality to handle select form fields.
|
|
93
|
+
- Added standalone support.
|
|
94
|
+
- Added `closeWindow` and `bodyClass` options and fixed tests.
|
|
95
|
+
|
|
96
|
+
# 1.3.1 (2023-01-04)
|
|
97
|
+
|
|
98
|
+
### Bug fixes
|
|
99
|
+
|
|
100
|
+
- Fixed build by allowing the package to run in partial Ivy mode due to npm not supporting full Ivy mode, deprecating
|
|
101
|
+
v1.3.0.
|
|
102
|
+
|
|
103
|
+
# 1.3.0 (2022-12-20)
|
|
104
|
+
|
|
105
|
+
### New features
|
|
106
|
+
|
|
107
|
+
- Supports `previewOnly` tag, allowing for the print preview to show without the print dialog.
|
|
108
|
+
|
|
109
|
+
### Dependency Updates
|
|
110
|
+
|
|
111
|
+
- Angular Ivy support with Angular 15.
|
|
112
|
+
|
|
113
|
+
# 1.2.1 (2021-05-10)
|
|
114
|
+
|
|
115
|
+
### Bug fixes
|
|
116
|
+
|
|
117
|
+
- Working build for non‑beta releases.
|
|
118
|
+
|
|
119
|
+
# 1.1.0 (2018-12-04)
|
|
120
|
+
|
|
121
|
+
### New features
|
|
122
|
+
|
|
123
|
+
- Support styles (
|
|
124
|
+
CSS) ([#5](https://github.com/selemxmn/ngx-print/issues/5)) ([71cefdf](https://github.com/selemxmn/ngx-print/commit/71cefdf)).
|
|
125
|
+
- Permit a dynamic title of printing window instead of the old static
|
|
126
|
+
`Print tab` ([2098f3e](https://github.com/selemxmn/ngx-print/commit/2098f3e)).
|
package/README.md
CHANGED
|
@@ -102,6 +102,14 @@ export class PrintExampleComponent {}
|
|
|
102
102
|
|
|
103
103
|
Here some simple styles were added to every `h1` & `h2` tags within the `div` where `print-section` is tagged to its `id` attribute.
|
|
104
104
|
|
|
105
|
+
`printStyle` also accepts a raw CSS string, which is injected into the print document's `<style>` tag as-is. This is useful for anything the object form can't express well, such as multiple selectors per rule, media queries, or `!important`:
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<button printStyle="h1, h2 { color: red; } @media print { .no-print { display: none; } }"
|
|
109
|
+
printSectionId="print-section"
|
|
110
|
+
ngxPrint>print</button>
|
|
111
|
+
```
|
|
112
|
+
|
|
105
113
|
- If you would like to use your existing CSS with media print you can add the `useExistingCss` attribute:
|
|
106
114
|
|
|
107
115
|
```html
|
|
@@ -247,6 +255,9 @@ printDelay: number = 0;
|
|
|
247
255
|
// Optional: CSS as a key-value pair
|
|
248
256
|
this.printService.printStyle = styleSheet;
|
|
249
257
|
|
|
258
|
+
// Optional: CSS as a raw string
|
|
259
|
+
this.printService.printStyle = 'h1, h2 { color: red; }';
|
|
260
|
+
|
|
250
261
|
// Optional: path to a CSS file
|
|
251
262
|
this.printService.styleSheetFile = fileLocation;
|
|
252
263
|
```
|
package/_config.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
theme: jekyll-theme-cayman
|
package/angular.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"ngx-print": {
|
|
7
|
+
"root": "",
|
|
8
|
+
"sourceRoot": "src",
|
|
9
|
+
"projectType": "library",
|
|
10
|
+
"prefix": "lib",
|
|
11
|
+
"architect": {
|
|
12
|
+
"build": {
|
|
13
|
+
"builder": "@angular/build:ng-packagr",
|
|
14
|
+
"options": {
|
|
15
|
+
"tsConfig": "tsconfig.lib.json",
|
|
16
|
+
"project": "ng-package.json"
|
|
17
|
+
},
|
|
18
|
+
"configurations": {
|
|
19
|
+
"development": {}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"test": {
|
|
23
|
+
"builder": "@angular/build:unit-test"
|
|
24
|
+
},
|
|
25
|
+
"lint": {
|
|
26
|
+
"builder": "@angular-eslint/builder:lint",
|
|
27
|
+
"options": {
|
|
28
|
+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"demo": {
|
|
34
|
+
"projectType": "application",
|
|
35
|
+
"schematics": {
|
|
36
|
+
"@schematics/angular:component": {
|
|
37
|
+
"style": "scss"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"root": "projects/demo",
|
|
41
|
+
"sourceRoot": "projects/demo/src",
|
|
42
|
+
"prefix": "app",
|
|
43
|
+
"architect": {
|
|
44
|
+
"build": {
|
|
45
|
+
"builder": "@angular/build:application",
|
|
46
|
+
"options": {
|
|
47
|
+
"browser": "projects/demo/src/main.ts",
|
|
48
|
+
"tsConfig": "projects/demo/tsconfig.app.json",
|
|
49
|
+
"inlineStyleLanguage": "scss",
|
|
50
|
+
"assets": [
|
|
51
|
+
{
|
|
52
|
+
"glob": "**/*",
|
|
53
|
+
"input": "projects/demo/public"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"styles": [
|
|
57
|
+
"projects/demo/src/styles.scss"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"configurations": {
|
|
61
|
+
"production": {
|
|
62
|
+
"budgets": [
|
|
63
|
+
{
|
|
64
|
+
"type": "initial",
|
|
65
|
+
"maximumWarning": "500kB",
|
|
66
|
+
"maximumError": "1MB"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "anyComponentStyle",
|
|
70
|
+
"maximumWarning": "4kB",
|
|
71
|
+
"maximumError": "8kB"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"outputHashing": "all"
|
|
75
|
+
},
|
|
76
|
+
"development": {
|
|
77
|
+
"optimization": false,
|
|
78
|
+
"extractLicenses": false,
|
|
79
|
+
"sourceMap": true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"defaultConfiguration": "production"
|
|
83
|
+
},
|
|
84
|
+
"serve": {
|
|
85
|
+
"builder": "@angular/build:dev-server",
|
|
86
|
+
"configurations": {
|
|
87
|
+
"production": {
|
|
88
|
+
"buildTarget": "demo:build:production"
|
|
89
|
+
},
|
|
90
|
+
"development": {
|
|
91
|
+
"buildTarget": "demo:build:development"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"defaultConfiguration": "development"
|
|
95
|
+
},
|
|
96
|
+
"test": {
|
|
97
|
+
"builder": "@angular/build:unit-test"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"cli": {
|
|
103
|
+
"analytics": false,
|
|
104
|
+
"schematicCollections": ["angular-eslint"]
|
|
105
|
+
},
|
|
106
|
+
"schematics": {
|
|
107
|
+
"@schematics/angular:component": {
|
|
108
|
+
"type": "component"
|
|
109
|
+
},
|
|
110
|
+
"@schematics/angular:directive": {
|
|
111
|
+
"type": "directive"
|
|
112
|
+
},
|
|
113
|
+
"@schematics/angular:service": {
|
|
114
|
+
"type": "service"
|
|
115
|
+
},
|
|
116
|
+
"@schematics/angular:guard": {
|
|
117
|
+
"typeSeparator": "."
|
|
118
|
+
},
|
|
119
|
+
"@schematics/angular:interceptor": {
|
|
120
|
+
"typeSeparator": "."
|
|
121
|
+
},
|
|
122
|
+
"@schematics/angular:module": {
|
|
123
|
+
"typeSeparator": "."
|
|
124
|
+
},
|
|
125
|
+
"@schematics/angular:pipe": {
|
|
126
|
+
"typeSeparator": "."
|
|
127
|
+
},
|
|
128
|
+
"@schematics/angular:resolver": {
|
|
129
|
+
"typeSeparator": "."
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
// our project thinks using renaming inputs is ok
|
|
18
|
+
'@angular-eslint/no-input-rename': 'off',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
files: ['**/*.html'],
|
|
23
|
+
extends: [
|
|
24
|
+
...angular.configs.templateRecommended,
|
|
25
|
+
...angular.configs.templateAccessibility,
|
|
26
|
+
],
|
|
27
|
+
rules: {
|
|
28
|
+
// our project thinks using negated async pipes is ok
|
|
29
|
+
'@angular-eslint/template/no-negated-async': 'off',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
);
|
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,44 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ngx-print",
|
|
3
|
-
"version": "22.
|
|
4
|
-
"description": "Plug n' Play Angular directive to print your stuff",
|
|
5
|
-
"author": "https://github.com/ngx-print/ngx-print/graphs/contributors",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/ngx-print/ngx-print.git"
|
|
9
|
-
},
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/ngx-print/ngx-print/issues"
|
|
13
|
-
},
|
|
14
|
-
"homepage": "https://github.com/ngx-print/ngx-print#readme",
|
|
15
|
-
"keywords": [
|
|
16
|
-
"print",
|
|
17
|
-
"angular",
|
|
18
|
-
"library",
|
|
19
|
-
"ng-print",
|
|
20
|
-
"ngx-print",
|
|
21
|
-
"directive",
|
|
22
|
-
"dependency",
|
|
23
|
-
"angular-print"
|
|
24
|
-
],
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "ngx-print",
|
|
3
|
+
"version": "22.1.0",
|
|
4
|
+
"description": "Plug n' Play Angular directive to print your stuff",
|
|
5
|
+
"author": "https://github.com/ngx-print/ngx-print/graphs/contributors",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ngx-print/ngx-print.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/ngx-print/ngx-print/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/ngx-print/ngx-print#readme",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"print",
|
|
17
|
+
"angular",
|
|
18
|
+
"library",
|
|
19
|
+
"ng-print",
|
|
20
|
+
"ngx-print",
|
|
21
|
+
"directive",
|
|
22
|
+
"dependency",
|
|
23
|
+
"angular-print"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"ng": "ng",
|
|
27
|
+
"build": "ng build ngx-print",
|
|
28
|
+
"test": "ng test ngx-print --no-watch --coverage --no-progress",
|
|
29
|
+
"serve:demo": "ng serve demo",
|
|
30
|
+
"lint": "ng lint"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@angular/build": "^22.0.3",
|
|
34
|
+
"@angular/cli": "^22.0.3",
|
|
35
|
+
"@angular/common": "^22.0.2",
|
|
36
|
+
"@angular/compiler": "^22.0.2",
|
|
37
|
+
"@angular/compiler-cli": "^22.0.2",
|
|
38
|
+
"@angular/core": "^22.0.2",
|
|
39
|
+
"@angular/forms": "^22.0.2",
|
|
40
|
+
"@angular/localize": "^22.0.2",
|
|
41
|
+
"@angular/platform-browser": "^22.0.2",
|
|
42
|
+
"@angular/router": "^22.0.2",
|
|
43
|
+
"@eslint/js": "^10.0.1",
|
|
44
|
+
"@types/node": "^24.13.2",
|
|
45
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
46
|
+
"angular-eslint": "22.0.0",
|
|
47
|
+
"eslint": "^10.3.0",
|
|
48
|
+
"eslint-config-prettier": "^10.1.8",
|
|
49
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
50
|
+
"jsdom": "^29.1.1",
|
|
51
|
+
"ng-packagr": "^22.0.0",
|
|
52
|
+
"prettier": "^3.8.4",
|
|
53
|
+
"typescript": "~6.0.3",
|
|
54
|
+
"typescript-eslint": "8.62.0",
|
|
55
|
+
"vitest": "^4.0.8"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"rxjs": "^7.4.0"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
Binary file
|