Skip to content

Commit ffa6745

Browse files
authored
Upgrade to Narik6, Angular12 (#22)
* upgrade dependencies * update tsconfig * fix bug * fix bug * remove using pack * add @directive() * update tsconfig * update dpendencies * add custom-validators * update peerDependencies * update peerDependencies * ad @directive() to base classes * update version to 6.0.0 * update dependenciy version in cli * add registerComponentType * change cli templates * use AngularCompilerPlugin.ivy.AngularWebpackPlugin * use $id instead of id * update version to 6.0.1 * fix cli bug * use old toast syyle
1 parent 1fc571b commit ffa6745

218 files changed

Lines changed: 5801 additions & 3610 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Narik is a framework that helps you create your angular application more creatively in less time. You will find Narik interesting in many different aspects, once you use it.
44

55

6-
**Narik 5 is ready. Compatible with Angular 11.**
6+
**Narik 6 is ready. Compatible with Angular 12.**
77

88

99
[Online Demo](http://narik.me/demo/app)

angular.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,37 @@
602602
}
603603
}
604604
}
605+
},
606+
"narik-custom-validators": {
607+
"projectType": "library",
608+
"root": "projects/narik-custom-validators",
609+
"sourceRoot": "projects/narik-custom-validators/src",
610+
"prefix": "lib",
611+
"architect": {
612+
"build": {
613+
"builder": "@angular-devkit/build-angular:ng-packagr",
614+
"options": {
615+
"project": "projects/narik-custom-validators/ng-package.json"
616+
},
617+
"configurations": {
618+
"production": {
619+
"tsConfig": "projects/narik-custom-validators/tsconfig.lib.prod.json"
620+
},
621+
"development": {
622+
"tsConfig": "projects/narik-custom-validators/tsconfig.lib.json"
623+
}
624+
},
625+
"defaultConfiguration": "production"
626+
},
627+
"test": {
628+
"builder": "@angular-devkit/build-angular:karma",
629+
"options": {
630+
"main": "projects/narik-custom-validators/src/test.ts",
631+
"tsConfig": "projects/narik-custom-validators/tsconfig.spec.json",
632+
"karmaConfig": "projects/narik-custom-validators/karma.conf.js"
633+
}
634+
}
635+
}
605636
}
606637
}
607638
}

build-tools/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require('fs');
2-
const version = '5.3.0';
2+
const version = '6.0.1';
33
const { lstatSync, readdirSync } = require('fs');
44
const { join } = require('path');
55

package.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"e2e": "ng e2e",
99
"doc": "compodoc -p projects/tsconfig.compodoc.json -s -o -w --theme material --disableRoutesGraph",
1010
"build:infrastructure": "ng build narik-infrastructure && node build-tools/copy.js readme.md dist/infrastructure",
11+
"build:custom-validators": "ng build narik-custom-validators && node build-tools/copy.js readme.md dist/custom-validators",
1112
"build:common": "ng build narik-common && node build-tools/copy.js readme.md dist/common",
1213
"build:core": "ng build narik-core && node build-tools/copy.js readme.md dist/core",
1314
"build:ui-core": "ng build narik-ui-core && node build-tools/copy.js readme.md dist/ui-core",
@@ -25,76 +26,75 @@
2526
"build:client-storage": "ng build narik-client-storage && node build-tools/copy.js readme.md dist/client-storage",
2627
"build:firebase": "ng build narik-firebase && node build-tools/copy.js readme.md dist/firebase",
2728
"debug:cli": "node --inspect-brk ./node_modules/@angular/cli/bin/ng serve",
28-
"build": "npm run build:infrastructure && npm run build:common && npm run build:core && npm run build:ui-core && npm run build:app-core && npm run build:ui-material && npm run build:ui-ng-bootstrap && npm run build:ui-ngx-bootstrap && npm run build:ui-devextreme && npm run build:ui-nebular && npm run build:ui-primeng && npm run build:ui-swimlane && npm run build:jwt && npm run build:client-storage && npm run build:signalr && npm run build:firebase && npm run build:cli",
29+
"build": "npm run build:infrastructure && npm run build:custom-validators && npm run build:common && npm run build:core && npm run build:ui-core && npm run build:app-core && npm run build:ui-material && npm run build:ui-ng-bootstrap && npm run build:ui-ngx-bootstrap && npm run build:ui-devextreme && npm run build:ui-nebular && npm run build:ui-primeng && npm run build:ui-swimlane && npm run build:jwt && npm run build:client-storage && npm run build:signalr && npm run build:firebase && npm run build:cli",
2930
"version": "node build-tools/version.js",
3031
"publish": "node build-tools/publish.js"
3132
},
3233
"private": false,
3334
"dependencies": {
34-
"@angular/animations": "~11.2.8",
35-
"@angular/cdk": "~11.2.7",
36-
"@angular/common": "~11.2.8",
37-
"@angular/compiler": "~11.2.8",
38-
"@angular/core": "~11.2.8",
39-
"@angular/flex-layout": "^11.0.0-beta.33",
40-
"@angular/forms": "~11.2.8",
41-
"@angular/material": "~11.2.7",
42-
"@angular/platform-browser": "~11.2.8",
43-
"@angular/platform-browser-dynamic": "~11.2.8",
44-
"@angular/router": "~11.2.8",
35+
"@angular/animations": "~12.0.4",
36+
"@angular/cdk": "~12.0.4",
37+
"@angular/common": "~12.0.4",
38+
"@angular/compiler": "~12.0.4",
39+
"@angular/core": "~12.0.4",
40+
"@angular/flex-layout": "^12.0.0-beta.34",
41+
"@angular/forms": "~12.0.4",
42+
"@angular/material": "~12.0.4",
43+
"@angular/platform-browser": "~12.0.4",
44+
"@angular/platform-browser-dynamic": "~12.0.4",
45+
"@angular/router": "~12.0.4",
4546
"@aspnet/signalr": "^1.1.4",
46-
"@angular/fire": "^6.1.4",
47-
"firebase": "^8.3",
47+
"@angular/fire": "^6.1.5",
48+
"firebase": "^8.6",
4849
"@fortawesome/fontawesome-free": "^5.15.3",
4950
"@nebular/theme": "^7.0.0",
50-
"@ng-bootstrap/ng-bootstrap": "^9.1.0",
51+
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
5152
"@ngx-translate/core": "^13.0.0",
5253
"@swimlane/ngx-datatable": "^19.0.0",
5354
"angular2-text-mask": "^9.0.0",
5455
"angular2-uuid": "^1.1.1",
55-
"bootstrap": "^4.6.0",
56+
"bootstrap": "^5.0.1",
5657
"class-validator": "^0.13.1",
57-
"core-js": "^3.10.0",
58+
"core-js": "^3.14.0",
5859
"data-adapter": "^0.2.3",
59-
"devextreme": "^20.2.6",
60-
"devextreme-angular": "^20.2.6",
60+
"devextreme": "^21.1.3",
61+
"devextreme-angular": "^21.1.3",
6162
"localforage": "^1.9.0",
62-
"lodash": "^4.17.21",
63+
"lodash-es": "^4.17.21",
6364
"ngforage": "^6.0.0",
6465
"ngx-bootstrap": "^6.2.0",
65-
"ngx-custom-validators": "^11.0.1",
66-
"ngx-toastr": "^13.2.1",
66+
"ngx-toastr": "^14.0.0",
6767
"primeicons": "^4.1.0",
68-
"primeng": "^11.3.1",
69-
"rxjs": "~6.6.7",
68+
"primeng": "^12.0.0-rc.1",
69+
"rxjs": "~7.1.0",
70+
"tslib": "^2.1.0",
7071
"zone.js": "~0.11.4"
7172
},
7273
"devDependencies": {
73-
"@angular-devkit/build-angular": "~0.1102.7",
74+
"@angular-devkit/build-angular": "~12.0.3",
7475
"@angular-devkit/build-ng-packagr": "~0.1002.0",
75-
"@angular-devkit/schematics": "~11.2.7",
76-
"@angular/cli": "~11.2.7",
77-
"@angular/compiler-cli": "~11.2.8",
78-
"@angular/language-service": "~11.2.8",
79-
"@types/jasmine": "~3.6.9",
80-
"@types/jasminewd2": "~2.0.8",
81-
"@types/lodash": "~4.14.168",
82-
"@types/node": "~14.14.37",
83-
"codelyzer": "~6.0.1",
76+
"@angular-devkit/schematics": "~12.0.3",
77+
"@angular/cli": "~12.0.3",
78+
"@angular/compiler-cli": "~12.0.4",
79+
"@angular/language-service": "~12.0.4",
80+
"@types/jasmine": "~3.7.7",
81+
"@types/jasminewd2": "~2.0.9",
82+
"@types/lodash-es": "~4.17.4",
83+
"@types/node": "~15.12.2",
84+
"codelyzer": "~6.0.2",
8485
"copy": "~0.3.2",
8586
"jasmine-core": "~3.7.1",
86-
"jasmine-spec-reporter": "~6.0.0",
87-
"karma": "~6.3.2",
87+
"jasmine-spec-reporter": "~7.0.0",
88+
"karma": "~6.3.3",
8889
"karma-chrome-launcher": "~3.1.0",
8990
"karma-coverage-istanbul-reporter": "~3.0.3",
9091
"karma-jasmine": "~4.0.1",
91-
"karma-jasmine-html-reporter": "^1.5.4",
92-
"ng-packagr": "^11.2.4",
92+
"karma-jasmine-html-reporter": "^1.6.0",
93+
"ng-packagr": "^12.0.5",
9394
"protractor": "~7.0.0",
94-
"ts-node": "~9.1.1",
95-
"tsickle": ">=0.39.1",
96-
"tslib": "~2.1.0",
95+
"ts-node": "~10.0.0",
96+
"tsickle": ">=0.40.0",
9797
"tslint": "~6.1.3",
98-
"typescript": "~4.1.5"
98+
"typescript": "~4.2.3"
9999
}
100100
}

projects/narik-app-core/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@narik/app-core",
3-
"version": "5.3.0",
3+
"version": "6.0.1",
44
"peerDependencies": {
5-
"@angular/common": "~11.0.2",
6-
"@angular/core": "~11.0.2",
7-
"lodash": "^4.17.20",
5+
"@angular/common": "^12.0.3",
6+
"@angular/core": "^12.0.3",
7+
"lodash-es": "^4.17.21",
88
"data-adapter": "^0.2.3",
9-
"class-validator": "^0.12.2"
9+
"class-validator": "^0.13.1"
1010
},
1111
"dependencies": {},
1212
"repository": {

projects/narik-app-core/src/lib/base/narik-edit-form.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ElementRef, Injector, OnInit, ViewChild } from '@angular/core';
1+
import { Directive, ElementRef, Injector, OnInit, ViewChild } from '@angular/core';
22
import {
33
FormGroup,
44
FormBuilder,
@@ -44,6 +44,7 @@ import { NarikGeneralForm } from './narik-general-form';
4444
/**
4545
* Narik edit form
4646
*/
47+
@Directive()
4748
export abstract class NarikEditForm<TE extends NarikEntity>
4849
extends NarikGeneralForm<TE>
4950
implements OnInit {

projects/narik-app-core/src/lib/base/narik-general-form.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
SimpleChanges,
2323
ViewChild,
2424
Type,
25+
Directive,
2526
} from '@angular/core';
2627

2728
import { PARAMETER_RESOLVER } from '../injectionTokens';
@@ -33,10 +34,11 @@ import { QUERY_SERVICE_TYPE } from '../internal-injectionTokens';
3334
/**
3435
* Narik general form
3536
*/
37+
@Directive()
3638
export class NarikGeneralForm<TE extends NarikEntity>
3739
extends NarikComponent
3840
implements CommandHost, OnChanges {
39-
private changeSubject = new ReplaySubject(1);
41+
private changeSubject = new ReplaySubject<void>(1);
4042

4143
change$: Observable<any>;
4244

projects/narik-app-core/src/lib/base/narik-list-form.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
import { DynamicFormService } from '@narik/ui-core';
2020
import { takeWhile, filter, finalize } from 'rxjs/operators';
2121

22-
import { Injector, OnInit } from '@angular/core';
22+
import { Directive, Injector, OnInit } from '@angular/core';
2323
import { ActivatedRoute, Route } from '@angular/router';
2424

2525
import {
@@ -38,6 +38,7 @@ import { NarikGeneralForm } from './narik-general-form';
3838
/**
3939
* Narik list form
4040
*/
41+
@Directive()
4142
export abstract class NarikListForm<TE extends NarikEntity>
4243
extends NarikGeneralForm<TE>
4344
implements OnInit {

projects/narik-app-core/src/lib/services/narik-meta-data.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
DataInfo,
88
DefaultMetaDataKeys,
99
} from '@narik/infrastructure';
10-
import { cloneDeep } from 'lodash';
10+
import { cloneDeep } from 'lodash-es';
1111

1212
import { isArray, isObject } from '@narik/common';
1313

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
{
2-
"extends": "../../tsconfig.json",
3-
"compilerOptions": {
4-
"outDir": "../../out-tsc/lib",
5-
"target": "es2015",
6-
"module": "es2015",
7-
"moduleResolution": "node",
8-
"declaration": true,
9-
"sourceMap": true,
10-
"inlineSources": true,
11-
"emitDecoratorMetadata": true,
12-
"experimentalDecorators": true,
13-
"importHelpers": true,
14-
"types": [],
15-
"lib": [
16-
"dom",
17-
"es2018"
18-
]
19-
},
20-
"angularCompilerOptions": {
21-
"annotateForClosureCompiler": true,
22-
"skipTemplateCodegen": true,
23-
"strictMetadataEmit": true,
24-
"fullTemplateTypeCheck": true,
25-
"strictInjectionParameters": true,
26-
"enableResourceInlining": true,
27-
"enableIvy":false
28-
},
29-
"exclude": [
30-
"src/test.ts",
31-
"**/*.spec.ts"
32-
]
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/lib",
5+
"target": "es2015",
6+
"module": "es2015",
7+
"moduleResolution": "node",
8+
"declaration": true,
9+
"sourceMap": true,
10+
"inlineSources": true,
11+
"emitDecoratorMetadata": true,
12+
"experimentalDecorators": true,
13+
"importHelpers": true,
14+
"declarationMap": false,
15+
"types": [],
16+
"lib": ["dom", "es2018"]
17+
},
18+
"angularCompilerOptions": {
19+
"annotateForClosureCompiler": true,
20+
"skipTemplateCodegen": true,
21+
"strictMetadataEmit": true,
22+
"fullTemplateTypeCheck": true,
23+
"strictInjectionParameters": true,
24+
"enableResourceInlining": true,
25+
"enableIvy": true,
26+
"compilationMode": "partial"
27+
},
28+
"exclude": ["src/test.ts", "**/*.spec.ts"]
3329
}

0 commit comments

Comments
 (0)