Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.snack.show();
}
public updateRow(evt) {
const rowItem = evt.rowID;
rowItem.holdings = evt.newValue;
this.updateItem(rowItem);
}
// tslint:disable-next-line: member-ordering
private _dialogOverlaySettings = {
closeOnOutsideClick: true,
modal: true,
outlet: this.outlet,
scrollStrategy: new CloseScrollStrategy()
};
private positive24h = (rowData: any): boolean => {
return rowData.changePct24Hour > 0;
}
private negative24h = (rowData: any): boolean => {
return rowData.changePct24Hour < 0;
}
// tslint:disable-next-line:member-ordering
public dailyChanges = {
positive: this.positive24h,
negative: this.negative24h
};
this.getAndTransformData();
this.chart.overlayTypes.add(FinancialOverlayType.PriceChannel);
}
// tslint:disable-next-line: member-ordering
private _dropdownPositionSettings = {
horizontalStartPoint: HorizontalAlignment.Left,
verticalStartPoint: VerticalAlignment.Bottom
};
// tslint:disable-next-line: member-ordering
private _dropDownOverlaySettings = {
closeOnOutsideClick: true,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
scrollStrategy: new CloseScrollStrategy()
};
public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
const dropDown = selectedDropDown;
this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
dropDown.toggle(this._dropDownOverlaySettings);
}
public getData(event?: any) {
let coin: any;
if (event) {
const name = event.item.elementRef.nativeElement.innerText;
const symbol = name.substring(name.search('[[]') + 1, name.length - 1);
public pinnedColsLength: number;
public searchText: string = "";
public caseSensitive: boolean = false;
public _positionSettings: PositionSettings = {
horizontalDirection: HorizontalAlignment.Left,
horizontalStartPoint: HorizontalAlignment.Right,
verticalStartPoint: VerticalAlignment.Bottom
};
public _overlaySettings: OverlaySettings = {
closeOnOutsideClick: true,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
scrollStrategy: new CloseScrollStrategy()
};
private frmt: Intl.DateTimeFormat;
constructor(private excelExporterService: IgxExcelExporterService) { }
public ngOnInit() {
const employees = data;
for (const employee of employees) {
this.getDeals(employee);
}
this.localData = employees;
}
public toggleHiding() {
this._overlaySettings.positionStrategy.settings.target = this.hidingButton.nativeElement;
horizontalStartPoint: HorizontalAlignment.Left,
verticalStartPoint: VerticalAlignment.Bottom
};
private _dropDownOverlaySettings = {
closeOnOutsideClick: true,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
scrollStrategy: new CloseScrollStrategy()
};
private _dialogOverlaySettings2 = {
closeOnOutsideClick: true,
modal: true,
outlet: this.outlet,
scrollStrategy: new CloseScrollStrategy()
};
constructor() { }
public selectTheme(value: THEME) {
this.themesClass = value;
}
public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
const dropDown = selectedDropDown;
this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
dropDown.toggle(this._dropDownOverlaySettings);
}
public addRow() {
this.grid1.addRow(this.record);
}
backButtonClicked() {
this.location.back();
}
private _positionSettings = {
horizontalStartPoint: HorizontalAlignment.Left,
verticalStartPoint: VerticalAlignment.Bottom
};
private _overlaySettings = {
closeOnOutsideClick: true,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
scrollStrategy: new CloseScrollStrategy()
};
public toggleDropDown(eventArgs) {
this._overlaySettings.positionStrategy.settings.target = eventArgs.target;
this.igxDropDown.toggle(this._overlaySettings);
}
get selectOrderButtonCaption(): string {
if (this.ordersAvailable == null || this.ordersAvailable.length == 0) {
return this.translate.instant("lblNoOrders");
} else {
if (this.selectedOrderId == null) {
return this.translate.instant("lblSelectOrder");
} else {
return this.selectedOrderId;
}
public onClickScrollStrategy(strategy: string) {
let scrollStrategy;
const positionStrategy = new ConnectedPositioningStrategy();
switch (strategy) {
case ("absolute"):
scrollStrategy = new AbsoluteScrollStrategy();
positionStrategy.settings.target = this.scrollDemo.nativeElement.children[0];
break;
case ("block"):
scrollStrategy = new BlockScrollStrategy();
positionStrategy.settings.target = this.scrollDemo.nativeElement.children[1];
break;
case ("close"):
scrollStrategy = new CloseScrollStrategy(this.mainContainer.nativeElement);
positionStrategy.settings.target = this.scrollDemo.nativeElement.children[2];
break;
default:
scrollStrategy = new NoOpScrollStrategy();
positionStrategy.settings.target = this.scrollDemo.nativeElement.children[3];
}
this.overlay.show(this.overlayId, {
positionStrategy,
scrollStrategy,
modal: false,
closeOnOutsideClick: true
});
}
horizontalStartPoint: HorizontalAlignment.Left,
verticalStartPoint: VerticalAlignment.Bottom
};
private _dropDownOverlaySettings = {
closeOnOutsideClick: true,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
scrollStrategy: new CloseScrollStrategy()
};
private _dialogOverlaySettings2 = {
closeOnOutsideClick: true,
modal: true,
outlet: this.outlet,
scrollStrategy: new CloseScrollStrategy()
};
constructor() { }
public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
const dropDown = selectedDropDown;
this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
dropDown.toggle(this._dropDownOverlaySettings);
}
public addRow() {
this.grid1.addRow(this.record);
this.cancel();
}
public cancel() {
horizontalStartPoint: HorizontalAlignment.Left,
verticalStartPoint: VerticalAlignment.Bottom
};
private _dropDownOverlaySettings = {
closeOnOutsideClick: true,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
scrollStrategy: new CloseScrollStrategy()
};
private _dialogOverlaySettings2 = {
closeOnOutsideClick: true,
modal: true,
outlet: this.outlet,
scrollStrategy: new CloseScrollStrategy()
};
constructor() { }
public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
const dropDown = selectedDropDown;
this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
dropDown.toggle(this._dropDownOverlaySettings);
}
public addRow() {
this.grid1.addRow(this.record);
this.cancel();
}
public cancel() {
public onClickScrollStrategy(event: Event, strat: string) {
event.stopPropagation();
let scrollStrategy;
switch (strat) {
case ("absolute"):
scrollStrategy = new AbsoluteScrollStrategy();
break;
case ("block"):
scrollStrategy = new BlockScrollStrategy();
break;
case ("close"):
scrollStrategy = new CloseScrollStrategy(this.mainContainer.nativeElement);
break;
default:
scrollStrategy = new NoOpScrollStrategy();
}
const showSettings = Object.assign(Object.assign({}, this._overlaySettings), {
scrollStrategy,
modal: false
});
this.overlay.show(this.overlayDemo, showSettings);
}
selector: "app-toggle",
styleUrls: ["./toggle.component.scss"],
templateUrl: "./toggle.component.html"
})
export class ToggleComponent {
@ViewChild(IgxToggleDirective) public igxToggle: IgxToggleDirective;
@ViewChild("button") public igxButton: ElementRef;
public _positionSettings = {
horizontalStartPoint: HorizontalAlignment.Left,
verticalStartPoint: VerticalAlignment.Bottom
};
public _overlaySettings = {
closeOnOutsideClick: false,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
scrollStrategy: new CloseScrollStrategy()
};
public toggle() {
this._overlaySettings.positionStrategy.settings.target = this.igxButton.nativeElement;
this.igxToggle.toggle(this._overlaySettings);
}
}