Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/strongly typed module with providers #338

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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## Unreleased

## [6.1.2] - 2024-08-20

### Fixed

- `ngx-pagination`: Add strongly typed return type for forChild() in ItemCounterModule, which is necessary in Angular 18.

### Changed
- `ngx-calendar`: Changed ModuleWithProviders<any> to specific module in forChild()
- `ngx-forms`: Changed ModuleWithProviders<any> to specific module in forChild()
- `ngx-pagination`: Changed ModuleWithProviders<any> to specific module in forChild()
- `ngx-table`: Changed ModuleWithProviders<any> to specific module in forChild()

## [6.1.1] - 2024-07-02

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "6.1.1"
"version": "6.1.2"
}
2 changes: 1 addition & 1 deletion packages/ngx-calendar/src/lib/calendar.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class CalendarModule {
static forChild(
weekdayLabels: WeekdayLabelsConfig,
monthLabels: MonthLabelsConfig
): ModuleWithProviders<any> {
): ModuleWithProviders<CalendarModule> {
return {
ngModule: CalendarModule,
providers: [
Expand Down
2 changes: 1 addition & 1 deletion packages/ngx-forms/src/lib/upload/upload.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ValidationMessagesService } from './services/validation-messages.servic
providers: [ValidationMessagesService, { provide: UPLOAD_VALIDATION_MESSAGES, useValue: {} }],
})
export class UploadModule {
static forChild(validationMessages: ValidationMessages = {}): ModuleWithProviders<any> {
static forChild(validationMessages: ValidationMessages = {}): ModuleWithProviders<UploadModule> {
return {
ngModule: UploadModule,
providers: [{ provide: UPLOAD_VALIDATION_MESSAGES, useValue: validationMessages }],
Expand Down
2 changes: 1 addition & 1 deletion packages/ngx-leaflet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acpaas-ui/ngx-leaflet",
"version": "6.1.1",
"version": "6.1.2",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NgModule } from '@angular/core';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IconModule } from '@acpaas-ui/ngx-icon';
Expand Down Expand Up @@ -31,7 +31,7 @@ export class ItemCounterModule {
static forChild(
itemCounterLabel: Label,
itemsPerPageLabel: Label
) {
): ModuleWithProviders<ItemCounterModule> {
return {
ngModule: ItemCounterModule,
providers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { PaginationComponent } from './components/pagination/pagination.componen
export class PaginationModule {
static forChild(
paginationLabels: PaginationLabels
): ModuleWithProviders<any> {
): ModuleWithProviders<PaginationModule> {
return {
ngModule: PaginationModule,
providers: [{ provide: PAGINATION_LABELS, useValue: paginationLabels }],
Expand Down
Loading