|
1 | 1 | /* eslint-disable max-len */ |
2 | 2 | import { AsyncPipe, CurrencyPipe } from '@angular/common'; |
3 | | -import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild, DOCUMENT, inject } from '@angular/core'; |
| 3 | +import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild, DOCUMENT, inject } from '@angular/core'; |
4 | 4 | import { CellType, DefaultSortingStrategy, GridSelectionMode, IGridKeydownEventArgs, IgxGridComponent, IgxOverlayOutletDirective, IRowSelectionEventArgs, OverlaySettings, SortingDirection, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarExporterComponent, IgxExcelTextDirective, IgxColumnComponent, IgxCellEditorTemplateDirective, IgxSelectComponent, IgxFocusDirective, IgxSelectItemComponent, IgxCellTemplateDirective, IgxIconComponent, IgxIconButtonDirective } from 'igniteui-angular'; |
5 | 5 | import { BehaviorSubject } from 'rxjs'; |
6 | 6 | import { Contract, REGIONS, Stock } from '../data/financialData'; |
7 | | -import { SignalRService } from '../services/signal-r.service'; |
8 | | -import { IgxPreventDocumentScrollDirective } from '../../../../../src/app/directives/prevent-scroll.directive'; |
| 7 | +import { SignalRService } from '../services/signal-r.service'; |
| 8 | +import { IgxPreventDocumentScrollDirective } from '../../../../../src/app/directives/prevent-scroll.directive'; |
9 | 9 | import { FormsModule } from '@angular/forms'; |
10 | 10 |
|
11 | | -@Component({ |
12 | | - selector: 'app-finjs-grid', |
13 | | - templateUrl: './grid-finjs.component.html', |
14 | | - styleUrls: ['./grid-finjs.component.scss'], |
15 | | - imports: [IgxGridComponent, IgxPreventDocumentScrollDirective, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarExporterComponent, IgxExcelTextDirective, IgxColumnComponent, IgxCellEditorTemplateDirective, IgxSelectComponent, FormsModule, IgxFocusDirective, IgxSelectItemComponent, IgxCellTemplateDirective, IgxIconComponent, IgxIconButtonDirective, IgxOverlayOutletDirective, AsyncPipe, CurrencyPipe] |
| 11 | +@Component({ |
| 12 | + selector: 'app-finjs-grid', |
| 13 | + templateUrl: './grid-finjs.component.html', |
| 14 | + styleUrls: ['./grid-finjs.component.scss'], |
| 15 | + imports: [IgxGridComponent, IgxPreventDocumentScrollDirective, IgxGridToolbarComponent, IgxGridToolbarActionsComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarExporterComponent, IgxExcelTextDirective, IgxColumnComponent, IgxCellEditorTemplateDirective, IgxSelectComponent, FormsModule, IgxFocusDirective, IgxSelectItemComponent, IgxCellTemplateDirective, IgxIconComponent, IgxIconButtonDirective, IgxOverlayOutletDirective, AsyncPipe, CurrencyPipe] |
16 | 16 | }) |
17 | | -export class GridFinJSComponent implements OnInit { |
18 | | - private el = inject(ElementRef); |
19 | | - private document = inject<Document>(DOCUMENT); |
20 | | - dataService = inject(SignalRService); |
| 17 | +export class GridFinJSComponent implements OnInit { |
| 18 | + private el = inject(ElementRef); |
| 19 | + private document = inject<Document>(DOCUMENT); |
| 20 | + dataService = inject(SignalRService); |
21 | 21 |
|
22 | 22 | @ViewChild('grid1', { static: true }) public grid: IgxGridComponent; |
23 | 23 | @ViewChild(IgxOverlayOutletDirective, { static: true }) public outlet: IgxOverlayOutletDirective; |
24 | 24 | @Output() public selectedDataChanged = new EventEmitter<Stock[]>(); |
25 | 25 | @Output() public keyDown = new EventEmitter(); |
26 | 26 | @Output() public chartColumnKeyDown = new EventEmitter<Stock>(); |
27 | 27 |
|
| 28 | + @Input() public allowChart = false; |
| 29 | + |
28 | 30 | public contracts = Contract; |
29 | 31 | public regions = REGIONS; |
30 | 32 | public selectionMode: GridSelectionMode = 'multiple'; |
|
0 commit comments