import type Basemap from "../Basemap.js"; import type LocalBasemapsSource from "./LocalBasemapsSource.js"; import type Collection from "../core/Collection.js"; import type Portal from "../portal/Portal.js"; import type { LocalBasemapsSourceProperties } from "./LocalBasemapsSource.js"; import type { BasemapFilter, BasemapsSourceState, UpdateBasemapsCallback } from "./types.js"; import type { LoadableMixin, LoadableMixinProperties } from "../core/Loadable.js"; import type { EsriPromiseMixin } from "../core/Promise.js"; import type { AbortOptions } from "../core/promiseUtils.js"; import type { PortalProperties } from "../portal/Portal.js"; /** @since 5.2 */ export interface PortalBasemapsSourceProperties extends LocalBasemapsSourceProperties, LoadableMixinProperties, Partial> { /** * The Portal from which to fetch basemaps. * * @since 5.2 */ portal?: PortalProperties; } /** * A Portal-driven source for [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/)s in a [BasemapGalleryModel](https://developers.arcgis.com/javascript/latest/references/core/basemapGallery/BasemapGalleryModel/). * * @since 5.2 * @see [BasemapGalleryModel.source](https://developers.arcgis.com/javascript/latest/references/core/basemapGallery/BasemapGalleryModel/#source) */ export default class PortalBasemapsSource extends PortalBasemapsSourceSuperclass { /** @since 5.2 */ constructor(properties?: PortalBasemapsSourceProperties); /** * A collection of [Basemap](https://developers.arcgis.com/javascript/latest/references/core/Basemap/)s fetched from the source's Portal. * * @since 5.2 */ get basemaps(): Collection; /** * Function used to filter basemaps after being fetched from the Portal. * * @since 5.2 */ accessor filterFunction: BasemapFilter | null | undefined; /** * The Portal from which to fetch basemaps. * * @since 5.2 */ get portal(): Portal; set portal(value: PortalProperties); /** * An object with key-value pairs used to create a custom basemap gallery group query. * Note that all parameters will be joined using the `AND` operator. * A query string can also be provided for more advanced use cases. * * @since 5.2 */ accessor query: Record | string | null | undefined; /** * The source's state. * * @default "not-loaded" * @since 5.2 */ get state(): BasemapsSourceState; /** * Callback for updating basemaps after being fetched and filtered. * * @since 5.2 */ accessor updateBasemapsCallback: UpdateBasemapsCallback | null | undefined; /** * @internal * @since 5.2 */ accessor viewType: "2d" | "3d" | null | undefined; /** * Destroys the Portal basemaps source. * * @since 5.2 */ destroy(): void; /** * Loads the source's Portal. * * @param options - Options for aborting the load. * @returns A promise that resolves with this source when the Portal has loaded. * @since 5.2 */ load(options?: AbortOptions | null | undefined): Promise; /** * Refreshes basemaps by fetching them from the Portal. * * @returns A promise that resolves when the basemaps have been fetched. * @since 5.2 */ refresh(): Promise; } declare const PortalBasemapsSourceSuperclass: typeof LocalBasemapsSource & typeof EsriPromiseMixin & typeof LoadableMixin