Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
aggregate: (parent: any, data: any[]) => {
return parent.Change / (parent.Price - parent.Change) * 100;
},
field: "Change(%)"
}
];
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);
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 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 onClickModal(event: Event, strategy: string) {
event.stopPropagation();
const positionSettings = Object.assign(Object.assign({}, this._defaultPositionSettings), {
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,
public onClickModal(event: Event, strategy: string) {
event.stopPropagation();
const positionSettings = Object.assign(Object.assign({}, this._defaultPositionSettings), {
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
@Input()
@ViewChild("outlet", { read: IgxOverlayOutletDirective, static: true })
public outlet: IgxOverlayOutletDirective;
@ViewChild("grid1", { read: IgxGridComponent, static: true })
public grid1: IgxGridComponent;
@ViewChild("snackbar", { static: true })
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()
};
HorizontalAlignment,
IgxToggleDirective,
VerticalAlignment
} from "igniteui-angular";
@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);
}
}
public onClickModal(event: Event, strat: string) {
event.stopPropagation();
const positionSettings = Object.assign(Object.assign({}, this._defaultPositionSettings), {
target: this.modalDemo.nativeElement,
horizontalDirection: HorizontalAlignment.Right,
horizontalStartPoint: HorizontalAlignment.Right,
verticalDirection: VerticalAlignment.Bottom,
verticalStartPoint: VerticalAlignment.Bottom
});
let positionStrategy;
switch (strat) {
case ("auto"):
positionStrategy = new AutoPositionStrategy(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), {
aggregate: (parent: any, data: any[]) => {
return parent.Change / (parent.Price - parent.Change) * 100;
},
field: 'Change(%)'
}
];
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;
private volumeChanged;
constructor(private zone: NgZone, private localService: LocalDataService, private elRef: ElementRef) {
this.subscription = this.localService.getData(this.volume);