refactor(ui): new icon library and user migration (#1828)
This commit is contained in:
@@ -29,12 +29,12 @@ describe('IconPickerService', () => {
|
||||
|
||||
it('returns the icon selected by the dialog', async () => {
|
||||
dialogLauncherService.openIconPickerDialog.mockResolvedValue({
|
||||
onClose: of({type: 'PRIME_NG', value: 'pi pi-book'}),
|
||||
onClose: of({type: 'LUCIDE', value: 'book'}),
|
||||
});
|
||||
|
||||
await expect(firstValueFrom(service.open())).resolves.toEqual({
|
||||
type: 'PRIME_NG',
|
||||
value: 'pi pi-book',
|
||||
type: 'LUCIDE',
|
||||
value: 'book',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import {inject, Injectable} from '@angular/core';
|
||||
import {EMPTY, from, Observable, switchMap} from 'rxjs';
|
||||
import {DialogLauncherService} from '../services/dialog-launcher.service';
|
||||
|
||||
export interface IconSelection {
|
||||
type: 'PRIME_NG' | 'CUSTOM_SVG';
|
||||
value: string;
|
||||
}
|
||||
import {IconSelection} from '../icons/icon-selection';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class IconPickerService {
|
||||
|
||||
Reference in New Issue
Block a user