Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.at(stopIndex)
.patchValue({ stopProposals: groupedLocations });
// TODO: Prefer another source?
if (results[0]) {
if (results[0].source.getId() === 'icherchereverse') {
// prefer address type.
let resultPos = 0;
for (let i = 0; i < results.length; i++) {
const feature: any = results[i].data;
if (feature.properties.type === 'adresse') {
resultPos = i;
break;
}
}
this.stops.at(stopIndex).patchValue({
stopPoint: getEntityTitle(results[resultPos])
});
if (results[resultPos].data.geometry.type === 'Point') {
this.stops.at(stopIndex).patchValue({
stopCoordinates:
results[resultPos].data.geometry.coordinates
});
} else {
// Not moving the translated point Only to suggest value into the UI.
}
} else if (results[0].source.getId() === 'coordinatesreverse') {
this.stops.at(stopIndex).patchValue({
stopPoint: [
results[0].data.geometry.coordinates[0].toFixed(5),
results[0].data.geometry.coordinates[1].toFixed(5)
].join(',')
});
{
name: 'description',
title: 'Description',
renderer: EntityTableColumnRenderer.HTML
},
{
name: 'action',
title: '',
valueAccessor: (entity: object) => {
return [{
icon: 'home',
color: 'warn',
click: (row) => { console.log(row); }
}] as EntityTableButton[];
},
renderer: EntityTableColumnRenderer.ButtonGroup
}
]
};
constructor(private languageService: LanguageService) {}
ngOnInit() {
this.store.load([
{ id: '2', name: 'Name 2', description: '<b>Description 2</b>' },
{ id: '1', name: 'Name 1', description: '<b>Description 1</b>' },
{ id: '3', name: 'Name 3', description: '<b>Description 3</b>' }
]);
}
ngOnDestroy() {
this.store.destroy();
attribution: {
collapsed: true
}
}
});
public view = {
center: [-72, 47.2],
zoom: 5
};
public workspaceStore = new WorkspaceStore([]);
public selectedWorkspace$: Observable;
public actionbarMode = ActionbarMode.Dock;
public scrollBehavior = EntityTableScrollBehavior.Instant;
constructor(
private languageService: LanguageService,
private dataSourceService: DataSourceService,
private layerService: LayerService
) {}
ngOnInit() {
this.selectedWorkspace$ = this.workspaceStore.stateView
.firstBy$(
(record: EntityRecord) => record.state.selected === true
)
.pipe(
map((record: EntityRecord) => {
set opened(value: boolean) {
if (value === this._opened) {
return;
}
this._opened = value;
this.openedChange.emit(this._opened);
}
private _opened = true;
@Input() zoomAuto = false;
public icon = 'menu';
public actionStore = new ActionStore([]);
public actionbarMode = ActionbarMode.Overlay;
private multiple$ = new BehaviorSubject(false);
private isResultSelected$ = new BehaviorSubject(false);
private initialized = true;
private format = new olFormatGeoJSON();
public withZoomButton = true;
@Output() openedChange = new EventEmitter();
@Output() zoomAutoEvent = new EventEmitter();
resultSelected$ = new BehaviorSubject>(undefined);
@HostBinding('class.app-toast-panel-opened')
get hasOpenedClass() {
ngOnInit() {
const currentItems = this.map.layers.map((layer: Layer) => {
return {
id: layer.options.source.id,
title: layer.title,
type: CatalogItemType.Layer
};
});
this.store.state.updateMany(currentItems, { added: true }, true);
if (this.catalog && this.catalog.sortDirection !== undefined) {
this.store.view.sort({
direction: this.catalog.sortDirection,
valueAccessor: (item: CatalogItem) => item.title
});
}
this.watcher = new EntityStoreWatcher(this.store, this.cdRef);
}
ngOnInit() {
this.watcher = new EntityStoreWatcher(this.store, this.cdRef);
}
: 'radiobox-blank';
},
renderer: EntityTableColumnRenderer.Icon
},
{
name: 'id',
title: 'ID'
},
{
name: 'name',
title: 'Name'
},
{
name: 'description',
title: 'Description',
renderer: EntityTableColumnRenderer.HTML
},
{
name: 'action',
title: '',
valueAccessor: (entity: object) => {
return [{
icon: 'home',
color: 'warn',
click: (row) => { console.log(row); }
}] as EntityTableButton[];
},
renderer: EntityTableColumnRenderer.ButtonGroup
}
]
};
}
}
});
public view = {
center: [-72, 47.2],
zoom: 5
};
public workspaceStore = new WorkspaceStore([]);
public selectedWorkspace$: Observable;
public actionbarMode = ActionbarMode.Dock;
public scrollBehavior = EntityTableScrollBehavior.Instant;
constructor(
private languageService: LanguageService,
private dataSourceService: DataSourceService,
private layerService: LayerService
) {}
ngOnInit() {
this.selectedWorkspace$ = this.workspaceStore.stateView
.firstBy$(
(record: EntityRecord) => record.state.selected === true
)
.pipe(
map((record: EntityRecord) => {
return record === undefined ? undefined : record.entity;
})
name: 'name',
title: 'Name',
sortable: true,
filterable: true
},
{
name: 'description',
title: 'Description',
sortable: true,
filterable: true
}
],
actions: [
{
icon: 'file-document',
color: TableActionColor.primary,
click: row => this.showName(row.name)
}
],
selectionCheckbox: true
};
constructor(private languageService: LanguageService) {}
ngOnInit() {
this.database = new TableDatabase([
{ id: '2', name: 'Name 2', description: 'Hello 2' },
{ id: '1', name: 'Name 1', description: 'Bonjour 1' },
{ id: '3', name: 'Name 3', description: 'Hola 3' }
]);
}
ngOnInit() {
this.database = new TableDatabase([
{ id: '2', name: 'Name 2', description: 'Hello 2' },
{ id: '1', name: 'Name 1', description: 'Bonjour 1' },
{ id: '3', name: 'Name 3', description: 'Hola 3' }
]);
}