Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/publish-npmjs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- run: npm publish dist/ppwcode/ng-router --access public
- run: npm publish dist/ppwcode/ng-state-management --access public
- run: npm publish dist/ppwcode/ng-unit-testing --access public
- run: npm publish dist/ppwcode/ng-utils --access public
- run: npm publish dist/ppwcode/ng-wireframe --access public
- run: npm run ci:build
- name: Copy index.html to 404.html # For GitHub Pages SPA support
Expand Down
43 changes: 43 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,49 @@
}
}
},
"@ppwcode/ng-utils": {
"projectType": "library",
"root": "projects/ppwcode/ng-utils",
"sourceRoot": "projects/ppwcode/ng-utils/src",
"prefix": "ppw",
"architect": {
"build": {
"builder": "@angular/build:ng-packagr",
"options": {
"project": "projects/ppwcode/ng-utils/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ppwcode/ng-utils/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/ppwcode/ng-utils/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular/build:karma",
"options": {
"karmaConfig": "karma.conf.js",
"tsConfig": "projects/ppwcode/ng-utils/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/ppwcode/ng-utils/**/*.ts",
"projects/ppwcode/ng-utils/**/*.html"
]
}
}
}
},
"@ppwcode/ng-wireframe": {
"projectType": "library",
"root": "projects/ppwcode/ng-wireframe",
Expand Down
81 changes: 11 additions & 70 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@fortawesome/fontawesome-free": "7.1.0",
"@ngx-translate/core": "17.0.0",
"@ngx-translate/http-loader": "17.0.0",
"@ppwcode/js-ts-oddsandends": "1.4.2",
"@types/luxon": "3.7.1",
"file-saver-es": "2.0.5",
"luxon": "3.7.1",
Expand Down
4 changes: 2 additions & 2 deletions projects/ppwcode/ng-async/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"@angular/core": "^21.0.2",
"@ngx-translate/core": "^17.0.0",
"file-saver-es": "^2.0.5",
"@ppwcode/js-ts-oddsandends": "^1.4.2",
"@ppwcode/ng-common-components": "^21.0.0"
"@ppwcode/ng-common-components": "^21.0.0",
"@ppwcode/ng-utils": "^21.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { saveAs } from 'file-saver-es'
import { notNull } from '@ppwcode/js-ts-oddsandends/lib/conditional-assert'
import { notNull } from '@ppwcode/ng-utils'
import { AsyncResult } from '../models/async-result'
import { FileDownload } from '../models/file-download'

Expand Down
2 changes: 1 addition & 1 deletion projects/ppwcode/ng-async/src/lib/models/file-download.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpResponse } from '@angular/common/http'
import { notUndefined } from '@ppwcode/js-ts-oddsandends/lib/conditional-assert'
import { notUndefined } from '@ppwcode/ng-utils'

export interface FileDownload {
blob: Blob
Expand Down
2 changes: 1 addition & 1 deletion projects/ppwcode/ng-async/src/lib/models/paged-entities.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { notUndefined } from '@ppwcode/js-ts-oddsandends/lib/conditional-assert'
import { notUndefined } from '@ppwcode/ng-utils'

export interface PagedEntitiesDto<T> {
/** The current page number (1-based). */
Expand Down
3 changes: 2 additions & 1 deletion projects/ppwcode/ng-common-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"peerDependencies": {
"@angular/common": "^21.0.2",
"@angular/core": "^21.0.2",
"@ppwcode/ng-common": "^21.0.0"
"@ppwcode/ng-common": "^21.0.0",
"@ppwcode/ng-utils": "^21.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import { FormArray, FormGroup } from '@angular/forms'
import { MatTable, MatTableDataSource } from '@angular/material/table'
import { Sort } from '@angular/material/sort'
import { assert, notUndefined } from '@ppwcode/js-ts-oddsandends/lib/conditional-assert'
import { assert, notUndefined } from '@ppwcode/ng-utils'
import { mixinHandleSubscriptions } from '@ppwcode/ng-common'
import { PpwColumnDirective } from './column-directives/ppw-column.directive'
import { Column, ColumnType } from './columns/column'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Signal,
TemplateRef
} from '@angular/core'
import { notUndefined } from '@ppwcode/js-ts-oddsandends/lib/conditional-assert'
import { notUndefined } from '@ppwcode/ng-utils'
import { Column, ColumnType } from '../columns/column'
import { DateColumn } from '../columns/date-column'
import { NumberColumn } from '../columns/number-column'
Expand Down
3 changes: 2 additions & 1 deletion projects/ppwcode/ng-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
},
"peerDependencies": {
"@angular/common": "^21.0.2",
"@angular/core": "^21.0.2"
"@angular/core": "^21.0.2",
"@ppwcode/ng-utils": "^21.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HttpErrorResponse } from '@angular/common/http'
import { ErrorHandler, inject, Injectable, Injector, NgZone } from '@angular/core'
import { MatDialog, MatDialogRef } from '@angular/material/dialog'
import { notUndefined } from '@ppwcode/js-ts-oddsandends/lib/conditional-assert'
import { notUndefined } from '@ppwcode/ng-utils'
import { GlobalErrorDialogComponent } from './global-error-dialog.component'

/**
Expand Down
2 changes: 2 additions & 0 deletions projects/ppwcode/ng-unit-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"peerDependencies": {
"@angular/common": "^21.0.2",
"@angular/core": "^21.0.2",
"@ppwcode/ng-async": "^21.0.0",
"@ppwcode/ng-utils": "^21.0.0",
"jasmine-core": "^3.9.0 || ^4.0.0 || ^5.0.0"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestRequest } from '@angular/common/http/testing'
import { notUndefined } from '@ppwcode/js-ts-oddsandends/lib/conditional-assert'
import { FileDownload } from '@ppwcode/ng-async'
import { notUndefined } from '@ppwcode/ng-utils'
import { noop, Observable } from 'rxjs'

import { expectOneCallToUrl, ResponseOptions } from './http-client-testing-controller'
Expand Down
44 changes: 44 additions & 0 deletions projects/ppwcode/ng-utils/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"extends": "../../../.eslintrc.json",
"ignorePatterns": ["!**/*"],
"rules": {
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "@ppwcode/ng-utils",
"message": "Use a relative import instead. Importing from @ppwcode/ng-utils is not allowed inside this lib directory."
}
]
}
]
},
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "ppw",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "ppw",
"style": "kebab-case"
}
]
}
},
{
"files": ["*.html"],
"rules": {}
}
]
}
5 changes: 5 additions & 0 deletions projects/ppwcode/ng-utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# NgUtils

This library provides utilities often used in Angular applications.

## Usage
7 changes: 7 additions & 0 deletions projects/ppwcode/ng-utils/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/ppwcode/ng-utils",
"lib": {
"entryFile": "src/public-api.ts"
}
}
12 changes: 12 additions & 0 deletions projects/ppwcode/ng-utils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@ppwcode/ng-utils",
"version": "21.0.0",
"repository": {
"url": "https://github.com/peopleware/angular-sdk"
},
"peerDependencies": {},
"dependencies": {
"tslib": "^2.3.0"
},
"sideEffects": false
}
Loading