Skip to content

Commit

Permalink
Fixed #10810 and Fixed #10804 | Angular 13 and rxjs 7 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Nov 8, 2021
1 parent 1be369f commit 7c30c3b
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 76 deletions.
39 changes: 19 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
Expand All @@ -17,18 +16,18 @@
"url": "https://github.com/primefaces/primeng.git"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.0.0",
"@angular/animations": "~12.0.0",
"@angular/cdk": "~12.0.0",
"@angular/cli": "~12.0.0",
"@angular/common": "~12.0.0",
"@angular/compiler": "~12.0.0",
"@angular/compiler-cli": "~12.0.0",
"@angular/core": "~12.0.0",
"@angular/forms": "~12.0.0",
"@angular/platform-browser": "~12.0.0",
"@angular/platform-browser-dynamic": "~12.0.0",
"@angular/router": "~12.0.0",
"@angular-devkit/build-angular": "~13.0.0",
"@angular/animations": "~13.0.0",
"@angular/cdk": "~13.0.0",
"@angular/cli": "~13.0.1",
"@angular/common": "~13.0.0",
"@angular/compiler": "~13.0.0",
"@angular/compiler-cli": "~13.0.0",
"@angular/core": "~13.0.0",
"@angular/forms": "~13.0.0",
"@angular/platform-browser": "~13.0.0",
"@angular/platform-browser-dynamic": "~13.0.0",
"@angular/router": "~13.0.0",
"@fullcalendar/angular": "^5.8.0",
"@fullcalendar/core": "^5.8.0",
"@fullcalendar/daygrid": "^5.8.0",
Expand All @@ -46,25 +45,25 @@
"gulp-rename": "^1.2.2",
"gulp-uglify": "^1.5.3",
"gulp-uglifycss": "^1.0.6",
"jasmine-core": "~3.7.0",
"jasmine-spec-reporter": "~5.0.0",
"jspdf": "^1.5.3",
"jspdf-autotable": "^3.2.5",
"jasmine-core": "~3.7.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "~12.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"ng-packagr": "~13.0.0",
"primeflex": "2.0.0",
"primeicons": "4.1.0",
"primeicons": "^5.0.0",
"prismjs": "1.20.0",
"quill": "1.3.7",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"rxjs": "~7.4.0",
"ts-node": "~8.3.0",
"tslib": "^2.3.0",
"tslint": "~6.1.0",
"typescript": "~4.2.3",
"typescript": "~4.4.3",
"web-animations-js": "^2.3.2",
"xlsx": "^0.15.1",
"zone.js": "~0.11.4"
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/api/confirmationservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ export class ConfirmationService {
}

onAccept() {
this.acceptConfirmationSource.next();
this.acceptConfirmationSource.next(null);
}
}
}
2 changes: 1 addition & 1 deletion src/app/components/dom/domhandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class DomHandler {
}

public static isTouchDevice() {
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0));
}

public static appendChild(element: any, target: any) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/dynamicdialog/dynamicdialog-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export class DynamicDialogRef {
close(result?: any) {
this._onClose.next(result);
}

destroy() {
this._onDestroy.next();
this._onDestroy.next(null);
}

private readonly _onClose = new Subject<any>();
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/organizationchart/organizationchart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class OrganizationChart implements AfterContentInit {
this._selection = val;

if (this.initialized)
this.selectionSource.next();
this.selectionSource.next(null);
}

@Output() selectionChange: EventEmitter<any> = new EventEmitter();
Expand Down Expand Up @@ -239,7 +239,7 @@ export class OrganizationChart implements AfterContentInit {
}

this.selectionChange.emit(this.selection);
this.selectionSource.next();
this.selectionSource.next(null);
}
}

Expand Down
11 changes: 6 additions & 5 deletions src/app/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
"module": "primeng.js",
"typings": "primeng.d.ts",
"peerDependencies": {
"@angular/core": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
"@angular/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
"@angular/forms": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0",
"rxjs": "^6.0.0",
"zone.js": "^0.10.2 || ^0.11.0"
"@angular/core": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",
"@angular/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",
"@angular/forms": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0",
"rxjs": "^6.0.0 || ^7.0.0",
"zone.js": "^0.10.2 || ^0.11.0",
"primeicons": "^5.0.0"
}
}
29 changes: 12 additions & 17 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export class TableService {
}

onSelectionChange() {
this.selectionSource.next();
this.selectionSource.next(null);
}

onResetChange() {
this.resetSource.next();
this.resetSource.next(null);
}

onContextMenu(data: any) {
Expand Down Expand Up @@ -1659,24 +1659,19 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
type: 'text/csv;charset=utf-8;'
});

if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveOrOpenBlob(blob, this.exportFilename + '.csv');
let link = document.createElement("a");
link.style.display = 'none';
document.body.appendChild(link);
if (link.download !== undefined) {
link.setAttribute('href', URL.createObjectURL(blob));
link.setAttribute('download', this.exportFilename + '.csv');
link.click();
}
else {
let link = document.createElement("a");
link.style.display = 'none';
document.body.appendChild(link);
if (link.download !== undefined) {
link.setAttribute('href', URL.createObjectURL(blob));
link.setAttribute('download', this.exportFilename + '.csv');
link.click();
}
else {
csv = 'data:text/csv;charset=utf-8,' + csv;
window.open(encodeURI(csv));
}
document.body.removeChild(link);
csv = 'data:text/csv;charset=utf-8,' + csv;
window.open(encodeURI(csv));
}
document.body.removeChild(link);
}

public resetScrollTop() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/treetable/treetable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class TreeTableService {
}

onSelectionChange() {
this.selectionSource.next();
this.selectionSource.next(null);
}

onContextMenu(node: any) {
Expand Down
55 changes: 29 additions & 26 deletions src/app/components/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
{
"compilerOptions": {
"declaration": true,
"module": "es2015",
"target": "es5",
"baseUrl": ".",
"stripInternal": true,
"emitDecoratorMetadata": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"outDir": "../build",
"rootDir": ".",
"lib": [
"es2016",
"dom"
],
"skipLibCheck": true,
"types": [],
"paths": {
"primeng/*": ["src/app/components/*/public_api"]
}
"declaration": true,
"module": "es2020",
"target": "es2017",
"baseUrl": ".",
"stripInternal": true,
"emitDecoratorMetadata": false,
"experimentalDecorators": true,
"moduleResolution": "node",
"outDir": "../build",
"rootDir": ".",
"lib": [
"es2020",
"dom"
],
"skipLibCheck": true,
"types": [],
"paths": {
"primeng/*": ["src/app/components/*/public_api"]
}
},
"angularCompilerOptions": {
"annotateForClosureCompiler": false,
"strictMetadataEmit": true,
"skipTemplateCodegen": true,
"flatModuleOutFile": "primeng.js",
"flatModuleId": "primeng"
"annotateForClosureCompiler": false,
"strictMetadataEmit": true,
"skipTemplateCodegen": true,
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"flatModuleOutFile": "primeng.js",
"flatModuleId": "primeng"
},
"files": [
"./public_api.ts"
"./public_api.ts"
]
}
}

0 comments on commit 7c30c3b

Please sign in to comment.