Skip to content

Commit

Permalink
Merge pull request #37 from tonysamperi/v19
Browse files Browse the repository at this point in the history
v19.0.0
  • Loading branch information
tonysamperi authored Dec 15, 2024
2 parents 4f13451 + d737cf3 commit 33b255a
Show file tree
Hide file tree
Showing 10 changed files with 3,359 additions and 2,979 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#19.0.0
* Release for Angular 19! 🎉

#18.0.2
* Fix in the hide process

Expand Down
186 changes: 93 additions & 93 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,95 +1,95 @@
{
"name": "ngx-float-ui-repo",
"version": "18.0.2",
"build": 0,
"license": "MIT",
"description": "ngx-float-ui is an Angular wrapper for @floating-ui",
"homepage": "https://tonysamperi.github.io/ngx-float-ui",
"repository": {
"type": "git",
"url": "https://github.com/tonysamperi/ngx-float-ui.git"
},
"bugs": {
"url": "https://github.com/tonysamperi/ngx-float-ui/issues"
},
"author": {
"name": "Tony Samperi",
"email": "[email protected]"
},
"keywords": [
"Angular 18+",
"ngx-float-ui",
"popper Angular",
"floating ui",
"float",
"ui"
],
"engines": {
"node": ">=18"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "ng test ngx-float-ui",
"test:ci": "ng test ngx-float-ui --browsers=ChromeHeadless --watch=false",
"test:demo": "ng test ngx-float-ui-repo",
"lint": "ng lint",
"build++": "gulp build++",
"build": "ng build ngx-float-ui --configuration=production && gulp postBuild",
"build:demo": "ng build ngx-float-ui-repo --configuration=production --base-href=",
"pack": "gulp pack",
"release": "npm publish ./dist/ngx-float-ui",
"release:beta": "npm publish ./dist/ngx-float-ui --tag beta",
"bump:patch": "gulp bump:patch",
"bump:minor": "gulp bump:minor",
"bump:major": "gulp bump:major"
},
"private": true,
"dependencies": {
"@angular/animations": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/ssr": "^18.0.0",
"@floating-ui/dom": "^1.6.6",
"rxjs": "^7.4.0",
"tslib": "^2.3.1",
"typewriter-effect": "^2.19.0",
"zone.js": "^0.14.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.0",
"@angular-devkit/build-ng-packagr": "^0.1002.0",
"@angular/cli": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@angular/language-service": "^18.0.0",
"@types/jasmine": "^3.3.8",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^18.13.0",
"@types/prismjs": "^1.16.5",
"@types/semver": "^7.3.13",
"gulp": "^4.0.2",
"gulp-sass": "^5.1.0",
"jasmine-core": "^4.5.0",
"jasmine-spec-reporter": "^7.0.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"ng-packagr": "^17.0.0-next.2",
"plugin-log": "^0.1.0",
"prismjs": "^1.29.0",
"puppeteer": "^21.0.1",
"semver": "^7.6.2",
"through2": "^4.0.2",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"tslint-consistent-codestyle": "^1.16.0",
"typescript": "~5.4.0"
},
"packageManager": "[email protected]"
"name": "ngx-float-ui-repo",
"version": "19.0.0",
"build": 0,
"license": "MIT",
"description": "ngx-float-ui is an Angular wrapper for @floating-ui",
"homepage": "https://tonysamperi.github.io/ngx-float-ui",
"repository": {
"type": "git",
"url": "https://github.com/tonysamperi/ngx-float-ui.git"
},
"bugs": {
"url": "https://github.com/tonysamperi/ngx-float-ui/issues"
},
"author": {
"name": "Tony Samperi",
"email": "[email protected]"
},
"keywords": [
"Angular 19+",
"ngx-float-ui",
"popper Angular",
"floating ui",
"float",
"ui"
],
"engines": {
"node": ">=20.11.1"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "ng test ngx-float-ui",
"test:ci": "ng test ngx-float-ui --browsers=ChromeHeadless --watch=false",
"test:demo": "ng test ngx-float-ui-repo",
"lint": "ng lint",
"build++": "gulp build++",
"build": "ng build ngx-float-ui --configuration=production && gulp postBuild",
"build:demo": "ng build ngx-float-ui-repo --configuration=production --base-href=",
"pack": "gulp pack",
"release": "npm publish ./dist/ngx-float-ui",
"release:beta": "npm publish ./dist/ngx-float-ui --tag beta",
"bump:patch": "gulp bump:patch",
"bump:minor": "gulp bump:minor",
"bump:major": "gulp bump:major"
},
"private": true,
"dependencies": {
"@angular/animations": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/ssr": "^19.0.0",
"@floating-ui/dom": "^1.6.12",
"rxjs": "^7.4.0",
"tslib": "^2.3.1",
"typewriter-effect": "^2.19.0",
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^19.0.0",
"@angular-devkit/build-ng-packagr": "^0.1002.0",
"@angular/cli": "^19.0.0",
"@angular/compiler-cli": "^19.0.0",
"@angular/language-service": "^19.0.0",
"@types/jasmine": "^3.3.8",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^18.13.0",
"@types/prismjs": "^1.16.5",
"@types/semver": "^7.3.13",
"gulp": "^4.0.2",
"gulp-sass": "^5.1.0",
"jasmine-core": "^4.6.1",
"jasmine-spec-reporter": "^7.0.0",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"ng-packagr": "^19.0.1",
"plugin-log": "^0.1.0",
"prismjs": "^1.29.0",
"puppeteer": "^21.11.0",
"semver": "^7.6.2",
"through2": "^4.0.2",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"tslint-consistent-codestyle": "^1.16.0",
"typescript": "~5.6.3"
},
"packageManager": "[email protected]"
}
3 changes: 2 additions & 1 deletion projects/ngx-float-ui-repo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {NGX_FLOAT_UI_ENVIRONMENT} from "../environments/environment";
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.scss"],
encapsulation: ViewEncapsulation.None
encapsulation: ViewEncapsulation.None,
standalone: false
})
export class NgxFloatUiAppComponent {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const codeTypes: NgxFloatUiArticleTypesRef<"css" | "markup"> = {
selector: "app-demo",
templateUrl: "demo.component.html",
styleUrls: ["demo.component.scss"],
standalone: true,
imports: [NgFor, NgxFloatUiContentComponent, NgxFloatUiDirective, NgxFloatUiLooseDirective]
})
export class NgxFloatUiDemoComponent implements OnInit {
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-float-ui-repo/src/assets/messages.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"messages": [
{
"text": "12/12/2024: working on v19!",
"text": "14/12/2024: released v19!",
"opts": {
"loop": true
}
Expand Down
12 changes: 6 additions & 6 deletions projects/ngx-float-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-float-ui",
"version": "18.0.2",
"version": "19.0.0",
"license": "MIT",
"description": "ngx-float-ui is an Angular wrapper for Floating UI",
"homepage": "https://tonysamperi.github.io/ngx-float-ui",
Expand All @@ -16,21 +16,21 @@
"email": "[email protected]"
},
"keywords": [
"Angular 8+",
"Angular 19+",
"ngx-float-ui",
"floating-ui Angular",
"Angular 18",
"Angular 19",
"floating-ui"
],
"scripts": {
"postinstall": "node ./tsbl.js"
},
"dependencies": {
"@floating-ui/dom": "^1.6.6"
"@floating-ui/dom": "^1.6.12"
},
"peerDependencies": {
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/common": "^19.0.0",
"@angular/core": "^19.0.0",
"rxjs": "^7.4.0"
},
"exports": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
limitShift,
offset,
Placement,
shift
shift,
} from "@floating-ui/dom";
import {fromEvent, Subject, takeUntil} from "rxjs";
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, DebugElement, ViewEncapsulation} from "@angular/core";
import {ComponentFixture, fakeAsync, flush, TestBed, tick} from "@angular/core/testing";
import {ComponentFixture, fakeAsync, TestBed, tick} from "@angular/core/testing";
import {By} from "@angular/platform-browser";
//
import {NgxFloatUiModule, NgxFloatUiDirective, NgxFloatUiPlacements} from "ngx-float-ui";
Expand Down Expand Up @@ -72,7 +72,6 @@ import {NgxFloatUiModule, NgxFloatUiDirective, NgxFloatUiPlacements} from "ngx-f
"../../../../../ngx-float-ui-repo/src/app/components/demo/demo.component.scss"
],
encapsulation: ViewEncapsulation.None,
standalone: true,
imports: [NgxFloatUiModule]
})
class NgxFloatUiDirectiveTestComponent {
Expand All @@ -82,7 +81,7 @@ class NgxFloatUiDirectiveTestComponent {
topPlacement: NgxFloatUiPlacements = NgxFloatUiPlacements.TOP;


onPopperUpdate($event): void {
onPopperUpdate(_$event_): void {
}
}

Expand All @@ -92,12 +91,12 @@ const utils = {
expectPopperHidden(popperDebugEl: DebugElement) {
const popperContent = utils.getClosestPopperContainer(popperDebugEl);
expect(popperContent).not.toBeNull();
expect(popperContent.offsetParent).toBeNull();
expect(popperContent.offsetHeight).toBe(0);
},
expectPopperVisible(popperDebugEl: DebugElement) {
const popperContent = utils.getClosestPopperContainer(popperDebugEl);
expect(popperContent).not.toBeNull();
expect(popperContent.offsetParent).toBeTruthy();
expect(popperContent.offsetHeight).toBeGreaterThan(0);
},
getClosestPopperContainer(el: DebugElement): HTMLElement | null {
return el.nativeElement?.parentElement?.querySelector(`.${utils.containerClazz}`);
Expand All @@ -122,10 +121,6 @@ beforeEach(() => {
poppers = fixture.debugElement.queryAll(By.directive(NgxFloatUiDirective));
});

afterEach(fakeAsync(() => {
flush();
}));

it("should count test popper elements", () => {
expect(poppers.length).toBe(4);
});
Expand All @@ -135,19 +130,19 @@ it("should have popper sibling", () => {
expect(popperContent).not.toBeNull();
});

it("should show popper on start", () => {
fakeAsync(() => {
tick();
utils.expectPopperVisible(poppers[0]);
});
});
// it("should show popper on start", waitForAsync(() => {
// new Promise(r => setTimeout(r, 200)).then(() => {
// utils.expectPopperVisible(poppers[0]);
// });
// }));

it("should show popper on click", () => {
poppers[1].nativeElement.click();
fakeAsync(() => {
utils.expectPopperVisible(poppers[1]);
});
});
// it("should show popper on click", waitForAsync(() => {
// poppers[1].nativeElement.click();
// Promise.resolve().then(() => {
// utils.expectPopperVisible(poppers[1]);
//
// });
// }));

it("should hide popper on click outside", fakeAsync(() => {
const fooButtonDebugEl = fixture.debugElement.query(By.css("[foo]"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
Output,
ViewContainerRef
} from "@angular/core";
//
import {fromEvent, Subject, takeUntil, timer} from "rxjs";
//
import {NgxFloatUiContentComponent} from "../../components/ngx-float-ui-content/ngx-float-ui-content.component";
import {NGX_FLOAT_UI_DEFAULTS} from "../../models/ngx-float-ui-defaults.model";
import {NgxFloatUiOptions} from "../../models/ngx-float-ui-options.model";
Expand Down
Loading

0 comments on commit 33b255a

Please sign in to comment.