Skip to content

Commit a8d9fa8

Browse files
committed
Merge branch 'feat/angular-19'
2 parents 4190062 + 51c933d commit a8d9fa8

26 files changed

+4920
-4062
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
dist
55
tmp
66
/out-tsc
7+
storybook-static
78

89
# dependencies
910
node_modules
@@ -40,4 +41,5 @@ Thumbs.db
4041

4142
.angular
4243

43-
.nx/cache
44+
.nx/cache
45+
.nx/workspace-data

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/coverage
44
.angular
55

6-
/.nx/cache
6+
/.nx/cache
7+
/.nx/workspace-data

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### BREAKING CHANGES
6+
7+
- **Dependency**: Require Angular 19
8+
59
## [18.0.0] - 2024-05-30
610

711
### BREAKING CHANGES

apps/demo/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prefix": "app",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@angular-eslint/prefer-standalone": "off"
2829
}
2930
},
3031
{

apps/demo/src/app-demo/app-demo.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import {
1111
} from '@perfectmemory/ngx-contextmenu';
1212

1313
@Component({
14-
selector: 'app-demo-context-menu',
15-
styles: [
16-
`
14+
selector: 'app-demo-context-menu',
15+
styles: [
16+
`
1717
.dashboardContainer {
1818
width: 100%;
1919
height: 100%;
@@ -32,8 +32,9 @@ import {
3232
position: absolute;
3333
}
3434
`,
35-
],
36-
templateUrl: './app-demo.component.html',
35+
],
36+
templateUrl: './app-demo.component.html',
37+
standalone: false
3738
})
3839
export class AppDemoComponent {
3940
@Input()

apps/demo/src/app/app.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import {
1111
} from '@perfectmemory/ngx-contextmenu';
1212

1313
@Component({
14-
selector: 'demo-context-menu-demo',
15-
styles: [
16-
`
14+
selector: 'demo-context-menu-demo',
15+
styles: [
16+
`
1717
.dashboardContainer {
1818
width: 100%;
1919
height: 100%;
@@ -32,8 +32,9 @@ import {
3232
position: absolute;
3333
}
3434
`,
35-
],
36-
templateUrl: './app.component.html',
35+
],
36+
templateUrl: './app.component.html',
37+
standalone: false
3738
})
3839
export class AppComponent {
3940
@Input()

apps/demo/src/styles.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
@use 'sass:meta';
12
/* You can add global styles to this file, and also import other style files */
23

34
@import '@angular/cdk/overlay-prebuilt.css';
4-
@import '../../../libs/ngx-contextmenu/src/assets/stylesheets/base.scss';
5-
@import '../../../libs/ngx-contextmenu/src/assets/stylesheets/dark-theme.scss';
5+
@include meta.load-css(
6+
'../../../libs/ngx-contextmenu/src/assets/stylesheets/base.scss'
7+
);
8+
@include meta.load-css(
9+
'../../../libs/ngx-contextmenu/src/assets/stylesheets/dark-theme.scss'
10+
);

libs/ngx-contextmenu/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prefix": "context-menu",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@angular-eslint/prefer-standalone": "off"
2829
}
2930
},
3031
{

libs/ngx-contextmenu/.storybook/main.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ const config: StorybookConfig = {
2121
},
2222
],
2323

24-
docs: {
25-
autodocs: false,
26-
},
24+
docs: {},
2725
};
2826

2927
export default config;

libs/ngx-contextmenu/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"url": "git+ssh://[email protected]:PerfectMemory/ngx-contextmenu.git"
2525
},
2626
"peerDependencies": {
27-
"@angular/cdk": "^18.0.0",
28-
"@angular/common": "^18.0.0",
29-
"@angular/core": "^18.0.0"
27+
"@angular/cdk": "^19.0.0",
28+
"@angular/common": "^19.0.0",
29+
"@angular/core": "^19.0.0"
3030
},
3131
"dependencies": {
3232
"tslib": "^2.3.0"

libs/ngx-contextmenu/src/assets/stylesheets/base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import './button-reset.scss';
1+
@use 'button-reset.scss';
22

33
:root {
44
// Styling of the element where a context menu can appear

libs/ngx-contextmenu/src/assets/stylesheets/dark-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import './base.scss';
1+
@use 'base.scss';
22

33
.dark-theme {
44
// Styling of the element where a context menu can appear

libs/ngx-contextmenu/src/lib/components/context-menu-content/context-menu-content.component.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ export const TESTING_WRAPPER = {
3030
};
3131

3232
@Component({
33-
selector: 'context-menu-content',
34-
templateUrl: './context-menu-content.component.html',
35-
changeDetection: ChangeDetectionStrategy.OnPush,
36-
host: {
37-
tabindex: '0',
38-
role: 'dialog',
39-
class: 'ngx-contextmenu',
40-
},
33+
selector: 'context-menu-content',
34+
templateUrl: './context-menu-content.component.html',
35+
changeDetection: ChangeDetectionStrategy.OnPush,
36+
host: {
37+
tabindex: '0',
38+
role: 'dialog',
39+
class: 'ngx-contextmenu',
40+
},
41+
standalone: false
4142
})
4243
export class ContextMenuContentComponent<T>
4344
implements OnDestroy, AfterViewInit

libs/ngx-contextmenu/src/lib/components/context-menu/context-menu.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ import {
3232
} from './context-menu.component.interface';
3333

3434
@Component({
35-
encapsulation: ViewEncapsulation.None,
36-
selector: 'context-menu',
37-
template: '',
35+
encapsulation: ViewEncapsulation.None,
36+
selector: 'context-menu',
37+
template: '',
38+
standalone: false
3839
})
3940
export class ContextMenuComponent<T> implements OnInit, OnDestroy {
4041
/**

libs/ngx-contextmenu/src/lib/directives/context-menu-content-item/context-menu-content-item.directive.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { ContextMenuContentItemDirective } from './context-menu-content-item.dir
77

88
@Component({
99
template: '<div [contextMenuContentItem]="contextMenuItem"></div>',
10+
standalone: false,
1011
})
1112
class TestHostComponent {
1213
@Input()

libs/ngx-contextmenu/src/lib/directives/context-menu-content-item/context-menu-content-item.directive.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import { evaluateIfFunction } from '../../helper/evaluate';
44
import { ContextMenuItemDirective } from '../context-menu-item/context-menu-item.directive';
55

66
@Directive({
7-
selector: '[contextMenuContentItem]',
8-
exportAs: 'contextMenuContentItem',
9-
host: {
10-
class: 'ngx-context-menu-item',
11-
},
7+
selector: '[contextMenuContentItem]',
8+
exportAs: 'contextMenuContentItem',
9+
host: {
10+
class: 'ngx-context-menu-item',
11+
},
12+
standalone: false
1213
})
1314
export class ContextMenuContentItemDirective<T> implements FocusableOption {
1415
@Input()

libs/ngx-contextmenu/src/lib/directives/context-menu-item/context-menu-item.directive.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ContextMenuItemDirective } from './context-menu-item.directive';
55

66
@Component({
77
template: '<div contextMenuItem></div>',
8+
standalone: false,
89
})
910
class TestHostComponent {}
1011

libs/ngx-contextmenu/src/lib/directives/context-menu-item/context-menu-item.directive.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import type { ContextMenuComponent } from '../../components/context-menu/context
1010
import { evaluateIfFunction } from '../../helper/evaluate';
1111

1212
@Directive({
13-
selector: '[contextMenuItem]',
13+
selector: '[contextMenuItem]',
14+
standalone: false
1415
})
1516
export class ContextMenuItemDirective<T> {
1617
/**

libs/ngx-contextmenu/src/lib/directives/context-menu/context-menu.directive.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ContextMenuDirective } from './context-menu.directive';
99

1010
@Component({
1111
template: '<div contextMenu></div>',
12+
standalone: false,
1213
})
1314
class TestHostComponent {}
1415

libs/ngx-contextmenu/src/lib/directives/context-menu/context-menu.directive.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ import type { ContextMenuComponent } from '../../components/context-menu/context
99
import { ContextMenuOverlaysService } from '../../services/context-menu-overlays/context-menu-overlays.service';
1010

1111
@Directive({
12-
selector: '[contextMenu]',
13-
exportAs: 'ngxContextMenu',
14-
host: {
15-
role: 'button',
16-
'attr.aria-haspopup': 'menu',
17-
},
12+
selector: '[contextMenu]',
13+
exportAs: 'ngxContextMenu',
14+
host: {
15+
role: 'button',
16+
'attr.aria-haspopup': 'menu',
17+
},
18+
standalone: false
1819
})
1920
export class ContextMenuDirective<T> {
2021
/**

libs/ngx-contextmenu/src/stories/Setup.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ yarn add @perfectmemory/ngx-contextmenu @angular/cdk
2020

2121
| Angular | @perfectmemory/ngx-contextmenu | Main purpose |
2222
| --------- | ------------------------------ | ----------------------------------------------------------------------------- |
23+
| `^19.0.0` | `^19.0.0` | Align version with Angular 19 |
2324
| `^18.0.0` | `^18.0.0` | Align version with Angular 18 |
2425
| `^17.0.0` | `^17.0.0` | Align version with Angular 17 |
2526
| `^16.0.0` | `^16.0.0` | Align version with Angular 16 |

libs/ngx-contextmenu/src/stories/ngx-contextmenu/ngx-contextmenu.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import { ContextMenuDirective } from '../../lib/directives/context-menu/context-
1010
import { ContextMenuService } from '../../lib/services/context-menu/context-menu.service';
1111

1212
@Component({
13-
selector: 'storybook-context-menu',
14-
templateUrl: 'ngx-contextmenu.component.html',
15-
styleUrls: ['./ngx-contextmenu.component.scss'],
13+
selector: 'storybook-context-menu',
14+
templateUrl: 'ngx-contextmenu.component.html',
15+
styleUrls: ['./ngx-contextmenu.component.scss'],
16+
standalone: false
1617
})
1718
export default class StorybookContextMenuComponent {
1819
@Input()
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
2-
globalThis.ngJest = {
3-
testEnvironmentOptions: {
4-
errorOnUnknownElements: true,
5-
errorOnUnknownProperties: true,
6-
},
7-
};
8-
import 'jest-preset-angular/setup-jest';
1+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
2+
3+
setupZoneTestEnv({
4+
errorOnUnknownElements: true,
5+
errorOnUnknownProperties: true,
6+
});

0 commit comments

Comments
 (0)