[CST-4591] Use search collection dropdown when importing from external source with lookup modal

This commit is contained in:
Giuseppe Digilio
2021-09-24 13:20:36 +02:00
parent c6a73f2dcb
commit d29c27b400
9 changed files with 90 additions and 32 deletions

View File

@@ -1,10 +1,15 @@
import { autoserialize, deserialize } from 'cerialize';
import { typedObject } from '../cache/builders/build-decorators';
import { link, typedObject } from '../cache/builders/build-decorators';
import { CacheableObject } from '../cache/object-cache.reducer';
import { excludeFromEquals } from '../utilities/equals.decorators';
import { EXTERNAL_SOURCE } from './external-source.resource-type';
import { HALLink } from './hal-link.model';
import { ResourceType } from './resource-type';
import { RemoteData } from '../data/remote-data';
import { PaginatedList } from '../data/paginated-list.model';
import { Observable } from 'rxjs/internal/Observable';
import { ITEM_TYPE } from './item-relationships/item-type.resource-type';
import { ItemType } from './item-relationships/item-type.model';
/**
* Model class for an external source
@@ -38,6 +43,13 @@ export class ExternalSource extends CacheableObject {
@autoserialize
hierarchical: boolean;
/**
* The list of entity types that are compatible with this external source
* Will be undefined unless the entityTypes {@link HALLink} has been resolved.
*/
@link(ITEM_TYPE, true)
entityTypes?: Observable<RemoteData<PaginatedList<ItemType>>>;
/**
* The {@link HALLink}s for this ExternalSource
*/
@@ -45,5 +57,6 @@ export class ExternalSource extends CacheableObject {
_links: {
self: HALLink;
entries: HALLink;
entityTypes: HALLink;
};
}