-
Notifications
You must be signed in to change notification settings - Fork 27
Feature/angular strict/qgrid ngx plugins #616
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
base: master
Are you sure you want to change the base?
Changes from 17 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 { | ||
|
Collaborator
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,5 +1,5 @@ | ||
| import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
| import { isArray, predicateFactory } from '@qgrid/core'; | ||
| import { 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[] = []; | ||
|
Collaborator
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; | ||
| } | ||
|
|
||
| get title() { | ||
|
|
||
| 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; | ||
|
Collaborator
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 } = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,11 +17,11 @@ import { GridModel, GridPlugin } from '@qgrid/ngx'; | |
| changeDetection: ChangeDetectionStrategy.OnPush, | ||
| }) | ||
| export class DataProviderComponent implements OnInit { | ||
| private next: (rows: any[]) => void; | ||
| private next: (rows: unknown[]) => void; | ||
|
Collaborator
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 use the same DataRow? |
||
|
|
||
| @Output() requestRows = new EventEmitter<GridModel>(); | ||
|
|
||
| @Input('rows') set rows(value: any[]) { | ||
| @Input('rows') set rows(value: unknown[]) { | ||
| if (Array.isArray(value)) { | ||
| const next = this.next; | ||
| if (next) { | ||
|
|
||
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