diff --git a/package.json b/package.json index 2540407aab2..fb25b3a1d5f 100755 --- a/package.json +++ b/package.json @@ -1,77 +1,77 @@ { - "name": "primeng", - "version": "14.2.3-SNAPSHOT", - "license": "MIT", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "test:headless": "ng test --watch=false --browsers=ChromeHeadless", - "e2e": "ng e2e", - "lint": "ng lint", - "format": "prettier --write \"**/*.{js,ts,d.ts}\"", - "format:check": "prettier --check \"**/*.{js,ts,d.ts}\"", - "build:lib": "npm run build:check && npm run build:package", - "build:package": "BROWSERSLIST_ENV=library ng build primeng-library && gulp build-assets", - "build:check": "npm run format:check && npm run security:check && npm run test:headless", - "security:check": "npm audit --production --audit-level high" - }, - "repository": { - "type": "git", - "url": "https://github.com/primefaces/primeng.git" - }, - "devDependencies": { - "@angular-devkit/build-angular": "~14.0.3", - "@angular/animations": "~14.0.0", - "@angular/cdk": "~14.0.0", - "@angular/cli": "~14.0.3", - "@angular/common": "~14.0.0", - "@angular/compiler": "~14.0.0", - "@angular/compiler-cli": "~14.0.0", - "@angular/core": "~14.0.0", - "@angular/forms": "~14.0.0", - "@angular/platform-browser": "~14.0.0", - "@angular/platform-browser-dynamic": "~14.0.0", - "@angular/router": "~14.0.0", - "@types/jasmine": "~3.10.0", - "@types/node": "^12.11.1", - "@fullcalendar/core": "6.0.0-beta.1", - "@fullcalendar/daygrid": "6.0.0-beta.1", - "@fullcalendar/interaction": "6.0.0-beta.1", - "@fullcalendar/timegrid": "6.0.0-beta.1", - "@fullcalendar/web-component": "6.0.0-beta.1", - "chart.js": "3.3.2", - "codelyzer": "^6.0.0", - "del": "^2.2.0", - "file-saver": "^2.0.2", - "gulp": "^4.0.2", - "gulp-concat": "^2.6.0", - "gulp-flatten": "^0.4.0", - "gulp-rename": "^2.0.0", - "gulp-uglify": "^3.0.2", - "gulp-uglifycss": "^1.0.6", - "jasmine-core": "~4.1.0", - "jasmine-spec-reporter": "~5.0.0", - "jspdf": "1.5.3", - "jspdf-autotable": "3.2.5", - "karma": "~6.3.0", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.0.0", - "karma-jasmine-html-reporter": "^1.7.0", - "ng-packagr": "~14.0.0", - "prettier": "2.7.1", - "primeflex": "^3.3.0", - "primeicons": "^6.0.1", - "prismjs": "1.20.0", - "quill": "1.3.7", - "rxjs": "~7.5.0", - "ts-node": "~8.3.0", - "tslib": "^2.3.0", - "tslint": "~6.1.0", - "typescript": "~4.7.2", - "xlsx": "^0.15.1", - "zone.js": "~0.11.4" - } -} + "name": "primeng", + "version": "15.0.0-rc.1", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "test:headless": "ng test --watch=false --browsers=ChromeHeadless", + "e2e": "ng e2e", + "lint": "ng lint", + "format": "prettier --write \"**/*.{js,ts,d.ts}\"", + "format:check": "prettier --check \"**/*.{js,ts,d.ts}\"", + "build:lib": "npm run build:check && npm run build:package", + "build:package": "BROWSERSLIST_ENV=library ng build primeng-library && gulp build-assets", + "build:check": "npm run format:check && npm run security:check && npm run test:headless", + "security:check": "npm audit --production --audit-level high" + }, + "repository": { + "type": "git", + "url": "https://github.com/primefaces/primeng.git" + }, + "devDependencies": { + "@angular-devkit/build-angular": "~15.0.0", + "@angular/animations": "~15.0.0", + "@angular/cdk": "~15.0.0", + "@angular/cli": "~15.0.0", + "@angular/common": "~15.0.0", + "@angular/compiler": "~15.0.0", + "@angular/compiler-cli": "~15.0.0", + "@angular/core": "~15.0.0", + "@angular/forms": "~15.0.0", + "@angular/platform-browser": "~15.0.0", + "@angular/platform-browser-dynamic": "~15.0.0", + "@angular/router": "~15.0.0", + "@types/jasmine": "~3.10.0", + "@types/node": "^12.11.1", + "@fullcalendar/core": "6.0.0-beta.1", + "@fullcalendar/daygrid": "6.0.0-beta.1", + "@fullcalendar/interaction": "6.0.0-beta.1", + "@fullcalendar/timegrid": "6.0.0-beta.1", + "@fullcalendar/web-component": "6.0.0-beta.1", + "chart.js": "3.3.2", + "codelyzer": "^6.0.0", + "del": "^2.2.0", + "file-saver": "^2.0.2", + "gulp": "^4.0.2", + "gulp-concat": "^2.6.0", + "gulp-flatten": "^0.4.0", + "gulp-rename": "^2.0.0", + "gulp-uglify": "^3.0.2", + "gulp-uglifycss": "^1.0.6", + "jasmine-core": "~4.1.0", + "jasmine-spec-reporter": "~5.0.0", + "jspdf": "1.5.3", + "jspdf-autotable": "3.2.5", + "karma": "~6.3.0", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage": "~2.2.0", + "karma-jasmine": "~5.0.0", + "karma-jasmine-html-reporter": "^1.7.0", + "ng-packagr": "~15.0.0", + "prettier": "2.7.1", + "primeflex": "^3.3.0", + "primeicons": "^6.0.1", + "prismjs": "1.20.0", + "quill": "1.3.7", + "rxjs": "~7.5.0", + "ts-node": "~8.3.0", + "tslib": "^2.3.0", + "tslint": "~6.1.0", + "typescript": "~4.8.4", + "xlsx": "^0.15.1", + "zone.js": "~0.11.4" + } +} \ No newline at end of file diff --git a/src/app/components/checkbox/checkbox.spec.ts b/src/app/components/checkbox/checkbox.spec.ts index b6cdb5fc935..e6c92f51fd7 100755 --- a/src/app/components/checkbox/checkbox.spec.ts +++ b/src/app/components/checkbox/checkbox.spec.ts @@ -1,9 +1,8 @@ -import { TestBed, ComponentFixture } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { Checkbox } from './checkbox'; -import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Component } from '@angular/core'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { Checkbox } from './checkbox'; @Component({ template: ` ` @@ -41,15 +40,16 @@ describe('Checkbox', () => { }); it('should disabled', () => { - checkbox.disabled = true; checkbox.label = 'primeng'; - fixture.detectChanges(); + checkbox.disabled = true; + checkbox.cd.detectChanges(); const onClickSpy = spyOn(checkbox, 'onClick').and.callThrough(); const boxEl = fixture.nativeElement.querySelector('.p-checkbox-box'); const labelEl = fixture.nativeElement.querySelector('.p-checkbox-label'); + boxEl.click(); - fixture.detectChanges(); + checkbox.cd.detectChanges(); const input = fixture.nativeElement.querySelector('input'); expect(input.checked).toBe(false); diff --git a/src/app/components/checkbox/checkbox.ts b/src/app/components/checkbox/checkbox.ts index c06a23d42c8..15768aec87e 100755 --- a/src/app/components/checkbox/checkbox.ts +++ b/src/app/components/checkbox/checkbox.ts @@ -1,6 +1,6 @@ -import { NgModule, Component, Input, Output, EventEmitter, forwardRef, ChangeDetectorRef, ViewChild, ElementRef, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { NG_VALUE_ACCESSOR, ControlValueAccessor, FormControl } from '@angular/forms'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, Input, NgModule, Output, ViewChild, ViewEncapsulation } from '@angular/core'; +import { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms'; import { ObjectUtils } from 'primeng/utils'; export const CHECKBOX_VALUE_ACCESSOR: any = { @@ -103,7 +103,7 @@ export class Checkbox implements ControlValueAccessor { focused: boolean = false; - constructor(private cd: ChangeDetectorRef) {} + constructor(public cd: ChangeDetectorRef) {} onClick(event, checkbox, focus: boolean) { event.preventDefault(); diff --git a/src/app/components/fileupload/fileupload.ts b/src/app/components/fileupload/fileupload.ts index a6ca0e0a41b..710af85c7fc 100755 --- a/src/app/components/fileupload/fileupload.ts +++ b/src/app/components/fileupload/fileupload.ts @@ -1,34 +1,32 @@ +import { CommonModule } from '@angular/common'; +import { HttpClient, HttpEvent, HttpEventType, HttpHeaders } from '@angular/common/http'; import { - NgModule, + AfterContentInit, + AfterViewInit, + ChangeDetectionStrategy, + ChangeDetectorRef, Component, - OnDestroy, + ContentChildren, + ElementRef, + EventEmitter, Input, + NgModule, + NgZone, + OnDestroy, + OnInit, Output, - EventEmitter, - TemplateRef, - AfterViewInit, - AfterContentInit, - ContentChildren, QueryList, + TemplateRef, ViewChild, - ElementRef, - NgZone, - ChangeDetectionStrategy, - ViewEncapsulation, - ChangeDetectorRef, - OnInit + ViewEncapsulation } from '@angular/core'; -import { CommonModule } from '@angular/common'; import { DomSanitizer } from '@angular/platform-browser'; +import { BlockableUI, Message, PrimeNGConfig, PrimeTemplate, SharedModule, TranslationKeys } from 'primeng/api'; import { ButtonModule } from 'primeng/button'; +import { DomHandler } from 'primeng/dom'; import { MessagesModule } from 'primeng/messages'; import { ProgressBarModule } from 'primeng/progressbar'; -import { DomHandler } from 'primeng/dom'; -import { Message, TranslationKeys } from 'primeng/api'; -import { PrimeTemplate, SharedModule, PrimeNGConfig } from 'primeng/api'; -import { BlockableUI } from 'primeng/api'; import { RippleModule } from 'primeng/ripple'; -import { HttpClient, HttpEvent, HttpEventType, HttpHeaders } from '@angular/common/http'; import { Subscription } from 'rxjs'; @Component({ @@ -92,7 +90,7 @@ import { Subscription } from 'rxjs'; pRipple > - {{ basicButtonLabel }} + {{ basicButtonLabel }} diff --git a/src/app/components/inputmask/inputmask.spec.ts b/src/app/components/inputmask/inputmask.spec.ts index 5afba6efa1c..ed2074130a4 100755 --- a/src/app/components/inputmask/inputmask.spec.ts +++ b/src/app/components/inputmask/inputmask.spec.ts @@ -1,9 +1,9 @@ -import { TestBed, ComponentFixture } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { InputMask } from './inputmask'; -import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Component } from '@angular/core'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; +import { By } from '@angular/platform-browser'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { InputMask } from './inputmask'; @Component({ template: `` @@ -233,10 +233,10 @@ describe('InputMask', () => { it('should disabled with setDisabledState', () => { inputmask.setDisabledState(true); - fixture.detectChanges(); + inputmask.cd.detectChanges(); inputmask.focus(); - fixture.detectChanges(); + inputmask.cd.detectChanges(); expect(document.activeElement).not.toEqual(inputmask.inputViewChild.nativeElement); }); diff --git a/src/app/components/inputmask/inputmask.ts b/src/app/components/inputmask/inputmask.ts index ff868a0e9f5..d680efd8172 100755 --- a/src/app/components/inputmask/inputmask.ts +++ b/src/app/components/inputmask/inputmask.ts @@ -25,12 +25,12 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { NgModule, Component, ElementRef, OnInit, Input, forwardRef, Output, EventEmitter, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, ChangeDetectorRef } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, Input, NgModule, OnInit, Output, ViewChild, ViewEncapsulation } from '@angular/core'; +import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; +import { AutoFocusModule } from 'primeng/autofocus'; import { DomHandler } from 'primeng/dom'; import { InputTextModule } from 'primeng/inputtext'; -import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms'; -import { AutoFocusModule } from 'primeng/autofocus'; export const INPUTMASK_VALUE_ACCESSOR: any = { provide: NG_VALUE_ACCESSOR, @@ -180,7 +180,7 @@ export class InputMask implements OnInit, ControlValueAccessor { focused: boolean; - constructor(public el: ElementRef, private cd: ChangeDetectorRef) {} + constructor(public el: ElementRef, public cd: ChangeDetectorRef) {} ngOnInit() { let ua = DomHandler.getUserAgent(); diff --git a/src/app/components/package.json b/src/app/components/package.json index 455f1ae7729..b87116eb17e 100644 --- a/src/app/components/package.json +++ b/src/app/components/package.json @@ -1,28 +1,28 @@ { "name": "primeng", - "version": "14.2.3", + "version": "15.0.0-rc.1", "repository": { - "type": "git", - "url": "https://github.com/primefaces/primeng" + "type": "git", + "url": "https://github.com/primefaces/primeng" }, "keywords": [ - "angular" + "angular" ], "license": "MIT", "bugs": { - "url": "https://github.com/primefaces/primeng/issues" + "url": "https://github.com/primefaces/primeng/issues" }, "exports": { - "./resources/": "./resources/" + "./resources/": "./resources/" }, "module": "primeng.js", "typings": "primeng.d.ts", "peerDependencies": { - "@angular/core": "^14.0.0", - "@angular/common": "^14.0.0", - "@angular/forms": "^14.0.0", - "rxjs": "^6.0.0 || ^7.0.0", - "zone.js": "^0.10.2 || ^0.11.0 || ^0.12.0", - "primeicons": "^6.0.1" + "@angular/core": "^15.0.0", + "@angular/common": "^15.0.0", + "@angular/forms": "^15.0.0", + "rxjs": "^6.0.0 || ^7.5.0", + "zone.js": "^0.10.2 || ^0.11.0 || ^0.12.0", + "primeicons": "^6.0.1" } - } +} \ No newline at end of file diff --git a/src/app/components/radiobutton/radiobutton.spec.ts b/src/app/components/radiobutton/radiobutton.spec.ts index 7f13305b68d..1b71adcbaa9 100755 --- a/src/app/components/radiobutton/radiobutton.spec.ts +++ b/src/app/components/radiobutton/radiobutton.spec.ts @@ -1,9 +1,9 @@ -import { TestBed, ComponentFixture, fakeAsync, tick } from '@angular/core/testing'; +import { Component } from '@angular/core'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; -import { RadioButton, RadioButtonModule } from './radiobutton'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { Component } from '@angular/core'; +import { RadioButton, RadioButtonModule } from './radiobutton'; @Component({ template: ` ` @@ -67,25 +67,25 @@ describe('RadioButton', () => { radiobutton.value = 'prime'; radiobutton.disabled = true; radiobutton.label = 'prime'; - fixture.detectChanges(); + radiobutton.cd.detectChanges(); const handleClickSpy = spyOn(radiobutton, 'handleClick').and.callThrough(); const selectSpy = spyOn(radiobutton, 'select').and.callThrough(); const radiobuttonEl = fixture.debugElement.queryAll(By.css('div'))[2]; const inputEl = fixture.debugElement.query(By.css('input')); const labelEl = fixture.debugElement.query(By.css('label')); + expect(inputEl.nativeElement.disabled).toEqual(true); expect(radiobuttonEl.nativeElement.className).toContain('p-disabled'); expect(labelEl.nativeElement.className).toContain('p-disabled'); - radiobuttonEl.nativeElement.click(); - fixture.detectChanges(); + radiobutton.cd.detectChanges(); expect(handleClickSpy).toHaveBeenCalled(); expect(selectSpy).not.toHaveBeenCalled(); expect(radiobutton.checked).toBeFalsy(); labelEl.nativeElement.click(); - fixture.detectChanges(); + radiobutton.cd.detectChanges(); expect(handleClickSpy).toHaveBeenCalledTimes(1); expect(selectSpy).toHaveBeenCalled(); diff --git a/src/app/showcase/app.footer.component.ts b/src/app/showcase/app.footer.component.ts index e288cd968d4..c586c6c89a6 100644 --- a/src/app/showcase/app.footer.component.ts +++ b/src/app/showcase/app.footer.component.ts @@ -5,7 +5,7 @@ import { Component } from '@angular/core'; template: `