UNPKG

@arcgis/map-components

Version:
123 lines (121 loc) 5.09 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/lumina/controllers'; 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: LitElement & Pick<SwipeViewModel, never> & import('../../controllers/useViewModel').ViewModelControllerUses<SwipeViewModel>) => 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 a Scene component. * * [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-swipe/) */ export declare class ArcgisSwipe extends LitElement { /** * 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 temporarily hide it. If this * is set, make sure to call the [destroy](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-swipe/#destroy) method when you are done to * prevent memory leaks. * * @default false */ 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. * * @default "horizontal" */ direction: "vertical" | "horizontal"; /** * When `true`, sets the component to a disabled state so the user cannot interact with it. * * @default false */ disabled: boolean; /** * When `true`, the divider between the leading and trailing layers will be hidden. * * @default false */ hideDivider: boolean; /** * When `true`, the handle from which you drag the component will be hidden. * * @default false */ hideHandle: boolean; /** * Icon which represents the component. * Typically used when the component is controlled by another component (e.g. by the Expand component). * * @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/) * @default "compare" */ icon?: string; /** * The component's default label. * * @default "Swipe" */ label?: 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. * * _**Note**: Individual message keys may change between releases._ */ messageOverrides?: typeof this.messages._overrides; /** @default "manual" */ position: __esri.UIPosition; /** * The position of the Swipe component. This determines what percentage * of the view will be taken up by the [leadingLayers](#leadingLayers). * * @default 25 */ swipePosition: number; /** * By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene. * * @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component) */ referenceElement?: ArcgisReferenceElement | string; /** * The current state of the component. * * @default "disabled" */ 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>; /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */ readonly arcgisPropertyChange: TargetedEvent<this, { name: "state"; }>; /** Emitted when the component associated with a map or scene view is is ready to be interacted with. */ readonly arcgisReady: TargetedEvent<this, void>; private messages: Partial<{ componentLabel: string; dragLabel: string; }> & import('@arcgis/lumina/controllers').T9nMeta<{ componentLabel: string; dragLabel: string; }>; } export {};