Skip to content

Commit

Permalink
Merge pull request #12271 from primefaces/v15
Browse files Browse the repository at this point in the history
V15
  • Loading branch information
cetincakiroglu authored Nov 22, 2022
2 parents 57656f7 + 86d2e11 commit 7cf9288
Show file tree
Hide file tree
Showing 12 changed files with 146 additions and 166 deletions.
152 changes: 76 additions & 76 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
14 changes: 7 additions & 7 deletions src/app/components/checkbox/checkbox.spec.ts
Original file line number Diff line number Diff line change
@@ -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: ` <p-checkbox [(ngModel)]="checked"> </p-checkbox> `
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -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();
Expand Down
38 changes: 18 additions & 20 deletions src/app/components/fileupload/fileupload.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down Expand Up @@ -92,7 +90,7 @@ import { Subscription } from 'rxjs';
pRipple
>
<span class="p-button-icon p-button-icon-left pi" [ngClass]="hasFiles() && !auto ? uploadIcon : chooseIcon"></span>
<span class="p-button-label">{{ basicButtonLabel }}</span>
<span *ngIf="basicButtonLabel" class="p-button-label">{{ basicButtonLabel }}</span>
<input #basicfileinput type="file" [accept]="accept" [multiple]="multiple" [disabled]="disabled" (change)="onFileSelect($event)" *ngIf="!hasFiles()" (focus)="onFocus()" (blur)="onBlur()" />
</span>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/app/components/inputmask/inputmask.spec.ts
Original file line number Diff line number Diff line change
@@ -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: `<p-inputMask [(ngModel)]="val" mask="99-9999"></p-inputMask>`
Expand Down Expand Up @@ -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);
});
Expand Down
8 changes: 4 additions & 4 deletions src/app/components/inputmask/inputmask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
26 changes: 13 additions & 13 deletions src/app/components/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Loading

0 comments on commit 7cf9288

Please sign in to comment.