-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/angular strict/qgrid ngx plugins #616
base: master
Are you sure you want to change the base?
Changes from all commits
0270ae8
5a8ab6d
c755d15
4213ed7
2636f33
7237758
dbdc505
21da663
e8c388b
f8a57cd
a2e2b72
d7efb07
dc488a3
1028409
676364e
784c77c
a50693b
9899f0d
a15ce71
eec73f0
0ebfa36
686b220
44430d8
e0482df
35a10a5
d315d36
4910ce2
2374565
4035bf8
6b187fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import { Model } from '../model/model'; | ||
|
||
export interface RestSerialized { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure about naming |
||
order: string; | ||
filter: string; | ||
skip: number; | ||
take: number; | ||
} | ||
|
||
export declare class RestState { | ||
url: string; | ||
method: string; | ||
serialize: (model: Model) => { | ||
order: string; | ||
filter: string; | ||
skip: number; | ||
take: number; | ||
}; | ||
serialize: (model: Model) => RestSerialized; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export declare interface Validator { | ||
validate(value: any): boolean; | ||
getErrors(): Array<string>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @klumba12 check here, please. I updated this type because Validator is using LIVR and this return type described in livr.d.ts. |
||
validate(value: any): boolean; | ||
getErrors(): { [key: string]: (Array<string> | string) }; | ||
} | ||
|
||
export declare function hasRules(rules: any, key: string): boolean; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { isArray, predicateFactory } from '@qgrid/core'; | ||
import { ColumnModel, Fetch, isArray, predicateFactory } from '@qgrid/core'; | ||
import { GridPlugin } from '@qgrid/ngx'; | ||
|
||
@Component({ | ||
|
@@ -13,15 +13,15 @@ export class AutoCompleteEditorComponent { | |
return this.plugin.view.edit.cell; | ||
} | ||
|
||
options: any[] = []; | ||
options: unknown[] = []; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure |
||
|
||
// eslint-disable-next-line no-use-before-define | ||
context: { $implicit: AutoCompleteEditorComponent } = { | ||
$implicit: this, | ||
}; | ||
|
||
get items() { | ||
return (this.cell.fetch as any).result; | ||
return (this.cell.fetch as Fetch).result as unknown[]; | ||
} | ||
|
||
get title() { | ||
|
@@ -53,12 +53,12 @@ export class AutoCompleteEditorComponent { | |
this.options = []; | ||
} | ||
|
||
itemLabelFactory(column) { | ||
itemLabelFactory(column: ColumnModel) { | ||
const { itemLabel } = column; | ||
if (itemLabel) { | ||
return item => itemLabel(item); | ||
return (item: unknown) => itemLabel(item); | ||
} | ||
|
||
return item => item; | ||
return (item: unknown) => item; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,18 +8,20 @@ import { | |
} from '@angular/core'; | ||
import { BoolColumnModel } from '@qgrid/core'; | ||
|
||
type ValueType = unknown; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets be consistent |
||
|
||
@Component({ | ||
selector: 'q-grid-bool-editor', | ||
templateUrl: './bool-editor.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class BoolEditorComponent implements OnInit { | ||
private state: any; | ||
private state: ValueType; | ||
|
||
@Input() autofocus = false; | ||
@Input() column: BoolColumnModel; | ||
@Input() label: string; | ||
@Output() valueChange = new EventEmitter<any>(); | ||
@Output() valueChange = new EventEmitter<ValueType>(); | ||
|
||
// eslint-disable-next-line no-use-before-define | ||
context: { $implicit: BoolEditorComponent } = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this property.
Rest file didn't changed