Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 7be3443

Browse files
authored
Merge pull request #945 from ghiscoding/chore/angular14
chore: upgrade project to latest Angular 14 and ng-packagr
2 parents 5b80335 + 2025b40 commit 7be3443

File tree

7 files changed

+2048
-1744
lines changed

7 files changed

+2048
-1744
lines changed

angular.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@
131131
}
132132
}
133133
},
134-
"defaultProject": "angular-slickgrid",
135134
"schematics": {
136135
"@schematics/angular:component": {
137136
"prefix": "app",
@@ -143,6 +142,8 @@
143142
},
144143
"cli": {
145144
"packageManager": "yarn",
146-
"defaultCollection": "@angular-eslint/schematics"
145+
"schematicCollections": [
146+
"@angular-eslint/schematics"
147+
]
147148
}
148149
}

ng-package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3+
"allowedNonPeerDependencies": [
4+
"."
5+
],
6+
"dest": "dist",
7+
"lib": {
8+
"entryFile": "src/public_api.ts"
9+
}
10+
}

package.json

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"copy:lib": "cross-env copyfiles --up 2 src/assets/lib/** dist",
4343
"copy-demo:dist": "cross-env copyfiles --up 1 dist/**/*.* ../angular-slickgrid-demos/bootstrap3-demo-with-translate/node_modules/angular-slickgrid",
4444
"del-demo:dist": "cross-env rimraf ../angular-slickgrid-demos/bootstrap3-demo-with-translate/node_modules/angular-slickgrid",
45-
"packagr": "ng-packagr -p package.json",
45+
"packagr": "ng-packagr -p ng-package.json",
4646
"changelog": "cross-env conventional-changelog -p angular -i doc/CHANGELOG.md -s",
4747
"bump-version": "npm --no-git-tag-version version",
4848
"prepare-release": "cross-env npm run changelog && npm run build && npm run doc",
@@ -63,16 +63,6 @@
6363
"type": "ko_fi",
6464
"url": "https://ko-fi.com/ghiscoding"
6565
},
66-
"ngPackage": {
67-
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
68-
"allowedNonPeerDependencies": [
69-
"."
70-
],
71-
"dest": "dist",
72-
"lib": {
73-
"entryFile": "src/public_api.ts"
74-
}
75-
},
7666
"dependencies": {
7767
"@slickgrid-universal/common": "1.3.0",
7868
"@slickgrid-universal/custom-footer-component": "1.3.0",
@@ -94,26 +84,26 @@
9484
"@ngx-translate/core": ">=14.0.0"
9585
},
9686
"devDependencies": {
97-
"@angular-devkit/build-angular": "~13.3.8",
87+
"@angular-devkit/build-angular": "^14.0.4",
9888
"@angular-eslint/builder": "^14.0.0",
9989
"@angular-eslint/eslint-plugin": "^14.0.0",
10090
"@angular-eslint/eslint-plugin-template": "^14.0.0",
10191
"@angular-eslint/schematics": "^14.0.0",
10292
"@angular-eslint/template-parser": "^14.0.0",
103-
"@angular/animations": "^13.3.11",
104-
"@angular/cli": "^13.3.8",
105-
"@angular/common": "^13.3.11",
106-
"@angular/compiler": "^13.3.11",
107-
"@angular/compiler-cli": "^13.3.11",
108-
"@angular/core": "^13.3.11",
109-
"@angular/forms": "^13.3.11",
110-
"@angular/language-service": "^13.3.11",
111-
"@angular/platform-browser": "^13.3.11",
112-
"@angular/platform-browser-dynamic": "^13.3.11",
113-
"@angular/router": "^13.3.11",
93+
"@angular/animations": "^14.0.4",
94+
"@angular/cli": "^14.0.4",
95+
"@angular/common": "^14.0.4",
96+
"@angular/compiler": "^14.0.4",
97+
"@angular/compiler-cli": "^14.0.4",
98+
"@angular/core": "^14.0.4",
99+
"@angular/forms": "^14.0.4",
100+
"@angular/language-service": "^14.0.4",
101+
"@angular/platform-browser": "^14.0.4",
102+
"@angular/platform-browser-dynamic": "^14.0.4",
103+
"@angular/router": "^14.0.4",
114104
"@faker-js/faker": "^7.3.0",
115105
"@fnando/sparkline": "^0.3.10",
116-
"@ng-select/ng-select": "^8.3.0",
106+
"@ng-select/ng-select": "^9.0.2",
117107
"@ngx-translate/core": "^14.0.0",
118108
"@ngx-translate/http-loader": "^7.0.0",
119109
"@slickgrid-universal/composite-editor-component": "1.3.0",
@@ -128,19 +118,19 @@
128118
"@types/moment": "^2.13.0",
129119
"@types/node": "^18.0.0",
130120
"@types/text-encoding-utf-8": "^1.0.2",
131-
"@typescript-eslint/eslint-plugin": "^5.29.0",
132-
"@typescript-eslint/parser": "^5.29.0",
121+
"@typescript-eslint/eslint-plugin": "^5.30.0",
122+
"@typescript-eslint/parser": "^5.30.0",
133123
"autoprefixer": "^10.4.7",
134124
"bootstrap": "^5.1.3",
135125
"conventional-changelog": "^3.1.25",
136126
"copyfiles": "^2.4.1",
137127
"cross-env": "^7.0.3",
138128
"custom-event-polyfill": "^1.0.7",
139129
"eslint": "^8.18.0",
140-
"jest": "^28.1.1",
130+
"jest": "^28.1.2",
141131
"jest-extended": "^2.0.0",
142132
"jest-preset-angular": "^12.1.0",
143-
"ng-packagr": "^13.3.1",
133+
"ng-packagr": "^14.0.2",
144134
"ngx-bootstrap": "^8.0.0",
145135
"npm-run-all2": "^6.0.1",
146136
"postcss": "^8.4.14",
@@ -151,7 +141,7 @@
151141
"stream-browserify": "^3.0.0",
152142
"ts-node": "^10.8.1",
153143
"tslib": "^2.4.0",
154-
"typescript": "~4.4.4",
144+
"typescript": "~4.7.4",
155145
"zone.js": "~0.11.6"
156146
},
157147
"engines": {
@@ -161,4 +151,4 @@
161151
"resolutions": {
162152
"caniuse-lite": "1.0.30001359"
163153
}
164-
}
154+
}

src/app/app.module.ts

Lines changed: 77 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -86,90 +86,82 @@ export function appInitializerFactory(translate: TranslateService, injector: Inj
8686

8787
// @dynamic
8888
@NgModule({
89-
declarations: [
90-
AppComponent,
91-
CustomTitleFormatterComponent,
92-
EditorNgSelectComponent,
93-
FilterNgSelectComponent,
94-
GridAddItemComponent,
95-
GridAngularComponent,
96-
GridAutoHeightComponent,
97-
GridBasicComponent,
98-
GridClientSideComponent,
99-
GridColspanComponent,
100-
GridCompositeEditorComponent,
101-
GridContextMenuComponent,
102-
GridCustomTooltipComponent,
103-
GridDraggableGroupingComponent,
104-
GridEditorComponent,
105-
GridFormatterComponent,
106-
GridFrozenComponent,
107-
GridGraphqlComponent,
108-
GridGraphqlWithoutPaginationComponent,
109-
GridGroupingComponent,
110-
GridHeaderButtonComponent,
111-
GridHeaderMenuComponent,
112-
GridLocalizationComponent,
113-
GridMenuComponent,
114-
GridOdataComponent,
115-
GridRangeComponent,
116-
GridRemoteComponent,
117-
GridResizeByContentComponent,
118-
GridRowDetailComponent,
119-
GridRowMoveComponent,
120-
GridRowSelectionComponent,
121-
GridStateComponent,
122-
GridTabsComponent,
123-
GridTradingComponent,
124-
GridTreeDataParentChildComponent,
125-
GridTreeDataHierarchicalComponent,
126-
RowDetailPreloadComponent,
127-
RowDetailViewComponent,
128-
SwtCommonGridTestComponent,
129-
SwtCommonGridPaginationComponent,
130-
SwtCommonGridComponent,
131-
HomeComponent
132-
],
133-
imports: [
134-
AppRoutingRoutingModule,
135-
BrowserModule,
136-
FormsModule,
137-
HttpClientModule,
138-
NgSelectModule,
139-
TabsModule.forRoot(),
140-
TranslateModule.forRoot({
141-
loader: {
142-
provide: TranslateLoader,
143-
useFactory: (createTranslateLoader),
144-
deps: [HttpClient]
145-
}
146-
}),
147-
AngularSlickgridModule.forRoot({
148-
// add any Global Grid Options/Config you might want
149-
// to avoid passing the same options over and over in each grids of your App
150-
enableAutoResize: true,
151-
autoResize: {
152-
container: '#grid-container',
153-
rightPadding: 10
154-
}
155-
})
156-
],
157-
entryComponents: [
158-
// dynamically created components
159-
CustomTitleFormatterComponent,
160-
EditorNgSelectComponent,
161-
FilterNgSelectComponent,
162-
RowDetailPreloadComponent,
163-
RowDetailViewComponent,
164-
],
165-
providers: [
166-
{
167-
provide: APP_INITIALIZER,
168-
useFactory: appInitializerFactory,
169-
deps: [TranslateService, Injector],
170-
multi: true
171-
}
172-
],
173-
bootstrap: [AppComponent]
89+
declarations: [
90+
AppComponent,
91+
CustomTitleFormatterComponent,
92+
EditorNgSelectComponent,
93+
FilterNgSelectComponent,
94+
GridAddItemComponent,
95+
GridAngularComponent,
96+
GridAutoHeightComponent,
97+
GridBasicComponent,
98+
GridClientSideComponent,
99+
GridColspanComponent,
100+
GridCompositeEditorComponent,
101+
GridContextMenuComponent,
102+
GridCustomTooltipComponent,
103+
GridDraggableGroupingComponent,
104+
GridEditorComponent,
105+
GridFormatterComponent,
106+
GridFrozenComponent,
107+
GridGraphqlComponent,
108+
GridGraphqlWithoutPaginationComponent,
109+
GridGroupingComponent,
110+
GridHeaderButtonComponent,
111+
GridHeaderMenuComponent,
112+
GridLocalizationComponent,
113+
GridMenuComponent,
114+
GridOdataComponent,
115+
GridRangeComponent,
116+
GridRemoteComponent,
117+
GridResizeByContentComponent,
118+
GridRowDetailComponent,
119+
GridRowMoveComponent,
120+
GridRowSelectionComponent,
121+
GridStateComponent,
122+
GridTabsComponent,
123+
GridTradingComponent,
124+
GridTreeDataParentChildComponent,
125+
GridTreeDataHierarchicalComponent,
126+
RowDetailPreloadComponent,
127+
RowDetailViewComponent,
128+
SwtCommonGridTestComponent,
129+
SwtCommonGridPaginationComponent,
130+
SwtCommonGridComponent,
131+
HomeComponent
132+
],
133+
imports: [
134+
AppRoutingRoutingModule,
135+
BrowserModule,
136+
FormsModule,
137+
HttpClientModule,
138+
NgSelectModule,
139+
TabsModule.forRoot(),
140+
TranslateModule.forRoot({
141+
loader: {
142+
provide: TranslateLoader,
143+
useFactory: (createTranslateLoader),
144+
deps: [HttpClient]
145+
}
146+
}),
147+
AngularSlickgridModule.forRoot({
148+
// add any Global Grid Options/Config you might want
149+
// to avoid passing the same options over and over in each grids of your App
150+
enableAutoResize: true,
151+
autoResize: {
152+
container: '#grid-container',
153+
rightPadding: 10
154+
}
155+
})
156+
],
157+
providers: [
158+
{
159+
provide: APP_INITIALIZER,
160+
useFactory: appInitializerFactory,
161+
deps: [TranslateService, Injector],
162+
multi: true
163+
}
164+
],
165+
bootstrap: [AppComponent]
174166
})
175167
export class AppModule { }

src/app/modules/angular-slickgrid/modules/angular-slickgrid.module.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ import { BsDropDownService } from '../services/bsDropdown.service';
99
import { ContainerService } from '../services/container.service';
1010

1111
@NgModule({
12-
imports: [
13-
CommonModule,
14-
TranslateModule
15-
],
16-
declarations: [
17-
AngularSlickgridComponent,
18-
],
19-
exports: [
20-
AngularSlickgridComponent,
21-
],
22-
entryComponents: [AngularSlickgridComponent]
12+
imports: [
13+
CommonModule,
14+
TranslateModule
15+
],
16+
declarations: [
17+
AngularSlickgridComponent,
18+
],
19+
exports: [
20+
AngularSlickgridComponent,
21+
]
2322
})
2423
export class AngularSlickgridModule {
2524
static forRoot(config: GridOption = {}): ModuleWithProviders<AngularSlickgridModule> {

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"noImplicitReturns": true,
1515
"emitDecoratorMetadata": true,
1616
"experimentalDecorators": true,
17-
"target": "es2015",
17+
"target": "es2020",
1818
"typeRoots": [
1919
"node_modules/@types",
2020
"typings"

0 commit comments

Comments
 (0)