Skip to content

Commit 0f019c4

Browse files
committed
Up to nodegui 0.12.1
1 parent 4e9578f commit 0f019c4

File tree

6 files changed

+17
-14
lines changed

6 files changed

+17
-14
lines changed

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@angular/platform-browser": "~8.2.11",
2929
"@angular/platform-browser-dynamic": "~8.2.11",
3030
"@angular/router": "~8.2.11",
31-
"@nodegui/nodegui": "^0.8.0",
31+
"@nodegui/nodegui": "^0.12.1",
3232
"core-js": "^3.3.2",
3333
"node-fetch": "^2.6.0",
3434
"phin": "^3.4.1",

projects/angular-nodegui/src/lib/components/image.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { RendererStyleFlags2 } from '@angular/core';
22
import { QLabel, QPixmap, AspectRatioMode } from '@nodegui/nodegui';
3-
import * as phin from 'phin';
3+
import phin from 'phin';
44
import { NgComponent } from './component';
5+
import { QVariantType } from '@nodegui/nodegui/dist/lib/QtCore/QVariant';
56

67
export class NgImage extends QLabel implements NgComponent {
78
public static nodeName = 'image';
@@ -33,7 +34,7 @@ export class NgImage extends QLabel implements NgComponent {
3334

3435
public setNgProperty(
3536
name: string,
36-
value: string | boolean | AspectRatioMode | Buffer
37+
value: string | boolean | AspectRatioMode | Buffer | QVariantType
3738
): void {
3839
switch (name) {
3940
case 'src':
@@ -60,7 +61,7 @@ export class NgImage extends QLabel implements NgComponent {
6061
break;
6162

6263
default:
63-
this.setProperty(name, value);
64+
this.setProperty(name, value as QVariantType);
6465
break;
6566
}
6667
}

projects/angular-nodegui/src/lib/components/spin-box.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { QSpinBox } from '@nodegui/nodegui';
2+
import { QVariantType } from '@nodegui/nodegui/dist/lib/QtCore/QVariant';
23
import { NgComponent } from './component';
34
import { RendererStyleFlags2 } from '@angular/core';
45

@@ -34,15 +35,15 @@ export class NgSpinnBox extends QSpinBox implements NgComponent {
3435

3536
public setNgProperty(
3637
name: string,
37-
value: boolean | string | Range | number
38+
value: Range | QVariantType
3839
): void {
3940
switch (name) {
4041
case 'range':
4142
this.setRange((value as Range).minimum, (value as Range).maximum);
4243
break;
4344

4445
default:
45-
this.setProperty(name, value);
46+
this.setProperty(name, value as QVariantType);
4647
break;
4748
}
4849
}

projects/angular-nodegui/src/lib/renderer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
RendererStyleFlags2,
66
RendererType2
77
} from '@angular/core';
8-
import { QMainWindow, NativeEvent, QWidget } from '@nodegui/nodegui';
8+
import { QMainWindow, QWidget } from '@nodegui/nodegui';
99
import { QWindowService } from './window';
1010
import { NgWindow } from './components/window';
1111
import { NgComponent } from './components/component';
@@ -110,7 +110,7 @@ export class NodeguiRenderer implements Renderer2 {
110110
eventName: string,
111111
callback: (event: any) => boolean | void
112112
): () => void {
113-
const callbackFunc = (e: NativeEvent) => callback.call(target, e);
113+
const callbackFunc = (e: any) => callback.call(target, e);
114114

115115
target.addEventListener(eventName, callbackFunc);
116116

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"experimentalDecorators": true,
1010
"module": "esnext",
1111
"moduleResolution": "node",
12+
"esModuleInterop" :true,
1213
"importHelpers": true,
1314
"target": "es2015",
1415
"typeRoots": ["node_modules/@types"],

0 commit comments

Comments
 (0)