Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public primaryKey = "ID";
public childDataKey = "Children";
public groupColumnKey = "Categories";
public items: any[] = [{field: "Export native"}, { field: "Export JS Excel"}];
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 AbsoluteScrollStrategy()
};
private subscription;
private selectedButton;
private _timer;
// tslint:disable-next-line:member-ordering
constructor(private zone: NgZone, private localService: LocalDataService, private elRef: ElementRef) {
this.subscription = this.localService.getData(this.volume);
this.localService.records.subscribe((d) => this.data = d);
}
// tslint:disable-next-line:member-ordering
public ngOnInit() {
if (this.theme) {
document.body.classList.add("fin-dark-theme");
this.getData();
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;
@ViewChild("grid1", { read: IgxGridComponent }) public grid1: IgxGridComponent;
@ViewChild(IgxDropDownComponent) public igxDropDown: IgxDropDownComponent;
public data;
public comboData = [
"Paste data as new records",
"Paste starting from active cell"
];
public pasteMode = this.comboData[0];
private _positionSettings = {
horizontalStartPoint: HorizontalAlignment.Left,
verticalStartPoint: VerticalAlignment.Bottom
};
private _overlaySettings = {
closeOnOutsideClick: true,
modal: false,
positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
scrollStrategy: new CloseScrollStrategy()
};
constructor() {
this.data = LOCAL_DATA;
}
public ngOnInit() {
this.grid1.verticalScrollContainer.onChunkLoad.pipe().subscribe(() => {
if (this.grid1.rowList) {
this.clearStyles();
}
});
}
public toggleDropDown(eventArgs) {
public ngOnInit(): void {
const positionSettings: PositionSettings = {
closeAnimation: scaleOutBottom,
horizontalDirection: HorizontalAlignment.Right,
horizontalStartPoint: HorizontalAlignment.Left,
openAnimation: scaleInTop,
target: this.igxSelect.inputGroup.element.nativeElement,
verticalDirection: VerticalAlignment.Bottom,
verticalStartPoint: VerticalAlignment.Bottom
};
this.customOverlaySettings = {
positionStrategy: new ConnectedPositioningStrategy(
positionSettings
),
scrollStrategy: new AbsoluteScrollStrategy()
};
}
}
public hiddenColsLength: number;
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() {
public datePicker: IgxDatePickerComponent;
@ViewChild("snackbar")
public snackbar: IgxSnackbarComponent;
private deletedRow;
private _dropdownPositionSettings = {
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 onClickDirection(horAlign: HorizontalAlignment, vertAlign: VerticalAlignment) {
const positionSettings =
Object.assign(Object.assign({}, this._defaultPositionSettings), {
target: this.directionDemo.nativeElement,
horizontalDirection: horAlign, verticalDirection: vertAlign
});
const showSettings =
Object.assign(Object.assign({}, this._overlaySettings), {
positionStrategy: new ConnectedPositioningStrategy(positionSettings)
});
this.overlay.show(this.overlayDemo, showSettings);
}
@Component({
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);
}
}
target: this.modalDemo.nativeElement,
horizontalDirection: HorizontalAlignment.Right,
horizontalStartPoint: HorizontalAlignment.Right,
verticalDirection: VerticalAlignment.Bottom,
verticalStartPoint: VerticalAlignment.Bottom
});
let positionStrategy;
switch (strategy) {
case ("auto"):
positionStrategy = new AutoPositionStrategy(positionSettings);
break;
case ("elastic"):
positionStrategy = new ElasticPositionStrategy(positionSettings);
break;
case ("connected"):
positionStrategy = new ConnectedPositioningStrategy(positionSettings);
break;
default:
positionStrategy = new GlobalPositionStrategy(Object.assign(positionSettings, {
horizontalDirection: HorizontalAlignment.Center,
verticalDirection: VerticalAlignment.Middle
}));
}
const showSettings = Object.assign(Object.assign({}, this._overlaySettings), {
modal: this.modalValue,
positionStrategy
});
this.overlay.show(this.overlayId, showSettings);
}
public toggleDropDown(ev) {
if (!this.dropDownOpened && this.inputBox.value !== null && ev.key.length === 1) {
this.igxDropDown.open({
modal: false,
positionStrategy: new ConnectedPositioningStrategy({
target: this.inputBox.nativeElement
})
});
this.dropDownOpened = true;
this.inputBox.focus();
}
}