UNPKG

@arcgis/map-components

Version:
115 lines (113 loc) 4.49 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/components-controllers'; import { Nil } from '@arcgis/components-utils'; import { default as SwipeViewModel } from '@arcgis/core/widgets/Swipe/SwipeViewModel.js'; import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useSwipeViewModel: (component: import('@arcgis/components-controllers').StencilLifecycles & { manager: import('@arcgis/components-controllers').ControllerManager; el: HTMLElement; autoDestroyDisabled?: boolean; destroy?: () => Promise<void>; } & Pick<SwipeViewModel, never> & { reactiveUtils?: typeof __esri.reactiveUtils; state?: "ready" | "disabled" | undefined; icon: Nil | string; label: Nil | string; referenceElement: ArcgisReferenceElement | Nil | string; arcgisReady: import('@arcgis/components-controllers').EventEmitter; position: __esri.UIPosition; arcgisPropertyChange: import('@arcgis/components-controllers').EventEmitter<{ name: string; }> | undefined; el: HTMLElement & { childElem?: HTMLElement & { ownedBy?: HTMLElement; }; view?: __esri.MapView | __esri.SceneView | undefined; }; autoDestroyDisabled: boolean; destroy: () => Promise<void>; }, options?: { editConstructorProperties(props: unknown): unknown; } | undefined) => SwipeViewModel; /** * The Swipe component provides a tool to show a portion of a layer or layers * on top of a map. Layers can be swiped vertically or horizontally to easily * compare two layers or see what is underneath a layer. * * To use the Swipe component, set the `leadingLayers` and `trailingLayers` * properties to determine what will be compared on either side of the component. If one of these properties * is not set, then the Swipe component will overlay the existing map. * * **Known Limitations** * * - This component is not currently supported within an `arcgis-scene` component. */ export declare class ArcgisSwipe extends LitElement { /** */ private messages; /** * If true, the component will not be destroyed automatically when * it is disconnected from the document. This is useful when you * want to move the component to a different place on the page, or * temporary hide it. If this is set, make sure to call the * \`destroy\` method when you are done to prevent memory leaks. */ autoDestroyDisabled: boolean; /** * The direction the Swipe component moves across the view. * If `"horizontal"`, the component will move left and right and * if `"vertical"`, the component will move up and down. */ direction: "vertical" | "horizontal"; /** * When `true`, sets the component to a disabled state so the user cannot interact with it. */ disabled: boolean; /** * When `true`, the divider between the leading and trailing layers will be hidden. */ hideDivider: boolean; /** * When `true`, the handle from which you drag the component will be hidden. */ hideHandle: boolean; /** * Icon which represents the component. */ icon: Nil | string; /** * The component's default label. */ label: Nil | string; /** * A collection of layers that will show on the left or top side of the Swipe component. */ leadingLayers: __esri.Collection<__esri.Layer>; /** Replace localized message strings with your own strings. */ messageOverrides?: typeof this.messages._overrides; position: __esri.UIPosition; /** * The position of the Swipe component. This determines what percentage * of the view will be taken up by the [leadingLayers](#leadingLayers). */ swipePosition: number; referenceElement: ArcgisReferenceElement | Nil | string; /** * The current state of the component. */ readonly state: "ready" | "disabled"; /** * A collection of layers that will show on the right or bottom side of the Swipe component. */ trailingLayers: __esri.Collection<__esri.Layer>; /** Permanently destroy the component */ destroy(): Promise<void>; readonly arcgisPropertyChange: TargetedEvent<this, { name: "state"; }>; readonly arcgisReady: TargetedEvent<this, undefined>; } export {};